diff --git a/favicon.ico b/favicon.ico index f713b1e2..a1d02ee9 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/favicon.png b/favicon.png index 313b9c9a..1126c270 100644 Binary files a/favicon.png and b/favicon.png differ diff --git a/fireboywatergirl2/Untitled.jpeg b/fireboywatergirl2/Untitled.jpeg new file mode 100644 index 00000000..cfba264d Binary files /dev/null and b/fireboywatergirl2/Untitled.jpeg differ diff --git a/fireboywatergirl2/assets/383ad09b92c7446b9113cccc29630517-512x512.jpeg b/fireboywatergirl2/assets/383ad09b92c7446b9113cccc29630517-512x512.jpeg new file mode 100644 index 00000000..7fdbec33 Binary files /dev/null and b/fireboywatergirl2/assets/383ad09b92c7446b9113cccc29630517-512x512.jpeg differ diff --git a/fireboywatergirl2/assets/atlasses/CharAssets.json b/fireboywatergirl2/assets/atlasses/CharAssets.json new file mode 100644 index 00000000..380af0be --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/CharAssets.json @@ -0,0 +1,1923 @@ +{"frames": [ + +{ + "filename": "_default0000", + "frame": {"x":2008,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "death_smoke0000", + "frame": {"x":116,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0001", + "frame": {"x":222,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0002", + "frame": {"x":1203,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0003", + "frame": {"x":1309,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0004", + "frame": {"x":1415,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0005", + "frame": {"x":1521,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0006", + "frame": {"x":1627,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0007", + "frame": {"x":1733,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0008", + "frame": {"x":1839,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0009", + "frame": {"x":518,"y":1430,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0010", + "frame": {"x":116,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0011", + "frame": {"x":222,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0012", + "frame": {"x":0,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0013", + "frame": {"x":969,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0014", + "frame": {"x":1075,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0015", + "frame": {"x":624,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0016", + "frame": {"x":730,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0017", + "frame": {"x":836,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0018", + "frame": {"x":328,"y":1462,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0019", + "frame": {"x":1181,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0020", + "frame": {"x":1287,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0021", + "frame": {"x":1393,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0022", + "frame": {"x":1499,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0023", + "frame": {"x":1605,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0024", + "frame": {"x":1711,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0025", + "frame": {"x":1817,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0026", + "frame": {"x":1923,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0027", + "frame": {"x":434,"y":1541,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0028", + "frame": {"x":106,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0029", + "frame": {"x":212,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0030", + "frame": {"x":0,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0031", + "frame": {"x":942,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0032", + "frame": {"x":1048,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0033", + "frame": {"x":540,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0034", + "frame": {"x":646,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0035", + "frame": {"x":752,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0036", + "frame": {"x":318,"y":1573,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0037", + "frame": {"x":1154,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0038", + "frame": {"x":1260,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0039", + "frame": {"x":1366,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0040", + "frame": {"x":1472,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0041", + "frame": {"x":1578,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0042", + "frame": {"x":1684,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0043", + "frame": {"x":1790,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0044", + "frame": {"x":1896,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "diamond_fb0000", + "frame": {"x":1086,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "diamond_fbwg0000", + "frame": {"x":0,"y":1341,"w":112,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":112,"h":112}, + "sourceSize": {"w":112,"h":112} +} +,{ + "filename": "diamond_silver0000", + "frame": {"x":848,"y":1339,"w":117,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":117,"h":117}, + "sourceSize": {"w":117,"h":117} +} +,{ + "filename": "diamond_wg0000", + "frame": {"x":969,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "fire_glow0000", + "frame": {"x":1944,"y":1266,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "fire_head_falling0000", + "frame": {"x":1340,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0001", + "frame": {"x":1474,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0002", + "frame": {"x":1608,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0003", + "frame": {"x":1742,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0004", + "frame": {"x":1876,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0000", + "frame": {"x":0,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0001", + "frame": {"x":134,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0002", + "frame": {"x":268,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0003", + "frame": {"x":402,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0004", + "frame": {"x":536,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0005", + "frame": {"x":670,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0006", + "frame": {"x":804,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0007", + "frame": {"x":938,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0008", + "frame": {"x":1072,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0009", + "frame": {"x":1206,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0010", + "frame": {"x":1340,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0011", + "frame": {"x":1474,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0012", + "frame": {"x":1608,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0013", + "frame": {"x":1742,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0014", + "frame": {"x":1876,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0015", + "frame": {"x":0,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0016", + "frame": {"x":134,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0017", + "frame": {"x":268,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0018", + "frame": {"x":402,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_jumping0000", + "frame": {"x":536,"y":1028,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0001", + "frame": {"x":696,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0002", + "frame": {"x":856,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0003", + "frame": {"x":1016,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0004", + "frame": {"x":1176,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0005", + "frame": {"x":1336,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0006", + "frame": {"x":1496,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0007", + "frame": {"x":1656,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0008", + "frame": {"x":1816,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0009", + "frame": {"x":536,"y":1162,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0010", + "frame": {"x":696,"y":1192,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_rising0000", + "frame": {"x":408,"y":1194,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0001", + "frame": {"x":518,"y":1296,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0002", + "frame": {"x":628,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0003", + "frame": {"x":738,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0004", + "frame": {"x":408,"y":1328,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_ice_legs0000", + "frame": {"x":664,"y":1896,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0001", + "frame": {"x":148,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0002", + "frame": {"x":224,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_legs_idle0000", + "frame": {"x":134,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0000", + "frame": {"x":1024,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0001", + "frame": {"x":1158,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0002", + "frame": {"x":1292,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0003", + "frame": {"x":1426,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0004", + "frame": {"x":1560,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0005", + "frame": {"x":1694,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0006", + "frame": {"x":1828,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0007", + "frame": {"x":0,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_stairs0000", + "frame": {"x":1962,"y":292,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0001", + "frame": {"x":328,"y":1341,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0002", + "frame": {"x":858,"y":1571,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0003", + "frame": {"x":424,"y":1652,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0004", + "frame": {"x":106,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0005", + "frame": {"x":181,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0006", + "frame": {"x":858,"y":1678,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0007", + "frame": {"x":0,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0008", + "frame": {"x":933,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0009", + "frame": {"x":1008,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0010", + "frame": {"x":499,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0011", + "frame": {"x":574,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0012", + "frame": {"x":649,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0013", + "frame": {"x":724,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0014", + "frame": {"x":256,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0015", + "frame": {"x":331,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0016", + "frame": {"x":1083,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0017", + "frame": {"x":1158,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0018", + "frame": {"x":1233,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0019", + "frame": {"x":1308,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0020", + "frame": {"x":1383,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0021", + "frame": {"x":1458,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0022", + "frame": {"x":1533,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0023", + "frame": {"x":1608,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0024", + "frame": {"x":1683,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0025", + "frame": {"x":1758,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0026", + "frame": {"x":1833,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0027", + "frame": {"x":1908,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0028", + "frame": {"x":406,"y":1759,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0029", + "frame": {"x":75,"y":1781,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "water_glow0000", + "frame": {"x":1945,"y":1374,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "water_head_falling0000", + "frame": {"x":0,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0001", + "frame": {"x":134,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0002", + "frame": {"x":268,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0003", + "frame": {"x":402,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0004", + "frame": {"x":536,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0005", + "frame": {"x":670,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0006", + "frame": {"x":804,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0007", + "frame": {"x":938,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0008", + "frame": {"x":1072,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0009", + "frame": {"x":1206,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0010", + "frame": {"x":1340,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_idle0000", + "frame": {"x":1340,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0001", + "frame": {"x":1474,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0002", + "frame": {"x":1608,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0003", + "frame": {"x":1742,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0004", + "frame": {"x":1876,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0005", + "frame": {"x":0,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0006", + "frame": {"x":134,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0007", + "frame": {"x":268,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0008", + "frame": {"x":402,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0009", + "frame": {"x":536,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0010", + "frame": {"x":670,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0011", + "frame": {"x":804,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0012", + "frame": {"x":938,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0013", + "frame": {"x":1072,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0014", + "frame": {"x":1206,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0015", + "frame": {"x":1340,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0016", + "frame": {"x":1474,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0017", + "frame": {"x":1608,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0018", + "frame": {"x":1742,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0019", + "frame": {"x":1876,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0020", + "frame": {"x":0,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0021", + "frame": {"x":134,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0022", + "frame": {"x":268,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0023", + "frame": {"x":402,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0024", + "frame": {"x":536,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0025", + "frame": {"x":670,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0026", + "frame": {"x":804,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0027", + "frame": {"x":938,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0028", + "frame": {"x":1072,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0029", + "frame": {"x":1206,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_jumping0000", + "frame": {"x":1474,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0001", + "frame": {"x":1652,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0002", + "frame": {"x":1830,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0003", + "frame": {"x":1474,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0004", + "frame": {"x":1652,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0005", + "frame": {"x":1830,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0006", + "frame": {"x":0,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0007", + "frame": {"x":178,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0008", + "frame": {"x":356,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0009", + "frame": {"x":534,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0010", + "frame": {"x":712,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_rising0000", + "frame": {"x":856,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0001", + "frame": {"x":992,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0002", + "frame": {"x":1128,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0003", + "frame": {"x":0,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0004", + "frame": {"x":136,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0005", + "frame": {"x":272,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0006", + "frame": {"x":1264,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0007", + "frame": {"x":1400,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0008", + "frame": {"x":1536,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0009", + "frame": {"x":1672,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0010", + "frame": {"x":1808,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_ice_legs0000", + "frame": {"x":1976,"y":1132,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0001", + "frame": {"x":150,"y":1781,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0002", + "frame": {"x":799,"y":1785,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_legs_idle0000", + "frame": {"x":890,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0000", + "frame": {"x":268,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0001", + "frame": {"x":402,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0002", + "frame": {"x":536,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0003", + "frame": {"x":670,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0004", + "frame": {"x":804,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0005", + "frame": {"x":938,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0006", + "frame": {"x":1072,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0007", + "frame": {"x":1206,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_stairs0000", + "frame": {"x":0,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0001", + "frame": {"x":869,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0002", + "frame": {"x":943,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0003", + "frame": {"x":481,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0004", + "frame": {"x":555,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0005", + "frame": {"x":629,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0006", + "frame": {"x":703,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0007", + "frame": {"x":220,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0008", + "frame": {"x":294,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0009", + "frame": {"x":1017,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0010", + "frame": {"x":1091,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0011", + "frame": {"x":1165,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0012", + "frame": {"x":1239,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0013", + "frame": {"x":1313,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0014", + "frame": {"x":1387,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0015", + "frame": {"x":1461,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0016", + "frame": {"x":1535,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0017", + "frame": {"x":1609,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0018", + "frame": {"x":1683,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0019", + "frame": {"x":1757,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0020", + "frame": {"x":1831,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0021", + "frame": {"x":1905,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0022", + "frame": {"x":368,"y":1866,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0023", + "frame": {"x":74,"y":1888,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0024", + "frame": {"x":0,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0025", + "frame": {"x":869,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0026", + "frame": {"x":943,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0027", + "frame": {"x":442,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0028", + "frame": {"x":516,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0029", + "frame": {"x":590,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "CharAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/CharAssets.png b/fireboywatergirl2/assets/atlasses/CharAssets.png new file mode 100644 index 00000000..a9ffd160 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/CharAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/GroundAssets.json b/fireboywatergirl2/assets/atlasses/GroundAssets.json new file mode 100644 index 00000000..3ed6f9b2 --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/GroundAssets.json @@ -0,0 +1,2755 @@ +{"frames": [ + +{ + "filename": "BeamDust0000", + "frame": {"x":0,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0001", + "frame": {"x":58,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0002", + "frame": {"x":116,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0003", + "frame": {"x":174,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0004", + "frame": {"x":232,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0005", + "frame": {"x":290,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0006", + "frame": {"x":348,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0007", + "frame": {"x":406,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0008", + "frame": {"x":464,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0009", + "frame": {"x":522,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0010", + "frame": {"x":580,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0011", + "frame": {"x":638,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0012", + "frame": {"x":696,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0013", + "frame": {"x":754,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0014", + "frame": {"x":812,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0015", + "frame": {"x":870,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0016", + "frame": {"x":928,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0017", + "frame": {"x":0,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0018", + "frame": {"x":58,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0019", + "frame": {"x":116,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0020", + "frame": {"x":174,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0021", + "frame": {"x":232,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0022", + "frame": {"x":290,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0023", + "frame": {"x":348,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0024", + "frame": {"x":406,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0025", + "frame": {"x":464,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0026", + "frame": {"x":522,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0027", + "frame": {"x":580,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0028", + "frame": {"x":638,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0029", + "frame": {"x":696,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0030", + "frame": {"x":754,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0031", + "frame": {"x":812,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0032", + "frame": {"x":870,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0033", + "frame": {"x":928,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0034", + "frame": {"x":0,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0035", + "frame": {"x":58,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0036", + "frame": {"x":116,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0037", + "frame": {"x":174,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0038", + "frame": {"x":232,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0039", + "frame": {"x":290,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0040", + "frame": {"x":348,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0041", + "frame": {"x":406,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0042", + "frame": {"x":464,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0043", + "frame": {"x":522,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0044", + "frame": {"x":580,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0045", + "frame": {"x":638,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0046", + "frame": {"x":696,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0047", + "frame": {"x":754,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0048", + "frame": {"x":812,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0049", + "frame": {"x":870,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0050", + "frame": {"x":928,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0051", + "frame": {"x":0,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0052", + "frame": {"x":58,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0053", + "frame": {"x":116,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0054", + "frame": {"x":174,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0055", + "frame": {"x":232,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0056", + "frame": {"x":290,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0057", + "frame": {"x":348,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0058", + "frame": {"x":406,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0059", + "frame": {"x":464,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamGradient0000", + "frame": {"x":522,"y":171,"w":10,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":10,"h":20}, + "sourceSize": {"w":10,"h":20} +} +,{ + "filename": "BlackBox0000", + "frame": {"x":536,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0001", + "frame": {"x":590,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0002", + "frame": {"x":644,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0003", + "frame": {"x":698,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0004", + "frame": {"x":752,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0005", + "frame": {"x":806,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0006", + "frame": {"x":860,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0007", + "frame": {"x":914,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0008", + "frame": {"x":968,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0009", + "frame": {"x":0,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0010", + "frame": {"x":54,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0011", + "frame": {"x":108,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0012", + "frame": {"x":162,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0013", + "frame": {"x":216,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0014", + "frame": {"x":270,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBoxLeft0000", + "frame": {"x":324,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0001", + "frame": {"x":378,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0002", + "frame": {"x":432,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0003", + "frame": {"x":486,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0004", + "frame": {"x":540,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0005", + "frame": {"x":594,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0006", + "frame": {"x":648,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0007", + "frame": {"x":702,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0008", + "frame": {"x":756,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0009", + "frame": {"x":810,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0010", + "frame": {"x":864,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0011", + "frame": {"x":918,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0012", + "frame": {"x":972,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0013", + "frame": {"x":0,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0014", + "frame": {"x":54,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxRight0000", + "frame": {"x":108,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0001", + "frame": {"x":162,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0002", + "frame": {"x":216,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0003", + "frame": {"x":270,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0004", + "frame": {"x":324,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0005", + "frame": {"x":378,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0006", + "frame": {"x":432,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0007", + "frame": {"x":486,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0008", + "frame": {"x":540,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0009", + "frame": {"x":594,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0010", + "frame": {"x":648,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0011", + "frame": {"x":702,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0012", + "frame": {"x":756,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0013", + "frame": {"x":810,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0014", + "frame": {"x":864,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "DarkDisk0000", + "frame": {"x":0,"y":329,"w":301,"h":300}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":301,"h":300}, + "sourceSize": {"w":301,"h":300} +} +,{ + "filename": "Dust0000", + "frame": {"x":305,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0001", + "frame": {"x":422,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0002", + "frame": {"x":539,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0003", + "frame": {"x":656,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0004", + "frame": {"x":773,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0005", + "frame": {"x":890,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0006", + "frame": {"x":0,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0007", + "frame": {"x":117,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0008", + "frame": {"x":234,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0009", + "frame": {"x":351,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0010", + "frame": {"x":468,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0011", + "frame": {"x":585,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0012", + "frame": {"x":702,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0013", + "frame": {"x":819,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0014", + "frame": {"x":0,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0015", + "frame": {"x":117,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0016", + "frame": {"x":234,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0017", + "frame": {"x":351,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0018", + "frame": {"x":468,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0019", + "frame": {"x":585,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0020", + "frame": {"x":702,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0021", + "frame": {"x":819,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0022", + "frame": {"x":0,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0023", + "frame": {"x":117,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0024", + "frame": {"x":234,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0025", + "frame": {"x":351,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0026", + "frame": {"x":468,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0027", + "frame": {"x":585,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0028", + "frame": {"x":702,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0029", + "frame": {"x":819,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0030", + "frame": {"x":0,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0031", + "frame": {"x":117,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0032", + "frame": {"x":234,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0033", + "frame": {"x":351,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0034", + "frame": {"x":468,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0035", + "frame": {"x":585,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0036", + "frame": {"x":702,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0037", + "frame": {"x":819,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0038", + "frame": {"x":0,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0039", + "frame": {"x":117,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0040", + "frame": {"x":234,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0041", + "frame": {"x":351,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0042", + "frame": {"x":468,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0043", + "frame": {"x":585,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0044", + "frame": {"x":702,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0045", + "frame": {"x":819,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0046", + "frame": {"x":0,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0047", + "frame": {"x":117,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0048", + "frame": {"x":234,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0049", + "frame": {"x":351,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0050", + "frame": {"x":468,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0051", + "frame": {"x":585,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0052", + "frame": {"x":702,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0053", + "frame": {"x":819,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0054", + "frame": {"x":0,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0055", + "frame": {"x":117,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0056", + "frame": {"x":234,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0057", + "frame": {"x":351,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0058", + "frame": {"x":468,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0059", + "frame": {"x":585,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "FireBox0000", + "frame": {"x":702,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0001", + "frame": {"x":756,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0002", + "frame": {"x":810,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0003", + "frame": {"x":864,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0004", + "frame": {"x":918,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0005", + "frame": {"x":972,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0006", + "frame": {"x":0,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0007", + "frame": {"x":54,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0008", + "frame": {"x":108,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0009", + "frame": {"x":162,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0010", + "frame": {"x":216,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0011", + "frame": {"x":270,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0012", + "frame": {"x":324,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0013", + "frame": {"x":378,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0014", + "frame": {"x":432,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBoxLeft0000", + "frame": {"x":486,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0001", + "frame": {"x":540,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0002", + "frame": {"x":594,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0003", + "frame": {"x":648,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0004", + "frame": {"x":702,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0005", + "frame": {"x":756,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0006", + "frame": {"x":810,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0007", + "frame": {"x":864,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0008", + "frame": {"x":918,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0009", + "frame": {"x":972,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0010", + "frame": {"x":0,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0011", + "frame": {"x":54,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0012", + "frame": {"x":108,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0013", + "frame": {"x":162,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0014", + "frame": {"x":216,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxRight0000", + "frame": {"x":270,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0001", + "frame": {"x":324,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0002", + "frame": {"x":378,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0003", + "frame": {"x":432,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0004", + "frame": {"x":486,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0005", + "frame": {"x":540,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0006", + "frame": {"x":594,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0007", + "frame": {"x":648,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0008", + "frame": {"x":702,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0009", + "frame": {"x":756,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0010", + "frame": {"x":810,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0011", + "frame": {"x":864,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0012", + "frame": {"x":918,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0013", + "frame": {"x":972,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0014", + "frame": {"x":0,"y":1456,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FreezeEffect0000", + "frame": {"x":54,"y":1456,"w":98,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":98,"h":100}, + "sourceSize": {"w":98,"h":100} +} +,{ + "filename": "GreenBox0000", + "frame": {"x":156,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0001", + "frame": {"x":210,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0002", + "frame": {"x":264,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0003", + "frame": {"x":318,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0004", + "frame": {"x":372,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0005", + "frame": {"x":426,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0006", + "frame": {"x":480,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0007", + "frame": {"x":534,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0008", + "frame": {"x":588,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0009", + "frame": {"x":642,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0010", + "frame": {"x":696,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0011", + "frame": {"x":750,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0012", + "frame": {"x":804,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0013", + "frame": {"x":858,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0014", + "frame": {"x":912,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBoxLeft0000", + "frame": {"x":966,"y":1456,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0001", + "frame": {"x":0,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0002", + "frame": {"x":54,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0003", + "frame": {"x":108,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0004", + "frame": {"x":162,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0005", + "frame": {"x":216,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0006", + "frame": {"x":270,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0007", + "frame": {"x":324,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0008", + "frame": {"x":378,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0009", + "frame": {"x":432,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0010", + "frame": {"x":486,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0011", + "frame": {"x":540,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0012", + "frame": {"x":594,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0013", + "frame": {"x":648,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0014", + "frame": {"x":702,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxRight0000", + "frame": {"x":756,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0001", + "frame": {"x":810,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0002", + "frame": {"x":864,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0003", + "frame": {"x":918,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0004", + "frame": {"x":972,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0005", + "frame": {"x":0,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0006", + "frame": {"x":54,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0007", + "frame": {"x":108,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0008", + "frame": {"x":162,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0009", + "frame": {"x":216,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0010", + "frame": {"x":270,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0011", + "frame": {"x":324,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0012", + "frame": {"x":378,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0013", + "frame": {"x":432,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0014", + "frame": {"x":486,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "IceBox0000", + "frame": {"x":540,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxLeft0000", + "frame": {"x":590,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxRight0000", + "frame": {"x":640,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "MaskBox00000", + "frame": {"x":690,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00001", + "frame": {"x":728,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00002", + "frame": {"x":766,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00003", + "frame": {"x":804,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox10000", + "frame": {"x":842,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox20000", + "frame": {"x":880,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox30000", + "frame": {"x":918,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox40000", + "frame": {"x":956,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox50000", + "frame": {"x":0,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox60000", + "frame": {"x":39,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox70000", + "frame": {"x":78,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox80000", + "frame": {"x":117,"y":1657,"w":36,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":34}, + "sourceSize": {"w":36,"h":34} +} +,{ + "filename": "MaskBox90000", + "frame": {"x":157,"y":1657,"w":35,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":34}, + "sourceSize": {"w":35,"h":34} +} +,{ + "filename": "SnowFlat0000", + "frame": {"x":196,"y":1657,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "SnowSlope0000", + "frame": {"x":260,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "SnowSlope0001", + "frame": {"x":314,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "WaterBox0000", + "frame": {"x":368,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0001", + "frame": {"x":418,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0002", + "frame": {"x":468,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0003", + "frame": {"x":518,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0004", + "frame": {"x":568,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0005", + "frame": {"x":618,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0006", + "frame": {"x":668,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0007", + "frame": {"x":718,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0008", + "frame": {"x":768,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0009", + "frame": {"x":818,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0010", + "frame": {"x":868,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0011", + "frame": {"x":918,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0012", + "frame": {"x":968,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0013", + "frame": {"x":0,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0014", + "frame": {"x":50,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0000", + "frame": {"x":100,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0001", + "frame": {"x":150,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0002", + "frame": {"x":200,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0003", + "frame": {"x":250,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0004", + "frame": {"x":300,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0005", + "frame": {"x":350,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0006", + "frame": {"x":400,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0007", + "frame": {"x":450,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0008", + "frame": {"x":500,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0009", + "frame": {"x":550,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0010", + "frame": {"x":600,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0011", + "frame": {"x":650,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0012", + "frame": {"x":700,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0013", + "frame": {"x":750,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0014", + "frame": {"x":800,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0000", + "frame": {"x":850,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0001", + "frame": {"x":900,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0002", + "frame": {"x":950,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0003", + "frame": {"x":0,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0004", + "frame": {"x":50,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0005", + "frame": {"x":100,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0006", + "frame": {"x":150,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0007", + "frame": {"x":200,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0008", + "frame": {"x":250,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0009", + "frame": {"x":300,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0010", + "frame": {"x":350,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0011", + "frame": {"x":400,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0012", + "frame": {"x":450,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0013", + "frame": {"x":500,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0014", + "frame": {"x":550,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "_default0000", + "frame": {"x":600,"y":1772,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "frost0000", + "frame": {"x":638,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0001", + "frame": {"x":688,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0002", + "frame": {"x":738,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0003", + "frame": {"x":788,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0004", + "frame": {"x":838,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0005", + "frame": {"x":888,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0006", + "frame": {"x":938,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0007", + "frame": {"x":0,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0008", + "frame": {"x":50,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0009", + "frame": {"x":100,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "vapor0000", + "frame": {"x":150,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0001", + "frame": {"x":235,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0002", + "frame": {"x":320,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0003", + "frame": {"x":405,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0004", + "frame": {"x":490,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0005", + "frame": {"x":575,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0006", + "frame": {"x":660,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0007", + "frame": {"x":745,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0008", + "frame": {"x":830,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0009", + "frame": {"x":915,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "GroundAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/GroundAssets.png b/fireboywatergirl2/assets/atlasses/GroundAssets.png new file mode 100644 index 00000000..cfe894e9 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/GroundAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/MechAssets.json b/fireboywatergirl2/assets/atlasses/MechAssets.json new file mode 100644 index 00000000..b29d99ce --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/MechAssets.json @@ -0,0 +1,1315 @@ +{"frames": [ + +{ + "filename": "BackgroundCover0000", + "frame": {"x":0,"y":0,"w":32,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":32}, + "sourceSize": {"w":32,"h":32} +} +,{ + "filename": "BarCapLeft0000", + "frame": {"x":1696,"y":0,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "BarCapRight0000", + "frame": {"x":1746,"y":0,"w":48,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":46}, + "sourceSize": {"w":48,"h":46} +} +,{ + "filename": "BarCenter0000", + "frame": {"x":1798,"y":0,"w":108,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":48}, + "sourceSize": {"w":108,"h":48} +} +,{ + "filename": "BoxMirror0000", + "frame": {"x":764,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "SliderDot0000", + "frame": {"x":1433,"y":1058,"w":33,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":33}, + "sourceSize": {"w":33,"h":33} +} +,{ + "filename": "SliderTrack0000", + "frame": {"x":1470,"y":1058,"w":218,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":19}, + "sourceSize": {"w":218,"h":19} +} +,{ + "filename": "WindowCenter0000", + "frame": {"x":264,"y":1802,"w":108,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":46}, + "sourceSize": {"w":108,"h":46} +} +,{ + "filename": "WindowLeft0000", + "frame": {"x":376,"y":1802,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "WindowRight0000", + "frame": {"x":426,"y":1802,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "_default0000", + "frame": {"x":836,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "ball0000", + "frame": {"x":36,"y":0,"w":40,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":40}, + "sourceSize": {"w":40,"h":40} +} +,{ + "filename": "beamer0000", + "frame": {"x":422,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_off0000", + "frame": {"x":536,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_on0000", + "frame": {"x":650,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "hanging_anchor0000", + "frame": {"x":389,"y":860,"w":38,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":38,"h":35}, + "sourceSize": {"w":38,"h":35} +} +,{ + "filename": "hanging_base0000", + "frame": {"x":431,"y":860,"w":32,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":28}, + "sourceSize": {"w":32,"h":28} +} +,{ + "filename": "hanging_platform0000", + "frame": {"x":467,"y":860,"w":142,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":22}, + "sourceSize": {"w":142,"h":22} +} +,{ + "filename": "infinitemirror0000", + "frame": {"x":125,"y":1058,"w":130,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":130}, + "sourceSize": {"w":130,"h":130} +} +,{ + "filename": "infinitemirror_light_off0000", + "frame": {"x":259,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "lever_base0000", + "frame": {"x":874,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lever_base_light_off0000", + "frame": {"x":988,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_base_light_on0000", + "frame": {"x":1100,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick0000", + "frame": {"x":1212,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_off0000", + "frame": {"x":1324,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_on0000", + "frame": {"x":1436,"y":0,"w":106,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":164}, + "sourceSize": {"w":106,"h":164} +} +,{ + "filename": "lightpusher_base0000", + "frame": {"x":80,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_off0000", + "frame": {"x":194,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_on0000", + "frame": {"x":308,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "moving_platform_light_off0000", + "frame": {"x":1910,"y":0,"w":138,"h":26}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":26}, + "sourceSize": {"w":138,"h":26} +} +,{ + "filename": "moving_platform_light_on0000", + "frame": {"x":0,"y":168,"w":142,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":34}, + "sourceSize": {"w":142,"h":34} +} +,{ + "filename": "movingbox0000", + "frame": {"x":1546,"y":0,"w":74,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":74,"h":76}, + "sourceSize": {"w":74,"h":76} +} +,{ + "filename": "movingbox20000", + "frame": {"x":1624,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "portal0000", + "frame": {"x":146,"y":168,"w":82,"h":166}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":166}, + "sourceSize": {"w":82,"h":166} +} +,{ + "filename": "portal_center0000", + "frame": {"x":232,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0001", + "frame": {"x":318,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0002", + "frame": {"x":404,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0003", + "frame": {"x":490,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0004", + "frame": {"x":576,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0005", + "frame": {"x":662,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0006", + "frame": {"x":748,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0007", + "frame": {"x":834,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0008", + "frame": {"x":920,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0009", + "frame": {"x":1006,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0010", + "frame": {"x":1092,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0011", + "frame": {"x":1178,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0012", + "frame": {"x":1264,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0013", + "frame": {"x":1350,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0014", + "frame": {"x":1436,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0015", + "frame": {"x":1522,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0016", + "frame": {"x":1608,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0017", + "frame": {"x":1694,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0018", + "frame": {"x":1780,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0019", + "frame": {"x":1866,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0020", + "frame": {"x":1952,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0021", + "frame": {"x":0,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0022", + "frame": {"x":86,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0023", + "frame": {"x":172,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0024", + "frame": {"x":258,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0025", + "frame": {"x":344,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0026", + "frame": {"x":430,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0027", + "frame": {"x":516,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0028", + "frame": {"x":602,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0029", + "frame": {"x":688,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0030", + "frame": {"x":774,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0031", + "frame": {"x":860,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0032", + "frame": {"x":946,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0033", + "frame": {"x":1032,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0034", + "frame": {"x":1118,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0035", + "frame": {"x":1204,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0036", + "frame": {"x":1290,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0037", + "frame": {"x":1376,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0038", + "frame": {"x":1462,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0039", + "frame": {"x":1548,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_glow0000", + "frame": {"x":1634,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0001", + "frame": {"x":1790,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0002", + "frame": {"x":0,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0003", + "frame": {"x":156,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0004", + "frame": {"x":312,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0005", + "frame": {"x":468,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0006", + "frame": {"x":624,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0007", + "frame": {"x":780,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0008", + "frame": {"x":936,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0009", + "frame": {"x":1092,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0010", + "frame": {"x":1248,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0011", + "frame": {"x":1404,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0012", + "frame": {"x":1560,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0013", + "frame": {"x":1716,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0014", + "frame": {"x":1872,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0015", + "frame": {"x":0,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0016", + "frame": {"x":156,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0017", + "frame": {"x":312,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0018", + "frame": {"x":468,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0019", + "frame": {"x":624,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0020", + "frame": {"x":780,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0021", + "frame": {"x":936,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0022", + "frame": {"x":1092,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0023", + "frame": {"x":1248,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0024", + "frame": {"x":1404,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0025", + "frame": {"x":1560,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0026", + "frame": {"x":1716,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0027", + "frame": {"x":1872,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0028", + "frame": {"x":0,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0029", + "frame": {"x":156,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_light_off0000", + "frame": {"x":312,"y":860,"w":29,"h":187}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":187}, + "sourceSize": {"w":29,"h":187} +} +,{ + "filename": "portal_light_on0000", + "frame": {"x":345,"y":860,"w":40,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":194}, + "sourceSize": {"w":40,"h":194} +} +,{ + "filename": "pulley_anchor0000", + "frame": {"x":613,"y":860,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "pulley_base0000", + "frame": {"x":667,"y":860,"w":104,"h":158}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":158}, + "sourceSize": {"w":104,"h":158} +} +,{ + "filename": "pulley_platform0000", + "frame": {"x":775,"y":860,"w":102,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":22}, + "sourceSize": {"w":102,"h":22} +} +,{ + "filename": "pulley_rope0000", + "frame": {"x":881,"y":860,"w":82,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":19}, + "sourceSize": {"w":82,"h":19} +} +,{ + "filename": "pusher_block0000", + "frame": {"x":967,"y":860,"w":110,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":86}, + "sourceSize": {"w":110,"h":86} +} +,{ + "filename": "pusher_block_light0000", + "frame": {"x":1081,"y":860,"w":64,"h":62}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":62}, + "sourceSize": {"w":64,"h":62} +} +,{ + "filename": "pusher_block_silver0000", + "frame": {"x":1149,"y":860,"w":110,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":87}, + "sourceSize": {"w":110,"h":87} +} +,{ + "filename": "roman_bar0000", + "frame": {"x":1753,"y":860,"w":116,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":116,"h":30}, + "sourceSize": {"w":116,"h":30} +} +,{ + "filename": "roman_base0000", + "frame": {"x":1873,"y":860,"w":138,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":194}, + "sourceSize": {"w":138,"h":194} +} +,{ + "filename": "roman_center0000", + "frame": {"x":0,"y":1058,"w":44,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":44,"h":42}, + "sourceSize": {"w":44,"h":42} +} +,{ + "filename": "roman_end0000", + "frame": {"x":48,"y":1058,"w":73,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":73,"h":30}, + "sourceSize": {"w":73,"h":30} +} +,{ + "filename": "rotmirror0000", + "frame": {"x":513,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_circle0000", + "frame": {"x":767,"y":1058,"w":154,"h":154}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":154,"h":154}, + "sourceSize": {"w":154,"h":154} +} +,{ + "filename": "rotmirror_light_off0000", + "frame": {"x":925,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_light_on0000", + "frame": {"x":1179,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "slider_light_off0000", + "frame": {"x":1692,"y":1058,"w":20,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":20,"h":20}, + "sourceSize": {"w":20,"h":20} +} +,{ + "filename": "slider_light_on0000", + "frame": {"x":1716,"y":1058,"w":55,"h":57}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":57}, + "sourceSize": {"w":55,"h":57} +} +,{ + "filename": "timed_pusher_base0000", + "frame": {"x":1263,"y":860,"w":124,"h":152}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":152}, + "sourceSize": {"w":124,"h":152} +} +,{ + "filename": "timed_pusher_base_old0000", + "frame": {"x":1391,"y":860,"w":124,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":124}, + "sourceSize": {"w":124,"h":124} +} +,{ + "filename": "timed_pusher_light_off0000", + "frame": {"x":1519,"y":860,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "timed_pusher_light_on0000", + "frame": {"x":1631,"y":860,"w":118,"h":148}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":148}, + "sourceSize": {"w":118,"h":148} +} +,{ + "filename": "wind_base0000", + "frame": {"x":1775,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0001", + "frame": {"x":1897,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0002", + "frame": {"x":0,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0003", + "frame": {"x":122,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base_light_off0000", + "frame": {"x":244,"y":1312,"w":32,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":34}, + "sourceSize": {"w":32,"h":34} +} +,{ + "filename": "wind_base_light_on0000", + "frame": {"x":280,"y":1312,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "wind_effect0000", + "frame": {"x":330,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0001", + "frame": {"x":462,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0002", + "frame": {"x":594,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0003", + "frame": {"x":726,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0004", + "frame": {"x":858,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0005", + "frame": {"x":990,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0006", + "frame": {"x":1122,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0007", + "frame": {"x":1254,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0008", + "frame": {"x":1386,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0009", + "frame": {"x":1518,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0010", + "frame": {"x":1650,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0011", + "frame": {"x":1782,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0012", + "frame": {"x":1914,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0013", + "frame": {"x":0,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0014", + "frame": {"x":132,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0015", + "frame": {"x":264,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0016", + "frame": {"x":396,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0017", + "frame": {"x":528,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0018", + "frame": {"x":660,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0019", + "frame": {"x":792,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0020", + "frame": {"x":924,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0021", + "frame": {"x":1056,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0022", + "frame": {"x":1188,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0023", + "frame": {"x":1320,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0024", + "frame": {"x":1452,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0025", + "frame": {"x":1584,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0026", + "frame": {"x":1716,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0027", + "frame": {"x":1848,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0028", + "frame": {"x":0,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0029", + "frame": {"x":132,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MechAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/MechAssets.png b/fireboywatergirl2/assets/atlasses/MechAssets.png new file mode 100644 index 00000000..ded17b3b Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/MechAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/MenuAssets.json b/fireboywatergirl2/assets/atlasses/MenuAssets.json new file mode 100644 index 00000000..c1507870 --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/MenuAssets.json @@ -0,0 +1,499 @@ +{"frames": [ + +{ + "filename": "AppStoreText0000", + "frame": {"x":246,"y":593,"w":279,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":279,"h":48}, + "sourceSize": {"w":279,"h":48} +} +,{ + "filename": "BackButton0000", + "frame": {"x":928,"y":0,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButton0001", + "frame": {"x":928,"y":127,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButtonFull0000", + "frame": {"x":512,"y":0,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "BackButtonFull0001", + "frame": {"x":512,"y":102,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "Diamond0000", + "frame": {"x":907,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0001", + "frame": {"x":117,"y":749,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0002", + "frame": {"x":0,"y":751,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0003", + "frame": {"x":225,"y":758,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0000", + "frame": {"x":475,"y":707,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0001", + "frame": {"x":583,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0002", + "frame": {"x":691,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0003", + "frame": {"x":799,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark_Bkg_Mask0000", + "frame": {"x":845,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "DiamondPuzzle0000", + "frame": {"x":529,"y":593,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0001", + "frame": {"x":651,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0002", + "frame": {"x":773,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0003", + "frame": {"x":895,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle_Bkg_Mask0000", + "frame": {"x":124,"y":514,"w":118,"h":118}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":118}, + "sourceSize": {"w":118,"h":118} +} +,{ + "filename": "DiamondSpeed0000", + "frame": {"x":651,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0001", + "frame": {"x":756,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0002", + "frame": {"x":861,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0003", + "frame": {"x":108,"y":857,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed_Bkg_Mask0000", + "frame": {"x":0,"y":514,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "Diamond_Bkg_Mask0000", + "frame": {"x":721,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "FxButton0000", + "frame": {"x":124,"y":636,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "FxButton0001", + "frame": {"x":0,"y":638,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "GoldLock0000", + "frame": {"x":0,"y":859,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "Lock0000", + "frame": {"x":333,"y":864,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "MusicButton0000", + "frame": {"x":241,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MusicButton0001", + "frame": {"x":358,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":459,"y":121,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":953,"y":368,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "Navy0000", + "frame": {"x":213,"y":866,"w":72,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":69}, + "sourceSize": {"w":72,"h":69} +} +,{ + "filename": "NewSign0000", + "frame": {"x":246,"y":514,"w":143,"h":56}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":143,"h":56}, + "sourceSize": {"w":143,"h":56} +} +,{ + "filename": "SettingsButton0000", + "frame": {"x":918,"y":262,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0001", + "frame": {"x":333,"y":758,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0002", + "frame": {"x":439,"y":815,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0003", + "frame": {"x":545,"y":833,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "StoneButton0000", + "frame": {"x":0,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "StoneButton0001", + "frame": {"x":256,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "ToggleControlButtonDual0000", + "frame": {"x":775,"y":0,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonDual0001", + "frame": {"x":0,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0000", + "frame": {"x":153,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0001", + "frame": {"x":306,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0000", + "frame": {"x":775,"y":131,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0001", + "frame": {"x":459,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0002", + "frame": {"x":612,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0003", + "frame": {"x":0,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0004", + "frame": {"x":153,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0005", + "frame": {"x":306,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0006", + "frame": {"x":765,"y":262,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0007", + "frame": {"x":459,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0008", + "frame": {"x":612,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0009", + "frame": {"x":0,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0010", + "frame": {"x":153,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0011", + "frame": {"x":306,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "UnlockButton0000", + "frame": {"x":765,"y":393,"w":184,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":184,"h":90}, + "sourceSize": {"w":184,"h":90} +} +,{ + "filename": "VibrateButton0000", + "frame": {"x":459,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "VibrateButton0001", + "frame": {"x":590,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "_default0000", + "frame": {"x":953,"y":419,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/MenuAssets.png b/fireboywatergirl2/assets/atlasses/MenuAssets.png new file mode 100644 index 00000000..f9180bd8 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/MenuAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/MenuBackgrounds.json b/fireboywatergirl2/assets/atlasses/MenuBackgrounds.json new file mode 100644 index 00000000..bd1d28ca --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/MenuBackgrounds.json @@ -0,0 +1,51 @@ +{"frames": [ + +{ + "filename": "HolderTexture0000", + "frame": {"x":0,"y":0,"w":256,"h":399}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":399}, + "sourceSize": {"w":256,"h":399} +} +,{ + "filename": "Loading0000", + "frame": {"x":260,"y":0,"w":469,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":469,"h":103}, + "sourceSize": {"w":469,"h":103} +} +,{ + "filename": "SimpleBackground0000", + "frame": {"x":733,"y":0,"w":256,"h":317}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":317}, + "sourceSize": {"w":256,"h":317} +} +,{ + "filename": "SliderHolder0000", + "frame": {"x":0,"y":403,"w":800,"h":395}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":800,"h":395}, + "sourceSize": {"w":800,"h":395} +} +,{ + "filename": "_default0000", + "frame": {"x":804,"y":403,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuBackgrounds.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/MenuBackgrounds.png b/fireboywatergirl2/assets/atlasses/MenuBackgrounds.png new file mode 100644 index 00000000..bd61572f Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/MenuBackgrounds.png differ diff --git a/fireboywatergirl2/assets/atlasses/PopupAssets.json b/fireboywatergirl2/assets/atlasses/PopupAssets.json new file mode 100644 index 00000000..661d6ed2 --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/PopupAssets.json @@ -0,0 +1,899 @@ +{"frames": [ + +{ + "filename": "Clock0000", + "frame": {"x":0,"y":0,"w":218,"h":75}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":75}, + "sourceSize": {"w":218,"h":75} +} +,{ + "filename": "Confetti0000", + "frame": {"x":222,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0001", + "frame": {"x":256,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0002", + "frame": {"x":290,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0003", + "frame": {"x":324,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "CrossIcon0000", + "frame": {"x":1122,"y":205,"w":61,"h":61}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":61,"h":61}, + "sourceSize": {"w":61,"h":61} +} +,{ + "filename": "CursorToggle0000", + "frame": {"x":358,"y":0,"w":196,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":196,"h":90}, + "sourceSize": {"w":196,"h":90} +} +,{ + "filename": "DeviceItemRenderer0000", + "frame": {"x":558,"y":0,"w":554,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":554,"h":111}, + "sourceSize": {"w":554,"h":111} +} +,{ + "filename": "DiamondsIcon0000", + "frame": {"x":1187,"y":205,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "FingerRingJump0000", + "frame": {"x":1116,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingLeft0000", + "frame": {"x":1320,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingRight0000", + "frame": {"x":1524,"y":0,"w":200,"h":200}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":200}, + "sourceSize": {"w":200,"h":200} +} +,{ + "filename": "FinishIcon0000", + "frame": {"x":1284,"y":205,"w":93,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":107}, + "sourceSize": {"w":93,"h":107} +} +,{ + "filename": "FinishStone0000", + "frame": {"x":1381,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0001", + "frame": {"x":1513,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0002", + "frame": {"x":1645,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0003", + "frame": {"x":1777,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0004", + "frame": {"x":1909,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0005", + "frame": {"x":0,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0006", + "frame": {"x":132,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0007", + "frame": {"x":264,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0008", + "frame": {"x":396,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0009", + "frame": {"x":528,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0010", + "frame": {"x":660,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0011", + "frame": {"x":792,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0012", + "frame": {"x":924,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0013", + "frame": {"x":1056,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0014", + "frame": {"x":1188,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0015", + "frame": {"x":1320,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0016", + "frame": {"x":1452,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0017", + "frame": {"x":1584,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0018", + "frame": {"x":1716,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0019", + "frame": {"x":1848,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0020", + "frame": {"x":0,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0021", + "frame": {"x":132,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0000", + "frame": {"x":264,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0001", + "frame": {"x":396,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0002", + "frame": {"x":528,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0003", + "frame": {"x":660,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0004", + "frame": {"x":792,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0005", + "frame": {"x":924,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0006", + "frame": {"x":1056,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0007", + "frame": {"x":1188,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0008", + "frame": {"x":1320,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0009", + "frame": {"x":1452,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0010", + "frame": {"x":1584,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0011", + "frame": {"x":1716,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0012", + "frame": {"x":1848,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0013", + "frame": {"x":0,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0014", + "frame": {"x":132,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0015", + "frame": {"x":264,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0016", + "frame": {"x":396,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0017", + "frame": {"x":528,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0018", + "frame": {"x":660,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0019", + "frame": {"x":792,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0020", + "frame": {"x":924,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0021", + "frame": {"x":1056,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStonePuzzle0000", + "frame": {"x":1188,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0001", + "frame": {"x":1326,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0002", + "frame": {"x":1464,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0003", + "frame": {"x":1602,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0004", + "frame": {"x":1740,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0005", + "frame": {"x":1878,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0006", + "frame": {"x":0,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0007", + "frame": {"x":138,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0008", + "frame": {"x":276,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0009", + "frame": {"x":414,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0010", + "frame": {"x":552,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0011", + "frame": {"x":690,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0012", + "frame": {"x":828,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0013", + "frame": {"x":966,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0014", + "frame": {"x":1104,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0015", + "frame": {"x":1242,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0016", + "frame": {"x":1380,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0017", + "frame": {"x":1518,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0018", + "frame": {"x":1656,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0019", + "frame": {"x":1794,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0020", + "frame": {"x":0,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0021", + "frame": {"x":138,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStoneSpeed0000", + "frame": {"x":276,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0001", + "frame": {"x":408,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0002", + "frame": {"x":540,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0003", + "frame": {"x":672,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0004", + "frame": {"x":804,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0005", + "frame": {"x":936,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0006", + "frame": {"x":1068,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0007", + "frame": {"x":1200,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0008", + "frame": {"x":1332,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0009", + "frame": {"x":1464,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0010", + "frame": {"x":1596,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0011", + "frame": {"x":1728,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0012", + "frame": {"x":1860,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0013", + "frame": {"x":0,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0014", + "frame": {"x":132,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0015", + "frame": {"x":264,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0016", + "frame": {"x":396,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0017", + "frame": {"x":528,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0018", + "frame": {"x":660,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0019", + "frame": {"x":792,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0020", + "frame": {"x":924,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0021", + "frame": {"x":1056,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":1728,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":1781,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "PauseButton0000", + "frame": {"x":1834,"y":0,"w":48,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, + "sourceSize": {"w":48,"h":48} +} +,{ + "filename": "PopupBackground0000", + "frame": {"x":0,"y":205,"w":1082,"h":642}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":1082,"h":642}, + "sourceSize": {"w":1082,"h":642} +} +,{ + "filename": "SilverIcon0000", + "frame": {"x":1188,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "TickIcon0000", + "frame": {"x":1285,"y":1507,"w":69,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":69,"h":69}, + "sourceSize": {"w":69,"h":69} +} +,{ + "filename": "TimeIcon0000", + "frame": {"x":1358,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "_default0000", + "frame": {"x":1086,"y":205,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +} +,{ + "filename": "popupArrow0000", + "frame": {"x":1455,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +} +,{ + "filename": "popupArrow0001", + "frame": {"x":1589,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PopupAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/PopupAssets.png b/fireboywatergirl2/assets/atlasses/PopupAssets.png new file mode 100644 index 00000000..317f3b31 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/PopupAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/PreloaderAssets.json b/fireboywatergirl2/assets/atlasses/PreloaderAssets.json new file mode 100644 index 00000000..027b7ec9 --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/PreloaderAssets.json @@ -0,0 +1,35 @@ +{"frames": [ + +{ + "filename": "LoaderBar0000", + "frame": {"x":0,"y":0,"w":200,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":20}, + "sourceSize": {"w":200,"h":20} +} +,{ + "filename": "LoaderHolder0000", + "frame": {"x":204,"y":0,"w":222,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":222,"h":40}, + "sourceSize": {"w":222,"h":40} +} +,{ + "filename": "LoaderTitle0000", + "frame": {"x":0,"y":44,"w":497,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":497,"h":73}, + "sourceSize": {"w":497,"h":73} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PreloaderAssets.png", + "format": "RGBA8888", + "size": {"w":512,"h":128}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/PreloaderAssets.png b/fireboywatergirl2/assets/atlasses/PreloaderAssets.png new file mode 100644 index 00000000..df1f02c5 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/PreloaderAssets.png differ diff --git a/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.json b/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.json new file mode 100644 index 00000000..ffd7e9a4 --- /dev/null +++ b/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.json @@ -0,0 +1,499 @@ +{"frames": [ + +{ + "filename": "BackGround0000", + "frame": {"x":0,"y":516,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "Clock0000", + "frame": {"x":0,"y":1032,"w":268,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":268,"h":100}, + "sourceSize": {"w":268,"h":100} +} +,{ + "filename": "Diamond1_Bkg_Empty0000", + "frame": {"x":334,"y":1892,"w":108,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":111}, + "sourceSize": {"w":108,"h":111} +} +,{ + "filename": "FinishBoy0000", + "frame": {"x":776,"y":0,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0001", + "frame": {"x":776,"y":142,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0002", + "frame": {"x":776,"y":284,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0003", + "frame": {"x":776,"y":426,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0004", + "frame": {"x":776,"y":568,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0005", + "frame": {"x":776,"y":710,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0006", + "frame": {"x":776,"y":852,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0007", + "frame": {"x":776,"y":994,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0008", + "frame": {"x":272,"y":1032,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0009", + "frame": {"x":439,"y":1040,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0010", + "frame": {"x":606,"y":1040,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0011", + "frame": {"x":0,"y":1136,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0012", + "frame": {"x":773,"y":1136,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0013", + "frame": {"x":167,"y":1174,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0014", + "frame": {"x":334,"y":1182,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0015", + "frame": {"x":501,"y":1182,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0016", + "frame": {"x":0,"y":1278,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0017", + "frame": {"x":668,"y":1278,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0018", + "frame": {"x":835,"y":1278,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0019", + "frame": {"x":167,"y":1316,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0020", + "frame": {"x":334,"y":1324,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0021", + "frame": {"x":501,"y":1324,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0000", + "frame": {"x":0,"y":1420,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0001", + "frame": {"x":668,"y":1420,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0002", + "frame": {"x":835,"y":1420,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0003", + "frame": {"x":167,"y":1458,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0004", + "frame": {"x":334,"y":1466,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0005", + "frame": {"x":501,"y":1466,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0006", + "frame": {"x":0,"y":1562,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0007", + "frame": {"x":668,"y":1562,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0008", + "frame": {"x":835,"y":1562,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0009", + "frame": {"x":167,"y":1600,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0010", + "frame": {"x":334,"y":1608,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0011", + "frame": {"x":501,"y":1608,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0012", + "frame": {"x":0,"y":1704,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0013", + "frame": {"x":668,"y":1704,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0014", + "frame": {"x":835,"y":1704,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0015", + "frame": {"x":167,"y":1742,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0016", + "frame": {"x":334,"y":1750,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0017", + "frame": {"x":501,"y":1750,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0018", + "frame": {"x":0,"y":1846,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0019", + "frame": {"x":668,"y":1846,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0020", + "frame": {"x":835,"y":1846,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0021", + "frame": {"x":167,"y":1884,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "ForeGround0000", + "frame": {"x":516,"y":0,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0000", + "frame": {"x":516,"y":260,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0001", + "frame": {"x":516,"y":520,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0002", + "frame": {"x":516,"y":780,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "MenuBackground0000", + "frame": {"x":0,"y":0,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "decor_A0000", + "frame": {"x":943,"y":182,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_10000", + "frame": {"x":943,"y":236,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_20000", + "frame": {"x":943,"y":290,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_20001", + "frame": {"x":943,"y":344,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_T_10000", + "frame": {"x":446,"y":1892,"w":88,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":88,"h":88}, + "sourceSize": {"w":88,"h":88} +} +,{ + "filename": "decor_T_20000", + "frame": {"x":668,"y":1182,"w":88,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":88,"h":88}, + "sourceSize": {"w":88,"h":88} +} +,{ + "filename": "decor_T_30000", + "frame": {"x":943,"y":0,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "decor_V0000", + "frame": {"x":943,"y":128,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_X0000", + "frame": {"x":943,"y":64,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "TempleAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.png b/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.png new file mode 100644 index 00000000..ef3cbe97 Binary files /dev/null and b/fireboywatergirl2/assets/atlasses/Temples/light/TempleAssets.png differ diff --git a/fireboywatergirl2/assets/audio/CharToggle1.mp3 b/fireboywatergirl2/assets/audio/CharToggle1.mp3 new file mode 100644 index 00000000..8163ed56 Binary files /dev/null and b/fireboywatergirl2/assets/audio/CharToggle1.mp3 differ diff --git a/fireboywatergirl2/assets/audio/CharToggle2.mp3 b/fireboywatergirl2/assets/audio/CharToggle2.mp3 new file mode 100644 index 00000000..8ac7856d Binary files /dev/null and b/fireboywatergirl2/assets/audio/CharToggle2.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Clock.mp3 b/fireboywatergirl2/assets/audio/Clock.mp3 new file mode 100644 index 00000000..66f4661e Binary files /dev/null and b/fireboywatergirl2/assets/audio/Clock.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Death.mp3 b/fireboywatergirl2/assets/audio/Death.mp3 new file mode 100644 index 00000000..206d21ad Binary files /dev/null and b/fireboywatergirl2/assets/audio/Death.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Diamond.mp3 b/fireboywatergirl2/assets/audio/Diamond.mp3 new file mode 100644 index 00000000..c61e773e Binary files /dev/null and b/fireboywatergirl2/assets/audio/Diamond.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Door.mp3 b/fireboywatergirl2/assets/audio/Door.mp3 new file mode 100644 index 00000000..6b3920ff Binary files /dev/null and b/fireboywatergirl2/assets/audio/Door.mp3 differ diff --git a/fireboywatergirl2/assets/audio/EndDiamond.mp3 b/fireboywatergirl2/assets/audio/EndDiamond.mp3 new file mode 100644 index 00000000..9c3f2d24 Binary files /dev/null and b/fireboywatergirl2/assets/audio/EndDiamond.mp3 differ diff --git a/fireboywatergirl2/assets/audio/EndFail.mp3 b/fireboywatergirl2/assets/audio/EndFail.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl2/assets/audio/EndFail.mp3 differ diff --git a/fireboywatergirl2/assets/audio/EndPass.mp3 b/fireboywatergirl2/assets/audio/EndPass.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl2/assets/audio/EndPass.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Freeze.mp3 b/fireboywatergirl2/assets/audio/Freeze.mp3 new file mode 100644 index 00000000..6b44e29f Binary files /dev/null and b/fireboywatergirl2/assets/audio/Freeze.mp3 differ diff --git a/fireboywatergirl2/assets/audio/IceSteps_fb.mp3 b/fireboywatergirl2/assets/audio/IceSteps_fb.mp3 new file mode 100644 index 00000000..fb52f101 Binary files /dev/null and b/fireboywatergirl2/assets/audio/IceSteps_fb.mp3 differ diff --git a/fireboywatergirl2/assets/audio/IceSteps_wg.mp3 b/fireboywatergirl2/assets/audio/IceSteps_wg.mp3 new file mode 100644 index 00000000..87a79f5d Binary files /dev/null and b/fireboywatergirl2/assets/audio/IceSteps_wg.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Jump_fb.mp3 b/fireboywatergirl2/assets/audio/Jump_fb.mp3 new file mode 100644 index 00000000..a1f2a2c5 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Jump_fb.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Jump_wg.mp3 b/fireboywatergirl2/assets/audio/Jump_wg.mp3 new file mode 100644 index 00000000..5613337b Binary files /dev/null and b/fireboywatergirl2/assets/audio/Jump_wg.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusic.mp3 b/fireboywatergirl2/assets/audio/LevelMusic.mp3 new file mode 100644 index 00000000..c2fb05b7 Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusic.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusicFinish.mp3 b/fireboywatergirl2/assets/audio/LevelMusicFinish.mp3 new file mode 100644 index 00000000..2b5fb08c Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusicFinish.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusicFinish_speed.mp3 b/fireboywatergirl2/assets/audio/LevelMusicFinish_speed.mp3 new file mode 100644 index 00000000..74147f49 Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusicFinish_speed.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusicOver.mp3 b/fireboywatergirl2/assets/audio/LevelMusicOver.mp3 new file mode 100644 index 00000000..67178821 Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusicOver.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusic_dark.mp3 b/fireboywatergirl2/assets/audio/LevelMusic_dark.mp3 new file mode 100644 index 00000000..5d37bb2f Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusic_dark.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LevelMusic_speed.mp3 b/fireboywatergirl2/assets/audio/LevelMusic_speed.mp3 new file mode 100644 index 00000000..88091290 Binary files /dev/null and b/fireboywatergirl2/assets/audio/LevelMusic_speed.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Lever.mp3 b/fireboywatergirl2/assets/audio/Lever.mp3 new file mode 100644 index 00000000..76650254 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Lever.mp3 differ diff --git a/fireboywatergirl2/assets/audio/LightPusher.mp3 b/fireboywatergirl2/assets/audio/LightPusher.mp3 new file mode 100644 index 00000000..c85ba313 Binary files /dev/null and b/fireboywatergirl2/assets/audio/LightPusher.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Melt.mp3 b/fireboywatergirl2/assets/audio/Melt.mp3 new file mode 100644 index 00000000..33ac6f64 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Melt.mp3 differ diff --git a/fireboywatergirl2/assets/audio/MenuMusic.mp3 b/fireboywatergirl2/assets/audio/MenuMusic.mp3 new file mode 100644 index 00000000..a7987c77 Binary files /dev/null and b/fireboywatergirl2/assets/audio/MenuMusic.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Platform.mp3 b/fireboywatergirl2/assets/audio/Platform.mp3 new file mode 100644 index 00000000..535ff474 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Platform.mp3 differ diff --git a/fireboywatergirl2/assets/audio/PortalClose.mp3 b/fireboywatergirl2/assets/audio/PortalClose.mp3 new file mode 100644 index 00000000..d4f60b0f Binary files /dev/null and b/fireboywatergirl2/assets/audio/PortalClose.mp3 differ diff --git a/fireboywatergirl2/assets/audio/PortalLoop.mp3 b/fireboywatergirl2/assets/audio/PortalLoop.mp3 new file mode 100644 index 00000000..3a8c26de Binary files /dev/null and b/fireboywatergirl2/assets/audio/PortalLoop.mp3 differ diff --git a/fireboywatergirl2/assets/audio/PortalOpen.mp3 b/fireboywatergirl2/assets/audio/PortalOpen.mp3 new file mode 100644 index 00000000..cf9961f6 Binary files /dev/null and b/fireboywatergirl2/assets/audio/PortalOpen.mp3 differ diff --git a/fireboywatergirl2/assets/audio/PortalTransport.mp3 b/fireboywatergirl2/assets/audio/PortalTransport.mp3 new file mode 100644 index 00000000..5c18f42a Binary files /dev/null and b/fireboywatergirl2/assets/audio/PortalTransport.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Pusher.mp3 b/fireboywatergirl2/assets/audio/Pusher.mp3 new file mode 100644 index 00000000..c7200f39 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Pusher.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Slider.mp3 b/fireboywatergirl2/assets/audio/Slider.mp3 new file mode 100644 index 00000000..81b03a70 Binary files /dev/null and b/fireboywatergirl2/assets/audio/Slider.mp3 differ diff --git a/fireboywatergirl2/assets/audio/WaterSteps.mp3 b/fireboywatergirl2/assets/audio/WaterSteps.mp3 new file mode 100644 index 00000000..e82d56ae Binary files /dev/null and b/fireboywatergirl2/assets/audio/WaterSteps.mp3 differ diff --git a/fireboywatergirl2/assets/audio/Wind.mp3 b/fireboywatergirl2/assets/audio/Wind.mp3 new file mode 100644 index 00000000..84543b9f Binary files /dev/null and b/fireboywatergirl2/assets/audio/Wind.mp3 differ diff --git a/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.fnt b/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.fnt new file mode 100644 index 00000000..142c3163 --- /dev/null +++ b/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.fnt @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.png b/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.png new file mode 100644 index 00000000..15e54888 Binary files /dev/null and b/fireboywatergirl2/assets/fonts/fbwg_font_cyrillic.png differ diff --git a/fireboywatergirl2/assets/fonts/font.fnt b/fireboywatergirl2/assets/fonts/font.fnt new file mode 100644 index 00000000..0297157a --- /dev/null +++ b/fireboywatergirl2/assets/fonts/font.fnt @@ -0,0 +1,446 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl2/assets/fonts/font.png b/fireboywatergirl2/assets/fonts/font.png new file mode 100644 index 00000000..597e9db9 Binary files /dev/null and b/fireboywatergirl2/assets/fonts/font.png differ diff --git a/fireboywatergirl2/assets/images/Beam.png b/fireboywatergirl2/assets/images/Beam.png new file mode 100644 index 00000000..1a2206ef Binary files /dev/null and b/fireboywatergirl2/assets/images/Beam.png differ diff --git a/fireboywatergirl2/assets/images/GameNameLight.png b/fireboywatergirl2/assets/images/GameNameLight.png new file mode 100644 index 00000000..3084b2af Binary files /dev/null and b/fireboywatergirl2/assets/images/GameNameLight.png differ diff --git a/fireboywatergirl2/assets/images/TOASTER-MINI-new.png b/fireboywatergirl2/assets/images/TOASTER-MINI-new.png new file mode 100644 index 00000000..3f7f79f4 Binary files /dev/null and b/fireboywatergirl2/assets/images/TOASTER-MINI-new.png differ diff --git a/fireboywatergirl2/assets/images/TempleHallLight.jpg b/fireboywatergirl2/assets/images/TempleHallLight.jpg new file mode 100644 index 00000000..6eaaff38 Binary files /dev/null and b/fireboywatergirl2/assets/images/TempleHallLight.jpg differ diff --git a/fireboywatergirl2/assets/images/stores/android.png b/fireboywatergirl2/assets/images/stores/android.png new file mode 100644 index 00000000..a9f30e48 Binary files /dev/null and b/fireboywatergirl2/assets/images/stores/android.png differ diff --git a/fireboywatergirl2/assets/images/stores/ios.png b/fireboywatergirl2/assets/images/stores/ios.png new file mode 100644 index 00000000..caf2845d Binary files /dev/null and b/fireboywatergirl2/assets/images/stores/ios.png differ diff --git a/fireboywatergirl2/assets/images/stores/microsoft.png b/fireboywatergirl2/assets/images/stores/microsoft.png new file mode 100644 index 00000000..a345d334 Binary files /dev/null and b/fireboywatergirl2/assets/images/stores/microsoft.png differ diff --git a/fireboywatergirl2/assets/images/stores/steam.png b/fireboywatergirl2/assets/images/stores/steam.png new file mode 100644 index 00000000..b0c82317 Binary files /dev/null and b/fireboywatergirl2/assets/images/stores/steam.png differ diff --git a/fireboywatergirl2/assets/json/contracted.json b/fireboywatergirl2/assets/json/contracted.json new file mode 100644 index 00000000..b55f8e59 --- /dev/null +++ b/fireboywatergirl2/assets/json/contracted.json @@ -0,0 +1,48 @@ +[ + "coolmathgames.com", + "games.co.uk", + "gamesgames.com", + "gioco.it", + "gry.pl", + "jetztspielen.de", + "jeux.fr", + "juegos.com", + "ojogos.com.br", + "ojogos.pt", + "ourgames.ru", + "permainan.co.id", + "spela.se", + "spelletjes.nl", + "flashgames.ru", + "games.co.id", + "giochi.it", + "jeu.fr", + "mousebreaker.com", + "spel.nl", + "spel.se", + "spielen.com", + "zapjuegos.com", + "girlsgogames.co.id", + "girlsgogames.co.uk", + "girlsgogames.com", + "girlsgogames.com.br", + "girlsgogames.de", + "girlsgogames.fr", + "girlsgogames.it", + "girlsgogames.nl", + "girlsgogames.pl", + "girlsgogames.ru", + "girlsgogames.se", + "juegosdechicas.com", + "a10.com", + "game-game.com.ua", + "sgames.org", + "yayoye.ru", + "bipgaming.com", + "multiplayergameserver.com", + "playcell.com", + "spiele.rtl2.de", + "rtl2spiele.de", + "msn.com", + "yiv.com" +] diff --git a/fireboywatergirl2/assets/json/domains.json b/fireboywatergirl2/assets/json/domains.json new file mode 100644 index 00000000..92ed5e8e --- /dev/null +++ b/fireboywatergirl2/assets/json/domains.json @@ -0,0 +1,137 @@ +{ + "ac": " com gov mil net org ", + "ae": " ac co gov mil name net org pro sch ", + "af": " com edu gov net org ", + "al": " com edu gov mil net org ", + "ao": " co ed gv it og pb ", + "ar": " com edu gob gov int mil net org tur ", + "at": " ac co gv or ", + "au": " asn com csiro edu gov id net org ", + "ba": " co com edu gov mil net org rs unbi unmo unsa untz unze ", + "bb": " biz co com edu gov info net org store tv ", + "bh": " biz cc com edu gov info net org ", + "bn": " com edu gov net org ", + "bo": " com edu gob gov int mil net org tv ", + "br": " adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ", + "bs": " com edu gov net org ", + "bz": " du et om ov rg ", + "ca": " ab bc mb nb nf nl ns nt nu on pe qc sk yk ", + "ck": " biz co edu gen gov info net org ", + "cn": " ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ", + "co": " com edu gov mil net nom org ", + "com": " gcm-corp ", + "cr": " ac c co ed fi go or sa ", + "cy": " ac biz com ekloges gov ltd name net org parliament press pro tm ", + "do": " art com edu gob gov mil net org sld web ", + "dz": " art asso com edu gov net org pol ", + "ec": " com edu fin gov info med mil net org pro ", + "eg": " com edu eun gov mil name net org sci ", + "er": " com edu gov ind mil net org rochest w ", + "es": " com edu gob nom org ", + "et": " biz com edu gov info name net org ", + "fj": " ac biz com info mil name net org pro ", + "fk": " ac co gov net nom org ", + "fr": " asso com f gouv nom prd presse tm ", + "gg": " co net org ", + "gh": " com edu gov mil org ", + "gn": " ac com gov net org ", + "gr": " com edu gov mil net org ", + "gt": " com edu gob ind mil net org ", + "gu": " com edu gov net org ", + "hk": " com edu gov idv net org ", + "hu": " 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ", + "id": " ac co go mil net or sch web ", + "il": " ac co gov idf k12 muni net org ", + "in": " ac co edu ernet firm gen gov i ind mil net nic org res ", + "iq": " com edu gov i mil net org ", + "ir": " ac co dnssec gov i id net org sch ", + "it": " edu gov ", + "je": " co net org ", + "jo": " com edu gov mil name net org sch ", + "jp": " ac ad co ed go gr lg ne or ", + "ke": " ac co go info me mobi ne or sc ", + "kh": " com edu gov mil net org per ", + "ki": " biz com de edu gov info mob net org tel ", + "km": " asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ", + "kn": " edu gov net org ", + "kr": " ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ", + "kw": " com edu gov net org ", + "ky": " com edu gov net org ", + "kz": " com edu gov mil net org ", + "lb": " com edu gov net org ", + "lk": " assn com edu gov grp hotel int ltd net ngo org sch soc web ", + "lr": " com edu gov net org ", + "lv": " asn com conf edu gov id mil net org ", + "ly": " com edu gov id med net org plc sch ", + "ma": " ac co gov m net org press ", + "mc": " asso tm ", + "me": " ac co edu gov its net org priv ", + "mg": " com edu gov mil nom org prd tm ", + "mk": " com edu gov inf name net org pro ", + "ml": " com edu gov net org presse ", + "mn": " edu gov org ", + "mo": " com edu gov net org ", + "mt": " com edu gov net org ", + "mv": " aero biz com coop edu gov info int mil museum name net org pro ", + "mw": " ac co com coop edu gov int museum net org ", + "mx": " com edu gob net org ", + "my": " com edu gov mil name net org sch ", + "nf": " arts com firm info net other per rec store web ", + "ng": " biz com edu gov mil mobi name net org sch ", + "ni": " ac co com edu gob mil net nom org ", + "np": " com edu gov mil net org ", + "nr": " biz com edu gov info net org ", + "om": " ac biz co com edu gov med mil museum net org pro sch ", + "pe": " com edu gob mil net nom org sld ", + "ph": " com edu gov i mil net ngo org ", + "pk": " biz com edu fam gob gok gon gop gos gov net org web ", + "pl": " art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ", + "pr": " ac biz com edu est gov info isla name net org pro prof ", + "ps": " com edu gov net org plo sec ", + "pw": " belau co ed go ne or ", + "ro": " arts com firm info nom nt org rec store tm www ", + "rs": " ac co edu gov in org ", + "sb": " com edu gov net org ", + "sc": " com edu gov net org ", + "sh": " co com edu gov net nom org ", + "sl": " com edu gov net org ", + "st": " co com consulado edu embaixada gov mil net org principe saotome store ", + "sv": " com edu gob org red ", + "sz": " ac co org ", + "tr": " av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ", + "tt": " aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ", + "tw": " club com ebiz edu game gov idv mil net org ", + "mu": " ac co com gov net or org ", + "mz": " ac co edu gov org ", + "na": " co com ", + "nz": " ac co cri geek gen govt health iwi maori mil net org parliament school ", + "pa": " abo ac com edu gob ing med net nom org sld ", + "pt": " com edu gov int net nome org publ ", + "py": " com edu gov mil net org ", + "qa": " com edu gov mil net org ", + "re": " asso com nom ", + "ru": " ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ", + "rw": " ac co com edu gouv gov int mil net ", + "sa": " com edu gov med net org pub sch ", + "sd": " com edu gov info med net org tv ", + "se": " a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ", + "sg": " com edu gov idn net org per ", + "sn": " art com edu gouv org perso univ ", + "sy": " com edu gov mil net news org ", + "th": " ac co go in mi net or ", + "tj": " ac biz co com edu go gov info int mil name net nic org test web ", + "tn": " agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ", + "tz": " ac co go ne or ", + "ua": " biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ", + "ug": " ac co go ne or org sc ", + "uk": " ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ", + "us": " dni fed isa kids nsn ", + "uy": " com edu gub mil net org ", + "ve": " co com edu gob info mil net org web ", + "vi": " co com k12 net org ", + "vn": " ac biz com edu gov health info int name net org pro ", + "ye": " co com gov ltd me net org plc ", + "yu": " ac co edu gov org ", + "za": " ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ", + "zm": " ac co com edu gov net org sch " +} \ No newline at end of file diff --git a/fireboywatergirl2/assets/json/internal.json b/fireboywatergirl2/assets/json/internal.json new file mode 100644 index 00000000..2fd6bcef --- /dev/null +++ b/fireboywatergirl2/assets/json/internal.json @@ -0,0 +1,67 @@ +[ + "hellokids.com", + "yepi.com", + "spele.nl", + "funnygames.nl", + "oyungemisi.com", + "spele.be", + "spielspiele.de", + "acceptatie.gmbl.nl", + "Zigiz.com", + "Gembly.com", + "Keygames.com", + "Jouerjouer.com", + "Spiels.at", + "Spiels.ch", + "Hryhry.net", + "Pelaaleikkia.com", + "Waznygry.pl", + "Nyckelspel.se", + "Minigioco.it", + "1001igry.ru", + "Clavejuegos.com", + "Kilitoyun.com", + "Jogojogar.com", + "Starbie.co.uk", + "games.co.za", + "spelletjesoverzicht.nl", + "Cadajogo.com", + "CadaJogo.com.br", + "CadaJeugo.es", + "Funny-Games.co.uk", + "FunnyGames.at", + "FunnyGames.be", + "FunnyGames.biz", + "FunnyGames.ch", + "Funnygames.cn", + "FunnyGames.co.id", + "FunnyGames.com.br", + "FunnyGames.com.co", + "FunnyGames.com.mx", + "FunnyGames.com.tr", + "FunnyGames.dk", + "FunnyGames.es", + "FunnyGames.eu", + "FunnyGames.fi", + "FunnyGames.fr", + "FunnyGames.gr", + "FunnyGames.hu", + "FunnyGames.ie", + "FunnyGames.in", + "FunnyGames.ir", + "FunnyGames.it", + "FunnyGames.jp", + "FunnyGames.kr", + "FunnyGames.lt", + "FunnyGames.no", + "FunnyGames.org", + "FunnyGames.ph", + "FunnyGames.pk", + "FunnyGames.pl", + "FunnyGames.pt", + "FunnyGames.ro", + "FunnyGames.ru", + "FunnyGames.se", + "FunnyGames.us", + "bgames.com" +] diff --git a/fireboywatergirl2/assets/json/sitelock.json b/fireboywatergirl2/assets/json/sitelock.json new file mode 100644 index 00000000..a7d817e3 --- /dev/null +++ b/fireboywatergirl2/assets/json/sitelock.json @@ -0,0 +1,50 @@ +{ + "minijuegos": [ + "miniplay.com", + "minijuegos.com", + "minijuegos.es", + "minijuegosgratis.com", + "minigiochi.com", + "minijogos.com.br", + "minijuegos.mx", + "minijuegos.com.mx" + ], + "kongregate": [ + "kongregate.com" + ], + "newgrounds": [ + "newgrounds.com" + ], + "admeen": [ + "1001hry.cz", + "1001jeux.fr", + "1001jogos.pt", + "1001pelit.com", + "1001spiele.de", + "elkspel.nl", + "gamesxl.com", + "giochixl.it", + "grajteraz.pl", + "igrixl.ru", + "isladejuegos.es", + "jatekokxl.hu", + "paixnidiaxl.gr", + "spelo.se", + "spillespill.no", + "spilxl.dk", + "1001games.fr", + "1001giochi.it", + "1001spiele.at", + "gierkionline.pl", + "jetztspielen.ws", + "juegosjuegos.ws", + "speltuin.nl", + "1001games.co.uk", + "1001jogos.com.br", + "isladejuegos.co.ve", + "isladejuegos.com.ar", + "isladejuegos.com.co", + "isladejuegos.com.mx", + "isladejuegos.com.pe" + ] +} diff --git a/fireboywatergirl2/assets/json/special.json b/fireboywatergirl2/assets/json/special.json new file mode 100644 index 00000000..be5a7a54 --- /dev/null +++ b/fireboywatergirl2/assets/json/special.json @@ -0,0 +1,61 @@ +[ + "coolgames.com", + "stickgames.com", + "supergames.com", + "wordgames.com", + "girlgames.com", + "girlsocool.com", + "dressup.com", + "dressupgal.com", + "dressuppink.com", + "cookinggames.com", + "1001oyun.com", + "123paixnidia.gr", + "123pelit.com", + "12hry.cz", + "gamesfreak.net", + "gameskeren.com", + "grajwgry.pl", + "hrajhry.sk", + "jeuxjeuxjeux.ch", + "jeuxjeuxjeux.fr", + "joaca.ro", + "megajatek.hu", + "megaspel.se", + "moiteigri.com", + "paisdelosjuegos.cl", + "paisdelosjuegos.co.ve", + "paisdelosjuegos.com.ar", + "paisdelosjuegos.com.co", + "paisdelosjuegos.com.do", + "paisdelosjuegos.com.ec", + "paisdelosjuegos.com.mx", + "paisdelosjuegos.com.pe", + "paisdelosjuegos.com.uy", + "paisdelosjuegos.cr", + "paisdelosjuegos.es", + "poki.at", + "poki.be", + "poki.by", + "poki.cn", + "poki.co.il", + "poki.com", + "poki.com.br", + "poki.cz", + "poki.de", + "poki.dk", + "poki.gr", + "poki.it", + "poki.jp", + "poki.nl", + "poki.no", + "poki.pl", + "poki.pt", + "poki.ro", + "spielyeti.ch", + "spili.dk", + "spillegratis.com", + "superigri.ru", + "tocadosjogos.com", + "trochoi.net" +] diff --git a/fireboywatergirl2/assets/styles/main.css b/fireboywatergirl2/assets/styles/main.css new file mode 100644 index 00000000..1f6681b2 --- /dev/null +++ b/fireboywatergirl2/assets/styles/main.css @@ -0,0 +1,7 @@ +/*body{ + margin: 0px +}*/ + +body { + overflow: hidden; +} \ No newline at end of file diff --git a/fireboywatergirl2/assets/tilemaps/tilesets/Chars.json b/fireboywatergirl2/assets/tilemaps/tilesets/Chars.json new file mode 100644 index 00000000..6bfca1eb --- /dev/null +++ b/fireboywatergirl2/assets/tilemaps/tilesets/Chars.json @@ -0,0 +1,117 @@ +{ "columns":8, + "image":"Chars.png", + "imageheight":64, + "imagewidth":512, + "margin":0, + "name":"Chars", + "spacing":0, + "tilecount":8, + "tileheight":64, + "tileproperties": + { + "0": + { + "char":"fb" + }, + "1": + { + "char":"wg" + }, + "2": + { + "char":"fb" + }, + "3": + { + "char":"wg" + }, + "4": + { + "char":"fb" + }, + "5": + { + "char":"wg" + }, + "6": + { + "char":"silver" + }, + "7": + { + "char":"fbwg" + } + }, + "tilepropertytypes": + { + "0": + { + "char":"string" + }, + "1": + { + "char":"string" + }, + "2": + { + "char":"string" + }, + "3": + { + "char":"string" + }, + "4": + { + "char":"string" + }, + "5": + { + "char":"string" + }, + "6": + { + "char":"string" + }, + "7": + { + "char":"string" + } + }, + "tiles": + { + "0": + { + "type":"char" + }, + "1": + { + "type":"char" + }, + "2": + { + "type":"door" + }, + "3": + { + "type":"door" + }, + "4": + { + "type":"diamond" + }, + "5": + { + "type":"diamond" + }, + "6": + { + "type":"diamond" + }, + "7": + { + "type":"diamond" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl2/assets/tilemaps/tilesets/Ground.json b/fireboywatergirl2/assets/tilemaps/tilesets/Ground.json new file mode 100644 index 00000000..7c6b5946 --- /dev/null +++ b/fireboywatergirl2/assets/tilemaps/tilesets/Ground.json @@ -0,0 +1,201 @@ +{ "columns":15, + "image":"Ground.png", + "imageheight":32, + "imagewidth":480, + "margin":0, + "name":"Ground", + "spacing":0, + "tilecount":15, + "tileheight":32, + "tileproperties": + { + "0": + { + "type":0 + }, + "1": + { + "type":1 + }, + "10": + { + "type":-1 + }, + "11": + { + "type":11 + }, + "12": + { + "type":12 + }, + "13": + { + "type":10 + }, + "14": + { + "type":55 + }, + "2": + { + "type":2 + }, + "3": + { + "type":3 + }, + "4": + { + "type":4 + }, + "5": + { + "type":5 + }, + "6": + { + "type":6 + }, + "7": + { + "type":7 + }, + "8": + { + "type":8 + }, + "9": + { + "type":9 + } + }, + "tilepropertytypes": + { + "0": + { + "type":"int" + }, + "1": + { + "type":"int" + }, + "10": + { + "type":"int" + }, + "11": + { + "type":"int" + }, + "12": + { + "type":"int" + }, + "13": + { + "type":"int" + }, + "14": + { + "type":"int" + }, + "2": + { + "type":"int" + }, + "3": + { + "type":"int" + }, + "4": + { + "type":"int" + }, + "5": + { + "type":"int" + }, + "6": + { + "type":"int" + }, + "7": + { + "type":"int" + }, + "8": + { + "type":"int" + }, + "9": + { + "type":"int" + } + }, + "tiles": + { + "0": + { + "type":"0" + }, + "1": + { + "type":"1" + }, + "10": + { + "type":"-1" + }, + "11": + { + "type":"11" + }, + "12": + { + "type":"12" + }, + "13": + { + "type":"10" + }, + "14": + { + "type":"55" + }, + "2": + { + "type":"2" + }, + "3": + { + "type":"3" + }, + "4": + { + "type":"4" + }, + "5": + { + "type":"5" + }, + "6": + { + "type":"6" + }, + "7": + { + "type":"7" + }, + "8": + { + "type":"8" + }, + "9": + { + "type":"9" + } + }, + "tilewidth":32, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl2/assets/tilemaps/tilesets/LargeObjects.json b/fireboywatergirl2/assets/tilemaps/tilesets/LargeObjects.json new file mode 100644 index 00000000..4d67081a --- /dev/null +++ b/fireboywatergirl2/assets/tilemaps/tilesets/LargeObjects.json @@ -0,0 +1,67 @@ +{ "columns":3, + "image":"LargeObjects.png", + "imageheight":96, + "imagewidth":192, + "margin":0, + "name":"LargeObjects", + "spacing":0, + "tilecount":3, + "tileheight":96, + "tileproperties": + { + "0": + { + "group":0, + "inverted":false, + "portalId":0 + }, + "1": + { + "group":0, + "inverted":true, + "portalId":0 + }, + "2": + { + "group":0, + "length":10 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "1": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "2": + { + "group":"int", + "length":"float" + } + }, + "tiles": + { + "0": + { + "type":"portal" + }, + "1": + { + "type":"portal" + }, + "2": + { + "type":"wind" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl2/assets/tilemaps/tilesets/Objects.json b/fireboywatergirl2/assets/tilemaps/tilesets/Objects.json new file mode 100644 index 00000000..e95099f3 --- /dev/null +++ b/fireboywatergirl2/assets/tilemaps/tilesets/Objects.json @@ -0,0 +1,163 @@ +{ "columns":4, + "image":"Objects.png", + "imageheight":256, + "imagewidth":256, + "margin":0, + "name":"Objects", + "spacing":0, + "tilecount":16, + "tileheight":64, + "tileproperties": + { + "0": + { + "group":0 + }, + "1": + { + "group":0, + "onis":1, + "startPos":-1 + }, + "11": + { + "group":0 + }, + "14": + { + "group":0, + "time":2000 + }, + "15": + { + "group":0, + "length":10 + }, + "2": + { + "group":0, + "onis":-1, + "startPos":1 + }, + "5": + { + "color":"yellow", + "group":0 + }, + "6": + { + "dir":1, + "group":0 + }, + "7": + { + "color":"yellow", + "group":0 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int" + }, + "1": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "11": + { + "group":"int" + }, + "14": + { + "group":"int", + "time":"int" + }, + "15": + { + "group":"int", + "length":"int" + }, + "2": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "5": + { + "color":"string", + "group":"int" + }, + "6": + { + "dir":"int", + "group":"int" + }, + "7": + { + "color":"string", + "group":"int" + } + }, + "tiles": + { + "0": + { + "type":"pusher" + }, + "1": + { + "type":"lever" + }, + "10": + { + "type":"ball" + }, + "11": + { + "type":"infinitemirror" + }, + "12": + { + "type":"boxmirror" + }, + "13": + { + "type":"boxheavy" + }, + "14": + { + "type":"timedpusher" + }, + "15": + { + "type":"wind" + }, + "2": + { + "type":"lever" + }, + "4": + { + "type":"box" + }, + "5": + { + "type":"beamer" + }, + "6": + { + "type":"rotmirror" + }, + "7": + { + "type":"lightpusher" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl2/bower_components/requirejs/require.js b/fireboywatergirl2/bower_components/requirejs/require.js new file mode 100644 index 00000000..23ddb4ee --- /dev/null +++ b/fireboywatergirl2/bower_components/requirejs/require.js @@ -0,0 +1,2142 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.2.0 Copyright jQuery Foundation and other contributors. + * Released under MIT license, http://github.com/requirejs/requirejs/LICENSE + */ +//Not using strict: uneven strict support in browsers, #392, and causes +//problems with requirejs.exec()/transpiler plugins that may not be strict. +/*jslint regexp: true, nomen: true, sloppy: true */ +/*global window, navigator, document, importScripts, setTimeout, opera */ + +var requirejs, require, define; +(function (global) { + var req, s, head, baseElement, dataMain, src, + interactiveScript, currentlyAddingScript, mainScript, subPath, + version = '2.2.0', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? + /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false; + + //Could match something like ')//comment', do not lose the prefix to comment. + function commentReplace(match, multi, multiText, singlePrefix) { + return singlePrefix || ''; + } + + function isFunction(it) { + return ostring.call(it) === '[object Function]'; + } + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i; + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i; + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop); + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop]; + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop; + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break; + } + } + } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + + if (!target[prop]) { + target[prop] = {}; + } + mixin(target[prop], value, force, deepStringMixin); + } else { + target[prop] = value; + } + } + }); + } + return target; + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments); + }; + } + + function scripts() { + return document.getElementsByTagName('script'); + } + + function defaultOnError(err) { + throw err; + } + + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value; + } + var g = global; + each(value.split('.'), function (part) { + g = g[part]; + }); + return g; + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + e.requireType = id; + e.requireModules = requireModules; + if (err) { + e.originalError = err; + } + return e; + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return; + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite an existing requirejs instance. + return; + } + cfg = requirejs; + requirejs = undefined; + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require; + require = undefined; + } + + function newContext(contextName) { + var inCheckLoaded, Module, context, handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; i < ary.length; i++) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + // If at the start, or previous value is still .., + // keep them so that when converted to a path it may + // still work when converted to a path, even though + // as an ID it is less than ideal. In larger point + // releases, may be better to just kick out an error. + if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { + continue; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + /** + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name + */ + function normalize(name, baseName, applyMap) { + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, + foundMap, foundI, foundStarMap, starI, normalizedBaseParts, + baseParts = (baseName && baseName.split('/')), + map = config.map, + starMap = map && map['*']; + + //Adjust any relative paths. + if (name) { + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); + } + + // Starts with a '.' so need the baseName + if (name[0].charAt(0) === '.' && baseParts) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = normalizedBaseParts.concat(name); + } + + trimDots(name); + name = name.join('/'); + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/'); + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/'); + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')); + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment); + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue; + foundI = i; + break outerLoop; + } + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment); + starI = i; + } + } + + if (!foundMap && foundStarMap) { + foundMap = foundStarMap; + foundI = starI; + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap); + name = nameParts.join('/'); + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; + } + + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if (scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName) { + scriptNode.parentNode.removeChild(scriptNode); + return true; + } + }); + } + } + + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id); + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift(); + context.require.undef(id); + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true + })([id]); + + return true; + } + } + + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1; + if (index > -1) { + prefix = name.substring(0, index); + name = name.substring(index + 1, name.length); + } + return [prefix, name]; + } + + /** + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. + * + * @returns {Object} + */ + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, pluginModule, suffix, nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = ''; + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false; + name = '_@r' + (requireCounter += 1); + } + + nameParts = splitPrefix(name); + prefix = nameParts[0]; + name = nameParts[1]; + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap); + pluginModule = getOwn(defined, prefix); + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap); + }); + } else { + // If nested plugin references, then do not try to + // normalize, as it will not normalize correctly. This + // places a restriction on resourceIds, and the longer + // term solution is not to normalize until plugins are + // loaded and all normalizations to allow for async + // loading of a loader plugin. But for now, fixes the + // common uses. Details in #1131 + normalizedName = name.indexOf('!') === -1 ? + normalize(name, parentName, applyMap) : + name; + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap); + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName); + prefix = nameParts[0]; + normalizedName = nameParts[1]; + isNormalized = true; + + url = context.nameToUrl(normalizedName); + } + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? + '_unnormalized' + (unnormalizedCounter += 1) : + ''; + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? + prefix + '!' + normalizedName : + normalizedName) + suffix + }; + } + + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (!mod) { + mod = registry[id] = new context.Module(depMap); + } + + return mod; + } + + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (hasProp(defined, id) && + (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]); + } + } else { + mod = getModule(depMap); + if (mod.error && name === 'error') { + fn(mod.error); + } else { + mod.on(name, fn); + } + } + } + + function onError(err, errback) { + var ids = err.requireModules, + notified = false; + + if (errback) { + errback(err); + } else { + each(ids, function (id) { + var mod = getOwn(registry, id); + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err; + if (mod.events.error) { + notified = true; + mod.emit('error', err); + } + } + }); + + if (!notified) { + req.onError(err); + } + } + } + + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + each(globalDefQueue, function(queueItem) { + var id = queueItem[0]; + if (typeof id === 'string') { + context.defQueueMap[id] = true; + } + defQueue.push(queueItem); + }); + globalDefQueue = []; + } + } + + handlers = { + 'require': function (mod) { + if (mod.require) { + return mod.require; + } else { + return (mod.require = context.makeRequire(mod.map)); + } + }, + 'exports': function (mod) { + mod.usingExports = true; + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports); + } else { + return (mod.exports = defined[mod.map.id] = {}); + } + } + }, + 'module': function (mod) { + if (mod.module) { + return mod.module; + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {}; + }, + exports: mod.exports || (mod.exports = {}) + }); + } + } + }; + + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id]; + delete enabledRegistry[id]; + } + + function breakCycle(mod, traced, processed) { + var id = mod.map.id; + + if (mod.error) { + mod.emit('error', mod.error); + } else { + traced[id] = true; + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId); + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]); + mod.check(); //pass false? + } else { + breakCycle(dep, traced, processed); + } + } + }); + processed[id] = true; + } + } + + function checkLoaded() { + var err, usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true; + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return; + } + + inCheckLoaded = true; + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id; + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return; + } + + if (!map.isDefine) { + reqCalls.push(mod); + } + + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true; + stillLoading = true; + } else { + noLoads.push(modId); + removeScript(modId); + } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true; + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false); + } + } + } + }); + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); + err.contextName = context.contextName; + return onError(err); + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}); + }); + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0; + checkLoaded(); + }, 50); + } + } + + inCheckLoaded = false; + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {}; + this.map = map; + this.shim = getOwn(config.shim, map.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + + /* this.exports this.factory + this.depMaps = [], + this.enabled, this.fetched + */ + }; + + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {}; + + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return; + } + + this.factory = factory; + + if (errback) { + //Register for errors on this module. + this.on('error', errback); + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err); + }); + } + + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0); + + this.errback = errback; + + //Indicate this module has be initialized + this.inited = true; + + this.ignore = options.ignore; + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable(); + } else { + this.check(); + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true; + this.depCount -= 1; + this.depExports[i] = depExports; + } + }, + + fetch: function () { + if (this.fetched) { + return; + } + this.fetched = true; + + context.startTime = (new Date()).getTime(); + + var map = this.map; + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true + })(this.shim.deps || [], bind(this, function () { + return map.prefix ? this.callPlugin() : this.load(); + })); + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load(); + } + }, + + load: function () { + var url = this.map.url; + + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true; + context.load(this.map.id, url); + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return; + } + + var err, cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory; + + if (!this.inited) { + // Only fetch if not already in the defQueue. + if (!hasProp(context.defQueueMap, id)) { + this.fetch(); + } + } else if (this.error) { + this.emit('error', this.error); + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true; + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || + req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports); + } catch (e) { + err = e; + } + } else { + exports = context.execCb(id, factory, depExports, exports); + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module; + if (cjsModule) { + exports = cjsModule.exports; + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports; + } + } + + if (err) { + err.requireMap = this.map; + err.requireModules = this.map.isDefine ? [this.map.id] : null; + err.requireType = this.map.isDefine ? 'define' : 'require'; + return onError((this.error = err)); + } + + } else { + //Just a literal value + exports = factory; + } + + this.exports = exports; + + if (this.map.isDefine && !this.ignore) { + defined[id] = exports; + + if (req.onResourceLoad) { + var resLoadMaps = []; + each(this.depMaps, function (depMap) { + resLoadMaps.push(depMap.normalizedMap || depMap); + }); + req.onResourceLoad(context, this.map, resLoadMaps); + } + } + + //Clean up + cleanRegistry(id); + + this.defined = true; + } + + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false; + + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true; + this.emit('defined', this.exports); + this.defineEmitComplete = true; + } + + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix); + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap); + + on(pluginMap, 'defined', bind(this, function (plugin) { + var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true + }); + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = plugin.normalize(name, function (name) { + return normalize(name, parentName, true); + }) || ''; + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, + this.map.parentMap); + on(normalizedMap, + 'defined', bind(this, function (value) { + this.map.normalizedMap = normalizedMap; + this.init([], function () { return value; }, null, { + enabled: true, + ignore: true + }); + })); + + normalizedMod = getOwn(registry, normalizedMap.id); + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap); + + if (this.events.error) { + normalizedMod.on('error', bind(this, function (err) { + this.emit('error', err); + })); + } + normalizedMod.enable(); + } + + return; + } + + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + + load = bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true + }); + }); + + load.error = bind(this, function (err) { + this.inited = true; + this.error = err; + err.requireModules = [id]; + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id); + } + }); + + onError(err); + }); + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive; + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt; + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false; + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap); + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id]; + } + + try { + req.exec(text); + } catch (e) { + return onError(makeError('fromtexteval', + 'fromText eval for ' + id + + ' failed: ' + e, + e, + [id])); + } + + if (hasInteractive) { + useInteractive = true; + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap); + + //Support anonymous modules. + context.completeLoad(moduleName); + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load); + }); + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config); + })); + + context.enable(pluginMap, this); + this.pluginMaps[pluginMap.id] = pluginMap; + }, + + enable: function () { + enabledRegistry[this.map.id] = this; + this.enabled = true; + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true; + + //Enable each dependency + each(this.depMaps, bind(this, function (depMap, i) { + var id, mod, handler; + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, + (this.map.isDefine ? this.map : this.map.parentMap), + false, + !this.skipMap); + this.depMaps[i] = depMap; + + handler = getOwn(handlers, depMap.id); + + if (handler) { + this.depExports[i] = handler(this); + return; + } + + this.depCount += 1; + + on(depMap, 'defined', bind(this, function (depExports) { + if (this.undefed) { + return; + } + this.defineDep(i, depExports); + this.check(); + })); + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)); + } else if (this.events.error) { + // No direct errback on this module, but something + // else is listening for errors, so be sure to + // propagate the error correctly. + on(depMap, 'error', bind(this, function(err) { + this.emit('error', err); + })); + } + } + + id = depMap.id; + mod = registry[id]; + + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this); + } + })); + + //Enable each plugin that is used in + //a dependency + eachProp(this.pluginMaps, bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id); + if (mod && !mod.enabled) { + context.enable(pluginMap, this); + } + })); + + this.enabling = false; + + this.check(); + }, + + on: function (name, cb) { + var cbs = this.events[name]; + if (!cbs) { + cbs = this.events[name] = []; + } + cbs.push(cb); + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt); + }); + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name]; + } + } + }; + + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + } + } + + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func); + } + } else { + node.removeEventListener(name, func, false); + } + } + + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement; + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); + removeListener(node, context.onScriptError, 'error'); + + return { + node: node, + id: node && node.getAttribute('data-requiremodule') + }; + } + + function intakeDefines() { + var args; + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue(); + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + + args[args.length - 1])); + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args); + } + } + context.defQueueMap = {}; + } + + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + defQueueMap: {}, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/'; + } + } + + // Convert old style urlArgs string to a function. + if (typeof cfg.urlArgs === 'string') { + var urlArgs = cfg.urlArgs; + cfg.urlArgs = function(id, url) { + return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs; + }; + } + + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true + }; + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {}; + } + mixin(config[prop], value, true, true); + } else { + config[prop] = value; + } + }); + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value + }; + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value); + } + shim[id] = value; + }); + config.shim = shim; + } + + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name; + + pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj; + + name = pkgObj.name; + location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } + + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); + }); + } + + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id, null, true); + } + }); + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback); + } + }, + + makeShimExports: function (value) { + function fn() { + var ret; + if (value.init) { + ret = value.init.apply(global, arguments); + } + return ret || (value.exports && getGlobal(value.exports)); + } + return fn; + }, + + makeRequire: function (relMap, options) { + options = options || {}; + + function localRequire(deps, callback, errback) { + var id, map, requireMod; + + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true; + } + + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback); + } + + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]); + } + + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire); + } + + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true); + id = map.id; + + if (!hasProp(defined, id)) { + return onError(makeError('notloaded', 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])'))); + } + return defined[id]; + } + + //Grab defines waiting in the global queue. + intakeDefines(); + + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines(); + + requireMod = getModule(makeModuleMap(null, relMap)); + + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap; + + requireMod.init(deps, callback, errback, { + enabled: true + }); + + checkLoaded(); + }); + + return localRequire; + } + + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..'; + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); + moduleNamePlusExt = moduleNamePlusExt.substring(0, index); + } + + return context.nameToUrl(normalize(moduleNamePlusExt, + relMap && relMap.id, true), ext, true); + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id); + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id; + return hasProp(defined, id) || hasProp(registry, id); + } + }); + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue(); + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id); + + mod.undefed = true; + removeScript(id); + + delete defined[id]; + delete urlFetched[map.url]; + delete undefEvents[id]; + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function(args, i) { + if (args[0] === id) { + defQueue.splice(i, 1); + } + }); + delete context.defQueueMap[id]; + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events; + } + + cleanRegistry(id); + } + }; + } + + return localRequire; + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id); + if (mod) { + getModule(depMap).enable(); + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, args, mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports; + + takeGlobalQueue(); + + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + args[0] = moduleName; + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break; + } + found = true; + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true; + } + + callGetModule(args); + } + context.defQueueMap = {}; + + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName); + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return; + } else { + return onError(makeError('nodefine', + 'No define call for ' + moduleName, + null, + [moduleName])); + } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); + } + } + + checkLoaded(); + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } + + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || ''); + } else { + //A module that needs to be converted to a path. + paths = config.paths; + + syms = moduleName.split('/'); + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/'); + + parentPath = getOwn(paths, parentModule); + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0]; + } + syms.splice(0, i, parentPath); + break; + } + } + + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/'); + url += (ext || (/^data\:|^blob\:|\?/.test(url) || skipExt ? '' : '.js')); + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; + } + + return config.urlArgs && !/^blob\:/.test(url) ? + url + config.urlArgs(moduleName, url) : url; + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url); + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args); + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || + (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null; + + //Pull out the name of the module and the context. + var data = getScriptData(evt); + context.completeLoad(data.id); + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt); + if (!hasPathFallback(data.id)) { + var parents = []; + eachProp(registry, function(value, key) { + if (key.indexOf('_@r') !== 0) { + each(value.depMaps, function(depMap) { + if (depMap.id === data.id) { + parents.push(key); + return true; + } + }); + } + }); + return onError(makeError('scripterror', 'Script error for "' + data.id + + (parents.length ? + '", needed by: ' + parents.join(', ') : + '"'), evt, [data.id])); + } + } + }; + + context.require = context.makeRequire(); + return context; + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + + //Find the right context, use default + var context, config, + contextName = defContextName; + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps; + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback; + callback = errback; + errback = optional; + } else { + deps = []; + } + } + + if (config && config.context) { + contextName = config.context; + } + + context = getOwn(contexts, contextName); + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName); + } + + if (config) { + context.configure(config); + } + + return context.require(deps, callback, errback); + }; + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config); + }; + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { + setTimeout(fn, 4); + } : function (fn) { fn(); }; + + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req; + } + + req.version = version; + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/; + req.isBrowser = isBrowser; + s = req.s = { + contexts: contexts, + newContext: newContext + }; + + //Create default context. + req({}); + + //Exports some context-sensitive methods on global require. + each([ + 'toUrl', + 'undef', + 'defined', + 'specified' + ], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName]; + return ctx.require[prop].apply(ctx, arguments); + }; + }); + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0]; + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0]; + if (baseElement) { + head = s.head = baseElement.parentNode; + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError; + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : + document.createElement('script'); + node.type = config.scriptType || 'text/javascript'; + node.charset = 'utf-8'; + node.async = true; + return node; + }; + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node; + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url); + + node.setAttribute('data-requirecontext', context.contextName); + node.setAttribute('data-requiremodule', moduleName); + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if (node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/requirejs/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/requirejs/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true; + + node.attachEvent('onreadystatechange', context.onScriptLoad); + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false); + node.addEventListener('error', context.onScriptError, false); + } + node.src = url; + + //Calling onNodeCreated after all properties on the node have been + //set, but before it is placed in the DOM. + if (config.onNodeCreated) { + config.onNodeCreated(node, config, moduleName, url); + } + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node; + if (baseElement) { + head.insertBefore(node, baseElement); + } else { + head.appendChild(node); + } + currentlyAddingScript = null; + + return node; + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation is that a build has been done so + //that only one script needs to be loaded anyway. This may need + //to be reevaluated if other use cases become common. + + // Post a task to the event loop to work around a bug in WebKit + // where the worker gets garbage-collected after calling + // importScripts(): https://webkit.org/b/153317 + setTimeout(function() {}, 0); + importScripts(url); + + //Account for anonymous modules + context.completeLoad(moduleName); + } catch (e) { + context.onError(makeError('importscripts', + 'importScripts failed for ' + + moduleName + ' at ' + url, + e, + [moduleName])); + } + } + }; + + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript; + } + + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script); + } + }); + return interactiveScript; + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode; + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main'); + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain; + + //Set final baseUrl if there is not already an explicit one, + //but only do so if the data-main value is not a loader plugin + //module ID. + if (!cfg.baseUrl && mainScript.indexOf('!') === -1) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/'); + mainScript = src.pop(); + subPath = src.length ? src.join('/') + '/' : './'; + + cfg.baseUrl = subPath; + } + + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, ''); + + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain; + } + + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; + + return true; + } + }); + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context; + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps; + deps = name; + name = null; + } + + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps; + deps = null; + } + + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = []; + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, commentReplace) + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep); + }); + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); + } + } + + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript(); + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule'); + } + context = contexts[node.getAttribute('data-requirecontext')]; + } + } + + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + if (context) { + context.defQueue.push([name, deps, callback]); + context.defQueueMap[name] = true; + } else { + globalDefQueue.push([name, deps, callback]); + } + }; + + define.amd = { + jQuery: true + }; + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text); + }; + + //Set up with config info. + req(cfg); +}(this)); diff --git a/fireboywatergirl2/data/light/temple.json b/fireboywatergirl2/data/light/temple.json new file mode 100644 index 00000000..755426ae --- /dev/null +++ b/fireboywatergirl2/data/light/temple.json @@ -0,0 +1 @@ +{"index":0,"id":"light","label":"light temple","color":"#AF7F36","type":"tree","levels":[{"id":1,"_id":1,"x":0.5,"y":0.85,"filename":"tutorials/levels/light_01.json","time":30,"mobileTime":50,"required":0,"initial":true},{"id":2,"_id":2,"x":0.5,"y":0.75,"filename":"light/levels/light_02.json","time":40,"mobileTime":92,"required":0},{"id":5,"_id":3,"x":0.5,"y":0.6,"filename":"light/levels/light_05.json","time":50,"mobileTime":55,"required":0},{"id":10,"_id":4,"x":0.55,"y":0.5,"filename":"light/levels/light_10.json","time":60,"mobileTime":70,"required":0},{"id":9,"_id":5,"x":0.45,"y":0.5,"filename":"light/levels/light_09.json","time":28,"mobileTime":50,"type":"speed","required":0},{"id":18,"_id":6,"x":0.45,"y":0.4,"filename":"light/levels/light_18.json","type":"dark","time":45,"mobileTime":60,"required":0},{"id":19,"_id":7,"x":0.55,"y":0.4,"filename":"light/levels/light_19.json","time":90,"mobileTime":110,"required":0},{"id":23,"_id":8,"x":0.5,"y":0.3,"filename":"light/levels/light_23.json","time":65,"mobileTime":90,"required":0},{"id":15,"_id":9,"x":0.65,"y":0.45,"filename":"light/levels/light_15.json","type":"dark","time":22,"mobileTime":40,"required":0},{"id":14,"_id":10,"x":0.35,"y":0.45,"filename":"light/levels/light_14.json","time":80,"mobileTime":110,"required":0},{"id":16,"_id":14,"x":0.75,"y":0.45,"filename":"light/levels/light_16.json","time":60,"mobileTime":80,"required":0},{"id":11,"_id":15,"x":0.75,"y":0.6,"filename":"light/levels/light_11.json","time":130,"mobileTime":160,"required":0},{"id":25,"_id":16,"x":0.75,"y":0.3,"filename":"light/levels/light_25.json","time":45,"mobileTime":80,"required":0},{"id":8,"_id":17,"x":0.25,"y":0.6,"filename":"light/levels/light_08.json","time":85,"mobileTime":110,"required":0},{"id":21,"_id":18,"x":0.25,"y":0.3,"filename":"light/levels/light_21.json","time":28,"mobileTime":32,"required":0},{"id":13,"_id":19,"x":0.25,"y":0.45,"filename":"light/levels/light_13.json","time":30,"mobileTime":60,"type":"dark","required":0},{"id":4,"_id":20,"x":0.4,"y":0.7,"filename":"light/levels/light_04.json","time":30,"mobileTime":45,"type":"speed","required":0},{"id":6,"_id":21,"x":0.6,"y":0.7,"filename":"light/levels/light_06.json","type":"dark","time":50,"mobileTime":110,"required":0},{"id":28,"_id":22,"x":0.5,"y":0.18,"filename":"light/levels/light_28.json","time":100,"mobileTime":115,"required":0},{"id":22,"_id":23,"x":0.4,"y":0.2,"filename":"light/levels/light_22.json","time":115,"mobileTime":180,"required":0},{"id":24,"_id":24,"x":0.6,"y":0.2,"filename":"light/levels/light_24.json","time":35,"mobileTime":45,"type":"speed","required":0},{"id":0,"_id":25,"x":0.5,"y":0.95,"filename":"tutorials/levels/forest_01.json","time":40,"mobileTime":70,"required":0,"initial":true},{"id":31,"_id":26,"x":0.4,"y":0.9,"filename":"light/levels/light_31.json","time":90,"mobileTime":100,"type":"puzzle","required":0},{"id":40,"_id":27,"x":0.6,"y":0.9,"filename":"light/levels/light_40.json","time":65,"mobileTime":70,"type":"puzzle","required":0},{"id":26,"_id":28,"x":0.85,"y":0.35,"filename":"light/levels/light_26.json","type":"dark","time":40,"mobileTime":55,"required":0},{"id":17,"_id":29,"x":0.85,"y":0.55,"filename":"light/levels/light_17.json","type":"speed","time":16,"mobileTime":35,"required":0},{"id":38,"_id":30,"x":0.95,"y":0.45,"filename":"light/levels/light_38.json","time":45,"mobileTime":58,"type":"puzzle","required":0},{"id":7,"_id":31,"x":0.7,"y":0.75,"filename":"light/levels/light_07.json","type":"speed","time":20,"mobileTime":30,"required":0},{"id":39,"_id":32,"x":0.9,"y":0.75,"filename":"light/levels/light_39.json","time":55,"mobileTime":75,"type":"puzzle","required":0},{"id":3,"_id":33,"x":0.3,"y":0.75,"filename":"light/levels/light_03.json","type":"dark","time":25,"mobileTime":55,"required":0},{"id":12,"_id":34,"x":0.15,"y":0.55,"filename":"light/levels/light_12.json","time":80,"mobileTime":140,"required":0},{"id":20,"_id":35,"x":0.15,"y":0.35,"filename":"light/levels/light_20.json","type":"speed","time":25,"mobileTime":45,"required":0},{"id":33,"_id":36,"x":0.05,"y":0.45,"filename":"light/levels/light_33.json","time":53,"mobileTime":63,"type":"puzzle","required":0},{"id":32,"_id":37,"x":0.1,"y":0.75,"filename":"light/levels/light_32.json","time":45,"mobileTime":55,"type":"puzzle","required":0},{"id":27,"_id":38,"x":0.3,"y":0.15,"filename":"light/levels/light_27.json","type":"speed","time":40,"mobileTime":55,"required":0},{"id":29,"_id":39,"x":0.7,"y":0.15,"filename":"light/levels/light_29.json","time":80,"mobileTime":90,"required":0},{"id":30,"_id":40,"x":0.5,"y":0.08,"filename":"light/levels/light_30.json","type":"dark","time":60,"mobileTime":70,"required":0},{"id":34,"_id":41,"x":0.1,"y":0.2,"filename":"light/levels/light_34.json","time":80,"mobileTime":160,"type":"puzzle","required":0},{"id":37,"_id":42,"x":0.9,"y":0.2,"filename":"light/levels/light_37.json","time":65,"mobileTime":85,"type":"puzzle","required":0},{"id":35,"_id":43,"x":0.4,"y":0.039,"filename":"light/levels/light_35.json","time":100,"mobileTime":110,"type":"puzzle","required":0},{"id":36,"_id":44,"x":0.6,"y":0.039,"filename":"light/levels/light_36.json","time":65,"mobileTime":90,"type":"puzzle","required":0}],"edges":[{"id":"temp","source":32,"target":27,"_id":"3227"},{"id":"temp","source":30,"target":42,"_id":"3042"},{"id":"temp","source":44,"target":43,"_id":"4443"},{"id":"temp","source":41,"target":36,"_id":"4136"},{"id":"temp","source":37,"target":26,"_id":"3726"},{"id":"temp","source":37,"target":34,"_id":"3734"},{"id":"temp","source":34,"target":36,"_id":"3436"},{"id":"temp","source":41,"target":38,"_id":"4138"},{"id":"temp","source":38,"target":43,"_id":"3843"},{"id":"temp","source":44,"target":39,"_id":"4439"},{"id":"temp","source":39,"target":42,"_id":"3942"},{"id":"temp","source":30,"target":29,"_id":"3029"},{"id":"temp","source":29,"target":32,"_id":"2932"},{"id":"temp","source":26,"target":1,"_id":"261"},{"id":"temp","source":1,"target":27,"_id":"127"},{"id":"temp","source":1,"target":2,"_id":"12"},{"id":"temp","source":1,"target":33,"_id":"133"},{"id":"temp","source":1,"target":31,"_id":"131"},{"id":"temp","source":31,"target":29,"_id":"3129"},{"id":"temp","source":29,"target":14,"_id":"2914"},{"id":"temp","source":14,"target":28,"_id":"1428"},{"id":"temp","source":14,"target":16,"_id":"1416"},{"id":"temp","source":15,"target":14,"_id":"1514"},{"id":"temp","source":28,"target":30,"_id":"2830"},{"id":"temp","source":36,"target":35,"_id":"3635"},{"id":"temp","source":35,"target":19,"_id":"3519"},{"id":"temp","source":19,"target":34,"_id":"1934"},{"id":"temp","source":34,"target":33,"_id":"3433"},{"id":"temp","source":2,"target":21,"_id":"221"},{"id":"temp","source":2,"target":20,"_id":"220"},{"id":"temp","source":2,"target":3,"_id":"23"},{"id":"temp","source":5,"target":7,"_id":"57"},{"id":"temp","source":4,"target":6,"_id":"46"},{"id":"temp","source":6,"target":10,"_id":"610"},{"id":"temp","source":10,"target":5,"_id":"105"},{"id":"temp","source":5,"target":3,"_id":"53"},{"id":"temp","source":3,"target":4,"_id":"34"},{"id":"temp","source":4,"target":9,"_id":"49"},{"id":"temp","source":9,"target":7,"_id":"97"},{"id":"temp","source":7,"target":8,"_id":"78"},{"id":"temp","source":8,"target":6,"_id":"86"},{"id":"temp","source":9,"target":14,"_id":"914"},{"id":"temp","source":10,"target":19,"_id":"1019"},{"id":"temp","source":40,"target":22,"_id":"4022"},{"id":"temp","source":39,"target":40,"_id":"3940"},{"id":"temp","source":40,"target":38,"_id":"4038"},{"id":"temp","source":40,"target":44,"_id":"4044"},{"id":"temp","source":18,"target":19,"_id":"1819"},{"id":"temp","source":19,"target":17,"_id":"1917"},{"id":"temp","source":19,"target":20,"_id":"1920"},{"id":"temp","source":21,"target":14,"_id":"2114"},{"id":"temp","source":21,"target":15,"_id":"2115"},{"id":"temp","source":17,"target":20,"_id":"1720"},{"id":"temp","source":19,"target":23,"_id":"1923"},{"id":"temp","source":23,"target":18,"_id":"2318"},{"id":"temp","source":24,"target":16,"_id":"2416"},{"id":"temp","source":14,"target":24,"_id":"1424"},{"id":"temp","source":24,"target":22,"_id":"2422"},{"id":"temp","source":23,"target":22,"_id":"2322"},{"id":"temp","source":8,"target":22,"_id":"822"},{"id":"temp","source":27,"target":31,"_id":"2731"},{"id":"temp","source":31,"target":32,"_id":"3132"},{"id":"temp","source":26,"target":33,"_id":"2633"},{"id":"temp","source":37,"target":33,"_id":"3733"},{"id":"temp","source":35,"target":38,"_id":"3538"},{"id":"temp","source":41,"target":35,"_id":"4135"},{"id":"temp","source":28,"target":39,"_id":"2839"},{"id":"temp","source":28,"target":42,"_id":"2842"},{"id":"temp","source":40,"target":43,"_id":"4043"}]} \ No newline at end of file diff --git a/fireboywatergirl2/data/tutorials/levels/forest_01.json b/fireboywatergirl2/data/tutorials/levels/forest_01.json new file mode 100644 index 00000000..234edf60 --- /dev/null +++ b/fireboywatergirl2/data/tutorials/levels/forest_01.json @@ -0,0 +1 @@ +{"height":29,"infinite":false,"layers":[{"data":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,2,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,4,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,8,8,8,8,8,1,1,1,1,3,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,1,1,1,6,6,6,6,6,1,1,1,1,1,1,1,1],"height":29,"name":"Ground","opacity":1,"type":"tilelayer","visible":true,"width":39,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial_dual","objects":[{"height":248,"id":35,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":464,"x":16,"y":664},{"height":32,"id":36,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest1","wrap":true},"type":"","visible":true,"width":408,"x":112,"y":680},{"height":32,"id":37,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest2","wrap":true},"type":"","visible":true,"width":360,"x":160,"y":720},{"height":184,"id":38,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":760,"x":480,"y":728},{"height":32,"id":41,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest3","wrap":true},"type":"","visible":true,"width":480,"x":608,"y":768},{"height":32,"id":43,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest4","wrap":true},"type":"","visible":true,"width":536,"x":608,"y":576},{"height":184,"id":44,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":360,"x":672,"y":536},{"height":32,"id":45,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest5","wrap":true},"type":"","visible":true,"width":536,"x":648,"y":616},{"height":32,"id":46,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest6","wrap":true},"type":"","visible":true,"width":536,"x":80,"y":528},{"height":32,"id":47,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest7","wrap":true},"type":"","visible":true,"width":344,"x":320,"y":560},{"height":184,"id":48,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":384,"x":160,"y":480},{"height":32,"id":49,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest8","wrap":true},"type":"","visible":true,"width":536,"x":328,"y":392},{"height":32,"id":50,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest9","wrap":true},"type":"","visible":true,"width":536,"x":520,"y":432},{"height":136,"id":51,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":160,"y":368},{"height":136,"id":52,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":368,"y":216},{"height":336,"id":53,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":344,"x":24,"y":16},{"height":32,"id":54,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest10","wrap":true},"type":"","visible":true,"width":344,"x":800,"y":224},{"height":32,"id":55,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest11","wrap":true},"type":"","visible":true,"width":320,"x":48,"y":48},{"height":32,"id":57,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest12","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":88},{"height":208,"id":58,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":656,"x":568,"y":16},{"height":32,"id":61,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest13","wrap":true},"type":"","visible":true,"width":296,"x":912,"y":264},{"height":32,"id":63,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest14","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":128},{"height":32,"id":116,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest15","wrap":true},"type":"","visible":true,"width":360,"x":200,"y":856},{"height":32,"id":117,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest16","wrap":true},"type":"","visible":true,"width":400,"x":200,"y":816},{"height":32,"id":126,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest17","wrap":true},"type":"","visible":true,"width":448,"x":480,"y":72},{"height":32,"id":127,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest18","wrap":true},"type":"","visible":true,"width":640,"x":480,"y":112}],"opacity":1,"type":"objectgroup","visible":false,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial_single","objects":[{"height":248,"id":90,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":464,"x":16,"y":664},{"height":32,"id":91,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest19","wrap":true},"type":"","visible":true,"width":360,"x":160,"y":680},{"height":32,"id":92,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest20","wrap":true},"type":"","visible":true,"width":360,"x":160,"y":720},{"height":184,"id":93,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":760,"x":480,"y":728},{"height":32,"id":94,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest21","wrap":true},"type":"","visible":true,"width":544,"x":144,"y":808},{"height":32,"id":95,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest22","wrap":true},"type":"","visible":true,"width":480,"x":192,"y":848},{"height":32,"id":96,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest23","wrap":true},"type":"","visible":true,"width":480,"x":608,"y":768},{"height":32,"id":97,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest24","wrap":true},"type":"","visible":true,"width":536,"x":608,"y":576},{"height":184,"id":98,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":360,"x":672,"y":536},{"height":32,"id":99,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest25","wrap":true},"type":"","visible":true,"width":536,"x":648,"y":616},{"height":32,"id":100,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest26","wrap":true},"type":"","visible":true,"width":536,"x":80,"y":528},{"height":32,"id":101,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest27","wrap":true},"type":"","visible":true,"width":344,"x":320,"y":560},{"height":184,"id":102,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":384,"x":160,"y":480},{"height":32,"id":103,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest28","wrap":true},"type":"","visible":true,"width":536,"x":328,"y":392},{"height":32,"id":104,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest29","wrap":true},"type":"","visible":true,"width":536,"x":520,"y":432},{"height":136,"id":105,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":160,"y":368},{"height":136,"id":106,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":368,"y":216},{"height":336,"id":107,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":344,"x":24,"y":16},{"height":32,"id":108,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest30","wrap":true},"type":"","visible":true,"width":344,"x":800,"y":224},{"height":32,"id":109,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest31","wrap":true},"type":"","visible":true,"width":320,"x":48,"y":48},{"height":32,"id":110,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest32","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":88},{"height":208,"id":111,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":656,"x":568,"y":16},{"height":32,"id":114,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest33","wrap":true},"type":"","visible":true,"width":296,"x":912,"y":264},{"height":32,"id":115,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest34","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":128},{"height":32,"id":124,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest35","wrap":true},"type":"","visible":true,"width":1000,"x":280,"y":72},{"height":32,"id":125,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest36","wrap":true},"type":"","visible":true,"width":640,"x":480,"y":122}],"opacity":1,"type":"objectgroup","visible":false,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial_keyboard","objects":[{"height":248,"id":64,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":464,"x":16,"y":664},{"height":32,"id":65,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest37","wrap":true},"type":"","visible":true,"width":360,"x":160,"y":680},{"height":32,"id":66,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest38","wrap":true},"type":"","visible":true,"width":360,"x":160,"y":720},{"height":184,"id":67,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":760,"x":480,"y":728},{"height":32,"id":68,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest39","wrap":true},"type":"","visible":true,"width":544,"x":144,"y":808},{"height":32,"id":69,"name":"","properties":{"id":0},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest40","wrap":true},"type":"","visible":true,"width":480,"x":192,"y":848},{"height":32,"id":70,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest41","wrap":true},"type":"","visible":true,"width":480,"x":608,"y":768},{"height":32,"id":71,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest42","wrap":true},"type":"","visible":true,"width":536,"x":608,"y":576},{"height":184,"id":72,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":360,"x":672,"y":536},{"height":32,"id":73,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest43","wrap":true},"type":"","visible":true,"width":536,"x":648,"y":616},{"height":32,"id":74,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest44","wrap":true},"type":"","visible":true,"width":536,"x":80,"y":528},{"height":32,"id":75,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest45","wrap":true},"type":"","visible":true,"width":344,"x":320,"y":560},{"height":184,"id":76,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":384,"x":160,"y":480},{"height":32,"id":77,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest46","wrap":true},"type":"","visible":true,"width":536,"x":328,"y":392},{"height":32,"id":78,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest47","wrap":true},"type":"","visible":true,"width":536,"x":520,"y":432},{"height":136,"id":79,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":160,"y":368},{"height":136,"id":80,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":736,"x":368,"y":216},{"height":336,"id":81,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":344,"x":24,"y":16},{"height":32,"id":82,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest48","wrap":true},"type":"","visible":true,"width":344,"x":800,"y":224},{"height":32,"id":83,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest49","wrap":true},"type":"","visible":true,"width":320,"x":48,"y":48},{"height":32,"id":84,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest50","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":88},{"height":208,"id":85,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":712,"x":512,"y":16},{"height":32,"id":86,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest51","wrap":true},"type":"","visible":true,"width":448,"x":480,"y":72},{"height":32,"id":87,"name":"","properties":{"id":7},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest52","wrap":true},"type":"","visible":true,"width":640,"x":480,"y":112},{"height":32,"id":88,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest53","wrap":true},"type":"","visible":true,"width":296,"x":912,"y":264},{"height":32,"id":89,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_forest54","wrap":true},"type":"","visible":true,"width":232,"x":48,"y":128}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Chars","objects":[{"gid":16,"height":64,"id":1,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":64,"y":896},{"gid":17,"height":64,"id":5,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":64,"y":768},{"gid":19,"height":64,"id":9,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1136,"y":192},{"gid":18,"height":64,"id":10,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1024,"y":192},{"gid":21,"height":64,"id":12,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":720,"y":496},{"gid":21,"height":64,"id":13,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":728,"y":176},{"gid":21,"height":64,"id":14,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":40,"y":216},{"gid":20,"height":64,"id":15,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":338,"y":112},{"gid":20,"height":64,"id":16,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":208,"y":456},{"gid":20,"height":64,"id":17,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":624,"y":880},{"gid":21,"height":64,"id":18,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":880,"y":878}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Objects","objects":[{"gid":24,"height":64,"id":20,"name":"","properties":{"group":5},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":960,"y":384},{"gid":24,"height":64,"id":22,"name":"","properties":{"group":5},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":320,"y":512},{"gid":26,"height":64,"id":25,"name":"","properties":{"group":4},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":272,"y":672},{"height":32,"id":30,"name":"","properties":{"dx":0,"dy":-3,"group":5},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":128,"x":1088,"y":384},{"gid":28,"height":64,"id":32,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":704,"y":288},{"height":32,"id":33,"name":"","properties":{"dx":0,"dy":-3,"group":4},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":128,"x":32,"y":480}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0}],"nextobjectid":130,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.1.3","tileheight":32,"tilesets":[{"firstgid":1,"source":"../../../assets/tilemaps/tilesets/Ground.json"},{"firstgid":16,"source":"../../../assets/tilemaps/tilesets/Chars.json"},{"firstgid":24,"source":"../../../assets/tilemaps/tilesets/Objects.json"}],"tilewidth":32,"type":"map","version":1,"width":39} \ No newline at end of file diff --git a/fireboywatergirl2/data/tutorials/levels/light_01.json b/fireboywatergirl2/data/tutorials/levels/light_01.json new file mode 100644 index 00000000..4f67b1ab --- /dev/null +++ b/fireboywatergirl2/data/tutorials/levels/light_01.json @@ -0,0 +1 @@ +{"height":29,"infinite":false,"layers":[{"data":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,1,1,1,1,1,3,0,0,2,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,1,1,1,1,5,0,0,0,0,0,0,4,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,5,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"height":29,"name":"Ground","opacity":1,"type":"tilelayer","visible":true,"width":39,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial","objects":[{"height":208,"id":47,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":744,"x":32,"y":704},{"height":32,"id":48,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light1","wrap":true},"type":"","visible":true,"width":648,"x":104,"y":744},{"height":32,"id":49,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light2","wrap":true},"type":"","visible":true,"width":648,"x":160,"y":784},{"height":416,"id":50,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":384,"x":840,"y":400},{"height":32,"id":52,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light3","wrap":true},"type":"","visible":true,"width":336,"x":898,"y":464},{"height":32,"id":53,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light4","wrap":true},"type":"","visible":true,"width":336,"x":848,"y":504},{"height":32,"id":54,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light5","wrap":true},"type":"","visible":true,"width":336,"x":898,"y":544},{"height":504,"id":55,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":160,"x":672,"y":112},{"height":32,"id":56,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light6","wrap":true},"type":"","visible":true,"width":336,"x":688,"y":208},{"height":32,"id":57,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light7","wrap":true},"type":"","visible":true,"width":336,"x":688,"y":256},{"height":480,"id":58,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":504,"x":160,"y":64},{"height":32,"id":59,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light8","wrap":true},"type":"","visible":true,"width":528,"x":120,"y":224},{"height":32,"id":60,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light9","wrap":true},"type":"","visible":true,"width":200,"x":304,"y":272},{"height":144,"id":61,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":440,"x":8,"y":552},{"height":32,"id":62,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_light10","wrap":true},"type":"","visible":true,"width":288,"x":200,"y":416}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Chars","objects":[{"gid":16,"height":64,"id":2,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":200,"y":896},{"gid":18,"height":64,"id":3,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":48,"y":672},{"gid":19,"height":64,"id":4,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":272,"y":672},{"gid":21,"height":64,"id":5,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1072,"y":592},{"gid":21,"height":64,"id":6,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":928,"y":352},{"gid":21,"height":64,"id":7,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":336,"y":480},{"gid":20,"height":64,"id":8,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":496,"y":480},{"gid":20,"height":64,"id":9,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":912,"y":640},{"gid":17,"height":64,"id":32,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":304,"y":896}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Objects","objects":[{"gid":29,"height":64,"id":10,"name":"","properties":{"color":"blue","group":10,"initialState":1},"propertytypes":{"color":"string","group":"int","initialState":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":64,"y":896},{"gid":31,"height":64,"id":11,"name":"","properties":{"color":"blue","group":6},"propertytypes":{"color":"string","group":"int"},"rotation":-90,"type":"","visible":true,"width":64,"x":608,"y":896},{"gid":36,"height":64,"id":12,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":960,"y":768},{"gid":31,"height":64,"id":13,"name":"","properties":{"color":"yellow","group":41},"propertytypes":{"color":"string","group":"int"},"rotation":-90,"type":"","visible":true,"width":64,"x":1240,"y":768},{"gid":31,"height":64,"id":14,"name":"","properties":{"color":"yellow","group":4},"propertytypes":{"color":"string","group":"int"},"rotation":-90,"type":"","visible":true,"width":64,"x":672,"y":400},{"gid":31,"height":64,"id":15,"name":"","properties":{"group":42},"propertytypes":{"group":"int"},"rotation":180,"type":"","visible":true,"width":64,"x":1056,"y":0},{"gid":29,"height":64,"id":17,"name":"","properties":{"group":11,"initialState":1},"propertytypes":{"group":"int","initialState":"int"},"rotation":-90,"type":"","visible":true,"width":64,"x":128,"y":576},{"gid":25,"height":64,"id":18,"name":"","properties":{"group":2},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":832,"y":416},{"height":32,"id":24,"name":"","properties":{"dx":-3,"group":4},"propertytypes":{"dx":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":96,"x":160,"y":544},{"height":96,"id":25,"name":"","properties":{"dx":0,"dy":-3,"group":42},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":32,"x":640,"y":448},{"height":96,"id":27,"name":"","properties":{"dx":0,"dy":-3,"group":41},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":32,"x":800,"y":512},{"height":96,"id":28,"name":"","properties":{"dx":0,"dy":-3,"group":6},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":32,"x":800,"y":736},{"gid":35,"height":64,"id":29,"name":"","properties":{"group":1},"propertytypes":{"group":"int"},"rotation":90,"type":"","visible":true,"width":64,"x":64,"y":128},{"height":0,"id":34,"name":"","polyline":[{"x":0,"y":0},{"x":304,"y":0}],"properties":{"group":1,"max":0.5,"min":-0.5},"propertytypes":{"group":"int","max":"float","min":"float"},"rotation":0,"type":"slider","visible":true,"width":0,"x":288,"y":512},{"gid":30,"height":64,"id":36,"name":"","properties":{"group":2},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":992,"y":192}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0}],"nextobjectid":63,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.1.3","tileheight":32,"tilesets":[{"firstgid":1,"source":"../../../assets/tilemaps/tilesets/Ground.json"},{"firstgid":16,"source":"../../../assets/tilemaps/tilesets/Chars.json"},{"firstgid":24,"source":"../../../assets/tilemaps/tilesets/Objects.json"}],"tilewidth":32,"type":"map","version":1,"width":39} \ No newline at end of file diff --git a/fireboywatergirl2/fireboy-and-watergirl-light-temple.min.js b/fireboywatergirl2/fireboy-and-watergirl-light-temple.min.js new file mode 100644 index 00000000..557bcd40 --- /dev/null +++ b/fireboywatergirl2/fireboy-and-watergirl-light-temple.min.js @@ -0,0 +1,58 @@ +!function(a){if("object"==typeof exports)module.exports=a();else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.p2=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c||a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=0&&i<=1&&j>=0&&j<=1}},{"./Scalar":4}],2:[function(a,b,c){function d(){}b.exports=d,d.area=function(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])},d.left=function(a,b,c){return d.area(a,b,c)>0},d.leftOn=function(a,b,c){return d.area(a,b,c)>=0},d.right=function(a,b,c){return d.area(a,b,c)<0},d.rightOn=function(a,b,c){return d.area(a,b,c)<=0};var e=[],f=[];d.collinear=function(a,b,c,g){if(g){var h=e,i=f;h[0]=b[0]-a[0],h[1]=b[1]-a[1],i[0]=c[0]-b[0],i[1]=c[1]-b[1];var j=h[0]*i[0]+h[1]*i[1],k=Math.sqrt(h[0]*h[0]+h[1]*h[1]),l=Math.sqrt(i[0]*i[0]+i[1]*i[1]);return Math.acos(j/(k*l))a.vertices.length)throw new Error("lol2");if(b<0)throw new Error("lol3");for(var d=b;db[a][0])&&(a=c);g.left(this.at(a-1),this.at(a),this.at(a+1))||this.reverse()},d.prototype.reverse=function(){for(var a=[],b=0,c=this.vertices.length;b!==c;b++)a.push(this.vertices.pop());this.vertices=a},d.prototype.isReflex=function(a){return g.right(this.at(a-1),this.at(a),this.at(a+1))};var i=[],j=[];d.prototype.canSee=function(a,b){var c,d,e=i,h=j;if(g.leftOn(this.at(a+1),this.at(a),this.at(b))&&g.rightOn(this.at(a-1),this.at(a),this.at(b)))return!1;d=g.sqdist(this.at(a),this.at(b));for(var k=0;k!==this.vertices.length;++k)if((k+1)%this.vertices.length!==a&&k!==a&&g.leftOn(this.at(a),this.at(b),this.at(k+1))&&g.rightOn(this.at(a),this.at(b),this.at(k))&&(e[0]=this.at(a),e[1]=this.at(b),h[0]=this.at(k),h[1]=this.at(k+1),c=f.lineInt(e,h),g.sqdist(this.at(a),c)0?this.slice(a):[this]},d.prototype.slice=function(a){if(0==a.length)return[this];if(a instanceof Array&&a.length&&a[0]instanceof Array&&2==a[0].length&&a[0][0]instanceof Array){for(var b=[this],c=0;ch)return console.warn("quickDecomp: max level ("+h+") reached."),a;for(var x=0;xq&&(q+=this.vertices.length),p=Number.MAX_VALUE,q3&&c>=0;--c)g.collinear(this.at(c-1),this.at(c),this.at(c+1),a)&&(this.vertices.splice(c%this.vertices.length,1),c--,b++);return b}},{"./Line":1,"./Point":2,"./Scalar":4}],4:[function(a,b,c){function d(){}b.exports=d,d.eq=function(a,b,c){return c=c||0,Math.abs(a-b) (http://steffe.se)",keywords:["p2.js","p2","physics","engine","2d"],main:"./src/p2.js",engines:{node:"*"},repository:{type:"git",url:"https://github.com/schteppe/p2.js.git"},bugs:{url:"https://github.com/schteppe/p2.js/issues"},licenses:[{type:"MIT"}],devDependencies:{grunt:"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},dependencies:{"poly-decomp":"0.1.0"}}},{}],7:[function(a,b,c){function d(a){this.lowerBound=e.create(),a&&a.lowerBound&&e.copy(this.lowerBound,a.lowerBound),this.upperBound=e.create(),a&&a.upperBound&&e.copy(this.upperBound,a.upperBound)}var e=a("../math/vec2");a("../utils/Utils");b.exports=d;var f=e.create();d.prototype.setFromPoints=function(a,b,c,d){var g=this.lowerBound,h=this.upperBound;"number"!=typeof c&&(c=0),0!==c?e.rotate(g,a[0],c):e.copy(g,a[0]),e.copy(h,g);for(var i=Math.cos(c),j=Math.sin(c),k=1;kh[o]&&(h[o]=l[o]),l[o]c&&(this.lowerBound[b]=c);var d=a.upperBound[b];this.upperBound[b]i?-1:h}},{"../math/vec2":30,"../utils/Utils":57}],8:[function(a,b,c){function d(a){this.type=a,this.result=[],this.world=null,this.boundingVolumeType=d.AABB}var e=a("../math/vec2"),f=a("../objects/Body");b.exports=d,d.AABB=1,d.BOUNDING_CIRCLE=2,d.prototype.setWorld=function(a){this.world=a},d.prototype.getCollisionPairs=function(a){};var g=e.create();d.boundingRadiusCheck=function(a,b){e.sub(g,a.position,b.position);var c=e.squaredLength(g),d=a.boundingRadius+b.boundingRadius;return c<=d*d},d.aabbCheck=function(a,b){return a.getAABB().overlaps(b.getAABB())},d.prototype.boundingVolumeCheck=function(a,b){var c;switch(this.boundingVolumeType){case d.BOUNDING_CIRCLE:c=d.boundingRadiusCheck(a,b);break;case d.AABB:c=d.aabbCheck(a,b);break;default:throw new Error("Bounding volume type not recognized: "+this.boundingVolumeType)}return c},d.canCollide=function(a,b){var c=f.KINEMATIC,d=f.STATIC;return(a.type!==d||b.type!==d)&&(!(a.type===c&&b.type===d||a.type===d&&b.type===c)&&((a.type!==c||b.type!==c)&&((a.sleepState!==f.SLEEPING||b.sleepState!==f.SLEEPING)&&!(a.sleepState===f.SLEEPING&&b.type===d||b.sleepState===f.SLEEPING&&a.type===d))))},d.NAIVE=1,d.SAP=2},{"../math/vec2":30,"../objects/Body":31}],9:[function(a,b,c){function d(){e.call(this,e.NAIVE)}var e=(a("../shapes/Circle"),a("../shapes/Plane"),a("../shapes/Shape"),a("../shapes/Particle"),a("../collision/Broadphase"));a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.getCollisionPairs=function(a){var b=a.bodies,c=this.result;c.length=0;for(var d=0,f=b.length;d!==f;d++)for(var g=b[d],h=0;hW&&V0)for(var N=0;NMath.pow(p,2))return 0;if(l)return!0;var q=this.createContactEquation(a,e,b,f);return h(q.normalA,j,c),g.normalize(q.normalA,q.normalA),g.scale(q.contactPointA,q.normalA,m),g.scale(q.contactPointB,q.normalA,-n),i(q.contactPointA,q.contactPointA,c),h(q.contactPointA,q.contactPointA,a.position),i(q.contactPointB,q.contactPointB,j),h(q.contactPointB,q.contactPointB,e.position),this.contactEquations.push(q),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(q)),1},d.prototype[q.PLANE|q.CONVEX]=d.prototype[q.PLANE|q.BOX]=d.prototype.planeConvex=function(a,b,c,d,e,f,k,l,m){var n=t,o=u,p=v,q=0;g.rotate(o,s,d);for(var r=0;r!==f.vertices.length;r++){var w=f.vertices[r];if(g.rotate(n,w,l),i(n,n,k),h(p,n,c),j(p,o)<=0){if(m)return!0;q++;var x=this.createContactEquation(a,e,b,f);h(p,n,c),g.copy(x.normalA,o);var y=j(p,x.normalA);g.scale(p,x.normalA,y),h(x.contactPointB,n,e.position),h(x.contactPointA,n,p),h(x.contactPointA,x.contactPointA,a.position),this.contactEquations.push(x),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&q&&this.frictionEquations.push(this.createFrictionFromAverage(q)),q},d.prototype[q.PARTICLE|q.PLANE]=d.prototype.particlePlane=function(a,b,c,d,e,f,i,k,l){var m=t,n=u;k=k||0,h(m,c,i),g.rotate(n,s,k);var o=j(m,n);if(o>0)return 0;if(l)return!0;var p=this.createContactEquation(e,a,f,b);return g.copy(p.normalA,n),g.scale(m,p.normalA,o),h(p.contactPointA,c,m),h(p.contactPointA,p.contactPointA,e.position),h(p.contactPointB,c,a.position),this.contactEquations.push(p),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(p)),1},d.prototype[q.CIRCLE|q.PARTICLE]=d.prototype.circleParticle=function(a,b,c,d,e,f,j,k,l){var m=t;if(h(m,j,c),g.squaredLength(m)>Math.pow(b.radius,2))return 0;if(l)return!0;var n=this.createContactEquation(a,e,b,f);return g.copy(n.normalA,m),g.normalize(n.normalA,n.normalA),g.scale(n.contactPointA,n.normalA,b.radius),i(n.contactPointA,n.contactPointA,c),h(n.contactPointA,n.contactPointA,a.position),h(n.contactPointB,j,e.position),this.contactEquations.push(n),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(n)),1};var X=new o({radius:1}),Y=g.create(),Z=g.create();g.create();d.prototype[q.PLANE|q.CAPSULE]=d.prototype.planeCapsule=function(a,b,c,d,e,f,h,j,k){var l=Y,m=Z,n=X;g.set(l,-f.length/2,0),g.rotate(l,l,j),i(l,l,h),g.set(m,f.length/2,0),g.rotate(m,m,j),i(m,m,h),n.radius=f.radius;var o;this.enableFrictionReduction&&(o=this.enableFriction,this.enableFriction=!1);var p=this.circlePlane(e,n,l,0,a,b,c,d,k),q=this.circlePlane(e,n,m,0,a,b,c,d,k);if(this.enableFrictionReduction&&(this.enableFriction=o),k)return p||q;var r=p+q;return this.enableFrictionReduction&&r&&this.frictionEquations.push(this.createFrictionFromAverage(r)),r},d.prototype[q.CIRCLE|q.PLANE]=d.prototype.circlePlane=function(a,b,c,d,e,f,k,l,m){var n=a,o=b,p=c,q=e,r=k,w=l;w=w||0;var x=t,y=u,z=v;h(x,p,r),g.rotate(y,s,w);var A=j(y,x);if(A>o.radius)return 0;if(m)return!0;var B=this.createContactEquation(q,n,f,b);return g.copy(B.normalA,y),g.scale(B.contactPointB,B.normalA,-o.radius),i(B.contactPointB,B.contactPointB,p),h(B.contactPointB,B.contactPointB,n.position),g.scale(z,B.normalA,A),h(B.contactPointA,x,z),i(B.contactPointA,B.contactPointA,r),h(B.contactPointA,B.contactPointA,q.position),this.contactEquations.push(B),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(B)),1},d.prototype[q.CONVEX]=d.prototype[q.CONVEX|q.BOX]=d.prototype[q.BOX]=d.prototype.convexConvex=function(a,b,c,e,f,k,l,m,n,o){var p=t,q=u,r=v,s=w,y=x,C=z,D=A,E=B,F=0,o="number"==typeof o?o:0;if(!d.findSeparatingAxis(b,c,e,k,l,m,p))return 0;h(D,l,c),j(p,D)>0&&g.scale(p,p,-1);var G=d.getClosestEdge(b,e,p,!0),H=d.getClosestEdge(k,m,p);if(-1===G||-1===H)return 0;for(var I=0;I<2;I++){var J=G,K=H,L=b,M=k,N=c,O=l,P=e,Q=m,R=a,S=f;if(0===I){var T;T=J,J=K,K=T,T=L,L=M,M=T,T=N,N=O,O=T,T=P,P=Q,Q=T,T=R,R=S,S=T}for(var U=K;U=3){if(n)return!0;var _=this.createContactEquation(R,S,L,M);F++;var Y=L.vertices[J%L.vertices.length],Z=L.vertices[(J+1)%L.vertices.length];g.rotate(r,Y,P),g.rotate(s,Z,P),i(r,r,N),i(s,s,N),h(y,s,r),g.rotate90cw(_.normalA,y),g.normalize(_.normalA,_.normalA),h(D,q,r);var $=j(_.normalA,D);g.scale(C,_.normalA,$),h(_.contactPointA,q,N),h(_.contactPointA,_.contactPointA,C),i(_.contactPointA,_.contactPointA,N),h(_.contactPointA,_.contactPointA,R.position),h(_.contactPointB,q,O),i(_.contactPointB,_.contactPointB,O),h(_.contactPointB,_.contactPointB,S.position),this.contactEquations.push(_),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(_))}}}return this.enableFrictionReduction&&this.enableFriction&&F&&this.frictionEquations.push(this.createFrictionFromAverage(F)),F};var $=g.fromValues(0,0);d.projectConvexOntoAxis=function(a,b,c,d,e){var f,h,i=null,k=null,l=$;g.rotate(l,d,-c);for(var m=0;mi)&&(i=h),(null===k||hi){var n=k;k=i,i=n}var o=j(b,d);g.set(e,k+o,i+o)};var _=g.fromValues(0,0),aa=g.fromValues(0,0),ba=g.fromValues(0,0),ca=g.fromValues(0,0),da=g.fromValues(0,0),ea=g.fromValues(0,0);d.findSeparatingAxis=function(a,b,c,e,f,i,j){var k=null,l=!1,m=!1,n=_,o=aa,p=ba,q=ca,s=da,t=ea;if(a instanceof r&&e instanceof r)for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;2!==x;x++){0===x?g.set(q,0,1):1===x&&g.set(q,1,0),0!==w&&g.rotate(q,q,w),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}else for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;x!==v.vertices.length;x++){g.rotate(o,v.vertices[x],w),g.rotate(p,v.vertices[(x+1)%v.vertices.length],w),h(n,p,o),g.rotate90cw(q,n),g.normalize(q,q),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}return m};var fa=g.fromValues(0,0),ga=g.fromValues(0,0),ha=g.fromValues(0,0);d.getClosestEdge=function(a,b,c,d){var e=fa,f=ga,i=ha;g.rotate(e,c,-b),d&&g.scale(e,e,-1);for(var k=-1,l=a.vertices.length,m=-1,n=0;n!==l;n++){h(f,a.vertices[(n+1)%l],a.vertices[n%l]),g.rotate90cw(i,f),g.normalize(i,i);var o=j(i,e);(-1===k||o>m)&&(k=n%l,m=o)}return k};var ia=g.create(),ja=g.create(),ka=g.create(),la=g.create(),ma=g.create(),na=g.create(),oa=g.create();d.prototype[q.CIRCLE|q.HEIGHTFIELD]=d.prototype.circleHeightfield=function(a,b,c,d,e,f,j,k,l,m){var n=f.heights,m=m||b.radius,o=f.elementWidth,p=ja,q=ia,r=ma,s=oa,t=na,u=ka,v=la,w=Math.floor((c[0]-m-j[0])/o),x=Math.ceil((c[0]+m-j[0])/o);w<0&&(w=0),x>=n.length&&(x=n.length-1);for(var y=n[w],z=n[x],A=w;Ay&&(y=n[A]);if(c[1]-m>y)return!l&&0;for(var B=!1,A=w;A=u[0]&&q[0]0)for(var A=w;A<=x;A++)if(g.set(u,A*o,n[A]),g.add(u,u,j),g.sub(p,c,u),g.squaredLength(p)=k.length&&(r=k.length-1);for(var s=k[q],t=k[r],u=q;us&&(s=k[u]);if(a.aabb.lowerBound[1]>s)return!j&&0;for(var v=0,u=q;u=0||f.containsPoint(this.from))&&this.intersectBody(a,e)}};var g=f.create();d.prototype.intersectBody=function(a,b){var c=this.checkCollisionResponse;if(!c||b.collisionResponse)for(var d=g,e=0,h=b.shapes.length;eb.boundingRadius*b.boundingRadius||(this._currentBody=f,this._currentShape=b,b.raycast(a,this,d,c),this._currentBody=this._currentShape=null)},d.prototype.getAABB=function(a){var b=this.to,c=this.from;f.set(a.lowerBound,Math.min(b[0],c[0]),Math.min(b[1],c[1])),f.set(a.upperBound,Math.max(b[0],c[0]),Math.max(b[1],c[1]))};f.create();d.prototype.reportIntersection=function(a,b,c,e){var g=(this.from,this.to,this._currentShape),h=this._currentBody;if(!(this.skipBackfaces&&f.dot(c,this.direction)>0))switch(this.mode){case d.ALL:a.set(c,g,h,b,e),this.callback(a);break;case d.CLOSEST:(b=0&&!(a[f].aabb.lowerBound[b]<=e.aabb.lowerBound[b]);f--)a[f+1]=a[f];a[f+1]=e}return a},d.prototype.sortList=function(){var a=this.axisList,b=this.axisIndex;d.sortAxisList(a,b)},d.prototype.getCollisionPairs=function(a){var b=this.axisList,c=this.result,d=this.axisIndex;c.length=0;for(var e=b.length;e--;){var g=b[e];g.aabbNeedsUpdate&&g.updateAABB()}this.sortList();for(var h=0,i=0|b.length;h!==i;h++)for(var j=b[h],k=h+1;kthis.upperLimit&&(f.maxForce=0,f.minForce=-this.maxForce,this.distance=this.upperLimit,l=!0),this.lowerLimitEnabled&&this.positionc)h.scale(e.normalA,j,-1),h.sub(e.contactPointA,k,g.position),h.sub(e.contactPointB,l,i.position),h.scale(o,j,c),h.add(e.contactPointA,e.contactPointA,o),-1===a.indexOf(e)&&a.push(e);else{var u=a.indexOf(e);-1!==u&&a.splice(u,1)}if(this.lowerLimitEnabled&&sh)o.angle=h,-1===e.indexOf(o)&&e.push(o);else{var r=e.indexOf(o);-1!==r&&e.splice(r,1)}if(this.lowerLimitEnabled&&q>1;if(b<3)return[];for(var c=[],e=[],f=0;f3;){var h=e[(f+0)%g],i=e[(f+1)%g],j=e[(f+2)%g],k=a[2*h],l=a[2*h+1],m=a[2*i],n=a[2*i+1],o=a[2*j],p=a[2*j+1],q=!1;if(d._convex(k,l,m,n,o,p)){q=!0;for(var r=0;r3*g)break}return c.push(e[0],e[1],e[2]),c},d._PointInTriangle=function(a,b,c,d,e,f,g,h){var i=g-c,j=h-d,k=e-c,l=f-d,m=a-c,n=b-d,o=i*i+j*j,p=i*k+j*l,q=i*m+j*n,r=k*k+l*l,s=k*m+l*n,t=1/(o*r-p*p),u=(r*q-p*s)*t,v=(o*s-p*q)*t;return u>=0&&v>=0&&u+v<1},d._convex=function(a,b,c,d,e,f){return(b-d)*(e-c)+(c-a)*(f-d)>=0},b.exports=d},{}],30:[function(a,b,c){var d=b.exports={},e=a("../utils/Utils");d.crossLength=function(a,b){return a[0]*b[1]-a[1]*b[0]},d.crossVZ=function(a,b,c){return d.rotate(a,b,-Math.PI/2),d.scale(a,a,c),a},d.crossZV=function(a,b,c){return d.rotate(a,c,Math.PI/2),d.scale(a,a,b),a},d.rotate=function(a,b,c){if(0!==c){var d=Math.cos(c),e=Math.sin(c),f=b[0],g=b[1];a[0]=d*f-e*g,a[1]=e*f+d*g}else a[0]=b[0],a[1]=b[1]},d.rotate90cw=function(a,b){var c=b[0],d=b[1];a[0]=d,a[1]=-c},d.toLocalFrame=function(a,b,c,e){d.copy(a,b),d.sub(a,a,c),d.rotate(a,a,-e)},d.toGlobalFrame=function(a,b,c,e){d.copy(a,b),d.rotate(a,a,e),d.add(a,a,c)},d.vectorToLocalFrame=function(a,b,c){d.rotate(a,b,-c)},d.vectorToGlobalFrame=function(a,b,c){d.rotate(a,b,c)},d.centroid=function(a,b,c,e){return d.add(a,b,c),d.add(a,a,e),d.scale(a,a,1/3),a},d.create=function(){var a=new e.ARRAY_TYPE(2);return a[0]=0,a[1]=0,a},d.clone=function(a){var b=new e.ARRAY_TYPE(2);return b[0]=a[0],b[1]=a[1],b},d.fromValues=function(a,b){var c=new e.ARRAY_TYPE(2);return c[0]=a,c[1]=b,c},d.copy=function(a,b){return a[0]=b[0],a[1]=b[1],a},d.set=function(a,b,c){return a[0]=b,a[1]=c,a},d.add=function(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a},d.subtract=function(a,b,c){return a[0]=b[0]-c[0],a[1]=b[1]-c[1],a},d.sub=d.subtract,d.multiply=function(a,b,c){return a[0]=b[0]*c[0],a[1]=b[1]*c[1],a},d.mul=d.multiply,d.divide=function(a,b,c){return a[0]=b[0]/c[0],a[1]=b[1]/c[1],a},d.div=d.divide,d.scale=function(a,b,c){return a[0]=b[0]*c,a[1]=b[1]*c,a},d.distance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return Math.sqrt(c*c+d*d)},d.dist=d.distance,d.squaredDistance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return c*c+d*d},d.sqrDist=d.squaredDistance,d.length=function(a){var b=a[0],c=a[1];return Math.sqrt(b*b+c*c)},d.len=d.length,d.squaredLength=function(a){var b=a[0],c=a[1];return b*b+c*c},d.sqrLen=d.squaredLength,d.negate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a},d.normalize=function(a,b){var c=b[0],d=b[1],e=c*c+d*d;return e>0&&(e=1/Math.sqrt(e),a[0]=b[0]*e,a[1]=b[1]*e),a},d.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]},d.str=function(a){return"vec2("+a[0]+", "+a[1]+")"},d.lerp=function(a,b,c,d){var e=b[0],f=b[1];return a[0]=e+d*(c[0]-e),a[1]=f+d*(c[1]-f),a},d.reflect=function(a,b,c){var d=b[0]*c[0]+b[1]*c[1];a[0]=b[0]-2*c[0]*d,a[1]=b[1]-2*c[1]*d},d.getLineSegmentsIntersection=function(a,b,c,e,f){var g=d.getLineSegmentsIntersectionFraction(b,c,e,f);return!(g<0)&&(a[0]=b[0]+g*(c[0]-b[0]),a[1]=b[1]+g*(c[1]-b[1]),!0)},d.getLineSegmentsIntersectionFraction=function(a,b,c,d){var e,f,g=b[0]-a[0],h=b[1]-a[1],i=d[0]-c[0],j=d[1]-c[1];return e=(-h*(a[0]-c[0])+g*(a[1]-c[1]))/(-i*h+g*j),f=(i*(a[1]-c[1])-j*(a[0]-c[0]))/(-i*h+g*j),e>=0&&e<=1&&f>=0&&f<=1?f:-1}},{"../utils/Utils":57}],31:[function(a,b,c){function d(a){a=a||{},k.call(this),this.id=a.id||++d._idCounter,this.world=null,this.shapes=[],this.mass=a.mass||0,this.invMass=0,this.inertia=0,this.invInertia=0,this.invMassSolve=0,this.invInertiaSolve=0,this.fixedRotation=!!a.fixedRotation,this.fixedX=!!a.fixedX,this.fixedY=!!a.fixedY,this.massMultiplier=e.create(),this.position=e.fromValues(0,0),a.position&&e.copy(this.position,a.position),this.interpolatedPosition=e.fromValues(0,0),this.interpolatedAngle=0,this.previousPosition=e.fromValues(0,0),this.previousAngle=0,this.velocity=e.fromValues(0,0),a.velocity&&e.copy(this.velocity,a.velocity),this.vlambda=e.fromValues(0,0),this.wlambda=0,this.angle=a.angle||0,this.angularVelocity=a.angularVelocity||0,this.force=e.create(),a.force&&e.copy(this.force,a.force),this.angularForce=a.angularForce||0,this.damping="number"==typeof a.damping?a.damping:.1,this.angularDamping="number"==typeof a.angularDamping?a.angularDamping:.1,this.type=d.STATIC,void 0!==a.type?this.type=a.type:a.mass?this.type=d.DYNAMIC:this.type=d.STATIC,this.boundingRadius=0,this.aabb=new j,this.aabbNeedsUpdate=!0,this.allowSleep=void 0===a.allowSleep||a.allowSleep,this.wantsToSleep=!1,this.sleepState=d.AWAKE,this.sleepSpeedLimit=void 0!==a.sleepSpeedLimit?a.sleepSpeedLimit:.2,this.sleepTimeLimit=void 0!==a.sleepTimeLimit?a.sleepTimeLimit:1,this.gravityScale=void 0!==a.gravityScale?a.gravityScale:1,this.collisionResponse=void 0===a.collisionResponse||a.collisionResponse,this.idleTime=0,this.timeLastSleepy=0, +this.ccdSpeedThreshold=void 0!==a.ccdSpeedThreshold?a.ccdSpeedThreshold:-1,this.ccdIterations=void 0!==a.ccdIterations?a.ccdIterations:10,this.concavePath=null,this._wakeUpAfterNarrowphase=!1,this.updateMassProperties()}var e=a("../math/vec2"),f=a("poly-decomp"),g=a("../shapes/Convex"),h=a("../collision/RaycastResult"),i=a("../collision/Ray"),j=a("../collision/AABB"),k=a("../events/EventEmitter");b.exports=d,d.prototype=new k,d.prototype.constructor=d,d._idCounter=0,d.prototype.updateSolveMassProperties=function(){this.sleepState===d.SLEEPING||this.type===d.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve=0):(this.invMassSolve=this.invMass,this.invInertiaSolve=this.invInertia)},d.prototype.setDensity=function(a){var b=this.getArea();this.mass=b*a,this.updateMassProperties()},d.prototype.getArea=function(){for(var a=0,b=0;bc&&(c=g+h)}this.boundingRadius=c},d.prototype.addShape=function(a,b,c){if(a.body)throw new Error("A shape can only be added to one body.");a.body=this,b?e.copy(a.position,b):e.set(a.position,0,0),a.angle=c||0,this.shapes.push(a),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},d.prototype.removeShape=function(a){var b=this.shapes.indexOf(a);return-1!==b&&(this.shapes.splice(b,1),this.aabbNeedsUpdate=!0,a.body=null,!0)},d.prototype.updateMassProperties=function(){if(this.type===d.STATIC||this.type===d.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var a=this.shapes,b=a.length,c=this.mass/b,f=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var g=0;g0?1/f:0}this.invMass=1/this.mass,e.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}};e.create();d.prototype.applyForce=function(a,b){if(e.add(this.force,this.force,a),b){var c=e.crossLength(b,a);this.angularForce+=c}};var n=e.create(),o=e.create(),p=e.create();d.prototype.applyForceLocal=function(a,b){b=b||p;var c=n,d=o;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyForce(c,d)};var q=e.create();d.prototype.applyImpulse=function(a,b){if(this.type===d.DYNAMIC){var c=q;if(e.scale(c,a,this.invMass),e.multiply(c,this.massMultiplier,c),e.add(this.velocity,c,this.velocity),b){var f=e.crossLength(b,a);f*=this.invInertia,this.angularVelocity+=f}}};var r=e.create(),s=e.create(),t=e.create();d.prototype.applyImpulseLocal=function(a,b){b=b||t;var c=r,d=s;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyImpulse(c,d)},d.prototype.toLocalFrame=function(a,b){e.toLocalFrame(a,b,this.position,this.angle)},d.prototype.toWorldFrame=function(a,b){e.toGlobalFrame(a,b,this.position,this.angle)},d.prototype.vectorToLocalFrame=function(a,b){e.vectorToLocalFrame(a,b,this.angle)},d.prototype.vectorToWorldFrame=function(a,b){e.vectorToGlobalFrame(a,b,this.angle)},d.prototype.fromPolygon=function(a,b){b=b||{};for(var c=this.shapes.length;c>=0;--c)this.removeShape(this.shapes[c]);var d=new f.Polygon;if(d.vertices=a,d.makeCCW(),"number"==typeof b.removeCollinearPoints&&d.removeCollinearPoints(b.removeCollinearPoints),void 0===b.skipSimpleCheck&&!d.isSimple())return!1;this.concavePath=d.vertices.slice(0);for(var c=0;c=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=d.AWAKE):(this.idleTime+=c,this.sleepState=d.SLEEPY),this.idleTime>this.sleepTimeLimit&&(b?this.wantsToSleep=!0:this.sleep())}},d.prototype.overlaps=function(a){return this.world.overlapKeeper.bodiesAreOverlapping(this,a)};var x=e.create(),y=e.create();d.prototype.integrate=function(a){var b=this.invMass,c=this.force,d=this.position,f=this.velocity;e.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*a),e.scale(x,c,a*b),e.multiply(x,this.massMultiplier,x),e.add(f,x,f),this.integrateToTimeOfImpact(a)||(e.scale(y,f,a),e.add(d,d,y),this.fixedRotation||(this.angle+=this.angularVelocity*a)),this.aabbNeedsUpdate=!0};var z=new h,A=new i({mode:i.ALL}),B=e.create(),C=e.create(),D=e.create(),E=e.create();d.prototype.integrateToTimeOfImpact=function(a){if(this.ccdSpeedThreshold<0||e.squaredLength(this.velocity)=j&&i=0&&(f.rotate(n,l,d),f.scale(n,n,2*r-1),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}for(var u=Math.pow(this.radius,2)+Math.pow(q,2),r=0;r<2;r++){f.set(o,q*(2*r-1),0),f.toGlobalFrame(o,o,c,d);var v=Math.pow(g[0]-e[0],2)+Math.pow(g[1]-e[1],2),w=2*((g[0]-e[0])*(e[0]-o[0])+(g[1]-e[1])*(e[1]-o[1])),x=Math.pow(e[0]-o[0],2)+Math.pow(e[1]-o[1],2)-Math.pow(this.radius,2),t=Math.pow(w,2)-4*v*x;if(!(t<0))if(0===t){if(f.lerp(m,e,g,t),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}else{var y=Math.sqrt(t),z=1/(2*v),A=(-w-y)*z,B=(-w+y)*z;if(A>=0&&A<=1&&(f.lerp(m,e,g,A),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,A,n,-1),a.shouldStop(b))))return;if(B>=0&&B<=1&&(f.lerp(m,e,g,B),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,B,n,-1),a.shouldStop(b))))return}}}},{"../math/vec2":30,"./Shape":45}],39:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),a=a||{},this.radius=a.radius||1,a.type=e.CIRCLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){var b=this.radius;return a*b*b/2},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},d.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},d.prototype.computeAABB=function(a,b,c){var d=this.radius;f.set(a.upperBound,d,d),f.set(a.lowerBound,-d,-d),b&&(f.add(a.lowerBound,a.lowerBound,b),f.add(a.upperBound,a.upperBound,b))};var g=f.create(),h=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,i=b.to,j=this.radius,k=Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2),l=2*((i[0]-e[0])*(e[0]-c[0])+(i[1]-e[1])*(e[1]-c[1])),m=Math.pow(e[0]-c[0],2)+Math.pow(e[1]-c[1],2)-Math.pow(j,2),n=Math.pow(l,2)-4*k*m,o=g,p=h;if(!(n<0))if(0===n)f.lerp(o,e,i,n),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,n,p,-1);else{var q=Math.sqrt(n),r=1/(2*k),s=(-l-q)*r,t=(-l+q)*r;if(s>=0&&s<=1&&(f.lerp(o,e,i,s),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,s,p,-1),a.shouldStop(b)))return;t>=0&&t<=1&&(f.lerp(o,e,i,t),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,t,p,-1))}}},{"../math/vec2":30,"./Shape":45}],40:[function(a,b,c){function d(a){Array.isArray(arguments[0])&&(a={vertices:arguments[0],axes:arguments[1]},console.warn("The Convex constructor signature has changed. Please use the following format: new Convex({ vertices: [...], ... })")),a=a||{},this.vertices=[];for(var b=void 0!==a.vertices?a.vertices:[],c=0;ce)&&(e=d),(null===g||de){var j=g;g=e,e=j}f.set(b,g,e)},d.prototype.projectOntoWorldAxis=function(a,b,c,d){var e=i;this.projectOntoLocalAxis(a,d),0!==c?f.rotate(e,a,c):e=a;var g=f.dot(b,e);f.set(d,d[0]+g,d[1]+g)},d.prototype.updateTriangles=function(){this.triangles.length=0;for(var a=[],b=0;bb&&(b=d)}this.boundingRadius=Math.sqrt(b)},d.triangleArea=function(a,b,c){return.5*((b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1]))},d.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var a=this.triangles,b=this.vertices,c=0;c!==a.length;c++){var e=a[c],f=b[e[0]],g=b[e[1]],h=b[e[2]],i=d.triangleArea(f,g,h);this.area+=i}},d.prototype.computeAABB=function(a,b,c){a.setFromPoints(this.vertices,b,c,0)};var o=f.create(),p=f.create(),q=f.create();d.prototype.raycast=function(a,b,c,d){var e=o,g=p,h=q,i=this.vertices;f.toLocalFrame(e,b.from,c,d),f.toLocalFrame(g,b.to,c,d);for(var j=i.length,k=0;k=0&&(f.sub(h,m,l),f.rotate(h,h,-Math.PI/2+d),f.normalize(h,h),b.reportIntersection(a,n,h,k))}}},{"../math/polyk":29,"../math/vec2":30,"./Shape":45,"poly-decomp":5}],41:[function(a,b,c){function d(a){if(Array.isArray(arguments[0])){if(a={heights:arguments[0]},"object"==typeof arguments[1])for(var b in arguments[1])a[b]=arguments[1][b];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}a=a||{},this.heights=a.heights?a.heights.slice(0):[],this.maxValue=a.maxValue||null,this.minValue=a.minValue||null,this.elementWidth=a.elementWidth||.1,void 0!==a.maxValue&&void 0!==a.minValue||this.updateMaxMinValues(),a.type=e.HEIGHTFIELD,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.updateMaxMinValues=function(){for(var a=this.heights,b=a[0],c=a[0],d=0;d!==a.length;d++){var e=a[d];e>b&&(b=e),es){var t=r;r=s,s=t}for(var u=0;u=0&&(f.sub(m,o,n),f.rotate(m,m,d+Math.PI/2),f.normalize(m,m),b.reportIntersection(a,v,m,-1),a.shouldStop(b)))return}}},{"../math/vec2":30,"../utils/Utils":57,"./Shape":45}],42:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),a=a||{},this.length=a.length||1,a.type=e.LINE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return a*Math.pow(this.length,2)/12},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var g=[f.create(),f.create()];d.prototype.computeAABB=function(a,b,c){var d=this.length/2;f.set(g[0],-d,0),f.set(g[1],d,0),a.setFromPoints(g,b,c,0)};var h=(f.create(),f.create()),i=f.create(),j=f.create(),k=f.fromValues(0,1);d.prototype.raycast=function(a,b,c,d){var e=b.from,g=b.to,l=i,m=j,n=this.length/2;f.set(l,-n,0),f.set(m,n,0),f.toGlobalFrame(l,l,c,d),f.toGlobalFrame(m,m,c,d);var o=f.getLineSegmentsIntersectionFraction(l,m,e,g);if(o>=0){var p=h;f.rotate(p,k,d),b.reportIntersection(a,o,p,-1)}}},{"../math/vec2":30,"./Shape":45}],43:[function(a,b,c){function d(a){a=a||{},a.type=e.PARTICLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=0},d.prototype.computeAABB=function(a,b,c){f.copy(a.lowerBound,b),f.copy(a.upperBound,b)}},{"../math/vec2":30,"./Shape":45}],44:[function(a,b,c){function d(a){a=a||{},a.type=e.PLANE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=Number.MAX_VALUE},d.prototype.computeAABB=function(a,b,c){var d=c%(2*Math.PI),e=f.set,g=Number.MAX_VALUE,h=a.lowerBound,i=a.upperBound;0===d?(e(h,-g,-g),e(i,g,0)):d===Math.PI/2?(e(h,0,-g),e(i,g,g)):d===Math.PI?(e(h,-g,0),e(i,g,g)):d===3*Math.PI/2?(e(h,-g,-g),e(i,0,g)):(e(h,-g,-g),e(i,g,g)),f.add(h,h,b),f.add(i,i,b)},d.prototype.updateArea=function(){this.area=Number.MAX_VALUE};var g=f.create(),h=(f.create(),f.create(),f.create()),i=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,j=b.to,k=b.direction,l=g,m=h,n=i;f.set(m,0,1),f.rotate(m,m,d),f.sub(n,e,c);var o=f.dot(n,m);if(f.sub(n,j,c),!(o*f.dot(n,m)>0||f.squaredDistance(e,j)n*h&&(p=n*h-l),f[a]+=p,b.addToWlambda(p),p}},{"../equations/FrictionEquation":23,"../math/vec2":30,"../utils/Utils":57,"./Solver":47}],47:[function(a,b,c){function d(a,b){a=a||{},e.call(this),this.type=b,this.equations=[],this.equationSortFunction=a.equationSortFunction||!1}var e=(a("../utils/Utils"),a("../events/EventEmitter"));b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.solve=function(a,b){throw new Error("Solver.solve should be implemented by subclasses!")};var f={bodies:[]};d.prototype.solveIsland=function(a,b){this.removeAllEquations(),b.equations.length&&(this.addEquations(b.equations),f.bodies.length=0,b.getBodies(f.bodies),f.bodies.length&&this.solve(a,f))},d.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},d.prototype.addEquation=function(a){a.enabled&&this.equations.push(a)},d.prototype.addEquations=function(a){for(var b=0,c=a.length;b!==c;b++){var d=a[b];d.enabled&&this.equations.push(d)}},d.prototype.removeEquation=function(a){var b=this.equations.indexOf(a);-1!==b&&this.equations.splice(b,1)},d.prototype.removeAllEquations=function(){this.equations.length=0},d.GS=1,d.ISLAND=2},{"../events/EventEmitter":26,"../utils/Utils":57}],48:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/ContactEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/ContactEquation":21,"./Pool":55}],49:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/FrictionEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/FrictionEquation":23,"./Pool":55}],50:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/IslandNode"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/IslandNode":60,"./Pool":55}],51:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/Island"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/Island":58,"./Pool":55}],52:[function(a,b,c){function d(){this.overlappingShapesLastState=new e,this.overlappingShapesCurrentState=new e,this.recordPool=new f({size:16}),this.tmpDict=new e,this.tmpArray1=[]}var e=a("./TupleDictionary"),f=(a("./OverlapKeeperRecord"),a("./OverlapKeeperRecordPool"));a("./Utils");b.exports=d,d.prototype.tick=function(){for(var a=this.overlappingShapesLastState,b=this.overlappingShapesCurrentState,c=a.keys.length;c--;){var d=a.keys[c],e=a.getByKey(d);b.getByKey(d);e&&this.recordPool.release(e)}a.reset(),a.copy(b),b.reset()},d.prototype.setOverlapping=function(a,b,c,d){var e=(this.overlappingShapesLastState,this.overlappingShapesCurrentState);if(!e.get(b.id,d.id)){var f=this.recordPool.get();f.set(a,b,c,d),e.set(b.id,d.id,f)}},d.prototype.getNewOverlaps=function(a){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,a)},d.prototype.getEndOverlaps=function(a){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,a)},d.prototype.bodiesAreOverlapping=function(a,b){for(var c=this.overlappingShapesCurrentState,d=c.keys.length;d--;){var e=c.keys[d],f=c.data[e];if(f.bodyA===a&&f.bodyB===b||f.bodyA===b&&f.bodyB===a)return!0}return!1},d.prototype.getDiff=function(a,b,c){var c=c||[],d=a,e=b;c.length=0;for(var f=e.keys.length;f--;){var g=e.keys[f],h=e.data[g];if(!h)throw new Error("Key "+g+" had no data!");d.data[g]||c.push(h)}return c},d.prototype.isNewOverlap=function(a,b){var c=0|a.id,d=0|b.id,e=this.overlappingShapesLastState,f=this.overlappingShapesCurrentState;return!e.get(c,d)&&!!f.get(c,d)},d.prototype.getNewBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getEndBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getBodyDiff=function(a,b){b=b||[];for(var c=this.tmpDict,d=a.length;d--;){var e=a[d];c.set(0|e.bodyA.id,0|e.bodyB.id,e)}for(d=c.keys.length;d--;){var e=c.getByKey(c.keys[d]);e&&b.push(e.bodyA,e.bodyB)}return c.reset(),b}},{"./OverlapKeeperRecord":53,"./OverlapKeeperRecordPool":54,"./TupleDictionary":56,"./Utils":57}],53:[function(a,b,c){function d(a,b,c,d){this.shapeA=b,this.shapeB=d,this.bodyA=a,this.bodyB=c}b.exports=d,d.prototype.set=function(a,b,c,e){d.call(this,a,b,c,e)}},{}],54:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("./OverlapKeeperRecord"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=a.shapeA=a.shapeB=null,this}},{"./OverlapKeeperRecord":53,"./Pool":55}],55:[function(a,b,c){function d(a){a=a||{},this.objects=[],void 0!==a.size&&this.resize(a.size)}b.exports=d,d.prototype.resize=function(a){for(var b=this.objects;b.length>a;)b.pop();for(;b.length(0|b)?a<<16|65535&b:b<<16|65535&a)},d.prototype.getByKey=function(a){return a|=0,this.data[a]},d.prototype.get=function(a,b){return this.data[this.getKey(a,b)]},d.prototype.set=function(a,b,c){if(!c)throw new Error("No data!");var d=this.getKey(a,b);return this.data[d]||this.keys.push(d),this.data[d]=c,d},d.prototype.reset=function(){for(var a=this.data,b=this.keys,c=b.length;c--;)delete a[b[c]];b.length=0},d.prototype.copy=function(a){this.reset(),e.appendArray(this.keys,a.keys);for(var b=a.keys.length;b--;){var c=a.keys[b];this.data[c]=a.data[c]}}},{"./Utils":57}],57:[function(a,b,c){function d(){}b.exports=d,d.appendArray=function(a,b){if(b.length<15e4)a.push.apply(a,b);else for(var c=0,d=b.length;c!==d;++c)a.push(b[c])},d.splice=function(a,b,c){c=c||1;for(var d=b,e=a.length-c;d=a&&d=0;r-=2)for(var A=x.length-2;A>=0;A-=2)(z[r]===x[A]&&z[r+1]===x[A+1]||z[r+1]===x[A]&&z[r]===x[A+1])&&x.splice(A,2);var B=l.length;for(r=0;r!==B;r++){var C=l[r];if(!C.collideConnected)for(var A=x.length-2;A>=0;A-=2)(C.bodyA===x[A]&&C.bodyB===x[A+1]||C.bodyB===x[A]&&C.bodyA===x[A+1])&&x.splice(A,2)}this.postBroadphaseEvent.pairs=x,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,k.reset(this);for(var r=0,D=x.length;r!==D;r+=2)for(var E=x[r],F=x[r+1],G=0,H=E.shapes.length;G!==H;G++)for(var I=E.shapes[G],J=I.position,K=I.angle,L=0,M=F.shapes.length;L!==M;L++){var N=F.shapes[L],O=N.position,P=N.angle,Q=this.defaultContactMaterial;if(I.material&&N.material){var R=this.getContactMaterial(I.material,N.material);R&&(Q=R)}this.runNarrowphase(k,E,I,J,K,F,N,O,P,Q,this.frictionGravity)}for(var r=0;r!==i;r++){var S=e[r];S._wakeUpAfterNarrowphase&&(S.wakeUp(),S._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(y);for(var T=this.endContactEvent,L=y.length;L--;){var U=y[L];T.shapeA=U.shapeA,T.shapeB=U.shapeB,T.bodyA=U.bodyA,T.bodyB=U.bodyB,this.emit(T)}y.length=0}var V=this.preSolveEvent;V.contactEquations=k.contactEquations,V.frictionEquations=k.frictionEquations,this.emit(V),V.contactEquations=V.frictionEquations=null;var B=l.length;for(r=0;r!==B;r++)l[r].update();if(k.contactEquations.length||k.frictionEquations.length||B)if(this.islandSplit){for(p.equations.length=0,s.appendArray(p.equations,k.contactEquations),s.appendArray(p.equations,k.frictionEquations),r=0;r!==B;r++)s.appendArray(p.equations,l[r].equations);p.split(this);for(var r=0;r!==p.islands.length;r++){var W=p.islands[r];W.equations.length&&h.solveIsland(a,W)}}else{for(h.addEquations(k.contactEquations),h.addEquations(k.frictionEquations),r=0;r!==B;r++)h.addEquations(l[r].equations);this.solveConstraints&&h.solve(a,this),h.removeAllEquations()}for(var r=0;r!==i;r++){var S=e[r];S.integrate(a)}for(var r=0;r!==i;r++)e[r].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,r=0;r!==k.contactEquations.length;r++){var Y=k.contactEquations[r];Y.firstImpact&&(X.bodyA=Y.bodyA,X.bodyB=Y.bodyB,X.shapeA=Y.shapeA,X.shapeB=Y.shapeB,X.contactEquation=Y,this.emit(X))}if(this.sleepMode===d.BODY_SLEEPING)for(r=0;r!==i;r++)e[r].sleepTick(this.time,!1,a);else if(this.sleepMode===d.ISLAND_SLEEPING&&this.islandSplit){for(r=0;r!==i;r++)e[r].sleepTick(this.time,!0,a);for(var r=0;r0,a.frictionCoefficient=k.friction;var p;p=b.type===m.STATIC||b.type===m.KINEMATIC?g.mass:g.type===m.STATIC||g.type===m.KINEMATIC?b.mass:b.mass*g.mass/(b.mass+g.mass),a.slipForce=k.friction*l*p,a.restitution=k.restitution,a.surfaceVelocity=k.surfaceVelocity,a.frictionStiffness=k.frictionStiffness,a.frictionRelaxation=k.frictionRelaxation,a.stiffness=k.stiffness,a.relaxation=k.relaxation,a.contactSkinSize=k.contactSkinSize,a.enabledEquations=b.collisionResponse&&g.collisionResponse&&c.collisionResponse&&h.collisionResponse;var q=a[c.type|h.type],r=0;if(q){var s=c.sensor||h.sensor,t=a.frictionEquations.length;r=c.type=2*Math.pow(g.sleepSpeedLimit,2)&&(b._wakeUpAfterNarrowphase=!0)}if(g.allowSleep&&g.type===m.DYNAMIC&&g.sleepState===m.SLEEPING&&b.sleepState===m.AWAKE&&b.type!==m.STATIC){f.squaredLength(b.velocity)+Math.pow(b.angularVelocity,2)>=2*Math.pow(b.sleepSpeedLimit,2)&&(g._wakeUpAfterNarrowphase=!0)}if(this.overlapKeeper.setOverlapping(b,c,g,h),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(c,h)){var v=this.beginContactEvent;if(v.shapeA=c,v.shapeB=h,v.bodyA=b,v.bodyB=g,v.contactEquations.length=0,"number"==typeof r)for(var y=a.contactEquations.length-r;y1)for(var y=a.frictionEquations.length-u;y=0;b--)this.removeConstraint(a[b]);for(var c=this.bodies,b=c.length-1;b>=0;b--)this.removeBody(c[b]);for(var e=this.springs,b=e.length-1;b>=0;b--)this.removeSpring(e[b]);for(var f=this.contactMaterials,b=f.length-1;b>=0;b--)this.removeContactMaterial(f[b]);d.apply(this)};var z=f.create(),A=(f.fromValues(0,0),f.fromValues(0,0));d.prototype.hitTest=function(a,b,c){c=c||0;var d=new m({position:a}),e=new k,l=a,n=z,o=A;d.addShape(e);for(var p=this.narrowphase,q=[],r=0,s=b.length;r!==s;r++)for(var t=b[r],u=0,v=t.shapes.length;u!==v;u++){var w=t.shapes[u];f.rotate(n,w.position,t.angle),f.add(n,n,t.position);var x=w.angle+t.angle;(w instanceof g&&p.circleParticle(t,w,n,x,d,e,l,0,!0)||w instanceof h&&p.particleConvex(d,e,l,0,t,w,n,x,!0)||w instanceof i&&p.particlePlane(d,e,l,0,t,w,n,x,!0)||w instanceof j&&p.particleCapsule(d,e,l,0,t,w,n,x,!0)||w instanceof k&&f.squaredLength(f.sub(o,n,a))=0&&b<=this.children.length)return a.parent&&a.parent.removeChild(a),a.parent=this,this.children.splice(b,0,a),a;throw new Error(a+"addChildAt: The index "+b+" supplied is out of bounds "+this.children.length)},b.DisplayObjectContainer.prototype.swapChildren=function(a,b){if(a!==b){var c=this.getChildIndex(a),d=this.getChildIndex(b);if(c<0||d<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");this.children[c]=b,this.children[d]=a}},b.DisplayObjectContainer.prototype.getChildIndex=function(a){var b=this.children.indexOf(a);if(-1===b)throw new Error("The supplied DisplayObject must be a child of the caller");return b},b.DisplayObjectContainer.prototype.setChildIndex=function(a,b){if(b<0||b>=this.children.length)throw new Error("The supplied index is out of bounds");var c=this.getChildIndex(a);this.children.splice(c,1),this.children.splice(b,0,a)},b.DisplayObjectContainer.prototype.getChildAt=function(a){if(a<0||a>=this.children.length)throw new Error("getChildAt: Supplied index "+a+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[a]},b.DisplayObjectContainer.prototype.removeChild=function(a){var b=this.children.indexOf(a);if(-1!==b)return this.removeChildAt(b)},b.DisplayObjectContainer.prototype.removeChildAt=function(a){var b=this.getChildAt(a);return b&&(b.parent=void 0,this.children.splice(a,1)),b},b.DisplayObjectContainer.prototype.removeChildren=function(a,b){void 0===a&&(a=0),void 0===b&&(b=this.children.length);var c=b-a;if(c>0&&c<=b){for(var d=this.children.splice(a,c),e=0;eh?l:h,m=m>i?m:i)}var o=this._bounds;if(!n){o=new b.Rectangle;var p=o.x,q=o.width+o.x,r=o.y,s=o.height+o.y,t=this.worldTransform,u=t.a,v=t.b,w=t.c,x=t.d,y=t.tx,z=t.ty,A=u*q+w*s+y,B=x*s+v*q+z,C=u*p+w*s+y,D=x*s+v*p+z,E=u*p+w*r+y,F=x*r+v*p+z,G=u*q+w*r+y,H=x*r+v*q+z;l=A,m=B,j=A,k=B,j=Cl?C:l,l=E>l?E:l,l=G>l?G:l,m=D>m?D:m,m=F>m?F:m,m=H>m?H:m}if(o.x=j,o.y=k,o.width=l-j,o.height=m-k,c)for(a.worldTransform=f,e=0;eo?t:o,o=v>o?v:o,o=x>o?x:o,o=z>o?z:o,p=u>p?u:p,p=w>p?w:p,p=y>p?y:p,p=A>p?A:p}var B=this._bounds;return B.x=q,B.width=o-q,B.y=r,B.height=p-r,this._currentBounds=B,B},b.Sprite.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=b.identityMatrix;for(var c=0;c>16&255)/255,(a>>8&255)/255,(255&a)/255]},b.rgb2hex=function(a){return(255*a[0]<<16)+(255*a[1]<<8)+255*a[2]},b.canUseNewCanvasBlendModes=function(){if(void 0===document)return!1;var a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",c="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",d=new Image;d.src=a+"AP804Oa6"+c;var e=new Image;e.src=a+"/wCKxvRF"+c;var f=b.CanvasPool.create(this,6,1),g=f.getContext("2d");if(g.globalCompositeOperation="multiply",g.drawImage(d,0,0),g.drawImage(e,2,0),!g.getImageData(2,0,1,1))return!1;var h=g.getImageData(2,0,1,1).data;return b.CanvasPool.remove(this),255===h[0]&&0===h[1]&&0===h[2]},b.getNextPowerOfTwo=function(a){if(a>0&&0==(a&a-1))return a;for(var b=1;b0&&0==(a&a-1)&&b>0&&0==(b&b-1)},b.CanvasPool={create:function(a,c,d){var e,f=b.CanvasPool.getFirst();if(-1===f){var g={parent:a,canvas:document.createElement("canvas")};b.CanvasPool.pool.push(g),e=g.canvas}else b.CanvasPool.pool[f].parent=a,e=b.CanvasPool.pool[f].canvas;return void 0!==c&&(e.width=c,e.height=d),e},getFirst:function(){for(var a=b.CanvasPool.pool,c=0;c=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture);var e=c._uvs;if(e){var f,g,h,i,j=a.anchor.x,k=a.anchor.y;if(c.trim){var l=c.trim;g=l.x-j*l.width,f=g+c.crop.width,i=l.y-k*l.height,h=i+c.crop.height}else f=c.frame.width*(1-j),g=c.frame.width*-j,h=c.frame.height*(1-k),i=c.frame.height*-k;var m=4*this.currentBatchSize*this.vertSize,n=c.baseTexture.resolution,o=d.a/n,p=d.b/n,q=d.c/n,r=d.d/n,s=d.tx,t=d.ty,u=this.colors,v=this.positions;this.renderSession.roundPixels?(v[m]=o*g+q*i+s|0,v[m+1]=r*i+p*g+t|0,v[m+5]=o*f+q*i+s|0,v[m+6]=r*i+p*f+t|0,v[m+10]=o*f+q*h+s|0,v[m+11]=r*h+p*f+t|0,v[m+15]=o*g+q*h+s|0,v[m+16]=r*h+p*g+t|0):(v[m]=o*g+q*i+s,v[m+1]=r*i+p*g+t,v[m+5]=o*f+q*i+s,v[m+6]=r*i+p*f+t,v[m+10]=o*f+q*h+s,v[m+11]=r*h+p*f+t,v[m+15]=o*g+q*h+s,v[m+16]=r*h+p*g+t),v[m+2]=e.x0,v[m+3]=e.y0,v[m+7]=e.x1,v[m+8]=e.y1,v[m+12]=e.x2,v[m+13]=e.y2,v[m+17]=e.x3,v[m+18]=e.y3;var w=a.tint;u[m+4]=u[m+9]=u[m+14]=u[m+19]=(w>>16)+(65280&w)+((255&w)<<16)+(255*a.worldAlpha<<24),this.sprites[this.currentBatchSize++]=a}},b.WebGLSpriteBatch.prototype.renderTilingSprite=function(a){var c=a.tilingTexture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture),a._uvs||(a._uvs=new b.TextureUvs);var d=a._uvs,e=c.baseTexture.width,f=c.baseTexture.height;a.tilePosition.x%=e*a.tileScaleOffset.x,a.tilePosition.y%=f*a.tileScaleOffset.y;var g=a.tilePosition.x/(e*a.tileScaleOffset.x),h=a.tilePosition.y/(f*a.tileScaleOffset.y),i=a.width/e/(a.tileScale.x*a.tileScaleOffset.x),j=a.height/f/(a.tileScale.y*a.tileScaleOffset.y);d.x0=0-g,d.y0=0-h,d.x1=1*i-g,d.y1=0-h,d.x2=1*i-g,d.y2=1*j-h,d.x3=0-g,d.y3=1*j-h;var k=a.tint,l=(k>>16)+(65280&k)+((255&k)<<16)+(255*a.worldAlpha<<24),m=this.positions,n=this.colors,o=a.width,p=a.height,q=a.anchor.x,r=a.anchor.y,s=o*(1-q),t=o*-q,u=p*(1-r),v=p*-r,w=4*this.currentBatchSize*this.vertSize,x=c.baseTexture.resolution,y=a.worldTransform,z=y.a/x,A=y.b/x,B=y.c/x,C=y.d/x,D=y.tx,E=y.ty;m[w++]=z*t+B*v+D,m[w++]=C*v+A*t+E,m[w++]=d.x0,m[w++]=d.y0,n[w++]=l,m[w++]=z*s+B*v+D,m[w++]=C*v+A*s+E,m[w++]=d.x1,m[w++]=d.y1,n[w++]=l,m[w++]=z*s+B*u+D,m[w++]=C*u+A*s+E,m[w++]=d.x2,m[w++]=d.y2,n[w++]=l,m[w++]=z*t+B*u+D,m[w++]=C*u+A*t+E,m[w++]=d.x3,m[w++]=d.y3,n[w++]=l,this.sprites[this.currentBatchSize++]=a},b.WebGLSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a,c=this.gl;if(this.dirty){this.dirty=!1,c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a=this.defaultShader.shaders[c.id];var d=4*this.vertSize;c.vertexAttribPointer(a.aVertexPosition,2,c.FLOAT,!1,d,0),c.vertexAttribPointer(a.aTextureCoord,2,c.FLOAT,!1,d,8),c.vertexAttribPointer(a.colorAttribute,4,c.UNSIGNED_BYTE,!0,d,16)}if(this.currentBatchSize>.5*this.size)c.bufferSubData(c.ARRAY_BUFFER,0,this.vertices);else{var e=this.positions.subarray(0,4*this.currentBatchSize*this.vertSize);c.bufferSubData(c.ARRAY_BUFFER,0,e)}for(var f,g,h,i,j=0,k=0,l=null,m=this.renderSession.blendModeManager.currentBlendMode,n=null,o=!1,p=!1,q=0,r=this.currentBatchSize;q0&&(s=!1),(l!==f&&!s||o||p)&&(this.renderBatch(l,j,k),k=q,j=0,l=f,o&&(m=g,this.renderSession.blendModeManager.setBlendMode(m)),p)){n=h,a=n.shaders[c.id],a||(a=new b.PixiShader(c),a.fragmentSrc=n.fragmentSrc,a.uniforms=n.uniforms,a.init(),n.shaders[c.id]=a),this.renderSession.shaderManager.setShader(a),a.dirty&&a.syncUniforms();var t=this.renderSession.projection;c.uniform2f(a.projectionVector,t.x,t.y);var u=this.renderSession.offset;c.uniform2f(a.offsetVector,u.x,u.y)}j++}this.renderBatch(l,j,k),this.currentBatchSize=0}},b.WebGLSpriteBatch.prototype.renderBatch=function(a,b,c){if(0!==b){var d=this.gl;if(a._dirty[d.id]){if(!this.renderSession.renderer.updateTexture(a))return}else d.bindTexture(d.TEXTURE_2D,a._glTextures[d.id]);d.drawElements(d.TRIANGLES,6*b,d.UNSIGNED_SHORT,6*c*2),this.renderSession.drawCount++}},b.WebGLSpriteBatch.prototype.stop=function(){this.flush(),this.dirty=!0},b.WebGLSpriteBatch.prototype.start=function(){this.dirty=!0},b.WebGLSpriteBatch.prototype.destroy=function(){this.vertices=null,this.indices=null,this.gl.deleteBuffer(this.vertexBuffer),this.gl.deleteBuffer(this.indexBuffer),this.currentBaseTexture=null,this.gl=null},b.WebGLFastSpriteBatch=function(a){this.vertSize=10,this.maxSize=6e3,this.size=this.maxSize;var c=4*this.size*this.vertSize,d=6*this.maxSize;this.vertices=new b.Float32Array(c),this.indices=new b.Uint16Array(d),this.vertexBuffer=null,this.indexBuffer=null,this.lastIndexCount=0;for(var e=0,f=0;e=this.size&&this.flush()}},b.WebGLFastSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a=this.gl;if(this.currentBaseTexture._glTextures[a.id]||this.renderSession.renderer.updateTexture(this.currentBaseTexture,a),a.bindTexture(a.TEXTURE_2D,this.currentBaseTexture._glTextures[a.id]),this.currentBatchSize>.5*this.size)a.bufferSubData(a.ARRAY_BUFFER,0,this.vertices);else{var b=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);a.bufferSubData(a.ARRAY_BUFFER,0,b)}a.drawElements(a.TRIANGLES,6*this.currentBatchSize,a.UNSIGNED_SHORT,0),this.currentBatchSize=0,this.renderSession.drawCount++}},b.WebGLFastSpriteBatch.prototype.stop=function(){this.flush()},b.WebGLFastSpriteBatch.prototype.start=function(){var a=this.gl;a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var b=this.renderSession.projection;a.uniform2f(this.shader.projectionVector,b.x,b.y),a.uniformMatrix3fv(this.shader.uMatrix,!1,this.matrix);var c=4*this.vertSize;a.vertexAttribPointer(this.shader.aVertexPosition,2,a.FLOAT,!1,c,0),a.vertexAttribPointer(this.shader.aPositionCoord,2,a.FLOAT,!1,c,8),a.vertexAttribPointer(this.shader.aScale,2,a.FLOAT,!1,c,16),a.vertexAttribPointer(this.shader.aRotation,1,a.FLOAT,!1,c,24),a.vertexAttribPointer(this.shader.aTextureCoord,2,a.FLOAT,!1,c,28),a.vertexAttribPointer(this.shader.colorAttribute,1,a.FLOAT,!1,c,36)},b.WebGLFilterManager=function(){this.filterStack=[],this.offsetX=0,this.offsetY=0},b.WebGLFilterManager.prototype.constructor=b.WebGLFilterManager,b.WebGLFilterManager.prototype.setContext=function(a){this.gl=a,this.texturePool=[],this.initShaderBuffers()},b.WebGLFilterManager.prototype.begin=function(a,b){this.renderSession=a,this.defaultShader=a.shaderManager.defaultShader;var c=this.renderSession.projection;this.width=2*c.x,this.height=2*-c.y,this.buffer=b},b.WebGLFilterManager.prototype.pushFilter=function(a){var c=this.gl,d=this.renderSession.projection,e=this.renderSession.offset;a._filterArea=a.target.filterArea||a.target.getBounds(),a._previous_stencil_mgr=this.renderSession.stencilManager,this.renderSession.stencilManager=new b.WebGLStencilManager,this.renderSession.stencilManager.setContext(c),c.disable(c.STENCIL_TEST),this.filterStack.push(a);var f=a.filterPasses[0];this.offsetX+=a._filterArea.x,this.offsetY+=a._filterArea.y;var g=this.texturePool.pop();g?g.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution):g=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),c.bindTexture(c.TEXTURE_2D,g.texture);var h=a._filterArea,i=f.padding;h.x-=i,h.y-=i,h.width+=2*i,h.height+=2*i,h.x<0&&(h.x=0),h.width>this.width&&(h.width=this.width),h.y<0&&(h.y=0),h.height>this.height&&(h.height=this.height),c.bindFramebuffer(c.FRAMEBUFFER,g.frameBuffer),c.viewport(0,0,h.width*this.renderSession.resolution,h.height*this.renderSession.resolution),d.x=h.width/2,d.y=-h.height/2,e.x=-h.x,e.y=-h.y,c.colorMask(!0,!0,!0,!0),c.clearColor(0,0,0,0),c.clear(c.COLOR_BUFFER_BIT),a._glFilterTexture=g},b.WebGLFilterManager.prototype.popFilter=function(){var a=this.gl,c=this.filterStack.pop(),d=c._filterArea,e=c._glFilterTexture,f=this.renderSession.projection,g=this.renderSession.offset;if(c.filterPasses.length>1){a.viewport(0,0,d.width*this.renderSession.resolution,d.height*this.renderSession.resolution),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=0,this.vertexArray[1]=d.height,this.vertexArray[2]=d.width,this.vertexArray[3]=d.height,this.vertexArray[4]=0,this.vertexArray[5]=0,this.vertexArray[6]=d.width,this.vertexArray[7]=0,a.bufferSubData(a.ARRAY_BUFFER,0,this.vertexArray),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=d.width/this.width,this.uvArray[5]=d.height/this.height,this.uvArray[6]=d.width/this.width,this.uvArray[7]=d.height/this.height,a.bufferSubData(a.ARRAY_BUFFER,0,this.uvArray);var h=e,i=this.texturePool.pop();i||(i=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution)),i.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),a.bindFramebuffer(a.FRAMEBUFFER,i.frameBuffer),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.BLEND);for(var j=0;j0?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST),this.applyFilterPass(m,d,n,o),this.texturePool.push(e),c._glFilterTexture=null},b.WebGLFilterManager.prototype.applyFilterPass=function(a,c,d,e){var f=this.gl,g=a.shaders[f.id];g||(g=new b.PixiShader(f),g.fragmentSrc=a.fragmentSrc,g.uniforms=a.uniforms,g.init(),a.shaders[f.id]=g),this.renderSession.shaderManager.setShader(g),f.uniform2f(g.projectionVector,d/2,-e/2),f.uniform2f(g.offsetVector,0,0),a.uniforms.dimensions&&(a.uniforms.dimensions.value[0]=this.width,a.uniforms.dimensions.value[1]=this.height,a.uniforms.dimensions.value[2]=this.vertexArray[0],a.uniforms.dimensions.value[3]=this.vertexArray[5]),g.syncUniforms(),f.bindBuffer(f.ARRAY_BUFFER,this.vertexBuffer),f.vertexAttribPointer(g.aVertexPosition,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.uvBuffer),f.vertexAttribPointer(g.aTextureCoord,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.colorBuffer),f.vertexAttribPointer(g.colorAttribute,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,this.indexBuffer),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0),this.renderSession.drawCount++},b.WebGLFilterManager.prototype.initShaderBuffers=function(){var a=this.gl;this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.colorBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),this.vertexArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,this.vertexArray,a.STATIC_DRAW),this.uvArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,this.uvArray,a.STATIC_DRAW),this.colorArray=new b.Float32Array([1,16777215,1,16777215,1,16777215,1,16777215]),a.bindBuffer(a.ARRAY_BUFFER,this.colorBuffer),a.bufferData(a.ARRAY_BUFFER,this.colorArray,a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,3,2]),a.STATIC_DRAW)},b.WebGLFilterManager.prototype.destroy=function(){var a=this.gl;this.filterStack=null,this.offsetX=0,this.offsetY=0;for(var b=0;b=0;a--){var c=this._glTextures[a],d=b.glContexts[a];d&&c&&d.deleteTexture(c)}this._glTextures.length=0,this.dirty()},b.BaseTexture.fromCanvas=function(a,c){return 0===a.width&&(a.width=1),0===a.height&&(a.height=1),new b.BaseTexture(a,c)},b.TextureSilentFail=!1,b.Texture=function(a,c,d,e){this.noFrame=!1,c||(this.noFrame=!0,c=new b.Rectangle(0,0,1,1)),a instanceof b.Texture&&(a=a.baseTexture),this.baseTexture=a,this.frame=c,this.trim=e,this.valid=!1,this.isTiling=!1,this.requiresUpdate=!1,this.requiresReTint=!1,this._uvs=null,this.width=0,this.height=0,this.crop=d||new b.Rectangle(0,0,1,1),a.hasLoaded&&(this.noFrame&&(c=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(c))},b.Texture.prototype.constructor=b.Texture,b.Texture.prototype.onBaseTextureLoaded=function(){var a=this.baseTexture;this.noFrame&&(this.frame=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(this.frame)},b.Texture.prototype.destroy=function(a){a&&this.baseTexture.destroy(),this.valid=!1},b.Texture.prototype.setFrame=function(a){if(this.noFrame=!1,this.frame=a,this.width=a.width,this.height=a.height,this.crop.x=a.x,this.crop.y=a.y,this.crop.width=a.width,this.crop.height=a.height,!this.trim&&(a.x+a.width>this.baseTexture.width||a.y+a.height>this.baseTexture.height)){if(!b.TextureSilentFail)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);return void(this.valid=!1)}this.valid=a&&a.width&&a.height&&this.baseTexture.source&&this.baseTexture.hasLoaded,this.trim&&(this.width=this.trim.width,this.height=this.trim.height,this.frame.width=this.trim.width,this.frame.height=this.trim.height),this.valid&&this._updateUvs()},b.Texture.prototype._updateUvs=function(){this._uvs||(this._uvs=new b.TextureUvs);var a=this.crop,c=this.baseTexture.width,d=this.baseTexture.height;this._uvs.x0=a.x/c,this._uvs.y0=a.y/d,this._uvs.x1=(a.x+a.width)/c,this._uvs.y1=a.y/d,this._uvs.x2=(a.x+a.width)/c,this._uvs.y2=(a.y+a.height)/d,this._uvs.x3=a.x/c,this._uvs.y3=(a.y+a.height)/d},b.Texture.fromCanvas=function(a,c){var d=b.BaseTexture.fromCanvas(a,c);return new b.Texture(d)},b.TextureUvs=function(){this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0},b.RenderTexture=function(a,c,d,e,f){if(this.width=a||100,this.height=c||100,this.resolution=f||1,this.frame=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new b.BaseTexture,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=e||b.scaleModes.DEFAULT,this.baseTexture.hasLoaded=!0,b.Texture.call(this,this.baseTexture,new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution)),this.renderer=d||b.defaultRenderer,this.renderer.type===b.WEBGL_RENDERER){var g=this.renderer.gl;this.baseTexture._dirty[g.id]=!1,this.textureBuffer=new b.FilterTexture(g,this.width,this.height,this.baseTexture.scaleMode),this.baseTexture._glTextures[g.id]=this.textureBuffer.texture,this.render=this.renderWebGL,this.projection=new b.Point(.5*this.width,.5*-this.height)}else this.render=this.renderCanvas, +this.textureBuffer=new b.CanvasBuffer(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this.tempMatrix=new Phaser.Matrix,this._updateUvs()},b.RenderTexture.prototype=Object.create(b.Texture.prototype),b.RenderTexture.prototype.constructor=b.RenderTexture,b.RenderTexture.prototype.resize=function(a,c,d){a===this.width&&c===this.height||(this.valid=a>0&&c>0,this.width=a,this.height=c,this.frame.width=this.crop.width=a*this.resolution,this.frame.height=this.crop.height=c*this.resolution,d&&(this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution),this.renderer.type===b.WEBGL_RENDERER&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width,this.height))},b.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===b.WEBGL_RENDERER&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},b.RenderTexture.prototype.renderWebGL=function(a,b,c){if(this.valid&&0!==a.alpha){var d=a.worldTransform;d.identity(),d.translate(0,2*this.projection.y),b&&d.append(b),d.scale(1,-1);for(var e=0;e0){var v=this.canvasPadding/this.worldTransform.a,w=this.canvasPadding/this.worldTransform.d,x=(j+k+l)/3,y=(m+n+o)/3,z=j-x,A=m-y,B=Math.sqrt(z*z+A*A);j=x+z/B*(B+v),m=y+A/B*(B+w),z=k-x,A=n-y,B=Math.sqrt(z*z+A*A),k=x+z/B*(B+v),n=y+A/B*(B+w),z=l-x,A=o-y,B=Math.sqrt(z*z+A*A),l=x+z/B*(B+v),o=y+A/B*(B+w)}a.save(),a.beginPath(),a.moveTo(j,m),a.lineTo(k,n),a.lineTo(l,o),a.closePath(),a.clip();var C=p*t+s*r+q*u-t*r-s*q-p*u,D=j*t+s*l+k*u-t*l-s*k-j*u,E=p*k+j*r+q*l-k*r-j*q-p*l,F=p*t*l+s*k*r+j*q*u-j*t*r-s*q*l-p*k*u,G=m*t+s*o+n*u-t*o-s*n-m*u,H=p*n+m*r+q*o-n*r-m*q-p*o,I=p*t*o+s*n*r+m*q*u-m*t*r-s*q*o-p*n*u;a.transform(D/C,G/C,E/C,H/C,F/C,I/C),a.drawImage(g,0,0),a.restore()},b.Strip.prototype.renderStripFlat=function(a){var b=this.context,c=a.vertices,d=c.length/2;this.count++,b.beginPath();for(var e=1;ej?s:j,k=t>k?t:k}if(l===-1/0||k===1/0)return b.EmptyRectangle;var u=this._bounds;return u.x=l,u.width=j-l,u.y=m,u.height=k-m,this._currentBounds=u,u},b.Strip.DrawModes={TRIANGLE_STRIP:0,TRIANGLES:1},b.Rope=function(a,c){b.Strip.call(this,a),this.points=c,this.vertices=new b.Float32Array(4*c.length),this.uvs=new b.Float32Array(4*c.length),this.colors=new b.Float32Array(2*c.length),this.indices=new b.Uint16Array(2*c.length),this.refresh()},b.Rope.prototype=Object.create(b.Strip.prototype),b.Rope.prototype.constructor=b.Rope,b.Rope.prototype.refresh=function(){var a=this.points;if(!(a.length<1)){var b=this.uvs,c=(a[0],this.indices),d=this.colors;this.count-=.2,b[0]=0,b[1]=0,b[2]=0,b[3]=1,d[0]=1,d[1]=1,c[0]=0,c[1]=1;for(var e,f,g,h=a.length,i=1;i1&&(h=1),i=Math.sqrt(e.x*e.x+e.y*e.y),j=this.texture.height/2,e.x/=i,e.y/=i,e.x*=j,e.y*=j,k[g]=f.x+e.x,k[g+1]=f.y+e.y,k[g+2]=f.x-e.x,k[g+3]=f.y-e.y,d=f;b.DisplayObjectContainer.prototype.updateTransform.call(this)}},b.Rope.prototype.setTexture=function(a){this.texture=a},b.TilingSprite=function(a,c,d){b.Sprite.call(this,a),this._width=c||128,this._height=d||128,this.tileScale=new b.Point(1,1),this.tileScaleOffset=new b.Point(1,1),this.tilePosition=new b.Point,this.renderable=!0,this.tint=16777215,this.textureDebug=!1,this.blendMode=b.blendModes.NORMAL,this.canvasBuffer=null,this.tilingTexture=null,this.tilePattern=null,this.refreshTexture=!0,this.frameWidth=0,this.frameHeight=0},b.TilingSprite.prototype=Object.create(b.Sprite.prototype),b.TilingSprite.prototype.constructor=b.TilingSprite,b.TilingSprite.prototype.setTexture=function(a){this.texture!==a&&(this.texture=a,this.refreshTexture=!0,this.cachedTint=16777215)},b.TilingSprite.prototype._renderWebGL=function(a){if(this.visible&&this.renderable&&0!==this.alpha){if(this._mask&&(a.spriteBatch.stop(),a.maskManager.pushMask(this.mask,a),a.spriteBatch.start()),this._filters&&(a.spriteBatch.flush(),a.filterManager.pushFilter(this._filterBlock)),this.refreshTexture){if(this.generateTilingTexture(!0,a),!this.tilingTexture)return;this.tilingTexture.needsUpdate&&(a.renderer.updateTexture(this.tilingTexture.baseTexture),this.tilingTexture.needsUpdate=!1)}a.spriteBatch.renderTilingSprite(this);for(var b=0;bv?n:v,v=p>v?p:v,v=r>v?r:v,v=t>v?t:v,w=o>w?o:w,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w;var z=this._bounds;return z.x=x,z.width=v-x,z.y=y,z.height=w-y,this._currentBounds=z,z},b.TilingSprite.prototype.destroy=function(){b.Sprite.prototype.destroy.call(this),this.canvasBuffer&&(this.canvasBuffer.destroy(),this.canvasBuffer=null),this.tileScale=null,this.tileScaleOffset=null,this.tilePosition=null,this.tilingTexture&&(this.tilingTexture.destroy(!0),this.tilingTexture=null)},Object.defineProperty(b.TilingSprite.prototype,"width",{get:function(){return this._width},set:function(a){this._width=a}}),Object.defineProperty(b.TilingSprite.prototype,"height",{get:function(){return this._height},set:function(a){this._height=a}}),"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.PIXI=b):"undefined"!=typeof define&&define.amd?define("PIXI",function(){return a.PIXI=b}()):a.PIXI=b,b}.call(this),function(){function a(a,b){this._scaleFactor=a,this._deltaMode=b,this.originalEvent=null}var b=this,c=c||{VERSION:"2.6.15",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,NONE:0,LEFT:1,RIGHT:2,UP:3,DOWN:4,SPRITE:0,BUTTON:1,IMAGE:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11,POLYGON:12,BITMAPDATA:13,CANVAS_FILTER:14,WEBGL_FILTER:15,ELLIPSE:16,SPRITEBATCH:17,RETROFONT:18,POINTER:19,ROPE:20,CIRCLE:21,RECTANGLE:22,LINE:23,MATRIX:24,POINT:25,ROUNDEDRECTANGLE:26,CREATURE:27,VIDEO:28,PENDING_ATLAS:-1,HORIZONTAL:0,VERTICAL:1,LANDSCAPE:0,PORTRAIT:1,ANGLE_UP:270,ANGLE_DOWN:90,ANGLE_LEFT:180,ANGLE_RIGHT:0,ANGLE_NORTH_EAST:315,ANGLE_NORTH_WEST:225,ANGLE_SOUTH_EAST:45,ANGLE_SOUTH_WEST:135,TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12,blendModes:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},scaleModes:{DEFAULT:0,LINEAR:0,NEAREST:1},PIXI:PIXI||{}};if(Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),Function.prototype.bind||(Function.prototype.bind=function(){var a=Array.prototype.slice;return function(b){function c(){var f=e.concat(a.call(arguments));d.apply(this instanceof c?this:b,f)}var d=this,e=a.call(arguments,1);if("function"!=typeof d)throw new TypeError;return c.prototype=function a(b){if(b&&(a.prototype=b),!(this instanceof a))return new a}(d.prototype),c}}()),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.forEach||(Array.prototype.forEach=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=arguments.length>=2?arguments[1]:void 0,e=0;e0&&100*Math.random()<=a},randomChoice:function(a,b){return Math.random()<.5?a:b},parseDimension:function(a,b){var c=0,d=0;return"string"==typeof a?"%"===a.substr(-1)?(c=parseInt(a,10)/100,d=0===b?window.innerWidth*c:window.innerHeight*c):d=parseInt(a,10):d=a,d},pad:function(a,b,c,d){if(void 0===b)var b=0;if(void 0===c)var c=" ";if(void 0===d)var d=3;a=a.toString();var e=0;if(b+1>=a.length)switch(d){case 1:a=new Array(b+1-a.length).join(c)+a;break;case 3:var f=Math.ceil((e=b-a.length)/2),g=e-f;a=new Array(g+1).join(c)+a+new Array(f+1).join(c);break;default:a+=new Array(b+1-a.length).join(c)}return a},isPlainObject:function(a){if("object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}return!0},extend:function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),j===i&&(h=this,--i);i0&&(this._radius=.5*d),this.type=c.CIRCLE},c.Circle.prototype={circumference:function(){return Math.PI*this._radius*2},random:function(a){void 0===a&&(a=new c.Point);var b=2*Math.PI*Math.random(),d=Math.random()+Math.random(),e=d>1?2-d:d,f=e*Math.cos(b),g=e*Math.sin(b);return a.x=this.x+f*this.radius,a.y=this.y+g*this.radius,a},getBounds:function(){return new c.Rectangle(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)},setTo:function(a,b,c){return this.x=a,this.y=b,this._diameter=c,this._radius=.5*c,this},copyFrom:function(a){return this.setTo(a.x,a.y,a.diameter)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.diameter=this._diameter,a},distance:function(a,b){var d=c.Math.distance(this.x,this.y,a.x,a.y);return b?Math.round(d):d},clone:function(a){return void 0===a||null===a?a=new c.Circle(this.x,this.y,this.diameter):a.setTo(this.x,this.y,this.diameter),a},contains:function(a,b){return c.Circle.contains(this,a,b)},circumferencePoint:function(a,b,d){return c.Circle.circumferencePoint(this,a,b,d)},offset:function(a,b){return this.x+=a,this.y+=b,this},offsetPoint:function(a){return this.offset(a.x,a.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}},c.Circle.prototype.constructor=c.Circle,Object.defineProperty(c.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(a){a>0&&(this._diameter=a,this._radius=.5*a)}}),Object.defineProperty(c.Circle.prototype,"radius",{get:function(){return this._radius},set:function(a){a>0&&(this._radius=a,this._diameter=2*a)}}),Object.defineProperty(c.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(a){a>this.x?(this._radius=0,this._diameter=0):this.radius=this.x-a}}),Object.defineProperty(c.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(a){athis.y?(this._radius=0,this._diameter=0):this.radius=this.y-a}}),Object.defineProperty(c.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(a){a0?Math.PI*this._radius*this._radius:0}}),Object.defineProperty(c.Circle.prototype,"empty",{get:function(){return 0===this._diameter},set:function(a){!0===a&&this.setTo(0,0,0)}}),c.Circle.contains=function(a,b,c){if(a.radius>0&&b>=a.left&&b<=a.right&&c>=a.top&&c<=a.bottom){return(a.x-b)*(a.x-b)+(a.y-c)*(a.y-c)<=a.radius*a.radius}return!1},c.Circle.equals=function(a,b){return a.x===b.x&&a.y===b.y&&a.diameter===b.diameter},c.Circle.intersects=function(a,b){return c.Math.distance(a.x,a.y,b.x,b.y)<=a.radius+b.radius},c.Circle.circumferencePoint=function(a,b,d,e){return void 0===d&&(d=!1),void 0===e&&(e=new c.Point),!0===d&&(b=c.Math.degToRad(b)),e.x=a.x+a.radius*Math.cos(b),e.y=a.y+a.radius*Math.sin(b),e},c.Circle.intersectsRectangle=function(a,b){var c=Math.abs(a.x-b.x-b.halfWidth);if(c>b.halfWidth+a.radius)return!1;var d=Math.abs(a.y-b.y-b.halfHeight);if(d>b.halfHeight+a.radius)return!1;if(c<=b.halfWidth||d<=b.halfHeight)return!0;var e=c-b.halfWidth,f=d-b.halfHeight;return e*e+f*f<=a.radius*a.radius},PIXI.Circle=c.Circle,c.Ellipse=function(a,b,d,e){a=a||0,b=b||0,d=d||0,e=e||0,this.x=a,this.y=b,this.width=d,this.height=e,this.type=c.ELLIPSE},c.Ellipse.prototype={setTo:function(a,b,c,d){return this.x=a,this.y=b,this.width=c,this.height=d,this},getBounds:function(){return new c.Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)},copyFrom:function(a){return this.setTo(a.x,a.y,a.width,a.height)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},clone:function(a){return void 0===a||null===a?a=new c.Ellipse(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a},contains:function(a,b){return c.Ellipse.contains(this,a,b)},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random()*Math.PI*2,d=Math.random();return a.x=Math.sqrt(d)*Math.cos(b),a.y=Math.sqrt(d)*Math.sin(b),a.x=this.x+a.x*this.width/2,a.y=this.y+a.y*this.height/2,a},toString:function(){return"[{Phaser.Ellipse (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")}]"}},c.Ellipse.prototype.constructor=c.Ellipse,Object.defineProperty(c.Ellipse.prototype,"left",{get:function(){return this.x},set:function(a){this.x=a}}),Object.defineProperty(c.Ellipse.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a=c&&a<=d&&b>=e&&b<=f},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random();return a.x=this.start.x+b*(this.end.x-this.start.x),a.y=this.start.y+b*(this.end.y-this.start.y),a},coordinatesOnLine:function(a,b){void 0===a&&(a=1),void 0===b&&(b=[]);var c=Math.round(this.start.x),d=Math.round(this.start.y),e=Math.round(this.end.x),f=Math.round(this.end.y),g=Math.abs(e-c),h=Math.abs(f-d),i=c-h&&(k-=h,c+=i),m=0&&p<=1&&q>=0&&q<=1?g:null}return g},c.Line.intersects=function(a,b,d,e){return c.Line.intersectsPoints(a.start,a.end,b.start,b.end,d,e)},c.Line.intersectsRectangle=function(a,b){if(!c.Rectangle.intersects(a,b))return!1;var d=a.start.x,e=a.start.y,f=a.end.x,g=a.end.y,h=b.x,i=b.y,j=b.right,k=b.bottom,l=0;if(d>=h&&d<=j&&e>=i&&e<=k||f>=h&&f<=j&&g>=i&&g<=k)return!0;if(d=h){if((l=e+(g-e)*(h-d)/(f-d))>i&&l<=k)return!0}else if(d>j&&f<=j&&(l=e+(g-e)*(j-d)/(f-d))>=i&&l<=k)return!0;if(e=i){if((l=d+(f-d)*(i-e)/(g-e))>=h&&l<=j)return!0}else if(e>k&&g<=k&&(l=d+(f-d)*(k-e)/(g-e))>=h&&l<=j)return!0;return!1},c.Line.reflect=function(a,b){return 2*b.normalAngle-3.141592653589793-a.angle},c.Matrix=function(a,b,d,e,f,g){void 0!==a&&null!==a||(a=1),void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),void 0!==e&&null!==e||(e=1),void 0!==f&&null!==f||(f=0),void 0!==g&&null!==g||(g=0),this.a=a,this.b=b,this.c=d,this.d=e,this.tx=f,this.ty=g,this.type=c.MATRIX},c.Matrix.prototype={fromArray:function(a){return this.setTo(a[0],a[1],a[3],a[4],a[2],a[5])},setTo:function(a,b,c,d,e,f){return this.a=a,this.b=b,this.c=c,this.d=d,this.tx=e,this.ty=f,this},clone:function(a){return void 0===a||null===a?a=new c.Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty):(a.a=this.a,a.b=this.b,a.c=this.c,a.d=this.d,a.tx=this.tx,a.ty=this.ty),a},copyTo:function(a){return a.copyFrom(this),a},copyFrom:function(a){return this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.tx=a.tx,this.ty=a.ty,this},toArray:function(a,b){return void 0===b&&(b=new PIXI.Float32Array(9)),a?(b[0]=this.a,b[1]=this.b,b[2]=0,b[3]=this.c,b[4]=this.d,b[5]=0,b[6]=this.tx,b[7]=this.ty,b[8]=1):(b[0]=this.a,b[1]=this.c,b[2]=this.tx,b[3]=this.b,b[4]=this.d,b[5]=this.ty,b[6]=0,b[7]=0,b[8]=1),b},apply:function(a,b){return void 0===b&&(b=new c.Point),b.x=this.a*a.x+this.c*a.y+this.tx,b.y=this.b*a.x+this.d*a.y+this.ty,b},applyInverse:function(a,b){void 0===b&&(b=new c.Point);var d=1/(this.a*this.d+this.c*-this.b),e=a.x,f=a.y;return b.x=this.d*d*e+-this.c*d*f+(this.ty*this.c-this.tx*this.d)*d,b.y=this.a*d*f+-this.b*d*e+(-this.ty*this.a+this.tx*this.b)*d,b},translate:function(a,b){return this.tx+=a,this.ty+=b,this},scale:function(a,b){return this.a*=a,this.d*=b,this.c*=a,this.b*=b,this.tx*=a,this.ty*=b,this}, +rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=this.a,e=this.c,f=this.tx;return this.a=d*b-this.b*c,this.b=d*c+this.b*b,this.c=e*b-this.d*c,this.d=e*c+this.d*b,this.tx=f*b-this.ty*c,this.ty=f*c+this.ty*b,this},append:function(a){var b=this.a,c=this.b,d=this.c,e=this.d;return this.a=a.a*b+a.b*d,this.b=a.a*c+a.b*e,this.c=a.c*b+a.d*d,this.d=a.c*c+a.d*e,this.tx=a.tx*b+a.ty*d+this.tx,this.ty=a.tx*c+a.ty*e+this.ty,this},identity:function(){return this.setTo(1,0,0,1,0,0)}},c.identityMatrix=new c.Matrix,PIXI.Matrix=c.Matrix,PIXI.identityMatrix=c.identityMatrix,c.Point=function(a,b){a=a||0,b=b||0,this.x=a,this.y=b,this.type=c.POINT},c.Point.prototype={copyFrom:function(a){return this.setTo(a.x,a.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},set:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},add:function(a,b){return this.x+=a,this.y+=b,this},subtract:function(a,b){return this.x-=a,this.y-=b,this},multiply:function(a,b){return this.x*=a,this.y*=b,this},divide:function(a,b){return this.x/=a,this.y/=b,this},clampX:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this},clampY:function(a,b){return this.y=c.Math.clamp(this.y,a,b),this},clamp:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this.y=c.Math.clamp(this.y,a,b),this},clone:function(a){return void 0===a||null===a?a=new c.Point(this.x,this.y):a.setTo(this.x,this.y),a},copyTo:function(a){return a.x=this.x,a.y=this.y,a},distance:function(a,b){return c.Point.distance(this,a,b)},equals:function(a){return a.x===this.x&&a.y===this.y},angle:function(a,b){return void 0===b&&(b=!1),b?c.Math.radToDeg(Math.atan2(a.y-this.y,a.x-this.x)):Math.atan2(a.y-this.y,a.x-this.x)},rotate:function(a,b,d,e,f){return c.Point.rotate(this,a,b,d,e,f)},getMagnitude:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},getMagnitudeSq:function(){return this.x*this.x+this.y*this.y},setMagnitude:function(a){return this.normalize().multiply(a,a)},normalize:function(){if(!this.isZero()){var a=this.getMagnitude();this.x/=a,this.y/=a}return this},isZero:function(){return 0===this.x&&0===this.y},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},perp:function(){return this.setTo(-this.y,this.x)},rperp:function(){return this.setTo(this.y,-this.x)},normalRightHand:function(){return this.setTo(-1*this.y,this.x)},floor:function(){return this.setTo(Math.floor(this.x),Math.floor(this.y))},ceil:function(){return this.setTo(Math.ceil(this.x),Math.ceil(this.y))},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}},c.Point.prototype.constructor=c.Point,c.Point.add=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x+b.x,d.y=a.y+b.y,d},c.Point.subtract=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x-b.x,d.y=a.y-b.y,d},c.Point.multiply=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x*b.x,d.y=a.y*b.y,d},c.Point.divide=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x/b.x,d.y=a.y/b.y,d},c.Point.equals=function(a,b){return a.x===b.x&&a.y===b.y},c.Point.angle=function(a,b){return Math.atan2(a.y-b.y,a.x-b.x)},c.Point.negative=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.x,-a.y)},c.Point.multiplyAdd=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+b.x*d,a.y+b.y*d)},c.Point.interpolate=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+(b.x-a.x)*d,a.y+(b.y-a.y)*d)},c.Point.perp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.y,a.x)},c.Point.rperp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(a.y,-a.x)},c.Point.distance=function(a,b,d){var e=c.Math.distance(a.x,a.y,b.x,b.y);return d?Math.round(e):e},c.Point.project=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b)/b.getMagnitudeSq();return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.projectUnit=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b);return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.normalRightHand=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-1*a.y,a.x)},c.Point.normalize=function(a,b){void 0===b&&(b=new c.Point);var d=a.getMagnitude();return 0!==d&&b.setTo(a.x/d,a.y/d),b},c.Point.rotate=function(a,b,d,e,f,g){if(f&&(e=c.Math.degToRad(e)),void 0===g){a.subtract(b,d);var h=Math.sin(e),i=Math.cos(e),j=i*a.x-h*a.y,k=h*a.x+i*a.y;a.x=j+b,a.y=k+d}else{var l=e+Math.atan2(a.y-d,a.x-b);a.x=b+g*Math.cos(l),a.y=d+g*Math.sin(l)}return a},c.Point.centroid=function(a,b){if(void 0===b&&(b=new c.Point),"[object Array]"!==Object.prototype.toString.call(a))throw new Error("Phaser.Point. Parameter 'points' must be an array");var d=a.length;if(d<1)throw new Error("Phaser.Point. Parameter 'points' array must not be empty");if(1===d)return b.copyFrom(a[0]),b;for(var e=0;e0&&this.setTo.apply(this,arguments),this.closed=!0,this.flattened=!1,this.type=c.POLYGON},c.Polygon.prototype={toNumberArray:function(a){void 0===a&&(a=[]);for(var b=0;b0){Array.isArray(a)||(a=Array.prototype.slice.call(arguments));for(var b=Number.MAX_VALUE,c=0,d=a.length;c=this.right?this.width=0:this.width=this.right-a,this.x=a}}),Object.defineProperty(c.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a<=this.x?this.width=0:this.width=a-this.x}}),Object.defineProperty(c.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(c.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(c.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(a){this.x=a-this.halfWidth}}),Object.defineProperty(c.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(a){this.y=a-this.halfHeight}}),Object.defineProperty(c.Rectangle.prototype,"randomX",{get:function(){return this.x+Math.random()*this.width}}),Object.defineProperty(c.Rectangle.prototype,"randomY",{get:function(){return this.y+Math.random()*this.height}}),Object.defineProperty(c.Rectangle.prototype,"top",{get:function(){return this.y},set:function(a){a>=this.bottom?(this.height=0,this.y=a):this.height=this.bottom-a}}),Object.defineProperty(c.Rectangle.prototype,"topLeft",{get:function(){return new c.Point(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"topRight",{get:function(){return new c.Point(this.x+this.width,this.y)},set:function(a){this.right=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(a){!0===a&&this.setTo(0,0,0,0)}}),c.Rectangle.prototype.constructor=c.Rectangle,c.Rectangle.inflate=function(a,b,c){return a.x-=b,a.width+=2*b,a.y-=c,a.height+=2*c,a},c.Rectangle.inflatePoint=function(a,b){return c.Rectangle.inflate(a,b.x,b.y)},c.Rectangle.size=function(a,b){return void 0===b||null===b?b=new c.Point(a.width,a.height):b.setTo(a.width,a.height),b},c.Rectangle.clone=function(a,b){return void 0===b||null===b?b=new c.Rectangle(a.x,a.y,a.width,a.height):b.setTo(a.x,a.y,a.width,a.height),b},c.Rectangle.contains=function(a,b,c){return!(a.width<=0||a.height<=0)&&(b>=a.x&&b=a.y&&c=a&&e=b&&fb.volume)&&(a.x>=b.x&&a.y>=b.y&&a.rightb.right||a.y>b.bottom)},c.Rectangle.intersectsRaw=function(a,b,c,d,e,f){return void 0===f&&(f=0),!(b>a.right+f||ca.bottom+f||ed&&(d=a.x),a.xf&&(f=a.y),a.y=c&&a<=c+this.width){var d=this.y;if(b>=d&&b<=d+this.height)return!0}return!1}},c.RoundedRectangle.prototype.constructor=c.RoundedRectangle,PIXI.RoundedRectangle=c.RoundedRectangle,c.Camera=function(a,b,d,e,f,g){this.game=a,this.world=a.world,this.id=0,this.view=new c.Rectangle(d,e,f,g),this.bounds=new c.Rectangle(d,e,f,g),this.deadzone=null,this.visible=!0,this.roundPx=!0,this.atLimit={x:!1,y:!1},this.target=null,this.displayObject=null,this.scale=null,this.totalInView=0,this.lerp=new c.Point(1,1),this.onShakeComplete=new c.Signal,this.onFlashComplete=new c.Signal,this.onFadeComplete=new c.Signal,this.fx=null,this._targetPosition=new c.Point,this._edge=0,this._position=new c.Point,this._shake={intensity:0,duration:0,horizontal:!1,vertical:!1,shakeBounds:!0,x:0,y:0},this._fxDuration=0,this._fxType=0},c.Camera.FOLLOW_LOCKON=0,c.Camera.FOLLOW_PLATFORMER=1,c.Camera.FOLLOW_TOPDOWN=2,c.Camera.FOLLOW_TOPDOWN_TIGHT=3,c.Camera.SHAKE_BOTH=4,c.Camera.SHAKE_HORIZONTAL=5,c.Camera.SHAKE_VERTICAL=6,c.Camera.ENABLE_FX=!0,c.Camera.prototype={boot:function(){this.displayObject=this.game.world,this.scale=this.game.world.scale,this.game.camera=this,c.Graphics&&c.Camera.ENABLE_FX&&(this.fx=new c.Graphics(this.game),this.game.stage.addChild(this.fx))},preUpdate:function(){this.totalInView=0},follow:function(a,b,d,e){void 0===b&&(b=c.Camera.FOLLOW_LOCKON),void 0===d&&(d=1),void 0===e&&(e=1),this.target=a,this.lerp.set(d,e);var f;switch(b){case c.Camera.FOLLOW_PLATFORMER:var g=this.width/8,h=this.height/3;this.deadzone=new c.Rectangle((this.width-g)/2,(this.height-h)/2-.25*h,g,h);break;case c.Camera.FOLLOW_TOPDOWN:f=Math.max(this.width,this.height)/4,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_TOPDOWN_TIGHT:f=Math.max(this.width,this.height)/8,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_LOCKON:default:this.deadzone=null}},unfollow:function(){this.target=null},focusOn:function(a){this.setPosition(Math.round(a.x-this.view.halfWidth),Math.round(a.y-this.view.halfHeight))},focusOnXY:function(a,b){this.setPosition(Math.round(a-this.view.halfWidth),Math.round(b-this.view.halfHeight))},shake:function(a,b,d,e,f){return void 0===a&&(a=.05),void 0===b&&(b=500),void 0===d&&(d=!0),void 0===e&&(e=c.Camera.SHAKE_BOTH),void 0===f&&(f=!0),!(!d&&this._shake.duration>0)&&(this._shake.intensity=a,this._shake.duration=b,this._shake.shakeBounds=f,this._shake.x=0,this._shake.y=0,this._shake.horizontal=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_HORIZONTAL,this._shake.vertical=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_VERTICAL,!0)},flash:function(a,b,c){return void 0===a&&(a=16777215),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=1,this._fxDuration=b,this._fxType=0,!0)},fade:function(a,b,c){return void 0===a&&(a=0),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=0,this._fxDuration=b,this._fxType=1,!0)},update:function(){this._fxDuration>0&&this.updateFX(),this._shake.duration>0&&this.updateShake(),this.bounds&&this.checkBounds(),this.roundPx&&(this.view.floor(),this._shake.x=Math.floor(this._shake.x),this._shake.y=Math.floor(this._shake.y)),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},updateFX:function(){0===this._fxType?(this.fx.alpha-=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha<=0&&(this._fxDuration=0,this.fx.alpha=0,this.onFlashComplete.dispatch())):(this.fx.alpha+=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha>=1&&(this._fxDuration=0,this.fx.alpha=1,this.onFadeComplete.dispatch()))},updateShake:function(){this._shake.duration-=this.game.time.elapsedMS,this._shake.duration<=0?(this.onShakeComplete.dispatch(),this._shake.x=0,this._shake.y=0):(this._shake.horizontal&&(this._shake.x=this.game.rnd.frac()*this._shake.intensity*this.view.width*2-this._shake.intensity*this.view.width),this._shake.vertical&&(this._shake.y=this.game.rnd.frac()*this._shake.intensity*this.view.height*2-this._shake.intensity*this.view.height))},updateTarget:function(){this._targetPosition.x=this.view.x+this.target.worldPosition.x,this._targetPosition.y=this.view.y+this.target.worldPosition.y,this.deadzone?(this._edge=this._targetPosition.x-this.view.x,this._edgethis.deadzone.right&&(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.deadzone.right,this.lerp.x)),this._edge=this._targetPosition.y-this.view.y,this._edgethis.deadzone.bottom&&(this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.deadzone.bottom,this.lerp.y))):(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.view.halfWidth,this.lerp.x),this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.view.halfHeight,this.lerp.y)),this.bounds&&this.checkBounds(),this.roundPx&&this.view.floor(),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},setBoundsToWorld:function(){this.bounds&&this.bounds.copyFrom(this.game.world.bounds)},checkBounds:function(){this.atLimit.x=!1,this.atLimit.y=!1;var a=this.view.x+this._shake.x,b=this.view.right+this._shake.x,c=this.view.y+this._shake.y,d=this.view.bottom+this._shake.y;a<=this.bounds.x*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.x*this.scale.x,this._shake.shakeBounds||(this._shake.x=0)),b>=this.bounds.right*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.right*this.scale.x-this.width,this._shake.shakeBounds||(this._shake.x=0)),c<=this.bounds.top*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.top*this.scale.y,this._shake.shakeBounds||(this._shake.y=0)),d>=this.bounds.bottom*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.bottom*this.scale.y-this.height,this._shake.shakeBounds||(this._shake.y=0))},setPosition:function(a,b){this.view.x=a,this.view.y=b,this.bounds&&this.checkBounds()},setSize:function(a,b){this.view.width=a,this.view.height=b},reset:function(){this.target=null,this.view.x=0,this.view.y=0,this._shake.duration=0,this.resetFX()},resetFX:function(){this.fx&&(this.fx.clear(),this.fx.alpha=0,this._fxDuration=0)}},c.Camera.prototype.constructor=c.Camera,Object.defineProperty(c.Camera.prototype,"x",{get:function(){return this.view.x},set:function(a){this.view.x=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"y",{get:function(){return this.view.y},set:function(a){this.view.y=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"position",{get:function(){return this._position.set(this.view.x,this.view.y),this._position},set:function(a){void 0!==a.x&&(this.view.x=a.x),void 0!==a.y&&(this.view.y=a.y),this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"width",{get:function(){return this.view.width},set:function(a){this.view.width=a}}),Object.defineProperty(c.Camera.prototype,"height",{get:function(){return this.view.height},set:function(a){this.view.height=a}}),Object.defineProperty(c.Camera.prototype,"shakeIntensity",{get:function(){return this._shake.intensity},set:function(a){this._shake.intensity=a}}),c.State=function(){this.game=null,this.key="",this.add=null,this.make=null,this.camera=null,this.cache=null,this.input=null,this.load=null,this.math=null,this.sound=null,this.scale=null,this.stage=null,this.state=null,this.time=null,this.tweens=null,this.world=null,this.particles=null,this.physics=null,this.rnd=null},c.State.prototype={init:function(){},preload:function(){},loadUpdate:function(){},loadRender:function(){},create:function(){},update:function(){},preRender:function(){},render:function(){},resize:function(){},paused:function(){},resumed:function(){},pauseUpdate:function(){},shutdown:function(){}},c.State.prototype.constructor=c.State,c.StateManager=function(a,b){this.game=a,this.states={},this._pendingState=null,void 0!==b&&null!==b&&(this._pendingState=b),this._clearWorld=!1,this._clearCache=!1,this._created=!1,this._args=[],this.current="",this.onStateChange=new c.Signal,this.onInitCallback=null,this.onPreloadCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPreRenderCallback=null,this.onLoadUpdateCallback=null,this.onLoadRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.onShutDownCallback=null},c.StateManager.prototype={boot:function(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),null!==this._pendingState&&"string"!=typeof this._pendingState&&this.add("default",this._pendingState,!0)},add:function(a,b,d){void 0===d&&(d=!1);var e;return b instanceof c.State?e=b:"object"==typeof b?(e=b,e.game=this.game):"function"==typeof b&&(e=new b(this.game)),this.states[a]=e,d&&(this.game.isBooted?this.start(a):this._pendingState=a),e},remove:function(a){this.current===a&&(this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onPreRenderCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null),delete this.states[a]},start:function(a,b,c){void 0===b&&(b=!0),void 0===c&&(c=!1),this.checkState(a)&&(this._pendingState=a,this._clearWorld=b,this._clearCache=c,arguments.length>3&&(this._args=Array.prototype.splice.call(arguments,3)))},restart:function(a,b){void 0===a&&(a=!0),void 0===b&&(b=!1),this._pendingState=this.current,this._clearWorld=a,this._clearCache=b,arguments.length>2&&(this._args=Array.prototype.slice.call(arguments,2))},dummy:function(){},preUpdate:function(){if(this._pendingState&&this.game.isBooted){var a=this.current;if(this.clearCurrentState(),this.setCurrentState(this._pendingState),this.onStateChange.dispatch(this.current,a),this.current!==this._pendingState)return;this._pendingState=null,this.onPreloadCallback?(this.game.load.reset(!0),this.onPreloadCallback.call(this.callbackContext,this.game),0===this.game.load.totalQueuedFiles()&&0===this.game.load.totalQueuedPacks()?this.loadComplete():this.game.load.start()):this.loadComplete()}},clearCurrentState:function(){this.current&&(this.onShutDownCallback&&this.onShutDownCallback.call(this.callbackContext,this.game),this.game.tweens.removeAll(),this.game.camera.reset(),this.game.input.reset(!0),this.game.physics.clear(),this.game.time.removeAll(),this.game.scale.reset(this._clearWorld),this.game.debug&&this.game.debug.reset(),this._clearWorld&&(this.game.world.shutdown(),this._clearCache&&this.game.cache.destroy()))},checkState:function(a){return this.states[a]?!!(this.states[a].preload||this.states[a].create||this.states[a].update||this.states[a].render)||(console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render"),!1):(console.warn("Phaser.StateManager - No state found with the key: "+a),!1)},link:function(a){this.states[a].game=this.game,this.states[a].add=this.game.add,this.states[a].make=this.game.make,this.states[a].camera=this.game.camera,this.states[a].cache=this.game.cache,this.states[a].input=this.game.input,this.states[a].load=this.game.load,this.states[a].math=this.game.math,this.states[a].sound=this.game.sound,this.states[a].scale=this.game.scale,this.states[a].state=this,this.states[a].stage=this.game.stage,this.states[a].time=this.game.time,this.states[a].tweens=this.game.tweens,this.states[a].world=this.game.world,this.states[a].particles=this.game.particles,this.states[a].rnd=this.game.rnd,this.states[a].physics=this.game.physics,this.states[a].key=a},unlink:function(a){this.states[a]&&(this.states[a].game=null,this.states[a].add=null,this.states[a].make=null,this.states[a].camera=null,this.states[a].cache=null,this.states[a].input=null,this.states[a].load=null,this.states[a].math=null,this.states[a].sound=null,this.states[a].scale=null,this.states[a].state=null,this.states[a].stage=null,this.states[a].time=null,this.states[a].tweens=null,this.states[a].world=null,this.states[a].particles=null,this.states[a].rnd=null,this.states[a].physics=null)},setCurrentState:function(a){this.callbackContext=this.states[a],this.link(a),this.onInitCallback=this.states[a].init||this.dummy,this.onPreloadCallback=this.states[a].preload||null,this.onLoadRenderCallback=this.states[a].loadRender||null,this.onLoadUpdateCallback=this.states[a].loadUpdate||null,this.onCreateCallback=this.states[a].create||null,this.onUpdateCallback=this.states[a].update||null,this.onPreRenderCallback=this.states[a].preRender||null,this.onRenderCallback=this.states[a].render||null,this.onResizeCallback=this.states[a].resize||null,this.onPausedCallback=this.states[a].paused||null,this.onResumedCallback=this.states[a].resumed||null,this.onPauseUpdateCallback=this.states[a].pauseUpdate||null,this.onShutDownCallback=this.states[a].shutdown||this.dummy,""!==this.current&&this.game.physics.reset(),this.current=a,this._created=!1,this.onInitCallback.apply(this.callbackContext,this._args),a===this._pendingState&&(this._args=[]),this.game._kickstart=!0},getCurrentState:function(){return this.states[this.current]},loadComplete:function(){!1===this._created&&this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game),!1===this._created&&this.onCreateCallback?(this._created=!0,this.onCreateCallback.call(this.callbackContext,this.game)):this._created=!0},pause:function(){this._created&&this.onPausedCallback&&this.onPausedCallback.call(this.callbackContext,this.game)},resume:function(){this._created&&this.onResumedCallback&&this.onResumedCallback.call(this.callbackContext,this.game)},update:function(){this._created?this.onUpdateCallback&&this.onUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},pauseUpdate:function(){this._created?this.onPauseUpdateCallback&&this.onPauseUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},preRender:function(a){this._created&&this.onPreRenderCallback&&this.onPreRenderCallback.call(this.callbackContext,this.game,a)},resize:function(a,b){this.onResizeCallback&&this.onResizeCallback.call(this.callbackContext,a,b)},render:function(){this._created?this.onRenderCallback&&(this.game.renderType===c.CANVAS?(this.game.context.save(),this.game.context.setTransform(1,0,0,1,0,0),this.onRenderCallback.call(this.callbackContext,this.game),this.game.context.restore()):this.onRenderCallback.call(this.callbackContext,this.game)):this.onLoadRenderCallback&&this.onLoadRenderCallback.call(this.callbackContext,this.game)},destroy:function(){this._clearWorld=!0,this._clearCache=!0,this.clearCurrentState(),this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.game=null,this.states={},this._pendingState=null,this.current=""}},c.StateManager.prototype.constructor=c.StateManager,Object.defineProperty(c.StateManager.prototype,"created",{get:function(){return this._created}}),c.Signal=function(){},c.Signal.prototype={_bindings:null,_prevParams:null,memorize:!1,_shouldPropagate:!0,active:!0,_boundDispatch:!1,validateListener:function(a,b){if("function"!=typeof a)throw new Error("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,b,d,e,f){var g,h=this._indexOfListener(a,d);if(-1!==h){if(g=this._bindings[h],g.isOnce()!==b)throw new Error("You cannot add"+(b?"":"Once")+"() then add"+(b?"Once":"")+"() the same listener without removing the relationship first.")}else g=new c.SignalBinding(this,a,b,d,e,f),this._addBinding(g);return this.memorize&&this._prevParams&&g.execute(this._prevParams),g},_addBinding:function(a){this._bindings||(this._bindings=[]);var b=this._bindings.length;do{b--}while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){if(!this._bindings)return-1;void 0===b&&(b=null);for(var c,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)return d;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){this.validateListener(a,"add");var d=[];if(arguments.length>3)for(var e=3;e3)for(var e=3;e=this.children.length?-1:this.getChildAt(a)},c.Group.prototype.create=function(a,b,c,d,e,f){void 0===e&&(e=!0);var g=new this.classType(this.game,a,b,c,d);return g.exists=e,g.visible=e,g.alive=e,this.add(g,!1,f)},c.Group.prototype.createMultiple=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=!1),Array.isArray(b)||(b=[b]),Array.isArray(c)||(c=[c]);var e=this,f=[];return b.forEach(function(b){c.forEach(function(c){for(var g=0;gthis.children.length||-1===a&&-1===b)return!1;for(var h=new c.Rectangle(0,0,d,e),i=a*d,j=b*e,k=g;kthis.children.length-1&&(a=0),this.cursor)return this.cursorIndex=a,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.next=function(){if(this.cursor)return this.cursorIndex>=this.children.length-1?this.cursorIndex=0:this.cursorIndex++,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.previous=function(){if(this.cursor)return 0===this.cursorIndex?this.cursorIndex=this.children.length-1:this.cursorIndex--,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.swap=function(a,b){this.swapChildren(a,b),this.updateZ()},c.Group.prototype.bringToTop=function(a){return a.parent===this&&this.getIndex(a)0&&(this.remove(a,!1,!0),this.addAt(a,0,!0)),a},c.Group.prototype.moveUp=function(a){if(a.parent===this&&this.getIndex(a)0){var b=this.getIndex(a),c=this.getAt(b-1);c&&this.swap(a,c)}return a},c.Group.prototype.xy=function(a,b,c){if(a<0||a>this.children.length)return-1;this.getChildAt(a).x=b,this.getChildAt(a).y=c},c.Group.prototype.reverse=function(){this.children.reverse(),this.updateZ()},c.Group.prototype.getIndex=function(a){return this.children.indexOf(a)},c.Group.prototype.getByName=function(a){for(var b=0;b0))return!1;var f=b.length;return 1===f?0===d?a[b[0]]=c:1===d?a[b[0]]+=c:2===d?a[b[0]]-=c:3===d?a[b[0]]*=c:4===d&&(a[b[0]]/=c):2===f?0===d?a[b[0]][b[1]]=c:1===d?a[b[0]][b[1]]+=c:2===d?a[b[0]][b[1]]-=c:3===d?a[b[0]][b[1]]*=c:4===d&&(a[b[0]][b[1]]/=c):3===f?0===d?a[b[0]][b[1]][b[2]]=c:1===d?a[b[0]][b[1]][b[2]]+=c:2===d?a[b[0]][b[1]][b[2]]-=c:3===d?a[b[0]][b[1]][b[2]]*=c:4===d&&(a[b[0]][b[1]][b[2]]/=c):4===f&&(0===d?a[b[0]][b[1]][b[2]][b[3]]=c:1===d?a[b[0]][b[1]][b[2]][b[3]]+=c:2===d?a[b[0]][b[1]][b[2]][b[3]]-=c:3===d?a[b[0]][b[1]][b[2]][b[3]]*=c:4===d&&(a[b[0]][b[1]][b[2]][b[3]]/=c)),!0},c.Group.prototype.checkProperty=function(a,b,d,e){return void 0===e&&(e=!1),!(!c.Utils.getProperty(a,b)&&e)&&c.Utils.getProperty(a,b)===d},c.Group.prototype.set=function(a,b,c,d,e,f,g){if(void 0===g&&(g=!1),b=b.split("."),void 0===d&&(d=!1),void 0===e&&(e=!1),(!1===d||d&&a.alive)&&(!1===e||e&&a.visible))return this.setProperty(a,b,c,f,g)},c.Group.prototype.setAll=function(a,b,c,d,e,f){void 0===c&&(c=!1),void 0===d&&(d=!1),void 0===f&&(f=!1),a=a.split("."),e=e||0;for(var g=0;g2){c=[];for(var d=2;d2){e=[];for(var f=2;f2){d=[null];for(var e=2;e2){d=[null];for(var e=2;e2){d=[null];for(var e=2;eb[this._sortProperty]?1:a.zb[this._sortProperty]?-1:0},c.Group.prototype.iterate=function(a,b,d,e,f,g){if(0===this.children.length){if(d===c.Group.RETURN_TOTAL)return 0;if(d===c.Group.RETURN_ALL)return[]}var h=0;if(d===c.Group.RETURN_ALL)var i=[];for(var j=0;j0)return this.children[this.children.length-1]},c.Group.prototype.getBottom=function(){if(this.children.length>0)return this.children[0]},c.Group.prototype.getClosestTo=function(a,b,d){for(var e=Number.MAX_VALUE,f=0,g=null,h=0;he&&(!b||b.call(d,i,f))&&(e=f,g=i)}return g},c.Group.prototype.countLiving=function(){return this.iterate("alive",!0,c.Group.RETURN_TOTAL)},c.Group.prototype.countDead=function(){return this.iterate("alive",!1,c.Group.RETURN_TOTAL)},c.Group.prototype.getRandom=function(a,b){return void 0===a&&(a=0),void 0===b&&(b=this.children.length),0===b?null:c.ArrayUtils.getRandomItem(this.children,a,b)},c.Group.prototype.getRandomExists=function(a,b){var c=this.getAll("exists",!0,a,b);return this.game.rnd.pick(c)},c.Group.prototype.getAll=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=this.children.length);for(var e=[],f=c;f0&&a instanceof c.Group){do{a.add(this.children[0],b)}while(this.children.length>0);this.hash=[],this.cursor=null}return a},c.Group.prototype.removeAll=function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=!1),void 0===c&&(c=!1),0!==this.children.length){do{!b&&this.children[0].events&&this.children[0].events.onRemovedFromGroup$dispatch(this.children[0],this);var d=this.removeChild(this.children[0]);this.removeFromHash(d),a&&d&&d.destroy(!0,c)}while(this.children.length>0);this.hash=[],this.cursor=null}},c.Group.prototype.removeBetween=function(a,b,c,d){if(void 0===b&&(b=this.children.length-1),void 0===c&&(c=!1),void 0===d&&(d=!1),0!==this.children.length){if(a>b||a<0||b>this.children.length)return!1;for(var e=b;e>=a;){!d&&this.children[e].events&&this.children[e].events.onRemovedFromGroup$dispatch(this.children[e],this);var f=this.removeChild(this.children[e]);this.removeFromHash(f),c&&f&&f.destroy(!0),this.cursor===this.children[e]&&(this.cursor=null),e--}this.updateZ()}},c.Group.prototype.destroy=function(a,b){null===this.game||this.ignoreDestroy||(void 0===a&&(a=!0),void 0===b&&(b=!1),this.onDestroy.dispatch(this,a,b),this.removeAll(a),this.cursor=null,this.filters=null,this.pendingDestroy=!1,b||(this.parent&&this.parent.removeChild(this),this.game=null,this.exists=!1))},Object.defineProperty(c.Group.prototype,"total",{get:function(){return this.iterate("exists",!0,c.Group.RETURN_TOTAL)}}),Object.defineProperty(c.Group.prototype,"length",{get:function(){return this.children.length}}),Object.defineProperty(c.Group.prototype,"angle",{get:function(){return c.Math.radToDeg(this.rotation)},set:function(a){this.rotation=c.Math.degToRad(a)}}),Object.defineProperty(c.Group.prototype,"centerX",{get:function(){return this.getBounds(this.parent).centerX},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.halfWidth}}),Object.defineProperty(c.Group.prototype,"centerY",{get:function(){return this.getBounds(this.parent).centerY},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.halfHeight}}),Object.defineProperty(c.Group.prototype,"left",{get:function(){return this.getBounds(this.parent).left},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c}}),Object.defineProperty(c.Group.prototype,"right",{get:function(){return this.getBounds(this.parent).right},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.width}}),Object.defineProperty(c.Group.prototype,"top",{get:function(){return this.getBounds(this.parent).top},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c}}),Object.defineProperty(c.Group.prototype,"bottom",{get:function(){return this.getBounds(this.parent).bottom},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.height}}),c.World=function(a){c.Group.call(this,a,null,"__world",!1),this.bounds=new c.Rectangle(0,0,a.width,a.height),this.camera=null,this._definedSize=!1,this._width=a.width,this._height=a.height,this.game.state.onStateChange.add(this.stateChange,this)},c.World.prototype=Object.create(c.Group.prototype),c.World.prototype.constructor=c.World,c.World.prototype.boot=function(){this.camera=new c.Camera(this.game,0,0,0,this.game.width,this.game.height),this.game.stage.addChild(this),this.camera.boot()},c.World.prototype.stateChange=function(){this.x=0,this.y=0,this.camera.reset()},c.World.prototype.setBounds=function(a,b,c,d){this._definedSize=!0,this._width=c,this._height=d,this.bounds.setTo(a,b,c,d),this.x=a,this.y=b,this.camera.bounds&&this.camera.bounds.setTo(a,b,Math.max(c,this.game.width),Math.max(d,this.game.height)),this.game.physics.setBoundsToWorld()},c.World.prototype.resize=function(a,b){this._definedSize&&(athis.bounds.right&&(a.x=this.bounds.left)),e&&(a.y+a._currentBounds.heightthis.bounds.bottom&&(a.y=this.bounds.top))):(d&&a.x+bthis.bounds.right&&(a.x=this.bounds.left-b),e&&a.y+bthis.bounds.bottom&&(a.y=this.bounds.top-b))},Object.defineProperty(c.World.prototype,"width",{get:function(){return this.bounds.width},set:function(a){a1&&!this.forceSingleUpdate)this.time.time>this._nextFpsNotification&&(this._nextFpsNotification=this.time.time+1e4,this.fpsProblemNotifier.dispatch()),this._deltaTime=0,this._spiraling=0,this.updateRender(this.time.slowMotion*this.time.desiredFps);else{var b=1e3*this.time.slowMotion/this.time.desiredFps;this._deltaTime+=Math.max(Math.min(3*b,this.time.elapsed),0);var c=0;for(this.updatesThisFrame=Math.floor(this._deltaTime/b),this.forceSingleUpdate&&(this.updatesThisFrame=Math.min(1,this.updatesThisFrame));this._deltaTime>=b&&(this._deltaTime-=b,this.currentUpdateID=c,this.updateLogic(this.time.desiredFpsMult),c++,!this.forceSingleUpdate||1!==c);)this.time.refresh();c>this._lastCount?this._spiraling++:c=c.Input.MAX_POINTERS)return console.warn("Phaser.Input.addPointer: Maximum limit of "+c.Input.MAX_POINTERS+" pointers reached."),null;var a=this.pointers.length+1,b=new c.Pointer(this.game,a,c.PointerMode.TOUCH);return this.pointers.push(b),this["pointer"+a]=b,b},update:function(){if(this.keyboard&&this.keyboard.update(),this.pollRate>0&&this._pollCounter=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(a);if(!this.pointer2.active)return this.pointer2.start(a);for(var b=2;b0;c++){this.pointers[c].active&&b--}return a-b},getPointer:function(a){void 0===a&&(a=!1);for(var b=0;b=g&&this._localPoint.x=h&&this._localPoint.y=g&&this._localPoint.x=h&&this._localPoint.y0&&this._pollCounterthis.game.time.time},justReleased:function(a){return a=a||250,this.isUp&&this.timeUp+a>this.game.time.time},reset:function(){this.isDown=!1,this.isUp=!0,this.timeDown=this.game.time.time,this.repeats=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1},destroy:function(){this.onDown.dispose(),this.onUp.dispose(),this.onFloat.dispose(),this.parent=null,this.game=null}},c.DeviceButton.prototype.constructor=c.DeviceButton,Object.defineProperty(c.DeviceButton.prototype,"duration",{get:function(){return this.isUp?-1:this.game.time.time-this.timeDown}}),c.Pointer=function(a,b,d){this.game=a,this.id=b,this.type=c.POINTER,this.exists=!0,this.identifier=0,this.pointerId=null,this.pointerMode=d||c.PointerMode.CURSOR|c.PointerMode.CONTACT,this.target=null,this.button=null,this.leftButton=new c.DeviceButton(this,c.Pointer.LEFT_BUTTON),this.middleButton=new c.DeviceButton(this,c.Pointer.MIDDLE_BUTTON),this.rightButton=new c.DeviceButton(this,c.Pointer.RIGHT_BUTTON),this.backButton=new c.DeviceButton(this,c.Pointer.BACK_BUTTON),this.forwardButton=new c.DeviceButton(this,c.Pointer.FORWARD_BUTTON),this.eraserButton=new c.DeviceButton(this,c.Pointer.ERASER_BUTTON),this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isMouse=0===b,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new c.Point,this.positionDown=new c.Point,this.positionUp=new c.Point,this.circle=new c.Circle(0,0,44),this._clickTrampolines=null,this._trampolineTargetObject=null},c.Pointer.NO_BUTTON=0,c.Pointer.LEFT_BUTTON=1,c.Pointer.RIGHT_BUTTON=2,c.Pointer.MIDDLE_BUTTON=4,c.Pointer.BACK_BUTTON=8,c.Pointer.FORWARD_BUTTON=16,c.Pointer.ERASER_BUTTON=32,c.Pointer.prototype={resetButtons:function(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())},processButtonsDown:function(a,b){c.Pointer.LEFT_BUTTON&a&&this.leftButton.start(b),c.Pointer.RIGHT_BUTTON&a&&this.rightButton.start(b),c.Pointer.MIDDLE_BUTTON&a&&this.middleButton.start(b),c.Pointer.BACK_BUTTON&a&&this.backButton.start(b),c.Pointer.FORWARD_BUTTON&a&&this.forwardButton.start(b),c.Pointer.ERASER_BUTTON&a&&this.eraserButton.start(b)},processButtonsUp:function(a,b){a===c.Mouse.LEFT_BUTTON&&this.leftButton.stop(b),a===c.Mouse.RIGHT_BUTTON&&this.rightButton.stop(b),a===c.Mouse.MIDDLE_BUTTON&&this.middleButton.stop(b),a===c.Mouse.BACK_BUTTON&&this.backButton.stop(b),a===c.Mouse.FORWARD_BUTTON&&this.forwardButton.stop(b),5===a&&this.eraserButton.stop(b)},updateButtons:function(a){this.button=a.button;var b="down"===a.type.toLowerCase().substr(-4);void 0!==a.buttons?b?this.processButtonsDown(a.buttons,a):this.processButtonsUp(a.button,a):b?this.leftButton.start(a):(this.leftButton.stop(a),this.rightButton.stop(a)),1===a.buttons&&a.ctrlKey&&this.leftButton.isDown&&(this.leftButton.stop(a),this.rightButton.start(a)),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)},start:function(a){var b=this.game.input;return a.pointerId&&(this.pointerId=a.pointerId),this.identifier=a.identifier,this.target=a.target,this.isMouse?this.updateButtons(a):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this._clickTrampolines=null,this._trampolineTargetObject=null,this.msSinceLastClick=this.game.time.time-this.timeDown,this.timeDown=this.game.time.time,this._holdSent=!1,this.move(a,!0),this.positionDown.setTo(this.x,this.y),(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.x=this.x,b.y=this.y,b.position.setTo(this.x,this.y),b.onDown.dispatch(this,a),b.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&this.targetObject._touchedHandler(this),this},update:function(){var a=this.game.input +;this.active&&(this.dirty&&(a.interactiveItems.total>0&&this.processInteractiveObjects(!1),this.dirty=!1),!1===this._holdSent&&this.duration>=a.holdRate&&((a.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||a.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||a.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===a.totalActivePointers)&&a.onHold.dispatch(this),this._holdSent=!0),a.recordPointerHistory&&this.game.time.time>=this._nextDrop&&(this._nextDrop=this.game.time.time+a.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>a.recordLimit&&this._history.shift()))},move:function(a,b){var d=this.game.input;if(!d.pollLocked){void 0===b&&(b=!1),void 0!==a.button&&(this.button=a.button),b&&this.isMouse&&this.updateButtons(a),this.clientX=a.clientX,this.clientY=a.clientY,this.pageX=a.pageX,this.pageY=a.pageY,this.screenX=a.screenX,this.screenY=a.screenY,this.isMouse&&d.mouse.locked&&!b&&(this.rawMovementX=a.movementX||a.mozMovementX||a.webkitMovementX||0,this.rawMovementY=a.movementY||a.mozMovementY||a.webkitMovementY||0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.offset.x)*d.scale.x,this.y=(this.pageY-this.game.scale.offset.y)*d.scale.y,this.position.setTo(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(d.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||d.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||d.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===d.totalActivePointers)&&(d.activePointer=this,d.x=this.x,d.y=this.y,d.position.setTo(d.x,d.y),d.circle.x=d.x,d.circle.y=d.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY);for(var e=d.moveCallbacks.length;e--;)d.moveCallbacks[e].callback.call(d.moveCallbacks[e].context,this,this.x,this.y,b);return null!==this.targetObject&&!0===this.targetObject.isDragged?!1===this.targetObject.update(this)&&(this.targetObject=null):d.interactiveItems.total>0&&this.processInteractiveObjects(b),this}},processInteractiveObjects:function(a){var b=0,c=-1,d=null,e=this.game.input.interactiveItems.first;for(this.interactiveCandidates=[];e;)e.checked=!1,e.validForInput(c,b,!1)&&(e.checked=!0,(a&&e.checkPointerDown(this,!0)||!a&&e.checkPointerOver(this,!0))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e))),e=this.game.input.interactiveItems.next;for(e=this.game.input.interactiveItems.first;e;)!e.checked&&e.validForInput(c,b,!0)&&(a&&e.checkPointerDown(this,!1)||!a&&e.checkPointerOver(this,!1))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e)),e=this.game.input.interactiveItems.next;return this.game.input.customCandidateHandler&&(d=this.game.input.customCandidateHandler.call(this.game.input.customCandidateHandlerContext,this,this.interactiveCandidates,d)),this.swapTarget(d,!1),null!==this.targetObject},swapTarget:function(a,b){void 0===b&&(b=!1),null===a?this.targetObject&&(this.targetObject._pointerOutHandler(this,b),this.targetObject=null):null===this.targetObject?(this.targetObject=a,a._pointerOverHandler(this,b)):this.targetObject===a?!1===a.update(this)&&(this.targetObject=null):(this.targetObject._pointerOutHandler(this,b),this.targetObject=a,this.targetObject._pointerOverHandler(this,b))},leave:function(a){this.withinGame=!1,this.move(a,!1)},stop:function(a){var b=this.game.input;return this._stateReset&&this.withinGame?void a.preventDefault():(this.timeUp=this.game.time.time,(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.onUp.dispatch(this,a),this.duration>=0&&this.duration<=b.tapRate&&(this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(a.pageX,a.pageY),this.pointerId=null,this.identifier=null,this.positionUp.setTo(this.x,this.y),!1===this.isMouse&&b.currentPointers--,b.interactiveItems.callAll("_releasedHandler",this),this._clickTrampolines&&(this._trampolineTargetObject=this.targetObject),this.targetObject=null,this)},justPressed:function(a){return a=a||this.game.input.justPressedRate,!0===this.isDown&&this.timeDown+a>this.game.time.time},justReleased:function(a){return a=a||this.game.input.justReleasedRate,this.isUp&&this.timeUp+a>this.game.time.time},addClickTrampoline:function(a,b,c,d){if(this.isDown){for(var e=this._clickTrampolines=this._clickTrampolines||[],f=0;fa||this.priorityID===a&&this.sprite.renderOrderID>b))},isPixelPerfect:function(){return this.pixelPerfectClick||this.pixelPerfectOver},pointerX:function(a){return a=a||0,this._pointerData[a].x},pointerY:function(a){return a=a||0,this._pointerData[a].y},pointerDown:function(a){return a=a||0,this._pointerData[a].isDown},pointerUp:function(a){return a=a||0,this._pointerData[a].isUp},pointerTimeDown:function(a){return a=a||0,this._pointerData[a].timeDown},pointerTimeUp:function(a){return a=a||0,this._pointerData[a].timeUp},pointerOver:function(a){if(!this.enabled)return!1;if(void 0===a){for(var b=0;b<10;b++)if(this._pointerData[b].isOver)return!0;return!1}return this._pointerData[a].isOver},pointerOut:function(a){if(!this.enabled)return!1;if(void 0!==a)return this._pointerData[a].isOut;for(var b=0;b<10;b++)if(this._pointerData[b].isOut)return!0},pointerTimeOver:function(a){return a=a||0,this._pointerData[a].timeOver},pointerTimeOut:function(a){return a=a||0,this._pointerData[a].timeOut},pointerDragged:function(a){return a=a||0,this._pointerData[a].isDragged},checkPointerDown:function(a,b){return!!(a.isDown&&this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectClick)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPointerOver:function(a,b){return!!(this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectOver)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPixel:function(a,b,c){if(this.sprite.texture.baseTexture.source){if(null===a&&null===b){this.game.input.getLocalPosition(this.sprite,c,this._tempPoint);var a=this._tempPoint.x,b=this._tempPoint.y}if(0!==this.sprite.anchor.x&&(a-=-this.sprite.texture.frame.width*this.sprite.anchor.x),0!==this.sprite.anchor.y&&(b-=-this.sprite.texture.frame.height*this.sprite.anchor.y),a+=this.sprite.texture.frame.x,b+=this.sprite.texture.frame.y,this.sprite.texture.trim&&(a-=this.sprite.texture.trim.x,b-=this.sprite.texture.trim.y,athis.sprite.texture.crop.right||bthis.sprite.texture.crop.bottom))return this._dx=a,this._dy=b,!1;this._dx=a,this._dy=b,this.game.input.hitContext.clearRect(0,0,1,1),this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source,a,b,1,1,0,0,1,1);if(this.game.input.hitContext.getImageData(0,0,1,1).data[3]>=this.pixelPerfectAlpha)return!0}return!1},update:function(a){if(null!==this.sprite&&void 0!==this.sprite.parent)return this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=c.Math.distance(a.x,a.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(a),!0):this.draggable&&this._draggedPointerID===a.id?this.updateDrag(a,!1):this._pointerData[a.id].isOver?this.checkPointerOver(a)?(this._pointerData[a.id].x=a.x-this.sprite.x,this._pointerData[a.id].y=a.y-this.sprite.y,!0):(this._pointerOutHandler(a),!1):void 0:(this._pointerOutHandler(a),!1)},_pointerOverHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];if(!1===d.isOver||a.dirty){var e=!1===d.isOver;d.isOver=!0,d.isOut=!1,d.timeOver=this.game.time.time,d.x=a.x-this.sprite.x,d.y=a.y-this.sprite.y,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!b&&e&&this.sprite&&this.sprite.events&&this.sprite.events.onInputOver$dispatch(this.sprite,a),this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,a)}}},_pointerOutHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];d.isOver=!1,d.isOut=!0,d.timeOut=this.game.time.time,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),!b&&this.sprite&&this.sprite.events&&(this.sprite.events.onInputOut$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,a))}},_touchedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(!b.isDown&&b.isOver){if(this.pixelPerfectClick&&!this.checkPixel(null,null,a))return;if(b.isDown=!0,b.isUp=!1,b.timeDown=this.game.time.time,this.downPoint.set(a.x,a.y),a.dirty=!0,this.sprite&&this.sprite.events&&(this.sprite.events.onInputDown$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,a),null===this.sprite))return;this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(a):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.add(this.dragTimeThreshold,this.dragTimeElapsed,this,a)):this._dragTimePass=!0)),this.bringToTop&&this.sprite.bringToTop()}}},dragTimeElapsed:function(a){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(a)},_releasedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(b.isDown&&a.isUp){b.isDown=!1,b.isUp=!0,b.timeUp=this.game.time.time,b.downDuration=b.timeUp-b.timeDown;var d=this.checkPointerOver(a);this.sprite&&this.sprite.events&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===a.id)||this.sprite.events.onInputUp$dispatch(this.sprite,a,d),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,a,d),d&&(d=this.checkPointerOver(a))),b.isOver=d,!d&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),a.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===a.id&&this.stopDrag(a)}}},updateDrag:function(a,b){if(void 0===b&&(b=!1),a.isUp)return this.stopDrag(a),!1;var c=this.globalToLocalX(a.x)+this._dragPoint.x+this.dragOffset.x,d=this.globalToLocalY(a.y)+this._dragPoint.y+this.dragOffset.y;if(this.sprite.fixedToCamera)this.allowHorizontalDrag&&(this.sprite.cameraOffset.x=c),this.allowVerticalDrag&&(this.sprite.cameraOffset.y=d),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.cameraOffset.x=Math.round((this.sprite.cameraOffset.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.cameraOffset.y=Math.round((this.sprite.cameraOffset.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.cameraOffset.x,this.sprite.cameraOffset.y));else{var e=this.game.camera.x-this._pointerData[a.id].camX,f=this.game.camera.y-this._pointerData[a.id].camY;this.allowHorizontalDrag&&(this.sprite.x=c+e),this.allowVerticalDrag&&(this.sprite.y=d+f),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.x=Math.round((this.sprite.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.y=Math.round((this.sprite.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.x,this.sprite.y))}return this.sprite.events.onDragUpdate.dispatch(this.sprite,a,c,d,this.snapPoint,b),!0},justOver:function(a,b){return a=a||0,b=b||500,this._pointerData[a].isOver&&this.overDuration(a)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height)):(this.sprite.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.offsetY)))},checkBoundsSprite:function(){this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera?(this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height)):(this.sprite.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.offsetY)))}},c.InputHandler.prototype.constructor=c.InputHandler,c.Gamepad=function(a){this.game=a,this._gamepadIndexMap={},this._rawPads=[],this._active=!1,this.enabled=!0,this._gamepadSupportAvailable=!!navigator.webkitGetGamepads||!!navigator.webkitGamepads||-1!==navigator.userAgent.indexOf("Firefox/")||!!navigator.getGamepads,this._prevRawGamepadTypes=[],this._prevTimestamps=[],this.callbackContext=this,this.onConnectCallback=null,this.onDisconnectCallback=null,this.onDownCallback=null,this.onUpCallback=null,this.onAxisCallback=null,this.onFloatCallback=null,this._ongamepadconnected=null,this._gamepaddisconnected=null,this._gamepads=[new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this)]},c.Gamepad.prototype={addCallbacks:function(a,b){void 0!==b&&(this.onConnectCallback="function"==typeof b.onConnect?b.onConnect:this.onConnectCallback,this.onDisconnectCallback="function"==typeof b.onDisconnect?b.onDisconnect:this.onDisconnectCallback,this.onDownCallback="function"==typeof b.onDown?b.onDown:this.onDownCallback,this.onUpCallback="function"==typeof b.onUp?b.onUp:this.onUpCallback,this.onAxisCallback="function"==typeof b.onAxis?b.onAxis:this.onAxisCallback,this.onFloatCallback="function"==typeof b.onFloat?b.onFloat:this.onFloatCallback,this.callbackContext=a)},start:function(){if(!this._active){this._active=!0;var a=this;this._onGamepadConnected=function(b){return a.onGamepadConnected(b)},this._onGamepadDisconnected=function(b){return a.onGamepadDisconnected(b)},window.addEventListener("gamepadconnected",this._onGamepadConnected,!1),window.addEventListener("gamepaddisconnected",this._onGamepadDisconnected,!1)}},onGamepadConnected:function(a){var b=a.gamepad;this._rawPads.push(b),this._gamepads[b.index].connect(b)},onGamepadDisconnected:function(a){var b=a.gamepad;for(var c in this._rawPads)this._rawPads[c].index===b.index&&this._rawPads.splice(c,1);this._gamepads[b.index].disconnect()},update:function(){this._pollGamepads(),this.pad1.pollStatus(),this.pad2.pollStatus(),this.pad3.pollStatus(),this.pad4.pollStatus()},_pollGamepads:function(){if(this._active){if(navigator.getGamepads)var a=navigator.getGamepads();else if(navigator.webkitGetGamepads)var a=navigator.webkitGetGamepads();else if(navigator.webkitGamepads)var a=navigator.webkitGamepads();if(a){this._rawPads=[];for(var b=!1,c=0;c0&&d>this.deadZone||d<0&&d<-this.deadZone?this.processAxisChange(c,d):this.processAxisChange(c,0)}this._prevTimestamp=this._rawPad.timestamp}},connect:function(a){var b=!this.connected;this.connected=!0,this.index=a.index,this._rawPad=a,this._buttons=[],this._buttonsLen=a.buttons.length,this._axes=[],this._axesLen=a.axes.length;for(var d=0;dthis.maxHealth&&(this.health=this.maxHealth),this},heal:function(a){return this.alive&&(this.health+=a,this.health>this.maxHealth&&(this.health=this.maxHealth)),this}},c.Component.InCamera=function(){},c.Component.InCamera.prototype={inCamera:{get:function(){return this.game.world.camera.view.intersects(this._bounds)}}},c.Component.InputEnabled=function(){},c.Component.InputEnabled.prototype={input:null,inputEnabled:{get:function(){return this.input&&this.input.enabled},set:function(a){a?null===this.input?(this.input=new c.InputHandler(this),this.input.start()):this.input&&!this.input.enabled&&this.input.start():this.input&&this.input.enabled&&this.input.stop()}}},c.Component.InWorld=function(){},c.Component.InWorld.preUpdate=function(){if(this.autoCull||this.checkWorldBounds){if(this._bounds.copyFrom(this.getBounds()),this._bounds.x+=this.game.camera.view.x,this._bounds.y+=this.game.camera.view.y,this.autoCull)if(this.game.world.camera.view.intersects(this._bounds))this.renderable=!0,this.game.world.camera.totalInView++;else if(this.renderable=!1,this.outOfCameraBoundsKill)return this.kill(),!1;if(this.checkWorldBounds)if(this._outOfBoundsFired&&this.game.world.bounds.intersects(this._bounds))this._outOfBoundsFired=!1,this.events.onEnterBounds$dispatch(this);else if(!this._outOfBoundsFired&&!this.game.world.bounds.intersects(this._bounds)&&(this._outOfBoundsFired=!0,this.events.onOutOfBounds$dispatch(this),this.outOfBoundsKill))return this.kill(),!1}return!0},c.Component.InWorld.prototype={checkWorldBounds:!1,outOfBoundsKill:!1,outOfCameraBoundsKill:!1,_outOfBoundsFired:!1,inWorld:{get:function(){return this.game.world.bounds.intersects(this.getBounds())}}},c.Component.LifeSpan=function(){},c.Component.LifeSpan.preUpdate=function(){return!(this.lifespan>0&&(this.lifespan-=this.game.time.physicsElapsedMS,this.lifespan<=0))||(this.kill(),!1)},c.Component.LifeSpan.prototype={alive:!0,lifespan:0,revive:function(a){return void 0===a&&(a=100),this.alive=!0,this.exists=!0,this.visible=!0,"function"==typeof this.setHealth&&this.setHealth(a),this.events&&this.events.onRevived$dispatch(this),this},kill:function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.events&&this.events.onKilled$dispatch(this),this}},c.Component.LoadTexture=function(){},c.Component.LoadTexture.prototype={customRender:!1,_frame:null,loadTexture:function(a,b,d){a===c.PENDING_ATLAS?(a=b,b=0):b=b||0,(d||void 0===d)&&this.animations&&this.animations.stop(),this.key=a,this.customRender=!1;var e=this.game.cache,f=!0,g=!this.texture.baseTexture.scaleMode;if(c.RenderTexture&&a instanceof c.RenderTexture)this.key=a.key,this.setTexture(a);else if(c.BitmapData&&a instanceof c.BitmapData)this.customRender=!0,this.setTexture(a.texture),f=e.hasFrameData(a.key,c.Cache.BITMAPDATA)?!this.animations.loadFrameData(e.getFrameData(a.key,c.Cache.BITMAPDATA),b):!this.animations.loadFrameData(a.frameData,0);else if(c.Video&&a instanceof c.Video){this.customRender=!0;var h=a.texture.valid;this.setTexture(a.texture),this.setFrame(a.texture.frame.clone()),a.onChangeSource.add(this.resizeFrame,this),this.texture.valid=h}else if(c.Tilemap&&a instanceof c.TilemapLayer)this.setTexture(PIXI.Texture.fromCanvas(a.canvas));else if(a instanceof PIXI.Texture)this.setTexture(a);else{var i=e.getImage(a,!0);this.key=i.key,this.setTexture(new PIXI.Texture(i.base)),this.texture.baseTexture.skipRender="__default"===a,f=!this.animations.loadFrameData(i.frameData,b)}f&&(this._frame=c.Rectangle.clone(this.texture.frame)),g||(this.texture.baseTexture.scaleMode=1)},setFrame:function(a){this._frame=a,this.texture.frame.x=a.x,this.texture.frame.y=a.y,this.texture.frame.width=a.width,this.texture.frame.height=a.height,this.texture.crop.x=a.x,this.texture.crop.y=a.y,this.texture.crop.width=a.width,this.texture.crop.height=a.height,a.trimmed?(this.texture.trim?(this.texture.trim.x=a.spriteSourceSizeX,this.texture.trim.y=a.spriteSourceSizeY,this.texture.trim.width=a.sourceSizeW,this.texture.trim.height=a.sourceSizeH):this.texture.trim={x:a.spriteSourceSizeX,y:a.spriteSourceSizeY,width:a.sourceSizeW,height:a.sourceSizeH},this.texture.width=a.sourceSizeW,this.texture.height=a.sourceSizeH,this.texture.frame.width=a.sourceSizeW,this.texture.frame.height=a.sourceSizeH):!a.trimmed&&this.texture.trim&&(this.texture.trim=null),this.cropRect&&this.updateCrop(),this.texture.requiresReTint=!0,this.texture._updateUvs(),this.tilingTexture&&(this.refreshTexture=!0)},resizeFrame:function(a,b,c){this.texture.frame.resize(b,c),this.texture.setFrame(this.texture.frame)},resetFrame:function(){this._frame&&this.setFrame(this._frame)},frame:{get:function(){return this.animations.frame},set:function(a){this.animations.frame=a}},frameName:{get:function(){return this.animations.frameName},set:function(a){this.animations.frameName=a}}},c.Component.Overlap=function(){},c.Component.Overlap.prototype={overlap:function(a){return c.Rectangle.intersects(this.getBounds(),a.getBounds())}},c.Component.PhysicsBody=function(){},c.Component.PhysicsBody.preUpdate=function(){return this.fresh&&this.exists?(this.world.setTo(this.parent.position.x+this.position.x,this.parent.position.y+this.position.y),this.worldTransform.tx=this.world.x,this.worldTransform.ty=this.world.y,this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,this.body&&this.body.preUpdate(),this.fresh=!1,!1):(this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,!(!this._exists||!this.parent.exists)||(this.renderOrderID=-1,!1))},c.Component.PhysicsBody.postUpdate=function(){this.exists&&this.body&&this.body.postUpdate()},c.Component.PhysicsBody.prototype={body:null,x:{get:function(){return this.position.x},set:function(a){this.position.x=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}},y:{get:function(){return this.position.y},set:function(a){this.position.y=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}}},c.Component.Reset=function(){},c.Component.Reset.prototype.reset=function(a,b,c){return void 0===c&&(c=1),this.world.set(a,b),this.position.set(a,b),this.fresh=!0,this.exists=!0,this.visible=!0,this.renderable=!0,this.components.InWorld&&(this._outOfBoundsFired=!1),this.components.LifeSpan&&(this.alive=!0,this.health=c),this.components.PhysicsBody&&this.body&&this.body.reset(a,b,!1,!1),this},c.Component.ScaleMinMax=function(){},c.Component.ScaleMinMax.prototype={transformCallback:null,transformCallbackContext:this,scaleMin:null,scaleMax:null,checkTransform:function(a){this.scaleMin&&(a.athis.scaleMax.x&&(a.a=this.scaleMax.x),a.d>this.scaleMax.y&&(a.d=this.scaleMax.y))},setScaleMinMax:function(a,b,d,e){void 0===b?b=d=e=a:void 0===d&&(d=e=b,b=a),null===a?this.scaleMin=null:this.scaleMin?this.scaleMin.set(a,b):this.scaleMin=new c.Point(a,b),null===d?this.scaleMax=null:this.scaleMax?this.scaleMax.set(d,e):this.scaleMax=new c.Point(d,e),null===this.scaleMin?this.transformCallback=null:(this.transformCallback=this.checkTransform,this.transformCallbackContext=this)}},c.Component.Smoothed=function(){},c.Component.Smoothed.prototype={smoothed:{get:function(){return!this.texture.baseTexture.scaleMode},set:function(a){a?this.texture&&(this.texture.baseTexture.scaleMode=0):this.texture&&(this.texture.baseTexture.scaleMode=1)}}},c.GameObjectFactory=function(a){this.game=a,this.world=this.game.world},c.GameObjectFactory.prototype={existing:function(a){return this.world.add(a)},weapon:function(a,b,d,e){var f=this.game.plugins.add(c.Weapon);return f.createBullets(a,b,d,e),f},image:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Image(this.game,a,b,d,e))},sprite:function(a,b,c,d,e){return void 0===e&&(e=this.world),e.create(a,b,c,d)},creature:function(a,b,d,e,f){void 0===f&&(f=this.world);var g=new c.Creature(this.game,a,b,d,e);return f.add(g),g},tween:function(a){return this.game.tweens.create(a)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},physicsGroup:function(a,b,d,e){return new c.Group(this.game,b,d,e,!0,a)},spriteBatch:function(a,b,d){return void 0===a&&(a=null),void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)}, +tileSprite:function(a,b,d,e,f,g,h){return void 0===h&&(h=this.world),h.add(new c.TileSprite(this.game,a,b,d,e,f,g))},rope:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.Rope(this.game,a,b,d,e,f))},text:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Text(this.game,a,b,d,e))},button:function(a,b,d,e,f,g,h,i,j,k){return void 0===k&&(k=this.world),k.add(new c.Button(this.game,a,b,d,e,f,g,h,i,j))},graphics:function(a,b,d){return void 0===d&&(d=this.world),d.add(new c.Graphics(this.game,a,b))},emitter:function(a,b,d){return this.game.particles.add(new c.Particles.Arcade.Emitter(this.game,a,b,d))},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.BitmapText(this.game,a,b,d,e,f))},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},video:function(a,b){return new c.Video(this.game,a,b)},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a},plugin:function(a){return this.game.plugins.add(a)}},c.GameObjectFactory.prototype.constructor=c.GameObjectFactory,c.GameObjectCreator=function(a){this.game=a,this.world=this.game.world},c.GameObjectCreator.prototype={image:function(a,b,d,e){return new c.Image(this.game,a,b,d,e)},sprite:function(a,b,d,e){return new c.Sprite(this.game,a,b,d,e)},tween:function(a){return new c.Tween(a,this.game,this.game.tweens)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},spriteBatch:function(a,b,d){return void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},tileSprite:function(a,b,d,e,f,g){return new c.TileSprite(this.game,a,b,d,e,f,g)},rope:function(a,b,d,e,f){return new c.Rope(this.game,a,b,d,e,f)},text:function(a,b,d,e){return new c.Text(this.game,a,b,d,e)},button:function(a,b,d,e,f,g,h,i,j){return new c.Button(this.game,a,b,d,e,f,g,h,i,j)},graphics:function(a,b){return new c.Graphics(this.game,a,b)},emitter:function(a,b,d){return new c.Particles.Arcade.Emitter(this.game,a,b,d)},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return new c.BitmapText(this.game,a,b,d,e,f,g)},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a}},c.GameObjectCreator.prototype.constructor=c.GameObjectCreator,c.Sprite=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.SPRITE,this.physicsType=c.SPRITE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Sprite.prototype=Object.create(PIXI.Sprite.prototype),c.Sprite.prototype.constructor=c.Sprite,c.Component.Core.install.call(c.Sprite.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","Health","InCamera","InputEnabled","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Sprite.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Sprite.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Sprite.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Sprite.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Sprite.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Image=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.IMAGE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Image.prototype=Object.create(PIXI.Sprite.prototype),c.Image.prototype.constructor=c.Image,c.Component.Core.install.call(c.Image.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Destroy","FixedToCamera","InputEnabled","LifeSpan","LoadTexture","Overlap","Reset","ScaleMinMax","Smoothed"]),c.Image.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Image.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Image.prototype.preUpdate=function(){return!!this.preUpdateInWorld()&&this.preUpdateCore()},c.Button=function(a,b,d,e,f,g,h,i,j,k){b=b||0,d=d||0,e=e||null,f=f||null,g=g||this,c.Image.call(this,a,b,d,e,i),this.type=c.BUTTON,this.physicsType=c.SPRITE,this._onOverFrame=null,this._onOutFrame=null,this._onDownFrame=null,this._onUpFrame=null,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new c.Signal,this.onInputOut=new c.Signal,this.onInputDown=new c.Signal,this.onInputUp=new c.Signal,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=c.PointerMode.TOUCH,this.freezeFrames=!1,this.forceOut=!1,this.inputEnabled=!0,this.input.start(0,!0),this.input.useHandCursor=!0,this.setFrames(h,i,j,k),null!==f&&this.onInputUp.add(f,g),this.events.onInputOver.add(this.onInputOverHandler,this),this.events.onInputOut.add(this.onInputOutHandler,this),this.events.onInputDown.add(this.onInputDownHandler,this),this.events.onInputUp.add(this.onInputUpHandler,this),this.events.onRemovedFromWorld.add(this.removedFromWorld,this)},c.Button.prototype=Object.create(c.Image.prototype),c.Button.prototype.constructor=c.Button;c.Button.prototype.clearFrames=function(){this.setFrames(null,null,null,null)},c.Button.prototype.removedFromWorld=function(){this.inputEnabled=!1},c.Button.prototype.setStateFrame=function(a,b,c){var d="_on"+a+"Frame";null!==b?(this[d]=b,c&&this.changeStateFrame(a)):this[d]=null},c.Button.prototype.changeStateFrame=function(a){if(this.freezeFrames)return!1;var b="_on"+a+"Frame",c=this[b];return"string"==typeof c?(this.frameName=c,!0):"number"==typeof c&&(this.frame=c,!0)},c.Button.prototype.setFrames=function(a,b,c,d){this.setStateFrame("Over",a,this.input.pointerOver()),this.setStateFrame("Out",b,!this.input.pointerOver()),this.setStateFrame("Down",c,this.input.pointerDown()),this.setStateFrame("Up",d,this.input.pointerUp())},c.Button.prototype.setStateSound=function(a,b,d){var e="on"+a+"Sound",f="on"+a+"SoundMarker";b instanceof c.Sound||b instanceof c.AudioSprite?(this[e]=b,this[f]="string"==typeof d?d:""):(this[e]=null,this[f]="")},c.Button.prototype.playStateSound=function(a){var b="on"+a+"Sound",c=this[b];if(c){var d="on"+a+"SoundMarker",e=this[d];return c.play(e),!0}return!1},c.Button.prototype.setSounds=function(a,b,c,d,e,f,g,h){this.setStateSound("Over",a,b),this.setStateSound("Out",e,f),this.setStateSound("Down",c,d),this.setStateSound("Up",g,h)},c.Button.prototype.setOverSound=function(a,b){this.setStateSound("Over",a,b)},c.Button.prototype.setOutSound=function(a,b){this.setStateSound("Out",a,b)},c.Button.prototype.setDownSound=function(a,b){this.setStateSound("Down",a,b)},c.Button.prototype.setUpSound=function(a,b){this.setStateSound("Up",a,b)},c.Button.prototype.onInputOverHandler=function(a,b){b.justReleased()&&(this.justReleasedPreventsOver&b.pointerMode)===b.pointerMode||(this.changeStateFrame("Over"),this.onOverMouseOnly&&!b.isMouse||(this.playStateSound("Over"),this.onInputOver&&this.onInputOver.dispatch(this,b)))},c.Button.prototype.onInputOutHandler=function(a,b){this.changeStateFrame("Out"),this.playStateSound("Out"),this.onInputOut&&this.onInputOut.dispatch(this,b)},c.Button.prototype.onInputDownHandler=function(a,b){this.changeStateFrame("Down"),this.playStateSound("Down"),this.onInputDown&&this.onInputDown.dispatch(this,b)},c.Button.prototype.onInputUpHandler=function(a,b,c){if(this.playStateSound("Up"),this.onInputUp&&this.onInputUp.dispatch(this,b,c),!this.freezeFrames)if(!0===this.forceOut||(this.forceOut&b.pointerMode)===b.pointerMode)this.changeStateFrame("Out");else{var d=this.changeStateFrame("Up");d||(c?this.changeStateFrame("Over"):this.changeStateFrame("Out"))}},c.SpriteBatch=function(a,b,d,e){void 0!==b&&null!==b||(b=a.world),PIXI.SpriteBatch.call(this),c.Group.call(this,a,b,d,e),this.type=c.SPRITEBATCH},c.SpriteBatch.prototype=c.Utils.extend(!0,c.SpriteBatch.prototype,PIXI.SpriteBatch.prototype,c.Group.prototype),c.SpriteBatch.prototype.constructor=c.SpriteBatch,c.BitmapData=function(a,b,d,e,f){void 0!==d&&0!==d||(d=256),void 0!==e&&0!==e||(e=256),void 0===f&&(f=!1),this.game=a,this.key=b,this.width=d,this.height=e,this.canvas=c.Canvas.create(this,d,e,null,f),this.context=this.canvas.getContext("2d",{alpha:!0}),this.ctx=this.context,this.smoothProperty=a.renderType===c.CANVAS?a.renderer.renderSession.smoothProperty:c.Canvas.getSmoothingPrefix(this.context),this.imageData=this.context.getImageData(0,0,d,e),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data),this.baseTexture=new PIXI.BaseTexture(this.canvas),this.texture=new PIXI.Texture(this.baseTexture),this.frameData=new c.FrameData,this.textureFrame=this.frameData.addFrame(new c.Frame(0,0,0,d,e,"bitmapData")),this.texture.frame=this.textureFrame,this.type=c.BITMAPDATA,this.disableTextureUpload=!1,this.dirty=!1,this.cls=this.clear,this._image=null,this._pos=new c.Point,this._size=new c.Point,this._scale=new c.Point,this._rotate=0,this._alpha={prev:1,current:1},this._anchor=new c.Point,this._tempR=0,this._tempG=0,this._tempB=0,this._circle=new c.Circle,this._swapCanvas=void 0},c.BitmapData.prototype={move:function(a,b,c){return 0!==a&&this.moveH(a,c),0!==b&&this.moveV(b,c),this},moveH:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.height,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.width-a;b&&d.drawImage(f,0,0,a,e,g,0,a,e),d.drawImage(f,a,0,g,e,0,0,g,e)}else{var g=this.width-a;b&&d.drawImage(f,g,0,a,e,0,0,a,e),d.drawImage(f,0,0,g,e,a,0,g,e)}return this.clear(),this.copy(this._swapCanvas)},moveV:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.width,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.height-a;b&&d.drawImage(f,0,0,e,a,0,g,e,a),d.drawImage(f,0,a,e,g,0,0,e,g)}else{var g=this.height-a;b&&d.drawImage(f,0,g,e,a,0,0,e,a),d.drawImage(f,0,0,e,g,0,a,e,g)}return this.clear(),this.copy(this._swapCanvas)},add:function(a){if(Array.isArray(a))for(var b=0;b=0&&a<=this.width&&b>=0&&b<=this.height&&(c.Device.LITTLE_ENDIAN?this.pixels[b*this.width+a]=g<<24|f<<16|e<<8|d:this.pixels[b*this.width+a]=d<<24|e<<16|f<<8|g,h&&(this.context.putImageData(this.imageData,0,0),this.dirty=!0)),this},setPixel:function(a,b,c,d,e,f){return this.setPixel32(a,b,c,d,e,255,f)},getPixel:function(a,b,d){d||(d=c.Color.createColor());var e=~~(a+b*this.width);return e*=4,d.r=this.data[e],d.g=this.data[++e],d.b=this.data[++e],d.a=this.data[++e],d},getPixel32:function(a,b){if(a>=0&&a<=this.width&&b>=0&&b<=this.height)return this.pixels[b*this.width+a]},getPixelRGB:function(a,b,d,e,f){return c.Color.unpackPixel(this.getPixel32(a,b),d,e,f)},getPixels:function(a){return this.context.getImageData(a.x,a.y,a.width,a.height)},getFirstPixel:function(a){void 0===a&&(a=0);var b=c.Color.createColor(),d=0,e=0,f=1,g=!1;1===a?(f=-1,e=this.height):3===a&&(f=-1,d=this.width);do{c.Color.unpackPixel(this.getPixel32(d,e),b),0===a||1===a?++d===this.width&&(d=0,((e+=f)>=this.height||e<=0)&&(g=!0)):2!==a&&3!==a||++e===this.height&&(e=0,((d+=f)>=this.width||d<=0)&&(g=!0))}while(0===b.a&&!g);return b.x=d,b.y=e,b},getBounds:function(a){return void 0===a&&(a=new c.Rectangle),a.x=this.getFirstPixel(2).x,a.x===this.width?a.setTo(0,0,0,0):(a.y=this.getFirstPixel(0).y,a.width=this.getFirstPixel(3).x-a.x+1,a.height=this.getFirstPixel(1).y-a.y+1,a)},addToWorld:function(a,b,c,d,e,f){e=e||1,f=f||1;var g=this.game.add.image(a,b,this);return g.anchor.set(c,d),g.scale.set(e,f),g},copy:function(a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){if(void 0!==a&&null!==a||(a=this),(a instanceof c.RenderTexture||a instanceof PIXI.RenderTexture)&&(a=a.getCanvas()),this._image=a,a instanceof c.Sprite||a instanceof c.Image||a instanceof c.Text||a instanceof PIXI.Sprite)this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),this._scale.set(a.scale.x,a.scale.y),this._anchor.set(a.anchor.x,a.anchor.y),this._rotate=a.rotation,this._alpha.current=a.alpha,a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source,void 0!==g&&null!==g||(g=a.x),void 0!==h&&null!==h||(h=a.y),a.texture.trim&&(g+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,h+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0));else{if(this._pos.set(0),this._scale.set(1),this._anchor.set(0),this._rotate=0,this._alpha.current=1,a instanceof c.BitmapData)this._image=a.canvas;else if("string"==typeof a){if(null===(a=this.game.cache.getImage(a)))return;this._image=a}this._size.set(this._image.width,this._image.height)}if(void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),e&&(this._size.x=e),f&&(this._size.y=f),void 0!==g&&null!==g||(g=b),void 0!==h&&null!==h||(h=d),void 0!==i&&null!==i||(i=this._size.x),void 0!==j&&null!==j||(j=this._size.y),"number"==typeof k&&(this._rotate=k),"number"==typeof l&&(this._anchor.x=l),"number"==typeof m&&(this._anchor.y=m),"number"==typeof n&&(this._scale.x=n),"number"==typeof o&&(this._scale.y=o),"number"==typeof p&&(this._alpha.current=p),void 0===q&&(q=null),void 0===r&&(r=!1),!(this._alpha.current<=0||0===this._scale.x||0===this._scale.y||0===this._size.x||0===this._size.y)){var s=this.context;return this._alpha.prev=s.globalAlpha,s.save(),s.globalAlpha=this._alpha.current,q&&(this.op=q),r&&(g|=0,h|=0),s.translate(g,h),s.scale(this._scale.x,this._scale.y),s.rotate(this._rotate),s.drawImage(this._image,this._pos.x+b,this._pos.y+d,this._size.x,this._size.y,-i*this._anchor.x,-j*this._anchor.y,i,j),s.restore(),s.globalAlpha=this._alpha.prev,this.dirty=!0,this}},copyTransform:function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=!1),!a.hasOwnProperty("worldTransform")||!a.worldVisible||0===a.worldAlpha)return this;var e=a.worldTransform;if(this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),0===e.a||0===e.d||0===this._size.x||0===this._size.y)return this;a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source;var f=e.tx,g=e.ty;a.texture.trim&&(f+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,g+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0)),d&&(f|=0,g|=0);var h=this.context;return this._alpha.prev=h.globalAlpha,h.save(),h.globalAlpha=this._alpha.current,b&&(this.op=b),h[this.smoothProperty]=a.texture.baseTexture.scaleMode===PIXI.scaleModes.LINEAR,h.setTransform(e.a,e.b,e.c,e.d,f,g),h.drawImage(this._image,this._pos.x,this._pos.y,this._size.x,this._size.y,-this._size.x*a.anchor.x,-this._size.y*a.anchor.y,this._size.x,this._size.y),h.restore(),h.globalAlpha=this._alpha.prev,this.dirty=!0,this},copyRect:function(a,b,c,d,e,f,g){return this.copy(a,b.x,b.y,b.width,b.height,c,d,b.width,b.height,0,0,0,1,1,e,f,g)},draw:function(a,b,c,d,e,f,g){return this.copy(a,null,null,null,null,b,c,d,e,null,null,null,null,null,null,f,g)},drawGroup:function(a,b,c){return a.total>0&&a.forEachExists(this.drawGroupProxy,this,b,c),this},drawGroupProxy:function(a,b,d){if(a.hasOwnProperty("texture")&&this.copyTransform(a,b,d),a.type===c.GROUP&&a.exists)this.drawGroup(a,b,d);else if(a.hasOwnProperty("children")&&a.children.length>0)for(var e=0;eb.width&&(e=b.width);var f=this.context;return f.fillStyle=f.createPattern(b,d),this._circle=new c.Circle(a.start.x,a.start.y,b.height),this._circle.circumferencePoint(a.angle-1.5707963267948966,!1,this._pos),f.save(),f.translate(this._pos.x,this._pos.y),f.rotate(a.angle),f.fillRect(0,0,e,b.height),f.restore(),this.dirty=!0,this}},render:function(){return!this.disableTextureUpload&&this.dirty&&(this.baseTexture.dirty(),this.dirty=!1),this},destroy:function(){this.frameData.destroy(),this.texture.destroy(!0),PIXI.CanvasPool.remove(this)},blendReset:function(){return this.op="source-over",this},blendSourceOver:function(){return this.op="source-over",this},blendSourceIn:function(){return this.op="source-in",this},blendSourceOut:function(){return this.op="source-out",this},blendSourceAtop:function(){return this.op="source-atop",this},blendDestinationOver:function(){return this.op="destination-over",this},blendDestinationIn:function(){return this.op="destination-in",this},blendDestinationOut:function(){return this.op="destination-out",this},blendDestinationAtop:function(){return this.op="destination-atop",this},blendXor:function(){return this.op="xor",this},blendAdd:function(){return this.op="lighter",this},blendMultiply:function(){return this.op="multiply",this},blendScreen:function(){return this.op="screen",this},blendOverlay:function(){return this.op="overlay",this},blendDarken:function(){return this.op="darken",this},blendLighten:function(){return this.op="lighten",this},blendColorDodge:function(){return this.op="color-dodge",this},blendColorBurn:function(){return this.op="color-burn",this},blendHardLight:function(){return this.op="hard-light",this},blendSoftLight:function(){return this.op="soft-light",this},blendDifference:function(){return this.op="difference",this},blendExclusion:function(){return this.op="exclusion",this},blendHue:function(){return this.op="hue",this},blendSaturation:function(){return this.op="saturation",this},blendColor:function(){return this.op="color",this},blendLuminosity:function(){return this.op="luminosity",this}},Object.defineProperty(c.BitmapData.prototype,"smoothed",{get:function(){c.Canvas.getSmoothingEnabled(this.context)},set:function(a){c.Canvas.setSmoothingEnabled(this.context,a)}}),Object.defineProperty(c.BitmapData.prototype,"op",{get:function(){return this.context.globalCompositeOperation},set:function(a){this.context.globalCompositeOperation=a}}),c.BitmapData.getTransform=function(a,b,c,d,e,f){return"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),"number"!=typeof c&&(c=1),"number"!=typeof d&&(d=1),"number"!=typeof e&&(e=0),"number"!=typeof f&&(f=0),{sx:c,sy:d,scaleX:c,scaleY:d,skewX:e,skewY:f,translateX:a,translateY:b,tx:a,ty:b}},c.BitmapData.prototype.constructor=c.BitmapData,PIXI.Graphics=function(){PIXI.DisplayObjectContainer.call(this),this.renderable=!0,this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this.blendMode=PIXI.blendModes.NORMAL,this.currentPath=null,this._webGL=[],this.isMask=!1,this.boundsPadding=0,this._localBounds=new PIXI.Rectangle(0,0,1,1),this.dirty=!0,this._boundsDirty=!1,this.webGLDirty=!1,this.cachedSpriteDirty=!1},PIXI.Graphics.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),PIXI.Graphics.prototype.constructor=PIXI.Graphics,PIXI.Graphics.prototype.lineStyle=function(a,b,c){return this.lineWidth=a||0,this.lineColor=b||0,this.lineAlpha=void 0===c?1:c,this.currentPath&&(this.currentPath.shape.points.length?this.drawShape(new PIXI.Polygon(this.currentPath.shape.points.slice(-2))):(this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha)),this},PIXI.Graphics.prototype.moveTo=function(a,b){return this.drawShape(new PIXI.Polygon([a,b])),this},PIXI.Graphics.prototype.lineTo=function(a,b){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.points.push(a,b),this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.quadraticCurveTo=function(a,b,c,d){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var e,f,g=this.currentPath.shape.points;0===g.length&&this.moveTo(0,0);for(var h=g[g.length-2],i=g[g.length-1],j=0,k=1;k<=20;++k)j=k/20,e=h+(a-h)*j,f=i+(b-i)*j,g.push(e+(a+(c-a)*j-e)*j,f+(b+(d-b)*j-f)*j);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var g,h,i,j,k,l=this.currentPath.shape.points,m=l[l.length-2],n=l[l.length-1],o=0,p=1;p<=20;++p)o=p/20,g=1-o,h=g*g,i=h*g,j=o*o,k=j*o,l.push(i*m+3*h*o*a+3*g*j*c+k*e,i*n+3*h*o*b+3*g*j*d+k*f);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arcTo=function(a,b,c,d,e){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(a,b):this.moveTo(a,b);var f=this.currentPath.shape.points,g=f[f.length-2],h=f[f.length-1],i=h-b,j=g-a,k=d-b,l=c-a,m=Math.abs(i*l-j*k);if(m<1e-8||0===e)f[f.length-2]===a&&f[f.length-1]===b||f.push(a,b);else{var n=i*i+j*j,o=k*k+l*l,p=i*k+j*l,q=e*Math.sqrt(n)/m,r=e*Math.sqrt(o)/m,s=q*p/n,t=r*p/o,u=q*l+r*j,v=q*k+r*i,w=j*(r+s),x=i*(r+s),y=l*(q+t),z=k*(q+t),A=Math.atan2(x-v,w-u),B=Math.atan2(z-v,y-u);this.arc(u+a,v+b,e,A,B,j*k>l*i)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arc=function(a,b,c,d,e,f,g){if(d===e)return this;void 0===f&&(f=!1),void 0===g&&(g=40),!f&&e<=d?e+=2*Math.PI:f&&d<=e&&(d+=2*Math.PI);var h=f?-1*(d-e):e-d,i=Math.ceil(Math.abs(h)/(2*Math.PI))*g;if(0===h)return this;var j=a+Math.cos(d)*c,k=b+Math.sin(d)*c;f&&this.filling?this.moveTo(a,b):this.moveTo(j,k);for(var l=this.currentPath.shape.points,m=h/(2*i),n=2*m,o=Math.cos(m),p=Math.sin(m),q=i-1,r=q%1/q,s=0;s<=q;s++){var t=s+r*s,u=m+d+n*t,v=Math.cos(u),w=-Math.sin(u);l.push((o*v+p*w)*c+a,(o*-w+p*v)*c+b)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.beginFill=function(a,b){return this.filling=!0,this.fillColor=a||0,this.fillAlpha=void 0===b?1:b,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},PIXI.Graphics.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},PIXI.Graphics.prototype.drawRect=function(a,b,c,d){return this.drawShape(new PIXI.Rectangle(a,b,c,d)),this},PIXI.Graphics.prototype.drawRoundedRect=function(a,b,c,d,e){return this.drawShape(new PIXI.RoundedRectangle(a,b,c,d,e)),this},PIXI.Graphics.prototype.drawCircle=function(a,b,c){return this.drawShape(new PIXI.Circle(a,b,c)),this},PIXI.Graphics.prototype.drawEllipse=function(a,b,c,d){return this.drawShape(new PIXI.Ellipse(a,b,c,d)),this},PIXI.Graphics.prototype.drawPolygon=function(a){(a instanceof c.Polygon||a instanceof PIXI.Polygon)&&(a=a.points);var b=a;if(!Array.isArray(b)){b=new Array(arguments.length);for(var d=0;dv?p:v,v=r>v?r:v,v=t>v?t:v,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w,this._bounds.x=x,this._bounds.width=v-x,this._bounds.y=y,this._bounds.height=w-y,this._currentBounds=this._bounds}return this._currentBounds},PIXI.Graphics.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=PIXI.identityMatrix;for(var b=0;bb?h+j:b,d=ie?i+k:e;else if(n===PIXI.Graphics.CIRC)h=f.x,i=f.y,j=f.radius+o/2,k=f.radius+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else if(n===PIXI.Graphics.ELIP)h=f.x,i=f.y,j=f.width+o/2,k=f.height+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else{g=f.points;for(var p=0;pb?h+o:b,d=i-oe?i+o:e}}else a=0,b=0,d=0,e=0;var q=this.boundsPadding;this._localBounds.x=a-q,this._localBounds.width=b-a+2*q,this._localBounds.y=d-q,this._localBounds.height=e-d+2*q},PIXI.Graphics.prototype._generateCachedSprite=function(){var a=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(a.width,a.height);else{var b=new PIXI.CanvasBuffer(a.width,a.height),c=PIXI.Texture.fromCanvas(b.canvas);this._cachedSprite=new PIXI.Sprite(c),this._cachedSprite.buffer=b,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-a.x/a.width,this._cachedSprite.anchor.y=-a.y/a.height,this._cachedSprite.buffer.context.translate(-a.x,-a.y),this.worldAlpha=1,PIXI.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},PIXI.Graphics.prototype.updateCachedSpriteTexture=function(){var a=this._cachedSprite,b=a.texture,c=a.buffer.canvas;b.baseTexture.width=c.width,b.baseTexture.height=c.height,b.crop.width=b.frame.width=c.width,b.crop.height=b.frame.height=c.height,a._width=c.width,a._height=c.height,b.baseTexture.dirty()},PIXI.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},PIXI.Graphics.prototype.drawShape=function(a){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null,a instanceof c.Polygon&&(a=a.clone(),a.flatten());var b=new PIXI.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,a);return this.graphicsData.push(b),b.type===PIXI.Graphics.POLY&&(b.shape.closed=this.filling,this.currentPath=b),this.dirty=!0,this._boundsDirty=!0,b},Object.defineProperty(PIXI.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(a){this._cacheAsBitmap=a,this._cacheAsBitmap?this._generateCachedSprite():this.destroyCachedSprite(),this.dirty=!0,this.webGLDirty=!0}}),PIXI.GraphicsData=function(a,b,c,d,e,f,g){this.lineWidth=a,this.lineColor=b,this.lineAlpha=c,this._lineTint=b,this.fillColor=d,this.fillAlpha=e,this._fillTint=d,this.fill=f,this.shape=g,this.type=g.type},PIXI.GraphicsData.prototype.constructor=PIXI.GraphicsData,PIXI.GraphicsData.prototype.clone=function(){return new GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},PIXI.EarCut={},PIXI.EarCut.Triangulate=function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=PIXI.EarCut.linkedList(a,0,e,c,!0),g=[];if(!f)return g;var h,i,j,k,l,m,n;if(d&&(f=PIXI.EarCut.eliminateHoles(a,b,f,c)),a.length>80*c){h=j=a[0],i=k=a[1];for(var o=c;oj&&(j=l),m>k&&(k=m);n=Math.max(j-h,k-i)}return PIXI.EarCut.earcutLinked(f,g,c,h,i,n),g},PIXI.EarCut.linkedList=function(a,b,c,d,e){var f,g,h,i=0;for(f=b,g=c-d;f0)for(f=b;f=b;f-=d)h=PIXI.EarCut.insertNode(f,a[f],a[f+1],h);return h},PIXI.EarCut.filterPoints=function(a,b){if(!a)return a;b||(b=a);var c,d=a;do{if(c=!1,d.steiner||!PIXI.EarCut.equals(d,d.next)&&0!==PIXI.EarCut.area(d.prev,d,d.next))d=d.next;else{if(PIXI.EarCut.removeNode(d),(d=b=d.prev)===d.next)return null;c=!0}}while(c||d!==b);return b},PIXI.EarCut.earcutLinked=function(a,b,c,d,e,f,g){if(a){!g&&f&&PIXI.EarCut.indexCurve(a,d,e,f);for(var h,i,j=a;a.prev!==a.next;)if(h=a.prev,i=a.next,f?PIXI.EarCut.isEarHashed(a,d,e,f):PIXI.EarCut.isEar(a))b.push(h.i/c),b.push(a.i/c),b.push(i.i/c),PIXI.EarCut.removeNode(a),a=i.next,j=i.next;else if((a=i)===j){g?1===g?(a=PIXI.EarCut.cureLocalIntersections(a,b,c),PIXI.EarCut.earcutLinked(a,b,c,d,e,f,2)):2===g&&PIXI.EarCut.splitEarcut(a,b,c,d,e,f):PIXI.EarCut.earcutLinked(PIXI.EarCut.filterPoints(a),b,c,d,e,f,1);break}}},PIXI.EarCut.isEar=function(a){var b=a.prev,c=a,d=a.next;if(PIXI.EarCut.area(b,c,d)>=0)return!1;for(var e=a.next.next;e!==a.prev;){if(PIXI.EarCut.pointInTriangle(b.x,b.y,c.x,c.y,d.x,d.y,e.x,e.y)&&PIXI.EarCut.area(e.prev,e,e.next)>=0)return!1;e=e.next}return!0},PIXI.EarCut.isEarHashed=function(a,b,c,d){var e=a.prev,f=a,g=a.next;if(PIXI.EarCut.area(e,f,g)>=0)return!1;for(var h=e.xf.x?e.x>g.x?e.x:g.x:f.x>g.x?f.x:g.x,k=e.y>f.y?e.y>g.y?e.y:g.y:f.y>g.y?f.y:g.y,l=PIXI.EarCut.zOrder(h,i,b,c,d),m=PIXI.EarCut.zOrder(j,k,b,c,d),n=a.nextZ;n&&n.z<=m;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.nextZ}for(n=a.prevZ;n&&n.z>=l;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.prevZ}return!0},PIXI.EarCut.cureLocalIntersections=function(a,b,c){var d=a;do{var e=d.prev,f=d.next.next;PIXI.EarCut.intersects(e,d,d.next,f)&&PIXI.EarCut.locallyInside(e,f)&&PIXI.EarCut.locallyInside(f,e)&&(b.push(e.i/c),b.push(d.i/c),b.push(f.i/c),PIXI.EarCut.removeNode(d),PIXI.EarCut.removeNode(d.next),d=a=f),d=d.next}while(d!==a);return d},PIXI.EarCut.splitEarcut=function(a,b,c,d,e,f){var g=a;do{for(var h=g.next.next;h!==g.prev;){if(g.i!==h.i&&PIXI.EarCut.isValidDiagonal(g,h)){var i=PIXI.EarCut.splitPolygon(g,h);return g=PIXI.EarCut.filterPoints(g,g.next),i=PIXI.EarCut.filterPoints(i,i.next),PIXI.EarCut.earcutLinked(g,b,c,d,e,f),void PIXI.EarCut.earcutLinked(i,b,c,d,e,f)}h=h.next}g=g.next}while(g!==a)},PIXI.EarCut.eliminateHoles=function(a,b,c,d){var e,f,g,h,i,j=[];for(e=0,f=b.length;e=d.next.y){var h=d.x+(f-d.y)*(d.next.x-d.x)/(d.next.y-d.y);h<=e&&h>g&&(g=h,c=d.x=d.x&&d.x>=c.x&&PIXI.EarCut.pointInTriangle(fc.x)&&PIXI.EarCut.locallyInside(d,a)&&(c=d,k=i),d=d.next;return c},PIXI.EarCut.indexCurve=function(a,b,c,d){var e=a;do{null===e.z&&(e.z=PIXI.EarCut.zOrder(e.x,e.y,b,c,d)),e.prevZ=e.prev,e.nextZ=e.next,e=e.next}while(e!==a);e.prevZ.nextZ=null,e.prevZ=null,PIXI.EarCut.sortLinked(e)},PIXI.EarCut.sortLinked=function(a){var b,c,d,e,f,g,h,i,j=1;do{for(c=a,a=null,f=null,g=0;c;){for(g++,d=c,h=0,b=0;b0||i>0&&d;)0===h?(e=d,d=d.nextZ,i--):0!==i&&d?c.z<=d.z?(e=c,c=c.nextZ,h--):(e=d,d=d.nextZ,i--):(e=c,c=c.nextZ,h--),f?f.nextZ=e:a=e,e.prevZ=f,f=e;c=d}f.nextZ=null,j*=2}while(g>1);return a},PIXI.EarCut.zOrder=function(a,b,c,d,e){return a=32767*(a-c)/e,b=32767*(b-d)/e,a=16711935&(a|a<<8),a=252645135&(a|a<<4),a=858993459&(a|a<<2),a=1431655765&(a|a<<1),b=16711935&(b|b<<8),b=252645135&(b|b<<4),b=858993459&(b|b<<2),b=1431655765&(b|b<<1),a|b<<1},PIXI.EarCut.getLeftmost=function(a){var b=a,c=a;do{b.x=0&&(a-g)*(d-h)-(c-g)*(b-h)>=0&&(c-g)*(f-h)-(e-g)*(d-h)>=0},PIXI.EarCut.isValidDiagonal=function(a,b){return PIXI.EarCut.equals(a,b)||a.next.i!==b.i&&a.prev.i!==b.i&&!PIXI.EarCut.intersectsPolygon(a,b)&&PIXI.EarCut.locallyInside(a,b)&&PIXI.EarCut.locallyInside(b,a)&&PIXI.EarCut.middleInside(a,b)},PIXI.EarCut.area=function(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)},PIXI.EarCut.equals=function(a,b){return a.x===b.x&&a.y===b.y},PIXI.EarCut.intersects=function(a,b,c,d){return PIXI.EarCut.area(a,b,c)>0!=PIXI.EarCut.area(a,b,d)>0&&PIXI.EarCut.area(c,d,a)>0!=PIXI.EarCut.area(c,d,b)>0},PIXI.EarCut.intersectsPolygon=function(a,b){var c=a;do{if(c.i!==a.i&&c.next.i!==a.i&&c.i!==b.i&&c.next.i!==b.i&&PIXI.EarCut.intersects(c,c.next,a,b))return!0;c=c.next}while(c!==a);return!1},PIXI.EarCut.locallyInside=function(a,b){return PIXI.EarCut.area(a.prev,a,a.next)<0?PIXI.EarCut.area(a,b,a.next)>=0&&PIXI.EarCut.area(a,a.prev,b)>=0:PIXI.EarCut.area(a,b,a.prev)<0||PIXI.EarCut.area(a,a.next,b)<0},PIXI.EarCut.middleInside=function(a,b){var c=a,d=!1,e=(a.x+b.x)/2,f=(a.y+b.y)/2;do{c.y>f!=c.next.y>f&&e<(c.next.x-c.x)*(f-c.y)/(c.next.y-c.y)+c.x&&(d=!d),c=c.next}while(c!==a);return d},PIXI.EarCut.splitPolygon=function(a,b){var c=new PIXI.EarCut.Node(a.i,a.x,a.y),d=new PIXI.EarCut.Node(b.i,b.x,b.y),e=a.next,f=b.prev;return a.next=b,b.prev=a,c.next=e,e.prev=c,d.next=c,c.prev=d,f.next=d,d.prev=f,d},PIXI.EarCut.insertNode=function(a,b,c,d){var e=new PIXI.EarCut.Node(a,b,c);return d?(e.next=d.next,e.prev=d,d.next.prev=e,d.next=e):(e.prev=e,e.next=e),e},PIXI.EarCut.removeNode=function(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)},PIXI.EarCut.Node=function(a,b,c){this.i=a,this.x=b,this.y=c,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1},PIXI.WebGLGraphics=function(){},PIXI.WebGLGraphics.stencilBufferLimit=6,PIXI.WebGLGraphics.renderGraphics=function(a,b){var c,d=b.gl,e=b.projection,f=b.offset,g=b.shaderManager.primitiveShader;a.dirty&&PIXI.WebGLGraphics.updateGraphics(a,d);for(var h=a._webGL[d.id],i=0;i=PIXI.WebGLGraphics.stencilBufferLimit)if(g.points.length<2*PIXI.WebGLGraphics.stencilBufferLimit){f=PIXI.WebGLGraphics.switchMode(c,0);var h=PIXI.WebGLGraphics.buildPoly(g,f);h||(f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f);g.lineWidth>0&&(f=PIXI.WebGLGraphics.switchMode(c,0),PIXI.WebGLGraphics.buildLine(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,0),g.type===PIXI.Graphics.RECT?PIXI.WebGLGraphics.buildRectangle(g,f):g.type===PIXI.Graphics.CIRC||g.type===PIXI.Graphics.ELIP?PIXI.WebGLGraphics.buildCircle(g,f):g.type===PIXI.Graphics.RREC&&PIXI.WebGLGraphics.buildRoundedRectangle(g,f);c.lastIndex++}for(d=0;d19600?(u=q-s,v=r-t,E=Math.sqrt(u*u+v*v),u/=E,v/=E,u*=K,v*=K,F.push(m-u,n-v),F.push(N,O,P,M),F.push(m+u,n+v),F.push(N,O,P,M),F.push(m-u,n-v),F.push(N,O,P,M),I++):(F.push(i,j),F.push(N,O,P,M),F.push(m-(i-m),n-(j-n)),F.push(N,O,P,M)));for(k=d[2*(H-2)],l=d[2*(H-2)+1],m=d[2*(H-1)],n=d[2*(H-1)+1],q=-(l-n),r=k-m,E=Math.sqrt(q*q+r*r),q/=E,r/=E,q*=K,r*=K,F.push(m-q,n-r),F.push(N,O,P,M),F.push(m+q,n+r),F.push(N,O,P,M),G.push(J),c=0;ch?e:h,i=fj?f:j;c.push(g,i,h,i,h,j,g,j);var l=c.length/2;for(k=0;kz?z:y,b.beginPath(),b.moveTo(u,v+y),b.lineTo(u,v+x-y),b.quadraticCurveTo(u,v+x,u+y,v+x),b.lineTo(u+w-y,v+x),b.quadraticCurveTo(u+w,v+x,u+w,v+x-y),b.lineTo(u+w,v+y),b.quadraticCurveTo(u+w,v,u+w-y,v),b.lineTo(u+y,v),b.quadraticCurveTo(u,v,u,v+y),b.closePath(),(e.fillColor||0===e.fillColor)&&(b.globalAlpha=e.fillAlpha*c,b.fillStyle="#"+("00000"+(0|g).toString(16)).substr(-6),b.fill()),e.lineWidth&&(b.globalAlpha=e.lineAlpha*c,b.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),b.stroke())}}},PIXI.CanvasGraphics.renderGraphicsMask=function(a,b){var c=a.graphicsData.length;if(0!==c){b.beginPath();for(var d=0;dx?x:w,b.moveTo(s,t+w),b.lineTo(s,t+v-w),b.quadraticCurveTo(s,t+v,s+w,t+v),b.lineTo(s+u-w,t+v),b.quadraticCurveTo(s+u,t+v,s+u,t+v-w),b.lineTo(s+u,t+w),b.quadraticCurveTo(s+u,t,s+u-w,t),b.lineTo(s+w,t),b.quadraticCurveTo(s,t,s,t+w),b.closePath()}}}},PIXI.CanvasGraphics.updateGraphicsTint=function(a){if(16777215!==a.tint)for(var b=(a.tint>>16&255)/255,c=(a.tint>>8&255)/255,d=(255&a.tint)/255,e=0;e>16&255)/255*b*255<<16)+((g>>8&255)/255*c*255<<8)+(255&g)/255*d*255,f._lineTint=((h>>16&255)/255*b*255<<16)+((h>>8&255)/255*c*255<<8)+(255&h)/255*d*255}},c.Graphics=function(a,b,d){void 0===b&&(b=0),void 0===d&&(d=0),this.type=c.GRAPHICS,this.physicsType=c.SPRITE,this.anchor=new c.Point,PIXI.Graphics.call(this),c.Component.Core.init.call(this,a,b,d,"",null)},c.Graphics.prototype=Object.create(PIXI.Graphics.prototype),c.Graphics.prototype.constructor=c.Graphics,c.Component.Core.install.call(c.Graphics.prototype,["Angle","AutoCull","Bounds","Destroy","FixedToCamera","InputEnabled","InWorld","LifeSpan","PhysicsBody","Reset"]),c.Graphics.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Graphics.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Graphics.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Graphics.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Graphics.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Graphics.prototype.postUpdate=function(){c.Component.PhysicsBody.postUpdate.call(this),c.Component.FixedToCamera.postUpdate.call(this),this._boundsDirty&&(this.updateLocalBounds(),this._boundsDirty=!1);for(var a=0;a0&&this.drawPolygon(d)}else this.drawPolygon(d)},c.Graphics.prototype.drawTriangles=function(a,b,d){void 0===d&&(d=!1);var e,f=new c.Point,g=new c.Point,h=new c.Point,i=[];if(b)if(a[0]instanceof c.Point)for(e=0;e0&&this.style.maxLines0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(b[h]):i+=this.context.measureText(b[h]).width,this.style.wordWrap&&(i-=this.context.measureText(" ").width)}else{var j=b[h].split(/(?:\t)/),i=this.padding.x+this.style.strokeThickness;if(Array.isArray(c))for(var k=0,l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.measureLine(j[l]):Math.ceil(this.context.measureText(j[l]).width),l>0&&(k+=c[l-1]),i=k+m}else for(var l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(j[l]):i+=Math.ceil(this.context.measureText(j[l]).width);var n=this.game.math.snapToCeil(i,c)-i;i+=n}}d[h]=Math.ceil(i),e=Math.max(e,d[h])}this.canvas.width=e*this._res;var o=f.fontSize+this.style.strokeThickness+this.padding.y,p=o*g,q=this._lineSpacing;q<0&&Math.abs(q)>o&&(q=-o),0!==q&&(p+=q>0?q*b.length:q*(b.length-1)),this.canvas.height=p*this._res,this.context.scale(this._res,this._res),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.style.backgroundColor&&(this.context.fillStyle=this.style.backgroundColor,this.context.fillRect(0,0,this.canvas.width,this.canvas.height)),this.context.fillStyle=this.style.fill,this.context.font=this.style.font,this.context.strokeStyle=this.style.stroke,this.context.textBaseline="alphabetic",this.context.lineWidth=this.style.strokeThickness,this.context.lineCap="round",this.context.lineJoin="round";var r,s;for(this._charCount=0,h=0;h0&&(s+=q*h),"right"===this.style.align?r+=e-d[h]:"center"===this.style.align&&(r+=(e-d[h])/2),this.autoRound&&(r=Math.round(r),s=Math.round(s)),this.colors.length>0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.updateLine(b[h],r,s):(this.style.stroke&&this.style.strokeThickness&&(this.updateShadow(this.style.shadowStroke),0===c?this.context.strokeText(b[h],r,s):this.renderTabLine(b[h],r,s,!1)),this.style.fill&&(this.updateShadow(this.style.shadowFill),0===c?this.context.fillText(b[h],r,s):this.renderTabLine(b[h],r,s,!0)));this.updateTexture(),this.dirty=!1},c.Text.prototype.renderTabLine=function(a,b,c,d){var e=a.split(/(?:\t)/),f=this.style.tabs,g=0;if(Array.isArray(f))for(var h=0,i=0;i0&&(h+=f[i-1]),g=b+h,d?this.context.fillText(e[i],g,c):this.context.strokeText(e[i],g,c);else for(var i=0;i0||this.fontStyles.length>0){var e=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(e.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(e.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(e)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill)),b+=this.context.measureText(d).width,this._charCount++}return Math.ceil(b)},c.Text.prototype.updateLine=function(a,b,c){for(var d=0;d0||this.fontStyles.length>0){var f=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(f.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(f.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(f)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke),this.context.strokeText(e,b,c)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill),this.context.fillText(e,b,c)),b+=this.context.measureText(e).width,this._charCount++}},c.Text.prototype.clearColors=function(){return this.colors=[],this.strokeColors=[],this.dirty=!0,this},c.Text.prototype.clearFontValues=function(){return this.fontStyles=[],this.fontWeights=[],this.dirty=!0,this},c.Text.prototype.addColor=function(a,b){return this.colors[b]=a,this.dirty=!0,this},c.Text.prototype.addStrokeColor=function(a,b){return this.strokeColors[b]=a,this.dirty=!0,this},c.Text.prototype.addFontStyle=function(a,b){return this.fontStyles[b]=a,this.dirty=!0,this},c.Text.prototype.addFontWeight=function(a,b){return this.fontWeights[b]=a,this.dirty=!0,this},c.Text.prototype.precalculateWordWrap=function(a){return this.texture.baseTexture.resolution=this._res,this.context.font=this.style.font,this.runWordWrap(a).split(/(?:\r\n|\r|\n)/)},c.Text.prototype.runWordWrap=function(a){return this.useAdvancedWrap?this.advancedWordWrap(a):this.basicWordWrap(a)},c.Text.prototype.advancedWordWrap=function(a){for(var b=this.context,c=this.style.wordWrapWidth,d="",e=a.replace(/ +/gi," ").split(/\r?\n/gi),f=e.length,g=0;gj){if(0===l){for(var p=n;p.length&&(p=p.slice(0,-1),!((o=b.measureText(p).width)<=j)););if(!p.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var q=m.substr(p.length);k[l]=q,i+=p}var r=k[l].length?l:l+1,s=k.slice(r).join(" ").replace(/[ \n]*$/gi,"");e[g+1]=s+" "+(e[g+1]||""),f=e.length;break}i+=n,j-=o}d+=i.replace(/[ \n]*$/gi,"")+"\n"}}return d=d.replace(/[\s|\n]*$/gi,"")},c.Text.prototype.basicWordWrap=function(a){for(var b="",c=a.split("\n"),d=0;de?(g>0&&(b+="\n"),b+=f[g]+" ",e=this.style.wordWrapWidth-h):(e-=i,b+=f[g]+" ")}dd&&(this.style.wordWrapWidth=d)),this.updateTexture(),this},c.Text.prototype.updateTexture=function(){var a=this.texture.baseTexture,b=this.texture.crop,c=this.texture.frame,d=this.canvas.width,e=this.canvas.height;if(a.width=d,a.height=e,b.width=d,b.height=e,c.width=d,c.height=e,this.texture.width=d,this.texture.height=e,this._width=d,this._height=e,this.textBounds){var f=this.textBounds.x,g=this.textBounds.y;"right"===this.style.boundsAlignH?f+=this.textBounds.width-this.canvas.width/this.resolution:"center"===this.style.boundsAlignH&&(f+=this.textBounds.halfWidth-this.canvas.width/this.resolution/2),"bottom"===this.style.boundsAlignV?g+=this.textBounds.height-this.canvas.height/this.resolution:"middle"===this.style.boundsAlignV&&(g+=this.textBounds.halfHeight-this.canvas.height/this.resolution/2),this.pivot.x=-f,this.pivot.y=-g}this.renderable=0!==d&&0!==e,this.texture.requiresReTint=!0,this.texture.baseTexture.dirty()},c.Text.prototype._renderWebGL=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.Text.prototype._renderCanvas=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.Text.prototype.determineFontProperties=function(a){var b=c.Text.fontPropertiesCache[a];if(!b){b={};var d=c.Text.fontPropertiesCanvas,e=c.Text.fontPropertiesContext;e.font=a;var f=Math.ceil(e.measureText("|MÉq").width),g=Math.ceil(e.measureText("|MÉq").width),h=2*g;if(g=1.4*g|0,d.width=f,d.height=h,e.fillStyle="#f00",e.fillRect(0,0,f,h),e.font=a,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText("|MÉq",0,g),!e.getImageData(0,0,f,h))return b.ascent=g,b.descent=g+6,b.fontSize=b.ascent+b.descent,c.Text.fontPropertiesCache[a]=b,b;var i,j,k=e.getImageData(0,0,f,h).data,l=k.length,m=4*f,n=0,o=!1;for(i=0;ig;i--){for(j=0;j0?this._maxWidth:null,j=[],k=0;k=i&&f>-1)return{width:g||e,text:c.substr(0,k-(k-f)),end:l,chars:j};e+=(n.xAdvance+p)*b,j.push(d+(n.xOffset+p)*b),d+=(n.xAdvance+p)*b,h=m}return{width:e,text:c,end:l,chars:j}},c.BitmapText.prototype.cleanText=function(a,b){void 0===b&&(b="");var c=this._data.font;if(!c)return"";for(var d=/\r\n|\n\r|\n|\r/g,e=a.replace(d,"\n").split("\n"),f=0;fthis.textWidth&&(this.textWidth=f.width),e+=a.lineHeight*c,b=b.substr(f.text.length+1)}while(!1===f.end);this.textHeight=e;for(var g=0,h=0,i=this.textWidth*this.anchor.x,j=this.textHeight*this.anchor.y,k=0;k0&&(this._fontSize=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"text",{get:function(){return this._text},set:function(a){a!==this._text&&(this._text=a.toString()||"",this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(a){a!==this._maxWidth&&(this._maxWidth=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"smoothed",{get:function(){return!this._data.base.scaleMode},set:function(a){this._data.base.scaleMode=a?0:1}}),c.RetroFont=function(a,b,d,e,f,g,h,i,j,k){if(!a.cache.checkImageKey(b))return!1;void 0!==g&&null!==g||(g=a.cache.getImage(b).width/d),this.characterWidth=d,this.characterHeight=e,this.characterSpacingX=h||0,this.characterSpacingY=i||0,this.characterPerRow=g,this.offsetX=j||0,this.offsetY=k||0,this.align="left",this.multiLine=!1,this.autoUpperCase=!0,this.customSpacingX=0,this.customSpacingY=0,this.fixedWidth=0,this.fontSet=a.cache.getImage(b),this._text="",this.grabData=[],this.frameData=new c.FrameData;for(var l=this.offsetX,m=this.offsetY,n=0,o=0;o?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",c.RetroFont.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",c.RetroFont.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",c.RetroFont.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",c.RetroFont.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",c.RetroFont.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",c.RetroFont.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",c.RetroFont.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",c.RetroFont.prototype.setFixedWidth=function(a,b){void 0===b&&(b="left"),this.fixedWidth=a,this.align=b},c.RetroFont.prototype.setText=function(a,b,c,d,e,f){this.multiLine=b||!1,this.customSpacingX=c||0,this.customSpacingY=d||0,this.align=e||"left",this.autoUpperCase=!f,a.length>0&&(this.text=a)},c.RetroFont.prototype.buildRetroFontText=function(){var a=0,b=0;if(this.clear(),this.multiLine){var d=this._text.split("\n");this.fixedWidth>0?this.resize(this.fixedWidth,d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0):this.resize(this.getLongestLine()*(this.characterWidth+this.customSpacingX),d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0);for(var e=0;e0?this.resize(this.fixedWidth,this.characterHeight,!0):this.resize(this._text.length*(this.characterWidth+this.customSpacingX),this.characterHeight,!0),a=0,this.align===c.RetroFont.ALIGN_RIGHT?a=this.width-this._text.length*(this.characterWidth+this.customSpacingX):this.align===c.RetroFont.ALIGN_CENTER&&(a=this.width/2-this._text.length*(this.characterWidth+this.customSpacingX)/2,a+=this.customSpacingX/2),a<0&&(a=0),this.pasteLine(this._text,a,0,this.customSpacingX);this.requiresReTint=!0},c.RetroFont.prototype.pasteLine=function(a,b,c,d){for(var e=0;e=0&&(this.stamp.frame=this.grabData[a.charCodeAt(e)],this.renderXY(this.stamp,b,c,!1),(b+=this.characterWidth+d)>this.width))break},c.RetroFont.prototype.getLongestLine=function(){var a=0;if(this._text.length>0)for(var b=this._text.split("\n"),c=0;ca&&(a=b[c].length);return a},c.RetroFont.prototype.removeUnsupportedCharacters=function(a){for(var b="",c=0;c=0||!a&&"\n"===d)&&(b=b.concat(d))}return b},c.RetroFont.prototype.updateOffset=function(a,b){if(this.offsetX!==a||this.offsetY!==b){for(var c=a-this.offsetX,d=b-this.offsetY,e=this.game.cache.getFrameData(this.stamp.key).getFrames(),f=e.length;f--;)e[f].x+=c,e[f].y+=d;this.buildRetroFontText()}},Object.defineProperty(c.RetroFont.prototype,"text",{get:function(){return this._text},set:function(a){var b;(b=this.autoUpperCase?a.toUpperCase():a)!==this._text&&(this._text=b,this.removeUnsupportedCharacters(this.multiLine),this.buildRetroFontText())}}),Object.defineProperty(c.RetroFont.prototype,"smoothed",{get:function(){return this.stamp.smoothed},set:function(a){this.stamp.smoothed=a,this.buildRetroFontText()}}),c.Rope=function(a,b,d,e,f,g){this.points=[],this.points=g,this._hasUpdateAnimation=!1,this._updateAnimationCallback=null,b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.ROPE,PIXI.Rope.call(this,c.Cache.DEFAULT,this.points),c.Component.Core.init.call(this,a,b,d,e,f)},c.Rope.prototype=Object.create(PIXI.Rope.prototype),c.Rope.prototype.constructor=c.Rope,c.Component.Core.install.call(c.Rope.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Rope.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Rope.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Rope.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Rope.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Rope.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Rope.prototype.update=function(){this._hasUpdateAnimation&&this.updateAnimation.call(this)},c.Rope.prototype.reset=function(a,b){return c.Component.Reset.prototype.reset.call(this,a,b),this},Object.defineProperty(c.Rope.prototype,"updateAnimation",{get:function(){return this._updateAnimation},set:function(a){a&&"function"==typeof a?(this._hasUpdateAnimation=!0,this._updateAnimation=a):(this._hasUpdateAnimation=!1,this._updateAnimation=null)}}),Object.defineProperty(c.Rope.prototype,"segments",{get:function(){for(var a,b,d,e,f,g,h,i,j=[],k=0;k2)||a}var d=this;!function(){var a=navigator.userAgent;/Playstation Vita/.test(a)?d.vita=!0:/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?d.kindle=!0:/Android/.test(a)?d.android=!0:/CrOS/.test(a)?d.chromeOS=!0:/iP[ao]d|iPhone/i.test(a)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):/Linux/.test(a)?d.linux=!0:/Mac OS/.test(a)?d.macOS=!0:/Windows/.test(a)&&(d.windows=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var b=/Silk/.test(a);(d.windows||d.macOS||d.linux&&!b||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(d.desktop=!1)}(),function(){var a=navigator.userAgent;if(/Arora/.test(a)?d.arora=!0:/Edge\/\d+/.test(a)?d.edge=!0:/Chrome\/(\d+)/.test(a)&&!d.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10)):/Epiphany/.test(a)?d.epiphany=!0:/Firefox\D+(\d+)/.test(a)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(a)&&d.iOS?d.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Midori/.test(a)?d.midori=!0:/Opera/.test(a)?d.opera=!0:/Safari\/(\d+)/.test(a)&&!d.windowsPhone?(d.safari=!0,/Version\/(\d+)\./.test(a)&&(d.safariVersion=parseInt(RegExp.$1,10))):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(d.silk=!0),navigator.standalone&&(d.webApp=!0),void 0!==window.cordova&&(d.cordova=!0),"undefined"!=typeof process&&"undefined"!=typeof require&&(d.node=!0),d.node&&"object"==typeof process.versions&&(d.nodeWebkit=!!process.versions["node-webkit"],d.electron=!!process.versions.electron),navigator.isCocoonJS&&(d.cocoonJS=!0),void 0!==window.wx&&(d.wechatMinigame=!0),d.cocoonJS)try{d.cocoonJSApp="undefined"!=typeof CocoonJS}catch(a){d.cocoonJSApp=!1}void 0!==window.ejecta&&(d.ejecta=!0),/Crosswalk/.test(a)&&(d.crosswalk=!0)}(),function(){d.audioData=!!window.Audio,d.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var a=document.createElement("audio");try{if(a.canPlayType&&(a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(d.ogg=!0),(a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||a.canPlayType("audio/opus;").replace(/^no$/,""))&&(d.opus=!0),a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(d.mp3=!0),a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(d.wav=!0),(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))&&(d.m4a=!0),a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(d.webm=!0),""!==a.canPlayType('audio/mp4;codecs="ec-3"')))if(d.edge)d.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var b=parseInt(RegExp.$1,10),c=parseInt(RegExp.$2,10);(10===b&&c>=11||b>10)&&(d.dolby=!0)}}catch(a){}}(),function(){var a=document.createElement("video");try{!!a.canPlayType&&(a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(d.oggVideo=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.h264Video=!0,d.mp4Video=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(d.webmVideo=!0),a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(d.vp9Video=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.hlsVideo=!0))}catch(a){}}(),function(){var a,b=document.createElement("p"),c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(b,null);for(var e in c)void 0!==b.style[e]&&(b.style[e]="translate3d(1px,1px,1px)",a=window.getComputedStyle(b).getPropertyValue(c[e]));document.body.removeChild(b),d.css3D=void 0!==a&&a.length>0&&"none"!==a}(),function(){d.pixelRatio=window.devicePixelRatio||1,d.iPhone=-1!==navigator.userAgent.toLowerCase().indexOf("iphone"),d.iPhone4=2===d.pixelRatio&&d.iPhone,d.iPad=c(),"undefined"!=typeof Int8Array?d.typedArray=!0:d.typedArray=!1,"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(d.littleEndian=a(),d.LITTLE_ENDIAN=d.littleEndian),d.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==d.littleEndian&&b(),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(d.vibration=!0)}(),function(){d.canvas=!!window.CanvasRenderingContext2D||d.cocoonJS;try{d.localStorage=!!localStorage.getItem}catch(a){d.localStorage=!1}d.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),d.fileSystem=!!window.requestFileSystem;var a={stencil:!0};d.webGL=function(){try{var b=document.createElement("canvas");return b.screencanvas=!1,!!window.WebGLRenderingContext&&(b.getContext("webgl",a)||b.getContext("experimental-webgl",a))}catch(a){return!1}}(),d.webGL=!!d.webGL,d.worker=!!window.Worker,d.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,d.quirksMode="CSS1Compat"!==document.compatMode,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,d.getUserMedia=d.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(d.getUserMedia=!1),!d.iOS&&(d.ie||d.firefox||d.chrome)&&(d.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(d.canvasBitBltShift=!1)}(),function(){for(var a=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],b=document.createElement("div"),c=0;c=1)&&(d.touch=!0),(window.PointerEvent||window.MSPointerEvent||window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&(d.mspointer=!0),d.cocoonJS||("onwheel"in window||d.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll"))}()},c.Device.canPlayAudio=function(a){return!("mp3"!==a||!this.mp3)||(!("ogg"!==a||!this.ogg&&!this.opus)||(!("m4a"!==a||!this.m4a)||(!("opus"!==a||!this.opus)||(!("wav"!==a||!this.wav)||(!("webm"!==a||!this.webm)||!("mp4"!==a||!this.dolby))))))},c.Device.canPlayVideo=function(a){return!("webm"!==a||!this.webmVideo&&!this.vp9Video)||(!("mp4"!==a||!this.mp4Video&&!this.h264Video)||(!("ogg"!==a&&"ogv"!==a||!this.oggVideo)||!("mpeg"!==a||!this.hlsVideo)))},c.Device.isConsoleOpen=function(){return!(!window.console||!window.console.firebug)||!(!window.console||(console.profile(),console.profileEnd(),console.clear&&console.clear(),!console.profiles))&&console.profiles.length>0},c.Device.isAndroidStockBrowser=function(){var a=window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);return a&&a[1]<537},c.Canvas={create:function(a,b,c,d,e){b=b||256,c=c||256;var f=e?document.createElement("canvas"):PIXI.CanvasPool.create(a,b,c);return"string"==typeof d&&""!==d&&(f.id=d),f.width=b,f.height=c,f.style.display="block",f},setBackgroundColor:function(a,b){return b=b||"rgb(0,0,0)",a.style.backgroundColor=b,a},setTouchAction:function(a,b){return b=b||"none",a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a},setUserSelect:function(a,b){return b=b||"none",a.style["-webkit-touch-callout"]=b,a.style["-webkit-user-select"]=b,a.style["-khtml-user-select"]=b,a.style["-moz-user-select"]=b,a.style["-ms-user-select"]=b,a.style["user-select"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a},addToDOM:function(a,b,c){var d;return void 0===c&&(c=!0),b&&("string"==typeof b?d=document.getElementById(b):"object"==typeof b&&1===b.nodeType&&(d=b)),d||(d=document.body),c&&d.style&&(d.style.overflow="hidden"),d.appendChild(a),a},removeFromDOM:function(a){a.parentNode&&a.parentNode.removeChild(a)},setTransform:function(a,b,c,d,e,f,g){return a.setTransform(d,f,g,e,b,c),a},setSmoothingEnabled:function(a,b){var d=c.Canvas.getSmoothingPrefix(a);return d&&(a[d]=b),a},getSmoothingPrefix:function(a){var b=["i","webkitI","msI","mozI","oI"];for(var c in b){var d=b[c]+"mageSmoothingEnabled";if(d in a)return d}return null},getSmoothingEnabled:function(a){var b=c.Canvas.getSmoothingPrefix(a);if(b)return a[b]},setImageRenderingCrisp:function(a){for(var b=["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"],c=0;cb-c},fuzzyCeil:function(a,b){return void 0===b&&(b=1e-4),Math.ceil(a-b)},fuzzyFloor:function(a,b){return void 0===b&&(b=1e-4),Math.floor(a+b)},average:function(){for(var a=0,b=arguments.length,c=0;c=c.Math.PI2-d?a=b:(Math.abs(b-a)>Math.PI&&(ba?a+=d:b=0?a:a+2*Math.PI},maxAdd:function(a,b,c){return Math.min(a+b,c)},minSub:function(a,b,c){return Math.max(a-b,c)},wrap:function(a,b,c){var d=c-b;if(d<=0)return 0;var e=(a-b)%d;return e<0&&(e+=d),e+b},wrapValue:function(a,b,c){return a=Math.abs(a),b=Math.abs(b),c=Math.abs(c),(a+b)%c},isOdd:function(a){return!!(1&a)},isEven:function(a){return!(1&a)},min:function(){if(1===arguments.length&&"object"==typeof arguments[0])var a=arguments[0];else var a=arguments;for(var b=1,c=0,d=a.length;ba[c]&&(c=b);return a[c]},minProperty:function(a){if(2===arguments.length&&"object"==typeof arguments[1])var b=arguments[1];else var b=arguments.slice(1);for(var c=1,d=0,e=b.length;cb[d][a]&&(d=c);return b[d][a]},wrapAngle:function(a,b){return b?this.wrap(a,-Math.PI,Math.PI):this.wrap(a,-180,180)},linearInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return b<0?this.linear(a[0],a[1],d):b>1?this.linear(a[c],a[c-1],c-d):this.linear(a[e],a[e+1>c?c:e+1],d-e)},bezierInterpolation:function(a,b){for(var c=0,d=a.length-1,e=0;e<=d;e++)c+=Math.pow(1-b,d-e)*Math.pow(b,e)*a[e]*this.bernstein(d,e);return c},catmullRomInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return a[0]===a[c]?(b<0&&(e=Math.floor(d=c*(1+b))),this.catmullRom(a[(e-1+c)%c],a[e],a[(e+1)%c],a[(e+2)%c],d-e)):b<0?a[0]-(this.catmullRom(a[0],a[0],a[1],a[1],-d)-a[0]):b>1?a[c]-(this.catmullRom(a[c],a[c],a[c-1],a[c-1],d-c)-a[c]):this.catmullRom(a[e?e-1:0],a[e],a[c0?Math.ceil(a):Math.floor(a)},sinCosGenerator:function(a,b,c,d){void 0===b&&(b=1),void 0===c&&(c=1),void 0===d&&(d=1);for(var e=b,f=c,g=d*Math.PI/a,h=[],i=[],j=0;j0?1:0},percent:function(a,b,c){return void 0===c&&(c=0),a>b||c>b?1:aa?0:(a-c)/b}};var g=Math.PI/180,h=180/Math.PI;return c.Math.degToRad=function(a){return a*g},c.Math.radToDeg=function(a){return a*h},c.RandomDataGenerator=function(a){void 0===a&&(a=[]),this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof a?this.state(a):this.sow(a)},c.RandomDataGenerator.prototype={rnd:function(){var a=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|a,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},sow:function(a){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,a)for(var b=0;b>>0,b-=d,b*=d,d=b>>>0,b-=d,d+=4294967296*b;return 2.3283064365386963e-10*(d>>>0)},integer:function(){return 4294967296*this.rnd.apply(this)},frac:function(){return this.rnd.apply(this)+1.1102230246251565e-16*(2097152*this.rnd.apply(this)|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(a,b){return Math.floor(this.realInRange(0,b-a+1)+a)},between:function(a,b){return this.integerInRange(a,b)},realInRange:function(a,b){return this.frac()*(b-a)+a},normal:function(){return 1-2*this.frac()},uuid:function(){var a="",b="";for(b=a="";a++<36;b+=~a%5|3*a&4?(15^a?8^this.frac()*(20^a?16:4):4).toString(16):"-");return b},pick:function(a){return a[this.integerInRange(0,a.length-1)]},sign:function(){return this.pick([-1,1])},weightedPick:function(a){return a[~~(Math.pow(this.frac(),2)*(a.length-1)+.5)]},timestamp:function(a,b){return this.realInRange(a||9466848e5,b||1577862e6)},angle:function(){return this.integerInRange(-180,180)},state:function(a){return"string"==typeof a&&a.match(/^!rnd/)&&(a=a.split(","),this.c=parseFloat(a[1]),this.s0=parseFloat(a[2]),this.s1=parseFloat(a[3]),this.s2=parseFloat(a[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}},c.RandomDataGenerator.prototype.constructor=c.RandomDataGenerator,c.QuadTree=function(a,b,c,d,e,f,g){this.maxObjects=10,this.maxLevels=4,this.level=0,this.bounds={},this.objects=[],this.nodes=[],this._empty=[],this.reset(a,b,c,d,e,f,g)},c.QuadTree.prototype={reset:function(a,b,c,d,e,f,g){this.maxObjects=e||10,this.maxLevels=f||4,this.level=g||0,this.bounds={x:Math.round(a),y:Math.round(b),width:c,height:d,subWidth:Math.floor(c/2),subHeight:Math.floor(d/2),right:Math.round(a)+Math.floor(c/2),bottom:Math.round(b)+Math.floor(d/2)},this.objects.length=0,this.nodes.length=0},populate:function(a){a.forEach(this.populateHandler,this,!0)},populateHandler:function(a){a.body&&a.exists&&this.insert(a.body)},split:function(){this.nodes[0]=new c.QuadTree(this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[1]=new c.QuadTree(this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[2]=new c.QuadTree(this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[3]=new c.QuadTree(this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1)},insert:function(a){var b,c=0;if(null!=this.nodes[0]&&-1!==(b=this.getIndex(a)))return void this.nodes[b].insert(a);if(this.objects.push(a),this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom&&(b=2):a.x>this.bounds.right&&(a.ythis.bounds.bottom&&(b=3)),b},retrieve:function(a){if(a instanceof c.Rectangle)var b=this.objects,d=this.getIndex(a);else{if(!a.body)return this._empty;var b=this.objects,d=this.getIndex(a.body)}return this.nodes[0]&&(-1!==d?b=b.concat(this.nodes[d].retrieve(a)):(b=b.concat(this.nodes[0].retrieve(a)),b=b.concat(this.nodes[1].retrieve(a)),b=b.concat(this.nodes[2].retrieve(a)),b=b.concat(this.nodes[3].retrieve(a)))),b},clear:function(){this.objects.length=0;for(var a=this.nodes.length;a--;)this.nodes[a].clear(),this.nodes.splice(a,1);this.nodes.length=0}},c.QuadTree.prototype.constructor=c.QuadTree,c.Net=function(a){this.game=a},c.Net.prototype={getHostName:function(){return window.location&&window.location.hostname?window.location.hostname:null},checkDomainName:function(a){return-1!==window.location.hostname.indexOf(a)},updateQueryString:function(a,b,c,d){void 0===c&&(c=!1),void 0!==d&&""!==d||(d=window.location.href);var e="",f=new RegExp("([?|&])"+a+"=.*?(&|#|$)(.*)","gi");if(f.test(d))e=void 0!==b&&null!==b?d.replace(f,"$1"+a+"="+b+"$2$3"):d.replace(f,"$1$3").replace(/(&|\?)$/,"");else if(void 0!==b&&null!==b){var g=-1!==d.indexOf("?")?"&":"?",h=d.split("#");d=h[0]+g+a+"="+b,h[1]&&(d+="#"+h[1]),e=d}else e=d;if(!c)return e;window.location.href=e},getQueryString:function(a){void 0===a&&(a="");var b={},c=location.search.substring(1).split("&");for(var d in c){var e=c[d].split("=");if(e.length>1){if(a&&a===this.decodeURI(e[0]))return this.decodeURI(e[1]);b[this.decodeURI(e[0])]=this.decodeURI(e[1])}}return b},decodeURI:function(a){return decodeURIComponent(a.replace(/\+/g," "))}},c.Net.prototype.constructor=c.Net,c.TweenManager=function(a){this.game=a,this.frameBased=!1,this._tweens=[],this._add=[],this.easeMap={Power0:c.Easing.Power0,Power1:c.Easing.Power1,Power2:c.Easing.Power2,Power3:c.Easing.Power3,Power4:c.Easing.Power4,Linear:c.Easing.Linear.None,Quad:c.Easing.Quadratic.Out,Cubic:c.Easing.Cubic.Out,Quart:c.Easing.Quartic.Out,Quint:c.Easing.Quintic.Out,Sine:c.Easing.Sinusoidal.Out,Expo:c.Easing.Exponential.Out,Circ:c.Easing.Circular.Out,Elastic:c.Easing.Elastic.Out,Back:c.Easing.Back.Out,Bounce:c.Easing.Bounce.Out,"Quad.easeIn":c.Easing.Quadratic.In,"Cubic.easeIn":c.Easing.Cubic.In,"Quart.easeIn":c.Easing.Quartic.In,"Quint.easeIn":c.Easing.Quintic.In,"Sine.easeIn":c.Easing.Sinusoidal.In,"Expo.easeIn":c.Easing.Exponential.In,"Circ.easeIn":c.Easing.Circular.In,"Elastic.easeIn":c.Easing.Elastic.In,"Back.easeIn":c.Easing.Back.In,"Bounce.easeIn":c.Easing.Bounce.In,"Quad.easeOut":c.Easing.Quadratic.Out,"Cubic.easeOut":c.Easing.Cubic.Out,"Quart.easeOut":c.Easing.Quartic.Out,"Quint.easeOut":c.Easing.Quintic.Out,"Sine.easeOut":c.Easing.Sinusoidal.Out,"Expo.easeOut":c.Easing.Exponential.Out,"Circ.easeOut":c.Easing.Circular.Out,"Elastic.easeOut":c.Easing.Elastic.Out,"Back.easeOut":c.Easing.Back.Out,"Bounce.easeOut":c.Easing.Bounce.Out,"Quad.easeInOut":c.Easing.Quadratic.InOut,"Cubic.easeInOut":c.Easing.Cubic.InOut,"Quart.easeInOut":c.Easing.Quartic.InOut,"Quint.easeInOut":c.Easing.Quintic.InOut,"Sine.easeInOut":c.Easing.Sinusoidal.InOut,"Expo.easeInOut":c.Easing.Exponential.InOut,"Circ.easeInOut":c.Easing.Circular.InOut,"Elastic.easeInOut":c.Easing.Elastic.InOut,"Back.easeInOut":c.Easing.Back.InOut,"Bounce.easeInOut":c.Easing.Bounce.InOut},this.game.onPause.add(this._pauseAll,this),this.game.onResume.add(this._resumeAll,this)},c.TweenManager.prototype={getAll:function(){return this._tweens},removeAll:function(){for(var a=0;a0&&(this._tweens=this._tweens.concat(this._add),this._add.length=0),!0},isTweening:function(a){return this._tweens.some(function(b){return b.target===a})},_pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._pause()},_resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._resume()},pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].pause()},resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].resume(!0)}},c.TweenManager.prototype.constructor=c.TweenManager,c.Tween=function(a,b,d){this.game=b,this.target=a,this.manager=d,this.timeline=[],this.reverse=!1,this.timeScale=1,this.repeatCounter=0,this.pendingDelete=!1,this.onStart=new c.Signal,this.onLoop=new c.Signal,this.onRepeat=new c.Signal,this.onChildComplete=new c.Signal,this.onComplete=new c.Signal,this.isRunning=!1,this.current=0,this.properties={},this.chainedTween=null,this.isPaused=!1,this.frameBased=d.frameBased,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,this._pausedTime=0,this._codePaused=!1,this._hasStarted=!1},c.Tween.prototype={to:function(a,b,d,e,f,g,h){return(void 0===b||b<=0)&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.to cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).to(a,b,d,f,g,h)),e&&this.start(),this)},from:function(a,b,d,e,f,g,h){return void 0===b&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.from cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).from(a,b,d,f,g,h)),e&&this.start(),this)},start:function(a){if(void 0===a&&(a=0),null===this.game||null===this.target||0===this.timeline.length||this.isRunning)return this;for(var b=0;bthis.timeline.length-1)&&(a=0),this.current=a,this.timeline[this.current].start(),this},stop:function(a){return void 0===a&&(a=!1),this.isRunning=!1,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,a&&(this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start()),this.manager.remove(this),this},updateTweenData:function(a,b,c){if(0===this.timeline.length)return this;if(void 0===c&&(c=0),-1===c)for(var d=0;d0?arguments[a-1].chainedTween=arguments[a]:this.chainedTween=arguments[a];return this},loop:function(a){return void 0===a&&(a=!0),this.repeatCounter=a?-1:0,this},onUpdateCallback:function(a,b){return this._onUpdateCallback=a,this._onUpdateCallbackContext=b,this},pause:function(){this.isPaused=!0,this._codePaused=!0,this._pausedTime=this.game.time.time},_pause:function(){this._codePaused||(this.isPaused=!0,this._pausedTime=this.game.time.time)},resume:function(){if(this.isPaused){this.isPaused=!1,this._codePaused=!1;for(var a=0;a0?(this.repeatCounter--,this.timeline[this.current].start(),this.onRepeat.dispatch(this.target,this),!0):(this.isRunning=!1,this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start(),!1):(this.onChildComplete.dispatch(this.target,this),this.timeline[this.current].start(),!0)}},generateData:function(a,b){if(null===this.game||null===this.target)return null;void 0===a&&(a=60),void 0===b&&(b=[]);for(var c=0;c0?this.isRunning=!1:this.isRunning=!0,this.isFrom)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a],this.parent.target[a]=this.vStart[a];return this.value=0,this.yoyoCounter=0,this.repeatCounter=this.repeatTotal,this},loadValues:function(){for(var a in this.parent.properties){if(this.vStart[a]=this.parent.properties[a],Array.isArray(this.vEnd[a])){if(0===this.vEnd[a].length)continue;0===this.percent&&(this.vEnd[a]=[this.vStart[a]].concat(this.vEnd[a]))}void 0!==this.vEnd[a]?("string"==typeof this.vEnd[a]&&(this.vEnd[a]=this.vStart[a]+parseFloat(this.vEnd[a],10)),this.parent.properties[a]=this.vEnd[a]):this.vEnd[a]=this.vStart[a],this.vStartCache[a]=this.vStart[a],this.vEndCache[a]=this.vEnd[a]}return this},update:function(a){if(this.isRunning){if(a=this.startTime))return c.TweenData.PENDING;this.isRunning=!0}var b=this.parent.frameBased?this.game.time.physicsElapsedMS:this.game.time.elapsedMS;this.parent.reverse?(this.dt-=b*this.parent.timeScale,this.dt=Math.max(this.dt,0)):(this.dt+=b*this.parent.timeScale,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);for(var d in this.vEnd){var e=this.vStart[d],f=this.vEnd[d];Array.isArray(f)?this.parent.target[d]=this.interpolationFunction.call(this.interpolationContext,f,this.value):this.parent.target[d]=e+(f-e)*this.value}return!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent?this.repeat():c.TweenData.RUNNING},generateData:function(a){this.parent.reverse?this.dt=this.duration:this.dt=0;var b=[],c=!1,d=1/a*1e3;do{this.parent.reverse?(this.dt-=d,this.dt=Math.max(this.dt,0)):(this.dt+=d,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);var e={};for(var f in this.vEnd){var g=this.vStart[f],h=this.vEnd[f];Array.isArray(h)?e[f]=this.interpolationFunction(h,this.value):e[f]=g+(h-g)*this.value}b.push(e),(!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent)&&(c=!0)}while(!c);if(this.yoyo){var i=b.slice();i.reverse(),b=b.concat(i)}return b},repeat:function(){if(this.yoyo){if(this.inReverse&&0===this.repeatCounter){for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];return this.inReverse=!1,c.TweenData.COMPLETE}this.inReverse=!this.inReverse}else if(0===this.repeatCounter)return c.TweenData.COMPLETE;if(this.inReverse)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a];else{for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];this.repeatCounter>0&&this.repeatCounter--}return this.startTime=this.game.time.time,this.yoyo&&this.inReverse?this.startTime+=this.yoyoDelay:this.inReverse||(this.startTime+=this.repeatDelay),this.parent.reverse?this.dt=this.duration:this.dt=0,c.TweenData.LOOPED}},c.TweenData.prototype.constructor=c.TweenData,c.Easing={Linear:{None:function(a){return a}},Quadratic:{In:function(a){return a*a},Out:function(a){return a*(2-a)},InOut:function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)},Out:function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)},InOut:function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:(a*=2)<1?.5*Math.pow(1024,a-1):.5*(2-Math.pow(2,-10*(a-1)))}},Circular:{In:function(a){return 1-Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),-c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4))},Out:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),c*Math.pow(2,-10*a)*Math.sin((a-b)*(2*Math.PI)/.4)+1)},InOut:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),(a*=2)<1?c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*-.5:c*Math.pow(2,-10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(a){var b=1.70158;return a*a*((b+1)*a-b)},Out:function(a){var b=1.70158;return--a*a*((b+1)*a+b)+1},InOut:function(a){var b=2.5949095;return(a*=2)<1?a*a*((b+1)*a-b)*.5:.5*((a-=2)*a*((b+1)*a+b)+2)}},Bounce:{In:function(a){return 1-c.Easing.Bounce.Out(1-a)},Out:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},InOut:function(a){return a<.5?.5*c.Easing.Bounce.In(2*a):.5*c.Easing.Bounce.Out(2*a-1)+.5}}},c.Easing.Default=c.Easing.Linear.None,c.Easing.Power0=c.Easing.Linear.None,c.Easing.Power1=c.Easing.Quadratic.Out,c.Easing.Power2=c.Easing.Cubic.Out,c.Easing.Power3=c.Easing.Quartic.Out,c.Easing.Power4=c.Easing.Quintic.Out,c.Time=function(a){this.game=a,this.time=0,this.prevTime=0,this.now=0,this.elapsed=0,this.elapsedMS=0,this.physicsElapsed=1/60,this.physicsElapsedMS=1/60*1e3,this.desiredFpsMult=1/60,this._desiredFps=60,this.suggestedFps=this.desiredFps,this.slowMotion=1,this.advancedTiming=!1,this.frames=0,this.fps=0,this.fpsMin=1e3,this.fpsMax=0,this.msMin=1e3,this.msMax=0,this.pauseDuration=0,this.timeToCall=0,this.timeExpected=0,this.events=new c.Timer(this.game,!1),this._frameCount=0,this._elapsedAccumulator=0,this._started=0,this._timeLastSecond=0,this._pauseStarted=0,this._justResumed=!1,this._timers=[]},c.Time.prototype={boot:function(){this._started=Date.now(),this.time=Date.now(),this.events.start(),this.timeExpected=this.time},add:function(a){return this._timers.push(a),a},create:function(a){void 0===a&&(a=!0);var b=new c.Timer(this.game,a);return this._timers.push(b),b},removeAll:function(){for(var a=0;a=2*this._desiredFps&&(this.suggestedFps=5*Math.floor(200/(this._elapsedAccumulator/this._frameCount)),this._frameCount=0,this._elapsedAccumulator=0),this.msMin=Math.min(this.msMin,this.elapsed),this.msMax=Math.max(this.msMax,this.elapsed),this.frames++,this.now>this._timeLastSecond+1e3&&(this.fps=Math.round(1e3*this.frames/(this.now-this._timeLastSecond)),this.fpsMin=Math.min(this.fpsMin,this.fps),this.fpsMax=Math.max(this.fpsMax,this.fps),this._timeLastSecond=this.now,this.frames=0)},gamePaused:function(){this._pauseStarted=Date.now(),this.events.pause();for(var a=this._timers.length;a--;)this._timers[a]._pause()},gameResumed:function(){this.time=Date.now(),this.pauseDuration=this.time-this._pauseStarted,this.events.resume();for(var a=this._timers.length;a--;)this._timers[a]._resume()},totalElapsedSeconds:function(){return.001*(this.time-this._started)},elapsedSince:function(a){return this.time-a},elapsedSecondsSince:function(a){return.001*(this.time-a)},reset:function(){this._started=this.time,this.removeAll()}},Object.defineProperty(c.Time.prototype,"desiredFps",{get:function(){return this._desiredFps},set:function(a){this._desiredFps=a,this.physicsElapsed=1/a,this.physicsElapsedMS=1e3*this.physicsElapsed,this.desiredFpsMult=1/a}}),c.Time.prototype.constructor=c.Time,c.Timer=function(a,b){void 0===b&&(b=!0),this.game=a,this.running=!1,this.autoDestroy=b,this.expired=!1,this.elapsed=0,this.events=[],this.onComplete=new c.Signal,this.nextTick=0,this.timeCap=1e3,this.paused=!1,this._codePaused=!1,this._started=0,this._pauseStarted=0,this._pauseTotal=0,this._now=Date.now(),this._len=0,this._marked=0,this._i=0,this._diff=0,this._newTick=0},c.Timer.MINUTE=6e4,c.Timer.SECOND=1e3,c.Timer.HALF=500,c.Timer.QUARTER=250,c.Timer.prototype={create:function(a,b,d,e,f,g){a=Math.round(a);var h=a;0===this._now?h+=this.game.time.time:h+=this._now;var i=new c.TimerEvent(this,a,h,d,b,e,f,g);return this.events.push(i),this.order(),this.expired=!1,i},add:function(a,b,c){return this.create(a,!1,0,b,c,Array.prototype.slice.call(arguments,3))},repeat:function(a,b,c,d){return this.create(a,!1,b,c,d,Array.prototype.slice.call(arguments,4))},loop:function(a,b,c){return this.create(a,!0,0,b,c,Array.prototype.slice.call(arguments,3))},start:function(a){if(!this.running){this._started=this.game.time.time+(a||0),this.running=!0;for(var b=0;b0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(a,b){return a.tickb.tick?1:0},clearPendingEvents:function(){for(this._i=this.events.length;this._i--;)this.events[this._i].pendingDelete&&this.events.splice(this._i,1);this._len=this.events.length,this._i=0},update:function(a){if(this.paused)return!0;if(this.elapsed=a-this._now,this._now=a,this.elapsed>this.timeCap&&this.adjustEvents(a-this.elapsed),this._marked=0,this.clearPendingEvents(),this.running&&this._now>=this.nextTick&&this._len>0){for(;this._i=this.events[this._i].tick&&!this.events[this._i].pendingDelete;)this._newTick=this._now+this.events[this._i].delay-(this._now-this.events[this._i].tick),this._newTick<0&&(this._newTick=this._now+this.events[this._i].delay),!0===this.events[this._i].loop?(this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):this.events[this._i].repeatCount>0?(this.events[this._i].repeatCount--,this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):(this._marked++,this.events[this._i].pendingDelete=!0,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)),this._i++;this.events.length>this._marked?this.order():(this.expired=!0,this.onComplete.dispatch(this))}return!this.expired||!this.autoDestroy},pause:function(){this.running&&(this._codePaused=!0,this.paused||(this._pauseStarted=this.game.time.time,this.paused=!0))},_pause:function(){!this.paused&&this.running&&(this._pauseStarted=this.game.time.time,this.paused=!0)},adjustEvents:function(a){for(var b=0;bthis._now?this.nextTick-this._now:0}}),Object.defineProperty(c.Timer.prototype,"length",{get:function(){return this.events.length}}),Object.defineProperty(c.Timer.prototype,"ms",{get:function(){return this.running?this._now-this._started-this._pauseTotal:0}}),Object.defineProperty(c.Timer.prototype,"seconds",{get:function(){return this.running?.001*this.ms:0}}),c.Timer.prototype.constructor=c.Timer,c.TimerEvent=function(a,b,c,d,e,f,g,h){this.timer=a,this.delay=b,this.tick=c,this.repeatCount=d-1,this.loop=e,this.callback=f,this.callbackContext=g,this.args=h,this.pendingDelete=!1},c.TimerEvent.prototype.constructor=c.TimerEvent,c.AnimationManager=function(a){this.sprite=a,this.game=a.game,this.currentFrame=null,this.currentAnim=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},c.AnimationManager.prototype={loadFrameData:function(a,b){if(void 0===a)return!1;if(this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(a);return this._frameData=a,void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},copyFrameData:function(a,b){if(this._frameData=a.clone(),this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(this._frameData);return void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},add:function(a,b,d,e,f){return b=b||[],d=d||60,void 0===e&&(e=!1),void 0===f&&(f=!(!b||"number"!=typeof b[0])),this._outputFrames=[],this._frameData.getFrameIndexes(b,f,this._outputFrames),this._anims[a]=new c.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,d,e),this.currentAnim=this._anims[a],this.sprite.tilingTexture&&(this.sprite.refreshTexture=!0),this._anims[a]},validateFrames:function(a,b){void 0===b&&(b=!0);for(var c=0;cthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(a[c]))return!1;return!0},play:function(a,b,c,d){if(this._anims[a])return this.currentAnim===this._anims[a]?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(b,c,d)):this.currentAnim:(this.currentAnim&&this.currentAnim.isPlaying&&this.currentAnim.stop(),this.currentAnim=this._anims[a],this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(b,c,d))},stop:function(a,b){void 0===b&&(b=!1),!this.currentAnim||"string"==typeof a&&a!==this.currentAnim.name||this.currentAnim.stop(b)},update:function(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))},next:function(a){this.currentAnim&&(this.currentAnim.next(a),this.currentFrame=this.currentAnim.currentFrame)},previous:function(a){this.currentAnim&&(this.currentAnim.previous(a),this.currentFrame=this.currentAnim.currentFrame)},getAnimation:function(a){return"string"==typeof a&&this._anims[a]?this._anims[a]:null},refreshFrame:function(){},destroy:function(){var a=null;for(var a in this._anims)this._anims.hasOwnProperty(a)&&this._anims[a].destroy();this._anims={},this._outputFrames=[],this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null,this.game=null}},c.AnimationManager.prototype.constructor=c.AnimationManager,Object.defineProperty(c.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(c.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData.total}}),Object.defineProperty(c.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(c.AnimationManager.prototype,"name",{get:function(){if(this.currentAnim)return this.currentAnim.name}}),Object.defineProperty(c.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame)return this.currentFrame.index},set:function(a){"number"==typeof a&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this.currentFrame&&this.sprite.setFrame(this.currentFrame))}}),Object.defineProperty(c.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame)return this.currentFrame.name},set:function(a){"string"==typeof a&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this.currentFrame&&(this._frameIndex=this.currentFrame.index,this.sprite.setFrame(this.currentFrame))):console.warn("Cannot set frameName: "+a)}}),c.Animation=function(a,b,d,e,f,g,h){void 0===h&&(h=!1),this.game=a,this._parent=b,this._frameData=e,this.name=d,this._frames=[],this._frames=this._frames.concat(f),this.delay=1e3/g,this.loop=h,this.loopCount=0,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.onStart=new c.Signal,this.onUpdate=null,this.onComplete=new c.Signal,this.onLoop=new c.Signal,this.isReversed=!1,this.game.onPause.add(this.onPause,this),this.game.onResume.add(this.onResume,this)},c.Animation.prototype={play:function(a,b,c){return"number"==typeof a&&(this.delay=1e3/a),"boolean"==typeof b&&(this.loop=b),void 0!==c&&(this.killOnComplete=c),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=this.isReversed?this._frames.length-1:0,this.updateCurrentFrame(!1,!0),this._parent.events.onAnimationStart$dispatch(this._parent,this),this.onStart.dispatch(this._parent,this),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this},restart:function(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setFrame(this.currentFrame),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this._parent,this)},reverse:function(){return this.reversed=!this.reversed,this},reverseOnce:function(){return this.onComplete.addOnce(this.reverse,this),this.reverse()},setFrame:function(a,b){var c;if(void 0===b&&(b=!1),"string"==typeof a)for(var d=0;d=this._timeNextFrame)&&(this._frameSkip=1,this._frameDiff=this.game.time.time-this._timeNextFrame,this._timeLastFrame=this.game.time.time,this._frameDiff>this.delay&&(this._frameSkip=Math.floor(this._frameDiff/this.delay),this._frameDiff-=this._frameSkip*this.delay),this._timeNextFrame=this.game.time.time+(this.delay-this._frameDiff),this.isReversed?this._frameIndex-=this._frameSkip:this._frameIndex+=this._frameSkip,!this.isReversed&&this._frameIndex>=this._frames.length||this.isReversed&&this._frameIndex<=-1?this.loop?(this._frameIndex=Math.abs(this._frameIndex)%this._frames.length,this.isReversed&&(this._frameIndex=this._frames.length-1-this._frameIndex),this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setFrame(this.currentFrame),this.loopCount++,this._parent.events.onAnimationLoop$dispatch(this._parent,this),this.onLoop.dispatch(this._parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))},updateCurrentFrame:function(a,b){if(void 0===b&&(b=!1),!this._frameData)return!1;var c=this.currentFrame.index;return this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&(b||!b&&c!==this.currentFrame.index)&&this._parent.setFrame(this.currentFrame),!this.onUpdate||!a||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)},next:function(a){void 0===a&&(a=1);var b=this._frameIndex+a;b>=this._frames.length&&(this.loop?b%=this._frames.length:b=this._frames.length-1),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},previous:function(a){void 0===a&&(a=1);var b=this._frameIndex-a;b<0&&(this.loop?b=this._frames.length+b:b++),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},updateFrameData:function(a){this._frameData=a,this.currentFrame=this._frameData?this._frameData.getFrame(this._frames[this._frameIndex%this._frames.length]):null},destroy:function(){this._frameData&&(this.game.onPause.remove(this.onPause,this),this.game.onResume.remove(this.onResume,this),this.game=null,this._parent=null,this._frames=null,this._frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())},complete:function(){this._frameIndex=this._frames.length-1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this._parent.events.onAnimationComplete$dispatch(this._parent,this),this.onComplete.dispatch(this._parent,this),this.killOnComplete&&this._parent.kill()}},c.Animation.prototype.constructor=c.Animation,Object.defineProperty(c.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(a){this.isPaused=a,a?this._pauseStartTime=this.game.time.time:this.isPlaying&&(this._timeNextFrame=this.game.time.time+this.delay)}}),Object.defineProperty(c.Animation.prototype,"reversed",{get:function(){return this.isReversed},set:function(a){this.isReversed=a}}),Object.defineProperty(c.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(c.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(a){this.currentFrame=this._frameData.getFrame(this._frames[a]),null!==this.currentFrame&&(this._frameIndex=a,this._parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}}),Object.defineProperty(c.Animation.prototype,"speed",{get:function(){return 1e3/this.delay},set:function(a){a>0&&(this.delay=1e3/a)}}),Object.defineProperty(c.Animation.prototype,"enableUpdate",{get:function(){return null!==this.onUpdate},set:function(a){a&&null===this.onUpdate?this.onUpdate=new c.Signal:a||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}}),c.Animation.generateFrameNames=function(a,b,d,e,f){void 0===e&&(e="");var g=[],h="";if(b=d;i--)h="number"==typeof f?c.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+e,g.push(h);return g},c.Frame=function(a,b,d,e,f,g){this.index=a,this.x=b,this.y=d,this.width=e,this.height=f,this.name=g,this.centerX=Math.floor(e/2),this.centerY=Math.floor(f/2),this.distance=c.Math.distance(0,0,e,f),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=e,this.sourceSizeH=f,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0,this.right=this.x+this.width,this.bottom=this.y+this.height},c.Frame.prototype={resize:function(a,b){this.width=a,this.height=b,this.centerX=Math.floor(a/2),this.centerY=Math.floor(b/2),this.distance=c.Math.distance(0,0,a,b),this.sourceSizeW=a,this.sourceSizeH=b,this.right=this.x+a,this.bottom=this.y+b},setTrim:function(a,b,c,d,e,f,g){this.trimmed=a,a&&(this.sourceSizeW=b,this.sourceSizeH=c,this.centerX=Math.floor(b/2),this.centerY=Math.floor(c/2),this.spriteSourceSizeX=d,this.spriteSourceSizeY=e,this.spriteSourceSizeW=f,this.spriteSourceSizeH=g)},clone:function(){var a=new c.Frame(this.index,this.x,this.y,this.width,this.height,this.name);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},getRect:function(a){return void 0===a?a=new c.Rectangle(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a}},c.Frame.prototype.constructor=c.Frame,c.FrameData=function(){this._frames=[],this._frameNames=[]},c.FrameData.prototype={addFrame:function(a){return a.index=this._frames.length,this._frames.push(a),""!==a.name&&(this._frameNames[a.name]=a.index),a},getFrame:function(a){return a>=this._frames.length&&(a=0),this._frames[a]},getFrameByName:function(a){return"number"==typeof this._frameNames[a]?this._frames[this._frameNames[a]]:null},checkFrameName:function(a){return null!=this._frameNames[a]},clone:function(){for(var a=new c.FrameData,b=0;bj&&(p=g,q+=e+h);return o},JSONData:function(a,b){if(!b.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),void console.log(b);for(var d,e=new c.FrameData,f=b.frames,g=0;g tag");for(var d,e,f,g,h,i,j,k,l,m,n,o=new c.FrameData,p=b.getElementsByTagName("SubTexture"),q=0;q-1},getAssetIndex:function(a,b){for(var c=-1,d=0;d-1&&{index:c,file:this._fileList[c]}},reset:function(a,b){void 0===b&&(b=!1),this.resetLocked||(a&&(this.preloadSprite=null),this.isLoading=!1,this._processingHead=0,this._fileList.length=0,this._flightQueue.length=0,this._fileLoadStarted=!1,this._totalFileCount=0,this._totalPackCount=0,this._loadedPackCount=0,this._loadedFileCount=0,b&&(this.onLoadStart.removeAll(),this.onLoadComplete.removeAll(),this.onPackComplete.removeAll(),this.onFileStart.removeAll(),this.onFileComplete.removeAll(),this.onFileError.removeAll()))},addToFileList:function(a,b,c,d,e,f){if(void 0===e&&(e=!1),void 0===b||""===b)return console.warn("Phaser.Loader: Invalid or no key given of type "+a),this;if(void 0===c||null===c){if(!f)return console.warn("Phaser.Loader: No URL given for file type: "+a+" key: "+b),this;c=b+f}var g={type:a,key:b,path:this.path,url:c,syncPoint:this._withSyncPointDepth>0,data:null,loading:!1,loaded:!1,error:!1};if(d)for(var h in d)g[h]=d[h];var i=this.getAssetIndex(a,b);if(e&&i>-1){var j=this._fileList[i];j.loading||j.loaded?(this._fileList.push(g),this._totalFileCount++):this._fileList[i]=g}else-1===i&&(this._fileList.push(g),this._totalFileCount++);return this},replaceInFileList:function(a,b,c,d){return this.addToFileList(a,b,c,d,!0)},pack:function(a,b,c,d){if(void 0===b&&(b=null),void 0===c&&(c=null),void 0===d&&(d=null),!b&&!c)return console.warn("Phaser.Loader.pack - Both url and data are null. One must be set."),this;var e={type:"packfile",key:a,url:b,path:this.path,syncPoint:!0,data:null,loading:!1,loaded:!1,error:!1,callbackContext:d};c&&("string"==typeof c&&(c=JSON.parse(c)),e.data=c||{},e.loaded=!0);for(var f=0;f=e||d&&this._loadedPackCount===this._totalPackCount)break}if(this.updateProgress(),this._processingHead>=this._fileList.length)this.finishedLoading();else if(!this._flightQueue.length){console.warn("Phaser.Loader - aborting: processing queue empty, loading may have stalled");var f=this;setTimeout(function(){f.finishedLoading(!0)},2e3)}},finishedLoading:function(a){this.hasLoaded||(this.hasLoaded=!0,this.isLoading=!1,a||this._fileLoadStarted||(this._fileLoadStarted=!0,this.onLoadStart.dispatch()),this.onLoadComplete.dispatch(),this.game.state.loadComplete(),this.reset())},asyncComplete:function(a,b){void 0===b&&(b=""),a.loaded=!0,a.error=!!b,b&&(a.errorMessage=b,console.warn("Phaser.Loader - "+a.type+"["+a.key+"]: "+b)),this.processLoadQueue()},processPack:function(a){var b=a.data[a.key];if(!b)return void console.warn("Phaser.Loader - "+a.key+": pack has data, but not for pack key");for(var d=0;d=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,f.send()},xhrLoadWithXDR:function(a,b,c,d,e){this._warnedAboutXDomainRequest||this.game.device.ie&&!(this.game.device.ieVersion>=10)||(this._warnedAboutXDomainRequest=!0,console.warn("Phaser.Loader - using XDomainRequest outside of IE 9"));var f=new window.XDomainRequest;f.open("GET",b,!0),f.responseType=c,f.timeout=3e3,e=e||this.fileError;var g=this;f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.ontimeout=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.onprogress=function(){},f.onload=function(){try{return 4===f.readyState&&f.status>=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,setTimeout(function(){f.send()},0)},getVideoURL:function(a){for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayVideo(c))return a[b]}}return null},getAudioURL:function(a){if(this.game.sound.noAudio)return null;for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayAudio(c))return a[b]}}return null},fileError:function(a,b,c){var d=a.requestUrl||this.transformUrl(a.url,a),e="error loading asset from URL "+d;!c&&b&&(c=b.status),c&&(e=e+" ("+c+")"),this.asyncComplete(a,e)},fileComplete:function(a,b){var d=!0;switch(a.type){case"packfile":var e=JSON.parse(b.responseText);a.data=e||{};break;case"image":this.cache.addImage(a.key,a.url,a.data);break;case"spritesheet":this.cache.addSpriteSheet(a.key,a.url,a.data,a.frameWidth,a.frameHeight,a.frameMax,a.margin,a.spacing);break;case"textureatlas":if(null==a.atlasURL)this.cache.addTextureAtlas(a.key,a.url,a.data,a.atlasData,a.format);else if(d=!1,a.format===c.Loader.TEXTURE_ATLAS_JSON_ARRAY||a.format===c.Loader.TEXTURE_ATLAS_JSON_HASH||a.format===c.Loader.TEXTURE_ATLAS_JSON_PYXEL)this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.jsonLoadComplete);else{if(a.format!==c.Loader.TEXTURE_ATLAS_XML_STARLING)throw new Error("Phaser.Loader. Invalid Texture Atlas format: "+a.format);this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.xmlLoadComplete)}break;case"bitmapfont":a.atlasURL?(d=!1,this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",function(a,b){var c;try{c=JSON.parse(b.responseText)}catch(a){}c?(a.atlasType="json",this.jsonLoadComplete(a,b)):(a.atlasType="xml",this.xmlLoadComplete(a,b))})):this.cache.addBitmapFont(a.key,a.url,a.data,a.atlasData,a.atlasType,a.xSpacing,a.ySpacing);break;case"video":if(a.asBlob)try{a.data=b.response}catch(b){throw new Error("Phaser.Loader. Unable to parse video file as Blob: "+a.key)}this.cache.addVideo(a.key,a.url,a.data,a.asBlob);break;case"audio":this.game.sound.usingWebAudio?(a.data=b.response,this.cache.addSound(a.key,a.url,a.data,!0,!1),a.autoDecode&&this.game.sound.decode(a.key)):this.cache.addSound(a.key,a.url,a.data,!1,!0);break;case"text":a.data=b.responseText,this.cache.addText(a.key,a.url,a.data);break;case"shader":a.data=b.responseText,this.cache.addShader(a.key,a.url,a.data);break;case"physics":var e=JSON.parse(b.responseText);this.cache.addPhysicsData(a.key,a.url,e,a.format);break;case"script":a.data=document.createElement("script"),a.data.language="javascript",a.data.type="text/javascript",a.data.defer=!1,a.data.text=b.responseText,document.head.appendChild(a.data),a.callback&&(a.data=a.callback.call(a.callbackContext,a.key,b.responseText));break;case"binary":a.callback?a.data=a.callback.call(a.callbackContext,a.key,b.response):a.data=b.response,this.cache.addBinary(a.key,a.data)}d&&this.asyncComplete(a)},jsonLoadComplete:function(a,b){var c=JSON.parse(b.responseText);"tilemap"===a.type?this.cache.addTilemap(a.key,a.url,c,a.format):"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,c,a.atlasType,a.xSpacing,a.ySpacing):"json"===a.type?this.cache.addJSON(a.key,a.url,c):this.cache.addTextureAtlas(a.key,a.url,a.data,c,a.format),this.asyncComplete(a)},csvLoadComplete:function(a,b){var c=b.responseText;this.cache.addTilemap(a.key,a.url,c,a.format),this.asyncComplete(a)},xmlLoadComplete:function(a,b){var c=b.responseText,d=this.parseXml(c);if(!d){var e=b.responseType||b.contentType;return console.warn("Phaser.Loader - "+a.key+": invalid XML ("+e+")"),void this.asyncComplete(a,"invalid XML")}"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,d,a.atlasType,a.xSpacing,a.ySpacing):"textureatlas"===a.type?this.cache.addTextureAtlas(a.key,a.url,a.data,d,a.format):"xml"===a.type&&this.cache.addXML(a.key,a.url,d),this.asyncComplete(a)},parseXml:function(a){var b;try{if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)}catch(a){b=null}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length?b:null},updateProgress:function(){this.preloadSprite&&(0===this.preloadSprite.direction?this.preloadSprite.rect.width=Math.floor(this.preloadSprite.width/100*this.progress):this.preloadSprite.rect.height=Math.floor(this.preloadSprite.height/100*this.progress),this.preloadSprite.sprite?this.preloadSprite.sprite.updateCrop():this.preloadSprite=null)},totalLoadedFiles:function(){return this._loadedFileCount},totalQueuedFiles:function(){return this._totalFileCount-this._loadedFileCount},totalLoadedPacks:function(){return this._totalPackCount},totalQueuedPacks:function(){return this._totalPackCount-this._loadedPackCount}},Object.defineProperty(c.Loader.prototype,"progressFloat",{get:function(){var a=this._loadedFileCount/this._totalFileCount*100;return c.Math.clamp(a||0,0,100)}}),Object.defineProperty(c.Loader.prototype,"progress",{get:function(){return Math.round(this.progressFloat)}}),c.Loader.prototype.constructor=c.Loader, +c.LoaderParser={bitmapFont:function(a,b,c,d){return this.xmlBitmapFont(a,b,c,d)},xmlBitmapFont:function(a,b,c,d){var e={},f=a.getElementsByTagName("info")[0],g=a.getElementsByTagName("common")[0];e.font=f.getAttribute("face"),e.size=parseInt(f.getAttribute("size"),10),e.lineHeight=parseInt(g.getAttribute("lineHeight"),10)+d,e.chars={};for(var h=a.getElementsByTagName("char"),i=0;i=this.durationMS&&(this.usingWebAudio?this.loop?(this.onLoop.dispatch(this),this.isPlaying=!1,""===this.currentMarker?(this.currentTime=0,this.startTime=this.game.time.time,this.isPlaying=!0):(this.onMarkerComplete.dispatch(this.currentMarker,this),this.play(this.currentMarker,0,this.volume,!0,!0))):""!==this.currentMarker&&this.stop():this.loop?(this.onLoop.dispatch(this),""===this.currentMarker&&(this.currentTime=0,this.startTime=this.game.time.time),this.isPlaying=!1,this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop()))},loopFull:function(a){return this.play(null,0,a,!0)},play:function(a,b,c,d,e){if(void 0!==a&&!1!==a&&null!==a||(a=""),void 0===e&&(e=!0),this.isPlaying&&!this.allowMultiple&&!e&&!this.override)return this;if(this._sound&&this.isPlaying&&!this.allowMultiple&&(this.override||e)){if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);this.isPlaying=!1}var f=Object.keys(this.markers);if(""===a&&1===f.length&&(a=f[0]),""===a&&f.length>0)return this;if(""!==a){if(!this.markers[a])return console.warn("Phaser.Sound.play: audio marker "+a+" doesn't exist"),this;this.currentMarker=a,this.position=this.markers[a].start,this.volume=this.markers[a].volume,this.loop=this.markers[a].loop,this.duration=this.markers[a].duration,this.durationMS=this.markers[a].durationMS,void 0!==c&&(this.volume=c),void 0!==d&&(this.loop=d),this._tempMarker=a,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else b=b||0,void 0===c&&(c=this._volume),void 0===d&&(d=this.loop),this.position=Math.max(0,b),this.volume=c,this.loop=d,this.duration=0,this.durationMS=0,this._tempMarker=a,this._tempPosition=b,this._tempVolume=c,this._tempLoop=d;return this.usingWebAudio?this.game.cache.isSoundDecoded(this.key)?(this._sound=this.context.createBufferSource(),this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this._buffer=this.game.cache.getSoundData(this.key),this._sound.buffer=this._buffer,this.loop&&""===a&&(this._sound.loop=!0),this.loop||""!==a||(this._sound.onended=this.onEndedHandler.bind(this)),this.totalDuration=this._sound.buffer.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=Math.ceil(1e3*this.totalDuration)),void 0===this._sound.start?this._sound.noteGrainOn(0,this.position,this.duration):this.loop&&""===a?this._sound.start(0,0):this._sound.start(0,this.position,this.duration),this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):(this.pendingPlayback=!0,this.game.cache.getSound(this.key)&&!1===this.game.cache.getSound(this.key).isDecoding&&this.game.sound.decode(this.key,this)):this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked?(this.game.cache.reloadSound(this.key),this.pendingPlayback=!0):this._sound&&(this.game.device.wechatMinigame||this.game.device.cocoonJS||4===this._sound.readyState)?(this.loop&&(this._sound.loop=!0),!this.loop&&""===a&&this.game.device.wechatMinigame&&this._sound.addEventListener("ended",this.onEndedHandler.bind(this)),this._sound.play(),this.totalDuration=this._sound.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this._sound.currentTime=this.position,this._sound.muted=this._muted,this._muted||this.game.sound.mute?this._sound.volume=0:this._sound.volume=this._volume,this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):this.pendingPlayback=!0,this},restart:function(a,b,c,d){a=a||"",b=b||0,c=c||1,void 0===d&&(d=!1),this.play(a,b,c,d,!0)},pause:function(){this.isPlaying&&this._sound&&(this.paused=!0,this.pausedPosition=this.currentTime,this.pausedTime=this.game.time.time,this._tempPause=this._sound.currentTime,this.onPause.dispatch(this),this.stop())},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){var a=Math.max(0,this.position+this.pausedPosition/1e3);this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this.loop&&(this._sound.loop=!0),this.loop||""!==this.currentMarker||(this._sound.onended=this.onEndedHandler.bind(this));var b=this.duration-this.pausedPosition/1e3;void 0===this._sound.start?this._sound.noteGrainOn(0,a,b):this.loop&&this.game.device.chrome?42===this.game.device.chromeVersion?this._sound.start(0):this._sound.start(0,a):this._sound.start(0,a,b)}else this._sound.currentTime=this._tempPause,this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.time-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound)if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);if(this.pendingPlayback=!1,this.isPlaying=!1,!this.paused){var a=this.currentMarker;""!==this.currentMarker&&this.onMarkerComplete.dispatch(this.currentMarker,this),this.currentMarker="",null!==this.fadeTween&&this.fadeTween.stop(),this.onStop.dispatch(this,a)}},fadeIn:function(a,b,c){void 0===b&&(b=!1),void 0===c&&(c=this.currentMarker),this.paused||(this.play(c,0,0,b),this.fadeTo(a,1))},fadeOut:function(a){this.fadeTo(a,0)},fadeTo:function(a,b){if(this.isPlaying&&!this.paused&&b!==this.volume){if(void 0===a&&(a=1e3),void 0===b)return void console.warn("Phaser.Sound.fadeTo: No Volume Specified.");this.fadeTween=this.game.add.tween(this).to({volume:b},a,c.Easing.Linear.None,!0),this.fadeTween.onComplete.add(this.fadeComplete,this)}},fadeComplete:function(){this.onFadeComplete.dispatch(this,this.volume),0===this.volume&&this.stop()},updateGlobalVolume:function(a){this.usingAudioTag&&this._sound&&(this._sound.volume=a*this._volume)},destroy:function(a){void 0===a&&(a=!0),this.stop(),a?this.game.sound.remove(this):(this.markers={},this.context=null,this._buffer=null,this.externalNode=null,this.onDecoded.dispose(),this.onPlay.dispose(),this.onPause.dispose(),this.onResume.dispose(),this.onLoop.dispose(),this.onStop.dispose(),this.onMute.dispose(),this.onMarkerComplete.dispose())}},c.Sound.prototype.constructor=c.Sound,Object.defineProperty(c.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(c.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(c.Sound.prototype,"mute",{get:function(){return this._muted||this.game.sound.mute},set:function(a){(a=a||!1)!==this._muted&&(a?(this._muted=!0,this._muteVolume=this._tempVolume,this.game.device.wechatMinigame?this._sound.pause():this.usingWebAudio?this.gainNode.gain.value=0:this.usingAudioTag&&this._sound&&(this._sound.volume=0)):(this._muted=!1,this.game.device.wechatMinigame&&this.isPlaying?this._sound.play():this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this))}}),Object.defineProperty(c.Sound.prototype,"volume",{get:function(){return this._volume},set:function(a){if(this.game.device.firefox&&this.usingAudioTag&&(a=this.game.math.clamp(a,0,1)),this._muted)return void(this._muteVolume=a);this._tempVolume=a,this._volume=a,this.usingWebAudio?this.gainNode.gain.value=a:this.usingAudioTag&&this._sound&&(this._sound.volume=a)}}),c.SoundManager=function(a){this.game=a,this.onSoundDecode=new c.Signal,this.onVolumeChange=new c.Signal,this.onMute=new c.Signal,this.onUnMute=new c.Signal,this.context=null,this.usingWebAudio=!1,this.usingAudioTag=!1,this.noAudio=!1,this.connectToMaster=!0,this.touchLocked=!1,this.channels=32,this.muteOnPause=!0,this._codeMuted=!1,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this._watchList=new c.ArraySet,this._watching=!1,this._watchCallback=null,this._watchContext=null},c.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&!1===this.game.device.webAudio&&(this.channels=1),window.PhaserGlobal){if(!0===window.PhaserGlobal.disableAudio)return this.noAudio=!0,void(this.touchLocked=!1);if(!0===window.PhaserGlobal.disableWebAudio)return this.usingAudioTag=!0,void(this.touchLocked=!1)}if(window.PhaserGlobal&&window.PhaserGlobal.audioContext)this.context=window.PhaserGlobal.audioContext;else if(window.AudioContext)try{this.context=new window.AudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}else if(window.webkitAudioContext)try{this.context=new window.webkitAudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}if(null===this.context){if(void 0===window.Audio)return void(this.noAudio=!0);this.usingAudioTag=!0}else this.usingWebAudio=!0,void 0===this.context.createGain?this.masterGain=this.context.createGainNode():this.masterGain=this.context.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this.context.destination);this.noAudio||!this.game.device.cocoonJS&&(this.game.device.chrome||this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)&&this.setTouchLock()},setTouchLock:function(){this.noAudio||window.PhaserGlobal&&!0===window.PhaserGlobal.disableAudio||(this.game.device.iOSVersion>8||this.game.device.chromeVersion>=55?this.game.input.touch.addTouchLockCallback(this.unlock,this,!0):this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0)},unlock:function(){if(this.noAudio||!this.touchLocked||null!==this._unlockSource)return!0;if(this.usingAudioTag)this.touchLocked=!1,this._unlockSource=null;else if(this.usingWebAudio){var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0},stopAll:function(){if(!this.noAudio)for(var a=0;a1&&(a=1),this._volume!==a){if(this._volume=a,this.usingWebAudio)this.masterGain.gain.value=a;else for(var b=0;b=400?0:100,this.dom.getOffset(this.game.canvas,this.offset);var b=this._parentBounds.width,d=this._parentBounds.height,e=this.getParentBounds(this._parentBounds),f=e.width!==b||e.height!==d,g=this.updateOrientationState();(f||g)&&(this.onResize&&this.onResize.call(this.onResizeContext,this,e),this.updateLayout(),this.signalSizeChange());var h=2*this._updateThrottle;this._updateThrottleb;return i=i?d:!d,i?(a.width=Math.floor(e),a.height=Math.floor(f)):(a.width=Math.floor(g),a.height=Math.floor(h)),a},destroy:function(){this.game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),this.compatibility.supportsFullScreen&&(document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1))}},c.ScaleManager.prototype.constructor=c.ScaleManager,Object.defineProperty(c.ScaleManager.prototype,"boundingParent",{get:function(){return this.parentIsWindow||this.isFullScreen&&this.hasPhaserSetFullScreen&&!this._createdFullScreenTarget?null:this.game.canvas&&this.game.canvas.parentNode||null}}),Object.defineProperty(c.ScaleManager.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(a){return a!==this._scaleMode&&(this.isFullScreen||(this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.queueUpdate(!0)),this._scaleMode=a),this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"fullScreenScaleMode",{get:function(){return this._fullScreenScaleMode},set:function(a){return a!==this._fullScreenScaleMode&&(this.isFullScreen?(this.prepScreenMode(!1),this._fullScreenScaleMode=a,this.prepScreenMode(!0),this.queueUpdate(!0)):this._fullScreenScaleMode=a),this._fullScreenScaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"currentScaleMode",{get:function(){return this.isFullScreen?this._fullScreenScaleMode:this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignHorizontally",{get:function(){return this._pageAlignHorizontally},set:function(a){a!==this._pageAlignHorizontally&&(this._pageAlignHorizontally=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignVertically",{get:function(){return this._pageAlignVertically},set:function(a){a!==this._pageAlignVertically&&(this._pageAlignVertically=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"isFullScreen",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),Object.defineProperty(c.ScaleManager.prototype,"isPortrait",{get:function(){return"portrait"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isLandscape",{get:function(){return"landscape"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isGamePortrait",{get:function(){return this.height>this.width}}),Object.defineProperty(c.ScaleManager.prototype,"isGameLandscape",{get:function(){return this.width>this.height}}),c.Utils.Debug=function(a){this.game=a,this.sprite=null,this.bmd=null,this.canvas=null,this.context=null,this.font="14px Courier",this.columnWidth=100,this.lineHeight=16,this.renderShadow=!0,this.currentX=0,this.currentY=0,this.currentAlpha=1,this.dirty=!1},c.Utils.Debug.prototype={boot:function(){this.game.renderType===c.CANVAS?this.context=this.game.context:(this.bmd=new c.BitmapData(this.game,"__DEBUG",this.game.width,this.game.height,!0),this.sprite=this.game.make.image(0,0,this.bmd),this.game.stage.addChild(this.sprite),this.game.scale.onSizeChange.add(this.resize,this),this.canvas=PIXI.CanvasPool.create(this,this.game.width,this.game.height),this.context=this.canvas.getContext("2d"))},resize:function(a,b,c){this.bmd.resize(b,c),this.canvas.width=b,this.canvas.height=c},preUpdate:function(){this.dirty&&this.sprite&&(this.bmd.clear(),this.bmd.draw(this.canvas,0,0),this.context.clearRect(0,0,this.game.width,this.game.height),this.dirty=!1)},reset:function(){this.context&&this.context.clearRect(0,0,this.game.width,this.game.height),this.sprite&&this.bmd.clear()},start:function(a,b,c,d){"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),c=c||"rgb(255,255,255)",void 0===d&&(d=0),this.currentX=a,this.currentY=b,this.currentColor=c,this.columnWidth=d,this.dirty=!0,this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.strokeStyle=c,this.context.fillStyle=c,this.context.font=this.font,this.context.globalAlpha=this.currentAlpha},stop:function(){this.context.restore()},line:function(){for(var a=this.currentX,b=0;b0)for(var b=0;b=0&&c.right>=0&&c.top<=this.layoutBounds.width&&c.left<=this.layoutBounds.height},getScreenOrientation:function(a){var b=window.screen,c=b.orientation||b.mozOrientation||b.msOrientation;if(c&&"string"==typeof c.type)return c.type;if("string"==typeof c)return c;var d="portrait-primary",e="landscape-primary";if("screen"===a)return b.height>b.width?d:e;if("viewport"===a)return this.visualBounds.height>this.visualBounds.width?d:e;if("window.orientation"===a&&"number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?d:e;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d;if(window.matchMedia("(orientation: landscape)").matches)return e}return this.visualBounds.height>this.visualBounds.width?d:e},visualBounds:new c.Rectangle,layoutBounds:new c.Rectangle,documentBounds:new c.Rectangle},c.Device.whenReady(function(a){var b=window&&"pageXOffset"in window?function(){return window.pageXOffset}:function(){return document.documentElement.scrollLeft},d=window&&"pageYOffset"in window?function(){return window.pageYOffset}:function(){return document.documentElement.scrollTop};if(Object.defineProperty(c.DOM,"scrollX",{get:b}),Object.defineProperty(c.DOM,"scrollY",{get:d}),Object.defineProperty(c.DOM.visualBounds,"x",{get:b}),Object.defineProperty(c.DOM.visualBounds,"y",{get:d}),Object.defineProperty(c.DOM.layoutBounds,"x",{value:0}),Object.defineProperty(c.DOM.layoutBounds,"y",{value:0}),a.desktop&&document.documentElement.clientWidth<=window.innerWidth&&document.documentElement.clientHeight<=window.innerHeight){var e=function(){return Math.max(window.innerWidth,document.documentElement.clientWidth)},f=function(){return Math.max(window.innerHeight,document.documentElement.clientHeight)};Object.defineProperty(c.DOM.visualBounds,"width",{get:e}),Object.defineProperty(c.DOM.visualBounds,"height",{get:f}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:e}),Object.defineProperty(c.DOM.layoutBounds,"height",{get:f})}else Object.defineProperty(c.DOM.visualBounds,"width",{get:function(){return window.innerWidth}}),Object.defineProperty(c.DOM.visualBounds,"height",{get:function(){return window.innerHeight}}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:function(){var a=document.documentElement.clientWidth,b=window.innerWidth;return a-1},reset:function(){this.list.length=0},remove:function(a){var b=this.list.indexOf(a);if(b>-1)return this.list.splice(b,1),a},setAll:function(a,b){for(var c=this.list.length;c--;)this.list[c]&&(this.list[c][a]=b)},callAll:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=this.list.length;c--;)this.list[c]&&this.list[c][a]&&this.list[c][a].apply(this.list[c],b)},removeAll:function(a){void 0===a&&(a=!1);for(var b=this.list.length;b--;)if(this.list[b]){var c=this.remove(this.list[b]);a&&c.destroy()}this.position=0,this.list=[]}},Object.defineProperty(c.ArraySet.prototype,"total",{get:function(){return this.list.length}}),Object.defineProperty(c.ArraySet.prototype,"first",{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}}),Object.defineProperty(c.ArraySet.prototype,"next",{get:function(){return this.position0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a},transposeMatrix:function(a){for(var b=a.length,c=a[0].length,d=new Array(c),e=0;e-1;f--)d[e][f]=a[f][e]}return d},rotateMatrix:function(a,b){if("string"!=typeof b&&(b=(b%360+360)%360),90===b||-270===b||"rotateLeft"===b)a=c.ArrayUtils.transposeMatrix(a),a=a.reverse();else if(-90===b||270===b||"rotateRight"===b)a=a.reverse(),a=c.ArrayUtils.transposeMatrix(a);else if(180===Math.abs(b)||"rotate180"===b){for(var d=0;d>>0:(a<<24|b<<16|d<<8|e)>>>0},unpackPixel:function(a,b,d,e){return void 0!==b&&null!==b||(b=c.Color.createColor()),void 0!==d&&null!==d||(d=!1),void 0!==e&&null!==e||(e=!1),c.Device.LITTLE_ENDIAN?(b.a=(4278190080&a)>>>24,b.b=(16711680&a)>>>16,b.g=(65280&a)>>>8,b.r=255&a):(b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a),b.color=a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a/255+")",d&&c.Color.RGBtoHSL(b.r,b.g,b.b,b),e&&c.Color.RGBtoHSV(b.r,b.g,b.b,b),b},fromRGBA:function(a,b){return b||(b=c.Color.createColor()),b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a+")",b},toRGBA:function(a,b,c,d){return a<<24|b<<16|c<<8|d},toABGR:function(a,b,c,d){return(d<<24|c<<16|b<<8|a)>>>0},RGBtoHSL:function(a,b,d,e){e||(e=c.Color.createColor(a,b,d,1)),a/=255,b/=255,d/=255;var f=Math.min(a,b,d),g=Math.max(a,b,d);if(e.h=0,e.s=0,e.l=(g+f)/2,g!==f){var h=g-f;e.s=e.l>.5?h/(2-g-f):h/(g+f),g===a?e.h=(b-d)/h+(b1&&(c-=1),c<1/6?a+6*(b-a)*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},createColor:function(a,b,d,e,f,g,h,i){var j={r:a||0,g:b||0,b:d||0,a:e||1,h:f||0,s:g||0,l:h||0,v:i||0,color:0,color32:0,rgba:""};return c.Color.updateColor(j)},updateColor:function(a){return a.rgba="rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+a.a.toString()+")",a.color=c.Color.getColor(a.r,a.g,a.b),a.color32=c.Color.getColor32(255*a.a,a.r,a.g,a.b),a},getColor32:function(a,b,c,d){return a<<24|b<<16|c<<8|d},getColor:function(a,b,c){return a<<16|b<<8|c},RGBtoString:function(a,b,d,e,f){return void 0===e&&(e=255),void 0===f&&(f="#"),"#"===f?"#"+((1<<24)+(a<<16)+(b<<8)+d).toString(16).slice(1):"0x"+c.Color.componentToHex(e)+c.Color.componentToHex(a)+c.Color.componentToHex(b)+c.Color.componentToHex(d)},hexToRGB:function(a){var b=c.Color.hexToColor(a);if(b)return c.Color.getColor32(b.a,b.r,b.g,b.b)},hexToColor:function(a,b){a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});var d=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(d){var e=parseInt(d[1],16),f=parseInt(d[2],16),g=parseInt(d[3],16);b?(b.r=e,b.g=f,b.b=g):b=c.Color.createColor(e,f,g)}return b},webToColor:function(a,b){b||(b=c.Color.createColor());var d=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a);return d&&(b.r=parseInt(d[1],10),b.g=parseInt(d[2],10),b.b=parseInt(d[3],10),b.a=void 0!==d[4]?parseFloat(d[4]):1,c.Color.updateColor(b)),b},valueToColor:function(a,b){if(b||(b=c.Color.createColor()),"string"==typeof a)return 0===a.indexOf("rgb")?c.Color.webToColor(a,b):(b.a=1,c.Color.hexToColor(a,b));if("number"==typeof a){var d=c.Color.getRGB(a);return b.r=d.r,b.g=d.g,b.b=d.b,b.a=d.a/255,b}return b},componentToHex:function(a){var b=a.toString(16);return 1===b.length?"0"+b:b},HSVColorWheel:function(a,b){void 0===a&&(a=1),void 0===b&&(b=1);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSVtoRGB(e/359,a,b));return d},HSLColorWheel:function(a,b){void 0===a&&(a=.5),void 0===b&&(b=.5);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSLtoRGB(e/359,a,b));return d},interpolateColor:function(a,b,d,e,f){void 0===f&&(f=255);var g=c.Color.getRGB(a),h=c.Color.getRGB(b),i=(h.red-g.red)*e/d+g.red,j=(h.green-g.green)*e/d+g.green,k=(h.blue-g.blue)*e/d+g.blue;return c.Color.getColor32(f,i,j,k)},interpolateColorWithRGB:function(a,b,d,e,f,g){var h=c.Color.getRGB(a),i=(b-h.red)*g/f+h.red,j=(d-h.green)*g/f+h.green,k=(e-h.blue)*g/f+h.blue;return c.Color.getColor(i,j,k)},interpolateRGB:function(a,b,d,e,f,g,h,i){var j=(e-a)*i/h+a,k=(f-b)*i/h+b,l=(g-d)*i/h+d;return c.Color.getColor(j,k,l)},getRandomColor:function(a,b,d){if(void 0===a&&(a=0),void 0===b&&(b=255),void 0===d&&(d=255),b>255||a>b)return c.Color.getColor(255,255,255);var e=a+Math.round(Math.random()*(b-a)),f=a+Math.round(Math.random()*(b-a)),g=a+Math.round(Math.random()*(b-a));return c.Color.getColor32(d,e,f,g)},getRGB:function(a){return a>16777215?{alpha:a>>>24,red:a>>16&255,green:a>>8&255,blue:255&a,a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{alpha:255,red:a>>16&255,green:a>>8&255,blue:255&a,a:255,r:a>>16&255,g:a>>8&255,b:255&a}},getWebRGB:function(a){if("object"==typeof a)return"rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+(a.a/255).toString()+")";var b=c.Color.getRGB(a);return"rgba("+b.r.toString()+","+b.g.toString()+","+b.b.toString()+","+(b.a/255).toString()+")"},getAlpha:function(a){return a>>>24},getAlphaFloat:function(a){return(a>>>24)/255},getRed:function(a){return a>>16&255},getGreen:function(a){return a>>8&255},getBlue:function(a){return 255&a},blendNormal:function(a){return a},blendLighten:function(a,b){return b>a?b:a},blendDarken:function(a,b){return b>a?a:b},blendMultiply:function(a,b){return a*b/255},blendAverage:function(a,b){return(a+b)/2},blendAdd:function(a,b){return Math.min(255,a+b)},blendSubtract:function(a,b){return Math.max(0,a+b-255)},blendDifference:function(a,b){return Math.abs(a-b)},blendNegation:function(a,b){return 255-Math.abs(255-a-b)},blendScreen:function(a,b){return 255-((255-a)*(255-b)>>8)},blendExclusion:function(a,b){return a+b-2*a*b/255},blendOverlay:function(a,b){return b<128?2*a*b/255:255-2*(255-a)*(255-b)/255},blendSoftLight:function(a,b){return b<128?2*(64+(a>>1))*(b/255):255-2*(255-(64+(a>>1)))*(255-b)/255},blendHardLight:function(a,b){return c.Color.blendOverlay(b,a)},blendColorDodge:function(a,b){return 255===b?b:Math.min(255,(a<<8)/(255-b))},blendColorBurn:function(a,b){return 0===b?b:Math.max(0,255-(255-a<<8)/b)},blendLinearDodge:function(a,b){return c.Color.blendAdd(a,b)},blendLinearBurn:function(a,b){return c.Color.blendSubtract(a,b)},blendLinearLight:function(a,b){return b<128?c.Color.blendLinearBurn(a,2*b):c.Color.blendLinearDodge(a,2*(b-128))},blendVividLight:function(a,b){return b<128?c.Color.blendColorBurn(a,2*b):c.Color.blendColorDodge(a,2*(b-128))},blendPinLight:function(a,b){return b<128?c.Color.blendDarken(a,2*b):c.Color.blendLighten(a,2*(b-128))},blendHardMix:function(a,b){return c.Color.blendVividLight(a,b)<128?0:255},blendReflect:function(a,b){return 255===b?b:Math.min(255,a*a/(255-b))},blendGlow:function(a,b){return c.Color.blendReflect(b,a)},blendPhoenix:function(a,b){return Math.min(a,b)-Math.max(a,b)+255}},c.Physics=function(a,b){b=b||{},this.game=a,this.config=b,this.arcade=null,this.p2=null,this.ninja=null,this.box2d=null,this.chipmunk=null,this.matter=null,this.parseConfig()},c.Physics.ARCADE=0,c.Physics.P2JS=1,c.Physics.NINJA=2,c.Physics.BOX2D=3,c.Physics.CHIPMUNK=4,c.Physics.MATTERJS=5,c.Physics.prototype={parseConfig:function(){this.config.hasOwnProperty("arcade")&&!0!==this.config.arcade||!c.Physics.hasOwnProperty("Arcade")||(this.arcade=new c.Physics.Arcade(this.game)),this.config.hasOwnProperty("ninja")&&!0===this.config.ninja&&c.Physics.hasOwnProperty("Ninja")&&(this.ninja=new c.Physics.Ninja(this.game)),this.config.hasOwnProperty("p2")&&!0===this.config.p2&&c.Physics.hasOwnProperty("P2")&&(this.p2=new c.Physics.P2(this.game,this.config)),this.config.hasOwnProperty("box2d")&&!0===this.config.box2d&&c.Physics.hasOwnProperty("BOX2D")&&(this.box2d=new c.Physics.BOX2D(this.game,this.config)),this.config.hasOwnProperty("matter")&&!0===this.config.matter&&c.Physics.hasOwnProperty("Matter")&&(this.matter=new c.Physics.Matter(this.game,this.config))},startSystem:function(a){a===c.Physics.ARCADE?this.arcade=new c.Physics.Arcade(this.game):a===c.Physics.P2JS?null===this.p2?this.p2=new c.Physics.P2(this.game,this.config):this.p2.reset():a===c.Physics.NINJA?this.ninja=new c.Physics.Ninja(this.game):a===c.Physics.BOX2D?null===this.box2d?this.box2d=new c.Physics.Box2D(this.game,this.config):this.box2d.reset():a===c.Physics.MATTERJS&&(null===this.matter?this.matter=new c.Physics.Matter(this.game,this.config):this.matter.reset())},enable:function(a,b,d){void 0===b&&(b=c.Physics.ARCADE),void 0===d&&(d=!1),b===c.Physics.ARCADE?this.arcade.enable(a):b===c.Physics.P2JS&&this.p2?this.p2.enable(a,d):b===c.Physics.NINJA&&this.ninja?this.ninja.enableAABB(a):b===c.Physics.BOX2D&&this.box2d?this.box2d.enable(a):b===c.Physics.MATTERJS&&this.matter?this.matter.enable(a):console.warn(a.key+" is attempting to enable a physics body using an unknown physics system.")},preUpdate:function(){this.p2&&this.p2.preUpdate(),this.box2d&&this.box2d.preUpdate(),this.matter&&this.matter.preUpdate()},update:function(){this.p2&&this.p2.update(),this.box2d&&this.box2d.update(),this.matter&&this.matter.update()},setBoundsToWorld:function(){this.arcade&&this.arcade.setBoundsToWorld(),this.ninja&&this.ninja.setBoundsToWorld(),this.p2&&this.p2.setBoundsToWorld(),this.box2d&&this.box2d.setBoundsToWorld(),this.matter&&this.matter.setBoundsToWorld()},clear:function(){this.p2&&this.p2.clear(),this.box2d&&this.box2d.clear(),this.matter&&this.matter.clear()},reset:function(){this.p2&&this.p2.reset(),this.box2d&&this.box2d.reset(),this.matter&&this.matter.reset()},destroy:function(){this.p2&&this.p2.destroy(),this.box2d&&this.box2d.destroy(),this.matter&&this.matter.destroy(),this.arcade=null,this.ninja=null,this.p2=null,this.box2d=null,this.matter=null}},c.Physics.prototype.constructor=c.Physics,c.Physics.Arcade=function(a){this.game=a,this.gravity=new c.Point,this.bounds=new c.Rectangle(0,0,a.world.width,a.world.height),this.checkCollision={up:!0,down:!0,left:!0,right:!0},this.maxObjects=10,this.maxLevels=4,this.OVERLAP_BIAS=4,this.forceX=!1,this.sortDirection=c.Physics.Arcade.LEFT_RIGHT,this.skipQuadTree=!0,this.isPaused=!1,this.quadTree=new c.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this._total=0,this.setBoundsToWorld()},c.Physics.Arcade.prototype.constructor=c.Physics.Arcade,c.Physics.Arcade.SORT_NONE=0,c.Physics.Arcade.LEFT_RIGHT=1,c.Physics.Arcade.RIGHT_LEFT=2,c.Physics.Arcade.TOP_BOTTOM=3,c.Physics.Arcade.BOTTOM_TOP=4,c.Physics.Arcade.prototype={setBounds:function(a,b,c,d){this.bounds.setTo(a,b,c,d)},setBoundsToWorld:function(){this.bounds.copyFrom(this.game.world.bounds)},enable:function(a,b){void 0===b&&(b=!0);var d=1;if(Array.isArray(a))for(d=a.length;d--;)a[d]instanceof c.Group?this.enable(a[d].children,b):(this.enableBody(a[d]),b&&a[d].hasOwnProperty("children")&&a[d].children.length>0&&this.enable(a[d],!0));else a instanceof c.Group?this.enable(a.children,b):(this.enableBody(a),b&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,!0))},enableBody:function(a){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.Arcade.Body(a),a.parent&&a.parent instanceof c.Group&&a.parent.addToHash(a))},updateMotion:function(a){var b=this.computeVelocity(0,a,a.angularVelocity,a.angularAcceleration,a.angularDrag,a.maxAngular)-a.angularVelocity;a.angularVelocity+=b,a.rotation+=a.angularVelocity*this.game.time.physicsElapsed,a.velocity.x=this.computeVelocity(1,a,a.velocity.x,a.acceleration.x,a.drag.x,a.maxVelocity.x),a.velocity.y=this.computeVelocity(2,a,a.velocity.y,a.acceleration.y,a.drag.y,a.maxVelocity.y)},computeVelocity:function(a,b,c,d,e,f){return void 0===f&&(f=1e4),1===a&&b.allowGravity?c+=(this.gravity.x+b.gravity.x)*this.game.time.physicsElapsed:2===a&&b.allowGravity&&(c+=(this.gravity.y+b.gravity.y)*this.game.time.physicsElapsed),d?c+=d*this.game.time.physicsElapsed:e&&(e*=this.game.time.physicsElapsed,c-e>0?c-=e:c+e<0?c+=e:c=0),c>f?c=f:c<-f&&(c=-f),c},overlap:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},collide:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},sortLeftRight:function(a,b){return a.body&&b.body?a.body.x-b.body.x:0},sortRightLeft:function(a,b){return a.body&&b.body?b.body.x-a.body.x:0},sortTopBottom:function(a,b){return a.body&&b.body?a.body.y-b.body.y:0},sortBottomTop:function(a,b){return a.body&&b.body?b.body.y-a.body.y:0},sort:function(a,b){null!==a.physicsSortDirection?b=a.physicsSortDirection:void 0===b&&(b=this.sortDirection),b===c.Physics.Arcade.LEFT_RIGHT?a.hash.sort(this.sortLeftRight):b===c.Physics.Arcade.RIGHT_LEFT?a.hash.sort(this.sortRightLeft):b===c.Physics.Arcade.TOP_BOTTOM?a.hash.sort(this.sortTopBottom):b===c.Physics.Arcade.BOTTOM_TOP&&a.hash.sort(this.sortBottomTop)},collideHandler:function(a,b,d,e,f,g){if(void 0===b&&a.physicsType===c.GROUP)return this.sort(a),void this.collideGroupVsSelf(a,d,e,f,g);a&&b&&a.exists&&b.exists&&(this.sortDirection!==c.Physics.Arcade.SORT_NONE&&(a.physicsType===c.GROUP&&this.sort(a),b.physicsType===c.GROUP&&this.sort(b)),a.physicsType===c.SPRITE?b.physicsType===c.SPRITE?this.collideSpriteVsSprite(a,b,d,e,f,g):b.physicsType===c.GROUP?this.collideSpriteVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.GROUP?b.physicsType===c.SPRITE?this.collideSpriteVsGroup(b,a,d,e,f,g):b.physicsType===c.GROUP?this.collideGroupVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.TILEMAPLAYER&&(b.physicsType===c.SPRITE?this.collideSpriteVsTilemapLayer(b,a,d,e,f,g):b.physicsType===c.GROUP&&this.collideGroupVsTilemapLayer(b,a,d,e,f,g)))},collideSpriteVsSprite:function(a,b,c,d,e,f){return!(!a.body||!b.body)&&(this.separate(a.body,b.body,d,e,f)&&(c&&c.call(e,a,b),this._total++),!0)},collideSpriteVsGroup:function(a,b,d,e,f,g){if(0!==b.length&&a.body)if(this.skipQuadTree||a.body.skipQuadTree)for(var h={},i=0;ih.right)break;if(h.x>a.body.right)continue}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(a.body.bottomh.bottom)break;if(h.y>a.body.bottom)continue}this.collideSpriteVsSprite(a,j,d,e,f,g)}}else{this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(b);for(var k=this.quadTree.retrieve(a),i=0;ik.right)continue;if(k.x>h.right)break}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(h.bottomk.bottom)continue;if(k.y>i.body.bottom)break}this.collideSpriteVsSprite(i,l,b,d,e,f)}}}}},collideGroupVsGroup:function(a,b,d,e,f,g){if(0!==a.length&&0!==b.length)for(var h=0;hh.bottom)&&(i.xh.right))return this.separateCircle(a,b,e)}var j=!1,k=!1;this.forceX||Math.abs(this.gravity.y+a.gravity.y)=b.right)&&!(a.position.y>=b.bottom))))},circleBodyIntersects:function(a,b){var d=c.Math.clamp(a.center.x,b.left,b.right),e=c.Math.clamp(a.center.y,b.top,b.bottom);return(a.center.x-d)*(a.center.x-d)+(a.center.y-e)*(a.center.y-e)<=a.radius*a.radius},separateCircle:function(a,b,d){this.getOverlapX(a,b),this.getOverlapY(a,b);var e=b.center.x-a.center.x,f=b.center.y-a.center.y,g=Math.atan2(f,e),h=0;if(a.isCircle!==b.isCircle){var i={x:b.isCircle?a.position.x:b.position.x,y:b.isCircle?a.position.y:b.position.y,right:b.isCircle?a.right:b.right,bottom:b.isCircle?a.bottom:b.bottom},j={x:a.isCircle?a.position.x+a.radius:b.position.x+b.radius,y:a.isCircle?a.position.y+a.radius:b.position.y+b.radius,radius:a.isCircle?a.radius:b.radius};j.yi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.y)-j.radius):j.y>i.bottom&&(j.xi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.bottom)-j.radius)),h*=-1}else h=a.radius+b.radius-c.Math.distance(a.center.x,a.center.y,b.center.x,b.center.y);if(d||0===h||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==h&&(a.onOverlap&&a.onOverlap.dispatch(a.sprite,b.sprite),b.onOverlap&&b.onOverlap.dispatch(b.sprite,a.sprite)),0!==h;var k={x:a.velocity.x*Math.cos(g)+a.velocity.y*Math.sin(g),y:a.velocity.x*Math.sin(g)-a.velocity.y*Math.cos(g)},l={x:b.velocity.x*Math.cos(g)+b.velocity.y*Math.sin(g),y:b.velocity.x*Math.sin(g)-b.velocity.y*Math.cos(g)},m=((a.mass-b.mass)*k.x+2*b.mass*l.x)/(a.mass+b.mass),n=(2*a.mass*k.x+(b.mass-a.mass)*l.x)/(a.mass+b.mass);return a.immovable||(a.velocity.x=(m*Math.cos(g)-k.y*Math.sin(g))*a.bounce.x,a.velocity.y=(k.y*Math.cos(g)+m*Math.sin(g))*a.bounce.y),b.immovable||(b.velocity.x=(n*Math.cos(g)-l.y*Math.sin(g))*b.bounce.x,b.velocity.y=(l.y*Math.cos(g)+n*Math.sin(g))*b.bounce.y),Math.abs(g)0&&!a.immovable&&b.velocity.x>a.velocity.x?a.velocity.x*=-1:b.velocity.x<0&&!b.immovable&&a.velocity.x0&&!a.immovable&&b.velocity.y>a.velocity.y?a.velocity.y*=-1:b.velocity.y<0&&!b.immovable&&a.velocity.yMath.PI/2&&(a.velocity.x<0&&!a.immovable&&b.velocity.x0&&!b.immovable&&a.velocity.x>b.velocity.x?b.velocity.x*=-1:a.velocity.y<0&&!a.immovable&&b.velocity.y0&&!b.immovable&&a.velocity.x>b.velocity.y&&(b.velocity.y*=-1)),a.immovable||(a.x+=a.velocity.x*this.game.time.physicsElapsed-h*Math.cos(g),a.y+=a.velocity.y*this.game.time.physicsElapsed-h*Math.sin(g)),b.immovable||(b.x+=b.velocity.x*this.game.time.physicsElapsed+h*Math.cos(g),b.y+=b.velocity.y*this.game.time.physicsElapsed+h*Math.sin(g)),a.onCollide&&a.onCollide.dispatch(a.sprite,b.sprite),b.onCollide&&b.onCollide.dispatch(b.sprite,a.sprite),!0},getOverlapX:function(a,b,c){var d=0,e=a.deltaAbsX()+b.deltaAbsX()+this.OVERLAP_BIAS;return 0===a.deltaX()&&0===b.deltaX()?(a.embedded=!0,b.embedded=!0):a.deltaX()>b.deltaX()?(d=a.right-b.x,d>e&&!c||!1===a.checkCollision.right||!1===b.checkCollision.left?d=0:(a.touching.none=!1,a.touching.right=!0,b.touching.none=!1,b.touching.left=!0)):a.deltaX()e&&!c||!1===a.checkCollision.left||!1===b.checkCollision.right?d=0:(a.touching.none=!1,a.touching.left=!0,b.touching.none=!1,b.touching.right=!0)),a.overlapX=d,b.overlapX=d,d},getOverlapY:function(a,b,c){var d=0,e=a.deltaAbsY()+b.deltaAbsY()+this.OVERLAP_BIAS;return 0===a.deltaY()&&0===b.deltaY()?(a.embedded=!0,b.embedded=!0):a.deltaY()>b.deltaY()?(d=a.bottom-b.y,d>e&&!c||!1===a.checkCollision.down||!1===b.checkCollision.up?d=0:(a.touching.none=!1,a.touching.down=!0,b.touching.none=!1,b.touching.up=!0)):a.deltaY()e&&!c||!1===a.checkCollision.up||!1===b.checkCollision.down?d=0:(a.touching.none=!1,a.touching.up=!0,b.touching.none=!1,b.touching.down=!0)),a.overlapY=d,b.overlapY=d,d},separateX:function(a,b,c){var d=this.getOverlapX(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.x,f=b.velocity.x;if(a.immovable||b.immovable)a.immovable?(b.x+=d,b.velocity.x=e-f*b.bounce.x,a.moves&&(b.y+=(a.y-a.prev.y)*a.friction.y)):(a.x-=d,a.velocity.x=f-e*a.bounce.x,b.moves&&(a.y+=(b.y-b.prev.y)*b.friction.y));else{d*=.5,a.x-=d,b.x+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.x=i+g*a.bounce.x,b.velocity.x=i+h*b.bounce.x}return!0},separateY:function(a,b,c){var d=this.getOverlapY(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateY||b.customSeparateY)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.y,f=b.velocity.y;if(a.immovable||b.immovable)a.immovable?(b.y+=d,b.velocity.y=e-f*b.bounce.y,a.moves&&(b.x+=(a.x-a.prev.x)*a.friction.x)):(a.y-=d,a.velocity.y=f-e*a.bounce.y,b.moves&&(a.x+=(b.x-b.prev.x)*b.friction.x));else{d*=.5,a.y-=d,b.y+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.y=i+g*a.bounce.y,b.velocity.y=i+h*b.bounce.y}return!0},getObjectsUnderPointer:function(a,b,c,d){if(0!==b.length&&a.exists)return this.getObjectsAtLocation(a.x,a.y,b,c,d,a)},getObjectsAtLocation:function(a,b,d,e,f,g){this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(d);for(var h=new c.Rectangle(a,b,1,1),i=[],j=this.quadTree.retrieve(h),k=0;k0&&(c=this.distanceBetween(a,b)/(d/1e3)),a.body.velocity.x=Math.cos(e)*c,a.body.velocity.y=Math.sin(e)*c,e},moveToPointer:function(a,b,c,d){void 0===b&&(b=60),c=c||this.game.input.activePointer,void 0===d&&(d=0);var e=this.angleToPointer(a,c);return d>0&&(b=this.distanceToPointer(a,c)/(d/1e3)),a.body.velocity.x=Math.cos(e)*b,a.body.velocity.y=Math.sin(e)*b,e},moveToXY:function(a,b,c,d,e){void 0===d&&(d=60),void 0===e&&(e=0);var f=Math.atan2(c-a.y,b-a.x);return e>0&&(d=this.distanceToXY(a,b,c)/(e/1e3)),a.body.velocity.x=Math.cos(f)*d,a.body.velocity.y=Math.sin(f)*d,f},velocityFromAngle:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(this.game.math.degToRad(a))*b,Math.sin(this.game.math.degToRad(a))*b)},velocityFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerationFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerateToObject:function(a,b,c,d,e){void 0===c&&(c=60),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleBetween(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToPointer:function(a,b,c,d,e){void 0===c&&(c=60),void 0===b&&(b=this.game.input.activePointer),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleToPointer(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToXY:function(a,b,c,d,e,f){void 0===d&&(d=60),void 0===e&&(e=1e3),void 0===f&&(f=1e3);var g=this.angleToXY(a,b,c);return a.body.acceleration.setTo(Math.cos(g)*d,Math.sin(g)*d),a.body.maxVelocity.setTo(e,f),g},distanceBetween:function(a,b,c){void 0===c&&(c=!1);var d=c?a.world.x-b.world.x:a.x-b.x,e=c?a.world.y-b.world.y:a.y-b.y;return Math.sqrt(d*d+e*e)},distanceToXY:function(a,b,c,d){void 0===d&&(d=!1);var e=d?a.world.x-b:a.x-b,f=d?a.world.y-c:a.y-c;return Math.sqrt(e*e+f*f)},distanceToPointer:function(a,b,c){void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1);var d=c?a.world.x-b.worldX:a.x-b.worldX,e=c?a.world.y-b.worldY:a.y-b.worldY;return Math.sqrt(d*d+e*e)},angleBetween:function(a,b,c){return void 0===c&&(c=!1),c?Math.atan2(b.world.y-a.world.y,b.world.x-a.world.x):Math.atan2(b.y-a.y,b.x-a.x)},angleBetweenCenters:function(a,b){var c=b.centerX-a.centerX,d=b.centerY-a.centerY;return Math.atan2(d,c)},angleToXY:function(a,b,c,d){return void 0===d&&(d=!1),d?Math.atan2(c-a.world.y,b-a.world.x):Math.atan2(c-a.y,b-a.x)},angleToPointer:function(a,b,c){return void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1),c?Math.atan2(b.worldY-a.world.y,b.worldX-a.world.x):Math.atan2(b.worldY-a.y,b.worldX-a.x)},worldAngleToPointer:function(a,b){return this.angleToPointer(a,b,!0)}},c.Physics.Arcade.Body=function(a){this.sprite=a,this.game=a.game,this.type=c.Physics.ARCADE,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c.Point,this.position=new c.Point(a.x,a.y),this.prev=new c.Point(this.position.x,this.position.y),this.allowRotation=!0,this.rotation=a.angle,this.preRotation=a.angle,this.width=a.width,this.height=a.height,this.sourceWidth=a.width,this.sourceHeight=a.height,a.texture&&(this.sourceWidth=a.texture.frame.width,this.sourceHeight=a.texture.frame.height),this.halfWidth=Math.abs(a.width/2),this.halfHeight=Math.abs(a.height/2),this.center=new c.Point(a.x+this.halfWidth,a.y+this.halfHeight),this.velocity=new c.Point,this.newVelocity=new c.Point,this.deltaMax=new c.Point,this.acceleration=new c.Point,this.drag=new c.Point,this.allowGravity=!0,this.gravity=new c.Point,this.bounce=new c.Point,this.worldBounce=null,this.onWorldBounds=null,this.onCollide=null,this.onOverlap=null,this.maxVelocity=new c.Point(1e4,1e4),this.friction=new c.Point(1,0),this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=c.NONE,this.immovable=!1,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={up:!1,down:!1,left:!1,right:!1},this.tilePadding=new c.Point,this.dirty=!1,this.skipQuadTree=!1,this.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.moveTimer=0,this.moveDistance=0,this.moveDuration=0,this.moveTarget=null,this.moveEnd=null,this.onMoveComplete=new c.Signal,this.movementCallback=null,this.movementCallbackContext=null,this._reset=!0,this._sx=a.scale.x,this._sy=a.scale.y,this._dx=0,this._dy=0},c.Physics.Arcade.Body.prototype={updateBounds:function(){if(this.syncBounds){var a=this.sprite.getBounds();a.ceilAll(),a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._reset=!0)}else{var b=Math.abs(this.sprite.scale.x),c=Math.abs(this.sprite.scale.y);b===this._sx&&c===this._sy||(this.width=this.sourceWidth*b,this.height=this.sourceHeight*c,this._sx=b,this._sy=c,this._reset=!0)}this._reset&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight))},preUpdate:function(){this.enable&&!this.game.physics.arcade.isPaused&&(this.dirty=!0,this.wasTouching.none=this.touching.none,this.wasTouching.up=this.touching.up,this.wasTouching.down=this.touching.down,this.wasTouching.left=this.touching.left,this.wasTouching.right=this.touching.right,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.embedded=!1,this.updateBounds(),this.position.x=this.sprite.world.x-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=this.sprite.world.y-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.rotation=this.sprite.angle,this.preRotation=this.rotation,(this._reset||this.sprite.fresh)&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves&&(this.game.physics.arcade.updateMotion(this),this.newVelocity.set(this.velocity.x*this.game.time.physicsElapsed,this.velocity.y*this.game.time.physicsElapsed),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.onWorldBounds.dispatch(this.sprite,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)),this._dx=this.deltaX(),this._dy=this.deltaY(),this._reset=!1)},updateMovement:function(){var a=0,b=0!==this.overlapX||0!==this.overlapY;if(this.moveDuration>0?(this.moveTimer+=this.game.time.elapsedMS,a=this.moveTimer/this.moveDuration):(this.moveTarget.end.set(this.position.x,this.position.y),a=this.moveTarget.length/this.moveDistance),this.movementCallback)var c=this.movementCallback.call(this.movementCallbackContext,this,this.velocity,a);return!(b||a>=1||void 0!==c&&!0!==c)||(this.stopMovement(a>=1||this.stopVelocityOnCollide&&b),!1)},stopMovement:function(a){this.isMoving&&(this.isMoving=!1,a&&this.velocity.set(0),this.onMoveComplete.dispatch(this.sprite,0!==this.overlapX||0!==this.overlapY))},postUpdate:function(){this.enable&&this.dirty&&(this.isMoving&&this.updateMovement(),this.dirty=!1,this.deltaX()<0?this.facing=c.LEFT:this.deltaX()>0&&(this.facing=c.RIGHT),this.deltaY()<0?this.facing=c.UP:this.deltaY()>0&&(this.facing=c.DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.sprite.position.x+=this._dx,this.sprite.position.y+=this._dy,this._reset=!0),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.allowRotation&&(this.sprite.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var a=this.position,b=this.game.physics.arcade.bounds,c=this.game.physics.arcade.checkCollision,d=this.worldBounce?-this.worldBounce.x:-this.bounce.x,e=this.worldBounce?-this.worldBounce.y:-this.bounce.y;if(this.isCircle){var f={x:this.center.x-this.radius,y:this.center.y-this.radius,right:this.center.x+this.radius,bottom:this.center.y+this.radius};f.xb.right&&c.right&&(a.x=b.right-this.halfWidth-this.radius,this.velocity.x*=d,this.blocked.right=!0),f.yb.bottom&&c.down&&(a.y=b.bottom-this.halfHeight-this.radius,this.velocity.y*=e,this.blocked.down=!0)}else a.xb.right&&c.right&&(a.x=b.right-this.width,this.velocity.x*=d,this.blocked.right=!0),a.yb.bottom&&c.down&&(a.y=b.bottom-this.height,this.velocity.y*=e,this.blocked.down=!0);return this.blocked.up||this.blocked.down||this.blocked.left||this.blocked.right},moveFrom:function(a,b,c){if(void 0===b&&(b=this.speed),0===b)return!1;var d;return void 0===c?(d=this.angle,c=this.game.math.radToDeg(d)):d=this.game.math.degToRad(c),this.moveTimer=0,this.moveDuration=a,0===c||180===c?this.velocity.set(Math.cos(d)*b,0):90===c||270===c?this.velocity.set(0,Math.sin(d)*b):this.velocity.set(Math.cos(d)*b,Math.sin(d)*b),this.isMoving=!0,!0},moveTo:function(a,b,d){var e=b/(a/1e3);if(0===e)return!1;var f;return void 0===d?(f=this.angle,d=this.game.math.radToDeg(f)):f=this.game.math.degToRad(d),b=Math.abs(b),this.moveDuration=0,this.moveDistance=b,null===this.moveTarget&&(this.moveTarget=new c.Line,this.moveEnd=new c.Point),this.moveTarget.fromAngle(this.x,this.y,f,b),this.moveEnd.set(this.moveTarget.end.x,this.moveTarget.end.y),this.moveTarget.setTo(this.x,this.y,this.x,this.y),0===d||180===d?this.velocity.set(Math.cos(f)*e,0):90===d||270===d?this.velocity.set(0,Math.sin(f)*e):this.velocity.set(Math.cos(f)*e,Math.sin(f)*e),this.isMoving=!0,!0},setSize:function(a,b,c,d){void 0===c&&(c=this.offset.x),void 0===d&&(d=this.offset.y),this.sourceWidth=a,this.sourceHeight=b,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(c,d),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.isCircle=!1,this.radius=0},setCircle:function(a,b,c){void 0===b&&(b=this.offset.x),void 0===c&&(c=this.offset.y),a>0?(this.isCircle=!0,this.radius=a,this.sourceWidth=2*a,this.sourceHeight=2*a,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(b,c),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)):this.isCircle=!1},reset:function(a,b){this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this.position.x=a-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=b-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.prev.x=this.position.x,this.prev.y=this.position.y,this.rotation=this.sprite.angle,this.preRotation=this.rotation,this._sx=this.sprite.scale.x,this._sy=this.sprite.scale.y,this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},getBounds:function(a){return this.isCircle?(a.x=this.center.x-this.radius,a.y=this.center.y-this.radius,a.right=this.center.x+this.radius,a.bottom=this.center.y+this.radius):(a.x=this.x,a.y=this.y,a.right=this.right,a.bottom=this.bottom),a},hitTest:function(a,b){return this.isCircle?c.Circle.contains(this,a,b):c.Rectangle.contains(this,a,b)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.sprite.parent&&this.sprite.parent instanceof c.Group&&this.sprite.parent.removeFromHash(this.sprite),this.sprite.body=null,this.sprite=null}},Object.defineProperty(c.Physics.Arcade.Body.prototype,"left",{get:function(){return this.position.x}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"right",{get:function(){return this.position.x+this.width}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"top",{get:function(){return this.position.y}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.position.y+this.height}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"x",{get:function(){return this.position.x},set:function(a){this.position.x=a}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"y",{get:function(){return this.position.y},set:function(a){this.position.y=a}}),c.Physics.Arcade.Body.render=function(a,b,c,d){void 0===d&&(d=!0),c=c||"rgba(0,255,0,0.4)",a.fillStyle=c,a.strokeStyle=c,b.isCircle?(a.beginPath(),a.arc(b.center.x-b.game.camera.x,b.center.y-b.game.camera.y,b.radius,0,2*Math.PI),d?a.fill():a.stroke()):d?a.fillRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height):a.strokeRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height)},c.Physics.Arcade.Body.renderBodyInfo=function(a,b){a.line("x: "+b.x.toFixed(2),"y: "+b.y.toFixed(2),"width: "+b.width,"height: "+b.height),a.line("velocity x: "+b.velocity.x.toFixed(2),"y: "+b.velocity.y.toFixed(2),"deltaX: "+b._dx.toFixed(2),"deltaY: "+b._dy.toFixed(2)),a.line("acceleration x: "+b.acceleration.x.toFixed(2),"y: "+b.acceleration.y.toFixed(2),"speed: "+b.speed.toFixed(2),"angle: "+b.angle.toFixed(2)),a.line("gravity x: "+b.gravity.x,"y: "+b.gravity.y,"bounce x: "+b.bounce.x.toFixed(2),"y: "+b.bounce.y.toFixed(2)),a.line("touching left: "+b.touching.left,"right: "+b.touching.right,"up: "+b.touching.up,"down: "+b.touching.down),a.line("blocked left: "+b.blocked.left,"right: "+b.blocked.right,"up: "+b.blocked.up,"down: "+b.blocked.down)},c.Physics.Arcade.Body.prototype.constructor=c.Physics.Arcade.Body,c.Physics.Arcade.TilemapCollision=function(){},c.Physics.Arcade.TilemapCollision.prototype={TILE_BIAS:16,collideSpriteVsTilemapLayer:function(a,b,c,d,e,f){if(a.body){var g=b.getTiles(a.body.position.x-a.body.tilePadding.x,a.body.position.y-a.body.tilePadding.y,a.body.width+a.body.tilePadding.x,a.body.height+a.body.tilePadding.y,!1,!1);if(0!==g.length)for(var h=0;hb.deltaAbsY()?j=-1:b.deltaAbsX()0&&!a.blocked.right&&b.collideLeft&&a.checkCollision.right&&b.faceLeft&&a.right-e>b.left&&(d=a.right-e-b.left)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateX?a.overlapX=d:this.processTileSeparationX(a,d)),d},tileCheckY:function(a,b,c){var d=0,e=c.fixedToCamera?0:c.position.y;return a.deltaY()<0&&!a.blocked.up&&b.collideDown&&a.checkCollision.up?b.faceBottom&&a.y-e0&&!a.blocked.down&&b.collideUp&&a.checkCollision.down&&b.faceTop&&a.bottom-e>b.top&&(d=a.bottom-e-b.top)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateY?a.overlapY=d:this.processTileSeparationY(a,d)),d},processTileSeparationX:function(a,b){b<0?a.blocked.left=!0:b>0&&(a.blocked.right=!0),a.position.x-=b,0===a.bounce.x?a.velocity.x=0:a.velocity.x=-a.velocity.x*a.bounce.x},processTileSeparationY:function(a,b){b<0?a.blocked.up=!0:b>0&&(a.blocked.down=!0),a.position.y-=b,0===a.bounce.y?a.velocity.y=0:a.velocity.y=-a.velocity.y*a.bounce.y}},c.Utils.mixinPrototype(c.Physics.Arcade.prototype,c.Physics.Arcade.TilemapCollision.prototype),p2.Body.prototype.parent=null,p2.Spring.prototype.parent=null,c.Physics.P2=function(a,b){this.game=a,void 0===b?b={gravity:[0,0],broadphase:new p2.SAPBroadphase}:(b.hasOwnProperty("gravity")||(b.gravity=[0,0]),b.hasOwnProperty("broadphase")||(b.broadphase=new p2.SAPBroadphase)),this.config=b,this.world=new p2.World(this.config),this.frameRate=1/60,this.useElapsedTime=!1,this.paused=!1,this.materials=[],this.gravity=new c.Physics.P2.InversePointProxy(this,this.world.gravity),this.walls={left:null,right:null,top:null,bottom:null},this.onBodyAdded=new c.Signal,this.onBodyRemoved=new c.Signal,this.onSpringAdded=new c.Signal,this.onSpringRemoved=new c.Signal,this.onConstraintAdded=new c.Signal,this.onConstraintRemoved=new c.Signal,this.onContactMaterialAdded=new c.Signal,this.onContactMaterialRemoved=new c.Signal,this.postBroadphaseCallback=null,this.callbackContext=null,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,b.hasOwnProperty("mpx")&&b.hasOwnProperty("pxm")&&b.hasOwnProperty("mpxi")&&b.hasOwnProperty("pxmi")&&(this.mpx=b.mpx,this.mpxi=b.mpxi,this.pxm=b.pxm,this.pxmi=b.pxmi),this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.collisionGroups=[],this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this.boundsCollidesWith=[],this._toRemove=[],this._collisionGroupID=2,this._boundsLeft=!0,this._boundsRight=!0,this._boundsTop=!0,this._boundsBottom=!0,this._boundsOwnGroup=!1,this.setBoundsToWorld(!0,!0,!0,!0,!1)},c.Physics.P2.prototype={removeBodyNextStep:function(a){this._toRemove.push(a)},preUpdate:function(){for(var a=this._toRemove.length;a--;)this.removeBody(this._toRemove[a]);this._toRemove.length=0},enable:function(a,b,d){void 0===b&&(b=!1),void 0===d&&(d=!0);var e=1;if(Array.isArray(a))for(e=a.length;e--;)a[e]instanceof c.Group?this.enable(a[e].children,b,d):(this.enableBody(a[e],b),d&&a[e].hasOwnProperty("children")&&a[e].children.length>0&&this.enable(a[e],b,!0));else a instanceof c.Group?this.enable(a.children,b,d):(this.enableBody(a,b),d&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,b,!0))},enableBody:function(a,b){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.P2.Body(this.game,a,a.x,a.y,1),a.body.debug=b,void 0!==a.anchor&&a.anchor.set(.5))},setImpactEvents:function(a){a?this.world.on("impact",this.impactHandler,this):this.world.off("impact",this.impactHandler,this)},setPostBroadphaseCallback:function(a,b){this.postBroadphaseCallback=a,this.callbackContext=b,null!==a?this.world.on("postBroadphase",this.postBroadphaseHandler,this):this.world.off("postBroadphase",this.postBroadphaseHandler,this)},postBroadphaseHandler:function(a){if(this.postBroadphaseCallback&&0!==a.pairs.length)for(var b=a.pairs.length-2;b>=0;b-=2)a.pairs[b].parent&&a.pairs[b+1].parent&&!this.postBroadphaseCallback.call(this.callbackContext,a.pairs[b].parent,a.pairs[b+1].parent)&&a.pairs.splice(b,2)},impactHandler:function(a){if(a.bodyA.parent&&a.bodyB.parent){var b=a.bodyA.parent,c=a.bodyB.parent;b._bodyCallbacks[a.bodyB.id]&&b._bodyCallbacks[a.bodyB.id].call(b._bodyCallbackContext[a.bodyB.id],b,c,a.shapeA,a.shapeB),c._bodyCallbacks[a.bodyA.id]&&c._bodyCallbacks[a.bodyA.id].call(c._bodyCallbackContext[a.bodyA.id],c,b,a.shapeB,a.shapeA),b._groupCallbacks[a.shapeB.collisionGroup]&&b._groupCallbacks[a.shapeB.collisionGroup].call(b._groupCallbackContext[a.shapeB.collisionGroup],b,c,a.shapeA,a.shapeB),c._groupCallbacks[a.shapeA.collisionGroup]&&c._groupCallbacks[a.shapeA.collisionGroup].call(c._groupCallbackContext[a.shapeA.collisionGroup],c,b,a.shapeB,a.shapeA)}},beginContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onBeginContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyA.parent&&a.bodyA.parent.onBeginContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyB.parent&&a.bodyB.parent.onBeginContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA,a.contactEquations))},endContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onEndContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB),a.bodyA.parent&&a.bodyA.parent.onEndContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB),a.bodyB.parent&&a.bodyB.parent.onEndContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA))},setBoundsToWorld:function(a,b,c,d,e){this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,a,b,c,d,e)},setWorldMaterial:function(a,b,c,d,e){void 0===b&&(b=!0),void 0===c&&(c=!0),void 0===d&&(d=!0),void 0===e&&(e=!0),b&&this.walls.left&&(this.walls.left.shapes[0].material=a),c&&this.walls.right&&(this.walls.right.shapes[0].material=a),d&&this.walls.top&&(this.walls.top.shapes[0].material=a),e&&this.walls.bottom&&(this.walls.bottom.shapes[0].material=a)},updateBoundsCollisionGroup:function(a){void 0===a&&(a=!0);var b=a?this.boundsCollisionGroup.mask:this.everythingCollisionGroup.mask;this.walls.left&&(this.walls.left.shapes[0].collisionGroup=b),this.walls.right&&(this.walls.right.shapes[0].collisionGroup=b),this.walls.top&&(this.walls.top.shapes[0].collisionGroup=b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionGroup=b),this._boundsOwnGroup=a},setBounds:function(a,b,c,d,e,f,g,h,i){void 0===e&&(e=this._boundsLeft),void 0===f&&(f=this._boundsRight),void 0===g&&(g=this._boundsTop),void 0===h&&(h=this._boundsBottom),void 0===i&&(i=this._boundsOwnGroup),this.setupWall(e,"left",a,b,1.5707963267948966,i),this.setupWall(f,"right",a+c,b,-1.5707963267948966,i),this.setupWall(g,"top",a,b,-3.141592653589793,i),this.setupWall(h,"bottom",a,b+d,0,i),this._boundsLeft=e,this._boundsRight=f,this._boundsTop=g,this._boundsBottom=h,this._boundsOwnGroup=i},setupWall:function(a,b,c,d,e,f){a?(this.walls[b]?this.walls[b].position=[this.pxmi(c),this.pxmi(d)]:(this.walls[b]=new p2.Body({mass:0,position:[this.pxmi(c),this.pxmi(d)],angle:e}),this.walls[b].addShape(new p2.Plane),this.world.addBody(this.walls[b])),f&&(this.walls[b].shapes[0].collisionGroup=this.boundsCollisionGroup.mask)):this.walls[b]&&(this.world.removeBody(this.walls[b]),this.walls[b]=null)},pause:function(){this.paused=!0},resume:function(){this.paused=!1},update:function(){this.paused||(this.useElapsedTime?this.world.step(this.game.time.physicsElapsed):this.world.step(this.frameRate))},reset:function(){this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this._collisionGroupID=2,this.setBoundsToWorld(!0,!0,!0,!0,!1)},clear:function(){this.world.time=0,this.world.fixedStepTime=0,this.world.solver&&this.world.solver.equations.length&&this.world.solver.removeAllEquations();for(var a=this.world.constraints,b=a.length-1;b>=0;b--)this.world.removeConstraint(a[b]);for(var c=this.world.bodies,b=c.length-1;b>=0;b--)this.world.removeBody(c[b]);for(var d=this.world.springs,b=d.length-1;b>=0;b--)this.world.removeSpring(d[b]);for(var e=this.world.contactMaterials,b=e.length-1;b>=0;b--)this.world.removeContactMaterial(e[b]);this.world.off("beginContact",this.beginContactHandler,this),this.world.off("endContact",this.endContactHandler,this),this.postBroadphaseCallback=null,this.callbackContext=null,this.impactCallback=null,this.collisionGroups=[],this._toRemove=[],this.boundsCollidesWith=[],this.walls={left:null,right:null,top:null,bottom:null}},destroy:function(){this.clear(),this.game=null},addBody:function(a){return!a.data.world&&(this.world.addBody(a.data),this.onBodyAdded.dispatch(a),!0)},removeBody:function(a){return a.data.world===this.world&&(this.world.removeBody(a.data),this.onBodyRemoved.dispatch(a)),a},addSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.addSpring(a.data):this.world.addSpring(a),this.onSpringAdded.dispatch(a),a},removeSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.removeSpring(a.data):this.world.removeSpring(a),this.onSpringRemoved.dispatch(a),a},createDistanceConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.DistanceConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createGearConstraint:function(a,b,d,e){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.GearConstraint(this,a,b,d,e));console.warn("Cannot create Constraint, invalid body objects given")},createRevoluteConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),d=this.getBody(d),a&&d)return this.addConstraint(new c.Physics.P2.RevoluteConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createLockConstraint:function(a,b,d,e,f){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.LockConstraint(this,a,b,d,e,f));console.warn("Cannot create Constraint, invalid body objects given")},createPrismaticConstraint:function(a,b,d,e,f,g,h){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.PrismaticConstraint(this,a,b,d,e,f,g,h));console.warn("Cannot create Constraint, invalid body objects given")},addConstraint:function(a){return this.world.addConstraint(a),this.onConstraintAdded.dispatch(a),a},removeConstraint:function(a){return this.world.removeConstraint(a),this.onConstraintRemoved.dispatch(a),a},addContactMaterial:function(a){return this.world.addContactMaterial(a),this.onContactMaterialAdded.dispatch(a),a},removeContactMaterial:function(a){return this.world.removeContactMaterial(a),this.onContactMaterialRemoved.dispatch(a),a},getContactMaterial:function(a,b){return this.world.getContactMaterial(a,b)},setMaterial:function(a,b){for(var c=b.length;c--;)b[c].setMaterial(a)},createMaterial:function(a,b){a=a||"";var d=new c.Physics.P2.Material(a);return this.materials.push(d),void 0!==b&&b.setMaterial(d),d},createContactMaterial:function(a,b,d){void 0===a&&(a=this.createMaterial()),void 0===b&&(b=this.createMaterial());var e=new c.Physics.P2.ContactMaterial(a,b,d);return this.addContactMaterial(e)},getBodies:function(){for(var a=[],b=this.world.bodies.length;b--;)a.push(this.world.bodies[b].parent);return a},getBody:function(a){return a instanceof p2.Body?a:a instanceof c.Physics.P2.Body?a.data:a.body&&a.body.type===c.Physics.P2JS?a.body.data:null},getSprings:function(){for(var a=[],b=this.world.springs.length;b--;)a.push(this.world.springs[b].parent);return a},getConstraints:function(){for(var a=[],b=this.world.constraints.length;b--;)a.push(this.world.constraints[b]);return a},hitTest:function(a,b,d,e){void 0===b&&(b=this.world.bodies),void 0===d&&(d=5),void 0===e&&(e=!1);for(var f=[this.pxmi(a.x),this.pxmi(a.y)],g=[],h=b.length;h--;)b[h]instanceof c.Physics.P2.Body&&(!e||b[h].data.type!==p2.Body.STATIC)?g.push(b[h].data):b[h]instanceof p2.Body&&b[h].parent&&(!e||b[h].type!==p2.Body.STATIC)?g.push(b[h]):b[h]instanceof c.Sprite&&b[h].hasOwnProperty("body")&&(!e||b[h].body.data.type!==p2.Body.STATIC)&&g.push(b[h].body.data);return this.world.hitTest(f,g,d)},toJSON:function(){return this.world.toJSON()},createCollisionGroup:function(a){var b=Math.pow(2,this._collisionGroupID);this.walls.left&&(this.walls.left.shapes[0].collisionMask=this.walls.left.shapes[0].collisionMask|b),this.walls.right&&(this.walls.right.shapes[0].collisionMask=this.walls.right.shapes[0].collisionMask|b),this.walls.top&&(this.walls.top.shapes[0].collisionMask=this.walls.top.shapes[0].collisionMask|b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionMask=this.walls.bottom.shapes[0].collisionMask|b),this._collisionGroupID++;var d=new c.Physics.P2.CollisionGroup(b);return this.collisionGroups.push(d),a&&this.setCollisionGroup(a,d),d},setCollisionGroup:function(a,b){if(a instanceof c.Group)for(var d=0;d-1&&l.collides)if(d){var m=a.getTileRight(b,j,h);if(0===e&&(f=l.x*l.width,g=l.y*l.height,e=l.width),m&&m.collides)e+=l.width;else{var n=this.createBody(f,g,0,!1);n.addRectangle(e,l.height,e/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n),e=0}}else{var n=this.createBody(l.x*l.width,l.y*l.height,0,!1);n.addRectangle(l.width,l.height,l.width/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n)}}}return a.layers[b].bodies},mpx:function(a){return a*=20},pxm:function(a){return.05*a},mpxi:function(a){return a*=-20},pxmi:function(a){return-.05*a}},Object.defineProperty(c.Physics.P2.prototype,"friction",{get:function(){return this.world.defaultContactMaterial.friction},set:function(a){this.world.defaultContactMaterial.friction=a}}),Object.defineProperty(c.Physics.P2.prototype,"restitution",{get:function(){return this.world.defaultContactMaterial.restitution},set:function(a){this.world.defaultContactMaterial.restitution=a}}),Object.defineProperty(c.Physics.P2.prototype,"contactMaterial",{get:function(){return this.world.defaultContactMaterial},set:function(a){this.world.defaultContactMaterial=a}}),Object.defineProperty(c.Physics.P2.prototype,"applySpringForces",{get:function(){return this.world.applySpringForces},set:function(a){this.world.applySpringForces=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyDamping",{get:function(){return this.world.applyDamping},set:function(a){this.world.applyDamping=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyGravity",{get:function(){return this.world.applyGravity},set:function(a){this.world.applyGravity=a}}),Object.defineProperty(c.Physics.P2.prototype,"solveConstraints",{get:function(){return this.world.solveConstraints},set:function(a){this.world.solveConstraints=a}}),Object.defineProperty(c.Physics.P2.prototype,"time",{get:function(){return this.world.time}}),Object.defineProperty(c.Physics.P2.prototype,"emitImpactEvent",{get:function(){return this.world.emitImpactEvent},set:function(a){this.world.emitImpactEvent=a}}),Object.defineProperty(c.Physics.P2.prototype,"sleepMode",{get:function(){return this.world.sleepMode},set:function(a){this.world.sleepMode=a}}),Object.defineProperty(c.Physics.P2.prototype,"total",{get:function(){return this.world.bodies.length}}),c.Physics.P2.FixtureList=function(a){Array.isArray(a)||(a=[a]),this.rawList=a,this.init(),this.parse(this.rawList)},c.Physics.P2.FixtureList.prototype={init:function(){this.namedFixtures={},this.groupedFixtures=[],this.allFixtures=[]},setCategory:function(a,b){var c=function(b){b.collisionGroup=a};this.getFixtures(b).forEach(c)},setMask:function(a,b){var c=function(b){b.collisionMask=a};this.getFixtures(b).forEach(c)},setSensor:function(a,b){var c=function(b){b.sensor=a};this.getFixtures(b).forEach(c)},setMaterial:function(a,b){var c=function(b){b.material=a};this.getFixtures(b).forEach(c)},getFixtures:function(a){var b=[];if(a){a instanceof Array||(a=[a]);var c=this;return a.forEach(function(a){c.namedFixtures[a]&&b.push(c.namedFixtures[a])}),this.flatten(b)}return this.allFixtures},getFixtureByKey:function(a){return this.namedFixtures[a]},getGroup:function(a){return this.groupedFixtures[a]},parse:function(){var a,b,c,d;c=this.rawList,d=[];for(a in c)b=c[a],isNaN(a-0)?this.namedFixtures[a]=this.flatten(b):(this.groupedFixtures[a]=this.groupedFixtures[a]||[],this.groupedFixtures[a]=this.groupedFixtures[a].concat(b)),d.push(this.allFixtures=this.flatten(this.groupedFixtures))},flatten:function(a){var b,c;return b=[],c=arguments.callee,a.forEach(function(a){return Array.prototype.push.apply(b,Array.isArray(a)?c(a):[a])}),b}},c.Physics.P2.PointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.PointProxy.prototype.constructor=c.Physics.P2.PointProxy,Object.defineProperty(c.Physics.P2.PointProxy.prototype,"x",{get:function(){return this.world.mpx(this.destination[0])},set:function(a){this.destination[0]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"y",{get:function(){return this.world.mpx(this.destination[1])},set:function(a){this.destination[1]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=a}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=a}}),c.Physics.P2.InversePointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.InversePointProxy.prototype.constructor=c.Physics.P2.InversePointProxy,Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"x",{get:function(){return this.world.mpxi(this.destination[0])},set:function(a){this.destination[0]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"y",{get:function(){return this.world.mpxi(this.destination[1])},set:function(a){this.destination[1]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=-a}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=-a}}),c.Physics.P2.Body=function(a,b,d,e,f){b=b||null,d=d||0,e=e||0,void 0===f&&(f=1),this.game=a,this.world=a.physics.p2,this.sprite=b,this.type=c.Physics.P2JS,this.offset=new c.Point,this.data=new p2.Body({position:[this.world.pxmi(d),this.world.pxmi(e)],mass:f}),this.data.parent=this,this.velocity=new c.Physics.P2.InversePointProxy(this.world,this.data.velocity),this.force=new c.Physics.P2.InversePointProxy(this.world,this.data.force),this.gravity=new c.Point,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,this.collidesWith=[],this.removeNextStep=!1,this.debugBody=null,this.dirty=!1,this._collideWorldBounds=!0,this._bodyCallbacks={},this._bodyCallbackContext={},this._groupCallbacks={},this._groupCallbackContext={},this._reset=!1,b&&(this.setRectangleFromSprite(b),b.exists&&this.game.physics.p2.addBody(this))},c.Physics.P2.Body.prototype={createBodyCallback:function(a,b,c){var d=-1;a.id?d=a.id:a.body&&(d=a.body.id),d>-1&&(null===b?(delete this._bodyCallbacks[d],delete this._bodyCallbackContext[d]):(this._bodyCallbacks[d]=b,this._bodyCallbackContext[d]=c))},createGroupCallback:function(a,b,c){null===b?(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]):(this._groupCallbacks[a.mask]=b,this._groupCallbackContext[a.mask]=c)},getCollisionMask:function(){var a=0;this._collideWorldBounds&&(a=this.game.physics.p2.boundsCollisionGroup.mask);for(var b=0;b=0;c--)this.data.shapes[c].collisionMask=b;else a.collisionMask=b},setCollisionGroup:function(a,b){var c=this.getCollisionMask();if(void 0===b)for(var d=this.data.shapes.length-1;d>=0;d--)this.data.shapes[d].collisionGroup=a.mask,this.data.shapes[d].collisionMask=c;else b.collisionGroup=a.mask,b.collisionMask=c},clearCollision:function(a,b,c){if(void 0===a&&(a=!0),void 0===b&&(b=!0),void 0===c)for(var d=this.data.shapes.length-1;d>=0;d--)a&&(this.data.shapes[d].collisionGroup=null),b&&(this.data.shapes[d].collisionMask=null);else a&&(c.collisionGroup=null),b&&(c.collisionMask=null);a&&(this.collidesWith.length=0)},removeCollisionGroup:function(a,b,c){void 0===b&&(b=!0);var d;if(Array.isArray(a))for(var e=0;e-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));else(d=this.collidesWith.indexOf(a))>-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));var f=this.getCollisionMask();if(void 0===c)for(var e=this.data.shapes.length-1;e>=0;e--)this.data.shapes[e].collisionMask=f;else c.collisionMask=f},collides:function(a,b,c,d){if(Array.isArray(a))for(var e=0;e=0;e--)this.data.shapes[e].collisionMask=f;else d.collisionMask=f},adjustCenterOfMass:function(){this.data.adjustCenterOfMass(),this.shapeChanged()},getVelocityAtPoint:function(a,b){return this.data.getVelocityAtPoint(a,b)},applyDamping:function(a){this.data.applyDamping(a)},applyImpulse:function(a,b,c){this.data.applyImpulse(a,[this.world.pxmi(b),this.world.pxmi(c)])},applyImpulseLocal:function(a,b,c){this.data.applyImpulseLocal(a,[this.world.pxmi(b),this.world.pxmi(c)])}, +applyForce:function(a,b,c){this.data.applyForce(a,[this.world.pxmi(b),this.world.pxmi(c)])},setZeroForce:function(){this.data.setZeroForce()},setZeroRotation:function(){this.data.angularVelocity=0},setZeroVelocity:function(){this.data.velocity[0]=0,this.data.velocity[1]=0},setZeroDamping:function(){this.data.damping=0,this.data.angularDamping=0},toLocalFrame:function(a,b){return this.data.toLocalFrame(a,b)},toWorldFrame:function(a,b){return this.data.toWorldFrame(a,b)},rotateLeft:function(a){this.data.angularVelocity=this.world.pxm(-a)},rotateRight:function(a){this.data.angularVelocity=this.world.pxm(a)},moveForward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=b*Math.cos(c),this.data.velocity[1]=b*Math.sin(c)},moveBackward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=-b*Math.cos(c),this.data.velocity[1]=-b*Math.sin(c)},thrust:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustLeft:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustRight:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},reverse:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},moveLeft:function(a){this.data.velocity[0]=this.world.pxmi(-a)},moveRight:function(a){this.data.velocity[0]=this.world.pxmi(a)},moveUp:function(a){this.data.velocity[1]=this.world.pxmi(-a)},moveDown:function(a){this.data.velocity[1]=this.world.pxmi(a)},preUpdate:function(){this.dirty=!0,this.removeNextStep&&(this.removeFromWorld(),this.removeNextStep=!1)},postUpdate:function(){this.sprite.x=this.world.mpxi(this.data.position[0])+this.offset.x,this.sprite.y=this.world.mpxi(this.data.position[1])+this.offset.y,this.fixedRotation||(this.sprite.rotation=this.data.angle),this.debugBody&&this.debugBody.updateSpriteTransform(),this.dirty=!1},reset:function(a,b,c,d){void 0===c&&(c=!1),void 0===d&&(d=!1),this.setZeroForce(),this.setZeroVelocity(),this.setZeroRotation(),c&&this.setZeroDamping(),d&&(this.mass=1),this.x=a,this.y=b},addToWorld:function(){if(this.game.physics.p2._toRemove)for(var a=0;a=0;c--)this.data.shapes[c].material=a;else b.material=a},shapeChanged:function(){this.debugBody&&this.debugBody.draw()},addPhaserPolygon:function(a,b){for(var c=this.game.cache.getPhysicsData(a,b),d=[],e=0;eo;e=0<=o?++n:--n)k=b.vertices[e],p2.vec2.rotate(m,k,a),l.push([(m[0]+i[0])*this.ppu,-(m[1]+i[1])*this.ppu]);this.drawConvex(j,l,b.triangles,f,c,g,this.settings.debugPolygons,[i[0]*this.ppu,-i[1]*this.ppu])}d++}}},drawRectangle:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1),a.beginFill(h),a.drawRect(b-e/2,c-f/2,e,f)},drawCircle:function(a,b,c,d,e,f,g){void 0===g&&(g=1),void 0===f&&(f=16777215),a.lineStyle(g,0,1),a.beginFill(f,1),a.drawCircle(b,c,2*-e),a.endFill(),a.moveTo(b,c),a.lineTo(b+e*Math.cos(-d),c+e*Math.sin(-d))},drawLine:function(a,b,c,d){void 0===d&&(d=1),void 0===c&&(c=0),a.lineStyle(5*d,c,1),a.moveTo(-b/2,0),a.lineTo(b/2,0)},drawConvex:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s;if(void 0===f&&(f=1),void 0===d&&(d=0),g){for(i=[16711680,65280,255],j=0;j!==b.length+1;)l=b[j%b.length],m=b[(j+1)%b.length],o=l[0],r=l[1],p=m[0],s=m[1],a.lineStyle(f,i[j%i.length],1),a.moveTo(o,-r),a.lineTo(p,-s),a.drawCircle(o,-r,2*f),j++;return a.lineStyle(f,0,1),a.drawCircle(h[0],h[1],2*f)}for(a.lineStyle(f,d,1),a.beginFill(e),j=0;j!==b.length;)k=b[j],n=k[0],q=k[1],0===j?a.moveTo(n,-q):a.lineTo(n,-q),j++;if(a.endFill(),b.length>2)return a.moveTo(b[b.length-1][0],-b[b.length-1][1]),a.lineTo(b[0][0],-b[0][1])},drawPath:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;for(void 0===e&&(e=1),void 0===c&&(c=0),a.lineStyle(e,c,1),"number"==typeof d&&a.beginFill(d),g=null,h=null,f=0;f2&&"number"==typeof d&&(a.moveTo(b[b.length-1][0],b[b.length-1][1]),a.lineTo(b[0][0],b[0][1]))},drawPlane:function(a,b,c,d,e,f,g,h,i,j){var k,l;void 0===f&&(f=1),void 0===d&&(d=16777215),a.lineStyle(f,e,11),a.beginFill(d),a.moveTo(b,-c),k=b+Math.cos(j)*this.game.width,l=c+Math.sin(j)*this.game.height,a.lineTo(k,-l),a.moveTo(b,-c),k=b+Math.cos(j)*-this.game.width,l=c+Math.sin(j)*-this.game.height,a.lineTo(k,-l)},drawCapsule:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1);var j=Math.cos(d),k=Math.sin(d);a.beginFill(h,1),a.drawCircle(-e/2*j+b,-e/2*k+c,2*-f),a.drawCircle(e/2*j+b,e/2*k+c,2*-f),a.endFill(),a.lineStyle(i,g,0),a.beginFill(h,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c),a.lineTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.endFill(),a.lineStyle(i,g,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.moveTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c)},randomPastelHex:function(){var a,b,c,d;return c=[255,255,255],d=Math.floor(256*Math.random()),b=Math.floor(256*Math.random()),a=Math.floor(256*Math.random()),d=Math.floor((d+3*c[0])/4),b=Math.floor((b+3*c[1])/4),a=Math.floor((a+3*c[2])/4),this.rgbToHex(d,b,a)},rgbToHex:function(a,b,c){return this.componentToHex(a)+this.componentToHex(b)+this.componentToHex(c)},componentToHex:function(a){var b;return b=a.toString(16),2===b.length?b:b+"0"}}),c.Physics.P2.Spring=function(a,b,c,d,e,f,g,h,i,j){this.game=a.game,this.world=a,void 0===d&&(d=1),void 0===e&&(e=100),void 0===f&&(f=1),d=a.pxm(d);var k={restLength:d,stiffness:e,damping:f};void 0!==g&&null!==g&&(k.worldAnchorA=[a.pxm(g[0]),a.pxm(g[1])]),void 0!==h&&null!==h&&(k.worldAnchorB=[a.pxm(h[0]),a.pxm(h[1])]),void 0!==i&&null!==i&&(k.localAnchorA=[a.pxm(i[0]),a.pxm(i[1])]),void 0!==j&&null!==j&&(k.localAnchorB=[a.pxm(j[0]),a.pxm(j[1])]),this.data=new p2.LinearSpring(b,c,k),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.RotationalSpring=function(a,b,c,d,e,f){this.game=a.game,this.world=a,void 0===d&&(d=null),void 0===e&&(e=100),void 0===f&&(f=1),d&&(d=a.pxm(d));var g={restAngle:d,stiffness:e,damping:f};this.data=new p2.RotationalSpring(b,c,g),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.Material=function(a){this.name=a,p2.Material.call(this)},c.Physics.P2.Material.prototype=Object.create(p2.Material.prototype),c.Physics.P2.Material.prototype.constructor=c.Physics.P2.Material,c.Physics.P2.ContactMaterial=function(a,b,c){p2.ContactMaterial.call(this,a,b,c)},c.Physics.P2.ContactMaterial.prototype=Object.create(p2.ContactMaterial.prototype),c.Physics.P2.ContactMaterial.prototype.constructor=c.Physics.P2.ContactMaterial,c.Physics.P2.CollisionGroup=function(a){this.mask=a},c.Physics.P2.DistanceConstraint=function(a,b,c,d,e,f,g){void 0===d&&(d=100),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=Number.MAX_VALUE),this.game=a.game,this.world=a,d=a.pxm(d),e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var h={distance:d,localAnchorA:e,localAnchorB:f,maxForce:g};p2.DistanceConstraint.call(this,b,c,h)},c.Physics.P2.DistanceConstraint.prototype=Object.create(p2.DistanceConstraint.prototype),c.Physics.P2.DistanceConstraint.prototype.constructor=c.Physics.P2.DistanceConstraint,c.Physics.P2.GearConstraint=function(a,b,c,d,e){void 0===d&&(d=0),void 0===e&&(e=1),this.game=a.game,this.world=a;var f={angle:d,ratio:e};p2.GearConstraint.call(this,b,c,f)},c.Physics.P2.GearConstraint.prototype=Object.create(p2.GearConstraint.prototype),c.Physics.P2.GearConstraint.prototype.constructor=c.Physics.P2.GearConstraint,c.Physics.P2.LockConstraint=function(a,b,c,d,e,f){void 0===d&&(d=[0,0]),void 0===e&&(e=0),void 0===f&&(f=Number.MAX_VALUE),this.game=a.game,this.world=a,d=[a.pxm(d[0]),a.pxm(d[1])];var g={localOffsetB:d,localAngleB:e,maxForce:f};p2.LockConstraint.call(this,b,c,g)},c.Physics.P2.LockConstraint.prototype=Object.create(p2.LockConstraint.prototype),c.Physics.P2.LockConstraint.prototype.constructor=c.Physics.P2.LockConstraint,c.Physics.P2.PrismaticConstraint=function(a,b,c,d,e,f,g,h){void 0===d&&(d=!0),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=[0,0]),void 0===h&&(h=Number.MAX_VALUE),this.game=a.game,this.world=a,e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var i={localAnchorA:e,localAnchorB:f,localAxisA:g,maxForce:h,disableRotationalLock:!d};p2.PrismaticConstraint.call(this,b,c,i)},c.Physics.P2.PrismaticConstraint.prototype=Object.create(p2.PrismaticConstraint.prototype),c.Physics.P2.PrismaticConstraint.prototype.constructor=c.Physics.P2.PrismaticConstraint,c.Physics.P2.RevoluteConstraint=function(a,b,c,d,e,f,g){void 0===f&&(f=Number.MAX_VALUE),void 0===g&&(g=null),this.game=a.game,this.world=a,c=[a.pxmi(c[0]),a.pxmi(c[1])],e=[a.pxmi(e[0]),a.pxmi(e[1])],g&&(g=[a.pxmi(g[0]),a.pxmi(g[1])]);var h={worldPivot:g,localPivotA:c,localPivotB:e,maxForce:f};p2.RevoluteConstraint.call(this,b,d,h)},c.Physics.P2.RevoluteConstraint.prototype=Object.create(p2.RevoluteConstraint.prototype),c.Physics.P2.RevoluteConstraint.prototype.constructor=c.Physics.P2.RevoluteConstraint,c.ImageCollection=function(a,b,c,d,e,f,g){(void 0===c||c<=0)&&(c=32),(void 0===d||d<=0)&&(d=32),void 0===e&&(e=0),void 0===f&&(f=0),this.name=a,this.firstgid=0|b,this.imageWidth=0|c,this.imageHeight=0|d,this.imageMargin=0|e,this.imageSpacing=0|f,this.properties=g||{},this.images=[],this.total=0},c.ImageCollection.prototype={containsImageIndex:function(a){return a>=this.firstgid&&athis.right||b>this.bottom)},intersects:function(a,b,c,d){return!(c<=this.worldX)&&(!(d<=this.worldY)&&(!(a>=this.worldX+this.width)&&!(b>=this.worldY+this.height)))},setCollisionCallback:function(a,b){this.collisionCallback=a,this.collisionCallbackContext=b},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.faceLeft=a,this.faceRight=b,this.faceTop=c,this.faceBottom=d},resetCollision:function(){this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1},isInteresting:function(a,b){return a&&b?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:a?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:!!b&&(this.faceTop||this.faceBottom||this.faceLeft||this.faceRight)},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"collides",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){return this.worldX}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){return this.worldX+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){return this.worldY}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){return this.worldY+this.height}}),c.Tilemap=function(a,b,d,e,f,g){this.game=a,this.key=b;var h=c.TilemapParser.parse(this.game,b,d,e,f,g);null!==h&&(this.width=h.width,this.height=h.height,this.tileWidth=h.tileWidth,this.tileHeight=h.tileHeight,this.orientation=h.orientation,this.format=h.format,this.version=h.version,this.properties=h.properties,this.widthInPixels=h.widthInPixels,this.heightInPixels=h.heightInPixels,this.layers=h.layers,this.tilesets=h.tilesets,this.imagecollections=h.imagecollections,this.tiles=h.tiles,this.objects=h.objects,this.collideIndexes=[],this.collision=h.collision,this.images=h.images,this.enableDebug=!1,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.NORTH=0,c.Tilemap.EAST=1,c.Tilemap.SOUTH=2,c.Tilemap.WEST=3,c.Tilemap.prototype={create:function(a,b,c,d,e,f){return void 0===f&&(f=this.game.world),this.width=b,this.height=c,this.setTileSize(d,e),this.layers.length=0,this.createBlankLayer(a,b,c,d,e,f)},setTileSize:function(a,b){this.tileWidth=a,this.tileHeight=b,this.widthInPixels=this.width*a,this.heightInPixels=this.height*b},addTilesetImage:function(a,b,d,e,f,g,h){if(void 0===a)return null;void 0===d&&(d=this.tileWidth),void 0===e&&(e=this.tileHeight),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=0),0===d&&(d=32),0===e&&(e=32);var i=null;if(void 0!==b&&null!==b||(b=a),b instanceof c.BitmapData)i=b.canvas;else{if(!this.game.cache.checkImageKey(b))return console.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "'+b+'"'),null;i=this.game.cache.getImage(b)}var j=this.getTilesetIndex(a);if(null===j&&this.format===c.Tilemap.TILED_JSON)return console.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "'+a+'"'),null;if(this.tilesets[j])return this.tilesets[j].setImage(i),this.tilesets[j];var k=new c.Tileset(a,h,d,e,f,g,{});k.setImage(i),this.tilesets.push(k);for(var l=this.tilesets.length-1,m=f,n=f,o=0,p=0,q=0,r=h;r1)for(l=0;lthis.layers.length)return void console.warn("Tilemap.createLayer: Invalid layer ID given: "+f);void 0===b||b<=0?b=Math.min(this.game.width,this.layers[f].widthInPixels):b>this.game.width&&(b=this.game.width),void 0===d||d<=0?d=Math.min(this.game.height,this.layers[f].heightInPixels):d>this.game.height&&(d=this.game.height),this.enableDebug&&(console.group("Tilemap.createLayer"),console.log("Name:",this.layers[f].name),console.log("Size:",b,"x",d),console.log("Tileset:",this.tilesets[0].name,"index:",f));var g=e.add(new c.TilemapLayer(this.game,this,f,b,d));return this.enableDebug&&console.groupEnd(),g},createBlankLayer:function(a,b,d,e,f,g){if(void 0===g&&(g=this.game.world),null!==this.getLayerIndex(a))return void console.warn("Tilemap.createBlankLayer: Layer with matching name already exists: "+a);for(var h,i={name:a,x:0,y:0,width:b,height:d,widthInPixels:b*e,heightInPixels:d*f,alpha:1,visible:!0,properties:{},indexes:[],callbacks:[],bodies:[],data:null},j=[],k=0;kthis.game.width&&(m=this.game.width),n>this.game.height&&(n=this.game.height);var j=new c.TilemapLayer(this.game,this,this.layers.length-1,m,n);return j.name=a,g.add(j)},getIndex:function(a,b){for(var c=0;cb)){for(var f=a;f<=b;f++)this.setCollisionByIndex(f,c,d,!1);e&&this.calculateFaces(d)}},setCollisionByExclusion:function(a,b,c,d){void 0===b&&(b=!0),void 0===d&&(d=!0),c=this.getLayer(c);for(var e=0,f=this.tiles.length;e-1&&this.collideIndexes.splice(e,1)}for(var f=0;f0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b-1},removeTile:function(a,b,d){if(d=this.getLayer(d),a>=0&&a=0&&b=0&&b=0&&d-1?this.layers[e].data[d][b].setCollision(!0,!0,!0,!0):this.layers[e].data[d][b].resetCollision(),this.layers[e].dirty=!0,this.calculateFaces(e),this.layers[e].data[d][b]}return null},putTileWorldXY:function(a,b,c,d,e,f){return f=this.getLayer(f),b=this.game.math.snapToFloor(b,d)/d,c=this.game.math.snapToFloor(c,e)/e,this.putTile(a,b,c,f)},searchTileIndex:function(a,b,c,d){void 0===b&&(b=0),void 0===c&&(c=!1),d=this.getLayer(d);var e=0;if(c){for(var f=this.layers[d].height-1;f>=0;f--)for(var g=this.layers[d].width-1;g>=0;g--)if(this.layers[d].data[f][g].index===a){if(e===b)return this.layers[d].data[f][g];e++}}else for(var f=0;f=0&&a=0&&bthis.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;f1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},c.Tilemap.prototype.constructor=c.Tilemap,Object.defineProperty(c.Tilemap.prototype,"layer",{get:function(){return this.layers[this.currentLayer]},set:function(a){a!==this.currentLayer&&this.setLayer(a)}}),c.TilemapLayer=function(a,b,d,e,f){e|=0,f|=0,c.Sprite.call(this,a,0,0),this.map=b,this.index=d,this.layer=b.layers[d],this.canvas=PIXI.CanvasPool.create(this,e,f),this.context=this.canvas.getContext("2d"),this.setTexture(new PIXI.Texture(new PIXI.BaseTexture(this.canvas))),this.type=c.TILEMAPLAYER,this.physicsType=c.TILEMAPLAYER,this.renderSettings={enableScrollDelta:!1,overdrawRatio:.2,copyCanvas:null},this.debug=!1,this.exists=!0,this.debugSettings={missingImageFill:"rgb(255,255,255)",debuggedTileOverfill:"rgba(0,255,0,0.4)",forceFullRedraw:!0,debugAlpha:.5,facingEdgeStroke:"rgba(0,255,0,1)",collidingTileOverfill:"rgba(0,255,0,0.2)"},this.scrollFactorX=1,this.scrollFactorY=1,this.dirty=!0,this.rayStepRate=4,this._wrap=!1,this._mc={scrollX:0,scrollY:0,renderWidth:0,renderHeight:0,tileWidth:b.tileWidth,tileHeight:b.tileHeight,cw:b.tileWidth,ch:b.tileHeight,tilesets:[]},this._scrollX=0,this._scrollY=0,this._results=[],a.device.canvasBitBltShift||(this.renderSettings.copyCanvas=c.TilemapLayer.ensureSharedCopyCanvas()),this.fixedToCamera=!0},c.TilemapLayer.prototype=Object.create(c.Sprite.prototype),c.TilemapLayer.prototype.constructor=c.TilemapLayer,c.TilemapLayer.prototype.preUpdateCore=c.Component.Core.preUpdate,c.TilemapLayer.sharedCopyCanvas=null,c.TilemapLayer.ensureSharedCopyCanvas=function(){return this.sharedCopyCanvas||(this.sharedCopyCanvas=PIXI.CanvasPool.create(this,2,2)),this.sharedCopyCanvas},c.TilemapLayer.prototype.preUpdate=function(){return this.preUpdateCore()},c.TilemapLayer.prototype.postUpdate=function(){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y},c.TilemapLayer.prototype._renderCanvas=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.TilemapLayer.prototype._renderWebGL=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.TilemapLayer.prototype.destroy=function(){PIXI.CanvasPool.remove(this),c.Component.Destroy.prototype.destroy.call(this)},c.TilemapLayer.prototype.resize=function(a,b){this.canvas.width=a,this.canvas.height=b,this.texture.frame.resize(a,b),this.texture.width=a,this.texture.height=b,this.texture.crop.width=a,this.texture.crop.height=b,this.texture.baseTexture.width=a,this.texture.baseTexture.height=b,this.texture.baseTexture.dirty(),this.texture.requiresUpdate=!0,this.texture._updateUvs(),this.dirty=!0},c.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels*this.scale.x,this.layer.heightInPixels*this.scale.y)},c.TilemapLayer.prototype._fixX=function(a){return 1===this.scrollFactorX||0===this.scrollFactorX&&0===this.position.x?a:0===this.scrollFactorX&&0!==this.position.x?a-this.position.x:this._scrollX+(a-this._scrollX/this.scrollFactorX)},c.TilemapLayer.prototype._unfixX=function(a){return 1===this.scrollFactorX?a:this._scrollX/this.scrollFactorX+(a-this._scrollX)},c.TilemapLayer.prototype._fixY=function(a){return 1===this.scrollFactorY||0===this.scrollFactorY&&0===this.position.y?a:0===this.scrollFactorY&&0!==this.position.y?a-this.position.y:this._scrollY+(a-this._scrollY/this.scrollFactorY)},c.TilemapLayer.prototype._unfixY=function(a){return 1===this.scrollFactorY?a:this._scrollY/this.scrollFactorY+(a-this._scrollY)},c.TilemapLayer.prototype.getTileX=function(a){return Math.floor(this._fixX(a)/this._mc.tileWidth)},c.TilemapLayer.prototype.getTileY=function(a){return Math.floor(this._fixY(a)/this._mc.tileHeight)},c.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},c.TilemapLayer.prototype.getRayCastTiles=function(a,b,c,d){b||(b=this.rayStepRate),void 0===c&&(c=!1),void 0===d&&(d=!1);var e=this.getTiles(a.x,a.y,a.width,a.height,c,d);if(0===e.length)return[];for(var f=a.coordinatesOnLine(b),g=[],h=0;h=0;q++,s--,o+=k){q>=i&&(q-=i);var x=this.layer.data[q];for(p=v,r=e-c,n=t;r>=0;p++,r--,n+=j){p>=h&&(p-=h);var y=x[p];if(y&&!(y.index<0)){var z=y.index,A=l[z];void 0===A&&(A=this.resolveTileset(z)),y.alpha===m||this.debug||(g.globalAlpha=y.alpha,m=y.alpha),A?y.rotation||y.flipped?(g.save(),g.translate(n+y.centerX,o+y.centerY),g.rotate(y.rotation),y.flipped&&g.scale(-1,1),A.draw(g,-y.centerX,-y.centerY,z),g.restore()):A.draw(g,n,o,z):this.debugSettings.missingImageFill&&(g.fillStyle=this.debugSettings.missingImageFill,g.fillRect(n,o,j,k)),y.debug&&this.debugSettings.debuggedTileOverfill&&(g.fillStyle=this.debugSettings.debuggedTileOverfill,g.fillRect(n,o,j,k))}}}},c.TilemapLayer.prototype.renderDeltaScroll=function(a,b){var c=this._mc.scrollX,d=this._mc.scrollY,e=this.canvas.width,f=this.canvas.height,g=this._mc.tileWidth,h=this._mc.tileHeight,i=0,j=-g,k=0,l=-h;if(a<0?(i=e+a,j=e-1):a>0&&(j=a),b<0?(k=f+b,l=f-1):b>0&&(l=b),this.shiftCanvas(this.context,a,b),i=Math.floor((i+c)/g),j=Math.floor((j+c)/g),k=Math.floor((k+d)/h),l=Math.floor((l+d)/h),i<=j){this.context.clearRect(i*g-c,0,(j-i+1)*g,f);var m=Math.floor((0+d)/h),n=Math.floor((f-1+d)/h);this.renderRegion(c,d,i,m,j,n)}if(k<=l){this.context.clearRect(0,k*h-d,e,(l-k+1)*h);var o=Math.floor((0+c)/g),p=Math.floor((e-1+c)/g);this.renderRegion(c,d,o,k,p,l)}},c.TilemapLayer.prototype.renderFull=function(){var a=this._mc.scrollX,b=this._mc.scrollY,c=this.canvas.width,d=this.canvas.height,e=this._mc.tileWidth,f=this._mc.tileHeight,g=Math.floor(a/e),h=Math.floor((c-1+a)/e),i=Math.floor(b/f),j=Math.floor((d-1+b)/f);this.context.clearRect(0,0,c,d),this.renderRegion(a,b,g,i,h,j)},c.TilemapLayer.prototype.render=function(){var a=!1;if(this.visible){(this.dirty||this.layer.dirty)&&(this.layer.dirty=!1,a=!0);var b=this.canvas.width,c=this.canvas.height,d=0|this._scrollX,e=0|this._scrollY,f=this._mc,g=f.scrollX-d,h=f.scrollY-e;if(a||0!==g||0!==h||f.renderWidth!==b||f.renderHeight!==c)return this.context.save(),f.scrollX=d,f.scrollY=e,f.renderWidth===b&&f.renderHeight===c||(f.renderWidth=b,f.renderHeight=c),this.debug&&(this.context.globalAlpha=this.debugSettings.debugAlpha,this.debugSettings.forceFullRedraw&&(a=!0)),!a&&this.renderSettings.enableScrollDelta&&Math.abs(g)+Math.abs(h)=0;d++,f--,b+=o){d>=m&&(d-=m);var x=this.layer.data[d];for(c=v,e=q-p,a=t;e>=0;c++,e--,a+=n){c>=l&&(c-=l);var y=x[c];!y||y.index<0||!y.collides||(this.debugSettings.collidingTileOverfill&&(i.fillStyle=this.debugSettings.collidingTileOverfill,i.fillRect(a,b,this._mc.cw,this._mc.ch)),this.debugSettings.facingEdgeStroke&&(i.beginPath(),y.faceTop&&(i.moveTo(a,b),i.lineTo(a+this._mc.cw,b)),y.faceBottom&&(i.moveTo(a,b+this._mc.ch),i.lineTo(a+this._mc.cw,b+this._mc.ch)),y.faceLeft&&(i.moveTo(a,b),i.lineTo(a,b+this._mc.ch)),y.faceRight&&(i.moveTo(a+this._mc.cw,b),i.lineTo(a+this._mc.cw,b+this._mc.ch)),i.closePath(),i.stroke()))}}},Object.defineProperty(c.TilemapLayer.prototype,"wrap",{get:function(){return this._wrap},set:function(a){this._wrap=a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollX",{get:function(){return this._scrollX},set:function(a){this._scrollX=a}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollY",{get:function(){return this._scrollY},set:function(a){this._scrollY=a}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._mc.cw},set:function(a){this._mc.cw=0|a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._mc.ch},set:function(a){this._mc.ch=0|a,this.dirty=!0}}),c.TilemapParser={INSERT_NULL:!1,parse:function(a,b,d,e,f,g){if(void 0===d&&(d=32),void 0===e&&(e=32),void 0===f&&(f=10),void 0===g&&(g=10),void 0===b)return this.getEmptyData();if(null===b)return this.getEmptyData(d,e,f,g);var h=a.cache.getTilemapData(b);if(h){if(h.format===c.Tilemap.CSV)return this.parseCSV(b,h.data,d,e);if(!h.format||h.format===c.Tilemap.TILED_JSON)return this.parseTiledJSON(h.data)}else console.warn("Phaser.TilemapParser.parse - No map data found for key "+b)},parseCSV:function(a,b,d,e){var f=this.getEmptyData();b=b.trim();for(var g=[],h=b.split("\n"),i=h.length,j=0,k=0;k>>0;g.data=j,delete g.encoding}else if(g.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+g.name+"'");continue}var l={name:g.name,x:g.x,y:g.y,width:g.width,height:g.height,widthInPixels:g.width*a.tilewidth,heightInPixels:g.height*a.tileheight,alpha:g.opacity,visible:g.visible,properties:{},indexes:[],callbacks:[],bodies:[]};g.properties&&(l.properties=g.properties);for(var m,n,o,p,q=0,r=[],s=[],t=0,i=g.data.length;t536870912)switch(p>2147483648&&(p-=2147483648,o+=4),p>1073741824&&(p-=1073741824,o+=2),p>536870912&&(p-=536870912,o+=1),o){case 5:m=Math.PI/2;break;case 6:m=Math.PI;break;case 3:m=3*Math.PI/2;break;case 4:m=0,n=!0;break;case 7:m=Math.PI/2,n=!0;break;case 2:m=Math.PI,n=!0;break;case 1:m=3*Math.PI/2,n=!0}if(p>0){var u=new c.Tile(l,p,q,s.length,a.tilewidth,a.tileheight);u.rotation=m,u.flipped=n,0!==o&&(u.flippedVal=o),r.push(u)}else c.TilemapParser.INSERT_NULL?r.push(null):r.push(new c.Tile(l,-1,q,s.length,a.tilewidth,a.tileheight));q++,q===g.width&&(s.push(r),q=0,r=[])}l.data=s,e.push(l)}d.layers=e;for(var v=[],f=0;f=0&&e+1=this.firstgid&&a=this._timer)if(this._timer=this.game.time.time+this.frequency*this.game.time.slowMotion,0!==this._flowTotal)if(this._flowQuantity>0){for(var a=0;a=this._flowTotal)){this.on=!1;break}}else this.emitParticle()&&(this._counter++,-1!==this._flowTotal&&this._counter>=this._flowTotal&&(this.on=!1));else this.emitParticle()&&(this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1));for(var a=this.children.length;a--;)this.children[a].exists&&this.children[a].update()},c.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,c,d,e){void 0===b&&(b=0),void 0===c&&(c=this.maxParticles),void 0===d&&(d=!1),void 0===e&&(e=!1);var f,g=0,h=a,i=b;for(this._frames=b,c>this.maxParticles&&(this.maxParticles=c);gthis.maxParticles&&(c=this.maxParticles),this._counter=0,this._flowQuantity=c,this._flowTotal=d,e?(this.start(!0,a,b,c),this._counter+=c,this.on=!0,this._timer=this.game.time.time+b*this.game.time.slowMotion):this.start(!1,a,b,c),this},c.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d,e){if(void 0===a&&(a=!0),void 0===b&&(b=0),void 0!==c&&null!==c||(c=250),void 0===d&&(d=0),void 0===e&&(e=!1),d>this.maxParticles&&(d=this.maxParticles),this.revive(),this.visible=!0,this.lifespan=b,this.frequency=c,a||e)for(var f=0;f1&&(g=f.between(this.left,this.right)),null!==b?h=b:this.height>1&&(h=f.between(this.top,this.bottom)),e.reset(g,h),e.angle=0,e.lifespan=this.lifespan,this.particleBringToTop?this.bringToTop(e):this.particleSendToBack&&this.sendToBack(e),this.autoScale?e.setScaleData(this.scaleData):1!==this.minParticleScale||1!==this.maxParticleScale?e.scale.set(f.realInRange(this.minParticleScale,this.maxParticleScale)):this._minParticleScale.x===this._maxParticleScale.x&&this._minParticleScale.y===this._maxParticleScale.y||e.scale.set(f.realInRange(this._minParticleScale.x,this._maxParticleScale.x),f.realInRange(this._minParticleScale.y,this._maxParticleScale.y)),void 0===d&&(Array.isArray(this._frames)?e.frame=this.game.rnd.pick(this._frames):e.frame=this._frames),this.autoAlpha?e.setAlphaData(this.alphaData):e.alpha=f.realInRange(this.minParticleAlpha,this.maxParticleAlpha),e.blendMode=this.blendMode;var i=e.body;return i.updateBounds(),i.bounce.copyFrom(this.bounce),i.drag.copyFrom(this.particleDrag),i.velocity.x=f.between(this.minParticleSpeed.x,this.maxParticleSpeed.x),i.velocity.y=f.between(this.minParticleSpeed.y,this.maxParticleSpeed.y),i.angularVelocity=f.between(this.minRotation,this.maxRotation),i.gravity.y=this.gravity,i.angularDrag=this.angularDrag,e.onEmit(),!0},c.Particles.Arcade.Emitter.prototype.destroy=function(){this.game.particles.remove(this),c.Group.prototype.destroy.call(this,!0,!1)},c.Particles.Arcade.Emitter.prototype.setSize=function(a,b){return this.area.width=a,this.area.height=b,this},c.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b,this},c.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b,this},c.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){return a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b,this},c.Particles.Arcade.Emitter.prototype.setAlpha=function(a,b,d,e,f){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=0),void 0===e&&(e=c.Easing.Linear.None),void 0===f&&(f=!1),this.minParticleAlpha=a,this.maxParticleAlpha=b,this.autoAlpha=!1,d>0&&a!==b){var g={v:a},h=this.game.make.tween(g).to({v:b},d,e);h.yoyo(f),this.alphaData=h.generateData(60),this.alphaData.reverse(),this.autoAlpha=!0}return this},c.Particles.Arcade.Emitter.prototype.setScale=function(a,b,d,e,f,g,h){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=1),void 0===e&&(e=1),void 0===f&&(f=0),void 0===g&&(g=c.Easing.Linear.None),void 0===h&&(h=!1), +this.minParticleScale=1,this.maxParticleScale=1,this._minParticleScale.set(a,d),this._maxParticleScale.set(b,e),this.autoScale=!1,f>0&&(a!==b||d!==e)){var i={x:a,y:d},j=this.game.make.tween(i).to({x:b,y:e},f,g);j.yoyo(h),this.scaleData=j.generateData(60),this.scaleData.reverse(),this.autoScale=!0}return this},c.Particles.Arcade.Emitter.prototype.at=function(a){return a.center?(this.emitX=a.center.x,this.emitY=a.center.y):(this.emitX=a.world.x+a.anchor.x*a.width,this.emitY=a.world.y+a.anchor.y*a.height),this},Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"width",{get:function(){return this.area.width},set:function(a){this.area.width=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"height",{get:function(){return this.area.height},set:function(a){this.area.height=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.area.height/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.area.height/2)}}),c.Weapon=function(a,b){c.Plugin.call(this,a,b),this.bullets=null,this.autoExpandBulletsGroup=!1,this.autofire=!1,this.shots=0,this.fireLimit=0,this.fireRate=100,this.fireRateVariance=0,this.fireFrom=new c.Rectangle(0,0,1,1),this.fireAngle=c.ANGLE_UP,this.bulletInheritSpriteSpeed=!1,this.bulletAnimation="",this.bulletFrameRandom=!1,this.bulletFrameCycle=!1,this.bulletWorldWrap=!1,this.bulletWorldWrapPadding=0,this.bulletAngleOffset=0,this.bulletAngleVariance=0,this.bulletSpeed=200,this.bulletSpeedVariance=0,this.bulletLifespan=0,this.bulletKillDistance=0,this.bulletGravity=new c.Point(0,0),this.bulletRotateToVelocity=!1,this.bulletKey="",this.bulletFrame="",this._bulletClass=c.Bullet,this._bulletCollideWorldBounds=!1,this._bulletKillType=c.Weapon.KILL_WORLD_BOUNDS,this._data={customBody:!1,width:0,height:0,offsetX:0,offsetY:0},this.bounds=new c.Rectangle,this.bulletBounds=a.world.bounds,this.bulletFrames=[],this.bulletFrameIndex=0,this.anims={},this.onFire=new c.Signal,this.onKill=new c.Signal,this.onFireLimit=new c.Signal,this.trackedSprite=null,this.trackedPointer=null,this.trackRotation=!1,this.trackOffset=new c.Point,this._nextFire=0,this._rotatedPoint=new c.Point},c.Weapon.prototype=Object.create(c.Plugin.prototype),c.Weapon.prototype.constructor=c.Weapon,c.Weapon.KILL_NEVER=0,c.Weapon.KILL_LIFESPAN=1,c.Weapon.KILL_DISTANCE=2,c.Weapon.KILL_WEAPON_BOUNDS=3,c.Weapon.KILL_CAMERA_BOUNDS=4,c.Weapon.KILL_WORLD_BOUNDS=5,c.Weapon.KILL_STATIC_BOUNDS=6,c.Weapon.prototype.createBullets=function(a,b,d,e){return void 0===a&&(a=1),void 0===e&&(e=this.game.world),this.bullets||(this.bullets=this.game.add.physicsGroup(c.Physics.ARCADE,e),this.bullets.classType=this._bulletClass),0!==a&&(-1===a&&(this.autoExpandBulletsGroup=!0,a=1),this.bullets.createMultiple(a,b,d),this.bullets.setAll("data.bulletManager",this),this.bulletKey=b,this.bulletFrame=d),this},c.Weapon.prototype.forEach=function(a,b){return this.bullets.forEachExists(a,b,arguments),this},c.Weapon.prototype.pauseAll=function(){return this.bullets.setAll("body.enable",!1),this},c.Weapon.prototype.resumeAll=function(){return this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.killAll=function(){return this.bullets.callAllExists("kill",!0),this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.resetShots=function(a){return this.shots=0,void 0!==a&&(this.fireLimit=a),this},c.Weapon.prototype.destroy=function(){this.parent.remove(this,!1),this.bullets.destroy(),this.game=null,this.parent=null,this.active=!1,this.visible=!1},c.Weapon.prototype.update=function(){this._bulletKillType===c.Weapon.KILL_WEAPON_BOUNDS&&(this.trackedSprite?(this.trackedSprite.updateTransform(),this.bounds.centerOn(this.trackedSprite.worldPosition.x,this.trackedSprite.worldPosition.y)):this.trackedPointer&&this.bounds.centerOn(this.trackedPointer.worldX,this.trackedPointer.worldY)),this.autofire&&this.fire()},c.Weapon.prototype.trackSprite=function(a,b,c,d){return void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=!1),this.trackedPointer=null,this.trackedSprite=a,this.trackRotation=d,this.trackOffset.set(b,c),this},c.Weapon.prototype.trackPointer=function(a,b,c){return void 0===a&&(a=this.game.input.activePointer),void 0===b&&(b=0),void 0===c&&(c=0),this.trackedPointer=a,this.trackedSprite=null,this.trackRotation=!1,this.trackOffset.set(b,c),this},c.Weapon.prototype.fire=function(a,b,d){if(this.game.time.now0&&this.shots===this.fireLimit)return!1;var e=this.bulletSpeed;0!==this.bulletSpeedVariance&&(e+=c.Math.between(-this.bulletSpeedVariance,this.bulletSpeedVariance)),a?this.fireFrom.width>1?this.fireFrom.centerOn(a.x,a.y):(this.fireFrom.x=a.x,this.fireFrom.y=a.y):this.trackedSprite?(this.trackRotation?(this._rotatedPoint.set(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y),this._rotatedPoint.rotate(this.trackedSprite.world.x,this.trackedSprite.world.y,this.trackedSprite.rotation),this.fireFrom.width>1?this.fireFrom.centerOn(this._rotatedPoint.x,this._rotatedPoint.y):(this.fireFrom.x=this._rotatedPoint.x,this.fireFrom.y=this._rotatedPoint.y)):this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedSprite.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedSprite.world.y+this.trackOffset.y),this.bulletInheritSpriteSpeed&&(e+=this.trackedSprite.body.speed)):this.trackedPointer&&(this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedPointer.world.x+this.trackOffset.x,this.trackedPointer.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedPointer.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedPointer.world.y+this.trackOffset.y));var f=this.fireFrom.width>1?this.fireFrom.randomX:this.fireFrom.x,g=this.fireFrom.height>1?this.fireFrom.randomY:this.fireFrom.y,h=this.trackRotation?this.trackedSprite.angle:this.fireAngle;void 0!==b&&void 0!==d&&(h=this.game.math.radToDeg(Math.atan2(d-g,b-f))),0!==this.bulletAngleVariance&&(h+=c.Math.between(-this.bulletAngleVariance,this.bulletAngleVariance));var i=0,j=0;0===h||180===h?i=Math.cos(this.game.math.degToRad(h))*e:90===h||270===h?j=Math.sin(this.game.math.degToRad(h))*e:(i=Math.cos(this.game.math.degToRad(h))*e,j=Math.sin(this.game.math.degToRad(h))*e);var k=null;if(this.autoExpandBulletsGroup?(k=this.bullets.getFirstExists(!1,!0,f,g,this.bulletKey,this.bulletFrame),k.data.bulletManager=this):k=this.bullets.getFirstExists(!1),k){if(k.reset(f,g),k.data.fromX=f,k.data.fromY=g,k.data.killType=this.bulletKillType,k.data.killDistance=this.bulletKillDistance,k.data.rotateToVelocity=this.bulletRotateToVelocity,this.bulletKillType===c.Weapon.KILL_LIFESPAN&&(k.lifespan=this.bulletLifespan),k.angle=h+this.bulletAngleOffset,""!==this.bulletAnimation){if(null===k.animations.getAnimation(this.bulletAnimation)){var l=this.anims[this.bulletAnimation];k.animations.add(l.name,l.frames,l.frameRate,l.loop,l.useNumericIndex)}k.animations.play(this.bulletAnimation)}else this.bulletFrameCycle?(k.frame=this.bulletFrames[this.bulletFrameIndex],++this.bulletFrameIndex>=this.bulletFrames.length&&(this.bulletFrameIndex=0)):this.bulletFrameRandom&&(k.frame=this.bulletFrames[Math.floor(Math.random()*this.bulletFrames.length)]);if(k.data.bodyDirty&&(this._data.customBody&&k.body.setSize(this._data.width,this._data.height,this._data.offsetX,this._data.offsetY),k.body.collideWorldBounds=this.bulletCollideWorldBounds,k.data.bodyDirty=!1),k.body.velocity.set(i,j),k.body.gravity.set(this.bulletGravity.x,this.bulletGravity.y),0!==this.bulletSpeedVariance){var m=this.fireRate;m+=c.Math.between(-this.fireRateVariance,this.fireRateVariance),m<0&&(m=0),this._nextFire=this.game.time.now+m}else this._nextFire=this.game.time.now+this.fireRate;this.shots++,this.onFire.dispatch(k,this,e),this.fireLimit>0&&this.shots===this.fireLimit&&this.onFireLimit.dispatch(this,this.fireLimit)}return k},c.Weapon.prototype.fireAtPointer=function(a){return void 0===a&&(a=this.game.input.activePointer),this.fire(null,a.worldX,a.worldY)},c.Weapon.prototype.fireAtSprite=function(a){return this.fire(null,a.world.x,a.world.y)},c.Weapon.prototype.fireAtXY=function(a,b){return this.fire(null,a,b)},c.Weapon.prototype.setBulletBodyOffset=function(a,b,c,d){return void 0===c&&(c=0),void 0===d&&(d=0),this._data.customBody=!0,this._data.width=a,this._data.height=b,this._data.offsetX=c,this._data.offsetY=d,this.bullets.callAll("body.setSize","body",a,b,c,d),this.bullets.setAll("data.bodyDirty",!1),this},c.Weapon.prototype.setBulletFrames=function(a,b,d,e){return void 0===d&&(d=!0),void 0===e&&(e=!1),this.bulletFrames=c.ArrayUtils.numberArray(a,b),this.bulletFrameIndex=0,this.bulletFrameCycle=d,this.bulletFrameRandom=e,this},c.Weapon.prototype.addBulletAnimation=function(a,b,c,d,e){return this.anims[a]={name:a,frames:b,frameRate:c,loop:d,useNumericIndex:e},this.bullets.callAll("animations.add","animations",a,b,c,d,e),this.bulletAnimation=a,this},c.Weapon.prototype.debug=function(a,b,c){void 0===a&&(a=16),void 0===b&&(b=32),void 0===c&&(c=!1),this.game.debug.text("Weapon Plugin",a,b),this.game.debug.text("Bullets Alive: "+this.bullets.total+" - Total: "+this.bullets.length,a,b+24),c&&this.bullets.forEachExists(this.game.debug.body,this.game.debug,"rgba(255, 0, 255, 0.8)")},Object.defineProperty(c.Weapon.prototype,"bulletClass",{get:function(){return this._bulletClass},set:function(a){this._bulletClass=a,this.bullets.classType=this._bulletClass}}),Object.defineProperty(c.Weapon.prototype,"bulletKillType",{get:function(){return this._bulletKillType},set:function(a){switch(a){case c.Weapon.KILL_STATIC_BOUNDS:case c.Weapon.KILL_WEAPON_BOUNDS:this.bulletBounds=this.bounds;break;case c.Weapon.KILL_CAMERA_BOUNDS:this.bulletBounds=this.game.camera.view;break;case c.Weapon.KILL_WORLD_BOUNDS:this.bulletBounds=this.game.world.bounds}this._bulletKillType=a}}),Object.defineProperty(c.Weapon.prototype,"bulletCollideWorldBounds",{get:function(){return this._bulletCollideWorldBounds},set:function(a){this._bulletCollideWorldBounds=a,this.bullets.setAll("body.collideWorldBounds",a),this.bullets.setAll("data.bodyDirty",!1)}}),Object.defineProperty(c.Weapon.prototype,"x",{get:function(){return this.fireFrom.x},set:function(a){this.fireFrom.x=a}}),Object.defineProperty(c.Weapon.prototype,"y",{get:function(){return this.fireFrom.y},set:function(a){this.fireFrom.y=a}}),c.Bullet=function(a,b,d,e,f){c.Sprite.call(this,a,b,d,e,f),this.anchor.set(.5),this.data={bulletManager:null,fromX:0,fromY:0,bodyDirty:!0,rotateToVelocity:!1,killType:0,killDistance:0}},c.Bullet.prototype=Object.create(c.Sprite.prototype),c.Bullet.prototype.constructor=c.Bullet,c.Bullet.prototype.kill=function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.data.bulletManager.onKill.dispatch(this),this},c.Bullet.prototype.update=function(){this.exists&&(this.data.killType>c.Weapon.KILL_LIFESPAN&&(this.data.killType===c.Weapon.KILL_DISTANCE?this.game.physics.arcade.distanceToXY(this,this.data.fromX,this.data.fromY,!0)>this.data.killDistance&&this.kill():this.data.bulletManager.bulletBounds.intersects(this)||this.kill()),this.data.rotateToVelocity&&(this.rotation=Math.atan2(this.body.velocity.y,this.body.velocity.x)),this.data.bulletManager.bulletWorldWrap&&this.game.world.wrap(this,this.data.bulletManager.bulletWorldWrapPadding))},c.Video=function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=null),this.game=a,this.key=b,this.width=0,this.height=0,this.type=c.VIDEO,this.disableTextureUpload=!1,this.touchLocked=!1,this.onPlay=new c.Signal,this.onChangeSource=new c.Signal,this.onComplete=new c.Signal,this.onAccess=new c.Signal,this.onError=new c.Signal,this.onTimeout=new c.Signal,this.timeout=15e3,this._timeOutID=null,this.video=null,this.videoStream=null,this.isStreaming=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._codeMuted=!1,this._muted=!1,this._codePaused=!1,this._paused=!1,this._pending=!1,this._autoplay=!1,this._endCallback=null,this._playCallback=null,b&&this.game.cache.checkVideoKey(b)){var e=this.game.cache.getVideo(b);e.isBlob?this.createVideoFromBlob(e.data):this.video=e.data,this.width=this.video.videoWidth,this.height=this.video.videoHeight}else d&&this.createVideoFromURL(d,!1);this.video&&!d?(this.baseTexture=new PIXI.BaseTexture(this.video),this.baseTexture.forceLoaded(this.width,this.height)):(this.baseTexture=new PIXI.BaseTexture(c.Cache.DEFAULT.baseTexture.source),this.baseTexture.forceLoaded(this.width,this.height)),this.texture=new PIXI.Texture(this.baseTexture),this.textureFrame=new c.Frame(0,0,0,this.width,this.height,"video"),this.texture.setFrame(this.textureFrame),this.texture.valid=!1,null!==b&&this.video&&(this.texture.valid=this.video.canplay),this.snapshot=null,c.BitmapData&&(this.snapshot=new c.BitmapData(this.game,"",this.width,this.height)),!this.game.device.cocoonJS&&(this.game.device.iOS||this.game.device.chrome)||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock?this.setTouchLock():e&&(e.locked=!1)},c.Video.prototype={connectToMediaStream:function(a,b){return a&&b&&(this.video=a,this.videoStream=b,this.isStreaming=!0,this.baseTexture.source=this.video,this.updateTexture(null,this.video.videoWidth,this.video.videoHeight),this.onAccess.dispatch(this)),this},startMediaStream:function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=null),void 0===c&&(c=null),!this.game.device.getUserMedia)return this.onError.dispatch(this,"No getUserMedia"),!1;null!==this.videoStream&&(this.videoStream.active?this.videoStream.active=!1:this.videoStream.stop()),this.removeVideoElement(),this.video=document.createElement("video"),this.video.setAttribute("autoplay","autoplay"),null!==b&&(this.video.width=b),null!==c&&(this.video.height=c),this._timeOutID=window.setTimeout(this.getUserMediaTimeout.bind(this),this.timeout);try{navigator.getUserMedia({audio:a,video:!0},this.getUserMediaSuccess.bind(this),this.getUserMediaError.bind(this))}catch(a){this.getUserMediaError(a)}return this},getUserMediaTimeout:function(){clearTimeout(this._timeOutID),this.onTimeout.dispatch(this)},getUserMediaError:function(a){clearTimeout(this._timeOutID),this.onError.dispatch(this,a)},getUserMediaSuccess:function(a){clearTimeout(this._timeOutID),this.videoStream=a,void 0!==this.video.mozSrcObject?this.video.mozSrcObject=a:this.video.src=window.URL&&window.URL.createObjectURL(a)||a;var b=this;this.video.onloadeddata=function(){function a(){if(c>0)if(b.video.videoWidth>0){var d=b.video.videoWidth,e=b.video.videoHeight;isNaN(b.video.videoHeight)&&(e=d/(4/3)),b.video.play(),b.isStreaming=!0,b.baseTexture.source=b.video,b.updateTexture(null,d,e),b.onAccess.dispatch(b)}else window.setTimeout(a,500);else console.warn("Unable to connect to video stream. Webcam error?");c--}var c=10;a()}},createVideoFromBlob:function(a){var b=this;return this.video=document.createElement("video"),this.video.controls=!1,this.video.setAttribute("autoplay","autoplay"),this.video.addEventListener("loadeddata",function(a){b.updateTexture(a)},!0),this.video.src=window.URL.createObjectURL(a),this.video.canplay=!0,this},createVideoFromURL:function(a,b){return void 0===b&&(b=!1),this.texture&&(this.texture.valid=!1),this.video=document.createElement("video"),this.video.controls=!1,b&&this.video.setAttribute("autoplay","autoplay"),this.video.src=a,this.video.canplay=!0,this.video.load(),this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval),this.key=a,this},updateTexture:function(a,b,c){var d=!1;void 0!==b&&null!==b||(b=this.video.videoWidth,d=!0),void 0!==c&&null!==c||(c=this.video.videoHeight),this.width=b,this.height=c,this.baseTexture.source!==this.video&&(this.baseTexture.source=this.video),this.baseTexture.forceLoaded(b,c),this.texture.frame.resize(b,c),this.texture.width=b,this.texture.height=c,this.texture.valid=!0,this.snapshot&&this.snapshot.resize(b,c),d&&null!==this.key&&(this.onChangeSource.dispatch(this,b,c),this._autoplay&&(this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate)))},complete:function(){this.onComplete.dispatch(this)},play:function(a,b){return void 0===a&&(a=!1),void 0===b&&(b=1),this.game.sound.onMute&&(this.game.sound.onMute.add(this.setMute,this),this.game.sound.onUnMute.add(this.unsetMute,this),this.game.sound.mute&&this.setMute()),this.game.onPause.add(this.setPause,this),this.game.onResume.add(this.setResume,this),this._endCallback=this.complete.bind(this),this.video.addEventListener("ended",this._endCallback,!0),this.video.addEventListener("webkitendfullscreen",this._endCallback,!0),this.video.loop=a?"loop":"",this.video.playbackRate=b,this.touchLocked?this._pending=!0:(this._pending=!1,null!==this.key&&(4!==this.video.readyState?(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval)):(this._playCallback=this.playHandler.bind(this),this.video.addEventListener("playing",this._playCallback,!0))),this.video.play(),this.onPlay.dispatch(this,a,b)),this},playHandler:function(){this.video.removeEventListener("playing",this._playCallback,!0),this.updateTexture()},stop:function(){return this.game.sound.onMute&&(this.game.sound.onMute.remove(this.setMute,this),this.game.sound.onUnMute.remove(this.unsetMute,this)),this.game.onPause.remove(this.setPause,this),this.game.onResume.remove(this.setResume,this),this.isStreaming?(this.video.mozSrcObject?(this.video.mozSrcObject.stop(),this.video.src=null):(this.video.src="",this.videoStream.active?this.videoStream.active=!1:this.videoStream.getTracks?this.videoStream.getTracks().forEach(function(a){a.stop()}):this.videoStream.stop()),this.videoStream=null,this.isStreaming=!1):(this.video.removeEventListener("ended",this._endCallback,!0),this.video.removeEventListener("webkitendfullscreen",this._endCallback,!0),this.video.removeEventListener("playing",this._playCallback,!0),this.touchLocked?this._pending=!1:this.video.pause()),this},add:function(a){if(Array.isArray(a))for(var b=0;b0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):console.warn("Phaser.Video: Unable to start downloading video in time",this.isStreaming))},setTouchLock:function(){this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0},unlock:function(){if(this.touchLocked=!1,this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate),this.key){var a=this.game.cache.getVideo(this.key);a&&!a.isBlob&&(a.locked=!1)}return!0},grab:function(a,b,c){return void 0===a&&(a=!1),void 0===b&&(b=1),void 0===c&&(c=null),null===this.snapshot?void console.warn("Video.grab cannot run because Phaser.BitmapData is unavailable"):(a&&this.snapshot.cls(),this.snapshot.copy(this.video,0,0,this.width,this.height,0,0,this.width,this.height,0,0,0,1,1,b,c),this.snapshot)},removeVideoElement:function(){if(this.video){for(this.video.parentNode&&this.video.parentNode.removeChild(this.video);this.video.hasChildNodes();)this.video.removeChild(this.video.firstChild);this.video.removeAttribute("autoplay"),this.video.removeAttribute("src"),this.video=null}},destroy:function(){this.stop(),this.removeVideoElement(),this.touchLocked&&this.game.input.touch.removeTouchLockCallback(this.unlock,this),this._retryID&&window.clearTimeout(this._retryID)}},Object.defineProperty(c.Video.prototype,"currentTime",{get:function(){return this.video?this.video.currentTime:0},set:function(a){this.video.currentTime=a}}),Object.defineProperty(c.Video.prototype,"duration",{get:function(){return this.video?this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"progress",{get:function(){return this.video?this.video.currentTime/this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"mute",{get:function(){return this._muted},set:function(a){if(a=a||null){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}}),Object.defineProperty(c.Video.prototype,"paused",{get:function(){return this._paused},set:function(a){if(a=a||null,!this.touchLocked)if(a){if(this._paused)return;this._codePaused=!0,this.setPause()}else{if(!this._paused)return;this._codePaused=!1,this.setResume()}}}),Object.defineProperty(c.Video.prototype,"volume",{get:function(){return this.video?this.video.volume:1},set:function(a){a<0?a=0:a>1&&(a=1),this.video&&(this.video.volume=a)}}),Object.defineProperty(c.Video.prototype,"playbackRate",{get:function(){return this.video?this.video.playbackRate:1},set:function(a){this.video&&(this.video.playbackRate=a)}}),Object.defineProperty(c.Video.prototype,"loop",{get:function(){return!!this.video&&this.video.loop},set:function(a){a&&this.video?this.video.loop="loop":this.video&&(this.video.loop="")}}),Object.defineProperty(c.Video.prototype,"playing",{get:function(){return!(this.video.paused&&this.video.ended)}}),c.Video.prototype.constructor=c.Video,void 0===PIXI.blendModes&&(PIXI.blendModes=c.blendModes),void 0===PIXI.scaleModes&&(PIXI.scaleModes=c.scaleModes),void 0===PIXI.Texture.emptyTexture&&(PIXI.Texture.emptyTexture=new PIXI.Texture(new PIXI.BaseTexture)),void 0===PIXI.DisplayObject._tempMatrix&&(PIXI.DisplayObject._tempMatrix=new PIXI.Matrix),void 0===PIXI.RenderTexture.tempMatrix&&(PIXI.RenderTexture.tempMatrix=new PIXI.Matrix),PIXI.Graphics&&void 0===PIXI.Graphics.POLY&&(PIXI.Graphics.POLY=c.POLYGON,PIXI.Graphics.RECT=c.RECTANGLE,PIXI.Graphics.CIRC=c.CIRCLE,PIXI.Graphics.ELIP=c.ELLIPSE,PIXI.Graphics.RREC=c.ROUNDEDRECTANGLE),PIXI.TextureSilentFail=!0,"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=c),exports.Phaser=c):"undefined"!=typeof define&&define.amd?define("Phaser",function(){return b.Phaser=c}()):b.Phaser=c,c}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Button",["Phaser"],function(){"use strict";return function(c){function d(b,c,e,f,g,h,i){this.destroy=a(this.destroy,this),this.disable=a(this.disable,this),this.enable=a(this.enable,this),this.setUp=a(this.setUp,this),this.setDown=a(this.setDown,this),this.soundId=i,_.isArray(g)&&(this.downFrameName=g[1],g=this.upFrameName=g[0]),null!=g?d.__super__.constructor.call(this,b,c,e,f,"_default0000"):d.__super__.constructor.call(this,b,c,e,f),g&&(this.sprite=b.make.sprite(0,0,f,g),this.sprite.anchor.set(.5),this.addChild(this.sprite)),this.id=Math.random(),this.customEvents||(this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(b.TouchManager.register(this,"touchstart",this.setDown),b.TouchManager.register(this,"touchend",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.vibrate&&navigator.vibrate&&navigator.vibrate(50),a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))):(b.TouchManager.register(this,"mousedown",this.setDown),b.TouchManager.register(this,"mouseup",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))))}return b(d,c),d.prototype.setDown=function(){if(this.isDown=!0,this.disabled||null==this.downFrameName||null==this.sprite||(this.sprite.frameName=this.downFrameName),!this.disabled&&this.label)return this.label.scale.set(.95)},d.prototype.setUp=function(){if(this.isDown=!1,this.disabled||null==this.upFrameName||null==this.sprite||(this.sprite.frameName=this.upFrameName),!this.disabled&&this.label)return this.label.scale.set(1)},d.prototype.enable=function(){return this.disabled=!1},d.prototype.disable=function(){return this.disabled=!0},d.prototype.destroy=function(){return this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(this.game.TouchManager.unregister(this,"touchstart"),this.game.TouchManager.unregister(this,"touchend")):(this.game.TouchManager.unregister(this,"mousedown"),this.game.TouchManager.unregister(this,"mouseup")),d.__super__.destroy.apply(this,arguments)},d}(Phaser.Sprite)})}.call(this),function(){var a=function(a,c){function d(){this.constructor=a}for(var e in c)b.call(c,e)&&(a[e]=c[e]);return d.prototype=c.prototype,a.prototype=new d,a.__super__=c.prototype,a},b={}.hasOwnProperty;define("States/Common/GoldButton",["./Button","Phaser"],function(b){"use strict";return function(b){function c(a,b,d,e,f,g){var h;null==g&&(g=28),c.__super__.constructor.call(this,a,b,d,"MenuAssets","",f,"pusher"),this.anchor.set(.5),h=this.game.lang.font,this.label=a.make.bitmapText(0,0,h,e+" ",g),this.label.anchor.set(.5),this.addChild(this.label)}return a(c,b),c}(b)})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Navies",["./Button","Phaser"],function(c){"use strict";return function(c){function d(b,c,e,f){var g,h,i;for(null==f&&(f=3),this.update=a(this.update,this),d.__super__.constructor.call(this,b,c,e,"MenuAssets","_default0000"),this.anchor.set(.5),g=0,i=f;0<=i?g<=i:g>=i;0<=i?++g:--g)h=new Phaser.Sprite(b,0,0,"MenuAssets","Navy0000"),h.anchor.set(.5),h.scale.set(.3+.7*Math.random()),h.offsetCart={x:200*(Math.random()-.5),y:50*(Math.random()-.5)},h.offset={r:400*Math.random(),theta:Math.random()},h.rprime=0,h.speed={r:7e-4+5e-4*Math.random(),theta:3e-4+5e-4*(Math.random()-.5)},h.pos={r:Math.random(),theta:Math.random()*Math.PI*2},h.update=function(){return this.rprime+=this.speed.r,this.pos.r=this.offset.r*Math.sin(this.rprime),this.pos.theta+=this.speed.theta,this.x=this.offsetCart.x+this.pos.r*Math.cos(this.pos.theta),this.y=this.offsetCart.y+this.pos.r*Math.sin(this.pos.theta)},this.addChild(h)}return b(d,c),d.prototype.update=function(){var a,b,c,d,e;for(d=this.children,e=[],b=0,c=d.length;b0&&g[g.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!g||c[1]>g[0]&&c[1]\n
\n \n
\n
\n
\n \n
\n \n
\n
\n
'+b+"
\n "}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=c(function(a,c){!function(c,d){a.exports=function(){function a(a){var b=typeof a;return null!==a&&("object"===b||"function"===b)}function c(a){return"function"==typeof a}function d(a){N=a}function e(a){O=a}function f(){return void 0!==M?function(){M(i)}:g()}function g(){var a=setTimeout;return function(){return a(i,1)}}function i(){for(var a=0;a=a.length-1)return!1;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return!1;var d=j[a.slice(b+1)];return!!d&&d.indexOf(" "+a.slice(c+1,b)+" ")>=0},a.is=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return!1;if(a.lastIndexOf(".",b-1)>=0)return!1;var c=j[a.slice(b+1)];return!!c&&c.indexOf(" "+a.slice(0,b)+" ")>=0},a.get=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return null;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return null;var d=j[a.slice(b+1)];return d?d.indexOf(" "+a.slice(c+1,b)+" ")<0?null:a.slice(c+1):null},a}(),l=function(){function a(){}return a.setList=function(a){j=a||{}},a.getDomain=function(a){if(!j)return null;var b=a.match(/\./g);if(b&&b.length<2)return a;var c=this.getTld(a);if(!c)return null;var d=a.length-c.length-1;return d=a.lastIndexOf(".",d-1)+1,a.substring(d)||""},a.getTld=function(a){if(!j)return"";var b=a.lastIndexOf("."),c=a.substring(b+1);return j[c.toLowerCase()]?k.get(a)||c:c},a.KEY="Domains",a}(),m=function(){function a(){this.cache={}}return Object.defineProperty(a,"instance",{get:function(){return void 0===a.classInstance&&(a.classInstance=new a),a.classInstance},enumerable:!1,configurable:!0}),a.prototype.load=function(a,b,c){var d=this;return this.contains(a)?Promise.reject("Already in cache."):(this.cache[a]={url:b,data:null},this.requestXhr(b,c).then(function(b){return d.loadComplete(a,b)}).catch(function(b){return d.remove(a),Promise.reject(b)}))},a.prototype.loadComplete=function(a,b){if(!this.contains(a))return Promise.reject("Item was removed from cache before loading was complete.");try{var c=JSON.parse(b);return this.cache[a].data=c,Promise.resolve(c)}catch(a){return Promise.reject("There was an error parsing JSON file.")}},a.prototype.remove=function(a){this.contains(a)&&delete this.cache[a]},a.prototype.get=function(a){return this.contains(a)?this.cache[a].data:null},a.prototype.contains=function(a){return this.cache.hasOwnProperty(a)},a.prototype.isLoading=function(a){return this.contains(a)&&null===this.cache[a].data},a.prototype.isLoaded=function(a){return this.contains(a)&&null!==this.cache[a].data},a.prototype.loadScript=function(a,b,c){return void 0===b&&(b=!0),new Promise(function(b,d){var e=document.createElement("script");e.src=a,e.async=!1,e.onload=function(){"function"==typeof c&&c(),b()},document.head.appendChild(e)})},a.prototype.requestXhr=function(a,b){void 0===b&&(b="application/json");var c;return window.XMLHttpRequest?(c=new XMLHttpRequest,new Promise(function(d,e){c.onreadystatechange=function(){4===c.readyState&&(200===c.status?(d(c.responseText),c.onreadystatechange=null):c.status>0&&(e("There was a problem with the request: status "+c.status),c.onreadystatechange=null))};try{c.open("GET",a,!0),c.setRequestHeader("Content-Type",b),c.send()}catch(a){e("Error: Unable to send request, CORS not allowed.")}})):Promise.reject("Unable to send request, XMLHttpRequest not supported.")},a}();!function(a){a[a.splashscreen=0]="splashscreen",a[a.logo=1]="logo",a[a.facebook=2]="facebook",a[a.twitter=3]="twitter",a[a.playstore=4]="playstore",a[a.appstore=5]="appstore",a[a.more_games=6]="more_games",a[a.download_game=7]="download_game",a[a.walkthrough=8]="walkthrough",a[a.disclaimer=9]="disclaimer",a[a.highscores=10]="highscores"}(a.UtmTargets||(a.UtmTargets={}));var n=function(){function a(){}return a.loadPortalScript=function(a){a&&a.hasOwnProperty("minijuegos")&&-1!==a.minijuegos.indexOf(p.getSourceSite())&&(void 0!==window.mpConfig?window.mpConfig.partner="orange-games":window.mpConfig={partner:"orange-games"},f("https://ext.minijuegosgratis.com/external-host/main.js",Date.now()/1e3)),a&&a.hasOwnProperty("kongregate")&&-1!==a.kongregate.indexOf(p.getSourceSite())&&f("https://cdn1.kongregate.com/javascripts/kongregate_api.js",Date.now()/1e3,function(){"undefined"!=typeof kongregateAPI&&kongregateAPI.loadAPI(function(){window.kongregate=kongregateAPI.getAPI()})}),a&&a.hasOwnProperty("newgrounds")&&-1!==a.newgrounds.indexOf(p.getSourceSite())&&f("https://cdn.fbrq.io/@azerion/splash/assets/scripts/newgroundsio.min.js",Date.now()/1e3)},a}(),o=function(){function b(){}return b.preload=function(a){var c=Promise.all([m.instance.load(l.KEY,p.ASSET_LOCATION+"json/domains.json?v="+a,"text/plain"),m.instance.load(b.SITELOCK_PORTALS,p.ASSET_LOCATION+"json/sitelock.json?v="+a,"text/plain")]);return Promise.all([m.instance.load(b.INTERNAL_PORTALS_KEY,p.ASSET_LOCATION+"json/internal.json?v="+a,"text/plain"),m.instance.load(b.CONTRACTED_PORTALS_KEY,p.ASSET_LOCATION+"json/contracted.json?v="+a,"text/plain"),m.instance.load(b.SPECIAL_PORTALS_KEY,p.ASSET_LOCATION+"json/special.json?v="+a,"text/plain")]),c.then(function(a){var c=a[0],d=a[1];l.setList(c),n.loadPortalScript(d),b.setSiteLock(d)}).catch(function(){console.warn("Unable to parse json")})},b.setSiteLock=function(a){b.siteLocks=a},Object.defineProperty(b,"brandingLogoUrl",{get:function(){var c;switch(p.isOnDevice()||b.isAirfi()?p.ASSET_LOCATION="assets/":"fbrq.io"===p.getSourceSite(!0)&&(p.ASSET_LOCATION="https://"+window.location.host+"/@azerion/splash/assets/"),p.getBrandingDomain()){case a.BrandingDomain.Spele:c="spele";break;case a.BrandingDomain.PlayCell:c="playcell";break;case a.BrandingDomain.GameCell:c="gamecell";break;case a.BrandingDomain.Yepi:c="yepi";break;case a.BrandingDomain.Admeen:c="admeen";break;case a.BrandingDomain.Bild:c="bild";break;case a.BrandingDomain.Kizi:c="kizi";break;case a.BrandingDomain.Funnygames:c="funnygames";break;case a.BrandingDomain.PlayTime:c="playtime";break;default:case a.BrandingDomain.AGame:c="agame";break;case a.BrandingDomain.Zigiz:c="zigiz"}return p.ASSET_LOCATION+"images/branding_logo_"+c+"_small.png"},enumerable:!1,configurable:!0}),Object.defineProperty(b,"brandingBackgroundColor",{get:function(){var b;switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:b="#4a72ad";break;case a.BrandingDomain.PlayCell:b="#52a1e1";break;case a.BrandingDomain.GameCell:b="#c600b2";break;case a.BrandingDomain.Yepi:b="#0573a7";break;case a.BrandingDomain.AGame:b="#0C486C";break;case a.BrandingDomain.Admeen:b="#4267B2";break;case a.BrandingDomain.Bild:b="#de0000";break;default:case a.BrandingDomain.Kizi:b="#012f50";break;case a.BrandingDomain.Funnygames:b="#33b0ff";break;case a.BrandingDomain.PlayTime:case a.BrandingDomain.Zigiz:b="#023a63"}return b},enumerable:!1,configurable:!0}),b.openCampaignLink=function(c,d){if(!p.isOnDevice()&&!b.isSpecial()&&b.outGoingLinksAllowed()){var e,f,g=p.getSourceSite(),h=p.isOnDevice()?"https://":"//";switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:e=h+"www.spele.nl";break;case a.BrandingDomain.Yepi:e=h+"www.yepi.com";break;case a.BrandingDomain.Admeen:return e="https://media.admeen.com/branding/link.php",void((f=window.open(e,"_blank"))&&f.focus&&f.focus());case a.BrandingDomain.PlayCell:e=h+"www.playcell.com";break;case a.BrandingDomain.GameCell:e=h+"www.gamecell.com";break;case a.BrandingDomain.Kizi:e=h+"www.kizi.com";break;case a.BrandingDomain.Bild:return void((f=window.open(h+"www.bildspielt.de","_blank"))&&f.focus&&f.focus());case a.BrandingDomain.Funnygames:e=h+"www.funnygames.nu";break;case a.BrandingDomain.PlayTime:e=h+"playtime.nl";break;default:case a.BrandingDomain.AGame:e=h+"www.agame.com";break;case a.BrandingDomain.Zigiz:e=h+"m.zigiz.com"}var i="string"==typeof d?d:a.UtmTargets[d];f=window.open(e+"/?utm_source="+g+"&utm_medium=html5&utm_term="+c+"&utm_content="+i+"&utm_campaign=Gamedistribution","_blank"),f&&f.focus&&f.focus()}},b.isInternal=function(){return b.hostMatchesList(m.instance.get(b.INTERNAL_PORTALS_KEY))},b.isContracted=function(){return b.hostMatchesList(m.instance.get(b.CONTRACTED_PORTALS_KEY))},b.isSpecial=function(){return b.hostMatchesList(m.instance.get(b.SPECIAL_PORTALS_KEY))},b.isAdmeen=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("admeen"))return!1;var a=b.siteLocks.admeen;return b.hostMatchesList(a)},b.isKongregate=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("kongregate"))return!1;var a=b.siteLocks.kongregate;return b.hostMatchesList(a)},b.isNewgrounds=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("newgrounds"))return!1;var a=b.siteLocks.newgrounds;return b.hostMatchesList(a)},b.isBild=function(){return"bild.fbrq.io"===window.location.host||-1!==window.location.host.indexOf("contentfleet.com")},b.isPlaytime=function(){return-1!==window.location.host.indexOf("playtime.nl")},b.isBip=function(){return-1!==window.location.search.indexOf("bipgaming")||"bip.fbrq.io"===window.location.host},b.isPlaycellApp=function(){return-1!==window.location.search.indexOf("playcellApp")},b.isAGame=function(){return-1!==window.location.search.indexOf("agame")},b.isAirfi=function(){return!!window.hasOwnProperty("airfi")&&window.airfi},b.outGoingLinksAllowed=function(){return!(b.isAirfi()||b.isSpecial()||b.isContracted())&&(!window.hasOwnProperty("fbrqLA")||window.fbrqLA)},b.hostMatchesList=function(a){a=a||[];for(var b=p.getSourceSite(),c=0;c-1?c.split("/")[2]:c.split("/")[0],c=c.split(":")[0];var d=l.getDomain(c);return null!==d?d:(3===c.split(".").length&&(c=c.substr(c.indexOf(".")+1)),c)},b.getBrandingDomain=function(){if(window.hasOwnProperty("fbrqBD")&&window.fbrqBD in a.BrandingDomain)return window.fbrqBD;if(o.DOMAIN_OVERWRITE)return o.DOMAIN_OVERWRITE;var c=b.getSourceSite();if(o.isAdmeen())return a.BrandingDomain.Admeen;if(o.isPlaycellApp()||o.isBip())return a.BrandingDomain.PlayCell;switch(c){case"spele.nl":return a.BrandingDomain.Spele;case"yepi.com":return a.BrandingDomain.Yepi;case"oyunskor.com":case"barbioyunu.com.tr":case"bebekoyunu.com.tr":case"oyunkolu.com":case"oyungemisi.com":case"oyunlar1.com":case"oyunkuzusu.com":case"kraloyun.com":case"rekoroyun.com":case"oyundedem.com":case"oyunoyna.com":case"pastaoyunu.com.tr":case"playcell.com":return a.BrandingDomain.PlayCell;case"gamecell.com":return a.BrandingDomain.GameCell;case"playxl.com":return a.BrandingDomain.Admeen;case"kizi.com":return a.BrandingDomain.Kizi;case"bildspielt.de":return a.BrandingDomain.Bild;case"funnygames.nl":return a.BrandingDomain.Funnygames;case"playtime.nl":return a.BrandingDomain.PlayTime;default:case"agame.com":return a.BrandingDomain.AGame;case"gmbl.nl":case"zigiz.com":return a.BrandingDomain.Zigiz;case"coolmathgames.com":return a.BrandingDomain.Neutral}},b.getReferrer=function(a){return-1!==a.indexOf("?ref=")?a.substr(a.indexOf("?ref=")+5):a},b.inIframe=function(){try{return window.self!==window.top}catch(a){return!0}},b.inGDGameZone=function(){return-1!==document.referrer.indexOf("html5.gamedistribution.com")},b.getDomain=function(a){var b=document.createElement("a");return b.href=a,b.origin},b.isOnDevice=function(){return void 0!==window.cordova&&!/(gamedistribution\.com)/.test(window.location.hostname)},b.isTc=function(){return/(teamcity\.azerdev\.com)/.test(window.location.host)},b.getRandomRange=function(a,b){return Math.random()*(b-a)+a|0},b.getUrlParameter=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},b.intTimeToString=function(a){var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=a%60;return(b<10?"0"+b:b.toString())+":"+(c<10?"0"+c:c.toString())+":"+(d<10?"0"+d:d.toString())},b.LANGUAGE="en",b.HOST=document.referrer||window.location.host,b.ASSET_LOCATION=window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/":"https://cdn.fbrq.io/@azerion/splash/assets/",b}(),q=function(){function a(){this.fbrqId="UA-60359297-50"}return a.addScript=function(){return o.analyticsEnabled?new Promise(function(b,c){var d=document.createElement("script"),e="https://www.googletagmanager.com/gtag/js?id="+a.GAMeasurementId;d.setAttribute("src",e),d.async=!0,d.onload=function(){b({loaded:!0})},document.head.appendChild(d)}):Promise.resolve()},a.preload=function(){return o.analyticsEnabled&&a.addScript().then(function(a,b){return new Promise(function(b,c){a.loaded&&(window.hasOwnProperty("dataLayer")&&(window.dataLayer=window.dataLayer||[]),gtag=function(){window.hasOwnProperty("dataLayer")&&window.dataLayer.push(arguments)}),b()})}),Promise.resolve()},a.prototype.setup=function(a,b,c,d,e){if(void 0===b&&(b="none"),void 0===c&&(c="none"),void 0===d&&(d="auto"),void 0===e&&(e=100),"function"!=typeof gtag)return null;if(!o.analyticsEnabled){var f="ga-disable-"+a;return window.hasOwnProperty(f)&&(window.disableID=!o.analyticsEnabled),null}var g="none";o.isAGame()&&(g=p.getReferrer(decodeURIComponent(document.referrer))),gtag("js",new Date),gtag("set","user_properties",{app_name:b,app_version:c,referrer:g}),gtag("config",a,{sample_rate:e});var h={name:"fbrq",sample_rate:1,referrer:g,app_name:"All"};if("auto"!==d)for(var i in d)d.hasOwnProperty(i)&&(h[i]=d[i]);return gtag("config",this.fbrqId,h),gtag},a.prototype.sendScreenView=function(a){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event","screen_view",{screen_name:a}),gtag("event","screen_view",{send_to:this.fbrqId,screen_name:a})))},a.prototype.sendGenericEvent=function(a,b,c){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event",b,{event_category:a,event_label:c}),gtag("event",b,{send_to:this.fbrqId,event_category:a,event_label:c})))},a.GAMeasurementId="none",a}(),r=r||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,b){a=this.words=a||[],this.sigBytes=void 0!=b?b:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;e>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(a){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;ij;){var k;a:{k=i;for(var l=a.sqrt(k),m=2;m<=l;m++)if(!(k%m)){k=!1;break a}k=!0}k&&(8>j&&(f[j]=h(a.pow(i,.5))),g[j]=h(a.pow(i,1/3)),j++),i++}var n=[],c=c.SHA256=e.extend({_doReset:function(){this._hash=new d.init(f.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=0;64>m;m++){if(16>m)n[m]=0|a[b+m];else{var o=n[m-15],p=n[m-2];n[m]=((o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3)+n[m-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[m-16]}o=l+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&j^~i&k)+g[m]+n[m],p=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&f^e&f),l=k,k=j,j=i,i=h+o|0,h=f,f=e,e=d,d=o+p|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0,c[5]=c[5]+j|0,c[6]=c[6]+k|0,c[7]=c[7]+l|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;return c[e>>>5]|=128<<24-e%32,c[14+(e+64>>>9<<4)]=a.floor(d/4294967296),c[15+(e+64>>>9<<4)]=d,b.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA256=e._createHelper(c),b.HmacSHA256=e._createHmacHelper(c)}(Math),function(){var a=r,b=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,c){a=this._hasher=new a.init,"string"==typeof c&&(c=b.parse(c));var d=a.blockSize,e=4*d;c.sigBytes>e&&(c=a.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),g=this._iKey=c.clone(),h=f.words,i=g.words,j=0;j>>2]>>>24-e%4*8&255)<<16|(b[e+1>>>2]>>>24-(e+1)%4*8&255)<<8|b[e+2>>>2]>>>24-(e+2)%4*8&255,g=0;4>g&&e+.75*g>>6*(3-g)&63));if(b=d.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(a){var c=a.length,d=this._map,e=d.charAt(64);e&&-1!=(e=a.indexOf(e))&&(c=e);for(var e=[],f=0,g=0;g>>6-g%4*2;e[f>>>2]|=(h|i)<<24-f%4*8,f++}return b.create(e,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}();var s;!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Debug=1]="Debug",a[a.Info=2]="Info",a[a.Warning=3]="Warning",a[a.Error=4]="Error",a[a.Critical=5]="Critical"}(a.EGAErrorSeverity||(a.EGAErrorSeverity={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Male=1]="Male",a[a.Female=2]="Female"}(a.EGAGender||(a.EGAGender={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Start=1]="Start",a[a.Complete=2]="Complete",a[a.Fail=3]="Fail"}(a.EGAProgressionStatus||(a.EGAProgressionStatus={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Source=1]="Source",a[a.Sink=2]="Sink"}(a.EGAResourceFlowType||(a.EGAResourceFlowType={}));!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Rejected=1]="Rejected"}(a.EGASdkErrorType||(a.EGASdkErrorType={}));!function(a){a[a.NoResponse=0]="NoResponse",a[a.BadResponse=1]="BadResponse",a[a.RequestTimeout=2]="RequestTimeout",a[a.JsonEncodeFailed=3]="JsonEncodeFailed",a[a.JsonDecodeFailed=4]="JsonDecodeFailed",a[a.InternalServerError=5]="InternalServerError",a[a.BadRequest=6]="BadRequest",a[a.Unauthorized=7]="Unauthorized",a[a.UnknownResponseCode=8]="UnknownResponseCode",a[a.Ok=9]="Ok"}(a.EGAHTTPApiResponse||(a.EGAHTTPApiResponse={}))}(a.http||(a.http={}))}(s||(s={}));var s;s.EGAErrorSeverity,s.EGAGender,s.EGAProgressionStatus,s.EGAResourceFlowType;!function(a){!function(a){var b;!function(a){a[a.Error=0]="Error",a[a.Warning=1]="Warning",a[a.Info=2]="Info",a[a.Debug=3]="Debug"}(b||(b={}));var c=function(){function a(){a.debugEnabled=!1}return a.setInfoLog=function(b){a.instance.infoLogEnabled=b},a.setVerboseLog=function(b){a.instance.infoLogVerboseEnabled=b},a.i=function(c){if(a.instance.infoLogEnabled){var d="Info/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.w=function(c){var d="Warning/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Warning)},a.e=function(c){var d="Error/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Error)},a.ii=function(c){if(a.instance.infoLogVerboseEnabled){var d="Verbose/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.d=function(c){if(a.debugEnabled){var d="Debug/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Debug)}},a.prototype.sendNotificationMessage=function(a,c){switch(c){case b.Error:console.error(a);break;case b.Warning:console.warn(a);break;case b.Debug:"function"==typeof console.debug?console.debug(a):console.log(a);break;case b.Info:console.log(a)}},a.instance=new a,a.Tag="GameAnalytics",a}();a.GALogger=c}(a.logging||(a.logging={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=function(){function a(){}return a.getHmac=function(a,b){var c=r.HmacSHA256(b,a);return r.enc.Base64.stringify(c)},a.stringMatch=function(a,b){return!(!a||!b)&&b.test(a)},a.joinStringArray=function(a,b){for(var c="",d=0,e=a.length;d0&&(c+=b),c+=a[d];return c},a.stringArrayContainsString=function(a,b){if(0===a.length)return!1;for(var c in a)if(a[c]===b)return!0;return!1},a.encode64=function(b){b=encodeURI(b);var c,d,e,f,g,h="",i=0,j=0,k=0;do{c=b.charCodeAt(k++),d=b.charCodeAt(k++),i=b.charCodeAt(k++),e=c>>2,f=(3&c)<<4|d>>4,g=(15&d)<<2|i>>6,j=63&i,isNaN(d)?g=j=64:isNaN(i)&&(j=64),h=h+a.keyStr.charAt(e)+a.keyStr.charAt(f)+a.keyStr.charAt(g)+a.keyStr.charAt(j),c=d=i=0,e=f=g=j=0}while(k0))return c.w("validateInitRequestResponse failed - invalid value in 'server_ts' field."),null;b.server_ts=d}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'server_ts' field. type="+typeof a.server_ts+", value="+a.server_ts+", "+b),null}try{var e=a.configurations;b.configurations=e}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'configurations' field. type="+typeof a.configurations+", value="+a.configurations+", "+b),null}return b},b.validateBuild=function(a){return!!b.validateShortString(a,!1)},b.validateSdkWrapperVersion=function(a){return!!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/)},b.validateEngineVersion=function(a){return!(!a||!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/))},b.validateUserId=function(a){return!!b.validateString(a,!1)||(c.w("Validation fail - user id: id cannot be (null), empty or above 64 characters."),!1)},b.validateShortString=function(a,b){return!(!b||a)||!(!a||a.length>32)},b.validateString=function(a,b){return!(!b||a)||!(!a||a.length>64)},b.validateLongString=function(a,b){return!(!b||a)||!(!a||a.length>8192)},b.validateConnectionType=function(a){return e.stringMatch(a,/^(wwan|wifi|lan|offline)$/)},b.validateCustomDimensions=function(a){return b.validateArrayOfStrings(20,32,!1,"custom dimensions",a)},b.validateResourceCurrencies=function(a){if(!b.validateArrayOfStrings(20,64,!1,"resource currencies",a))return!1;for(var d=0;d0&&f.length>a)return c.w(g+" validation failed: array cannot exceed "+a+" values. It has "+f.length+" values."),!1;for(var h=0;h9999)||(c.w("Validation fail - birthYear: Cannot be (null) or invalid range."),!1)},b.validateClientTs=function(a){return!(a<-4294967294||a>4294967294)},b}();b.GAValidator=f}(a.validators||(a.validators={}))}(s||(s={}));var s;!function(a){!function(a){var b=function(){function a(a,b,c){this.name=a,this.value=b,this.version=c}return a}();a.NameValueVersion=b;var c=function(){function a(a,b){this.name=a,this.version=b}return a}();a.NameVersion=c;var d=function(){function a(){}return a.touch=function(){},a.getRelevantSdkVersion=function(){return a.sdkGameEngineVersion?a.sdkGameEngineVersion:a.sdkWrapperVersion},a.getConnectionType=function(){return a.connectionType},a.updateConnectionType=function(){navigator.onLine?"ios"===a.buildPlatform||"android"===a.buildPlatform?a.connectionType="wwan":a.connectionType="lan":a.connectionType="offline"},a.getOSVersionString=function(){return a.buildPlatform+" "+a.osVersionPair.version},a.runtimePlatformToString=function(){return a.osVersionPair.name},a.getBrowserVersionString=function(){var b,c=navigator.userAgent,d=c.match(/(opera|chrome|safari|firefox|ubrowser|msie|trident|fbav(?=\/))\/?\s*(\d+)/i)||[];if(0==d.length&&"ios"===a.buildPlatform)return"webkit_"+a.osVersion;if(/trident/i.test(d[1]))return b=/\brv[ :]+(\d+)/g.exec(c)||[],"IE "+(b[1]||"");if("Chrome"===d[1]&&null!=(b=c.match(/\b(OPR|Edge|UBrowser)\/(\d+)/)))return b.slice(1).join(" ").replace("OPR","Opera").replace("UBrowser","UC").toLowerCase();if(d[1]&&"fbav"===d[1].toLowerCase()&&(d[1]="facebook",d[2]))return"facebook "+d[2];var e=d[2]?[d[1],d[2]]:[navigator.appName,navigator.appVersion,"-?"];return null!=(b=c.match(/version\/(\d+)/i))&&e.splice(1,1,b[1]),e.join(" ").toLowerCase()},a.getDeviceModel=function(){return"unknown"},a.getDeviceManufacturer=function(){return"unknown"},a.matchItem=function(a,b){var d,e,f,g,h,i=new c("unknown","0.0.0"),j=0,k=0;for(j=0;j0},a.prototype.dequeue=function(){if(this.hasItems())return this.dequeueFromHighPriorityQueue();throw new Error("The queue is empty")},a.prototype.dequeueFromHighPriorityQueue=function(){var a=this._sortedKeys[0],b=this._subQueues[a].shift();return 0===this._subQueues[a].length&&(this._sortedKeys.shift(),delete this._subQueues[a]),b},a}();a.PriorityQueue=b}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){!function(b){var c,d=a.logging.GALogger;!function(a){a[a.Equal=0]="Equal",a[a.LessOrEqual=1]="LessOrEqual",a[a.NotEqual=2]="NotEqual"}(c=b.EGAStoreArgsOperator||(b.EGAStoreArgsOperator={}));var e;!function(a){a[a.Events=0]="Events",a[a.Sessions=1]="Sessions",a[a.Progression=2]="Progression"}(e=b.EGAStore||(b.EGAStore={}));var f=function(){function a(){this.eventsStore=[],this.sessionsStore=[],this.progressionStore=[],this.storeItems={};try{"object"==typeof localStorage?(localStorage.setItem("testingLocalStorage","yes"),localStorage.removeItem("testingLocalStorage"),a.storageAvailable=!0):a.storageAvailable=!1}catch(a){}}return a.isStorageAvailable=function(){return a.storageAvailable},a.isStoreTooLargeForEvents=function(){return a.instance.eventsStore.length+a.instance.sessionsStore.length>a.MaxNumberOfEntries},a.select=function(b,d,e,f){void 0===d&&(d=[]),void 0===e&&(e=!1),void 0===f&&(f=0);var g=a.getStore(b);if(!g)return null;for(var h=[],i=0;i0&&h.length>f&&(h=h.slice(0,f+1)),h},a.update=function(b,d,e){void 0===e&&(e=[]);var f=a.getStore(b);if(!f)return!1;for(var g=0;g0)return b.instance.sdkConfig;var a,c=0;for(var d in b.instance.sdkConfigCached)0===c&&(a=d),++c;return a&&c>0?b.instance.sdkConfigCached:b.instance.sdkConfigDefault},b.isEnabled=function(){var a=b.getSdkConfig();return(!a.enabled||"false"!=a.enabled)&&!!b.instance.initAuthorized},b.setCustomDimension01=function(a){b.instance.currentCustomDimension01=a,f.setItem(b.Dimension01Key,a),e.i("Set custom01 dimension value: "+a)},b.setCustomDimension02=function(a){b.instance.currentCustomDimension02=a,f.setItem(b.Dimension02Key,a),e.i("Set custom02 dimension value: "+a)},b.setCustomDimension03=function(a){b.instance.currentCustomDimension03=a,f.setItem(b.Dimension03Key,a),e.i("Set custom03 dimension value: "+a)},b.setFacebookId=function(a){b.instance.facebookId=a,f.setItem(b.FacebookIdKey,a),e.i("Set facebook id: "+a)},b.setGender=function(c){b.instance.gender=isNaN(Number(a.EGAGender[c]))?a.EGAGender[c].toString().toLowerCase():a.EGAGender[a.EGAGender[c]].toString().toLowerCase(),f.setItem(b.GenderKey,b.instance.gender),e.i("Set gender: "+b.instance.gender)},b.setBirthYear=function(a){b.instance.birthYear=a,f.setItem(b.BirthYearKey,a.toString()),e.i("Set birth year: "+a)},b.incrementSessionNum=function(){var a=b.getSessionNum()+1;b.instance.sessionNum=a},b.incrementTransactionNum=function(){var a=b.getTransactionNum()+1;b.instance.transactionNum=a},b.incrementProgressionTries=function(a){var c=b.getProgressionTries(a)+1;b.instance.progressionTries[a]=c;var d={};d.progression=a,d.tries=c,f.insert(h.Progression,d,!0,"progression")},b.getProgressionTries=function(a){return a in b.instance.progressionTries?b.instance.progressionTries[a]:0},b.clearProgressionTries=function(a){a in b.instance.progressionTries&&delete b.instance.progressionTries[a];var c=[];c.push(["progression",i.Equal,a]),f.delete(h.Progression,c)},b.setKeys=function(a,c){b.instance.gameKey=a,b.instance.gameSecret=c},b.setManualSessionHandling=function(a){b.instance.useManualSessionHandling=a,e.i("Use manual session handling: "+a)},b.setEnabledEventSubmission=function(a){b.instance._isEventSubmissionEnabled=a},b.getEventAnnotations=function(){var a={};a.v=2,a.user_id=b.instance.identifier,a.client_ts=b.getClientTsAdjusted(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.browser_version=g.browserVersion,a.platform=g.buildPlatform,a.session_id=b.instance.sessionId,a[b.SessionNumKey]=b.instance.sessionNum;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),b.instance.build&&(a.build=b.instance.build),b.instance.facebookId&&(a[b.FacebookIdKey]=b.instance.facebookId),b.instance.gender&&(a[b.GenderKey]=b.instance.gender),0!=b.instance.birthYear&&(a[b.BirthYearKey]=b.instance.birthYear),a},b.getSdkErrorEventAnnotations=function(){var a={};a.v=2,a.category=b.CategorySdkError,a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.platform=g.buildPlatform;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),a},b.getInitAnnotations=function(){var a={};return a.user_id=b.getIdentifier(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.platform=g.buildPlatform,a},b.getClientTsAdjusted=function(){var a=d.timeIntervalSince1970(),e=a+b.instance.clientServerTimeOffset;return c.validateClientTs(e)?e:a},b.sessionIsStarted=function(){return 0!=b.instance.sessionStart},b.cacheIdentifier=function(){b.instance.userId?b.instance.identifier=b.instance.userId:b.instance.defaultUserId&&(b.instance.identifier=b.instance.defaultUserId)},b.ensurePersistedStates=function(){f.isStorageAvailable()&&f.load();var a=b.instance;a.setDefaultId(null!=f.getItem(b.DefaultUserIdKey)?f.getItem(b.DefaultUserIdKey):d.createGuid()),a.sessionNum=null!=f.getItem(b.SessionNumKey)?Number(f.getItem(b.SessionNumKey)):0,a.transactionNum=null!=f.getItem(b.TransactionNumKey)?Number(f.getItem(b.TransactionNumKey)):0,a.facebookId?f.setItem(b.FacebookIdKey,a.facebookId):(a.facebookId=null!=f.getItem(b.FacebookIdKey)?f.getItem(b.FacebookIdKey):"",a.facebookId),a.gender?f.setItem(b.GenderKey,a.gender):(a.gender=null!=f.getItem(b.GenderKey)?f.getItem(b.GenderKey):"",a.gender),a.birthYear&&0!=a.birthYear?f.setItem(b.BirthYearKey,a.birthYear.toString()):(a.birthYear=null!=f.getItem(b.BirthYearKey)?Number(f.getItem(b.BirthYearKey)):0,a.birthYear),a.currentCustomDimension01?f.setItem(b.Dimension01Key,a.currentCustomDimension01):(a.currentCustomDimension01=null!=f.getItem(b.Dimension01Key)?f.getItem(b.Dimension01Key):"",a.currentCustomDimension01),a.currentCustomDimension02?f.setItem(b.Dimension02Key,a.currentCustomDimension02):(a.currentCustomDimension02=null!=f.getItem(b.Dimension02Key)?f.getItem(b.Dimension02Key):"",a.currentCustomDimension02),a.currentCustomDimension03?f.setItem(b.Dimension03Key,a.currentCustomDimension03):(a.currentCustomDimension03=null!=f.getItem(b.Dimension03Key)?f.getItem(b.Dimension03Key):"",a.currentCustomDimension03);var c=null!=f.getItem(b.SdkConfigCachedKey)?f.getItem(b.SdkConfigCachedKey):"";if(c){var e=JSON.parse(d.decode64(c));e&&(a.sdkConfigCached=e)}var g=f.select(h.Progression);if(g)for(var i=0;i0?(c[g]=k,++f):e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is an empty string or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH+")")}else if("number"===j||h instanceof Number){var l=h;c[g]=l,++f}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is not a string or number")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key contains illegal character, is empty or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_KEY_LENGTH+")")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because it exceeds the max number of custom fields ("+b.MAX_CUSTOM_FIELDS_COUNT+")");else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key or value is null")}}return c},b.validateAndFixCurrentDimensions=function(){c.validateDimension01(b.getCurrentCustomDimension01(),b.getAvailableCustomDimensions01())||b.setCustomDimension01(""),c.validateDimension02(b.getCurrentCustomDimension02(),b.getAvailableCustomDimensions02())||b.setCustomDimension02(""),c.validateDimension03(b.getCurrentCustomDimension03(),b.getAvailableCustomDimensions03())||b.setCustomDimension03("")},b.getConfigurationStringValue=function(a,c){return b.instance.configurations[a]?b.instance.configurations[a].toString():c},b.isCommandCenterReady=function(){return b.instance.commandCenterIsReady},b.addCommandCenterListener=function(a){b.instance.commandCenterListeners.indexOf(a)<0&&b.instance.commandCenterListeners.push(a)},b.removeCommandCenterListener=function(a){var c=b.instance.commandCenterListeners.indexOf(a);c>-1&&b.instance.commandCenterListeners.splice(c,1)},b.getConfigurationsContentAsString=function(){return JSON.stringify(b.instance.configurations)},b.populateConfigurations=function(a){var c=a.configurations;if(c)for(var d=0;dh&&j=a.MaxCount)){var h=c.getHmac(g,f),i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(!i.responseText)return;if(200!=i.status)return void d.w("sdk error failed. response code not 200. status code: "+i.status+", description: "+i.statusText+", body: "+i.responseText);a.countMap[e]=a.countMap[e]+1}},i.open("POST",b,!0),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Authorization",h);try{i.send(f)}catch(a){console.error(a)}}},a.MaxCount=10,a.countMap={},a}();b.SdkErrorTask=e}(a.tasks||(a.tasks={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.state.GAState,d=a.logging.GALogger,e=a.utilities.GAUtilities,f=a.validators.GAValidator,g=a.tasks.SdkErrorTask,h=function(){function a(){this.protocol="https",this.hostName="api.gameanalytics.com",this.version="v2",this.baseUrl=this.protocol+"://"+this.hostName+"/"+this.version,this.initializeUrlPath="init",this.eventsUrlPath="events",this.useGzip=!1}return a.prototype.requestInit=function(d){var e=c.getGameKey(),f=this.baseUrl+"/"+e+"/"+this.initializeUrlPath;f="https://rubick.gameanalytics.com/v2/command_center?game_key="+e+"&interval_seconds=1000000";var g=c.getInitAnnotations(),h=JSON.stringify(g);if(!h)return void d(b.EGAHTTPApiResponse.JsonEncodeFailed,null);var i=this.createPayloadData(h,this.useGzip),j=[];j.push(h),a.sendRequest(f,i,j,this.useGzip,a.initRequestCallback,d)},a.prototype.sendEventsInArray=function(d,e,f){if(0!=d.length){var g=c.getGameKey(),h=this.baseUrl+"/"+g+"/"+this.eventsUrlPath,i=JSON.stringify(d);if(!i)return void f(b.EGAHTTPApiResponse.JsonEncodeFailed,null,e,d.length);var j=this.createPayloadData(i,this.useGzip),k=[];k.push(i),k.push(e),k.push(d.length.toString()),a.sendRequest(h,j,k,this.useGzip,a.sendEventInArrayRequestCallback,f)}},a.prototype.sendSdkErrorEvent=function(b){if(c.isEventSubmissionEnabled()){var e=c.getGameKey(),h=c.getGameSecret();if(f.validateSdkErrorEvent(e,h,b)){var i=this.baseUrl+"/"+e+"/"+this.eventsUrlPath,j="",k=c.getSdkErrorEventAnnotations(),l=a.sdkErrorTypeToString(b);k.type=l;var m=[];if(m.push(k),!(j=JSON.stringify(m)))return void d.w("sendSdkErrorEvent: JSON encoding failed.");g.execute(i,b,j,h)}}},a.sendEventInArrayRequestCallback=function(c,d,e,f){void 0===f&&(f=null);var g=(f[0],f[1],f[2]),h=parseInt(f[3]),i="",j=0;i=c.responseText,j=c.status;var k=a.instance.processRequestResponse(j,c.statusText,i,"Events");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,g,h);var l=i?JSON.parse(i):{};if(null==l)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,g,h);b.EGAHTTPApiResponse.BadRequest,e(k,l,g,h)},a.sendRequest=function(a,b,d,f,g,h){var i=new XMLHttpRequest,j=c.getGameSecret(),k=e.getHmac(j,b),l=[];l.push(k);for(var m in d)l.push(d[m]);if(i.onreadystatechange=function(){4===i.readyState&&g(i,a,h,l)},i.open("POST",a,!0),i.setRequestHeader("Content-Type","text/plain"),i.setRequestHeader("Authorization",k),f)throw new Error("gzip not supported");try{i.send(b)}catch(a){console.error(a.stack)}},a.initRequestCallback=function(c,d,e,g){void 0===g&&(g=null);var h=(g[0],g[1],""),i=0;h=c.responseText,i=c.status;var j=h?JSON.parse(h):{},k=a.instance.processRequestResponse(i,c.statusText,h,"Init");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0);if(null==j)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,"",0);if(k===b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0) +;var l=f.validateAndCleanInitRequestResponse(j);if(!l)return void e(b.EGAHTTPApiResponse.BadResponse,null,"",0);e(b.EGAHTTPApiResponse.Ok,l,"",0)},a.prototype.createPayloadData=function(a,b){if(b)throw new Error("gzip not supported");return a},a.prototype.processRequestResponse=function(a,c,d,e){return d?200===a?b.EGAHTTPApiResponse.Ok:0===a||401===a?b.EGAHTTPApiResponse.Unauthorized:400===a?b.EGAHTTPApiResponse.BadRequest:500===a?b.EGAHTTPApiResponse.InternalServerError:b.EGAHTTPApiResponse.UnknownResponseCode:b.EGAHTTPApiResponse.NoResponse},a.sdkErrorTypeToString=function(a){switch(a){case b.EGASdkErrorType.Rejected:return"rejected";default:return""}},a.instance=new a,a}();b.GAHTTPApi=h}(a.http||(a.http={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.store.GAStore,d=a.store.EGAStore,e=a.store.EGAStoreArgsOperator,f=a.state.GAState,g=a.logging.GALogger,h=a.utilities.GAUtilities,i=a.http.EGAHTTPApiResponse,j=a.http.GAHTTPApi,k=a.validators.GAValidator,l=a.http.EGASdkErrorType,m=function(){function b(){}return b.addSessionStartEvent=function(){if(f.isEventSubmissionEnabled()){var a={};a.category=b.CategorySessionStart,f.incrementSessionNum(),c.setItem(f.SessionNumKey,f.getSessionNum().toString()),b.addDimensionsToEvent(a),b.addEventToStore(a),g.i("Add SESSION START event"),b.processEvents(b.CategorySessionStart,!1)}},b.addSessionEndEvent=function(){if(f.isEventSubmissionEnabled()){var a=f.getSessionStart(),c=f.getClientTsAdjusted(),d=c-a;d<0&&(g.w("Session length was calculated to be less then 0. Should not be possible. Resetting to 0."),d=0);var e={};e.category=b.CategorySessionEnd,e.length=d,b.addDimensionsToEvent(e),b.addEventToStore(e),g.i("Add SESSION END event."),b.processEvents("",!1)}},b.addBusinessEvent=function(a,d,e,h,i,m){if(void 0===i&&(i=null),f.isEventSubmissionEnabled()){if(!k.validateBusinessEvent(a,d,i,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var n={};f.incrementTransactionNum(),c.setItem(f.TransactionNumKey,f.getTransactionNum().toString()),n.event_id=e+":"+h,n.category=b.CategoryBusiness,n.currency=a,n.amount=d,n[f.TransactionNumKey]=f.getTransactionNum(),i&&(n.cart_type=i),b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add BUSINESS event: {currency:"+a+", amount:"+d+", itemType:"+e+", itemId:"+h+", cartType:"+i+"}"),b.addEventToStore(n)}},b.addResourceEvent=function(c,d,e,h,i,m){if(f.isEventSubmissionEnabled()){if(!k.validateResourceEvent(c,d,e,h,i,f.getAvailableResourceCurrencies(),f.getAvailableResourceItemTypes()))return void j.instance.sendSdkErrorEvent(l.Rejected);c===a.EGAResourceFlowType.Sink&&(e*=-1);var n={},o=b.resourceFlowTypeToString(c);n.event_id=o+":"+d+":"+h+":"+i,n.category=b.CategoryResource,n.amount=e,b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add RESOURCE event: {currency:"+d+", amount:"+e+", itemType:"+h+", itemId:"+i+"}"),b.addEventToStore(n)}},b.addProgressionEvent=function(c,d,e,h,i,m,n){if(f.isEventSubmissionEnabled()){var o=b.progressionStatusToString(c);if(!k.validateProgressionEvent(c,d,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var p,q={};p=e?h?d+":"+e+":"+h:d+":"+e:d,q.category=b.CategoryProgression,q.event_id=o+":"+p;var r=0;m&&c!=a.EGAProgressionStatus.Start&&(q.score=i),c===a.EGAProgressionStatus.Fail&&f.incrementProgressionTries(p),c===a.EGAProgressionStatus.Complete&&(f.incrementProgressionTries(p),r=f.getProgressionTries(p),q.attempt_num=r,f.clearProgressionTries(p)),b.addDimensionsToEvent(q),b.addFieldsToEvent(q,f.validateAndCleanCustomFields(n)),g.i("Add PROGRESSION event: {status:"+o+", progression01:"+d+", progression02:"+e+", progression03:"+h+", score:"+i+", attempt:"+r+"}"),b.addEventToStore(q)}},b.addDesignEvent=function(a,c,d,e){if(f.isEventSubmissionEnabled()){if(!k.validateDesignEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryDesign,h.event_id=a,d&&(h.value=c),b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(e)),g.i("Add DESIGN event: {eventId:"+a+", value:"+c+"}"),b.addEventToStore(h)}},b.addErrorEvent=function(a,c,d){if(f.isEventSubmissionEnabled()){var e=b.errorSeverityToString(a);if(!k.validateErrorEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryError,h.severity=e,h.message=c,b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(d)),g.i("Add ERROR event: {severity:"+e+", message:"+c+"}"),b.addEventToStore(h)}},b.processEvents=function(a,i){if(f.isEventSubmissionEnabled())try{var k=h.createGuid();i&&(b.cleanupEvents(),b.fixMissingSessionEndEvents());var l=[];l.push(["status",e.Equal,"new"]);var m=[];m.push(["status",e.Equal,"new"]),a&&(l.push(["category",e.Equal,a]),m.push(["category",e.Equal,a]));var n=[];n.push(["status",k]);var o=c.select(d.Events,l);if(!o||0==o.length)return g.i("Event queue: No events to send"),void b.updateSessionStore();if(o.length>b.MaxEventCount){if(!(o=c.select(d.Events,l,!0,b.MaxEventCount)))return;var p=o[o.length-1],q=p.client_ts;if(l.push(["client_ts",e.LessOrEqual,q]),!(o=c.select(d.Events,l)))return;m.push(["client_ts",e.LessOrEqual,q])}if(g.i("Event queue: Sending "+o.length+" events."),!c.update(d.Events,n,m))return;for(var r=[],s=0;s0&&(a.custom_fields=b)},b.resourceFlowTypeToString=function(b){return b==a.EGAResourceFlowType.Source||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Source]?"Source":b==a.EGAResourceFlowType.Sink||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Sink]?"Sink":""},b.progressionStatusToString=function(b){return b==a.EGAProgressionStatus.Start||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Start]?"Start":b==a.EGAProgressionStatus.Complete||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Complete]?"Complete":b==a.EGAProgressionStatus.Fail||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Fail]?"Fail":""},b.errorSeverityToString=function(b){return b==a.EGAErrorSeverity.Debug||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Debug]?"debug":b==a.EGAErrorSeverity.Info||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Info]?"info":b==a.EGAErrorSeverity.Warning||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Warning]?"warning":b==a.EGAErrorSeverity.Error||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Error]?"error":b==a.EGAErrorSeverity.Critical||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Critical]?"critical":""},b.instance=new b,b.CategorySessionStart="user",b.CategorySessionEnd="session_end",b.CategoryDesign="design",b.CategoryBusiness="business",b.CategoryProgression="progression",b.CategoryResource="resource",b.CategoryError="error",b.MaxEventCount=500,b}();b.GAEvents=m}(a.events||(a.events={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=a.state.GAState,e=a.events.GAEvents,f=function(){function a(){this.blocks=new b.PriorityQueue({compare:function(a,b){return a-b}}),this.id2TimedBlockMap={},a.startThread()}return a.createTimedBlock=function(a){void 0===a&&(a=0);var c=new Date;return c.setSeconds(c.getSeconds()+a),new b.TimedBlock(c)},a.performTaskOnGAThread=function(c,d){void 0===d&&(d=0);var e=new Date;e.setSeconds(e.getSeconds()+d);var f=new b.TimedBlock(e);f.block=c,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f)},a.performTimedBlockOnGAThread=function(b){a.instance.id2TimedBlockMap[b.id]=b,a.instance.addTimedBlock(b)},a.scheduleTimer=function(c,d){var e=new Date;e.setSeconds(e.getSeconds()+c);var f=new b.TimedBlock(e);return f.block=d,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f),f.id},a.getTimedBlockById=function(b){return b in a.instance.id2TimedBlockMap?a.instance.id2TimedBlockMap[b]:null},a.ensureEventQueueIsRunning=function(){a.instance.keepRunning=!0,a.instance.isRunning||(a.instance.isRunning=!0,a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue))},a.endSessionAndStopQueue=function(){d.isInitialized()&&(c.i("Ending session."),a.stopEventQueue(),d.isEnabled()&&d.sessionIsStarted()&&(e.addSessionEndEvent(),d.instance.sessionStart=0))},a.stopEventQueue=function(){a.instance.keepRunning=!1},a.ignoreTimer=function(b){b in a.instance.id2TimedBlockMap&&(a.instance.id2TimedBlockMap[b].ignore=!0)},a.setEventProcessInterval=function(b){b>0&&(a.ProcessEventsIntervalInSeconds=b)},a.prototype.addTimedBlock=function(a){this.blocks.enqueue(a.deadline.getTime(),a)},a.run=function(){clearTimeout(a.runTimeoutId);try{for(var b;b=a.getNextBlock();)if(!b.ignore)if(b.async){if(!b.running){b.running=!0,b.block();break}}else b.block();return void(a.runTimeoutId=setTimeout(a.run,a.ThreadWaitTimeInMs))}catch(a){c.e("Error on GA thread"),c.e(a.stack)}},a.startThread=function(){a.runTimeoutId=setTimeout(a.run,0)},a.getNextBlock=function(){var b=new Date;return a.instance.blocks.hasItems()&&a.instance.blocks.peek().deadline.getTime()<=b.getTime()?a.instance.blocks.peek().async&&a.instance.blocks.peek().running?a.instance.blocks.peek():a.instance.blocks.dequeue():null},a.processEventQueue=function(){e.processEvents("",!0),a.instance.keepRunning?a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue):a.instance.isRunning=!1},a.instance=new a,a.ThreadWaitTimeInMs=1e3,a.ProcessEventsIntervalInSeconds=8,a}();b.GAThreading=f}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){var b=a.threading.GAThreading,c=a.logging.GALogger,d=a.store.GAStore,e=a.state.GAState,f=a.http.GAHTTPApi,g=a.device.GADevice,h=a.validators.GAValidator,i=a.http.EGAHTTPApiResponse,j=a.utilities.GAUtilities,k=a.events.GAEvents,l=function(){function l(){}return l.init=function(){if(g.touch(),l.methodMap.configureAvailableCustomDimensions01=l.configureAvailableCustomDimensions01,l.methodMap.configureAvailableCustomDimensions02=l.configureAvailableCustomDimensions02,l.methodMap.configureAvailableCustomDimensions03=l.configureAvailableCustomDimensions03,l.methodMap.configureAvailableResourceCurrencies=l.configureAvailableResourceCurrencies,l.methodMap.configureAvailableResourceItemTypes=l.configureAvailableResourceItemTypes,l.methodMap.configureBuild=l.configureBuild,l.methodMap.configureSdkGameEngineVersion=l.configureSdkGameEngineVersion,l.methodMap.configureGameEngineVersion=l.configureGameEngineVersion,l.methodMap.configureUserId=l.configureUserId,l.methodMap.initialize=l.initialize,l.methodMap.addBusinessEvent=l.addBusinessEvent,l.methodMap.addResourceEvent=l.addResourceEvent,l.methodMap.addProgressionEvent=l.addProgressionEvent,l.methodMap.addDesignEvent=l.addDesignEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.setEnabledInfoLog=l.setEnabledInfoLog,l.methodMap.setEnabledVerboseLog=l.setEnabledVerboseLog,l.methodMap.setEnabledManualSessionHandling=l.setEnabledManualSessionHandling,l.methodMap.setEnabledEventSubmission=l.setEnabledEventSubmission,l.methodMap.setCustomDimension01=l.setCustomDimension01,l.methodMap.setCustomDimension02=l.setCustomDimension02,l.methodMap.setCustomDimension03=l.setCustomDimension03,l.methodMap.setFacebookId=l.setFacebookId,l.methodMap.setGender=l.setGender,l.methodMap.setBirthYear=l.setBirthYear,l.methodMap.setEventProcessInterval=l.setEventProcessInterval,l.methodMap.startSession=l.startSession,l.methodMap.endSession=l.endSession,l.methodMap.onStop=l.onStop,l.methodMap.onResume=l.onResume,l.methodMap.addCommandCenterListener=l.addCommandCenterListener,l.methodMap.removeCommandCenterListener=l.removeCommandCenterListener,l.methodMap.getCommandCenterValueAsString=l.getCommandCenterValueAsString,l.methodMap.isCommandCenterReady=l.isCommandCenterReady,l.methodMap.getConfigurationsContentAsString=l.getConfigurationsContentAsString,"undefined"!=typeof window&&void 0!==window.GameAnalytics&&void 0!==window.GameAnalytics.q){var a=window.GameAnalytics.q;for(var b in a)l.gaCommand.apply(null,a[b])}},l.gaCommand=function(){for(var b=[],c=0;c0&&b[0]in a.GameAnalytics.methodMap&&(b.length>1?a.GameAnalytics.methodMap[b[0]].apply(null,Array.prototype.slice.call(b,1)):a.GameAnalytics.methodMap[b[0]]())},l.configureAvailableCustomDimensions01=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions01(a)})},l.configureAvailableCustomDimensions02=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions02(a)})},l.configureAvailableCustomDimensions03=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions03(a)})},l.configureAvailableResourceCurrencies=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource currencies must be set before SDK is initialized");e.setAvailableResourceCurrencies(a)})},l.configureAvailableResourceItemTypes=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource item types must be set before SDK is initialized");e.setAvailableResourceItemTypes(a)})},l.configureBuild=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("Build version must be set before SDK is initialized."):h.validateBuild(a)?void e.setBuild(a):void c.i("Validation fail - configure build: Cannot be null, empty or above 32 length. String: "+a)})},l.configureSdkGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateSdkWrapperVersion(a)?void(g.sdkGameEngineVersion=a):void c.i("Validation fail - configure sdk version: Sdk version not supported. String: "+a)})},l.configureGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateEngineVersion(a)?void(g.gameEngineVersion=a):void c.i("Validation fail - configure game engine version: Game engine version not supported. String: "+a)})},l.configureUserId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("A custom user id must be set before SDK is initialized."):h.validateUserId(a)?void e.setUserId(a):void c.i("Validation fail - configure user_id: Cannot be null, empty or above 64 length. Will use default user_id method. Used string: "+a)})},l.initialize=function(a,d){void 0===a&&(a=""),void 0===d&&(d=""),g.updateConnectionType();var f=b.createTimedBlock();f.async=!0,l.initTimedBlockId=f.id,f.block=function(){return l.isSdkReady(!0,!1)?void c.w("SDK already initialized. Can only be called once."):h.validateKeys(a,d)?(e.setKeys(a,d),void l.internalInitialize()):void c.w("SDK failed initialize. Game key or secret key is invalid. Can only contain characters A-z 0-9, gameKey is 32 length, gameSecret is 40 length. Failed keys - gameKey: "+a+", secretKey: "+d)},b.performTimedBlockOnGAThread(f)},l.addBusinessEvent=function(a,c,d,e,f){void 0===a&&(a=""),void 0===c&&(c=0),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add business event")&&k.addBusinessEvent(a,c,d,e,f,{})})},l.addResourceEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAResourceFlowType.Undefined),void 0===d&&(d=""),void 0===e&&(e=0),void 0===f&&(f=""),void 0===h&&(h=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add resource event")&&k.addResourceEvent(c,d,e,f,h,{})})},l.addProgressionEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAProgressionStatus.Undefined),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add progression event")){var a="number"==typeof h;k.addProgressionEvent(c,d,e,f,a?h:0,a,{})}})},l.addDesignEvent=function(a,c){g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add design event")){var b="number"==typeof c;k.addDesignEvent(a,b?c:0,b,{})}})},l.addErrorEvent=function(c,d){void 0===c&&(c=a.EGAErrorSeverity.Undefined),void 0===d&&(d=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add error event")&&k.addErrorEvent(c,d,{})})},l.setEnabledInfoLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setInfoLog(a),c.i("Info logging enabled")):(c.i("Info logging disabled"),c.setInfoLog(a))})},l.setEnabledVerboseLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setVerboseLog(a),c.i("Verbose logging enabled")):(c.i("Verbose logging disabled"),c.setVerboseLog(a))})},l.setEnabledManualSessionHandling=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){e.setManualSessionHandling(a)})},l.setEnabledEventSubmission=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(e.setEnabledEventSubmission(a),c.i("Event submission enabled")):(c.i("Event submission disabled"),e.setEnabledEventSubmission(a))})},l.setCustomDimension01=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension01(a,e.getAvailableCustomDimensions01()))return void c.w("Could not set custom01 dimension value to '"+a+"'. Value not found in available custom01 dimension values");e.setCustomDimension01(a)})},l.setCustomDimension02=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension02(a,e.getAvailableCustomDimensions02()))return void c.w("Could not set custom02 dimension value to '"+a+"'. Value not found in available custom02 dimension values");e.setCustomDimension02(a)})},l.setCustomDimension03=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension03(a,e.getAvailableCustomDimensions03()))return void c.w("Could not set custom03 dimension value to '"+a+"'. Value not found in available custom03 dimension values");e.setCustomDimension03(a)})},l.setFacebookId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){h.validateFacebookId(a)&&e.setFacebookId(a)})},l.setGender=function(c){void 0===c&&(c=a.EGAGender.Undefined),b.performTaskOnGAThread(function(){h.validateGender(c)&&e.setGender(c)})},l.setBirthYear=function(a){void 0===a&&(a=0),b.performTaskOnGAThread(function(){h.validateBirthyear(a)&&e.setBirthYear(a)})},l.setEventProcessInterval=function(a){b.performTaskOnGAThread(function(){b.setEventProcessInterval(a)})},l.startSession=function(){if(e.isInitialized()){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){e.isEnabled()&&e.sessionIsStarted()&&b.endSessionAndStopQueue(),l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)}},l.endSession=function(){l.onStop()},l.onStop=function(){b.performTaskOnGAThread(function(){try{b.endSessionAndStopQueue()}catch(a){}})},l.onResume=function(){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)},l.getCommandCenterValueAsString=function(a,b){return void 0===b&&(b=null),e.getConfigurationStringValue(a,b)},l.isCommandCenterReady=function(){return e.isCommandCenterReady()},l.addCommandCenterListener=function(a){e.addCommandCenterListener(a)},l.removeCommandCenterListener=function(a){e.removeCommandCenterListener(a)},l.getConfigurationsContentAsString=function(){return e.getConfigurationsContentAsString()},l.internalInitialize=function(){e.ensurePersistedStates(),d.setItem(e.DefaultUserIdKey,e.getDefaultId()),e.setInitialized(!0),l.newSession(),e.isEnabled()&&b.ensureEventQueueIsRunning()},l.newSession=function(){c.i("Starting a new session."),e.validateAndFixCurrentDimensions(),f.instance.requestInit(l.startNewSessionCallback)},l.startNewSessionCallback=function(a,f){if(a===i.Ok&&f){var g=0;if(f.server_ts){var h=f.server_ts;g=e.calculateServerTimeOffset(h)}f.time_offset=g,d.setItem(e.SdkConfigCachedKey,j.encode64(JSON.stringify(f))),e.instance.sdkConfigCached=f,e.instance.sdkConfig=f,e.instance.initAuthorized=!0}else a==i.Unauthorized?(c.w("Initialize SDK failed - Unauthorized"),e.instance.initAuthorized=!1):(a===i.NoResponse||a===i.RequestTimeout?c.i("Init call (session start) failed - no response. Could be offline or timeout."):a===i.BadResponse||a===i.JsonEncodeFailed||a===i.JsonDecodeFailed?c.i("Init call (session start) failed - bad response. Could be bad response from proxy or GA servers."):a!==i.BadRequest&&a!==i.UnknownResponseCode||c.i("Init call (session start) failed - bad request or unknown response."),null==e.instance.sdkConfig?null!=e.instance.sdkConfigCached?(c.i("Init call (session start) failed - using cached init values."),e.instance.sdkConfig=e.instance.sdkConfigCached):(c.i("Init call (session start) failed - using default init values."),e.instance.sdkConfig=e.instance.sdkConfigDefault):c.i("Init call (session start) failed - using cached init values."),e.instance.initAuthorized=!0);if(e.instance.clientServerTimeOffset=e.getSdkConfig().time_offset?e.getSdkConfig().time_offset:0,e.populateConfigurations(e.getSdkConfig()),!e.isEnabled())return c.w("Could not start session: SDK is disabled."),void b.stopEventQueue();b.ensureEventQueueIsRunning();var m=j.createGuid();e.instance.sessionId=m,e.instance.sessionStart=e.getClientTsAdjusted(),k.addSessionStartEvent();var n=b.getTimedBlockById(l.initTimedBlockId);null!=n&&(n.running=!1),l.initTimedBlockId=-1},l.resumeSessionAndStartQueue=function(){e.isInitialized()&&(c.i("Resuming session."),e.sessionIsStarted()||l.newSession())},l.isSdkReady=function(a,b,d){return void 0===b&&(b=!0),void 0===d&&(d=""),d&&(d+=": "),a&&!e.isInitialized()?(b&&c.w(d+"SDK is not initialized"),!1):a&&!e.isEnabled()?(b&&c.w(d+"SDK is disabled"),!1):!(a&&!e.sessionIsStarted())||(b&&c.w(d+"Session has not started yet"),!1)},l.initTimedBlockId=-1,l.methodMap={},l}();a.GameAnalytics=l}(s||(s={})),s.GameAnalytics.init();var t=(s.GameAnalytics.gaCommand,s),u=function(){function a(){}return a.prototype.setup=function(a,b,c){o.analyticsEnabled&&(t.GameAnalytics.initialize(a,b),t.GameAnalytics.configureBuild(c),t.GameAnalytics.startSession(),window.addEventListener("beforeunload",function(){t.GameAnalytics.endSession()}))},a.prototype.addProgressionEvent=function(a,b,c,d,e){o.analyticsEnabled&&t.GameAnalytics.addProgressionEvent(a,b,c,d,e)},a.prototype.addDesignEvent=function(a,b){o.analyticsEnabled&&t.GameAnalytics.addDesignEvent(a,b)},a}(),v=c(function(a,c){!function(c){a.exports=function(){return function a(c,d,e){function f(h,i){if(!d[h]){if(!c[h]){var j="function"==typeof b&&b;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=d[h]={exports:{}};c[h][0].call(l.exports,function(a){var b=c[h][1][a];return f(b||a)},l,l.exports,a,c,d,e)}return d[h].exports}for(var g="function"==typeof b&&b,h=0;h=t,w=d-(t-u),a.isPlaying()&&(v?(k(g,a._attachment,w),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,q),j(a,"beforeTween"),u=0?a:0-a}function k(a,b){var c,d,e,f,h,k;for(e=a,k=0;k<8;k++){if(f=g(e)-a,j(f)d)return d;for(;cf?c=e:d=e,e=.5*(d-c)+c}return e}var l=0,m=0,n=0,o=0,p=0,q=0;return n=3*b,m=3*(d-b)-n,l=1-n-m,q=3*c,p=3*(e-c)-q,o=1-q-p,function(a,b){return h(k(a,b))}(a,function(a){return 1/(200*a)}(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}d.setBezierFunction=function(a,c,e,f,g){var h=b(c,e,f,g);return h.displayName=a,h.x1=c,h.y1=e,h.x2=f,h.y2=g,d.prototype.formula[a]=h},d.unsetBezierFunction=function(a){delete d.prototype.formula[a]}}(),function(){function a(a,b,c,e,f,g){return d.tweenProps(e,b,a,c,1,g,f)}var b=new d;b._filterArgs=[],d.interpolate=function(c,e,f,g,h){var i=d.shallowCopy({},c),j=h||0,k=d.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=e,l[3]=k,d.applyFilter(b,"tweenCreated"),d.applyFilter(b,"beforeTween");var m=a(c,i,e,f,k,j);return d.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;ca.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Square:a("./square"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");c=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},c);var d;d=e.isString(b)?document.querySelector(b):b,this.path=d,this._opts=c,this._tweenable=null;var f=this.path.getTotalLength();this.path.style.strokeDasharray=f+" "+f,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing);b(this._calculateTo(a,c),this._opts.shape||this,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":9,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":9}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},c,!0),e.isObject(c)&&void 0!==c.svgStyle&&(this._opts.svgStyle=c.svgStyle),e.isObject(c)&&e.isObject(c.text)&&void 0!==c.text.style&&(this._opts.text.style=c.text.style);var f,g=this._createSvgView(this._opts);if(!(f=e.isString(b)?document.querySelector(b):b))throw new Error("Container does not exist: "+b);this._container=f,this._container.appendChild(g.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(g.svg,this._opts.svgStyle),this.svg=g.svg,this.path=g.path,this.trail=g.trail,this.text=null;var h=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(g.path,h),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};f.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.animate(a,b,c)},f.prototype.stop=function(){if(null===this._progressPath)throw new Error("Object is destroyed");void 0!==this._progressPath&&this._progressPath.stop()},f.prototype.destroy=function(){if(null===this._progressPath)throw new Error("Object is destroyed");this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},f.prototype.set=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.set(a)},f.prototype.value=function(){if(null===this._progressPath)throw new Error("Object is destroyed");return void 0===this._progressPath?0:this._progressPath.value()},f.prototype.setText=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},f.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},f.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},f.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},f.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},f.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},f.prototype._initializeTextContainer=function(a,b,c){},f.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=f},{"./path":5,"./utils":9}],8:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=100-a.strokeWidth/2;return e.render(this._pathTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2})},f.prototype._trailString=function(a){var b=100-a.strokeWidth/2;return e.render(this._trailTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2,startMargin:a.strokeWidth/2-a.trailWidth/2})},b.exports=f},{"./shape":7,"./utils":9}],9:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;eb&&b<=460)&&!(a<600&&b<850)},enumerable:!1,configurable:!0}),b.prototype.showBanner=function(){if(!this.bannerAllowed)return null;var a=document.getElementById("h5branding-ad");return a?(a.style.display="inline-flex",a):null},b.prototype.setScriptloadProgress=function(a,b){var c=.3*b/a;this.circleLoader.animate(c,null,function(){})},b.prototype.setLoadProgress=function(a){var b=this;if(this.loaded)if(a=30+.7*a,this.progress=a,100===a){var c=document.querySelector("#h5branding-button");this.circleLoader.animate(1,null,function(){!p.inGDGameZone()&&c&&!0===b.showPlayButton?c.style.display="block":(p.inGDGameZone()||!1===b.showPlayButton)&&b.onPlayButtonClick()})}else this.circleLoader.animate(a/100,null,function(){})},b.prototype.setButtonCallback=function(a){this.buttonCallback=a},b.prototype.onPlayButtonClick=function(){this.buttonCallback&&this.buttonCallback()},b.prototype.destroy=function(){var a=document.querySelector("#h5branding-container");null!==a&&null!==a.parentNode&&a.parentNode.removeChild(a)},b.prototype.getGameLogoUrl=function(a){var b=a+"-512x512.jpeg";return window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/"+b:"https://img.gamedistribution.com/"+b},b}(),x=t.EGAProgressionStatus,y=new q,z=new u;a.EGAProgressionStatus=x,a.google=y,a.gameanalytics=z,a.Utils=p,a.Domain=l,a.Branding=o,a.SplashLoader=w,Object.defineProperty(a,"__esModule",{value:!0})}),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Menu/TempleHall",["require","Phaser","../Common/Button","../Common/GoldButton","../Common/Navies","h5branding"],function(c){var d,e,f,g;return f=c("Phaser"),c("../Common/Button"),d=c("../Common/GoldButton"),e=c("../Common/Navies"),g=c("h5branding"),function(c){function h(b,c,i){this.layoutContent=a(this.layoutContent,this),this.update=a(this.update,this),this.createChar=a(this.createChar,this),this.domainAllowsExtenral=a(this.domainAllowsExtenral,this);var j,k,l,m,n,o,p,q,r,s,t,u,v;for(h.__super__.constructor.call(this,b,c,i),this.w=this.game.realWidth,this.h=this.game.realHeight,this.bkg=m=this.game.make.sprite(0,0,"TempleHall"),m.anchor.set(.5),this._scale=v=Math.max(this.w/m.width,this.h/m.height),m.scale.set(v),m.height/2>this.h/2&&(m.y=this.h/2-m.height/2),this.addChild(m),this.beams=l=[],k=7,r=s=0,u=k;0<=u?s<=u:s>=u;r=0<=u?++s:--s)j=this.game.make.sprite(0,0,"HallBeam"),j.anchor.set(.5,-.5),j.alpha=.6+.4*Math.random(),j.t_offset=2*(r-k/2)*Math.PI/k-Math.random()*Math.PI/6,j.t_speed=.6*Math.random(),j.blendMode=f.blendModes.SCREEN,j.cacheAsBitmap=!0,this.addChild(j),l.push(j);this.char1=o=this.createChar("fire"),this.addChild(o),o.scale.set(v),o.x=-this.w/4,o.y=this.h/2-2*o.height,this.char2=p=this.createChar("water"),p.scale.set(v),p.x=this.w/4,p.y=this.h/2-2*p.height,this.addChild(p),this.gameName=q=this.game.make.sprite(0,0,"GameName"),q.anchor.set(.5,.5),t=Math.min(1,.9*this.game.realWidth/q.width),q.scale.set(t),this.addChild(q),this.onStart=new f.Signal,this.playBtn=n=new d(this.game,0,0,this.game.lang.locale("Play"),function(a){return function(){return a.onStart.dispatch(b.progress.get("temples")[0])}}(this),40),this.addChild(n),this.domainAllowsExtenral()&&(this.moreBtn=n=new d(this.game,0,0,this.game.lang.locale("More Games"),function(a){return function(){return g.Branding.openCampaignLink("Light Temple","more_games")}}(),30),this.addChild(n),this.walkthrouhgBtn=n=new d(this.game,0,0,this.game.lang.locale("Walkthrough"),function(a){return function(){return window.open("https://www.agame.com/game/fireboy-watergirl-2-the-light-temple","_blank")}}(),30),this.addChild(n)),this.navies=new e(this.game,0,0),this.addChild(this.navies),this.layoutContent()}return b(h,c),h.prototype.domainAllowsExtenral=function(){var a;return!!g.Branding.outGoingLinksAllowed()&&(a=["playcell.com"],a.reduce(function(a){return function(a,b){return null!=document.referrer&&(a=a&&document.referrer.indexOf(b)<0),null!=window.location&&null!=window.location.hostname&&(a=a&&window.location.hostname.indexOf(b)<0),a}}(),!0))},h.prototype.createChar=function(a){var b,c,d,e;return b=this.game.make.sprite(0,0,"CharAssets","_default0000"),e=this.game.make.sprite(0,0,"CharAssets",a+"_legs_idle0000"),e.anchor.set(.5),d=this.game.make.sprite(0,0,"CharAssets"),d.animations.add("idle",f.Animation.generateFrameNames(a+"_head_idle",0,29,"",4),30,!0),d.animations.play("idle"),d.anchor.set(.5),c=this.game.make.sprite(0,0,"CharAssets",a+"_glow0000"),c.anchor.set(.5),c.y=40,b.addChild(c),b.addChild(e),b.addChild(d),b},h.prototype.update=function(){var a,b,c,d;for(this.t||(this.t=0),this.t+=.003,d=this.beams,b=0,c=d.length;bthis.h/2?this.bkg.y=this.h/2-this.bkg.height/2:this.bkg.y=0,this.char1.scale.set(g),this.char1.x=-this.w/4,this.char1.y=this.h/2-2*this.char1.height,this.char2.scale.set(g),this.char2.x=this.w/4,this.char2.y=this.h/2-2*this.char2.height,f=this.beams,b=0,c=f.length;b0&&(b+="&");var d=Array.isArray(a[c])?a[c].join(","):a[c];b+=c+"="+d}return"&cust_params="+encodeURIComponent(b)}return""},b.prototype.areAdsEnabled=function(){var a=this,b=document.createElement("div");b.innerHTML=" ",b.className="adsbox",b.style.position="absolute",b.style.fontSize="10px",document.body.appendChild(b);var c=function(){var a=!0;return 0===b.offsetHeight&&(a=!1),b.parentNode&&b.parentNode.removeChild(b),a};window.setTimeout(function(){a.adsEnabled=c()},100)},b}();!function(a){a.CONTENT_PAUSED="onContentPaused",a.CONTENT_RESUMED="onContentResumed",a.AD_PROGRESSION="onAdProgression",a.AD_DISABLED="onAdsDisabled",a.AD_CLICKED="onAdClicked",a.AD_REWARDED="onAdRewardGranted",a.BANNER_SHOWN="onBannerShown",a.BANNER_HIDDEN="onBannerHidden",a.AD_LOADED="onAdLoaded",a.AD_PROVIDER_LOADED="onAdProviderLoaded"}(a.AdEvents||(a.AdEvents={})),function(a){a[a.interstitial=0]="interstitial",a[a.rewarded=1]="rewarded",a[a.banner=2]="banner"}(a.AdType||(a.AdType={}));var p=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;return b.bannerActive=!1,b.provider=null,b}return b(c,a),c.prototype.setAdProvider=function(a){this.provider=a,this.provider.setManager(this)},c.prototype.showAd=function(a){for(var b=[],c=1;c=0;--c){var d=b[c].src,e=d.lastIndexOf("?"),f=-1==e?d.length:e;if("base.js"==d.substr(f-7,7))return void(goog.basePath=d.substr(0,f-7))}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.global.document;if("complete"==b.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load')}return b.write(' + + + + + + + +
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl3/assets/atlasses/CharAssets.json b/fireboywatergirl3/assets/atlasses/CharAssets.json new file mode 100644 index 00000000..380af0be --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/CharAssets.json @@ -0,0 +1,1923 @@ +{"frames": [ + +{ + "filename": "_default0000", + "frame": {"x":2008,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "death_smoke0000", + "frame": {"x":116,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0001", + "frame": {"x":222,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0002", + "frame": {"x":1203,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0003", + "frame": {"x":1309,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0004", + "frame": {"x":1415,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0005", + "frame": {"x":1521,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0006", + "frame": {"x":1627,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0007", + "frame": {"x":1733,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0008", + "frame": {"x":1839,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0009", + "frame": {"x":518,"y":1430,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0010", + "frame": {"x":116,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0011", + "frame": {"x":222,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0012", + "frame": {"x":0,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0013", + "frame": {"x":969,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0014", + "frame": {"x":1075,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0015", + "frame": {"x":624,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0016", + "frame": {"x":730,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0017", + "frame": {"x":836,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0018", + "frame": {"x":328,"y":1462,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0019", + "frame": {"x":1181,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0020", + "frame": {"x":1287,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0021", + "frame": {"x":1393,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0022", + "frame": {"x":1499,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0023", + "frame": {"x":1605,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0024", + "frame": {"x":1711,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0025", + "frame": {"x":1817,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0026", + "frame": {"x":1923,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0027", + "frame": {"x":434,"y":1541,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0028", + "frame": {"x":106,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0029", + "frame": {"x":212,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0030", + "frame": {"x":0,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0031", + "frame": {"x":942,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0032", + "frame": {"x":1048,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0033", + "frame": {"x":540,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0034", + "frame": {"x":646,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0035", + "frame": {"x":752,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0036", + "frame": {"x":318,"y":1573,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0037", + "frame": {"x":1154,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0038", + "frame": {"x":1260,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0039", + "frame": {"x":1366,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0040", + "frame": {"x":1472,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0041", + "frame": {"x":1578,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0042", + "frame": {"x":1684,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0043", + "frame": {"x":1790,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0044", + "frame": {"x":1896,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "diamond_fb0000", + "frame": {"x":1086,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "diamond_fbwg0000", + "frame": {"x":0,"y":1341,"w":112,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":112,"h":112}, + "sourceSize": {"w":112,"h":112} +} +,{ + "filename": "diamond_silver0000", + "frame": {"x":848,"y":1339,"w":117,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":117,"h":117}, + "sourceSize": {"w":117,"h":117} +} +,{ + "filename": "diamond_wg0000", + "frame": {"x":969,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "fire_glow0000", + "frame": {"x":1944,"y":1266,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "fire_head_falling0000", + "frame": {"x":1340,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0001", + "frame": {"x":1474,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0002", + "frame": {"x":1608,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0003", + "frame": {"x":1742,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0004", + "frame": {"x":1876,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0000", + "frame": {"x":0,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0001", + "frame": {"x":134,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0002", + "frame": {"x":268,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0003", + "frame": {"x":402,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0004", + "frame": {"x":536,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0005", + "frame": {"x":670,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0006", + "frame": {"x":804,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0007", + "frame": {"x":938,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0008", + "frame": {"x":1072,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0009", + "frame": {"x":1206,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0010", + "frame": {"x":1340,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0011", + "frame": {"x":1474,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0012", + "frame": {"x":1608,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0013", + "frame": {"x":1742,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0014", + "frame": {"x":1876,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0015", + "frame": {"x":0,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0016", + "frame": {"x":134,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0017", + "frame": {"x":268,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0018", + "frame": {"x":402,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_jumping0000", + "frame": {"x":536,"y":1028,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0001", + "frame": {"x":696,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0002", + "frame": {"x":856,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0003", + "frame": {"x":1016,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0004", + "frame": {"x":1176,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0005", + "frame": {"x":1336,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0006", + "frame": {"x":1496,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0007", + "frame": {"x":1656,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0008", + "frame": {"x":1816,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0009", + "frame": {"x":536,"y":1162,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0010", + "frame": {"x":696,"y":1192,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_rising0000", + "frame": {"x":408,"y":1194,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0001", + "frame": {"x":518,"y":1296,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0002", + "frame": {"x":628,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0003", + "frame": {"x":738,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0004", + "frame": {"x":408,"y":1328,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_ice_legs0000", + "frame": {"x":664,"y":1896,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0001", + "frame": {"x":148,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0002", + "frame": {"x":224,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_legs_idle0000", + "frame": {"x":134,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0000", + "frame": {"x":1024,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0001", + "frame": {"x":1158,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0002", + "frame": {"x":1292,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0003", + "frame": {"x":1426,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0004", + "frame": {"x":1560,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0005", + "frame": {"x":1694,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0006", + "frame": {"x":1828,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0007", + "frame": {"x":0,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_stairs0000", + "frame": {"x":1962,"y":292,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0001", + "frame": {"x":328,"y":1341,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0002", + "frame": {"x":858,"y":1571,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0003", + "frame": {"x":424,"y":1652,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0004", + "frame": {"x":106,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0005", + "frame": {"x":181,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0006", + "frame": {"x":858,"y":1678,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0007", + "frame": {"x":0,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0008", + "frame": {"x":933,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0009", + "frame": {"x":1008,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0010", + "frame": {"x":499,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0011", + "frame": {"x":574,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0012", + "frame": {"x":649,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0013", + "frame": {"x":724,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0014", + "frame": {"x":256,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0015", + "frame": {"x":331,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0016", + "frame": {"x":1083,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0017", + "frame": {"x":1158,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0018", + "frame": {"x":1233,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0019", + "frame": {"x":1308,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0020", + "frame": {"x":1383,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0021", + "frame": {"x":1458,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0022", + "frame": {"x":1533,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0023", + "frame": {"x":1608,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0024", + "frame": {"x":1683,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0025", + "frame": {"x":1758,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0026", + "frame": {"x":1833,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0027", + "frame": {"x":1908,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0028", + "frame": {"x":406,"y":1759,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0029", + "frame": {"x":75,"y":1781,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "water_glow0000", + "frame": {"x":1945,"y":1374,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "water_head_falling0000", + "frame": {"x":0,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0001", + "frame": {"x":134,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0002", + "frame": {"x":268,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0003", + "frame": {"x":402,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0004", + "frame": {"x":536,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0005", + "frame": {"x":670,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0006", + "frame": {"x":804,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0007", + "frame": {"x":938,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0008", + "frame": {"x":1072,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0009", + "frame": {"x":1206,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0010", + "frame": {"x":1340,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_idle0000", + "frame": {"x":1340,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0001", + "frame": {"x":1474,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0002", + "frame": {"x":1608,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0003", + "frame": {"x":1742,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0004", + "frame": {"x":1876,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0005", + "frame": {"x":0,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0006", + "frame": {"x":134,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0007", + "frame": {"x":268,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0008", + "frame": {"x":402,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0009", + "frame": {"x":536,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0010", + "frame": {"x":670,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0011", + "frame": {"x":804,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0012", + "frame": {"x":938,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0013", + "frame": {"x":1072,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0014", + "frame": {"x":1206,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0015", + "frame": {"x":1340,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0016", + "frame": {"x":1474,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0017", + "frame": {"x":1608,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0018", + "frame": {"x":1742,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0019", + "frame": {"x":1876,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0020", + "frame": {"x":0,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0021", + "frame": {"x":134,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0022", + "frame": {"x":268,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0023", + "frame": {"x":402,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0024", + "frame": {"x":536,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0025", + "frame": {"x":670,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0026", + "frame": {"x":804,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0027", + "frame": {"x":938,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0028", + "frame": {"x":1072,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0029", + "frame": {"x":1206,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_jumping0000", + "frame": {"x":1474,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0001", + "frame": {"x":1652,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0002", + "frame": {"x":1830,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0003", + "frame": {"x":1474,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0004", + "frame": {"x":1652,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0005", + "frame": {"x":1830,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0006", + "frame": {"x":0,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0007", + "frame": {"x":178,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0008", + "frame": {"x":356,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0009", + "frame": {"x":534,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0010", + "frame": {"x":712,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_rising0000", + "frame": {"x":856,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0001", + "frame": {"x":992,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0002", + "frame": {"x":1128,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0003", + "frame": {"x":0,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0004", + "frame": {"x":136,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0005", + "frame": {"x":272,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0006", + "frame": {"x":1264,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0007", + "frame": {"x":1400,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0008", + "frame": {"x":1536,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0009", + "frame": {"x":1672,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0010", + "frame": {"x":1808,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_ice_legs0000", + "frame": {"x":1976,"y":1132,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0001", + "frame": {"x":150,"y":1781,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0002", + "frame": {"x":799,"y":1785,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_legs_idle0000", + "frame": {"x":890,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0000", + "frame": {"x":268,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0001", + "frame": {"x":402,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0002", + "frame": {"x":536,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0003", + "frame": {"x":670,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0004", + "frame": {"x":804,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0005", + "frame": {"x":938,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0006", + "frame": {"x":1072,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0007", + "frame": {"x":1206,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_stairs0000", + "frame": {"x":0,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0001", + "frame": {"x":869,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0002", + "frame": {"x":943,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0003", + "frame": {"x":481,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0004", + "frame": {"x":555,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0005", + "frame": {"x":629,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0006", + "frame": {"x":703,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0007", + "frame": {"x":220,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0008", + "frame": {"x":294,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0009", + "frame": {"x":1017,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0010", + "frame": {"x":1091,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0011", + "frame": {"x":1165,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0012", + "frame": {"x":1239,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0013", + "frame": {"x":1313,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0014", + "frame": {"x":1387,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0015", + "frame": {"x":1461,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0016", + "frame": {"x":1535,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0017", + "frame": {"x":1609,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0018", + "frame": {"x":1683,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0019", + "frame": {"x":1757,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0020", + "frame": {"x":1831,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0021", + "frame": {"x":1905,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0022", + "frame": {"x":368,"y":1866,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0023", + "frame": {"x":74,"y":1888,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0024", + "frame": {"x":0,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0025", + "frame": {"x":869,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0026", + "frame": {"x":943,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0027", + "frame": {"x":442,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0028", + "frame": {"x":516,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0029", + "frame": {"x":590,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "CharAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/CharAssets.png b/fireboywatergirl3/assets/atlasses/CharAssets.png new file mode 100644 index 00000000..a9ffd160 Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/CharAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/GroundAssets.json b/fireboywatergirl3/assets/atlasses/GroundAssets.json new file mode 100644 index 00000000..3ed6f9b2 --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/GroundAssets.json @@ -0,0 +1,2755 @@ +{"frames": [ + +{ + "filename": "BeamDust0000", + "frame": {"x":0,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0001", + "frame": {"x":58,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0002", + "frame": {"x":116,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0003", + "frame": {"x":174,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0004", + "frame": {"x":232,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0005", + "frame": {"x":290,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0006", + "frame": {"x":348,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0007", + "frame": {"x":406,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0008", + "frame": {"x":464,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0009", + "frame": {"x":522,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0010", + "frame": {"x":580,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0011", + "frame": {"x":638,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0012", + "frame": {"x":696,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0013", + "frame": {"x":754,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0014", + "frame": {"x":812,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0015", + "frame": {"x":870,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0016", + "frame": {"x":928,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0017", + "frame": {"x":0,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0018", + "frame": {"x":58,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0019", + "frame": {"x":116,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0020", + "frame": {"x":174,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0021", + "frame": {"x":232,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0022", + "frame": {"x":290,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0023", + "frame": {"x":348,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0024", + "frame": {"x":406,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0025", + "frame": {"x":464,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0026", + "frame": {"x":522,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0027", + "frame": {"x":580,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0028", + "frame": {"x":638,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0029", + "frame": {"x":696,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0030", + "frame": {"x":754,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0031", + "frame": {"x":812,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0032", + "frame": {"x":870,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0033", + "frame": {"x":928,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0034", + "frame": {"x":0,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0035", + "frame": {"x":58,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0036", + "frame": {"x":116,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0037", + "frame": {"x":174,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0038", + "frame": {"x":232,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0039", + "frame": {"x":290,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0040", + "frame": {"x":348,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0041", + "frame": {"x":406,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0042", + "frame": {"x":464,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0043", + "frame": {"x":522,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0044", + "frame": {"x":580,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0045", + "frame": {"x":638,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0046", + "frame": {"x":696,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0047", + "frame": {"x":754,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0048", + "frame": {"x":812,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0049", + "frame": {"x":870,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0050", + "frame": {"x":928,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0051", + "frame": {"x":0,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0052", + "frame": {"x":58,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0053", + "frame": {"x":116,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0054", + "frame": {"x":174,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0055", + "frame": {"x":232,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0056", + "frame": {"x":290,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0057", + "frame": {"x":348,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0058", + "frame": {"x":406,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0059", + "frame": {"x":464,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamGradient0000", + "frame": {"x":522,"y":171,"w":10,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":10,"h":20}, + "sourceSize": {"w":10,"h":20} +} +,{ + "filename": "BlackBox0000", + "frame": {"x":536,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0001", + "frame": {"x":590,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0002", + "frame": {"x":644,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0003", + "frame": {"x":698,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0004", + "frame": {"x":752,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0005", + "frame": {"x":806,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0006", + "frame": {"x":860,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0007", + "frame": {"x":914,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0008", + "frame": {"x":968,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0009", + "frame": {"x":0,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0010", + "frame": {"x":54,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0011", + "frame": {"x":108,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0012", + "frame": {"x":162,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0013", + "frame": {"x":216,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0014", + "frame": {"x":270,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBoxLeft0000", + "frame": {"x":324,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0001", + "frame": {"x":378,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0002", + "frame": {"x":432,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0003", + "frame": {"x":486,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0004", + "frame": {"x":540,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0005", + "frame": {"x":594,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0006", + "frame": {"x":648,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0007", + "frame": {"x":702,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0008", + "frame": {"x":756,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0009", + "frame": {"x":810,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0010", + "frame": {"x":864,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0011", + "frame": {"x":918,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0012", + "frame": {"x":972,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0013", + "frame": {"x":0,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0014", + "frame": {"x":54,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxRight0000", + "frame": {"x":108,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0001", + "frame": {"x":162,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0002", + "frame": {"x":216,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0003", + "frame": {"x":270,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0004", + "frame": {"x":324,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0005", + "frame": {"x":378,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0006", + "frame": {"x":432,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0007", + "frame": {"x":486,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0008", + "frame": {"x":540,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0009", + "frame": {"x":594,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0010", + "frame": {"x":648,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0011", + "frame": {"x":702,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0012", + "frame": {"x":756,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0013", + "frame": {"x":810,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0014", + "frame": {"x":864,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "DarkDisk0000", + "frame": {"x":0,"y":329,"w":301,"h":300}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":301,"h":300}, + "sourceSize": {"w":301,"h":300} +} +,{ + "filename": "Dust0000", + "frame": {"x":305,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0001", + "frame": {"x":422,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0002", + "frame": {"x":539,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0003", + "frame": {"x":656,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0004", + "frame": {"x":773,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0005", + "frame": {"x":890,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0006", + "frame": {"x":0,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0007", + "frame": {"x":117,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0008", + "frame": {"x":234,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0009", + "frame": {"x":351,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0010", + "frame": {"x":468,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0011", + "frame": {"x":585,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0012", + "frame": {"x":702,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0013", + "frame": {"x":819,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0014", + "frame": {"x":0,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0015", + "frame": {"x":117,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0016", + "frame": {"x":234,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0017", + "frame": {"x":351,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0018", + "frame": {"x":468,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0019", + "frame": {"x":585,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0020", + "frame": {"x":702,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0021", + "frame": {"x":819,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0022", + "frame": {"x":0,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0023", + "frame": {"x":117,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0024", + "frame": {"x":234,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0025", + "frame": {"x":351,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0026", + "frame": {"x":468,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0027", + "frame": {"x":585,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0028", + "frame": {"x":702,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0029", + "frame": {"x":819,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0030", + "frame": {"x":0,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0031", + "frame": {"x":117,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0032", + "frame": {"x":234,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0033", + "frame": {"x":351,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0034", + "frame": {"x":468,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0035", + "frame": {"x":585,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0036", + "frame": {"x":702,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0037", + "frame": {"x":819,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0038", + "frame": {"x":0,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0039", + "frame": {"x":117,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0040", + "frame": {"x":234,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0041", + "frame": {"x":351,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0042", + "frame": {"x":468,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0043", + "frame": {"x":585,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0044", + "frame": {"x":702,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0045", + "frame": {"x":819,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0046", + "frame": {"x":0,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0047", + "frame": {"x":117,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0048", + "frame": {"x":234,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0049", + "frame": {"x":351,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0050", + "frame": {"x":468,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0051", + "frame": {"x":585,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0052", + "frame": {"x":702,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0053", + "frame": {"x":819,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0054", + "frame": {"x":0,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0055", + "frame": {"x":117,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0056", + "frame": {"x":234,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0057", + "frame": {"x":351,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0058", + "frame": {"x":468,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0059", + "frame": {"x":585,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "FireBox0000", + "frame": {"x":702,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0001", + "frame": {"x":756,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0002", + "frame": {"x":810,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0003", + "frame": {"x":864,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0004", + "frame": {"x":918,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0005", + "frame": {"x":972,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0006", + "frame": {"x":0,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0007", + "frame": {"x":54,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0008", + "frame": {"x":108,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0009", + "frame": {"x":162,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0010", + "frame": {"x":216,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0011", + "frame": {"x":270,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0012", + "frame": {"x":324,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0013", + "frame": {"x":378,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0014", + "frame": {"x":432,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBoxLeft0000", + "frame": {"x":486,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0001", + "frame": {"x":540,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0002", + "frame": {"x":594,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0003", + "frame": {"x":648,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0004", + "frame": {"x":702,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0005", + "frame": {"x":756,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0006", + "frame": {"x":810,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0007", + "frame": {"x":864,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0008", + "frame": {"x":918,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0009", + "frame": {"x":972,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0010", + "frame": {"x":0,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0011", + "frame": {"x":54,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0012", + "frame": {"x":108,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0013", + "frame": {"x":162,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0014", + "frame": {"x":216,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxRight0000", + "frame": {"x":270,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0001", + "frame": {"x":324,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0002", + "frame": {"x":378,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0003", + "frame": {"x":432,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0004", + "frame": {"x":486,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0005", + "frame": {"x":540,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0006", + "frame": {"x":594,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0007", + "frame": {"x":648,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0008", + "frame": {"x":702,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0009", + "frame": {"x":756,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0010", + "frame": {"x":810,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0011", + "frame": {"x":864,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0012", + "frame": {"x":918,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0013", + "frame": {"x":972,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0014", + "frame": {"x":0,"y":1456,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FreezeEffect0000", + "frame": {"x":54,"y":1456,"w":98,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":98,"h":100}, + "sourceSize": {"w":98,"h":100} +} +,{ + "filename": "GreenBox0000", + "frame": {"x":156,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0001", + "frame": {"x":210,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0002", + "frame": {"x":264,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0003", + "frame": {"x":318,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0004", + "frame": {"x":372,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0005", + "frame": {"x":426,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0006", + "frame": {"x":480,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0007", + "frame": {"x":534,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0008", + "frame": {"x":588,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0009", + "frame": {"x":642,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0010", + "frame": {"x":696,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0011", + "frame": {"x":750,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0012", + "frame": {"x":804,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0013", + "frame": {"x":858,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0014", + "frame": {"x":912,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBoxLeft0000", + "frame": {"x":966,"y":1456,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0001", + "frame": {"x":0,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0002", + "frame": {"x":54,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0003", + "frame": {"x":108,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0004", + "frame": {"x":162,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0005", + "frame": {"x":216,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0006", + "frame": {"x":270,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0007", + "frame": {"x":324,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0008", + "frame": {"x":378,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0009", + "frame": {"x":432,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0010", + "frame": {"x":486,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0011", + "frame": {"x":540,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0012", + "frame": {"x":594,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0013", + "frame": {"x":648,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0014", + "frame": {"x":702,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxRight0000", + "frame": {"x":756,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0001", + "frame": {"x":810,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0002", + "frame": {"x":864,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0003", + "frame": {"x":918,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0004", + "frame": {"x":972,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0005", + "frame": {"x":0,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0006", + "frame": {"x":54,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0007", + "frame": {"x":108,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0008", + "frame": {"x":162,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0009", + "frame": {"x":216,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0010", + "frame": {"x":270,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0011", + "frame": {"x":324,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0012", + "frame": {"x":378,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0013", + "frame": {"x":432,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0014", + "frame": {"x":486,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "IceBox0000", + "frame": {"x":540,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxLeft0000", + "frame": {"x":590,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxRight0000", + "frame": {"x":640,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "MaskBox00000", + "frame": {"x":690,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00001", + "frame": {"x":728,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00002", + "frame": {"x":766,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00003", + "frame": {"x":804,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox10000", + "frame": {"x":842,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox20000", + "frame": {"x":880,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox30000", + "frame": {"x":918,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox40000", + "frame": {"x":956,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox50000", + "frame": {"x":0,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox60000", + "frame": {"x":39,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox70000", + "frame": {"x":78,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox80000", + "frame": {"x":117,"y":1657,"w":36,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":34}, + "sourceSize": {"w":36,"h":34} +} +,{ + "filename": "MaskBox90000", + "frame": {"x":157,"y":1657,"w":35,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":34}, + "sourceSize": {"w":35,"h":34} +} +,{ + "filename": "SnowFlat0000", + "frame": {"x":196,"y":1657,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "SnowSlope0000", + "frame": {"x":260,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "SnowSlope0001", + "frame": {"x":314,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "WaterBox0000", + "frame": {"x":368,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0001", + "frame": {"x":418,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0002", + "frame": {"x":468,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0003", + "frame": {"x":518,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0004", + "frame": {"x":568,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0005", + "frame": {"x":618,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0006", + "frame": {"x":668,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0007", + "frame": {"x":718,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0008", + "frame": {"x":768,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0009", + "frame": {"x":818,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0010", + "frame": {"x":868,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0011", + "frame": {"x":918,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0012", + "frame": {"x":968,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0013", + "frame": {"x":0,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0014", + "frame": {"x":50,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0000", + "frame": {"x":100,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0001", + "frame": {"x":150,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0002", + "frame": {"x":200,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0003", + "frame": {"x":250,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0004", + "frame": {"x":300,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0005", + "frame": {"x":350,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0006", + "frame": {"x":400,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0007", + "frame": {"x":450,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0008", + "frame": {"x":500,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0009", + "frame": {"x":550,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0010", + "frame": {"x":600,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0011", + "frame": {"x":650,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0012", + "frame": {"x":700,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0013", + "frame": {"x":750,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0014", + "frame": {"x":800,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0000", + "frame": {"x":850,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0001", + "frame": {"x":900,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0002", + "frame": {"x":950,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0003", + "frame": {"x":0,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0004", + "frame": {"x":50,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0005", + "frame": {"x":100,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0006", + "frame": {"x":150,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0007", + "frame": {"x":200,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0008", + "frame": {"x":250,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0009", + "frame": {"x":300,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0010", + "frame": {"x":350,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0011", + "frame": {"x":400,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0012", + "frame": {"x":450,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0013", + "frame": {"x":500,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0014", + "frame": {"x":550,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "_default0000", + "frame": {"x":600,"y":1772,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "frost0000", + "frame": {"x":638,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0001", + "frame": {"x":688,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0002", + "frame": {"x":738,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0003", + "frame": {"x":788,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0004", + "frame": {"x":838,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0005", + "frame": {"x":888,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0006", + "frame": {"x":938,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0007", + "frame": {"x":0,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0008", + "frame": {"x":50,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0009", + "frame": {"x":100,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "vapor0000", + "frame": {"x":150,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0001", + "frame": {"x":235,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0002", + "frame": {"x":320,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0003", + "frame": {"x":405,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0004", + "frame": {"x":490,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0005", + "frame": {"x":575,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0006", + "frame": {"x":660,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0007", + "frame": {"x":745,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0008", + "frame": {"x":830,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0009", + "frame": {"x":915,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "GroundAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/GroundAssets.png b/fireboywatergirl3/assets/atlasses/GroundAssets.png new file mode 100644 index 00000000..cfe894e9 Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/GroundAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/MechAssets.json b/fireboywatergirl3/assets/atlasses/MechAssets.json new file mode 100644 index 00000000..b29d99ce --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/MechAssets.json @@ -0,0 +1,1315 @@ +{"frames": [ + +{ + "filename": "BackgroundCover0000", + "frame": {"x":0,"y":0,"w":32,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":32}, + "sourceSize": {"w":32,"h":32} +} +,{ + "filename": "BarCapLeft0000", + "frame": {"x":1696,"y":0,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "BarCapRight0000", + "frame": {"x":1746,"y":0,"w":48,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":46}, + "sourceSize": {"w":48,"h":46} +} +,{ + "filename": "BarCenter0000", + "frame": {"x":1798,"y":0,"w":108,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":48}, + "sourceSize": {"w":108,"h":48} +} +,{ + "filename": "BoxMirror0000", + "frame": {"x":764,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "SliderDot0000", + "frame": {"x":1433,"y":1058,"w":33,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":33}, + "sourceSize": {"w":33,"h":33} +} +,{ + "filename": "SliderTrack0000", + "frame": {"x":1470,"y":1058,"w":218,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":19}, + "sourceSize": {"w":218,"h":19} +} +,{ + "filename": "WindowCenter0000", + "frame": {"x":264,"y":1802,"w":108,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":46}, + "sourceSize": {"w":108,"h":46} +} +,{ + "filename": "WindowLeft0000", + "frame": {"x":376,"y":1802,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "WindowRight0000", + "frame": {"x":426,"y":1802,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "_default0000", + "frame": {"x":836,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "ball0000", + "frame": {"x":36,"y":0,"w":40,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":40}, + "sourceSize": {"w":40,"h":40} +} +,{ + "filename": "beamer0000", + "frame": {"x":422,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_off0000", + "frame": {"x":536,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_on0000", + "frame": {"x":650,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "hanging_anchor0000", + "frame": {"x":389,"y":860,"w":38,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":38,"h":35}, + "sourceSize": {"w":38,"h":35} +} +,{ + "filename": "hanging_base0000", + "frame": {"x":431,"y":860,"w":32,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":28}, + "sourceSize": {"w":32,"h":28} +} +,{ + "filename": "hanging_platform0000", + "frame": {"x":467,"y":860,"w":142,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":22}, + "sourceSize": {"w":142,"h":22} +} +,{ + "filename": "infinitemirror0000", + "frame": {"x":125,"y":1058,"w":130,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":130}, + "sourceSize": {"w":130,"h":130} +} +,{ + "filename": "infinitemirror_light_off0000", + "frame": {"x":259,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "lever_base0000", + "frame": {"x":874,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lever_base_light_off0000", + "frame": {"x":988,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_base_light_on0000", + "frame": {"x":1100,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick0000", + "frame": {"x":1212,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_off0000", + "frame": {"x":1324,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_on0000", + "frame": {"x":1436,"y":0,"w":106,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":164}, + "sourceSize": {"w":106,"h":164} +} +,{ + "filename": "lightpusher_base0000", + "frame": {"x":80,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_off0000", + "frame": {"x":194,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_on0000", + "frame": {"x":308,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "moving_platform_light_off0000", + "frame": {"x":1910,"y":0,"w":138,"h":26}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":26}, + "sourceSize": {"w":138,"h":26} +} +,{ + "filename": "moving_platform_light_on0000", + "frame": {"x":0,"y":168,"w":142,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":34}, + "sourceSize": {"w":142,"h":34} +} +,{ + "filename": "movingbox0000", + "frame": {"x":1546,"y":0,"w":74,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":74,"h":76}, + "sourceSize": {"w":74,"h":76} +} +,{ + "filename": "movingbox20000", + "frame": {"x":1624,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "portal0000", + "frame": {"x":146,"y":168,"w":82,"h":166}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":166}, + "sourceSize": {"w":82,"h":166} +} +,{ + "filename": "portal_center0000", + "frame": {"x":232,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0001", + "frame": {"x":318,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0002", + "frame": {"x":404,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0003", + "frame": {"x":490,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0004", + "frame": {"x":576,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0005", + "frame": {"x":662,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0006", + "frame": {"x":748,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0007", + "frame": {"x":834,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0008", + "frame": {"x":920,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0009", + "frame": {"x":1006,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0010", + "frame": {"x":1092,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0011", + "frame": {"x":1178,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0012", + "frame": {"x":1264,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0013", + "frame": {"x":1350,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0014", + "frame": {"x":1436,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0015", + "frame": {"x":1522,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0016", + "frame": {"x":1608,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0017", + "frame": {"x":1694,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0018", + "frame": {"x":1780,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0019", + "frame": {"x":1866,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0020", + "frame": {"x":1952,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0021", + "frame": {"x":0,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0022", + "frame": {"x":86,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0023", + "frame": {"x":172,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0024", + "frame": {"x":258,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0025", + "frame": {"x":344,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0026", + "frame": {"x":430,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0027", + "frame": {"x":516,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0028", + "frame": {"x":602,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0029", + "frame": {"x":688,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0030", + "frame": {"x":774,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0031", + "frame": {"x":860,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0032", + "frame": {"x":946,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0033", + "frame": {"x":1032,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0034", + "frame": {"x":1118,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0035", + "frame": {"x":1204,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0036", + "frame": {"x":1290,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0037", + "frame": {"x":1376,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0038", + "frame": {"x":1462,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0039", + "frame": {"x":1548,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_glow0000", + "frame": {"x":1634,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0001", + "frame": {"x":1790,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0002", + "frame": {"x":0,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0003", + "frame": {"x":156,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0004", + "frame": {"x":312,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0005", + "frame": {"x":468,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0006", + "frame": {"x":624,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0007", + "frame": {"x":780,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0008", + "frame": {"x":936,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0009", + "frame": {"x":1092,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0010", + "frame": {"x":1248,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0011", + "frame": {"x":1404,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0012", + "frame": {"x":1560,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0013", + "frame": {"x":1716,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0014", + "frame": {"x":1872,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0015", + "frame": {"x":0,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0016", + "frame": {"x":156,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0017", + "frame": {"x":312,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0018", + "frame": {"x":468,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0019", + "frame": {"x":624,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0020", + "frame": {"x":780,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0021", + "frame": {"x":936,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0022", + "frame": {"x":1092,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0023", + "frame": {"x":1248,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0024", + "frame": {"x":1404,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0025", + "frame": {"x":1560,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0026", + "frame": {"x":1716,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0027", + "frame": {"x":1872,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0028", + "frame": {"x":0,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0029", + "frame": {"x":156,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_light_off0000", + "frame": {"x":312,"y":860,"w":29,"h":187}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":187}, + "sourceSize": {"w":29,"h":187} +} +,{ + "filename": "portal_light_on0000", + "frame": {"x":345,"y":860,"w":40,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":194}, + "sourceSize": {"w":40,"h":194} +} +,{ + "filename": "pulley_anchor0000", + "frame": {"x":613,"y":860,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "pulley_base0000", + "frame": {"x":667,"y":860,"w":104,"h":158}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":158}, + "sourceSize": {"w":104,"h":158} +} +,{ + "filename": "pulley_platform0000", + "frame": {"x":775,"y":860,"w":102,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":22}, + "sourceSize": {"w":102,"h":22} +} +,{ + "filename": "pulley_rope0000", + "frame": {"x":881,"y":860,"w":82,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":19}, + "sourceSize": {"w":82,"h":19} +} +,{ + "filename": "pusher_block0000", + "frame": {"x":967,"y":860,"w":110,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":86}, + "sourceSize": {"w":110,"h":86} +} +,{ + "filename": "pusher_block_light0000", + "frame": {"x":1081,"y":860,"w":64,"h":62}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":62}, + "sourceSize": {"w":64,"h":62} +} +,{ + "filename": "pusher_block_silver0000", + "frame": {"x":1149,"y":860,"w":110,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":87}, + "sourceSize": {"w":110,"h":87} +} +,{ + "filename": "roman_bar0000", + "frame": {"x":1753,"y":860,"w":116,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":116,"h":30}, + "sourceSize": {"w":116,"h":30} +} +,{ + "filename": "roman_base0000", + "frame": {"x":1873,"y":860,"w":138,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":194}, + "sourceSize": {"w":138,"h":194} +} +,{ + "filename": "roman_center0000", + "frame": {"x":0,"y":1058,"w":44,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":44,"h":42}, + "sourceSize": {"w":44,"h":42} +} +,{ + "filename": "roman_end0000", + "frame": {"x":48,"y":1058,"w":73,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":73,"h":30}, + "sourceSize": {"w":73,"h":30} +} +,{ + "filename": "rotmirror0000", + "frame": {"x":513,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_circle0000", + "frame": {"x":767,"y":1058,"w":154,"h":154}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":154,"h":154}, + "sourceSize": {"w":154,"h":154} +} +,{ + "filename": "rotmirror_light_off0000", + "frame": {"x":925,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_light_on0000", + "frame": {"x":1179,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "slider_light_off0000", + "frame": {"x":1692,"y":1058,"w":20,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":20,"h":20}, + "sourceSize": {"w":20,"h":20} +} +,{ + "filename": "slider_light_on0000", + "frame": {"x":1716,"y":1058,"w":55,"h":57}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":57}, + "sourceSize": {"w":55,"h":57} +} +,{ + "filename": "timed_pusher_base0000", + "frame": {"x":1263,"y":860,"w":124,"h":152}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":152}, + "sourceSize": {"w":124,"h":152} +} +,{ + "filename": "timed_pusher_base_old0000", + "frame": {"x":1391,"y":860,"w":124,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":124}, + "sourceSize": {"w":124,"h":124} +} +,{ + "filename": "timed_pusher_light_off0000", + "frame": {"x":1519,"y":860,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "timed_pusher_light_on0000", + "frame": {"x":1631,"y":860,"w":118,"h":148}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":148}, + "sourceSize": {"w":118,"h":148} +} +,{ + "filename": "wind_base0000", + "frame": {"x":1775,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0001", + "frame": {"x":1897,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0002", + "frame": {"x":0,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0003", + "frame": {"x":122,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base_light_off0000", + "frame": {"x":244,"y":1312,"w":32,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":34}, + "sourceSize": {"w":32,"h":34} +} +,{ + "filename": "wind_base_light_on0000", + "frame": {"x":280,"y":1312,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "wind_effect0000", + "frame": {"x":330,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0001", + "frame": {"x":462,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0002", + "frame": {"x":594,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0003", + "frame": {"x":726,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0004", + "frame": {"x":858,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0005", + "frame": {"x":990,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0006", + "frame": {"x":1122,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0007", + "frame": {"x":1254,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0008", + "frame": {"x":1386,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0009", + "frame": {"x":1518,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0010", + "frame": {"x":1650,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0011", + "frame": {"x":1782,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0012", + "frame": {"x":1914,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0013", + "frame": {"x":0,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0014", + "frame": {"x":132,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0015", + "frame": {"x":264,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0016", + "frame": {"x":396,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0017", + "frame": {"x":528,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0018", + "frame": {"x":660,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0019", + "frame": {"x":792,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0020", + "frame": {"x":924,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0021", + "frame": {"x":1056,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0022", + "frame": {"x":1188,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0023", + "frame": {"x":1320,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0024", + "frame": {"x":1452,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0025", + "frame": {"x":1584,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0026", + "frame": {"x":1716,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0027", + "frame": {"x":1848,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0028", + "frame": {"x":0,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0029", + "frame": {"x":132,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MechAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/MechAssets.png b/fireboywatergirl3/assets/atlasses/MechAssets.png new file mode 100644 index 00000000..ded17b3b Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/MechAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/MenuAssets.json b/fireboywatergirl3/assets/atlasses/MenuAssets.json new file mode 100644 index 00000000..c1507870 --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/MenuAssets.json @@ -0,0 +1,499 @@ +{"frames": [ + +{ + "filename": "AppStoreText0000", + "frame": {"x":246,"y":593,"w":279,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":279,"h":48}, + "sourceSize": {"w":279,"h":48} +} +,{ + "filename": "BackButton0000", + "frame": {"x":928,"y":0,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButton0001", + "frame": {"x":928,"y":127,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButtonFull0000", + "frame": {"x":512,"y":0,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "BackButtonFull0001", + "frame": {"x":512,"y":102,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "Diamond0000", + "frame": {"x":907,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0001", + "frame": {"x":117,"y":749,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0002", + "frame": {"x":0,"y":751,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0003", + "frame": {"x":225,"y":758,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0000", + "frame": {"x":475,"y":707,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0001", + "frame": {"x":583,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0002", + "frame": {"x":691,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0003", + "frame": {"x":799,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark_Bkg_Mask0000", + "frame": {"x":845,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "DiamondPuzzle0000", + "frame": {"x":529,"y":593,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0001", + "frame": {"x":651,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0002", + "frame": {"x":773,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0003", + "frame": {"x":895,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle_Bkg_Mask0000", + "frame": {"x":124,"y":514,"w":118,"h":118}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":118}, + "sourceSize": {"w":118,"h":118} +} +,{ + "filename": "DiamondSpeed0000", + "frame": {"x":651,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0001", + "frame": {"x":756,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0002", + "frame": {"x":861,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0003", + "frame": {"x":108,"y":857,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed_Bkg_Mask0000", + "frame": {"x":0,"y":514,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "Diamond_Bkg_Mask0000", + "frame": {"x":721,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "FxButton0000", + "frame": {"x":124,"y":636,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "FxButton0001", + "frame": {"x":0,"y":638,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "GoldLock0000", + "frame": {"x":0,"y":859,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "Lock0000", + "frame": {"x":333,"y":864,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "MusicButton0000", + "frame": {"x":241,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MusicButton0001", + "frame": {"x":358,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":459,"y":121,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":953,"y":368,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "Navy0000", + "frame": {"x":213,"y":866,"w":72,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":69}, + "sourceSize": {"w":72,"h":69} +} +,{ + "filename": "NewSign0000", + "frame": {"x":246,"y":514,"w":143,"h":56}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":143,"h":56}, + "sourceSize": {"w":143,"h":56} +} +,{ + "filename": "SettingsButton0000", + "frame": {"x":918,"y":262,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0001", + "frame": {"x":333,"y":758,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0002", + "frame": {"x":439,"y":815,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0003", + "frame": {"x":545,"y":833,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "StoneButton0000", + "frame": {"x":0,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "StoneButton0001", + "frame": {"x":256,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "ToggleControlButtonDual0000", + "frame": {"x":775,"y":0,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonDual0001", + "frame": {"x":0,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0000", + "frame": {"x":153,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0001", + "frame": {"x":306,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0000", + "frame": {"x":775,"y":131,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0001", + "frame": {"x":459,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0002", + "frame": {"x":612,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0003", + "frame": {"x":0,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0004", + "frame": {"x":153,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0005", + "frame": {"x":306,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0006", + "frame": {"x":765,"y":262,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0007", + "frame": {"x":459,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0008", + "frame": {"x":612,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0009", + "frame": {"x":0,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0010", + "frame": {"x":153,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0011", + "frame": {"x":306,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "UnlockButton0000", + "frame": {"x":765,"y":393,"w":184,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":184,"h":90}, + "sourceSize": {"w":184,"h":90} +} +,{ + "filename": "VibrateButton0000", + "frame": {"x":459,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "VibrateButton0001", + "frame": {"x":590,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "_default0000", + "frame": {"x":953,"y":419,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/MenuAssets.png b/fireboywatergirl3/assets/atlasses/MenuAssets.png new file mode 100644 index 00000000..f9180bd8 Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/MenuAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/MenuBackgrounds.json b/fireboywatergirl3/assets/atlasses/MenuBackgrounds.json new file mode 100644 index 00000000..bd1d28ca --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/MenuBackgrounds.json @@ -0,0 +1,51 @@ +{"frames": [ + +{ + "filename": "HolderTexture0000", + "frame": {"x":0,"y":0,"w":256,"h":399}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":399}, + "sourceSize": {"w":256,"h":399} +} +,{ + "filename": "Loading0000", + "frame": {"x":260,"y":0,"w":469,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":469,"h":103}, + "sourceSize": {"w":469,"h":103} +} +,{ + "filename": "SimpleBackground0000", + "frame": {"x":733,"y":0,"w":256,"h":317}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":317}, + "sourceSize": {"w":256,"h":317} +} +,{ + "filename": "SliderHolder0000", + "frame": {"x":0,"y":403,"w":800,"h":395}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":800,"h":395}, + "sourceSize": {"w":800,"h":395} +} +,{ + "filename": "_default0000", + "frame": {"x":804,"y":403,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuBackgrounds.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/MenuBackgrounds.png b/fireboywatergirl3/assets/atlasses/MenuBackgrounds.png new file mode 100644 index 00000000..bd61572f Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/MenuBackgrounds.png differ diff --git a/fireboywatergirl3/assets/atlasses/PopupAssets.json b/fireboywatergirl3/assets/atlasses/PopupAssets.json new file mode 100644 index 00000000..661d6ed2 --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/PopupAssets.json @@ -0,0 +1,899 @@ +{"frames": [ + +{ + "filename": "Clock0000", + "frame": {"x":0,"y":0,"w":218,"h":75}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":75}, + "sourceSize": {"w":218,"h":75} +} +,{ + "filename": "Confetti0000", + "frame": {"x":222,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0001", + "frame": {"x":256,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0002", + "frame": {"x":290,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0003", + "frame": {"x":324,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "CrossIcon0000", + "frame": {"x":1122,"y":205,"w":61,"h":61}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":61,"h":61}, + "sourceSize": {"w":61,"h":61} +} +,{ + "filename": "CursorToggle0000", + "frame": {"x":358,"y":0,"w":196,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":196,"h":90}, + "sourceSize": {"w":196,"h":90} +} +,{ + "filename": "DeviceItemRenderer0000", + "frame": {"x":558,"y":0,"w":554,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":554,"h":111}, + "sourceSize": {"w":554,"h":111} +} +,{ + "filename": "DiamondsIcon0000", + "frame": {"x":1187,"y":205,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "FingerRingJump0000", + "frame": {"x":1116,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingLeft0000", + "frame": {"x":1320,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingRight0000", + "frame": {"x":1524,"y":0,"w":200,"h":200}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":200}, + "sourceSize": {"w":200,"h":200} +} +,{ + "filename": "FinishIcon0000", + "frame": {"x":1284,"y":205,"w":93,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":107}, + "sourceSize": {"w":93,"h":107} +} +,{ + "filename": "FinishStone0000", + "frame": {"x":1381,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0001", + "frame": {"x":1513,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0002", + "frame": {"x":1645,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0003", + "frame": {"x":1777,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0004", + "frame": {"x":1909,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0005", + "frame": {"x":0,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0006", + "frame": {"x":132,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0007", + "frame": {"x":264,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0008", + "frame": {"x":396,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0009", + "frame": {"x":528,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0010", + "frame": {"x":660,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0011", + "frame": {"x":792,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0012", + "frame": {"x":924,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0013", + "frame": {"x":1056,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0014", + "frame": {"x":1188,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0015", + "frame": {"x":1320,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0016", + "frame": {"x":1452,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0017", + "frame": {"x":1584,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0018", + "frame": {"x":1716,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0019", + "frame": {"x":1848,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0020", + "frame": {"x":0,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0021", + "frame": {"x":132,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0000", + "frame": {"x":264,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0001", + "frame": {"x":396,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0002", + "frame": {"x":528,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0003", + "frame": {"x":660,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0004", + "frame": {"x":792,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0005", + "frame": {"x":924,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0006", + "frame": {"x":1056,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0007", + "frame": {"x":1188,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0008", + "frame": {"x":1320,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0009", + "frame": {"x":1452,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0010", + "frame": {"x":1584,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0011", + "frame": {"x":1716,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0012", + "frame": {"x":1848,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0013", + "frame": {"x":0,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0014", + "frame": {"x":132,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0015", + "frame": {"x":264,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0016", + "frame": {"x":396,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0017", + "frame": {"x":528,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0018", + "frame": {"x":660,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0019", + "frame": {"x":792,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0020", + "frame": {"x":924,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0021", + "frame": {"x":1056,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStonePuzzle0000", + "frame": {"x":1188,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0001", + "frame": {"x":1326,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0002", + "frame": {"x":1464,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0003", + "frame": {"x":1602,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0004", + "frame": {"x":1740,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0005", + "frame": {"x":1878,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0006", + "frame": {"x":0,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0007", + "frame": {"x":138,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0008", + "frame": {"x":276,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0009", + "frame": {"x":414,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0010", + "frame": {"x":552,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0011", + "frame": {"x":690,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0012", + "frame": {"x":828,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0013", + "frame": {"x":966,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0014", + "frame": {"x":1104,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0015", + "frame": {"x":1242,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0016", + "frame": {"x":1380,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0017", + "frame": {"x":1518,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0018", + "frame": {"x":1656,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0019", + "frame": {"x":1794,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0020", + "frame": {"x":0,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0021", + "frame": {"x":138,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStoneSpeed0000", + "frame": {"x":276,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0001", + "frame": {"x":408,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0002", + "frame": {"x":540,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0003", + "frame": {"x":672,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0004", + "frame": {"x":804,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0005", + "frame": {"x":936,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0006", + "frame": {"x":1068,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0007", + "frame": {"x":1200,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0008", + "frame": {"x":1332,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0009", + "frame": {"x":1464,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0010", + "frame": {"x":1596,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0011", + "frame": {"x":1728,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0012", + "frame": {"x":1860,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0013", + "frame": {"x":0,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0014", + "frame": {"x":132,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0015", + "frame": {"x":264,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0016", + "frame": {"x":396,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0017", + "frame": {"x":528,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0018", + "frame": {"x":660,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0019", + "frame": {"x":792,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0020", + "frame": {"x":924,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0021", + "frame": {"x":1056,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":1728,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":1781,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "PauseButton0000", + "frame": {"x":1834,"y":0,"w":48,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, + "sourceSize": {"w":48,"h":48} +} +,{ + "filename": "PopupBackground0000", + "frame": {"x":0,"y":205,"w":1082,"h":642}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":1082,"h":642}, + "sourceSize": {"w":1082,"h":642} +} +,{ + "filename": "SilverIcon0000", + "frame": {"x":1188,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "TickIcon0000", + "frame": {"x":1285,"y":1507,"w":69,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":69,"h":69}, + "sourceSize": {"w":69,"h":69} +} +,{ + "filename": "TimeIcon0000", + "frame": {"x":1358,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "_default0000", + "frame": {"x":1086,"y":205,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +} +,{ + "filename": "popupArrow0000", + "frame": {"x":1455,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +} +,{ + "filename": "popupArrow0001", + "frame": {"x":1589,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PopupAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/PopupAssets.png b/fireboywatergirl3/assets/atlasses/PopupAssets.png new file mode 100644 index 00000000..317f3b31 Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/PopupAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/PreloaderAssets.json b/fireboywatergirl3/assets/atlasses/PreloaderAssets.json new file mode 100644 index 00000000..027b7ec9 --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/PreloaderAssets.json @@ -0,0 +1,35 @@ +{"frames": [ + +{ + "filename": "LoaderBar0000", + "frame": {"x":0,"y":0,"w":200,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":20}, + "sourceSize": {"w":200,"h":20} +} +,{ + "filename": "LoaderHolder0000", + "frame": {"x":204,"y":0,"w":222,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":222,"h":40}, + "sourceSize": {"w":222,"h":40} +} +,{ + "filename": "LoaderTitle0000", + "frame": {"x":0,"y":44,"w":497,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":497,"h":73}, + "sourceSize": {"w":497,"h":73} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PreloaderAssets.png", + "format": "RGBA8888", + "size": {"w":512,"h":128}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/PreloaderAssets.png b/fireboywatergirl3/assets/atlasses/PreloaderAssets.png new file mode 100644 index 00000000..df1f02c5 Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/PreloaderAssets.png differ diff --git a/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.json b/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.json new file mode 100644 index 00000000..f8c262dd --- /dev/null +++ b/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.json @@ -0,0 +1,467 @@ +{"frames": [ + +{ + "filename": "BackGround0000", + "frame": {"x":0,"y":0,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "Clock0000", + "frame": {"x":516,"y":260,"w":268,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":268,"h":100}, + "sourceSize": {"w":268,"h":100} +} +,{ + "filename": "Diamond1_Bkg_Empty0000", + "frame": {"x":334,"y":1601,"w":106,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":111}, + "sourceSize": {"w":106,"h":111} +} +,{ + "filename": "FinishBoy0000", + "frame": {"x":776,"y":0,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0001", + "frame": {"x":788,"y":143,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0002", + "frame": {"x":788,"y":286,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0003", + "frame": {"x":516,"y":364,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0004", + "frame": {"x":683,"y":429,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0005", + "frame": {"x":850,"y":429,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0006", + "frame": {"x":516,"y":507,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0007", + "frame": {"x":683,"y":572,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0008", + "frame": {"x":850,"y":572,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0009", + "frame": {"x":516,"y":650,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0010", + "frame": {"x":683,"y":715,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0011", + "frame": {"x":850,"y":715,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0012", + "frame": {"x":516,"y":793,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0013", + "frame": {"x":683,"y":858,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0014", + "frame": {"x":850,"y":858,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0015", + "frame": {"x":516,"y":936,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0016", + "frame": {"x":683,"y":1001,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0017", + "frame": {"x":850,"y":1001,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0018", + "frame": {"x":0,"y":1032,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0019", + "frame": {"x":167,"y":1032,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0020", + "frame": {"x":334,"y":1032,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishBoy0021", + "frame": {"x":501,"y":1079,"w":163,"h":139}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":139}, + "sourceSize": {"w":163,"h":139} +} +,{ + "filename": "FinishGirl0000", + "frame": {"x":668,"y":1144,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0001", + "frame": {"x":835,"y":1144,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0002", + "frame": {"x":0,"y":1175,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0003", + "frame": {"x":167,"y":1175,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0004", + "frame": {"x":334,"y":1175,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0005", + "frame": {"x":501,"y":1222,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0006", + "frame": {"x":668,"y":1286,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0007", + "frame": {"x":835,"y":1286,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0008", + "frame": {"x":0,"y":1317,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0009", + "frame": {"x":167,"y":1317,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0010", + "frame": {"x":334,"y":1317,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0011", + "frame": {"x":501,"y":1364,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0012", + "frame": {"x":668,"y":1428,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0013", + "frame": {"x":835,"y":1428,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0014", + "frame": {"x":0,"y":1459,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0015", + "frame": {"x":167,"y":1459,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0016", + "frame": {"x":334,"y":1459,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0017", + "frame": {"x":501,"y":1506,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0018", + "frame": {"x":668,"y":1570,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0019", + "frame": {"x":835,"y":1570,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0020", + "frame": {"x":0,"y":1601,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0021", + "frame": {"x":167,"y":1601,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "ForeGround0000", + "frame": {"x":516,"y":0,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "MenuBackground0000", + "frame": {"x":0,"y":516,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "decor_A0000", + "frame": {"x":572,"y":1702,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_10000", + "frame": {"x":683,"y":364,"w":70,"h":52}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":52}, + "sourceSize": {"w":70,"h":52} +} +,{ + "filename": "decor_O_20000", + "frame": {"x":572,"y":1648,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_T_10000", + "frame": {"x":955,"y":256,"w":40,"h":116}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":116}, + "sourceSize": {"w":40,"h":116} +} +,{ + "filename": "decor_T_20000", + "frame": {"x":955,"y":146,"w":50,"h":106}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":106}, + "sourceSize": {"w":50,"h":106} +} +,{ + "filename": "decor_T_30000", + "frame": {"x":444,"y":1648,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "decor_V0000", + "frame": {"x":955,"y":0,"w":44,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":44,"h":142}, + "sourceSize": {"w":44,"h":142} +} +,{ + "filename": "decor_X0000", + "frame": {"x":508,"y":1648,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "TempleAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.png b/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.png new file mode 100644 index 00000000..d8d7da4d Binary files /dev/null and b/fireboywatergirl3/assets/atlasses/Temples/ice/TempleAssets.png differ diff --git a/fireboywatergirl3/assets/audio/CharToggle1.mp3 b/fireboywatergirl3/assets/audio/CharToggle1.mp3 new file mode 100644 index 00000000..8163ed56 Binary files /dev/null and b/fireboywatergirl3/assets/audio/CharToggle1.mp3 differ diff --git a/fireboywatergirl3/assets/audio/CharToggle2.mp3 b/fireboywatergirl3/assets/audio/CharToggle2.mp3 new file mode 100644 index 00000000..8ac7856d Binary files /dev/null and b/fireboywatergirl3/assets/audio/CharToggle2.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Clock.mp3 b/fireboywatergirl3/assets/audio/Clock.mp3 new file mode 100644 index 00000000..66f4661e Binary files /dev/null and b/fireboywatergirl3/assets/audio/Clock.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Death.mp3 b/fireboywatergirl3/assets/audio/Death.mp3 new file mode 100644 index 00000000..206d21ad Binary files /dev/null and b/fireboywatergirl3/assets/audio/Death.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Diamond.mp3 b/fireboywatergirl3/assets/audio/Diamond.mp3 new file mode 100644 index 00000000..c61e773e Binary files /dev/null and b/fireboywatergirl3/assets/audio/Diamond.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Door.mp3 b/fireboywatergirl3/assets/audio/Door.mp3 new file mode 100644 index 00000000..6b3920ff Binary files /dev/null and b/fireboywatergirl3/assets/audio/Door.mp3 differ diff --git a/fireboywatergirl3/assets/audio/EndDiamond.mp3 b/fireboywatergirl3/assets/audio/EndDiamond.mp3 new file mode 100644 index 00000000..9c3f2d24 Binary files /dev/null and b/fireboywatergirl3/assets/audio/EndDiamond.mp3 differ diff --git a/fireboywatergirl3/assets/audio/EndFail.mp3 b/fireboywatergirl3/assets/audio/EndFail.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl3/assets/audio/EndFail.mp3 differ diff --git a/fireboywatergirl3/assets/audio/EndPass.mp3 b/fireboywatergirl3/assets/audio/EndPass.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl3/assets/audio/EndPass.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Freeze.mp3 b/fireboywatergirl3/assets/audio/Freeze.mp3 new file mode 100644 index 00000000..6b44e29f Binary files /dev/null and b/fireboywatergirl3/assets/audio/Freeze.mp3 differ diff --git a/fireboywatergirl3/assets/audio/IceSteps_fb.mp3 b/fireboywatergirl3/assets/audio/IceSteps_fb.mp3 new file mode 100644 index 00000000..fb52f101 Binary files /dev/null and b/fireboywatergirl3/assets/audio/IceSteps_fb.mp3 differ diff --git a/fireboywatergirl3/assets/audio/IceSteps_wg.mp3 b/fireboywatergirl3/assets/audio/IceSteps_wg.mp3 new file mode 100644 index 00000000..87a79f5d Binary files /dev/null and b/fireboywatergirl3/assets/audio/IceSteps_wg.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Jump_fb.mp3 b/fireboywatergirl3/assets/audio/Jump_fb.mp3 new file mode 100644 index 00000000..a1f2a2c5 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Jump_fb.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Jump_wg.mp3 b/fireboywatergirl3/assets/audio/Jump_wg.mp3 new file mode 100644 index 00000000..5613337b Binary files /dev/null and b/fireboywatergirl3/assets/audio/Jump_wg.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusic.mp3 b/fireboywatergirl3/assets/audio/LevelMusic.mp3 new file mode 100644 index 00000000..c2fb05b7 Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusic.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusicFinish.mp3 b/fireboywatergirl3/assets/audio/LevelMusicFinish.mp3 new file mode 100644 index 00000000..2b5fb08c Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusicFinish.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusicFinish_speed.mp3 b/fireboywatergirl3/assets/audio/LevelMusicFinish_speed.mp3 new file mode 100644 index 00000000..74147f49 Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusicFinish_speed.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusicOver.mp3 b/fireboywatergirl3/assets/audio/LevelMusicOver.mp3 new file mode 100644 index 00000000..67178821 Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusicOver.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusic_dark.mp3 b/fireboywatergirl3/assets/audio/LevelMusic_dark.mp3 new file mode 100644 index 00000000..5d37bb2f Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusic_dark.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LevelMusic_speed.mp3 b/fireboywatergirl3/assets/audio/LevelMusic_speed.mp3 new file mode 100644 index 00000000..88091290 Binary files /dev/null and b/fireboywatergirl3/assets/audio/LevelMusic_speed.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Lever.mp3 b/fireboywatergirl3/assets/audio/Lever.mp3 new file mode 100644 index 00000000..76650254 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Lever.mp3 differ diff --git a/fireboywatergirl3/assets/audio/LightPusher.mp3 b/fireboywatergirl3/assets/audio/LightPusher.mp3 new file mode 100644 index 00000000..c85ba313 Binary files /dev/null and b/fireboywatergirl3/assets/audio/LightPusher.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Melt.mp3 b/fireboywatergirl3/assets/audio/Melt.mp3 new file mode 100644 index 00000000..33ac6f64 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Melt.mp3 differ diff --git a/fireboywatergirl3/assets/audio/MenuMusic.mp3 b/fireboywatergirl3/assets/audio/MenuMusic.mp3 new file mode 100644 index 00000000..a7987c77 Binary files /dev/null and b/fireboywatergirl3/assets/audio/MenuMusic.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Platform.mp3 b/fireboywatergirl3/assets/audio/Platform.mp3 new file mode 100644 index 00000000..535ff474 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Platform.mp3 differ diff --git a/fireboywatergirl3/assets/audio/PortalClose.mp3 b/fireboywatergirl3/assets/audio/PortalClose.mp3 new file mode 100644 index 00000000..d4f60b0f Binary files /dev/null and b/fireboywatergirl3/assets/audio/PortalClose.mp3 differ diff --git a/fireboywatergirl3/assets/audio/PortalLoop.mp3 b/fireboywatergirl3/assets/audio/PortalLoop.mp3 new file mode 100644 index 00000000..3a8c26de Binary files /dev/null and b/fireboywatergirl3/assets/audio/PortalLoop.mp3 differ diff --git a/fireboywatergirl3/assets/audio/PortalOpen.mp3 b/fireboywatergirl3/assets/audio/PortalOpen.mp3 new file mode 100644 index 00000000..cf9961f6 Binary files /dev/null and b/fireboywatergirl3/assets/audio/PortalOpen.mp3 differ diff --git a/fireboywatergirl3/assets/audio/PortalTransport.mp3 b/fireboywatergirl3/assets/audio/PortalTransport.mp3 new file mode 100644 index 00000000..5c18f42a Binary files /dev/null and b/fireboywatergirl3/assets/audio/PortalTransport.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Pusher.mp3 b/fireboywatergirl3/assets/audio/Pusher.mp3 new file mode 100644 index 00000000..c7200f39 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Pusher.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Slider.mp3 b/fireboywatergirl3/assets/audio/Slider.mp3 new file mode 100644 index 00000000..81b03a70 Binary files /dev/null and b/fireboywatergirl3/assets/audio/Slider.mp3 differ diff --git a/fireboywatergirl3/assets/audio/WaterSteps.mp3 b/fireboywatergirl3/assets/audio/WaterSteps.mp3 new file mode 100644 index 00000000..e82d56ae Binary files /dev/null and b/fireboywatergirl3/assets/audio/WaterSteps.mp3 differ diff --git a/fireboywatergirl3/assets/audio/Wind.mp3 b/fireboywatergirl3/assets/audio/Wind.mp3 new file mode 100644 index 00000000..84543b9f Binary files /dev/null and b/fireboywatergirl3/assets/audio/Wind.mp3 differ diff --git a/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.fnt b/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.fnt new file mode 100644 index 00000000..142c3163 --- /dev/null +++ b/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.fnt @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.png b/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.png new file mode 100644 index 00000000..15e54888 Binary files /dev/null and b/fireboywatergirl3/assets/fonts/fbwg_font_cyrillic.png differ diff --git a/fireboywatergirl3/assets/fonts/font.fnt b/fireboywatergirl3/assets/fonts/font.fnt new file mode 100644 index 00000000..0297157a --- /dev/null +++ b/fireboywatergirl3/assets/fonts/font.fnt @@ -0,0 +1,446 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl3/assets/fonts/font.png b/fireboywatergirl3/assets/fonts/font.png new file mode 100644 index 00000000..597e9db9 Binary files /dev/null and b/fireboywatergirl3/assets/fonts/font.png differ diff --git a/fireboywatergirl3/assets/images/Beam.png b/fireboywatergirl3/assets/images/Beam.png new file mode 100644 index 00000000..1a2206ef Binary files /dev/null and b/fireboywatergirl3/assets/images/Beam.png differ diff --git a/fireboywatergirl3/assets/images/GameNameIce.png b/fireboywatergirl3/assets/images/GameNameIce.png new file mode 100644 index 00000000..225c4998 Binary files /dev/null and b/fireboywatergirl3/assets/images/GameNameIce.png differ diff --git a/fireboywatergirl3/assets/images/TOASTER-MINI-new.png b/fireboywatergirl3/assets/images/TOASTER-MINI-new.png new file mode 100644 index 00000000..3f7f79f4 Binary files /dev/null and b/fireboywatergirl3/assets/images/TOASTER-MINI-new.png differ diff --git a/fireboywatergirl3/assets/images/TempleHallIce.jpg b/fireboywatergirl3/assets/images/TempleHallIce.jpg new file mode 100644 index 00000000..3a4be022 Binary files /dev/null and b/fireboywatergirl3/assets/images/TempleHallIce.jpg differ diff --git a/fireboywatergirl3/assets/images/branding/branding_logo_kizi.png b/fireboywatergirl3/assets/images/branding/branding_logo_kizi.png new file mode 100644 index 00000000..09ee21b2 Binary files /dev/null and b/fireboywatergirl3/assets/images/branding/branding_logo_kizi.png differ diff --git a/fireboywatergirl3/assets/images/stores/android.png b/fireboywatergirl3/assets/images/stores/android.png new file mode 100644 index 00000000..a9f30e48 Binary files /dev/null and b/fireboywatergirl3/assets/images/stores/android.png differ diff --git a/fireboywatergirl3/assets/images/stores/ios.png b/fireboywatergirl3/assets/images/stores/ios.png new file mode 100644 index 00000000..caf2845d Binary files /dev/null and b/fireboywatergirl3/assets/images/stores/ios.png differ diff --git a/fireboywatergirl3/assets/images/stores/microsoft.png b/fireboywatergirl3/assets/images/stores/microsoft.png new file mode 100644 index 00000000..a345d334 Binary files /dev/null and b/fireboywatergirl3/assets/images/stores/microsoft.png differ diff --git a/fireboywatergirl3/assets/images/stores/steam.png b/fireboywatergirl3/assets/images/stores/steam.png new file mode 100644 index 00000000..b0c82317 Binary files /dev/null and b/fireboywatergirl3/assets/images/stores/steam.png differ diff --git a/fireboywatergirl3/assets/tilemaps/tilesets/Chars.json b/fireboywatergirl3/assets/tilemaps/tilesets/Chars.json new file mode 100644 index 00000000..6bfca1eb --- /dev/null +++ b/fireboywatergirl3/assets/tilemaps/tilesets/Chars.json @@ -0,0 +1,117 @@ +{ "columns":8, + "image":"Chars.png", + "imageheight":64, + "imagewidth":512, + "margin":0, + "name":"Chars", + "spacing":0, + "tilecount":8, + "tileheight":64, + "tileproperties": + { + "0": + { + "char":"fb" + }, + "1": + { + "char":"wg" + }, + "2": + { + "char":"fb" + }, + "3": + { + "char":"wg" + }, + "4": + { + "char":"fb" + }, + "5": + { + "char":"wg" + }, + "6": + { + "char":"silver" + }, + "7": + { + "char":"fbwg" + } + }, + "tilepropertytypes": + { + "0": + { + "char":"string" + }, + "1": + { + "char":"string" + }, + "2": + { + "char":"string" + }, + "3": + { + "char":"string" + }, + "4": + { + "char":"string" + }, + "5": + { + "char":"string" + }, + "6": + { + "char":"string" + }, + "7": + { + "char":"string" + } + }, + "tiles": + { + "0": + { + "type":"char" + }, + "1": + { + "type":"char" + }, + "2": + { + "type":"door" + }, + "3": + { + "type":"door" + }, + "4": + { + "type":"diamond" + }, + "5": + { + "type":"diamond" + }, + "6": + { + "type":"diamond" + }, + "7": + { + "type":"diamond" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl3/assets/tilemaps/tilesets/Ground.json b/fireboywatergirl3/assets/tilemaps/tilesets/Ground.json new file mode 100644 index 00000000..7c6b5946 --- /dev/null +++ b/fireboywatergirl3/assets/tilemaps/tilesets/Ground.json @@ -0,0 +1,201 @@ +{ "columns":15, + "image":"Ground.png", + "imageheight":32, + "imagewidth":480, + "margin":0, + "name":"Ground", + "spacing":0, + "tilecount":15, + "tileheight":32, + "tileproperties": + { + "0": + { + "type":0 + }, + "1": + { + "type":1 + }, + "10": + { + "type":-1 + }, + "11": + { + "type":11 + }, + "12": + { + "type":12 + }, + "13": + { + "type":10 + }, + "14": + { + "type":55 + }, + "2": + { + "type":2 + }, + "3": + { + "type":3 + }, + "4": + { + "type":4 + }, + "5": + { + "type":5 + }, + "6": + { + "type":6 + }, + "7": + { + "type":7 + }, + "8": + { + "type":8 + }, + "9": + { + "type":9 + } + }, + "tilepropertytypes": + { + "0": + { + "type":"int" + }, + "1": + { + "type":"int" + }, + "10": + { + "type":"int" + }, + "11": + { + "type":"int" + }, + "12": + { + "type":"int" + }, + "13": + { + "type":"int" + }, + "14": + { + "type":"int" + }, + "2": + { + "type":"int" + }, + "3": + { + "type":"int" + }, + "4": + { + "type":"int" + }, + "5": + { + "type":"int" + }, + "6": + { + "type":"int" + }, + "7": + { + "type":"int" + }, + "8": + { + "type":"int" + }, + "9": + { + "type":"int" + } + }, + "tiles": + { + "0": + { + "type":"0" + }, + "1": + { + "type":"1" + }, + "10": + { + "type":"-1" + }, + "11": + { + "type":"11" + }, + "12": + { + "type":"12" + }, + "13": + { + "type":"10" + }, + "14": + { + "type":"55" + }, + "2": + { + "type":"2" + }, + "3": + { + "type":"3" + }, + "4": + { + "type":"4" + }, + "5": + { + "type":"5" + }, + "6": + { + "type":"6" + }, + "7": + { + "type":"7" + }, + "8": + { + "type":"8" + }, + "9": + { + "type":"9" + } + }, + "tilewidth":32, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl3/assets/tilemaps/tilesets/LargeObjects.json b/fireboywatergirl3/assets/tilemaps/tilesets/LargeObjects.json new file mode 100644 index 00000000..4d67081a --- /dev/null +++ b/fireboywatergirl3/assets/tilemaps/tilesets/LargeObjects.json @@ -0,0 +1,67 @@ +{ "columns":3, + "image":"LargeObjects.png", + "imageheight":96, + "imagewidth":192, + "margin":0, + "name":"LargeObjects", + "spacing":0, + "tilecount":3, + "tileheight":96, + "tileproperties": + { + "0": + { + "group":0, + "inverted":false, + "portalId":0 + }, + "1": + { + "group":0, + "inverted":true, + "portalId":0 + }, + "2": + { + "group":0, + "length":10 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "1": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "2": + { + "group":"int", + "length":"float" + } + }, + "tiles": + { + "0": + { + "type":"portal" + }, + "1": + { + "type":"portal" + }, + "2": + { + "type":"wind" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl3/assets/tilemaps/tilesets/Objects.json b/fireboywatergirl3/assets/tilemaps/tilesets/Objects.json new file mode 100644 index 00000000..e95099f3 --- /dev/null +++ b/fireboywatergirl3/assets/tilemaps/tilesets/Objects.json @@ -0,0 +1,163 @@ +{ "columns":4, + "image":"Objects.png", + "imageheight":256, + "imagewidth":256, + "margin":0, + "name":"Objects", + "spacing":0, + "tilecount":16, + "tileheight":64, + "tileproperties": + { + "0": + { + "group":0 + }, + "1": + { + "group":0, + "onis":1, + "startPos":-1 + }, + "11": + { + "group":0 + }, + "14": + { + "group":0, + "time":2000 + }, + "15": + { + "group":0, + "length":10 + }, + "2": + { + "group":0, + "onis":-1, + "startPos":1 + }, + "5": + { + "color":"yellow", + "group":0 + }, + "6": + { + "dir":1, + "group":0 + }, + "7": + { + "color":"yellow", + "group":0 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int" + }, + "1": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "11": + { + "group":"int" + }, + "14": + { + "group":"int", + "time":"int" + }, + "15": + { + "group":"int", + "length":"int" + }, + "2": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "5": + { + "color":"string", + "group":"int" + }, + "6": + { + "dir":"int", + "group":"int" + }, + "7": + { + "color":"string", + "group":"int" + } + }, + "tiles": + { + "0": + { + "type":"pusher" + }, + "1": + { + "type":"lever" + }, + "10": + { + "type":"ball" + }, + "11": + { + "type":"infinitemirror" + }, + "12": + { + "type":"boxmirror" + }, + "13": + { + "type":"boxheavy" + }, + "14": + { + "type":"timedpusher" + }, + "15": + { + "type":"wind" + }, + "2": + { + "type":"lever" + }, + "4": + { + "type":"box" + }, + "5": + { + "type":"beamer" + }, + "6": + { + "type":"rotmirror" + }, + "7": + { + "type":"lightpusher" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl3/bower_components/requirejs/require.js b/fireboywatergirl3/bower_components/requirejs/require.js new file mode 100644 index 00000000..a29caef2 --- /dev/null +++ b/fireboywatergirl3/bower_components/requirejs/require.js @@ -0,0 +1,2142 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.2.0 Copyright jQuery Foundation and other contributors. + * Released under MIT license, http://github.com/requirejs/requirejs/LICENSE + */ +//Not using strict: uneven strict support in browsers, #392, and causes +//problems with requirejs.exec()/transpiler plugins that may not be strict. +/*jslint regexp: true, nomen: true, sloppy: true */ +/*global window, navigator, document, importScripts, setTimeout, opera */ + +var requirejs, require, define; +(function (global) { + var req, s, head, baseElement, dataMain, src, + interactiveScript, currentlyAddingScript, mainScript, subPath, + version = '2.2.0', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? + /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false; + + //Could match something like ')//comment', do not lose the prefix to comment. + function commentReplace(match, multi, multiText, singlePrefix) { + return singlePrefix || ''; + } + + function isFunction(it) { + return ostring.call(it) === '[object Function]'; + } + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i; + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i; + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop); + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop]; + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop; + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break; + } + } + } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + + if (!target[prop]) { + target[prop] = {}; + } + mixin(target[prop], value, force, deepStringMixin); + } else { + target[prop] = value; + } + } + }); + } + return target; + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments); + }; + } + + function scripts() { + return document.getElementsByTagName('script'); + } + + function defaultOnError(err) { + throw err; + } + + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value; + } + var g = global; + each(value.split('.'), function (part) { + g = g[part]; + }); + return g; + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + e.requireType = id; + e.requireModules = requireModules; + if (err) { + e.originalError = err; + } + return e; + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return; + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite an existing requirejs instance. + return; + } + cfg = requirejs; + requirejs = undefined; + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require; + require = undefined; + } + + function newContext(contextName) { + var inCheckLoaded, Module, context, handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 0, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; i < ary.length; i++) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + // If at the start, or previous value is still .., + // keep them so that when converted to a path it may + // still work when converted to a path, even though + // as an ID it is less than ideal. In larger point + // releases, may be better to just kick out an error. + if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { + continue; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + /** + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name + */ + function normalize(name, baseName, applyMap) { + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, + foundMap, foundI, foundStarMap, starI, normalizedBaseParts, + baseParts = (baseName && baseName.split('/')), + map = config.map, + starMap = map && map['*']; + + //Adjust any relative paths. + if (name) { + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); + } + + // Starts with a '.' so need the baseName + if (name[0].charAt(0) === '.' && baseParts) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = normalizedBaseParts.concat(name); + } + + trimDots(name); + name = name.join('/'); + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/'); + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/'); + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')); + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment); + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue; + foundI = i; + break outerLoop; + } + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment); + starI = i; + } + } + + if (!foundMap && foundStarMap) { + foundMap = foundStarMap; + foundI = starI; + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap); + name = nameParts.join('/'); + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; + } + + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if (scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName) { + scriptNode.parentNode.removeChild(scriptNode); + return true; + } + }); + } + } + + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id); + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift(); + context.require.undef(id); + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true + })([id]); + + return true; + } + } + + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1; + if (index > -1) { + prefix = name.substring(0, index); + name = name.substring(index + 1, name.length); + } + return [prefix, name]; + } + + /** + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. + * + * @returns {Object} + */ + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, pluginModule, suffix, nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = ''; + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false; + name = '_@r' + (requireCounter += 1); + } + + nameParts = splitPrefix(name); + prefix = nameParts[0]; + name = nameParts[1]; + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap); + pluginModule = getOwn(defined, prefix); + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap); + }); + } else { + // If nested plugin references, then do not try to + // normalize, as it will not normalize correctly. This + // places a restriction on resourceIds, and the longer + // term solution is not to normalize until plugins are + // loaded and all normalizations to allow for async + // loading of a loader plugin. But for now, fixes the + // common uses. Details in #1131 + normalizedName = name.indexOf('!') === -1 ? + normalize(name, parentName, applyMap) : + name; + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap); + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName); + prefix = nameParts[0]; + normalizedName = nameParts[1]; + isNormalized = true; + + url = context.nameToUrl(normalizedName); + } + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? + '_unnormalized' + (unnormalizedCounter += 1) : + ''; + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? + prefix + '!' + normalizedName : + normalizedName) + suffix + }; + } + + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (!mod) { + mod = registry[id] = new context.Module(depMap); + } + + return mod; + } + + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (hasProp(defined, id) && + (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]); + } + } else { + mod = getModule(depMap); + if (mod.error && name === 'error') { + fn(mod.error); + } else { + mod.on(name, fn); + } + } + } + + function onError(err, errback) { + var ids = err.requireModules, + notified = false; + + if (errback) { + errback(err); + } else { + each(ids, function (id) { + var mod = getOwn(registry, id); + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err; + if (mod.events.error) { + notified = true; + mod.emit('error', err); + } + } + }); + + if (!notified) { + req.onError(err); + } + } + } + + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + each(globalDefQueue, function(queueItem) { + var id = queueItem[0]; + if (typeof id === 'string') { + context.defQueueMap[id] = true; + } + defQueue.push(queueItem); + }); + globalDefQueue = []; + } + } + + handlers = { + 'require': function (mod) { + if (mod.require) { + return mod.require; + } else { + return (mod.require = context.makeRequire(mod.map)); + } + }, + 'exports': function (mod) { + mod.usingExports = true; + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports); + } else { + return (mod.exports = defined[mod.map.id] = {}); + } + } + }, + 'module': function (mod) { + if (mod.module) { + return mod.module; + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {}; + }, + exports: mod.exports || (mod.exports = {}) + }); + } + } + }; + + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id]; + delete enabledRegistry[id]; + } + + function breakCycle(mod, traced, processed) { + var id = mod.map.id; + + if (mod.error) { + mod.emit('error', mod.error); + } else { + traced[id] = true; + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId); + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]); + mod.check(); //pass false? + } else { + breakCycle(dep, traced, processed); + } + } + }); + processed[id] = true; + } + } + + function checkLoaded() { + var err, usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true; + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return; + } + + inCheckLoaded = true; + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id; + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return; + } + + if (!map.isDefine) { + reqCalls.push(mod); + } + + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true; + stillLoading = true; + } else { + noLoads.push(modId); + removeScript(modId); + } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true; + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false); + } + } + } + }); + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); + err.contextName = context.contextName; + return onError(err); + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}); + }); + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0; + checkLoaded(); + }, 50); + } + } + + inCheckLoaded = false; + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {}; + this.map = map; + this.shim = getOwn(config.shim, map.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + + /* this.exports this.factory + this.depMaps = [], + this.enabled, this.fetched + */ + }; + + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {}; + + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return; + } + + this.factory = factory; + + if (errback) { + //Register for errors on this module. + this.on('error', errback); + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err); + }); + } + + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0); + + this.errback = errback; + + //Indicate this module has be initialized + this.inited = true; + + this.ignore = options.ignore; + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable(); + } else { + this.check(); + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true; + this.depCount -= 1; + this.depExports[i] = depExports; + } + }, + + fetch: function () { + if (this.fetched) { + return; + } + this.fetched = true; + + context.startTime = (new Date()).getTime(); + + var map = this.map; + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true + })(this.shim.deps || [], bind(this, function () { + return map.prefix ? this.callPlugin() : this.load(); + })); + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load(); + } + }, + + load: function () { + var url = this.map.url; + + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true; + context.load(this.map.id, url); + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return; + } + + var err, cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory; + + if (!this.inited) { + // Only fetch if not already in the defQueue. + if (!hasProp(context.defQueueMap, id)) { + this.fetch(); + } + } else if (this.error) { + this.emit('error', this.error); + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true; + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || + req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports); + } catch (e) { + err = e; + } + } else { + exports = context.execCb(id, factory, depExports, exports); + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module; + if (cjsModule) { + exports = cjsModule.exports; + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports; + } + } + + if (err) { + err.requireMap = this.map; + err.requireModules = this.map.isDefine ? [this.map.id] : null; + err.requireType = this.map.isDefine ? 'define' : 'require'; + return onError((this.error = err)); + } + + } else { + //Just a literal value + exports = factory; + } + + this.exports = exports; + + if (this.map.isDefine && !this.ignore) { + defined[id] = exports; + + if (req.onResourceLoad) { + var resLoadMaps = []; + each(this.depMaps, function (depMap) { + resLoadMaps.push(depMap.normalizedMap || depMap); + }); + req.onResourceLoad(context, this.map, resLoadMaps); + } + } + + //Clean up + cleanRegistry(id); + + this.defined = true; + } + + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false; + + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true; + this.emit('defined', this.exports); + this.defineEmitComplete = true; + } + + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix); + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap); + + on(pluginMap, 'defined', bind(this, function (plugin) { + var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true + }); + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = plugin.normalize(name, function (name) { + return normalize(name, parentName, true); + }) || ''; + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, + this.map.parentMap); + on(normalizedMap, + 'defined', bind(this, function (value) { + this.map.normalizedMap = normalizedMap; + this.init([], function () { return value; }, null, { + enabled: true, + ignore: true + }); + })); + + normalizedMod = getOwn(registry, normalizedMap.id); + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap); + + if (this.events.error) { + normalizedMod.on('error', bind(this, function (err) { + this.emit('error', err); + })); + } + normalizedMod.enable(); + } + + return; + } + + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + + load = bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true + }); + }); + + load.error = bind(this, function (err) { + this.inited = true; + this.error = err; + err.requireModules = [id]; + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id); + } + }); + + onError(err); + }); + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive; + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt; + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false; + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap); + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id]; + } + + try { + req.exec(text); + } catch (e) { + return onError(makeError('fromtexteval', + 'fromText eval for ' + id + + ' failed: ' + e, + e, + [id])); + } + + if (hasInteractive) { + useInteractive = true; + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap); + + //Support anonymous modules. + context.completeLoad(moduleName); + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load); + }); + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config); + })); + + context.enable(pluginMap, this); + this.pluginMaps[pluginMap.id] = pluginMap; + }, + + enable: function () { + enabledRegistry[this.map.id] = this; + this.enabled = true; + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true; + + //Enable each dependency + each(this.depMaps, bind(this, function (depMap, i) { + var id, mod, handler; + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, + (this.map.isDefine ? this.map : this.map.parentMap), + false, + !this.skipMap); + this.depMaps[i] = depMap; + + handler = getOwn(handlers, depMap.id); + + if (handler) { + this.depExports[i] = handler(this); + return; + } + + this.depCount += 1; + + on(depMap, 'defined', bind(this, function (depExports) { + if (this.undefed) { + return; + } + this.defineDep(i, depExports); + this.check(); + })); + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)); + } else if (this.events.error) { + // No direct errback on this module, but something + // else is listening for errors, so be sure to + // propagate the error correctly. + on(depMap, 'error', bind(this, function(err) { + this.emit('error', err); + })); + } + } + + id = depMap.id; + mod = registry[id]; + + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this); + } + })); + + //Enable each plugin that is used in + //a dependency + eachProp(this.pluginMaps, bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id); + if (mod && !mod.enabled) { + context.enable(pluginMap, this); + } + })); + + this.enabling = false; + + this.check(); + }, + + on: function (name, cb) { + var cbs = this.events[name]; + if (!cbs) { + cbs = this.events[name] = []; + } + cbs.push(cb); + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt); + }); + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name]; + } + } + }; + + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + } + } + + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func); + } + } else { + node.removeEventListener(name, func, false); + } + } + + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement; + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); + removeListener(node, context.onScriptError, 'error'); + + return { + node: node, + id: node && node.getAttribute('data-requiremodule') + }; + } + + function intakeDefines() { + var args; + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue(); + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + + args[args.length - 1])); + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args); + } + } + context.defQueueMap = {}; + } + + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + defQueueMap: {}, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/'; + } + } + + // Convert old style urlArgs string to a function. + if (typeof cfg.urlArgs === 'string') { + var urlArgs = cfg.urlArgs; + cfg.urlArgs = function(id, url) { + return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs; + }; + } + + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true + }; + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {}; + } + mixin(config[prop], value, true, true); + } else { + config[prop] = value; + } + }); + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value + }; + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value); + } + shim[id] = value; + }); + config.shim = shim; + } + + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name; + + pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj; + + name = pkgObj.name; + location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } + + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); + }); + } + + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id, null, true); + } + }); + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback); + } + }, + + makeShimExports: function (value) { + function fn() { + var ret; + if (value.init) { + ret = value.init.apply(global, arguments); + } + return ret || (value.exports && getGlobal(value.exports)); + } + return fn; + }, + + makeRequire: function (relMap, options) { + options = options || {}; + + function localRequire(deps, callback, errback) { + var id, map, requireMod; + + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true; + } + + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback); + } + + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]); + } + + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire); + } + + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true); + id = map.id; + + if (!hasProp(defined, id)) { + return onError(makeError('notloaded', 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])'))); + } + return defined[id]; + } + + //Grab defines waiting in the global queue. + intakeDefines(); + + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines(); + + requireMod = getModule(makeModuleMap(null, relMap)); + + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap; + + requireMod.init(deps, callback, errback, { + enabled: true + }); + + checkLoaded(); + }); + + return localRequire; + } + + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..'; + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); + moduleNamePlusExt = moduleNamePlusExt.substring(0, index); + } + + return context.nameToUrl(normalize(moduleNamePlusExt, + relMap && relMap.id, true), ext, true); + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id); + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id; + return hasProp(defined, id) || hasProp(registry, id); + } + }); + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue(); + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id); + + mod.undefed = true; + removeScript(id); + + delete defined[id]; + delete urlFetched[map.url]; + delete undefEvents[id]; + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function(args, i) { + if (args[0] === id) { + defQueue.splice(i, 1); + } + }); + delete context.defQueueMap[id]; + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events; + } + + cleanRegistry(id); + } + }; + } + + return localRequire; + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id); + if (mod) { + getModule(depMap).enable(); + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, args, mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports; + + takeGlobalQueue(); + + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + args[0] = moduleName; + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break; + } + found = true; + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true; + } + + callGetModule(args); + } + context.defQueueMap = {}; + + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName); + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return; + } else { + return onError(makeError('nodefine', + 'No define call for ' + moduleName, + null, + [moduleName])); + } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); + } + } + + checkLoaded(); + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } + + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || ''); + } else { + //A module that needs to be converted to a path. + paths = config.paths; + + syms = moduleName.split('/'); + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/'); + + parentPath = getOwn(paths, parentModule); + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0]; + } + syms.splice(0, i, parentPath); + break; + } + } + + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/'); + url += (ext || (/^data\:|^blob\:|\?/.test(url) || skipExt ? '' : '.js')); + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; + } + + return config.urlArgs && !/^blob\:/.test(url) ? + url + config.urlArgs(moduleName, url) : url; + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url); + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args); + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || + (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null; + + //Pull out the name of the module and the context. + var data = getScriptData(evt); + context.completeLoad(data.id); + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt); + if (!hasPathFallback(data.id)) { + var parents = []; + eachProp(registry, function(value, key) { + if (key.indexOf('_@r') !== 0) { + each(value.depMaps, function(depMap) { + if (depMap.id === data.id) { + parents.push(key); + return true; + } + }); + } + }); + return onError(makeError('scripterror', 'Script error for "' + data.id + + (parents.length ? + '", needed by: ' + parents.join(', ') : + '"'), evt, [data.id])); + } + } + }; + + context.require = context.makeRequire(); + return context; + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + + //Find the right context, use default + var context, config, + contextName = defContextName; + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps; + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback; + callback = errback; + errback = optional; + } else { + deps = []; + } + } + + if (config && config.context) { + contextName = config.context; + } + + context = getOwn(contexts, contextName); + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName); + } + + if (config) { + context.configure(config); + } + + return context.require(deps, callback, errback); + }; + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config); + }; + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { + setTimeout(fn, 4); + } : function (fn) { fn(); }; + + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req; + } + + req.version = version; + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/; + req.isBrowser = isBrowser; + s = req.s = { + contexts: contexts, + newContext: newContext + }; + + //Create default context. + req({}); + + //Exports some context-sensitive methods on global require. + each([ + 'toUrl', + 'undef', + 'defined', + 'specified' + ], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName]; + return ctx.require[prop].apply(ctx, arguments); + }; + }); + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0]; + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0]; + if (baseElement) { + head = s.head = baseElement.parentNode; + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError; + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : + document.createElement('script'); + node.type = config.scriptType || 'text/javascript'; + node.charset = 'utf-8'; + node.async = true; + return node; + }; + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node; + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url); + + node.setAttribute('data-requirecontext', context.contextName); + node.setAttribute('data-requiremodule', moduleName); + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if (node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/requirejs/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/requirejs/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true; + + node.attachEvent('onreadystatechange', context.onScriptLoad); + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false); + node.addEventListener('error', context.onScriptError, false); + } + node.src = url; + + //Calling onNodeCreated after all properties on the node have been + //set, but before it is placed in the DOM. + if (config.onNodeCreated) { + config.onNodeCreated(node, config, moduleName, url); + } + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node; + if (baseElement) { + head.insertBefore(node, baseElement); + } else { + head.appendChild(node); + } + currentlyAddingScript = null; + + return node; + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation is that a build has been done so + //that only one script needs to be loaded anyway. This may need + //to be reevaluated if other use cases become common. + + // Post a task to the event loop to work around a bug in WebKit + // where the worker gets garbage-collected after calling + // importScripts(): https://webkit.org/b/153317 + setTimeout(function() {}, 0); + importScripts(url); + + //Account for anonymous modules + context.completeLoad(moduleName); + } catch (e) { + context.onError(makeError('importscripts', + 'importScripts failed for ' + + moduleName + ' at ' + url, + e, + [moduleName])); + } + } + }; + + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript; + } + + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script); + } + }); + return interactiveScript; + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode; + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main'); + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain; + + //Set final baseUrl if there is not already an explicit one, + //but only do so if the data-main value is not a loader plugin + //module ID. + if (!cfg.baseUrl && mainScript.indexOf('!') === -1) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/'); + mainScript = src.pop(); + subPath = src.length ? src.join('/') + '/' : './'; + + cfg.baseUrl = subPath; + } + + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, ''); + + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain; + } + + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; + + return true; + } + }); + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context; + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps; + deps = name; + name = null; + } + + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps; + deps = null; + } + + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = []; + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, commentReplace) + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep); + }); + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); + } + } + + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript(); + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule'); + } + context = contexts[node.getAttribute('data-requirecontext')]; + } + } + + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + if (context) { + context.defQueue.push([name, deps, callback]); + context.defQueueMap[name] = true; + } else { + globalDefQueue.push([name, deps, callback]); + } + }; + + define.amd = { + jQuery: true + }; + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text); + }; + + //Set up with config info. + req(cfg); +}(this)); diff --git a/fireboywatergirl3/data/ice/temple.json b/fireboywatergirl3/data/ice/temple.json new file mode 100644 index 00000000..64f22d88 --- /dev/null +++ b/fireboywatergirl3/data/ice/temple.json @@ -0,0 +1 @@ +{"index":0,"id":"ice","label":"ice temple","color":"#99A5AA","type":"tree","levels":[{"id":1,"x":0.6,"y":0.95,"filename":"tutorials/levels/light_01.json","time":30,"mobileTime":50,"required":0,"initial":true,"_id":1},{"id":2,"x":0.5,"y":0.9,"filename":"tutorials/levels/ice_02.json","time":45,"mobileTime":65,"required":0,"initial":true,"_id":2},{"id":3,"x":0.5,"y":0.8,"filename":"ice/levels/ice_03.json","time":50,"mobileTime":70,"required":0,"_id":3},{"id":4,"_id":4,"x":0.5,"y":0.65,"filename":"ice/levels/ice_04.json","time":140,"mobileTime":160,"required":0},{"id":5,"_id":5,"x":0.35,"y":0.75,"filename":"ice/levels/ice_05.json","type":"puzzle","time":110,"mobileTime":140,"required":0},{"id":6,"_id":7,"x":0.35,"y":0.6,"filename":"ice/levels/ice_06.json","type":"speed","time":45,"mobileTime":60,"required":0},{"id":7,"_id":8,"x":0.5,"y":0.5,"filename":"ice/levels/ice_07.json","time":55,"mobileTime":95,"required":0},{"id":9,"_id":9,"x":0.65,"y":0.75,"filename":"ice/levels/ice_09.json","type":"puzzle","time":65,"mobileTime":115,"required":0},{"id":10,"_id":10,"x":0.15,"y":0.7,"filename":"ice/levels/ice_10.json","type":"speed","time":40,"mobileTime":60,"required":0},{"id":11,"_id":11,"x":0.15,"y":0.8,"filename":"ice/levels/ice_11.json","time":58,"mobileTime":70,"required":0},{"id":12,"_id":12,"x":0.05,"y":0.75,"filename":"ice/levels/ice_12.json","type":"puzzle","time":100,"mobileTime":120,"required":0},{"id":13,"_id":13,"x":0.05,"y":0.65,"filename":"ice/levels/ice_13.json","time":85,"mobileTime":110,"required":0},{"id":8,"_id":14,"x":0.65,"y":0.6,"filename":"ice/levels/ice_08.json","time":95,"mobileTime":135,"required":0},{"id":15,"_id":15,"x":0.85,"y":0.8,"filename":"ice/levels/ice_15.json","time":240,"mobileTime":300,"required":0},{"id":16,"_id":16,"x":0.95,"y":0.75,"filename":"ice/levels/ice_16.json","type":"puzzle","time":60,"mobileTime":90,"required":0},{"id":17,"_id":17,"x":0.95,"y":0.65,"filename":"ice/levels/ice_17.json","time":65,"mobileTime":90,"required":0},{"id":14,"_id":18,"x":0.85,"y":0.7,"filename":"ice/levels/ice_14.json","time":60,"mobileTime":70,"required":0},{"id":25,"_id":19,"x":0.65,"y":0.4,"filename":"ice/levels/ice_25.json","type":"speed","time":35,"mobileTime":55,"required":0},{"id":19,"_id":20,"x":0.35,"y":0.4,"filename":"ice/levels/ice_19.json","time":90,"mobileTime":105,"required":0},{"id":18,"_id":21,"x":0.25,"y":0.5,"filename":"ice/levels/ice_18.json","type":"puzzle","time":75,"mobileTime":80,"required":0},{"id":24,"_id":22,"x":0.75,"y":0.5,"filename":"ice/levels/ice_24.json","type":"puzzle","time":60,"mobileTime":90,"required":0},{"id":32,"_id":23,"x":0.65,"y":0.25,"filename":"ice/levels/ice_32.json","type":"puzzle","time":120,"mobileTime":180,"required":0},{"id":31,"_id":24,"x":0.35,"y":0.25,"filename":"ice/levels/ice_31.json","type":"puzzle","time":105,"mobileTime":125,"required":0},{"id":30,"_id":25,"x":0.5,"y":0.35,"filename":"ice/levels/ice_30.json","time":90,"mobileTime":120,"required":0},{"id":33,"_id":27,"x":0.5,"y":0.2,"filename":"ice/levels/ice_33.json","time":100,"mobileTime":120,"required":0},{"id":36,"_id":28,"x":0.6,"y":0.15,"filename":"ice/levels/ice_36.json","time":80,"mobileTime":105,"required":0},{"id":34,"_id":30,"x":0.4,"y":0.15,"filename":"ice/levels/ice_34.json","type":"speed","time":50,"mobileTime":65,"required":0},{"id":26,"_id":33,"x":0.85,"y":0.3,"filename":"ice/levels/ice_26.json","time":105,"mobileTime":118,"required":0},{"id":27,"_id":34,"x":0.8489,"y":0.2033,"filename":"ice/levels/ice_27.json","time":30,"mobileTime":45,"required":0},{"id":28,"_id":35,"x":0.9467,"y":0.2522,"filename":"ice/levels/ice_28.json","type":"puzzle","time":90,"mobileTime":110,"required":0},{"id":20,"_id":37,"x":0.1478,"y":0.3011,"filename":"ice/levels/ice_20.json","type":"speed","time":35,"mobileTime":45,"required":0},{"id":23,"_id":38,"x":0.1478,"y":0.2011,"filename":"ice/levels/ice_23.json","type":"speed","time":30,"mobileTime":50,"required":0},{"id":22,"_id":39,"x":0.04778,"y":0.2489,"filename":"ice/levels/ice_22.json","type":"puzzle","time":120,"mobileTime":135,"required":0},{"id":21,"_id":40,"x":0.05222,"y":0.3478,"filename":"ice/levels/ice_21.json","time":105,"mobileTime":120,"required":0},{"id":0,"_id":41,"x":0.4,"y":0.95,"filename":"tutorials/levels/forest_01.json","time":40,"mobileTime":70,"initial":true,"required":0},{"id":35,"_id":44,"x":0.4967,"y":0.1011,"filename":"ice/levels/ice_35.json","type":"puzzle","time":140,"mobileTime":240,"required":0},{"id":29,"_id":45,"x":0.95,"y":0.3478,"filename":"ice/levels/ice_29.json","type":"speed","time":20,"mobileTime":42,"required":0}],"edges":[{"id":"temp","source":1,"target":2,"_id":"12"},{"id":"temp","source":2,"target":3,"_id":"23"},{"id":"temp","source":3,"target":4,"_id":"34"},{"id":"temp","source":5,"target":4,"_id":"54"},{"id":"temp","source":13,"target":10,"_id":"1310"},{"id":"temp","source":10,"target":12,"_id":"1012"},{"id":"temp","source":10,"target":11,"_id":"1011"},{"id":"temp","source":10,"target":7,"_id":"107"},{"id":"temp","source":7,"target":8,"_id":"78"},{"id":"temp","source":8,"target":4,"_id":"84"},{"id":"temp","source":7,"target":5,"_id":"75"},{"id":"temp","source":4,"target":9,"_id":"49"},{"id":"temp","source":9,"target":14,"_id":"914"},{"id":"temp","source":14,"target":8,"_id":"148"},{"id":"temp","source":14,"target":18,"_id":"1418"},{"id":"temp","source":18,"target":16,"_id":"1816"},{"id":"temp","source":18,"target":15,"_id":"1815"},{"id":"temp","source":18,"target":17,"_id":"1817"},{"id":"temp","source":8,"target":20,"_id":"820"},{"id":"temp","source":8,"target":19,"_id":"819"},{"id":"temp","source":19,"target":23,"_id":"1923"},{"id":"temp","source":20,"target":24,"_id":"2024"},{"id":"temp","source":20,"target":21,"_id":"2021"},{"id":"temp","source":21,"target":7,"_id":"217"},{"id":"temp","source":22,"target":14,"_id":"2214"},{"id":"temp","source":22,"target":19,"_id":"2219"},{"id":"temp","source":25,"target":24,"_id":"2524"},{"id":"temp","source":25,"target":23,"_id":"2523"},{"id":"temp","source":8,"target":25,"_id":"825"},{"id":"temp","source":27,"target":28,"_id":"2728"},{"id":"temp","source":27,"target":30,"_id":"2730"},{"id":"temp","source":27,"target":25,"_id":"2725"},{"id":"temp","source":19,"target":33,"_id":"1933"},{"id":"temp","source":33,"target":35,"_id":"3335"},{"id":"temp","source":33,"target":34,"_id":"3334"},{"id":"temp","source":33,"target":45,"_id":"3345"},{"id":"temp","source":27,"target":44,"_id":"2744"},{"id":"temp","source":20,"target":37,"_id":"2037"},{"id":"temp","source":37,"target":38,"_id":"3738"},{"id":"temp","source":37,"target":39,"_id":"3739"},{"id":"temp","source":37,"target":40,"_id":"3740"},{"id":"temp","source":2,"target":41,"_id":"241"}]} \ No newline at end of file diff --git a/fireboywatergirl3/data/tutorials/levels/ice_02.json b/fireboywatergirl3/data/tutorials/levels/ice_02.json new file mode 100644 index 00000000..f224e462 --- /dev/null +++ b/fireboywatergirl3/data/tutorials/levels/ice_02.json @@ -0,0 +1 @@ +{"height":29,"infinite":false,"layers":[{"data":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,3,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,4,3,0,0,0,0,0,0,1,1,3,0,0,0,0,0,0,0,0,2,1,1,3,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,4,3,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,2,1,0,0,4,13,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,4,3,0,0,0,2,1,1,1,3,0,0,0,0,0,2,1,1,0,0,0,4,13,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,8,8,8,1,1,1,1,1,1,1,1,1,14,1,5,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,13,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,12,1,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,1,0,0,0,0,2,1,1,15,15,15,15,15,15,15,15,15,15,15,15,1,1,7,7,7,7,7,7,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,2,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,1,1,1,5,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,0,0,0,0,0,0,0,0,2,1,1,14,14,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6,1,1,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,3,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,1,1,3,0,0,0,0,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,1,1,1,1,1,1,1,1,1,1,1,1,14,14,14,14,14,14,14,14,1,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,1,1,1,1,1,1],"height":29,"name":"Ground","opacity":1,"type":"tilelayer","visible":true,"width":39,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial","objects":[{"height":152,"id":37,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":576,"x":24,"y":760},{"height":32,"id":38,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice1","wrap":true},"type":"","visible":true,"width":576,"x":64,"y":776},{"height":32,"id":39,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice2","wrap":true},"type":"","visible":true,"width":504,"x":176,"y":816},{"height":136,"id":40,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":480,"x":728,"y":760},{"height":32,"id":41,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice3","wrap":true},"type":"","visible":true,"width":344,"x":512,"y":776},{"height":32,"id":42,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice4","wrap":true},"type":"","visible":true,"width":304,"x":600,"y":816},{"height":32,"id":43,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice5","wrap":true},"type":"","visible":true,"width":168,"x":712,"y":856},{"height":200,"id":44,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":432,"x":800,"y":544},{"height":32,"id":45,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice6","wrap":true},"type":"","visible":true,"width":424,"x":792,"y":560},{"height":32,"id":46,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice7","wrap":true},"type":"","visible":true,"width":424,"x":792,"y":600},{"height":192,"id":47,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":632,"x":160,"y":560},{"height":32,"id":49,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice8","wrap":true},"type":"","visible":true,"width":424,"x":464,"y":632},{"height":32,"id":50,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice9","wrap":true},"type":"","visible":true,"width":424,"x":448,"y":592},{"height":224,"id":51,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":608,"x":128,"y":320},{"height":32,"id":52,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice10","wrap":true},"type":"","visible":true,"width":400,"x":128,"y":400},{"height":32,"id":53,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice11","wrap":true},"type":"","visible":true,"width":424,"x":136,"y":448},{"height":32,"id":55,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice12","wrap":true},"type":"","visible":true,"width":416,"x":816,"y":56},{"height":32,"id":56,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice13","wrap":true},"type":"","visible":true,"width":352,"x":864,"y":96},{"height":32,"id":57,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_ice14","wrap":true},"type":"","visible":true,"width":232,"x":984,"y":136},{"height":304,"id":58,"name":"","properties":{"id":6},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":960,"x":256,"y":16}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Chars","objects":[{"gid":16,"height":64,"id":1,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":40,"y":896},{"gid":17,"height":64,"id":2,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":112,"y":896},{"gid":18,"height":64,"id":3,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":48,"y":160},{"gid":19,"height":64,"id":4,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":152,"y":160},{"gid":21,"height":64,"id":5,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":928,"y":272},{"gid":21,"height":64,"id":6,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":48,"y":352},{"gid":20,"height":64,"id":7,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":768,"y":176},{"gid":20,"height":64,"id":8,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1096,"y":448},{"gid":20,"height":64,"id":9,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":176,"y":720},{"gid":20,"height":64,"id":10,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":912,"y":752},{"gid":21,"height":64,"id":11,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":656,"y":880},{"gid":21,"height":64,"id":12,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":992,"y":624}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Objects","objects":[{"gid":29,"height":64,"id":13,"name":"","properties":{"color":"red","group":11,"initialState":1},"propertytypes":{"color":"string","group":"int","initialState":"int"},"rotation":90,"type":"","visible":true,"width":64,"x":336,"y":288},{"gid":29,"height":64,"id":15,"name":"","properties":{"color":"blue","group":33,"initialState":1},"propertytypes":{"color":"string","group":"int","initialState":"int"},"rotation":90,"type":"","visible":true,"width":64,"x":384,"y":544},{"gid":24,"height":64,"id":16,"name":"","properties":{"group":1},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":928,"y":544},{"gid":24,"height":64,"id":17,"name":"","properties":{"group":3},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":96,"y":768},{"height":32,"id":19,"name":"","properties":{"dx":-2,"group":1},"propertytypes":{"dx":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":64,"x":336,"y":352},{"height":32,"id":20,"name":"","properties":{"dx":-2,"group":3},"propertytypes":{"dx":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":64,"x":383,"y":624},{"height":96,"id":21,"name":"","properties":{"dx":0,"dy":3},"propertytypes":{"dx":"int","dy":"int"},"rotation":0,"type":"platform","visible":true,"width":32,"x":256,"y":64},{"height":0,"id":22,"name":"","rotation":0,"type":"","visible":true,"width":0,"x":1648,"y":672},{"gid":38,"height":64,"id":23,"name":"","properties":{"time":5500},"propertytypes":{"time":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1136,"y":352}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0}],"nextobjectid":59,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.1.3","tileheight":32,"tilesets":[{"firstgid":1,"source":"../../../assets/tilemaps/tilesets/Ground.json"},{"firstgid":16,"source":"../../../assets/tilemaps/tilesets/Chars.json"},{"firstgid":24,"source":"../../../assets/tilemaps/tilesets/Objects.json"}],"tilewidth":32,"type":"map","version":1,"width":39} \ No newline at end of file diff --git a/fireboywatergirl3/fireboy-and-watergirl-ice-temple.min.js b/fireboywatergirl3/fireboy-and-watergirl-ice-temple.min.js new file mode 100644 index 00000000..d07b3254 --- /dev/null +++ b/fireboywatergirl3/fireboy-and-watergirl-ice-temple.min.js @@ -0,0 +1,58 @@ +!function(a){if("object"==typeof exports)module.exports=a();else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.p2=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c||a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=0&&i<=1&&j>=0&&j<=1}},{"./Scalar":4}],2:[function(a,b,c){function d(){}b.exports=d,d.area=function(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])},d.left=function(a,b,c){return d.area(a,b,c)>0},d.leftOn=function(a,b,c){return d.area(a,b,c)>=0},d.right=function(a,b,c){return d.area(a,b,c)<0},d.rightOn=function(a,b,c){return d.area(a,b,c)<=0};var e=[],f=[];d.collinear=function(a,b,c,g){if(g){var h=e,i=f;h[0]=b[0]-a[0],h[1]=b[1]-a[1],i[0]=c[0]-b[0],i[1]=c[1]-b[1];var j=h[0]*i[0]+h[1]*i[1],k=Math.sqrt(h[0]*h[0]+h[1]*h[1]),l=Math.sqrt(i[0]*i[0]+i[1]*i[1]);return Math.acos(j/(k*l))a.vertices.length)throw new Error("lol2");if(b<0)throw new Error("lol3");for(var d=b;db[a][0])&&(a=c);g.left(this.at(a-1),this.at(a),this.at(a+1))||this.reverse()},d.prototype.reverse=function(){for(var a=[],b=0,c=this.vertices.length;b!==c;b++)a.push(this.vertices.pop());this.vertices=a},d.prototype.isReflex=function(a){return g.right(this.at(a-1),this.at(a),this.at(a+1))};var i=[],j=[];d.prototype.canSee=function(a,b){var c,d,e=i,h=j;if(g.leftOn(this.at(a+1),this.at(a),this.at(b))&&g.rightOn(this.at(a-1),this.at(a),this.at(b)))return!1;d=g.sqdist(this.at(a),this.at(b));for(var k=0;k!==this.vertices.length;++k)if((k+1)%this.vertices.length!==a&&k!==a&&g.leftOn(this.at(a),this.at(b),this.at(k+1))&&g.rightOn(this.at(a),this.at(b),this.at(k))&&(e[0]=this.at(a),e[1]=this.at(b),h[0]=this.at(k),h[1]=this.at(k+1),c=f.lineInt(e,h),g.sqdist(this.at(a),c)0?this.slice(a):[this]},d.prototype.slice=function(a){if(0==a.length)return[this];if(a instanceof Array&&a.length&&a[0]instanceof Array&&2==a[0].length&&a[0][0]instanceof Array){for(var b=[this],c=0;ch)return console.warn("quickDecomp: max level ("+h+") reached."),a;for(var x=0;xq&&(q+=this.vertices.length),p=Number.MAX_VALUE,q3&&c>=0;--c)g.collinear(this.at(c-1),this.at(c),this.at(c+1),a)&&(this.vertices.splice(c%this.vertices.length,1),c--,b++);return b}},{"./Line":1,"./Point":2,"./Scalar":4}],4:[function(a,b,c){function d(){}b.exports=d,d.eq=function(a,b,c){return c=c||0,Math.abs(a-b) (http://steffe.se)",keywords:["p2.js","p2","physics","engine","2d"],main:"./src/p2.js",engines:{node:"*"},repository:{type:"git",url:"https://github.com/schteppe/p2.js.git"},bugs:{url:"https://github.com/schteppe/p2.js/issues"},licenses:[{type:"MIT"}],devDependencies:{grunt:"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},dependencies:{"poly-decomp":"0.1.0"}}},{}],7:[function(a,b,c){function d(a){this.lowerBound=e.create(),a&&a.lowerBound&&e.copy(this.lowerBound,a.lowerBound),this.upperBound=e.create(),a&&a.upperBound&&e.copy(this.upperBound,a.upperBound)}var e=a("../math/vec2");a("../utils/Utils");b.exports=d;var f=e.create();d.prototype.setFromPoints=function(a,b,c,d){var g=this.lowerBound,h=this.upperBound;"number"!=typeof c&&(c=0),0!==c?e.rotate(g,a[0],c):e.copy(g,a[0]),e.copy(h,g);for(var i=Math.cos(c),j=Math.sin(c),k=1;kh[o]&&(h[o]=l[o]),l[o]c&&(this.lowerBound[b]=c);var d=a.upperBound[b];this.upperBound[b]i?-1:h}},{"../math/vec2":30,"../utils/Utils":57}],8:[function(a,b,c){function d(a){this.type=a,this.result=[],this.world=null,this.boundingVolumeType=d.AABB}var e=a("../math/vec2"),f=a("../objects/Body");b.exports=d,d.AABB=1,d.BOUNDING_CIRCLE=2,d.prototype.setWorld=function(a){this.world=a},d.prototype.getCollisionPairs=function(a){};var g=e.create();d.boundingRadiusCheck=function(a,b){e.sub(g,a.position,b.position);var c=e.squaredLength(g),d=a.boundingRadius+b.boundingRadius;return c<=d*d},d.aabbCheck=function(a,b){return a.getAABB().overlaps(b.getAABB())},d.prototype.boundingVolumeCheck=function(a,b){var c;switch(this.boundingVolumeType){case d.BOUNDING_CIRCLE:c=d.boundingRadiusCheck(a,b);break;case d.AABB:c=d.aabbCheck(a,b);break;default:throw new Error("Bounding volume type not recognized: "+this.boundingVolumeType)}return c},d.canCollide=function(a,b){var c=f.KINEMATIC,d=f.STATIC;return(a.type!==d||b.type!==d)&&(!(a.type===c&&b.type===d||a.type===d&&b.type===c)&&((a.type!==c||b.type!==c)&&((a.sleepState!==f.SLEEPING||b.sleepState!==f.SLEEPING)&&!(a.sleepState===f.SLEEPING&&b.type===d||b.sleepState===f.SLEEPING&&a.type===d))))},d.NAIVE=1,d.SAP=2},{"../math/vec2":30,"../objects/Body":31}],9:[function(a,b,c){function d(){e.call(this,e.NAIVE)}var e=(a("../shapes/Circle"),a("../shapes/Plane"),a("../shapes/Shape"),a("../shapes/Particle"),a("../collision/Broadphase"));a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.getCollisionPairs=function(a){var b=a.bodies,c=this.result;c.length=0;for(var d=0,f=b.length;d!==f;d++)for(var g=b[d],h=0;hW&&V0)for(var N=0;NMath.pow(p,2))return 0;if(l)return!0;var q=this.createContactEquation(a,e,b,f);return h(q.normalA,j,c),g.normalize(q.normalA,q.normalA),g.scale(q.contactPointA,q.normalA,m),g.scale(q.contactPointB,q.normalA,-n),i(q.contactPointA,q.contactPointA,c),h(q.contactPointA,q.contactPointA,a.position),i(q.contactPointB,q.contactPointB,j),h(q.contactPointB,q.contactPointB,e.position),this.contactEquations.push(q),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(q)),1},d.prototype[q.PLANE|q.CONVEX]=d.prototype[q.PLANE|q.BOX]=d.prototype.planeConvex=function(a,b,c,d,e,f,k,l,m){var n=t,o=u,p=v,q=0;g.rotate(o,s,d);for(var r=0;r!==f.vertices.length;r++){var w=f.vertices[r];if(g.rotate(n,w,l),i(n,n,k),h(p,n,c),j(p,o)<=0){if(m)return!0;q++;var x=this.createContactEquation(a,e,b,f);h(p,n,c),g.copy(x.normalA,o);var y=j(p,x.normalA);g.scale(p,x.normalA,y),h(x.contactPointB,n,e.position),h(x.contactPointA,n,p),h(x.contactPointA,x.contactPointA,a.position),this.contactEquations.push(x),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&q&&this.frictionEquations.push(this.createFrictionFromAverage(q)),q},d.prototype[q.PARTICLE|q.PLANE]=d.prototype.particlePlane=function(a,b,c,d,e,f,i,k,l){var m=t,n=u;k=k||0,h(m,c,i),g.rotate(n,s,k);var o=j(m,n);if(o>0)return 0;if(l)return!0;var p=this.createContactEquation(e,a,f,b);return g.copy(p.normalA,n),g.scale(m,p.normalA,o),h(p.contactPointA,c,m),h(p.contactPointA,p.contactPointA,e.position),h(p.contactPointB,c,a.position),this.contactEquations.push(p),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(p)),1},d.prototype[q.CIRCLE|q.PARTICLE]=d.prototype.circleParticle=function(a,b,c,d,e,f,j,k,l){var m=t;if(h(m,j,c),g.squaredLength(m)>Math.pow(b.radius,2))return 0;if(l)return!0;var n=this.createContactEquation(a,e,b,f);return g.copy(n.normalA,m),g.normalize(n.normalA,n.normalA),g.scale(n.contactPointA,n.normalA,b.radius),i(n.contactPointA,n.contactPointA,c),h(n.contactPointA,n.contactPointA,a.position),h(n.contactPointB,j,e.position),this.contactEquations.push(n),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(n)),1};var X=new o({radius:1}),Y=g.create(),Z=g.create();g.create();d.prototype[q.PLANE|q.CAPSULE]=d.prototype.planeCapsule=function(a,b,c,d,e,f,h,j,k){var l=Y,m=Z,n=X;g.set(l,-f.length/2,0),g.rotate(l,l,j),i(l,l,h),g.set(m,f.length/2,0),g.rotate(m,m,j),i(m,m,h),n.radius=f.radius;var o;this.enableFrictionReduction&&(o=this.enableFriction,this.enableFriction=!1);var p=this.circlePlane(e,n,l,0,a,b,c,d,k),q=this.circlePlane(e,n,m,0,a,b,c,d,k);if(this.enableFrictionReduction&&(this.enableFriction=o),k)return p||q;var r=p+q;return this.enableFrictionReduction&&r&&this.frictionEquations.push(this.createFrictionFromAverage(r)),r},d.prototype[q.CIRCLE|q.PLANE]=d.prototype.circlePlane=function(a,b,c,d,e,f,k,l,m){var n=a,o=b,p=c,q=e,r=k,w=l;w=w||0;var x=t,y=u,z=v;h(x,p,r),g.rotate(y,s,w);var A=j(y,x);if(A>o.radius)return 0;if(m)return!0;var B=this.createContactEquation(q,n,f,b);return g.copy(B.normalA,y),g.scale(B.contactPointB,B.normalA,-o.radius),i(B.contactPointB,B.contactPointB,p),h(B.contactPointB,B.contactPointB,n.position),g.scale(z,B.normalA,A),h(B.contactPointA,x,z),i(B.contactPointA,B.contactPointA,r),h(B.contactPointA,B.contactPointA,q.position),this.contactEquations.push(B),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(B)),1},d.prototype[q.CONVEX]=d.prototype[q.CONVEX|q.BOX]=d.prototype[q.BOX]=d.prototype.convexConvex=function(a,b,c,e,f,k,l,m,n,o){var p=t,q=u,r=v,s=w,y=x,C=z,D=A,E=B,F=0,o="number"==typeof o?o:0;if(!d.findSeparatingAxis(b,c,e,k,l,m,p))return 0;h(D,l,c),j(p,D)>0&&g.scale(p,p,-1);var G=d.getClosestEdge(b,e,p,!0),H=d.getClosestEdge(k,m,p);if(-1===G||-1===H)return 0;for(var I=0;I<2;I++){var J=G,K=H,L=b,M=k,N=c,O=l,P=e,Q=m,R=a,S=f;if(0===I){var T;T=J,J=K,K=T,T=L,L=M,M=T,T=N,N=O,O=T,T=P,P=Q,Q=T,T=R,R=S,S=T}for(var U=K;U=3){if(n)return!0;var _=this.createContactEquation(R,S,L,M);F++;var Y=L.vertices[J%L.vertices.length],Z=L.vertices[(J+1)%L.vertices.length];g.rotate(r,Y,P),g.rotate(s,Z,P),i(r,r,N),i(s,s,N),h(y,s,r),g.rotate90cw(_.normalA,y),g.normalize(_.normalA,_.normalA),h(D,q,r);var $=j(_.normalA,D);g.scale(C,_.normalA,$),h(_.contactPointA,q,N),h(_.contactPointA,_.contactPointA,C),i(_.contactPointA,_.contactPointA,N),h(_.contactPointA,_.contactPointA,R.position),h(_.contactPointB,q,O),i(_.contactPointB,_.contactPointB,O),h(_.contactPointB,_.contactPointB,S.position),this.contactEquations.push(_),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(_))}}}return this.enableFrictionReduction&&this.enableFriction&&F&&this.frictionEquations.push(this.createFrictionFromAverage(F)),F};var $=g.fromValues(0,0);d.projectConvexOntoAxis=function(a,b,c,d,e){var f,h,i=null,k=null,l=$;g.rotate(l,d,-c);for(var m=0;mi)&&(i=h),(null===k||hi){var n=k;k=i,i=n}var o=j(b,d);g.set(e,k+o,i+o)};var _=g.fromValues(0,0),aa=g.fromValues(0,0),ba=g.fromValues(0,0),ca=g.fromValues(0,0),da=g.fromValues(0,0),ea=g.fromValues(0,0);d.findSeparatingAxis=function(a,b,c,e,f,i,j){var k=null,l=!1,m=!1,n=_,o=aa,p=ba,q=ca,s=da,t=ea;if(a instanceof r&&e instanceof r)for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;2!==x;x++){0===x?g.set(q,0,1):1===x&&g.set(q,1,0),0!==w&&g.rotate(q,q,w),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}else for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;x!==v.vertices.length;x++){g.rotate(o,v.vertices[x],w),g.rotate(p,v.vertices[(x+1)%v.vertices.length],w),h(n,p,o),g.rotate90cw(q,n),g.normalize(q,q),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}return m};var fa=g.fromValues(0,0),ga=g.fromValues(0,0),ha=g.fromValues(0,0);d.getClosestEdge=function(a,b,c,d){var e=fa,f=ga,i=ha;g.rotate(e,c,-b),d&&g.scale(e,e,-1);for(var k=-1,l=a.vertices.length,m=-1,n=0;n!==l;n++){h(f,a.vertices[(n+1)%l],a.vertices[n%l]),g.rotate90cw(i,f),g.normalize(i,i);var o=j(i,e);(-1===k||o>m)&&(k=n%l,m=o)}return k};var ia=g.create(),ja=g.create(),ka=g.create(),la=g.create(),ma=g.create(),na=g.create(),oa=g.create();d.prototype[q.CIRCLE|q.HEIGHTFIELD]=d.prototype.circleHeightfield=function(a,b,c,d,e,f,j,k,l,m){var n=f.heights,m=m||b.radius,o=f.elementWidth,p=ja,q=ia,r=ma,s=oa,t=na,u=ka,v=la,w=Math.floor((c[0]-m-j[0])/o),x=Math.ceil((c[0]+m-j[0])/o);w<0&&(w=0),x>=n.length&&(x=n.length-1);for(var y=n[w],z=n[x],A=w;Ay&&(y=n[A]);if(c[1]-m>y)return!l&&0;for(var B=!1,A=w;A=u[0]&&q[0]0)for(var A=w;A<=x;A++)if(g.set(u,A*o,n[A]),g.add(u,u,j),g.sub(p,c,u),g.squaredLength(p)=k.length&&(r=k.length-1);for(var s=k[q],t=k[r],u=q;us&&(s=k[u]);if(a.aabb.lowerBound[1]>s)return!j&&0;for(var v=0,u=q;u=0||f.containsPoint(this.from))&&this.intersectBody(a,e)}};var g=f.create();d.prototype.intersectBody=function(a,b){var c=this.checkCollisionResponse;if(!c||b.collisionResponse)for(var d=g,e=0,h=b.shapes.length;eb.boundingRadius*b.boundingRadius||(this._currentBody=f,this._currentShape=b,b.raycast(a,this,d,c),this._currentBody=this._currentShape=null)},d.prototype.getAABB=function(a){var b=this.to,c=this.from;f.set(a.lowerBound,Math.min(b[0],c[0]),Math.min(b[1],c[1])),f.set(a.upperBound,Math.max(b[0],c[0]),Math.max(b[1],c[1]))};f.create();d.prototype.reportIntersection=function(a,b,c,e){var g=(this.from,this.to,this._currentShape),h=this._currentBody;if(!(this.skipBackfaces&&f.dot(c,this.direction)>0))switch(this.mode){case d.ALL:a.set(c,g,h,b,e),this.callback(a);break;case d.CLOSEST:(b=0&&!(a[f].aabb.lowerBound[b]<=e.aabb.lowerBound[b]);f--)a[f+1]=a[f];a[f+1]=e}return a},d.prototype.sortList=function(){var a=this.axisList,b=this.axisIndex;d.sortAxisList(a,b)},d.prototype.getCollisionPairs=function(a){var b=this.axisList,c=this.result,d=this.axisIndex;c.length=0;for(var e=b.length;e--;){var g=b[e];g.aabbNeedsUpdate&&g.updateAABB()}this.sortList();for(var h=0,i=0|b.length;h!==i;h++)for(var j=b[h],k=h+1;kthis.upperLimit&&(f.maxForce=0,f.minForce=-this.maxForce,this.distance=this.upperLimit,l=!0),this.lowerLimitEnabled&&this.positionc)h.scale(e.normalA,j,-1),h.sub(e.contactPointA,k,g.position),h.sub(e.contactPointB,l,i.position),h.scale(o,j,c),h.add(e.contactPointA,e.contactPointA,o),-1===a.indexOf(e)&&a.push(e);else{var u=a.indexOf(e);-1!==u&&a.splice(u,1)}if(this.lowerLimitEnabled&&sh)o.angle=h,-1===e.indexOf(o)&&e.push(o);else{var r=e.indexOf(o);-1!==r&&e.splice(r,1)}if(this.lowerLimitEnabled&&q>1;if(b<3)return[];for(var c=[],e=[],f=0;f3;){var h=e[(f+0)%g],i=e[(f+1)%g],j=e[(f+2)%g],k=a[2*h],l=a[2*h+1],m=a[2*i],n=a[2*i+1],o=a[2*j],p=a[2*j+1],q=!1;if(d._convex(k,l,m,n,o,p)){q=!0;for(var r=0;r3*g)break}return c.push(e[0],e[1],e[2]),c},d._PointInTriangle=function(a,b,c,d,e,f,g,h){var i=g-c,j=h-d,k=e-c,l=f-d,m=a-c,n=b-d,o=i*i+j*j,p=i*k+j*l,q=i*m+j*n,r=k*k+l*l,s=k*m+l*n,t=1/(o*r-p*p),u=(r*q-p*s)*t,v=(o*s-p*q)*t;return u>=0&&v>=0&&u+v<1},d._convex=function(a,b,c,d,e,f){return(b-d)*(e-c)+(c-a)*(f-d)>=0},b.exports=d},{}],30:[function(a,b,c){var d=b.exports={},e=a("../utils/Utils");d.crossLength=function(a,b){return a[0]*b[1]-a[1]*b[0]},d.crossVZ=function(a,b,c){return d.rotate(a,b,-Math.PI/2),d.scale(a,a,c),a},d.crossZV=function(a,b,c){return d.rotate(a,c,Math.PI/2),d.scale(a,a,b),a},d.rotate=function(a,b,c){if(0!==c){var d=Math.cos(c),e=Math.sin(c),f=b[0],g=b[1];a[0]=d*f-e*g,a[1]=e*f+d*g}else a[0]=b[0],a[1]=b[1]},d.rotate90cw=function(a,b){var c=b[0],d=b[1];a[0]=d,a[1]=-c},d.toLocalFrame=function(a,b,c,e){d.copy(a,b),d.sub(a,a,c),d.rotate(a,a,-e)},d.toGlobalFrame=function(a,b,c,e){d.copy(a,b),d.rotate(a,a,e),d.add(a,a,c)},d.vectorToLocalFrame=function(a,b,c){d.rotate(a,b,-c)},d.vectorToGlobalFrame=function(a,b,c){d.rotate(a,b,c)},d.centroid=function(a,b,c,e){return d.add(a,b,c),d.add(a,a,e),d.scale(a,a,1/3),a},d.create=function(){var a=new e.ARRAY_TYPE(2);return a[0]=0,a[1]=0,a},d.clone=function(a){var b=new e.ARRAY_TYPE(2);return b[0]=a[0],b[1]=a[1],b},d.fromValues=function(a,b){var c=new e.ARRAY_TYPE(2);return c[0]=a,c[1]=b,c},d.copy=function(a,b){return a[0]=b[0],a[1]=b[1],a},d.set=function(a,b,c){return a[0]=b,a[1]=c,a},d.add=function(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a},d.subtract=function(a,b,c){return a[0]=b[0]-c[0],a[1]=b[1]-c[1],a},d.sub=d.subtract,d.multiply=function(a,b,c){return a[0]=b[0]*c[0],a[1]=b[1]*c[1],a},d.mul=d.multiply,d.divide=function(a,b,c){return a[0]=b[0]/c[0],a[1]=b[1]/c[1],a},d.div=d.divide,d.scale=function(a,b,c){return a[0]=b[0]*c,a[1]=b[1]*c,a},d.distance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return Math.sqrt(c*c+d*d)},d.dist=d.distance,d.squaredDistance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return c*c+d*d},d.sqrDist=d.squaredDistance,d.length=function(a){var b=a[0],c=a[1];return Math.sqrt(b*b+c*c)},d.len=d.length,d.squaredLength=function(a){var b=a[0],c=a[1];return b*b+c*c},d.sqrLen=d.squaredLength,d.negate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a},d.normalize=function(a,b){var c=b[0],d=b[1],e=c*c+d*d;return e>0&&(e=1/Math.sqrt(e),a[0]=b[0]*e,a[1]=b[1]*e),a},d.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]},d.str=function(a){return"vec2("+a[0]+", "+a[1]+")"},d.lerp=function(a,b,c,d){var e=b[0],f=b[1];return a[0]=e+d*(c[0]-e),a[1]=f+d*(c[1]-f),a},d.reflect=function(a,b,c){var d=b[0]*c[0]+b[1]*c[1];a[0]=b[0]-2*c[0]*d,a[1]=b[1]-2*c[1]*d},d.getLineSegmentsIntersection=function(a,b,c,e,f){var g=d.getLineSegmentsIntersectionFraction(b,c,e,f);return!(g<0)&&(a[0]=b[0]+g*(c[0]-b[0]),a[1]=b[1]+g*(c[1]-b[1]),!0)},d.getLineSegmentsIntersectionFraction=function(a,b,c,d){var e,f,g=b[0]-a[0],h=b[1]-a[1],i=d[0]-c[0],j=d[1]-c[1];return e=(-h*(a[0]-c[0])+g*(a[1]-c[1]))/(-i*h+g*j),f=(i*(a[1]-c[1])-j*(a[0]-c[0]))/(-i*h+g*j),e>=0&&e<=1&&f>=0&&f<=1?f:-1}},{"../utils/Utils":57}],31:[function(a,b,c){function d(a){a=a||{},k.call(this),this.id=a.id||++d._idCounter,this.world=null,this.shapes=[],this.mass=a.mass||0,this.invMass=0,this.inertia=0,this.invInertia=0,this.invMassSolve=0,this.invInertiaSolve=0,this.fixedRotation=!!a.fixedRotation,this.fixedX=!!a.fixedX,this.fixedY=!!a.fixedY,this.massMultiplier=e.create(),this.position=e.fromValues(0,0),a.position&&e.copy(this.position,a.position),this.interpolatedPosition=e.fromValues(0,0),this.interpolatedAngle=0,this.previousPosition=e.fromValues(0,0),this.previousAngle=0,this.velocity=e.fromValues(0,0),a.velocity&&e.copy(this.velocity,a.velocity),this.vlambda=e.fromValues(0,0),this.wlambda=0,this.angle=a.angle||0,this.angularVelocity=a.angularVelocity||0,this.force=e.create(),a.force&&e.copy(this.force,a.force),this.angularForce=a.angularForce||0,this.damping="number"==typeof a.damping?a.damping:.1,this.angularDamping="number"==typeof a.angularDamping?a.angularDamping:.1,this.type=d.STATIC,void 0!==a.type?this.type=a.type:a.mass?this.type=d.DYNAMIC:this.type=d.STATIC,this.boundingRadius=0,this.aabb=new j,this.aabbNeedsUpdate=!0,this.allowSleep=void 0===a.allowSleep||a.allowSleep,this.wantsToSleep=!1,this.sleepState=d.AWAKE,this.sleepSpeedLimit=void 0!==a.sleepSpeedLimit?a.sleepSpeedLimit:.2,this.sleepTimeLimit=void 0!==a.sleepTimeLimit?a.sleepTimeLimit:1,this.gravityScale=void 0!==a.gravityScale?a.gravityScale:1,this.collisionResponse=void 0===a.collisionResponse||a.collisionResponse,this.idleTime=0,this.timeLastSleepy=0, +this.ccdSpeedThreshold=void 0!==a.ccdSpeedThreshold?a.ccdSpeedThreshold:-1,this.ccdIterations=void 0!==a.ccdIterations?a.ccdIterations:10,this.concavePath=null,this._wakeUpAfterNarrowphase=!1,this.updateMassProperties()}var e=a("../math/vec2"),f=a("poly-decomp"),g=a("../shapes/Convex"),h=a("../collision/RaycastResult"),i=a("../collision/Ray"),j=a("../collision/AABB"),k=a("../events/EventEmitter");b.exports=d,d.prototype=new k,d.prototype.constructor=d,d._idCounter=0,d.prototype.updateSolveMassProperties=function(){this.sleepState===d.SLEEPING||this.type===d.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve=0):(this.invMassSolve=this.invMass,this.invInertiaSolve=this.invInertia)},d.prototype.setDensity=function(a){var b=this.getArea();this.mass=b*a,this.updateMassProperties()},d.prototype.getArea=function(){for(var a=0,b=0;bc&&(c=g+h)}this.boundingRadius=c},d.prototype.addShape=function(a,b,c){if(a.body)throw new Error("A shape can only be added to one body.");a.body=this,b?e.copy(a.position,b):e.set(a.position,0,0),a.angle=c||0,this.shapes.push(a),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},d.prototype.removeShape=function(a){var b=this.shapes.indexOf(a);return-1!==b&&(this.shapes.splice(b,1),this.aabbNeedsUpdate=!0,a.body=null,!0)},d.prototype.updateMassProperties=function(){if(this.type===d.STATIC||this.type===d.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var a=this.shapes,b=a.length,c=this.mass/b,f=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var g=0;g0?1/f:0}this.invMass=1/this.mass,e.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}};e.create();d.prototype.applyForce=function(a,b){if(e.add(this.force,this.force,a),b){var c=e.crossLength(b,a);this.angularForce+=c}};var n=e.create(),o=e.create(),p=e.create();d.prototype.applyForceLocal=function(a,b){b=b||p;var c=n,d=o;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyForce(c,d)};var q=e.create();d.prototype.applyImpulse=function(a,b){if(this.type===d.DYNAMIC){var c=q;if(e.scale(c,a,this.invMass),e.multiply(c,this.massMultiplier,c),e.add(this.velocity,c,this.velocity),b){var f=e.crossLength(b,a);f*=this.invInertia,this.angularVelocity+=f}}};var r=e.create(),s=e.create(),t=e.create();d.prototype.applyImpulseLocal=function(a,b){b=b||t;var c=r,d=s;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyImpulse(c,d)},d.prototype.toLocalFrame=function(a,b){e.toLocalFrame(a,b,this.position,this.angle)},d.prototype.toWorldFrame=function(a,b){e.toGlobalFrame(a,b,this.position,this.angle)},d.prototype.vectorToLocalFrame=function(a,b){e.vectorToLocalFrame(a,b,this.angle)},d.prototype.vectorToWorldFrame=function(a,b){e.vectorToGlobalFrame(a,b,this.angle)},d.prototype.fromPolygon=function(a,b){b=b||{};for(var c=this.shapes.length;c>=0;--c)this.removeShape(this.shapes[c]);var d=new f.Polygon;if(d.vertices=a,d.makeCCW(),"number"==typeof b.removeCollinearPoints&&d.removeCollinearPoints(b.removeCollinearPoints),void 0===b.skipSimpleCheck&&!d.isSimple())return!1;this.concavePath=d.vertices.slice(0);for(var c=0;c=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=d.AWAKE):(this.idleTime+=c,this.sleepState=d.SLEEPY),this.idleTime>this.sleepTimeLimit&&(b?this.wantsToSleep=!0:this.sleep())}},d.prototype.overlaps=function(a){return this.world.overlapKeeper.bodiesAreOverlapping(this,a)};var x=e.create(),y=e.create();d.prototype.integrate=function(a){var b=this.invMass,c=this.force,d=this.position,f=this.velocity;e.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*a),e.scale(x,c,a*b),e.multiply(x,this.massMultiplier,x),e.add(f,x,f),this.integrateToTimeOfImpact(a)||(e.scale(y,f,a),e.add(d,d,y),this.fixedRotation||(this.angle+=this.angularVelocity*a)),this.aabbNeedsUpdate=!0};var z=new h,A=new i({mode:i.ALL}),B=e.create(),C=e.create(),D=e.create(),E=e.create();d.prototype.integrateToTimeOfImpact=function(a){if(this.ccdSpeedThreshold<0||e.squaredLength(this.velocity)=j&&i=0&&(f.rotate(n,l,d),f.scale(n,n,2*r-1),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}for(var u=Math.pow(this.radius,2)+Math.pow(q,2),r=0;r<2;r++){f.set(o,q*(2*r-1),0),f.toGlobalFrame(o,o,c,d);var v=Math.pow(g[0]-e[0],2)+Math.pow(g[1]-e[1],2),w=2*((g[0]-e[0])*(e[0]-o[0])+(g[1]-e[1])*(e[1]-o[1])),x=Math.pow(e[0]-o[0],2)+Math.pow(e[1]-o[1],2)-Math.pow(this.radius,2),t=Math.pow(w,2)-4*v*x;if(!(t<0))if(0===t){if(f.lerp(m,e,g,t),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}else{var y=Math.sqrt(t),z=1/(2*v),A=(-w-y)*z,B=(-w+y)*z;if(A>=0&&A<=1&&(f.lerp(m,e,g,A),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,A,n,-1),a.shouldStop(b))))return;if(B>=0&&B<=1&&(f.lerp(m,e,g,B),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,B,n,-1),a.shouldStop(b))))return}}}},{"../math/vec2":30,"./Shape":45}],39:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),a=a||{},this.radius=a.radius||1,a.type=e.CIRCLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){var b=this.radius;return a*b*b/2},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},d.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},d.prototype.computeAABB=function(a,b,c){var d=this.radius;f.set(a.upperBound,d,d),f.set(a.lowerBound,-d,-d),b&&(f.add(a.lowerBound,a.lowerBound,b),f.add(a.upperBound,a.upperBound,b))};var g=f.create(),h=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,i=b.to,j=this.radius,k=Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2),l=2*((i[0]-e[0])*(e[0]-c[0])+(i[1]-e[1])*(e[1]-c[1])),m=Math.pow(e[0]-c[0],2)+Math.pow(e[1]-c[1],2)-Math.pow(j,2),n=Math.pow(l,2)-4*k*m,o=g,p=h;if(!(n<0))if(0===n)f.lerp(o,e,i,n),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,n,p,-1);else{var q=Math.sqrt(n),r=1/(2*k),s=(-l-q)*r,t=(-l+q)*r;if(s>=0&&s<=1&&(f.lerp(o,e,i,s),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,s,p,-1),a.shouldStop(b)))return;t>=0&&t<=1&&(f.lerp(o,e,i,t),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,t,p,-1))}}},{"../math/vec2":30,"./Shape":45}],40:[function(a,b,c){function d(a){Array.isArray(arguments[0])&&(a={vertices:arguments[0],axes:arguments[1]},console.warn("The Convex constructor signature has changed. Please use the following format: new Convex({ vertices: [...], ... })")),a=a||{},this.vertices=[];for(var b=void 0!==a.vertices?a.vertices:[],c=0;ce)&&(e=d),(null===g||de){var j=g;g=e,e=j}f.set(b,g,e)},d.prototype.projectOntoWorldAxis=function(a,b,c,d){var e=i;this.projectOntoLocalAxis(a,d),0!==c?f.rotate(e,a,c):e=a;var g=f.dot(b,e);f.set(d,d[0]+g,d[1]+g)},d.prototype.updateTriangles=function(){this.triangles.length=0;for(var a=[],b=0;bb&&(b=d)}this.boundingRadius=Math.sqrt(b)},d.triangleArea=function(a,b,c){return.5*((b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1]))},d.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var a=this.triangles,b=this.vertices,c=0;c!==a.length;c++){var e=a[c],f=b[e[0]],g=b[e[1]],h=b[e[2]],i=d.triangleArea(f,g,h);this.area+=i}},d.prototype.computeAABB=function(a,b,c){a.setFromPoints(this.vertices,b,c,0)};var o=f.create(),p=f.create(),q=f.create();d.prototype.raycast=function(a,b,c,d){var e=o,g=p,h=q,i=this.vertices;f.toLocalFrame(e,b.from,c,d),f.toLocalFrame(g,b.to,c,d);for(var j=i.length,k=0;k=0&&(f.sub(h,m,l),f.rotate(h,h,-Math.PI/2+d),f.normalize(h,h),b.reportIntersection(a,n,h,k))}}},{"../math/polyk":29,"../math/vec2":30,"./Shape":45,"poly-decomp":5}],41:[function(a,b,c){function d(a){if(Array.isArray(arguments[0])){if(a={heights:arguments[0]},"object"==typeof arguments[1])for(var b in arguments[1])a[b]=arguments[1][b];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}a=a||{},this.heights=a.heights?a.heights.slice(0):[],this.maxValue=a.maxValue||null,this.minValue=a.minValue||null,this.elementWidth=a.elementWidth||.1,void 0!==a.maxValue&&void 0!==a.minValue||this.updateMaxMinValues(),a.type=e.HEIGHTFIELD,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.updateMaxMinValues=function(){for(var a=this.heights,b=a[0],c=a[0],d=0;d!==a.length;d++){var e=a[d];e>b&&(b=e),es){var t=r;r=s,s=t}for(var u=0;u=0&&(f.sub(m,o,n),f.rotate(m,m,d+Math.PI/2),f.normalize(m,m),b.reportIntersection(a,v,m,-1),a.shouldStop(b)))return}}},{"../math/vec2":30,"../utils/Utils":57,"./Shape":45}],42:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),a=a||{},this.length=a.length||1,a.type=e.LINE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return a*Math.pow(this.length,2)/12},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var g=[f.create(),f.create()];d.prototype.computeAABB=function(a,b,c){var d=this.length/2;f.set(g[0],-d,0),f.set(g[1],d,0),a.setFromPoints(g,b,c,0)};var h=(f.create(),f.create()),i=f.create(),j=f.create(),k=f.fromValues(0,1);d.prototype.raycast=function(a,b,c,d){var e=b.from,g=b.to,l=i,m=j,n=this.length/2;f.set(l,-n,0),f.set(m,n,0),f.toGlobalFrame(l,l,c,d),f.toGlobalFrame(m,m,c,d);var o=f.getLineSegmentsIntersectionFraction(l,m,e,g);if(o>=0){var p=h;f.rotate(p,k,d),b.reportIntersection(a,o,p,-1)}}},{"../math/vec2":30,"./Shape":45}],43:[function(a,b,c){function d(a){a=a||{},a.type=e.PARTICLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=0},d.prototype.computeAABB=function(a,b,c){f.copy(a.lowerBound,b),f.copy(a.upperBound,b)}},{"../math/vec2":30,"./Shape":45}],44:[function(a,b,c){function d(a){a=a||{},a.type=e.PLANE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=Number.MAX_VALUE},d.prototype.computeAABB=function(a,b,c){var d=c%(2*Math.PI),e=f.set,g=Number.MAX_VALUE,h=a.lowerBound,i=a.upperBound;0===d?(e(h,-g,-g),e(i,g,0)):d===Math.PI/2?(e(h,0,-g),e(i,g,g)):d===Math.PI?(e(h,-g,0),e(i,g,g)):d===3*Math.PI/2?(e(h,-g,-g),e(i,0,g)):(e(h,-g,-g),e(i,g,g)),f.add(h,h,b),f.add(i,i,b)},d.prototype.updateArea=function(){this.area=Number.MAX_VALUE};var g=f.create(),h=(f.create(),f.create(),f.create()),i=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,j=b.to,k=b.direction,l=g,m=h,n=i;f.set(m,0,1),f.rotate(m,m,d),f.sub(n,e,c);var o=f.dot(n,m);if(f.sub(n,j,c),!(o*f.dot(n,m)>0||f.squaredDistance(e,j)n*h&&(p=n*h-l),f[a]+=p,b.addToWlambda(p),p}},{"../equations/FrictionEquation":23,"../math/vec2":30,"../utils/Utils":57,"./Solver":47}],47:[function(a,b,c){function d(a,b){a=a||{},e.call(this),this.type=b,this.equations=[],this.equationSortFunction=a.equationSortFunction||!1}var e=(a("../utils/Utils"),a("../events/EventEmitter"));b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.solve=function(a,b){throw new Error("Solver.solve should be implemented by subclasses!")};var f={bodies:[]};d.prototype.solveIsland=function(a,b){this.removeAllEquations(),b.equations.length&&(this.addEquations(b.equations),f.bodies.length=0,b.getBodies(f.bodies),f.bodies.length&&this.solve(a,f))},d.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},d.prototype.addEquation=function(a){a.enabled&&this.equations.push(a)},d.prototype.addEquations=function(a){for(var b=0,c=a.length;b!==c;b++){var d=a[b];d.enabled&&this.equations.push(d)}},d.prototype.removeEquation=function(a){var b=this.equations.indexOf(a);-1!==b&&this.equations.splice(b,1)},d.prototype.removeAllEquations=function(){this.equations.length=0},d.GS=1,d.ISLAND=2},{"../events/EventEmitter":26,"../utils/Utils":57}],48:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/ContactEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/ContactEquation":21,"./Pool":55}],49:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/FrictionEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/FrictionEquation":23,"./Pool":55}],50:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/IslandNode"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/IslandNode":60,"./Pool":55}],51:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/Island"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/Island":58,"./Pool":55}],52:[function(a,b,c){function d(){this.overlappingShapesLastState=new e,this.overlappingShapesCurrentState=new e,this.recordPool=new f({size:16}),this.tmpDict=new e,this.tmpArray1=[]}var e=a("./TupleDictionary"),f=(a("./OverlapKeeperRecord"),a("./OverlapKeeperRecordPool"));a("./Utils");b.exports=d,d.prototype.tick=function(){for(var a=this.overlappingShapesLastState,b=this.overlappingShapesCurrentState,c=a.keys.length;c--;){var d=a.keys[c],e=a.getByKey(d);b.getByKey(d);e&&this.recordPool.release(e)}a.reset(),a.copy(b),b.reset()},d.prototype.setOverlapping=function(a,b,c,d){var e=(this.overlappingShapesLastState,this.overlappingShapesCurrentState);if(!e.get(b.id,d.id)){var f=this.recordPool.get();f.set(a,b,c,d),e.set(b.id,d.id,f)}},d.prototype.getNewOverlaps=function(a){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,a)},d.prototype.getEndOverlaps=function(a){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,a)},d.prototype.bodiesAreOverlapping=function(a,b){for(var c=this.overlappingShapesCurrentState,d=c.keys.length;d--;){var e=c.keys[d],f=c.data[e];if(f.bodyA===a&&f.bodyB===b||f.bodyA===b&&f.bodyB===a)return!0}return!1},d.prototype.getDiff=function(a,b,c){var c=c||[],d=a,e=b;c.length=0;for(var f=e.keys.length;f--;){var g=e.keys[f],h=e.data[g];if(!h)throw new Error("Key "+g+" had no data!");d.data[g]||c.push(h)}return c},d.prototype.isNewOverlap=function(a,b){var c=0|a.id,d=0|b.id,e=this.overlappingShapesLastState,f=this.overlappingShapesCurrentState;return!e.get(c,d)&&!!f.get(c,d)},d.prototype.getNewBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getEndBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getBodyDiff=function(a,b){b=b||[];for(var c=this.tmpDict,d=a.length;d--;){var e=a[d];c.set(0|e.bodyA.id,0|e.bodyB.id,e)}for(d=c.keys.length;d--;){var e=c.getByKey(c.keys[d]);e&&b.push(e.bodyA,e.bodyB)}return c.reset(),b}},{"./OverlapKeeperRecord":53,"./OverlapKeeperRecordPool":54,"./TupleDictionary":56,"./Utils":57}],53:[function(a,b,c){function d(a,b,c,d){this.shapeA=b,this.shapeB=d,this.bodyA=a,this.bodyB=c}b.exports=d,d.prototype.set=function(a,b,c,e){d.call(this,a,b,c,e)}},{}],54:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("./OverlapKeeperRecord"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=a.shapeA=a.shapeB=null,this}},{"./OverlapKeeperRecord":53,"./Pool":55}],55:[function(a,b,c){function d(a){a=a||{},this.objects=[],void 0!==a.size&&this.resize(a.size)}b.exports=d,d.prototype.resize=function(a){for(var b=this.objects;b.length>a;)b.pop();for(;b.length(0|b)?a<<16|65535&b:b<<16|65535&a)},d.prototype.getByKey=function(a){return a|=0,this.data[a]},d.prototype.get=function(a,b){return this.data[this.getKey(a,b)]},d.prototype.set=function(a,b,c){if(!c)throw new Error("No data!");var d=this.getKey(a,b);return this.data[d]||this.keys.push(d),this.data[d]=c,d},d.prototype.reset=function(){for(var a=this.data,b=this.keys,c=b.length;c--;)delete a[b[c]];b.length=0},d.prototype.copy=function(a){this.reset(),e.appendArray(this.keys,a.keys);for(var b=a.keys.length;b--;){var c=a.keys[b];this.data[c]=a.data[c]}}},{"./Utils":57}],57:[function(a,b,c){function d(){}b.exports=d,d.appendArray=function(a,b){if(b.length<15e4)a.push.apply(a,b);else for(var c=0,d=b.length;c!==d;++c)a.push(b[c])},d.splice=function(a,b,c){c=c||1;for(var d=b,e=a.length-c;d=a&&d=0;r-=2)for(var A=x.length-2;A>=0;A-=2)(z[r]===x[A]&&z[r+1]===x[A+1]||z[r+1]===x[A]&&z[r]===x[A+1])&&x.splice(A,2);var B=l.length;for(r=0;r!==B;r++){var C=l[r];if(!C.collideConnected)for(var A=x.length-2;A>=0;A-=2)(C.bodyA===x[A]&&C.bodyB===x[A+1]||C.bodyB===x[A]&&C.bodyA===x[A+1])&&x.splice(A,2)}this.postBroadphaseEvent.pairs=x,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,k.reset(this);for(var r=0,D=x.length;r!==D;r+=2)for(var E=x[r],F=x[r+1],G=0,H=E.shapes.length;G!==H;G++)for(var I=E.shapes[G],J=I.position,K=I.angle,L=0,M=F.shapes.length;L!==M;L++){var N=F.shapes[L],O=N.position,P=N.angle,Q=this.defaultContactMaterial;if(I.material&&N.material){var R=this.getContactMaterial(I.material,N.material);R&&(Q=R)}this.runNarrowphase(k,E,I,J,K,F,N,O,P,Q,this.frictionGravity)}for(var r=0;r!==i;r++){var S=e[r];S._wakeUpAfterNarrowphase&&(S.wakeUp(),S._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(y);for(var T=this.endContactEvent,L=y.length;L--;){var U=y[L];T.shapeA=U.shapeA,T.shapeB=U.shapeB,T.bodyA=U.bodyA,T.bodyB=U.bodyB,this.emit(T)}y.length=0}var V=this.preSolveEvent;V.contactEquations=k.contactEquations,V.frictionEquations=k.frictionEquations,this.emit(V),V.contactEquations=V.frictionEquations=null;var B=l.length;for(r=0;r!==B;r++)l[r].update();if(k.contactEquations.length||k.frictionEquations.length||B)if(this.islandSplit){for(p.equations.length=0,s.appendArray(p.equations,k.contactEquations),s.appendArray(p.equations,k.frictionEquations),r=0;r!==B;r++)s.appendArray(p.equations,l[r].equations);p.split(this);for(var r=0;r!==p.islands.length;r++){var W=p.islands[r];W.equations.length&&h.solveIsland(a,W)}}else{for(h.addEquations(k.contactEquations),h.addEquations(k.frictionEquations),r=0;r!==B;r++)h.addEquations(l[r].equations);this.solveConstraints&&h.solve(a,this),h.removeAllEquations()}for(var r=0;r!==i;r++){var S=e[r];S.integrate(a)}for(var r=0;r!==i;r++)e[r].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,r=0;r!==k.contactEquations.length;r++){var Y=k.contactEquations[r];Y.firstImpact&&(X.bodyA=Y.bodyA,X.bodyB=Y.bodyB,X.shapeA=Y.shapeA,X.shapeB=Y.shapeB,X.contactEquation=Y,this.emit(X))}if(this.sleepMode===d.BODY_SLEEPING)for(r=0;r!==i;r++)e[r].sleepTick(this.time,!1,a);else if(this.sleepMode===d.ISLAND_SLEEPING&&this.islandSplit){for(r=0;r!==i;r++)e[r].sleepTick(this.time,!0,a);for(var r=0;r0,a.frictionCoefficient=k.friction;var p;p=b.type===m.STATIC||b.type===m.KINEMATIC?g.mass:g.type===m.STATIC||g.type===m.KINEMATIC?b.mass:b.mass*g.mass/(b.mass+g.mass),a.slipForce=k.friction*l*p,a.restitution=k.restitution,a.surfaceVelocity=k.surfaceVelocity,a.frictionStiffness=k.frictionStiffness,a.frictionRelaxation=k.frictionRelaxation,a.stiffness=k.stiffness,a.relaxation=k.relaxation,a.contactSkinSize=k.contactSkinSize,a.enabledEquations=b.collisionResponse&&g.collisionResponse&&c.collisionResponse&&h.collisionResponse;var q=a[c.type|h.type],r=0;if(q){var s=c.sensor||h.sensor,t=a.frictionEquations.length;r=c.type=2*Math.pow(g.sleepSpeedLimit,2)&&(b._wakeUpAfterNarrowphase=!0)}if(g.allowSleep&&g.type===m.DYNAMIC&&g.sleepState===m.SLEEPING&&b.sleepState===m.AWAKE&&b.type!==m.STATIC){f.squaredLength(b.velocity)+Math.pow(b.angularVelocity,2)>=2*Math.pow(b.sleepSpeedLimit,2)&&(g._wakeUpAfterNarrowphase=!0)}if(this.overlapKeeper.setOverlapping(b,c,g,h),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(c,h)){var v=this.beginContactEvent;if(v.shapeA=c,v.shapeB=h,v.bodyA=b,v.bodyB=g,v.contactEquations.length=0,"number"==typeof r)for(var y=a.contactEquations.length-r;y1)for(var y=a.frictionEquations.length-u;y=0;b--)this.removeConstraint(a[b]);for(var c=this.bodies,b=c.length-1;b>=0;b--)this.removeBody(c[b]);for(var e=this.springs,b=e.length-1;b>=0;b--)this.removeSpring(e[b]);for(var f=this.contactMaterials,b=f.length-1;b>=0;b--)this.removeContactMaterial(f[b]);d.apply(this)};var z=f.create(),A=(f.fromValues(0,0),f.fromValues(0,0));d.prototype.hitTest=function(a,b,c){c=c||0;var d=new m({position:a}),e=new k,l=a,n=z,o=A;d.addShape(e);for(var p=this.narrowphase,q=[],r=0,s=b.length;r!==s;r++)for(var t=b[r],u=0,v=t.shapes.length;u!==v;u++){var w=t.shapes[u];f.rotate(n,w.position,t.angle),f.add(n,n,t.position);var x=w.angle+t.angle;(w instanceof g&&p.circleParticle(t,w,n,x,d,e,l,0,!0)||w instanceof h&&p.particleConvex(d,e,l,0,t,w,n,x,!0)||w instanceof i&&p.particlePlane(d,e,l,0,t,w,n,x,!0)||w instanceof j&&p.particleCapsule(d,e,l,0,t,w,n,x,!0)||w instanceof k&&f.squaredLength(f.sub(o,n,a))=0&&b<=this.children.length)return a.parent&&a.parent.removeChild(a),a.parent=this,this.children.splice(b,0,a),a;throw new Error(a+"addChildAt: The index "+b+" supplied is out of bounds "+this.children.length)},b.DisplayObjectContainer.prototype.swapChildren=function(a,b){if(a!==b){var c=this.getChildIndex(a),d=this.getChildIndex(b);if(c<0||d<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");this.children[c]=b,this.children[d]=a}},b.DisplayObjectContainer.prototype.getChildIndex=function(a){var b=this.children.indexOf(a);if(-1===b)throw new Error("The supplied DisplayObject must be a child of the caller");return b},b.DisplayObjectContainer.prototype.setChildIndex=function(a,b){if(b<0||b>=this.children.length)throw new Error("The supplied index is out of bounds");var c=this.getChildIndex(a);this.children.splice(c,1),this.children.splice(b,0,a)},b.DisplayObjectContainer.prototype.getChildAt=function(a){if(a<0||a>=this.children.length)throw new Error("getChildAt: Supplied index "+a+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[a]},b.DisplayObjectContainer.prototype.removeChild=function(a){var b=this.children.indexOf(a);if(-1!==b)return this.removeChildAt(b)},b.DisplayObjectContainer.prototype.removeChildAt=function(a){var b=this.getChildAt(a);return b&&(b.parent=void 0,this.children.splice(a,1)),b},b.DisplayObjectContainer.prototype.removeChildren=function(a,b){void 0===a&&(a=0),void 0===b&&(b=this.children.length);var c=b-a;if(c>0&&c<=b){for(var d=this.children.splice(a,c),e=0;eh?l:h,m=m>i?m:i)}var o=this._bounds;if(!n){o=new b.Rectangle;var p=o.x,q=o.width+o.x,r=o.y,s=o.height+o.y,t=this.worldTransform,u=t.a,v=t.b,w=t.c,x=t.d,y=t.tx,z=t.ty,A=u*q+w*s+y,B=x*s+v*q+z,C=u*p+w*s+y,D=x*s+v*p+z,E=u*p+w*r+y,F=x*r+v*p+z,G=u*q+w*r+y,H=x*r+v*q+z;l=A,m=B,j=A,k=B,j=Cl?C:l,l=E>l?E:l,l=G>l?G:l,m=D>m?D:m,m=F>m?F:m,m=H>m?H:m}if(o.x=j,o.y=k,o.width=l-j,o.height=m-k,c)for(a.worldTransform=f,e=0;eo?t:o,o=v>o?v:o,o=x>o?x:o,o=z>o?z:o,p=u>p?u:p,p=w>p?w:p,p=y>p?y:p,p=A>p?A:p}var B=this._bounds;return B.x=q,B.width=o-q,B.y=r,B.height=p-r,this._currentBounds=B,B},b.Sprite.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=b.identityMatrix;for(var c=0;c>16&255)/255,(a>>8&255)/255,(255&a)/255]},b.rgb2hex=function(a){return(255*a[0]<<16)+(255*a[1]<<8)+255*a[2]},b.canUseNewCanvasBlendModes=function(){if(void 0===document)return!1;var a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",c="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",d=new Image;d.src=a+"AP804Oa6"+c;var e=new Image;e.src=a+"/wCKxvRF"+c;var f=b.CanvasPool.create(this,6,1),g=f.getContext("2d");if(g.globalCompositeOperation="multiply",g.drawImage(d,0,0),g.drawImage(e,2,0),!g.getImageData(2,0,1,1))return!1;var h=g.getImageData(2,0,1,1).data;return b.CanvasPool.remove(this),255===h[0]&&0===h[1]&&0===h[2]},b.getNextPowerOfTwo=function(a){if(a>0&&0==(a&a-1))return a;for(var b=1;b0&&0==(a&a-1)&&b>0&&0==(b&b-1)},b.CanvasPool={create:function(a,c,d){var e,f=b.CanvasPool.getFirst();if(-1===f){var g={parent:a,canvas:document.createElement("canvas")};b.CanvasPool.pool.push(g),e=g.canvas}else b.CanvasPool.pool[f].parent=a,e=b.CanvasPool.pool[f].canvas;return void 0!==c&&(e.width=c,e.height=d),e},getFirst:function(){for(var a=b.CanvasPool.pool,c=0;c=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture);var e=c._uvs;if(e){var f,g,h,i,j=a.anchor.x,k=a.anchor.y;if(c.trim){var l=c.trim;g=l.x-j*l.width,f=g+c.crop.width,i=l.y-k*l.height,h=i+c.crop.height}else f=c.frame.width*(1-j),g=c.frame.width*-j,h=c.frame.height*(1-k),i=c.frame.height*-k;var m=4*this.currentBatchSize*this.vertSize,n=c.baseTexture.resolution,o=d.a/n,p=d.b/n,q=d.c/n,r=d.d/n,s=d.tx,t=d.ty,u=this.colors,v=this.positions;this.renderSession.roundPixels?(v[m]=o*g+q*i+s|0,v[m+1]=r*i+p*g+t|0,v[m+5]=o*f+q*i+s|0,v[m+6]=r*i+p*f+t|0,v[m+10]=o*f+q*h+s|0,v[m+11]=r*h+p*f+t|0,v[m+15]=o*g+q*h+s|0,v[m+16]=r*h+p*g+t|0):(v[m]=o*g+q*i+s,v[m+1]=r*i+p*g+t,v[m+5]=o*f+q*i+s,v[m+6]=r*i+p*f+t,v[m+10]=o*f+q*h+s,v[m+11]=r*h+p*f+t,v[m+15]=o*g+q*h+s,v[m+16]=r*h+p*g+t),v[m+2]=e.x0,v[m+3]=e.y0,v[m+7]=e.x1,v[m+8]=e.y1,v[m+12]=e.x2,v[m+13]=e.y2,v[m+17]=e.x3,v[m+18]=e.y3;var w=a.tint;u[m+4]=u[m+9]=u[m+14]=u[m+19]=(w>>16)+(65280&w)+((255&w)<<16)+(255*a.worldAlpha<<24),this.sprites[this.currentBatchSize++]=a}},b.WebGLSpriteBatch.prototype.renderTilingSprite=function(a){var c=a.tilingTexture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture),a._uvs||(a._uvs=new b.TextureUvs);var d=a._uvs,e=c.baseTexture.width,f=c.baseTexture.height;a.tilePosition.x%=e*a.tileScaleOffset.x,a.tilePosition.y%=f*a.tileScaleOffset.y;var g=a.tilePosition.x/(e*a.tileScaleOffset.x),h=a.tilePosition.y/(f*a.tileScaleOffset.y),i=a.width/e/(a.tileScale.x*a.tileScaleOffset.x),j=a.height/f/(a.tileScale.y*a.tileScaleOffset.y);d.x0=0-g,d.y0=0-h,d.x1=1*i-g,d.y1=0-h,d.x2=1*i-g,d.y2=1*j-h,d.x3=0-g,d.y3=1*j-h;var k=a.tint,l=(k>>16)+(65280&k)+((255&k)<<16)+(255*a.worldAlpha<<24),m=this.positions,n=this.colors,o=a.width,p=a.height,q=a.anchor.x,r=a.anchor.y,s=o*(1-q),t=o*-q,u=p*(1-r),v=p*-r,w=4*this.currentBatchSize*this.vertSize,x=c.baseTexture.resolution,y=a.worldTransform,z=y.a/x,A=y.b/x,B=y.c/x,C=y.d/x,D=y.tx,E=y.ty;m[w++]=z*t+B*v+D,m[w++]=C*v+A*t+E,m[w++]=d.x0,m[w++]=d.y0,n[w++]=l,m[w++]=z*s+B*v+D,m[w++]=C*v+A*s+E,m[w++]=d.x1,m[w++]=d.y1,n[w++]=l,m[w++]=z*s+B*u+D,m[w++]=C*u+A*s+E,m[w++]=d.x2,m[w++]=d.y2,n[w++]=l,m[w++]=z*t+B*u+D,m[w++]=C*u+A*t+E,m[w++]=d.x3,m[w++]=d.y3,n[w++]=l,this.sprites[this.currentBatchSize++]=a},b.WebGLSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a,c=this.gl;if(this.dirty){this.dirty=!1,c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a=this.defaultShader.shaders[c.id];var d=4*this.vertSize;c.vertexAttribPointer(a.aVertexPosition,2,c.FLOAT,!1,d,0),c.vertexAttribPointer(a.aTextureCoord,2,c.FLOAT,!1,d,8),c.vertexAttribPointer(a.colorAttribute,4,c.UNSIGNED_BYTE,!0,d,16)}if(this.currentBatchSize>.5*this.size)c.bufferSubData(c.ARRAY_BUFFER,0,this.vertices);else{var e=this.positions.subarray(0,4*this.currentBatchSize*this.vertSize);c.bufferSubData(c.ARRAY_BUFFER,0,e)}for(var f,g,h,i,j=0,k=0,l=null,m=this.renderSession.blendModeManager.currentBlendMode,n=null,o=!1,p=!1,q=0,r=this.currentBatchSize;q0&&(s=!1),(l!==f&&!s||o||p)&&(this.renderBatch(l,j,k),k=q,j=0,l=f,o&&(m=g,this.renderSession.blendModeManager.setBlendMode(m)),p)){n=h,a=n.shaders[c.id],a||(a=new b.PixiShader(c),a.fragmentSrc=n.fragmentSrc,a.uniforms=n.uniforms,a.init(),n.shaders[c.id]=a),this.renderSession.shaderManager.setShader(a),a.dirty&&a.syncUniforms();var t=this.renderSession.projection;c.uniform2f(a.projectionVector,t.x,t.y);var u=this.renderSession.offset;c.uniform2f(a.offsetVector,u.x,u.y)}j++}this.renderBatch(l,j,k),this.currentBatchSize=0}},b.WebGLSpriteBatch.prototype.renderBatch=function(a,b,c){if(0!==b){var d=this.gl;if(a._dirty[d.id]){if(!this.renderSession.renderer.updateTexture(a))return}else d.bindTexture(d.TEXTURE_2D,a._glTextures[d.id]);d.drawElements(d.TRIANGLES,6*b,d.UNSIGNED_SHORT,6*c*2),this.renderSession.drawCount++}},b.WebGLSpriteBatch.prototype.stop=function(){this.flush(),this.dirty=!0},b.WebGLSpriteBatch.prototype.start=function(){this.dirty=!0},b.WebGLSpriteBatch.prototype.destroy=function(){this.vertices=null,this.indices=null,this.gl.deleteBuffer(this.vertexBuffer),this.gl.deleteBuffer(this.indexBuffer),this.currentBaseTexture=null,this.gl=null},b.WebGLFastSpriteBatch=function(a){this.vertSize=10,this.maxSize=6e3,this.size=this.maxSize;var c=4*this.size*this.vertSize,d=6*this.maxSize;this.vertices=new b.Float32Array(c),this.indices=new b.Uint16Array(d),this.vertexBuffer=null,this.indexBuffer=null,this.lastIndexCount=0;for(var e=0,f=0;e=this.size&&this.flush()}},b.WebGLFastSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a=this.gl;if(this.currentBaseTexture._glTextures[a.id]||this.renderSession.renderer.updateTexture(this.currentBaseTexture,a),a.bindTexture(a.TEXTURE_2D,this.currentBaseTexture._glTextures[a.id]),this.currentBatchSize>.5*this.size)a.bufferSubData(a.ARRAY_BUFFER,0,this.vertices);else{var b=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);a.bufferSubData(a.ARRAY_BUFFER,0,b)}a.drawElements(a.TRIANGLES,6*this.currentBatchSize,a.UNSIGNED_SHORT,0),this.currentBatchSize=0,this.renderSession.drawCount++}},b.WebGLFastSpriteBatch.prototype.stop=function(){this.flush()},b.WebGLFastSpriteBatch.prototype.start=function(){var a=this.gl;a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var b=this.renderSession.projection;a.uniform2f(this.shader.projectionVector,b.x,b.y),a.uniformMatrix3fv(this.shader.uMatrix,!1,this.matrix);var c=4*this.vertSize;a.vertexAttribPointer(this.shader.aVertexPosition,2,a.FLOAT,!1,c,0),a.vertexAttribPointer(this.shader.aPositionCoord,2,a.FLOAT,!1,c,8),a.vertexAttribPointer(this.shader.aScale,2,a.FLOAT,!1,c,16),a.vertexAttribPointer(this.shader.aRotation,1,a.FLOAT,!1,c,24),a.vertexAttribPointer(this.shader.aTextureCoord,2,a.FLOAT,!1,c,28),a.vertexAttribPointer(this.shader.colorAttribute,1,a.FLOAT,!1,c,36)},b.WebGLFilterManager=function(){this.filterStack=[],this.offsetX=0,this.offsetY=0},b.WebGLFilterManager.prototype.constructor=b.WebGLFilterManager,b.WebGLFilterManager.prototype.setContext=function(a){this.gl=a,this.texturePool=[],this.initShaderBuffers()},b.WebGLFilterManager.prototype.begin=function(a,b){this.renderSession=a,this.defaultShader=a.shaderManager.defaultShader;var c=this.renderSession.projection;this.width=2*c.x,this.height=2*-c.y,this.buffer=b},b.WebGLFilterManager.prototype.pushFilter=function(a){var c=this.gl,d=this.renderSession.projection,e=this.renderSession.offset;a._filterArea=a.target.filterArea||a.target.getBounds(),a._previous_stencil_mgr=this.renderSession.stencilManager,this.renderSession.stencilManager=new b.WebGLStencilManager,this.renderSession.stencilManager.setContext(c),c.disable(c.STENCIL_TEST),this.filterStack.push(a);var f=a.filterPasses[0];this.offsetX+=a._filterArea.x,this.offsetY+=a._filterArea.y;var g=this.texturePool.pop();g?g.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution):g=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),c.bindTexture(c.TEXTURE_2D,g.texture);var h=a._filterArea,i=f.padding;h.x-=i,h.y-=i,h.width+=2*i,h.height+=2*i,h.x<0&&(h.x=0),h.width>this.width&&(h.width=this.width),h.y<0&&(h.y=0),h.height>this.height&&(h.height=this.height),c.bindFramebuffer(c.FRAMEBUFFER,g.frameBuffer),c.viewport(0,0,h.width*this.renderSession.resolution,h.height*this.renderSession.resolution),d.x=h.width/2,d.y=-h.height/2,e.x=-h.x,e.y=-h.y,c.colorMask(!0,!0,!0,!0),c.clearColor(0,0,0,0),c.clear(c.COLOR_BUFFER_BIT),a._glFilterTexture=g},b.WebGLFilterManager.prototype.popFilter=function(){var a=this.gl,c=this.filterStack.pop(),d=c._filterArea,e=c._glFilterTexture,f=this.renderSession.projection,g=this.renderSession.offset;if(c.filterPasses.length>1){a.viewport(0,0,d.width*this.renderSession.resolution,d.height*this.renderSession.resolution),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=0,this.vertexArray[1]=d.height,this.vertexArray[2]=d.width,this.vertexArray[3]=d.height,this.vertexArray[4]=0,this.vertexArray[5]=0,this.vertexArray[6]=d.width,this.vertexArray[7]=0,a.bufferSubData(a.ARRAY_BUFFER,0,this.vertexArray),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=d.width/this.width,this.uvArray[5]=d.height/this.height,this.uvArray[6]=d.width/this.width,this.uvArray[7]=d.height/this.height,a.bufferSubData(a.ARRAY_BUFFER,0,this.uvArray);var h=e,i=this.texturePool.pop();i||(i=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution)),i.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),a.bindFramebuffer(a.FRAMEBUFFER,i.frameBuffer),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.BLEND);for(var j=0;j0?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST),this.applyFilterPass(m,d,n,o),this.texturePool.push(e),c._glFilterTexture=null},b.WebGLFilterManager.prototype.applyFilterPass=function(a,c,d,e){var f=this.gl,g=a.shaders[f.id];g||(g=new b.PixiShader(f),g.fragmentSrc=a.fragmentSrc,g.uniforms=a.uniforms,g.init(),a.shaders[f.id]=g),this.renderSession.shaderManager.setShader(g),f.uniform2f(g.projectionVector,d/2,-e/2),f.uniform2f(g.offsetVector,0,0),a.uniforms.dimensions&&(a.uniforms.dimensions.value[0]=this.width,a.uniforms.dimensions.value[1]=this.height,a.uniforms.dimensions.value[2]=this.vertexArray[0],a.uniforms.dimensions.value[3]=this.vertexArray[5]),g.syncUniforms(),f.bindBuffer(f.ARRAY_BUFFER,this.vertexBuffer),f.vertexAttribPointer(g.aVertexPosition,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.uvBuffer),f.vertexAttribPointer(g.aTextureCoord,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.colorBuffer),f.vertexAttribPointer(g.colorAttribute,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,this.indexBuffer),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0),this.renderSession.drawCount++},b.WebGLFilterManager.prototype.initShaderBuffers=function(){var a=this.gl;this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.colorBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),this.vertexArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,this.vertexArray,a.STATIC_DRAW),this.uvArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,this.uvArray,a.STATIC_DRAW),this.colorArray=new b.Float32Array([1,16777215,1,16777215,1,16777215,1,16777215]),a.bindBuffer(a.ARRAY_BUFFER,this.colorBuffer),a.bufferData(a.ARRAY_BUFFER,this.colorArray,a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,3,2]),a.STATIC_DRAW)},b.WebGLFilterManager.prototype.destroy=function(){var a=this.gl;this.filterStack=null,this.offsetX=0,this.offsetY=0;for(var b=0;b=0;a--){var c=this._glTextures[a],d=b.glContexts[a];d&&c&&d.deleteTexture(c)}this._glTextures.length=0,this.dirty()},b.BaseTexture.fromCanvas=function(a,c){return 0===a.width&&(a.width=1),0===a.height&&(a.height=1),new b.BaseTexture(a,c)},b.TextureSilentFail=!1,b.Texture=function(a,c,d,e){this.noFrame=!1,c||(this.noFrame=!0,c=new b.Rectangle(0,0,1,1)),a instanceof b.Texture&&(a=a.baseTexture),this.baseTexture=a,this.frame=c,this.trim=e,this.valid=!1,this.isTiling=!1,this.requiresUpdate=!1,this.requiresReTint=!1,this._uvs=null,this.width=0,this.height=0,this.crop=d||new b.Rectangle(0,0,1,1),a.hasLoaded&&(this.noFrame&&(c=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(c))},b.Texture.prototype.constructor=b.Texture,b.Texture.prototype.onBaseTextureLoaded=function(){var a=this.baseTexture;this.noFrame&&(this.frame=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(this.frame)},b.Texture.prototype.destroy=function(a){a&&this.baseTexture.destroy(),this.valid=!1},b.Texture.prototype.setFrame=function(a){if(this.noFrame=!1,this.frame=a,this.width=a.width,this.height=a.height,this.crop.x=a.x,this.crop.y=a.y,this.crop.width=a.width,this.crop.height=a.height,!this.trim&&(a.x+a.width>this.baseTexture.width||a.y+a.height>this.baseTexture.height)){if(!b.TextureSilentFail)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);return void(this.valid=!1)}this.valid=a&&a.width&&a.height&&this.baseTexture.source&&this.baseTexture.hasLoaded,this.trim&&(this.width=this.trim.width,this.height=this.trim.height,this.frame.width=this.trim.width,this.frame.height=this.trim.height),this.valid&&this._updateUvs()},b.Texture.prototype._updateUvs=function(){this._uvs||(this._uvs=new b.TextureUvs);var a=this.crop,c=this.baseTexture.width,d=this.baseTexture.height;this._uvs.x0=a.x/c,this._uvs.y0=a.y/d,this._uvs.x1=(a.x+a.width)/c,this._uvs.y1=a.y/d,this._uvs.x2=(a.x+a.width)/c,this._uvs.y2=(a.y+a.height)/d,this._uvs.x3=a.x/c,this._uvs.y3=(a.y+a.height)/d},b.Texture.fromCanvas=function(a,c){var d=b.BaseTexture.fromCanvas(a,c);return new b.Texture(d)},b.TextureUvs=function(){this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0},b.RenderTexture=function(a,c,d,e,f){if(this.width=a||100,this.height=c||100,this.resolution=f||1,this.frame=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new b.BaseTexture,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=e||b.scaleModes.DEFAULT,this.baseTexture.hasLoaded=!0,b.Texture.call(this,this.baseTexture,new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution)),this.renderer=d||b.defaultRenderer,this.renderer.type===b.WEBGL_RENDERER){var g=this.renderer.gl;this.baseTexture._dirty[g.id]=!1,this.textureBuffer=new b.FilterTexture(g,this.width,this.height,this.baseTexture.scaleMode),this.baseTexture._glTextures[g.id]=this.textureBuffer.texture,this.render=this.renderWebGL,this.projection=new b.Point(.5*this.width,.5*-this.height)}else this.render=this.renderCanvas, +this.textureBuffer=new b.CanvasBuffer(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this.tempMatrix=new Phaser.Matrix,this._updateUvs()},b.RenderTexture.prototype=Object.create(b.Texture.prototype),b.RenderTexture.prototype.constructor=b.RenderTexture,b.RenderTexture.prototype.resize=function(a,c,d){a===this.width&&c===this.height||(this.valid=a>0&&c>0,this.width=a,this.height=c,this.frame.width=this.crop.width=a*this.resolution,this.frame.height=this.crop.height=c*this.resolution,d&&(this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution),this.renderer.type===b.WEBGL_RENDERER&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width,this.height))},b.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===b.WEBGL_RENDERER&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},b.RenderTexture.prototype.renderWebGL=function(a,b,c){if(this.valid&&0!==a.alpha){var d=a.worldTransform;d.identity(),d.translate(0,2*this.projection.y),b&&d.append(b),d.scale(1,-1);for(var e=0;e0){var v=this.canvasPadding/this.worldTransform.a,w=this.canvasPadding/this.worldTransform.d,x=(j+k+l)/3,y=(m+n+o)/3,z=j-x,A=m-y,B=Math.sqrt(z*z+A*A);j=x+z/B*(B+v),m=y+A/B*(B+w),z=k-x,A=n-y,B=Math.sqrt(z*z+A*A),k=x+z/B*(B+v),n=y+A/B*(B+w),z=l-x,A=o-y,B=Math.sqrt(z*z+A*A),l=x+z/B*(B+v),o=y+A/B*(B+w)}a.save(),a.beginPath(),a.moveTo(j,m),a.lineTo(k,n),a.lineTo(l,o),a.closePath(),a.clip();var C=p*t+s*r+q*u-t*r-s*q-p*u,D=j*t+s*l+k*u-t*l-s*k-j*u,E=p*k+j*r+q*l-k*r-j*q-p*l,F=p*t*l+s*k*r+j*q*u-j*t*r-s*q*l-p*k*u,G=m*t+s*o+n*u-t*o-s*n-m*u,H=p*n+m*r+q*o-n*r-m*q-p*o,I=p*t*o+s*n*r+m*q*u-m*t*r-s*q*o-p*n*u;a.transform(D/C,G/C,E/C,H/C,F/C,I/C),a.drawImage(g,0,0),a.restore()},b.Strip.prototype.renderStripFlat=function(a){var b=this.context,c=a.vertices,d=c.length/2;this.count++,b.beginPath();for(var e=1;ej?s:j,k=t>k?t:k}if(l===-1/0||k===1/0)return b.EmptyRectangle;var u=this._bounds;return u.x=l,u.width=j-l,u.y=m,u.height=k-m,this._currentBounds=u,u},b.Strip.DrawModes={TRIANGLE_STRIP:0,TRIANGLES:1},b.Rope=function(a,c){b.Strip.call(this,a),this.points=c,this.vertices=new b.Float32Array(4*c.length),this.uvs=new b.Float32Array(4*c.length),this.colors=new b.Float32Array(2*c.length),this.indices=new b.Uint16Array(2*c.length),this.refresh()},b.Rope.prototype=Object.create(b.Strip.prototype),b.Rope.prototype.constructor=b.Rope,b.Rope.prototype.refresh=function(){var a=this.points;if(!(a.length<1)){var b=this.uvs,c=(a[0],this.indices),d=this.colors;this.count-=.2,b[0]=0,b[1]=0,b[2]=0,b[3]=1,d[0]=1,d[1]=1,c[0]=0,c[1]=1;for(var e,f,g,h=a.length,i=1;i1&&(h=1),i=Math.sqrt(e.x*e.x+e.y*e.y),j=this.texture.height/2,e.x/=i,e.y/=i,e.x*=j,e.y*=j,k[g]=f.x+e.x,k[g+1]=f.y+e.y,k[g+2]=f.x-e.x,k[g+3]=f.y-e.y,d=f;b.DisplayObjectContainer.prototype.updateTransform.call(this)}},b.Rope.prototype.setTexture=function(a){this.texture=a},b.TilingSprite=function(a,c,d){b.Sprite.call(this,a),this._width=c||128,this._height=d||128,this.tileScale=new b.Point(1,1),this.tileScaleOffset=new b.Point(1,1),this.tilePosition=new b.Point,this.renderable=!0,this.tint=16777215,this.textureDebug=!1,this.blendMode=b.blendModes.NORMAL,this.canvasBuffer=null,this.tilingTexture=null,this.tilePattern=null,this.refreshTexture=!0,this.frameWidth=0,this.frameHeight=0},b.TilingSprite.prototype=Object.create(b.Sprite.prototype),b.TilingSprite.prototype.constructor=b.TilingSprite,b.TilingSprite.prototype.setTexture=function(a){this.texture!==a&&(this.texture=a,this.refreshTexture=!0,this.cachedTint=16777215)},b.TilingSprite.prototype._renderWebGL=function(a){if(this.visible&&this.renderable&&0!==this.alpha){if(this._mask&&(a.spriteBatch.stop(),a.maskManager.pushMask(this.mask,a),a.spriteBatch.start()),this._filters&&(a.spriteBatch.flush(),a.filterManager.pushFilter(this._filterBlock)),this.refreshTexture){if(this.generateTilingTexture(!0,a),!this.tilingTexture)return;this.tilingTexture.needsUpdate&&(a.renderer.updateTexture(this.tilingTexture.baseTexture),this.tilingTexture.needsUpdate=!1)}a.spriteBatch.renderTilingSprite(this);for(var b=0;bv?n:v,v=p>v?p:v,v=r>v?r:v,v=t>v?t:v,w=o>w?o:w,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w;var z=this._bounds;return z.x=x,z.width=v-x,z.y=y,z.height=w-y,this._currentBounds=z,z},b.TilingSprite.prototype.destroy=function(){b.Sprite.prototype.destroy.call(this),this.canvasBuffer&&(this.canvasBuffer.destroy(),this.canvasBuffer=null),this.tileScale=null,this.tileScaleOffset=null,this.tilePosition=null,this.tilingTexture&&(this.tilingTexture.destroy(!0),this.tilingTexture=null)},Object.defineProperty(b.TilingSprite.prototype,"width",{get:function(){return this._width},set:function(a){this._width=a}}),Object.defineProperty(b.TilingSprite.prototype,"height",{get:function(){return this._height},set:function(a){this._height=a}}),"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.PIXI=b):"undefined"!=typeof define&&define.amd?define("PIXI",function(){return a.PIXI=b}()):a.PIXI=b,b}.call(this),function(){function a(a,b){this._scaleFactor=a,this._deltaMode=b,this.originalEvent=null}var b=this,c=c||{VERSION:"2.6.15",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,NONE:0,LEFT:1,RIGHT:2,UP:3,DOWN:4,SPRITE:0,BUTTON:1,IMAGE:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11,POLYGON:12,BITMAPDATA:13,CANVAS_FILTER:14,WEBGL_FILTER:15,ELLIPSE:16,SPRITEBATCH:17,RETROFONT:18,POINTER:19,ROPE:20,CIRCLE:21,RECTANGLE:22,LINE:23,MATRIX:24,POINT:25,ROUNDEDRECTANGLE:26,CREATURE:27,VIDEO:28,PENDING_ATLAS:-1,HORIZONTAL:0,VERTICAL:1,LANDSCAPE:0,PORTRAIT:1,ANGLE_UP:270,ANGLE_DOWN:90,ANGLE_LEFT:180,ANGLE_RIGHT:0,ANGLE_NORTH_EAST:315,ANGLE_NORTH_WEST:225,ANGLE_SOUTH_EAST:45,ANGLE_SOUTH_WEST:135,TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12,blendModes:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},scaleModes:{DEFAULT:0,LINEAR:0,NEAREST:1},PIXI:PIXI||{}};if(Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),Function.prototype.bind||(Function.prototype.bind=function(){var a=Array.prototype.slice;return function(b){function c(){var f=e.concat(a.call(arguments));d.apply(this instanceof c?this:b,f)}var d=this,e=a.call(arguments,1);if("function"!=typeof d)throw new TypeError;return c.prototype=function a(b){if(b&&(a.prototype=b),!(this instanceof a))return new a}(d.prototype),c}}()),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.forEach||(Array.prototype.forEach=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=arguments.length>=2?arguments[1]:void 0,e=0;e0&&100*Math.random()<=a},randomChoice:function(a,b){return Math.random()<.5?a:b},parseDimension:function(a,b){var c=0,d=0;return"string"==typeof a?"%"===a.substr(-1)?(c=parseInt(a,10)/100,d=0===b?window.innerWidth*c:window.innerHeight*c):d=parseInt(a,10):d=a,d},pad:function(a,b,c,d){if(void 0===b)var b=0;if(void 0===c)var c=" ";if(void 0===d)var d=3;a=a.toString();var e=0;if(b+1>=a.length)switch(d){case 1:a=new Array(b+1-a.length).join(c)+a;break;case 3:var f=Math.ceil((e=b-a.length)/2),g=e-f;a=new Array(g+1).join(c)+a+new Array(f+1).join(c);break;default:a+=new Array(b+1-a.length).join(c)}return a},isPlainObject:function(a){if("object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}return!0},extend:function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),j===i&&(h=this,--i);i0&&(this._radius=.5*d),this.type=c.CIRCLE},c.Circle.prototype={circumference:function(){return Math.PI*this._radius*2},random:function(a){void 0===a&&(a=new c.Point);var b=2*Math.PI*Math.random(),d=Math.random()+Math.random(),e=d>1?2-d:d,f=e*Math.cos(b),g=e*Math.sin(b);return a.x=this.x+f*this.radius,a.y=this.y+g*this.radius,a},getBounds:function(){return new c.Rectangle(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)},setTo:function(a,b,c){return this.x=a,this.y=b,this._diameter=c,this._radius=.5*c,this},copyFrom:function(a){return this.setTo(a.x,a.y,a.diameter)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.diameter=this._diameter,a},distance:function(a,b){var d=c.Math.distance(this.x,this.y,a.x,a.y);return b?Math.round(d):d},clone:function(a){return void 0===a||null===a?a=new c.Circle(this.x,this.y,this.diameter):a.setTo(this.x,this.y,this.diameter),a},contains:function(a,b){return c.Circle.contains(this,a,b)},circumferencePoint:function(a,b,d){return c.Circle.circumferencePoint(this,a,b,d)},offset:function(a,b){return this.x+=a,this.y+=b,this},offsetPoint:function(a){return this.offset(a.x,a.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}},c.Circle.prototype.constructor=c.Circle,Object.defineProperty(c.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(a){a>0&&(this._diameter=a,this._radius=.5*a)}}),Object.defineProperty(c.Circle.prototype,"radius",{get:function(){return this._radius},set:function(a){a>0&&(this._radius=a,this._diameter=2*a)}}),Object.defineProperty(c.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(a){a>this.x?(this._radius=0,this._diameter=0):this.radius=this.x-a}}),Object.defineProperty(c.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(a){athis.y?(this._radius=0,this._diameter=0):this.radius=this.y-a}}),Object.defineProperty(c.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(a){a0?Math.PI*this._radius*this._radius:0}}),Object.defineProperty(c.Circle.prototype,"empty",{get:function(){return 0===this._diameter},set:function(a){!0===a&&this.setTo(0,0,0)}}),c.Circle.contains=function(a,b,c){if(a.radius>0&&b>=a.left&&b<=a.right&&c>=a.top&&c<=a.bottom){return(a.x-b)*(a.x-b)+(a.y-c)*(a.y-c)<=a.radius*a.radius}return!1},c.Circle.equals=function(a,b){return a.x===b.x&&a.y===b.y&&a.diameter===b.diameter},c.Circle.intersects=function(a,b){return c.Math.distance(a.x,a.y,b.x,b.y)<=a.radius+b.radius},c.Circle.circumferencePoint=function(a,b,d,e){return void 0===d&&(d=!1),void 0===e&&(e=new c.Point),!0===d&&(b=c.Math.degToRad(b)),e.x=a.x+a.radius*Math.cos(b),e.y=a.y+a.radius*Math.sin(b),e},c.Circle.intersectsRectangle=function(a,b){var c=Math.abs(a.x-b.x-b.halfWidth);if(c>b.halfWidth+a.radius)return!1;var d=Math.abs(a.y-b.y-b.halfHeight);if(d>b.halfHeight+a.radius)return!1;if(c<=b.halfWidth||d<=b.halfHeight)return!0;var e=c-b.halfWidth,f=d-b.halfHeight;return e*e+f*f<=a.radius*a.radius},PIXI.Circle=c.Circle,c.Ellipse=function(a,b,d,e){a=a||0,b=b||0,d=d||0,e=e||0,this.x=a,this.y=b,this.width=d,this.height=e,this.type=c.ELLIPSE},c.Ellipse.prototype={setTo:function(a,b,c,d){return this.x=a,this.y=b,this.width=c,this.height=d,this},getBounds:function(){return new c.Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)},copyFrom:function(a){return this.setTo(a.x,a.y,a.width,a.height)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},clone:function(a){return void 0===a||null===a?a=new c.Ellipse(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a},contains:function(a,b){return c.Ellipse.contains(this,a,b)},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random()*Math.PI*2,d=Math.random();return a.x=Math.sqrt(d)*Math.cos(b),a.y=Math.sqrt(d)*Math.sin(b),a.x=this.x+a.x*this.width/2,a.y=this.y+a.y*this.height/2,a},toString:function(){return"[{Phaser.Ellipse (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")}]"}},c.Ellipse.prototype.constructor=c.Ellipse,Object.defineProperty(c.Ellipse.prototype,"left",{get:function(){return this.x},set:function(a){this.x=a}}),Object.defineProperty(c.Ellipse.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a=c&&a<=d&&b>=e&&b<=f},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random();return a.x=this.start.x+b*(this.end.x-this.start.x),a.y=this.start.y+b*(this.end.y-this.start.y),a},coordinatesOnLine:function(a,b){void 0===a&&(a=1),void 0===b&&(b=[]);var c=Math.round(this.start.x),d=Math.round(this.start.y),e=Math.round(this.end.x),f=Math.round(this.end.y),g=Math.abs(e-c),h=Math.abs(f-d),i=c-h&&(k-=h,c+=i),m=0&&p<=1&&q>=0&&q<=1?g:null}return g},c.Line.intersects=function(a,b,d,e){return c.Line.intersectsPoints(a.start,a.end,b.start,b.end,d,e)},c.Line.intersectsRectangle=function(a,b){if(!c.Rectangle.intersects(a,b))return!1;var d=a.start.x,e=a.start.y,f=a.end.x,g=a.end.y,h=b.x,i=b.y,j=b.right,k=b.bottom,l=0;if(d>=h&&d<=j&&e>=i&&e<=k||f>=h&&f<=j&&g>=i&&g<=k)return!0;if(d=h){if((l=e+(g-e)*(h-d)/(f-d))>i&&l<=k)return!0}else if(d>j&&f<=j&&(l=e+(g-e)*(j-d)/(f-d))>=i&&l<=k)return!0;if(e=i){if((l=d+(f-d)*(i-e)/(g-e))>=h&&l<=j)return!0}else if(e>k&&g<=k&&(l=d+(f-d)*(k-e)/(g-e))>=h&&l<=j)return!0;return!1},c.Line.reflect=function(a,b){return 2*b.normalAngle-3.141592653589793-a.angle},c.Matrix=function(a,b,d,e,f,g){void 0!==a&&null!==a||(a=1),void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),void 0!==e&&null!==e||(e=1),void 0!==f&&null!==f||(f=0),void 0!==g&&null!==g||(g=0),this.a=a,this.b=b,this.c=d,this.d=e,this.tx=f,this.ty=g,this.type=c.MATRIX},c.Matrix.prototype={fromArray:function(a){return this.setTo(a[0],a[1],a[3],a[4],a[2],a[5])},setTo:function(a,b,c,d,e,f){return this.a=a,this.b=b,this.c=c,this.d=d,this.tx=e,this.ty=f,this},clone:function(a){return void 0===a||null===a?a=new c.Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty):(a.a=this.a,a.b=this.b,a.c=this.c,a.d=this.d,a.tx=this.tx,a.ty=this.ty),a},copyTo:function(a){return a.copyFrom(this),a},copyFrom:function(a){return this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.tx=a.tx,this.ty=a.ty,this},toArray:function(a,b){return void 0===b&&(b=new PIXI.Float32Array(9)),a?(b[0]=this.a,b[1]=this.b,b[2]=0,b[3]=this.c,b[4]=this.d,b[5]=0,b[6]=this.tx,b[7]=this.ty,b[8]=1):(b[0]=this.a,b[1]=this.c,b[2]=this.tx,b[3]=this.b,b[4]=this.d,b[5]=this.ty,b[6]=0,b[7]=0,b[8]=1),b},apply:function(a,b){return void 0===b&&(b=new c.Point),b.x=this.a*a.x+this.c*a.y+this.tx,b.y=this.b*a.x+this.d*a.y+this.ty,b},applyInverse:function(a,b){void 0===b&&(b=new c.Point);var d=1/(this.a*this.d+this.c*-this.b),e=a.x,f=a.y;return b.x=this.d*d*e+-this.c*d*f+(this.ty*this.c-this.tx*this.d)*d,b.y=this.a*d*f+-this.b*d*e+(-this.ty*this.a+this.tx*this.b)*d,b},translate:function(a,b){return this.tx+=a,this.ty+=b,this},scale:function(a,b){return this.a*=a,this.d*=b,this.c*=a,this.b*=b,this.tx*=a,this.ty*=b,this}, +rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=this.a,e=this.c,f=this.tx;return this.a=d*b-this.b*c,this.b=d*c+this.b*b,this.c=e*b-this.d*c,this.d=e*c+this.d*b,this.tx=f*b-this.ty*c,this.ty=f*c+this.ty*b,this},append:function(a){var b=this.a,c=this.b,d=this.c,e=this.d;return this.a=a.a*b+a.b*d,this.b=a.a*c+a.b*e,this.c=a.c*b+a.d*d,this.d=a.c*c+a.d*e,this.tx=a.tx*b+a.ty*d+this.tx,this.ty=a.tx*c+a.ty*e+this.ty,this},identity:function(){return this.setTo(1,0,0,1,0,0)}},c.identityMatrix=new c.Matrix,PIXI.Matrix=c.Matrix,PIXI.identityMatrix=c.identityMatrix,c.Point=function(a,b){a=a||0,b=b||0,this.x=a,this.y=b,this.type=c.POINT},c.Point.prototype={copyFrom:function(a){return this.setTo(a.x,a.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},set:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},add:function(a,b){return this.x+=a,this.y+=b,this},subtract:function(a,b){return this.x-=a,this.y-=b,this},multiply:function(a,b){return this.x*=a,this.y*=b,this},divide:function(a,b){return this.x/=a,this.y/=b,this},clampX:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this},clampY:function(a,b){return this.y=c.Math.clamp(this.y,a,b),this},clamp:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this.y=c.Math.clamp(this.y,a,b),this},clone:function(a){return void 0===a||null===a?a=new c.Point(this.x,this.y):a.setTo(this.x,this.y),a},copyTo:function(a){return a.x=this.x,a.y=this.y,a},distance:function(a,b){return c.Point.distance(this,a,b)},equals:function(a){return a.x===this.x&&a.y===this.y},angle:function(a,b){return void 0===b&&(b=!1),b?c.Math.radToDeg(Math.atan2(a.y-this.y,a.x-this.x)):Math.atan2(a.y-this.y,a.x-this.x)},rotate:function(a,b,d,e,f){return c.Point.rotate(this,a,b,d,e,f)},getMagnitude:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},getMagnitudeSq:function(){return this.x*this.x+this.y*this.y},setMagnitude:function(a){return this.normalize().multiply(a,a)},normalize:function(){if(!this.isZero()){var a=this.getMagnitude();this.x/=a,this.y/=a}return this},isZero:function(){return 0===this.x&&0===this.y},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},perp:function(){return this.setTo(-this.y,this.x)},rperp:function(){return this.setTo(this.y,-this.x)},normalRightHand:function(){return this.setTo(-1*this.y,this.x)},floor:function(){return this.setTo(Math.floor(this.x),Math.floor(this.y))},ceil:function(){return this.setTo(Math.ceil(this.x),Math.ceil(this.y))},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}},c.Point.prototype.constructor=c.Point,c.Point.add=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x+b.x,d.y=a.y+b.y,d},c.Point.subtract=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x-b.x,d.y=a.y-b.y,d},c.Point.multiply=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x*b.x,d.y=a.y*b.y,d},c.Point.divide=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x/b.x,d.y=a.y/b.y,d},c.Point.equals=function(a,b){return a.x===b.x&&a.y===b.y},c.Point.angle=function(a,b){return Math.atan2(a.y-b.y,a.x-b.x)},c.Point.negative=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.x,-a.y)},c.Point.multiplyAdd=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+b.x*d,a.y+b.y*d)},c.Point.interpolate=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+(b.x-a.x)*d,a.y+(b.y-a.y)*d)},c.Point.perp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.y,a.x)},c.Point.rperp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(a.y,-a.x)},c.Point.distance=function(a,b,d){var e=c.Math.distance(a.x,a.y,b.x,b.y);return d?Math.round(e):e},c.Point.project=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b)/b.getMagnitudeSq();return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.projectUnit=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b);return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.normalRightHand=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-1*a.y,a.x)},c.Point.normalize=function(a,b){void 0===b&&(b=new c.Point);var d=a.getMagnitude();return 0!==d&&b.setTo(a.x/d,a.y/d),b},c.Point.rotate=function(a,b,d,e,f,g){if(f&&(e=c.Math.degToRad(e)),void 0===g){a.subtract(b,d);var h=Math.sin(e),i=Math.cos(e),j=i*a.x-h*a.y,k=h*a.x+i*a.y;a.x=j+b,a.y=k+d}else{var l=e+Math.atan2(a.y-d,a.x-b);a.x=b+g*Math.cos(l),a.y=d+g*Math.sin(l)}return a},c.Point.centroid=function(a,b){if(void 0===b&&(b=new c.Point),"[object Array]"!==Object.prototype.toString.call(a))throw new Error("Phaser.Point. Parameter 'points' must be an array");var d=a.length;if(d<1)throw new Error("Phaser.Point. Parameter 'points' array must not be empty");if(1===d)return b.copyFrom(a[0]),b;for(var e=0;e0&&this.setTo.apply(this,arguments),this.closed=!0,this.flattened=!1,this.type=c.POLYGON},c.Polygon.prototype={toNumberArray:function(a){void 0===a&&(a=[]);for(var b=0;b0){Array.isArray(a)||(a=Array.prototype.slice.call(arguments));for(var b=Number.MAX_VALUE,c=0,d=a.length;c=this.right?this.width=0:this.width=this.right-a,this.x=a}}),Object.defineProperty(c.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a<=this.x?this.width=0:this.width=a-this.x}}),Object.defineProperty(c.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(c.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(c.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(a){this.x=a-this.halfWidth}}),Object.defineProperty(c.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(a){this.y=a-this.halfHeight}}),Object.defineProperty(c.Rectangle.prototype,"randomX",{get:function(){return this.x+Math.random()*this.width}}),Object.defineProperty(c.Rectangle.prototype,"randomY",{get:function(){return this.y+Math.random()*this.height}}),Object.defineProperty(c.Rectangle.prototype,"top",{get:function(){return this.y},set:function(a){a>=this.bottom?(this.height=0,this.y=a):this.height=this.bottom-a}}),Object.defineProperty(c.Rectangle.prototype,"topLeft",{get:function(){return new c.Point(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"topRight",{get:function(){return new c.Point(this.x+this.width,this.y)},set:function(a){this.right=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(a){!0===a&&this.setTo(0,0,0,0)}}),c.Rectangle.prototype.constructor=c.Rectangle,c.Rectangle.inflate=function(a,b,c){return a.x-=b,a.width+=2*b,a.y-=c,a.height+=2*c,a},c.Rectangle.inflatePoint=function(a,b){return c.Rectangle.inflate(a,b.x,b.y)},c.Rectangle.size=function(a,b){return void 0===b||null===b?b=new c.Point(a.width,a.height):b.setTo(a.width,a.height),b},c.Rectangle.clone=function(a,b){return void 0===b||null===b?b=new c.Rectangle(a.x,a.y,a.width,a.height):b.setTo(a.x,a.y,a.width,a.height),b},c.Rectangle.contains=function(a,b,c){return!(a.width<=0||a.height<=0)&&(b>=a.x&&b=a.y&&c=a&&e=b&&fb.volume)&&(a.x>=b.x&&a.y>=b.y&&a.rightb.right||a.y>b.bottom)},c.Rectangle.intersectsRaw=function(a,b,c,d,e,f){return void 0===f&&(f=0),!(b>a.right+f||ca.bottom+f||ed&&(d=a.x),a.xf&&(f=a.y),a.y=c&&a<=c+this.width){var d=this.y;if(b>=d&&b<=d+this.height)return!0}return!1}},c.RoundedRectangle.prototype.constructor=c.RoundedRectangle,PIXI.RoundedRectangle=c.RoundedRectangle,c.Camera=function(a,b,d,e,f,g){this.game=a,this.world=a.world,this.id=0,this.view=new c.Rectangle(d,e,f,g),this.bounds=new c.Rectangle(d,e,f,g),this.deadzone=null,this.visible=!0,this.roundPx=!0,this.atLimit={x:!1,y:!1},this.target=null,this.displayObject=null,this.scale=null,this.totalInView=0,this.lerp=new c.Point(1,1),this.onShakeComplete=new c.Signal,this.onFlashComplete=new c.Signal,this.onFadeComplete=new c.Signal,this.fx=null,this._targetPosition=new c.Point,this._edge=0,this._position=new c.Point,this._shake={intensity:0,duration:0,horizontal:!1,vertical:!1,shakeBounds:!0,x:0,y:0},this._fxDuration=0,this._fxType=0},c.Camera.FOLLOW_LOCKON=0,c.Camera.FOLLOW_PLATFORMER=1,c.Camera.FOLLOW_TOPDOWN=2,c.Camera.FOLLOW_TOPDOWN_TIGHT=3,c.Camera.SHAKE_BOTH=4,c.Camera.SHAKE_HORIZONTAL=5,c.Camera.SHAKE_VERTICAL=6,c.Camera.ENABLE_FX=!0,c.Camera.prototype={boot:function(){this.displayObject=this.game.world,this.scale=this.game.world.scale,this.game.camera=this,c.Graphics&&c.Camera.ENABLE_FX&&(this.fx=new c.Graphics(this.game),this.game.stage.addChild(this.fx))},preUpdate:function(){this.totalInView=0},follow:function(a,b,d,e){void 0===b&&(b=c.Camera.FOLLOW_LOCKON),void 0===d&&(d=1),void 0===e&&(e=1),this.target=a,this.lerp.set(d,e);var f;switch(b){case c.Camera.FOLLOW_PLATFORMER:var g=this.width/8,h=this.height/3;this.deadzone=new c.Rectangle((this.width-g)/2,(this.height-h)/2-.25*h,g,h);break;case c.Camera.FOLLOW_TOPDOWN:f=Math.max(this.width,this.height)/4,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_TOPDOWN_TIGHT:f=Math.max(this.width,this.height)/8,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_LOCKON:default:this.deadzone=null}},unfollow:function(){this.target=null},focusOn:function(a){this.setPosition(Math.round(a.x-this.view.halfWidth),Math.round(a.y-this.view.halfHeight))},focusOnXY:function(a,b){this.setPosition(Math.round(a-this.view.halfWidth),Math.round(b-this.view.halfHeight))},shake:function(a,b,d,e,f){return void 0===a&&(a=.05),void 0===b&&(b=500),void 0===d&&(d=!0),void 0===e&&(e=c.Camera.SHAKE_BOTH),void 0===f&&(f=!0),!(!d&&this._shake.duration>0)&&(this._shake.intensity=a,this._shake.duration=b,this._shake.shakeBounds=f,this._shake.x=0,this._shake.y=0,this._shake.horizontal=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_HORIZONTAL,this._shake.vertical=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_VERTICAL,!0)},flash:function(a,b,c){return void 0===a&&(a=16777215),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=1,this._fxDuration=b,this._fxType=0,!0)},fade:function(a,b,c){return void 0===a&&(a=0),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=0,this._fxDuration=b,this._fxType=1,!0)},update:function(){this._fxDuration>0&&this.updateFX(),this._shake.duration>0&&this.updateShake(),this.bounds&&this.checkBounds(),this.roundPx&&(this.view.floor(),this._shake.x=Math.floor(this._shake.x),this._shake.y=Math.floor(this._shake.y)),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},updateFX:function(){0===this._fxType?(this.fx.alpha-=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha<=0&&(this._fxDuration=0,this.fx.alpha=0,this.onFlashComplete.dispatch())):(this.fx.alpha+=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha>=1&&(this._fxDuration=0,this.fx.alpha=1,this.onFadeComplete.dispatch()))},updateShake:function(){this._shake.duration-=this.game.time.elapsedMS,this._shake.duration<=0?(this.onShakeComplete.dispatch(),this._shake.x=0,this._shake.y=0):(this._shake.horizontal&&(this._shake.x=this.game.rnd.frac()*this._shake.intensity*this.view.width*2-this._shake.intensity*this.view.width),this._shake.vertical&&(this._shake.y=this.game.rnd.frac()*this._shake.intensity*this.view.height*2-this._shake.intensity*this.view.height))},updateTarget:function(){this._targetPosition.x=this.view.x+this.target.worldPosition.x,this._targetPosition.y=this.view.y+this.target.worldPosition.y,this.deadzone?(this._edge=this._targetPosition.x-this.view.x,this._edgethis.deadzone.right&&(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.deadzone.right,this.lerp.x)),this._edge=this._targetPosition.y-this.view.y,this._edgethis.deadzone.bottom&&(this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.deadzone.bottom,this.lerp.y))):(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.view.halfWidth,this.lerp.x),this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.view.halfHeight,this.lerp.y)),this.bounds&&this.checkBounds(),this.roundPx&&this.view.floor(),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},setBoundsToWorld:function(){this.bounds&&this.bounds.copyFrom(this.game.world.bounds)},checkBounds:function(){this.atLimit.x=!1,this.atLimit.y=!1;var a=this.view.x+this._shake.x,b=this.view.right+this._shake.x,c=this.view.y+this._shake.y,d=this.view.bottom+this._shake.y;a<=this.bounds.x*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.x*this.scale.x,this._shake.shakeBounds||(this._shake.x=0)),b>=this.bounds.right*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.right*this.scale.x-this.width,this._shake.shakeBounds||(this._shake.x=0)),c<=this.bounds.top*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.top*this.scale.y,this._shake.shakeBounds||(this._shake.y=0)),d>=this.bounds.bottom*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.bottom*this.scale.y-this.height,this._shake.shakeBounds||(this._shake.y=0))},setPosition:function(a,b){this.view.x=a,this.view.y=b,this.bounds&&this.checkBounds()},setSize:function(a,b){this.view.width=a,this.view.height=b},reset:function(){this.target=null,this.view.x=0,this.view.y=0,this._shake.duration=0,this.resetFX()},resetFX:function(){this.fx&&(this.fx.clear(),this.fx.alpha=0,this._fxDuration=0)}},c.Camera.prototype.constructor=c.Camera,Object.defineProperty(c.Camera.prototype,"x",{get:function(){return this.view.x},set:function(a){this.view.x=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"y",{get:function(){return this.view.y},set:function(a){this.view.y=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"position",{get:function(){return this._position.set(this.view.x,this.view.y),this._position},set:function(a){void 0!==a.x&&(this.view.x=a.x),void 0!==a.y&&(this.view.y=a.y),this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"width",{get:function(){return this.view.width},set:function(a){this.view.width=a}}),Object.defineProperty(c.Camera.prototype,"height",{get:function(){return this.view.height},set:function(a){this.view.height=a}}),Object.defineProperty(c.Camera.prototype,"shakeIntensity",{get:function(){return this._shake.intensity},set:function(a){this._shake.intensity=a}}),c.State=function(){this.game=null,this.key="",this.add=null,this.make=null,this.camera=null,this.cache=null,this.input=null,this.load=null,this.math=null,this.sound=null,this.scale=null,this.stage=null,this.state=null,this.time=null,this.tweens=null,this.world=null,this.particles=null,this.physics=null,this.rnd=null},c.State.prototype={init:function(){},preload:function(){},loadUpdate:function(){},loadRender:function(){},create:function(){},update:function(){},preRender:function(){},render:function(){},resize:function(){},paused:function(){},resumed:function(){},pauseUpdate:function(){},shutdown:function(){}},c.State.prototype.constructor=c.State,c.StateManager=function(a,b){this.game=a,this.states={},this._pendingState=null,void 0!==b&&null!==b&&(this._pendingState=b),this._clearWorld=!1,this._clearCache=!1,this._created=!1,this._args=[],this.current="",this.onStateChange=new c.Signal,this.onInitCallback=null,this.onPreloadCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPreRenderCallback=null,this.onLoadUpdateCallback=null,this.onLoadRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.onShutDownCallback=null},c.StateManager.prototype={boot:function(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),null!==this._pendingState&&"string"!=typeof this._pendingState&&this.add("default",this._pendingState,!0)},add:function(a,b,d){void 0===d&&(d=!1);var e;return b instanceof c.State?e=b:"object"==typeof b?(e=b,e.game=this.game):"function"==typeof b&&(e=new b(this.game)),this.states[a]=e,d&&(this.game.isBooted?this.start(a):this._pendingState=a),e},remove:function(a){this.current===a&&(this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onPreRenderCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null),delete this.states[a]},start:function(a,b,c){void 0===b&&(b=!0),void 0===c&&(c=!1),this.checkState(a)&&(this._pendingState=a,this._clearWorld=b,this._clearCache=c,arguments.length>3&&(this._args=Array.prototype.splice.call(arguments,3)))},restart:function(a,b){void 0===a&&(a=!0),void 0===b&&(b=!1),this._pendingState=this.current,this._clearWorld=a,this._clearCache=b,arguments.length>2&&(this._args=Array.prototype.slice.call(arguments,2))},dummy:function(){},preUpdate:function(){if(this._pendingState&&this.game.isBooted){var a=this.current;if(this.clearCurrentState(),this.setCurrentState(this._pendingState),this.onStateChange.dispatch(this.current,a),this.current!==this._pendingState)return;this._pendingState=null,this.onPreloadCallback?(this.game.load.reset(!0),this.onPreloadCallback.call(this.callbackContext,this.game),0===this.game.load.totalQueuedFiles()&&0===this.game.load.totalQueuedPacks()?this.loadComplete():this.game.load.start()):this.loadComplete()}},clearCurrentState:function(){this.current&&(this.onShutDownCallback&&this.onShutDownCallback.call(this.callbackContext,this.game),this.game.tweens.removeAll(),this.game.camera.reset(),this.game.input.reset(!0),this.game.physics.clear(),this.game.time.removeAll(),this.game.scale.reset(this._clearWorld),this.game.debug&&this.game.debug.reset(),this._clearWorld&&(this.game.world.shutdown(),this._clearCache&&this.game.cache.destroy()))},checkState:function(a){return this.states[a]?!!(this.states[a].preload||this.states[a].create||this.states[a].update||this.states[a].render)||(console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render"),!1):(console.warn("Phaser.StateManager - No state found with the key: "+a),!1)},link:function(a){this.states[a].game=this.game,this.states[a].add=this.game.add,this.states[a].make=this.game.make,this.states[a].camera=this.game.camera,this.states[a].cache=this.game.cache,this.states[a].input=this.game.input,this.states[a].load=this.game.load,this.states[a].math=this.game.math,this.states[a].sound=this.game.sound,this.states[a].scale=this.game.scale,this.states[a].state=this,this.states[a].stage=this.game.stage,this.states[a].time=this.game.time,this.states[a].tweens=this.game.tweens,this.states[a].world=this.game.world,this.states[a].particles=this.game.particles,this.states[a].rnd=this.game.rnd,this.states[a].physics=this.game.physics,this.states[a].key=a},unlink:function(a){this.states[a]&&(this.states[a].game=null,this.states[a].add=null,this.states[a].make=null,this.states[a].camera=null,this.states[a].cache=null,this.states[a].input=null,this.states[a].load=null,this.states[a].math=null,this.states[a].sound=null,this.states[a].scale=null,this.states[a].state=null,this.states[a].stage=null,this.states[a].time=null,this.states[a].tweens=null,this.states[a].world=null,this.states[a].particles=null,this.states[a].rnd=null,this.states[a].physics=null)},setCurrentState:function(a){this.callbackContext=this.states[a],this.link(a),this.onInitCallback=this.states[a].init||this.dummy,this.onPreloadCallback=this.states[a].preload||null,this.onLoadRenderCallback=this.states[a].loadRender||null,this.onLoadUpdateCallback=this.states[a].loadUpdate||null,this.onCreateCallback=this.states[a].create||null,this.onUpdateCallback=this.states[a].update||null,this.onPreRenderCallback=this.states[a].preRender||null,this.onRenderCallback=this.states[a].render||null,this.onResizeCallback=this.states[a].resize||null,this.onPausedCallback=this.states[a].paused||null,this.onResumedCallback=this.states[a].resumed||null,this.onPauseUpdateCallback=this.states[a].pauseUpdate||null,this.onShutDownCallback=this.states[a].shutdown||this.dummy,""!==this.current&&this.game.physics.reset(),this.current=a,this._created=!1,this.onInitCallback.apply(this.callbackContext,this._args),a===this._pendingState&&(this._args=[]),this.game._kickstart=!0},getCurrentState:function(){return this.states[this.current]},loadComplete:function(){!1===this._created&&this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game),!1===this._created&&this.onCreateCallback?(this._created=!0,this.onCreateCallback.call(this.callbackContext,this.game)):this._created=!0},pause:function(){this._created&&this.onPausedCallback&&this.onPausedCallback.call(this.callbackContext,this.game)},resume:function(){this._created&&this.onResumedCallback&&this.onResumedCallback.call(this.callbackContext,this.game)},update:function(){this._created?this.onUpdateCallback&&this.onUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},pauseUpdate:function(){this._created?this.onPauseUpdateCallback&&this.onPauseUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},preRender:function(a){this._created&&this.onPreRenderCallback&&this.onPreRenderCallback.call(this.callbackContext,this.game,a)},resize:function(a,b){this.onResizeCallback&&this.onResizeCallback.call(this.callbackContext,a,b)},render:function(){this._created?this.onRenderCallback&&(this.game.renderType===c.CANVAS?(this.game.context.save(),this.game.context.setTransform(1,0,0,1,0,0),this.onRenderCallback.call(this.callbackContext,this.game),this.game.context.restore()):this.onRenderCallback.call(this.callbackContext,this.game)):this.onLoadRenderCallback&&this.onLoadRenderCallback.call(this.callbackContext,this.game)},destroy:function(){this._clearWorld=!0,this._clearCache=!0,this.clearCurrentState(),this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.game=null,this.states={},this._pendingState=null,this.current=""}},c.StateManager.prototype.constructor=c.StateManager,Object.defineProperty(c.StateManager.prototype,"created",{get:function(){return this._created}}),c.Signal=function(){},c.Signal.prototype={_bindings:null,_prevParams:null,memorize:!1,_shouldPropagate:!0,active:!0,_boundDispatch:!1,validateListener:function(a,b){if("function"!=typeof a)throw new Error("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,b,d,e,f){var g,h=this._indexOfListener(a,d);if(-1!==h){if(g=this._bindings[h],g.isOnce()!==b)throw new Error("You cannot add"+(b?"":"Once")+"() then add"+(b?"Once":"")+"() the same listener without removing the relationship first.")}else g=new c.SignalBinding(this,a,b,d,e,f),this._addBinding(g);return this.memorize&&this._prevParams&&g.execute(this._prevParams),g},_addBinding:function(a){this._bindings||(this._bindings=[]);var b=this._bindings.length;do{b--}while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){if(!this._bindings)return-1;void 0===b&&(b=null);for(var c,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)return d;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){this.validateListener(a,"add");var d=[];if(arguments.length>3)for(var e=3;e3)for(var e=3;e=this.children.length?-1:this.getChildAt(a)},c.Group.prototype.create=function(a,b,c,d,e,f){void 0===e&&(e=!0);var g=new this.classType(this.game,a,b,c,d);return g.exists=e,g.visible=e,g.alive=e,this.add(g,!1,f)},c.Group.prototype.createMultiple=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=!1),Array.isArray(b)||(b=[b]),Array.isArray(c)||(c=[c]);var e=this,f=[];return b.forEach(function(b){c.forEach(function(c){for(var g=0;gthis.children.length||-1===a&&-1===b)return!1;for(var h=new c.Rectangle(0,0,d,e),i=a*d,j=b*e,k=g;kthis.children.length-1&&(a=0),this.cursor)return this.cursorIndex=a,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.next=function(){if(this.cursor)return this.cursorIndex>=this.children.length-1?this.cursorIndex=0:this.cursorIndex++,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.previous=function(){if(this.cursor)return 0===this.cursorIndex?this.cursorIndex=this.children.length-1:this.cursorIndex--,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.swap=function(a,b){this.swapChildren(a,b),this.updateZ()},c.Group.prototype.bringToTop=function(a){return a.parent===this&&this.getIndex(a)0&&(this.remove(a,!1,!0),this.addAt(a,0,!0)),a},c.Group.prototype.moveUp=function(a){if(a.parent===this&&this.getIndex(a)0){var b=this.getIndex(a),c=this.getAt(b-1);c&&this.swap(a,c)}return a},c.Group.prototype.xy=function(a,b,c){if(a<0||a>this.children.length)return-1;this.getChildAt(a).x=b,this.getChildAt(a).y=c},c.Group.prototype.reverse=function(){this.children.reverse(),this.updateZ()},c.Group.prototype.getIndex=function(a){return this.children.indexOf(a)},c.Group.prototype.getByName=function(a){for(var b=0;b0))return!1;var f=b.length;return 1===f?0===d?a[b[0]]=c:1===d?a[b[0]]+=c:2===d?a[b[0]]-=c:3===d?a[b[0]]*=c:4===d&&(a[b[0]]/=c):2===f?0===d?a[b[0]][b[1]]=c:1===d?a[b[0]][b[1]]+=c:2===d?a[b[0]][b[1]]-=c:3===d?a[b[0]][b[1]]*=c:4===d&&(a[b[0]][b[1]]/=c):3===f?0===d?a[b[0]][b[1]][b[2]]=c:1===d?a[b[0]][b[1]][b[2]]+=c:2===d?a[b[0]][b[1]][b[2]]-=c:3===d?a[b[0]][b[1]][b[2]]*=c:4===d&&(a[b[0]][b[1]][b[2]]/=c):4===f&&(0===d?a[b[0]][b[1]][b[2]][b[3]]=c:1===d?a[b[0]][b[1]][b[2]][b[3]]+=c:2===d?a[b[0]][b[1]][b[2]][b[3]]-=c:3===d?a[b[0]][b[1]][b[2]][b[3]]*=c:4===d&&(a[b[0]][b[1]][b[2]][b[3]]/=c)),!0},c.Group.prototype.checkProperty=function(a,b,d,e){return void 0===e&&(e=!1),!(!c.Utils.getProperty(a,b)&&e)&&c.Utils.getProperty(a,b)===d},c.Group.prototype.set=function(a,b,c,d,e,f,g){if(void 0===g&&(g=!1),b=b.split("."),void 0===d&&(d=!1),void 0===e&&(e=!1),(!1===d||d&&a.alive)&&(!1===e||e&&a.visible))return this.setProperty(a,b,c,f,g)},c.Group.prototype.setAll=function(a,b,c,d,e,f){void 0===c&&(c=!1),void 0===d&&(d=!1),void 0===f&&(f=!1),a=a.split("."),e=e||0;for(var g=0;g2){c=[];for(var d=2;d2){e=[];for(var f=2;f2){d=[null];for(var e=2;e2){d=[null];for(var e=2;e2){d=[null];for(var e=2;eb[this._sortProperty]?1:a.zb[this._sortProperty]?-1:0},c.Group.prototype.iterate=function(a,b,d,e,f,g){if(0===this.children.length){if(d===c.Group.RETURN_TOTAL)return 0;if(d===c.Group.RETURN_ALL)return[]}var h=0;if(d===c.Group.RETURN_ALL)var i=[];for(var j=0;j0)return this.children[this.children.length-1]},c.Group.prototype.getBottom=function(){if(this.children.length>0)return this.children[0]},c.Group.prototype.getClosestTo=function(a,b,d){for(var e=Number.MAX_VALUE,f=0,g=null,h=0;he&&(!b||b.call(d,i,f))&&(e=f,g=i)}return g},c.Group.prototype.countLiving=function(){return this.iterate("alive",!0,c.Group.RETURN_TOTAL)},c.Group.prototype.countDead=function(){return this.iterate("alive",!1,c.Group.RETURN_TOTAL)},c.Group.prototype.getRandom=function(a,b){return void 0===a&&(a=0),void 0===b&&(b=this.children.length),0===b?null:c.ArrayUtils.getRandomItem(this.children,a,b)},c.Group.prototype.getRandomExists=function(a,b){var c=this.getAll("exists",!0,a,b);return this.game.rnd.pick(c)},c.Group.prototype.getAll=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=this.children.length);for(var e=[],f=c;f0&&a instanceof c.Group){do{a.add(this.children[0],b)}while(this.children.length>0);this.hash=[],this.cursor=null}return a},c.Group.prototype.removeAll=function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=!1),void 0===c&&(c=!1),0!==this.children.length){do{!b&&this.children[0].events&&this.children[0].events.onRemovedFromGroup$dispatch(this.children[0],this);var d=this.removeChild(this.children[0]);this.removeFromHash(d),a&&d&&d.destroy(!0,c)}while(this.children.length>0);this.hash=[],this.cursor=null}},c.Group.prototype.removeBetween=function(a,b,c,d){if(void 0===b&&(b=this.children.length-1),void 0===c&&(c=!1),void 0===d&&(d=!1),0!==this.children.length){if(a>b||a<0||b>this.children.length)return!1;for(var e=b;e>=a;){!d&&this.children[e].events&&this.children[e].events.onRemovedFromGroup$dispatch(this.children[e],this);var f=this.removeChild(this.children[e]);this.removeFromHash(f),c&&f&&f.destroy(!0),this.cursor===this.children[e]&&(this.cursor=null),e--}this.updateZ()}},c.Group.prototype.destroy=function(a,b){null===this.game||this.ignoreDestroy||(void 0===a&&(a=!0),void 0===b&&(b=!1),this.onDestroy.dispatch(this,a,b),this.removeAll(a),this.cursor=null,this.filters=null,this.pendingDestroy=!1,b||(this.parent&&this.parent.removeChild(this),this.game=null,this.exists=!1))},Object.defineProperty(c.Group.prototype,"total",{get:function(){return this.iterate("exists",!0,c.Group.RETURN_TOTAL)}}),Object.defineProperty(c.Group.prototype,"length",{get:function(){return this.children.length}}),Object.defineProperty(c.Group.prototype,"angle",{get:function(){return c.Math.radToDeg(this.rotation)},set:function(a){this.rotation=c.Math.degToRad(a)}}),Object.defineProperty(c.Group.prototype,"centerX",{get:function(){return this.getBounds(this.parent).centerX},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.halfWidth}}),Object.defineProperty(c.Group.prototype,"centerY",{get:function(){return this.getBounds(this.parent).centerY},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.halfHeight}}),Object.defineProperty(c.Group.prototype,"left",{get:function(){return this.getBounds(this.parent).left},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c}}),Object.defineProperty(c.Group.prototype,"right",{get:function(){return this.getBounds(this.parent).right},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.width}}),Object.defineProperty(c.Group.prototype,"top",{get:function(){return this.getBounds(this.parent).top},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c}}),Object.defineProperty(c.Group.prototype,"bottom",{get:function(){return this.getBounds(this.parent).bottom},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.height}}),c.World=function(a){c.Group.call(this,a,null,"__world",!1),this.bounds=new c.Rectangle(0,0,a.width,a.height),this.camera=null,this._definedSize=!1,this._width=a.width,this._height=a.height,this.game.state.onStateChange.add(this.stateChange,this)},c.World.prototype=Object.create(c.Group.prototype),c.World.prototype.constructor=c.World,c.World.prototype.boot=function(){this.camera=new c.Camera(this.game,0,0,0,this.game.width,this.game.height),this.game.stage.addChild(this),this.camera.boot()},c.World.prototype.stateChange=function(){this.x=0,this.y=0,this.camera.reset()},c.World.prototype.setBounds=function(a,b,c,d){this._definedSize=!0,this._width=c,this._height=d,this.bounds.setTo(a,b,c,d),this.x=a,this.y=b,this.camera.bounds&&this.camera.bounds.setTo(a,b,Math.max(c,this.game.width),Math.max(d,this.game.height)),this.game.physics.setBoundsToWorld()},c.World.prototype.resize=function(a,b){this._definedSize&&(athis.bounds.right&&(a.x=this.bounds.left)),e&&(a.y+a._currentBounds.heightthis.bounds.bottom&&(a.y=this.bounds.top))):(d&&a.x+bthis.bounds.right&&(a.x=this.bounds.left-b),e&&a.y+bthis.bounds.bottom&&(a.y=this.bounds.top-b))},Object.defineProperty(c.World.prototype,"width",{get:function(){return this.bounds.width},set:function(a){a1&&!this.forceSingleUpdate)this.time.time>this._nextFpsNotification&&(this._nextFpsNotification=this.time.time+1e4,this.fpsProblemNotifier.dispatch()),this._deltaTime=0,this._spiraling=0,this.updateRender(this.time.slowMotion*this.time.desiredFps);else{var b=1e3*this.time.slowMotion/this.time.desiredFps;this._deltaTime+=Math.max(Math.min(3*b,this.time.elapsed),0);var c=0;for(this.updatesThisFrame=Math.floor(this._deltaTime/b),this.forceSingleUpdate&&(this.updatesThisFrame=Math.min(1,this.updatesThisFrame));this._deltaTime>=b&&(this._deltaTime-=b,this.currentUpdateID=c,this.updateLogic(this.time.desiredFpsMult),c++,!this.forceSingleUpdate||1!==c);)this.time.refresh();c>this._lastCount?this._spiraling++:c=c.Input.MAX_POINTERS)return console.warn("Phaser.Input.addPointer: Maximum limit of "+c.Input.MAX_POINTERS+" pointers reached."),null;var a=this.pointers.length+1,b=new c.Pointer(this.game,a,c.PointerMode.TOUCH);return this.pointers.push(b),this["pointer"+a]=b,b},update:function(){if(this.keyboard&&this.keyboard.update(),this.pollRate>0&&this._pollCounter=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(a);if(!this.pointer2.active)return this.pointer2.start(a);for(var b=2;b0;c++){this.pointers[c].active&&b--}return a-b},getPointer:function(a){void 0===a&&(a=!1);for(var b=0;b=g&&this._localPoint.x=h&&this._localPoint.y=g&&this._localPoint.x=h&&this._localPoint.y0&&this._pollCounterthis.game.time.time},justReleased:function(a){return a=a||250,this.isUp&&this.timeUp+a>this.game.time.time},reset:function(){this.isDown=!1,this.isUp=!0,this.timeDown=this.game.time.time,this.repeats=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1},destroy:function(){this.onDown.dispose(),this.onUp.dispose(),this.onFloat.dispose(),this.parent=null,this.game=null}},c.DeviceButton.prototype.constructor=c.DeviceButton,Object.defineProperty(c.DeviceButton.prototype,"duration",{get:function(){return this.isUp?-1:this.game.time.time-this.timeDown}}),c.Pointer=function(a,b,d){this.game=a,this.id=b,this.type=c.POINTER,this.exists=!0,this.identifier=0,this.pointerId=null,this.pointerMode=d||c.PointerMode.CURSOR|c.PointerMode.CONTACT,this.target=null,this.button=null,this.leftButton=new c.DeviceButton(this,c.Pointer.LEFT_BUTTON),this.middleButton=new c.DeviceButton(this,c.Pointer.MIDDLE_BUTTON),this.rightButton=new c.DeviceButton(this,c.Pointer.RIGHT_BUTTON),this.backButton=new c.DeviceButton(this,c.Pointer.BACK_BUTTON),this.forwardButton=new c.DeviceButton(this,c.Pointer.FORWARD_BUTTON),this.eraserButton=new c.DeviceButton(this,c.Pointer.ERASER_BUTTON),this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isMouse=0===b,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new c.Point,this.positionDown=new c.Point,this.positionUp=new c.Point,this.circle=new c.Circle(0,0,44),this._clickTrampolines=null,this._trampolineTargetObject=null},c.Pointer.NO_BUTTON=0,c.Pointer.LEFT_BUTTON=1,c.Pointer.RIGHT_BUTTON=2,c.Pointer.MIDDLE_BUTTON=4,c.Pointer.BACK_BUTTON=8,c.Pointer.FORWARD_BUTTON=16,c.Pointer.ERASER_BUTTON=32,c.Pointer.prototype={resetButtons:function(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())},processButtonsDown:function(a,b){c.Pointer.LEFT_BUTTON&a&&this.leftButton.start(b),c.Pointer.RIGHT_BUTTON&a&&this.rightButton.start(b),c.Pointer.MIDDLE_BUTTON&a&&this.middleButton.start(b),c.Pointer.BACK_BUTTON&a&&this.backButton.start(b),c.Pointer.FORWARD_BUTTON&a&&this.forwardButton.start(b),c.Pointer.ERASER_BUTTON&a&&this.eraserButton.start(b)},processButtonsUp:function(a,b){a===c.Mouse.LEFT_BUTTON&&this.leftButton.stop(b),a===c.Mouse.RIGHT_BUTTON&&this.rightButton.stop(b),a===c.Mouse.MIDDLE_BUTTON&&this.middleButton.stop(b),a===c.Mouse.BACK_BUTTON&&this.backButton.stop(b),a===c.Mouse.FORWARD_BUTTON&&this.forwardButton.stop(b),5===a&&this.eraserButton.stop(b)},updateButtons:function(a){this.button=a.button;var b="down"===a.type.toLowerCase().substr(-4);void 0!==a.buttons?b?this.processButtonsDown(a.buttons,a):this.processButtonsUp(a.button,a):b?this.leftButton.start(a):(this.leftButton.stop(a),this.rightButton.stop(a)),1===a.buttons&&a.ctrlKey&&this.leftButton.isDown&&(this.leftButton.stop(a),this.rightButton.start(a)),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)},start:function(a){var b=this.game.input;return a.pointerId&&(this.pointerId=a.pointerId),this.identifier=a.identifier,this.target=a.target,this.isMouse?this.updateButtons(a):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this._clickTrampolines=null,this._trampolineTargetObject=null,this.msSinceLastClick=this.game.time.time-this.timeDown,this.timeDown=this.game.time.time,this._holdSent=!1,this.move(a,!0),this.positionDown.setTo(this.x,this.y),(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.x=this.x,b.y=this.y,b.position.setTo(this.x,this.y),b.onDown.dispatch(this,a),b.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&this.targetObject._touchedHandler(this),this},update:function(){var a=this.game.input +;this.active&&(this.dirty&&(a.interactiveItems.total>0&&this.processInteractiveObjects(!1),this.dirty=!1),!1===this._holdSent&&this.duration>=a.holdRate&&((a.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||a.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||a.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===a.totalActivePointers)&&a.onHold.dispatch(this),this._holdSent=!0),a.recordPointerHistory&&this.game.time.time>=this._nextDrop&&(this._nextDrop=this.game.time.time+a.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>a.recordLimit&&this._history.shift()))},move:function(a,b){var d=this.game.input;if(!d.pollLocked){void 0===b&&(b=!1),void 0!==a.button&&(this.button=a.button),b&&this.isMouse&&this.updateButtons(a),this.clientX=a.clientX,this.clientY=a.clientY,this.pageX=a.pageX,this.pageY=a.pageY,this.screenX=a.screenX,this.screenY=a.screenY,this.isMouse&&d.mouse.locked&&!b&&(this.rawMovementX=a.movementX||a.mozMovementX||a.webkitMovementX||0,this.rawMovementY=a.movementY||a.mozMovementY||a.webkitMovementY||0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.offset.x)*d.scale.x,this.y=(this.pageY-this.game.scale.offset.y)*d.scale.y,this.position.setTo(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(d.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||d.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||d.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===d.totalActivePointers)&&(d.activePointer=this,d.x=this.x,d.y=this.y,d.position.setTo(d.x,d.y),d.circle.x=d.x,d.circle.y=d.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY);for(var e=d.moveCallbacks.length;e--;)d.moveCallbacks[e].callback.call(d.moveCallbacks[e].context,this,this.x,this.y,b);return null!==this.targetObject&&!0===this.targetObject.isDragged?!1===this.targetObject.update(this)&&(this.targetObject=null):d.interactiveItems.total>0&&this.processInteractiveObjects(b),this}},processInteractiveObjects:function(a){var b=0,c=-1,d=null,e=this.game.input.interactiveItems.first;for(this.interactiveCandidates=[];e;)e.checked=!1,e.validForInput(c,b,!1)&&(e.checked=!0,(a&&e.checkPointerDown(this,!0)||!a&&e.checkPointerOver(this,!0))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e))),e=this.game.input.interactiveItems.next;for(e=this.game.input.interactiveItems.first;e;)!e.checked&&e.validForInput(c,b,!0)&&(a&&e.checkPointerDown(this,!1)||!a&&e.checkPointerOver(this,!1))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e)),e=this.game.input.interactiveItems.next;return this.game.input.customCandidateHandler&&(d=this.game.input.customCandidateHandler.call(this.game.input.customCandidateHandlerContext,this,this.interactiveCandidates,d)),this.swapTarget(d,!1),null!==this.targetObject},swapTarget:function(a,b){void 0===b&&(b=!1),null===a?this.targetObject&&(this.targetObject._pointerOutHandler(this,b),this.targetObject=null):null===this.targetObject?(this.targetObject=a,a._pointerOverHandler(this,b)):this.targetObject===a?!1===a.update(this)&&(this.targetObject=null):(this.targetObject._pointerOutHandler(this,b),this.targetObject=a,this.targetObject._pointerOverHandler(this,b))},leave:function(a){this.withinGame=!1,this.move(a,!1)},stop:function(a){var b=this.game.input;return this._stateReset&&this.withinGame?void a.preventDefault():(this.timeUp=this.game.time.time,(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.onUp.dispatch(this,a),this.duration>=0&&this.duration<=b.tapRate&&(this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(a.pageX,a.pageY),this.pointerId=null,this.identifier=null,this.positionUp.setTo(this.x,this.y),!1===this.isMouse&&b.currentPointers--,b.interactiveItems.callAll("_releasedHandler",this),this._clickTrampolines&&(this._trampolineTargetObject=this.targetObject),this.targetObject=null,this)},justPressed:function(a){return a=a||this.game.input.justPressedRate,!0===this.isDown&&this.timeDown+a>this.game.time.time},justReleased:function(a){return a=a||this.game.input.justReleasedRate,this.isUp&&this.timeUp+a>this.game.time.time},addClickTrampoline:function(a,b,c,d){if(this.isDown){for(var e=this._clickTrampolines=this._clickTrampolines||[],f=0;fa||this.priorityID===a&&this.sprite.renderOrderID>b))},isPixelPerfect:function(){return this.pixelPerfectClick||this.pixelPerfectOver},pointerX:function(a){return a=a||0,this._pointerData[a].x},pointerY:function(a){return a=a||0,this._pointerData[a].y},pointerDown:function(a){return a=a||0,this._pointerData[a].isDown},pointerUp:function(a){return a=a||0,this._pointerData[a].isUp},pointerTimeDown:function(a){return a=a||0,this._pointerData[a].timeDown},pointerTimeUp:function(a){return a=a||0,this._pointerData[a].timeUp},pointerOver:function(a){if(!this.enabled)return!1;if(void 0===a){for(var b=0;b<10;b++)if(this._pointerData[b].isOver)return!0;return!1}return this._pointerData[a].isOver},pointerOut:function(a){if(!this.enabled)return!1;if(void 0!==a)return this._pointerData[a].isOut;for(var b=0;b<10;b++)if(this._pointerData[b].isOut)return!0},pointerTimeOver:function(a){return a=a||0,this._pointerData[a].timeOver},pointerTimeOut:function(a){return a=a||0,this._pointerData[a].timeOut},pointerDragged:function(a){return a=a||0,this._pointerData[a].isDragged},checkPointerDown:function(a,b){return!!(a.isDown&&this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectClick)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPointerOver:function(a,b){return!!(this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectOver)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPixel:function(a,b,c){if(this.sprite.texture.baseTexture.source){if(null===a&&null===b){this.game.input.getLocalPosition(this.sprite,c,this._tempPoint);var a=this._tempPoint.x,b=this._tempPoint.y}if(0!==this.sprite.anchor.x&&(a-=-this.sprite.texture.frame.width*this.sprite.anchor.x),0!==this.sprite.anchor.y&&(b-=-this.sprite.texture.frame.height*this.sprite.anchor.y),a+=this.sprite.texture.frame.x,b+=this.sprite.texture.frame.y,this.sprite.texture.trim&&(a-=this.sprite.texture.trim.x,b-=this.sprite.texture.trim.y,athis.sprite.texture.crop.right||bthis.sprite.texture.crop.bottom))return this._dx=a,this._dy=b,!1;this._dx=a,this._dy=b,this.game.input.hitContext.clearRect(0,0,1,1),this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source,a,b,1,1,0,0,1,1);if(this.game.input.hitContext.getImageData(0,0,1,1).data[3]>=this.pixelPerfectAlpha)return!0}return!1},update:function(a){if(null!==this.sprite&&void 0!==this.sprite.parent)return this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=c.Math.distance(a.x,a.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(a),!0):this.draggable&&this._draggedPointerID===a.id?this.updateDrag(a,!1):this._pointerData[a.id].isOver?this.checkPointerOver(a)?(this._pointerData[a.id].x=a.x-this.sprite.x,this._pointerData[a.id].y=a.y-this.sprite.y,!0):(this._pointerOutHandler(a),!1):void 0:(this._pointerOutHandler(a),!1)},_pointerOverHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];if(!1===d.isOver||a.dirty){var e=!1===d.isOver;d.isOver=!0,d.isOut=!1,d.timeOver=this.game.time.time,d.x=a.x-this.sprite.x,d.y=a.y-this.sprite.y,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!b&&e&&this.sprite&&this.sprite.events&&this.sprite.events.onInputOver$dispatch(this.sprite,a),this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,a)}}},_pointerOutHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];d.isOver=!1,d.isOut=!0,d.timeOut=this.game.time.time,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),!b&&this.sprite&&this.sprite.events&&(this.sprite.events.onInputOut$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,a))}},_touchedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(!b.isDown&&b.isOver){if(this.pixelPerfectClick&&!this.checkPixel(null,null,a))return;if(b.isDown=!0,b.isUp=!1,b.timeDown=this.game.time.time,this.downPoint.set(a.x,a.y),a.dirty=!0,this.sprite&&this.sprite.events&&(this.sprite.events.onInputDown$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,a),null===this.sprite))return;this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(a):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.add(this.dragTimeThreshold,this.dragTimeElapsed,this,a)):this._dragTimePass=!0)),this.bringToTop&&this.sprite.bringToTop()}}},dragTimeElapsed:function(a){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(a)},_releasedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(b.isDown&&a.isUp){b.isDown=!1,b.isUp=!0,b.timeUp=this.game.time.time,b.downDuration=b.timeUp-b.timeDown;var d=this.checkPointerOver(a);this.sprite&&this.sprite.events&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===a.id)||this.sprite.events.onInputUp$dispatch(this.sprite,a,d),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,a,d),d&&(d=this.checkPointerOver(a))),b.isOver=d,!d&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),a.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===a.id&&this.stopDrag(a)}}},updateDrag:function(a,b){if(void 0===b&&(b=!1),a.isUp)return this.stopDrag(a),!1;var c=this.globalToLocalX(a.x)+this._dragPoint.x+this.dragOffset.x,d=this.globalToLocalY(a.y)+this._dragPoint.y+this.dragOffset.y;if(this.sprite.fixedToCamera)this.allowHorizontalDrag&&(this.sprite.cameraOffset.x=c),this.allowVerticalDrag&&(this.sprite.cameraOffset.y=d),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.cameraOffset.x=Math.round((this.sprite.cameraOffset.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.cameraOffset.y=Math.round((this.sprite.cameraOffset.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.cameraOffset.x,this.sprite.cameraOffset.y));else{var e=this.game.camera.x-this._pointerData[a.id].camX,f=this.game.camera.y-this._pointerData[a.id].camY;this.allowHorizontalDrag&&(this.sprite.x=c+e),this.allowVerticalDrag&&(this.sprite.y=d+f),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.x=Math.round((this.sprite.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.y=Math.round((this.sprite.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.x,this.sprite.y))}return this.sprite.events.onDragUpdate.dispatch(this.sprite,a,c,d,this.snapPoint,b),!0},justOver:function(a,b){return a=a||0,b=b||500,this._pointerData[a].isOver&&this.overDuration(a)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height)):(this.sprite.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.offsetY)))},checkBoundsSprite:function(){this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera?(this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height)):(this.sprite.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.offsetY)))}},c.InputHandler.prototype.constructor=c.InputHandler,c.Gamepad=function(a){this.game=a,this._gamepadIndexMap={},this._rawPads=[],this._active=!1,this.enabled=!0,this._gamepadSupportAvailable=!!navigator.webkitGetGamepads||!!navigator.webkitGamepads||-1!==navigator.userAgent.indexOf("Firefox/")||!!navigator.getGamepads,this._prevRawGamepadTypes=[],this._prevTimestamps=[],this.callbackContext=this,this.onConnectCallback=null,this.onDisconnectCallback=null,this.onDownCallback=null,this.onUpCallback=null,this.onAxisCallback=null,this.onFloatCallback=null,this._ongamepadconnected=null,this._gamepaddisconnected=null,this._gamepads=[new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this)]},c.Gamepad.prototype={addCallbacks:function(a,b){void 0!==b&&(this.onConnectCallback="function"==typeof b.onConnect?b.onConnect:this.onConnectCallback,this.onDisconnectCallback="function"==typeof b.onDisconnect?b.onDisconnect:this.onDisconnectCallback,this.onDownCallback="function"==typeof b.onDown?b.onDown:this.onDownCallback,this.onUpCallback="function"==typeof b.onUp?b.onUp:this.onUpCallback,this.onAxisCallback="function"==typeof b.onAxis?b.onAxis:this.onAxisCallback,this.onFloatCallback="function"==typeof b.onFloat?b.onFloat:this.onFloatCallback,this.callbackContext=a)},start:function(){if(!this._active){this._active=!0;var a=this;this._onGamepadConnected=function(b){return a.onGamepadConnected(b)},this._onGamepadDisconnected=function(b){return a.onGamepadDisconnected(b)},window.addEventListener("gamepadconnected",this._onGamepadConnected,!1),window.addEventListener("gamepaddisconnected",this._onGamepadDisconnected,!1)}},onGamepadConnected:function(a){var b=a.gamepad;this._rawPads.push(b),this._gamepads[b.index].connect(b)},onGamepadDisconnected:function(a){var b=a.gamepad;for(var c in this._rawPads)this._rawPads[c].index===b.index&&this._rawPads.splice(c,1);this._gamepads[b.index].disconnect()},update:function(){this._pollGamepads(),this.pad1.pollStatus(),this.pad2.pollStatus(),this.pad3.pollStatus(),this.pad4.pollStatus()},_pollGamepads:function(){if(this._active){if(navigator.getGamepads)var a=navigator.getGamepads();else if(navigator.webkitGetGamepads)var a=navigator.webkitGetGamepads();else if(navigator.webkitGamepads)var a=navigator.webkitGamepads();if(a){this._rawPads=[];for(var b=!1,c=0;c0&&d>this.deadZone||d<0&&d<-this.deadZone?this.processAxisChange(c,d):this.processAxisChange(c,0)}this._prevTimestamp=this._rawPad.timestamp}},connect:function(a){var b=!this.connected;this.connected=!0,this.index=a.index,this._rawPad=a,this._buttons=[],this._buttonsLen=a.buttons.length,this._axes=[],this._axesLen=a.axes.length;for(var d=0;dthis.maxHealth&&(this.health=this.maxHealth),this},heal:function(a){return this.alive&&(this.health+=a,this.health>this.maxHealth&&(this.health=this.maxHealth)),this}},c.Component.InCamera=function(){},c.Component.InCamera.prototype={inCamera:{get:function(){return this.game.world.camera.view.intersects(this._bounds)}}},c.Component.InputEnabled=function(){},c.Component.InputEnabled.prototype={input:null,inputEnabled:{get:function(){return this.input&&this.input.enabled},set:function(a){a?null===this.input?(this.input=new c.InputHandler(this),this.input.start()):this.input&&!this.input.enabled&&this.input.start():this.input&&this.input.enabled&&this.input.stop()}}},c.Component.InWorld=function(){},c.Component.InWorld.preUpdate=function(){if(this.autoCull||this.checkWorldBounds){if(this._bounds.copyFrom(this.getBounds()),this._bounds.x+=this.game.camera.view.x,this._bounds.y+=this.game.camera.view.y,this.autoCull)if(this.game.world.camera.view.intersects(this._bounds))this.renderable=!0,this.game.world.camera.totalInView++;else if(this.renderable=!1,this.outOfCameraBoundsKill)return this.kill(),!1;if(this.checkWorldBounds)if(this._outOfBoundsFired&&this.game.world.bounds.intersects(this._bounds))this._outOfBoundsFired=!1,this.events.onEnterBounds$dispatch(this);else if(!this._outOfBoundsFired&&!this.game.world.bounds.intersects(this._bounds)&&(this._outOfBoundsFired=!0,this.events.onOutOfBounds$dispatch(this),this.outOfBoundsKill))return this.kill(),!1}return!0},c.Component.InWorld.prototype={checkWorldBounds:!1,outOfBoundsKill:!1,outOfCameraBoundsKill:!1,_outOfBoundsFired:!1,inWorld:{get:function(){return this.game.world.bounds.intersects(this.getBounds())}}},c.Component.LifeSpan=function(){},c.Component.LifeSpan.preUpdate=function(){return!(this.lifespan>0&&(this.lifespan-=this.game.time.physicsElapsedMS,this.lifespan<=0))||(this.kill(),!1)},c.Component.LifeSpan.prototype={alive:!0,lifespan:0,revive:function(a){return void 0===a&&(a=100),this.alive=!0,this.exists=!0,this.visible=!0,"function"==typeof this.setHealth&&this.setHealth(a),this.events&&this.events.onRevived$dispatch(this),this},kill:function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.events&&this.events.onKilled$dispatch(this),this}},c.Component.LoadTexture=function(){},c.Component.LoadTexture.prototype={customRender:!1,_frame:null,loadTexture:function(a,b,d){a===c.PENDING_ATLAS?(a=b,b=0):b=b||0,(d||void 0===d)&&this.animations&&this.animations.stop(),this.key=a,this.customRender=!1;var e=this.game.cache,f=!0,g=!this.texture.baseTexture.scaleMode;if(c.RenderTexture&&a instanceof c.RenderTexture)this.key=a.key,this.setTexture(a);else if(c.BitmapData&&a instanceof c.BitmapData)this.customRender=!0,this.setTexture(a.texture),f=e.hasFrameData(a.key,c.Cache.BITMAPDATA)?!this.animations.loadFrameData(e.getFrameData(a.key,c.Cache.BITMAPDATA),b):!this.animations.loadFrameData(a.frameData,0);else if(c.Video&&a instanceof c.Video){this.customRender=!0;var h=a.texture.valid;this.setTexture(a.texture),this.setFrame(a.texture.frame.clone()),a.onChangeSource.add(this.resizeFrame,this),this.texture.valid=h}else if(c.Tilemap&&a instanceof c.TilemapLayer)this.setTexture(PIXI.Texture.fromCanvas(a.canvas));else if(a instanceof PIXI.Texture)this.setTexture(a);else{var i=e.getImage(a,!0);this.key=i.key,this.setTexture(new PIXI.Texture(i.base)),this.texture.baseTexture.skipRender="__default"===a,f=!this.animations.loadFrameData(i.frameData,b)}f&&(this._frame=c.Rectangle.clone(this.texture.frame)),g||(this.texture.baseTexture.scaleMode=1)},setFrame:function(a){this._frame=a,this.texture.frame.x=a.x,this.texture.frame.y=a.y,this.texture.frame.width=a.width,this.texture.frame.height=a.height,this.texture.crop.x=a.x,this.texture.crop.y=a.y,this.texture.crop.width=a.width,this.texture.crop.height=a.height,a.trimmed?(this.texture.trim?(this.texture.trim.x=a.spriteSourceSizeX,this.texture.trim.y=a.spriteSourceSizeY,this.texture.trim.width=a.sourceSizeW,this.texture.trim.height=a.sourceSizeH):this.texture.trim={x:a.spriteSourceSizeX,y:a.spriteSourceSizeY,width:a.sourceSizeW,height:a.sourceSizeH},this.texture.width=a.sourceSizeW,this.texture.height=a.sourceSizeH,this.texture.frame.width=a.sourceSizeW,this.texture.frame.height=a.sourceSizeH):!a.trimmed&&this.texture.trim&&(this.texture.trim=null),this.cropRect&&this.updateCrop(),this.texture.requiresReTint=!0,this.texture._updateUvs(),this.tilingTexture&&(this.refreshTexture=!0)},resizeFrame:function(a,b,c){this.texture.frame.resize(b,c),this.texture.setFrame(this.texture.frame)},resetFrame:function(){this._frame&&this.setFrame(this._frame)},frame:{get:function(){return this.animations.frame},set:function(a){this.animations.frame=a}},frameName:{get:function(){return this.animations.frameName},set:function(a){this.animations.frameName=a}}},c.Component.Overlap=function(){},c.Component.Overlap.prototype={overlap:function(a){return c.Rectangle.intersects(this.getBounds(),a.getBounds())}},c.Component.PhysicsBody=function(){},c.Component.PhysicsBody.preUpdate=function(){return this.fresh&&this.exists?(this.world.setTo(this.parent.position.x+this.position.x,this.parent.position.y+this.position.y),this.worldTransform.tx=this.world.x,this.worldTransform.ty=this.world.y,this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,this.body&&this.body.preUpdate(),this.fresh=!1,!1):(this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,!(!this._exists||!this.parent.exists)||(this.renderOrderID=-1,!1))},c.Component.PhysicsBody.postUpdate=function(){this.exists&&this.body&&this.body.postUpdate()},c.Component.PhysicsBody.prototype={body:null,x:{get:function(){return this.position.x},set:function(a){this.position.x=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}},y:{get:function(){return this.position.y},set:function(a){this.position.y=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}}},c.Component.Reset=function(){},c.Component.Reset.prototype.reset=function(a,b,c){return void 0===c&&(c=1),this.world.set(a,b),this.position.set(a,b),this.fresh=!0,this.exists=!0,this.visible=!0,this.renderable=!0,this.components.InWorld&&(this._outOfBoundsFired=!1),this.components.LifeSpan&&(this.alive=!0,this.health=c),this.components.PhysicsBody&&this.body&&this.body.reset(a,b,!1,!1),this},c.Component.ScaleMinMax=function(){},c.Component.ScaleMinMax.prototype={transformCallback:null,transformCallbackContext:this,scaleMin:null,scaleMax:null,checkTransform:function(a){this.scaleMin&&(a.athis.scaleMax.x&&(a.a=this.scaleMax.x),a.d>this.scaleMax.y&&(a.d=this.scaleMax.y))},setScaleMinMax:function(a,b,d,e){void 0===b?b=d=e=a:void 0===d&&(d=e=b,b=a),null===a?this.scaleMin=null:this.scaleMin?this.scaleMin.set(a,b):this.scaleMin=new c.Point(a,b),null===d?this.scaleMax=null:this.scaleMax?this.scaleMax.set(d,e):this.scaleMax=new c.Point(d,e),null===this.scaleMin?this.transformCallback=null:(this.transformCallback=this.checkTransform,this.transformCallbackContext=this)}},c.Component.Smoothed=function(){},c.Component.Smoothed.prototype={smoothed:{get:function(){return!this.texture.baseTexture.scaleMode},set:function(a){a?this.texture&&(this.texture.baseTexture.scaleMode=0):this.texture&&(this.texture.baseTexture.scaleMode=1)}}},c.GameObjectFactory=function(a){this.game=a,this.world=this.game.world},c.GameObjectFactory.prototype={existing:function(a){return this.world.add(a)},weapon:function(a,b,d,e){var f=this.game.plugins.add(c.Weapon);return f.createBullets(a,b,d,e),f},image:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Image(this.game,a,b,d,e))},sprite:function(a,b,c,d,e){return void 0===e&&(e=this.world),e.create(a,b,c,d)},creature:function(a,b,d,e,f){void 0===f&&(f=this.world);var g=new c.Creature(this.game,a,b,d,e);return f.add(g),g},tween:function(a){return this.game.tweens.create(a)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},physicsGroup:function(a,b,d,e){return new c.Group(this.game,b,d,e,!0,a)},spriteBatch:function(a,b,d){return void 0===a&&(a=null),void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)}, +tileSprite:function(a,b,d,e,f,g,h){return void 0===h&&(h=this.world),h.add(new c.TileSprite(this.game,a,b,d,e,f,g))},rope:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.Rope(this.game,a,b,d,e,f))},text:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Text(this.game,a,b,d,e))},button:function(a,b,d,e,f,g,h,i,j,k){return void 0===k&&(k=this.world),k.add(new c.Button(this.game,a,b,d,e,f,g,h,i,j))},graphics:function(a,b,d){return void 0===d&&(d=this.world),d.add(new c.Graphics(this.game,a,b))},emitter:function(a,b,d){return this.game.particles.add(new c.Particles.Arcade.Emitter(this.game,a,b,d))},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.BitmapText(this.game,a,b,d,e,f))},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},video:function(a,b){return new c.Video(this.game,a,b)},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a},plugin:function(a){return this.game.plugins.add(a)}},c.GameObjectFactory.prototype.constructor=c.GameObjectFactory,c.GameObjectCreator=function(a){this.game=a,this.world=this.game.world},c.GameObjectCreator.prototype={image:function(a,b,d,e){return new c.Image(this.game,a,b,d,e)},sprite:function(a,b,d,e){return new c.Sprite(this.game,a,b,d,e)},tween:function(a){return new c.Tween(a,this.game,this.game.tweens)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},spriteBatch:function(a,b,d){return void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},tileSprite:function(a,b,d,e,f,g){return new c.TileSprite(this.game,a,b,d,e,f,g)},rope:function(a,b,d,e,f){return new c.Rope(this.game,a,b,d,e,f)},text:function(a,b,d,e){return new c.Text(this.game,a,b,d,e)},button:function(a,b,d,e,f,g,h,i,j){return new c.Button(this.game,a,b,d,e,f,g,h,i,j)},graphics:function(a,b){return new c.Graphics(this.game,a,b)},emitter:function(a,b,d){return new c.Particles.Arcade.Emitter(this.game,a,b,d)},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return new c.BitmapText(this.game,a,b,d,e,f,g)},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a}},c.GameObjectCreator.prototype.constructor=c.GameObjectCreator,c.Sprite=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.SPRITE,this.physicsType=c.SPRITE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Sprite.prototype=Object.create(PIXI.Sprite.prototype),c.Sprite.prototype.constructor=c.Sprite,c.Component.Core.install.call(c.Sprite.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","Health","InCamera","InputEnabled","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Sprite.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Sprite.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Sprite.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Sprite.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Sprite.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Image=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.IMAGE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Image.prototype=Object.create(PIXI.Sprite.prototype),c.Image.prototype.constructor=c.Image,c.Component.Core.install.call(c.Image.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Destroy","FixedToCamera","InputEnabled","LifeSpan","LoadTexture","Overlap","Reset","ScaleMinMax","Smoothed"]),c.Image.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Image.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Image.prototype.preUpdate=function(){return!!this.preUpdateInWorld()&&this.preUpdateCore()},c.Button=function(a,b,d,e,f,g,h,i,j,k){b=b||0,d=d||0,e=e||null,f=f||null,g=g||this,c.Image.call(this,a,b,d,e,i),this.type=c.BUTTON,this.physicsType=c.SPRITE,this._onOverFrame=null,this._onOutFrame=null,this._onDownFrame=null,this._onUpFrame=null,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new c.Signal,this.onInputOut=new c.Signal,this.onInputDown=new c.Signal,this.onInputUp=new c.Signal,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=c.PointerMode.TOUCH,this.freezeFrames=!1,this.forceOut=!1,this.inputEnabled=!0,this.input.start(0,!0),this.input.useHandCursor=!0,this.setFrames(h,i,j,k),null!==f&&this.onInputUp.add(f,g),this.events.onInputOver.add(this.onInputOverHandler,this),this.events.onInputOut.add(this.onInputOutHandler,this),this.events.onInputDown.add(this.onInputDownHandler,this),this.events.onInputUp.add(this.onInputUpHandler,this),this.events.onRemovedFromWorld.add(this.removedFromWorld,this)},c.Button.prototype=Object.create(c.Image.prototype),c.Button.prototype.constructor=c.Button;c.Button.prototype.clearFrames=function(){this.setFrames(null,null,null,null)},c.Button.prototype.removedFromWorld=function(){this.inputEnabled=!1},c.Button.prototype.setStateFrame=function(a,b,c){var d="_on"+a+"Frame";null!==b?(this[d]=b,c&&this.changeStateFrame(a)):this[d]=null},c.Button.prototype.changeStateFrame=function(a){if(this.freezeFrames)return!1;var b="_on"+a+"Frame",c=this[b];return"string"==typeof c?(this.frameName=c,!0):"number"==typeof c&&(this.frame=c,!0)},c.Button.prototype.setFrames=function(a,b,c,d){this.setStateFrame("Over",a,this.input.pointerOver()),this.setStateFrame("Out",b,!this.input.pointerOver()),this.setStateFrame("Down",c,this.input.pointerDown()),this.setStateFrame("Up",d,this.input.pointerUp())},c.Button.prototype.setStateSound=function(a,b,d){var e="on"+a+"Sound",f="on"+a+"SoundMarker";b instanceof c.Sound||b instanceof c.AudioSprite?(this[e]=b,this[f]="string"==typeof d?d:""):(this[e]=null,this[f]="")},c.Button.prototype.playStateSound=function(a){var b="on"+a+"Sound",c=this[b];if(c){var d="on"+a+"SoundMarker",e=this[d];return c.play(e),!0}return!1},c.Button.prototype.setSounds=function(a,b,c,d,e,f,g,h){this.setStateSound("Over",a,b),this.setStateSound("Out",e,f),this.setStateSound("Down",c,d),this.setStateSound("Up",g,h)},c.Button.prototype.setOverSound=function(a,b){this.setStateSound("Over",a,b)},c.Button.prototype.setOutSound=function(a,b){this.setStateSound("Out",a,b)},c.Button.prototype.setDownSound=function(a,b){this.setStateSound("Down",a,b)},c.Button.prototype.setUpSound=function(a,b){this.setStateSound("Up",a,b)},c.Button.prototype.onInputOverHandler=function(a,b){b.justReleased()&&(this.justReleasedPreventsOver&b.pointerMode)===b.pointerMode||(this.changeStateFrame("Over"),this.onOverMouseOnly&&!b.isMouse||(this.playStateSound("Over"),this.onInputOver&&this.onInputOver.dispatch(this,b)))},c.Button.prototype.onInputOutHandler=function(a,b){this.changeStateFrame("Out"),this.playStateSound("Out"),this.onInputOut&&this.onInputOut.dispatch(this,b)},c.Button.prototype.onInputDownHandler=function(a,b){this.changeStateFrame("Down"),this.playStateSound("Down"),this.onInputDown&&this.onInputDown.dispatch(this,b)},c.Button.prototype.onInputUpHandler=function(a,b,c){if(this.playStateSound("Up"),this.onInputUp&&this.onInputUp.dispatch(this,b,c),!this.freezeFrames)if(!0===this.forceOut||(this.forceOut&b.pointerMode)===b.pointerMode)this.changeStateFrame("Out");else{var d=this.changeStateFrame("Up");d||(c?this.changeStateFrame("Over"):this.changeStateFrame("Out"))}},c.SpriteBatch=function(a,b,d,e){void 0!==b&&null!==b||(b=a.world),PIXI.SpriteBatch.call(this),c.Group.call(this,a,b,d,e),this.type=c.SPRITEBATCH},c.SpriteBatch.prototype=c.Utils.extend(!0,c.SpriteBatch.prototype,PIXI.SpriteBatch.prototype,c.Group.prototype),c.SpriteBatch.prototype.constructor=c.SpriteBatch,c.BitmapData=function(a,b,d,e,f){void 0!==d&&0!==d||(d=256),void 0!==e&&0!==e||(e=256),void 0===f&&(f=!1),this.game=a,this.key=b,this.width=d,this.height=e,this.canvas=c.Canvas.create(this,d,e,null,f),this.context=this.canvas.getContext("2d",{alpha:!0}),this.ctx=this.context,this.smoothProperty=a.renderType===c.CANVAS?a.renderer.renderSession.smoothProperty:c.Canvas.getSmoothingPrefix(this.context),this.imageData=this.context.getImageData(0,0,d,e),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data),this.baseTexture=new PIXI.BaseTexture(this.canvas),this.texture=new PIXI.Texture(this.baseTexture),this.frameData=new c.FrameData,this.textureFrame=this.frameData.addFrame(new c.Frame(0,0,0,d,e,"bitmapData")),this.texture.frame=this.textureFrame,this.type=c.BITMAPDATA,this.disableTextureUpload=!1,this.dirty=!1,this.cls=this.clear,this._image=null,this._pos=new c.Point,this._size=new c.Point,this._scale=new c.Point,this._rotate=0,this._alpha={prev:1,current:1},this._anchor=new c.Point,this._tempR=0,this._tempG=0,this._tempB=0,this._circle=new c.Circle,this._swapCanvas=void 0},c.BitmapData.prototype={move:function(a,b,c){return 0!==a&&this.moveH(a,c),0!==b&&this.moveV(b,c),this},moveH:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.height,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.width-a;b&&d.drawImage(f,0,0,a,e,g,0,a,e),d.drawImage(f,a,0,g,e,0,0,g,e)}else{var g=this.width-a;b&&d.drawImage(f,g,0,a,e,0,0,a,e),d.drawImage(f,0,0,g,e,a,0,g,e)}return this.clear(),this.copy(this._swapCanvas)},moveV:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.width,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.height-a;b&&d.drawImage(f,0,0,e,a,0,g,e,a),d.drawImage(f,0,a,e,g,0,0,e,g)}else{var g=this.height-a;b&&d.drawImage(f,0,g,e,a,0,0,e,a),d.drawImage(f,0,0,e,g,0,a,e,g)}return this.clear(),this.copy(this._swapCanvas)},add:function(a){if(Array.isArray(a))for(var b=0;b=0&&a<=this.width&&b>=0&&b<=this.height&&(c.Device.LITTLE_ENDIAN?this.pixels[b*this.width+a]=g<<24|f<<16|e<<8|d:this.pixels[b*this.width+a]=d<<24|e<<16|f<<8|g,h&&(this.context.putImageData(this.imageData,0,0),this.dirty=!0)),this},setPixel:function(a,b,c,d,e,f){return this.setPixel32(a,b,c,d,e,255,f)},getPixel:function(a,b,d){d||(d=c.Color.createColor());var e=~~(a+b*this.width);return e*=4,d.r=this.data[e],d.g=this.data[++e],d.b=this.data[++e],d.a=this.data[++e],d},getPixel32:function(a,b){if(a>=0&&a<=this.width&&b>=0&&b<=this.height)return this.pixels[b*this.width+a]},getPixelRGB:function(a,b,d,e,f){return c.Color.unpackPixel(this.getPixel32(a,b),d,e,f)},getPixels:function(a){return this.context.getImageData(a.x,a.y,a.width,a.height)},getFirstPixel:function(a){void 0===a&&(a=0);var b=c.Color.createColor(),d=0,e=0,f=1,g=!1;1===a?(f=-1,e=this.height):3===a&&(f=-1,d=this.width);do{c.Color.unpackPixel(this.getPixel32(d,e),b),0===a||1===a?++d===this.width&&(d=0,((e+=f)>=this.height||e<=0)&&(g=!0)):2!==a&&3!==a||++e===this.height&&(e=0,((d+=f)>=this.width||d<=0)&&(g=!0))}while(0===b.a&&!g);return b.x=d,b.y=e,b},getBounds:function(a){return void 0===a&&(a=new c.Rectangle),a.x=this.getFirstPixel(2).x,a.x===this.width?a.setTo(0,0,0,0):(a.y=this.getFirstPixel(0).y,a.width=this.getFirstPixel(3).x-a.x+1,a.height=this.getFirstPixel(1).y-a.y+1,a)},addToWorld:function(a,b,c,d,e,f){e=e||1,f=f||1;var g=this.game.add.image(a,b,this);return g.anchor.set(c,d),g.scale.set(e,f),g},copy:function(a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){if(void 0!==a&&null!==a||(a=this),(a instanceof c.RenderTexture||a instanceof PIXI.RenderTexture)&&(a=a.getCanvas()),this._image=a,a instanceof c.Sprite||a instanceof c.Image||a instanceof c.Text||a instanceof PIXI.Sprite)this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),this._scale.set(a.scale.x,a.scale.y),this._anchor.set(a.anchor.x,a.anchor.y),this._rotate=a.rotation,this._alpha.current=a.alpha,a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source,void 0!==g&&null!==g||(g=a.x),void 0!==h&&null!==h||(h=a.y),a.texture.trim&&(g+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,h+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0));else{if(this._pos.set(0),this._scale.set(1),this._anchor.set(0),this._rotate=0,this._alpha.current=1,a instanceof c.BitmapData)this._image=a.canvas;else if("string"==typeof a){if(null===(a=this.game.cache.getImage(a)))return;this._image=a}this._size.set(this._image.width,this._image.height)}if(void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),e&&(this._size.x=e),f&&(this._size.y=f),void 0!==g&&null!==g||(g=b),void 0!==h&&null!==h||(h=d),void 0!==i&&null!==i||(i=this._size.x),void 0!==j&&null!==j||(j=this._size.y),"number"==typeof k&&(this._rotate=k),"number"==typeof l&&(this._anchor.x=l),"number"==typeof m&&(this._anchor.y=m),"number"==typeof n&&(this._scale.x=n),"number"==typeof o&&(this._scale.y=o),"number"==typeof p&&(this._alpha.current=p),void 0===q&&(q=null),void 0===r&&(r=!1),!(this._alpha.current<=0||0===this._scale.x||0===this._scale.y||0===this._size.x||0===this._size.y)){var s=this.context;return this._alpha.prev=s.globalAlpha,s.save(),s.globalAlpha=this._alpha.current,q&&(this.op=q),r&&(g|=0,h|=0),s.translate(g,h),s.scale(this._scale.x,this._scale.y),s.rotate(this._rotate),s.drawImage(this._image,this._pos.x+b,this._pos.y+d,this._size.x,this._size.y,-i*this._anchor.x,-j*this._anchor.y,i,j),s.restore(),s.globalAlpha=this._alpha.prev,this.dirty=!0,this}},copyTransform:function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=!1),!a.hasOwnProperty("worldTransform")||!a.worldVisible||0===a.worldAlpha)return this;var e=a.worldTransform;if(this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),0===e.a||0===e.d||0===this._size.x||0===this._size.y)return this;a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source;var f=e.tx,g=e.ty;a.texture.trim&&(f+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,g+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0)),d&&(f|=0,g|=0);var h=this.context;return this._alpha.prev=h.globalAlpha,h.save(),h.globalAlpha=this._alpha.current,b&&(this.op=b),h[this.smoothProperty]=a.texture.baseTexture.scaleMode===PIXI.scaleModes.LINEAR,h.setTransform(e.a,e.b,e.c,e.d,f,g),h.drawImage(this._image,this._pos.x,this._pos.y,this._size.x,this._size.y,-this._size.x*a.anchor.x,-this._size.y*a.anchor.y,this._size.x,this._size.y),h.restore(),h.globalAlpha=this._alpha.prev,this.dirty=!0,this},copyRect:function(a,b,c,d,e,f,g){return this.copy(a,b.x,b.y,b.width,b.height,c,d,b.width,b.height,0,0,0,1,1,e,f,g)},draw:function(a,b,c,d,e,f,g){return this.copy(a,null,null,null,null,b,c,d,e,null,null,null,null,null,null,f,g)},drawGroup:function(a,b,c){return a.total>0&&a.forEachExists(this.drawGroupProxy,this,b,c),this},drawGroupProxy:function(a,b,d){if(a.hasOwnProperty("texture")&&this.copyTransform(a,b,d),a.type===c.GROUP&&a.exists)this.drawGroup(a,b,d);else if(a.hasOwnProperty("children")&&a.children.length>0)for(var e=0;eb.width&&(e=b.width);var f=this.context;return f.fillStyle=f.createPattern(b,d),this._circle=new c.Circle(a.start.x,a.start.y,b.height),this._circle.circumferencePoint(a.angle-1.5707963267948966,!1,this._pos),f.save(),f.translate(this._pos.x,this._pos.y),f.rotate(a.angle),f.fillRect(0,0,e,b.height),f.restore(),this.dirty=!0,this}},render:function(){return!this.disableTextureUpload&&this.dirty&&(this.baseTexture.dirty(),this.dirty=!1),this},destroy:function(){this.frameData.destroy(),this.texture.destroy(!0),PIXI.CanvasPool.remove(this)},blendReset:function(){return this.op="source-over",this},blendSourceOver:function(){return this.op="source-over",this},blendSourceIn:function(){return this.op="source-in",this},blendSourceOut:function(){return this.op="source-out",this},blendSourceAtop:function(){return this.op="source-atop",this},blendDestinationOver:function(){return this.op="destination-over",this},blendDestinationIn:function(){return this.op="destination-in",this},blendDestinationOut:function(){return this.op="destination-out",this},blendDestinationAtop:function(){return this.op="destination-atop",this},blendXor:function(){return this.op="xor",this},blendAdd:function(){return this.op="lighter",this},blendMultiply:function(){return this.op="multiply",this},blendScreen:function(){return this.op="screen",this},blendOverlay:function(){return this.op="overlay",this},blendDarken:function(){return this.op="darken",this},blendLighten:function(){return this.op="lighten",this},blendColorDodge:function(){return this.op="color-dodge",this},blendColorBurn:function(){return this.op="color-burn",this},blendHardLight:function(){return this.op="hard-light",this},blendSoftLight:function(){return this.op="soft-light",this},blendDifference:function(){return this.op="difference",this},blendExclusion:function(){return this.op="exclusion",this},blendHue:function(){return this.op="hue",this},blendSaturation:function(){return this.op="saturation",this},blendColor:function(){return this.op="color",this},blendLuminosity:function(){return this.op="luminosity",this}},Object.defineProperty(c.BitmapData.prototype,"smoothed",{get:function(){c.Canvas.getSmoothingEnabled(this.context)},set:function(a){c.Canvas.setSmoothingEnabled(this.context,a)}}),Object.defineProperty(c.BitmapData.prototype,"op",{get:function(){return this.context.globalCompositeOperation},set:function(a){this.context.globalCompositeOperation=a}}),c.BitmapData.getTransform=function(a,b,c,d,e,f){return"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),"number"!=typeof c&&(c=1),"number"!=typeof d&&(d=1),"number"!=typeof e&&(e=0),"number"!=typeof f&&(f=0),{sx:c,sy:d,scaleX:c,scaleY:d,skewX:e,skewY:f,translateX:a,translateY:b,tx:a,ty:b}},c.BitmapData.prototype.constructor=c.BitmapData,PIXI.Graphics=function(){PIXI.DisplayObjectContainer.call(this),this.renderable=!0,this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this.blendMode=PIXI.blendModes.NORMAL,this.currentPath=null,this._webGL=[],this.isMask=!1,this.boundsPadding=0,this._localBounds=new PIXI.Rectangle(0,0,1,1),this.dirty=!0,this._boundsDirty=!1,this.webGLDirty=!1,this.cachedSpriteDirty=!1},PIXI.Graphics.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),PIXI.Graphics.prototype.constructor=PIXI.Graphics,PIXI.Graphics.prototype.lineStyle=function(a,b,c){return this.lineWidth=a||0,this.lineColor=b||0,this.lineAlpha=void 0===c?1:c,this.currentPath&&(this.currentPath.shape.points.length?this.drawShape(new PIXI.Polygon(this.currentPath.shape.points.slice(-2))):(this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha)),this},PIXI.Graphics.prototype.moveTo=function(a,b){return this.drawShape(new PIXI.Polygon([a,b])),this},PIXI.Graphics.prototype.lineTo=function(a,b){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.points.push(a,b),this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.quadraticCurveTo=function(a,b,c,d){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var e,f,g=this.currentPath.shape.points;0===g.length&&this.moveTo(0,0);for(var h=g[g.length-2],i=g[g.length-1],j=0,k=1;k<=20;++k)j=k/20,e=h+(a-h)*j,f=i+(b-i)*j,g.push(e+(a+(c-a)*j-e)*j,f+(b+(d-b)*j-f)*j);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var g,h,i,j,k,l=this.currentPath.shape.points,m=l[l.length-2],n=l[l.length-1],o=0,p=1;p<=20;++p)o=p/20,g=1-o,h=g*g,i=h*g,j=o*o,k=j*o,l.push(i*m+3*h*o*a+3*g*j*c+k*e,i*n+3*h*o*b+3*g*j*d+k*f);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arcTo=function(a,b,c,d,e){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(a,b):this.moveTo(a,b);var f=this.currentPath.shape.points,g=f[f.length-2],h=f[f.length-1],i=h-b,j=g-a,k=d-b,l=c-a,m=Math.abs(i*l-j*k);if(m<1e-8||0===e)f[f.length-2]===a&&f[f.length-1]===b||f.push(a,b);else{var n=i*i+j*j,o=k*k+l*l,p=i*k+j*l,q=e*Math.sqrt(n)/m,r=e*Math.sqrt(o)/m,s=q*p/n,t=r*p/o,u=q*l+r*j,v=q*k+r*i,w=j*(r+s),x=i*(r+s),y=l*(q+t),z=k*(q+t),A=Math.atan2(x-v,w-u),B=Math.atan2(z-v,y-u);this.arc(u+a,v+b,e,A,B,j*k>l*i)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arc=function(a,b,c,d,e,f,g){if(d===e)return this;void 0===f&&(f=!1),void 0===g&&(g=40),!f&&e<=d?e+=2*Math.PI:f&&d<=e&&(d+=2*Math.PI);var h=f?-1*(d-e):e-d,i=Math.ceil(Math.abs(h)/(2*Math.PI))*g;if(0===h)return this;var j=a+Math.cos(d)*c,k=b+Math.sin(d)*c;f&&this.filling?this.moveTo(a,b):this.moveTo(j,k);for(var l=this.currentPath.shape.points,m=h/(2*i),n=2*m,o=Math.cos(m),p=Math.sin(m),q=i-1,r=q%1/q,s=0;s<=q;s++){var t=s+r*s,u=m+d+n*t,v=Math.cos(u),w=-Math.sin(u);l.push((o*v+p*w)*c+a,(o*-w+p*v)*c+b)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.beginFill=function(a,b){return this.filling=!0,this.fillColor=a||0,this.fillAlpha=void 0===b?1:b,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},PIXI.Graphics.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},PIXI.Graphics.prototype.drawRect=function(a,b,c,d){return this.drawShape(new PIXI.Rectangle(a,b,c,d)),this},PIXI.Graphics.prototype.drawRoundedRect=function(a,b,c,d,e){return this.drawShape(new PIXI.RoundedRectangle(a,b,c,d,e)),this},PIXI.Graphics.prototype.drawCircle=function(a,b,c){return this.drawShape(new PIXI.Circle(a,b,c)),this},PIXI.Graphics.prototype.drawEllipse=function(a,b,c,d){return this.drawShape(new PIXI.Ellipse(a,b,c,d)),this},PIXI.Graphics.prototype.drawPolygon=function(a){(a instanceof c.Polygon||a instanceof PIXI.Polygon)&&(a=a.points);var b=a;if(!Array.isArray(b)){b=new Array(arguments.length);for(var d=0;dv?p:v,v=r>v?r:v,v=t>v?t:v,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w,this._bounds.x=x,this._bounds.width=v-x,this._bounds.y=y,this._bounds.height=w-y,this._currentBounds=this._bounds}return this._currentBounds},PIXI.Graphics.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=PIXI.identityMatrix;for(var b=0;bb?h+j:b,d=ie?i+k:e;else if(n===PIXI.Graphics.CIRC)h=f.x,i=f.y,j=f.radius+o/2,k=f.radius+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else if(n===PIXI.Graphics.ELIP)h=f.x,i=f.y,j=f.width+o/2,k=f.height+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else{g=f.points;for(var p=0;pb?h+o:b,d=i-oe?i+o:e}}else a=0,b=0,d=0,e=0;var q=this.boundsPadding;this._localBounds.x=a-q,this._localBounds.width=b-a+2*q,this._localBounds.y=d-q,this._localBounds.height=e-d+2*q},PIXI.Graphics.prototype._generateCachedSprite=function(){var a=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(a.width,a.height);else{var b=new PIXI.CanvasBuffer(a.width,a.height),c=PIXI.Texture.fromCanvas(b.canvas);this._cachedSprite=new PIXI.Sprite(c),this._cachedSprite.buffer=b,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-a.x/a.width,this._cachedSprite.anchor.y=-a.y/a.height,this._cachedSprite.buffer.context.translate(-a.x,-a.y),this.worldAlpha=1,PIXI.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},PIXI.Graphics.prototype.updateCachedSpriteTexture=function(){var a=this._cachedSprite,b=a.texture,c=a.buffer.canvas;b.baseTexture.width=c.width,b.baseTexture.height=c.height,b.crop.width=b.frame.width=c.width,b.crop.height=b.frame.height=c.height,a._width=c.width,a._height=c.height,b.baseTexture.dirty()},PIXI.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},PIXI.Graphics.prototype.drawShape=function(a){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null,a instanceof c.Polygon&&(a=a.clone(),a.flatten());var b=new PIXI.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,a);return this.graphicsData.push(b),b.type===PIXI.Graphics.POLY&&(b.shape.closed=this.filling,this.currentPath=b),this.dirty=!0,this._boundsDirty=!0,b},Object.defineProperty(PIXI.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(a){this._cacheAsBitmap=a,this._cacheAsBitmap?this._generateCachedSprite():this.destroyCachedSprite(),this.dirty=!0,this.webGLDirty=!0}}),PIXI.GraphicsData=function(a,b,c,d,e,f,g){this.lineWidth=a,this.lineColor=b,this.lineAlpha=c,this._lineTint=b,this.fillColor=d,this.fillAlpha=e,this._fillTint=d,this.fill=f,this.shape=g,this.type=g.type},PIXI.GraphicsData.prototype.constructor=PIXI.GraphicsData,PIXI.GraphicsData.prototype.clone=function(){return new GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},PIXI.EarCut={},PIXI.EarCut.Triangulate=function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=PIXI.EarCut.linkedList(a,0,e,c,!0),g=[];if(!f)return g;var h,i,j,k,l,m,n;if(d&&(f=PIXI.EarCut.eliminateHoles(a,b,f,c)),a.length>80*c){h=j=a[0],i=k=a[1];for(var o=c;oj&&(j=l),m>k&&(k=m);n=Math.max(j-h,k-i)}return PIXI.EarCut.earcutLinked(f,g,c,h,i,n),g},PIXI.EarCut.linkedList=function(a,b,c,d,e){var f,g,h,i=0;for(f=b,g=c-d;f0)for(f=b;f=b;f-=d)h=PIXI.EarCut.insertNode(f,a[f],a[f+1],h);return h},PIXI.EarCut.filterPoints=function(a,b){if(!a)return a;b||(b=a);var c,d=a;do{if(c=!1,d.steiner||!PIXI.EarCut.equals(d,d.next)&&0!==PIXI.EarCut.area(d.prev,d,d.next))d=d.next;else{if(PIXI.EarCut.removeNode(d),(d=b=d.prev)===d.next)return null;c=!0}}while(c||d!==b);return b},PIXI.EarCut.earcutLinked=function(a,b,c,d,e,f,g){if(a){!g&&f&&PIXI.EarCut.indexCurve(a,d,e,f);for(var h,i,j=a;a.prev!==a.next;)if(h=a.prev,i=a.next,f?PIXI.EarCut.isEarHashed(a,d,e,f):PIXI.EarCut.isEar(a))b.push(h.i/c),b.push(a.i/c),b.push(i.i/c),PIXI.EarCut.removeNode(a),a=i.next,j=i.next;else if((a=i)===j){g?1===g?(a=PIXI.EarCut.cureLocalIntersections(a,b,c),PIXI.EarCut.earcutLinked(a,b,c,d,e,f,2)):2===g&&PIXI.EarCut.splitEarcut(a,b,c,d,e,f):PIXI.EarCut.earcutLinked(PIXI.EarCut.filterPoints(a),b,c,d,e,f,1);break}}},PIXI.EarCut.isEar=function(a){var b=a.prev,c=a,d=a.next;if(PIXI.EarCut.area(b,c,d)>=0)return!1;for(var e=a.next.next;e!==a.prev;){if(PIXI.EarCut.pointInTriangle(b.x,b.y,c.x,c.y,d.x,d.y,e.x,e.y)&&PIXI.EarCut.area(e.prev,e,e.next)>=0)return!1;e=e.next}return!0},PIXI.EarCut.isEarHashed=function(a,b,c,d){var e=a.prev,f=a,g=a.next;if(PIXI.EarCut.area(e,f,g)>=0)return!1;for(var h=e.xf.x?e.x>g.x?e.x:g.x:f.x>g.x?f.x:g.x,k=e.y>f.y?e.y>g.y?e.y:g.y:f.y>g.y?f.y:g.y,l=PIXI.EarCut.zOrder(h,i,b,c,d),m=PIXI.EarCut.zOrder(j,k,b,c,d),n=a.nextZ;n&&n.z<=m;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.nextZ}for(n=a.prevZ;n&&n.z>=l;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.prevZ}return!0},PIXI.EarCut.cureLocalIntersections=function(a,b,c){var d=a;do{var e=d.prev,f=d.next.next;PIXI.EarCut.intersects(e,d,d.next,f)&&PIXI.EarCut.locallyInside(e,f)&&PIXI.EarCut.locallyInside(f,e)&&(b.push(e.i/c),b.push(d.i/c),b.push(f.i/c),PIXI.EarCut.removeNode(d),PIXI.EarCut.removeNode(d.next),d=a=f),d=d.next}while(d!==a);return d},PIXI.EarCut.splitEarcut=function(a,b,c,d,e,f){var g=a;do{for(var h=g.next.next;h!==g.prev;){if(g.i!==h.i&&PIXI.EarCut.isValidDiagonal(g,h)){var i=PIXI.EarCut.splitPolygon(g,h);return g=PIXI.EarCut.filterPoints(g,g.next),i=PIXI.EarCut.filterPoints(i,i.next),PIXI.EarCut.earcutLinked(g,b,c,d,e,f),void PIXI.EarCut.earcutLinked(i,b,c,d,e,f)}h=h.next}g=g.next}while(g!==a)},PIXI.EarCut.eliminateHoles=function(a,b,c,d){var e,f,g,h,i,j=[];for(e=0,f=b.length;e=d.next.y){var h=d.x+(f-d.y)*(d.next.x-d.x)/(d.next.y-d.y);h<=e&&h>g&&(g=h,c=d.x=d.x&&d.x>=c.x&&PIXI.EarCut.pointInTriangle(fc.x)&&PIXI.EarCut.locallyInside(d,a)&&(c=d,k=i),d=d.next;return c},PIXI.EarCut.indexCurve=function(a,b,c,d){var e=a;do{null===e.z&&(e.z=PIXI.EarCut.zOrder(e.x,e.y,b,c,d)),e.prevZ=e.prev,e.nextZ=e.next,e=e.next}while(e!==a);e.prevZ.nextZ=null,e.prevZ=null,PIXI.EarCut.sortLinked(e)},PIXI.EarCut.sortLinked=function(a){var b,c,d,e,f,g,h,i,j=1;do{for(c=a,a=null,f=null,g=0;c;){for(g++,d=c,h=0,b=0;b0||i>0&&d;)0===h?(e=d,d=d.nextZ,i--):0!==i&&d?c.z<=d.z?(e=c,c=c.nextZ,h--):(e=d,d=d.nextZ,i--):(e=c,c=c.nextZ,h--),f?f.nextZ=e:a=e,e.prevZ=f,f=e;c=d}f.nextZ=null,j*=2}while(g>1);return a},PIXI.EarCut.zOrder=function(a,b,c,d,e){return a=32767*(a-c)/e,b=32767*(b-d)/e,a=16711935&(a|a<<8),a=252645135&(a|a<<4),a=858993459&(a|a<<2),a=1431655765&(a|a<<1),b=16711935&(b|b<<8),b=252645135&(b|b<<4),b=858993459&(b|b<<2),b=1431655765&(b|b<<1),a|b<<1},PIXI.EarCut.getLeftmost=function(a){var b=a,c=a;do{b.x=0&&(a-g)*(d-h)-(c-g)*(b-h)>=0&&(c-g)*(f-h)-(e-g)*(d-h)>=0},PIXI.EarCut.isValidDiagonal=function(a,b){return PIXI.EarCut.equals(a,b)||a.next.i!==b.i&&a.prev.i!==b.i&&!PIXI.EarCut.intersectsPolygon(a,b)&&PIXI.EarCut.locallyInside(a,b)&&PIXI.EarCut.locallyInside(b,a)&&PIXI.EarCut.middleInside(a,b)},PIXI.EarCut.area=function(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)},PIXI.EarCut.equals=function(a,b){return a.x===b.x&&a.y===b.y},PIXI.EarCut.intersects=function(a,b,c,d){return PIXI.EarCut.area(a,b,c)>0!=PIXI.EarCut.area(a,b,d)>0&&PIXI.EarCut.area(c,d,a)>0!=PIXI.EarCut.area(c,d,b)>0},PIXI.EarCut.intersectsPolygon=function(a,b){var c=a;do{if(c.i!==a.i&&c.next.i!==a.i&&c.i!==b.i&&c.next.i!==b.i&&PIXI.EarCut.intersects(c,c.next,a,b))return!0;c=c.next}while(c!==a);return!1},PIXI.EarCut.locallyInside=function(a,b){return PIXI.EarCut.area(a.prev,a,a.next)<0?PIXI.EarCut.area(a,b,a.next)>=0&&PIXI.EarCut.area(a,a.prev,b)>=0:PIXI.EarCut.area(a,b,a.prev)<0||PIXI.EarCut.area(a,a.next,b)<0},PIXI.EarCut.middleInside=function(a,b){var c=a,d=!1,e=(a.x+b.x)/2,f=(a.y+b.y)/2;do{c.y>f!=c.next.y>f&&e<(c.next.x-c.x)*(f-c.y)/(c.next.y-c.y)+c.x&&(d=!d),c=c.next}while(c!==a);return d},PIXI.EarCut.splitPolygon=function(a,b){var c=new PIXI.EarCut.Node(a.i,a.x,a.y),d=new PIXI.EarCut.Node(b.i,b.x,b.y),e=a.next,f=b.prev;return a.next=b,b.prev=a,c.next=e,e.prev=c,d.next=c,c.prev=d,f.next=d,d.prev=f,d},PIXI.EarCut.insertNode=function(a,b,c,d){var e=new PIXI.EarCut.Node(a,b,c);return d?(e.next=d.next,e.prev=d,d.next.prev=e,d.next=e):(e.prev=e,e.next=e),e},PIXI.EarCut.removeNode=function(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)},PIXI.EarCut.Node=function(a,b,c){this.i=a,this.x=b,this.y=c,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1},PIXI.WebGLGraphics=function(){},PIXI.WebGLGraphics.stencilBufferLimit=6,PIXI.WebGLGraphics.renderGraphics=function(a,b){var c,d=b.gl,e=b.projection,f=b.offset,g=b.shaderManager.primitiveShader;a.dirty&&PIXI.WebGLGraphics.updateGraphics(a,d);for(var h=a._webGL[d.id],i=0;i=PIXI.WebGLGraphics.stencilBufferLimit)if(g.points.length<2*PIXI.WebGLGraphics.stencilBufferLimit){f=PIXI.WebGLGraphics.switchMode(c,0);var h=PIXI.WebGLGraphics.buildPoly(g,f);h||(f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f);g.lineWidth>0&&(f=PIXI.WebGLGraphics.switchMode(c,0),PIXI.WebGLGraphics.buildLine(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,0),g.type===PIXI.Graphics.RECT?PIXI.WebGLGraphics.buildRectangle(g,f):g.type===PIXI.Graphics.CIRC||g.type===PIXI.Graphics.ELIP?PIXI.WebGLGraphics.buildCircle(g,f):g.type===PIXI.Graphics.RREC&&PIXI.WebGLGraphics.buildRoundedRectangle(g,f);c.lastIndex++}for(d=0;d19600?(u=q-s,v=r-t,E=Math.sqrt(u*u+v*v),u/=E,v/=E,u*=K,v*=K,F.push(m-u,n-v),F.push(N,O,P,M),F.push(m+u,n+v),F.push(N,O,P,M),F.push(m-u,n-v),F.push(N,O,P,M),I++):(F.push(i,j),F.push(N,O,P,M),F.push(m-(i-m),n-(j-n)),F.push(N,O,P,M)));for(k=d[2*(H-2)],l=d[2*(H-2)+1],m=d[2*(H-1)],n=d[2*(H-1)+1],q=-(l-n),r=k-m,E=Math.sqrt(q*q+r*r),q/=E,r/=E,q*=K,r*=K,F.push(m-q,n-r),F.push(N,O,P,M),F.push(m+q,n+r),F.push(N,O,P,M),G.push(J),c=0;ch?e:h,i=fj?f:j;c.push(g,i,h,i,h,j,g,j);var l=c.length/2;for(k=0;kz?z:y,b.beginPath(),b.moveTo(u,v+y),b.lineTo(u,v+x-y),b.quadraticCurveTo(u,v+x,u+y,v+x),b.lineTo(u+w-y,v+x),b.quadraticCurveTo(u+w,v+x,u+w,v+x-y),b.lineTo(u+w,v+y),b.quadraticCurveTo(u+w,v,u+w-y,v),b.lineTo(u+y,v),b.quadraticCurveTo(u,v,u,v+y),b.closePath(),(e.fillColor||0===e.fillColor)&&(b.globalAlpha=e.fillAlpha*c,b.fillStyle="#"+("00000"+(0|g).toString(16)).substr(-6),b.fill()),e.lineWidth&&(b.globalAlpha=e.lineAlpha*c,b.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),b.stroke())}}},PIXI.CanvasGraphics.renderGraphicsMask=function(a,b){var c=a.graphicsData.length;if(0!==c){b.beginPath();for(var d=0;dx?x:w,b.moveTo(s,t+w),b.lineTo(s,t+v-w),b.quadraticCurveTo(s,t+v,s+w,t+v),b.lineTo(s+u-w,t+v),b.quadraticCurveTo(s+u,t+v,s+u,t+v-w),b.lineTo(s+u,t+w),b.quadraticCurveTo(s+u,t,s+u-w,t),b.lineTo(s+w,t),b.quadraticCurveTo(s,t,s,t+w),b.closePath()}}}},PIXI.CanvasGraphics.updateGraphicsTint=function(a){if(16777215!==a.tint)for(var b=(a.tint>>16&255)/255,c=(a.tint>>8&255)/255,d=(255&a.tint)/255,e=0;e>16&255)/255*b*255<<16)+((g>>8&255)/255*c*255<<8)+(255&g)/255*d*255,f._lineTint=((h>>16&255)/255*b*255<<16)+((h>>8&255)/255*c*255<<8)+(255&h)/255*d*255}},c.Graphics=function(a,b,d){void 0===b&&(b=0),void 0===d&&(d=0),this.type=c.GRAPHICS,this.physicsType=c.SPRITE,this.anchor=new c.Point,PIXI.Graphics.call(this),c.Component.Core.init.call(this,a,b,d,"",null)},c.Graphics.prototype=Object.create(PIXI.Graphics.prototype),c.Graphics.prototype.constructor=c.Graphics,c.Component.Core.install.call(c.Graphics.prototype,["Angle","AutoCull","Bounds","Destroy","FixedToCamera","InputEnabled","InWorld","LifeSpan","PhysicsBody","Reset"]),c.Graphics.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Graphics.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Graphics.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Graphics.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Graphics.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Graphics.prototype.postUpdate=function(){c.Component.PhysicsBody.postUpdate.call(this),c.Component.FixedToCamera.postUpdate.call(this),this._boundsDirty&&(this.updateLocalBounds(),this._boundsDirty=!1);for(var a=0;a0&&this.drawPolygon(d)}else this.drawPolygon(d)},c.Graphics.prototype.drawTriangles=function(a,b,d){void 0===d&&(d=!1);var e,f=new c.Point,g=new c.Point,h=new c.Point,i=[];if(b)if(a[0]instanceof c.Point)for(e=0;e0&&this.style.maxLines0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(b[h]):i+=this.context.measureText(b[h]).width,this.style.wordWrap&&(i-=this.context.measureText(" ").width)}else{var j=b[h].split(/(?:\t)/),i=this.padding.x+this.style.strokeThickness;if(Array.isArray(c))for(var k=0,l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.measureLine(j[l]):Math.ceil(this.context.measureText(j[l]).width),l>0&&(k+=c[l-1]),i=k+m}else for(var l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(j[l]):i+=Math.ceil(this.context.measureText(j[l]).width);var n=this.game.math.snapToCeil(i,c)-i;i+=n}}d[h]=Math.ceil(i),e=Math.max(e,d[h])}this.canvas.width=e*this._res;var o=f.fontSize+this.style.strokeThickness+this.padding.y,p=o*g,q=this._lineSpacing;q<0&&Math.abs(q)>o&&(q=-o),0!==q&&(p+=q>0?q*b.length:q*(b.length-1)),this.canvas.height=p*this._res,this.context.scale(this._res,this._res),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.style.backgroundColor&&(this.context.fillStyle=this.style.backgroundColor,this.context.fillRect(0,0,this.canvas.width,this.canvas.height)),this.context.fillStyle=this.style.fill,this.context.font=this.style.font,this.context.strokeStyle=this.style.stroke,this.context.textBaseline="alphabetic",this.context.lineWidth=this.style.strokeThickness,this.context.lineCap="round",this.context.lineJoin="round";var r,s;for(this._charCount=0,h=0;h0&&(s+=q*h),"right"===this.style.align?r+=e-d[h]:"center"===this.style.align&&(r+=(e-d[h])/2),this.autoRound&&(r=Math.round(r),s=Math.round(s)),this.colors.length>0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.updateLine(b[h],r,s):(this.style.stroke&&this.style.strokeThickness&&(this.updateShadow(this.style.shadowStroke),0===c?this.context.strokeText(b[h],r,s):this.renderTabLine(b[h],r,s,!1)),this.style.fill&&(this.updateShadow(this.style.shadowFill),0===c?this.context.fillText(b[h],r,s):this.renderTabLine(b[h],r,s,!0)));this.updateTexture(),this.dirty=!1},c.Text.prototype.renderTabLine=function(a,b,c,d){var e=a.split(/(?:\t)/),f=this.style.tabs,g=0;if(Array.isArray(f))for(var h=0,i=0;i0&&(h+=f[i-1]),g=b+h,d?this.context.fillText(e[i],g,c):this.context.strokeText(e[i],g,c);else for(var i=0;i0||this.fontStyles.length>0){var e=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(e.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(e.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(e)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill)),b+=this.context.measureText(d).width,this._charCount++}return Math.ceil(b)},c.Text.prototype.updateLine=function(a,b,c){for(var d=0;d0||this.fontStyles.length>0){var f=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(f.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(f.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(f)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke),this.context.strokeText(e,b,c)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill),this.context.fillText(e,b,c)),b+=this.context.measureText(e).width,this._charCount++}},c.Text.prototype.clearColors=function(){return this.colors=[],this.strokeColors=[],this.dirty=!0,this},c.Text.prototype.clearFontValues=function(){return this.fontStyles=[],this.fontWeights=[],this.dirty=!0,this},c.Text.prototype.addColor=function(a,b){return this.colors[b]=a,this.dirty=!0,this},c.Text.prototype.addStrokeColor=function(a,b){return this.strokeColors[b]=a,this.dirty=!0,this},c.Text.prototype.addFontStyle=function(a,b){return this.fontStyles[b]=a,this.dirty=!0,this},c.Text.prototype.addFontWeight=function(a,b){return this.fontWeights[b]=a,this.dirty=!0,this},c.Text.prototype.precalculateWordWrap=function(a){return this.texture.baseTexture.resolution=this._res,this.context.font=this.style.font,this.runWordWrap(a).split(/(?:\r\n|\r|\n)/)},c.Text.prototype.runWordWrap=function(a){return this.useAdvancedWrap?this.advancedWordWrap(a):this.basicWordWrap(a)},c.Text.prototype.advancedWordWrap=function(a){for(var b=this.context,c=this.style.wordWrapWidth,d="",e=a.replace(/ +/gi," ").split(/\r?\n/gi),f=e.length,g=0;gj){if(0===l){for(var p=n;p.length&&(p=p.slice(0,-1),!((o=b.measureText(p).width)<=j)););if(!p.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var q=m.substr(p.length);k[l]=q,i+=p}var r=k[l].length?l:l+1,s=k.slice(r).join(" ").replace(/[ \n]*$/gi,"");e[g+1]=s+" "+(e[g+1]||""),f=e.length;break}i+=n,j-=o}d+=i.replace(/[ \n]*$/gi,"")+"\n"}}return d=d.replace(/[\s|\n]*$/gi,"")},c.Text.prototype.basicWordWrap=function(a){for(var b="",c=a.split("\n"),d=0;de?(g>0&&(b+="\n"),b+=f[g]+" ",e=this.style.wordWrapWidth-h):(e-=i,b+=f[g]+" ")}dd&&(this.style.wordWrapWidth=d)),this.updateTexture(),this},c.Text.prototype.updateTexture=function(){var a=this.texture.baseTexture,b=this.texture.crop,c=this.texture.frame,d=this.canvas.width,e=this.canvas.height;if(a.width=d,a.height=e,b.width=d,b.height=e,c.width=d,c.height=e,this.texture.width=d,this.texture.height=e,this._width=d,this._height=e,this.textBounds){var f=this.textBounds.x,g=this.textBounds.y;"right"===this.style.boundsAlignH?f+=this.textBounds.width-this.canvas.width/this.resolution:"center"===this.style.boundsAlignH&&(f+=this.textBounds.halfWidth-this.canvas.width/this.resolution/2),"bottom"===this.style.boundsAlignV?g+=this.textBounds.height-this.canvas.height/this.resolution:"middle"===this.style.boundsAlignV&&(g+=this.textBounds.halfHeight-this.canvas.height/this.resolution/2),this.pivot.x=-f,this.pivot.y=-g}this.renderable=0!==d&&0!==e,this.texture.requiresReTint=!0,this.texture.baseTexture.dirty()},c.Text.prototype._renderWebGL=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.Text.prototype._renderCanvas=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.Text.prototype.determineFontProperties=function(a){var b=c.Text.fontPropertiesCache[a];if(!b){b={};var d=c.Text.fontPropertiesCanvas,e=c.Text.fontPropertiesContext;e.font=a;var f=Math.ceil(e.measureText("|MÉq").width),g=Math.ceil(e.measureText("|MÉq").width),h=2*g;if(g=1.4*g|0,d.width=f,d.height=h,e.fillStyle="#f00",e.fillRect(0,0,f,h),e.font=a,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText("|MÉq",0,g),!e.getImageData(0,0,f,h))return b.ascent=g,b.descent=g+6,b.fontSize=b.ascent+b.descent,c.Text.fontPropertiesCache[a]=b,b;var i,j,k=e.getImageData(0,0,f,h).data,l=k.length,m=4*f,n=0,o=!1;for(i=0;ig;i--){for(j=0;j0?this._maxWidth:null,j=[],k=0;k=i&&f>-1)return{width:g||e,text:c.substr(0,k-(k-f)),end:l,chars:j};e+=(n.xAdvance+p)*b,j.push(d+(n.xOffset+p)*b),d+=(n.xAdvance+p)*b,h=m}return{width:e,text:c,end:l,chars:j}},c.BitmapText.prototype.cleanText=function(a,b){void 0===b&&(b="");var c=this._data.font;if(!c)return"";for(var d=/\r\n|\n\r|\n|\r/g,e=a.replace(d,"\n").split("\n"),f=0;fthis.textWidth&&(this.textWidth=f.width),e+=a.lineHeight*c,b=b.substr(f.text.length+1)}while(!1===f.end);this.textHeight=e;for(var g=0,h=0,i=this.textWidth*this.anchor.x,j=this.textHeight*this.anchor.y,k=0;k0&&(this._fontSize=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"text",{get:function(){return this._text},set:function(a){a!==this._text&&(this._text=a.toString()||"",this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(a){a!==this._maxWidth&&(this._maxWidth=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"smoothed",{get:function(){return!this._data.base.scaleMode},set:function(a){this._data.base.scaleMode=a?0:1}}),c.RetroFont=function(a,b,d,e,f,g,h,i,j,k){if(!a.cache.checkImageKey(b))return!1;void 0!==g&&null!==g||(g=a.cache.getImage(b).width/d),this.characterWidth=d,this.characterHeight=e,this.characterSpacingX=h||0,this.characterSpacingY=i||0,this.characterPerRow=g,this.offsetX=j||0,this.offsetY=k||0,this.align="left",this.multiLine=!1,this.autoUpperCase=!0,this.customSpacingX=0,this.customSpacingY=0,this.fixedWidth=0,this.fontSet=a.cache.getImage(b),this._text="",this.grabData=[],this.frameData=new c.FrameData;for(var l=this.offsetX,m=this.offsetY,n=0,o=0;o?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",c.RetroFont.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",c.RetroFont.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",c.RetroFont.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",c.RetroFont.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",c.RetroFont.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",c.RetroFont.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",c.RetroFont.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",c.RetroFont.prototype.setFixedWidth=function(a,b){void 0===b&&(b="left"),this.fixedWidth=a,this.align=b},c.RetroFont.prototype.setText=function(a,b,c,d,e,f){this.multiLine=b||!1,this.customSpacingX=c||0,this.customSpacingY=d||0,this.align=e||"left",this.autoUpperCase=!f,a.length>0&&(this.text=a)},c.RetroFont.prototype.buildRetroFontText=function(){var a=0,b=0;if(this.clear(),this.multiLine){var d=this._text.split("\n");this.fixedWidth>0?this.resize(this.fixedWidth,d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0):this.resize(this.getLongestLine()*(this.characterWidth+this.customSpacingX),d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0);for(var e=0;e0?this.resize(this.fixedWidth,this.characterHeight,!0):this.resize(this._text.length*(this.characterWidth+this.customSpacingX),this.characterHeight,!0),a=0,this.align===c.RetroFont.ALIGN_RIGHT?a=this.width-this._text.length*(this.characterWidth+this.customSpacingX):this.align===c.RetroFont.ALIGN_CENTER&&(a=this.width/2-this._text.length*(this.characterWidth+this.customSpacingX)/2,a+=this.customSpacingX/2),a<0&&(a=0),this.pasteLine(this._text,a,0,this.customSpacingX);this.requiresReTint=!0},c.RetroFont.prototype.pasteLine=function(a,b,c,d){for(var e=0;e=0&&(this.stamp.frame=this.grabData[a.charCodeAt(e)],this.renderXY(this.stamp,b,c,!1),(b+=this.characterWidth+d)>this.width))break},c.RetroFont.prototype.getLongestLine=function(){var a=0;if(this._text.length>0)for(var b=this._text.split("\n"),c=0;ca&&(a=b[c].length);return a},c.RetroFont.prototype.removeUnsupportedCharacters=function(a){for(var b="",c=0;c=0||!a&&"\n"===d)&&(b=b.concat(d))}return b},c.RetroFont.prototype.updateOffset=function(a,b){if(this.offsetX!==a||this.offsetY!==b){for(var c=a-this.offsetX,d=b-this.offsetY,e=this.game.cache.getFrameData(this.stamp.key).getFrames(),f=e.length;f--;)e[f].x+=c,e[f].y+=d;this.buildRetroFontText()}},Object.defineProperty(c.RetroFont.prototype,"text",{get:function(){return this._text},set:function(a){var b;(b=this.autoUpperCase?a.toUpperCase():a)!==this._text&&(this._text=b,this.removeUnsupportedCharacters(this.multiLine),this.buildRetroFontText())}}),Object.defineProperty(c.RetroFont.prototype,"smoothed",{get:function(){return this.stamp.smoothed},set:function(a){this.stamp.smoothed=a,this.buildRetroFontText()}}),c.Rope=function(a,b,d,e,f,g){this.points=[],this.points=g,this._hasUpdateAnimation=!1,this._updateAnimationCallback=null,b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.ROPE,PIXI.Rope.call(this,c.Cache.DEFAULT,this.points),c.Component.Core.init.call(this,a,b,d,e,f)},c.Rope.prototype=Object.create(PIXI.Rope.prototype),c.Rope.prototype.constructor=c.Rope,c.Component.Core.install.call(c.Rope.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Rope.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Rope.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Rope.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Rope.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Rope.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Rope.prototype.update=function(){this._hasUpdateAnimation&&this.updateAnimation.call(this)},c.Rope.prototype.reset=function(a,b){return c.Component.Reset.prototype.reset.call(this,a,b),this},Object.defineProperty(c.Rope.prototype,"updateAnimation",{get:function(){return this._updateAnimation},set:function(a){a&&"function"==typeof a?(this._hasUpdateAnimation=!0,this._updateAnimation=a):(this._hasUpdateAnimation=!1,this._updateAnimation=null)}}),Object.defineProperty(c.Rope.prototype,"segments",{get:function(){for(var a,b,d,e,f,g,h,i,j=[],k=0;k2)||a}var d=this;!function(){var a=navigator.userAgent;/Playstation Vita/.test(a)?d.vita=!0:/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?d.kindle=!0:/Android/.test(a)?d.android=!0:/CrOS/.test(a)?d.chromeOS=!0:/iP[ao]d|iPhone/i.test(a)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):/Linux/.test(a)?d.linux=!0:/Mac OS/.test(a)?d.macOS=!0:/Windows/.test(a)&&(d.windows=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var b=/Silk/.test(a);(d.windows||d.macOS||d.linux&&!b||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(d.desktop=!1)}(),function(){var a=navigator.userAgent;if(/Arora/.test(a)?d.arora=!0:/Edge\/\d+/.test(a)?d.edge=!0:/Chrome\/(\d+)/.test(a)&&!d.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10)):/Epiphany/.test(a)?d.epiphany=!0:/Firefox\D+(\d+)/.test(a)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(a)&&d.iOS?d.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Midori/.test(a)?d.midori=!0:/Opera/.test(a)?d.opera=!0:/Safari\/(\d+)/.test(a)&&!d.windowsPhone?(d.safari=!0,/Version\/(\d+)\./.test(a)&&(d.safariVersion=parseInt(RegExp.$1,10))):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(d.silk=!0),navigator.standalone&&(d.webApp=!0),void 0!==window.cordova&&(d.cordova=!0),"undefined"!=typeof process&&"undefined"!=typeof require&&(d.node=!0),d.node&&"object"==typeof process.versions&&(d.nodeWebkit=!!process.versions["node-webkit"],d.electron=!!process.versions.electron),navigator.isCocoonJS&&(d.cocoonJS=!0),void 0!==window.wx&&(d.wechatMinigame=!0),d.cocoonJS)try{d.cocoonJSApp="undefined"!=typeof CocoonJS}catch(a){d.cocoonJSApp=!1}void 0!==window.ejecta&&(d.ejecta=!0),/Crosswalk/.test(a)&&(d.crosswalk=!0)}(),function(){d.audioData=!!window.Audio,d.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var a=document.createElement("audio");try{if(a.canPlayType&&(a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(d.ogg=!0),(a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||a.canPlayType("audio/opus;").replace(/^no$/,""))&&(d.opus=!0),a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(d.mp3=!0),a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(d.wav=!0),(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))&&(d.m4a=!0),a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(d.webm=!0),""!==a.canPlayType('audio/mp4;codecs="ec-3"')))if(d.edge)d.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var b=parseInt(RegExp.$1,10),c=parseInt(RegExp.$2,10);(10===b&&c>=11||b>10)&&(d.dolby=!0)}}catch(a){}}(),function(){var a=document.createElement("video");try{!!a.canPlayType&&(a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(d.oggVideo=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.h264Video=!0,d.mp4Video=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(d.webmVideo=!0),a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(d.vp9Video=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.hlsVideo=!0))}catch(a){}}(),function(){var a,b=document.createElement("p"),c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(b,null);for(var e in c)void 0!==b.style[e]&&(b.style[e]="translate3d(1px,1px,1px)",a=window.getComputedStyle(b).getPropertyValue(c[e]));document.body.removeChild(b),d.css3D=void 0!==a&&a.length>0&&"none"!==a}(),function(){d.pixelRatio=window.devicePixelRatio||1,d.iPhone=-1!==navigator.userAgent.toLowerCase().indexOf("iphone"),d.iPhone4=2===d.pixelRatio&&d.iPhone,d.iPad=c(),"undefined"!=typeof Int8Array?d.typedArray=!0:d.typedArray=!1,"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(d.littleEndian=a(),d.LITTLE_ENDIAN=d.littleEndian),d.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==d.littleEndian&&b(),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(d.vibration=!0)}(),function(){d.canvas=!!window.CanvasRenderingContext2D||d.cocoonJS;try{d.localStorage=!!localStorage.getItem}catch(a){d.localStorage=!1}d.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),d.fileSystem=!!window.requestFileSystem;var a={stencil:!0};d.webGL=function(){try{var b=document.createElement("canvas");return b.screencanvas=!1,!!window.WebGLRenderingContext&&(b.getContext("webgl",a)||b.getContext("experimental-webgl",a))}catch(a){return!1}}(),d.webGL=!!d.webGL,d.worker=!!window.Worker,d.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,d.quirksMode="CSS1Compat"!==document.compatMode,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,d.getUserMedia=d.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(d.getUserMedia=!1),!d.iOS&&(d.ie||d.firefox||d.chrome)&&(d.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(d.canvasBitBltShift=!1)}(),function(){for(var a=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],b=document.createElement("div"),c=0;c=1)&&(d.touch=!0),(window.PointerEvent||window.MSPointerEvent||window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&(d.mspointer=!0),d.cocoonJS||("onwheel"in window||d.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll"))}()},c.Device.canPlayAudio=function(a){return!("mp3"!==a||!this.mp3)||(!("ogg"!==a||!this.ogg&&!this.opus)||(!("m4a"!==a||!this.m4a)||(!("opus"!==a||!this.opus)||(!("wav"!==a||!this.wav)||(!("webm"!==a||!this.webm)||!("mp4"!==a||!this.dolby))))))},c.Device.canPlayVideo=function(a){return!("webm"!==a||!this.webmVideo&&!this.vp9Video)||(!("mp4"!==a||!this.mp4Video&&!this.h264Video)||(!("ogg"!==a&&"ogv"!==a||!this.oggVideo)||!("mpeg"!==a||!this.hlsVideo)))},c.Device.isConsoleOpen=function(){return!(!window.console||!window.console.firebug)||!(!window.console||(console.profile(),console.profileEnd(),console.clear&&console.clear(),!console.profiles))&&console.profiles.length>0},c.Device.isAndroidStockBrowser=function(){var a=window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);return a&&a[1]<537},c.Canvas={create:function(a,b,c,d,e){b=b||256,c=c||256;var f=e?document.createElement("canvas"):PIXI.CanvasPool.create(a,b,c);return"string"==typeof d&&""!==d&&(f.id=d),f.width=b,f.height=c,f.style.display="block",f},setBackgroundColor:function(a,b){return b=b||"rgb(0,0,0)",a.style.backgroundColor=b,a},setTouchAction:function(a,b){return b=b||"none",a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a},setUserSelect:function(a,b){return b=b||"none",a.style["-webkit-touch-callout"]=b,a.style["-webkit-user-select"]=b,a.style["-khtml-user-select"]=b,a.style["-moz-user-select"]=b,a.style["-ms-user-select"]=b,a.style["user-select"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a},addToDOM:function(a,b,c){var d;return void 0===c&&(c=!0),b&&("string"==typeof b?d=document.getElementById(b):"object"==typeof b&&1===b.nodeType&&(d=b)),d||(d=document.body),c&&d.style&&(d.style.overflow="hidden"),d.appendChild(a),a},removeFromDOM:function(a){a.parentNode&&a.parentNode.removeChild(a)},setTransform:function(a,b,c,d,e,f,g){return a.setTransform(d,f,g,e,b,c),a},setSmoothingEnabled:function(a,b){var d=c.Canvas.getSmoothingPrefix(a);return d&&(a[d]=b),a},getSmoothingPrefix:function(a){var b=["i","webkitI","msI","mozI","oI"];for(var c in b){var d=b[c]+"mageSmoothingEnabled";if(d in a)return d}return null},getSmoothingEnabled:function(a){var b=c.Canvas.getSmoothingPrefix(a);if(b)return a[b]},setImageRenderingCrisp:function(a){for(var b=["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"],c=0;cb-c},fuzzyCeil:function(a,b){return void 0===b&&(b=1e-4),Math.ceil(a-b)},fuzzyFloor:function(a,b){return void 0===b&&(b=1e-4),Math.floor(a+b)},average:function(){for(var a=0,b=arguments.length,c=0;c=c.Math.PI2-d?a=b:(Math.abs(b-a)>Math.PI&&(ba?a+=d:b=0?a:a+2*Math.PI},maxAdd:function(a,b,c){return Math.min(a+b,c)},minSub:function(a,b,c){return Math.max(a-b,c)},wrap:function(a,b,c){var d=c-b;if(d<=0)return 0;var e=(a-b)%d;return e<0&&(e+=d),e+b},wrapValue:function(a,b,c){return a=Math.abs(a),b=Math.abs(b),c=Math.abs(c),(a+b)%c},isOdd:function(a){return!!(1&a)},isEven:function(a){return!(1&a)},min:function(){if(1===arguments.length&&"object"==typeof arguments[0])var a=arguments[0];else var a=arguments;for(var b=1,c=0,d=a.length;ba[c]&&(c=b);return a[c]},minProperty:function(a){if(2===arguments.length&&"object"==typeof arguments[1])var b=arguments[1];else var b=arguments.slice(1);for(var c=1,d=0,e=b.length;cb[d][a]&&(d=c);return b[d][a]},wrapAngle:function(a,b){return b?this.wrap(a,-Math.PI,Math.PI):this.wrap(a,-180,180)},linearInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return b<0?this.linear(a[0],a[1],d):b>1?this.linear(a[c],a[c-1],c-d):this.linear(a[e],a[e+1>c?c:e+1],d-e)},bezierInterpolation:function(a,b){for(var c=0,d=a.length-1,e=0;e<=d;e++)c+=Math.pow(1-b,d-e)*Math.pow(b,e)*a[e]*this.bernstein(d,e);return c},catmullRomInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return a[0]===a[c]?(b<0&&(e=Math.floor(d=c*(1+b))),this.catmullRom(a[(e-1+c)%c],a[e],a[(e+1)%c],a[(e+2)%c],d-e)):b<0?a[0]-(this.catmullRom(a[0],a[0],a[1],a[1],-d)-a[0]):b>1?a[c]-(this.catmullRom(a[c],a[c],a[c-1],a[c-1],d-c)-a[c]):this.catmullRom(a[e?e-1:0],a[e],a[c0?Math.ceil(a):Math.floor(a)},sinCosGenerator:function(a,b,c,d){void 0===b&&(b=1),void 0===c&&(c=1),void 0===d&&(d=1);for(var e=b,f=c,g=d*Math.PI/a,h=[],i=[],j=0;j0?1:0},percent:function(a,b,c){return void 0===c&&(c=0),a>b||c>b?1:aa?0:(a-c)/b}};var g=Math.PI/180,h=180/Math.PI;return c.Math.degToRad=function(a){return a*g},c.Math.radToDeg=function(a){return a*h},c.RandomDataGenerator=function(a){void 0===a&&(a=[]),this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof a?this.state(a):this.sow(a)},c.RandomDataGenerator.prototype={rnd:function(){var a=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|a,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},sow:function(a){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,a)for(var b=0;b>>0,b-=d,b*=d,d=b>>>0,b-=d,d+=4294967296*b;return 2.3283064365386963e-10*(d>>>0)},integer:function(){return 4294967296*this.rnd.apply(this)},frac:function(){return this.rnd.apply(this)+1.1102230246251565e-16*(2097152*this.rnd.apply(this)|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(a,b){return Math.floor(this.realInRange(0,b-a+1)+a)},between:function(a,b){return this.integerInRange(a,b)},realInRange:function(a,b){return this.frac()*(b-a)+a},normal:function(){return 1-2*this.frac()},uuid:function(){var a="",b="";for(b=a="";a++<36;b+=~a%5|3*a&4?(15^a?8^this.frac()*(20^a?16:4):4).toString(16):"-");return b},pick:function(a){return a[this.integerInRange(0,a.length-1)]},sign:function(){return this.pick([-1,1])},weightedPick:function(a){return a[~~(Math.pow(this.frac(),2)*(a.length-1)+.5)]},timestamp:function(a,b){return this.realInRange(a||9466848e5,b||1577862e6)},angle:function(){return this.integerInRange(-180,180)},state:function(a){return"string"==typeof a&&a.match(/^!rnd/)&&(a=a.split(","),this.c=parseFloat(a[1]),this.s0=parseFloat(a[2]),this.s1=parseFloat(a[3]),this.s2=parseFloat(a[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}},c.RandomDataGenerator.prototype.constructor=c.RandomDataGenerator,c.QuadTree=function(a,b,c,d,e,f,g){this.maxObjects=10,this.maxLevels=4,this.level=0,this.bounds={},this.objects=[],this.nodes=[],this._empty=[],this.reset(a,b,c,d,e,f,g)},c.QuadTree.prototype={reset:function(a,b,c,d,e,f,g){this.maxObjects=e||10,this.maxLevels=f||4,this.level=g||0,this.bounds={x:Math.round(a),y:Math.round(b),width:c,height:d,subWidth:Math.floor(c/2),subHeight:Math.floor(d/2),right:Math.round(a)+Math.floor(c/2),bottom:Math.round(b)+Math.floor(d/2)},this.objects.length=0,this.nodes.length=0},populate:function(a){a.forEach(this.populateHandler,this,!0)},populateHandler:function(a){a.body&&a.exists&&this.insert(a.body)},split:function(){this.nodes[0]=new c.QuadTree(this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[1]=new c.QuadTree(this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[2]=new c.QuadTree(this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[3]=new c.QuadTree(this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1)},insert:function(a){var b,c=0;if(null!=this.nodes[0]&&-1!==(b=this.getIndex(a)))return void this.nodes[b].insert(a);if(this.objects.push(a),this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom&&(b=2):a.x>this.bounds.right&&(a.ythis.bounds.bottom&&(b=3)),b},retrieve:function(a){if(a instanceof c.Rectangle)var b=this.objects,d=this.getIndex(a);else{if(!a.body)return this._empty;var b=this.objects,d=this.getIndex(a.body)}return this.nodes[0]&&(-1!==d?b=b.concat(this.nodes[d].retrieve(a)):(b=b.concat(this.nodes[0].retrieve(a)),b=b.concat(this.nodes[1].retrieve(a)),b=b.concat(this.nodes[2].retrieve(a)),b=b.concat(this.nodes[3].retrieve(a)))),b},clear:function(){this.objects.length=0;for(var a=this.nodes.length;a--;)this.nodes[a].clear(),this.nodes.splice(a,1);this.nodes.length=0}},c.QuadTree.prototype.constructor=c.QuadTree,c.Net=function(a){this.game=a},c.Net.prototype={getHostName:function(){return window.location&&window.location.hostname?window.location.hostname:null},checkDomainName:function(a){return-1!==window.location.hostname.indexOf(a)},updateQueryString:function(a,b,c,d){void 0===c&&(c=!1),void 0!==d&&""!==d||(d=window.location.href);var e="",f=new RegExp("([?|&])"+a+"=.*?(&|#|$)(.*)","gi");if(f.test(d))e=void 0!==b&&null!==b?d.replace(f,"$1"+a+"="+b+"$2$3"):d.replace(f,"$1$3").replace(/(&|\?)$/,"");else if(void 0!==b&&null!==b){var g=-1!==d.indexOf("?")?"&":"?",h=d.split("#");d=h[0]+g+a+"="+b,h[1]&&(d+="#"+h[1]),e=d}else e=d;if(!c)return e;window.location.href=e},getQueryString:function(a){void 0===a&&(a="");var b={},c=location.search.substring(1).split("&");for(var d in c){var e=c[d].split("=");if(e.length>1){if(a&&a===this.decodeURI(e[0]))return this.decodeURI(e[1]);b[this.decodeURI(e[0])]=this.decodeURI(e[1])}}return b},decodeURI:function(a){return decodeURIComponent(a.replace(/\+/g," "))}},c.Net.prototype.constructor=c.Net,c.TweenManager=function(a){this.game=a,this.frameBased=!1,this._tweens=[],this._add=[],this.easeMap={Power0:c.Easing.Power0,Power1:c.Easing.Power1,Power2:c.Easing.Power2,Power3:c.Easing.Power3,Power4:c.Easing.Power4,Linear:c.Easing.Linear.None,Quad:c.Easing.Quadratic.Out,Cubic:c.Easing.Cubic.Out,Quart:c.Easing.Quartic.Out,Quint:c.Easing.Quintic.Out,Sine:c.Easing.Sinusoidal.Out,Expo:c.Easing.Exponential.Out,Circ:c.Easing.Circular.Out,Elastic:c.Easing.Elastic.Out,Back:c.Easing.Back.Out,Bounce:c.Easing.Bounce.Out,"Quad.easeIn":c.Easing.Quadratic.In,"Cubic.easeIn":c.Easing.Cubic.In,"Quart.easeIn":c.Easing.Quartic.In,"Quint.easeIn":c.Easing.Quintic.In,"Sine.easeIn":c.Easing.Sinusoidal.In,"Expo.easeIn":c.Easing.Exponential.In,"Circ.easeIn":c.Easing.Circular.In,"Elastic.easeIn":c.Easing.Elastic.In,"Back.easeIn":c.Easing.Back.In,"Bounce.easeIn":c.Easing.Bounce.In,"Quad.easeOut":c.Easing.Quadratic.Out,"Cubic.easeOut":c.Easing.Cubic.Out,"Quart.easeOut":c.Easing.Quartic.Out,"Quint.easeOut":c.Easing.Quintic.Out,"Sine.easeOut":c.Easing.Sinusoidal.Out,"Expo.easeOut":c.Easing.Exponential.Out,"Circ.easeOut":c.Easing.Circular.Out,"Elastic.easeOut":c.Easing.Elastic.Out,"Back.easeOut":c.Easing.Back.Out,"Bounce.easeOut":c.Easing.Bounce.Out,"Quad.easeInOut":c.Easing.Quadratic.InOut,"Cubic.easeInOut":c.Easing.Cubic.InOut,"Quart.easeInOut":c.Easing.Quartic.InOut,"Quint.easeInOut":c.Easing.Quintic.InOut,"Sine.easeInOut":c.Easing.Sinusoidal.InOut,"Expo.easeInOut":c.Easing.Exponential.InOut,"Circ.easeInOut":c.Easing.Circular.InOut,"Elastic.easeInOut":c.Easing.Elastic.InOut,"Back.easeInOut":c.Easing.Back.InOut,"Bounce.easeInOut":c.Easing.Bounce.InOut},this.game.onPause.add(this._pauseAll,this),this.game.onResume.add(this._resumeAll,this)},c.TweenManager.prototype={getAll:function(){return this._tweens},removeAll:function(){for(var a=0;a0&&(this._tweens=this._tweens.concat(this._add),this._add.length=0),!0},isTweening:function(a){return this._tweens.some(function(b){return b.target===a})},_pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._pause()},_resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._resume()},pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].pause()},resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].resume(!0)}},c.TweenManager.prototype.constructor=c.TweenManager,c.Tween=function(a,b,d){this.game=b,this.target=a,this.manager=d,this.timeline=[],this.reverse=!1,this.timeScale=1,this.repeatCounter=0,this.pendingDelete=!1,this.onStart=new c.Signal,this.onLoop=new c.Signal,this.onRepeat=new c.Signal,this.onChildComplete=new c.Signal,this.onComplete=new c.Signal,this.isRunning=!1,this.current=0,this.properties={},this.chainedTween=null,this.isPaused=!1,this.frameBased=d.frameBased,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,this._pausedTime=0,this._codePaused=!1,this._hasStarted=!1},c.Tween.prototype={to:function(a,b,d,e,f,g,h){return(void 0===b||b<=0)&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.to cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).to(a,b,d,f,g,h)),e&&this.start(),this)},from:function(a,b,d,e,f,g,h){return void 0===b&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.from cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).from(a,b,d,f,g,h)),e&&this.start(),this)},start:function(a){if(void 0===a&&(a=0),null===this.game||null===this.target||0===this.timeline.length||this.isRunning)return this;for(var b=0;bthis.timeline.length-1)&&(a=0),this.current=a,this.timeline[this.current].start(),this},stop:function(a){return void 0===a&&(a=!1),this.isRunning=!1,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,a&&(this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start()),this.manager.remove(this),this},updateTweenData:function(a,b,c){if(0===this.timeline.length)return this;if(void 0===c&&(c=0),-1===c)for(var d=0;d0?arguments[a-1].chainedTween=arguments[a]:this.chainedTween=arguments[a];return this},loop:function(a){return void 0===a&&(a=!0),this.repeatCounter=a?-1:0,this},onUpdateCallback:function(a,b){return this._onUpdateCallback=a,this._onUpdateCallbackContext=b,this},pause:function(){this.isPaused=!0,this._codePaused=!0,this._pausedTime=this.game.time.time},_pause:function(){this._codePaused||(this.isPaused=!0,this._pausedTime=this.game.time.time)},resume:function(){if(this.isPaused){this.isPaused=!1,this._codePaused=!1;for(var a=0;a0?(this.repeatCounter--,this.timeline[this.current].start(),this.onRepeat.dispatch(this.target,this),!0):(this.isRunning=!1,this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start(),!1):(this.onChildComplete.dispatch(this.target,this),this.timeline[this.current].start(),!0)}},generateData:function(a,b){if(null===this.game||null===this.target)return null;void 0===a&&(a=60),void 0===b&&(b=[]);for(var c=0;c0?this.isRunning=!1:this.isRunning=!0,this.isFrom)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a],this.parent.target[a]=this.vStart[a];return this.value=0,this.yoyoCounter=0,this.repeatCounter=this.repeatTotal,this},loadValues:function(){for(var a in this.parent.properties){if(this.vStart[a]=this.parent.properties[a],Array.isArray(this.vEnd[a])){if(0===this.vEnd[a].length)continue;0===this.percent&&(this.vEnd[a]=[this.vStart[a]].concat(this.vEnd[a]))}void 0!==this.vEnd[a]?("string"==typeof this.vEnd[a]&&(this.vEnd[a]=this.vStart[a]+parseFloat(this.vEnd[a],10)),this.parent.properties[a]=this.vEnd[a]):this.vEnd[a]=this.vStart[a],this.vStartCache[a]=this.vStart[a],this.vEndCache[a]=this.vEnd[a]}return this},update:function(a){if(this.isRunning){if(a=this.startTime))return c.TweenData.PENDING;this.isRunning=!0}var b=this.parent.frameBased?this.game.time.physicsElapsedMS:this.game.time.elapsedMS;this.parent.reverse?(this.dt-=b*this.parent.timeScale,this.dt=Math.max(this.dt,0)):(this.dt+=b*this.parent.timeScale,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);for(var d in this.vEnd){var e=this.vStart[d],f=this.vEnd[d];Array.isArray(f)?this.parent.target[d]=this.interpolationFunction.call(this.interpolationContext,f,this.value):this.parent.target[d]=e+(f-e)*this.value}return!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent?this.repeat():c.TweenData.RUNNING},generateData:function(a){this.parent.reverse?this.dt=this.duration:this.dt=0;var b=[],c=!1,d=1/a*1e3;do{this.parent.reverse?(this.dt-=d,this.dt=Math.max(this.dt,0)):(this.dt+=d,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);var e={};for(var f in this.vEnd){var g=this.vStart[f],h=this.vEnd[f];Array.isArray(h)?e[f]=this.interpolationFunction(h,this.value):e[f]=g+(h-g)*this.value}b.push(e),(!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent)&&(c=!0)}while(!c);if(this.yoyo){var i=b.slice();i.reverse(),b=b.concat(i)}return b},repeat:function(){if(this.yoyo){if(this.inReverse&&0===this.repeatCounter){for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];return this.inReverse=!1,c.TweenData.COMPLETE}this.inReverse=!this.inReverse}else if(0===this.repeatCounter)return c.TweenData.COMPLETE;if(this.inReverse)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a];else{for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];this.repeatCounter>0&&this.repeatCounter--}return this.startTime=this.game.time.time,this.yoyo&&this.inReverse?this.startTime+=this.yoyoDelay:this.inReverse||(this.startTime+=this.repeatDelay),this.parent.reverse?this.dt=this.duration:this.dt=0,c.TweenData.LOOPED}},c.TweenData.prototype.constructor=c.TweenData,c.Easing={Linear:{None:function(a){return a}},Quadratic:{In:function(a){return a*a},Out:function(a){return a*(2-a)},InOut:function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)},Out:function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)},InOut:function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:(a*=2)<1?.5*Math.pow(1024,a-1):.5*(2-Math.pow(2,-10*(a-1)))}},Circular:{In:function(a){return 1-Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),-c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4))},Out:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),c*Math.pow(2,-10*a)*Math.sin((a-b)*(2*Math.PI)/.4)+1)},InOut:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),(a*=2)<1?c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*-.5:c*Math.pow(2,-10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(a){var b=1.70158;return a*a*((b+1)*a-b)},Out:function(a){var b=1.70158;return--a*a*((b+1)*a+b)+1},InOut:function(a){var b=2.5949095;return(a*=2)<1?a*a*((b+1)*a-b)*.5:.5*((a-=2)*a*((b+1)*a+b)+2)}},Bounce:{In:function(a){return 1-c.Easing.Bounce.Out(1-a)},Out:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},InOut:function(a){return a<.5?.5*c.Easing.Bounce.In(2*a):.5*c.Easing.Bounce.Out(2*a-1)+.5}}},c.Easing.Default=c.Easing.Linear.None,c.Easing.Power0=c.Easing.Linear.None,c.Easing.Power1=c.Easing.Quadratic.Out,c.Easing.Power2=c.Easing.Cubic.Out,c.Easing.Power3=c.Easing.Quartic.Out,c.Easing.Power4=c.Easing.Quintic.Out,c.Time=function(a){this.game=a,this.time=0,this.prevTime=0,this.now=0,this.elapsed=0,this.elapsedMS=0,this.physicsElapsed=1/60,this.physicsElapsedMS=1/60*1e3,this.desiredFpsMult=1/60,this._desiredFps=60,this.suggestedFps=this.desiredFps,this.slowMotion=1,this.advancedTiming=!1,this.frames=0,this.fps=0,this.fpsMin=1e3,this.fpsMax=0,this.msMin=1e3,this.msMax=0,this.pauseDuration=0,this.timeToCall=0,this.timeExpected=0,this.events=new c.Timer(this.game,!1),this._frameCount=0,this._elapsedAccumulator=0,this._started=0,this._timeLastSecond=0,this._pauseStarted=0,this._justResumed=!1,this._timers=[]},c.Time.prototype={boot:function(){this._started=Date.now(),this.time=Date.now(),this.events.start(),this.timeExpected=this.time},add:function(a){return this._timers.push(a),a},create:function(a){void 0===a&&(a=!0);var b=new c.Timer(this.game,a);return this._timers.push(b),b},removeAll:function(){for(var a=0;a=2*this._desiredFps&&(this.suggestedFps=5*Math.floor(200/(this._elapsedAccumulator/this._frameCount)),this._frameCount=0,this._elapsedAccumulator=0),this.msMin=Math.min(this.msMin,this.elapsed),this.msMax=Math.max(this.msMax,this.elapsed),this.frames++,this.now>this._timeLastSecond+1e3&&(this.fps=Math.round(1e3*this.frames/(this.now-this._timeLastSecond)),this.fpsMin=Math.min(this.fpsMin,this.fps),this.fpsMax=Math.max(this.fpsMax,this.fps),this._timeLastSecond=this.now,this.frames=0)},gamePaused:function(){this._pauseStarted=Date.now(),this.events.pause();for(var a=this._timers.length;a--;)this._timers[a]._pause()},gameResumed:function(){this.time=Date.now(),this.pauseDuration=this.time-this._pauseStarted,this.events.resume();for(var a=this._timers.length;a--;)this._timers[a]._resume()},totalElapsedSeconds:function(){return.001*(this.time-this._started)},elapsedSince:function(a){return this.time-a},elapsedSecondsSince:function(a){return.001*(this.time-a)},reset:function(){this._started=this.time,this.removeAll()}},Object.defineProperty(c.Time.prototype,"desiredFps",{get:function(){return this._desiredFps},set:function(a){this._desiredFps=a,this.physicsElapsed=1/a,this.physicsElapsedMS=1e3*this.physicsElapsed,this.desiredFpsMult=1/a}}),c.Time.prototype.constructor=c.Time,c.Timer=function(a,b){void 0===b&&(b=!0),this.game=a,this.running=!1,this.autoDestroy=b,this.expired=!1,this.elapsed=0,this.events=[],this.onComplete=new c.Signal,this.nextTick=0,this.timeCap=1e3,this.paused=!1,this._codePaused=!1,this._started=0,this._pauseStarted=0,this._pauseTotal=0,this._now=Date.now(),this._len=0,this._marked=0,this._i=0,this._diff=0,this._newTick=0},c.Timer.MINUTE=6e4,c.Timer.SECOND=1e3,c.Timer.HALF=500,c.Timer.QUARTER=250,c.Timer.prototype={create:function(a,b,d,e,f,g){a=Math.round(a);var h=a;0===this._now?h+=this.game.time.time:h+=this._now;var i=new c.TimerEvent(this,a,h,d,b,e,f,g);return this.events.push(i),this.order(),this.expired=!1,i},add:function(a,b,c){return this.create(a,!1,0,b,c,Array.prototype.slice.call(arguments,3))},repeat:function(a,b,c,d){return this.create(a,!1,b,c,d,Array.prototype.slice.call(arguments,4))},loop:function(a,b,c){return this.create(a,!0,0,b,c,Array.prototype.slice.call(arguments,3))},start:function(a){if(!this.running){this._started=this.game.time.time+(a||0),this.running=!0;for(var b=0;b0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(a,b){return a.tickb.tick?1:0},clearPendingEvents:function(){for(this._i=this.events.length;this._i--;)this.events[this._i].pendingDelete&&this.events.splice(this._i,1);this._len=this.events.length,this._i=0},update:function(a){if(this.paused)return!0;if(this.elapsed=a-this._now,this._now=a,this.elapsed>this.timeCap&&this.adjustEvents(a-this.elapsed),this._marked=0,this.clearPendingEvents(),this.running&&this._now>=this.nextTick&&this._len>0){for(;this._i=this.events[this._i].tick&&!this.events[this._i].pendingDelete;)this._newTick=this._now+this.events[this._i].delay-(this._now-this.events[this._i].tick),this._newTick<0&&(this._newTick=this._now+this.events[this._i].delay),!0===this.events[this._i].loop?(this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):this.events[this._i].repeatCount>0?(this.events[this._i].repeatCount--,this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):(this._marked++,this.events[this._i].pendingDelete=!0,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)),this._i++;this.events.length>this._marked?this.order():(this.expired=!0,this.onComplete.dispatch(this))}return!this.expired||!this.autoDestroy},pause:function(){this.running&&(this._codePaused=!0,this.paused||(this._pauseStarted=this.game.time.time,this.paused=!0))},_pause:function(){!this.paused&&this.running&&(this._pauseStarted=this.game.time.time,this.paused=!0)},adjustEvents:function(a){for(var b=0;bthis._now?this.nextTick-this._now:0}}),Object.defineProperty(c.Timer.prototype,"length",{get:function(){return this.events.length}}),Object.defineProperty(c.Timer.prototype,"ms",{get:function(){return this.running?this._now-this._started-this._pauseTotal:0}}),Object.defineProperty(c.Timer.prototype,"seconds",{get:function(){return this.running?.001*this.ms:0}}),c.Timer.prototype.constructor=c.Timer,c.TimerEvent=function(a,b,c,d,e,f,g,h){this.timer=a,this.delay=b,this.tick=c,this.repeatCount=d-1,this.loop=e,this.callback=f,this.callbackContext=g,this.args=h,this.pendingDelete=!1},c.TimerEvent.prototype.constructor=c.TimerEvent,c.AnimationManager=function(a){this.sprite=a,this.game=a.game,this.currentFrame=null,this.currentAnim=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},c.AnimationManager.prototype={loadFrameData:function(a,b){if(void 0===a)return!1;if(this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(a);return this._frameData=a,void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},copyFrameData:function(a,b){if(this._frameData=a.clone(),this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(this._frameData);return void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},add:function(a,b,d,e,f){return b=b||[],d=d||60,void 0===e&&(e=!1),void 0===f&&(f=!(!b||"number"!=typeof b[0])),this._outputFrames=[],this._frameData.getFrameIndexes(b,f,this._outputFrames),this._anims[a]=new c.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,d,e),this.currentAnim=this._anims[a],this.sprite.tilingTexture&&(this.sprite.refreshTexture=!0),this._anims[a]},validateFrames:function(a,b){void 0===b&&(b=!0);for(var c=0;cthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(a[c]))return!1;return!0},play:function(a,b,c,d){if(this._anims[a])return this.currentAnim===this._anims[a]?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(b,c,d)):this.currentAnim:(this.currentAnim&&this.currentAnim.isPlaying&&this.currentAnim.stop(),this.currentAnim=this._anims[a],this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(b,c,d))},stop:function(a,b){void 0===b&&(b=!1),!this.currentAnim||"string"==typeof a&&a!==this.currentAnim.name||this.currentAnim.stop(b)},update:function(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))},next:function(a){this.currentAnim&&(this.currentAnim.next(a),this.currentFrame=this.currentAnim.currentFrame)},previous:function(a){this.currentAnim&&(this.currentAnim.previous(a),this.currentFrame=this.currentAnim.currentFrame)},getAnimation:function(a){return"string"==typeof a&&this._anims[a]?this._anims[a]:null},refreshFrame:function(){},destroy:function(){var a=null;for(var a in this._anims)this._anims.hasOwnProperty(a)&&this._anims[a].destroy();this._anims={},this._outputFrames=[],this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null,this.game=null}},c.AnimationManager.prototype.constructor=c.AnimationManager,Object.defineProperty(c.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(c.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData.total}}),Object.defineProperty(c.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(c.AnimationManager.prototype,"name",{get:function(){if(this.currentAnim)return this.currentAnim.name}}),Object.defineProperty(c.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame)return this.currentFrame.index},set:function(a){"number"==typeof a&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this.currentFrame&&this.sprite.setFrame(this.currentFrame))}}),Object.defineProperty(c.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame)return this.currentFrame.name},set:function(a){"string"==typeof a&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this.currentFrame&&(this._frameIndex=this.currentFrame.index,this.sprite.setFrame(this.currentFrame))):console.warn("Cannot set frameName: "+a)}}),c.Animation=function(a,b,d,e,f,g,h){void 0===h&&(h=!1),this.game=a,this._parent=b,this._frameData=e,this.name=d,this._frames=[],this._frames=this._frames.concat(f),this.delay=1e3/g,this.loop=h,this.loopCount=0,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.onStart=new c.Signal,this.onUpdate=null,this.onComplete=new c.Signal,this.onLoop=new c.Signal,this.isReversed=!1,this.game.onPause.add(this.onPause,this),this.game.onResume.add(this.onResume,this)},c.Animation.prototype={play:function(a,b,c){return"number"==typeof a&&(this.delay=1e3/a),"boolean"==typeof b&&(this.loop=b),void 0!==c&&(this.killOnComplete=c),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=this.isReversed?this._frames.length-1:0,this.updateCurrentFrame(!1,!0),this._parent.events.onAnimationStart$dispatch(this._parent,this),this.onStart.dispatch(this._parent,this),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this},restart:function(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setFrame(this.currentFrame),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this._parent,this)},reverse:function(){return this.reversed=!this.reversed,this},reverseOnce:function(){return this.onComplete.addOnce(this.reverse,this),this.reverse()},setFrame:function(a,b){var c;if(void 0===b&&(b=!1),"string"==typeof a)for(var d=0;d=this._timeNextFrame)&&(this._frameSkip=1,this._frameDiff=this.game.time.time-this._timeNextFrame,this._timeLastFrame=this.game.time.time,this._frameDiff>this.delay&&(this._frameSkip=Math.floor(this._frameDiff/this.delay),this._frameDiff-=this._frameSkip*this.delay),this._timeNextFrame=this.game.time.time+(this.delay-this._frameDiff),this.isReversed?this._frameIndex-=this._frameSkip:this._frameIndex+=this._frameSkip,!this.isReversed&&this._frameIndex>=this._frames.length||this.isReversed&&this._frameIndex<=-1?this.loop?(this._frameIndex=Math.abs(this._frameIndex)%this._frames.length,this.isReversed&&(this._frameIndex=this._frames.length-1-this._frameIndex),this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setFrame(this.currentFrame),this.loopCount++,this._parent.events.onAnimationLoop$dispatch(this._parent,this),this.onLoop.dispatch(this._parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))},updateCurrentFrame:function(a,b){if(void 0===b&&(b=!1),!this._frameData)return!1;var c=this.currentFrame.index;return this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&(b||!b&&c!==this.currentFrame.index)&&this._parent.setFrame(this.currentFrame),!this.onUpdate||!a||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)},next:function(a){void 0===a&&(a=1);var b=this._frameIndex+a;b>=this._frames.length&&(this.loop?b%=this._frames.length:b=this._frames.length-1),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},previous:function(a){void 0===a&&(a=1);var b=this._frameIndex-a;b<0&&(this.loop?b=this._frames.length+b:b++),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},updateFrameData:function(a){this._frameData=a,this.currentFrame=this._frameData?this._frameData.getFrame(this._frames[this._frameIndex%this._frames.length]):null},destroy:function(){this._frameData&&(this.game.onPause.remove(this.onPause,this),this.game.onResume.remove(this.onResume,this),this.game=null,this._parent=null,this._frames=null,this._frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())},complete:function(){this._frameIndex=this._frames.length-1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this._parent.events.onAnimationComplete$dispatch(this._parent,this),this.onComplete.dispatch(this._parent,this),this.killOnComplete&&this._parent.kill()}},c.Animation.prototype.constructor=c.Animation,Object.defineProperty(c.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(a){this.isPaused=a,a?this._pauseStartTime=this.game.time.time:this.isPlaying&&(this._timeNextFrame=this.game.time.time+this.delay)}}),Object.defineProperty(c.Animation.prototype,"reversed",{get:function(){return this.isReversed},set:function(a){this.isReversed=a}}),Object.defineProperty(c.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(c.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(a){this.currentFrame=this._frameData.getFrame(this._frames[a]),null!==this.currentFrame&&(this._frameIndex=a,this._parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}}),Object.defineProperty(c.Animation.prototype,"speed",{get:function(){return 1e3/this.delay},set:function(a){a>0&&(this.delay=1e3/a)}}),Object.defineProperty(c.Animation.prototype,"enableUpdate",{get:function(){return null!==this.onUpdate},set:function(a){a&&null===this.onUpdate?this.onUpdate=new c.Signal:a||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}}),c.Animation.generateFrameNames=function(a,b,d,e,f){void 0===e&&(e="");var g=[],h="";if(b=d;i--)h="number"==typeof f?c.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+e,g.push(h);return g},c.Frame=function(a,b,d,e,f,g){this.index=a,this.x=b,this.y=d,this.width=e,this.height=f,this.name=g,this.centerX=Math.floor(e/2),this.centerY=Math.floor(f/2),this.distance=c.Math.distance(0,0,e,f),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=e,this.sourceSizeH=f,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0,this.right=this.x+this.width,this.bottom=this.y+this.height},c.Frame.prototype={resize:function(a,b){this.width=a,this.height=b,this.centerX=Math.floor(a/2),this.centerY=Math.floor(b/2),this.distance=c.Math.distance(0,0,a,b),this.sourceSizeW=a,this.sourceSizeH=b,this.right=this.x+a,this.bottom=this.y+b},setTrim:function(a,b,c,d,e,f,g){this.trimmed=a,a&&(this.sourceSizeW=b,this.sourceSizeH=c,this.centerX=Math.floor(b/2),this.centerY=Math.floor(c/2),this.spriteSourceSizeX=d,this.spriteSourceSizeY=e,this.spriteSourceSizeW=f,this.spriteSourceSizeH=g)},clone:function(){var a=new c.Frame(this.index,this.x,this.y,this.width,this.height,this.name);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},getRect:function(a){return void 0===a?a=new c.Rectangle(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a}},c.Frame.prototype.constructor=c.Frame,c.FrameData=function(){this._frames=[],this._frameNames=[]},c.FrameData.prototype={addFrame:function(a){return a.index=this._frames.length,this._frames.push(a),""!==a.name&&(this._frameNames[a.name]=a.index),a},getFrame:function(a){return a>=this._frames.length&&(a=0),this._frames[a]},getFrameByName:function(a){return"number"==typeof this._frameNames[a]?this._frames[this._frameNames[a]]:null},checkFrameName:function(a){return null!=this._frameNames[a]},clone:function(){for(var a=new c.FrameData,b=0;bj&&(p=g,q+=e+h);return o},JSONData:function(a,b){if(!b.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),void console.log(b);for(var d,e=new c.FrameData,f=b.frames,g=0;g tag");for(var d,e,f,g,h,i,j,k,l,m,n,o=new c.FrameData,p=b.getElementsByTagName("SubTexture"),q=0;q-1},getAssetIndex:function(a,b){for(var c=-1,d=0;d-1&&{index:c,file:this._fileList[c]}},reset:function(a,b){void 0===b&&(b=!1),this.resetLocked||(a&&(this.preloadSprite=null),this.isLoading=!1,this._processingHead=0,this._fileList.length=0,this._flightQueue.length=0,this._fileLoadStarted=!1,this._totalFileCount=0,this._totalPackCount=0,this._loadedPackCount=0,this._loadedFileCount=0,b&&(this.onLoadStart.removeAll(),this.onLoadComplete.removeAll(),this.onPackComplete.removeAll(),this.onFileStart.removeAll(),this.onFileComplete.removeAll(),this.onFileError.removeAll()))},addToFileList:function(a,b,c,d,e,f){if(void 0===e&&(e=!1),void 0===b||""===b)return console.warn("Phaser.Loader: Invalid or no key given of type "+a),this;if(void 0===c||null===c){if(!f)return console.warn("Phaser.Loader: No URL given for file type: "+a+" key: "+b),this;c=b+f}var g={type:a,key:b,path:this.path,url:c,syncPoint:this._withSyncPointDepth>0,data:null,loading:!1,loaded:!1,error:!1};if(d)for(var h in d)g[h]=d[h];var i=this.getAssetIndex(a,b);if(e&&i>-1){var j=this._fileList[i];j.loading||j.loaded?(this._fileList.push(g),this._totalFileCount++):this._fileList[i]=g}else-1===i&&(this._fileList.push(g),this._totalFileCount++);return this},replaceInFileList:function(a,b,c,d){return this.addToFileList(a,b,c,d,!0)},pack:function(a,b,c,d){if(void 0===b&&(b=null),void 0===c&&(c=null),void 0===d&&(d=null),!b&&!c)return console.warn("Phaser.Loader.pack - Both url and data are null. One must be set."),this;var e={type:"packfile",key:a,url:b,path:this.path,syncPoint:!0,data:null,loading:!1,loaded:!1,error:!1,callbackContext:d};c&&("string"==typeof c&&(c=JSON.parse(c)),e.data=c||{},e.loaded=!0);for(var f=0;f=e||d&&this._loadedPackCount===this._totalPackCount)break}if(this.updateProgress(),this._processingHead>=this._fileList.length)this.finishedLoading();else if(!this._flightQueue.length){console.warn("Phaser.Loader - aborting: processing queue empty, loading may have stalled");var f=this;setTimeout(function(){f.finishedLoading(!0)},2e3)}},finishedLoading:function(a){this.hasLoaded||(this.hasLoaded=!0,this.isLoading=!1,a||this._fileLoadStarted||(this._fileLoadStarted=!0,this.onLoadStart.dispatch()),this.onLoadComplete.dispatch(),this.game.state.loadComplete(),this.reset())},asyncComplete:function(a,b){void 0===b&&(b=""),a.loaded=!0,a.error=!!b,b&&(a.errorMessage=b,console.warn("Phaser.Loader - "+a.type+"["+a.key+"]: "+b)),this.processLoadQueue()},processPack:function(a){var b=a.data[a.key];if(!b)return void console.warn("Phaser.Loader - "+a.key+": pack has data, but not for pack key");for(var d=0;d=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,f.send()},xhrLoadWithXDR:function(a,b,c,d,e){this._warnedAboutXDomainRequest||this.game.device.ie&&!(this.game.device.ieVersion>=10)||(this._warnedAboutXDomainRequest=!0,console.warn("Phaser.Loader - using XDomainRequest outside of IE 9"));var f=new window.XDomainRequest;f.open("GET",b,!0),f.responseType=c,f.timeout=3e3,e=e||this.fileError;var g=this;f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.ontimeout=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.onprogress=function(){},f.onload=function(){try{return 4===f.readyState&&f.status>=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,setTimeout(function(){f.send()},0)},getVideoURL:function(a){for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayVideo(c))return a[b]}}return null},getAudioURL:function(a){if(this.game.sound.noAudio)return null;for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayAudio(c))return a[b]}}return null},fileError:function(a,b,c){var d=a.requestUrl||this.transformUrl(a.url,a),e="error loading asset from URL "+d;!c&&b&&(c=b.status),c&&(e=e+" ("+c+")"),this.asyncComplete(a,e)},fileComplete:function(a,b){var d=!0;switch(a.type){case"packfile":var e=JSON.parse(b.responseText);a.data=e||{};break;case"image":this.cache.addImage(a.key,a.url,a.data);break;case"spritesheet":this.cache.addSpriteSheet(a.key,a.url,a.data,a.frameWidth,a.frameHeight,a.frameMax,a.margin,a.spacing);break;case"textureatlas":if(null==a.atlasURL)this.cache.addTextureAtlas(a.key,a.url,a.data,a.atlasData,a.format);else if(d=!1,a.format===c.Loader.TEXTURE_ATLAS_JSON_ARRAY||a.format===c.Loader.TEXTURE_ATLAS_JSON_HASH||a.format===c.Loader.TEXTURE_ATLAS_JSON_PYXEL)this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.jsonLoadComplete);else{if(a.format!==c.Loader.TEXTURE_ATLAS_XML_STARLING)throw new Error("Phaser.Loader. Invalid Texture Atlas format: "+a.format);this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.xmlLoadComplete)}break;case"bitmapfont":a.atlasURL?(d=!1,this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",function(a,b){var c;try{c=JSON.parse(b.responseText)}catch(a){}c?(a.atlasType="json",this.jsonLoadComplete(a,b)):(a.atlasType="xml",this.xmlLoadComplete(a,b))})):this.cache.addBitmapFont(a.key,a.url,a.data,a.atlasData,a.atlasType,a.xSpacing,a.ySpacing);break;case"video":if(a.asBlob)try{a.data=b.response}catch(b){throw new Error("Phaser.Loader. Unable to parse video file as Blob: "+a.key)}this.cache.addVideo(a.key,a.url,a.data,a.asBlob);break;case"audio":this.game.sound.usingWebAudio?(a.data=b.response,this.cache.addSound(a.key,a.url,a.data,!0,!1),a.autoDecode&&this.game.sound.decode(a.key)):this.cache.addSound(a.key,a.url,a.data,!1,!0);break;case"text":a.data=b.responseText,this.cache.addText(a.key,a.url,a.data);break;case"shader":a.data=b.responseText,this.cache.addShader(a.key,a.url,a.data);break;case"physics":var e=JSON.parse(b.responseText);this.cache.addPhysicsData(a.key,a.url,e,a.format);break;case"script":a.data=document.createElement("script"),a.data.language="javascript",a.data.type="text/javascript",a.data.defer=!1,a.data.text=b.responseText,document.head.appendChild(a.data),a.callback&&(a.data=a.callback.call(a.callbackContext,a.key,b.responseText));break;case"binary":a.callback?a.data=a.callback.call(a.callbackContext,a.key,b.response):a.data=b.response,this.cache.addBinary(a.key,a.data)}d&&this.asyncComplete(a)},jsonLoadComplete:function(a,b){var c=JSON.parse(b.responseText);"tilemap"===a.type?this.cache.addTilemap(a.key,a.url,c,a.format):"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,c,a.atlasType,a.xSpacing,a.ySpacing):"json"===a.type?this.cache.addJSON(a.key,a.url,c):this.cache.addTextureAtlas(a.key,a.url,a.data,c,a.format),this.asyncComplete(a)},csvLoadComplete:function(a,b){var c=b.responseText;this.cache.addTilemap(a.key,a.url,c,a.format),this.asyncComplete(a)},xmlLoadComplete:function(a,b){var c=b.responseText,d=this.parseXml(c);if(!d){var e=b.responseType||b.contentType;return console.warn("Phaser.Loader - "+a.key+": invalid XML ("+e+")"),void this.asyncComplete(a,"invalid XML")}"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,d,a.atlasType,a.xSpacing,a.ySpacing):"textureatlas"===a.type?this.cache.addTextureAtlas(a.key,a.url,a.data,d,a.format):"xml"===a.type&&this.cache.addXML(a.key,a.url,d),this.asyncComplete(a)},parseXml:function(a){var b;try{if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)}catch(a){b=null}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length?b:null},updateProgress:function(){this.preloadSprite&&(0===this.preloadSprite.direction?this.preloadSprite.rect.width=Math.floor(this.preloadSprite.width/100*this.progress):this.preloadSprite.rect.height=Math.floor(this.preloadSprite.height/100*this.progress),this.preloadSprite.sprite?this.preloadSprite.sprite.updateCrop():this.preloadSprite=null)},totalLoadedFiles:function(){return this._loadedFileCount},totalQueuedFiles:function(){return this._totalFileCount-this._loadedFileCount},totalLoadedPacks:function(){return this._totalPackCount},totalQueuedPacks:function(){return this._totalPackCount-this._loadedPackCount}},Object.defineProperty(c.Loader.prototype,"progressFloat",{get:function(){var a=this._loadedFileCount/this._totalFileCount*100;return c.Math.clamp(a||0,0,100)}}),Object.defineProperty(c.Loader.prototype,"progress",{get:function(){return Math.round(this.progressFloat)}}),c.Loader.prototype.constructor=c.Loader, +c.LoaderParser={bitmapFont:function(a,b,c,d){return this.xmlBitmapFont(a,b,c,d)},xmlBitmapFont:function(a,b,c,d){var e={},f=a.getElementsByTagName("info")[0],g=a.getElementsByTagName("common")[0];e.font=f.getAttribute("face"),e.size=parseInt(f.getAttribute("size"),10),e.lineHeight=parseInt(g.getAttribute("lineHeight"),10)+d,e.chars={};for(var h=a.getElementsByTagName("char"),i=0;i=this.durationMS&&(this.usingWebAudio?this.loop?(this.onLoop.dispatch(this),this.isPlaying=!1,""===this.currentMarker?(this.currentTime=0,this.startTime=this.game.time.time,this.isPlaying=!0):(this.onMarkerComplete.dispatch(this.currentMarker,this),this.play(this.currentMarker,0,this.volume,!0,!0))):""!==this.currentMarker&&this.stop():this.loop?(this.onLoop.dispatch(this),""===this.currentMarker&&(this.currentTime=0,this.startTime=this.game.time.time),this.isPlaying=!1,this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop()))},loopFull:function(a){return this.play(null,0,a,!0)},play:function(a,b,c,d,e){if(void 0!==a&&!1!==a&&null!==a||(a=""),void 0===e&&(e=!0),this.isPlaying&&!this.allowMultiple&&!e&&!this.override)return this;if(this._sound&&this.isPlaying&&!this.allowMultiple&&(this.override||e)){if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);this.isPlaying=!1}var f=Object.keys(this.markers);if(""===a&&1===f.length&&(a=f[0]),""===a&&f.length>0)return this;if(""!==a){if(!this.markers[a])return console.warn("Phaser.Sound.play: audio marker "+a+" doesn't exist"),this;this.currentMarker=a,this.position=this.markers[a].start,this.volume=this.markers[a].volume,this.loop=this.markers[a].loop,this.duration=this.markers[a].duration,this.durationMS=this.markers[a].durationMS,void 0!==c&&(this.volume=c),void 0!==d&&(this.loop=d),this._tempMarker=a,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else b=b||0,void 0===c&&(c=this._volume),void 0===d&&(d=this.loop),this.position=Math.max(0,b),this.volume=c,this.loop=d,this.duration=0,this.durationMS=0,this._tempMarker=a,this._tempPosition=b,this._tempVolume=c,this._tempLoop=d;return this.usingWebAudio?this.game.cache.isSoundDecoded(this.key)?(this._sound=this.context.createBufferSource(),this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this._buffer=this.game.cache.getSoundData(this.key),this._sound.buffer=this._buffer,this.loop&&""===a&&(this._sound.loop=!0),this.loop||""!==a||(this._sound.onended=this.onEndedHandler.bind(this)),this.totalDuration=this._sound.buffer.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=Math.ceil(1e3*this.totalDuration)),void 0===this._sound.start?this._sound.noteGrainOn(0,this.position,this.duration):this.loop&&""===a?this._sound.start(0,0):this._sound.start(0,this.position,this.duration),this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):(this.pendingPlayback=!0,this.game.cache.getSound(this.key)&&!1===this.game.cache.getSound(this.key).isDecoding&&this.game.sound.decode(this.key,this)):this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked?(this.game.cache.reloadSound(this.key),this.pendingPlayback=!0):this._sound&&(this.game.device.wechatMinigame||this.game.device.cocoonJS||4===this._sound.readyState)?(this.loop&&(this._sound.loop=!0),!this.loop&&""===a&&this.game.device.wechatMinigame&&this._sound.addEventListener("ended",this.onEndedHandler.bind(this)),this._sound.play(),this.totalDuration=this._sound.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this._sound.currentTime=this.position,this._sound.muted=this._muted,this._muted||this.game.sound.mute?this._sound.volume=0:this._sound.volume=this._volume,this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):this.pendingPlayback=!0,this},restart:function(a,b,c,d){a=a||"",b=b||0,c=c||1,void 0===d&&(d=!1),this.play(a,b,c,d,!0)},pause:function(){this.isPlaying&&this._sound&&(this.paused=!0,this.pausedPosition=this.currentTime,this.pausedTime=this.game.time.time,this._tempPause=this._sound.currentTime,this.onPause.dispatch(this),this.stop())},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){var a=Math.max(0,this.position+this.pausedPosition/1e3);this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this.loop&&(this._sound.loop=!0),this.loop||""!==this.currentMarker||(this._sound.onended=this.onEndedHandler.bind(this));var b=this.duration-this.pausedPosition/1e3;void 0===this._sound.start?this._sound.noteGrainOn(0,a,b):this.loop&&this.game.device.chrome?42===this.game.device.chromeVersion?this._sound.start(0):this._sound.start(0,a):this._sound.start(0,a,b)}else this._sound.currentTime=this._tempPause,this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.time-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound)if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);if(this.pendingPlayback=!1,this.isPlaying=!1,!this.paused){var a=this.currentMarker;""!==this.currentMarker&&this.onMarkerComplete.dispatch(this.currentMarker,this),this.currentMarker="",null!==this.fadeTween&&this.fadeTween.stop(),this.onStop.dispatch(this,a)}},fadeIn:function(a,b,c){void 0===b&&(b=!1),void 0===c&&(c=this.currentMarker),this.paused||(this.play(c,0,0,b),this.fadeTo(a,1))},fadeOut:function(a){this.fadeTo(a,0)},fadeTo:function(a,b){if(this.isPlaying&&!this.paused&&b!==this.volume){if(void 0===a&&(a=1e3),void 0===b)return void console.warn("Phaser.Sound.fadeTo: No Volume Specified.");this.fadeTween=this.game.add.tween(this).to({volume:b},a,c.Easing.Linear.None,!0),this.fadeTween.onComplete.add(this.fadeComplete,this)}},fadeComplete:function(){this.onFadeComplete.dispatch(this,this.volume),0===this.volume&&this.stop()},updateGlobalVolume:function(a){this.usingAudioTag&&this._sound&&(this._sound.volume=a*this._volume)},destroy:function(a){void 0===a&&(a=!0),this.stop(),a?this.game.sound.remove(this):(this.markers={},this.context=null,this._buffer=null,this.externalNode=null,this.onDecoded.dispose(),this.onPlay.dispose(),this.onPause.dispose(),this.onResume.dispose(),this.onLoop.dispose(),this.onStop.dispose(),this.onMute.dispose(),this.onMarkerComplete.dispose())}},c.Sound.prototype.constructor=c.Sound,Object.defineProperty(c.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(c.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(c.Sound.prototype,"mute",{get:function(){return this._muted||this.game.sound.mute},set:function(a){(a=a||!1)!==this._muted&&(a?(this._muted=!0,this._muteVolume=this._tempVolume,this.game.device.wechatMinigame?this._sound.pause():this.usingWebAudio?this.gainNode.gain.value=0:this.usingAudioTag&&this._sound&&(this._sound.volume=0)):(this._muted=!1,this.game.device.wechatMinigame&&this.isPlaying?this._sound.play():this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this))}}),Object.defineProperty(c.Sound.prototype,"volume",{get:function(){return this._volume},set:function(a){if(this.game.device.firefox&&this.usingAudioTag&&(a=this.game.math.clamp(a,0,1)),this._muted)return void(this._muteVolume=a);this._tempVolume=a,this._volume=a,this.usingWebAudio?this.gainNode.gain.value=a:this.usingAudioTag&&this._sound&&(this._sound.volume=a)}}),c.SoundManager=function(a){this.game=a,this.onSoundDecode=new c.Signal,this.onVolumeChange=new c.Signal,this.onMute=new c.Signal,this.onUnMute=new c.Signal,this.context=null,this.usingWebAudio=!1,this.usingAudioTag=!1,this.noAudio=!1,this.connectToMaster=!0,this.touchLocked=!1,this.channels=32,this.muteOnPause=!0,this._codeMuted=!1,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this._watchList=new c.ArraySet,this._watching=!1,this._watchCallback=null,this._watchContext=null},c.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&!1===this.game.device.webAudio&&(this.channels=1),window.PhaserGlobal){if(!0===window.PhaserGlobal.disableAudio)return this.noAudio=!0,void(this.touchLocked=!1);if(!0===window.PhaserGlobal.disableWebAudio)return this.usingAudioTag=!0,void(this.touchLocked=!1)}if(window.PhaserGlobal&&window.PhaserGlobal.audioContext)this.context=window.PhaserGlobal.audioContext;else if(window.AudioContext)try{this.context=new window.AudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}else if(window.webkitAudioContext)try{this.context=new window.webkitAudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}if(null===this.context){if(void 0===window.Audio)return void(this.noAudio=!0);this.usingAudioTag=!0}else this.usingWebAudio=!0,void 0===this.context.createGain?this.masterGain=this.context.createGainNode():this.masterGain=this.context.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this.context.destination);this.noAudio||!this.game.device.cocoonJS&&(this.game.device.chrome||this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)&&this.setTouchLock()},setTouchLock:function(){this.noAudio||window.PhaserGlobal&&!0===window.PhaserGlobal.disableAudio||(this.game.device.iOSVersion>8||this.game.device.chromeVersion>=55?this.game.input.touch.addTouchLockCallback(this.unlock,this,!0):this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0)},unlock:function(){if(this.noAudio||!this.touchLocked||null!==this._unlockSource)return!0;if(this.usingAudioTag)this.touchLocked=!1,this._unlockSource=null;else if(this.usingWebAudio){var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0},stopAll:function(){if(!this.noAudio)for(var a=0;a1&&(a=1),this._volume!==a){if(this._volume=a,this.usingWebAudio)this.masterGain.gain.value=a;else for(var b=0;b=400?0:100,this.dom.getOffset(this.game.canvas,this.offset);var b=this._parentBounds.width,d=this._parentBounds.height,e=this.getParentBounds(this._parentBounds),f=e.width!==b||e.height!==d,g=this.updateOrientationState();(f||g)&&(this.onResize&&this.onResize.call(this.onResizeContext,this,e),this.updateLayout(),this.signalSizeChange());var h=2*this._updateThrottle;this._updateThrottleb;return i=i?d:!d,i?(a.width=Math.floor(e),a.height=Math.floor(f)):(a.width=Math.floor(g),a.height=Math.floor(h)),a},destroy:function(){this.game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),this.compatibility.supportsFullScreen&&(document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1))}},c.ScaleManager.prototype.constructor=c.ScaleManager,Object.defineProperty(c.ScaleManager.prototype,"boundingParent",{get:function(){return this.parentIsWindow||this.isFullScreen&&this.hasPhaserSetFullScreen&&!this._createdFullScreenTarget?null:this.game.canvas&&this.game.canvas.parentNode||null}}),Object.defineProperty(c.ScaleManager.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(a){return a!==this._scaleMode&&(this.isFullScreen||(this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.queueUpdate(!0)),this._scaleMode=a),this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"fullScreenScaleMode",{get:function(){return this._fullScreenScaleMode},set:function(a){return a!==this._fullScreenScaleMode&&(this.isFullScreen?(this.prepScreenMode(!1),this._fullScreenScaleMode=a,this.prepScreenMode(!0),this.queueUpdate(!0)):this._fullScreenScaleMode=a),this._fullScreenScaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"currentScaleMode",{get:function(){return this.isFullScreen?this._fullScreenScaleMode:this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignHorizontally",{get:function(){return this._pageAlignHorizontally},set:function(a){a!==this._pageAlignHorizontally&&(this._pageAlignHorizontally=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignVertically",{get:function(){return this._pageAlignVertically},set:function(a){a!==this._pageAlignVertically&&(this._pageAlignVertically=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"isFullScreen",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),Object.defineProperty(c.ScaleManager.prototype,"isPortrait",{get:function(){return"portrait"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isLandscape",{get:function(){return"landscape"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isGamePortrait",{get:function(){return this.height>this.width}}),Object.defineProperty(c.ScaleManager.prototype,"isGameLandscape",{get:function(){return this.width>this.height}}),c.Utils.Debug=function(a){this.game=a,this.sprite=null,this.bmd=null,this.canvas=null,this.context=null,this.font="14px Courier",this.columnWidth=100,this.lineHeight=16,this.renderShadow=!0,this.currentX=0,this.currentY=0,this.currentAlpha=1,this.dirty=!1},c.Utils.Debug.prototype={boot:function(){this.game.renderType===c.CANVAS?this.context=this.game.context:(this.bmd=new c.BitmapData(this.game,"__DEBUG",this.game.width,this.game.height,!0),this.sprite=this.game.make.image(0,0,this.bmd),this.game.stage.addChild(this.sprite),this.game.scale.onSizeChange.add(this.resize,this),this.canvas=PIXI.CanvasPool.create(this,this.game.width,this.game.height),this.context=this.canvas.getContext("2d"))},resize:function(a,b,c){this.bmd.resize(b,c),this.canvas.width=b,this.canvas.height=c},preUpdate:function(){this.dirty&&this.sprite&&(this.bmd.clear(),this.bmd.draw(this.canvas,0,0),this.context.clearRect(0,0,this.game.width,this.game.height),this.dirty=!1)},reset:function(){this.context&&this.context.clearRect(0,0,this.game.width,this.game.height),this.sprite&&this.bmd.clear()},start:function(a,b,c,d){"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),c=c||"rgb(255,255,255)",void 0===d&&(d=0),this.currentX=a,this.currentY=b,this.currentColor=c,this.columnWidth=d,this.dirty=!0,this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.strokeStyle=c,this.context.fillStyle=c,this.context.font=this.font,this.context.globalAlpha=this.currentAlpha},stop:function(){this.context.restore()},line:function(){for(var a=this.currentX,b=0;b0)for(var b=0;b=0&&c.right>=0&&c.top<=this.layoutBounds.width&&c.left<=this.layoutBounds.height},getScreenOrientation:function(a){var b=window.screen,c=b.orientation||b.mozOrientation||b.msOrientation;if(c&&"string"==typeof c.type)return c.type;if("string"==typeof c)return c;var d="portrait-primary",e="landscape-primary";if("screen"===a)return b.height>b.width?d:e;if("viewport"===a)return this.visualBounds.height>this.visualBounds.width?d:e;if("window.orientation"===a&&"number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?d:e;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d;if(window.matchMedia("(orientation: landscape)").matches)return e}return this.visualBounds.height>this.visualBounds.width?d:e},visualBounds:new c.Rectangle,layoutBounds:new c.Rectangle,documentBounds:new c.Rectangle},c.Device.whenReady(function(a){var b=window&&"pageXOffset"in window?function(){return window.pageXOffset}:function(){return document.documentElement.scrollLeft},d=window&&"pageYOffset"in window?function(){return window.pageYOffset}:function(){return document.documentElement.scrollTop};if(Object.defineProperty(c.DOM,"scrollX",{get:b}),Object.defineProperty(c.DOM,"scrollY",{get:d}),Object.defineProperty(c.DOM.visualBounds,"x",{get:b}),Object.defineProperty(c.DOM.visualBounds,"y",{get:d}),Object.defineProperty(c.DOM.layoutBounds,"x",{value:0}),Object.defineProperty(c.DOM.layoutBounds,"y",{value:0}),a.desktop&&document.documentElement.clientWidth<=window.innerWidth&&document.documentElement.clientHeight<=window.innerHeight){var e=function(){return Math.max(window.innerWidth,document.documentElement.clientWidth)},f=function(){return Math.max(window.innerHeight,document.documentElement.clientHeight)};Object.defineProperty(c.DOM.visualBounds,"width",{get:e}),Object.defineProperty(c.DOM.visualBounds,"height",{get:f}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:e}),Object.defineProperty(c.DOM.layoutBounds,"height",{get:f})}else Object.defineProperty(c.DOM.visualBounds,"width",{get:function(){return window.innerWidth}}),Object.defineProperty(c.DOM.visualBounds,"height",{get:function(){return window.innerHeight}}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:function(){var a=document.documentElement.clientWidth,b=window.innerWidth;return a-1},reset:function(){this.list.length=0},remove:function(a){var b=this.list.indexOf(a);if(b>-1)return this.list.splice(b,1),a},setAll:function(a,b){for(var c=this.list.length;c--;)this.list[c]&&(this.list[c][a]=b)},callAll:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=this.list.length;c--;)this.list[c]&&this.list[c][a]&&this.list[c][a].apply(this.list[c],b)},removeAll:function(a){void 0===a&&(a=!1);for(var b=this.list.length;b--;)if(this.list[b]){var c=this.remove(this.list[b]);a&&c.destroy()}this.position=0,this.list=[]}},Object.defineProperty(c.ArraySet.prototype,"total",{get:function(){return this.list.length}}),Object.defineProperty(c.ArraySet.prototype,"first",{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}}),Object.defineProperty(c.ArraySet.prototype,"next",{get:function(){return this.position0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a},transposeMatrix:function(a){for(var b=a.length,c=a[0].length,d=new Array(c),e=0;e-1;f--)d[e][f]=a[f][e]}return d},rotateMatrix:function(a,b){if("string"!=typeof b&&(b=(b%360+360)%360),90===b||-270===b||"rotateLeft"===b)a=c.ArrayUtils.transposeMatrix(a),a=a.reverse();else if(-90===b||270===b||"rotateRight"===b)a=a.reverse(),a=c.ArrayUtils.transposeMatrix(a);else if(180===Math.abs(b)||"rotate180"===b){for(var d=0;d>>0:(a<<24|b<<16|d<<8|e)>>>0},unpackPixel:function(a,b,d,e){return void 0!==b&&null!==b||(b=c.Color.createColor()),void 0!==d&&null!==d||(d=!1),void 0!==e&&null!==e||(e=!1),c.Device.LITTLE_ENDIAN?(b.a=(4278190080&a)>>>24,b.b=(16711680&a)>>>16,b.g=(65280&a)>>>8,b.r=255&a):(b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a),b.color=a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a/255+")",d&&c.Color.RGBtoHSL(b.r,b.g,b.b,b),e&&c.Color.RGBtoHSV(b.r,b.g,b.b,b),b},fromRGBA:function(a,b){return b||(b=c.Color.createColor()),b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a+")",b},toRGBA:function(a,b,c,d){return a<<24|b<<16|c<<8|d},toABGR:function(a,b,c,d){return(d<<24|c<<16|b<<8|a)>>>0},RGBtoHSL:function(a,b,d,e){e||(e=c.Color.createColor(a,b,d,1)),a/=255,b/=255,d/=255;var f=Math.min(a,b,d),g=Math.max(a,b,d);if(e.h=0,e.s=0,e.l=(g+f)/2,g!==f){var h=g-f;e.s=e.l>.5?h/(2-g-f):h/(g+f),g===a?e.h=(b-d)/h+(b1&&(c-=1),c<1/6?a+6*(b-a)*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},createColor:function(a,b,d,e,f,g,h,i){var j={r:a||0,g:b||0,b:d||0,a:e||1,h:f||0,s:g||0,l:h||0,v:i||0,color:0,color32:0,rgba:""};return c.Color.updateColor(j)},updateColor:function(a){return a.rgba="rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+a.a.toString()+")",a.color=c.Color.getColor(a.r,a.g,a.b),a.color32=c.Color.getColor32(255*a.a,a.r,a.g,a.b),a},getColor32:function(a,b,c,d){return a<<24|b<<16|c<<8|d},getColor:function(a,b,c){return a<<16|b<<8|c},RGBtoString:function(a,b,d,e,f){return void 0===e&&(e=255),void 0===f&&(f="#"),"#"===f?"#"+((1<<24)+(a<<16)+(b<<8)+d).toString(16).slice(1):"0x"+c.Color.componentToHex(e)+c.Color.componentToHex(a)+c.Color.componentToHex(b)+c.Color.componentToHex(d)},hexToRGB:function(a){var b=c.Color.hexToColor(a);if(b)return c.Color.getColor32(b.a,b.r,b.g,b.b)},hexToColor:function(a,b){a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});var d=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(d){var e=parseInt(d[1],16),f=parseInt(d[2],16),g=parseInt(d[3],16);b?(b.r=e,b.g=f,b.b=g):b=c.Color.createColor(e,f,g)}return b},webToColor:function(a,b){b||(b=c.Color.createColor());var d=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a);return d&&(b.r=parseInt(d[1],10),b.g=parseInt(d[2],10),b.b=parseInt(d[3],10),b.a=void 0!==d[4]?parseFloat(d[4]):1,c.Color.updateColor(b)),b},valueToColor:function(a,b){if(b||(b=c.Color.createColor()),"string"==typeof a)return 0===a.indexOf("rgb")?c.Color.webToColor(a,b):(b.a=1,c.Color.hexToColor(a,b));if("number"==typeof a){var d=c.Color.getRGB(a);return b.r=d.r,b.g=d.g,b.b=d.b,b.a=d.a/255,b}return b},componentToHex:function(a){var b=a.toString(16);return 1===b.length?"0"+b:b},HSVColorWheel:function(a,b){void 0===a&&(a=1),void 0===b&&(b=1);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSVtoRGB(e/359,a,b));return d},HSLColorWheel:function(a,b){void 0===a&&(a=.5),void 0===b&&(b=.5);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSLtoRGB(e/359,a,b));return d},interpolateColor:function(a,b,d,e,f){void 0===f&&(f=255);var g=c.Color.getRGB(a),h=c.Color.getRGB(b),i=(h.red-g.red)*e/d+g.red,j=(h.green-g.green)*e/d+g.green,k=(h.blue-g.blue)*e/d+g.blue;return c.Color.getColor32(f,i,j,k)},interpolateColorWithRGB:function(a,b,d,e,f,g){var h=c.Color.getRGB(a),i=(b-h.red)*g/f+h.red,j=(d-h.green)*g/f+h.green,k=(e-h.blue)*g/f+h.blue;return c.Color.getColor(i,j,k)},interpolateRGB:function(a,b,d,e,f,g,h,i){var j=(e-a)*i/h+a,k=(f-b)*i/h+b,l=(g-d)*i/h+d;return c.Color.getColor(j,k,l)},getRandomColor:function(a,b,d){if(void 0===a&&(a=0),void 0===b&&(b=255),void 0===d&&(d=255),b>255||a>b)return c.Color.getColor(255,255,255);var e=a+Math.round(Math.random()*(b-a)),f=a+Math.round(Math.random()*(b-a)),g=a+Math.round(Math.random()*(b-a));return c.Color.getColor32(d,e,f,g)},getRGB:function(a){return a>16777215?{alpha:a>>>24,red:a>>16&255,green:a>>8&255,blue:255&a,a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{alpha:255,red:a>>16&255,green:a>>8&255,blue:255&a,a:255,r:a>>16&255,g:a>>8&255,b:255&a}},getWebRGB:function(a){if("object"==typeof a)return"rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+(a.a/255).toString()+")";var b=c.Color.getRGB(a);return"rgba("+b.r.toString()+","+b.g.toString()+","+b.b.toString()+","+(b.a/255).toString()+")"},getAlpha:function(a){return a>>>24},getAlphaFloat:function(a){return(a>>>24)/255},getRed:function(a){return a>>16&255},getGreen:function(a){return a>>8&255},getBlue:function(a){return 255&a},blendNormal:function(a){return a},blendLighten:function(a,b){return b>a?b:a},blendDarken:function(a,b){return b>a?a:b},blendMultiply:function(a,b){return a*b/255},blendAverage:function(a,b){return(a+b)/2},blendAdd:function(a,b){return Math.min(255,a+b)},blendSubtract:function(a,b){return Math.max(0,a+b-255)},blendDifference:function(a,b){return Math.abs(a-b)},blendNegation:function(a,b){return 255-Math.abs(255-a-b)},blendScreen:function(a,b){return 255-((255-a)*(255-b)>>8)},blendExclusion:function(a,b){return a+b-2*a*b/255},blendOverlay:function(a,b){return b<128?2*a*b/255:255-2*(255-a)*(255-b)/255},blendSoftLight:function(a,b){return b<128?2*(64+(a>>1))*(b/255):255-2*(255-(64+(a>>1)))*(255-b)/255},blendHardLight:function(a,b){return c.Color.blendOverlay(b,a)},blendColorDodge:function(a,b){return 255===b?b:Math.min(255,(a<<8)/(255-b))},blendColorBurn:function(a,b){return 0===b?b:Math.max(0,255-(255-a<<8)/b)},blendLinearDodge:function(a,b){return c.Color.blendAdd(a,b)},blendLinearBurn:function(a,b){return c.Color.blendSubtract(a,b)},blendLinearLight:function(a,b){return b<128?c.Color.blendLinearBurn(a,2*b):c.Color.blendLinearDodge(a,2*(b-128))},blendVividLight:function(a,b){return b<128?c.Color.blendColorBurn(a,2*b):c.Color.blendColorDodge(a,2*(b-128))},blendPinLight:function(a,b){return b<128?c.Color.blendDarken(a,2*b):c.Color.blendLighten(a,2*(b-128))},blendHardMix:function(a,b){return c.Color.blendVividLight(a,b)<128?0:255},blendReflect:function(a,b){return 255===b?b:Math.min(255,a*a/(255-b))},blendGlow:function(a,b){return c.Color.blendReflect(b,a)},blendPhoenix:function(a,b){return Math.min(a,b)-Math.max(a,b)+255}},c.Physics=function(a,b){b=b||{},this.game=a,this.config=b,this.arcade=null,this.p2=null,this.ninja=null,this.box2d=null,this.chipmunk=null,this.matter=null,this.parseConfig()},c.Physics.ARCADE=0,c.Physics.P2JS=1,c.Physics.NINJA=2,c.Physics.BOX2D=3,c.Physics.CHIPMUNK=4,c.Physics.MATTERJS=5,c.Physics.prototype={parseConfig:function(){this.config.hasOwnProperty("arcade")&&!0!==this.config.arcade||!c.Physics.hasOwnProperty("Arcade")||(this.arcade=new c.Physics.Arcade(this.game)),this.config.hasOwnProperty("ninja")&&!0===this.config.ninja&&c.Physics.hasOwnProperty("Ninja")&&(this.ninja=new c.Physics.Ninja(this.game)),this.config.hasOwnProperty("p2")&&!0===this.config.p2&&c.Physics.hasOwnProperty("P2")&&(this.p2=new c.Physics.P2(this.game,this.config)),this.config.hasOwnProperty("box2d")&&!0===this.config.box2d&&c.Physics.hasOwnProperty("BOX2D")&&(this.box2d=new c.Physics.BOX2D(this.game,this.config)),this.config.hasOwnProperty("matter")&&!0===this.config.matter&&c.Physics.hasOwnProperty("Matter")&&(this.matter=new c.Physics.Matter(this.game,this.config))},startSystem:function(a){a===c.Physics.ARCADE?this.arcade=new c.Physics.Arcade(this.game):a===c.Physics.P2JS?null===this.p2?this.p2=new c.Physics.P2(this.game,this.config):this.p2.reset():a===c.Physics.NINJA?this.ninja=new c.Physics.Ninja(this.game):a===c.Physics.BOX2D?null===this.box2d?this.box2d=new c.Physics.Box2D(this.game,this.config):this.box2d.reset():a===c.Physics.MATTERJS&&(null===this.matter?this.matter=new c.Physics.Matter(this.game,this.config):this.matter.reset())},enable:function(a,b,d){void 0===b&&(b=c.Physics.ARCADE),void 0===d&&(d=!1),b===c.Physics.ARCADE?this.arcade.enable(a):b===c.Physics.P2JS&&this.p2?this.p2.enable(a,d):b===c.Physics.NINJA&&this.ninja?this.ninja.enableAABB(a):b===c.Physics.BOX2D&&this.box2d?this.box2d.enable(a):b===c.Physics.MATTERJS&&this.matter?this.matter.enable(a):console.warn(a.key+" is attempting to enable a physics body using an unknown physics system.")},preUpdate:function(){this.p2&&this.p2.preUpdate(),this.box2d&&this.box2d.preUpdate(),this.matter&&this.matter.preUpdate()},update:function(){this.p2&&this.p2.update(),this.box2d&&this.box2d.update(),this.matter&&this.matter.update()},setBoundsToWorld:function(){this.arcade&&this.arcade.setBoundsToWorld(),this.ninja&&this.ninja.setBoundsToWorld(),this.p2&&this.p2.setBoundsToWorld(),this.box2d&&this.box2d.setBoundsToWorld(),this.matter&&this.matter.setBoundsToWorld()},clear:function(){this.p2&&this.p2.clear(),this.box2d&&this.box2d.clear(),this.matter&&this.matter.clear()},reset:function(){this.p2&&this.p2.reset(),this.box2d&&this.box2d.reset(),this.matter&&this.matter.reset()},destroy:function(){this.p2&&this.p2.destroy(),this.box2d&&this.box2d.destroy(),this.matter&&this.matter.destroy(),this.arcade=null,this.ninja=null,this.p2=null,this.box2d=null,this.matter=null}},c.Physics.prototype.constructor=c.Physics,c.Physics.Arcade=function(a){this.game=a,this.gravity=new c.Point,this.bounds=new c.Rectangle(0,0,a.world.width,a.world.height),this.checkCollision={up:!0,down:!0,left:!0,right:!0},this.maxObjects=10,this.maxLevels=4,this.OVERLAP_BIAS=4,this.forceX=!1,this.sortDirection=c.Physics.Arcade.LEFT_RIGHT,this.skipQuadTree=!0,this.isPaused=!1,this.quadTree=new c.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this._total=0,this.setBoundsToWorld()},c.Physics.Arcade.prototype.constructor=c.Physics.Arcade,c.Physics.Arcade.SORT_NONE=0,c.Physics.Arcade.LEFT_RIGHT=1,c.Physics.Arcade.RIGHT_LEFT=2,c.Physics.Arcade.TOP_BOTTOM=3,c.Physics.Arcade.BOTTOM_TOP=4,c.Physics.Arcade.prototype={setBounds:function(a,b,c,d){this.bounds.setTo(a,b,c,d)},setBoundsToWorld:function(){this.bounds.copyFrom(this.game.world.bounds)},enable:function(a,b){void 0===b&&(b=!0);var d=1;if(Array.isArray(a))for(d=a.length;d--;)a[d]instanceof c.Group?this.enable(a[d].children,b):(this.enableBody(a[d]),b&&a[d].hasOwnProperty("children")&&a[d].children.length>0&&this.enable(a[d],!0));else a instanceof c.Group?this.enable(a.children,b):(this.enableBody(a),b&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,!0))},enableBody:function(a){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.Arcade.Body(a),a.parent&&a.parent instanceof c.Group&&a.parent.addToHash(a))},updateMotion:function(a){var b=this.computeVelocity(0,a,a.angularVelocity,a.angularAcceleration,a.angularDrag,a.maxAngular)-a.angularVelocity;a.angularVelocity+=b,a.rotation+=a.angularVelocity*this.game.time.physicsElapsed,a.velocity.x=this.computeVelocity(1,a,a.velocity.x,a.acceleration.x,a.drag.x,a.maxVelocity.x),a.velocity.y=this.computeVelocity(2,a,a.velocity.y,a.acceleration.y,a.drag.y,a.maxVelocity.y)},computeVelocity:function(a,b,c,d,e,f){return void 0===f&&(f=1e4),1===a&&b.allowGravity?c+=(this.gravity.x+b.gravity.x)*this.game.time.physicsElapsed:2===a&&b.allowGravity&&(c+=(this.gravity.y+b.gravity.y)*this.game.time.physicsElapsed),d?c+=d*this.game.time.physicsElapsed:e&&(e*=this.game.time.physicsElapsed,c-e>0?c-=e:c+e<0?c+=e:c=0),c>f?c=f:c<-f&&(c=-f),c},overlap:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},collide:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},sortLeftRight:function(a,b){return a.body&&b.body?a.body.x-b.body.x:0},sortRightLeft:function(a,b){return a.body&&b.body?b.body.x-a.body.x:0},sortTopBottom:function(a,b){return a.body&&b.body?a.body.y-b.body.y:0},sortBottomTop:function(a,b){return a.body&&b.body?b.body.y-a.body.y:0},sort:function(a,b){null!==a.physicsSortDirection?b=a.physicsSortDirection:void 0===b&&(b=this.sortDirection),b===c.Physics.Arcade.LEFT_RIGHT?a.hash.sort(this.sortLeftRight):b===c.Physics.Arcade.RIGHT_LEFT?a.hash.sort(this.sortRightLeft):b===c.Physics.Arcade.TOP_BOTTOM?a.hash.sort(this.sortTopBottom):b===c.Physics.Arcade.BOTTOM_TOP&&a.hash.sort(this.sortBottomTop)},collideHandler:function(a,b,d,e,f,g){if(void 0===b&&a.physicsType===c.GROUP)return this.sort(a),void this.collideGroupVsSelf(a,d,e,f,g);a&&b&&a.exists&&b.exists&&(this.sortDirection!==c.Physics.Arcade.SORT_NONE&&(a.physicsType===c.GROUP&&this.sort(a),b.physicsType===c.GROUP&&this.sort(b)),a.physicsType===c.SPRITE?b.physicsType===c.SPRITE?this.collideSpriteVsSprite(a,b,d,e,f,g):b.physicsType===c.GROUP?this.collideSpriteVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.GROUP?b.physicsType===c.SPRITE?this.collideSpriteVsGroup(b,a,d,e,f,g):b.physicsType===c.GROUP?this.collideGroupVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.TILEMAPLAYER&&(b.physicsType===c.SPRITE?this.collideSpriteVsTilemapLayer(b,a,d,e,f,g):b.physicsType===c.GROUP&&this.collideGroupVsTilemapLayer(b,a,d,e,f,g)))},collideSpriteVsSprite:function(a,b,c,d,e,f){return!(!a.body||!b.body)&&(this.separate(a.body,b.body,d,e,f)&&(c&&c.call(e,a,b),this._total++),!0)},collideSpriteVsGroup:function(a,b,d,e,f,g){if(0!==b.length&&a.body)if(this.skipQuadTree||a.body.skipQuadTree)for(var h={},i=0;ih.right)break;if(h.x>a.body.right)continue}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(a.body.bottomh.bottom)break;if(h.y>a.body.bottom)continue}this.collideSpriteVsSprite(a,j,d,e,f,g)}}else{this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(b);for(var k=this.quadTree.retrieve(a),i=0;ik.right)continue;if(k.x>h.right)break}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(h.bottomk.bottom)continue;if(k.y>i.body.bottom)break}this.collideSpriteVsSprite(i,l,b,d,e,f)}}}}},collideGroupVsGroup:function(a,b,d,e,f,g){if(0!==a.length&&0!==b.length)for(var h=0;hh.bottom)&&(i.xh.right))return this.separateCircle(a,b,e)}var j=!1,k=!1;this.forceX||Math.abs(this.gravity.y+a.gravity.y)=b.right)&&!(a.position.y>=b.bottom))))},circleBodyIntersects:function(a,b){var d=c.Math.clamp(a.center.x,b.left,b.right),e=c.Math.clamp(a.center.y,b.top,b.bottom);return(a.center.x-d)*(a.center.x-d)+(a.center.y-e)*(a.center.y-e)<=a.radius*a.radius},separateCircle:function(a,b,d){this.getOverlapX(a,b),this.getOverlapY(a,b);var e=b.center.x-a.center.x,f=b.center.y-a.center.y,g=Math.atan2(f,e),h=0;if(a.isCircle!==b.isCircle){var i={x:b.isCircle?a.position.x:b.position.x,y:b.isCircle?a.position.y:b.position.y,right:b.isCircle?a.right:b.right,bottom:b.isCircle?a.bottom:b.bottom},j={x:a.isCircle?a.position.x+a.radius:b.position.x+b.radius,y:a.isCircle?a.position.y+a.radius:b.position.y+b.radius,radius:a.isCircle?a.radius:b.radius};j.yi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.y)-j.radius):j.y>i.bottom&&(j.xi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.bottom)-j.radius)),h*=-1}else h=a.radius+b.radius-c.Math.distance(a.center.x,a.center.y,b.center.x,b.center.y);if(d||0===h||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==h&&(a.onOverlap&&a.onOverlap.dispatch(a.sprite,b.sprite),b.onOverlap&&b.onOverlap.dispatch(b.sprite,a.sprite)),0!==h;var k={x:a.velocity.x*Math.cos(g)+a.velocity.y*Math.sin(g),y:a.velocity.x*Math.sin(g)-a.velocity.y*Math.cos(g)},l={x:b.velocity.x*Math.cos(g)+b.velocity.y*Math.sin(g),y:b.velocity.x*Math.sin(g)-b.velocity.y*Math.cos(g)},m=((a.mass-b.mass)*k.x+2*b.mass*l.x)/(a.mass+b.mass),n=(2*a.mass*k.x+(b.mass-a.mass)*l.x)/(a.mass+b.mass);return a.immovable||(a.velocity.x=(m*Math.cos(g)-k.y*Math.sin(g))*a.bounce.x,a.velocity.y=(k.y*Math.cos(g)+m*Math.sin(g))*a.bounce.y),b.immovable||(b.velocity.x=(n*Math.cos(g)-l.y*Math.sin(g))*b.bounce.x,b.velocity.y=(l.y*Math.cos(g)+n*Math.sin(g))*b.bounce.y),Math.abs(g)0&&!a.immovable&&b.velocity.x>a.velocity.x?a.velocity.x*=-1:b.velocity.x<0&&!b.immovable&&a.velocity.x0&&!a.immovable&&b.velocity.y>a.velocity.y?a.velocity.y*=-1:b.velocity.y<0&&!b.immovable&&a.velocity.yMath.PI/2&&(a.velocity.x<0&&!a.immovable&&b.velocity.x0&&!b.immovable&&a.velocity.x>b.velocity.x?b.velocity.x*=-1:a.velocity.y<0&&!a.immovable&&b.velocity.y0&&!b.immovable&&a.velocity.x>b.velocity.y&&(b.velocity.y*=-1)),a.immovable||(a.x+=a.velocity.x*this.game.time.physicsElapsed-h*Math.cos(g),a.y+=a.velocity.y*this.game.time.physicsElapsed-h*Math.sin(g)),b.immovable||(b.x+=b.velocity.x*this.game.time.physicsElapsed+h*Math.cos(g),b.y+=b.velocity.y*this.game.time.physicsElapsed+h*Math.sin(g)),a.onCollide&&a.onCollide.dispatch(a.sprite,b.sprite),b.onCollide&&b.onCollide.dispatch(b.sprite,a.sprite),!0},getOverlapX:function(a,b,c){var d=0,e=a.deltaAbsX()+b.deltaAbsX()+this.OVERLAP_BIAS;return 0===a.deltaX()&&0===b.deltaX()?(a.embedded=!0,b.embedded=!0):a.deltaX()>b.deltaX()?(d=a.right-b.x,d>e&&!c||!1===a.checkCollision.right||!1===b.checkCollision.left?d=0:(a.touching.none=!1,a.touching.right=!0,b.touching.none=!1,b.touching.left=!0)):a.deltaX()e&&!c||!1===a.checkCollision.left||!1===b.checkCollision.right?d=0:(a.touching.none=!1,a.touching.left=!0,b.touching.none=!1,b.touching.right=!0)),a.overlapX=d,b.overlapX=d,d},getOverlapY:function(a,b,c){var d=0,e=a.deltaAbsY()+b.deltaAbsY()+this.OVERLAP_BIAS;return 0===a.deltaY()&&0===b.deltaY()?(a.embedded=!0,b.embedded=!0):a.deltaY()>b.deltaY()?(d=a.bottom-b.y,d>e&&!c||!1===a.checkCollision.down||!1===b.checkCollision.up?d=0:(a.touching.none=!1,a.touching.down=!0,b.touching.none=!1,b.touching.up=!0)):a.deltaY()e&&!c||!1===a.checkCollision.up||!1===b.checkCollision.down?d=0:(a.touching.none=!1,a.touching.up=!0,b.touching.none=!1,b.touching.down=!0)),a.overlapY=d,b.overlapY=d,d},separateX:function(a,b,c){var d=this.getOverlapX(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.x,f=b.velocity.x;if(a.immovable||b.immovable)a.immovable?(b.x+=d,b.velocity.x=e-f*b.bounce.x,a.moves&&(b.y+=(a.y-a.prev.y)*a.friction.y)):(a.x-=d,a.velocity.x=f-e*a.bounce.x,b.moves&&(a.y+=(b.y-b.prev.y)*b.friction.y));else{d*=.5,a.x-=d,b.x+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.x=i+g*a.bounce.x,b.velocity.x=i+h*b.bounce.x}return!0},separateY:function(a,b,c){var d=this.getOverlapY(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateY||b.customSeparateY)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.y,f=b.velocity.y;if(a.immovable||b.immovable)a.immovable?(b.y+=d,b.velocity.y=e-f*b.bounce.y,a.moves&&(b.x+=(a.x-a.prev.x)*a.friction.x)):(a.y-=d,a.velocity.y=f-e*a.bounce.y,b.moves&&(a.x+=(b.x-b.prev.x)*b.friction.x));else{d*=.5,a.y-=d,b.y+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.y=i+g*a.bounce.y,b.velocity.y=i+h*b.bounce.y}return!0},getObjectsUnderPointer:function(a,b,c,d){if(0!==b.length&&a.exists)return this.getObjectsAtLocation(a.x,a.y,b,c,d,a)},getObjectsAtLocation:function(a,b,d,e,f,g){this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(d);for(var h=new c.Rectangle(a,b,1,1),i=[],j=this.quadTree.retrieve(h),k=0;k0&&(c=this.distanceBetween(a,b)/(d/1e3)),a.body.velocity.x=Math.cos(e)*c,a.body.velocity.y=Math.sin(e)*c,e},moveToPointer:function(a,b,c,d){void 0===b&&(b=60),c=c||this.game.input.activePointer,void 0===d&&(d=0);var e=this.angleToPointer(a,c);return d>0&&(b=this.distanceToPointer(a,c)/(d/1e3)),a.body.velocity.x=Math.cos(e)*b,a.body.velocity.y=Math.sin(e)*b,e},moveToXY:function(a,b,c,d,e){void 0===d&&(d=60),void 0===e&&(e=0);var f=Math.atan2(c-a.y,b-a.x);return e>0&&(d=this.distanceToXY(a,b,c)/(e/1e3)),a.body.velocity.x=Math.cos(f)*d,a.body.velocity.y=Math.sin(f)*d,f},velocityFromAngle:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(this.game.math.degToRad(a))*b,Math.sin(this.game.math.degToRad(a))*b)},velocityFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerationFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerateToObject:function(a,b,c,d,e){void 0===c&&(c=60),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleBetween(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToPointer:function(a,b,c,d,e){void 0===c&&(c=60),void 0===b&&(b=this.game.input.activePointer),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleToPointer(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToXY:function(a,b,c,d,e,f){void 0===d&&(d=60),void 0===e&&(e=1e3),void 0===f&&(f=1e3);var g=this.angleToXY(a,b,c);return a.body.acceleration.setTo(Math.cos(g)*d,Math.sin(g)*d),a.body.maxVelocity.setTo(e,f),g},distanceBetween:function(a,b,c){void 0===c&&(c=!1);var d=c?a.world.x-b.world.x:a.x-b.x,e=c?a.world.y-b.world.y:a.y-b.y;return Math.sqrt(d*d+e*e)},distanceToXY:function(a,b,c,d){void 0===d&&(d=!1);var e=d?a.world.x-b:a.x-b,f=d?a.world.y-c:a.y-c;return Math.sqrt(e*e+f*f)},distanceToPointer:function(a,b,c){void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1);var d=c?a.world.x-b.worldX:a.x-b.worldX,e=c?a.world.y-b.worldY:a.y-b.worldY;return Math.sqrt(d*d+e*e)},angleBetween:function(a,b,c){return void 0===c&&(c=!1),c?Math.atan2(b.world.y-a.world.y,b.world.x-a.world.x):Math.atan2(b.y-a.y,b.x-a.x)},angleBetweenCenters:function(a,b){var c=b.centerX-a.centerX,d=b.centerY-a.centerY;return Math.atan2(d,c)},angleToXY:function(a,b,c,d){return void 0===d&&(d=!1),d?Math.atan2(c-a.world.y,b-a.world.x):Math.atan2(c-a.y,b-a.x)},angleToPointer:function(a,b,c){return void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1),c?Math.atan2(b.worldY-a.world.y,b.worldX-a.world.x):Math.atan2(b.worldY-a.y,b.worldX-a.x)},worldAngleToPointer:function(a,b){return this.angleToPointer(a,b,!0)}},c.Physics.Arcade.Body=function(a){this.sprite=a,this.game=a.game,this.type=c.Physics.ARCADE,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c.Point,this.position=new c.Point(a.x,a.y),this.prev=new c.Point(this.position.x,this.position.y),this.allowRotation=!0,this.rotation=a.angle,this.preRotation=a.angle,this.width=a.width,this.height=a.height,this.sourceWidth=a.width,this.sourceHeight=a.height,a.texture&&(this.sourceWidth=a.texture.frame.width,this.sourceHeight=a.texture.frame.height),this.halfWidth=Math.abs(a.width/2),this.halfHeight=Math.abs(a.height/2),this.center=new c.Point(a.x+this.halfWidth,a.y+this.halfHeight),this.velocity=new c.Point,this.newVelocity=new c.Point,this.deltaMax=new c.Point,this.acceleration=new c.Point,this.drag=new c.Point,this.allowGravity=!0,this.gravity=new c.Point,this.bounce=new c.Point,this.worldBounce=null,this.onWorldBounds=null,this.onCollide=null,this.onOverlap=null,this.maxVelocity=new c.Point(1e4,1e4),this.friction=new c.Point(1,0),this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=c.NONE,this.immovable=!1,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={up:!1,down:!1,left:!1,right:!1},this.tilePadding=new c.Point,this.dirty=!1,this.skipQuadTree=!1,this.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.moveTimer=0,this.moveDistance=0,this.moveDuration=0,this.moveTarget=null,this.moveEnd=null,this.onMoveComplete=new c.Signal,this.movementCallback=null,this.movementCallbackContext=null,this._reset=!0,this._sx=a.scale.x,this._sy=a.scale.y,this._dx=0,this._dy=0},c.Physics.Arcade.Body.prototype={updateBounds:function(){if(this.syncBounds){var a=this.sprite.getBounds();a.ceilAll(),a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._reset=!0)}else{var b=Math.abs(this.sprite.scale.x),c=Math.abs(this.sprite.scale.y);b===this._sx&&c===this._sy||(this.width=this.sourceWidth*b,this.height=this.sourceHeight*c,this._sx=b,this._sy=c,this._reset=!0)}this._reset&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight))},preUpdate:function(){this.enable&&!this.game.physics.arcade.isPaused&&(this.dirty=!0,this.wasTouching.none=this.touching.none,this.wasTouching.up=this.touching.up,this.wasTouching.down=this.touching.down,this.wasTouching.left=this.touching.left,this.wasTouching.right=this.touching.right,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.embedded=!1,this.updateBounds(),this.position.x=this.sprite.world.x-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=this.sprite.world.y-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.rotation=this.sprite.angle,this.preRotation=this.rotation,(this._reset||this.sprite.fresh)&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves&&(this.game.physics.arcade.updateMotion(this),this.newVelocity.set(this.velocity.x*this.game.time.physicsElapsed,this.velocity.y*this.game.time.physicsElapsed),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.onWorldBounds.dispatch(this.sprite,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)),this._dx=this.deltaX(),this._dy=this.deltaY(),this._reset=!1)},updateMovement:function(){var a=0,b=0!==this.overlapX||0!==this.overlapY;if(this.moveDuration>0?(this.moveTimer+=this.game.time.elapsedMS,a=this.moveTimer/this.moveDuration):(this.moveTarget.end.set(this.position.x,this.position.y),a=this.moveTarget.length/this.moveDistance),this.movementCallback)var c=this.movementCallback.call(this.movementCallbackContext,this,this.velocity,a);return!(b||a>=1||void 0!==c&&!0!==c)||(this.stopMovement(a>=1||this.stopVelocityOnCollide&&b),!1)},stopMovement:function(a){this.isMoving&&(this.isMoving=!1,a&&this.velocity.set(0),this.onMoveComplete.dispatch(this.sprite,0!==this.overlapX||0!==this.overlapY))},postUpdate:function(){this.enable&&this.dirty&&(this.isMoving&&this.updateMovement(),this.dirty=!1,this.deltaX()<0?this.facing=c.LEFT:this.deltaX()>0&&(this.facing=c.RIGHT),this.deltaY()<0?this.facing=c.UP:this.deltaY()>0&&(this.facing=c.DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.sprite.position.x+=this._dx,this.sprite.position.y+=this._dy,this._reset=!0),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.allowRotation&&(this.sprite.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var a=this.position,b=this.game.physics.arcade.bounds,c=this.game.physics.arcade.checkCollision,d=this.worldBounce?-this.worldBounce.x:-this.bounce.x,e=this.worldBounce?-this.worldBounce.y:-this.bounce.y;if(this.isCircle){var f={x:this.center.x-this.radius,y:this.center.y-this.radius,right:this.center.x+this.radius,bottom:this.center.y+this.radius};f.xb.right&&c.right&&(a.x=b.right-this.halfWidth-this.radius,this.velocity.x*=d,this.blocked.right=!0),f.yb.bottom&&c.down&&(a.y=b.bottom-this.halfHeight-this.radius,this.velocity.y*=e,this.blocked.down=!0)}else a.xb.right&&c.right&&(a.x=b.right-this.width,this.velocity.x*=d,this.blocked.right=!0),a.yb.bottom&&c.down&&(a.y=b.bottom-this.height,this.velocity.y*=e,this.blocked.down=!0);return this.blocked.up||this.blocked.down||this.blocked.left||this.blocked.right},moveFrom:function(a,b,c){if(void 0===b&&(b=this.speed),0===b)return!1;var d;return void 0===c?(d=this.angle,c=this.game.math.radToDeg(d)):d=this.game.math.degToRad(c),this.moveTimer=0,this.moveDuration=a,0===c||180===c?this.velocity.set(Math.cos(d)*b,0):90===c||270===c?this.velocity.set(0,Math.sin(d)*b):this.velocity.set(Math.cos(d)*b,Math.sin(d)*b),this.isMoving=!0,!0},moveTo:function(a,b,d){var e=b/(a/1e3);if(0===e)return!1;var f;return void 0===d?(f=this.angle,d=this.game.math.radToDeg(f)):f=this.game.math.degToRad(d),b=Math.abs(b),this.moveDuration=0,this.moveDistance=b,null===this.moveTarget&&(this.moveTarget=new c.Line,this.moveEnd=new c.Point),this.moveTarget.fromAngle(this.x,this.y,f,b),this.moveEnd.set(this.moveTarget.end.x,this.moveTarget.end.y),this.moveTarget.setTo(this.x,this.y,this.x,this.y),0===d||180===d?this.velocity.set(Math.cos(f)*e,0):90===d||270===d?this.velocity.set(0,Math.sin(f)*e):this.velocity.set(Math.cos(f)*e,Math.sin(f)*e),this.isMoving=!0,!0},setSize:function(a,b,c,d){void 0===c&&(c=this.offset.x),void 0===d&&(d=this.offset.y),this.sourceWidth=a,this.sourceHeight=b,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(c,d),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.isCircle=!1,this.radius=0},setCircle:function(a,b,c){void 0===b&&(b=this.offset.x),void 0===c&&(c=this.offset.y),a>0?(this.isCircle=!0,this.radius=a,this.sourceWidth=2*a,this.sourceHeight=2*a,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(b,c),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)):this.isCircle=!1},reset:function(a,b){this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this.position.x=a-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=b-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.prev.x=this.position.x,this.prev.y=this.position.y,this.rotation=this.sprite.angle,this.preRotation=this.rotation,this._sx=this.sprite.scale.x,this._sy=this.sprite.scale.y,this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},getBounds:function(a){return this.isCircle?(a.x=this.center.x-this.radius,a.y=this.center.y-this.radius,a.right=this.center.x+this.radius,a.bottom=this.center.y+this.radius):(a.x=this.x,a.y=this.y,a.right=this.right,a.bottom=this.bottom),a},hitTest:function(a,b){return this.isCircle?c.Circle.contains(this,a,b):c.Rectangle.contains(this,a,b)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.sprite.parent&&this.sprite.parent instanceof c.Group&&this.sprite.parent.removeFromHash(this.sprite),this.sprite.body=null,this.sprite=null}},Object.defineProperty(c.Physics.Arcade.Body.prototype,"left",{get:function(){return this.position.x}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"right",{get:function(){return this.position.x+this.width}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"top",{get:function(){return this.position.y}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.position.y+this.height}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"x",{get:function(){return this.position.x},set:function(a){this.position.x=a}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"y",{get:function(){return this.position.y},set:function(a){this.position.y=a}}),c.Physics.Arcade.Body.render=function(a,b,c,d){void 0===d&&(d=!0),c=c||"rgba(0,255,0,0.4)",a.fillStyle=c,a.strokeStyle=c,b.isCircle?(a.beginPath(),a.arc(b.center.x-b.game.camera.x,b.center.y-b.game.camera.y,b.radius,0,2*Math.PI),d?a.fill():a.stroke()):d?a.fillRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height):a.strokeRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height)},c.Physics.Arcade.Body.renderBodyInfo=function(a,b){a.line("x: "+b.x.toFixed(2),"y: "+b.y.toFixed(2),"width: "+b.width,"height: "+b.height),a.line("velocity x: "+b.velocity.x.toFixed(2),"y: "+b.velocity.y.toFixed(2),"deltaX: "+b._dx.toFixed(2),"deltaY: "+b._dy.toFixed(2)),a.line("acceleration x: "+b.acceleration.x.toFixed(2),"y: "+b.acceleration.y.toFixed(2),"speed: "+b.speed.toFixed(2),"angle: "+b.angle.toFixed(2)),a.line("gravity x: "+b.gravity.x,"y: "+b.gravity.y,"bounce x: "+b.bounce.x.toFixed(2),"y: "+b.bounce.y.toFixed(2)),a.line("touching left: "+b.touching.left,"right: "+b.touching.right,"up: "+b.touching.up,"down: "+b.touching.down),a.line("blocked left: "+b.blocked.left,"right: "+b.blocked.right,"up: "+b.blocked.up,"down: "+b.blocked.down)},c.Physics.Arcade.Body.prototype.constructor=c.Physics.Arcade.Body,c.Physics.Arcade.TilemapCollision=function(){},c.Physics.Arcade.TilemapCollision.prototype={TILE_BIAS:16,collideSpriteVsTilemapLayer:function(a,b,c,d,e,f){if(a.body){var g=b.getTiles(a.body.position.x-a.body.tilePadding.x,a.body.position.y-a.body.tilePadding.y,a.body.width+a.body.tilePadding.x,a.body.height+a.body.tilePadding.y,!1,!1);if(0!==g.length)for(var h=0;hb.deltaAbsY()?j=-1:b.deltaAbsX()0&&!a.blocked.right&&b.collideLeft&&a.checkCollision.right&&b.faceLeft&&a.right-e>b.left&&(d=a.right-e-b.left)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateX?a.overlapX=d:this.processTileSeparationX(a,d)),d},tileCheckY:function(a,b,c){var d=0,e=c.fixedToCamera?0:c.position.y;return a.deltaY()<0&&!a.blocked.up&&b.collideDown&&a.checkCollision.up?b.faceBottom&&a.y-e0&&!a.blocked.down&&b.collideUp&&a.checkCollision.down&&b.faceTop&&a.bottom-e>b.top&&(d=a.bottom-e-b.top)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateY?a.overlapY=d:this.processTileSeparationY(a,d)),d},processTileSeparationX:function(a,b){b<0?a.blocked.left=!0:b>0&&(a.blocked.right=!0),a.position.x-=b,0===a.bounce.x?a.velocity.x=0:a.velocity.x=-a.velocity.x*a.bounce.x},processTileSeparationY:function(a,b){b<0?a.blocked.up=!0:b>0&&(a.blocked.down=!0),a.position.y-=b,0===a.bounce.y?a.velocity.y=0:a.velocity.y=-a.velocity.y*a.bounce.y}},c.Utils.mixinPrototype(c.Physics.Arcade.prototype,c.Physics.Arcade.TilemapCollision.prototype),p2.Body.prototype.parent=null,p2.Spring.prototype.parent=null,c.Physics.P2=function(a,b){this.game=a,void 0===b?b={gravity:[0,0],broadphase:new p2.SAPBroadphase}:(b.hasOwnProperty("gravity")||(b.gravity=[0,0]),b.hasOwnProperty("broadphase")||(b.broadphase=new p2.SAPBroadphase)),this.config=b,this.world=new p2.World(this.config),this.frameRate=1/60,this.useElapsedTime=!1,this.paused=!1,this.materials=[],this.gravity=new c.Physics.P2.InversePointProxy(this,this.world.gravity),this.walls={left:null,right:null,top:null,bottom:null},this.onBodyAdded=new c.Signal,this.onBodyRemoved=new c.Signal,this.onSpringAdded=new c.Signal,this.onSpringRemoved=new c.Signal,this.onConstraintAdded=new c.Signal,this.onConstraintRemoved=new c.Signal,this.onContactMaterialAdded=new c.Signal,this.onContactMaterialRemoved=new c.Signal,this.postBroadphaseCallback=null,this.callbackContext=null,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,b.hasOwnProperty("mpx")&&b.hasOwnProperty("pxm")&&b.hasOwnProperty("mpxi")&&b.hasOwnProperty("pxmi")&&(this.mpx=b.mpx,this.mpxi=b.mpxi,this.pxm=b.pxm,this.pxmi=b.pxmi),this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.collisionGroups=[],this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this.boundsCollidesWith=[],this._toRemove=[],this._collisionGroupID=2,this._boundsLeft=!0,this._boundsRight=!0,this._boundsTop=!0,this._boundsBottom=!0,this._boundsOwnGroup=!1,this.setBoundsToWorld(!0,!0,!0,!0,!1)},c.Physics.P2.prototype={removeBodyNextStep:function(a){this._toRemove.push(a)},preUpdate:function(){for(var a=this._toRemove.length;a--;)this.removeBody(this._toRemove[a]);this._toRemove.length=0},enable:function(a,b,d){void 0===b&&(b=!1),void 0===d&&(d=!0);var e=1;if(Array.isArray(a))for(e=a.length;e--;)a[e]instanceof c.Group?this.enable(a[e].children,b,d):(this.enableBody(a[e],b),d&&a[e].hasOwnProperty("children")&&a[e].children.length>0&&this.enable(a[e],b,!0));else a instanceof c.Group?this.enable(a.children,b,d):(this.enableBody(a,b),d&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,b,!0))},enableBody:function(a,b){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.P2.Body(this.game,a,a.x,a.y,1),a.body.debug=b,void 0!==a.anchor&&a.anchor.set(.5))},setImpactEvents:function(a){a?this.world.on("impact",this.impactHandler,this):this.world.off("impact",this.impactHandler,this)},setPostBroadphaseCallback:function(a,b){this.postBroadphaseCallback=a,this.callbackContext=b,null!==a?this.world.on("postBroadphase",this.postBroadphaseHandler,this):this.world.off("postBroadphase",this.postBroadphaseHandler,this)},postBroadphaseHandler:function(a){if(this.postBroadphaseCallback&&0!==a.pairs.length)for(var b=a.pairs.length-2;b>=0;b-=2)a.pairs[b].parent&&a.pairs[b+1].parent&&!this.postBroadphaseCallback.call(this.callbackContext,a.pairs[b].parent,a.pairs[b+1].parent)&&a.pairs.splice(b,2)},impactHandler:function(a){if(a.bodyA.parent&&a.bodyB.parent){var b=a.bodyA.parent,c=a.bodyB.parent;b._bodyCallbacks[a.bodyB.id]&&b._bodyCallbacks[a.bodyB.id].call(b._bodyCallbackContext[a.bodyB.id],b,c,a.shapeA,a.shapeB),c._bodyCallbacks[a.bodyA.id]&&c._bodyCallbacks[a.bodyA.id].call(c._bodyCallbackContext[a.bodyA.id],c,b,a.shapeB,a.shapeA),b._groupCallbacks[a.shapeB.collisionGroup]&&b._groupCallbacks[a.shapeB.collisionGroup].call(b._groupCallbackContext[a.shapeB.collisionGroup],b,c,a.shapeA,a.shapeB),c._groupCallbacks[a.shapeA.collisionGroup]&&c._groupCallbacks[a.shapeA.collisionGroup].call(c._groupCallbackContext[a.shapeA.collisionGroup],c,b,a.shapeB,a.shapeA)}},beginContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onBeginContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyA.parent&&a.bodyA.parent.onBeginContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyB.parent&&a.bodyB.parent.onBeginContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA,a.contactEquations))},endContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onEndContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB),a.bodyA.parent&&a.bodyA.parent.onEndContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB),a.bodyB.parent&&a.bodyB.parent.onEndContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA))},setBoundsToWorld:function(a,b,c,d,e){this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,a,b,c,d,e)},setWorldMaterial:function(a,b,c,d,e){void 0===b&&(b=!0),void 0===c&&(c=!0),void 0===d&&(d=!0),void 0===e&&(e=!0),b&&this.walls.left&&(this.walls.left.shapes[0].material=a),c&&this.walls.right&&(this.walls.right.shapes[0].material=a),d&&this.walls.top&&(this.walls.top.shapes[0].material=a),e&&this.walls.bottom&&(this.walls.bottom.shapes[0].material=a)},updateBoundsCollisionGroup:function(a){void 0===a&&(a=!0);var b=a?this.boundsCollisionGroup.mask:this.everythingCollisionGroup.mask;this.walls.left&&(this.walls.left.shapes[0].collisionGroup=b),this.walls.right&&(this.walls.right.shapes[0].collisionGroup=b),this.walls.top&&(this.walls.top.shapes[0].collisionGroup=b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionGroup=b),this._boundsOwnGroup=a},setBounds:function(a,b,c,d,e,f,g,h,i){void 0===e&&(e=this._boundsLeft),void 0===f&&(f=this._boundsRight),void 0===g&&(g=this._boundsTop),void 0===h&&(h=this._boundsBottom),void 0===i&&(i=this._boundsOwnGroup),this.setupWall(e,"left",a,b,1.5707963267948966,i),this.setupWall(f,"right",a+c,b,-1.5707963267948966,i),this.setupWall(g,"top",a,b,-3.141592653589793,i),this.setupWall(h,"bottom",a,b+d,0,i),this._boundsLeft=e,this._boundsRight=f,this._boundsTop=g,this._boundsBottom=h,this._boundsOwnGroup=i},setupWall:function(a,b,c,d,e,f){a?(this.walls[b]?this.walls[b].position=[this.pxmi(c),this.pxmi(d)]:(this.walls[b]=new p2.Body({mass:0,position:[this.pxmi(c),this.pxmi(d)],angle:e}),this.walls[b].addShape(new p2.Plane),this.world.addBody(this.walls[b])),f&&(this.walls[b].shapes[0].collisionGroup=this.boundsCollisionGroup.mask)):this.walls[b]&&(this.world.removeBody(this.walls[b]),this.walls[b]=null)},pause:function(){this.paused=!0},resume:function(){this.paused=!1},update:function(){this.paused||(this.useElapsedTime?this.world.step(this.game.time.physicsElapsed):this.world.step(this.frameRate))},reset:function(){this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this._collisionGroupID=2,this.setBoundsToWorld(!0,!0,!0,!0,!1)},clear:function(){this.world.time=0,this.world.fixedStepTime=0,this.world.solver&&this.world.solver.equations.length&&this.world.solver.removeAllEquations();for(var a=this.world.constraints,b=a.length-1;b>=0;b--)this.world.removeConstraint(a[b]);for(var c=this.world.bodies,b=c.length-1;b>=0;b--)this.world.removeBody(c[b]);for(var d=this.world.springs,b=d.length-1;b>=0;b--)this.world.removeSpring(d[b]);for(var e=this.world.contactMaterials,b=e.length-1;b>=0;b--)this.world.removeContactMaterial(e[b]);this.world.off("beginContact",this.beginContactHandler,this),this.world.off("endContact",this.endContactHandler,this),this.postBroadphaseCallback=null,this.callbackContext=null,this.impactCallback=null,this.collisionGroups=[],this._toRemove=[],this.boundsCollidesWith=[],this.walls={left:null,right:null,top:null,bottom:null}},destroy:function(){this.clear(),this.game=null},addBody:function(a){return!a.data.world&&(this.world.addBody(a.data),this.onBodyAdded.dispatch(a),!0)},removeBody:function(a){return a.data.world===this.world&&(this.world.removeBody(a.data),this.onBodyRemoved.dispatch(a)),a},addSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.addSpring(a.data):this.world.addSpring(a),this.onSpringAdded.dispatch(a),a},removeSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.removeSpring(a.data):this.world.removeSpring(a),this.onSpringRemoved.dispatch(a),a},createDistanceConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.DistanceConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createGearConstraint:function(a,b,d,e){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.GearConstraint(this,a,b,d,e));console.warn("Cannot create Constraint, invalid body objects given")},createRevoluteConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),d=this.getBody(d),a&&d)return this.addConstraint(new c.Physics.P2.RevoluteConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createLockConstraint:function(a,b,d,e,f){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.LockConstraint(this,a,b,d,e,f));console.warn("Cannot create Constraint, invalid body objects given")},createPrismaticConstraint:function(a,b,d,e,f,g,h){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.PrismaticConstraint(this,a,b,d,e,f,g,h));console.warn("Cannot create Constraint, invalid body objects given")},addConstraint:function(a){return this.world.addConstraint(a),this.onConstraintAdded.dispatch(a),a},removeConstraint:function(a){return this.world.removeConstraint(a),this.onConstraintRemoved.dispatch(a),a},addContactMaterial:function(a){return this.world.addContactMaterial(a),this.onContactMaterialAdded.dispatch(a),a},removeContactMaterial:function(a){return this.world.removeContactMaterial(a),this.onContactMaterialRemoved.dispatch(a),a},getContactMaterial:function(a,b){return this.world.getContactMaterial(a,b)},setMaterial:function(a,b){for(var c=b.length;c--;)b[c].setMaterial(a)},createMaterial:function(a,b){a=a||"";var d=new c.Physics.P2.Material(a);return this.materials.push(d),void 0!==b&&b.setMaterial(d),d},createContactMaterial:function(a,b,d){void 0===a&&(a=this.createMaterial()),void 0===b&&(b=this.createMaterial());var e=new c.Physics.P2.ContactMaterial(a,b,d);return this.addContactMaterial(e)},getBodies:function(){for(var a=[],b=this.world.bodies.length;b--;)a.push(this.world.bodies[b].parent);return a},getBody:function(a){return a instanceof p2.Body?a:a instanceof c.Physics.P2.Body?a.data:a.body&&a.body.type===c.Physics.P2JS?a.body.data:null},getSprings:function(){for(var a=[],b=this.world.springs.length;b--;)a.push(this.world.springs[b].parent);return a},getConstraints:function(){for(var a=[],b=this.world.constraints.length;b--;)a.push(this.world.constraints[b]);return a},hitTest:function(a,b,d,e){void 0===b&&(b=this.world.bodies),void 0===d&&(d=5),void 0===e&&(e=!1);for(var f=[this.pxmi(a.x),this.pxmi(a.y)],g=[],h=b.length;h--;)b[h]instanceof c.Physics.P2.Body&&(!e||b[h].data.type!==p2.Body.STATIC)?g.push(b[h].data):b[h]instanceof p2.Body&&b[h].parent&&(!e||b[h].type!==p2.Body.STATIC)?g.push(b[h]):b[h]instanceof c.Sprite&&b[h].hasOwnProperty("body")&&(!e||b[h].body.data.type!==p2.Body.STATIC)&&g.push(b[h].body.data);return this.world.hitTest(f,g,d)},toJSON:function(){return this.world.toJSON()},createCollisionGroup:function(a){var b=Math.pow(2,this._collisionGroupID);this.walls.left&&(this.walls.left.shapes[0].collisionMask=this.walls.left.shapes[0].collisionMask|b),this.walls.right&&(this.walls.right.shapes[0].collisionMask=this.walls.right.shapes[0].collisionMask|b),this.walls.top&&(this.walls.top.shapes[0].collisionMask=this.walls.top.shapes[0].collisionMask|b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionMask=this.walls.bottom.shapes[0].collisionMask|b),this._collisionGroupID++;var d=new c.Physics.P2.CollisionGroup(b);return this.collisionGroups.push(d),a&&this.setCollisionGroup(a,d),d},setCollisionGroup:function(a,b){if(a instanceof c.Group)for(var d=0;d-1&&l.collides)if(d){var m=a.getTileRight(b,j,h);if(0===e&&(f=l.x*l.width,g=l.y*l.height,e=l.width),m&&m.collides)e+=l.width;else{var n=this.createBody(f,g,0,!1);n.addRectangle(e,l.height,e/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n),e=0}}else{var n=this.createBody(l.x*l.width,l.y*l.height,0,!1);n.addRectangle(l.width,l.height,l.width/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n)}}}return a.layers[b].bodies},mpx:function(a){return a*=20},pxm:function(a){return.05*a},mpxi:function(a){return a*=-20},pxmi:function(a){return-.05*a}},Object.defineProperty(c.Physics.P2.prototype,"friction",{get:function(){return this.world.defaultContactMaterial.friction},set:function(a){this.world.defaultContactMaterial.friction=a}}),Object.defineProperty(c.Physics.P2.prototype,"restitution",{get:function(){return this.world.defaultContactMaterial.restitution},set:function(a){this.world.defaultContactMaterial.restitution=a}}),Object.defineProperty(c.Physics.P2.prototype,"contactMaterial",{get:function(){return this.world.defaultContactMaterial},set:function(a){this.world.defaultContactMaterial=a}}),Object.defineProperty(c.Physics.P2.prototype,"applySpringForces",{get:function(){return this.world.applySpringForces},set:function(a){this.world.applySpringForces=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyDamping",{get:function(){return this.world.applyDamping},set:function(a){this.world.applyDamping=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyGravity",{get:function(){return this.world.applyGravity},set:function(a){this.world.applyGravity=a}}),Object.defineProperty(c.Physics.P2.prototype,"solveConstraints",{get:function(){return this.world.solveConstraints},set:function(a){this.world.solveConstraints=a}}),Object.defineProperty(c.Physics.P2.prototype,"time",{get:function(){return this.world.time}}),Object.defineProperty(c.Physics.P2.prototype,"emitImpactEvent",{get:function(){return this.world.emitImpactEvent},set:function(a){this.world.emitImpactEvent=a}}),Object.defineProperty(c.Physics.P2.prototype,"sleepMode",{get:function(){return this.world.sleepMode},set:function(a){this.world.sleepMode=a}}),Object.defineProperty(c.Physics.P2.prototype,"total",{get:function(){return this.world.bodies.length}}),c.Physics.P2.FixtureList=function(a){Array.isArray(a)||(a=[a]),this.rawList=a,this.init(),this.parse(this.rawList)},c.Physics.P2.FixtureList.prototype={init:function(){this.namedFixtures={},this.groupedFixtures=[],this.allFixtures=[]},setCategory:function(a,b){var c=function(b){b.collisionGroup=a};this.getFixtures(b).forEach(c)},setMask:function(a,b){var c=function(b){b.collisionMask=a};this.getFixtures(b).forEach(c)},setSensor:function(a,b){var c=function(b){b.sensor=a};this.getFixtures(b).forEach(c)},setMaterial:function(a,b){var c=function(b){b.material=a};this.getFixtures(b).forEach(c)},getFixtures:function(a){var b=[];if(a){a instanceof Array||(a=[a]);var c=this;return a.forEach(function(a){c.namedFixtures[a]&&b.push(c.namedFixtures[a])}),this.flatten(b)}return this.allFixtures},getFixtureByKey:function(a){return this.namedFixtures[a]},getGroup:function(a){return this.groupedFixtures[a]},parse:function(){var a,b,c,d;c=this.rawList,d=[];for(a in c)b=c[a],isNaN(a-0)?this.namedFixtures[a]=this.flatten(b):(this.groupedFixtures[a]=this.groupedFixtures[a]||[],this.groupedFixtures[a]=this.groupedFixtures[a].concat(b)),d.push(this.allFixtures=this.flatten(this.groupedFixtures))},flatten:function(a){var b,c;return b=[],c=arguments.callee,a.forEach(function(a){return Array.prototype.push.apply(b,Array.isArray(a)?c(a):[a])}),b}},c.Physics.P2.PointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.PointProxy.prototype.constructor=c.Physics.P2.PointProxy,Object.defineProperty(c.Physics.P2.PointProxy.prototype,"x",{get:function(){return this.world.mpx(this.destination[0])},set:function(a){this.destination[0]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"y",{get:function(){return this.world.mpx(this.destination[1])},set:function(a){this.destination[1]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=a}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=a}}),c.Physics.P2.InversePointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.InversePointProxy.prototype.constructor=c.Physics.P2.InversePointProxy,Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"x",{get:function(){return this.world.mpxi(this.destination[0])},set:function(a){this.destination[0]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"y",{get:function(){return this.world.mpxi(this.destination[1])},set:function(a){this.destination[1]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=-a}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=-a}}),c.Physics.P2.Body=function(a,b,d,e,f){b=b||null,d=d||0,e=e||0,void 0===f&&(f=1),this.game=a,this.world=a.physics.p2,this.sprite=b,this.type=c.Physics.P2JS,this.offset=new c.Point,this.data=new p2.Body({position:[this.world.pxmi(d),this.world.pxmi(e)],mass:f}),this.data.parent=this,this.velocity=new c.Physics.P2.InversePointProxy(this.world,this.data.velocity),this.force=new c.Physics.P2.InversePointProxy(this.world,this.data.force),this.gravity=new c.Point,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,this.collidesWith=[],this.removeNextStep=!1,this.debugBody=null,this.dirty=!1,this._collideWorldBounds=!0,this._bodyCallbacks={},this._bodyCallbackContext={},this._groupCallbacks={},this._groupCallbackContext={},this._reset=!1,b&&(this.setRectangleFromSprite(b),b.exists&&this.game.physics.p2.addBody(this))},c.Physics.P2.Body.prototype={createBodyCallback:function(a,b,c){var d=-1;a.id?d=a.id:a.body&&(d=a.body.id),d>-1&&(null===b?(delete this._bodyCallbacks[d],delete this._bodyCallbackContext[d]):(this._bodyCallbacks[d]=b,this._bodyCallbackContext[d]=c))},createGroupCallback:function(a,b,c){null===b?(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]):(this._groupCallbacks[a.mask]=b,this._groupCallbackContext[a.mask]=c)},getCollisionMask:function(){var a=0;this._collideWorldBounds&&(a=this.game.physics.p2.boundsCollisionGroup.mask);for(var b=0;b=0;c--)this.data.shapes[c].collisionMask=b;else a.collisionMask=b},setCollisionGroup:function(a,b){var c=this.getCollisionMask();if(void 0===b)for(var d=this.data.shapes.length-1;d>=0;d--)this.data.shapes[d].collisionGroup=a.mask,this.data.shapes[d].collisionMask=c;else b.collisionGroup=a.mask,b.collisionMask=c},clearCollision:function(a,b,c){if(void 0===a&&(a=!0),void 0===b&&(b=!0),void 0===c)for(var d=this.data.shapes.length-1;d>=0;d--)a&&(this.data.shapes[d].collisionGroup=null),b&&(this.data.shapes[d].collisionMask=null);else a&&(c.collisionGroup=null),b&&(c.collisionMask=null);a&&(this.collidesWith.length=0)},removeCollisionGroup:function(a,b,c){void 0===b&&(b=!0);var d;if(Array.isArray(a))for(var e=0;e-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));else(d=this.collidesWith.indexOf(a))>-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));var f=this.getCollisionMask();if(void 0===c)for(var e=this.data.shapes.length-1;e>=0;e--)this.data.shapes[e].collisionMask=f;else c.collisionMask=f},collides:function(a,b,c,d){if(Array.isArray(a))for(var e=0;e=0;e--)this.data.shapes[e].collisionMask=f;else d.collisionMask=f},adjustCenterOfMass:function(){this.data.adjustCenterOfMass(),this.shapeChanged()},getVelocityAtPoint:function(a,b){return this.data.getVelocityAtPoint(a,b)},applyDamping:function(a){this.data.applyDamping(a)},applyImpulse:function(a,b,c){this.data.applyImpulse(a,[this.world.pxmi(b),this.world.pxmi(c)])},applyImpulseLocal:function(a,b,c){this.data.applyImpulseLocal(a,[this.world.pxmi(b),this.world.pxmi(c)])}, +applyForce:function(a,b,c){this.data.applyForce(a,[this.world.pxmi(b),this.world.pxmi(c)])},setZeroForce:function(){this.data.setZeroForce()},setZeroRotation:function(){this.data.angularVelocity=0},setZeroVelocity:function(){this.data.velocity[0]=0,this.data.velocity[1]=0},setZeroDamping:function(){this.data.damping=0,this.data.angularDamping=0},toLocalFrame:function(a,b){return this.data.toLocalFrame(a,b)},toWorldFrame:function(a,b){return this.data.toWorldFrame(a,b)},rotateLeft:function(a){this.data.angularVelocity=this.world.pxm(-a)},rotateRight:function(a){this.data.angularVelocity=this.world.pxm(a)},moveForward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=b*Math.cos(c),this.data.velocity[1]=b*Math.sin(c)},moveBackward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=-b*Math.cos(c),this.data.velocity[1]=-b*Math.sin(c)},thrust:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustLeft:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustRight:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},reverse:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},moveLeft:function(a){this.data.velocity[0]=this.world.pxmi(-a)},moveRight:function(a){this.data.velocity[0]=this.world.pxmi(a)},moveUp:function(a){this.data.velocity[1]=this.world.pxmi(-a)},moveDown:function(a){this.data.velocity[1]=this.world.pxmi(a)},preUpdate:function(){this.dirty=!0,this.removeNextStep&&(this.removeFromWorld(),this.removeNextStep=!1)},postUpdate:function(){this.sprite.x=this.world.mpxi(this.data.position[0])+this.offset.x,this.sprite.y=this.world.mpxi(this.data.position[1])+this.offset.y,this.fixedRotation||(this.sprite.rotation=this.data.angle),this.debugBody&&this.debugBody.updateSpriteTransform(),this.dirty=!1},reset:function(a,b,c,d){void 0===c&&(c=!1),void 0===d&&(d=!1),this.setZeroForce(),this.setZeroVelocity(),this.setZeroRotation(),c&&this.setZeroDamping(),d&&(this.mass=1),this.x=a,this.y=b},addToWorld:function(){if(this.game.physics.p2._toRemove)for(var a=0;a=0;c--)this.data.shapes[c].material=a;else b.material=a},shapeChanged:function(){this.debugBody&&this.debugBody.draw()},addPhaserPolygon:function(a,b){for(var c=this.game.cache.getPhysicsData(a,b),d=[],e=0;eo;e=0<=o?++n:--n)k=b.vertices[e],p2.vec2.rotate(m,k,a),l.push([(m[0]+i[0])*this.ppu,-(m[1]+i[1])*this.ppu]);this.drawConvex(j,l,b.triangles,f,c,g,this.settings.debugPolygons,[i[0]*this.ppu,-i[1]*this.ppu])}d++}}},drawRectangle:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1),a.beginFill(h),a.drawRect(b-e/2,c-f/2,e,f)},drawCircle:function(a,b,c,d,e,f,g){void 0===g&&(g=1),void 0===f&&(f=16777215),a.lineStyle(g,0,1),a.beginFill(f,1),a.drawCircle(b,c,2*-e),a.endFill(),a.moveTo(b,c),a.lineTo(b+e*Math.cos(-d),c+e*Math.sin(-d))},drawLine:function(a,b,c,d){void 0===d&&(d=1),void 0===c&&(c=0),a.lineStyle(5*d,c,1),a.moveTo(-b/2,0),a.lineTo(b/2,0)},drawConvex:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s;if(void 0===f&&(f=1),void 0===d&&(d=0),g){for(i=[16711680,65280,255],j=0;j!==b.length+1;)l=b[j%b.length],m=b[(j+1)%b.length],o=l[0],r=l[1],p=m[0],s=m[1],a.lineStyle(f,i[j%i.length],1),a.moveTo(o,-r),a.lineTo(p,-s),a.drawCircle(o,-r,2*f),j++;return a.lineStyle(f,0,1),a.drawCircle(h[0],h[1],2*f)}for(a.lineStyle(f,d,1),a.beginFill(e),j=0;j!==b.length;)k=b[j],n=k[0],q=k[1],0===j?a.moveTo(n,-q):a.lineTo(n,-q),j++;if(a.endFill(),b.length>2)return a.moveTo(b[b.length-1][0],-b[b.length-1][1]),a.lineTo(b[0][0],-b[0][1])},drawPath:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;for(void 0===e&&(e=1),void 0===c&&(c=0),a.lineStyle(e,c,1),"number"==typeof d&&a.beginFill(d),g=null,h=null,f=0;f2&&"number"==typeof d&&(a.moveTo(b[b.length-1][0],b[b.length-1][1]),a.lineTo(b[0][0],b[0][1]))},drawPlane:function(a,b,c,d,e,f,g,h,i,j){var k,l;void 0===f&&(f=1),void 0===d&&(d=16777215),a.lineStyle(f,e,11),a.beginFill(d),a.moveTo(b,-c),k=b+Math.cos(j)*this.game.width,l=c+Math.sin(j)*this.game.height,a.lineTo(k,-l),a.moveTo(b,-c),k=b+Math.cos(j)*-this.game.width,l=c+Math.sin(j)*-this.game.height,a.lineTo(k,-l)},drawCapsule:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1);var j=Math.cos(d),k=Math.sin(d);a.beginFill(h,1),a.drawCircle(-e/2*j+b,-e/2*k+c,2*-f),a.drawCircle(e/2*j+b,e/2*k+c,2*-f),a.endFill(),a.lineStyle(i,g,0),a.beginFill(h,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c),a.lineTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.endFill(),a.lineStyle(i,g,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.moveTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c)},randomPastelHex:function(){var a,b,c,d;return c=[255,255,255],d=Math.floor(256*Math.random()),b=Math.floor(256*Math.random()),a=Math.floor(256*Math.random()),d=Math.floor((d+3*c[0])/4),b=Math.floor((b+3*c[1])/4),a=Math.floor((a+3*c[2])/4),this.rgbToHex(d,b,a)},rgbToHex:function(a,b,c){return this.componentToHex(a)+this.componentToHex(b)+this.componentToHex(c)},componentToHex:function(a){var b;return b=a.toString(16),2===b.length?b:b+"0"}}),c.Physics.P2.Spring=function(a,b,c,d,e,f,g,h,i,j){this.game=a.game,this.world=a,void 0===d&&(d=1),void 0===e&&(e=100),void 0===f&&(f=1),d=a.pxm(d);var k={restLength:d,stiffness:e,damping:f};void 0!==g&&null!==g&&(k.worldAnchorA=[a.pxm(g[0]),a.pxm(g[1])]),void 0!==h&&null!==h&&(k.worldAnchorB=[a.pxm(h[0]),a.pxm(h[1])]),void 0!==i&&null!==i&&(k.localAnchorA=[a.pxm(i[0]),a.pxm(i[1])]),void 0!==j&&null!==j&&(k.localAnchorB=[a.pxm(j[0]),a.pxm(j[1])]),this.data=new p2.LinearSpring(b,c,k),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.RotationalSpring=function(a,b,c,d,e,f){this.game=a.game,this.world=a,void 0===d&&(d=null),void 0===e&&(e=100),void 0===f&&(f=1),d&&(d=a.pxm(d));var g={restAngle:d,stiffness:e,damping:f};this.data=new p2.RotationalSpring(b,c,g),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.Material=function(a){this.name=a,p2.Material.call(this)},c.Physics.P2.Material.prototype=Object.create(p2.Material.prototype),c.Physics.P2.Material.prototype.constructor=c.Physics.P2.Material,c.Physics.P2.ContactMaterial=function(a,b,c){p2.ContactMaterial.call(this,a,b,c)},c.Physics.P2.ContactMaterial.prototype=Object.create(p2.ContactMaterial.prototype),c.Physics.P2.ContactMaterial.prototype.constructor=c.Physics.P2.ContactMaterial,c.Physics.P2.CollisionGroup=function(a){this.mask=a},c.Physics.P2.DistanceConstraint=function(a,b,c,d,e,f,g){void 0===d&&(d=100),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=Number.MAX_VALUE),this.game=a.game,this.world=a,d=a.pxm(d),e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var h={distance:d,localAnchorA:e,localAnchorB:f,maxForce:g};p2.DistanceConstraint.call(this,b,c,h)},c.Physics.P2.DistanceConstraint.prototype=Object.create(p2.DistanceConstraint.prototype),c.Physics.P2.DistanceConstraint.prototype.constructor=c.Physics.P2.DistanceConstraint,c.Physics.P2.GearConstraint=function(a,b,c,d,e){void 0===d&&(d=0),void 0===e&&(e=1),this.game=a.game,this.world=a;var f={angle:d,ratio:e};p2.GearConstraint.call(this,b,c,f)},c.Physics.P2.GearConstraint.prototype=Object.create(p2.GearConstraint.prototype),c.Physics.P2.GearConstraint.prototype.constructor=c.Physics.P2.GearConstraint,c.Physics.P2.LockConstraint=function(a,b,c,d,e,f){void 0===d&&(d=[0,0]),void 0===e&&(e=0),void 0===f&&(f=Number.MAX_VALUE),this.game=a.game,this.world=a,d=[a.pxm(d[0]),a.pxm(d[1])];var g={localOffsetB:d,localAngleB:e,maxForce:f};p2.LockConstraint.call(this,b,c,g)},c.Physics.P2.LockConstraint.prototype=Object.create(p2.LockConstraint.prototype),c.Physics.P2.LockConstraint.prototype.constructor=c.Physics.P2.LockConstraint,c.Physics.P2.PrismaticConstraint=function(a,b,c,d,e,f,g,h){void 0===d&&(d=!0),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=[0,0]),void 0===h&&(h=Number.MAX_VALUE),this.game=a.game,this.world=a,e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var i={localAnchorA:e,localAnchorB:f,localAxisA:g,maxForce:h,disableRotationalLock:!d};p2.PrismaticConstraint.call(this,b,c,i)},c.Physics.P2.PrismaticConstraint.prototype=Object.create(p2.PrismaticConstraint.prototype),c.Physics.P2.PrismaticConstraint.prototype.constructor=c.Physics.P2.PrismaticConstraint,c.Physics.P2.RevoluteConstraint=function(a,b,c,d,e,f,g){void 0===f&&(f=Number.MAX_VALUE),void 0===g&&(g=null),this.game=a.game,this.world=a,c=[a.pxmi(c[0]),a.pxmi(c[1])],e=[a.pxmi(e[0]),a.pxmi(e[1])],g&&(g=[a.pxmi(g[0]),a.pxmi(g[1])]);var h={worldPivot:g,localPivotA:c,localPivotB:e,maxForce:f};p2.RevoluteConstraint.call(this,b,d,h)},c.Physics.P2.RevoluteConstraint.prototype=Object.create(p2.RevoluteConstraint.prototype),c.Physics.P2.RevoluteConstraint.prototype.constructor=c.Physics.P2.RevoluteConstraint,c.ImageCollection=function(a,b,c,d,e,f,g){(void 0===c||c<=0)&&(c=32),(void 0===d||d<=0)&&(d=32),void 0===e&&(e=0),void 0===f&&(f=0),this.name=a,this.firstgid=0|b,this.imageWidth=0|c,this.imageHeight=0|d,this.imageMargin=0|e,this.imageSpacing=0|f,this.properties=g||{},this.images=[],this.total=0},c.ImageCollection.prototype={containsImageIndex:function(a){return a>=this.firstgid&&athis.right||b>this.bottom)},intersects:function(a,b,c,d){return!(c<=this.worldX)&&(!(d<=this.worldY)&&(!(a>=this.worldX+this.width)&&!(b>=this.worldY+this.height)))},setCollisionCallback:function(a,b){this.collisionCallback=a,this.collisionCallbackContext=b},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.faceLeft=a,this.faceRight=b,this.faceTop=c,this.faceBottom=d},resetCollision:function(){this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1},isInteresting:function(a,b){return a&&b?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:a?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:!!b&&(this.faceTop||this.faceBottom||this.faceLeft||this.faceRight)},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"collides",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){return this.worldX}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){return this.worldX+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){return this.worldY}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){return this.worldY+this.height}}),c.Tilemap=function(a,b,d,e,f,g){this.game=a,this.key=b;var h=c.TilemapParser.parse(this.game,b,d,e,f,g);null!==h&&(this.width=h.width,this.height=h.height,this.tileWidth=h.tileWidth,this.tileHeight=h.tileHeight,this.orientation=h.orientation,this.format=h.format,this.version=h.version,this.properties=h.properties,this.widthInPixels=h.widthInPixels,this.heightInPixels=h.heightInPixels,this.layers=h.layers,this.tilesets=h.tilesets,this.imagecollections=h.imagecollections,this.tiles=h.tiles,this.objects=h.objects,this.collideIndexes=[],this.collision=h.collision,this.images=h.images,this.enableDebug=!1,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.NORTH=0,c.Tilemap.EAST=1,c.Tilemap.SOUTH=2,c.Tilemap.WEST=3,c.Tilemap.prototype={create:function(a,b,c,d,e,f){return void 0===f&&(f=this.game.world),this.width=b,this.height=c,this.setTileSize(d,e),this.layers.length=0,this.createBlankLayer(a,b,c,d,e,f)},setTileSize:function(a,b){this.tileWidth=a,this.tileHeight=b,this.widthInPixels=this.width*a,this.heightInPixels=this.height*b},addTilesetImage:function(a,b,d,e,f,g,h){if(void 0===a)return null;void 0===d&&(d=this.tileWidth),void 0===e&&(e=this.tileHeight),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=0),0===d&&(d=32),0===e&&(e=32);var i=null;if(void 0!==b&&null!==b||(b=a),b instanceof c.BitmapData)i=b.canvas;else{if(!this.game.cache.checkImageKey(b))return console.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "'+b+'"'),null;i=this.game.cache.getImage(b)}var j=this.getTilesetIndex(a);if(null===j&&this.format===c.Tilemap.TILED_JSON)return console.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "'+a+'"'),null;if(this.tilesets[j])return this.tilesets[j].setImage(i),this.tilesets[j];var k=new c.Tileset(a,h,d,e,f,g,{});k.setImage(i),this.tilesets.push(k);for(var l=this.tilesets.length-1,m=f,n=f,o=0,p=0,q=0,r=h;r1)for(l=0;lthis.layers.length)return void console.warn("Tilemap.createLayer: Invalid layer ID given: "+f);void 0===b||b<=0?b=Math.min(this.game.width,this.layers[f].widthInPixels):b>this.game.width&&(b=this.game.width),void 0===d||d<=0?d=Math.min(this.game.height,this.layers[f].heightInPixels):d>this.game.height&&(d=this.game.height),this.enableDebug&&(console.group("Tilemap.createLayer"),console.log("Name:",this.layers[f].name),console.log("Size:",b,"x",d),console.log("Tileset:",this.tilesets[0].name,"index:",f));var g=e.add(new c.TilemapLayer(this.game,this,f,b,d));return this.enableDebug&&console.groupEnd(),g},createBlankLayer:function(a,b,d,e,f,g){if(void 0===g&&(g=this.game.world),null!==this.getLayerIndex(a))return void console.warn("Tilemap.createBlankLayer: Layer with matching name already exists: "+a);for(var h,i={name:a,x:0,y:0,width:b,height:d,widthInPixels:b*e,heightInPixels:d*f,alpha:1,visible:!0,properties:{},indexes:[],callbacks:[],bodies:[],data:null},j=[],k=0;kthis.game.width&&(m=this.game.width),n>this.game.height&&(n=this.game.height);var j=new c.TilemapLayer(this.game,this,this.layers.length-1,m,n);return j.name=a,g.add(j)},getIndex:function(a,b){for(var c=0;cb)){for(var f=a;f<=b;f++)this.setCollisionByIndex(f,c,d,!1);e&&this.calculateFaces(d)}},setCollisionByExclusion:function(a,b,c,d){void 0===b&&(b=!0),void 0===d&&(d=!0),c=this.getLayer(c);for(var e=0,f=this.tiles.length;e-1&&this.collideIndexes.splice(e,1)}for(var f=0;f0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b-1},removeTile:function(a,b,d){if(d=this.getLayer(d),a>=0&&a=0&&b=0&&b=0&&d-1?this.layers[e].data[d][b].setCollision(!0,!0,!0,!0):this.layers[e].data[d][b].resetCollision(),this.layers[e].dirty=!0,this.calculateFaces(e),this.layers[e].data[d][b]}return null},putTileWorldXY:function(a,b,c,d,e,f){return f=this.getLayer(f),b=this.game.math.snapToFloor(b,d)/d,c=this.game.math.snapToFloor(c,e)/e,this.putTile(a,b,c,f)},searchTileIndex:function(a,b,c,d){void 0===b&&(b=0),void 0===c&&(c=!1),d=this.getLayer(d);var e=0;if(c){for(var f=this.layers[d].height-1;f>=0;f--)for(var g=this.layers[d].width-1;g>=0;g--)if(this.layers[d].data[f][g].index===a){if(e===b)return this.layers[d].data[f][g];e++}}else for(var f=0;f=0&&a=0&&bthis.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;f1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},c.Tilemap.prototype.constructor=c.Tilemap,Object.defineProperty(c.Tilemap.prototype,"layer",{get:function(){return this.layers[this.currentLayer]},set:function(a){a!==this.currentLayer&&this.setLayer(a)}}),c.TilemapLayer=function(a,b,d,e,f){e|=0,f|=0,c.Sprite.call(this,a,0,0),this.map=b,this.index=d,this.layer=b.layers[d],this.canvas=PIXI.CanvasPool.create(this,e,f),this.context=this.canvas.getContext("2d"),this.setTexture(new PIXI.Texture(new PIXI.BaseTexture(this.canvas))),this.type=c.TILEMAPLAYER,this.physicsType=c.TILEMAPLAYER,this.renderSettings={enableScrollDelta:!1,overdrawRatio:.2,copyCanvas:null},this.debug=!1,this.exists=!0,this.debugSettings={missingImageFill:"rgb(255,255,255)",debuggedTileOverfill:"rgba(0,255,0,0.4)",forceFullRedraw:!0,debugAlpha:.5,facingEdgeStroke:"rgba(0,255,0,1)",collidingTileOverfill:"rgba(0,255,0,0.2)"},this.scrollFactorX=1,this.scrollFactorY=1,this.dirty=!0,this.rayStepRate=4,this._wrap=!1,this._mc={scrollX:0,scrollY:0,renderWidth:0,renderHeight:0,tileWidth:b.tileWidth,tileHeight:b.tileHeight,cw:b.tileWidth,ch:b.tileHeight,tilesets:[]},this._scrollX=0,this._scrollY=0,this._results=[],a.device.canvasBitBltShift||(this.renderSettings.copyCanvas=c.TilemapLayer.ensureSharedCopyCanvas()),this.fixedToCamera=!0},c.TilemapLayer.prototype=Object.create(c.Sprite.prototype),c.TilemapLayer.prototype.constructor=c.TilemapLayer,c.TilemapLayer.prototype.preUpdateCore=c.Component.Core.preUpdate,c.TilemapLayer.sharedCopyCanvas=null,c.TilemapLayer.ensureSharedCopyCanvas=function(){return this.sharedCopyCanvas||(this.sharedCopyCanvas=PIXI.CanvasPool.create(this,2,2)),this.sharedCopyCanvas},c.TilemapLayer.prototype.preUpdate=function(){return this.preUpdateCore()},c.TilemapLayer.prototype.postUpdate=function(){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y},c.TilemapLayer.prototype._renderCanvas=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.TilemapLayer.prototype._renderWebGL=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.TilemapLayer.prototype.destroy=function(){PIXI.CanvasPool.remove(this),c.Component.Destroy.prototype.destroy.call(this)},c.TilemapLayer.prototype.resize=function(a,b){this.canvas.width=a,this.canvas.height=b,this.texture.frame.resize(a,b),this.texture.width=a,this.texture.height=b,this.texture.crop.width=a,this.texture.crop.height=b,this.texture.baseTexture.width=a,this.texture.baseTexture.height=b,this.texture.baseTexture.dirty(),this.texture.requiresUpdate=!0,this.texture._updateUvs(),this.dirty=!0},c.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels*this.scale.x,this.layer.heightInPixels*this.scale.y)},c.TilemapLayer.prototype._fixX=function(a){return 1===this.scrollFactorX||0===this.scrollFactorX&&0===this.position.x?a:0===this.scrollFactorX&&0!==this.position.x?a-this.position.x:this._scrollX+(a-this._scrollX/this.scrollFactorX)},c.TilemapLayer.prototype._unfixX=function(a){return 1===this.scrollFactorX?a:this._scrollX/this.scrollFactorX+(a-this._scrollX)},c.TilemapLayer.prototype._fixY=function(a){return 1===this.scrollFactorY||0===this.scrollFactorY&&0===this.position.y?a:0===this.scrollFactorY&&0!==this.position.y?a-this.position.y:this._scrollY+(a-this._scrollY/this.scrollFactorY)},c.TilemapLayer.prototype._unfixY=function(a){return 1===this.scrollFactorY?a:this._scrollY/this.scrollFactorY+(a-this._scrollY)},c.TilemapLayer.prototype.getTileX=function(a){return Math.floor(this._fixX(a)/this._mc.tileWidth)},c.TilemapLayer.prototype.getTileY=function(a){return Math.floor(this._fixY(a)/this._mc.tileHeight)},c.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},c.TilemapLayer.prototype.getRayCastTiles=function(a,b,c,d){b||(b=this.rayStepRate),void 0===c&&(c=!1),void 0===d&&(d=!1);var e=this.getTiles(a.x,a.y,a.width,a.height,c,d);if(0===e.length)return[];for(var f=a.coordinatesOnLine(b),g=[],h=0;h=0;q++,s--,o+=k){q>=i&&(q-=i);var x=this.layer.data[q];for(p=v,r=e-c,n=t;r>=0;p++,r--,n+=j){p>=h&&(p-=h);var y=x[p];if(y&&!(y.index<0)){var z=y.index,A=l[z];void 0===A&&(A=this.resolveTileset(z)),y.alpha===m||this.debug||(g.globalAlpha=y.alpha,m=y.alpha),A?y.rotation||y.flipped?(g.save(),g.translate(n+y.centerX,o+y.centerY),g.rotate(y.rotation),y.flipped&&g.scale(-1,1),A.draw(g,-y.centerX,-y.centerY,z),g.restore()):A.draw(g,n,o,z):this.debugSettings.missingImageFill&&(g.fillStyle=this.debugSettings.missingImageFill,g.fillRect(n,o,j,k)),y.debug&&this.debugSettings.debuggedTileOverfill&&(g.fillStyle=this.debugSettings.debuggedTileOverfill,g.fillRect(n,o,j,k))}}}},c.TilemapLayer.prototype.renderDeltaScroll=function(a,b){var c=this._mc.scrollX,d=this._mc.scrollY,e=this.canvas.width,f=this.canvas.height,g=this._mc.tileWidth,h=this._mc.tileHeight,i=0,j=-g,k=0,l=-h;if(a<0?(i=e+a,j=e-1):a>0&&(j=a),b<0?(k=f+b,l=f-1):b>0&&(l=b),this.shiftCanvas(this.context,a,b),i=Math.floor((i+c)/g),j=Math.floor((j+c)/g),k=Math.floor((k+d)/h),l=Math.floor((l+d)/h),i<=j){this.context.clearRect(i*g-c,0,(j-i+1)*g,f);var m=Math.floor((0+d)/h),n=Math.floor((f-1+d)/h);this.renderRegion(c,d,i,m,j,n)}if(k<=l){this.context.clearRect(0,k*h-d,e,(l-k+1)*h);var o=Math.floor((0+c)/g),p=Math.floor((e-1+c)/g);this.renderRegion(c,d,o,k,p,l)}},c.TilemapLayer.prototype.renderFull=function(){var a=this._mc.scrollX,b=this._mc.scrollY,c=this.canvas.width,d=this.canvas.height,e=this._mc.tileWidth,f=this._mc.tileHeight,g=Math.floor(a/e),h=Math.floor((c-1+a)/e),i=Math.floor(b/f),j=Math.floor((d-1+b)/f);this.context.clearRect(0,0,c,d),this.renderRegion(a,b,g,i,h,j)},c.TilemapLayer.prototype.render=function(){var a=!1;if(this.visible){(this.dirty||this.layer.dirty)&&(this.layer.dirty=!1,a=!0);var b=this.canvas.width,c=this.canvas.height,d=0|this._scrollX,e=0|this._scrollY,f=this._mc,g=f.scrollX-d,h=f.scrollY-e;if(a||0!==g||0!==h||f.renderWidth!==b||f.renderHeight!==c)return this.context.save(),f.scrollX=d,f.scrollY=e,f.renderWidth===b&&f.renderHeight===c||(f.renderWidth=b,f.renderHeight=c),this.debug&&(this.context.globalAlpha=this.debugSettings.debugAlpha,this.debugSettings.forceFullRedraw&&(a=!0)),!a&&this.renderSettings.enableScrollDelta&&Math.abs(g)+Math.abs(h)=0;d++,f--,b+=o){d>=m&&(d-=m);var x=this.layer.data[d];for(c=v,e=q-p,a=t;e>=0;c++,e--,a+=n){c>=l&&(c-=l);var y=x[c];!y||y.index<0||!y.collides||(this.debugSettings.collidingTileOverfill&&(i.fillStyle=this.debugSettings.collidingTileOverfill,i.fillRect(a,b,this._mc.cw,this._mc.ch)),this.debugSettings.facingEdgeStroke&&(i.beginPath(),y.faceTop&&(i.moveTo(a,b),i.lineTo(a+this._mc.cw,b)),y.faceBottom&&(i.moveTo(a,b+this._mc.ch),i.lineTo(a+this._mc.cw,b+this._mc.ch)),y.faceLeft&&(i.moveTo(a,b),i.lineTo(a,b+this._mc.ch)),y.faceRight&&(i.moveTo(a+this._mc.cw,b),i.lineTo(a+this._mc.cw,b+this._mc.ch)),i.closePath(),i.stroke()))}}},Object.defineProperty(c.TilemapLayer.prototype,"wrap",{get:function(){return this._wrap},set:function(a){this._wrap=a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollX",{get:function(){return this._scrollX},set:function(a){this._scrollX=a}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollY",{get:function(){return this._scrollY},set:function(a){this._scrollY=a}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._mc.cw},set:function(a){this._mc.cw=0|a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._mc.ch},set:function(a){this._mc.ch=0|a,this.dirty=!0}}),c.TilemapParser={INSERT_NULL:!1,parse:function(a,b,d,e,f,g){if(void 0===d&&(d=32),void 0===e&&(e=32),void 0===f&&(f=10),void 0===g&&(g=10),void 0===b)return this.getEmptyData();if(null===b)return this.getEmptyData(d,e,f,g);var h=a.cache.getTilemapData(b);if(h){if(h.format===c.Tilemap.CSV)return this.parseCSV(b,h.data,d,e);if(!h.format||h.format===c.Tilemap.TILED_JSON)return this.parseTiledJSON(h.data)}else console.warn("Phaser.TilemapParser.parse - No map data found for key "+b)},parseCSV:function(a,b,d,e){var f=this.getEmptyData();b=b.trim();for(var g=[],h=b.split("\n"),i=h.length,j=0,k=0;k>>0;g.data=j,delete g.encoding}else if(g.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+g.name+"'");continue}var l={name:g.name,x:g.x,y:g.y,width:g.width,height:g.height,widthInPixels:g.width*a.tilewidth,heightInPixels:g.height*a.tileheight,alpha:g.opacity,visible:g.visible,properties:{},indexes:[],callbacks:[],bodies:[]};g.properties&&(l.properties=g.properties);for(var m,n,o,p,q=0,r=[],s=[],t=0,i=g.data.length;t536870912)switch(p>2147483648&&(p-=2147483648,o+=4),p>1073741824&&(p-=1073741824,o+=2),p>536870912&&(p-=536870912,o+=1),o){case 5:m=Math.PI/2;break;case 6:m=Math.PI;break;case 3:m=3*Math.PI/2;break;case 4:m=0,n=!0;break;case 7:m=Math.PI/2,n=!0;break;case 2:m=Math.PI,n=!0;break;case 1:m=3*Math.PI/2,n=!0}if(p>0){var u=new c.Tile(l,p,q,s.length,a.tilewidth,a.tileheight);u.rotation=m,u.flipped=n,0!==o&&(u.flippedVal=o),r.push(u)}else c.TilemapParser.INSERT_NULL?r.push(null):r.push(new c.Tile(l,-1,q,s.length,a.tilewidth,a.tileheight));q++,q===g.width&&(s.push(r),q=0,r=[])}l.data=s,e.push(l)}d.layers=e;for(var v=[],f=0;f=0&&e+1=this.firstgid&&a=this._timer)if(this._timer=this.game.time.time+this.frequency*this.game.time.slowMotion,0!==this._flowTotal)if(this._flowQuantity>0){for(var a=0;a=this._flowTotal)){this.on=!1;break}}else this.emitParticle()&&(this._counter++,-1!==this._flowTotal&&this._counter>=this._flowTotal&&(this.on=!1));else this.emitParticle()&&(this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1));for(var a=this.children.length;a--;)this.children[a].exists&&this.children[a].update()},c.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,c,d,e){void 0===b&&(b=0),void 0===c&&(c=this.maxParticles),void 0===d&&(d=!1),void 0===e&&(e=!1);var f,g=0,h=a,i=b;for(this._frames=b,c>this.maxParticles&&(this.maxParticles=c);gthis.maxParticles&&(c=this.maxParticles),this._counter=0,this._flowQuantity=c,this._flowTotal=d,e?(this.start(!0,a,b,c),this._counter+=c,this.on=!0,this._timer=this.game.time.time+b*this.game.time.slowMotion):this.start(!1,a,b,c),this},c.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d,e){if(void 0===a&&(a=!0),void 0===b&&(b=0),void 0!==c&&null!==c||(c=250),void 0===d&&(d=0),void 0===e&&(e=!1),d>this.maxParticles&&(d=this.maxParticles),this.revive(),this.visible=!0,this.lifespan=b,this.frequency=c,a||e)for(var f=0;f1&&(g=f.between(this.left,this.right)),null!==b?h=b:this.height>1&&(h=f.between(this.top,this.bottom)),e.reset(g,h),e.angle=0,e.lifespan=this.lifespan,this.particleBringToTop?this.bringToTop(e):this.particleSendToBack&&this.sendToBack(e),this.autoScale?e.setScaleData(this.scaleData):1!==this.minParticleScale||1!==this.maxParticleScale?e.scale.set(f.realInRange(this.minParticleScale,this.maxParticleScale)):this._minParticleScale.x===this._maxParticleScale.x&&this._minParticleScale.y===this._maxParticleScale.y||e.scale.set(f.realInRange(this._minParticleScale.x,this._maxParticleScale.x),f.realInRange(this._minParticleScale.y,this._maxParticleScale.y)),void 0===d&&(Array.isArray(this._frames)?e.frame=this.game.rnd.pick(this._frames):e.frame=this._frames),this.autoAlpha?e.setAlphaData(this.alphaData):e.alpha=f.realInRange(this.minParticleAlpha,this.maxParticleAlpha),e.blendMode=this.blendMode;var i=e.body;return i.updateBounds(),i.bounce.copyFrom(this.bounce),i.drag.copyFrom(this.particleDrag),i.velocity.x=f.between(this.minParticleSpeed.x,this.maxParticleSpeed.x),i.velocity.y=f.between(this.minParticleSpeed.y,this.maxParticleSpeed.y),i.angularVelocity=f.between(this.minRotation,this.maxRotation),i.gravity.y=this.gravity,i.angularDrag=this.angularDrag,e.onEmit(),!0},c.Particles.Arcade.Emitter.prototype.destroy=function(){this.game.particles.remove(this),c.Group.prototype.destroy.call(this,!0,!1)},c.Particles.Arcade.Emitter.prototype.setSize=function(a,b){return this.area.width=a,this.area.height=b,this},c.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b,this},c.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b,this},c.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){return a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b,this},c.Particles.Arcade.Emitter.prototype.setAlpha=function(a,b,d,e,f){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=0),void 0===e&&(e=c.Easing.Linear.None),void 0===f&&(f=!1),this.minParticleAlpha=a,this.maxParticleAlpha=b,this.autoAlpha=!1,d>0&&a!==b){var g={v:a},h=this.game.make.tween(g).to({v:b},d,e);h.yoyo(f),this.alphaData=h.generateData(60),this.alphaData.reverse(),this.autoAlpha=!0}return this},c.Particles.Arcade.Emitter.prototype.setScale=function(a,b,d,e,f,g,h){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=1),void 0===e&&(e=1),void 0===f&&(f=0),void 0===g&&(g=c.Easing.Linear.None),void 0===h&&(h=!1), +this.minParticleScale=1,this.maxParticleScale=1,this._minParticleScale.set(a,d),this._maxParticleScale.set(b,e),this.autoScale=!1,f>0&&(a!==b||d!==e)){var i={x:a,y:d},j=this.game.make.tween(i).to({x:b,y:e},f,g);j.yoyo(h),this.scaleData=j.generateData(60),this.scaleData.reverse(),this.autoScale=!0}return this},c.Particles.Arcade.Emitter.prototype.at=function(a){return a.center?(this.emitX=a.center.x,this.emitY=a.center.y):(this.emitX=a.world.x+a.anchor.x*a.width,this.emitY=a.world.y+a.anchor.y*a.height),this},Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"width",{get:function(){return this.area.width},set:function(a){this.area.width=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"height",{get:function(){return this.area.height},set:function(a){this.area.height=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.area.height/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.area.height/2)}}),c.Weapon=function(a,b){c.Plugin.call(this,a,b),this.bullets=null,this.autoExpandBulletsGroup=!1,this.autofire=!1,this.shots=0,this.fireLimit=0,this.fireRate=100,this.fireRateVariance=0,this.fireFrom=new c.Rectangle(0,0,1,1),this.fireAngle=c.ANGLE_UP,this.bulletInheritSpriteSpeed=!1,this.bulletAnimation="",this.bulletFrameRandom=!1,this.bulletFrameCycle=!1,this.bulletWorldWrap=!1,this.bulletWorldWrapPadding=0,this.bulletAngleOffset=0,this.bulletAngleVariance=0,this.bulletSpeed=200,this.bulletSpeedVariance=0,this.bulletLifespan=0,this.bulletKillDistance=0,this.bulletGravity=new c.Point(0,0),this.bulletRotateToVelocity=!1,this.bulletKey="",this.bulletFrame="",this._bulletClass=c.Bullet,this._bulletCollideWorldBounds=!1,this._bulletKillType=c.Weapon.KILL_WORLD_BOUNDS,this._data={customBody:!1,width:0,height:0,offsetX:0,offsetY:0},this.bounds=new c.Rectangle,this.bulletBounds=a.world.bounds,this.bulletFrames=[],this.bulletFrameIndex=0,this.anims={},this.onFire=new c.Signal,this.onKill=new c.Signal,this.onFireLimit=new c.Signal,this.trackedSprite=null,this.trackedPointer=null,this.trackRotation=!1,this.trackOffset=new c.Point,this._nextFire=0,this._rotatedPoint=new c.Point},c.Weapon.prototype=Object.create(c.Plugin.prototype),c.Weapon.prototype.constructor=c.Weapon,c.Weapon.KILL_NEVER=0,c.Weapon.KILL_LIFESPAN=1,c.Weapon.KILL_DISTANCE=2,c.Weapon.KILL_WEAPON_BOUNDS=3,c.Weapon.KILL_CAMERA_BOUNDS=4,c.Weapon.KILL_WORLD_BOUNDS=5,c.Weapon.KILL_STATIC_BOUNDS=6,c.Weapon.prototype.createBullets=function(a,b,d,e){return void 0===a&&(a=1),void 0===e&&(e=this.game.world),this.bullets||(this.bullets=this.game.add.physicsGroup(c.Physics.ARCADE,e),this.bullets.classType=this._bulletClass),0!==a&&(-1===a&&(this.autoExpandBulletsGroup=!0,a=1),this.bullets.createMultiple(a,b,d),this.bullets.setAll("data.bulletManager",this),this.bulletKey=b,this.bulletFrame=d),this},c.Weapon.prototype.forEach=function(a,b){return this.bullets.forEachExists(a,b,arguments),this},c.Weapon.prototype.pauseAll=function(){return this.bullets.setAll("body.enable",!1),this},c.Weapon.prototype.resumeAll=function(){return this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.killAll=function(){return this.bullets.callAllExists("kill",!0),this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.resetShots=function(a){return this.shots=0,void 0!==a&&(this.fireLimit=a),this},c.Weapon.prototype.destroy=function(){this.parent.remove(this,!1),this.bullets.destroy(),this.game=null,this.parent=null,this.active=!1,this.visible=!1},c.Weapon.prototype.update=function(){this._bulletKillType===c.Weapon.KILL_WEAPON_BOUNDS&&(this.trackedSprite?(this.trackedSprite.updateTransform(),this.bounds.centerOn(this.trackedSprite.worldPosition.x,this.trackedSprite.worldPosition.y)):this.trackedPointer&&this.bounds.centerOn(this.trackedPointer.worldX,this.trackedPointer.worldY)),this.autofire&&this.fire()},c.Weapon.prototype.trackSprite=function(a,b,c,d){return void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=!1),this.trackedPointer=null,this.trackedSprite=a,this.trackRotation=d,this.trackOffset.set(b,c),this},c.Weapon.prototype.trackPointer=function(a,b,c){return void 0===a&&(a=this.game.input.activePointer),void 0===b&&(b=0),void 0===c&&(c=0),this.trackedPointer=a,this.trackedSprite=null,this.trackRotation=!1,this.trackOffset.set(b,c),this},c.Weapon.prototype.fire=function(a,b,d){if(this.game.time.now0&&this.shots===this.fireLimit)return!1;var e=this.bulletSpeed;0!==this.bulletSpeedVariance&&(e+=c.Math.between(-this.bulletSpeedVariance,this.bulletSpeedVariance)),a?this.fireFrom.width>1?this.fireFrom.centerOn(a.x,a.y):(this.fireFrom.x=a.x,this.fireFrom.y=a.y):this.trackedSprite?(this.trackRotation?(this._rotatedPoint.set(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y),this._rotatedPoint.rotate(this.trackedSprite.world.x,this.trackedSprite.world.y,this.trackedSprite.rotation),this.fireFrom.width>1?this.fireFrom.centerOn(this._rotatedPoint.x,this._rotatedPoint.y):(this.fireFrom.x=this._rotatedPoint.x,this.fireFrom.y=this._rotatedPoint.y)):this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedSprite.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedSprite.world.y+this.trackOffset.y),this.bulletInheritSpriteSpeed&&(e+=this.trackedSprite.body.speed)):this.trackedPointer&&(this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedPointer.world.x+this.trackOffset.x,this.trackedPointer.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedPointer.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedPointer.world.y+this.trackOffset.y));var f=this.fireFrom.width>1?this.fireFrom.randomX:this.fireFrom.x,g=this.fireFrom.height>1?this.fireFrom.randomY:this.fireFrom.y,h=this.trackRotation?this.trackedSprite.angle:this.fireAngle;void 0!==b&&void 0!==d&&(h=this.game.math.radToDeg(Math.atan2(d-g,b-f))),0!==this.bulletAngleVariance&&(h+=c.Math.between(-this.bulletAngleVariance,this.bulletAngleVariance));var i=0,j=0;0===h||180===h?i=Math.cos(this.game.math.degToRad(h))*e:90===h||270===h?j=Math.sin(this.game.math.degToRad(h))*e:(i=Math.cos(this.game.math.degToRad(h))*e,j=Math.sin(this.game.math.degToRad(h))*e);var k=null;if(this.autoExpandBulletsGroup?(k=this.bullets.getFirstExists(!1,!0,f,g,this.bulletKey,this.bulletFrame),k.data.bulletManager=this):k=this.bullets.getFirstExists(!1),k){if(k.reset(f,g),k.data.fromX=f,k.data.fromY=g,k.data.killType=this.bulletKillType,k.data.killDistance=this.bulletKillDistance,k.data.rotateToVelocity=this.bulletRotateToVelocity,this.bulletKillType===c.Weapon.KILL_LIFESPAN&&(k.lifespan=this.bulletLifespan),k.angle=h+this.bulletAngleOffset,""!==this.bulletAnimation){if(null===k.animations.getAnimation(this.bulletAnimation)){var l=this.anims[this.bulletAnimation];k.animations.add(l.name,l.frames,l.frameRate,l.loop,l.useNumericIndex)}k.animations.play(this.bulletAnimation)}else this.bulletFrameCycle?(k.frame=this.bulletFrames[this.bulletFrameIndex],++this.bulletFrameIndex>=this.bulletFrames.length&&(this.bulletFrameIndex=0)):this.bulletFrameRandom&&(k.frame=this.bulletFrames[Math.floor(Math.random()*this.bulletFrames.length)]);if(k.data.bodyDirty&&(this._data.customBody&&k.body.setSize(this._data.width,this._data.height,this._data.offsetX,this._data.offsetY),k.body.collideWorldBounds=this.bulletCollideWorldBounds,k.data.bodyDirty=!1),k.body.velocity.set(i,j),k.body.gravity.set(this.bulletGravity.x,this.bulletGravity.y),0!==this.bulletSpeedVariance){var m=this.fireRate;m+=c.Math.between(-this.fireRateVariance,this.fireRateVariance),m<0&&(m=0),this._nextFire=this.game.time.now+m}else this._nextFire=this.game.time.now+this.fireRate;this.shots++,this.onFire.dispatch(k,this,e),this.fireLimit>0&&this.shots===this.fireLimit&&this.onFireLimit.dispatch(this,this.fireLimit)}return k},c.Weapon.prototype.fireAtPointer=function(a){return void 0===a&&(a=this.game.input.activePointer),this.fire(null,a.worldX,a.worldY)},c.Weapon.prototype.fireAtSprite=function(a){return this.fire(null,a.world.x,a.world.y)},c.Weapon.prototype.fireAtXY=function(a,b){return this.fire(null,a,b)},c.Weapon.prototype.setBulletBodyOffset=function(a,b,c,d){return void 0===c&&(c=0),void 0===d&&(d=0),this._data.customBody=!0,this._data.width=a,this._data.height=b,this._data.offsetX=c,this._data.offsetY=d,this.bullets.callAll("body.setSize","body",a,b,c,d),this.bullets.setAll("data.bodyDirty",!1),this},c.Weapon.prototype.setBulletFrames=function(a,b,d,e){return void 0===d&&(d=!0),void 0===e&&(e=!1),this.bulletFrames=c.ArrayUtils.numberArray(a,b),this.bulletFrameIndex=0,this.bulletFrameCycle=d,this.bulletFrameRandom=e,this},c.Weapon.prototype.addBulletAnimation=function(a,b,c,d,e){return this.anims[a]={name:a,frames:b,frameRate:c,loop:d,useNumericIndex:e},this.bullets.callAll("animations.add","animations",a,b,c,d,e),this.bulletAnimation=a,this},c.Weapon.prototype.debug=function(a,b,c){void 0===a&&(a=16),void 0===b&&(b=32),void 0===c&&(c=!1),this.game.debug.text("Weapon Plugin",a,b),this.game.debug.text("Bullets Alive: "+this.bullets.total+" - Total: "+this.bullets.length,a,b+24),c&&this.bullets.forEachExists(this.game.debug.body,this.game.debug,"rgba(255, 0, 255, 0.8)")},Object.defineProperty(c.Weapon.prototype,"bulletClass",{get:function(){return this._bulletClass},set:function(a){this._bulletClass=a,this.bullets.classType=this._bulletClass}}),Object.defineProperty(c.Weapon.prototype,"bulletKillType",{get:function(){return this._bulletKillType},set:function(a){switch(a){case c.Weapon.KILL_STATIC_BOUNDS:case c.Weapon.KILL_WEAPON_BOUNDS:this.bulletBounds=this.bounds;break;case c.Weapon.KILL_CAMERA_BOUNDS:this.bulletBounds=this.game.camera.view;break;case c.Weapon.KILL_WORLD_BOUNDS:this.bulletBounds=this.game.world.bounds}this._bulletKillType=a}}),Object.defineProperty(c.Weapon.prototype,"bulletCollideWorldBounds",{get:function(){return this._bulletCollideWorldBounds},set:function(a){this._bulletCollideWorldBounds=a,this.bullets.setAll("body.collideWorldBounds",a),this.bullets.setAll("data.bodyDirty",!1)}}),Object.defineProperty(c.Weapon.prototype,"x",{get:function(){return this.fireFrom.x},set:function(a){this.fireFrom.x=a}}),Object.defineProperty(c.Weapon.prototype,"y",{get:function(){return this.fireFrom.y},set:function(a){this.fireFrom.y=a}}),c.Bullet=function(a,b,d,e,f){c.Sprite.call(this,a,b,d,e,f),this.anchor.set(.5),this.data={bulletManager:null,fromX:0,fromY:0,bodyDirty:!0,rotateToVelocity:!1,killType:0,killDistance:0}},c.Bullet.prototype=Object.create(c.Sprite.prototype),c.Bullet.prototype.constructor=c.Bullet,c.Bullet.prototype.kill=function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.data.bulletManager.onKill.dispatch(this),this},c.Bullet.prototype.update=function(){this.exists&&(this.data.killType>c.Weapon.KILL_LIFESPAN&&(this.data.killType===c.Weapon.KILL_DISTANCE?this.game.physics.arcade.distanceToXY(this,this.data.fromX,this.data.fromY,!0)>this.data.killDistance&&this.kill():this.data.bulletManager.bulletBounds.intersects(this)||this.kill()),this.data.rotateToVelocity&&(this.rotation=Math.atan2(this.body.velocity.y,this.body.velocity.x)),this.data.bulletManager.bulletWorldWrap&&this.game.world.wrap(this,this.data.bulletManager.bulletWorldWrapPadding))},c.Video=function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=null),this.game=a,this.key=b,this.width=0,this.height=0,this.type=c.VIDEO,this.disableTextureUpload=!1,this.touchLocked=!1,this.onPlay=new c.Signal,this.onChangeSource=new c.Signal,this.onComplete=new c.Signal,this.onAccess=new c.Signal,this.onError=new c.Signal,this.onTimeout=new c.Signal,this.timeout=15e3,this._timeOutID=null,this.video=null,this.videoStream=null,this.isStreaming=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._codeMuted=!1,this._muted=!1,this._codePaused=!1,this._paused=!1,this._pending=!1,this._autoplay=!1,this._endCallback=null,this._playCallback=null,b&&this.game.cache.checkVideoKey(b)){var e=this.game.cache.getVideo(b);e.isBlob?this.createVideoFromBlob(e.data):this.video=e.data,this.width=this.video.videoWidth,this.height=this.video.videoHeight}else d&&this.createVideoFromURL(d,!1);this.video&&!d?(this.baseTexture=new PIXI.BaseTexture(this.video),this.baseTexture.forceLoaded(this.width,this.height)):(this.baseTexture=new PIXI.BaseTexture(c.Cache.DEFAULT.baseTexture.source),this.baseTexture.forceLoaded(this.width,this.height)),this.texture=new PIXI.Texture(this.baseTexture),this.textureFrame=new c.Frame(0,0,0,this.width,this.height,"video"),this.texture.setFrame(this.textureFrame),this.texture.valid=!1,null!==b&&this.video&&(this.texture.valid=this.video.canplay),this.snapshot=null,c.BitmapData&&(this.snapshot=new c.BitmapData(this.game,"",this.width,this.height)),!this.game.device.cocoonJS&&(this.game.device.iOS||this.game.device.chrome)||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock?this.setTouchLock():e&&(e.locked=!1)},c.Video.prototype={connectToMediaStream:function(a,b){return a&&b&&(this.video=a,this.videoStream=b,this.isStreaming=!0,this.baseTexture.source=this.video,this.updateTexture(null,this.video.videoWidth,this.video.videoHeight),this.onAccess.dispatch(this)),this},startMediaStream:function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=null),void 0===c&&(c=null),!this.game.device.getUserMedia)return this.onError.dispatch(this,"No getUserMedia"),!1;null!==this.videoStream&&(this.videoStream.active?this.videoStream.active=!1:this.videoStream.stop()),this.removeVideoElement(),this.video=document.createElement("video"),this.video.setAttribute("autoplay","autoplay"),null!==b&&(this.video.width=b),null!==c&&(this.video.height=c),this._timeOutID=window.setTimeout(this.getUserMediaTimeout.bind(this),this.timeout);try{navigator.getUserMedia({audio:a,video:!0},this.getUserMediaSuccess.bind(this),this.getUserMediaError.bind(this))}catch(a){this.getUserMediaError(a)}return this},getUserMediaTimeout:function(){clearTimeout(this._timeOutID),this.onTimeout.dispatch(this)},getUserMediaError:function(a){clearTimeout(this._timeOutID),this.onError.dispatch(this,a)},getUserMediaSuccess:function(a){clearTimeout(this._timeOutID),this.videoStream=a,void 0!==this.video.mozSrcObject?this.video.mozSrcObject=a:this.video.src=window.URL&&window.URL.createObjectURL(a)||a;var b=this;this.video.onloadeddata=function(){function a(){if(c>0)if(b.video.videoWidth>0){var d=b.video.videoWidth,e=b.video.videoHeight;isNaN(b.video.videoHeight)&&(e=d/(4/3)),b.video.play(),b.isStreaming=!0,b.baseTexture.source=b.video,b.updateTexture(null,d,e),b.onAccess.dispatch(b)}else window.setTimeout(a,500);else console.warn("Unable to connect to video stream. Webcam error?");c--}var c=10;a()}},createVideoFromBlob:function(a){var b=this;return this.video=document.createElement("video"),this.video.controls=!1,this.video.setAttribute("autoplay","autoplay"),this.video.addEventListener("loadeddata",function(a){b.updateTexture(a)},!0),this.video.src=window.URL.createObjectURL(a),this.video.canplay=!0,this},createVideoFromURL:function(a,b){return void 0===b&&(b=!1),this.texture&&(this.texture.valid=!1),this.video=document.createElement("video"),this.video.controls=!1,b&&this.video.setAttribute("autoplay","autoplay"),this.video.src=a,this.video.canplay=!0,this.video.load(),this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval),this.key=a,this},updateTexture:function(a,b,c){var d=!1;void 0!==b&&null!==b||(b=this.video.videoWidth,d=!0),void 0!==c&&null!==c||(c=this.video.videoHeight),this.width=b,this.height=c,this.baseTexture.source!==this.video&&(this.baseTexture.source=this.video),this.baseTexture.forceLoaded(b,c),this.texture.frame.resize(b,c),this.texture.width=b,this.texture.height=c,this.texture.valid=!0,this.snapshot&&this.snapshot.resize(b,c),d&&null!==this.key&&(this.onChangeSource.dispatch(this,b,c),this._autoplay&&(this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate)))},complete:function(){this.onComplete.dispatch(this)},play:function(a,b){return void 0===a&&(a=!1),void 0===b&&(b=1),this.game.sound.onMute&&(this.game.sound.onMute.add(this.setMute,this),this.game.sound.onUnMute.add(this.unsetMute,this),this.game.sound.mute&&this.setMute()),this.game.onPause.add(this.setPause,this),this.game.onResume.add(this.setResume,this),this._endCallback=this.complete.bind(this),this.video.addEventListener("ended",this._endCallback,!0),this.video.addEventListener("webkitendfullscreen",this._endCallback,!0),this.video.loop=a?"loop":"",this.video.playbackRate=b,this.touchLocked?this._pending=!0:(this._pending=!1,null!==this.key&&(4!==this.video.readyState?(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval)):(this._playCallback=this.playHandler.bind(this),this.video.addEventListener("playing",this._playCallback,!0))),this.video.play(),this.onPlay.dispatch(this,a,b)),this},playHandler:function(){this.video.removeEventListener("playing",this._playCallback,!0),this.updateTexture()},stop:function(){return this.game.sound.onMute&&(this.game.sound.onMute.remove(this.setMute,this),this.game.sound.onUnMute.remove(this.unsetMute,this)),this.game.onPause.remove(this.setPause,this),this.game.onResume.remove(this.setResume,this),this.isStreaming?(this.video.mozSrcObject?(this.video.mozSrcObject.stop(),this.video.src=null):(this.video.src="",this.videoStream.active?this.videoStream.active=!1:this.videoStream.getTracks?this.videoStream.getTracks().forEach(function(a){a.stop()}):this.videoStream.stop()),this.videoStream=null,this.isStreaming=!1):(this.video.removeEventListener("ended",this._endCallback,!0),this.video.removeEventListener("webkitendfullscreen",this._endCallback,!0),this.video.removeEventListener("playing",this._playCallback,!0),this.touchLocked?this._pending=!1:this.video.pause()),this},add:function(a){if(Array.isArray(a))for(var b=0;b0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):console.warn("Phaser.Video: Unable to start downloading video in time",this.isStreaming))},setTouchLock:function(){this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0},unlock:function(){if(this.touchLocked=!1,this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate),this.key){var a=this.game.cache.getVideo(this.key);a&&!a.isBlob&&(a.locked=!1)}return!0},grab:function(a,b,c){return void 0===a&&(a=!1),void 0===b&&(b=1),void 0===c&&(c=null),null===this.snapshot?void console.warn("Video.grab cannot run because Phaser.BitmapData is unavailable"):(a&&this.snapshot.cls(),this.snapshot.copy(this.video,0,0,this.width,this.height,0,0,this.width,this.height,0,0,0,1,1,b,c),this.snapshot)},removeVideoElement:function(){if(this.video){for(this.video.parentNode&&this.video.parentNode.removeChild(this.video);this.video.hasChildNodes();)this.video.removeChild(this.video.firstChild);this.video.removeAttribute("autoplay"),this.video.removeAttribute("src"),this.video=null}},destroy:function(){this.stop(),this.removeVideoElement(),this.touchLocked&&this.game.input.touch.removeTouchLockCallback(this.unlock,this),this._retryID&&window.clearTimeout(this._retryID)}},Object.defineProperty(c.Video.prototype,"currentTime",{get:function(){return this.video?this.video.currentTime:0},set:function(a){this.video.currentTime=a}}),Object.defineProperty(c.Video.prototype,"duration",{get:function(){return this.video?this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"progress",{get:function(){return this.video?this.video.currentTime/this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"mute",{get:function(){return this._muted},set:function(a){if(a=a||null){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}}),Object.defineProperty(c.Video.prototype,"paused",{get:function(){return this._paused},set:function(a){if(a=a||null,!this.touchLocked)if(a){if(this._paused)return;this._codePaused=!0,this.setPause()}else{if(!this._paused)return;this._codePaused=!1,this.setResume()}}}),Object.defineProperty(c.Video.prototype,"volume",{get:function(){return this.video?this.video.volume:1},set:function(a){a<0?a=0:a>1&&(a=1),this.video&&(this.video.volume=a)}}),Object.defineProperty(c.Video.prototype,"playbackRate",{get:function(){return this.video?this.video.playbackRate:1},set:function(a){this.video&&(this.video.playbackRate=a)}}),Object.defineProperty(c.Video.prototype,"loop",{get:function(){return!!this.video&&this.video.loop},set:function(a){a&&this.video?this.video.loop="loop":this.video&&(this.video.loop="")}}),Object.defineProperty(c.Video.prototype,"playing",{get:function(){return!(this.video.paused&&this.video.ended)}}),c.Video.prototype.constructor=c.Video,void 0===PIXI.blendModes&&(PIXI.blendModes=c.blendModes),void 0===PIXI.scaleModes&&(PIXI.scaleModes=c.scaleModes),void 0===PIXI.Texture.emptyTexture&&(PIXI.Texture.emptyTexture=new PIXI.Texture(new PIXI.BaseTexture)),void 0===PIXI.DisplayObject._tempMatrix&&(PIXI.DisplayObject._tempMatrix=new PIXI.Matrix),void 0===PIXI.RenderTexture.tempMatrix&&(PIXI.RenderTexture.tempMatrix=new PIXI.Matrix),PIXI.Graphics&&void 0===PIXI.Graphics.POLY&&(PIXI.Graphics.POLY=c.POLYGON,PIXI.Graphics.RECT=c.RECTANGLE,PIXI.Graphics.CIRC=c.CIRCLE,PIXI.Graphics.ELIP=c.ELLIPSE,PIXI.Graphics.RREC=c.ROUNDEDRECTANGLE),PIXI.TextureSilentFail=!0,"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=c),exports.Phaser=c):"undefined"!=typeof define&&define.amd?define("Phaser",function(){return b.Phaser=c}()):b.Phaser=c,c}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Button",["Phaser"],function(){"use strict";return function(c){function d(b,c,e,f,g,h,i){this.destroy=a(this.destroy,this),this.disable=a(this.disable,this),this.enable=a(this.enable,this),this.setUp=a(this.setUp,this),this.setDown=a(this.setDown,this),this.soundId=i,_.isArray(g)&&(this.downFrameName=g[1],g=this.upFrameName=g[0]),null!=g?d.__super__.constructor.call(this,b,c,e,f,"_default0000"):d.__super__.constructor.call(this,b,c,e,f),g&&(this.sprite=b.make.sprite(0,0,f,g),this.sprite.anchor.set(.5),this.addChild(this.sprite)),this.id=Math.random(),this.customEvents||(this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(b.TouchManager.register(this,"touchstart",this.setDown),b.TouchManager.register(this,"touchend",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.vibrate&&navigator.vibrate&&navigator.vibrate(50),a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))):(b.TouchManager.register(this,"mousedown",this.setDown),b.TouchManager.register(this,"mouseup",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))))}return b(d,c),d.prototype.setDown=function(){if(this.isDown=!0,this.disabled||null==this.downFrameName||null==this.sprite||(this.sprite.frameName=this.downFrameName),!this.disabled&&this.label)return this.label.scale.set(.95)},d.prototype.setUp=function(){if(this.isDown=!1,this.disabled||null==this.upFrameName||null==this.sprite||(this.sprite.frameName=this.upFrameName),!this.disabled&&this.label)return this.label.scale.set(1)},d.prototype.enable=function(){return this.disabled=!1},d.prototype.disable=function(){return this.disabled=!0},d.prototype.destroy=function(){return this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(this.game.TouchManager.unregister(this,"touchstart"),this.game.TouchManager.unregister(this,"touchend")):(this.game.TouchManager.unregister(this,"mousedown"),this.game.TouchManager.unregister(this,"mouseup")),d.__super__.destroy.apply(this,arguments)},d}(Phaser.Sprite)})}.call(this),function(){var a=function(a,c){function d(){this.constructor=a}for(var e in c)b.call(c,e)&&(a[e]=c[e]);return d.prototype=c.prototype,a.prototype=new d,a.__super__=c.prototype,a},b={}.hasOwnProperty;define("States/Common/GoldButton",["./Button","Phaser"],function(b){"use strict";return function(b){function c(a,b,d,e,f,g){var h;null==g&&(g=28),c.__super__.constructor.call(this,a,b,d,"MenuAssets","",f,"pusher"),this.anchor.set(.5),h=this.game.lang.font,this.label=a.make.bitmapText(0,0,h,e+" ",g),this.label.anchor.set(.5),this.addChild(this.label)}return a(c,b),c}(b)})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Navies",["./Button","Phaser"],function(c){"use strict";return function(c){function d(b,c,e,f){var g,h,i;for(null==f&&(f=3),this.update=a(this.update,this),d.__super__.constructor.call(this,b,c,e,"MenuAssets","_default0000"),this.anchor.set(.5),g=0,i=f;0<=i?g<=i:g>=i;0<=i?++g:--g)h=new Phaser.Sprite(b,0,0,"MenuAssets","Navy0000"),h.anchor.set(.5),h.scale.set(.3+.7*Math.random()),h.offsetCart={x:200*(Math.random()-.5),y:50*(Math.random()-.5)},h.offset={r:400*Math.random(),theta:Math.random()},h.rprime=0,h.speed={r:7e-4+5e-4*Math.random(),theta:3e-4+5e-4*(Math.random()-.5)},h.pos={r:Math.random(),theta:Math.random()*Math.PI*2},h.update=function(){return this.rprime+=this.speed.r,this.pos.r=this.offset.r*Math.sin(this.rprime),this.pos.theta+=this.speed.theta,this.x=this.offsetCart.x+this.pos.r*Math.cos(this.pos.theta),this.y=this.offsetCart.y+this.pos.r*Math.sin(this.pos.theta)},this.addChild(h)}return b(d,c),d.prototype.update=function(){var a,b,c,d,e;for(d=this.children,e=[],b=0,c=d.length;b0&&g[g.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!g||c[1]>g[0]&&c[1]\n
\n \n
\n
\n
\n \n
\n \n
\n
\n
'+b+"
\n "}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=c(function(a,c){!function(c,d){a.exports=function(){function a(a){var b=typeof a;return null!==a&&("object"===b||"function"===b)}function c(a){return"function"==typeof a}function d(a){N=a}function e(a){O=a}function f(){return void 0!==M?function(){M(i)}:g()}function g(){var a=setTimeout;return function(){return a(i,1)}}function i(){for(var a=0;a=a.length-1)return!1;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return!1;var d=j[a.slice(b+1)];return!!d&&d.indexOf(" "+a.slice(c+1,b)+" ")>=0},a.is=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return!1;if(a.lastIndexOf(".",b-1)>=0)return!1;var c=j[a.slice(b+1)];return!!c&&c.indexOf(" "+a.slice(0,b)+" ")>=0},a.get=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return null;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return null;var d=j[a.slice(b+1)];return d?d.indexOf(" "+a.slice(c+1,b)+" ")<0?null:a.slice(c+1):null},a}(),l=function(){function a(){}return a.setList=function(a){j=a||{}},a.getDomain=function(a){if(!j)return null;var b=a.match(/\./g);if(b&&b.length<2)return a;var c=this.getTld(a);if(!c)return null;var d=a.length-c.length-1;return d=a.lastIndexOf(".",d-1)+1,a.substring(d)||""},a.getTld=function(a){if(!j)return"";var b=a.lastIndexOf("."),c=a.substring(b+1);return j[c.toLowerCase()]?k.get(a)||c:c},a.KEY="Domains",a}(),m=function(){function a(){this.cache={}}return Object.defineProperty(a,"instance",{get:function(){return void 0===a.classInstance&&(a.classInstance=new a),a.classInstance},enumerable:!1,configurable:!0}),a.prototype.load=function(a,b,c){var d=this;return this.contains(a)?Promise.reject("Already in cache."):(this.cache[a]={url:b,data:null},this.requestXhr(b,c).then(function(b){return d.loadComplete(a,b)}).catch(function(b){return d.remove(a),Promise.reject(b)}))},a.prototype.loadComplete=function(a,b){if(!this.contains(a))return Promise.reject("Item was removed from cache before loading was complete.");try{var c=JSON.parse(b);return this.cache[a].data=c,Promise.resolve(c)}catch(a){return Promise.reject("There was an error parsing JSON file.")}},a.prototype.remove=function(a){this.contains(a)&&delete this.cache[a]},a.prototype.get=function(a){return this.contains(a)?this.cache[a].data:null},a.prototype.contains=function(a){return this.cache.hasOwnProperty(a)},a.prototype.isLoading=function(a){return this.contains(a)&&null===this.cache[a].data},a.prototype.isLoaded=function(a){return this.contains(a)&&null!==this.cache[a].data},a.prototype.loadScript=function(a,b,c){return void 0===b&&(b=!0),new Promise(function(b,d){var e=document.createElement("script");e.src=a,e.async=!1,e.onload=function(){"function"==typeof c&&c(),b()},document.head.appendChild(e)})},a.prototype.requestXhr=function(a,b){void 0===b&&(b="application/json");var c;return window.XMLHttpRequest?(c=new XMLHttpRequest,new Promise(function(d,e){c.onreadystatechange=function(){4===c.readyState&&(200===c.status?(d(c.responseText),c.onreadystatechange=null):c.status>0&&(e("There was a problem with the request: status "+c.status),c.onreadystatechange=null))};try{c.open("GET",a,!0),c.setRequestHeader("Content-Type",b),c.send()}catch(a){e("Error: Unable to send request, CORS not allowed.")}})):Promise.reject("Unable to send request, XMLHttpRequest not supported.")},a}();!function(a){a[a.splashscreen=0]="splashscreen",a[a.logo=1]="logo",a[a.facebook=2]="facebook",a[a.twitter=3]="twitter",a[a.playstore=4]="playstore",a[a.appstore=5]="appstore",a[a.more_games=6]="more_games",a[a.download_game=7]="download_game",a[a.walkthrough=8]="walkthrough",a[a.disclaimer=9]="disclaimer",a[a.highscores=10]="highscores"}(a.UtmTargets||(a.UtmTargets={}));var n=function(){function a(){}return a.loadPortalScript=function(a){a&&a.hasOwnProperty("minijuegos")&&-1!==a.minijuegos.indexOf(p.getSourceSite())&&(void 0!==window.mpConfig?window.mpConfig.partner="orange-games":window.mpConfig={partner:"orange-games"},d("https://ext.minijuegosgratis.com/external-host/main.js",Date.now()/1e3)),a&&a.hasOwnProperty("kongregate")&&-1!==a.kongregate.indexOf(p.getSourceSite())&&d("https://cdn1.kongregate.com/javascripts/kongregate_api.js",Date.now()/1e3,function(){"undefined"!=typeof kongregateAPI&&kongregateAPI.loadAPI(function(){window.kongregate=kongregateAPI.getAPI()})}),a&&a.hasOwnProperty("newgrounds")&&-1!==a.newgrounds.indexOf(p.getSourceSite())&&d("https://cdn.fbrq.io/@azerion/splash/assets/scripts/newgroundsio.min.js",Date.now()/1e3)},a}(),o=function(){function b(){}return b.preload=function(a){var c=Promise.all([m.instance.load(l.KEY,p.ASSET_LOCATION+"json/domains.json?v="+a,"text/plain"),m.instance.load(b.SITELOCK_PORTALS,p.ASSET_LOCATION+"json/sitelock.json?v="+a,"text/plain")]);return Promise.all([m.instance.load(b.INTERNAL_PORTALS_KEY,p.ASSET_LOCATION+"json/internal.json?v="+a,"text/plain"),m.instance.load(b.CONTRACTED_PORTALS_KEY,p.ASSET_LOCATION+"json/contracted.json?v="+a,"text/plain"),m.instance.load(b.SPECIAL_PORTALS_KEY,p.ASSET_LOCATION+"json/special.json?v="+a,"text/plain")]),c.then(function(a){var c=a[0],d=a[1];l.setList(c),n.loadPortalScript(d),b.setSiteLock(d)}).catch(function(){console.warn("Unable to parse json")})},b.setSiteLock=function(a){b.siteLocks=a},Object.defineProperty(b,"brandingLogoUrl",{get:function(){var c;switch(p.isOnDevice()||b.isAirfi()?p.ASSET_LOCATION="assets/":"fbrq.io"===p.getSourceSite(!0)&&(p.ASSET_LOCATION="https://"+window.location.host+"/@azerion/splash/assets/"),p.getBrandingDomain()){case a.BrandingDomain.Spele:c="spele";break;case a.BrandingDomain.PlayCell:c="playcell";break;case a.BrandingDomain.GameCell:c="gamecell";break;case a.BrandingDomain.Yepi:c="yepi";break;case a.BrandingDomain.Admeen:c="admeen";break;case a.BrandingDomain.Bild:c="bild";break;case a.BrandingDomain.Kizi:c="kizi";break;case a.BrandingDomain.Funnygames:c="funnygames";break;case a.BrandingDomain.PlayTime:c="playtime";break;default:case a.BrandingDomain.AGame:c="agame";break;case a.BrandingDomain.Zigiz:c="zigiz"}return p.ASSET_LOCATION+"images/branding_logo_"+c+"_small.png"},enumerable:!1,configurable:!0}),Object.defineProperty(b,"brandingBackgroundColor",{get:function(){var b;switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:b="#4a72ad";break;case a.BrandingDomain.PlayCell:b="#52a1e1";break;case a.BrandingDomain.GameCell:b="#c600b2";break;case a.BrandingDomain.Yepi:b="#0573a7";break;case a.BrandingDomain.AGame:b="#0C486C";break;case a.BrandingDomain.Admeen:b="#4267B2";break;case a.BrandingDomain.Bild:b="#de0000";break;default:case a.BrandingDomain.Kizi:b="#012f50";break;case a.BrandingDomain.Funnygames:b="#33b0ff";break;case a.BrandingDomain.PlayTime:case a.BrandingDomain.Zigiz:b="#023a63"}return b},enumerable:!1,configurable:!0}),b.openCampaignLink=function(c,d){if(!p.isOnDevice()&&!b.isSpecial()&&b.outGoingLinksAllowed()){var e,f,g=p.getSourceSite(),h=p.isOnDevice()?"https://":"//";switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:e=h+"www.spele.nl";break;case a.BrandingDomain.Yepi:e=h+"www.yepi.com";break;case a.BrandingDomain.Admeen:return e="https://media.admeen.com/branding/link.php",void((f=window.open(e,"_blank"))&&f.focus&&f.focus());case a.BrandingDomain.PlayCell:e=h+"www.playcell.com";break;case a.BrandingDomain.GameCell:e=h+"www.gamecell.com";break;case a.BrandingDomain.Kizi:e=h+"www.kizi.com";break;case a.BrandingDomain.Bild:return void((f=window.open(h+"www.bildspielt.de","_blank"))&&f.focus&&f.focus());case a.BrandingDomain.Funnygames:e=h+"www.funnygames.nu";break;case a.BrandingDomain.PlayTime:e=h+"playtime.nl";break;default:case a.BrandingDomain.AGame:e=h+"www.agame.com";break;case a.BrandingDomain.Zigiz:e=h+"m.zigiz.com"}var i="string"==typeof d?d:a.UtmTargets[d];f=window.open(e+"/?utm_source="+g+"&utm_medium=html5&utm_term="+c+"&utm_content="+i+"&utm_campaign=Gamedistribution","_blank"),f&&f.focus&&f.focus()}},b.isInternal=function(){return b.hostMatchesList(m.instance.get(b.INTERNAL_PORTALS_KEY))},b.isContracted=function(){return b.hostMatchesList(m.instance.get(b.CONTRACTED_PORTALS_KEY))},b.isSpecial=function(){return b.hostMatchesList(m.instance.get(b.SPECIAL_PORTALS_KEY))},b.isAdmeen=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("admeen"))return!1;var a=b.siteLocks.admeen;return b.hostMatchesList(a)},b.isKongregate=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("kongregate"))return!1;var a=b.siteLocks.kongregate;return b.hostMatchesList(a)},b.isNewgrounds=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("newgrounds"))return!1;var a=b.siteLocks.newgrounds;return b.hostMatchesList(a)},b.isBild=function(){return"bild.fbrq.io"===window.location.host||-1!==window.location.host.indexOf("contentfleet.com")},b.isPlaytime=function(){return-1!==window.location.host.indexOf("playtime.nl")},b.isBip=function(){return-1!==window.location.search.indexOf("bipgaming")||"bip.fbrq.io"===window.location.host},b.isPlaycellApp=function(){return-1!==window.location.search.indexOf("playcellApp")},b.isAGame=function(){return-1!==window.location.search.indexOf("agame")},b.isAirfi=function(){return!!window.hasOwnProperty("airfi")&&window.airfi},b.outGoingLinksAllowed=function(){return!(b.isAirfi()||b.isSpecial()||b.isContracted())&&(!window.hasOwnProperty("fbrqLA")||window.fbrqLA)},b.hostMatchesList=function(a){a=a||[];for(var b=p.getSourceSite(),c=0;c-1?c.split("/")[2]:c.split("/")[0],c=c.split(":")[0];var d=l.getDomain(c);return null!==d?d:(3===c.split(".").length&&(c=c.substr(c.indexOf(".")+1)),c)},b.getBrandingDomain=function(){if(window.hasOwnProperty("fbrqBD")&&window.fbrqBD in a.BrandingDomain)return window.fbrqBD;if(o.DOMAIN_OVERWRITE)return o.DOMAIN_OVERWRITE;var c=b.getSourceSite();if(o.isAdmeen())return a.BrandingDomain.Admeen;if(o.isPlaycellApp()||o.isBip())return a.BrandingDomain.PlayCell;switch(c){case"spele.nl":return a.BrandingDomain.Spele;case"yepi.com":return a.BrandingDomain.Yepi;case"oyunskor.com":case"barbioyunu.com.tr":case"bebekoyunu.com.tr":case"oyunkolu.com":case"oyungemisi.com":case"oyunlar1.com":case"oyunkuzusu.com":case"kraloyun.com":case"rekoroyun.com":case"oyundedem.com":case"oyunoyna.com":case"pastaoyunu.com.tr":case"playcell.com":return a.BrandingDomain.PlayCell;case"gamecell.com":return a.BrandingDomain.GameCell;case"playxl.com":return a.BrandingDomain.Admeen;case"kizi.com":return a.BrandingDomain.Kizi;case"bildspielt.de":return a.BrandingDomain.Bild;case"funnygames.nl":return a.BrandingDomain.Funnygames;case"playtime.nl":return a.BrandingDomain.PlayTime;default:case"agame.com":return a.BrandingDomain.AGame;case"gmbl.nl":case"zigiz.com":return a.BrandingDomain.Zigiz;case"coolmathgames.com":return a.BrandingDomain.Neutral}},b.getReferrer=function(a){return-1!==a.indexOf("?ref=")?a.substr(a.indexOf("?ref=")+5):a},b.inIframe=function(){try{return window.self!==window.top}catch(a){return!0}},b.inGDGameZone=function(){return-1!==document.referrer.indexOf("html5.gamedistribution.com")},b.getDomain=function(a){var b=document.createElement("a");return b.href=a,b.origin},b.isOnDevice=function(){return void 0!==window.cordova&&!/(gamedistribution\.com)/.test(window.location.hostname)},b.isTc=function(){return/(teamcity\.azerdev\.com)/.test(window.location.host)},b.getRandomRange=function(a,b){return Math.random()*(b-a)+a|0},b.getUrlParameter=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},b.intTimeToString=function(a){var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=a%60;return(b<10?"0"+b:b.toString())+":"+(c<10?"0"+c:c.toString())+":"+(d<10?"0"+d:d.toString())},b.LANGUAGE="en",b.ASSET_LOCATION=window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/":"https://cdn.fbrq.io/@azerion/splash/assets/",b}(),q=function(){function a(){this.fbrqId="UA-60359297-50"}return a.addScript=function(){return o.analyticsEnabled?new Promise(function(b,c){var d=document.createElement("script"),e="https://www.googletagmanager.com/gtag/js?id="+a.GAMeasurementId;d.setAttribute("src",e),d.async=!0,d.onload=function(){b({loaded:!0})},document.head.appendChild(d)}):Promise.resolve()},a.preload=function(){return o.analyticsEnabled&&a.addScript().then(function(a,b){return new Promise(function(b,c){a.loaded&&(window.hasOwnProperty("dataLayer")&&(window.dataLayer=window.dataLayer||[]),gtag=function(){window.hasOwnProperty("dataLayer")&&window.dataLayer.push(arguments)}),b()})}),Promise.resolve()},a.prototype.setup=function(a,b,c,d,e){if(void 0===b&&(b="none"),void 0===c&&(c="none"),void 0===d&&(d="auto"),void 0===e&&(e=100),"function"!=typeof gtag)return null;if(!o.analyticsEnabled){var f="ga-disable-"+a;return window.hasOwnProperty(f)&&(window.disableID=!o.analyticsEnabled),null}var g="none";o.isAGame()&&(g=p.getReferrer(decodeURIComponent(document.referrer))),gtag("js",new Date),gtag("set","user_properties",{app_name:b,app_version:c,referrer:g}),gtag("config",a,{sample_rate:e});var h={name:"fbrq",sample_rate:1,referrer:g,app_name:"All"};if("auto"!==d)for(var i in d)d.hasOwnProperty(i)&&(h[i]=d[i]);return gtag("config",this.fbrqId,h),gtag},a.prototype.sendScreenView=function(a){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event","screen_view",{screen_name:a}),gtag("event","screen_view",{send_to:this.fbrqId,screen_name:a})))},a.prototype.sendGenericEvent=function(a,b,c){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event",b,{event_category:a,event_label:c}),gtag("event",b,{send_to:this.fbrqId,event_category:a,event_label:c})))},a.GAMeasurementId="none",a}(),r=r||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,b){a=this.words=a||[],this.sigBytes=void 0!=b?b:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;e>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(a){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;ij;){var k;a:{k=i;for(var l=a.sqrt(k),m=2;m<=l;m++)if(!(k%m)){k=!1;break a}k=!0}k&&(8>j&&(f[j]=h(a.pow(i,.5))),g[j]=h(a.pow(i,1/3)),j++),i++}var n=[],c=c.SHA256=e.extend({_doReset:function(){this._hash=new d.init(f.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=0;64>m;m++){if(16>m)n[m]=0|a[b+m];else{var o=n[m-15],p=n[m-2];n[m]=((o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3)+n[m-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[m-16]}o=l+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&j^~i&k)+g[m]+n[m],p=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&f^e&f),l=k,k=j,j=i,i=h+o|0,h=f,f=e,e=d,d=o+p|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0,c[5]=c[5]+j|0,c[6]=c[6]+k|0,c[7]=c[7]+l|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;return c[e>>>5]|=128<<24-e%32,c[14+(e+64>>>9<<4)]=a.floor(d/4294967296),c[15+(e+64>>>9<<4)]=d,b.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA256=e._createHelper(c),b.HmacSHA256=e._createHmacHelper(c)}(Math),function(){var a=r,b=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,c){a=this._hasher=new a.init,"string"==typeof c&&(c=b.parse(c));var d=a.blockSize,e=4*d;c.sigBytes>e&&(c=a.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),g=this._iKey=c.clone(),h=f.words,i=g.words,j=0;j>>2]>>>24-e%4*8&255)<<16|(b[e+1>>>2]>>>24-(e+1)%4*8&255)<<8|b[e+2>>>2]>>>24-(e+2)%4*8&255,g=0;4>g&&e+.75*g>>6*(3-g)&63));if(b=d.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(a){var c=a.length,d=this._map,e=d.charAt(64);e&&-1!=(e=a.indexOf(e))&&(c=e);for(var e=[],f=0,g=0;g>>6-g%4*2;e[f>>>2]|=(h|i)<<24-f%4*8,f++}return b.create(e,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}();var s;!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Debug=1]="Debug",a[a.Info=2]="Info",a[a.Warning=3]="Warning",a[a.Error=4]="Error",a[a.Critical=5]="Critical"}(a.EGAErrorSeverity||(a.EGAErrorSeverity={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Male=1]="Male",a[a.Female=2]="Female"}(a.EGAGender||(a.EGAGender={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Start=1]="Start",a[a.Complete=2]="Complete",a[a.Fail=3]="Fail"}(a.EGAProgressionStatus||(a.EGAProgressionStatus={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Source=1]="Source",a[a.Sink=2]="Sink"}(a.EGAResourceFlowType||(a.EGAResourceFlowType={}));!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Rejected=1]="Rejected"}(a.EGASdkErrorType||(a.EGASdkErrorType={}));!function(a){a[a.NoResponse=0]="NoResponse",a[a.BadResponse=1]="BadResponse",a[a.RequestTimeout=2]="RequestTimeout",a[a.JsonEncodeFailed=3]="JsonEncodeFailed",a[a.JsonDecodeFailed=4]="JsonDecodeFailed",a[a.InternalServerError=5]="InternalServerError",a[a.BadRequest=6]="BadRequest",a[a.Unauthorized=7]="Unauthorized",a[a.UnknownResponseCode=8]="UnknownResponseCode",a[a.Ok=9]="Ok"}(a.EGAHTTPApiResponse||(a.EGAHTTPApiResponse={}))}(a.http||(a.http={}))}(s||(s={}));var s;s.EGAErrorSeverity,s.EGAGender,s.EGAProgressionStatus,s.EGAResourceFlowType;!function(a){!function(a){var b;!function(a){a[a.Error=0]="Error",a[a.Warning=1]="Warning",a[a.Info=2]="Info",a[a.Debug=3]="Debug"}(b||(b={}));var c=function(){function a(){a.debugEnabled=!1}return a.setInfoLog=function(b){a.instance.infoLogEnabled=b},a.setVerboseLog=function(b){a.instance.infoLogVerboseEnabled=b},a.i=function(c){if(a.instance.infoLogEnabled){var d="Info/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.w=function(c){var d="Warning/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Warning)},a.e=function(c){var d="Error/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Error)},a.ii=function(c){if(a.instance.infoLogVerboseEnabled){var d="Verbose/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.d=function(c){if(a.debugEnabled){var d="Debug/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Debug)}},a.prototype.sendNotificationMessage=function(a,c){switch(c){case b.Error:console.error(a);break;case b.Warning:console.warn(a);break;case b.Debug:"function"==typeof console.debug?console.debug(a):console.log(a);break;case b.Info:console.log(a)}},a.instance=new a,a.Tag="GameAnalytics",a}();a.GALogger=c}(a.logging||(a.logging={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=function(){function a(){}return a.getHmac=function(a,b){var c=r.HmacSHA256(b,a);return r.enc.Base64.stringify(c)},a.stringMatch=function(a,b){return!(!a||!b)&&b.test(a)},a.joinStringArray=function(a,b){for(var c="",d=0,e=a.length;d0&&(c+=b),c+=a[d];return c},a.stringArrayContainsString=function(a,b){if(0===a.length)return!1;for(var c in a)if(a[c]===b)return!0;return!1},a.encode64=function(b){b=encodeURI(b);var c,d,e,f,g,h="",i=0,j=0,k=0;do{c=b.charCodeAt(k++),d=b.charCodeAt(k++),i=b.charCodeAt(k++),e=c>>2,f=(3&c)<<4|d>>4,g=(15&d)<<2|i>>6,j=63&i,isNaN(d)?g=j=64:isNaN(i)&&(j=64),h=h+a.keyStr.charAt(e)+a.keyStr.charAt(f)+a.keyStr.charAt(g)+a.keyStr.charAt(j),c=d=i=0,e=f=g=j=0}while(k0))return c.w("validateInitRequestResponse failed - invalid value in 'server_ts' field."),null;b.server_ts=d}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'server_ts' field. type="+typeof a.server_ts+", value="+a.server_ts+", "+b),null}try{var e=a.configurations;b.configurations=e}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'configurations' field. type="+typeof a.configurations+", value="+a.configurations+", "+b),null}return b},b.validateBuild=function(a){return!!b.validateShortString(a,!1)},b.validateSdkWrapperVersion=function(a){return!!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/)},b.validateEngineVersion=function(a){return!(!a||!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/))},b.validateUserId=function(a){return!!b.validateString(a,!1)||(c.w("Validation fail - user id: id cannot be (null), empty or above 64 characters."),!1)},b.validateShortString=function(a,b){return!(!b||a)||!(!a||a.length>32)},b.validateString=function(a,b){return!(!b||a)||!(!a||a.length>64)},b.validateLongString=function(a,b){return!(!b||a)||!(!a||a.length>8192)},b.validateConnectionType=function(a){return e.stringMatch(a,/^(wwan|wifi|lan|offline)$/)},b.validateCustomDimensions=function(a){return b.validateArrayOfStrings(20,32,!1,"custom dimensions",a)},b.validateResourceCurrencies=function(a){if(!b.validateArrayOfStrings(20,64,!1,"resource currencies",a))return!1;for(var d=0;d0&&f.length>a)return c.w(g+" validation failed: array cannot exceed "+a+" values. It has "+f.length+" values."),!1;for(var h=0;h9999)||(c.w("Validation fail - birthYear: Cannot be (null) or invalid range."),!1)},b.validateClientTs=function(a){return!(a<-4294967294||a>4294967294)},b}();b.GAValidator=f}(a.validators||(a.validators={}))}(s||(s={}));var s;!function(a){!function(a){var b=function(){function a(a,b,c){this.name=a,this.value=b,this.version=c}return a}();a.NameValueVersion=b;var c=function(){function a(a,b){this.name=a,this.version=b}return a}();a.NameVersion=c;var d=function(){function a(){}return a.touch=function(){},a.getRelevantSdkVersion=function(){return a.sdkGameEngineVersion?a.sdkGameEngineVersion:a.sdkWrapperVersion},a.getConnectionType=function(){return a.connectionType},a.updateConnectionType=function(){navigator.onLine?"ios"===a.buildPlatform||"android"===a.buildPlatform?a.connectionType="wwan":a.connectionType="lan":a.connectionType="offline"},a.getOSVersionString=function(){return a.buildPlatform+" "+a.osVersionPair.version},a.runtimePlatformToString=function(){return a.osVersionPair.name},a.getBrowserVersionString=function(){var b,c=navigator.userAgent,d=c.match(/(opera|chrome|safari|firefox|ubrowser|msie|trident|fbav(?=\/))\/?\s*(\d+)/i)||[];if(0==d.length&&"ios"===a.buildPlatform)return"webkit_"+a.osVersion;if(/trident/i.test(d[1]))return b=/\brv[ :]+(\d+)/g.exec(c)||[],"IE "+(b[1]||"");if("Chrome"===d[1]&&null!=(b=c.match(/\b(OPR|Edge|UBrowser)\/(\d+)/)))return b.slice(1).join(" ").replace("OPR","Opera").replace("UBrowser","UC").toLowerCase();if(d[1]&&"fbav"===d[1].toLowerCase()&&(d[1]="facebook",d[2]))return"facebook "+d[2];var e=d[2]?[d[1],d[2]]:[navigator.appName,navigator.appVersion,"-?"];return null!=(b=c.match(/version\/(\d+)/i))&&e.splice(1,1,b[1]),e.join(" ").toLowerCase()},a.getDeviceModel=function(){return"unknown"},a.getDeviceManufacturer=function(){return"unknown"},a.matchItem=function(a,b){var d,e,f,g,h,i=new c("unknown","0.0.0"),j=0,k=0;for(j=0;j0},a.prototype.dequeue=function(){if(this.hasItems())return this.dequeueFromHighPriorityQueue();throw new Error("The queue is empty")},a.prototype.dequeueFromHighPriorityQueue=function(){var a=this._sortedKeys[0],b=this._subQueues[a].shift();return 0===this._subQueues[a].length&&(this._sortedKeys.shift(),delete this._subQueues[a]),b},a}();a.PriorityQueue=b}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){!function(b){var c,d=a.logging.GALogger;!function(a){a[a.Equal=0]="Equal",a[a.LessOrEqual=1]="LessOrEqual",a[a.NotEqual=2]="NotEqual"}(c=b.EGAStoreArgsOperator||(b.EGAStoreArgsOperator={}));var e;!function(a){a[a.Events=0]="Events",a[a.Sessions=1]="Sessions",a[a.Progression=2]="Progression"}(e=b.EGAStore||(b.EGAStore={}));var f=function(){function a(){this.eventsStore=[],this.sessionsStore=[],this.progressionStore=[],this.storeItems={};try{"object"==typeof localStorage?(localStorage.setItem("testingLocalStorage","yes"),localStorage.removeItem("testingLocalStorage"),a.storageAvailable=!0):a.storageAvailable=!1}catch(a){}}return a.isStorageAvailable=function(){return a.storageAvailable},a.isStoreTooLargeForEvents=function(){return a.instance.eventsStore.length+a.instance.sessionsStore.length>a.MaxNumberOfEntries},a.select=function(b,d,e,f){void 0===d&&(d=[]),void 0===e&&(e=!1),void 0===f&&(f=0);var g=a.getStore(b);if(!g)return null;for(var h=[],i=0;i0&&h.length>f&&(h=h.slice(0,f+1)),h},a.update=function(b,d,e){void 0===e&&(e=[]);var f=a.getStore(b);if(!f)return!1;for(var g=0;g0)return b.instance.sdkConfig;var a,c=0;for(var d in b.instance.sdkConfigCached)0===c&&(a=d),++c;return a&&c>0?b.instance.sdkConfigCached:b.instance.sdkConfigDefault},b.isEnabled=function(){var a=b.getSdkConfig();return(!a.enabled||"false"!=a.enabled)&&!!b.instance.initAuthorized},b.setCustomDimension01=function(a){b.instance.currentCustomDimension01=a,f.setItem(b.Dimension01Key,a),e.i("Set custom01 dimension value: "+a)},b.setCustomDimension02=function(a){b.instance.currentCustomDimension02=a,f.setItem(b.Dimension02Key,a),e.i("Set custom02 dimension value: "+a)},b.setCustomDimension03=function(a){b.instance.currentCustomDimension03=a,f.setItem(b.Dimension03Key,a),e.i("Set custom03 dimension value: "+a)},b.setFacebookId=function(a){b.instance.facebookId=a,f.setItem(b.FacebookIdKey,a),e.i("Set facebook id: "+a)},b.setGender=function(c){b.instance.gender=isNaN(Number(a.EGAGender[c]))?a.EGAGender[c].toString().toLowerCase():a.EGAGender[a.EGAGender[c]].toString().toLowerCase(),f.setItem(b.GenderKey,b.instance.gender),e.i("Set gender: "+b.instance.gender)},b.setBirthYear=function(a){b.instance.birthYear=a,f.setItem(b.BirthYearKey,a.toString()),e.i("Set birth year: "+a)},b.incrementSessionNum=function(){var a=b.getSessionNum()+1;b.instance.sessionNum=a},b.incrementTransactionNum=function(){var a=b.getTransactionNum()+1;b.instance.transactionNum=a},b.incrementProgressionTries=function(a){var c=b.getProgressionTries(a)+1;b.instance.progressionTries[a]=c;var d={};d.progression=a,d.tries=c,f.insert(h.Progression,d,!0,"progression")},b.getProgressionTries=function(a){return a in b.instance.progressionTries?b.instance.progressionTries[a]:0},b.clearProgressionTries=function(a){a in b.instance.progressionTries&&delete b.instance.progressionTries[a];var c=[];c.push(["progression",i.Equal,a]),f.delete(h.Progression,c)},b.setKeys=function(a,c){b.instance.gameKey=a,b.instance.gameSecret=c},b.setManualSessionHandling=function(a){b.instance.useManualSessionHandling=a,e.i("Use manual session handling: "+a)},b.setEnabledEventSubmission=function(a){b.instance._isEventSubmissionEnabled=a},b.getEventAnnotations=function(){var a={};a.v=2,a.user_id=b.instance.identifier,a.client_ts=b.getClientTsAdjusted(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.browser_version=g.browserVersion,a.platform=g.buildPlatform,a.session_id=b.instance.sessionId,a[b.SessionNumKey]=b.instance.sessionNum;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),b.instance.build&&(a.build=b.instance.build),b.instance.facebookId&&(a[b.FacebookIdKey]=b.instance.facebookId),b.instance.gender&&(a[b.GenderKey]=b.instance.gender),0!=b.instance.birthYear&&(a[b.BirthYearKey]=b.instance.birthYear),a},b.getSdkErrorEventAnnotations=function(){var a={};a.v=2,a.category=b.CategorySdkError,a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.platform=g.buildPlatform;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),a},b.getInitAnnotations=function(){var a={};return a.user_id=b.getIdentifier(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.platform=g.buildPlatform,a},b.getClientTsAdjusted=function(){var a=d.timeIntervalSince1970(),e=a+b.instance.clientServerTimeOffset;return c.validateClientTs(e)?e:a},b.sessionIsStarted=function(){return 0!=b.instance.sessionStart},b.cacheIdentifier=function(){b.instance.userId?b.instance.identifier=b.instance.userId:b.instance.defaultUserId&&(b.instance.identifier=b.instance.defaultUserId)},b.ensurePersistedStates=function(){f.isStorageAvailable()&&f.load();var a=b.instance;a.setDefaultId(null!=f.getItem(b.DefaultUserIdKey)?f.getItem(b.DefaultUserIdKey):d.createGuid()),a.sessionNum=null!=f.getItem(b.SessionNumKey)?Number(f.getItem(b.SessionNumKey)):0,a.transactionNum=null!=f.getItem(b.TransactionNumKey)?Number(f.getItem(b.TransactionNumKey)):0,a.facebookId?f.setItem(b.FacebookIdKey,a.facebookId):(a.facebookId=null!=f.getItem(b.FacebookIdKey)?f.getItem(b.FacebookIdKey):"",a.facebookId),a.gender?f.setItem(b.GenderKey,a.gender):(a.gender=null!=f.getItem(b.GenderKey)?f.getItem(b.GenderKey):"",a.gender),a.birthYear&&0!=a.birthYear?f.setItem(b.BirthYearKey,a.birthYear.toString()):(a.birthYear=null!=f.getItem(b.BirthYearKey)?Number(f.getItem(b.BirthYearKey)):0,a.birthYear),a.currentCustomDimension01?f.setItem(b.Dimension01Key,a.currentCustomDimension01):(a.currentCustomDimension01=null!=f.getItem(b.Dimension01Key)?f.getItem(b.Dimension01Key):"",a.currentCustomDimension01),a.currentCustomDimension02?f.setItem(b.Dimension02Key,a.currentCustomDimension02):(a.currentCustomDimension02=null!=f.getItem(b.Dimension02Key)?f.getItem(b.Dimension02Key):"",a.currentCustomDimension02),a.currentCustomDimension03?f.setItem(b.Dimension03Key,a.currentCustomDimension03):(a.currentCustomDimension03=null!=f.getItem(b.Dimension03Key)?f.getItem(b.Dimension03Key):"",a.currentCustomDimension03);var c=null!=f.getItem(b.SdkConfigCachedKey)?f.getItem(b.SdkConfigCachedKey):"";if(c){var e=JSON.parse(d.decode64(c));e&&(a.sdkConfigCached=e)}var g=f.select(h.Progression);if(g)for(var i=0;i0?(c[g]=k,++f):e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is an empty string or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH+")")}else if("number"===j||h instanceof Number){var l=h;c[g]=l,++f}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is not a string or number")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key contains illegal character, is empty or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_KEY_LENGTH+")")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because it exceeds the max number of custom fields ("+b.MAX_CUSTOM_FIELDS_COUNT+")");else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key or value is null")}}return c},b.validateAndFixCurrentDimensions=function(){c.validateDimension01(b.getCurrentCustomDimension01(),b.getAvailableCustomDimensions01())||b.setCustomDimension01(""),c.validateDimension02(b.getCurrentCustomDimension02(),b.getAvailableCustomDimensions02())||b.setCustomDimension02(""),c.validateDimension03(b.getCurrentCustomDimension03(),b.getAvailableCustomDimensions03())||b.setCustomDimension03("")},b.getConfigurationStringValue=function(a,c){return b.instance.configurations[a]?b.instance.configurations[a].toString():c},b.isCommandCenterReady=function(){return b.instance.commandCenterIsReady},b.addCommandCenterListener=function(a){b.instance.commandCenterListeners.indexOf(a)<0&&b.instance.commandCenterListeners.push(a)},b.removeCommandCenterListener=function(a){var c=b.instance.commandCenterListeners.indexOf(a);c>-1&&b.instance.commandCenterListeners.splice(c,1)},b.getConfigurationsContentAsString=function(){return JSON.stringify(b.instance.configurations)},b.populateConfigurations=function(a){var c=a.configurations;if(c)for(var d=0;dh&&j=a.MaxCount)){var h=c.getHmac(g,f),i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(!i.responseText)return;if(200!=i.status)return void d.w("sdk error failed. response code not 200. status code: "+i.status+", description: "+i.statusText+", body: "+i.responseText);a.countMap[e]=a.countMap[e]+1}},i.open("POST",b,!0),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Authorization",h);try{i.send(f)}catch(a){console.error(a)}}},a.MaxCount=10,a.countMap={},a}();b.SdkErrorTask=e}(a.tasks||(a.tasks={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.state.GAState,d=a.logging.GALogger,e=a.utilities.GAUtilities,f=a.validators.GAValidator,g=a.tasks.SdkErrorTask,h=function(){function a(){this.protocol="https",this.hostName="api.gameanalytics.com",this.version="v2",this.baseUrl=this.protocol+"://"+this.hostName+"/"+this.version,this.initializeUrlPath="init",this.eventsUrlPath="events",this.useGzip=!1}return a.prototype.requestInit=function(d){var e=c.getGameKey(),f=this.baseUrl+"/"+e+"/"+this.initializeUrlPath;f="https://rubick.gameanalytics.com/v2/command_center?game_key="+e+"&interval_seconds=1000000";var g=c.getInitAnnotations(),h=JSON.stringify(g);if(!h)return void d(b.EGAHTTPApiResponse.JsonEncodeFailed,null);var i=this.createPayloadData(h,this.useGzip),j=[];j.push(h),a.sendRequest(f,i,j,this.useGzip,a.initRequestCallback,d)},a.prototype.sendEventsInArray=function(d,e,f){if(0!=d.length){var g=c.getGameKey(),h=this.baseUrl+"/"+g+"/"+this.eventsUrlPath,i=JSON.stringify(d);if(!i)return void f(b.EGAHTTPApiResponse.JsonEncodeFailed,null,e,d.length);var j=this.createPayloadData(i,this.useGzip),k=[];k.push(i),k.push(e),k.push(d.length.toString()),a.sendRequest(h,j,k,this.useGzip,a.sendEventInArrayRequestCallback,f)}},a.prototype.sendSdkErrorEvent=function(b){if(c.isEventSubmissionEnabled()){var e=c.getGameKey(),h=c.getGameSecret();if(f.validateSdkErrorEvent(e,h,b)){var i=this.baseUrl+"/"+e+"/"+this.eventsUrlPath,j="",k=c.getSdkErrorEventAnnotations(),l=a.sdkErrorTypeToString(b);k.type=l;var m=[];if(m.push(k),!(j=JSON.stringify(m)))return void d.w("sendSdkErrorEvent: JSON encoding failed.");g.execute(i,b,j,h)}}},a.sendEventInArrayRequestCallback=function(c,d,e,f){void 0===f&&(f=null);var g=(f[0],f[1],f[2]),h=parseInt(f[3]),i="",j=0;i=c.responseText,j=c.status;var k=a.instance.processRequestResponse(j,c.statusText,i,"Events");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,g,h);var l=i?JSON.parse(i):{};if(null==l)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,g,h);b.EGAHTTPApiResponse.BadRequest,e(k,l,g,h)},a.sendRequest=function(a,b,d,f,g,h){var i=new XMLHttpRequest,j=c.getGameSecret(),k=e.getHmac(j,b),l=[];l.push(k);for(var m in d)l.push(d[m]);if(i.onreadystatechange=function(){4===i.readyState&&g(i,a,h,l)},i.open("POST",a,!0),i.setRequestHeader("Content-Type","text/plain"),i.setRequestHeader("Authorization",k),f)throw new Error("gzip not supported");try{i.send(b)}catch(a){console.error(a.stack)}},a.initRequestCallback=function(c,d,e,g){void 0===g&&(g=null);var h=(g[0],g[1],""),i=0;h=c.responseText,i=c.status;var j=h?JSON.parse(h):{},k=a.instance.processRequestResponse(i,c.statusText,h,"Init");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0);if(null==j)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,"",0);if(k===b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0);var l=f.validateAndCleanInitRequestResponse(j);if(!l)return void e(b.EGAHTTPApiResponse.BadResponse,null,"",0);e(b.EGAHTTPApiResponse.Ok,l,"",0)},a.prototype.createPayloadData=function(a,b){if(b)throw new Error("gzip not supported");return a},a.prototype.processRequestResponse=function(a,c,d,e){ +return d?200===a?b.EGAHTTPApiResponse.Ok:0===a||401===a?b.EGAHTTPApiResponse.Unauthorized:400===a?b.EGAHTTPApiResponse.BadRequest:500===a?b.EGAHTTPApiResponse.InternalServerError:b.EGAHTTPApiResponse.UnknownResponseCode:b.EGAHTTPApiResponse.NoResponse},a.sdkErrorTypeToString=function(a){switch(a){case b.EGASdkErrorType.Rejected:return"rejected";default:return""}},a.instance=new a,a}();b.GAHTTPApi=h}(a.http||(a.http={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.store.GAStore,d=a.store.EGAStore,e=a.store.EGAStoreArgsOperator,f=a.state.GAState,g=a.logging.GALogger,h=a.utilities.GAUtilities,i=a.http.EGAHTTPApiResponse,j=a.http.GAHTTPApi,k=a.validators.GAValidator,l=a.http.EGASdkErrorType,m=function(){function b(){}return b.addSessionStartEvent=function(){if(f.isEventSubmissionEnabled()){var a={};a.category=b.CategorySessionStart,f.incrementSessionNum(),c.setItem(f.SessionNumKey,f.getSessionNum().toString()),b.addDimensionsToEvent(a),b.addEventToStore(a),g.i("Add SESSION START event"),b.processEvents(b.CategorySessionStart,!1)}},b.addSessionEndEvent=function(){if(f.isEventSubmissionEnabled()){var a=f.getSessionStart(),c=f.getClientTsAdjusted(),d=c-a;d<0&&(g.w("Session length was calculated to be less then 0. Should not be possible. Resetting to 0."),d=0);var e={};e.category=b.CategorySessionEnd,e.length=d,b.addDimensionsToEvent(e),b.addEventToStore(e),g.i("Add SESSION END event."),b.processEvents("",!1)}},b.addBusinessEvent=function(a,d,e,h,i,m){if(void 0===i&&(i=null),f.isEventSubmissionEnabled()){if(!k.validateBusinessEvent(a,d,i,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var n={};f.incrementTransactionNum(),c.setItem(f.TransactionNumKey,f.getTransactionNum().toString()),n.event_id=e+":"+h,n.category=b.CategoryBusiness,n.currency=a,n.amount=d,n[f.TransactionNumKey]=f.getTransactionNum(),i&&(n.cart_type=i),b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add BUSINESS event: {currency:"+a+", amount:"+d+", itemType:"+e+", itemId:"+h+", cartType:"+i+"}"),b.addEventToStore(n)}},b.addResourceEvent=function(c,d,e,h,i,m){if(f.isEventSubmissionEnabled()){if(!k.validateResourceEvent(c,d,e,h,i,f.getAvailableResourceCurrencies(),f.getAvailableResourceItemTypes()))return void j.instance.sendSdkErrorEvent(l.Rejected);c===a.EGAResourceFlowType.Sink&&(e*=-1);var n={},o=b.resourceFlowTypeToString(c);n.event_id=o+":"+d+":"+h+":"+i,n.category=b.CategoryResource,n.amount=e,b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add RESOURCE event: {currency:"+d+", amount:"+e+", itemType:"+h+", itemId:"+i+"}"),b.addEventToStore(n)}},b.addProgressionEvent=function(c,d,e,h,i,m,n){if(f.isEventSubmissionEnabled()){var o=b.progressionStatusToString(c);if(!k.validateProgressionEvent(c,d,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var p,q={};p=e?h?d+":"+e+":"+h:d+":"+e:d,q.category=b.CategoryProgression,q.event_id=o+":"+p;var r=0;m&&c!=a.EGAProgressionStatus.Start&&(q.score=i),c===a.EGAProgressionStatus.Fail&&f.incrementProgressionTries(p),c===a.EGAProgressionStatus.Complete&&(f.incrementProgressionTries(p),r=f.getProgressionTries(p),q.attempt_num=r,f.clearProgressionTries(p)),b.addDimensionsToEvent(q),b.addFieldsToEvent(q,f.validateAndCleanCustomFields(n)),g.i("Add PROGRESSION event: {status:"+o+", progression01:"+d+", progression02:"+e+", progression03:"+h+", score:"+i+", attempt:"+r+"}"),b.addEventToStore(q)}},b.addDesignEvent=function(a,c,d,e){if(f.isEventSubmissionEnabled()){if(!k.validateDesignEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryDesign,h.event_id=a,d&&(h.value=c),b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(e)),g.i("Add DESIGN event: {eventId:"+a+", value:"+c+"}"),b.addEventToStore(h)}},b.addErrorEvent=function(a,c,d){if(f.isEventSubmissionEnabled()){var e=b.errorSeverityToString(a);if(!k.validateErrorEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryError,h.severity=e,h.message=c,b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(d)),g.i("Add ERROR event: {severity:"+e+", message:"+c+"}"),b.addEventToStore(h)}},b.processEvents=function(a,i){if(f.isEventSubmissionEnabled())try{var k=h.createGuid();i&&(b.cleanupEvents(),b.fixMissingSessionEndEvents());var l=[];l.push(["status",e.Equal,"new"]);var m=[];m.push(["status",e.Equal,"new"]),a&&(l.push(["category",e.Equal,a]),m.push(["category",e.Equal,a]));var n=[];n.push(["status",k]);var o=c.select(d.Events,l);if(!o||0==o.length)return g.i("Event queue: No events to send"),void b.updateSessionStore();if(o.length>b.MaxEventCount){if(!(o=c.select(d.Events,l,!0,b.MaxEventCount)))return;var p=o[o.length-1],q=p.client_ts;if(l.push(["client_ts",e.LessOrEqual,q]),!(o=c.select(d.Events,l)))return;m.push(["client_ts",e.LessOrEqual,q])}if(g.i("Event queue: Sending "+o.length+" events."),!c.update(d.Events,n,m))return;for(var r=[],s=0;s0&&(a.custom_fields=b)},b.resourceFlowTypeToString=function(b){return b==a.EGAResourceFlowType.Source||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Source]?"Source":b==a.EGAResourceFlowType.Sink||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Sink]?"Sink":""},b.progressionStatusToString=function(b){return b==a.EGAProgressionStatus.Start||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Start]?"Start":b==a.EGAProgressionStatus.Complete||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Complete]?"Complete":b==a.EGAProgressionStatus.Fail||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Fail]?"Fail":""},b.errorSeverityToString=function(b){return b==a.EGAErrorSeverity.Debug||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Debug]?"debug":b==a.EGAErrorSeverity.Info||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Info]?"info":b==a.EGAErrorSeverity.Warning||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Warning]?"warning":b==a.EGAErrorSeverity.Error||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Error]?"error":b==a.EGAErrorSeverity.Critical||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Critical]?"critical":""},b.instance=new b,b.CategorySessionStart="user",b.CategorySessionEnd="session_end",b.CategoryDesign="design",b.CategoryBusiness="business",b.CategoryProgression="progression",b.CategoryResource="resource",b.CategoryError="error",b.MaxEventCount=500,b}();b.GAEvents=m}(a.events||(a.events={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=a.state.GAState,e=a.events.GAEvents,f=function(){function a(){this.blocks=new b.PriorityQueue({compare:function(a,b){return a-b}}),this.id2TimedBlockMap={},a.startThread()}return a.createTimedBlock=function(a){void 0===a&&(a=0);var c=new Date;return c.setSeconds(c.getSeconds()+a),new b.TimedBlock(c)},a.performTaskOnGAThread=function(c,d){void 0===d&&(d=0);var e=new Date;e.setSeconds(e.getSeconds()+d);var f=new b.TimedBlock(e);f.block=c,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f)},a.performTimedBlockOnGAThread=function(b){a.instance.id2TimedBlockMap[b.id]=b,a.instance.addTimedBlock(b)},a.scheduleTimer=function(c,d){var e=new Date;e.setSeconds(e.getSeconds()+c);var f=new b.TimedBlock(e);return f.block=d,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f),f.id},a.getTimedBlockById=function(b){return b in a.instance.id2TimedBlockMap?a.instance.id2TimedBlockMap[b]:null},a.ensureEventQueueIsRunning=function(){a.instance.keepRunning=!0,a.instance.isRunning||(a.instance.isRunning=!0,a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue))},a.endSessionAndStopQueue=function(){d.isInitialized()&&(c.i("Ending session."),a.stopEventQueue(),d.isEnabled()&&d.sessionIsStarted()&&(e.addSessionEndEvent(),d.instance.sessionStart=0))},a.stopEventQueue=function(){a.instance.keepRunning=!1},a.ignoreTimer=function(b){b in a.instance.id2TimedBlockMap&&(a.instance.id2TimedBlockMap[b].ignore=!0)},a.setEventProcessInterval=function(b){b>0&&(a.ProcessEventsIntervalInSeconds=b)},a.prototype.addTimedBlock=function(a){this.blocks.enqueue(a.deadline.getTime(),a)},a.run=function(){clearTimeout(a.runTimeoutId);try{for(var b;b=a.getNextBlock();)if(!b.ignore)if(b.async){if(!b.running){b.running=!0,b.block();break}}else b.block();return void(a.runTimeoutId=setTimeout(a.run,a.ThreadWaitTimeInMs))}catch(a){c.e("Error on GA thread"),c.e(a.stack)}},a.startThread=function(){a.runTimeoutId=setTimeout(a.run,0)},a.getNextBlock=function(){var b=new Date;return a.instance.blocks.hasItems()&&a.instance.blocks.peek().deadline.getTime()<=b.getTime()?a.instance.blocks.peek().async&&a.instance.blocks.peek().running?a.instance.blocks.peek():a.instance.blocks.dequeue():null},a.processEventQueue=function(){e.processEvents("",!0),a.instance.keepRunning?a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue):a.instance.isRunning=!1},a.instance=new a,a.ThreadWaitTimeInMs=1e3,a.ProcessEventsIntervalInSeconds=8,a}();b.GAThreading=f}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){var b=a.threading.GAThreading,c=a.logging.GALogger,d=a.store.GAStore,e=a.state.GAState,f=a.http.GAHTTPApi,g=a.device.GADevice,h=a.validators.GAValidator,i=a.http.EGAHTTPApiResponse,j=a.utilities.GAUtilities,k=a.events.GAEvents,l=function(){function l(){}return l.init=function(){if(g.touch(),l.methodMap.configureAvailableCustomDimensions01=l.configureAvailableCustomDimensions01,l.methodMap.configureAvailableCustomDimensions02=l.configureAvailableCustomDimensions02,l.methodMap.configureAvailableCustomDimensions03=l.configureAvailableCustomDimensions03,l.methodMap.configureAvailableResourceCurrencies=l.configureAvailableResourceCurrencies,l.methodMap.configureAvailableResourceItemTypes=l.configureAvailableResourceItemTypes,l.methodMap.configureBuild=l.configureBuild,l.methodMap.configureSdkGameEngineVersion=l.configureSdkGameEngineVersion,l.methodMap.configureGameEngineVersion=l.configureGameEngineVersion,l.methodMap.configureUserId=l.configureUserId,l.methodMap.initialize=l.initialize,l.methodMap.addBusinessEvent=l.addBusinessEvent,l.methodMap.addResourceEvent=l.addResourceEvent,l.methodMap.addProgressionEvent=l.addProgressionEvent,l.methodMap.addDesignEvent=l.addDesignEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.setEnabledInfoLog=l.setEnabledInfoLog,l.methodMap.setEnabledVerboseLog=l.setEnabledVerboseLog,l.methodMap.setEnabledManualSessionHandling=l.setEnabledManualSessionHandling,l.methodMap.setEnabledEventSubmission=l.setEnabledEventSubmission,l.methodMap.setCustomDimension01=l.setCustomDimension01,l.methodMap.setCustomDimension02=l.setCustomDimension02,l.methodMap.setCustomDimension03=l.setCustomDimension03,l.methodMap.setFacebookId=l.setFacebookId,l.methodMap.setGender=l.setGender,l.methodMap.setBirthYear=l.setBirthYear,l.methodMap.setEventProcessInterval=l.setEventProcessInterval,l.methodMap.startSession=l.startSession,l.methodMap.endSession=l.endSession,l.methodMap.onStop=l.onStop,l.methodMap.onResume=l.onResume,l.methodMap.addCommandCenterListener=l.addCommandCenterListener,l.methodMap.removeCommandCenterListener=l.removeCommandCenterListener,l.methodMap.getCommandCenterValueAsString=l.getCommandCenterValueAsString,l.methodMap.isCommandCenterReady=l.isCommandCenterReady,l.methodMap.getConfigurationsContentAsString=l.getConfigurationsContentAsString,"undefined"!=typeof window&&void 0!==window.GameAnalytics&&void 0!==window.GameAnalytics.q){var a=window.GameAnalytics.q;for(var b in a)l.gaCommand.apply(null,a[b])}},l.gaCommand=function(){for(var b=[],c=0;c0&&b[0]in a.GameAnalytics.methodMap&&(b.length>1?a.GameAnalytics.methodMap[b[0]].apply(null,Array.prototype.slice.call(b,1)):a.GameAnalytics.methodMap[b[0]]())},l.configureAvailableCustomDimensions01=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions01(a)})},l.configureAvailableCustomDimensions02=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions02(a)})},l.configureAvailableCustomDimensions03=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions03(a)})},l.configureAvailableResourceCurrencies=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource currencies must be set before SDK is initialized");e.setAvailableResourceCurrencies(a)})},l.configureAvailableResourceItemTypes=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource item types must be set before SDK is initialized");e.setAvailableResourceItemTypes(a)})},l.configureBuild=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("Build version must be set before SDK is initialized."):h.validateBuild(a)?void e.setBuild(a):void c.i("Validation fail - configure build: Cannot be null, empty or above 32 length. String: "+a)})},l.configureSdkGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateSdkWrapperVersion(a)?void(g.sdkGameEngineVersion=a):void c.i("Validation fail - configure sdk version: Sdk version not supported. String: "+a)})},l.configureGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateEngineVersion(a)?void(g.gameEngineVersion=a):void c.i("Validation fail - configure game engine version: Game engine version not supported. String: "+a)})},l.configureUserId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("A custom user id must be set before SDK is initialized."):h.validateUserId(a)?void e.setUserId(a):void c.i("Validation fail - configure user_id: Cannot be null, empty or above 64 length. Will use default user_id method. Used string: "+a)})},l.initialize=function(a,d){void 0===a&&(a=""),void 0===d&&(d=""),g.updateConnectionType();var f=b.createTimedBlock();f.async=!0,l.initTimedBlockId=f.id,f.block=function(){return l.isSdkReady(!0,!1)?void c.w("SDK already initialized. Can only be called once."):h.validateKeys(a,d)?(e.setKeys(a,d),void l.internalInitialize()):void c.w("SDK failed initialize. Game key or secret key is invalid. Can only contain characters A-z 0-9, gameKey is 32 length, gameSecret is 40 length. Failed keys - gameKey: "+a+", secretKey: "+d)},b.performTimedBlockOnGAThread(f)},l.addBusinessEvent=function(a,c,d,e,f){void 0===a&&(a=""),void 0===c&&(c=0),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add business event")&&k.addBusinessEvent(a,c,d,e,f,{})})},l.addResourceEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAResourceFlowType.Undefined),void 0===d&&(d=""),void 0===e&&(e=0),void 0===f&&(f=""),void 0===h&&(h=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add resource event")&&k.addResourceEvent(c,d,e,f,h,{})})},l.addProgressionEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAProgressionStatus.Undefined),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add progression event")){var a="number"==typeof h;k.addProgressionEvent(c,d,e,f,a?h:0,a,{})}})},l.addDesignEvent=function(a,c){g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add design event")){var b="number"==typeof c;k.addDesignEvent(a,b?c:0,b,{})}})},l.addErrorEvent=function(c,d){void 0===c&&(c=a.EGAErrorSeverity.Undefined),void 0===d&&(d=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add error event")&&k.addErrorEvent(c,d,{})})},l.setEnabledInfoLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setInfoLog(a),c.i("Info logging enabled")):(c.i("Info logging disabled"),c.setInfoLog(a))})},l.setEnabledVerboseLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setVerboseLog(a),c.i("Verbose logging enabled")):(c.i("Verbose logging disabled"),c.setVerboseLog(a))})},l.setEnabledManualSessionHandling=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){e.setManualSessionHandling(a)})},l.setEnabledEventSubmission=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(e.setEnabledEventSubmission(a),c.i("Event submission enabled")):(c.i("Event submission disabled"),e.setEnabledEventSubmission(a))})},l.setCustomDimension01=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension01(a,e.getAvailableCustomDimensions01()))return void c.w("Could not set custom01 dimension value to '"+a+"'. Value not found in available custom01 dimension values");e.setCustomDimension01(a)})},l.setCustomDimension02=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension02(a,e.getAvailableCustomDimensions02()))return void c.w("Could not set custom02 dimension value to '"+a+"'. Value not found in available custom02 dimension values");e.setCustomDimension02(a)})},l.setCustomDimension03=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension03(a,e.getAvailableCustomDimensions03()))return void c.w("Could not set custom03 dimension value to '"+a+"'. Value not found in available custom03 dimension values");e.setCustomDimension03(a)})},l.setFacebookId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){h.validateFacebookId(a)&&e.setFacebookId(a)})},l.setGender=function(c){void 0===c&&(c=a.EGAGender.Undefined),b.performTaskOnGAThread(function(){h.validateGender(c)&&e.setGender(c)})},l.setBirthYear=function(a){void 0===a&&(a=0),b.performTaskOnGAThread(function(){h.validateBirthyear(a)&&e.setBirthYear(a)})},l.setEventProcessInterval=function(a){b.performTaskOnGAThread(function(){b.setEventProcessInterval(a)})},l.startSession=function(){if(e.isInitialized()){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){e.isEnabled()&&e.sessionIsStarted()&&b.endSessionAndStopQueue(),l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)}},l.endSession=function(){l.onStop()},l.onStop=function(){b.performTaskOnGAThread(function(){try{b.endSessionAndStopQueue()}catch(a){}})},l.onResume=function(){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)},l.getCommandCenterValueAsString=function(a,b){return void 0===b&&(b=null),e.getConfigurationStringValue(a,b)},l.isCommandCenterReady=function(){return e.isCommandCenterReady()},l.addCommandCenterListener=function(a){e.addCommandCenterListener(a)},l.removeCommandCenterListener=function(a){e.removeCommandCenterListener(a)},l.getConfigurationsContentAsString=function(){return e.getConfigurationsContentAsString()},l.internalInitialize=function(){e.ensurePersistedStates(),d.setItem(e.DefaultUserIdKey,e.getDefaultId()),e.setInitialized(!0),l.newSession(),e.isEnabled()&&b.ensureEventQueueIsRunning()},l.newSession=function(){c.i("Starting a new session."),e.validateAndFixCurrentDimensions(),f.instance.requestInit(l.startNewSessionCallback)},l.startNewSessionCallback=function(a,f){if(a===i.Ok&&f){var g=0;if(f.server_ts){var h=f.server_ts;g=e.calculateServerTimeOffset(h)}f.time_offset=g,d.setItem(e.SdkConfigCachedKey,j.encode64(JSON.stringify(f))),e.instance.sdkConfigCached=f,e.instance.sdkConfig=f,e.instance.initAuthorized=!0}else a==i.Unauthorized?(c.w("Initialize SDK failed - Unauthorized"),e.instance.initAuthorized=!1):(a===i.NoResponse||a===i.RequestTimeout?c.i("Init call (session start) failed - no response. Could be offline or timeout."):a===i.BadResponse||a===i.JsonEncodeFailed||a===i.JsonDecodeFailed?c.i("Init call (session start) failed - bad response. Could be bad response from proxy or GA servers."):a!==i.BadRequest&&a!==i.UnknownResponseCode||c.i("Init call (session start) failed - bad request or unknown response."),null==e.instance.sdkConfig?null!=e.instance.sdkConfigCached?(c.i("Init call (session start) failed - using cached init values."),e.instance.sdkConfig=e.instance.sdkConfigCached):(c.i("Init call (session start) failed - using default init values."),e.instance.sdkConfig=e.instance.sdkConfigDefault):c.i("Init call (session start) failed - using cached init values."),e.instance.initAuthorized=!0);if(e.instance.clientServerTimeOffset=e.getSdkConfig().time_offset?e.getSdkConfig().time_offset:0,e.populateConfigurations(e.getSdkConfig()),!e.isEnabled())return c.w("Could not start session: SDK is disabled."),void b.stopEventQueue();b.ensureEventQueueIsRunning();var m=j.createGuid();e.instance.sessionId=m,e.instance.sessionStart=e.getClientTsAdjusted(),k.addSessionStartEvent();var n=b.getTimedBlockById(l.initTimedBlockId);null!=n&&(n.running=!1),l.initTimedBlockId=-1},l.resumeSessionAndStartQueue=function(){e.isInitialized()&&(c.i("Resuming session."),e.sessionIsStarted()||l.newSession())},l.isSdkReady=function(a,b,d){return void 0===b&&(b=!0),void 0===d&&(d=""),d&&(d+=": "),a&&!e.isInitialized()?(b&&c.w(d+"SDK is not initialized"),!1):a&&!e.isEnabled()?(b&&c.w(d+"SDK is disabled"),!1):!(a&&!e.sessionIsStarted())||(b&&c.w(d+"Session has not started yet"),!1)},l.initTimedBlockId=-1,l.methodMap={},l}();a.GameAnalytics=l}(s||(s={})),s.GameAnalytics.init();var t=(s.GameAnalytics.gaCommand,s),u=function(){function a(){}return a.prototype.setup=function(a,b,c){o.analyticsEnabled&&(t.GameAnalytics.initialize(a,b),t.GameAnalytics.configureBuild(c),t.GameAnalytics.startSession(),window.addEventListener("beforeunload",function(){t.GameAnalytics.endSession()}))},a.prototype.addProgressionEvent=function(a,b,c,d,e){o.analyticsEnabled&&t.GameAnalytics.addProgressionEvent(a,b,c,d,e)},a.prototype.addDesignEvent=function(a,b){o.analyticsEnabled&&t.GameAnalytics.addDesignEvent(a,b)},a}(),v=c(function(a,c){!function(c){a.exports=function(){return function a(c,d,e){function f(h,i){if(!d[h]){if(!c[h]){var j="function"==typeof b&&b;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=d[h]={exports:{}};c[h][0].call(l.exports,function(a){var b=c[h][1][a];return f(b||a)},l,l.exports,a,c,d,e)}return d[h].exports}for(var g="function"==typeof b&&b,h=0;h=t,w=d-(t-u),a.isPlaying()&&(v?(k(g,a._attachment,w),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,q),j(a,"beforeTween"),u=0?a:0-a}function k(a,b){var c,d,e,f,h,k;for(e=a,k=0;k<8;k++){if(f=g(e)-a,j(f)d)return d;for(;cf?c=e:d=e,e=.5*(d-c)+c}return e}var l=0,m=0,n=0,o=0,p=0,q=0;return n=3*b,m=3*(d-b)-n,l=1-n-m,q=3*c,p=3*(e-c)-q,o=1-q-p,function(a,b){return h(k(a,b))}(a,function(a){return 1/(200*a)}(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}d.setBezierFunction=function(a,c,e,f,g){var h=b(c,e,f,g);return h.displayName=a,h.x1=c,h.y1=e,h.x2=f,h.y2=g,d.prototype.formula[a]=h},d.unsetBezierFunction=function(a){delete d.prototype.formula[a]}}(),function(){function a(a,b,c,e,f,g){return d.tweenProps(e,b,a,c,1,g,f)}var b=new d;b._filterArgs=[],d.interpolate=function(c,e,f,g,h){var i=d.shallowCopy({},c),j=h||0,k=d.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=e,l[3]=k,d.applyFilter(b,"tweenCreated"),d.applyFilter(b,"beforeTween");var m=a(c,i,e,f,k,j);return d.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;ca.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Square:a("./square"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");c=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},c);var d;d=e.isString(b)?document.querySelector(b):b,this.path=d,this._opts=c,this._tweenable=null;var f=this.path.getTotalLength();this.path.style.strokeDasharray=f+" "+f,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing);b(this._calculateTo(a,c),this._opts.shape||this,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":9,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":9}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},c,!0),e.isObject(c)&&void 0!==c.svgStyle&&(this._opts.svgStyle=c.svgStyle),e.isObject(c)&&e.isObject(c.text)&&void 0!==c.text.style&&(this._opts.text.style=c.text.style);var f,g=this._createSvgView(this._opts);if(!(f=e.isString(b)?document.querySelector(b):b))throw new Error("Container does not exist: "+b);this._container=f,this._container.appendChild(g.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(g.svg,this._opts.svgStyle),this.svg=g.svg,this.path=g.path,this.trail=g.trail,this.text=null;var h=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(g.path,h),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};f.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.animate(a,b,c)},f.prototype.stop=function(){if(null===this._progressPath)throw new Error("Object is destroyed");void 0!==this._progressPath&&this._progressPath.stop()},f.prototype.destroy=function(){if(null===this._progressPath)throw new Error("Object is destroyed");this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},f.prototype.set=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.set(a)},f.prototype.value=function(){if(null===this._progressPath)throw new Error("Object is destroyed");return void 0===this._progressPath?0:this._progressPath.value()},f.prototype.setText=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},f.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},f.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},f.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},f.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},f.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},f.prototype._initializeTextContainer=function(a,b,c){},f.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=f},{"./path":5,"./utils":9}],8:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=100-a.strokeWidth/2;return e.render(this._pathTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2})},f.prototype._trailString=function(a){var b=100-a.strokeWidth/2;return e.render(this._trailTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2,startMargin:a.strokeWidth/2-a.trailWidth/2})},b.exports=f},{"./shape":7,"./utils":9}],9:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;eb&&b<=460)&&!(a<600&&b<850)},enumerable:!1,configurable:!0}),b.prototype.showBanner=function(){if(!this.bannerAllowed)return null;var a=document.getElementById("h5branding-ad");return a?(a.style.display="inline-flex",a):null},b.prototype.setScriptloadProgress=function(a,b){var c=.3*b/a;this.circleLoader.animate(c,null,function(){})},b.prototype.setLoadProgress=function(a){var b=this;if(this.loaded)if(a=30+.7*a,this.progress=a,100===a){var c=document.querySelector("#h5branding-button");this.circleLoader.animate(1,null,function(){!p.inGDGameZone()&&c&&!0===b.showPlayButton?c.style.display="block":(p.inGDGameZone()||!1===b.showPlayButton)&&b.onPlayButtonClick()})}else this.circleLoader.animate(a/100,null,function(){})},b.prototype.setButtonCallback=function(a){this.buttonCallback=a},b.prototype.onPlayButtonClick=function(){this.buttonCallback&&this.buttonCallback()},b.prototype.destroy=function(){var a=document.querySelector("#h5branding-container");null!==a&&null!==a.parentNode&&a.parentNode.removeChild(a)},b.prototype.getGameLogoUrl=function(a){var b=a+"-512x512.jpeg";return window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/"+b:"https://img.gamedistribution.com/"+b},b}(),x=t.EGAProgressionStatus,y=new q,z=new u;a.EGAProgressionStatus=x,a.google=y,a.gameanalytics=z,a.Utils=p,a.Domain=l,a.Branding=o,a.SplashLoader=w,Object.defineProperty(a,"__esModule",{value:!0})}),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Menu/TempleHall",["require","Phaser","../Common/Button","../Common/GoldButton","../Common/Navies","h5branding"],function(c){var d,e,f,g;return f=c("Phaser"),c("../Common/Button"),d=c("../Common/GoldButton"),e=c("../Common/Navies"),g=c("h5branding"),function(c){function h(b,c,i){this.layoutContent=a(this.layoutContent,this),this.update=a(this.update,this),this.createChar=a(this.createChar,this),this.domainAllowsExtenral=a(this.domainAllowsExtenral,this);var j,k,l,m,n,o,p,q,r,s,t,u,v;for(h.__super__.constructor.call(this,b,c,i),this.w=this.game.realWidth,this.h=this.game.realHeight,this.bkg=m=this.game.make.sprite(0,0,"TempleHall"),m.anchor.set(.5),this._scale=v=Math.max(this.w/m.width,this.h/m.height),m.scale.set(v),m.height/2>this.h/2&&(m.y=this.h/2-m.height/2),this.addChild(m),this.beams=l=[],k=7,r=s=0,u=k;0<=u?s<=u:s>=u;r=0<=u?++s:--s)j=this.game.make.sprite(0,0,"HallBeam"),j.anchor.set(.5,-.5),j.alpha=.6+.4*Math.random(),j.t_offset=2*(r-k/2)*Math.PI/k-Math.random()*Math.PI/6,j.t_speed=.6*Math.random(),j.blendMode=f.blendModes.SCREEN,j.cacheAsBitmap=!0,this.addChild(j),l.push(j);this.char1=o=this.createChar("fire"),this.addChild(o),o.scale.set(v),o.x=-this.w/4,o.y=this.h/2-2*o.height,this.char2=p=this.createChar("water"),p.scale.set(v),p.x=this.w/4,p.y=this.h/2-2*p.height,this.addChild(p),this.gameName=q=this.game.make.sprite(0,0,"GameName"),q.anchor.set(.5,.5),t=Math.min(1,.9*this.game.realWidth/q.width),q.scale.set(t),this.addChild(q),this.onStart=new f.Signal,this.playBtn=n=new d(this.game,0,0,this.game.lang.locale("Play"),function(a){return function(){return a.onStart.dispatch(b.progress.get("temples")[0])}}(this),40),this.addChild(n),this.domainAllowsExtenral()&&(this.moreBtn=n=new d(this.game,0,0,this.game.lang.locale("More Games"),function(a){return function(){return g.Branding.openCampaignLink("Ice Temple","more_games")}}(),30),this.addChild(n),this.walkthrouhgBtn=n=new d(this.game,0,0,this.game.lang.locale("Walkthrough"),function(a){return function(){return window.open("https://www.agame.com/game/fireboy--watergirl-3-the-ice-temple","_blank")}}(),30),this.addChild(n)),this.navies=new e(this.game,0,0),this.addChild(this.navies),this.layoutContent()}return b(h,c),h.prototype.domainAllowsExtenral=function(){var a;return!!g.Branding.outGoingLinksAllowed()&&(a=["playcell.com"],a.reduce(function(a){return function(a,b){return null!=document.referrer&&(a=a&&document.referrer.indexOf(b)<0),null!=window.location&&null!=window.location.hostname&&(a=a&&window.location.hostname.indexOf(b)<0),a}}(),!0))},h.prototype.createChar=function(a){var b,c,d,e;return b=this.game.make.sprite(0,0,"CharAssets","_default0000"),e=this.game.make.sprite(0,0,"CharAssets",a+"_legs_idle0000"),e.anchor.set(.5),d=this.game.make.sprite(0,0,"CharAssets"),d.animations.add("idle",f.Animation.generateFrameNames(a+"_head_idle",0,29,"",4),30,!0),d.animations.play("idle"),d.anchor.set(.5),c=this.game.make.sprite(0,0,"CharAssets",a+"_glow0000"),c.anchor.set(.5),c.y=40,b.addChild(c),b.addChild(e),b.addChild(d),b},h.prototype.update=function(){var a,b,c,d;for(this.t||(this.t=0),this.t+=.003,d=this.beams,b=0,c=d.length;bthis.h/2?this.bkg.y=this.h/2-this.bkg.height/2:this.bkg.y=0,this.char1.scale.set(g),this.char1.x=-this.w/4,this.char1.y=this.h/2-2*this.char1.height,this.char2.scale.set(g),this.char2.x=this.w/4,this.char2.y=this.h/2-2*this.char2.height,f=this.beams,b=0,c=f.length;b0&&(b+="&");var d=Array.isArray(a[c])?a[c].join(","):a[c];b+=c+"="+d}return"&cust_params="+encodeURIComponent(b)}return""},b.prototype.areAdsEnabled=function(){var a=this,b=document.createElement("div");b.innerHTML=" ",b.className="adsbox",b.style.position="absolute",b.style.fontSize="10px",document.body.appendChild(b);var c=function(){var a=!0;return 0===b.offsetHeight&&(a=!1),b.parentNode&&b.parentNode.removeChild(b),a};window.setTimeout(function(){a.adsEnabled=c()},100)},b}();!function(a){a.CONTENT_PAUSED="onContentPaused",a.CONTENT_RESUMED="onContentResumed",a.AD_PROGRESSION="onAdProgression",a.AD_DISABLED="onAdsDisabled",a.AD_CLICKED="onAdClicked",a.AD_REWARDED="onAdRewardGranted",a.BANNER_SHOWN="onBannerShown",a.BANNER_HIDDEN="onBannerHidden",a.AD_LOADED="onAdLoaded",a.AD_PROVIDER_LOADED="onAdProviderLoaded"}(a.AdEvents||(a.AdEvents={})),function(a){a[a.interstitial=0]="interstitial",a[a.rewarded=1]="rewarded",a[a.banner=2]="banner"}(a.AdType||(a.AdType={}));var p=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;return b.bannerActive=!1,b.provider=null,b}return b(c,a),c.prototype.setAdProvider=function(a){this.provider=a,this.provider.setManager(this)},c.prototype.showAd=function(a){for(var b=[],c=1;c=0;--c){var d=b[c].src,e=d.lastIndexOf("?"),f=-1==e?d.length:e;if("base.js"==d.substr(f-7,7))return void(goog.basePath=d.substr(0,f-7))}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.global.document;if("complete"==b.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load')}return b.write(' + + + + + + + + +
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl3/version.js b/fireboywatergirl3/version.js new file mode 100644 index 00000000..baf0780a --- /dev/null +++ b/fireboywatergirl3/version.js @@ -0,0 +1,2 @@ +version="tc-150"; +libs=["https://cdn.jsdelivr.net/npm/@azerion/phaser@2.6/build/phaser.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-cachebuster@2.0/build/phaser-cachebuster.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-spine@3.0/build/phaser-spine.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-super-storage@2.0/build/phaser-super-storage.min.js"]; \ No newline at end of file diff --git a/fireboywatergirl4/300.jpg b/fireboywatergirl4/300.jpg new file mode 100644 index 00000000..e17d79a2 Binary files /dev/null and b/fireboywatergirl4/300.jpg differ diff --git a/fireboywatergirl4/assets/atlasses/CharAssets.json b/fireboywatergirl4/assets/atlasses/CharAssets.json new file mode 100644 index 00000000..380af0be --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/CharAssets.json @@ -0,0 +1,1923 @@ +{"frames": [ + +{ + "filename": "_default0000", + "frame": {"x":2008,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "death_smoke0000", + "frame": {"x":116,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0001", + "frame": {"x":222,"y":1341,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0002", + "frame": {"x":1203,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0003", + "frame": {"x":1309,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0004", + "frame": {"x":1415,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0005", + "frame": {"x":1521,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0006", + "frame": {"x":1627,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0007", + "frame": {"x":1733,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0008", + "frame": {"x":1839,"y":1413,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0009", + "frame": {"x":518,"y":1430,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0010", + "frame": {"x":116,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0011", + "frame": {"x":222,"y":1452,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0012", + "frame": {"x":0,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0013", + "frame": {"x":969,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0014", + "frame": {"x":1075,"y":1457,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0015", + "frame": {"x":624,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0016", + "frame": {"x":730,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0017", + "frame": {"x":836,"y":1460,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0018", + "frame": {"x":328,"y":1462,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0019", + "frame": {"x":1181,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0020", + "frame": {"x":1287,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0021", + "frame": {"x":1393,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0022", + "frame": {"x":1499,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0023", + "frame": {"x":1605,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0024", + "frame": {"x":1711,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0025", + "frame": {"x":1817,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0026", + "frame": {"x":1923,"y":1524,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0027", + "frame": {"x":434,"y":1541,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0028", + "frame": {"x":106,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0029", + "frame": {"x":212,"y":1563,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0030", + "frame": {"x":0,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0031", + "frame": {"x":942,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0032", + "frame": {"x":1048,"y":1568,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0033", + "frame": {"x":540,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0034", + "frame": {"x":646,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0035", + "frame": {"x":752,"y":1571,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0036", + "frame": {"x":318,"y":1573,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0037", + "frame": {"x":1154,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0038", + "frame": {"x":1260,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0039", + "frame": {"x":1366,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0040", + "frame": {"x":1472,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0041", + "frame": {"x":1578,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0042", + "frame": {"x":1684,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0043", + "frame": {"x":1790,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "death_smoke0044", + "frame": {"x":1896,"y":1635,"w":102,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":107}, + "sourceSize": {"w":102,"h":107} +} +,{ + "filename": "diamond_fb0000", + "frame": {"x":1086,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "diamond_fbwg0000", + "frame": {"x":0,"y":1341,"w":112,"h":112}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":112,"h":112}, + "sourceSize": {"w":112,"h":112} +} +,{ + "filename": "diamond_silver0000", + "frame": {"x":848,"y":1339,"w":117,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":117,"h":117}, + "sourceSize": {"w":117,"h":117} +} +,{ + "filename": "diamond_wg0000", + "frame": {"x":969,"y":1339,"w":113,"h":114}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":114}, + "sourceSize": {"w":113,"h":114} +} +,{ + "filename": "fire_glow0000", + "frame": {"x":1944,"y":1266,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "fire_head_falling0000", + "frame": {"x":1340,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0001", + "frame": {"x":1474,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0002", + "frame": {"x":1608,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0003", + "frame": {"x":1742,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_falling0004", + "frame": {"x":1876,"y":800,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0000", + "frame": {"x":0,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0001", + "frame": {"x":134,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0002", + "frame": {"x":268,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0003", + "frame": {"x":402,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0004", + "frame": {"x":536,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0005", + "frame": {"x":670,"y":862,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0006", + "frame": {"x":804,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0007", + "frame": {"x":938,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0008", + "frame": {"x":1072,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0009", + "frame": {"x":1206,"y":892,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0010", + "frame": {"x":1340,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0011", + "frame": {"x":1474,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0012", + "frame": {"x":1608,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0013", + "frame": {"x":1742,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0014", + "frame": {"x":1876,"y":966,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0015", + "frame": {"x":0,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0016", + "frame": {"x":134,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0017", + "frame": {"x":268,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_idle0018", + "frame": {"x":402,"y":1028,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "fire_head_jumping0000", + "frame": {"x":536,"y":1028,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0001", + "frame": {"x":696,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0002", + "frame": {"x":856,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0003", + "frame": {"x":1016,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0004", + "frame": {"x":1176,"y":1058,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0005", + "frame": {"x":1336,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0006", + "frame": {"x":1496,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0007", + "frame": {"x":1656,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0008", + "frame": {"x":1816,"y":1132,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0009", + "frame": {"x":536,"y":1162,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_jumping0010", + "frame": {"x":696,"y":1192,"w":156,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":156,"h":130}, + "sourceSize": {"w":156,"h":130} +} +,{ + "filename": "fire_head_rising0000", + "frame": {"x":408,"y":1194,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0001", + "frame": {"x":518,"y":1296,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0002", + "frame": {"x":628,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0003", + "frame": {"x":738,"y":1326,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_head_rising0004", + "frame": {"x":408,"y":1328,"w":106,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":130}, + "sourceSize": {"w":106,"h":130} +} +,{ + "filename": "fire_ice_legs0000", + "frame": {"x":664,"y":1896,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0001", + "frame": {"x":148,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_ice_legs0002", + "frame": {"x":224,"y":1898,"w":72,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":88}, + "sourceSize": {"w":72,"h":88} +} +,{ + "filename": "fire_legs_idle0000", + "frame": {"x":134,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0000", + "frame": {"x":1024,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0001", + "frame": {"x":1158,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0002", + "frame": {"x":1292,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0003", + "frame": {"x":1426,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0004", + "frame": {"x":1560,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0005", + "frame": {"x":1694,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0006", + "frame": {"x":1828,"y":292,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_legs_running0007", + "frame": {"x":0,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "fire_stairs0000", + "frame": {"x":1962,"y":292,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0001", + "frame": {"x":328,"y":1341,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0002", + "frame": {"x":858,"y":1571,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0003", + "frame": {"x":424,"y":1652,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0004", + "frame": {"x":106,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0005", + "frame": {"x":181,"y":1674,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0006", + "frame": {"x":858,"y":1678,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0007", + "frame": {"x":0,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0008", + "frame": {"x":933,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0009", + "frame": {"x":1008,"y":1679,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0010", + "frame": {"x":499,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0011", + "frame": {"x":574,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0012", + "frame": {"x":649,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0013", + "frame": {"x":724,"y":1682,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0014", + "frame": {"x":256,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0015", + "frame": {"x":331,"y":1684,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0016", + "frame": {"x":1083,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0017", + "frame": {"x":1158,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0018", + "frame": {"x":1233,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0019", + "frame": {"x":1308,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0020", + "frame": {"x":1383,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0021", + "frame": {"x":1458,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0022", + "frame": {"x":1533,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0023", + "frame": {"x":1608,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0024", + "frame": {"x":1683,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0025", + "frame": {"x":1758,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0026", + "frame": {"x":1833,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0027", + "frame": {"x":1908,"y":1746,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0028", + "frame": {"x":406,"y":1759,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "fire_stairs0029", + "frame": {"x":75,"y":1781,"w":71,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":71,"h":103}, + "sourceSize": {"w":71,"h":103} +} +,{ + "filename": "water_glow0000", + "frame": {"x":1945,"y":1374,"w":94,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":94,"h":104}, + "sourceSize": {"w":94,"h":104} +} +,{ + "filename": "water_head_falling0000", + "frame": {"x":0,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0001", + "frame": {"x":134,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0002", + "frame": {"x":268,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0003", + "frame": {"x":402,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0004", + "frame": {"x":536,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0005", + "frame": {"x":670,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0006", + "frame": {"x":804,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0007", + "frame": {"x":938,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0008", + "frame": {"x":1072,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0009", + "frame": {"x":1206,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_falling0010", + "frame": {"x":1340,"y":0,"w":130,"h":204}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":204}, + "sourceSize": {"w":130,"h":204} +} +,{ + "filename": "water_head_idle0000", + "frame": {"x":1340,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0001", + "frame": {"x":1474,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0002", + "frame": {"x":1608,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0003", + "frame": {"x":1742,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0004", + "frame": {"x":1876,"y":468,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0005", + "frame": {"x":0,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0006", + "frame": {"x":134,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0007", + "frame": {"x":268,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0008", + "frame": {"x":402,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0009", + "frame": {"x":536,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0010", + "frame": {"x":670,"y":530,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0011", + "frame": {"x":804,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0012", + "frame": {"x":938,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0013", + "frame": {"x":1072,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0014", + "frame": {"x":1206,"y":560,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0015", + "frame": {"x":1340,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0016", + "frame": {"x":1474,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0017", + "frame": {"x":1608,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0018", + "frame": {"x":1742,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0019", + "frame": {"x":1876,"y":634,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0020", + "frame": {"x":0,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0021", + "frame": {"x":134,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0022", + "frame": {"x":268,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0023", + "frame": {"x":402,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0024", + "frame": {"x":536,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0025", + "frame": {"x":670,"y":696,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0026", + "frame": {"x":804,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0027", + "frame": {"x":938,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0028", + "frame": {"x":1072,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_idle0029", + "frame": {"x":1206,"y":726,"w":130,"h":162}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":162}, + "sourceSize": {"w":130,"h":162} +} +,{ + "filename": "water_head_jumping0000", + "frame": {"x":1474,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0001", + "frame": {"x":1652,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0002", + "frame": {"x":1830,"y":0,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0003", + "frame": {"x":1474,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0004", + "frame": {"x":1652,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0005", + "frame": {"x":1830,"y":146,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0006", + "frame": {"x":0,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0007", + "frame": {"x":178,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0008", + "frame": {"x":356,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0009", + "frame": {"x":534,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_jumping0010", + "frame": {"x":712,"y":208,"w":174,"h":142}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":174,"h":142}, + "sourceSize": {"w":174,"h":142} +} +,{ + "filename": "water_head_rising0000", + "frame": {"x":856,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0001", + "frame": {"x":992,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0002", + "frame": {"x":1128,"y":1192,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0003", + "frame": {"x":0,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0004", + "frame": {"x":136,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0005", + "frame": {"x":272,"y":1194,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0006", + "frame": {"x":1264,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0007", + "frame": {"x":1400,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0008", + "frame": {"x":1536,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0009", + "frame": {"x":1672,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_head_rising0010", + "frame": {"x":1808,"y":1266,"w":132,"h":143}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":132,"h":143}, + "sourceSize": {"w":132,"h":143} +} +,{ + "filename": "water_ice_legs0000", + "frame": {"x":1976,"y":1132,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0001", + "frame": {"x":150,"y":1781,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_ice_legs0002", + "frame": {"x":799,"y":1785,"w":66,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":110}, + "sourceSize": {"w":66,"h":110} +} +,{ + "filename": "water_legs_idle0000", + "frame": {"x":890,"y":208,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0000", + "frame": {"x":268,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0001", + "frame": {"x":402,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0002", + "frame": {"x":536,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0003", + "frame": {"x":670,"y":354,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0004", + "frame": {"x":804,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0005", + "frame": {"x":938,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0006", + "frame": {"x":1072,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_legs_running0007", + "frame": {"x":1206,"y":384,"w":130,"h":172}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":172}, + "sourceSize": {"w":130,"h":172} +} +,{ + "filename": "water_stairs0000", + "frame": {"x":0,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0001", + "frame": {"x":869,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0002", + "frame": {"x":943,"y":1786,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0003", + "frame": {"x":481,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0004", + "frame": {"x":555,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0005", + "frame": {"x":629,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0006", + "frame": {"x":703,"y":1789,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0007", + "frame": {"x":220,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0008", + "frame": {"x":294,"y":1791,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0009", + "frame": {"x":1017,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0010", + "frame": {"x":1091,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0011", + "frame": {"x":1165,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0012", + "frame": {"x":1239,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0013", + "frame": {"x":1313,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0014", + "frame": {"x":1387,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0015", + "frame": {"x":1461,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0016", + "frame": {"x":1535,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0017", + "frame": {"x":1609,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0018", + "frame": {"x":1683,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0019", + "frame": {"x":1757,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0020", + "frame": {"x":1831,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0021", + "frame": {"x":1905,"y":1853,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0022", + "frame": {"x":368,"y":1866,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0023", + "frame": {"x":74,"y":1888,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0024", + "frame": {"x":0,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0025", + "frame": {"x":869,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0026", + "frame": {"x":943,"y":1893,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0027", + "frame": {"x":442,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0028", + "frame": {"x":516,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +} +,{ + "filename": "water_stairs0029", + "frame": {"x":590,"y":1896,"w":70,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":70,"h":103}, + "sourceSize": {"w":70,"h":103} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "CharAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/CharAssets.png b/fireboywatergirl4/assets/atlasses/CharAssets.png new file mode 100644 index 00000000..a9ffd160 Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/CharAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/GroundAssets.json b/fireboywatergirl4/assets/atlasses/GroundAssets.json new file mode 100644 index 00000000..3ed6f9b2 --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/GroundAssets.json @@ -0,0 +1,2755 @@ +{"frames": [ + +{ + "filename": "BeamDust0000", + "frame": {"x":0,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0001", + "frame": {"x":58,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0002", + "frame": {"x":116,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0003", + "frame": {"x":174,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0004", + "frame": {"x":232,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0005", + "frame": {"x":290,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0006", + "frame": {"x":348,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0007", + "frame": {"x":406,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0008", + "frame": {"x":464,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0009", + "frame": {"x":522,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0010", + "frame": {"x":580,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0011", + "frame": {"x":638,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0012", + "frame": {"x":696,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0013", + "frame": {"x":754,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0014", + "frame": {"x":812,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0015", + "frame": {"x":870,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0016", + "frame": {"x":928,"y":0,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0017", + "frame": {"x":0,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0018", + "frame": {"x":58,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0019", + "frame": {"x":116,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0020", + "frame": {"x":174,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0021", + "frame": {"x":232,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0022", + "frame": {"x":290,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0023", + "frame": {"x":348,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0024", + "frame": {"x":406,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0025", + "frame": {"x":464,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0026", + "frame": {"x":522,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0027", + "frame": {"x":580,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0028", + "frame": {"x":638,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0029", + "frame": {"x":696,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0030", + "frame": {"x":754,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0031", + "frame": {"x":812,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0032", + "frame": {"x":870,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0033", + "frame": {"x":928,"y":57,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0034", + "frame": {"x":0,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0035", + "frame": {"x":58,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0036", + "frame": {"x":116,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0037", + "frame": {"x":174,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0038", + "frame": {"x":232,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0039", + "frame": {"x":290,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0040", + "frame": {"x":348,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0041", + "frame": {"x":406,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0042", + "frame": {"x":464,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0043", + "frame": {"x":522,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0044", + "frame": {"x":580,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0045", + "frame": {"x":638,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0046", + "frame": {"x":696,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0047", + "frame": {"x":754,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0048", + "frame": {"x":812,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0049", + "frame": {"x":870,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0050", + "frame": {"x":928,"y":114,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0051", + "frame": {"x":0,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0052", + "frame": {"x":58,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0053", + "frame": {"x":116,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0054", + "frame": {"x":174,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0055", + "frame": {"x":232,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0056", + "frame": {"x":290,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0057", + "frame": {"x":348,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0058", + "frame": {"x":406,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamDust0059", + "frame": {"x":464,"y":171,"w":54,"h":53}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":53}, + "sourceSize": {"w":54,"h":53} +} +,{ + "filename": "BeamGradient0000", + "frame": {"x":522,"y":171,"w":10,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":10,"h":20}, + "sourceSize": {"w":10,"h":20} +} +,{ + "filename": "BlackBox0000", + "frame": {"x":536,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0001", + "frame": {"x":590,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0002", + "frame": {"x":644,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0003", + "frame": {"x":698,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0004", + "frame": {"x":752,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0005", + "frame": {"x":806,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0006", + "frame": {"x":860,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0007", + "frame": {"x":914,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0008", + "frame": {"x":968,"y":171,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0009", + "frame": {"x":0,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0010", + "frame": {"x":54,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0011", + "frame": {"x":108,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0012", + "frame": {"x":162,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0013", + "frame": {"x":216,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBox0014", + "frame": {"x":270,"y":228,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "BlackBoxLeft0000", + "frame": {"x":324,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0001", + "frame": {"x":378,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0002", + "frame": {"x":432,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0003", + "frame": {"x":486,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0004", + "frame": {"x":540,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0005", + "frame": {"x":594,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0006", + "frame": {"x":648,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0007", + "frame": {"x":702,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0008", + "frame": {"x":756,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0009", + "frame": {"x":810,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0010", + "frame": {"x":864,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0011", + "frame": {"x":918,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0012", + "frame": {"x":972,"y":228,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0013", + "frame": {"x":0,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxLeft0014", + "frame": {"x":54,"y":282,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "BlackBoxRight0000", + "frame": {"x":108,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0001", + "frame": {"x":162,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0002", + "frame": {"x":216,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0003", + "frame": {"x":270,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0004", + "frame": {"x":324,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0005", + "frame": {"x":378,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0006", + "frame": {"x":432,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0007", + "frame": {"x":486,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0008", + "frame": {"x":540,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0009", + "frame": {"x":594,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0010", + "frame": {"x":648,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0011", + "frame": {"x":702,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0012", + "frame": {"x":756,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0013", + "frame": {"x":810,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "BlackBoxRight0014", + "frame": {"x":864,"y":282,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "DarkDisk0000", + "frame": {"x":0,"y":329,"w":301,"h":300}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":301,"h":300}, + "sourceSize": {"w":301,"h":300} +} +,{ + "filename": "Dust0000", + "frame": {"x":305,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0001", + "frame": {"x":422,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0002", + "frame": {"x":539,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0003", + "frame": {"x":656,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0004", + "frame": {"x":773,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0005", + "frame": {"x":890,"y":329,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0006", + "frame": {"x":0,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0007", + "frame": {"x":117,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0008", + "frame": {"x":234,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0009", + "frame": {"x":351,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0010", + "frame": {"x":468,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0011", + "frame": {"x":585,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0012", + "frame": {"x":702,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0013", + "frame": {"x":819,"y":633,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0014", + "frame": {"x":0,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0015", + "frame": {"x":117,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0016", + "frame": {"x":234,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0017", + "frame": {"x":351,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0018", + "frame": {"x":468,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0019", + "frame": {"x":585,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0020", + "frame": {"x":702,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0021", + "frame": {"x":819,"y":736,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0022", + "frame": {"x":0,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0023", + "frame": {"x":117,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0024", + "frame": {"x":234,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0025", + "frame": {"x":351,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0026", + "frame": {"x":468,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0027", + "frame": {"x":585,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0028", + "frame": {"x":702,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0029", + "frame": {"x":819,"y":839,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0030", + "frame": {"x":0,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0031", + "frame": {"x":117,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0032", + "frame": {"x":234,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0033", + "frame": {"x":351,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0034", + "frame": {"x":468,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0035", + "frame": {"x":585,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0036", + "frame": {"x":702,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0037", + "frame": {"x":819,"y":942,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0038", + "frame": {"x":0,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0039", + "frame": {"x":117,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0040", + "frame": {"x":234,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0041", + "frame": {"x":351,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0042", + "frame": {"x":468,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0043", + "frame": {"x":585,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0044", + "frame": {"x":702,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0045", + "frame": {"x":819,"y":1045,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0046", + "frame": {"x":0,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0047", + "frame": {"x":117,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0048", + "frame": {"x":234,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0049", + "frame": {"x":351,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0050", + "frame": {"x":468,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0051", + "frame": {"x":585,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0052", + "frame": {"x":702,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0053", + "frame": {"x":819,"y":1148,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0054", + "frame": {"x":0,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0055", + "frame": {"x":117,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0056", + "frame": {"x":234,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0057", + "frame": {"x":351,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0058", + "frame": {"x":468,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "Dust0059", + "frame": {"x":585,"y":1251,"w":113,"h":99}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":99}, + "sourceSize": {"w":113,"h":99} +} +,{ + "filename": "FireBox0000", + "frame": {"x":702,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0001", + "frame": {"x":756,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0002", + "frame": {"x":810,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0003", + "frame": {"x":864,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0004", + "frame": {"x":918,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0005", + "frame": {"x":972,"y":1251,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0006", + "frame": {"x":0,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0007", + "frame": {"x":54,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0008", + "frame": {"x":108,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0009", + "frame": {"x":162,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0010", + "frame": {"x":216,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0011", + "frame": {"x":270,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0012", + "frame": {"x":324,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0013", + "frame": {"x":378,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBox0014", + "frame": {"x":432,"y":1354,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "FireBoxLeft0000", + "frame": {"x":486,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0001", + "frame": {"x":540,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0002", + "frame": {"x":594,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0003", + "frame": {"x":648,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0004", + "frame": {"x":702,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0005", + "frame": {"x":756,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0006", + "frame": {"x":810,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0007", + "frame": {"x":864,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0008", + "frame": {"x":918,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0009", + "frame": {"x":972,"y":1354,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0010", + "frame": {"x":0,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0011", + "frame": {"x":54,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0012", + "frame": {"x":108,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0013", + "frame": {"x":162,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxLeft0014", + "frame": {"x":216,"y":1408,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "FireBoxRight0000", + "frame": {"x":270,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0001", + "frame": {"x":324,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0002", + "frame": {"x":378,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0003", + "frame": {"x":432,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0004", + "frame": {"x":486,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0005", + "frame": {"x":540,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0006", + "frame": {"x":594,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0007", + "frame": {"x":648,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0008", + "frame": {"x":702,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0009", + "frame": {"x":756,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0010", + "frame": {"x":810,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0011", + "frame": {"x":864,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0012", + "frame": {"x":918,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0013", + "frame": {"x":972,"y":1408,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FireBoxRight0014", + "frame": {"x":0,"y":1456,"w":50,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":44}, + "sourceSize": {"w":50,"h":44} +} +,{ + "filename": "FreezeEffect0000", + "frame": {"x":54,"y":1456,"w":98,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":98,"h":100}, + "sourceSize": {"w":98,"h":100} +} +,{ + "filename": "GreenBox0000", + "frame": {"x":156,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0001", + "frame": {"x":210,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0002", + "frame": {"x":264,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0003", + "frame": {"x":318,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0004", + "frame": {"x":372,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0005", + "frame": {"x":426,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0006", + "frame": {"x":480,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0007", + "frame": {"x":534,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0008", + "frame": {"x":588,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0009", + "frame": {"x":642,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0010", + "frame": {"x":696,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0011", + "frame": {"x":750,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0012", + "frame": {"x":804,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0013", + "frame": {"x":858,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBox0014", + "frame": {"x":912,"y":1456,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "GreenBoxLeft0000", + "frame": {"x":966,"y":1456,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0001", + "frame": {"x":0,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0002", + "frame": {"x":54,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0003", + "frame": {"x":108,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0004", + "frame": {"x":162,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0005", + "frame": {"x":216,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0006", + "frame": {"x":270,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0007", + "frame": {"x":324,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0008", + "frame": {"x":378,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0009", + "frame": {"x":432,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0010", + "frame": {"x":486,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0011", + "frame": {"x":540,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0012", + "frame": {"x":594,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0013", + "frame": {"x":648,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxLeft0014", + "frame": {"x":702,"y":1560,"w":50,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":42}, + "sourceSize": {"w":50,"h":42} +} +,{ + "filename": "GreenBoxRight0000", + "frame": {"x":756,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0001", + "frame": {"x":810,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0002", + "frame": {"x":864,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0003", + "frame": {"x":918,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0004", + "frame": {"x":972,"y":1560,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0005", + "frame": {"x":0,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0006", + "frame": {"x":54,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0007", + "frame": {"x":108,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0008", + "frame": {"x":162,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0009", + "frame": {"x":216,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0010", + "frame": {"x":270,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0011", + "frame": {"x":324,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0012", + "frame": {"x":378,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0013", + "frame": {"x":432,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "GreenBoxRight0014", + "frame": {"x":486,"y":1607,"w":50,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":43}, + "sourceSize": {"w":50,"h":43} +} +,{ + "filename": "IceBox0000", + "frame": {"x":540,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxLeft0000", + "frame": {"x":590,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "IceBoxRight0000", + "frame": {"x":640,"y":1607,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "MaskBox00000", + "frame": {"x":690,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00001", + "frame": {"x":728,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00002", + "frame": {"x":766,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox00003", + "frame": {"x":804,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox10000", + "frame": {"x":842,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox20000", + "frame": {"x":880,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox30000", + "frame": {"x":918,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox40000", + "frame": {"x":956,"y":1607,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "MaskBox50000", + "frame": {"x":0,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox60000", + "frame": {"x":39,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox70000", + "frame": {"x":78,"y":1657,"w":35,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":35}, + "sourceSize": {"w":35,"h":35} +} +,{ + "filename": "MaskBox80000", + "frame": {"x":117,"y":1657,"w":36,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":34}, + "sourceSize": {"w":36,"h":34} +} +,{ + "filename": "MaskBox90000", + "frame": {"x":157,"y":1657,"w":35,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":34}, + "sourceSize": {"w":35,"h":34} +} +,{ + "filename": "SnowFlat0000", + "frame": {"x":196,"y":1657,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "SnowSlope0000", + "frame": {"x":260,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "SnowSlope0001", + "frame": {"x":314,"y":1657,"w":50,"h":51}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":51}, + "sourceSize": {"w":50,"h":51} +} +,{ + "filename": "WaterBox0000", + "frame": {"x":368,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0001", + "frame": {"x":418,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0002", + "frame": {"x":468,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0003", + "frame": {"x":518,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0004", + "frame": {"x":568,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0005", + "frame": {"x":618,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0006", + "frame": {"x":668,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0007", + "frame": {"x":718,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0008", + "frame": {"x":768,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0009", + "frame": {"x":818,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0010", + "frame": {"x":868,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0011", + "frame": {"x":918,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0012", + "frame": {"x":968,"y":1657,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0013", + "frame": {"x":0,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBox0014", + "frame": {"x":50,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0000", + "frame": {"x":100,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0001", + "frame": {"x":150,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0002", + "frame": {"x":200,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0003", + "frame": {"x":250,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0004", + "frame": {"x":300,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0005", + "frame": {"x":350,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0006", + "frame": {"x":400,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0007", + "frame": {"x":450,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0008", + "frame": {"x":500,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0009", + "frame": {"x":550,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0010", + "frame": {"x":600,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0011", + "frame": {"x":650,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0012", + "frame": {"x":700,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0013", + "frame": {"x":750,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxLeft0014", + "frame": {"x":800,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0000", + "frame": {"x":850,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0001", + "frame": {"x":900,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0002", + "frame": {"x":950,"y":1721,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0003", + "frame": {"x":0,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0004", + "frame": {"x":50,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0005", + "frame": {"x":100,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0006", + "frame": {"x":150,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0007", + "frame": {"x":200,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0008", + "frame": {"x":250,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0009", + "frame": {"x":300,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0010", + "frame": {"x":350,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0011", + "frame": {"x":400,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0012", + "frame": {"x":450,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0013", + "frame": {"x":500,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "WaterBoxRight0014", + "frame": {"x":550,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "_default0000", + "frame": {"x":600,"y":1772,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "frost0000", + "frame": {"x":638,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0001", + "frame": {"x":688,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0002", + "frame": {"x":738,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0003", + "frame": {"x":788,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0004", + "frame": {"x":838,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0005", + "frame": {"x":888,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0006", + "frame": {"x":938,"y":1772,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0007", + "frame": {"x":0,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0008", + "frame": {"x":50,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "frost0009", + "frame": {"x":100,"y":1823,"w":46,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":47}, + "sourceSize": {"w":46,"h":47} +} +,{ + "filename": "vapor0000", + "frame": {"x":150,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0001", + "frame": {"x":235,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0002", + "frame": {"x":320,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0003", + "frame": {"x":405,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0004", + "frame": {"x":490,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0005", + "frame": {"x":575,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0006", + "frame": {"x":660,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0007", + "frame": {"x":745,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0008", + "frame": {"x":830,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +} +,{ + "filename": "vapor0009", + "frame": {"x":915,"y":1823,"w":81,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":81,"h":86}, + "sourceSize": {"w":81,"h":86} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "GroundAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/GroundAssets.png b/fireboywatergirl4/assets/atlasses/GroundAssets.png new file mode 100644 index 00000000..cfe894e9 Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/GroundAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/MechAssets.json b/fireboywatergirl4/assets/atlasses/MechAssets.json new file mode 100644 index 00000000..b29d99ce --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/MechAssets.json @@ -0,0 +1,1315 @@ +{"frames": [ + +{ + "filename": "BackgroundCover0000", + "frame": {"x":0,"y":0,"w":32,"h":32}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":32}, + "sourceSize": {"w":32,"h":32} +} +,{ + "filename": "BarCapLeft0000", + "frame": {"x":1696,"y":0,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "BarCapRight0000", + "frame": {"x":1746,"y":0,"w":48,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":46}, + "sourceSize": {"w":48,"h":46} +} +,{ + "filename": "BarCenter0000", + "frame": {"x":1798,"y":0,"w":108,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":48}, + "sourceSize": {"w":108,"h":48} +} +,{ + "filename": "BoxMirror0000", + "frame": {"x":764,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "SliderDot0000", + "frame": {"x":1433,"y":1058,"w":33,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":33}, + "sourceSize": {"w":33,"h":33} +} +,{ + "filename": "SliderTrack0000", + "frame": {"x":1470,"y":1058,"w":218,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":19}, + "sourceSize": {"w":218,"h":19} +} +,{ + "filename": "WindowCenter0000", + "frame": {"x":264,"y":1802,"w":108,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":46}, + "sourceSize": {"w":108,"h":46} +} +,{ + "filename": "WindowLeft0000", + "frame": {"x":376,"y":1802,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "WindowRight0000", + "frame": {"x":426,"y":1802,"w":46,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":46}, + "sourceSize": {"w":46,"h":46} +} +,{ + "filename": "_default0000", + "frame": {"x":836,"y":0,"w":34,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":34}, + "sourceSize": {"w":34,"h":34} +} +,{ + "filename": "ball0000", + "frame": {"x":36,"y":0,"w":40,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":40}, + "sourceSize": {"w":40,"h":40} +} +,{ + "filename": "beamer0000", + "frame": {"x":422,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_off0000", + "frame": {"x":536,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "beamer_light_on0000", + "frame": {"x":650,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "hanging_anchor0000", + "frame": {"x":389,"y":860,"w":38,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":38,"h":35}, + "sourceSize": {"w":38,"h":35} +} +,{ + "filename": "hanging_base0000", + "frame": {"x":431,"y":860,"w":32,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":28}, + "sourceSize": {"w":32,"h":28} +} +,{ + "filename": "hanging_platform0000", + "frame": {"x":467,"y":860,"w":142,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":22}, + "sourceSize": {"w":142,"h":22} +} +,{ + "filename": "infinitemirror0000", + "frame": {"x":125,"y":1058,"w":130,"h":130}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":130}, + "sourceSize": {"w":130,"h":130} +} +,{ + "filename": "infinitemirror_light_off0000", + "frame": {"x":259,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "lever_base0000", + "frame": {"x":874,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lever_base_light_off0000", + "frame": {"x":988,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_base_light_on0000", + "frame": {"x":1100,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick0000", + "frame": {"x":1212,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_off0000", + "frame": {"x":1324,"y":0,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "lever_stick_light_on0000", + "frame": {"x":1436,"y":0,"w":106,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":106,"h":164}, + "sourceSize": {"w":106,"h":164} +} +,{ + "filename": "lightpusher_base0000", + "frame": {"x":80,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_off0000", + "frame": {"x":194,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "lightpusher_light_on0000", + "frame": {"x":308,"y":0,"w":110,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":110}, + "sourceSize": {"w":110,"h":110} +} +,{ + "filename": "moving_platform_light_off0000", + "frame": {"x":1910,"y":0,"w":138,"h":26}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":26}, + "sourceSize": {"w":138,"h":26} +} +,{ + "filename": "moving_platform_light_on0000", + "frame": {"x":0,"y":168,"w":142,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":142,"h":34}, + "sourceSize": {"w":142,"h":34} +} +,{ + "filename": "movingbox0000", + "frame": {"x":1546,"y":0,"w":74,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":74,"h":76}, + "sourceSize": {"w":74,"h":76} +} +,{ + "filename": "movingbox20000", + "frame": {"x":1624,"y":0,"w":68,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":69}, + "sourceSize": {"w":68,"h":69} +} +,{ + "filename": "portal0000", + "frame": {"x":146,"y":168,"w":82,"h":166}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":166}, + "sourceSize": {"w":82,"h":166} +} +,{ + "filename": "portal_center0000", + "frame": {"x":232,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0001", + "frame": {"x":318,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0002", + "frame": {"x":404,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0003", + "frame": {"x":490,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0004", + "frame": {"x":576,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0005", + "frame": {"x":662,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0006", + "frame": {"x":748,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0007", + "frame": {"x":834,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0008", + "frame": {"x":920,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0009", + "frame": {"x":1006,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0010", + "frame": {"x":1092,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0011", + "frame": {"x":1178,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0012", + "frame": {"x":1264,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0013", + "frame": {"x":1350,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0014", + "frame": {"x":1436,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0015", + "frame": {"x":1522,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0016", + "frame": {"x":1608,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0017", + "frame": {"x":1694,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0018", + "frame": {"x":1780,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0019", + "frame": {"x":1866,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0020", + "frame": {"x":1952,"y":168,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0021", + "frame": {"x":0,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0022", + "frame": {"x":86,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0023", + "frame": {"x":172,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0024", + "frame": {"x":258,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0025", + "frame": {"x":344,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0026", + "frame": {"x":430,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0027", + "frame": {"x":516,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0028", + "frame": {"x":602,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0029", + "frame": {"x":688,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0030", + "frame": {"x":774,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0031", + "frame": {"x":860,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0032", + "frame": {"x":946,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0033", + "frame": {"x":1032,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0034", + "frame": {"x":1118,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0035", + "frame": {"x":1204,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0036", + "frame": {"x":1290,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0037", + "frame": {"x":1376,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0038", + "frame": {"x":1462,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_center0039", + "frame": {"x":1548,"y":338,"w":82,"h":164}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":164}, + "sourceSize": {"w":82,"h":164} +} +,{ + "filename": "portal_glow0000", + "frame": {"x":1634,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0001", + "frame": {"x":1790,"y":338,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0002", + "frame": {"x":0,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0003", + "frame": {"x":156,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0004", + "frame": {"x":312,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0005", + "frame": {"x":468,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0006", + "frame": {"x":624,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0007", + "frame": {"x":780,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0008", + "frame": {"x":936,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0009", + "frame": {"x":1092,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0010", + "frame": {"x":1248,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0011", + "frame": {"x":1404,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0012", + "frame": {"x":1560,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0013", + "frame": {"x":1716,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0014", + "frame": {"x":1872,"y":512,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0015", + "frame": {"x":0,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0016", + "frame": {"x":156,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0017", + "frame": {"x":312,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0018", + "frame": {"x":468,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0019", + "frame": {"x":624,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0020", + "frame": {"x":780,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0021", + "frame": {"x":936,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0022", + "frame": {"x":1092,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0023", + "frame": {"x":1248,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0024", + "frame": {"x":1404,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0025", + "frame": {"x":1560,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0026", + "frame": {"x":1716,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0027", + "frame": {"x":1872,"y":686,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0028", + "frame": {"x":0,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_glow0029", + "frame": {"x":156,"y":860,"w":152,"h":170}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":152,"h":170}, + "sourceSize": {"w":152,"h":170} +} +,{ + "filename": "portal_light_off0000", + "frame": {"x":312,"y":860,"w":29,"h":187}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":187}, + "sourceSize": {"w":29,"h":187} +} +,{ + "filename": "portal_light_on0000", + "frame": {"x":345,"y":860,"w":40,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":40,"h":194}, + "sourceSize": {"w":40,"h":194} +} +,{ + "filename": "pulley_anchor0000", + "frame": {"x":613,"y":860,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "pulley_base0000", + "frame": {"x":667,"y":860,"w":104,"h":158}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":158}, + "sourceSize": {"w":104,"h":158} +} +,{ + "filename": "pulley_platform0000", + "frame": {"x":775,"y":860,"w":102,"h":22}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":22}, + "sourceSize": {"w":102,"h":22} +} +,{ + "filename": "pulley_rope0000", + "frame": {"x":881,"y":860,"w":82,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":82,"h":19}, + "sourceSize": {"w":82,"h":19} +} +,{ + "filename": "pusher_block0000", + "frame": {"x":967,"y":860,"w":110,"h":86}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":86}, + "sourceSize": {"w":110,"h":86} +} +,{ + "filename": "pusher_block_light0000", + "frame": {"x":1081,"y":860,"w":64,"h":62}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":64,"h":62}, + "sourceSize": {"w":64,"h":62} +} +,{ + "filename": "pusher_block_silver0000", + "frame": {"x":1149,"y":860,"w":110,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":110,"h":87}, + "sourceSize": {"w":110,"h":87} +} +,{ + "filename": "roman_bar0000", + "frame": {"x":1753,"y":860,"w":116,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":116,"h":30}, + "sourceSize": {"w":116,"h":30} +} +,{ + "filename": "roman_base0000", + "frame": {"x":1873,"y":860,"w":138,"h":194}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":138,"h":194}, + "sourceSize": {"w":138,"h":194} +} +,{ + "filename": "roman_center0000", + "frame": {"x":0,"y":1058,"w":44,"h":42}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":44,"h":42}, + "sourceSize": {"w":44,"h":42} +} +,{ + "filename": "roman_end0000", + "frame": {"x":48,"y":1058,"w":73,"h":30}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":73,"h":30}, + "sourceSize": {"w":73,"h":30} +} +,{ + "filename": "rotmirror0000", + "frame": {"x":513,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_circle0000", + "frame": {"x":767,"y":1058,"w":154,"h":154}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":154,"h":154}, + "sourceSize": {"w":154,"h":154} +} +,{ + "filename": "rotmirror_light_off0000", + "frame": {"x":925,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "rotmirror_light_on0000", + "frame": {"x":1179,"y":1058,"w":250,"h":250}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":250,"h":250}, + "sourceSize": {"w":250,"h":250} +} +,{ + "filename": "slider_light_off0000", + "frame": {"x":1692,"y":1058,"w":20,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":20,"h":20}, + "sourceSize": {"w":20,"h":20} +} +,{ + "filename": "slider_light_on0000", + "frame": {"x":1716,"y":1058,"w":55,"h":57}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":57}, + "sourceSize": {"w":55,"h":57} +} +,{ + "filename": "timed_pusher_base0000", + "frame": {"x":1263,"y":860,"w":124,"h":152}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":152}, + "sourceSize": {"w":124,"h":152} +} +,{ + "filename": "timed_pusher_base_old0000", + "frame": {"x":1391,"y":860,"w":124,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":124,"h":124}, + "sourceSize": {"w":124,"h":124} +} +,{ + "filename": "timed_pusher_light_off0000", + "frame": {"x":1519,"y":860,"w":108,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":108,"h":108}, + "sourceSize": {"w":108,"h":108} +} +,{ + "filename": "timed_pusher_light_on0000", + "frame": {"x":1631,"y":860,"w":118,"h":148}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":148}, + "sourceSize": {"w":118,"h":148} +} +,{ + "filename": "wind_base0000", + "frame": {"x":1775,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0001", + "frame": {"x":1897,"y":1058,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0002", + "frame": {"x":0,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base0003", + "frame": {"x":122,"y":1312,"w":118,"h":80}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":80}, + "sourceSize": {"w":118,"h":80} +} +,{ + "filename": "wind_base_light_off0000", + "frame": {"x":244,"y":1312,"w":32,"h":34}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":34}, + "sourceSize": {"w":32,"h":34} +} +,{ + "filename": "wind_base_light_on0000", + "frame": {"x":280,"y":1312,"w":46,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":46,"h":48}, + "sourceSize": {"w":46,"h":48} +} +,{ + "filename": "wind_effect0000", + "frame": {"x":330,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0001", + "frame": {"x":462,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0002", + "frame": {"x":594,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0003", + "frame": {"x":726,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0004", + "frame": {"x":858,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0005", + "frame": {"x":990,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0006", + "frame": {"x":1122,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0007", + "frame": {"x":1254,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0008", + "frame": {"x":1386,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0009", + "frame": {"x":1518,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0010", + "frame": {"x":1650,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0011", + "frame": {"x":1782,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0012", + "frame": {"x":1914,"y":1312,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0013", + "frame": {"x":0,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0014", + "frame": {"x":132,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0015", + "frame": {"x":264,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0016", + "frame": {"x":396,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0017", + "frame": {"x":528,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0018", + "frame": {"x":660,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0019", + "frame": {"x":792,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0020", + "frame": {"x":924,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0021", + "frame": {"x":1056,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0022", + "frame": {"x":1188,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0023", + "frame": {"x":1320,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0024", + "frame": {"x":1452,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0025", + "frame": {"x":1584,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0026", + "frame": {"x":1716,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0027", + "frame": {"x":1848,"y":1557,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0028", + "frame": {"x":0,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +} +,{ + "filename": "wind_effect0029", + "frame": {"x":132,"y":1802,"w":128,"h":241}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":241}, + "sourceSize": {"w":128,"h":241} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MechAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/MechAssets.png b/fireboywatergirl4/assets/atlasses/MechAssets.png new file mode 100644 index 00000000..ded17b3b Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/MechAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/MenuAssets.json b/fireboywatergirl4/assets/atlasses/MenuAssets.json new file mode 100644 index 00000000..c1507870 --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/MenuAssets.json @@ -0,0 +1,499 @@ +{"frames": [ + +{ + "filename": "AppStoreText0000", + "frame": {"x":246,"y":593,"w":279,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":279,"h":48}, + "sourceSize": {"w":279,"h":48} +} +,{ + "filename": "BackButton0000", + "frame": {"x":928,"y":0,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButton0001", + "frame": {"x":928,"y":127,"w":79,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":79,"h":123}, + "sourceSize": {"w":79,"h":123} +} +,{ + "filename": "BackButtonFull0000", + "frame": {"x":512,"y":0,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "BackButtonFull0001", + "frame": {"x":512,"y":102,"w":259,"h":98}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":259,"h":98}, + "sourceSize": {"w":259,"h":98} +} +,{ + "filename": "Diamond0000", + "frame": {"x":907,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0001", + "frame": {"x":117,"y":749,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0002", + "frame": {"x":0,"y":751,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "Diamond0003", + "frame": {"x":225,"y":758,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0000", + "frame": {"x":475,"y":707,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0001", + "frame": {"x":583,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0002", + "frame": {"x":691,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark0003", + "frame": {"x":799,"y":725,"w":104,"h":104}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":104}, + "sourceSize": {"w":104,"h":104} +} +,{ + "filename": "DiamondDark_Bkg_Mask0000", + "frame": {"x":845,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "DiamondPuzzle0000", + "frame": {"x":529,"y":593,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0001", + "frame": {"x":651,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0002", + "frame": {"x":773,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle0003", + "frame": {"x":895,"y":611,"w":118,"h":110}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":110}, + "sourceSize": {"w":118,"h":110} +} +,{ + "filename": "DiamondPuzzle_Bkg_Mask0000", + "frame": {"x":124,"y":514,"w":118,"h":118}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":118,"h":118}, + "sourceSize": {"w":118,"h":118} +} +,{ + "filename": "DiamondSpeed0000", + "frame": {"x":651,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0001", + "frame": {"x":756,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0002", + "frame": {"x":861,"y":833,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed0003", + "frame": {"x":108,"y":857,"w":101,"h":101}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":101,"h":101}, + "sourceSize": {"w":101,"h":101} +} +,{ + "filename": "DiamondSpeed_Bkg_Mask0000", + "frame": {"x":0,"y":514,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "Diamond_Bkg_Mask0000", + "frame": {"x":721,"y":487,"w":120,"h":120}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":120,"h":120}, + "sourceSize": {"w":120,"h":120} +} +,{ + "filename": "FxButton0000", + "frame": {"x":124,"y":636,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "FxButton0001", + "frame": {"x":0,"y":638,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "GoldLock0000", + "frame": {"x":0,"y":859,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "Lock0000", + "frame": {"x":333,"y":864,"w":91,"h":87}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":91,"h":87}, + "sourceSize": {"w":91,"h":87} +} +,{ + "filename": "MusicButton0000", + "frame": {"x":241,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MusicButton0001", + "frame": {"x":358,"y":645,"w":113,"h":109}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":113,"h":109}, + "sourceSize": {"w":113,"h":109} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":459,"y":121,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":953,"y":368,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "Navy0000", + "frame": {"x":213,"y":866,"w":72,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":72,"h":69}, + "sourceSize": {"w":72,"h":69} +} +,{ + "filename": "NewSign0000", + "frame": {"x":246,"y":514,"w":143,"h":56}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":143,"h":56}, + "sourceSize": {"w":143,"h":56} +} +,{ + "filename": "SettingsButton0000", + "frame": {"x":918,"y":262,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0001", + "frame": {"x":333,"y":758,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0002", + "frame": {"x":439,"y":815,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "SettingsButton0003", + "frame": {"x":545,"y":833,"w":102,"h":102}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":102,"h":102}, + "sourceSize": {"w":102,"h":102} +} +,{ + "filename": "StoneButton0000", + "frame": {"x":0,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "StoneButton0001", + "frame": {"x":256,"y":0,"w":252,"h":117}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":252,"h":117}, + "sourceSize": {"w":252,"h":117} +} +,{ + "filename": "ToggleControlButtonDual0000", + "frame": {"x":775,"y":0,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonDual0001", + "frame": {"x":0,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0000", + "frame": {"x":153,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleControlButtonSingle0001", + "frame": {"x":306,"y":121,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0000", + "frame": {"x":775,"y":131,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0001", + "frame": {"x":459,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0002", + "frame": {"x":612,"y":204,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0003", + "frame": {"x":0,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0004", + "frame": {"x":153,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0005", + "frame": {"x":306,"y":252,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0006", + "frame": {"x":765,"y":262,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0007", + "frame": {"x":459,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0008", + "frame": {"x":612,"y":335,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0009", + "frame": {"x":0,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0010", + "frame": {"x":153,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "ToggleSingleScreen0011", + "frame": {"x":306,"y":383,"w":149,"h":127}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":149,"h":127}, + "sourceSize": {"w":149,"h":127} +} +,{ + "filename": "UnlockButton0000", + "frame": {"x":765,"y":393,"w":184,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":184,"h":90}, + "sourceSize": {"w":184,"h":90} +} +,{ + "filename": "VibrateButton0000", + "frame": {"x":459,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "VibrateButton0001", + "frame": {"x":590,"y":466,"w":127,"h":123}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":127,"h":123}, + "sourceSize": {"w":127,"h":123} +} +,{ + "filename": "_default0000", + "frame": {"x":953,"y":419,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/MenuAssets.png b/fireboywatergirl4/assets/atlasses/MenuAssets.png new file mode 100644 index 00000000..f9180bd8 Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/MenuAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/MenuBackgrounds.json b/fireboywatergirl4/assets/atlasses/MenuBackgrounds.json new file mode 100644 index 00000000..bd1d28ca --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/MenuBackgrounds.json @@ -0,0 +1,51 @@ +{"frames": [ + +{ + "filename": "HolderTexture0000", + "frame": {"x":0,"y":0,"w":256,"h":399}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":399}, + "sourceSize": {"w":256,"h":399} +} +,{ + "filename": "Loading0000", + "frame": {"x":260,"y":0,"w":469,"h":103}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":469,"h":103}, + "sourceSize": {"w":469,"h":103} +} +,{ + "filename": "SimpleBackground0000", + "frame": {"x":733,"y":0,"w":256,"h":317}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":317}, + "sourceSize": {"w":256,"h":317} +} +,{ + "filename": "SliderHolder0000", + "frame": {"x":0,"y":403,"w":800,"h":395}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":800,"h":395}, + "sourceSize": {"w":800,"h":395} +} +,{ + "filename": "_default0000", + "frame": {"x":804,"y":403,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "MenuBackgrounds.png", + "format": "RGBA8888", + "size": {"w":1024,"h":1024}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/MenuBackgrounds.png b/fireboywatergirl4/assets/atlasses/MenuBackgrounds.png new file mode 100644 index 00000000..bd61572f Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/MenuBackgrounds.png differ diff --git a/fireboywatergirl4/assets/atlasses/PopupAssets.json b/fireboywatergirl4/assets/atlasses/PopupAssets.json new file mode 100644 index 00000000..661d6ed2 --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/PopupAssets.json @@ -0,0 +1,899 @@ +{"frames": [ + +{ + "filename": "Clock0000", + "frame": {"x":0,"y":0,"w":218,"h":75}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":218,"h":75}, + "sourceSize": {"w":218,"h":75} +} +,{ + "filename": "Confetti0000", + "frame": {"x":222,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0001", + "frame": {"x":256,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0002", + "frame": {"x":290,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "Confetti0003", + "frame": {"x":324,"y":0,"w":30,"h":28}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":30,"h":28}, + "sourceSize": {"w":30,"h":28} +} +,{ + "filename": "CrossIcon0000", + "frame": {"x":1122,"y":205,"w":61,"h":61}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":61,"h":61}, + "sourceSize": {"w":61,"h":61} +} +,{ + "filename": "CursorToggle0000", + "frame": {"x":358,"y":0,"w":196,"h":90}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":196,"h":90}, + "sourceSize": {"w":196,"h":90} +} +,{ + "filename": "DeviceItemRenderer0000", + "frame": {"x":558,"y":0,"w":554,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":554,"h":111}, + "sourceSize": {"w":554,"h":111} +} +,{ + "filename": "DiamondsIcon0000", + "frame": {"x":1187,"y":205,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "FingerRingJump0000", + "frame": {"x":1116,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingLeft0000", + "frame": {"x":1320,"y":0,"w":200,"h":201}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":201}, + "sourceSize": {"w":200,"h":201} +} +,{ + "filename": "FingerRingRight0000", + "frame": {"x":1524,"y":0,"w":200,"h":200}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":200}, + "sourceSize": {"w":200,"h":200} +} +,{ + "filename": "FinishIcon0000", + "frame": {"x":1284,"y":205,"w":93,"h":107}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":107}, + "sourceSize": {"w":93,"h":107} +} +,{ + "filename": "FinishStone0000", + "frame": {"x":1381,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0001", + "frame": {"x":1513,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0002", + "frame": {"x":1645,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0003", + "frame": {"x":1777,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0004", + "frame": {"x":1909,"y":205,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0005", + "frame": {"x":0,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0006", + "frame": {"x":132,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0007", + "frame": {"x":264,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0008", + "frame": {"x":396,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0009", + "frame": {"x":528,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0010", + "frame": {"x":660,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0011", + "frame": {"x":792,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0012", + "frame": {"x":924,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0013", + "frame": {"x":1056,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0014", + "frame": {"x":1188,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0015", + "frame": {"x":1320,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0016", + "frame": {"x":1452,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0017", + "frame": {"x":1584,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0018", + "frame": {"x":1716,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0019", + "frame": {"x":1848,"y":851,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0020", + "frame": {"x":0,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStone0021", + "frame": {"x":132,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0000", + "frame": {"x":264,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0001", + "frame": {"x":396,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0002", + "frame": {"x":528,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0003", + "frame": {"x":660,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0004", + "frame": {"x":792,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0005", + "frame": {"x":924,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0006", + "frame": {"x":1056,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0007", + "frame": {"x":1188,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0008", + "frame": {"x":1320,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0009", + "frame": {"x":1452,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0010", + "frame": {"x":1584,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0011", + "frame": {"x":1716,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0012", + "frame": {"x":1848,"y":983,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0013", + "frame": {"x":0,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0014", + "frame": {"x":132,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0015", + "frame": {"x":264,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0016", + "frame": {"x":396,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0017", + "frame": {"x":528,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0018", + "frame": {"x":660,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0019", + "frame": {"x":792,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0020", + "frame": {"x":924,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneDark0021", + "frame": {"x":1056,"y":1115,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStonePuzzle0000", + "frame": {"x":1188,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0001", + "frame": {"x":1326,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0002", + "frame": {"x":1464,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0003", + "frame": {"x":1602,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0004", + "frame": {"x":1740,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0005", + "frame": {"x":1878,"y":1115,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0006", + "frame": {"x":0,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0007", + "frame": {"x":138,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0008", + "frame": {"x":276,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0009", + "frame": {"x":414,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0010", + "frame": {"x":552,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0011", + "frame": {"x":690,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0012", + "frame": {"x":828,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0013", + "frame": {"x":966,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0014", + "frame": {"x":1104,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0015", + "frame": {"x":1242,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0016", + "frame": {"x":1380,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0017", + "frame": {"x":1518,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0018", + "frame": {"x":1656,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0019", + "frame": {"x":1794,"y":1247,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0020", + "frame": {"x":0,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStonePuzzle0021", + "frame": {"x":138,"y":1375,"w":134,"h":124}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":134,"h":124}, + "sourceSize": {"w":134,"h":124} +} +,{ + "filename": "FinishStoneSpeed0000", + "frame": {"x":276,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0001", + "frame": {"x":408,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0002", + "frame": {"x":540,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0003", + "frame": {"x":672,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0004", + "frame": {"x":804,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0005", + "frame": {"x":936,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0006", + "frame": {"x":1068,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0007", + "frame": {"x":1200,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0008", + "frame": {"x":1332,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0009", + "frame": {"x":1464,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0010", + "frame": {"x":1596,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0011", + "frame": {"x":1728,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0012", + "frame": {"x":1860,"y":1375,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0013", + "frame": {"x":0,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0014", + "frame": {"x":132,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0015", + "frame": {"x":264,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0016", + "frame": {"x":396,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0017", + "frame": {"x":528,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0018", + "frame": {"x":660,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0019", + "frame": {"x":792,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0020", + "frame": {"x":924,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "FinishStoneSpeed0021", + "frame": {"x":1056,"y":1507,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128} +} +,{ + "filename": "MuteButton0000", + "frame": {"x":1728,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "MuteButton0001", + "frame": {"x":1781,"y":0,"w":49,"h":47}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":49,"h":47}, + "sourceSize": {"w":49,"h":47} +} +,{ + "filename": "PauseButton0000", + "frame": {"x":1834,"y":0,"w":48,"h":48}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":48,"h":48}, + "sourceSize": {"w":48,"h":48} +} +,{ + "filename": "PopupBackground0000", + "frame": {"x":0,"y":205,"w":1082,"h":642}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":1082,"h":642}, + "sourceSize": {"w":1082,"h":642} +} +,{ + "filename": "SilverIcon0000", + "frame": {"x":1188,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "TickIcon0000", + "frame": {"x":1285,"y":1507,"w":69,"h":69}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":69,"h":69}, + "sourceSize": {"w":69,"h":69} +} +,{ + "filename": "TimeIcon0000", + "frame": {"x":1358,"y":1507,"w":93,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":93,"h":73}, + "sourceSize": {"w":93,"h":73} +} +,{ + "filename": "_default0000", + "frame": {"x":1086,"y":205,"w":32,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":32,"h":33}, + "sourceSize": {"w":32,"h":33} +} +,{ + "filename": "popupArrow0000", + "frame": {"x":1455,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +} +,{ + "filename": "popupArrow0001", + "frame": {"x":1589,"y":1507,"w":130,"h":92}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":130,"h":92}, + "sourceSize": {"w":130,"h":92} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PopupAssets.png", + "format": "RGBA8888", + "size": {"w":2048,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/PopupAssets.png b/fireboywatergirl4/assets/atlasses/PopupAssets.png new file mode 100644 index 00000000..317f3b31 Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/PopupAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/PreloaderAssets.json b/fireboywatergirl4/assets/atlasses/PreloaderAssets.json new file mode 100644 index 00000000..027b7ec9 --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/PreloaderAssets.json @@ -0,0 +1,35 @@ +{"frames": [ + +{ + "filename": "LoaderBar0000", + "frame": {"x":0,"y":0,"w":200,"h":20}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":200,"h":20}, + "sourceSize": {"w":200,"h":20} +} +,{ + "filename": "LoaderHolder0000", + "frame": {"x":204,"y":0,"w":222,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":222,"h":40}, + "sourceSize": {"w":222,"h":40} +} +,{ + "filename": "LoaderTitle0000", + "frame": {"x":0,"y":44,"w":497,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":497,"h":73}, + "sourceSize": {"w":497,"h":73} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "PreloaderAssets.png", + "format": "RGBA8888", + "size": {"w":512,"h":128}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/PreloaderAssets.png b/fireboywatergirl4/assets/atlasses/PreloaderAssets.png new file mode 100644 index 00000000..df1f02c5 Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/PreloaderAssets.png differ diff --git a/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.json b/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.json new file mode 100644 index 00000000..f9e55cbe --- /dev/null +++ b/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.json @@ -0,0 +1,491 @@ +{"frames": [ + +{ + "filename": "BackGround0000", + "frame": {"x":0,"y":0,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "Clock0000", + "frame": {"x":0,"y":1552,"w":268,"h":100}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":268,"h":100}, + "sourceSize": {"w":268,"h":100} +} +,{ + "filename": "Diamond1_Bkg_Empty0000", + "frame": {"x":850,"y":852,"w":104,"h":111}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":104,"h":111}, + "sourceSize": {"w":104,"h":111} +} +,{ + "filename": "FinishBoy0000", + "frame": {"x":668,"y":1704,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0001", + "frame": {"x":668,"y":1846,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0002", + "frame": {"x":683,"y":0,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0003", + "frame": {"x":683,"y":142,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0004", + "frame": {"x":683,"y":284,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0005", + "frame": {"x":683,"y":426,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0006", + "frame": {"x":683,"y":568,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0007", + "frame": {"x":683,"y":710,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0008", + "frame": {"x":683,"y":852,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0009", + "frame": {"x":687,"y":994,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0010", + "frame": {"x":687,"y":1136,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0011", + "frame": {"x":773,"y":1278,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0012", + "frame": {"x":773,"y":1420,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0013", + "frame": {"x":835,"y":1562,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0014", + "frame": {"x":835,"y":1704,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0015", + "frame": {"x":835,"y":1846,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0016", + "frame": {"x":850,"y":0,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0017", + "frame": {"x":850,"y":142,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0018", + "frame": {"x":850,"y":284,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0019", + "frame": {"x":850,"y":426,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0020", + "frame": {"x":850,"y":568,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishBoy0021", + "frame": {"x":850,"y":710,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0000", + "frame": {"x":272,"y":1552,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0001", + "frame": {"x":0,"y":1656,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0002", + "frame": {"x":439,"y":1552,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0003", + "frame": {"x":167,"y":1694,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0004", + "frame": {"x":0,"y":1798,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0005", + "frame": {"x":334,"y":1694,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0006", + "frame": {"x":501,"y":1694,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0007", + "frame": {"x":167,"y":1836,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0008", + "frame": {"x":334,"y":1836,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0009", + "frame": {"x":501,"y":1836,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0010", + "frame": {"x":516,"y":0,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0011", + "frame": {"x":516,"y":142,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0012", + "frame": {"x":516,"y":284,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0013", + "frame": {"x":516,"y":426,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0014", + "frame": {"x":516,"y":568,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0015", + "frame": {"x":516,"y":710,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0016", + "frame": {"x":516,"y":852,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0017", + "frame": {"x":520,"y":994,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0018", + "frame": {"x":520,"y":1136,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0019", + "frame": {"x":606,"y":1278,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0020", + "frame": {"x":606,"y":1420,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "FinishGirl0021", + "frame": {"x":668,"y":1562,"w":163,"h":138}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":163,"h":138}, + "sourceSize": {"w":163,"h":138} +} +,{ + "filename": "ForeGround0000", + "frame": {"x":260,"y":1292,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0000", + "frame": {"x":0,"y":1032,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0001", + "frame": {"x":260,"y":1032,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "Icon0002", + "frame": {"x":0,"y":1292,"w":256,"h":256}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":256,"h":256}, + "sourceSize": {"w":256,"h":256} +} +,{ + "filename": "MenuBackground0000", + "frame": {"x":0,"y":516,"w":512,"h":512}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":512,"h":512}, + "sourceSize": {"w":512,"h":512} +} +,{ + "filename": "decor_A0000", + "frame": {"x":520,"y":1480,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_10000", + "frame": {"x":606,"y":1562,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_O_20000", + "frame": {"x":520,"y":1422,"w":54,"h":54}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":54,"h":54}, + "sourceSize": {"w":54,"h":54} +} +,{ + "filename": "decor_T_10000", + "frame": {"x":0,"y":1940,"w":88,"h":88}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":88,"h":88}, + "sourceSize": {"w":88,"h":88} +} +,{ + "filename": "decor_T_20000", + "frame": {"x":520,"y":1278,"w":76,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":76,"h":76}, + "sourceSize": {"w":76,"h":76} +} +,{ + "filename": "decor_T_30000", + "frame": {"x":92,"y":1940,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +} +,{ + "filename": "decor_V0000", + "frame": {"x":606,"y":1616,"w":50,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":50,"h":50}, + "sourceSize": {"w":50,"h":50} +} +,{ + "filename": "decor_X0000", + "frame": {"x":520,"y":1358,"w":60,"h":60}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":60}, + "sourceSize": {"w":60,"h":60} +}], +"meta": { + "app": "Adobe Flash CS6", + "version": "12.0.0.481", + "image": "TempleAssets.png", + "format": "RGBA8888", + "size": {"w":1024,"h":2048}, + "scale": "1" +} +} diff --git a/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.png b/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.png new file mode 100644 index 00000000..1d58826b Binary files /dev/null and b/fireboywatergirl4/assets/atlasses/Temples/crystal/TempleAssets.png differ diff --git a/fireboywatergirl4/assets/audio/CharToggle1.mp3 b/fireboywatergirl4/assets/audio/CharToggle1.mp3 new file mode 100644 index 00000000..8163ed56 Binary files /dev/null and b/fireboywatergirl4/assets/audio/CharToggle1.mp3 differ diff --git a/fireboywatergirl4/assets/audio/CharToggle2.mp3 b/fireboywatergirl4/assets/audio/CharToggle2.mp3 new file mode 100644 index 00000000..8ac7856d Binary files /dev/null and b/fireboywatergirl4/assets/audio/CharToggle2.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Clock.mp3 b/fireboywatergirl4/assets/audio/Clock.mp3 new file mode 100644 index 00000000..66f4661e Binary files /dev/null and b/fireboywatergirl4/assets/audio/Clock.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Death.mp3 b/fireboywatergirl4/assets/audio/Death.mp3 new file mode 100644 index 00000000..206d21ad Binary files /dev/null and b/fireboywatergirl4/assets/audio/Death.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Diamond.mp3 b/fireboywatergirl4/assets/audio/Diamond.mp3 new file mode 100644 index 00000000..c61e773e Binary files /dev/null and b/fireboywatergirl4/assets/audio/Diamond.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Door.mp3 b/fireboywatergirl4/assets/audio/Door.mp3 new file mode 100644 index 00000000..6b3920ff Binary files /dev/null and b/fireboywatergirl4/assets/audio/Door.mp3 differ diff --git a/fireboywatergirl4/assets/audio/EndDiamond.mp3 b/fireboywatergirl4/assets/audio/EndDiamond.mp3 new file mode 100644 index 00000000..9c3f2d24 Binary files /dev/null and b/fireboywatergirl4/assets/audio/EndDiamond.mp3 differ diff --git a/fireboywatergirl4/assets/audio/EndFail.mp3 b/fireboywatergirl4/assets/audio/EndFail.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl4/assets/audio/EndFail.mp3 differ diff --git a/fireboywatergirl4/assets/audio/EndPass.mp3 b/fireboywatergirl4/assets/audio/EndPass.mp3 new file mode 100644 index 00000000..9f5f2e23 Binary files /dev/null and b/fireboywatergirl4/assets/audio/EndPass.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Freeze.mp3 b/fireboywatergirl4/assets/audio/Freeze.mp3 new file mode 100644 index 00000000..6b44e29f Binary files /dev/null and b/fireboywatergirl4/assets/audio/Freeze.mp3 differ diff --git a/fireboywatergirl4/assets/audio/IceSteps_fb.mp3 b/fireboywatergirl4/assets/audio/IceSteps_fb.mp3 new file mode 100644 index 00000000..fb52f101 Binary files /dev/null and b/fireboywatergirl4/assets/audio/IceSteps_fb.mp3 differ diff --git a/fireboywatergirl4/assets/audio/IceSteps_wg.mp3 b/fireboywatergirl4/assets/audio/IceSteps_wg.mp3 new file mode 100644 index 00000000..87a79f5d Binary files /dev/null and b/fireboywatergirl4/assets/audio/IceSteps_wg.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Jump_fb.mp3 b/fireboywatergirl4/assets/audio/Jump_fb.mp3 new file mode 100644 index 00000000..a1f2a2c5 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Jump_fb.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Jump_wg.mp3 b/fireboywatergirl4/assets/audio/Jump_wg.mp3 new file mode 100644 index 00000000..5613337b Binary files /dev/null and b/fireboywatergirl4/assets/audio/Jump_wg.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusic.mp3 b/fireboywatergirl4/assets/audio/LevelMusic.mp3 new file mode 100644 index 00000000..c2fb05b7 Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusic.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusicFinish.mp3 b/fireboywatergirl4/assets/audio/LevelMusicFinish.mp3 new file mode 100644 index 00000000..2b5fb08c Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusicFinish.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusicFinish_speed.mp3 b/fireboywatergirl4/assets/audio/LevelMusicFinish_speed.mp3 new file mode 100644 index 00000000..74147f49 Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusicFinish_speed.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusicOver.mp3 b/fireboywatergirl4/assets/audio/LevelMusicOver.mp3 new file mode 100644 index 00000000..67178821 Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusicOver.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusic_dark.mp3 b/fireboywatergirl4/assets/audio/LevelMusic_dark.mp3 new file mode 100644 index 00000000..5d37bb2f Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusic_dark.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LevelMusic_speed.mp3 b/fireboywatergirl4/assets/audio/LevelMusic_speed.mp3 new file mode 100644 index 00000000..88091290 Binary files /dev/null and b/fireboywatergirl4/assets/audio/LevelMusic_speed.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Lever.mp3 b/fireboywatergirl4/assets/audio/Lever.mp3 new file mode 100644 index 00000000..76650254 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Lever.mp3 differ diff --git a/fireboywatergirl4/assets/audio/LightPusher.mp3 b/fireboywatergirl4/assets/audio/LightPusher.mp3 new file mode 100644 index 00000000..c85ba313 Binary files /dev/null and b/fireboywatergirl4/assets/audio/LightPusher.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Melt.mp3 b/fireboywatergirl4/assets/audio/Melt.mp3 new file mode 100644 index 00000000..33ac6f64 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Melt.mp3 differ diff --git a/fireboywatergirl4/assets/audio/MenuMusic.mp3 b/fireboywatergirl4/assets/audio/MenuMusic.mp3 new file mode 100644 index 00000000..a7987c77 Binary files /dev/null and b/fireboywatergirl4/assets/audio/MenuMusic.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Platform.mp3 b/fireboywatergirl4/assets/audio/Platform.mp3 new file mode 100644 index 00000000..535ff474 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Platform.mp3 differ diff --git a/fireboywatergirl4/assets/audio/PortalClose.mp3 b/fireboywatergirl4/assets/audio/PortalClose.mp3 new file mode 100644 index 00000000..d4f60b0f Binary files /dev/null and b/fireboywatergirl4/assets/audio/PortalClose.mp3 differ diff --git a/fireboywatergirl4/assets/audio/PortalLoop.mp3 b/fireboywatergirl4/assets/audio/PortalLoop.mp3 new file mode 100644 index 00000000..3a8c26de Binary files /dev/null and b/fireboywatergirl4/assets/audio/PortalLoop.mp3 differ diff --git a/fireboywatergirl4/assets/audio/PortalOpen.mp3 b/fireboywatergirl4/assets/audio/PortalOpen.mp3 new file mode 100644 index 00000000..cf9961f6 Binary files /dev/null and b/fireboywatergirl4/assets/audio/PortalOpen.mp3 differ diff --git a/fireboywatergirl4/assets/audio/PortalTransport.mp3 b/fireboywatergirl4/assets/audio/PortalTransport.mp3 new file mode 100644 index 00000000..5c18f42a Binary files /dev/null and b/fireboywatergirl4/assets/audio/PortalTransport.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Pusher.mp3 b/fireboywatergirl4/assets/audio/Pusher.mp3 new file mode 100644 index 00000000..c7200f39 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Pusher.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Slider.mp3 b/fireboywatergirl4/assets/audio/Slider.mp3 new file mode 100644 index 00000000..81b03a70 Binary files /dev/null and b/fireboywatergirl4/assets/audio/Slider.mp3 differ diff --git a/fireboywatergirl4/assets/audio/WaterSteps.mp3 b/fireboywatergirl4/assets/audio/WaterSteps.mp3 new file mode 100644 index 00000000..e82d56ae Binary files /dev/null and b/fireboywatergirl4/assets/audio/WaterSteps.mp3 differ diff --git a/fireboywatergirl4/assets/audio/Wind.mp3 b/fireboywatergirl4/assets/audio/Wind.mp3 new file mode 100644 index 00000000..84543b9f Binary files /dev/null and b/fireboywatergirl4/assets/audio/Wind.mp3 differ diff --git a/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.fnt b/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.fnt new file mode 100644 index 00000000..142c3163 --- /dev/null +++ b/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.fnt @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.png b/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.png new file mode 100644 index 00000000..15e54888 Binary files /dev/null and b/fireboywatergirl4/assets/fonts/fbwg_font_cyrillic.png differ diff --git a/fireboywatergirl4/assets/fonts/font.fnt b/fireboywatergirl4/assets/fonts/font.fnt new file mode 100644 index 00000000..0297157a --- /dev/null +++ b/fireboywatergirl4/assets/fonts/font.fnt @@ -0,0 +1,446 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl4/assets/fonts/font.png b/fireboywatergirl4/assets/fonts/font.png new file mode 100644 index 00000000..597e9db9 Binary files /dev/null and b/fireboywatergirl4/assets/fonts/font.png differ diff --git a/fireboywatergirl4/assets/images/Beam.png b/fireboywatergirl4/assets/images/Beam.png new file mode 100644 index 00000000..1a2206ef Binary files /dev/null and b/fireboywatergirl4/assets/images/Beam.png differ diff --git a/fireboywatergirl4/assets/images/GameNameCrystal.png b/fireboywatergirl4/assets/images/GameNameCrystal.png new file mode 100644 index 00000000..91f08597 Binary files /dev/null and b/fireboywatergirl4/assets/images/GameNameCrystal.png differ diff --git a/fireboywatergirl4/assets/images/TOASTER-MINI-new.png b/fireboywatergirl4/assets/images/TOASTER-MINI-new.png new file mode 100644 index 00000000..3f7f79f4 Binary files /dev/null and b/fireboywatergirl4/assets/images/TOASTER-MINI-new.png differ diff --git a/fireboywatergirl4/assets/images/TempleHallCrystal.jpg b/fireboywatergirl4/assets/images/TempleHallCrystal.jpg new file mode 100644 index 00000000..dd52c19e Binary files /dev/null and b/fireboywatergirl4/assets/images/TempleHallCrystal.jpg differ diff --git a/fireboywatergirl4/assets/images/branding/branding_logo_kizi.png b/fireboywatergirl4/assets/images/branding/branding_logo_kizi.png new file mode 100644 index 00000000..09ee21b2 Binary files /dev/null and b/fireboywatergirl4/assets/images/branding/branding_logo_kizi.png differ diff --git a/fireboywatergirl4/assets/images/stores/android.png b/fireboywatergirl4/assets/images/stores/android.png new file mode 100644 index 00000000..a9f30e48 Binary files /dev/null and b/fireboywatergirl4/assets/images/stores/android.png differ diff --git a/fireboywatergirl4/assets/images/stores/ios.png b/fireboywatergirl4/assets/images/stores/ios.png new file mode 100644 index 00000000..caf2845d Binary files /dev/null and b/fireboywatergirl4/assets/images/stores/ios.png differ diff --git a/fireboywatergirl4/assets/images/stores/microsoft.png b/fireboywatergirl4/assets/images/stores/microsoft.png new file mode 100644 index 00000000..a345d334 Binary files /dev/null and b/fireboywatergirl4/assets/images/stores/microsoft.png differ diff --git a/fireboywatergirl4/assets/images/stores/steam.png b/fireboywatergirl4/assets/images/stores/steam.png new file mode 100644 index 00000000..b0c82317 Binary files /dev/null and b/fireboywatergirl4/assets/images/stores/steam.png differ diff --git a/fireboywatergirl4/assets/tilemaps/tilesets/Chars.json b/fireboywatergirl4/assets/tilemaps/tilesets/Chars.json new file mode 100644 index 00000000..6bfca1eb --- /dev/null +++ b/fireboywatergirl4/assets/tilemaps/tilesets/Chars.json @@ -0,0 +1,117 @@ +{ "columns":8, + "image":"Chars.png", + "imageheight":64, + "imagewidth":512, + "margin":0, + "name":"Chars", + "spacing":0, + "tilecount":8, + "tileheight":64, + "tileproperties": + { + "0": + { + "char":"fb" + }, + "1": + { + "char":"wg" + }, + "2": + { + "char":"fb" + }, + "3": + { + "char":"wg" + }, + "4": + { + "char":"fb" + }, + "5": + { + "char":"wg" + }, + "6": + { + "char":"silver" + }, + "7": + { + "char":"fbwg" + } + }, + "tilepropertytypes": + { + "0": + { + "char":"string" + }, + "1": + { + "char":"string" + }, + "2": + { + "char":"string" + }, + "3": + { + "char":"string" + }, + "4": + { + "char":"string" + }, + "5": + { + "char":"string" + }, + "6": + { + "char":"string" + }, + "7": + { + "char":"string" + } + }, + "tiles": + { + "0": + { + "type":"char" + }, + "1": + { + "type":"char" + }, + "2": + { + "type":"door" + }, + "3": + { + "type":"door" + }, + "4": + { + "type":"diamond" + }, + "5": + { + "type":"diamond" + }, + "6": + { + "type":"diamond" + }, + "7": + { + "type":"diamond" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl4/assets/tilemaps/tilesets/Ground.json b/fireboywatergirl4/assets/tilemaps/tilesets/Ground.json new file mode 100644 index 00000000..7c6b5946 --- /dev/null +++ b/fireboywatergirl4/assets/tilemaps/tilesets/Ground.json @@ -0,0 +1,201 @@ +{ "columns":15, + "image":"Ground.png", + "imageheight":32, + "imagewidth":480, + "margin":0, + "name":"Ground", + "spacing":0, + "tilecount":15, + "tileheight":32, + "tileproperties": + { + "0": + { + "type":0 + }, + "1": + { + "type":1 + }, + "10": + { + "type":-1 + }, + "11": + { + "type":11 + }, + "12": + { + "type":12 + }, + "13": + { + "type":10 + }, + "14": + { + "type":55 + }, + "2": + { + "type":2 + }, + "3": + { + "type":3 + }, + "4": + { + "type":4 + }, + "5": + { + "type":5 + }, + "6": + { + "type":6 + }, + "7": + { + "type":7 + }, + "8": + { + "type":8 + }, + "9": + { + "type":9 + } + }, + "tilepropertytypes": + { + "0": + { + "type":"int" + }, + "1": + { + "type":"int" + }, + "10": + { + "type":"int" + }, + "11": + { + "type":"int" + }, + "12": + { + "type":"int" + }, + "13": + { + "type":"int" + }, + "14": + { + "type":"int" + }, + "2": + { + "type":"int" + }, + "3": + { + "type":"int" + }, + "4": + { + "type":"int" + }, + "5": + { + "type":"int" + }, + "6": + { + "type":"int" + }, + "7": + { + "type":"int" + }, + "8": + { + "type":"int" + }, + "9": + { + "type":"int" + } + }, + "tiles": + { + "0": + { + "type":"0" + }, + "1": + { + "type":"1" + }, + "10": + { + "type":"-1" + }, + "11": + { + "type":"11" + }, + "12": + { + "type":"12" + }, + "13": + { + "type":"10" + }, + "14": + { + "type":"55" + }, + "2": + { + "type":"2" + }, + "3": + { + "type":"3" + }, + "4": + { + "type":"4" + }, + "5": + { + "type":"5" + }, + "6": + { + "type":"6" + }, + "7": + { + "type":"7" + }, + "8": + { + "type":"8" + }, + "9": + { + "type":"9" + } + }, + "tilewidth":32, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl4/assets/tilemaps/tilesets/LargeObjects.json b/fireboywatergirl4/assets/tilemaps/tilesets/LargeObjects.json new file mode 100644 index 00000000..4d67081a --- /dev/null +++ b/fireboywatergirl4/assets/tilemaps/tilesets/LargeObjects.json @@ -0,0 +1,67 @@ +{ "columns":3, + "image":"LargeObjects.png", + "imageheight":96, + "imagewidth":192, + "margin":0, + "name":"LargeObjects", + "spacing":0, + "tilecount":3, + "tileheight":96, + "tileproperties": + { + "0": + { + "group":0, + "inverted":false, + "portalId":0 + }, + "1": + { + "group":0, + "inverted":true, + "portalId":0 + }, + "2": + { + "group":0, + "length":10 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "1": + { + "group":"int", + "inverted":"bool", + "portalId":"int" + }, + "2": + { + "group":"int", + "length":"float" + } + }, + "tiles": + { + "0": + { + "type":"portal" + }, + "1": + { + "type":"portal" + }, + "2": + { + "type":"wind" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl4/assets/tilemaps/tilesets/Objects.json b/fireboywatergirl4/assets/tilemaps/tilesets/Objects.json new file mode 100644 index 00000000..e95099f3 --- /dev/null +++ b/fireboywatergirl4/assets/tilemaps/tilesets/Objects.json @@ -0,0 +1,163 @@ +{ "columns":4, + "image":"Objects.png", + "imageheight":256, + "imagewidth":256, + "margin":0, + "name":"Objects", + "spacing":0, + "tilecount":16, + "tileheight":64, + "tileproperties": + { + "0": + { + "group":0 + }, + "1": + { + "group":0, + "onis":1, + "startPos":-1 + }, + "11": + { + "group":0 + }, + "14": + { + "group":0, + "time":2000 + }, + "15": + { + "group":0, + "length":10 + }, + "2": + { + "group":0, + "onis":-1, + "startPos":1 + }, + "5": + { + "color":"yellow", + "group":0 + }, + "6": + { + "dir":1, + "group":0 + }, + "7": + { + "color":"yellow", + "group":0 + } + }, + "tilepropertytypes": + { + "0": + { + "group":"int" + }, + "1": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "11": + { + "group":"int" + }, + "14": + { + "group":"int", + "time":"int" + }, + "15": + { + "group":"int", + "length":"int" + }, + "2": + { + "group":"int", + "onis":"int", + "startPos":"int" + }, + "5": + { + "color":"string", + "group":"int" + }, + "6": + { + "dir":"int", + "group":"int" + }, + "7": + { + "color":"string", + "group":"int" + } + }, + "tiles": + { + "0": + { + "type":"pusher" + }, + "1": + { + "type":"lever" + }, + "10": + { + "type":"ball" + }, + "11": + { + "type":"infinitemirror" + }, + "12": + { + "type":"boxmirror" + }, + "13": + { + "type":"boxheavy" + }, + "14": + { + "type":"timedpusher" + }, + "15": + { + "type":"wind" + }, + "2": + { + "type":"lever" + }, + "4": + { + "type":"box" + }, + "5": + { + "type":"beamer" + }, + "6": + { + "type":"rotmirror" + }, + "7": + { + "type":"lightpusher" + } + }, + "tilewidth":64, + "type":"tileset" +} \ No newline at end of file diff --git a/fireboywatergirl4/bower_components/requirejs/require.js b/fireboywatergirl4/bower_components/requirejs/require.js new file mode 100644 index 00000000..a29caef2 --- /dev/null +++ b/fireboywatergirl4/bower_components/requirejs/require.js @@ -0,0 +1,2142 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.2.0 Copyright jQuery Foundation and other contributors. + * Released under MIT license, http://github.com/requirejs/requirejs/LICENSE + */ +//Not using strict: uneven strict support in browsers, #392, and causes +//problems with requirejs.exec()/transpiler plugins that may not be strict. +/*jslint regexp: true, nomen: true, sloppy: true */ +/*global window, navigator, document, importScripts, setTimeout, opera */ + +var requirejs, require, define; +(function (global) { + var req, s, head, baseElement, dataMain, src, + interactiveScript, currentlyAddingScript, mainScript, subPath, + version = '2.2.0', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? + /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false; + + //Could match something like ')//comment', do not lose the prefix to comment. + function commentReplace(match, multi, multiText, singlePrefix) { + return singlePrefix || ''; + } + + function isFunction(it) { + return ostring.call(it) === '[object Function]'; + } + + function isArray(it) { + return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i; + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i; + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break; + } + } + } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop); + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop]; + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop; + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break; + } + } + } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if (deepStringMixin && typeof value === 'object' && value && + !isArray(value) && !isFunction(value) && + !(value instanceof RegExp)) { + + if (!target[prop]) { + target[prop] = {}; + } + mixin(target[prop], value, force, deepStringMixin); + } else { + target[prop] = value; + } + } + }); + } + return target; + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments); + }; + } + + function scripts() { + return document.getElementsByTagName('script'); + } + + function defaultOnError(err) { + throw err; + } + + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value; + } + var g = global; + each(value.split('.'), function (part) { + g = g[part]; + }); + return g; + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + e.requireType = id; + e.requireModules = requireModules; + if (err) { + e.originalError = err; + } + return e; + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return; + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite an existing requirejs instance. + return; + } + cfg = requirejs; + requirejs = undefined; + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require; + require = undefined; + } + + function newContext(contextName) { + var inCheckLoaded, Module, context, handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 0, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; i < ary.length; i++) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + // If at the start, or previous value is still .., + // keep them so that when converted to a path it may + // still work when converted to a path, even though + // as an ID it is less than ideal. In larger point + // releases, may be better to just kick out an error. + if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { + continue; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + /** + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name + */ + function normalize(name, baseName, applyMap) { + var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, + foundMap, foundI, foundStarMap, starI, normalizedBaseParts, + baseParts = (baseName && baseName.split('/')), + map = config.map, + starMap = map && map['*']; + + //Adjust any relative paths. + if (name) { + name = name.split('/'); + lastIndex = name.length - 1; + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); + } + + // Starts with a '.' so need the baseName + if (name[0].charAt(0) === '.' && baseParts) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); + name = normalizedBaseParts.concat(name); + } + + trimDots(name); + name = name.join('/'); + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/'); + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/'); + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')); + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment); + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue; + foundI = i; + break outerLoop; + } + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment); + starI = i; + } + } + + if (!foundMap && foundStarMap) { + foundMap = foundStarMap; + foundI = starI; + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap); + name = nameParts.join('/'); + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name); + + return pkgMain ? pkgMain : name; + } + + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if (scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName) { + scriptNode.parentNode.removeChild(scriptNode); + return true; + } + }); + } + } + + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id); + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift(); + context.require.undef(id); + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true + })([id]); + + return true; + } + } + + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1; + if (index > -1) { + prefix = name.substring(0, index); + name = name.substring(index + 1, name.length); + } + return [prefix, name]; + } + + /** + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. + * + * @returns {Object} + */ + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, pluginModule, suffix, nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = ''; + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false; + name = '_@r' + (requireCounter += 1); + } + + nameParts = splitPrefix(name); + prefix = nameParts[0]; + name = nameParts[1]; + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap); + pluginModule = getOwn(defined, prefix); + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap); + }); + } else { + // If nested plugin references, then do not try to + // normalize, as it will not normalize correctly. This + // places a restriction on resourceIds, and the longer + // term solution is not to normalize until plugins are + // loaded and all normalizations to allow for async + // loading of a loader plugin. But for now, fixes the + // common uses. Details in #1131 + normalizedName = name.indexOf('!') === -1 ? + normalize(name, parentName, applyMap) : + name; + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap); + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName); + prefix = nameParts[0]; + normalizedName = nameParts[1]; + isNormalized = true; + + url = context.nameToUrl(normalizedName); + } + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? + '_unnormalized' + (unnormalizedCounter += 1) : + ''; + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? + prefix + '!' + normalizedName : + normalizedName) + suffix + }; + } + + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (!mod) { + mod = registry[id] = new context.Module(depMap); + } + + return mod; + } + + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id); + + if (hasProp(defined, id) && + (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]); + } + } else { + mod = getModule(depMap); + if (mod.error && name === 'error') { + fn(mod.error); + } else { + mod.on(name, fn); + } + } + } + + function onError(err, errback) { + var ids = err.requireModules, + notified = false; + + if (errback) { + errback(err); + } else { + each(ids, function (id) { + var mod = getOwn(registry, id); + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err; + if (mod.events.error) { + notified = true; + mod.emit('error', err); + } + } + }); + + if (!notified) { + req.onError(err); + } + } + } + + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + each(globalDefQueue, function(queueItem) { + var id = queueItem[0]; + if (typeof id === 'string') { + context.defQueueMap[id] = true; + } + defQueue.push(queueItem); + }); + globalDefQueue = []; + } + } + + handlers = { + 'require': function (mod) { + if (mod.require) { + return mod.require; + } else { + return (mod.require = context.makeRequire(mod.map)); + } + }, + 'exports': function (mod) { + mod.usingExports = true; + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports); + } else { + return (mod.exports = defined[mod.map.id] = {}); + } + } + }, + 'module': function (mod) { + if (mod.module) { + return mod.module; + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {}; + }, + exports: mod.exports || (mod.exports = {}) + }); + } + } + }; + + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id]; + delete enabledRegistry[id]; + } + + function breakCycle(mod, traced, processed) { + var id = mod.map.id; + + if (mod.error) { + mod.emit('error', mod.error); + } else { + traced[id] = true; + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId); + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]); + mod.check(); //pass false? + } else { + breakCycle(dep, traced, processed); + } + } + }); + processed[id] = true; + } + } + + function checkLoaded() { + var err, usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true; + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return; + } + + inCheckLoaded = true; + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id; + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return; + } + + if (!map.isDefine) { + reqCalls.push(mod); + } + + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true; + stillLoading = true; + } else { + noLoads.push(modId); + removeScript(modId); + } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true; + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false); + } + } + } + }); + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); + err.contextName = context.contextName; + return onError(err); + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}); + }); + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0; + checkLoaded(); + }, 50); + } + } + + inCheckLoaded = false; + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {}; + this.map = map; + this.shim = getOwn(config.shim, map.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + + /* this.exports this.factory + this.depMaps = [], + this.enabled, this.fetched + */ + }; + + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {}; + + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return; + } + + this.factory = factory; + + if (errback) { + //Register for errors on this module. + this.on('error', errback); + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err); + }); + } + + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0); + + this.errback = errback; + + //Indicate this module has be initialized + this.inited = true; + + this.ignore = options.ignore; + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable(); + } else { + this.check(); + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true; + this.depCount -= 1; + this.depExports[i] = depExports; + } + }, + + fetch: function () { + if (this.fetched) { + return; + } + this.fetched = true; + + context.startTime = (new Date()).getTime(); + + var map = this.map; + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true + })(this.shim.deps || [], bind(this, function () { + return map.prefix ? this.callPlugin() : this.load(); + })); + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load(); + } + }, + + load: function () { + var url = this.map.url; + + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true; + context.load(this.map.id, url); + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return; + } + + var err, cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory; + + if (!this.inited) { + // Only fetch if not already in the defQueue. + if (!hasProp(context.defQueueMap, id)) { + this.fetch(); + } + } else if (this.error) { + this.emit('error', this.error); + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true; + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || + req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports); + } catch (e) { + err = e; + } + } else { + exports = context.execCb(id, factory, depExports, exports); + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module; + if (cjsModule) { + exports = cjsModule.exports; + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports; + } + } + + if (err) { + err.requireMap = this.map; + err.requireModules = this.map.isDefine ? [this.map.id] : null; + err.requireType = this.map.isDefine ? 'define' : 'require'; + return onError((this.error = err)); + } + + } else { + //Just a literal value + exports = factory; + } + + this.exports = exports; + + if (this.map.isDefine && !this.ignore) { + defined[id] = exports; + + if (req.onResourceLoad) { + var resLoadMaps = []; + each(this.depMaps, function (depMap) { + resLoadMaps.push(depMap.normalizedMap || depMap); + }); + req.onResourceLoad(context, this.map, resLoadMaps); + } + } + + //Clean up + cleanRegistry(id); + + this.defined = true; + } + + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false; + + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true; + this.emit('defined', this.exports); + this.defineEmitComplete = true; + } + + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix); + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap); + + on(pluginMap, 'defined', bind(this, function (plugin) { + var load, normalizedMap, normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true + }); + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = plugin.normalize(name, function (name) { + return normalize(name, parentName, true); + }) || ''; + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, + this.map.parentMap); + on(normalizedMap, + 'defined', bind(this, function (value) { + this.map.normalizedMap = normalizedMap; + this.init([], function () { return value; }, null, { + enabled: true, + ignore: true + }); + })); + + normalizedMod = getOwn(registry, normalizedMap.id); + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap); + + if (this.events.error) { + normalizedMod.on('error', bind(this, function (err) { + this.emit('error', err); + })); + } + normalizedMod.enable(); + } + + return; + } + + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId); + this.load(); + return; + } + + load = bind(this, function (value) { + this.init([], function () { return value; }, null, { + enabled: true + }); + }); + + load.error = bind(this, function (err) { + this.inited = true; + this.error = err; + err.requireModules = [id]; + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id); + } + }); + + onError(err); + }); + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive; + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt; + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false; + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap); + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id]; + } + + try { + req.exec(text); + } catch (e) { + return onError(makeError('fromtexteval', + 'fromText eval for ' + id + + ' failed: ' + e, + e, + [id])); + } + + if (hasInteractive) { + useInteractive = true; + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap); + + //Support anonymous modules. + context.completeLoad(moduleName); + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load); + }); + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config); + })); + + context.enable(pluginMap, this); + this.pluginMaps[pluginMap.id] = pluginMap; + }, + + enable: function () { + enabledRegistry[this.map.id] = this; + this.enabled = true; + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true; + + //Enable each dependency + each(this.depMaps, bind(this, function (depMap, i) { + var id, mod, handler; + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, + (this.map.isDefine ? this.map : this.map.parentMap), + false, + !this.skipMap); + this.depMaps[i] = depMap; + + handler = getOwn(handlers, depMap.id); + + if (handler) { + this.depExports[i] = handler(this); + return; + } + + this.depCount += 1; + + on(depMap, 'defined', bind(this, function (depExports) { + if (this.undefed) { + return; + } + this.defineDep(i, depExports); + this.check(); + })); + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)); + } else if (this.events.error) { + // No direct errback on this module, but something + // else is listening for errors, so be sure to + // propagate the error correctly. + on(depMap, 'error', bind(this, function(err) { + this.emit('error', err); + })); + } + } + + id = depMap.id; + mod = registry[id]; + + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this); + } + })); + + //Enable each plugin that is used in + //a dependency + eachProp(this.pluginMaps, bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id); + if (mod && !mod.enabled) { + context.enable(pluginMap, this); + } + })); + + this.enabling = false; + + this.check(); + }, + + on: function (name, cb) { + var cbs = this.events[name]; + if (!cbs) { + cbs = this.events[name] = []; + } + cbs.push(cb); + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt); + }); + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name]; + } + } + }; + + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + } + } + + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func); + } + } else { + node.removeEventListener(name, func, false); + } + } + + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement; + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); + removeListener(node, context.onScriptError, 'error'); + + return { + node: node, + id: node && node.getAttribute('data-requiremodule') + }; + } + + function intakeDefines() { + var args; + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue(); + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + + args[args.length - 1])); + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args); + } + } + context.defQueueMap = {}; + } + + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + defQueueMap: {}, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/'; + } + } + + // Convert old style urlArgs string to a function. + if (typeof cfg.urlArgs === 'string') { + var urlArgs = cfg.urlArgs; + cfg.urlArgs = function(id, url) { + return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs; + }; + } + + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true + }; + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {}; + } + mixin(config[prop], value, true, true); + } else { + config[prop] = value; + } + }); + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop; + } + }); + }); + } + + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value + }; + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value); + } + shim[id] = value; + }); + config.shim = shim; + } + + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name; + + pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj; + + name = pkgObj.name; + location = pkgObj.location; + if (location) { + config.paths[name] = pkgObj.location; + } + + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, ''); + }); + } + + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id, null, true); + } + }); + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback); + } + }, + + makeShimExports: function (value) { + function fn() { + var ret; + if (value.init) { + ret = value.init.apply(global, arguments); + } + return ret || (value.exports && getGlobal(value.exports)); + } + return fn; + }, + + makeRequire: function (relMap, options) { + options = options || {}; + + function localRequire(deps, callback, errback) { + var id, map, requireMod; + + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true; + } + + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback); + } + + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]); + } + + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire); + } + + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true); + id = map.id; + + if (!hasProp(defined, id)) { + return onError(makeError('notloaded', 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])'))); + } + return defined[id]; + } + + //Grab defines waiting in the global queue. + intakeDefines(); + + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines(); + + requireMod = getModule(makeModuleMap(null, relMap)); + + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap; + + requireMod.init(deps, callback, errback, { + enabled: true + }); + + checkLoaded(); + }); + + return localRequire; + } + + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..'; + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); + moduleNamePlusExt = moduleNamePlusExt.substring(0, index); + } + + return context.nameToUrl(normalize(moduleNamePlusExt, + relMap && relMap.id, true), ext, true); + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id); + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id; + return hasProp(defined, id) || hasProp(registry, id); + } + }); + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue(); + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id); + + mod.undefed = true; + removeScript(id); + + delete defined[id]; + delete urlFetched[map.url]; + delete undefEvents[id]; + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function(args, i) { + if (args[0] === id) { + defQueue.splice(i, 1); + } + }); + delete context.defQueueMap[id]; + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events; + } + + cleanRegistry(id); + } + }; + } + + return localRequire; + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id); + if (mod) { + getModule(depMap).enable(); + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, args, mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports; + + takeGlobalQueue(); + + while (defQueue.length) { + args = defQueue.shift(); + if (args[0] === null) { + args[0] = moduleName; + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break; + } + found = true; + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true; + } + + callGetModule(args); + } + context.defQueueMap = {}; + + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName); + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return; + } else { + return onError(makeError('nodefine', + 'No define call for ' + moduleName, + null, + [moduleName])); + } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); + } + } + + checkLoaded(); + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, syms, i, parentModule, url, + parentPath, bundleId, + pkgMain = getOwn(config.pkgs, moduleName); + + if (pkgMain) { + moduleName = pkgMain; + } + + bundleId = getOwn(bundlesMap, moduleName); + + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt); + } + + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || ''); + } else { + //A module that needs to be converted to a path. + paths = config.paths; + + syms = moduleName.split('/'); + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/'); + + parentPath = getOwn(paths, parentModule); + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0]; + } + syms.splice(0, i, parentPath); + break; + } + } + + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/'); + url += (ext || (/^data\:|^blob\:|\?/.test(url) || skipExt ? '' : '.js')); + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; + } + + return config.urlArgs && !/^blob\:/.test(url) ? + url + config.urlArgs(moduleName, url) : url; + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url); + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args); + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || + (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null; + + //Pull out the name of the module and the context. + var data = getScriptData(evt); + context.completeLoad(data.id); + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt); + if (!hasPathFallback(data.id)) { + var parents = []; + eachProp(registry, function(value, key) { + if (key.indexOf('_@r') !== 0) { + each(value.depMaps, function(depMap) { + if (depMap.id === data.id) { + parents.push(key); + return true; + } + }); + } + }); + return onError(makeError('scripterror', 'Script error for "' + data.id + + (parents.length ? + '", needed by: ' + parents.join(', ') : + '"'), evt, [data.id])); + } + } + }; + + context.require = context.makeRequire(); + return context; + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + + //Find the right context, use default + var context, config, + contextName = defContextName; + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps; + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback; + callback = errback; + errback = optional; + } else { + deps = []; + } + } + + if (config && config.context) { + contextName = config.context; + } + + context = getOwn(contexts, contextName); + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName); + } + + if (config) { + context.configure(config); + } + + return context.require(deps, callback, errback); + }; + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config); + }; + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { + setTimeout(fn, 4); + } : function (fn) { fn(); }; + + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req; + } + + req.version = version; + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/; + req.isBrowser = isBrowser; + s = req.s = { + contexts: contexts, + newContext: newContext + }; + + //Create default context. + req({}); + + //Exports some context-sensitive methods on global require. + each([ + 'toUrl', + 'undef', + 'defined', + 'specified' + ], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName]; + return ctx.require[prop].apply(ctx, arguments); + }; + }); + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0]; + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0]; + if (baseElement) { + head = s.head = baseElement.parentNode; + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError; + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : + document.createElement('script'); + node.type = config.scriptType || 'text/javascript'; + node.charset = 'utf-8'; + node.async = true; + return node; + }; + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node; + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url); + + node.setAttribute('data-requirecontext', context.contextName); + node.setAttribute('data-requiremodule', moduleName); + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if (node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/requirejs/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/requirejs/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true; + + node.attachEvent('onreadystatechange', context.onScriptLoad); + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false); + node.addEventListener('error', context.onScriptError, false); + } + node.src = url; + + //Calling onNodeCreated after all properties on the node have been + //set, but before it is placed in the DOM. + if (config.onNodeCreated) { + config.onNodeCreated(node, config, moduleName, url); + } + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node; + if (baseElement) { + head.insertBefore(node, baseElement); + } else { + head.appendChild(node); + } + currentlyAddingScript = null; + + return node; + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation is that a build has been done so + //that only one script needs to be loaded anyway. This may need + //to be reevaluated if other use cases become common. + + // Post a task to the event loop to work around a bug in WebKit + // where the worker gets garbage-collected after calling + // importScripts(): https://webkit.org/b/153317 + setTimeout(function() {}, 0); + importScripts(url); + + //Account for anonymous modules + context.completeLoad(moduleName); + } catch (e) { + context.onError(makeError('importscripts', + 'importScripts failed for ' + + moduleName + ' at ' + url, + e, + [moduleName])); + } + } + }; + + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript; + } + + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script); + } + }); + return interactiveScript; + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode; + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main'); + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain; + + //Set final baseUrl if there is not already an explicit one, + //but only do so if the data-main value is not a loader plugin + //module ID. + if (!cfg.baseUrl && mainScript.indexOf('!') === -1) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/'); + mainScript = src.pop(); + subPath = src.length ? src.join('/') + '/' : './'; + + cfg.baseUrl = subPath; + } + + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, ''); + + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain; + } + + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; + + return true; + } + }); + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context; + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps; + deps = name; + name = null; + } + + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps; + deps = null; + } + + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = []; + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, commentReplace) + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep); + }); + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); + } + } + + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript(); + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule'); + } + context = contexts[node.getAttribute('data-requirecontext')]; + } + } + + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + if (context) { + context.defQueue.push([name, deps, callback]); + context.defQueueMap[name] = true; + } else { + globalDefQueue.push([name, deps, callback]); + } + }; + + define.amd = { + jQuery: true + }; + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text); + }; + + //Set up with config info. + req(cfg); +}(this)); diff --git a/fireboywatergirl4/data/crystal/temple.json b/fireboywatergirl4/data/crystal/temple.json new file mode 100644 index 00000000..7aace1af --- /dev/null +++ b/fireboywatergirl4/data/crystal/temple.json @@ -0,0 +1 @@ +{"index":0,"id":"crystal","label":"crystal temple","color":"#2A2A2A","type":"tree","levels":[{"id":1,"_id":1,"x":0.5,"y":0.95,"filename":"tutorials/levels/light_01.json","time":30,"mobileTime":50,"required":0,"initial":true},{"id":2,"_id":2,"x":0.6,"y":0.95,"filename":"tutorials/levels/ice_02.json","time":45,"mobileTime":65,"required":0,"initial":true},{"id":0,"_id":3,"x":0.4011,"y":0.95,"filename":"tutorials/levels/forest_01.json","time":40,"mobileTime":70,"required":0,"initial":true},{"id":38,"_id":4,"x":0.5,"y":0.05,"filename":"crystal/levels/crystal_38.json","type":"puzzle","time":90,"mobileTime":105,"required":0},{"id":34,"_id":5,"x":0.2,"y":0.05,"filename":"crystal/levels/crystal_34.json","type":"puzzle","time":180,"mobileTime":210,"required":0},{"id":13,"_id":6,"x":0.05,"y":0.55,"filename":"crystal/levels/crystal_13.json","type":"puzzle","time":90,"mobileTime":100,"required":0},{"id":36,"_id":7,"x":0.8,"y":0.05,"filename":"crystal/levels/crystal_36.json","type":"puzzle","time":100,"mobileTime":120,"required":0},{"id":18,"_id":8,"x":0.95,"y":0.55,"filename":"crystal/levels/crystal_18.json","type":"puzzle","time":120,"mobileTime":130,"required":0},{"id":3,"_id":9,"x":0.5,"y":0.85,"filename":"tutorials/levels/crystal_03.json","time":35,"mobileTime":60,"required":0,"initial":true},{"id":9,"_id":10,"x":0.75,"y":0.7011,"filename":"crystal/levels/crystal_09.json","type":"puzzle","time":90,"mobileTime":180,"required":0},{"id":7,"_id":11,"x":0.2489,"y":0.7022,"filename":"crystal/levels/crystal_07.json","type":"puzzle","time":60,"mobileTime":85,"required":0},{"id":24,"_id":12,"x":0.12,"y":0.3,"filename":"crystal/levels/crystal_24.json","type":"puzzle","time":100,"mobileTime":100,"required":0},{"id":27,"_id":13,"x":0.88,"y":0.3,"filename":"crystal/levels/crystal_27.json","type":"puzzle","time":90,"mobileTime":115,"required":0},{"id":4,"_id":14,"x":0.5,"y":0.7022,"filename":"crystal/levels/crystal_04.json","time":45,"mobileTime":60,"required":0},{"id":14,"_id":15,"x":0.1967,"y":0.4978,"filename":"crystal/levels/crystal_14.json","time":70,"mobileTime":100,"required":0},{"id":19,"_id":16,"x":0.8,"y":0.5,"filename":"crystal/levels/crystal_19.json","type":"speed","time":35,"mobileTime":60,"required":0},{"id":35,"_id":17,"x":0.75,"y":0.2,"filename":"crystal/levels/crystal_35.json","type":"speed","time":40,"mobileTime":70,"required":0},{"id":33,"_id":18,"x":0.2478,"y":0.1956,"filename":"crystal/levels/crystal_33.json","time":85,"mobileTime":90,"required":0},{"id":37,"_id":20,"x":0.4978,"y":0.1478,"filename":"crystal/levels/crystal_37.json","time":70,"mobileTime":75,"required":0},{"id":17,"_id":21,"x":0.4978,"y":0.3989,"filename":"crystal/levels/crystal_17.json","type":"speed","time":45,"mobileTime":70,"required":0},{"id":29,"_id":22,"x":0.5756,"y":0.3189,"filename":"crystal/levels/crystal_29.json","time":90,"mobileTime":95,"required":0},{"id":28,"_id":23,"x":0.43,"y":0.32,"filename":"crystal/levels/crystal_28.json","time":45,"mobileTime":50,"required":0},{"id":16,"_id":24,"x":0.3956,"y":0.4456,"filename":"crystal/levels/crystal_16.json","time":45,"mobileTime":60,"required":0},{"id":21,"_id":25,"x":0.6011,"y":0.4444,"filename":"crystal/levels/crystal_21.json","time":40,"mobileTime":50,"required":0},{"id":6,"_id":26,"x":0.5,"y":0.5,"filename":"crystal/levels/crystal_06.json","time":45,"mobileTime":70,"required":0},{"id":31,"_id":27,"x":0.5011,"y":0.2489,"filename":"crystal/levels/crystal_31.json","time":100,"mobileTime":105,"required":0},{"id":32,"_id":28,"x":0.6533,"y":0.25,"filename":"crystal/levels/crystal_32.json","time":70,"mobileTime":80,"required":0},{"id":30,"_id":29,"x":0.3478,"y":0.2444,"filename":"crystal/levels/crystal_30.json","type":"speed","time":45,"mobileTime":70,"required":0},{"id":12,"_id":30,"x":0.6,"y":0.5478,"filename":"crystal/levels/crystal_12.json","time":60,"mobileTime":90,"required":0},{"id":11,"_id":31,"x":0.4,"y":0.55,"filename":"crystal/levels/crystal_11.json","time":70,"mobileTime":95,"required":0},{"id":5,"_id":32,"x":0.5,"y":0.6,"filename":"crystal/levels/crystal_05.json","type":"speed","time":20,"mobileTime":45,"required":0},{"id":25,"_id":35,"x":0.68,"y":0.35,"filename":"crystal/levels/crystal_25.json","time":60,"mobileTime":75,"required":0},{"id":22,"_id":36,"x":0.32,"y":0.3522,"filename":"crystal/levels/crystal_22.json","time":90,"mobileTime":105,"required":0},{"id":15,"_id":37,"x":0.2967,"y":0.4567,"filename":"crystal/levels/crystal_15.json","time":70,"mobileTime":75,"required":0},{"id":20,"_id":38,"x":0.6978,"y":0.4522,"filename":"crystal/levels/crystal_20.json","time":55,"mobileTime":55,"required":0},{"id":23,"_id":39,"x":0.2156,"y":0.3467,"filename":"crystal/levels/crystal_23.json","time":140,"mobileTime":140,"required":0},{"id":26,"_id":40,"x":0.7756,"y":0.3544,"filename":"crystal/levels/crystal_26.json","time":80,"mobileTime":100,"required":0},{"id":10,"_id":41,"x":0.65,"y":0.6033,"filename":"crystal/levels/crystal_10.json","time":60,"mobileTime":85,"required":0},{"id":8,"_id":42,"x":0.3522,"y":0.6033,"filename":"crystal/levels/crystal_08.json","time":60,"mobileTime":87,"required":0}],"edges":[{"id":"temp","source":9,"target":10,"_id":"910"},{"id":"temp","source":10,"target":8,"_id":"108"},{"id":"temp","source":8,"target":13,"_id":"813"},{"id":"temp","source":13,"target":7,"_id":"137"},{"id":"temp","source":7,"target":4,"_id":"74"},{"id":"temp","source":4,"target":5,"_id":"45"},{"id":"temp","source":5,"target":12,"_id":"512"},{"id":"temp","source":12,"target":6,"_id":"126"},{"id":"temp","source":6,"target":11,"_id":"611"},{"id":"temp","source":11,"target":9,"_id":"119"},{"id":"temp","source":10,"target":16,"_id":"1016"},{"id":"temp","source":16,"target":13,"_id":"1613"},{"id":"temp","source":13,"target":17,"_id":"1317"},{"id":"temp","source":17,"target":4,"_id":"174"},{"id":"temp","source":4,"target":18,"_id":"418"},{"id":"temp","source":18,"target":12,"_id":"1812"},{"id":"temp","source":12,"target":15,"_id":"1215"},{"id":"temp","source":15,"target":11,"_id":"1511"},{"id":"temp","source":11,"target":10,"_id":"1110"},{"id":"temp","source":14,"target":32,"_id":"1432"},{"id":"temp","source":32,"target":26,"_id":"3226"},{"id":"temp","source":26,"target":21,"_id":"2621"},{"id":"temp","source":21,"target":25,"_id":"2125"},{"id":"temp","source":21,"target":22,"_id":"2122"},{"id":"temp","source":21,"target":23,"_id":"2123"},{"id":"temp","source":21,"target":24,"_id":"2124"},{"id":"temp","source":23,"target":27,"_id":"2327"},{"id":"temp","source":27,"target":22,"_id":"2722"},{"id":"temp","source":26,"target":31,"_id":"2631"},{"id":"temp","source":31,"target":24,"_id":"3124"},{"id":"temp","source":26,"target":30,"_id":"2630"},{"id":"temp","source":30,"target":25,"_id":"3025"},{"id":"temp","source":22,"target":35,"_id":"2235"},{"id":"temp","source":35,"target":25,"_id":"3525"},{"id":"temp","source":23,"target":36,"_id":"2336"},{"id":"temp","source":36,"target":24,"_id":"3624"},{"id":"temp","source":32,"target":41,"_id":"3241"},{"id":"temp","source":41,"target":38,"_id":"4138"},{"id":"temp","source":38,"target":40,"_id":"3840"},{"id":"temp","source":40,"target":28,"_id":"4028"},{"id":"temp","source":28,"target":20,"_id":"2820"},{"id":"temp","source":20,"target":29,"_id":"2029"},{"id":"temp","source":29,"target":39,"_id":"2939"},{"id":"temp","source":39,"target":37,"_id":"3937"},{"id":"temp","source":37,"target":42,"_id":"3742"},{"id":"temp","source":42,"target":32,"_id":"4232"},{"id":"temp","source":6,"target":15,"_id":"615"},{"id":"temp","source":15,"target":37,"_id":"1537"},{"id":"temp","source":37,"target":24,"_id":"3724"},{"id":"temp","source":25,"target":38,"_id":"2538"},{"id":"temp","source":38,"target":16,"_id":"3816"},{"id":"temp","source":16,"target":8,"_id":"168"},{"id":"temp","source":22,"target":28,"_id":"2228"},{"id":"temp","source":28,"target":17,"_id":"2817"},{"id":"temp","source":17,"target":7,"_id":"177"},{"id":"temp","source":5,"target":18,"_id":"518"},{"id":"temp","source":18,"target":29,"_id":"1829"},{"id":"temp","source":29,"target":23,"_id":"2923"},{"id":"temp","source":9,"target":14,"_id":"2923"},{"id":"temp","source":11,"target":42,"_id":"2923"},{"id":"temp","source":41,"target":10,"_id":"2923"},{"id":"temp","source":12,"target":39,"_id":"2923"},{"id":"temp","source":4,"target":20,"_id":"2923"},{"id":"temp","source":40,"target":13,"_id":"2923"}]} \ No newline at end of file diff --git a/fireboywatergirl4/data/tutorials/levels/crystal_03.json b/fireboywatergirl4/data/tutorials/levels/crystal_03.json new file mode 100644 index 00000000..118c774f --- /dev/null +++ b/fireboywatergirl4/data/tutorials/levels/crystal_03.json @@ -0,0 +1 @@ +{"height":29,"infinite":false,"layers":[{"data":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,4,3,0,2,5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,0,0,0,0,0,0,4,1,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,11,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,0,4,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,0,0,0,0,0,4,3,0,2,5,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,11,1,0,0,0,0,0,0,4,1,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,3,0,0,0,0,4,1,5,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,0,0,0,0,0,0,4,3,0,0,0,2,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,3,0,0,0,0,1,0,2,1,1,1,3,0,1,1,0,0,0,0,0,2,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,1,5,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,0,0,0,0,0,0,0,4,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,5,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,4,1,1,1,1,3,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,4,1,1,3,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,1,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,11,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"height":29,"name":"Ground","opacity":1,"type":"tilelayer","visible":true,"width":39,"x":0,"y":0},{"draworder":"topdown","name":"Tutorial","objects":[{"height":136,"id":83,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":624,"x":24,"y":776},{"height":32,"id":84,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal1","wrap":true},"type":"","visible":true,"width":392,"x":184,"y":784},{"height":32,"id":85,"name":"","properties":{"id":1},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal2","wrap":true},"type":"","visible":true,"width":168,"x":296,"y":816},{"height":176,"id":86,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":376,"x":832,"y":736},{"height":32,"id":87,"name":"","properties":{"id":2},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal3","wrap":true},"type":"","visible":true,"width":312,"x":896,"y":768},{"height":192,"id":88,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":688,"x":8,"y":576},{"height":32,"id":89,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal4","wrap":true},"type":"","visible":true,"width":368,"x":168,"y":624},{"height":32,"id":90,"name":"","properties":{"id":3},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal5","wrap":true},"type":"","visible":true,"width":192,"x":264,"y":656},{"height":600,"id":91,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":512,"x":688,"y":16},{"height":560,"id":92,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"type":"","visible":true,"width":536,"x":8,"y":16},{"height":32,"id":93,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal6","wrap":true},"type":"","visible":true,"width":408,"x":568,"y":200},{"height":32,"id":94,"name":"","properties":{"id":4},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal7","wrap":true},"type":"","visible":true,"width":160,"x":720,"y":232},{"height":32,"id":95,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal8","wrap":true},"type":"","visible":true,"width":296,"x":352,"y":312},{"height":32,"id":96,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal9","wrap":true},"type":"","visible":true,"width":312,"x":352,"y":344},{"height":32,"id":97,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal10","wrap":true},"type":"","visible":true,"width":272,"x":376,"y":376},{"height":32,"id":98,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal11","wrap":true},"type":"","visible":true,"width":320,"x":344,"y":408},{"height":32,"id":99,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal12","wrap":true},"type":"","visible":true,"width":272,"x":376,"y":440},{"height":32,"id":100,"name":"","properties":{"id":5},"propertytypes":{"id":"int"},"rotation":0,"text":{"bold":true,"fontfamily":"Trajan Pro","halign":"center","pixelsize":24,"text":"tutorial_crystal13","wrap":true},"type":"","visible":true,"width":120,"x":440,"y":472}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Chars","objects":[{"gid":16,"height":64,"id":35,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":600,"y":896},{"gid":17,"height":64,"id":36,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":536,"y":896},{"gid":21,"height":64,"id":37,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":688,"y":768},{"gid":21,"height":64,"id":38,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":944,"y":584},{"gid":21,"height":64,"id":39,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1040,"y":176},{"gid":21,"height":64,"id":40,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":320,"y":224},{"gid":21,"height":64,"id":41,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":176,"y":432},{"gid":21,"height":64,"id":42,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":64,"y":880},{"gid":20,"height":64,"id":43,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":160,"y":224},{"gid":20,"height":64,"id":44,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":664,"y":112},{"gid":20,"height":64,"id":45,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":1040,"y":304},{"gid":20,"height":64,"id":46,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":304,"y":432},{"gid":20,"height":64,"id":47,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":88,"y":688},{"gid":20,"height":64,"id":48,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":472,"y":880},{"gid":18,"height":64,"id":65,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":416,"y":256},{"gid":19,"height":64,"id":66,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":64,"y":256}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"draworder":"topdown","name":"Objects","objects":[{"gid":25,"height":64,"id":50,"name":"","properties":{"group":2},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":464,"y":768},{"gid":28,"height":64,"id":51,"name":"","rotation":0,"type":"","visible":true,"width":64,"x":928,"y":320},{"gid":24,"height":64,"id":52,"name":"","properties":{"group":4},"propertytypes":{"group":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1024,"y":640},{"height":96,"id":53,"name":"","properties":{"dx":0,"dy":3,"group":4},"propertytypes":{"dx":"int","dy":"int","group":"int"},"rotation":0,"type":"platform","visible":true,"width":32,"x":704,"y":480},{"gid":40,"height":96,"id":54,"name":"","properties":{"group":5,"initialState":1,"portalId":5},"propertytypes":{"group":"int","initialState":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":0,"y":896},{"gid":41,"height":96,"id":55,"name":"","properties":{"group":5,"initialState":1,"portalId":5},"propertytypes":{"group":"int","initialState":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1184,"y":896},{"gid":41,"height":96,"id":57,"name":"","properties":{"group":2,"portalId":2},"propertytypes":{"group":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1184,"y":160},{"gid":40,"height":96,"id":58,"name":"","properties":{"group":2,"portalId":2},"propertytypes":{"group":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":0,"y":672},{"gid":41,"height":96,"id":60,"name":"","properties":{"initialState":1},"propertytypes":{"initialState":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1184,"y":608},{"gid":41,"height":96,"id":61,"name":"","properties":{"initialState":1},"propertytypes":{"initialState":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":1184,"y":320},{"gid":41,"height":96,"id":62,"name":"","properties":{"group":1,"initialState":1,"portalId":1},"propertytypes":{"group":"int","initialState":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":240,"y":448},{"gid":40,"height":96,"id":64,"name":"","properties":{"group":1,"initialState":1,"portalId":1},"propertytypes":{"group":"int","initialState":"int","portalId":"int"},"rotation":0,"type":"","visible":true,"width":64,"x":240,"y":256}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0}],"nextobjectid":101,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.1.3","tileheight":32,"tilesets":[{"firstgid":1,"source":"../../../assets/tilemaps/tilesets/Ground.json"},{"firstgid":16,"source":"../../../assets/tilemaps/tilesets/Chars.json"},{"firstgid":24,"source":"../../../assets/tilemaps/tilesets/Objects.json"},{"firstgid":40,"source":"../../../assets/tilemaps/tilesets/LargeObjects.json"}],"tilewidth":32,"type":"map","version":1,"width":39} \ No newline at end of file diff --git a/fireboywatergirl4/fireboy-and-watergirl-crystal-temple.min.js b/fireboywatergirl4/fireboy-and-watergirl-crystal-temple.min.js new file mode 100644 index 00000000..9b02a287 --- /dev/null +++ b/fireboywatergirl4/fireboy-and-watergirl-crystal-temple.min.js @@ -0,0 +1,58 @@ +!function(a){if("object"==typeof exports)module.exports=a();else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.p2=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c||a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=0&&i<=1&&j>=0&&j<=1}},{"./Scalar":4}],2:[function(a,b,c){function d(){}b.exports=d,d.area=function(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1])},d.left=function(a,b,c){return d.area(a,b,c)>0},d.leftOn=function(a,b,c){return d.area(a,b,c)>=0},d.right=function(a,b,c){return d.area(a,b,c)<0},d.rightOn=function(a,b,c){return d.area(a,b,c)<=0};var e=[],f=[];d.collinear=function(a,b,c,g){if(g){var h=e,i=f;h[0]=b[0]-a[0],h[1]=b[1]-a[1],i[0]=c[0]-b[0],i[1]=c[1]-b[1];var j=h[0]*i[0]+h[1]*i[1],k=Math.sqrt(h[0]*h[0]+h[1]*h[1]),l=Math.sqrt(i[0]*i[0]+i[1]*i[1]);return Math.acos(j/(k*l))a.vertices.length)throw new Error("lol2");if(b<0)throw new Error("lol3");for(var d=b;db[a][0])&&(a=c);g.left(this.at(a-1),this.at(a),this.at(a+1))||this.reverse()},d.prototype.reverse=function(){for(var a=[],b=0,c=this.vertices.length;b!==c;b++)a.push(this.vertices.pop());this.vertices=a},d.prototype.isReflex=function(a){return g.right(this.at(a-1),this.at(a),this.at(a+1))};var i=[],j=[];d.prototype.canSee=function(a,b){var c,d,e=i,h=j;if(g.leftOn(this.at(a+1),this.at(a),this.at(b))&&g.rightOn(this.at(a-1),this.at(a),this.at(b)))return!1;d=g.sqdist(this.at(a),this.at(b));for(var k=0;k!==this.vertices.length;++k)if((k+1)%this.vertices.length!==a&&k!==a&&g.leftOn(this.at(a),this.at(b),this.at(k+1))&&g.rightOn(this.at(a),this.at(b),this.at(k))&&(e[0]=this.at(a),e[1]=this.at(b),h[0]=this.at(k),h[1]=this.at(k+1),c=f.lineInt(e,h),g.sqdist(this.at(a),c)0?this.slice(a):[this]},d.prototype.slice=function(a){if(0==a.length)return[this];if(a instanceof Array&&a.length&&a[0]instanceof Array&&2==a[0].length&&a[0][0]instanceof Array){for(var b=[this],c=0;ch)return console.warn("quickDecomp: max level ("+h+") reached."),a;for(var x=0;xq&&(q+=this.vertices.length),p=Number.MAX_VALUE,q3&&c>=0;--c)g.collinear(this.at(c-1),this.at(c),this.at(c+1),a)&&(this.vertices.splice(c%this.vertices.length,1),c--,b++);return b}},{"./Line":1,"./Point":2,"./Scalar":4}],4:[function(a,b,c){function d(){}b.exports=d,d.eq=function(a,b,c){return c=c||0,Math.abs(a-b) (http://steffe.se)",keywords:["p2.js","p2","physics","engine","2d"],main:"./src/p2.js",engines:{node:"*"},repository:{type:"git",url:"https://github.com/schteppe/p2.js.git"},bugs:{url:"https://github.com/schteppe/p2.js/issues"},licenses:[{type:"MIT"}],devDependencies:{grunt:"^0.4.5","grunt-contrib-jshint":"^0.11.2","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"~0.5.0","grunt-browserify":"~2.0.1","grunt-contrib-concat":"^0.4.0"},dependencies:{"poly-decomp":"0.1.0"}}},{}],7:[function(a,b,c){function d(a){this.lowerBound=e.create(),a&&a.lowerBound&&e.copy(this.lowerBound,a.lowerBound),this.upperBound=e.create(),a&&a.upperBound&&e.copy(this.upperBound,a.upperBound)}var e=a("../math/vec2");a("../utils/Utils");b.exports=d;var f=e.create();d.prototype.setFromPoints=function(a,b,c,d){var g=this.lowerBound,h=this.upperBound;"number"!=typeof c&&(c=0),0!==c?e.rotate(g,a[0],c):e.copy(g,a[0]),e.copy(h,g);for(var i=Math.cos(c),j=Math.sin(c),k=1;kh[o]&&(h[o]=l[o]),l[o]c&&(this.lowerBound[b]=c);var d=a.upperBound[b];this.upperBound[b]i?-1:h}},{"../math/vec2":30,"../utils/Utils":57}],8:[function(a,b,c){function d(a){this.type=a,this.result=[],this.world=null,this.boundingVolumeType=d.AABB}var e=a("../math/vec2"),f=a("../objects/Body");b.exports=d,d.AABB=1,d.BOUNDING_CIRCLE=2,d.prototype.setWorld=function(a){this.world=a},d.prototype.getCollisionPairs=function(a){};var g=e.create();d.boundingRadiusCheck=function(a,b){e.sub(g,a.position,b.position);var c=e.squaredLength(g),d=a.boundingRadius+b.boundingRadius;return c<=d*d},d.aabbCheck=function(a,b){return a.getAABB().overlaps(b.getAABB())},d.prototype.boundingVolumeCheck=function(a,b){var c;switch(this.boundingVolumeType){case d.BOUNDING_CIRCLE:c=d.boundingRadiusCheck(a,b);break;case d.AABB:c=d.aabbCheck(a,b);break;default:throw new Error("Bounding volume type not recognized: "+this.boundingVolumeType)}return c},d.canCollide=function(a,b){var c=f.KINEMATIC,d=f.STATIC;return(a.type!==d||b.type!==d)&&(!(a.type===c&&b.type===d||a.type===d&&b.type===c)&&((a.type!==c||b.type!==c)&&((a.sleepState!==f.SLEEPING||b.sleepState!==f.SLEEPING)&&!(a.sleepState===f.SLEEPING&&b.type===d||b.sleepState===f.SLEEPING&&a.type===d))))},d.NAIVE=1,d.SAP=2},{"../math/vec2":30,"../objects/Body":31}],9:[function(a,b,c){function d(){e.call(this,e.NAIVE)}var e=(a("../shapes/Circle"),a("../shapes/Plane"),a("../shapes/Shape"),a("../shapes/Particle"),a("../collision/Broadphase"));a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.getCollisionPairs=function(a){var b=a.bodies,c=this.result;c.length=0;for(var d=0,f=b.length;d!==f;d++)for(var g=b[d],h=0;hW&&V0)for(var N=0;NMath.pow(p,2))return 0;if(l)return!0;var q=this.createContactEquation(a,e,b,f);return h(q.normalA,j,c),g.normalize(q.normalA,q.normalA),g.scale(q.contactPointA,q.normalA,m),g.scale(q.contactPointB,q.normalA,-n),i(q.contactPointA,q.contactPointA,c),h(q.contactPointA,q.contactPointA,a.position),i(q.contactPointB,q.contactPointB,j),h(q.contactPointB,q.contactPointB,e.position),this.contactEquations.push(q),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(q)),1},d.prototype[q.PLANE|q.CONVEX]=d.prototype[q.PLANE|q.BOX]=d.prototype.planeConvex=function(a,b,c,d,e,f,k,l,m){var n=t,o=u,p=v,q=0;g.rotate(o,s,d);for(var r=0;r!==f.vertices.length;r++){var w=f.vertices[r];if(g.rotate(n,w,l),i(n,n,k),h(p,n,c),j(p,o)<=0){if(m)return!0;q++;var x=this.createContactEquation(a,e,b,f);h(p,n,c),g.copy(x.normalA,o);var y=j(p,x.normalA);g.scale(p,x.normalA,y),h(x.contactPointB,n,e.position),h(x.contactPointA,n,p),h(x.contactPointA,x.contactPointA,a.position),this.contactEquations.push(x),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(x))}}return this.enableFrictionReduction&&this.enableFriction&&q&&this.frictionEquations.push(this.createFrictionFromAverage(q)),q},d.prototype[q.PARTICLE|q.PLANE]=d.prototype.particlePlane=function(a,b,c,d,e,f,i,k,l){var m=t,n=u;k=k||0,h(m,c,i),g.rotate(n,s,k);var o=j(m,n);if(o>0)return 0;if(l)return!0;var p=this.createContactEquation(e,a,f,b);return g.copy(p.normalA,n),g.scale(m,p.normalA,o),h(p.contactPointA,c,m),h(p.contactPointA,p.contactPointA,e.position),h(p.contactPointB,c,a.position),this.contactEquations.push(p),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(p)),1},d.prototype[q.CIRCLE|q.PARTICLE]=d.prototype.circleParticle=function(a,b,c,d,e,f,j,k,l){var m=t;if(h(m,j,c),g.squaredLength(m)>Math.pow(b.radius,2))return 0;if(l)return!0;var n=this.createContactEquation(a,e,b,f);return g.copy(n.normalA,m),g.normalize(n.normalA,n.normalA),g.scale(n.contactPointA,n.normalA,b.radius),i(n.contactPointA,n.contactPointA,c),h(n.contactPointA,n.contactPointA,a.position),h(n.contactPointB,j,e.position),this.contactEquations.push(n),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(n)),1};var X=new o({radius:1}),Y=g.create(),Z=g.create();g.create();d.prototype[q.PLANE|q.CAPSULE]=d.prototype.planeCapsule=function(a,b,c,d,e,f,h,j,k){var l=Y,m=Z,n=X;g.set(l,-f.length/2,0),g.rotate(l,l,j),i(l,l,h),g.set(m,f.length/2,0),g.rotate(m,m,j),i(m,m,h),n.radius=f.radius;var o;this.enableFrictionReduction&&(o=this.enableFriction,this.enableFriction=!1);var p=this.circlePlane(e,n,l,0,a,b,c,d,k),q=this.circlePlane(e,n,m,0,a,b,c,d,k);if(this.enableFrictionReduction&&(this.enableFriction=o),k)return p||q;var r=p+q;return this.enableFrictionReduction&&r&&this.frictionEquations.push(this.createFrictionFromAverage(r)),r},d.prototype[q.CIRCLE|q.PLANE]=d.prototype.circlePlane=function(a,b,c,d,e,f,k,l,m){var n=a,o=b,p=c,q=e,r=k,w=l;w=w||0;var x=t,y=u,z=v;h(x,p,r),g.rotate(y,s,w);var A=j(y,x);if(A>o.radius)return 0;if(m)return!0;var B=this.createContactEquation(q,n,f,b);return g.copy(B.normalA,y),g.scale(B.contactPointB,B.normalA,-o.radius),i(B.contactPointB,B.contactPointB,p),h(B.contactPointB,B.contactPointB,n.position),g.scale(z,B.normalA,A),h(B.contactPointA,x,z),i(B.contactPointA,B.contactPointA,r),h(B.contactPointA,B.contactPointA,q.position),this.contactEquations.push(B),this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(B)),1},d.prototype[q.CONVEX]=d.prototype[q.CONVEX|q.BOX]=d.prototype[q.BOX]=d.prototype.convexConvex=function(a,b,c,e,f,k,l,m,n,o){var p=t,q=u,r=v,s=w,y=x,C=z,D=A,E=B,F=0,o="number"==typeof o?o:0;if(!d.findSeparatingAxis(b,c,e,k,l,m,p))return 0;h(D,l,c),j(p,D)>0&&g.scale(p,p,-1);var G=d.getClosestEdge(b,e,p,!0),H=d.getClosestEdge(k,m,p);if(-1===G||-1===H)return 0;for(var I=0;I<2;I++){var J=G,K=H,L=b,M=k,N=c,O=l,P=e,Q=m,R=a,S=f;if(0===I){var T;T=J,J=K,K=T,T=L,L=M,M=T,T=N,N=O,O=T,T=P,P=Q,Q=T,T=R,R=S,S=T}for(var U=K;U=3){if(n)return!0;var _=this.createContactEquation(R,S,L,M);F++;var Y=L.vertices[J%L.vertices.length],Z=L.vertices[(J+1)%L.vertices.length];g.rotate(r,Y,P),g.rotate(s,Z,P),i(r,r,N),i(s,s,N),h(y,s,r),g.rotate90cw(_.normalA,y),g.normalize(_.normalA,_.normalA),h(D,q,r);var $=j(_.normalA,D);g.scale(C,_.normalA,$),h(_.contactPointA,q,N),h(_.contactPointA,_.contactPointA,C),i(_.contactPointA,_.contactPointA,N),h(_.contactPointA,_.contactPointA,R.position),h(_.contactPointB,q,O),i(_.contactPointB,_.contactPointB,O),h(_.contactPointB,_.contactPointB,S.position),this.contactEquations.push(_),this.enableFrictionReduction||this.enableFriction&&this.frictionEquations.push(this.createFrictionFromContact(_))}}}return this.enableFrictionReduction&&this.enableFriction&&F&&this.frictionEquations.push(this.createFrictionFromAverage(F)),F};var $=g.fromValues(0,0);d.projectConvexOntoAxis=function(a,b,c,d,e){var f,h,i=null,k=null,l=$;g.rotate(l,d,-c);for(var m=0;mi)&&(i=h),(null===k||hi){var n=k;k=i,i=n}var o=j(b,d);g.set(e,k+o,i+o)};var _=g.fromValues(0,0),aa=g.fromValues(0,0),ba=g.fromValues(0,0),ca=g.fromValues(0,0),da=g.fromValues(0,0),ea=g.fromValues(0,0);d.findSeparatingAxis=function(a,b,c,e,f,i,j){var k=null,l=!1,m=!1,n=_,o=aa,p=ba,q=ca,s=da,t=ea;if(a instanceof r&&e instanceof r)for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;2!==x;x++){0===x?g.set(q,0,1):1===x&&g.set(q,1,0),0!==w&&g.rotate(q,q,w),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}else for(var u=0;2!==u;u++){var v=a,w=c;1===u&&(v=e,w=i);for(var x=0;x!==v.vertices.length;x++){g.rotate(o,v.vertices[x],w),g.rotate(p,v.vertices[(x+1)%v.vertices.length],w),h(n,p,o),g.rotate90cw(q,n),g.normalize(q,q),d.projectConvexOntoAxis(a,b,c,q,s),d.projectConvexOntoAxis(e,f,i,q,t);var y=s,z=t;s[0]>t[0]&&(z=s,y=t,!0);var A=z[0]-y[1];l=A<=0,(null===k||A>k)&&(g.copy(j,q),k=A,m=l)}}return m};var fa=g.fromValues(0,0),ga=g.fromValues(0,0),ha=g.fromValues(0,0);d.getClosestEdge=function(a,b,c,d){var e=fa,f=ga,i=ha;g.rotate(e,c,-b),d&&g.scale(e,e,-1);for(var k=-1,l=a.vertices.length,m=-1,n=0;n!==l;n++){h(f,a.vertices[(n+1)%l],a.vertices[n%l]),g.rotate90cw(i,f),g.normalize(i,i);var o=j(i,e);(-1===k||o>m)&&(k=n%l,m=o)}return k};var ia=g.create(),ja=g.create(),ka=g.create(),la=g.create(),ma=g.create(),na=g.create(),oa=g.create();d.prototype[q.CIRCLE|q.HEIGHTFIELD]=d.prototype.circleHeightfield=function(a,b,c,d,e,f,j,k,l,m){var n=f.heights,m=m||b.radius,o=f.elementWidth,p=ja,q=ia,r=ma,s=oa,t=na,u=ka,v=la,w=Math.floor((c[0]-m-j[0])/o),x=Math.ceil((c[0]+m-j[0])/o);w<0&&(w=0),x>=n.length&&(x=n.length-1);for(var y=n[w],z=n[x],A=w;Ay&&(y=n[A]);if(c[1]-m>y)return!l&&0;for(var B=!1,A=w;A=u[0]&&q[0]0)for(var A=w;A<=x;A++)if(g.set(u,A*o,n[A]),g.add(u,u,j),g.sub(p,c,u),g.squaredLength(p)=k.length&&(r=k.length-1);for(var s=k[q],t=k[r],u=q;us&&(s=k[u]);if(a.aabb.lowerBound[1]>s)return!j&&0;for(var v=0,u=q;u=0||f.containsPoint(this.from))&&this.intersectBody(a,e)}};var g=f.create();d.prototype.intersectBody=function(a,b){var c=this.checkCollisionResponse;if(!c||b.collisionResponse)for(var d=g,e=0,h=b.shapes.length;eb.boundingRadius*b.boundingRadius||(this._currentBody=f,this._currentShape=b,b.raycast(a,this,d,c),this._currentBody=this._currentShape=null)},d.prototype.getAABB=function(a){var b=this.to,c=this.from;f.set(a.lowerBound,Math.min(b[0],c[0]),Math.min(b[1],c[1])),f.set(a.upperBound,Math.max(b[0],c[0]),Math.max(b[1],c[1]))};f.create();d.prototype.reportIntersection=function(a,b,c,e){var g=(this.from,this.to,this._currentShape),h=this._currentBody;if(!(this.skipBackfaces&&f.dot(c,this.direction)>0))switch(this.mode){case d.ALL:a.set(c,g,h,b,e),this.callback(a);break;case d.CLOSEST:(b=0&&!(a[f].aabb.lowerBound[b]<=e.aabb.lowerBound[b]);f--)a[f+1]=a[f];a[f+1]=e}return a},d.prototype.sortList=function(){var a=this.axisList,b=this.axisIndex;d.sortAxisList(a,b)},d.prototype.getCollisionPairs=function(a){var b=this.axisList,c=this.result,d=this.axisIndex;c.length=0;for(var e=b.length;e--;){var g=b[e];g.aabbNeedsUpdate&&g.updateAABB()}this.sortList();for(var h=0,i=0|b.length;h!==i;h++)for(var j=b[h],k=h+1;kthis.upperLimit&&(f.maxForce=0,f.minForce=-this.maxForce,this.distance=this.upperLimit,l=!0),this.lowerLimitEnabled&&this.positionc)h.scale(e.normalA,j,-1),h.sub(e.contactPointA,k,g.position),h.sub(e.contactPointB,l,i.position),h.scale(o,j,c),h.add(e.contactPointA,e.contactPointA,o),-1===a.indexOf(e)&&a.push(e);else{var u=a.indexOf(e);-1!==u&&a.splice(u,1)}if(this.lowerLimitEnabled&&sh)o.angle=h,-1===e.indexOf(o)&&e.push(o);else{var r=e.indexOf(o);-1!==r&&e.splice(r,1)}if(this.lowerLimitEnabled&&q>1;if(b<3)return[];for(var c=[],e=[],f=0;f3;){var h=e[(f+0)%g],i=e[(f+1)%g],j=e[(f+2)%g],k=a[2*h],l=a[2*h+1],m=a[2*i],n=a[2*i+1],o=a[2*j],p=a[2*j+1],q=!1;if(d._convex(k,l,m,n,o,p)){q=!0;for(var r=0;r3*g)break}return c.push(e[0],e[1],e[2]),c},d._PointInTriangle=function(a,b,c,d,e,f,g,h){var i=g-c,j=h-d,k=e-c,l=f-d,m=a-c,n=b-d,o=i*i+j*j,p=i*k+j*l,q=i*m+j*n,r=k*k+l*l,s=k*m+l*n,t=1/(o*r-p*p),u=(r*q-p*s)*t,v=(o*s-p*q)*t;return u>=0&&v>=0&&u+v<1},d._convex=function(a,b,c,d,e,f){return(b-d)*(e-c)+(c-a)*(f-d)>=0},b.exports=d},{}],30:[function(a,b,c){var d=b.exports={},e=a("../utils/Utils");d.crossLength=function(a,b){return a[0]*b[1]-a[1]*b[0]},d.crossVZ=function(a,b,c){return d.rotate(a,b,-Math.PI/2),d.scale(a,a,c),a},d.crossZV=function(a,b,c){return d.rotate(a,c,Math.PI/2),d.scale(a,a,b),a},d.rotate=function(a,b,c){if(0!==c){var d=Math.cos(c),e=Math.sin(c),f=b[0],g=b[1];a[0]=d*f-e*g,a[1]=e*f+d*g}else a[0]=b[0],a[1]=b[1]},d.rotate90cw=function(a,b){var c=b[0],d=b[1];a[0]=d,a[1]=-c},d.toLocalFrame=function(a,b,c,e){d.copy(a,b),d.sub(a,a,c),d.rotate(a,a,-e)},d.toGlobalFrame=function(a,b,c,e){d.copy(a,b),d.rotate(a,a,e),d.add(a,a,c)},d.vectorToLocalFrame=function(a,b,c){d.rotate(a,b,-c)},d.vectorToGlobalFrame=function(a,b,c){d.rotate(a,b,c)},d.centroid=function(a,b,c,e){return d.add(a,b,c),d.add(a,a,e),d.scale(a,a,1/3),a},d.create=function(){var a=new e.ARRAY_TYPE(2);return a[0]=0,a[1]=0,a},d.clone=function(a){var b=new e.ARRAY_TYPE(2);return b[0]=a[0],b[1]=a[1],b},d.fromValues=function(a,b){var c=new e.ARRAY_TYPE(2);return c[0]=a,c[1]=b,c},d.copy=function(a,b){return a[0]=b[0],a[1]=b[1],a},d.set=function(a,b,c){return a[0]=b,a[1]=c,a},d.add=function(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a},d.subtract=function(a,b,c){return a[0]=b[0]-c[0],a[1]=b[1]-c[1],a},d.sub=d.subtract,d.multiply=function(a,b,c){return a[0]=b[0]*c[0],a[1]=b[1]*c[1],a},d.mul=d.multiply,d.divide=function(a,b,c){return a[0]=b[0]/c[0],a[1]=b[1]/c[1],a},d.div=d.divide,d.scale=function(a,b,c){return a[0]=b[0]*c,a[1]=b[1]*c,a},d.distance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return Math.sqrt(c*c+d*d)},d.dist=d.distance,d.squaredDistance=function(a,b){var c=b[0]-a[0],d=b[1]-a[1];return c*c+d*d},d.sqrDist=d.squaredDistance,d.length=function(a){var b=a[0],c=a[1];return Math.sqrt(b*b+c*c)},d.len=d.length,d.squaredLength=function(a){var b=a[0],c=a[1];return b*b+c*c},d.sqrLen=d.squaredLength,d.negate=function(a,b){return a[0]=-b[0],a[1]=-b[1],a},d.normalize=function(a,b){var c=b[0],d=b[1],e=c*c+d*d;return e>0&&(e=1/Math.sqrt(e),a[0]=b[0]*e,a[1]=b[1]*e),a},d.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]},d.str=function(a){return"vec2("+a[0]+", "+a[1]+")"},d.lerp=function(a,b,c,d){var e=b[0],f=b[1];return a[0]=e+d*(c[0]-e),a[1]=f+d*(c[1]-f),a},d.reflect=function(a,b,c){var d=b[0]*c[0]+b[1]*c[1];a[0]=b[0]-2*c[0]*d,a[1]=b[1]-2*c[1]*d},d.getLineSegmentsIntersection=function(a,b,c,e,f){var g=d.getLineSegmentsIntersectionFraction(b,c,e,f);return!(g<0)&&(a[0]=b[0]+g*(c[0]-b[0]),a[1]=b[1]+g*(c[1]-b[1]),!0)},d.getLineSegmentsIntersectionFraction=function(a,b,c,d){var e,f,g=b[0]-a[0],h=b[1]-a[1],i=d[0]-c[0],j=d[1]-c[1];return e=(-h*(a[0]-c[0])+g*(a[1]-c[1]))/(-i*h+g*j),f=(i*(a[1]-c[1])-j*(a[0]-c[0]))/(-i*h+g*j),e>=0&&e<=1&&f>=0&&f<=1?f:-1}},{"../utils/Utils":57}],31:[function(a,b,c){function d(a){a=a||{},k.call(this),this.id=a.id||++d._idCounter,this.world=null,this.shapes=[],this.mass=a.mass||0,this.invMass=0,this.inertia=0,this.invInertia=0,this.invMassSolve=0,this.invInertiaSolve=0,this.fixedRotation=!!a.fixedRotation,this.fixedX=!!a.fixedX,this.fixedY=!!a.fixedY,this.massMultiplier=e.create(),this.position=e.fromValues(0,0),a.position&&e.copy(this.position,a.position),this.interpolatedPosition=e.fromValues(0,0),this.interpolatedAngle=0,this.previousPosition=e.fromValues(0,0),this.previousAngle=0,this.velocity=e.fromValues(0,0),a.velocity&&e.copy(this.velocity,a.velocity),this.vlambda=e.fromValues(0,0),this.wlambda=0,this.angle=a.angle||0,this.angularVelocity=a.angularVelocity||0,this.force=e.create(),a.force&&e.copy(this.force,a.force),this.angularForce=a.angularForce||0,this.damping="number"==typeof a.damping?a.damping:.1,this.angularDamping="number"==typeof a.angularDamping?a.angularDamping:.1,this.type=d.STATIC,void 0!==a.type?this.type=a.type:a.mass?this.type=d.DYNAMIC:this.type=d.STATIC,this.boundingRadius=0,this.aabb=new j,this.aabbNeedsUpdate=!0,this.allowSleep=void 0===a.allowSleep||a.allowSleep,this.wantsToSleep=!1,this.sleepState=d.AWAKE,this.sleepSpeedLimit=void 0!==a.sleepSpeedLimit?a.sleepSpeedLimit:.2,this.sleepTimeLimit=void 0!==a.sleepTimeLimit?a.sleepTimeLimit:1,this.gravityScale=void 0!==a.gravityScale?a.gravityScale:1,this.collisionResponse=void 0===a.collisionResponse||a.collisionResponse,this.idleTime=0,this.timeLastSleepy=0, +this.ccdSpeedThreshold=void 0!==a.ccdSpeedThreshold?a.ccdSpeedThreshold:-1,this.ccdIterations=void 0!==a.ccdIterations?a.ccdIterations:10,this.concavePath=null,this._wakeUpAfterNarrowphase=!1,this.updateMassProperties()}var e=a("../math/vec2"),f=a("poly-decomp"),g=a("../shapes/Convex"),h=a("../collision/RaycastResult"),i=a("../collision/Ray"),j=a("../collision/AABB"),k=a("../events/EventEmitter");b.exports=d,d.prototype=new k,d.prototype.constructor=d,d._idCounter=0,d.prototype.updateSolveMassProperties=function(){this.sleepState===d.SLEEPING||this.type===d.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve=0):(this.invMassSolve=this.invMass,this.invInertiaSolve=this.invInertia)},d.prototype.setDensity=function(a){var b=this.getArea();this.mass=b*a,this.updateMassProperties()},d.prototype.getArea=function(){for(var a=0,b=0;bc&&(c=g+h)}this.boundingRadius=c},d.prototype.addShape=function(a,b,c){if(a.body)throw new Error("A shape can only be added to one body.");a.body=this,b?e.copy(a.position,b):e.set(a.position,0,0),a.angle=c||0,this.shapes.push(a),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0},d.prototype.removeShape=function(a){var b=this.shapes.indexOf(a);return-1!==b&&(this.shapes.splice(b,1),this.aabbNeedsUpdate=!0,a.body=null,!0)},d.prototype.updateMassProperties=function(){if(this.type===d.STATIC||this.type===d.KINEMATIC)this.mass=Number.MAX_VALUE,this.invMass=0,this.inertia=Number.MAX_VALUE,this.invInertia=0;else{var a=this.shapes,b=a.length,c=this.mass/b,f=0;if(this.fixedRotation)this.inertia=Number.MAX_VALUE,this.invInertia=0;else{for(var g=0;g0?1/f:0}this.invMass=1/this.mass,e.set(this.massMultiplier,this.fixedX?0:1,this.fixedY?0:1)}};e.create();d.prototype.applyForce=function(a,b){if(e.add(this.force,this.force,a),b){var c=e.crossLength(b,a);this.angularForce+=c}};var n=e.create(),o=e.create(),p=e.create();d.prototype.applyForceLocal=function(a,b){b=b||p;var c=n,d=o;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyForce(c,d)};var q=e.create();d.prototype.applyImpulse=function(a,b){if(this.type===d.DYNAMIC){var c=q;if(e.scale(c,a,this.invMass),e.multiply(c,this.massMultiplier,c),e.add(this.velocity,c,this.velocity),b){var f=e.crossLength(b,a);f*=this.invInertia,this.angularVelocity+=f}}};var r=e.create(),s=e.create(),t=e.create();d.prototype.applyImpulseLocal=function(a,b){b=b||t;var c=r,d=s;this.vectorToWorldFrame(c,a),this.vectorToWorldFrame(d,b),this.applyImpulse(c,d)},d.prototype.toLocalFrame=function(a,b){e.toLocalFrame(a,b,this.position,this.angle)},d.prototype.toWorldFrame=function(a,b){e.toGlobalFrame(a,b,this.position,this.angle)},d.prototype.vectorToLocalFrame=function(a,b){e.vectorToLocalFrame(a,b,this.angle)},d.prototype.vectorToWorldFrame=function(a,b){e.vectorToGlobalFrame(a,b,this.angle)},d.prototype.fromPolygon=function(a,b){b=b||{};for(var c=this.shapes.length;c>=0;--c)this.removeShape(this.shapes[c]);var d=new f.Polygon;if(d.vertices=a,d.makeCCW(),"number"==typeof b.removeCollinearPoints&&d.removeCollinearPoints(b.removeCollinearPoints),void 0===b.skipSimpleCheck&&!d.isSimple())return!1;this.concavePath=d.vertices.slice(0);for(var c=0;c=Math.pow(this.sleepSpeedLimit,2)?(this.idleTime=0,this.sleepState=d.AWAKE):(this.idleTime+=c,this.sleepState=d.SLEEPY),this.idleTime>this.sleepTimeLimit&&(b?this.wantsToSleep=!0:this.sleep())}},d.prototype.overlaps=function(a){return this.world.overlapKeeper.bodiesAreOverlapping(this,a)};var x=e.create(),y=e.create();d.prototype.integrate=function(a){var b=this.invMass,c=this.force,d=this.position,f=this.velocity;e.copy(this.previousPosition,this.position),this.previousAngle=this.angle,this.fixedRotation||(this.angularVelocity+=this.angularForce*this.invInertia*a),e.scale(x,c,a*b),e.multiply(x,this.massMultiplier,x),e.add(f,x,f),this.integrateToTimeOfImpact(a)||(e.scale(y,f,a),e.add(d,d,y),this.fixedRotation||(this.angle+=this.angularVelocity*a)),this.aabbNeedsUpdate=!0};var z=new h,A=new i({mode:i.ALL}),B=e.create(),C=e.create(),D=e.create(),E=e.create();d.prototype.integrateToTimeOfImpact=function(a){if(this.ccdSpeedThreshold<0||e.squaredLength(this.velocity)=j&&i=0&&(f.rotate(n,l,d),f.scale(n,n,2*r-1),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}for(var u=Math.pow(this.radius,2)+Math.pow(q,2),r=0;r<2;r++){f.set(o,q*(2*r-1),0),f.toGlobalFrame(o,o,c,d);var v=Math.pow(g[0]-e[0],2)+Math.pow(g[1]-e[1],2),w=2*((g[0]-e[0])*(e[0]-o[0])+(g[1]-e[1])*(e[1]-o[1])),x=Math.pow(e[0]-o[0],2)+Math.pow(e[1]-o[1],2)-Math.pow(this.radius,2),t=Math.pow(w,2)-4*v*x;if(!(t<0))if(0===t){if(f.lerp(m,e,g,t),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,t,n,-1),a.shouldStop(b)))return}else{var y=Math.sqrt(t),z=1/(2*v),A=(-w-y)*z,B=(-w+y)*z;if(A>=0&&A<=1&&(f.lerp(m,e,g,A),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,A,n,-1),a.shouldStop(b))))return;if(B>=0&&B<=1&&(f.lerp(m,e,g,B),f.squaredDistance(m,c)>u&&(f.sub(n,m,o),f.normalize(n,n),b.reportIntersection(a,B,n,-1),a.shouldStop(b))))return}}}},{"../math/vec2":30,"./Shape":45}],39:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={radius:arguments[0]},console.warn("The Circle constructor signature has changed. Please use the following format: new Circle({ radius: 1 })")),a=a||{},this.radius=a.radius||1,a.type=e.CIRCLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){var b=this.radius;return a*b*b/2},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.radius},d.prototype.updateArea=function(){this.area=Math.PI*this.radius*this.radius},d.prototype.computeAABB=function(a,b,c){var d=this.radius;f.set(a.upperBound,d,d),f.set(a.lowerBound,-d,-d),b&&(f.add(a.lowerBound,a.lowerBound,b),f.add(a.upperBound,a.upperBound,b))};var g=f.create(),h=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,i=b.to,j=this.radius,k=Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2),l=2*((i[0]-e[0])*(e[0]-c[0])+(i[1]-e[1])*(e[1]-c[1])),m=Math.pow(e[0]-c[0],2)+Math.pow(e[1]-c[1],2)-Math.pow(j,2),n=Math.pow(l,2)-4*k*m,o=g,p=h;if(!(n<0))if(0===n)f.lerp(o,e,i,n),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,n,p,-1);else{var q=Math.sqrt(n),r=1/(2*k),s=(-l-q)*r,t=(-l+q)*r;if(s>=0&&s<=1&&(f.lerp(o,e,i,s),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,s,p,-1),a.shouldStop(b)))return;t>=0&&t<=1&&(f.lerp(o,e,i,t),f.sub(p,o,c),f.normalize(p,p),b.reportIntersection(a,t,p,-1))}}},{"../math/vec2":30,"./Shape":45}],40:[function(a,b,c){function d(a){Array.isArray(arguments[0])&&(a={vertices:arguments[0],axes:arguments[1]},console.warn("The Convex constructor signature has changed. Please use the following format: new Convex({ vertices: [...], ... })")),a=a||{},this.vertices=[];for(var b=void 0!==a.vertices?a.vertices:[],c=0;ce)&&(e=d),(null===g||de){var j=g;g=e,e=j}f.set(b,g,e)},d.prototype.projectOntoWorldAxis=function(a,b,c,d){var e=i;this.projectOntoLocalAxis(a,d),0!==c?f.rotate(e,a,c):e=a;var g=f.dot(b,e);f.set(d,d[0]+g,d[1]+g)},d.prototype.updateTriangles=function(){this.triangles.length=0;for(var a=[],b=0;bb&&(b=d)}this.boundingRadius=Math.sqrt(b)},d.triangleArea=function(a,b,c){return.5*((b[0]-a[0])*(c[1]-a[1])-(c[0]-a[0])*(b[1]-a[1]))},d.prototype.updateArea=function(){this.updateTriangles(),this.area=0;for(var a=this.triangles,b=this.vertices,c=0;c!==a.length;c++){var e=a[c],f=b[e[0]],g=b[e[1]],h=b[e[2]],i=d.triangleArea(f,g,h);this.area+=i}},d.prototype.computeAABB=function(a,b,c){a.setFromPoints(this.vertices,b,c,0)};var o=f.create(),p=f.create(),q=f.create();d.prototype.raycast=function(a,b,c,d){var e=o,g=p,h=q,i=this.vertices;f.toLocalFrame(e,b.from,c,d),f.toLocalFrame(g,b.to,c,d);for(var j=i.length,k=0;k=0&&(f.sub(h,m,l),f.rotate(h,h,-Math.PI/2+d),f.normalize(h,h),b.reportIntersection(a,n,h,k))}}},{"../math/polyk":29,"../math/vec2":30,"./Shape":45,"poly-decomp":5}],41:[function(a,b,c){function d(a){if(Array.isArray(arguments[0])){if(a={heights:arguments[0]},"object"==typeof arguments[1])for(var b in arguments[1])a[b]=arguments[1][b];console.warn("The Heightfield constructor signature has changed. Please use the following format: new Heightfield({ heights: [...], ... })")}a=a||{},this.heights=a.heights?a.heights.slice(0):[],this.maxValue=a.maxValue||null,this.minValue=a.minValue||null,this.elementWidth=a.elementWidth||.1,void 0!==a.maxValue&&void 0!==a.minValue||this.updateMaxMinValues(),a.type=e.HEIGHTFIELD,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.updateMaxMinValues=function(){for(var a=this.heights,b=a[0],c=a[0],d=0;d!==a.length;d++){var e=a[d];e>b&&(b=e),es){var t=r;r=s,s=t}for(var u=0;u=0&&(f.sub(m,o,n),f.rotate(m,m,d+Math.PI/2),f.normalize(m,m),b.reportIntersection(a,v,m,-1),a.shouldStop(b)))return}}},{"../math/vec2":30,"../utils/Utils":57,"./Shape":45}],42:[function(a,b,c){function d(a){"number"==typeof arguments[0]&&(a={length:arguments[0]},console.warn("The Line constructor signature has changed. Please use the following format: new Line({ length: 1, ... })")),a=a||{},this.length=a.length||1,a.type=e.LINE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return a*Math.pow(this.length,2)/12},d.prototype.updateBoundingRadius=function(){this.boundingRadius=this.length/2};var g=[f.create(),f.create()];d.prototype.computeAABB=function(a,b,c){var d=this.length/2;f.set(g[0],-d,0),f.set(g[1],d,0),a.setFromPoints(g,b,c,0)};var h=(f.create(),f.create()),i=f.create(),j=f.create(),k=f.fromValues(0,1);d.prototype.raycast=function(a,b,c,d){var e=b.from,g=b.to,l=i,m=j,n=this.length/2;f.set(l,-n,0),f.set(m,n,0),f.toGlobalFrame(l,l,c,d),f.toGlobalFrame(m,m,c,d);var o=f.getLineSegmentsIntersectionFraction(l,m,e,g);if(o>=0){var p=h;f.rotate(p,k,d),b.reportIntersection(a,o,p,-1)}}},{"../math/vec2":30,"./Shape":45}],43:[function(a,b,c){function d(a){a=a||{},a.type=e.PARTICLE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=0},d.prototype.computeAABB=function(a,b,c){f.copy(a.lowerBound,b),f.copy(a.upperBound,b)}},{"../math/vec2":30,"./Shape":45}],44:[function(a,b,c){function d(a){a=a||{},a.type=e.PLANE,e.call(this,a)}var e=a("./Shape"),f=a("../math/vec2");a("../utils/Utils");b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.computeMomentOfInertia=function(a){return 0},d.prototype.updateBoundingRadius=function(){this.boundingRadius=Number.MAX_VALUE},d.prototype.computeAABB=function(a,b,c){var d=c%(2*Math.PI),e=f.set,g=Number.MAX_VALUE,h=a.lowerBound,i=a.upperBound;0===d?(e(h,-g,-g),e(i,g,0)):d===Math.PI/2?(e(h,0,-g),e(i,g,g)):d===Math.PI?(e(h,-g,0),e(i,g,g)):d===3*Math.PI/2?(e(h,-g,-g),e(i,0,g)):(e(h,-g,-g),e(i,g,g)),f.add(h,h,b),f.add(i,i,b)},d.prototype.updateArea=function(){this.area=Number.MAX_VALUE};var g=f.create(),h=(f.create(),f.create(),f.create()),i=f.create();d.prototype.raycast=function(a,b,c,d){var e=b.from,j=b.to,k=b.direction,l=g,m=h,n=i;f.set(m,0,1),f.rotate(m,m,d),f.sub(n,e,c);var o=f.dot(n,m);if(f.sub(n,j,c),!(o*f.dot(n,m)>0||f.squaredDistance(e,j)n*h&&(p=n*h-l),f[a]+=p,b.addToWlambda(p),p}},{"../equations/FrictionEquation":23,"../math/vec2":30,"../utils/Utils":57,"./Solver":47}],47:[function(a,b,c){function d(a,b){a=a||{},e.call(this),this.type=b,this.equations=[],this.equationSortFunction=a.equationSortFunction||!1}var e=(a("../utils/Utils"),a("../events/EventEmitter"));b.exports=d,d.prototype=new e,d.prototype.constructor=d,d.prototype.solve=function(a,b){throw new Error("Solver.solve should be implemented by subclasses!")};var f={bodies:[]};d.prototype.solveIsland=function(a,b){this.removeAllEquations(),b.equations.length&&(this.addEquations(b.equations),f.bodies.length=0,b.getBodies(f.bodies),f.bodies.length&&this.solve(a,f))},d.prototype.sortEquations=function(){this.equationSortFunction&&this.equations.sort(this.equationSortFunction)},d.prototype.addEquation=function(a){a.enabled&&this.equations.push(a)},d.prototype.addEquations=function(a){for(var b=0,c=a.length;b!==c;b++){var d=a[b];d.enabled&&this.equations.push(d)}},d.prototype.removeEquation=function(a){var b=this.equations.indexOf(a);-1!==b&&this.equations.splice(b,1)},d.prototype.removeAllEquations=function(){this.equations.length=0},d.GS=1,d.ISLAND=2},{"../events/EventEmitter":26,"../utils/Utils":57}],48:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/ContactEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/ContactEquation":21,"./Pool":55}],49:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../equations/FrictionEquation"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=null,this}},{"../equations/FrictionEquation":23,"./Pool":55}],50:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/IslandNode"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/IslandNode":60,"./Pool":55}],51:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("../world/Island"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.reset(),this}},{"../world/Island":58,"./Pool":55}],52:[function(a,b,c){function d(){this.overlappingShapesLastState=new e,this.overlappingShapesCurrentState=new e,this.recordPool=new f({size:16}),this.tmpDict=new e,this.tmpArray1=[]}var e=a("./TupleDictionary"),f=(a("./OverlapKeeperRecord"),a("./OverlapKeeperRecordPool"));a("./Utils");b.exports=d,d.prototype.tick=function(){for(var a=this.overlappingShapesLastState,b=this.overlappingShapesCurrentState,c=a.keys.length;c--;){var d=a.keys[c],e=a.getByKey(d);b.getByKey(d);e&&this.recordPool.release(e)}a.reset(),a.copy(b),b.reset()},d.prototype.setOverlapping=function(a,b,c,d){var e=(this.overlappingShapesLastState,this.overlappingShapesCurrentState);if(!e.get(b.id,d.id)){var f=this.recordPool.get();f.set(a,b,c,d),e.set(b.id,d.id,f)}},d.prototype.getNewOverlaps=function(a){return this.getDiff(this.overlappingShapesLastState,this.overlappingShapesCurrentState,a)},d.prototype.getEndOverlaps=function(a){return this.getDiff(this.overlappingShapesCurrentState,this.overlappingShapesLastState,a)},d.prototype.bodiesAreOverlapping=function(a,b){for(var c=this.overlappingShapesCurrentState,d=c.keys.length;d--;){var e=c.keys[d],f=c.data[e];if(f.bodyA===a&&f.bodyB===b||f.bodyA===b&&f.bodyB===a)return!0}return!1},d.prototype.getDiff=function(a,b,c){var c=c||[],d=a,e=b;c.length=0;for(var f=e.keys.length;f--;){var g=e.keys[f],h=e.data[g];if(!h)throw new Error("Key "+g+" had no data!");d.data[g]||c.push(h)}return c},d.prototype.isNewOverlap=function(a,b){var c=0|a.id,d=0|b.id,e=this.overlappingShapesLastState,f=this.overlappingShapesCurrentState;return!e.get(c,d)&&!!f.get(c,d)},d.prototype.getNewBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getNewOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getEndBodyOverlaps=function(a){this.tmpArray1.length=0;var b=this.getEndOverlaps(this.tmpArray1);return this.getBodyDiff(b,a)},d.prototype.getBodyDiff=function(a,b){b=b||[];for(var c=this.tmpDict,d=a.length;d--;){var e=a[d];c.set(0|e.bodyA.id,0|e.bodyB.id,e)}for(d=c.keys.length;d--;){var e=c.getByKey(c.keys[d]);e&&b.push(e.bodyA,e.bodyB)}return c.reset(),b}},{"./OverlapKeeperRecord":53,"./OverlapKeeperRecordPool":54,"./TupleDictionary":56,"./Utils":57}],53:[function(a,b,c){function d(a,b,c,d){this.shapeA=b,this.shapeB=d,this.bodyA=a,this.bodyB=c}b.exports=d,d.prototype.set=function(a,b,c,e){d.call(this,a,b,c,e)}},{}],54:[function(a,b,c){function d(){f.apply(this,arguments)}var e=a("./OverlapKeeperRecord"),f=a("./Pool");b.exports=d,d.prototype=new f,d.prototype.constructor=d,d.prototype.create=function(){return new e},d.prototype.destroy=function(a){return a.bodyA=a.bodyB=a.shapeA=a.shapeB=null,this}},{"./OverlapKeeperRecord":53,"./Pool":55}],55:[function(a,b,c){function d(a){a=a||{},this.objects=[],void 0!==a.size&&this.resize(a.size)}b.exports=d,d.prototype.resize=function(a){for(var b=this.objects;b.length>a;)b.pop();for(;b.length(0|b)?a<<16|65535&b:b<<16|65535&a)},d.prototype.getByKey=function(a){return a|=0,this.data[a]},d.prototype.get=function(a,b){return this.data[this.getKey(a,b)]},d.prototype.set=function(a,b,c){if(!c)throw new Error("No data!");var d=this.getKey(a,b);return this.data[d]||this.keys.push(d),this.data[d]=c,d},d.prototype.reset=function(){for(var a=this.data,b=this.keys,c=b.length;c--;)delete a[b[c]];b.length=0},d.prototype.copy=function(a){this.reset(),e.appendArray(this.keys,a.keys);for(var b=a.keys.length;b--;){var c=a.keys[b];this.data[c]=a.data[c]}}},{"./Utils":57}],57:[function(a,b,c){function d(){}b.exports=d,d.appendArray=function(a,b){if(b.length<15e4)a.push.apply(a,b);else for(var c=0,d=b.length;c!==d;++c)a.push(b[c])},d.splice=function(a,b,c){c=c||1;for(var d=b,e=a.length-c;d=a&&d=0;r-=2)for(var A=x.length-2;A>=0;A-=2)(z[r]===x[A]&&z[r+1]===x[A+1]||z[r+1]===x[A]&&z[r]===x[A+1])&&x.splice(A,2);var B=l.length;for(r=0;r!==B;r++){var C=l[r];if(!C.collideConnected)for(var A=x.length-2;A>=0;A-=2)(C.bodyA===x[A]&&C.bodyB===x[A+1]||C.bodyB===x[A]&&C.bodyA===x[A+1])&&x.splice(A,2)}this.postBroadphaseEvent.pairs=x,this.emit(this.postBroadphaseEvent),this.postBroadphaseEvent.pairs=null,k.reset(this);for(var r=0,D=x.length;r!==D;r+=2)for(var E=x[r],F=x[r+1],G=0,H=E.shapes.length;G!==H;G++)for(var I=E.shapes[G],J=I.position,K=I.angle,L=0,M=F.shapes.length;L!==M;L++){var N=F.shapes[L],O=N.position,P=N.angle,Q=this.defaultContactMaterial;if(I.material&&N.material){var R=this.getContactMaterial(I.material,N.material);R&&(Q=R)}this.runNarrowphase(k,E,I,J,K,F,N,O,P,Q,this.frictionGravity)}for(var r=0;r!==i;r++){var S=e[r];S._wakeUpAfterNarrowphase&&(S.wakeUp(),S._wakeUpAfterNarrowphase=!1)}if(this.has("endContact")){this.overlapKeeper.getEndOverlaps(y);for(var T=this.endContactEvent,L=y.length;L--;){var U=y[L];T.shapeA=U.shapeA,T.shapeB=U.shapeB,T.bodyA=U.bodyA,T.bodyB=U.bodyB,this.emit(T)}y.length=0}var V=this.preSolveEvent;V.contactEquations=k.contactEquations,V.frictionEquations=k.frictionEquations,this.emit(V),V.contactEquations=V.frictionEquations=null;var B=l.length;for(r=0;r!==B;r++)l[r].update();if(k.contactEquations.length||k.frictionEquations.length||B)if(this.islandSplit){for(p.equations.length=0,s.appendArray(p.equations,k.contactEquations),s.appendArray(p.equations,k.frictionEquations),r=0;r!==B;r++)s.appendArray(p.equations,l[r].equations);p.split(this);for(var r=0;r!==p.islands.length;r++){var W=p.islands[r];W.equations.length&&h.solveIsland(a,W)}}else{for(h.addEquations(k.contactEquations),h.addEquations(k.frictionEquations),r=0;r!==B;r++)h.addEquations(l[r].equations);this.solveConstraints&&h.solve(a,this),h.removeAllEquations()}for(var r=0;r!==i;r++){var S=e[r];S.integrate(a)}for(var r=0;r!==i;r++)e[r].setZeroForce();if(this.emitImpactEvent&&this.has("impact"))for(var X=this.impactEvent,r=0;r!==k.contactEquations.length;r++){var Y=k.contactEquations[r];Y.firstImpact&&(X.bodyA=Y.bodyA,X.bodyB=Y.bodyB,X.shapeA=Y.shapeA,X.shapeB=Y.shapeB,X.contactEquation=Y,this.emit(X))}if(this.sleepMode===d.BODY_SLEEPING)for(r=0;r!==i;r++)e[r].sleepTick(this.time,!1,a);else if(this.sleepMode===d.ISLAND_SLEEPING&&this.islandSplit){for(r=0;r!==i;r++)e[r].sleepTick(this.time,!0,a);for(var r=0;r0,a.frictionCoefficient=k.friction;var p;p=b.type===m.STATIC||b.type===m.KINEMATIC?g.mass:g.type===m.STATIC||g.type===m.KINEMATIC?b.mass:b.mass*g.mass/(b.mass+g.mass),a.slipForce=k.friction*l*p,a.restitution=k.restitution,a.surfaceVelocity=k.surfaceVelocity,a.frictionStiffness=k.frictionStiffness,a.frictionRelaxation=k.frictionRelaxation,a.stiffness=k.stiffness,a.relaxation=k.relaxation,a.contactSkinSize=k.contactSkinSize,a.enabledEquations=b.collisionResponse&&g.collisionResponse&&c.collisionResponse&&h.collisionResponse;var q=a[c.type|h.type],r=0;if(q){var s=c.sensor||h.sensor,t=a.frictionEquations.length;r=c.type=2*Math.pow(g.sleepSpeedLimit,2)&&(b._wakeUpAfterNarrowphase=!0)}if(g.allowSleep&&g.type===m.DYNAMIC&&g.sleepState===m.SLEEPING&&b.sleepState===m.AWAKE&&b.type!==m.STATIC){f.squaredLength(b.velocity)+Math.pow(b.angularVelocity,2)>=2*Math.pow(b.sleepSpeedLimit,2)&&(g._wakeUpAfterNarrowphase=!0)}if(this.overlapKeeper.setOverlapping(b,c,g,h),this.has("beginContact")&&this.overlapKeeper.isNewOverlap(c,h)){var v=this.beginContactEvent;if(v.shapeA=c,v.shapeB=h,v.bodyA=b,v.bodyB=g,v.contactEquations.length=0,"number"==typeof r)for(var y=a.contactEquations.length-r;y1)for(var y=a.frictionEquations.length-u;y=0;b--)this.removeConstraint(a[b]);for(var c=this.bodies,b=c.length-1;b>=0;b--)this.removeBody(c[b]);for(var e=this.springs,b=e.length-1;b>=0;b--)this.removeSpring(e[b]);for(var f=this.contactMaterials,b=f.length-1;b>=0;b--)this.removeContactMaterial(f[b]);d.apply(this)};var z=f.create(),A=(f.fromValues(0,0),f.fromValues(0,0));d.prototype.hitTest=function(a,b,c){c=c||0;var d=new m({position:a}),e=new k,l=a,n=z,o=A;d.addShape(e);for(var p=this.narrowphase,q=[],r=0,s=b.length;r!==s;r++)for(var t=b[r],u=0,v=t.shapes.length;u!==v;u++){var w=t.shapes[u];f.rotate(n,w.position,t.angle),f.add(n,n,t.position);var x=w.angle+t.angle;(w instanceof g&&p.circleParticle(t,w,n,x,d,e,l,0,!0)||w instanceof h&&p.particleConvex(d,e,l,0,t,w,n,x,!0)||w instanceof i&&p.particlePlane(d,e,l,0,t,w,n,x,!0)||w instanceof j&&p.particleCapsule(d,e,l,0,t,w,n,x,!0)||w instanceof k&&f.squaredLength(f.sub(o,n,a))=0&&b<=this.children.length)return a.parent&&a.parent.removeChild(a),a.parent=this,this.children.splice(b,0,a),a;throw new Error(a+"addChildAt: The index "+b+" supplied is out of bounds "+this.children.length)},b.DisplayObjectContainer.prototype.swapChildren=function(a,b){if(a!==b){var c=this.getChildIndex(a),d=this.getChildIndex(b);if(c<0||d<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be a child of the caller.");this.children[c]=b,this.children[d]=a}},b.DisplayObjectContainer.prototype.getChildIndex=function(a){var b=this.children.indexOf(a);if(-1===b)throw new Error("The supplied DisplayObject must be a child of the caller");return b},b.DisplayObjectContainer.prototype.setChildIndex=function(a,b){if(b<0||b>=this.children.length)throw new Error("The supplied index is out of bounds");var c=this.getChildIndex(a);this.children.splice(c,1),this.children.splice(b,0,a)},b.DisplayObjectContainer.prototype.getChildAt=function(a){if(a<0||a>=this.children.length)throw new Error("getChildAt: Supplied index "+a+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[a]},b.DisplayObjectContainer.prototype.removeChild=function(a){var b=this.children.indexOf(a);if(-1!==b)return this.removeChildAt(b)},b.DisplayObjectContainer.prototype.removeChildAt=function(a){var b=this.getChildAt(a);return b&&(b.parent=void 0,this.children.splice(a,1)),b},b.DisplayObjectContainer.prototype.removeChildren=function(a,b){void 0===a&&(a=0),void 0===b&&(b=this.children.length);var c=b-a;if(c>0&&c<=b){for(var d=this.children.splice(a,c),e=0;eh?l:h,m=m>i?m:i)}var o=this._bounds;if(!n){o=new b.Rectangle;var p=o.x,q=o.width+o.x,r=o.y,s=o.height+o.y,t=this.worldTransform,u=t.a,v=t.b,w=t.c,x=t.d,y=t.tx,z=t.ty,A=u*q+w*s+y,B=x*s+v*q+z,C=u*p+w*s+y,D=x*s+v*p+z,E=u*p+w*r+y,F=x*r+v*p+z,G=u*q+w*r+y,H=x*r+v*q+z;l=A,m=B,j=A,k=B,j=Cl?C:l,l=E>l?E:l,l=G>l?G:l,m=D>m?D:m,m=F>m?F:m,m=H>m?H:m}if(o.x=j,o.y=k,o.width=l-j,o.height=m-k,c)for(a.worldTransform=f,e=0;eo?t:o,o=v>o?v:o,o=x>o?x:o,o=z>o?z:o,p=u>p?u:p,p=w>p?w:p,p=y>p?y:p,p=A>p?A:p}var B=this._bounds;return B.x=q,B.width=o-q,B.y=r,B.height=p-r,this._currentBounds=B,B},b.Sprite.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=b.identityMatrix;for(var c=0;c>16&255)/255,(a>>8&255)/255,(255&a)/255]},b.rgb2hex=function(a){return(255*a[0]<<16)+(255*a[1]<<8)+255*a[2]},b.canUseNewCanvasBlendModes=function(){if(void 0===document)return!1;var a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",c="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",d=new Image;d.src=a+"AP804Oa6"+c;var e=new Image;e.src=a+"/wCKxvRF"+c;var f=b.CanvasPool.create(this,6,1),g=f.getContext("2d");if(g.globalCompositeOperation="multiply",g.drawImage(d,0,0),g.drawImage(e,2,0),!g.getImageData(2,0,1,1))return!1;var h=g.getImageData(2,0,1,1).data;return b.CanvasPool.remove(this),255===h[0]&&0===h[1]&&0===h[2]},b.getNextPowerOfTwo=function(a){if(a>0&&0==(a&a-1))return a;for(var b=1;b0&&0==(a&a-1)&&b>0&&0==(b&b-1)},b.CanvasPool={create:function(a,c,d){var e,f=b.CanvasPool.getFirst();if(-1===f){var g={parent:a,canvas:document.createElement("canvas")};b.CanvasPool.pool.push(g),e=g.canvas}else b.CanvasPool.pool[f].parent=a,e=b.CanvasPool.pool[f].canvas;return void 0!==c&&(e.width=c,e.height=d),e},getFirst:function(){for(var a=b.CanvasPool.pool,c=0;c=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture);var e=c._uvs;if(e){var f,g,h,i,j=a.anchor.x,k=a.anchor.y;if(c.trim){var l=c.trim;g=l.x-j*l.width,f=g+c.crop.width,i=l.y-k*l.height,h=i+c.crop.height}else f=c.frame.width*(1-j),g=c.frame.width*-j,h=c.frame.height*(1-k),i=c.frame.height*-k;var m=4*this.currentBatchSize*this.vertSize,n=c.baseTexture.resolution,o=d.a/n,p=d.b/n,q=d.c/n,r=d.d/n,s=d.tx,t=d.ty,u=this.colors,v=this.positions;this.renderSession.roundPixels?(v[m]=o*g+q*i+s|0,v[m+1]=r*i+p*g+t|0,v[m+5]=o*f+q*i+s|0,v[m+6]=r*i+p*f+t|0,v[m+10]=o*f+q*h+s|0,v[m+11]=r*h+p*f+t|0,v[m+15]=o*g+q*h+s|0,v[m+16]=r*h+p*g+t|0):(v[m]=o*g+q*i+s,v[m+1]=r*i+p*g+t,v[m+5]=o*f+q*i+s,v[m+6]=r*i+p*f+t,v[m+10]=o*f+q*h+s,v[m+11]=r*h+p*f+t,v[m+15]=o*g+q*h+s,v[m+16]=r*h+p*g+t),v[m+2]=e.x0,v[m+3]=e.y0,v[m+7]=e.x1,v[m+8]=e.y1,v[m+12]=e.x2,v[m+13]=e.y2,v[m+17]=e.x3,v[m+18]=e.y3;var w=a.tint;u[m+4]=u[m+9]=u[m+14]=u[m+19]=(w>>16)+(65280&w)+((255&w)<<16)+(255*a.worldAlpha<<24),this.sprites[this.currentBatchSize++]=a}},b.WebGLSpriteBatch.prototype.renderTilingSprite=function(a){var c=a.tilingTexture;this.currentBatchSize>=this.size&&(this.flush(),this.currentBaseTexture=c.baseTexture),a._uvs||(a._uvs=new b.TextureUvs);var d=a._uvs,e=c.baseTexture.width,f=c.baseTexture.height;a.tilePosition.x%=e*a.tileScaleOffset.x,a.tilePosition.y%=f*a.tileScaleOffset.y;var g=a.tilePosition.x/(e*a.tileScaleOffset.x),h=a.tilePosition.y/(f*a.tileScaleOffset.y),i=a.width/e/(a.tileScale.x*a.tileScaleOffset.x),j=a.height/f/(a.tileScale.y*a.tileScaleOffset.y);d.x0=0-g,d.y0=0-h,d.x1=1*i-g,d.y1=0-h,d.x2=1*i-g,d.y2=1*j-h,d.x3=0-g,d.y3=1*j-h;var k=a.tint,l=(k>>16)+(65280&k)+((255&k)<<16)+(255*a.worldAlpha<<24),m=this.positions,n=this.colors,o=a.width,p=a.height,q=a.anchor.x,r=a.anchor.y,s=o*(1-q),t=o*-q,u=p*(1-r),v=p*-r,w=4*this.currentBatchSize*this.vertSize,x=c.baseTexture.resolution,y=a.worldTransform,z=y.a/x,A=y.b/x,B=y.c/x,C=y.d/x,D=y.tx,E=y.ty;m[w++]=z*t+B*v+D,m[w++]=C*v+A*t+E,m[w++]=d.x0,m[w++]=d.y0,n[w++]=l,m[w++]=z*s+B*v+D,m[w++]=C*v+A*s+E,m[w++]=d.x1,m[w++]=d.y1,n[w++]=l,m[w++]=z*s+B*u+D,m[w++]=C*u+A*s+E,m[w++]=d.x2,m[w++]=d.y2,n[w++]=l,m[w++]=z*t+B*u+D,m[w++]=C*u+A*t+E,m[w++]=d.x3,m[w++]=d.y3,n[w++]=l,this.sprites[this.currentBatchSize++]=a},b.WebGLSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a,c=this.gl;if(this.dirty){this.dirty=!1,c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a=this.defaultShader.shaders[c.id];var d=4*this.vertSize;c.vertexAttribPointer(a.aVertexPosition,2,c.FLOAT,!1,d,0),c.vertexAttribPointer(a.aTextureCoord,2,c.FLOAT,!1,d,8),c.vertexAttribPointer(a.colorAttribute,4,c.UNSIGNED_BYTE,!0,d,16)}if(this.currentBatchSize>.5*this.size)c.bufferSubData(c.ARRAY_BUFFER,0,this.vertices);else{var e=this.positions.subarray(0,4*this.currentBatchSize*this.vertSize);c.bufferSubData(c.ARRAY_BUFFER,0,e)}for(var f,g,h,i,j=0,k=0,l=null,m=this.renderSession.blendModeManager.currentBlendMode,n=null,o=!1,p=!1,q=0,r=this.currentBatchSize;q0&&(s=!1),(l!==f&&!s||o||p)&&(this.renderBatch(l,j,k),k=q,j=0,l=f,o&&(m=g,this.renderSession.blendModeManager.setBlendMode(m)),p)){n=h,a=n.shaders[c.id],a||(a=new b.PixiShader(c),a.fragmentSrc=n.fragmentSrc,a.uniforms=n.uniforms,a.init(),n.shaders[c.id]=a),this.renderSession.shaderManager.setShader(a),a.dirty&&a.syncUniforms();var t=this.renderSession.projection;c.uniform2f(a.projectionVector,t.x,t.y);var u=this.renderSession.offset;c.uniform2f(a.offsetVector,u.x,u.y)}j++}this.renderBatch(l,j,k),this.currentBatchSize=0}},b.WebGLSpriteBatch.prototype.renderBatch=function(a,b,c){if(0!==b){var d=this.gl;if(a._dirty[d.id]){if(!this.renderSession.renderer.updateTexture(a))return}else d.bindTexture(d.TEXTURE_2D,a._glTextures[d.id]);d.drawElements(d.TRIANGLES,6*b,d.UNSIGNED_SHORT,6*c*2),this.renderSession.drawCount++}},b.WebGLSpriteBatch.prototype.stop=function(){this.flush(),this.dirty=!0},b.WebGLSpriteBatch.prototype.start=function(){this.dirty=!0},b.WebGLSpriteBatch.prototype.destroy=function(){this.vertices=null,this.indices=null,this.gl.deleteBuffer(this.vertexBuffer),this.gl.deleteBuffer(this.indexBuffer),this.currentBaseTexture=null,this.gl=null},b.WebGLFastSpriteBatch=function(a){this.vertSize=10,this.maxSize=6e3,this.size=this.maxSize;var c=4*this.size*this.vertSize,d=6*this.maxSize;this.vertices=new b.Float32Array(c),this.indices=new b.Uint16Array(d),this.vertexBuffer=null,this.indexBuffer=null,this.lastIndexCount=0;for(var e=0,f=0;e=this.size&&this.flush()}},b.WebGLFastSpriteBatch.prototype.flush=function(){if(0!==this.currentBatchSize){var a=this.gl;if(this.currentBaseTexture._glTextures[a.id]||this.renderSession.renderer.updateTexture(this.currentBaseTexture,a),a.bindTexture(a.TEXTURE_2D,this.currentBaseTexture._glTextures[a.id]),this.currentBatchSize>.5*this.size)a.bufferSubData(a.ARRAY_BUFFER,0,this.vertices);else{var b=this.vertices.subarray(0,4*this.currentBatchSize*this.vertSize);a.bufferSubData(a.ARRAY_BUFFER,0,b)}a.drawElements(a.TRIANGLES,6*this.currentBatchSize,a.UNSIGNED_SHORT,0),this.currentBatchSize=0,this.renderSession.drawCount++}},b.WebGLFastSpriteBatch.prototype.stop=function(){this.flush()},b.WebGLFastSpriteBatch.prototype.start=function(){var a=this.gl;a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var b=this.renderSession.projection;a.uniform2f(this.shader.projectionVector,b.x,b.y),a.uniformMatrix3fv(this.shader.uMatrix,!1,this.matrix);var c=4*this.vertSize;a.vertexAttribPointer(this.shader.aVertexPosition,2,a.FLOAT,!1,c,0),a.vertexAttribPointer(this.shader.aPositionCoord,2,a.FLOAT,!1,c,8),a.vertexAttribPointer(this.shader.aScale,2,a.FLOAT,!1,c,16),a.vertexAttribPointer(this.shader.aRotation,1,a.FLOAT,!1,c,24),a.vertexAttribPointer(this.shader.aTextureCoord,2,a.FLOAT,!1,c,28),a.vertexAttribPointer(this.shader.colorAttribute,1,a.FLOAT,!1,c,36)},b.WebGLFilterManager=function(){this.filterStack=[],this.offsetX=0,this.offsetY=0},b.WebGLFilterManager.prototype.constructor=b.WebGLFilterManager,b.WebGLFilterManager.prototype.setContext=function(a){this.gl=a,this.texturePool=[],this.initShaderBuffers()},b.WebGLFilterManager.prototype.begin=function(a,b){this.renderSession=a,this.defaultShader=a.shaderManager.defaultShader;var c=this.renderSession.projection;this.width=2*c.x,this.height=2*-c.y,this.buffer=b},b.WebGLFilterManager.prototype.pushFilter=function(a){var c=this.gl,d=this.renderSession.projection,e=this.renderSession.offset;a._filterArea=a.target.filterArea||a.target.getBounds(),a._previous_stencil_mgr=this.renderSession.stencilManager,this.renderSession.stencilManager=new b.WebGLStencilManager,this.renderSession.stencilManager.setContext(c),c.disable(c.STENCIL_TEST),this.filterStack.push(a);var f=a.filterPasses[0];this.offsetX+=a._filterArea.x,this.offsetY+=a._filterArea.y;var g=this.texturePool.pop();g?g.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution):g=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),c.bindTexture(c.TEXTURE_2D,g.texture);var h=a._filterArea,i=f.padding;h.x-=i,h.y-=i,h.width+=2*i,h.height+=2*i,h.x<0&&(h.x=0),h.width>this.width&&(h.width=this.width),h.y<0&&(h.y=0),h.height>this.height&&(h.height=this.height),c.bindFramebuffer(c.FRAMEBUFFER,g.frameBuffer),c.viewport(0,0,h.width*this.renderSession.resolution,h.height*this.renderSession.resolution),d.x=h.width/2,d.y=-h.height/2,e.x=-h.x,e.y=-h.y,c.colorMask(!0,!0,!0,!0),c.clearColor(0,0,0,0),c.clear(c.COLOR_BUFFER_BIT),a._glFilterTexture=g},b.WebGLFilterManager.prototype.popFilter=function(){var a=this.gl,c=this.filterStack.pop(),d=c._filterArea,e=c._glFilterTexture,f=this.renderSession.projection,g=this.renderSession.offset;if(c.filterPasses.length>1){a.viewport(0,0,d.width*this.renderSession.resolution,d.height*this.renderSession.resolution),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),this.vertexArray[0]=0,this.vertexArray[1]=d.height,this.vertexArray[2]=d.width,this.vertexArray[3]=d.height,this.vertexArray[4]=0,this.vertexArray[5]=0,this.vertexArray[6]=d.width,this.vertexArray[7]=0,a.bufferSubData(a.ARRAY_BUFFER,0,this.vertexArray),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),this.uvArray[2]=d.width/this.width,this.uvArray[5]=d.height/this.height,this.uvArray[6]=d.width/this.width,this.uvArray[7]=d.height/this.height,a.bufferSubData(a.ARRAY_BUFFER,0,this.uvArray);var h=e,i=this.texturePool.pop();i||(i=new b.FilterTexture(this.gl,this.width*this.renderSession.resolution,this.height*this.renderSession.resolution)),i.resize(this.width*this.renderSession.resolution,this.height*this.renderSession.resolution),a.bindFramebuffer(a.FRAMEBUFFER,i.frameBuffer),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.BLEND);for(var j=0;j0?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST),this.applyFilterPass(m,d,n,o),this.texturePool.push(e),c._glFilterTexture=null},b.WebGLFilterManager.prototype.applyFilterPass=function(a,c,d,e){var f=this.gl,g=a.shaders[f.id];g||(g=new b.PixiShader(f),g.fragmentSrc=a.fragmentSrc,g.uniforms=a.uniforms,g.init(),a.shaders[f.id]=g),this.renderSession.shaderManager.setShader(g),f.uniform2f(g.projectionVector,d/2,-e/2),f.uniform2f(g.offsetVector,0,0),a.uniforms.dimensions&&(a.uniforms.dimensions.value[0]=this.width,a.uniforms.dimensions.value[1]=this.height,a.uniforms.dimensions.value[2]=this.vertexArray[0],a.uniforms.dimensions.value[3]=this.vertexArray[5]),g.syncUniforms(),f.bindBuffer(f.ARRAY_BUFFER,this.vertexBuffer),f.vertexAttribPointer(g.aVertexPosition,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.uvBuffer),f.vertexAttribPointer(g.aTextureCoord,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,this.colorBuffer),f.vertexAttribPointer(g.colorAttribute,2,f.FLOAT,!1,0,0),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,this.indexBuffer),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0),this.renderSession.drawCount++},b.WebGLFilterManager.prototype.initShaderBuffers=function(){var a=this.gl;this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.colorBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),this.vertexArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,this.vertexArray,a.STATIC_DRAW),this.uvArray=new b.Float32Array([0,0,1,0,0,1,1,1]),a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,this.uvArray,a.STATIC_DRAW),this.colorArray=new b.Float32Array([1,16777215,1,16777215,1,16777215,1,16777215]),a.bindBuffer(a.ARRAY_BUFFER,this.colorBuffer),a.bufferData(a.ARRAY_BUFFER,this.colorArray,a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,3,2]),a.STATIC_DRAW)},b.WebGLFilterManager.prototype.destroy=function(){var a=this.gl;this.filterStack=null,this.offsetX=0,this.offsetY=0;for(var b=0;b=0;a--){var c=this._glTextures[a],d=b.glContexts[a];d&&c&&d.deleteTexture(c)}this._glTextures.length=0,this.dirty()},b.BaseTexture.fromCanvas=function(a,c){return 0===a.width&&(a.width=1),0===a.height&&(a.height=1),new b.BaseTexture(a,c)},b.TextureSilentFail=!1,b.Texture=function(a,c,d,e){this.noFrame=!1,c||(this.noFrame=!0,c=new b.Rectangle(0,0,1,1)),a instanceof b.Texture&&(a=a.baseTexture),this.baseTexture=a,this.frame=c,this.trim=e,this.valid=!1,this.isTiling=!1,this.requiresUpdate=!1,this.requiresReTint=!1,this._uvs=null,this.width=0,this.height=0,this.crop=d||new b.Rectangle(0,0,1,1),a.hasLoaded&&(this.noFrame&&(c=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(c))},b.Texture.prototype.constructor=b.Texture,b.Texture.prototype.onBaseTextureLoaded=function(){var a=this.baseTexture;this.noFrame&&(this.frame=new b.Rectangle(0,0,a.width,a.height)),this.setFrame(this.frame)},b.Texture.prototype.destroy=function(a){a&&this.baseTexture.destroy(),this.valid=!1},b.Texture.prototype.setFrame=function(a){if(this.noFrame=!1,this.frame=a,this.width=a.width,this.height=a.height,this.crop.x=a.x,this.crop.y=a.y,this.crop.width=a.width,this.crop.height=a.height,!this.trim&&(a.x+a.width>this.baseTexture.width||a.y+a.height>this.baseTexture.height)){if(!b.TextureSilentFail)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);return void(this.valid=!1)}this.valid=a&&a.width&&a.height&&this.baseTexture.source&&this.baseTexture.hasLoaded,this.trim&&(this.width=this.trim.width,this.height=this.trim.height,this.frame.width=this.trim.width,this.frame.height=this.trim.height),this.valid&&this._updateUvs()},b.Texture.prototype._updateUvs=function(){this._uvs||(this._uvs=new b.TextureUvs);var a=this.crop,c=this.baseTexture.width,d=this.baseTexture.height;this._uvs.x0=a.x/c,this._uvs.y0=a.y/d,this._uvs.x1=(a.x+a.width)/c,this._uvs.y1=a.y/d,this._uvs.x2=(a.x+a.width)/c,this._uvs.y2=(a.y+a.height)/d,this._uvs.x3=a.x/c,this._uvs.y3=(a.y+a.height)/d},b.Texture.fromCanvas=function(a,c){var d=b.BaseTexture.fromCanvas(a,c);return new b.Texture(d)},b.TextureUvs=function(){this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0},b.RenderTexture=function(a,c,d,e,f){if(this.width=a||100,this.height=c||100,this.resolution=f||1,this.frame=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new b.BaseTexture,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=e||b.scaleModes.DEFAULT,this.baseTexture.hasLoaded=!0,b.Texture.call(this,this.baseTexture,new b.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution)),this.renderer=d||b.defaultRenderer,this.renderer.type===b.WEBGL_RENDERER){var g=this.renderer.gl;this.baseTexture._dirty[g.id]=!1,this.textureBuffer=new b.FilterTexture(g,this.width,this.height,this.baseTexture.scaleMode),this.baseTexture._glTextures[g.id]=this.textureBuffer.texture,this.render=this.renderWebGL,this.projection=new b.Point(.5*this.width,.5*-this.height)}else this.render=this.renderCanvas, +this.textureBuffer=new b.CanvasBuffer(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this.tempMatrix=new Phaser.Matrix,this._updateUvs()},b.RenderTexture.prototype=Object.create(b.Texture.prototype),b.RenderTexture.prototype.constructor=b.RenderTexture,b.RenderTexture.prototype.resize=function(a,c,d){a===this.width&&c===this.height||(this.valid=a>0&&c>0,this.width=a,this.height=c,this.frame.width=this.crop.width=a*this.resolution,this.frame.height=this.crop.height=c*this.resolution,d&&(this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution),this.renderer.type===b.WEBGL_RENDERER&&(this.projection.x=this.width/2,this.projection.y=-this.height/2),this.valid&&this.textureBuffer.resize(this.width,this.height))},b.RenderTexture.prototype.clear=function(){this.valid&&(this.renderer.type===b.WEBGL_RENDERER&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},b.RenderTexture.prototype.renderWebGL=function(a,b,c){if(this.valid&&0!==a.alpha){var d=a.worldTransform;d.identity(),d.translate(0,2*this.projection.y),b&&d.append(b),d.scale(1,-1);for(var e=0;e0){var v=this.canvasPadding/this.worldTransform.a,w=this.canvasPadding/this.worldTransform.d,x=(j+k+l)/3,y=(m+n+o)/3,z=j-x,A=m-y,B=Math.sqrt(z*z+A*A);j=x+z/B*(B+v),m=y+A/B*(B+w),z=k-x,A=n-y,B=Math.sqrt(z*z+A*A),k=x+z/B*(B+v),n=y+A/B*(B+w),z=l-x,A=o-y,B=Math.sqrt(z*z+A*A),l=x+z/B*(B+v),o=y+A/B*(B+w)}a.save(),a.beginPath(),a.moveTo(j,m),a.lineTo(k,n),a.lineTo(l,o),a.closePath(),a.clip();var C=p*t+s*r+q*u-t*r-s*q-p*u,D=j*t+s*l+k*u-t*l-s*k-j*u,E=p*k+j*r+q*l-k*r-j*q-p*l,F=p*t*l+s*k*r+j*q*u-j*t*r-s*q*l-p*k*u,G=m*t+s*o+n*u-t*o-s*n-m*u,H=p*n+m*r+q*o-n*r-m*q-p*o,I=p*t*o+s*n*r+m*q*u-m*t*r-s*q*o-p*n*u;a.transform(D/C,G/C,E/C,H/C,F/C,I/C),a.drawImage(g,0,0),a.restore()},b.Strip.prototype.renderStripFlat=function(a){var b=this.context,c=a.vertices,d=c.length/2;this.count++,b.beginPath();for(var e=1;ej?s:j,k=t>k?t:k}if(l===-1/0||k===1/0)return b.EmptyRectangle;var u=this._bounds;return u.x=l,u.width=j-l,u.y=m,u.height=k-m,this._currentBounds=u,u},b.Strip.DrawModes={TRIANGLE_STRIP:0,TRIANGLES:1},b.Rope=function(a,c){b.Strip.call(this,a),this.points=c,this.vertices=new b.Float32Array(4*c.length),this.uvs=new b.Float32Array(4*c.length),this.colors=new b.Float32Array(2*c.length),this.indices=new b.Uint16Array(2*c.length),this.refresh()},b.Rope.prototype=Object.create(b.Strip.prototype),b.Rope.prototype.constructor=b.Rope,b.Rope.prototype.refresh=function(){var a=this.points;if(!(a.length<1)){var b=this.uvs,c=(a[0],this.indices),d=this.colors;this.count-=.2,b[0]=0,b[1]=0,b[2]=0,b[3]=1,d[0]=1,d[1]=1,c[0]=0,c[1]=1;for(var e,f,g,h=a.length,i=1;i1&&(h=1),i=Math.sqrt(e.x*e.x+e.y*e.y),j=this.texture.height/2,e.x/=i,e.y/=i,e.x*=j,e.y*=j,k[g]=f.x+e.x,k[g+1]=f.y+e.y,k[g+2]=f.x-e.x,k[g+3]=f.y-e.y,d=f;b.DisplayObjectContainer.prototype.updateTransform.call(this)}},b.Rope.prototype.setTexture=function(a){this.texture=a},b.TilingSprite=function(a,c,d){b.Sprite.call(this,a),this._width=c||128,this._height=d||128,this.tileScale=new b.Point(1,1),this.tileScaleOffset=new b.Point(1,1),this.tilePosition=new b.Point,this.renderable=!0,this.tint=16777215,this.textureDebug=!1,this.blendMode=b.blendModes.NORMAL,this.canvasBuffer=null,this.tilingTexture=null,this.tilePattern=null,this.refreshTexture=!0,this.frameWidth=0,this.frameHeight=0},b.TilingSprite.prototype=Object.create(b.Sprite.prototype),b.TilingSprite.prototype.constructor=b.TilingSprite,b.TilingSprite.prototype.setTexture=function(a){this.texture!==a&&(this.texture=a,this.refreshTexture=!0,this.cachedTint=16777215)},b.TilingSprite.prototype._renderWebGL=function(a){if(this.visible&&this.renderable&&0!==this.alpha){if(this._mask&&(a.spriteBatch.stop(),a.maskManager.pushMask(this.mask,a),a.spriteBatch.start()),this._filters&&(a.spriteBatch.flush(),a.filterManager.pushFilter(this._filterBlock)),this.refreshTexture){if(this.generateTilingTexture(!0,a),!this.tilingTexture)return;this.tilingTexture.needsUpdate&&(a.renderer.updateTexture(this.tilingTexture.baseTexture),this.tilingTexture.needsUpdate=!1)}a.spriteBatch.renderTilingSprite(this);for(var b=0;bv?n:v,v=p>v?p:v,v=r>v?r:v,v=t>v?t:v,w=o>w?o:w,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w;var z=this._bounds;return z.x=x,z.width=v-x,z.y=y,z.height=w-y,this._currentBounds=z,z},b.TilingSprite.prototype.destroy=function(){b.Sprite.prototype.destroy.call(this),this.canvasBuffer&&(this.canvasBuffer.destroy(),this.canvasBuffer=null),this.tileScale=null,this.tileScaleOffset=null,this.tilePosition=null,this.tilingTexture&&(this.tilingTexture.destroy(!0),this.tilingTexture=null)},Object.defineProperty(b.TilingSprite.prototype,"width",{get:function(){return this._width},set:function(a){this._width=a}}),Object.defineProperty(b.TilingSprite.prototype,"height",{get:function(){return this._height},set:function(a){this._height=a}}),"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.PIXI=b):"undefined"!=typeof define&&define.amd?define("PIXI",function(){return a.PIXI=b}()):a.PIXI=b,b}.call(this),function(){function a(a,b){this._scaleFactor=a,this._deltaMode=b,this.originalEvent=null}var b=this,c=c||{VERSION:"2.6.15",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,NONE:0,LEFT:1,RIGHT:2,UP:3,DOWN:4,SPRITE:0,BUTTON:1,IMAGE:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11,POLYGON:12,BITMAPDATA:13,CANVAS_FILTER:14,WEBGL_FILTER:15,ELLIPSE:16,SPRITEBATCH:17,RETROFONT:18,POINTER:19,ROPE:20,CIRCLE:21,RECTANGLE:22,LINE:23,MATRIX:24,POINT:25,ROUNDEDRECTANGLE:26,CREATURE:27,VIDEO:28,PENDING_ATLAS:-1,HORIZONTAL:0,VERTICAL:1,LANDSCAPE:0,PORTRAIT:1,ANGLE_UP:270,ANGLE_DOWN:90,ANGLE_LEFT:180,ANGLE_RIGHT:0,ANGLE_NORTH_EAST:315,ANGLE_NORTH_WEST:225,ANGLE_SOUTH_EAST:45,ANGLE_SOUTH_WEST:135,TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12,blendModes:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},scaleModes:{DEFAULT:0,LINEAR:0,NEAREST:1},PIXI:PIXI||{}};if(Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),Function.prototype.bind||(Function.prototype.bind=function(){var a=Array.prototype.slice;return function(b){function c(){var f=e.concat(a.call(arguments));d.apply(this instanceof c?this:b,f)}var d=this,e=a.call(arguments,1);if("function"!=typeof d)throw new TypeError;return c.prototype=function a(b){if(b&&(a.prototype=b),!(this instanceof a))return new a}(d.prototype),c}}()),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.forEach||(Array.prototype.forEach=function(a){"use strict";if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=arguments.length>=2?arguments[1]:void 0,e=0;e0&&100*Math.random()<=a},randomChoice:function(a,b){return Math.random()<.5?a:b},parseDimension:function(a,b){var c=0,d=0;return"string"==typeof a?"%"===a.substr(-1)?(c=parseInt(a,10)/100,d=0===b?window.innerWidth*c:window.innerHeight*c):d=parseInt(a,10):d=a,d},pad:function(a,b,c,d){if(void 0===b)var b=0;if(void 0===c)var c=" ";if(void 0===d)var d=3;a=a.toString();var e=0;if(b+1>=a.length)switch(d){case 1:a=new Array(b+1-a.length).join(c)+a;break;case 3:var f=Math.ceil((e=b-a.length)/2),g=e-f;a=new Array(g+1).join(c)+a+new Array(f+1).join(c);break;default:a+=new Array(b+1-a.length).join(c)}return a},isPlainObject:function(a){if("object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}return!0},extend:function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),j===i&&(h=this,--i);i0&&(this._radius=.5*d),this.type=c.CIRCLE},c.Circle.prototype={circumference:function(){return Math.PI*this._radius*2},random:function(a){void 0===a&&(a=new c.Point);var b=2*Math.PI*Math.random(),d=Math.random()+Math.random(),e=d>1?2-d:d,f=e*Math.cos(b),g=e*Math.sin(b);return a.x=this.x+f*this.radius,a.y=this.y+g*this.radius,a},getBounds:function(){return new c.Rectangle(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)},setTo:function(a,b,c){return this.x=a,this.y=b,this._diameter=c,this._radius=.5*c,this},copyFrom:function(a){return this.setTo(a.x,a.y,a.diameter)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.diameter=this._diameter,a},distance:function(a,b){var d=c.Math.distance(this.x,this.y,a.x,a.y);return b?Math.round(d):d},clone:function(a){return void 0===a||null===a?a=new c.Circle(this.x,this.y,this.diameter):a.setTo(this.x,this.y,this.diameter),a},contains:function(a,b){return c.Circle.contains(this,a,b)},circumferencePoint:function(a,b,d){return c.Circle.circumferencePoint(this,a,b,d)},offset:function(a,b){return this.x+=a,this.y+=b,this},offsetPoint:function(a){return this.offset(a.x,a.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}},c.Circle.prototype.constructor=c.Circle,Object.defineProperty(c.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(a){a>0&&(this._diameter=a,this._radius=.5*a)}}),Object.defineProperty(c.Circle.prototype,"radius",{get:function(){return this._radius},set:function(a){a>0&&(this._radius=a,this._diameter=2*a)}}),Object.defineProperty(c.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(a){a>this.x?(this._radius=0,this._diameter=0):this.radius=this.x-a}}),Object.defineProperty(c.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(a){athis.y?(this._radius=0,this._diameter=0):this.radius=this.y-a}}),Object.defineProperty(c.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(a){a0?Math.PI*this._radius*this._radius:0}}),Object.defineProperty(c.Circle.prototype,"empty",{get:function(){return 0===this._diameter},set:function(a){!0===a&&this.setTo(0,0,0)}}),c.Circle.contains=function(a,b,c){if(a.radius>0&&b>=a.left&&b<=a.right&&c>=a.top&&c<=a.bottom){return(a.x-b)*(a.x-b)+(a.y-c)*(a.y-c)<=a.radius*a.radius}return!1},c.Circle.equals=function(a,b){return a.x===b.x&&a.y===b.y&&a.diameter===b.diameter},c.Circle.intersects=function(a,b){return c.Math.distance(a.x,a.y,b.x,b.y)<=a.radius+b.radius},c.Circle.circumferencePoint=function(a,b,d,e){return void 0===d&&(d=!1),void 0===e&&(e=new c.Point),!0===d&&(b=c.Math.degToRad(b)),e.x=a.x+a.radius*Math.cos(b),e.y=a.y+a.radius*Math.sin(b),e},c.Circle.intersectsRectangle=function(a,b){var c=Math.abs(a.x-b.x-b.halfWidth);if(c>b.halfWidth+a.radius)return!1;var d=Math.abs(a.y-b.y-b.halfHeight);if(d>b.halfHeight+a.radius)return!1;if(c<=b.halfWidth||d<=b.halfHeight)return!0;var e=c-b.halfWidth,f=d-b.halfHeight;return e*e+f*f<=a.radius*a.radius},PIXI.Circle=c.Circle,c.Ellipse=function(a,b,d,e){a=a||0,b=b||0,d=d||0,e=e||0,this.x=a,this.y=b,this.width=d,this.height=e,this.type=c.ELLIPSE},c.Ellipse.prototype={setTo:function(a,b,c,d){return this.x=a,this.y=b,this.width=c,this.height=d,this},getBounds:function(){return new c.Rectangle(this.x-this.width,this.y-this.height,this.width,this.height)},copyFrom:function(a){return this.setTo(a.x,a.y,a.width,a.height)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},clone:function(a){return void 0===a||null===a?a=new c.Ellipse(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a},contains:function(a,b){return c.Ellipse.contains(this,a,b)},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random()*Math.PI*2,d=Math.random();return a.x=Math.sqrt(d)*Math.cos(b),a.y=Math.sqrt(d)*Math.sin(b),a.x=this.x+a.x*this.width/2,a.y=this.y+a.y*this.height/2,a},toString:function(){return"[{Phaser.Ellipse (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")}]"}},c.Ellipse.prototype.constructor=c.Ellipse,Object.defineProperty(c.Ellipse.prototype,"left",{get:function(){return this.x},set:function(a){this.x=a}}),Object.defineProperty(c.Ellipse.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a=c&&a<=d&&b>=e&&b<=f},random:function(a){void 0===a&&(a=new c.Point);var b=Math.random();return a.x=this.start.x+b*(this.end.x-this.start.x),a.y=this.start.y+b*(this.end.y-this.start.y),a},coordinatesOnLine:function(a,b){void 0===a&&(a=1),void 0===b&&(b=[]);var c=Math.round(this.start.x),d=Math.round(this.start.y),e=Math.round(this.end.x),f=Math.round(this.end.y),g=Math.abs(e-c),h=Math.abs(f-d),i=c-h&&(k-=h,c+=i),m=0&&p<=1&&q>=0&&q<=1?g:null}return g},c.Line.intersects=function(a,b,d,e){return c.Line.intersectsPoints(a.start,a.end,b.start,b.end,d,e)},c.Line.intersectsRectangle=function(a,b){if(!c.Rectangle.intersects(a,b))return!1;var d=a.start.x,e=a.start.y,f=a.end.x,g=a.end.y,h=b.x,i=b.y,j=b.right,k=b.bottom,l=0;if(d>=h&&d<=j&&e>=i&&e<=k||f>=h&&f<=j&&g>=i&&g<=k)return!0;if(d=h){if((l=e+(g-e)*(h-d)/(f-d))>i&&l<=k)return!0}else if(d>j&&f<=j&&(l=e+(g-e)*(j-d)/(f-d))>=i&&l<=k)return!0;if(e=i){if((l=d+(f-d)*(i-e)/(g-e))>=h&&l<=j)return!0}else if(e>k&&g<=k&&(l=d+(f-d)*(k-e)/(g-e))>=h&&l<=j)return!0;return!1},c.Line.reflect=function(a,b){return 2*b.normalAngle-3.141592653589793-a.angle},c.Matrix=function(a,b,d,e,f,g){void 0!==a&&null!==a||(a=1),void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),void 0!==e&&null!==e||(e=1),void 0!==f&&null!==f||(f=0),void 0!==g&&null!==g||(g=0),this.a=a,this.b=b,this.c=d,this.d=e,this.tx=f,this.ty=g,this.type=c.MATRIX},c.Matrix.prototype={fromArray:function(a){return this.setTo(a[0],a[1],a[3],a[4],a[2],a[5])},setTo:function(a,b,c,d,e,f){return this.a=a,this.b=b,this.c=c,this.d=d,this.tx=e,this.ty=f,this},clone:function(a){return void 0===a||null===a?a=new c.Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty):(a.a=this.a,a.b=this.b,a.c=this.c,a.d=this.d,a.tx=this.tx,a.ty=this.ty),a},copyTo:function(a){return a.copyFrom(this),a},copyFrom:function(a){return this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.tx=a.tx,this.ty=a.ty,this},toArray:function(a,b){return void 0===b&&(b=new PIXI.Float32Array(9)),a?(b[0]=this.a,b[1]=this.b,b[2]=0,b[3]=this.c,b[4]=this.d,b[5]=0,b[6]=this.tx,b[7]=this.ty,b[8]=1):(b[0]=this.a,b[1]=this.c,b[2]=this.tx,b[3]=this.b,b[4]=this.d,b[5]=this.ty,b[6]=0,b[7]=0,b[8]=1),b},apply:function(a,b){return void 0===b&&(b=new c.Point),b.x=this.a*a.x+this.c*a.y+this.tx,b.y=this.b*a.x+this.d*a.y+this.ty,b},applyInverse:function(a,b){void 0===b&&(b=new c.Point);var d=1/(this.a*this.d+this.c*-this.b),e=a.x,f=a.y;return b.x=this.d*d*e+-this.c*d*f+(this.ty*this.c-this.tx*this.d)*d,b.y=this.a*d*f+-this.b*d*e+(-this.ty*this.a+this.tx*this.b)*d,b},translate:function(a,b){return this.tx+=a,this.ty+=b,this},scale:function(a,b){return this.a*=a,this.d*=b,this.c*=a,this.b*=b,this.tx*=a,this.ty*=b,this}, +rotate:function(a){var b=Math.cos(a),c=Math.sin(a),d=this.a,e=this.c,f=this.tx;return this.a=d*b-this.b*c,this.b=d*c+this.b*b,this.c=e*b-this.d*c,this.d=e*c+this.d*b,this.tx=f*b-this.ty*c,this.ty=f*c+this.ty*b,this},append:function(a){var b=this.a,c=this.b,d=this.c,e=this.d;return this.a=a.a*b+a.b*d,this.b=a.a*c+a.b*e,this.c=a.c*b+a.d*d,this.d=a.c*c+a.d*e,this.tx=a.tx*b+a.ty*d+this.tx,this.ty=a.tx*c+a.ty*e+this.ty,this},identity:function(){return this.setTo(1,0,0,1,0,0)}},c.identityMatrix=new c.Matrix,PIXI.Matrix=c.Matrix,PIXI.identityMatrix=c.identityMatrix,c.Point=function(a,b){a=a||0,b=b||0,this.x=a,this.y=b,this.type=c.POINT},c.Point.prototype={copyFrom:function(a){return this.setTo(a.x,a.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},set:function(a,b){return this.x=a||0,this.y=b||(0!==b?this.x:0),this},add:function(a,b){return this.x+=a,this.y+=b,this},subtract:function(a,b){return this.x-=a,this.y-=b,this},multiply:function(a,b){return this.x*=a,this.y*=b,this},divide:function(a,b){return this.x/=a,this.y/=b,this},clampX:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this},clampY:function(a,b){return this.y=c.Math.clamp(this.y,a,b),this},clamp:function(a,b){return this.x=c.Math.clamp(this.x,a,b),this.y=c.Math.clamp(this.y,a,b),this},clone:function(a){return void 0===a||null===a?a=new c.Point(this.x,this.y):a.setTo(this.x,this.y),a},copyTo:function(a){return a.x=this.x,a.y=this.y,a},distance:function(a,b){return c.Point.distance(this,a,b)},equals:function(a){return a.x===this.x&&a.y===this.y},angle:function(a,b){return void 0===b&&(b=!1),b?c.Math.radToDeg(Math.atan2(a.y-this.y,a.x-this.x)):Math.atan2(a.y-this.y,a.x-this.x)},rotate:function(a,b,d,e,f){return c.Point.rotate(this,a,b,d,e,f)},getMagnitude:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},getMagnitudeSq:function(){return this.x*this.x+this.y*this.y},setMagnitude:function(a){return this.normalize().multiply(a,a)},normalize:function(){if(!this.isZero()){var a=this.getMagnitude();this.x/=a,this.y/=a}return this},isZero:function(){return 0===this.x&&0===this.y},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},perp:function(){return this.setTo(-this.y,this.x)},rperp:function(){return this.setTo(this.y,-this.x)},normalRightHand:function(){return this.setTo(-1*this.y,this.x)},floor:function(){return this.setTo(Math.floor(this.x),Math.floor(this.y))},ceil:function(){return this.setTo(Math.ceil(this.x),Math.ceil(this.y))},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}},c.Point.prototype.constructor=c.Point,c.Point.add=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x+b.x,d.y=a.y+b.y,d},c.Point.subtract=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x-b.x,d.y=a.y-b.y,d},c.Point.multiply=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x*b.x,d.y=a.y*b.y,d},c.Point.divide=function(a,b,d){return void 0===d&&(d=new c.Point),d.x=a.x/b.x,d.y=a.y/b.y,d},c.Point.equals=function(a,b){return a.x===b.x&&a.y===b.y},c.Point.angle=function(a,b){return Math.atan2(a.y-b.y,a.x-b.x)},c.Point.negative=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.x,-a.y)},c.Point.multiplyAdd=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+b.x*d,a.y+b.y*d)},c.Point.interpolate=function(a,b,d,e){return void 0===e&&(e=new c.Point),e.setTo(a.x+(b.x-a.x)*d,a.y+(b.y-a.y)*d)},c.Point.perp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-a.y,a.x)},c.Point.rperp=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(a.y,-a.x)},c.Point.distance=function(a,b,d){var e=c.Math.distance(a.x,a.y,b.x,b.y);return d?Math.round(e):e},c.Point.project=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b)/b.getMagnitudeSq();return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.projectUnit=function(a,b,d){void 0===d&&(d=new c.Point);var e=a.dot(b);return 0!==e&&d.setTo(e*b.x,e*b.y),d},c.Point.normalRightHand=function(a,b){return void 0===b&&(b=new c.Point),b.setTo(-1*a.y,a.x)},c.Point.normalize=function(a,b){void 0===b&&(b=new c.Point);var d=a.getMagnitude();return 0!==d&&b.setTo(a.x/d,a.y/d),b},c.Point.rotate=function(a,b,d,e,f,g){if(f&&(e=c.Math.degToRad(e)),void 0===g){a.subtract(b,d);var h=Math.sin(e),i=Math.cos(e),j=i*a.x-h*a.y,k=h*a.x+i*a.y;a.x=j+b,a.y=k+d}else{var l=e+Math.atan2(a.y-d,a.x-b);a.x=b+g*Math.cos(l),a.y=d+g*Math.sin(l)}return a},c.Point.centroid=function(a,b){if(void 0===b&&(b=new c.Point),"[object Array]"!==Object.prototype.toString.call(a))throw new Error("Phaser.Point. Parameter 'points' must be an array");var d=a.length;if(d<1)throw new Error("Phaser.Point. Parameter 'points' array must not be empty");if(1===d)return b.copyFrom(a[0]),b;for(var e=0;e0&&this.setTo.apply(this,arguments),this.closed=!0,this.flattened=!1,this.type=c.POLYGON},c.Polygon.prototype={toNumberArray:function(a){void 0===a&&(a=[]);for(var b=0;b0){Array.isArray(a)||(a=Array.prototype.slice.call(arguments));for(var b=Number.MAX_VALUE,c=0,d=a.length;c=this.right?this.width=0:this.width=this.right-a,this.x=a}}),Object.defineProperty(c.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(a){a<=this.x?this.width=0:this.width=a-this.x}}),Object.defineProperty(c.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(c.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(c.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(a){this.x=a-this.halfWidth}}),Object.defineProperty(c.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(a){this.y=a-this.halfHeight}}),Object.defineProperty(c.Rectangle.prototype,"randomX",{get:function(){return this.x+Math.random()*this.width}}),Object.defineProperty(c.Rectangle.prototype,"randomY",{get:function(){return this.y+Math.random()*this.height}}),Object.defineProperty(c.Rectangle.prototype,"top",{get:function(){return this.y},set:function(a){a>=this.bottom?(this.height=0,this.y=a):this.height=this.bottom-a}}),Object.defineProperty(c.Rectangle.prototype,"topLeft",{get:function(){return new c.Point(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"topRight",{get:function(){return new c.Point(this.x+this.width,this.y)},set:function(a){this.right=a.x,this.y=a.y}}),Object.defineProperty(c.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(a){!0===a&&this.setTo(0,0,0,0)}}),c.Rectangle.prototype.constructor=c.Rectangle,c.Rectangle.inflate=function(a,b,c){return a.x-=b,a.width+=2*b,a.y-=c,a.height+=2*c,a},c.Rectangle.inflatePoint=function(a,b){return c.Rectangle.inflate(a,b.x,b.y)},c.Rectangle.size=function(a,b){return void 0===b||null===b?b=new c.Point(a.width,a.height):b.setTo(a.width,a.height),b},c.Rectangle.clone=function(a,b){return void 0===b||null===b?b=new c.Rectangle(a.x,a.y,a.width,a.height):b.setTo(a.x,a.y,a.width,a.height),b},c.Rectangle.contains=function(a,b,c){return!(a.width<=0||a.height<=0)&&(b>=a.x&&b=a.y&&c=a&&e=b&&fb.volume)&&(a.x>=b.x&&a.y>=b.y&&a.rightb.right||a.y>b.bottom)},c.Rectangle.intersectsRaw=function(a,b,c,d,e,f){return void 0===f&&(f=0),!(b>a.right+f||ca.bottom+f||ed&&(d=a.x),a.xf&&(f=a.y),a.y=c&&a<=c+this.width){var d=this.y;if(b>=d&&b<=d+this.height)return!0}return!1}},c.RoundedRectangle.prototype.constructor=c.RoundedRectangle,PIXI.RoundedRectangle=c.RoundedRectangle,c.Camera=function(a,b,d,e,f,g){this.game=a,this.world=a.world,this.id=0,this.view=new c.Rectangle(d,e,f,g),this.bounds=new c.Rectangle(d,e,f,g),this.deadzone=null,this.visible=!0,this.roundPx=!0,this.atLimit={x:!1,y:!1},this.target=null,this.displayObject=null,this.scale=null,this.totalInView=0,this.lerp=new c.Point(1,1),this.onShakeComplete=new c.Signal,this.onFlashComplete=new c.Signal,this.onFadeComplete=new c.Signal,this.fx=null,this._targetPosition=new c.Point,this._edge=0,this._position=new c.Point,this._shake={intensity:0,duration:0,horizontal:!1,vertical:!1,shakeBounds:!0,x:0,y:0},this._fxDuration=0,this._fxType=0},c.Camera.FOLLOW_LOCKON=0,c.Camera.FOLLOW_PLATFORMER=1,c.Camera.FOLLOW_TOPDOWN=2,c.Camera.FOLLOW_TOPDOWN_TIGHT=3,c.Camera.SHAKE_BOTH=4,c.Camera.SHAKE_HORIZONTAL=5,c.Camera.SHAKE_VERTICAL=6,c.Camera.ENABLE_FX=!0,c.Camera.prototype={boot:function(){this.displayObject=this.game.world,this.scale=this.game.world.scale,this.game.camera=this,c.Graphics&&c.Camera.ENABLE_FX&&(this.fx=new c.Graphics(this.game),this.game.stage.addChild(this.fx))},preUpdate:function(){this.totalInView=0},follow:function(a,b,d,e){void 0===b&&(b=c.Camera.FOLLOW_LOCKON),void 0===d&&(d=1),void 0===e&&(e=1),this.target=a,this.lerp.set(d,e);var f;switch(b){case c.Camera.FOLLOW_PLATFORMER:var g=this.width/8,h=this.height/3;this.deadzone=new c.Rectangle((this.width-g)/2,(this.height-h)/2-.25*h,g,h);break;case c.Camera.FOLLOW_TOPDOWN:f=Math.max(this.width,this.height)/4,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_TOPDOWN_TIGHT:f=Math.max(this.width,this.height)/8,this.deadzone=new c.Rectangle((this.width-f)/2,(this.height-f)/2,f,f);break;case c.Camera.FOLLOW_LOCKON:default:this.deadzone=null}},unfollow:function(){this.target=null},focusOn:function(a){this.setPosition(Math.round(a.x-this.view.halfWidth),Math.round(a.y-this.view.halfHeight))},focusOnXY:function(a,b){this.setPosition(Math.round(a-this.view.halfWidth),Math.round(b-this.view.halfHeight))},shake:function(a,b,d,e,f){return void 0===a&&(a=.05),void 0===b&&(b=500),void 0===d&&(d=!0),void 0===e&&(e=c.Camera.SHAKE_BOTH),void 0===f&&(f=!0),!(!d&&this._shake.duration>0)&&(this._shake.intensity=a,this._shake.duration=b,this._shake.shakeBounds=f,this._shake.x=0,this._shake.y=0,this._shake.horizontal=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_HORIZONTAL,this._shake.vertical=e===c.Camera.SHAKE_BOTH||e===c.Camera.SHAKE_VERTICAL,!0)},flash:function(a,b,c){return void 0===a&&(a=16777215),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=1,this._fxDuration=b,this._fxType=0,!0)},fade:function(a,b,c){return void 0===a&&(a=0),void 0===b&&(b=500),void 0===c&&(c=!1),!(!this.fx||!c&&this._fxDuration>0)&&(this.fx.clear(),this.fx.beginFill(a),this.fx.drawRect(0,0,this.width,this.height),this.fx.endFill(),this.fx.alpha=0,this._fxDuration=b,this._fxType=1,!0)},update:function(){this._fxDuration>0&&this.updateFX(),this._shake.duration>0&&this.updateShake(),this.bounds&&this.checkBounds(),this.roundPx&&(this.view.floor(),this._shake.x=Math.floor(this._shake.x),this._shake.y=Math.floor(this._shake.y)),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},updateFX:function(){0===this._fxType?(this.fx.alpha-=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha<=0&&(this._fxDuration=0,this.fx.alpha=0,this.onFlashComplete.dispatch())):(this.fx.alpha+=this.game.time.elapsedMS/this._fxDuration,this.fx.alpha>=1&&(this._fxDuration=0,this.fx.alpha=1,this.onFadeComplete.dispatch()))},updateShake:function(){this._shake.duration-=this.game.time.elapsedMS,this._shake.duration<=0?(this.onShakeComplete.dispatch(),this._shake.x=0,this._shake.y=0):(this._shake.horizontal&&(this._shake.x=this.game.rnd.frac()*this._shake.intensity*this.view.width*2-this._shake.intensity*this.view.width),this._shake.vertical&&(this._shake.y=this.game.rnd.frac()*this._shake.intensity*this.view.height*2-this._shake.intensity*this.view.height))},updateTarget:function(){this._targetPosition.x=this.view.x+this.target.worldPosition.x,this._targetPosition.y=this.view.y+this.target.worldPosition.y,this.deadzone?(this._edge=this._targetPosition.x-this.view.x,this._edgethis.deadzone.right&&(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.deadzone.right,this.lerp.x)),this._edge=this._targetPosition.y-this.view.y,this._edgethis.deadzone.bottom&&(this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.deadzone.bottom,this.lerp.y))):(this.view.x=this.game.math.linear(this.view.x,this._targetPosition.x-this.view.halfWidth,this.lerp.x),this.view.y=this.game.math.linear(this.view.y,this._targetPosition.y-this.view.halfHeight,this.lerp.y)),this.bounds&&this.checkBounds(),this.roundPx&&this.view.floor(),this.displayObject.position.x=-this.view.x,this.displayObject.position.y=-this.view.y},setBoundsToWorld:function(){this.bounds&&this.bounds.copyFrom(this.game.world.bounds)},checkBounds:function(){this.atLimit.x=!1,this.atLimit.y=!1;var a=this.view.x+this._shake.x,b=this.view.right+this._shake.x,c=this.view.y+this._shake.y,d=this.view.bottom+this._shake.y;a<=this.bounds.x*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.x*this.scale.x,this._shake.shakeBounds||(this._shake.x=0)),b>=this.bounds.right*this.scale.x&&(this.atLimit.x=!0,this.view.x=this.bounds.right*this.scale.x-this.width,this._shake.shakeBounds||(this._shake.x=0)),c<=this.bounds.top*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.top*this.scale.y,this._shake.shakeBounds||(this._shake.y=0)),d>=this.bounds.bottom*this.scale.y&&(this.atLimit.y=!0,this.view.y=this.bounds.bottom*this.scale.y-this.height,this._shake.shakeBounds||(this._shake.y=0))},setPosition:function(a,b){this.view.x=a,this.view.y=b,this.bounds&&this.checkBounds()},setSize:function(a,b){this.view.width=a,this.view.height=b},reset:function(){this.target=null,this.view.x=0,this.view.y=0,this._shake.duration=0,this.resetFX()},resetFX:function(){this.fx&&(this.fx.clear(),this.fx.alpha=0,this._fxDuration=0)}},c.Camera.prototype.constructor=c.Camera,Object.defineProperty(c.Camera.prototype,"x",{get:function(){return this.view.x},set:function(a){this.view.x=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"y",{get:function(){return this.view.y},set:function(a){this.view.y=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"position",{get:function(){return this._position.set(this.view.x,this.view.y),this._position},set:function(a){void 0!==a.x&&(this.view.x=a.x),void 0!==a.y&&(this.view.y=a.y),this.bounds&&this.checkBounds()}}),Object.defineProperty(c.Camera.prototype,"width",{get:function(){return this.view.width},set:function(a){this.view.width=a}}),Object.defineProperty(c.Camera.prototype,"height",{get:function(){return this.view.height},set:function(a){this.view.height=a}}),Object.defineProperty(c.Camera.prototype,"shakeIntensity",{get:function(){return this._shake.intensity},set:function(a){this._shake.intensity=a}}),c.State=function(){this.game=null,this.key="",this.add=null,this.make=null,this.camera=null,this.cache=null,this.input=null,this.load=null,this.math=null,this.sound=null,this.scale=null,this.stage=null,this.state=null,this.time=null,this.tweens=null,this.world=null,this.particles=null,this.physics=null,this.rnd=null},c.State.prototype={init:function(){},preload:function(){},loadUpdate:function(){},loadRender:function(){},create:function(){},update:function(){},preRender:function(){},render:function(){},resize:function(){},paused:function(){},resumed:function(){},pauseUpdate:function(){},shutdown:function(){}},c.State.prototype.constructor=c.State,c.StateManager=function(a,b){this.game=a,this.states={},this._pendingState=null,void 0!==b&&null!==b&&(this._pendingState=b),this._clearWorld=!1,this._clearCache=!1,this._created=!1,this._args=[],this.current="",this.onStateChange=new c.Signal,this.onInitCallback=null,this.onPreloadCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPreRenderCallback=null,this.onLoadUpdateCallback=null,this.onLoadRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.onShutDownCallback=null},c.StateManager.prototype={boot:function(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),null!==this._pendingState&&"string"!=typeof this._pendingState&&this.add("default",this._pendingState,!0)},add:function(a,b,d){void 0===d&&(d=!1);var e;return b instanceof c.State?e=b:"object"==typeof b?(e=b,e.game=this.game):"function"==typeof b&&(e=new b(this.game)),this.states[a]=e,d&&(this.game.isBooted?this.start(a):this._pendingState=a),e},remove:function(a){this.current===a&&(this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onPreRenderCallback=null,this.onRenderCallback=null,this.onResizeCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null),delete this.states[a]},start:function(a,b,c){void 0===b&&(b=!0),void 0===c&&(c=!1),this.checkState(a)&&(this._pendingState=a,this._clearWorld=b,this._clearCache=c,arguments.length>3&&(this._args=Array.prototype.splice.call(arguments,3)))},restart:function(a,b){void 0===a&&(a=!0),void 0===b&&(b=!1),this._pendingState=this.current,this._clearWorld=a,this._clearCache=b,arguments.length>2&&(this._args=Array.prototype.slice.call(arguments,2))},dummy:function(){},preUpdate:function(){if(this._pendingState&&this.game.isBooted){var a=this.current;if(this.clearCurrentState(),this.setCurrentState(this._pendingState),this.onStateChange.dispatch(this.current,a),this.current!==this._pendingState)return;this._pendingState=null,this.onPreloadCallback?(this.game.load.reset(!0),this.onPreloadCallback.call(this.callbackContext,this.game),0===this.game.load.totalQueuedFiles()&&0===this.game.load.totalQueuedPacks()?this.loadComplete():this.game.load.start()):this.loadComplete()}},clearCurrentState:function(){this.current&&(this.onShutDownCallback&&this.onShutDownCallback.call(this.callbackContext,this.game),this.game.tweens.removeAll(),this.game.camera.reset(),this.game.input.reset(!0),this.game.physics.clear(),this.game.time.removeAll(),this.game.scale.reset(this._clearWorld),this.game.debug&&this.game.debug.reset(),this._clearWorld&&(this.game.world.shutdown(),this._clearCache&&this.game.cache.destroy()))},checkState:function(a){return this.states[a]?!!(this.states[a].preload||this.states[a].create||this.states[a].update||this.states[a].render)||(console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render"),!1):(console.warn("Phaser.StateManager - No state found with the key: "+a),!1)},link:function(a){this.states[a].game=this.game,this.states[a].add=this.game.add,this.states[a].make=this.game.make,this.states[a].camera=this.game.camera,this.states[a].cache=this.game.cache,this.states[a].input=this.game.input,this.states[a].load=this.game.load,this.states[a].math=this.game.math,this.states[a].sound=this.game.sound,this.states[a].scale=this.game.scale,this.states[a].state=this,this.states[a].stage=this.game.stage,this.states[a].time=this.game.time,this.states[a].tweens=this.game.tweens,this.states[a].world=this.game.world,this.states[a].particles=this.game.particles,this.states[a].rnd=this.game.rnd,this.states[a].physics=this.game.physics,this.states[a].key=a},unlink:function(a){this.states[a]&&(this.states[a].game=null,this.states[a].add=null,this.states[a].make=null,this.states[a].camera=null,this.states[a].cache=null,this.states[a].input=null,this.states[a].load=null,this.states[a].math=null,this.states[a].sound=null,this.states[a].scale=null,this.states[a].state=null,this.states[a].stage=null,this.states[a].time=null,this.states[a].tweens=null,this.states[a].world=null,this.states[a].particles=null,this.states[a].rnd=null,this.states[a].physics=null)},setCurrentState:function(a){this.callbackContext=this.states[a],this.link(a),this.onInitCallback=this.states[a].init||this.dummy,this.onPreloadCallback=this.states[a].preload||null,this.onLoadRenderCallback=this.states[a].loadRender||null,this.onLoadUpdateCallback=this.states[a].loadUpdate||null,this.onCreateCallback=this.states[a].create||null,this.onUpdateCallback=this.states[a].update||null,this.onPreRenderCallback=this.states[a].preRender||null,this.onRenderCallback=this.states[a].render||null,this.onResizeCallback=this.states[a].resize||null,this.onPausedCallback=this.states[a].paused||null,this.onResumedCallback=this.states[a].resumed||null,this.onPauseUpdateCallback=this.states[a].pauseUpdate||null,this.onShutDownCallback=this.states[a].shutdown||this.dummy,""!==this.current&&this.game.physics.reset(),this.current=a,this._created=!1,this.onInitCallback.apply(this.callbackContext,this._args),a===this._pendingState&&(this._args=[]),this.game._kickstart=!0},getCurrentState:function(){return this.states[this.current]},loadComplete:function(){!1===this._created&&this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game),!1===this._created&&this.onCreateCallback?(this._created=!0,this.onCreateCallback.call(this.callbackContext,this.game)):this._created=!0},pause:function(){this._created&&this.onPausedCallback&&this.onPausedCallback.call(this.callbackContext,this.game)},resume:function(){this._created&&this.onResumedCallback&&this.onResumedCallback.call(this.callbackContext,this.game)},update:function(){this._created?this.onUpdateCallback&&this.onUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},pauseUpdate:function(){this._created?this.onPauseUpdateCallback&&this.onPauseUpdateCallback.call(this.callbackContext,this.game):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext,this.game)},preRender:function(a){this._created&&this.onPreRenderCallback&&this.onPreRenderCallback.call(this.callbackContext,this.game,a)},resize:function(a,b){this.onResizeCallback&&this.onResizeCallback.call(this.callbackContext,a,b)},render:function(){this._created?this.onRenderCallback&&(this.game.renderType===c.CANVAS?(this.game.context.save(),this.game.context.setTransform(1,0,0,1,0,0),this.onRenderCallback.call(this.callbackContext,this.game),this.game.context.restore()):this.onRenderCallback.call(this.callbackContext,this.game)):this.onLoadRenderCallback&&this.onLoadRenderCallback.call(this.callbackContext,this.game)},destroy:function(){this._clearWorld=!0,this._clearCache=!0,this.clearCurrentState(),this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onPausedCallback=null,this.onResumedCallback=null,this.onPauseUpdateCallback=null,this.game=null,this.states={},this._pendingState=null,this.current=""}},c.StateManager.prototype.constructor=c.StateManager,Object.defineProperty(c.StateManager.prototype,"created",{get:function(){return this._created}}),c.Signal=function(){},c.Signal.prototype={_bindings:null,_prevParams:null,memorize:!1,_shouldPropagate:!0,active:!0,_boundDispatch:!1,validateListener:function(a,b){if("function"!=typeof a)throw new Error("Phaser.Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,b,d,e,f){var g,h=this._indexOfListener(a,d);if(-1!==h){if(g=this._bindings[h],g.isOnce()!==b)throw new Error("You cannot add"+(b?"":"Once")+"() then add"+(b?"Once":"")+"() the same listener without removing the relationship first.")}else g=new c.SignalBinding(this,a,b,d,e,f),this._addBinding(g);return this.memorize&&this._prevParams&&g.execute(this._prevParams),g},_addBinding:function(a){this._bindings||(this._bindings=[]);var b=this._bindings.length;do{b--}while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){if(!this._bindings)return-1;void 0===b&&(b=null);for(var c,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)return d;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){this.validateListener(a,"add");var d=[];if(arguments.length>3)for(var e=3;e3)for(var e=3;e=this.children.length?-1:this.getChildAt(a)},c.Group.prototype.create=function(a,b,c,d,e,f){void 0===e&&(e=!0);var g=new this.classType(this.game,a,b,c,d);return g.exists=e,g.visible=e,g.alive=e,this.add(g,!1,f)},c.Group.prototype.createMultiple=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=!1),Array.isArray(b)||(b=[b]),Array.isArray(c)||(c=[c]);var e=this,f=[];return b.forEach(function(b){c.forEach(function(c){for(var g=0;gthis.children.length||-1===a&&-1===b)return!1;for(var h=new c.Rectangle(0,0,d,e),i=a*d,j=b*e,k=g;kthis.children.length-1&&(a=0),this.cursor)return this.cursorIndex=a,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.next=function(){if(this.cursor)return this.cursorIndex>=this.children.length-1?this.cursorIndex=0:this.cursorIndex++,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.previous=function(){if(this.cursor)return 0===this.cursorIndex?this.cursorIndex=this.children.length-1:this.cursorIndex--,this.cursor=this.children[this.cursorIndex],this.cursor},c.Group.prototype.swap=function(a,b){this.swapChildren(a,b),this.updateZ()},c.Group.prototype.bringToTop=function(a){return a.parent===this&&this.getIndex(a)0&&(this.remove(a,!1,!0),this.addAt(a,0,!0)),a},c.Group.prototype.moveUp=function(a){if(a.parent===this&&this.getIndex(a)0){var b=this.getIndex(a),c=this.getAt(b-1);c&&this.swap(a,c)}return a},c.Group.prototype.xy=function(a,b,c){if(a<0||a>this.children.length)return-1;this.getChildAt(a).x=b,this.getChildAt(a).y=c},c.Group.prototype.reverse=function(){this.children.reverse(),this.updateZ()},c.Group.prototype.getIndex=function(a){return this.children.indexOf(a)},c.Group.prototype.getByName=function(a){for(var b=0;b0))return!1;var f=b.length;return 1===f?0===d?a[b[0]]=c:1===d?a[b[0]]+=c:2===d?a[b[0]]-=c:3===d?a[b[0]]*=c:4===d&&(a[b[0]]/=c):2===f?0===d?a[b[0]][b[1]]=c:1===d?a[b[0]][b[1]]+=c:2===d?a[b[0]][b[1]]-=c:3===d?a[b[0]][b[1]]*=c:4===d&&(a[b[0]][b[1]]/=c):3===f?0===d?a[b[0]][b[1]][b[2]]=c:1===d?a[b[0]][b[1]][b[2]]+=c:2===d?a[b[0]][b[1]][b[2]]-=c:3===d?a[b[0]][b[1]][b[2]]*=c:4===d&&(a[b[0]][b[1]][b[2]]/=c):4===f&&(0===d?a[b[0]][b[1]][b[2]][b[3]]=c:1===d?a[b[0]][b[1]][b[2]][b[3]]+=c:2===d?a[b[0]][b[1]][b[2]][b[3]]-=c:3===d?a[b[0]][b[1]][b[2]][b[3]]*=c:4===d&&(a[b[0]][b[1]][b[2]][b[3]]/=c)),!0},c.Group.prototype.checkProperty=function(a,b,d,e){return void 0===e&&(e=!1),!(!c.Utils.getProperty(a,b)&&e)&&c.Utils.getProperty(a,b)===d},c.Group.prototype.set=function(a,b,c,d,e,f,g){if(void 0===g&&(g=!1),b=b.split("."),void 0===d&&(d=!1),void 0===e&&(e=!1),(!1===d||d&&a.alive)&&(!1===e||e&&a.visible))return this.setProperty(a,b,c,f,g)},c.Group.prototype.setAll=function(a,b,c,d,e,f){void 0===c&&(c=!1),void 0===d&&(d=!1),void 0===f&&(f=!1),a=a.split("."),e=e||0;for(var g=0;g2){c=[];for(var d=2;d2){e=[];for(var f=2;f2){d=[null];for(var e=2;e2){d=[null];for(var e=2;e2){d=[null];for(var e=2;eb[this._sortProperty]?1:a.zb[this._sortProperty]?-1:0},c.Group.prototype.iterate=function(a,b,d,e,f,g){if(0===this.children.length){if(d===c.Group.RETURN_TOTAL)return 0;if(d===c.Group.RETURN_ALL)return[]}var h=0;if(d===c.Group.RETURN_ALL)var i=[];for(var j=0;j0)return this.children[this.children.length-1]},c.Group.prototype.getBottom=function(){if(this.children.length>0)return this.children[0]},c.Group.prototype.getClosestTo=function(a,b,d){for(var e=Number.MAX_VALUE,f=0,g=null,h=0;he&&(!b||b.call(d,i,f))&&(e=f,g=i)}return g},c.Group.prototype.countLiving=function(){return this.iterate("alive",!0,c.Group.RETURN_TOTAL)},c.Group.prototype.countDead=function(){return this.iterate("alive",!1,c.Group.RETURN_TOTAL)},c.Group.prototype.getRandom=function(a,b){return void 0===a&&(a=0),void 0===b&&(b=this.children.length),0===b?null:c.ArrayUtils.getRandomItem(this.children,a,b)},c.Group.prototype.getRandomExists=function(a,b){var c=this.getAll("exists",!0,a,b);return this.game.rnd.pick(c)},c.Group.prototype.getAll=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=this.children.length);for(var e=[],f=c;f0&&a instanceof c.Group){do{a.add(this.children[0],b)}while(this.children.length>0);this.hash=[],this.cursor=null}return a},c.Group.prototype.removeAll=function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=!1),void 0===c&&(c=!1),0!==this.children.length){do{!b&&this.children[0].events&&this.children[0].events.onRemovedFromGroup$dispatch(this.children[0],this);var d=this.removeChild(this.children[0]);this.removeFromHash(d),a&&d&&d.destroy(!0,c)}while(this.children.length>0);this.hash=[],this.cursor=null}},c.Group.prototype.removeBetween=function(a,b,c,d){if(void 0===b&&(b=this.children.length-1),void 0===c&&(c=!1),void 0===d&&(d=!1),0!==this.children.length){if(a>b||a<0||b>this.children.length)return!1;for(var e=b;e>=a;){!d&&this.children[e].events&&this.children[e].events.onRemovedFromGroup$dispatch(this.children[e],this);var f=this.removeChild(this.children[e]);this.removeFromHash(f),c&&f&&f.destroy(!0),this.cursor===this.children[e]&&(this.cursor=null),e--}this.updateZ()}},c.Group.prototype.destroy=function(a,b){null===this.game||this.ignoreDestroy||(void 0===a&&(a=!0),void 0===b&&(b=!1),this.onDestroy.dispatch(this,a,b),this.removeAll(a),this.cursor=null,this.filters=null,this.pendingDestroy=!1,b||(this.parent&&this.parent.removeChild(this),this.game=null,this.exists=!1))},Object.defineProperty(c.Group.prototype,"total",{get:function(){return this.iterate("exists",!0,c.Group.RETURN_TOTAL)}}),Object.defineProperty(c.Group.prototype,"length",{get:function(){return this.children.length}}),Object.defineProperty(c.Group.prototype,"angle",{get:function(){return c.Math.radToDeg(this.rotation)},set:function(a){this.rotation=c.Math.degToRad(a)}}),Object.defineProperty(c.Group.prototype,"centerX",{get:function(){return this.getBounds(this.parent).centerX},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.halfWidth}}),Object.defineProperty(c.Group.prototype,"centerY",{get:function(){return this.getBounds(this.parent).centerY},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.halfHeight}}),Object.defineProperty(c.Group.prototype,"left",{get:function(){return this.getBounds(this.parent).left},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c}}),Object.defineProperty(c.Group.prototype,"right",{get:function(){return this.getBounds(this.parent).right},set:function(a){var b=this.getBounds(this.parent),c=this.x-b.x;this.x=a+c-b.width}}),Object.defineProperty(c.Group.prototype,"top",{get:function(){return this.getBounds(this.parent).top},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c}}),Object.defineProperty(c.Group.prototype,"bottom",{get:function(){return this.getBounds(this.parent).bottom},set:function(a){var b=this.getBounds(this.parent),c=this.y-b.y;this.y=a+c-b.height}}),c.World=function(a){c.Group.call(this,a,null,"__world",!1),this.bounds=new c.Rectangle(0,0,a.width,a.height),this.camera=null,this._definedSize=!1,this._width=a.width,this._height=a.height,this.game.state.onStateChange.add(this.stateChange,this)},c.World.prototype=Object.create(c.Group.prototype),c.World.prototype.constructor=c.World,c.World.prototype.boot=function(){this.camera=new c.Camera(this.game,0,0,0,this.game.width,this.game.height),this.game.stage.addChild(this),this.camera.boot()},c.World.prototype.stateChange=function(){this.x=0,this.y=0,this.camera.reset()},c.World.prototype.setBounds=function(a,b,c,d){this._definedSize=!0,this._width=c,this._height=d,this.bounds.setTo(a,b,c,d),this.x=a,this.y=b,this.camera.bounds&&this.camera.bounds.setTo(a,b,Math.max(c,this.game.width),Math.max(d,this.game.height)),this.game.physics.setBoundsToWorld()},c.World.prototype.resize=function(a,b){this._definedSize&&(athis.bounds.right&&(a.x=this.bounds.left)),e&&(a.y+a._currentBounds.heightthis.bounds.bottom&&(a.y=this.bounds.top))):(d&&a.x+bthis.bounds.right&&(a.x=this.bounds.left-b),e&&a.y+bthis.bounds.bottom&&(a.y=this.bounds.top-b))},Object.defineProperty(c.World.prototype,"width",{get:function(){return this.bounds.width},set:function(a){a1&&!this.forceSingleUpdate)this.time.time>this._nextFpsNotification&&(this._nextFpsNotification=this.time.time+1e4,this.fpsProblemNotifier.dispatch()),this._deltaTime=0,this._spiraling=0,this.updateRender(this.time.slowMotion*this.time.desiredFps);else{var b=1e3*this.time.slowMotion/this.time.desiredFps;this._deltaTime+=Math.max(Math.min(3*b,this.time.elapsed),0);var c=0;for(this.updatesThisFrame=Math.floor(this._deltaTime/b),this.forceSingleUpdate&&(this.updatesThisFrame=Math.min(1,this.updatesThisFrame));this._deltaTime>=b&&(this._deltaTime-=b,this.currentUpdateID=c,this.updateLogic(this.time.desiredFpsMult),c++,!this.forceSingleUpdate||1!==c);)this.time.refresh();c>this._lastCount?this._spiraling++:c=c.Input.MAX_POINTERS)return console.warn("Phaser.Input.addPointer: Maximum limit of "+c.Input.MAX_POINTERS+" pointers reached."),null;var a=this.pointers.length+1,b=new c.Pointer(this.game,a,c.PointerMode.TOUCH);return this.pointers.push(b),this["pointer"+a]=b,b},update:function(){if(this.keyboard&&this.keyboard.update(),this.pollRate>0&&this._pollCounter=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(a);if(!this.pointer2.active)return this.pointer2.start(a);for(var b=2;b0;c++){this.pointers[c].active&&b--}return a-b},getPointer:function(a){void 0===a&&(a=!1);for(var b=0;b=g&&this._localPoint.x=h&&this._localPoint.y=g&&this._localPoint.x=h&&this._localPoint.y0&&this._pollCounterthis.game.time.time},justReleased:function(a){return a=a||250,this.isUp&&this.timeUp+a>this.game.time.time},reset:function(){this.isDown=!1,this.isUp=!0,this.timeDown=this.game.time.time,this.repeats=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1},destroy:function(){this.onDown.dispose(),this.onUp.dispose(),this.onFloat.dispose(),this.parent=null,this.game=null}},c.DeviceButton.prototype.constructor=c.DeviceButton,Object.defineProperty(c.DeviceButton.prototype,"duration",{get:function(){return this.isUp?-1:this.game.time.time-this.timeDown}}),c.Pointer=function(a,b,d){this.game=a,this.id=b,this.type=c.POINTER,this.exists=!0,this.identifier=0,this.pointerId=null,this.pointerMode=d||c.PointerMode.CURSOR|c.PointerMode.CONTACT,this.target=null,this.button=null,this.leftButton=new c.DeviceButton(this,c.Pointer.LEFT_BUTTON),this.middleButton=new c.DeviceButton(this,c.Pointer.MIDDLE_BUTTON),this.rightButton=new c.DeviceButton(this,c.Pointer.RIGHT_BUTTON),this.backButton=new c.DeviceButton(this,c.Pointer.BACK_BUTTON),this.forwardButton=new c.DeviceButton(this,c.Pointer.FORWARD_BUTTON),this.eraserButton=new c.DeviceButton(this,c.Pointer.ERASER_BUTTON),this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isMouse=0===b,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new c.Point,this.positionDown=new c.Point,this.positionUp=new c.Point,this.circle=new c.Circle(0,0,44),this._clickTrampolines=null,this._trampolineTargetObject=null},c.Pointer.NO_BUTTON=0,c.Pointer.LEFT_BUTTON=1,c.Pointer.RIGHT_BUTTON=2,c.Pointer.MIDDLE_BUTTON=4,c.Pointer.BACK_BUTTON=8,c.Pointer.FORWARD_BUTTON=16,c.Pointer.ERASER_BUTTON=32,c.Pointer.prototype={resetButtons:function(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())},processButtonsDown:function(a,b){c.Pointer.LEFT_BUTTON&a&&this.leftButton.start(b),c.Pointer.RIGHT_BUTTON&a&&this.rightButton.start(b),c.Pointer.MIDDLE_BUTTON&a&&this.middleButton.start(b),c.Pointer.BACK_BUTTON&a&&this.backButton.start(b),c.Pointer.FORWARD_BUTTON&a&&this.forwardButton.start(b),c.Pointer.ERASER_BUTTON&a&&this.eraserButton.start(b)},processButtonsUp:function(a,b){a===c.Mouse.LEFT_BUTTON&&this.leftButton.stop(b),a===c.Mouse.RIGHT_BUTTON&&this.rightButton.stop(b),a===c.Mouse.MIDDLE_BUTTON&&this.middleButton.stop(b),a===c.Mouse.BACK_BUTTON&&this.backButton.stop(b),a===c.Mouse.FORWARD_BUTTON&&this.forwardButton.stop(b),5===a&&this.eraserButton.stop(b)},updateButtons:function(a){this.button=a.button;var b="down"===a.type.toLowerCase().substr(-4);void 0!==a.buttons?b?this.processButtonsDown(a.buttons,a):this.processButtonsUp(a.button,a):b?this.leftButton.start(a):(this.leftButton.stop(a),this.rightButton.stop(a)),1===a.buttons&&a.ctrlKey&&this.leftButton.isDown&&(this.leftButton.stop(a),this.rightButton.start(a)),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)},start:function(a){var b=this.game.input;return a.pointerId&&(this.pointerId=a.pointerId),this.identifier=a.identifier,this.target=a.target,this.isMouse?this.updateButtons(a):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this._clickTrampolines=null,this._trampolineTargetObject=null,this.msSinceLastClick=this.game.time.time-this.timeDown,this.timeDown=this.game.time.time,this._holdSent=!1,this.move(a,!0),this.positionDown.setTo(this.x,this.y),(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.x=this.x,b.y=this.y,b.position.setTo(this.x,this.y),b.onDown.dispatch(this,a),b.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&this.targetObject._touchedHandler(this),this},update:function(){var a=this.game.input +;this.active&&(this.dirty&&(a.interactiveItems.total>0&&this.processInteractiveObjects(!1),this.dirty=!1),!1===this._holdSent&&this.duration>=a.holdRate&&((a.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||a.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||a.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===a.totalActivePointers)&&a.onHold.dispatch(this),this._holdSent=!0),a.recordPointerHistory&&this.game.time.time>=this._nextDrop&&(this._nextDrop=this.game.time.time+a.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>a.recordLimit&&this._history.shift()))},move:function(a,b){var d=this.game.input;if(!d.pollLocked){void 0===b&&(b=!1),void 0!==a.button&&(this.button=a.button),b&&this.isMouse&&this.updateButtons(a),this.clientX=a.clientX,this.clientY=a.clientY,this.pageX=a.pageX,this.pageY=a.pageY,this.screenX=a.screenX,this.screenY=a.screenY,this.isMouse&&d.mouse.locked&&!b&&(this.rawMovementX=a.movementX||a.mozMovementX||a.webkitMovementX||0,this.rawMovementY=a.movementY||a.mozMovementY||a.webkitMovementY||0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.offset.x)*d.scale.x,this.y=(this.pageY-this.game.scale.offset.y)*d.scale.y,this.position.setTo(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(d.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||d.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||d.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===d.totalActivePointers)&&(d.activePointer=this,d.x=this.x,d.y=this.y,d.position.setTo(d.x,d.y),d.circle.x=d.x,d.circle.y=d.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY);for(var e=d.moveCallbacks.length;e--;)d.moveCallbacks[e].callback.call(d.moveCallbacks[e].context,this,this.x,this.y,b);return null!==this.targetObject&&!0===this.targetObject.isDragged?!1===this.targetObject.update(this)&&(this.targetObject=null):d.interactiveItems.total>0&&this.processInteractiveObjects(b),this}},processInteractiveObjects:function(a){var b=0,c=-1,d=null,e=this.game.input.interactiveItems.first;for(this.interactiveCandidates=[];e;)e.checked=!1,e.validForInput(c,b,!1)&&(e.checked=!0,(a&&e.checkPointerDown(this,!0)||!a&&e.checkPointerOver(this,!0))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e))),e=this.game.input.interactiveItems.next;for(e=this.game.input.interactiveItems.first;e;)!e.checked&&e.validForInput(c,b,!0)&&(a&&e.checkPointerDown(this,!1)||!a&&e.checkPointerOver(this,!1))&&(b=e.sprite.renderOrderID,c=e.priorityID,d=e,this.interactiveCandidates.push(e)),e=this.game.input.interactiveItems.next;return this.game.input.customCandidateHandler&&(d=this.game.input.customCandidateHandler.call(this.game.input.customCandidateHandlerContext,this,this.interactiveCandidates,d)),this.swapTarget(d,!1),null!==this.targetObject},swapTarget:function(a,b){void 0===b&&(b=!1),null===a?this.targetObject&&(this.targetObject._pointerOutHandler(this,b),this.targetObject=null):null===this.targetObject?(this.targetObject=a,a._pointerOverHandler(this,b)):this.targetObject===a?!1===a.update(this)&&(this.targetObject=null):(this.targetObject._pointerOutHandler(this,b),this.targetObject=a,this.targetObject._pointerOverHandler(this,b))},leave:function(a){this.withinGame=!1,this.move(a,!1)},stop:function(a){var b=this.game.input;return this._stateReset&&this.withinGame?void a.preventDefault():(this.timeUp=this.game.time.time,(b.multiInputOverride===c.Input.MOUSE_OVERRIDES_TOUCH||b.multiInputOverride===c.Input.MOUSE_TOUCH_COMBINE||b.multiInputOverride===c.Input.TOUCH_OVERRIDES_MOUSE&&0===b.totalActivePointers)&&(b.onUp.dispatch(this,a),this.duration>=0&&this.duration<=b.tapRate&&(this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(a.pageX,a.pageY),this.pointerId=null,this.identifier=null,this.positionUp.setTo(this.x,this.y),!1===this.isMouse&&b.currentPointers--,b.interactiveItems.callAll("_releasedHandler",this),this._clickTrampolines&&(this._trampolineTargetObject=this.targetObject),this.targetObject=null,this)},justPressed:function(a){return a=a||this.game.input.justPressedRate,!0===this.isDown&&this.timeDown+a>this.game.time.time},justReleased:function(a){return a=a||this.game.input.justReleasedRate,this.isUp&&this.timeUp+a>this.game.time.time},addClickTrampoline:function(a,b,c,d){if(this.isDown){for(var e=this._clickTrampolines=this._clickTrampolines||[],f=0;fa||this.priorityID===a&&this.sprite.renderOrderID>b))},isPixelPerfect:function(){return this.pixelPerfectClick||this.pixelPerfectOver},pointerX:function(a){return a=a||0,this._pointerData[a].x},pointerY:function(a){return a=a||0,this._pointerData[a].y},pointerDown:function(a){return a=a||0,this._pointerData[a].isDown},pointerUp:function(a){return a=a||0,this._pointerData[a].isUp},pointerTimeDown:function(a){return a=a||0,this._pointerData[a].timeDown},pointerTimeUp:function(a){return a=a||0,this._pointerData[a].timeUp},pointerOver:function(a){if(!this.enabled)return!1;if(void 0===a){for(var b=0;b<10;b++)if(this._pointerData[b].isOver)return!0;return!1}return this._pointerData[a].isOver},pointerOut:function(a){if(!this.enabled)return!1;if(void 0!==a)return this._pointerData[a].isOut;for(var b=0;b<10;b++)if(this._pointerData[b].isOut)return!0},pointerTimeOver:function(a){return a=a||0,this._pointerData[a].timeOver},pointerTimeOut:function(a){return a=a||0,this._pointerData[a].timeOut},pointerDragged:function(a){return a=a||0,this._pointerData[a].isDragged},checkPointerDown:function(a,b){return!!(a.isDown&&this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectClick)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPointerOver:function(a,b){return!!(this.enabled&&this.sprite&&this.sprite.parent&&this.sprite.visible&&this.sprite.parent.visible&&0!==this.sprite.worldScale.x&&0!==this.sprite.worldScale.y)&&(!!this.game.input.hitTest(this.sprite,a,this._tempPoint)&&(void 0===b&&(b=!1),!(!b&&this.pixelPerfectOver)||this.checkPixel(this._tempPoint.x,this._tempPoint.y)))},checkPixel:function(a,b,c){if(this.sprite.texture.baseTexture.source){if(null===a&&null===b){this.game.input.getLocalPosition(this.sprite,c,this._tempPoint);var a=this._tempPoint.x,b=this._tempPoint.y}if(0!==this.sprite.anchor.x&&(a-=-this.sprite.texture.frame.width*this.sprite.anchor.x),0!==this.sprite.anchor.y&&(b-=-this.sprite.texture.frame.height*this.sprite.anchor.y),a+=this.sprite.texture.frame.x,b+=this.sprite.texture.frame.y,this.sprite.texture.trim&&(a-=this.sprite.texture.trim.x,b-=this.sprite.texture.trim.y,athis.sprite.texture.crop.right||bthis.sprite.texture.crop.bottom))return this._dx=a,this._dy=b,!1;this._dx=a,this._dy=b,this.game.input.hitContext.clearRect(0,0,1,1),this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source,a,b,1,1,0,0,1,1);if(this.game.input.hitContext.getImageData(0,0,1,1).data[3]>=this.pixelPerfectAlpha)return!0}return!1},update:function(a){if(null!==this.sprite&&void 0!==this.sprite.parent)return this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=c.Math.distance(a.x,a.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(a),!0):this.draggable&&this._draggedPointerID===a.id?this.updateDrag(a,!1):this._pointerData[a.id].isOver?this.checkPointerOver(a)?(this._pointerData[a.id].x=a.x-this.sprite.x,this._pointerData[a.id].y=a.y-this.sprite.y,!0):(this._pointerOutHandler(a),!1):void 0:(this._pointerOutHandler(a),!1)},_pointerOverHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];if(!1===d.isOver||a.dirty){var e=!1===d.isOver;d.isOver=!0,d.isOut=!1,d.timeOver=this.game.time.time,d.x=a.x-this.sprite.x,d.y=a.y-this.sprite.y,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!b&&e&&this.sprite&&this.sprite.events&&this.sprite.events.onInputOver$dispatch(this.sprite,a),this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,a)}}},_pointerOutHandler:function(a,b){if(null!==this.sprite){var d=this._pointerData[a.id];d.isOver=!1,d.isOut=!0,d.timeOut=this.game.time.time,this.useHandCursor&&!1===d.isDragged&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),!b&&this.sprite&&this.sprite.events&&(this.sprite.events.onInputOut$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,a))}},_touchedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(!b.isDown&&b.isOver){if(this.pixelPerfectClick&&!this.checkPixel(null,null,a))return;if(b.isDown=!0,b.isUp=!1,b.timeDown=this.game.time.time,this.downPoint.set(a.x,a.y),a.dirty=!0,this.sprite&&this.sprite.events&&(this.sprite.events.onInputDown$dispatch(this.sprite,a),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,a),null===this.sprite))return;this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(a):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.add(this.dragTimeThreshold,this.dragTimeElapsed,this,a)):this._dragTimePass=!0)),this.bringToTop&&this.sprite.bringToTop()}}},dragTimeElapsed:function(a){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(a)},_releasedHandler:function(a){if(null!==this.sprite){var b=this._pointerData[a.id];if(b.isDown&&a.isUp){b.isDown=!1,b.isUp=!0,b.timeUp=this.game.time.time,b.downDuration=b.timeUp-b.timeDown;var d=this.checkPointerOver(a);this.sprite&&this.sprite.events&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===a.id)||this.sprite.events.onInputUp$dispatch(this.sprite,a,d),this.sprite&&this.sprite.parent&&this.sprite.parent.type===c.GROUP&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,a,d),d&&(d=this.checkPointerOver(a))),b.isOver=d,!d&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),a.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===a.id&&this.stopDrag(a)}}},updateDrag:function(a,b){if(void 0===b&&(b=!1),a.isUp)return this.stopDrag(a),!1;var c=this.globalToLocalX(a.x)+this._dragPoint.x+this.dragOffset.x,d=this.globalToLocalY(a.y)+this._dragPoint.y+this.dragOffset.y;if(this.sprite.fixedToCamera)this.allowHorizontalDrag&&(this.sprite.cameraOffset.x=c),this.allowVerticalDrag&&(this.sprite.cameraOffset.y=d),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.cameraOffset.x=Math.round((this.sprite.cameraOffset.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.cameraOffset.y=Math.round((this.sprite.cameraOffset.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.cameraOffset.x,this.sprite.cameraOffset.y));else{var e=this.game.camera.x-this._pointerData[a.id].camX,f=this.game.camera.y-this._pointerData[a.id].camY;this.allowHorizontalDrag&&(this.sprite.x=c+e),this.allowVerticalDrag&&(this.sprite.y=d+f),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.x=Math.round((this.sprite.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,this.sprite.y=Math.round((this.sprite.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,this.snapPoint.set(this.sprite.x,this.sprite.y))}return this.sprite.events.onDragUpdate.dispatch(this.sprite,a,c,d,this.snapPoint,b),!0},justOver:function(a,b){return a=a||0,b=b||500,this._pointerData[a].isOver&&this.overDuration(a)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height)):(this.sprite.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.offsetY)))},checkBoundsSprite:function(){this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera?(this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height)):(this.sprite.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.offsetX)),this.sprite.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.offsetY)))}},c.InputHandler.prototype.constructor=c.InputHandler,c.Gamepad=function(a){this.game=a,this._gamepadIndexMap={},this._rawPads=[],this._active=!1,this.enabled=!0,this._gamepadSupportAvailable=!!navigator.webkitGetGamepads||!!navigator.webkitGamepads||-1!==navigator.userAgent.indexOf("Firefox/")||!!navigator.getGamepads,this._prevRawGamepadTypes=[],this._prevTimestamps=[],this.callbackContext=this,this.onConnectCallback=null,this.onDisconnectCallback=null,this.onDownCallback=null,this.onUpCallback=null,this.onAxisCallback=null,this.onFloatCallback=null,this._ongamepadconnected=null,this._gamepaddisconnected=null,this._gamepads=[new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this),new c.SinglePad(a,this)]},c.Gamepad.prototype={addCallbacks:function(a,b){void 0!==b&&(this.onConnectCallback="function"==typeof b.onConnect?b.onConnect:this.onConnectCallback,this.onDisconnectCallback="function"==typeof b.onDisconnect?b.onDisconnect:this.onDisconnectCallback,this.onDownCallback="function"==typeof b.onDown?b.onDown:this.onDownCallback,this.onUpCallback="function"==typeof b.onUp?b.onUp:this.onUpCallback,this.onAxisCallback="function"==typeof b.onAxis?b.onAxis:this.onAxisCallback,this.onFloatCallback="function"==typeof b.onFloat?b.onFloat:this.onFloatCallback,this.callbackContext=a)},start:function(){if(!this._active){this._active=!0;var a=this;this._onGamepadConnected=function(b){return a.onGamepadConnected(b)},this._onGamepadDisconnected=function(b){return a.onGamepadDisconnected(b)},window.addEventListener("gamepadconnected",this._onGamepadConnected,!1),window.addEventListener("gamepaddisconnected",this._onGamepadDisconnected,!1)}},onGamepadConnected:function(a){var b=a.gamepad;this._rawPads.push(b),this._gamepads[b.index].connect(b)},onGamepadDisconnected:function(a){var b=a.gamepad;for(var c in this._rawPads)this._rawPads[c].index===b.index&&this._rawPads.splice(c,1);this._gamepads[b.index].disconnect()},update:function(){this._pollGamepads(),this.pad1.pollStatus(),this.pad2.pollStatus(),this.pad3.pollStatus(),this.pad4.pollStatus()},_pollGamepads:function(){if(this._active){if(navigator.getGamepads)var a=navigator.getGamepads();else if(navigator.webkitGetGamepads)var a=navigator.webkitGetGamepads();else if(navigator.webkitGamepads)var a=navigator.webkitGamepads();if(a){this._rawPads=[];for(var b=!1,c=0;c0&&d>this.deadZone||d<0&&d<-this.deadZone?this.processAxisChange(c,d):this.processAxisChange(c,0)}this._prevTimestamp=this._rawPad.timestamp}},connect:function(a){var b=!this.connected;this.connected=!0,this.index=a.index,this._rawPad=a,this._buttons=[],this._buttonsLen=a.buttons.length,this._axes=[],this._axesLen=a.axes.length;for(var d=0;dthis.maxHealth&&(this.health=this.maxHealth),this},heal:function(a){return this.alive&&(this.health+=a,this.health>this.maxHealth&&(this.health=this.maxHealth)),this}},c.Component.InCamera=function(){},c.Component.InCamera.prototype={inCamera:{get:function(){return this.game.world.camera.view.intersects(this._bounds)}}},c.Component.InputEnabled=function(){},c.Component.InputEnabled.prototype={input:null,inputEnabled:{get:function(){return this.input&&this.input.enabled},set:function(a){a?null===this.input?(this.input=new c.InputHandler(this),this.input.start()):this.input&&!this.input.enabled&&this.input.start():this.input&&this.input.enabled&&this.input.stop()}}},c.Component.InWorld=function(){},c.Component.InWorld.preUpdate=function(){if(this.autoCull||this.checkWorldBounds){if(this._bounds.copyFrom(this.getBounds()),this._bounds.x+=this.game.camera.view.x,this._bounds.y+=this.game.camera.view.y,this.autoCull)if(this.game.world.camera.view.intersects(this._bounds))this.renderable=!0,this.game.world.camera.totalInView++;else if(this.renderable=!1,this.outOfCameraBoundsKill)return this.kill(),!1;if(this.checkWorldBounds)if(this._outOfBoundsFired&&this.game.world.bounds.intersects(this._bounds))this._outOfBoundsFired=!1,this.events.onEnterBounds$dispatch(this);else if(!this._outOfBoundsFired&&!this.game.world.bounds.intersects(this._bounds)&&(this._outOfBoundsFired=!0,this.events.onOutOfBounds$dispatch(this),this.outOfBoundsKill))return this.kill(),!1}return!0},c.Component.InWorld.prototype={checkWorldBounds:!1,outOfBoundsKill:!1,outOfCameraBoundsKill:!1,_outOfBoundsFired:!1,inWorld:{get:function(){return this.game.world.bounds.intersects(this.getBounds())}}},c.Component.LifeSpan=function(){},c.Component.LifeSpan.preUpdate=function(){return!(this.lifespan>0&&(this.lifespan-=this.game.time.physicsElapsedMS,this.lifespan<=0))||(this.kill(),!1)},c.Component.LifeSpan.prototype={alive:!0,lifespan:0,revive:function(a){return void 0===a&&(a=100),this.alive=!0,this.exists=!0,this.visible=!0,"function"==typeof this.setHealth&&this.setHealth(a),this.events&&this.events.onRevived$dispatch(this),this},kill:function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.events&&this.events.onKilled$dispatch(this),this}},c.Component.LoadTexture=function(){},c.Component.LoadTexture.prototype={customRender:!1,_frame:null,loadTexture:function(a,b,d){a===c.PENDING_ATLAS?(a=b,b=0):b=b||0,(d||void 0===d)&&this.animations&&this.animations.stop(),this.key=a,this.customRender=!1;var e=this.game.cache,f=!0,g=!this.texture.baseTexture.scaleMode;if(c.RenderTexture&&a instanceof c.RenderTexture)this.key=a.key,this.setTexture(a);else if(c.BitmapData&&a instanceof c.BitmapData)this.customRender=!0,this.setTexture(a.texture),f=e.hasFrameData(a.key,c.Cache.BITMAPDATA)?!this.animations.loadFrameData(e.getFrameData(a.key,c.Cache.BITMAPDATA),b):!this.animations.loadFrameData(a.frameData,0);else if(c.Video&&a instanceof c.Video){this.customRender=!0;var h=a.texture.valid;this.setTexture(a.texture),this.setFrame(a.texture.frame.clone()),a.onChangeSource.add(this.resizeFrame,this),this.texture.valid=h}else if(c.Tilemap&&a instanceof c.TilemapLayer)this.setTexture(PIXI.Texture.fromCanvas(a.canvas));else if(a instanceof PIXI.Texture)this.setTexture(a);else{var i=e.getImage(a,!0);this.key=i.key,this.setTexture(new PIXI.Texture(i.base)),this.texture.baseTexture.skipRender="__default"===a,f=!this.animations.loadFrameData(i.frameData,b)}f&&(this._frame=c.Rectangle.clone(this.texture.frame)),g||(this.texture.baseTexture.scaleMode=1)},setFrame:function(a){this._frame=a,this.texture.frame.x=a.x,this.texture.frame.y=a.y,this.texture.frame.width=a.width,this.texture.frame.height=a.height,this.texture.crop.x=a.x,this.texture.crop.y=a.y,this.texture.crop.width=a.width,this.texture.crop.height=a.height,a.trimmed?(this.texture.trim?(this.texture.trim.x=a.spriteSourceSizeX,this.texture.trim.y=a.spriteSourceSizeY,this.texture.trim.width=a.sourceSizeW,this.texture.trim.height=a.sourceSizeH):this.texture.trim={x:a.spriteSourceSizeX,y:a.spriteSourceSizeY,width:a.sourceSizeW,height:a.sourceSizeH},this.texture.width=a.sourceSizeW,this.texture.height=a.sourceSizeH,this.texture.frame.width=a.sourceSizeW,this.texture.frame.height=a.sourceSizeH):!a.trimmed&&this.texture.trim&&(this.texture.trim=null),this.cropRect&&this.updateCrop(),this.texture.requiresReTint=!0,this.texture._updateUvs(),this.tilingTexture&&(this.refreshTexture=!0)},resizeFrame:function(a,b,c){this.texture.frame.resize(b,c),this.texture.setFrame(this.texture.frame)},resetFrame:function(){this._frame&&this.setFrame(this._frame)},frame:{get:function(){return this.animations.frame},set:function(a){this.animations.frame=a}},frameName:{get:function(){return this.animations.frameName},set:function(a){this.animations.frameName=a}}},c.Component.Overlap=function(){},c.Component.Overlap.prototype={overlap:function(a){return c.Rectangle.intersects(this.getBounds(),a.getBounds())}},c.Component.PhysicsBody=function(){},c.Component.PhysicsBody.preUpdate=function(){return this.fresh&&this.exists?(this.world.setTo(this.parent.position.x+this.position.x,this.parent.position.y+this.position.y),this.worldTransform.tx=this.world.x,this.worldTransform.ty=this.world.y,this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,this.body&&this.body.preUpdate(),this.fresh=!1,!1):(this.previousPosition.set(this.world.x,this.world.y),this.previousRotation=this.rotation,!(!this._exists||!this.parent.exists)||(this.renderOrderID=-1,!1))},c.Component.PhysicsBody.postUpdate=function(){this.exists&&this.body&&this.body.postUpdate()},c.Component.PhysicsBody.prototype={body:null,x:{get:function(){return this.position.x},set:function(a){this.position.x=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}},y:{get:function(){return this.position.y},set:function(a){this.position.y=a,this.body&&!this.body.dirty&&(this.body._reset=!0)}}},c.Component.Reset=function(){},c.Component.Reset.prototype.reset=function(a,b,c){return void 0===c&&(c=1),this.world.set(a,b),this.position.set(a,b),this.fresh=!0,this.exists=!0,this.visible=!0,this.renderable=!0,this.components.InWorld&&(this._outOfBoundsFired=!1),this.components.LifeSpan&&(this.alive=!0,this.health=c),this.components.PhysicsBody&&this.body&&this.body.reset(a,b,!1,!1),this},c.Component.ScaleMinMax=function(){},c.Component.ScaleMinMax.prototype={transformCallback:null,transformCallbackContext:this,scaleMin:null,scaleMax:null,checkTransform:function(a){this.scaleMin&&(a.athis.scaleMax.x&&(a.a=this.scaleMax.x),a.d>this.scaleMax.y&&(a.d=this.scaleMax.y))},setScaleMinMax:function(a,b,d,e){void 0===b?b=d=e=a:void 0===d&&(d=e=b,b=a),null===a?this.scaleMin=null:this.scaleMin?this.scaleMin.set(a,b):this.scaleMin=new c.Point(a,b),null===d?this.scaleMax=null:this.scaleMax?this.scaleMax.set(d,e):this.scaleMax=new c.Point(d,e),null===this.scaleMin?this.transformCallback=null:(this.transformCallback=this.checkTransform,this.transformCallbackContext=this)}},c.Component.Smoothed=function(){},c.Component.Smoothed.prototype={smoothed:{get:function(){return!this.texture.baseTexture.scaleMode},set:function(a){a?this.texture&&(this.texture.baseTexture.scaleMode=0):this.texture&&(this.texture.baseTexture.scaleMode=1)}}},c.GameObjectFactory=function(a){this.game=a,this.world=this.game.world},c.GameObjectFactory.prototype={existing:function(a){return this.world.add(a)},weapon:function(a,b,d,e){var f=this.game.plugins.add(c.Weapon);return f.createBullets(a,b,d,e),f},image:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Image(this.game,a,b,d,e))},sprite:function(a,b,c,d,e){return void 0===e&&(e=this.world),e.create(a,b,c,d)},creature:function(a,b,d,e,f){void 0===f&&(f=this.world);var g=new c.Creature(this.game,a,b,d,e);return f.add(g),g},tween:function(a){return this.game.tweens.create(a)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},physicsGroup:function(a,b,d,e){return new c.Group(this.game,b,d,e,!0,a)},spriteBatch:function(a,b,d){return void 0===a&&(a=null),void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)}, +tileSprite:function(a,b,d,e,f,g,h){return void 0===h&&(h=this.world),h.add(new c.TileSprite(this.game,a,b,d,e,f,g))},rope:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.Rope(this.game,a,b,d,e,f))},text:function(a,b,d,e,f){return void 0===f&&(f=this.world),f.add(new c.Text(this.game,a,b,d,e))},button:function(a,b,d,e,f,g,h,i,j,k){return void 0===k&&(k=this.world),k.add(new c.Button(this.game,a,b,d,e,f,g,h,i,j))},graphics:function(a,b,d){return void 0===d&&(d=this.world),d.add(new c.Graphics(this.game,a,b))},emitter:function(a,b,d){return this.game.particles.add(new c.Particles.Arcade.Emitter(this.game,a,b,d))},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return void 0===g&&(g=this.world),g.add(new c.BitmapText(this.game,a,b,d,e,f))},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},video:function(a,b){return new c.Video(this.game,a,b)},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a},plugin:function(a){return this.game.plugins.add(a)}},c.GameObjectFactory.prototype.constructor=c.GameObjectFactory,c.GameObjectCreator=function(a){this.game=a,this.world=this.game.world},c.GameObjectCreator.prototype={image:function(a,b,d,e){return new c.Image(this.game,a,b,d,e)},sprite:function(a,b,d,e){return new c.Sprite(this.game,a,b,d,e)},tween:function(a){return new c.Tween(a,this.game,this.game.tweens)},group:function(a,b,d,e,f){return new c.Group(this.game,a,b,d,e,f)},spriteBatch:function(a,b,d){return void 0===b&&(b="group"),void 0===d&&(d=!1),new c.SpriteBatch(this.game,a,b,d)},audio:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},audioSprite:function(a){return this.game.sound.addSprite(a)},sound:function(a,b,c,d){return this.game.sound.add(a,b,c,d)},tileSprite:function(a,b,d,e,f,g){return new c.TileSprite(this.game,a,b,d,e,f,g)},rope:function(a,b,d,e,f){return new c.Rope(this.game,a,b,d,e,f)},text:function(a,b,d,e){return new c.Text(this.game,a,b,d,e)},button:function(a,b,d,e,f,g,h,i,j){return new c.Button(this.game,a,b,d,e,f,g,h,i,j)},graphics:function(a,b){return new c.Graphics(this.game,a,b)},emitter:function(a,b,d){return new c.Particles.Arcade.Emitter(this.game,a,b,d)},retroFont:function(a,b,d,e,f,g,h,i,j){return new c.RetroFont(this.game,a,b,d,e,f,g,h,i,j)},bitmapText:function(a,b,d,e,f,g){return new c.BitmapText(this.game,a,b,d,e,f,g)},tilemap:function(a,b,d,e,f){return new c.Tilemap(this.game,a,b,d,e,f)},renderTexture:function(a,b,d,e){void 0!==d&&""!==d||(d=this.game.rnd.uuid()),void 0===e&&(e=!1);var f=new c.RenderTexture(this.game,a,b,d);return e&&this.game.cache.addRenderTexture(d,f),f},bitmapData:function(a,b,d,e){void 0===e&&(e=!1),void 0!==d&&""!==d||(d=this.game.rnd.uuid());var f=new c.BitmapData(this.game,d,a,b);return e&&this.game.cache.addBitmapData(d,f),f},filter:function(a){var b=Array.prototype.slice.call(arguments,1),a=new c.Filter[a](this.game);return a.init.apply(a,b),a}},c.GameObjectCreator.prototype.constructor=c.GameObjectCreator,c.Sprite=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.SPRITE,this.physicsType=c.SPRITE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Sprite.prototype=Object.create(PIXI.Sprite.prototype),c.Sprite.prototype.constructor=c.Sprite,c.Component.Core.install.call(c.Sprite.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","Health","InCamera","InputEnabled","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Sprite.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Sprite.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Sprite.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Sprite.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Sprite.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Image=function(a,b,d,e,f){b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.IMAGE,PIXI.Sprite.call(this,c.Cache.DEFAULT),c.Component.Core.init.call(this,a,b,d,e,f)},c.Image.prototype=Object.create(PIXI.Sprite.prototype),c.Image.prototype.constructor=c.Image,c.Component.Core.install.call(c.Image.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Destroy","FixedToCamera","InputEnabled","LifeSpan","LoadTexture","Overlap","Reset","ScaleMinMax","Smoothed"]),c.Image.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Image.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Image.prototype.preUpdate=function(){return!!this.preUpdateInWorld()&&this.preUpdateCore()},c.Button=function(a,b,d,e,f,g,h,i,j,k){b=b||0,d=d||0,e=e||null,f=f||null,g=g||this,c.Image.call(this,a,b,d,e,i),this.type=c.BUTTON,this.physicsType=c.SPRITE,this._onOverFrame=null,this._onOutFrame=null,this._onDownFrame=null,this._onUpFrame=null,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new c.Signal,this.onInputOut=new c.Signal,this.onInputDown=new c.Signal,this.onInputUp=new c.Signal,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=c.PointerMode.TOUCH,this.freezeFrames=!1,this.forceOut=!1,this.inputEnabled=!0,this.input.start(0,!0),this.input.useHandCursor=!0,this.setFrames(h,i,j,k),null!==f&&this.onInputUp.add(f,g),this.events.onInputOver.add(this.onInputOverHandler,this),this.events.onInputOut.add(this.onInputOutHandler,this),this.events.onInputDown.add(this.onInputDownHandler,this),this.events.onInputUp.add(this.onInputUpHandler,this),this.events.onRemovedFromWorld.add(this.removedFromWorld,this)},c.Button.prototype=Object.create(c.Image.prototype),c.Button.prototype.constructor=c.Button;c.Button.prototype.clearFrames=function(){this.setFrames(null,null,null,null)},c.Button.prototype.removedFromWorld=function(){this.inputEnabled=!1},c.Button.prototype.setStateFrame=function(a,b,c){var d="_on"+a+"Frame";null!==b?(this[d]=b,c&&this.changeStateFrame(a)):this[d]=null},c.Button.prototype.changeStateFrame=function(a){if(this.freezeFrames)return!1;var b="_on"+a+"Frame",c=this[b];return"string"==typeof c?(this.frameName=c,!0):"number"==typeof c&&(this.frame=c,!0)},c.Button.prototype.setFrames=function(a,b,c,d){this.setStateFrame("Over",a,this.input.pointerOver()),this.setStateFrame("Out",b,!this.input.pointerOver()),this.setStateFrame("Down",c,this.input.pointerDown()),this.setStateFrame("Up",d,this.input.pointerUp())},c.Button.prototype.setStateSound=function(a,b,d){var e="on"+a+"Sound",f="on"+a+"SoundMarker";b instanceof c.Sound||b instanceof c.AudioSprite?(this[e]=b,this[f]="string"==typeof d?d:""):(this[e]=null,this[f]="")},c.Button.prototype.playStateSound=function(a){var b="on"+a+"Sound",c=this[b];if(c){var d="on"+a+"SoundMarker",e=this[d];return c.play(e),!0}return!1},c.Button.prototype.setSounds=function(a,b,c,d,e,f,g,h){this.setStateSound("Over",a,b),this.setStateSound("Out",e,f),this.setStateSound("Down",c,d),this.setStateSound("Up",g,h)},c.Button.prototype.setOverSound=function(a,b){this.setStateSound("Over",a,b)},c.Button.prototype.setOutSound=function(a,b){this.setStateSound("Out",a,b)},c.Button.prototype.setDownSound=function(a,b){this.setStateSound("Down",a,b)},c.Button.prototype.setUpSound=function(a,b){this.setStateSound("Up",a,b)},c.Button.prototype.onInputOverHandler=function(a,b){b.justReleased()&&(this.justReleasedPreventsOver&b.pointerMode)===b.pointerMode||(this.changeStateFrame("Over"),this.onOverMouseOnly&&!b.isMouse||(this.playStateSound("Over"),this.onInputOver&&this.onInputOver.dispatch(this,b)))},c.Button.prototype.onInputOutHandler=function(a,b){this.changeStateFrame("Out"),this.playStateSound("Out"),this.onInputOut&&this.onInputOut.dispatch(this,b)},c.Button.prototype.onInputDownHandler=function(a,b){this.changeStateFrame("Down"),this.playStateSound("Down"),this.onInputDown&&this.onInputDown.dispatch(this,b)},c.Button.prototype.onInputUpHandler=function(a,b,c){if(this.playStateSound("Up"),this.onInputUp&&this.onInputUp.dispatch(this,b,c),!this.freezeFrames)if(!0===this.forceOut||(this.forceOut&b.pointerMode)===b.pointerMode)this.changeStateFrame("Out");else{var d=this.changeStateFrame("Up");d||(c?this.changeStateFrame("Over"):this.changeStateFrame("Out"))}},c.SpriteBatch=function(a,b,d,e){void 0!==b&&null!==b||(b=a.world),PIXI.SpriteBatch.call(this),c.Group.call(this,a,b,d,e),this.type=c.SPRITEBATCH},c.SpriteBatch.prototype=c.Utils.extend(!0,c.SpriteBatch.prototype,PIXI.SpriteBatch.prototype,c.Group.prototype),c.SpriteBatch.prototype.constructor=c.SpriteBatch,c.BitmapData=function(a,b,d,e,f){void 0!==d&&0!==d||(d=256),void 0!==e&&0!==e||(e=256),void 0===f&&(f=!1),this.game=a,this.key=b,this.width=d,this.height=e,this.canvas=c.Canvas.create(this,d,e,null,f),this.context=this.canvas.getContext("2d",{alpha:!0}),this.ctx=this.context,this.smoothProperty=a.renderType===c.CANVAS?a.renderer.renderSession.smoothProperty:c.Canvas.getSmoothingPrefix(this.context),this.imageData=this.context.getImageData(0,0,d,e),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data),this.baseTexture=new PIXI.BaseTexture(this.canvas),this.texture=new PIXI.Texture(this.baseTexture),this.frameData=new c.FrameData,this.textureFrame=this.frameData.addFrame(new c.Frame(0,0,0,d,e,"bitmapData")),this.texture.frame=this.textureFrame,this.type=c.BITMAPDATA,this.disableTextureUpload=!1,this.dirty=!1,this.cls=this.clear,this._image=null,this._pos=new c.Point,this._size=new c.Point,this._scale=new c.Point,this._rotate=0,this._alpha={prev:1,current:1},this._anchor=new c.Point,this._tempR=0,this._tempG=0,this._tempB=0,this._circle=new c.Circle,this._swapCanvas=void 0},c.BitmapData.prototype={move:function(a,b,c){return 0!==a&&this.moveH(a,c),0!==b&&this.moveV(b,c),this},moveH:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.height,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.width-a;b&&d.drawImage(f,0,0,a,e,g,0,a,e),d.drawImage(f,a,0,g,e,0,0,g,e)}else{var g=this.width-a;b&&d.drawImage(f,g,0,a,e,0,0,a,e),d.drawImage(f,0,0,g,e,a,0,g,e)}return this.clear(),this.copy(this._swapCanvas)},moveV:function(a,b){void 0===b&&(b=!0),void 0===this._swapCanvas&&(this._swapCanvas=PIXI.CanvasPool.create(this,this.width,this.height));var c=this._swapCanvas,d=c.getContext("2d"),e=this.width,f=this.canvas;if(d.clearRect(0,0,this.width,this.height),a<0){a=Math.abs(a);var g=this.height-a;b&&d.drawImage(f,0,0,e,a,0,g,e,a),d.drawImage(f,0,a,e,g,0,0,e,g)}else{var g=this.height-a;b&&d.drawImage(f,0,g,e,a,0,0,e,a),d.drawImage(f,0,0,e,g,0,a,e,g)}return this.clear(),this.copy(this._swapCanvas)},add:function(a){if(Array.isArray(a))for(var b=0;b=0&&a<=this.width&&b>=0&&b<=this.height&&(c.Device.LITTLE_ENDIAN?this.pixels[b*this.width+a]=g<<24|f<<16|e<<8|d:this.pixels[b*this.width+a]=d<<24|e<<16|f<<8|g,h&&(this.context.putImageData(this.imageData,0,0),this.dirty=!0)),this},setPixel:function(a,b,c,d,e,f){return this.setPixel32(a,b,c,d,e,255,f)},getPixel:function(a,b,d){d||(d=c.Color.createColor());var e=~~(a+b*this.width);return e*=4,d.r=this.data[e],d.g=this.data[++e],d.b=this.data[++e],d.a=this.data[++e],d},getPixel32:function(a,b){if(a>=0&&a<=this.width&&b>=0&&b<=this.height)return this.pixels[b*this.width+a]},getPixelRGB:function(a,b,d,e,f){return c.Color.unpackPixel(this.getPixel32(a,b),d,e,f)},getPixels:function(a){return this.context.getImageData(a.x,a.y,a.width,a.height)},getFirstPixel:function(a){void 0===a&&(a=0);var b=c.Color.createColor(),d=0,e=0,f=1,g=!1;1===a?(f=-1,e=this.height):3===a&&(f=-1,d=this.width);do{c.Color.unpackPixel(this.getPixel32(d,e),b),0===a||1===a?++d===this.width&&(d=0,((e+=f)>=this.height||e<=0)&&(g=!0)):2!==a&&3!==a||++e===this.height&&(e=0,((d+=f)>=this.width||d<=0)&&(g=!0))}while(0===b.a&&!g);return b.x=d,b.y=e,b},getBounds:function(a){return void 0===a&&(a=new c.Rectangle),a.x=this.getFirstPixel(2).x,a.x===this.width?a.setTo(0,0,0,0):(a.y=this.getFirstPixel(0).y,a.width=this.getFirstPixel(3).x-a.x+1,a.height=this.getFirstPixel(1).y-a.y+1,a)},addToWorld:function(a,b,c,d,e,f){e=e||1,f=f||1;var g=this.game.add.image(a,b,this);return g.anchor.set(c,d),g.scale.set(e,f),g},copy:function(a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){if(void 0!==a&&null!==a||(a=this),(a instanceof c.RenderTexture||a instanceof PIXI.RenderTexture)&&(a=a.getCanvas()),this._image=a,a instanceof c.Sprite||a instanceof c.Image||a instanceof c.Text||a instanceof PIXI.Sprite)this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),this._scale.set(a.scale.x,a.scale.y),this._anchor.set(a.anchor.x,a.anchor.y),this._rotate=a.rotation,this._alpha.current=a.alpha,a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source,void 0!==g&&null!==g||(g=a.x),void 0!==h&&null!==h||(h=a.y),a.texture.trim&&(g+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,h+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0));else{if(this._pos.set(0),this._scale.set(1),this._anchor.set(0),this._rotate=0,this._alpha.current=1,a instanceof c.BitmapData)this._image=a.canvas;else if("string"==typeof a){if(null===(a=this.game.cache.getImage(a)))return;this._image=a}this._size.set(this._image.width,this._image.height)}if(void 0!==b&&null!==b||(b=0),void 0!==d&&null!==d||(d=0),e&&(this._size.x=e),f&&(this._size.y=f),void 0!==g&&null!==g||(g=b),void 0!==h&&null!==h||(h=d),void 0!==i&&null!==i||(i=this._size.x),void 0!==j&&null!==j||(j=this._size.y),"number"==typeof k&&(this._rotate=k),"number"==typeof l&&(this._anchor.x=l),"number"==typeof m&&(this._anchor.y=m),"number"==typeof n&&(this._scale.x=n),"number"==typeof o&&(this._scale.y=o),"number"==typeof p&&(this._alpha.current=p),void 0===q&&(q=null),void 0===r&&(r=!1),!(this._alpha.current<=0||0===this._scale.x||0===this._scale.y||0===this._size.x||0===this._size.y)){var s=this.context;return this._alpha.prev=s.globalAlpha,s.save(),s.globalAlpha=this._alpha.current,q&&(this.op=q),r&&(g|=0,h|=0),s.translate(g,h),s.scale(this._scale.x,this._scale.y),s.rotate(this._rotate),s.drawImage(this._image,this._pos.x+b,this._pos.y+d,this._size.x,this._size.y,-i*this._anchor.x,-j*this._anchor.y,i,j),s.restore(),s.globalAlpha=this._alpha.prev,this.dirty=!0,this}},copyTransform:function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=!1),!a.hasOwnProperty("worldTransform")||!a.worldVisible||0===a.worldAlpha)return this;var e=a.worldTransform;if(this._pos.set(a.texture.crop.x,a.texture.crop.y),this._size.set(a.texture.crop.width,a.texture.crop.height),0===e.a||0===e.d||0===this._size.x||0===this._size.y)return this;a.texture instanceof c.RenderTexture||a.texture instanceof PIXI.RenderTexture?this._image=a.texture.getCanvas():this._image=a.texture.baseTexture.source;var f=e.tx,g=e.ty;a.texture.trim&&(f+=a.texture.trim.x-a.anchor.x*a.texture.trim.width,g+=a.texture.trim.y-a.anchor.y*a.texture.trim.height),16777215!==a.tint&&(a.cachedTint!==a.tint&&(a.cachedTint=a.tint,a.tintedTexture=PIXI.CanvasTinter.getTintedTexture(a,a.tint)),this._image=a.tintedTexture,this._pos.set(0)),d&&(f|=0,g|=0);var h=this.context;return this._alpha.prev=h.globalAlpha,h.save(),h.globalAlpha=this._alpha.current,b&&(this.op=b),h[this.smoothProperty]=a.texture.baseTexture.scaleMode===PIXI.scaleModes.LINEAR,h.setTransform(e.a,e.b,e.c,e.d,f,g),h.drawImage(this._image,this._pos.x,this._pos.y,this._size.x,this._size.y,-this._size.x*a.anchor.x,-this._size.y*a.anchor.y,this._size.x,this._size.y),h.restore(),h.globalAlpha=this._alpha.prev,this.dirty=!0,this},copyRect:function(a,b,c,d,e,f,g){return this.copy(a,b.x,b.y,b.width,b.height,c,d,b.width,b.height,0,0,0,1,1,e,f,g)},draw:function(a,b,c,d,e,f,g){return this.copy(a,null,null,null,null,b,c,d,e,null,null,null,null,null,null,f,g)},drawGroup:function(a,b,c){return a.total>0&&a.forEachExists(this.drawGroupProxy,this,b,c),this},drawGroupProxy:function(a,b,d){if(a.hasOwnProperty("texture")&&this.copyTransform(a,b,d),a.type===c.GROUP&&a.exists)this.drawGroup(a,b,d);else if(a.hasOwnProperty("children")&&a.children.length>0)for(var e=0;eb.width&&(e=b.width);var f=this.context;return f.fillStyle=f.createPattern(b,d),this._circle=new c.Circle(a.start.x,a.start.y,b.height),this._circle.circumferencePoint(a.angle-1.5707963267948966,!1,this._pos),f.save(),f.translate(this._pos.x,this._pos.y),f.rotate(a.angle),f.fillRect(0,0,e,b.height),f.restore(),this.dirty=!0,this}},render:function(){return!this.disableTextureUpload&&this.dirty&&(this.baseTexture.dirty(),this.dirty=!1),this},destroy:function(){this.frameData.destroy(),this.texture.destroy(!0),PIXI.CanvasPool.remove(this)},blendReset:function(){return this.op="source-over",this},blendSourceOver:function(){return this.op="source-over",this},blendSourceIn:function(){return this.op="source-in",this},blendSourceOut:function(){return this.op="source-out",this},blendSourceAtop:function(){return this.op="source-atop",this},blendDestinationOver:function(){return this.op="destination-over",this},blendDestinationIn:function(){return this.op="destination-in",this},blendDestinationOut:function(){return this.op="destination-out",this},blendDestinationAtop:function(){return this.op="destination-atop",this},blendXor:function(){return this.op="xor",this},blendAdd:function(){return this.op="lighter",this},blendMultiply:function(){return this.op="multiply",this},blendScreen:function(){return this.op="screen",this},blendOverlay:function(){return this.op="overlay",this},blendDarken:function(){return this.op="darken",this},blendLighten:function(){return this.op="lighten",this},blendColorDodge:function(){return this.op="color-dodge",this},blendColorBurn:function(){return this.op="color-burn",this},blendHardLight:function(){return this.op="hard-light",this},blendSoftLight:function(){return this.op="soft-light",this},blendDifference:function(){return this.op="difference",this},blendExclusion:function(){return this.op="exclusion",this},blendHue:function(){return this.op="hue",this},blendSaturation:function(){return this.op="saturation",this},blendColor:function(){return this.op="color",this},blendLuminosity:function(){return this.op="luminosity",this}},Object.defineProperty(c.BitmapData.prototype,"smoothed",{get:function(){c.Canvas.getSmoothingEnabled(this.context)},set:function(a){c.Canvas.setSmoothingEnabled(this.context,a)}}),Object.defineProperty(c.BitmapData.prototype,"op",{get:function(){return this.context.globalCompositeOperation},set:function(a){this.context.globalCompositeOperation=a}}),c.BitmapData.getTransform=function(a,b,c,d,e,f){return"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),"number"!=typeof c&&(c=1),"number"!=typeof d&&(d=1),"number"!=typeof e&&(e=0),"number"!=typeof f&&(f=0),{sx:c,sy:d,scaleX:c,scaleY:d,skewX:e,skewY:f,translateX:a,translateY:b,tx:a,ty:b}},c.BitmapData.prototype.constructor=c.BitmapData,PIXI.Graphics=function(){PIXI.DisplayObjectContainer.call(this),this.renderable=!0,this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this.blendMode=PIXI.blendModes.NORMAL,this.currentPath=null,this._webGL=[],this.isMask=!1,this.boundsPadding=0,this._localBounds=new PIXI.Rectangle(0,0,1,1),this.dirty=!0,this._boundsDirty=!1,this.webGLDirty=!1,this.cachedSpriteDirty=!1},PIXI.Graphics.prototype=Object.create(PIXI.DisplayObjectContainer.prototype),PIXI.Graphics.prototype.constructor=PIXI.Graphics,PIXI.Graphics.prototype.lineStyle=function(a,b,c){return this.lineWidth=a||0,this.lineColor=b||0,this.lineAlpha=void 0===c?1:c,this.currentPath&&(this.currentPath.shape.points.length?this.drawShape(new PIXI.Polygon(this.currentPath.shape.points.slice(-2))):(this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha)),this},PIXI.Graphics.prototype.moveTo=function(a,b){return this.drawShape(new PIXI.Polygon([a,b])),this},PIXI.Graphics.prototype.lineTo=function(a,b){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.points.push(a,b),this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.quadraticCurveTo=function(a,b,c,d){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var e,f,g=this.currentPath.shape.points;0===g.length&&this.moveTo(0,0);for(var h=g[g.length-2],i=g[g.length-1],j=0,k=1;k<=20;++k)j=k/20,e=h+(a-h)*j,f=i+(b-i)*j,g.push(e+(a+(c-a)*j-e)*j,f+(b+(d-b)*j-f)*j);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);for(var g,h,i,j,k,l=this.currentPath.shape.points,m=l[l.length-2],n=l[l.length-1],o=0,p=1;p<=20;++p)o=p/20,g=1-o,h=g*g,i=h*g,j=o*o,k=j*o,l.push(i*m+3*h*o*a+3*g*j*c+k*e,i*n+3*h*o*b+3*g*j*d+k*f);return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arcTo=function(a,b,c,d,e){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(a,b):this.moveTo(a,b);var f=this.currentPath.shape.points,g=f[f.length-2],h=f[f.length-1],i=h-b,j=g-a,k=d-b,l=c-a,m=Math.abs(i*l-j*k);if(m<1e-8||0===e)f[f.length-2]===a&&f[f.length-1]===b||f.push(a,b);else{var n=i*i+j*j,o=k*k+l*l,p=i*k+j*l,q=e*Math.sqrt(n)/m,r=e*Math.sqrt(o)/m,s=q*p/n,t=r*p/o,u=q*l+r*j,v=q*k+r*i,w=j*(r+s),x=i*(r+s),y=l*(q+t),z=k*(q+t),A=Math.atan2(x-v,w-u),B=Math.atan2(z-v,y-u);this.arc(u+a,v+b,e,A,B,j*k>l*i)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.arc=function(a,b,c,d,e,f,g){if(d===e)return this;void 0===f&&(f=!1),void 0===g&&(g=40),!f&&e<=d?e+=2*Math.PI:f&&d<=e&&(d+=2*Math.PI);var h=f?-1*(d-e):e-d,i=Math.ceil(Math.abs(h)/(2*Math.PI))*g;if(0===h)return this;var j=a+Math.cos(d)*c,k=b+Math.sin(d)*c;f&&this.filling?this.moveTo(a,b):this.moveTo(j,k);for(var l=this.currentPath.shape.points,m=h/(2*i),n=2*m,o=Math.cos(m),p=Math.sin(m),q=i-1,r=q%1/q,s=0;s<=q;s++){var t=s+r*s,u=m+d+n*t,v=Math.cos(u),w=-Math.sin(u);l.push((o*v+p*w)*c+a,(o*-w+p*v)*c+b)}return this.dirty=!0,this._boundsDirty=!0,this},PIXI.Graphics.prototype.beginFill=function(a,b){return this.filling=!0,this.fillColor=a||0,this.fillAlpha=void 0===b?1:b,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},PIXI.Graphics.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},PIXI.Graphics.prototype.drawRect=function(a,b,c,d){return this.drawShape(new PIXI.Rectangle(a,b,c,d)),this},PIXI.Graphics.prototype.drawRoundedRect=function(a,b,c,d,e){return this.drawShape(new PIXI.RoundedRectangle(a,b,c,d,e)),this},PIXI.Graphics.prototype.drawCircle=function(a,b,c){return this.drawShape(new PIXI.Circle(a,b,c)),this},PIXI.Graphics.prototype.drawEllipse=function(a,b,c,d){return this.drawShape(new PIXI.Ellipse(a,b,c,d)),this},PIXI.Graphics.prototype.drawPolygon=function(a){(a instanceof c.Polygon||a instanceof PIXI.Polygon)&&(a=a.points);var b=a;if(!Array.isArray(b)){b=new Array(arguments.length);for(var d=0;dv?p:v,v=r>v?r:v,v=t>v?t:v,w=q>w?q:w,w=s>w?s:w,w=u>w?u:w,this._bounds.x=x,this._bounds.width=v-x,this._bounds.y=y,this._bounds.height=w-y,this._currentBounds=this._bounds}return this._currentBounds},PIXI.Graphics.prototype.getLocalBounds=function(){var a=this.worldTransform;this.worldTransform=PIXI.identityMatrix;for(var b=0;bb?h+j:b,d=ie?i+k:e;else if(n===PIXI.Graphics.CIRC)h=f.x,i=f.y,j=f.radius+o/2,k=f.radius+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else if(n===PIXI.Graphics.ELIP)h=f.x,i=f.y,j=f.width+o/2,k=f.height+o/2,a=h-jb?h+j:b,d=i-ke?i+k:e;else{g=f.points;for(var p=0;pb?h+o:b,d=i-oe?i+o:e}}else a=0,b=0,d=0,e=0;var q=this.boundsPadding;this._localBounds.x=a-q,this._localBounds.width=b-a+2*q,this._localBounds.y=d-q,this._localBounds.height=e-d+2*q},PIXI.Graphics.prototype._generateCachedSprite=function(){var a=this.getLocalBounds();if(this._cachedSprite)this._cachedSprite.buffer.resize(a.width,a.height);else{var b=new PIXI.CanvasBuffer(a.width,a.height),c=PIXI.Texture.fromCanvas(b.canvas);this._cachedSprite=new PIXI.Sprite(c),this._cachedSprite.buffer=b,this._cachedSprite.worldTransform=this.worldTransform}this._cachedSprite.anchor.x=-a.x/a.width,this._cachedSprite.anchor.y=-a.y/a.height,this._cachedSprite.buffer.context.translate(-a.x,-a.y),this.worldAlpha=1,PIXI.CanvasGraphics.renderGraphics(this,this._cachedSprite.buffer.context),this._cachedSprite.alpha=this.alpha},PIXI.Graphics.prototype.updateCachedSpriteTexture=function(){var a=this._cachedSprite,b=a.texture,c=a.buffer.canvas;b.baseTexture.width=c.width,b.baseTexture.height=c.height,b.crop.width=b.frame.width=c.width,b.crop.height=b.frame.height=c.height,a._width=c.width,a._height=c.height,b.baseTexture.dirty()},PIXI.Graphics.prototype.destroyCachedSprite=function(){this._cachedSprite.texture.destroy(!0),this._cachedSprite=null},PIXI.Graphics.prototype.drawShape=function(a){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null,a instanceof c.Polygon&&(a=a.clone(),a.flatten());var b=new PIXI.GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,a);return this.graphicsData.push(b),b.type===PIXI.Graphics.POLY&&(b.shape.closed=this.filling,this.currentPath=b),this.dirty=!0,this._boundsDirty=!0,b},Object.defineProperty(PIXI.Graphics.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(a){this._cacheAsBitmap=a,this._cacheAsBitmap?this._generateCachedSprite():this.destroyCachedSprite(),this.dirty=!0,this.webGLDirty=!0}}),PIXI.GraphicsData=function(a,b,c,d,e,f,g){this.lineWidth=a,this.lineColor=b,this.lineAlpha=c,this._lineTint=b,this.fillColor=d,this.fillAlpha=e,this._fillTint=d,this.fill=f,this.shape=g,this.type=g.type},PIXI.GraphicsData.prototype.constructor=PIXI.GraphicsData,PIXI.GraphicsData.prototype.clone=function(){return new GraphicsData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},PIXI.EarCut={},PIXI.EarCut.Triangulate=function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=PIXI.EarCut.linkedList(a,0,e,c,!0),g=[];if(!f)return g;var h,i,j,k,l,m,n;if(d&&(f=PIXI.EarCut.eliminateHoles(a,b,f,c)),a.length>80*c){h=j=a[0],i=k=a[1];for(var o=c;oj&&(j=l),m>k&&(k=m);n=Math.max(j-h,k-i)}return PIXI.EarCut.earcutLinked(f,g,c,h,i,n),g},PIXI.EarCut.linkedList=function(a,b,c,d,e){var f,g,h,i=0;for(f=b,g=c-d;f0)for(f=b;f=b;f-=d)h=PIXI.EarCut.insertNode(f,a[f],a[f+1],h);return h},PIXI.EarCut.filterPoints=function(a,b){if(!a)return a;b||(b=a);var c,d=a;do{if(c=!1,d.steiner||!PIXI.EarCut.equals(d,d.next)&&0!==PIXI.EarCut.area(d.prev,d,d.next))d=d.next;else{if(PIXI.EarCut.removeNode(d),(d=b=d.prev)===d.next)return null;c=!0}}while(c||d!==b);return b},PIXI.EarCut.earcutLinked=function(a,b,c,d,e,f,g){if(a){!g&&f&&PIXI.EarCut.indexCurve(a,d,e,f);for(var h,i,j=a;a.prev!==a.next;)if(h=a.prev,i=a.next,f?PIXI.EarCut.isEarHashed(a,d,e,f):PIXI.EarCut.isEar(a))b.push(h.i/c),b.push(a.i/c),b.push(i.i/c),PIXI.EarCut.removeNode(a),a=i.next,j=i.next;else if((a=i)===j){g?1===g?(a=PIXI.EarCut.cureLocalIntersections(a,b,c),PIXI.EarCut.earcutLinked(a,b,c,d,e,f,2)):2===g&&PIXI.EarCut.splitEarcut(a,b,c,d,e,f):PIXI.EarCut.earcutLinked(PIXI.EarCut.filterPoints(a),b,c,d,e,f,1);break}}},PIXI.EarCut.isEar=function(a){var b=a.prev,c=a,d=a.next;if(PIXI.EarCut.area(b,c,d)>=0)return!1;for(var e=a.next.next;e!==a.prev;){if(PIXI.EarCut.pointInTriangle(b.x,b.y,c.x,c.y,d.x,d.y,e.x,e.y)&&PIXI.EarCut.area(e.prev,e,e.next)>=0)return!1;e=e.next}return!0},PIXI.EarCut.isEarHashed=function(a,b,c,d){var e=a.prev,f=a,g=a.next;if(PIXI.EarCut.area(e,f,g)>=0)return!1;for(var h=e.xf.x?e.x>g.x?e.x:g.x:f.x>g.x?f.x:g.x,k=e.y>f.y?e.y>g.y?e.y:g.y:f.y>g.y?f.y:g.y,l=PIXI.EarCut.zOrder(h,i,b,c,d),m=PIXI.EarCut.zOrder(j,k,b,c,d),n=a.nextZ;n&&n.z<=m;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.nextZ}for(n=a.prevZ;n&&n.z>=l;){if(n!==a.prev&&n!==a.next&&PIXI.EarCut.pointInTriangle(e.x,e.y,f.x,f.y,g.x,g.y,n.x,n.y)&&PIXI.EarCut.area(n.prev,n,n.next)>=0)return!1;n=n.prevZ}return!0},PIXI.EarCut.cureLocalIntersections=function(a,b,c){var d=a;do{var e=d.prev,f=d.next.next;PIXI.EarCut.intersects(e,d,d.next,f)&&PIXI.EarCut.locallyInside(e,f)&&PIXI.EarCut.locallyInside(f,e)&&(b.push(e.i/c),b.push(d.i/c),b.push(f.i/c),PIXI.EarCut.removeNode(d),PIXI.EarCut.removeNode(d.next),d=a=f),d=d.next}while(d!==a);return d},PIXI.EarCut.splitEarcut=function(a,b,c,d,e,f){var g=a;do{for(var h=g.next.next;h!==g.prev;){if(g.i!==h.i&&PIXI.EarCut.isValidDiagonal(g,h)){var i=PIXI.EarCut.splitPolygon(g,h);return g=PIXI.EarCut.filterPoints(g,g.next),i=PIXI.EarCut.filterPoints(i,i.next),PIXI.EarCut.earcutLinked(g,b,c,d,e,f),void PIXI.EarCut.earcutLinked(i,b,c,d,e,f)}h=h.next}g=g.next}while(g!==a)},PIXI.EarCut.eliminateHoles=function(a,b,c,d){var e,f,g,h,i,j=[];for(e=0,f=b.length;e=d.next.y){var h=d.x+(f-d.y)*(d.next.x-d.x)/(d.next.y-d.y);h<=e&&h>g&&(g=h,c=d.x=d.x&&d.x>=c.x&&PIXI.EarCut.pointInTriangle(fc.x)&&PIXI.EarCut.locallyInside(d,a)&&(c=d,k=i),d=d.next;return c},PIXI.EarCut.indexCurve=function(a,b,c,d){var e=a;do{null===e.z&&(e.z=PIXI.EarCut.zOrder(e.x,e.y,b,c,d)),e.prevZ=e.prev,e.nextZ=e.next,e=e.next}while(e!==a);e.prevZ.nextZ=null,e.prevZ=null,PIXI.EarCut.sortLinked(e)},PIXI.EarCut.sortLinked=function(a){var b,c,d,e,f,g,h,i,j=1;do{for(c=a,a=null,f=null,g=0;c;){for(g++,d=c,h=0,b=0;b0||i>0&&d;)0===h?(e=d,d=d.nextZ,i--):0!==i&&d?c.z<=d.z?(e=c,c=c.nextZ,h--):(e=d,d=d.nextZ,i--):(e=c,c=c.nextZ,h--),f?f.nextZ=e:a=e,e.prevZ=f,f=e;c=d}f.nextZ=null,j*=2}while(g>1);return a},PIXI.EarCut.zOrder=function(a,b,c,d,e){return a=32767*(a-c)/e,b=32767*(b-d)/e,a=16711935&(a|a<<8),a=252645135&(a|a<<4),a=858993459&(a|a<<2),a=1431655765&(a|a<<1),b=16711935&(b|b<<8),b=252645135&(b|b<<4),b=858993459&(b|b<<2),b=1431655765&(b|b<<1),a|b<<1},PIXI.EarCut.getLeftmost=function(a){var b=a,c=a;do{b.x=0&&(a-g)*(d-h)-(c-g)*(b-h)>=0&&(c-g)*(f-h)-(e-g)*(d-h)>=0},PIXI.EarCut.isValidDiagonal=function(a,b){return PIXI.EarCut.equals(a,b)||a.next.i!==b.i&&a.prev.i!==b.i&&!PIXI.EarCut.intersectsPolygon(a,b)&&PIXI.EarCut.locallyInside(a,b)&&PIXI.EarCut.locallyInside(b,a)&&PIXI.EarCut.middleInside(a,b)},PIXI.EarCut.area=function(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)},PIXI.EarCut.equals=function(a,b){return a.x===b.x&&a.y===b.y},PIXI.EarCut.intersects=function(a,b,c,d){return PIXI.EarCut.area(a,b,c)>0!=PIXI.EarCut.area(a,b,d)>0&&PIXI.EarCut.area(c,d,a)>0!=PIXI.EarCut.area(c,d,b)>0},PIXI.EarCut.intersectsPolygon=function(a,b){var c=a;do{if(c.i!==a.i&&c.next.i!==a.i&&c.i!==b.i&&c.next.i!==b.i&&PIXI.EarCut.intersects(c,c.next,a,b))return!0;c=c.next}while(c!==a);return!1},PIXI.EarCut.locallyInside=function(a,b){return PIXI.EarCut.area(a.prev,a,a.next)<0?PIXI.EarCut.area(a,b,a.next)>=0&&PIXI.EarCut.area(a,a.prev,b)>=0:PIXI.EarCut.area(a,b,a.prev)<0||PIXI.EarCut.area(a,a.next,b)<0},PIXI.EarCut.middleInside=function(a,b){var c=a,d=!1,e=(a.x+b.x)/2,f=(a.y+b.y)/2;do{c.y>f!=c.next.y>f&&e<(c.next.x-c.x)*(f-c.y)/(c.next.y-c.y)+c.x&&(d=!d),c=c.next}while(c!==a);return d},PIXI.EarCut.splitPolygon=function(a,b){var c=new PIXI.EarCut.Node(a.i,a.x,a.y),d=new PIXI.EarCut.Node(b.i,b.x,b.y),e=a.next,f=b.prev;return a.next=b,b.prev=a,c.next=e,e.prev=c,d.next=c,c.prev=d,f.next=d,d.prev=f,d},PIXI.EarCut.insertNode=function(a,b,c,d){var e=new PIXI.EarCut.Node(a,b,c);return d?(e.next=d.next,e.prev=d,d.next.prev=e,d.next=e):(e.prev=e,e.next=e),e},PIXI.EarCut.removeNode=function(a){a.next.prev=a.prev,a.prev.next=a.next,a.prevZ&&(a.prevZ.nextZ=a.nextZ),a.nextZ&&(a.nextZ.prevZ=a.prevZ)},PIXI.EarCut.Node=function(a,b,c){this.i=a,this.x=b,this.y=c,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1},PIXI.WebGLGraphics=function(){},PIXI.WebGLGraphics.stencilBufferLimit=6,PIXI.WebGLGraphics.renderGraphics=function(a,b){var c,d=b.gl,e=b.projection,f=b.offset,g=b.shaderManager.primitiveShader;a.dirty&&PIXI.WebGLGraphics.updateGraphics(a,d);for(var h=a._webGL[d.id],i=0;i=PIXI.WebGLGraphics.stencilBufferLimit)if(g.points.length<2*PIXI.WebGLGraphics.stencilBufferLimit){f=PIXI.WebGLGraphics.switchMode(c,0);var h=PIXI.WebGLGraphics.buildPoly(g,f);h||(f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,1),PIXI.WebGLGraphics.buildComplexPoly(g,f);g.lineWidth>0&&(f=PIXI.WebGLGraphics.switchMode(c,0),PIXI.WebGLGraphics.buildLine(g,f))}else f=PIXI.WebGLGraphics.switchMode(c,0),g.type===PIXI.Graphics.RECT?PIXI.WebGLGraphics.buildRectangle(g,f):g.type===PIXI.Graphics.CIRC||g.type===PIXI.Graphics.ELIP?PIXI.WebGLGraphics.buildCircle(g,f):g.type===PIXI.Graphics.RREC&&PIXI.WebGLGraphics.buildRoundedRectangle(g,f);c.lastIndex++}for(d=0;d19600?(u=q-s,v=r-t,E=Math.sqrt(u*u+v*v),u/=E,v/=E,u*=K,v*=K,F.push(m-u,n-v),F.push(N,O,P,M),F.push(m+u,n+v),F.push(N,O,P,M),F.push(m-u,n-v),F.push(N,O,P,M),I++):(F.push(i,j),F.push(N,O,P,M),F.push(m-(i-m),n-(j-n)),F.push(N,O,P,M)));for(k=d[2*(H-2)],l=d[2*(H-2)+1],m=d[2*(H-1)],n=d[2*(H-1)+1],q=-(l-n),r=k-m,E=Math.sqrt(q*q+r*r),q/=E,r/=E,q*=K,r*=K,F.push(m-q,n-r),F.push(N,O,P,M),F.push(m+q,n+r),F.push(N,O,P,M),G.push(J),c=0;ch?e:h,i=fj?f:j;c.push(g,i,h,i,h,j,g,j);var l=c.length/2;for(k=0;kz?z:y,b.beginPath(),b.moveTo(u,v+y),b.lineTo(u,v+x-y),b.quadraticCurveTo(u,v+x,u+y,v+x),b.lineTo(u+w-y,v+x),b.quadraticCurveTo(u+w,v+x,u+w,v+x-y),b.lineTo(u+w,v+y),b.quadraticCurveTo(u+w,v,u+w-y,v),b.lineTo(u+y,v),b.quadraticCurveTo(u,v,u,v+y),b.closePath(),(e.fillColor||0===e.fillColor)&&(b.globalAlpha=e.fillAlpha*c,b.fillStyle="#"+("00000"+(0|g).toString(16)).substr(-6),b.fill()),e.lineWidth&&(b.globalAlpha=e.lineAlpha*c,b.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),b.stroke())}}},PIXI.CanvasGraphics.renderGraphicsMask=function(a,b){var c=a.graphicsData.length;if(0!==c){b.beginPath();for(var d=0;dx?x:w,b.moveTo(s,t+w),b.lineTo(s,t+v-w),b.quadraticCurveTo(s,t+v,s+w,t+v),b.lineTo(s+u-w,t+v),b.quadraticCurveTo(s+u,t+v,s+u,t+v-w),b.lineTo(s+u,t+w),b.quadraticCurveTo(s+u,t,s+u-w,t),b.lineTo(s+w,t),b.quadraticCurveTo(s,t,s,t+w),b.closePath()}}}},PIXI.CanvasGraphics.updateGraphicsTint=function(a){if(16777215!==a.tint)for(var b=(a.tint>>16&255)/255,c=(a.tint>>8&255)/255,d=(255&a.tint)/255,e=0;e>16&255)/255*b*255<<16)+((g>>8&255)/255*c*255<<8)+(255&g)/255*d*255,f._lineTint=((h>>16&255)/255*b*255<<16)+((h>>8&255)/255*c*255<<8)+(255&h)/255*d*255}},c.Graphics=function(a,b,d){void 0===b&&(b=0),void 0===d&&(d=0),this.type=c.GRAPHICS,this.physicsType=c.SPRITE,this.anchor=new c.Point,PIXI.Graphics.call(this),c.Component.Core.init.call(this,a,b,d,"",null)},c.Graphics.prototype=Object.create(PIXI.Graphics.prototype),c.Graphics.prototype.constructor=c.Graphics,c.Component.Core.install.call(c.Graphics.prototype,["Angle","AutoCull","Bounds","Destroy","FixedToCamera","InputEnabled","InWorld","LifeSpan","PhysicsBody","Reset"]),c.Graphics.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Graphics.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Graphics.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Graphics.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Graphics.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Graphics.prototype.postUpdate=function(){c.Component.PhysicsBody.postUpdate.call(this),c.Component.FixedToCamera.postUpdate.call(this),this._boundsDirty&&(this.updateLocalBounds(),this._boundsDirty=!1);for(var a=0;a0&&this.drawPolygon(d)}else this.drawPolygon(d)},c.Graphics.prototype.drawTriangles=function(a,b,d){void 0===d&&(d=!1);var e,f=new c.Point,g=new c.Point,h=new c.Point,i=[];if(b)if(a[0]instanceof c.Point)for(e=0;e0&&this.style.maxLines0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(b[h]):i+=this.context.measureText(b[h]).width,this.style.wordWrap&&(i-=this.context.measureText(" ").width)}else{var j=b[h].split(/(?:\t)/),i=this.padding.x+this.style.strokeThickness;if(Array.isArray(c))for(var k=0,l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.measureLine(j[l]):Math.ceil(this.context.measureText(j[l]).width),l>0&&(k+=c[l-1]),i=k+m}else for(var l=0;l0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?i+=this.measureLine(j[l]):i+=Math.ceil(this.context.measureText(j[l]).width);var n=this.game.math.snapToCeil(i,c)-i;i+=n}}d[h]=Math.ceil(i),e=Math.max(e,d[h])}this.canvas.width=e*this._res;var o=f.fontSize+this.style.strokeThickness+this.padding.y,p=o*g,q=this._lineSpacing;q<0&&Math.abs(q)>o&&(q=-o),0!==q&&(p+=q>0?q*b.length:q*(b.length-1)),this.canvas.height=p*this._res,this.context.scale(this._res,this._res),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.style.backgroundColor&&(this.context.fillStyle=this.style.backgroundColor,this.context.fillRect(0,0,this.canvas.width,this.canvas.height)),this.context.fillStyle=this.style.fill,this.context.font=this.style.font,this.context.strokeStyle=this.style.stroke,this.context.textBaseline="alphabetic",this.context.lineWidth=this.style.strokeThickness,this.context.lineCap="round",this.context.lineJoin="round";var r,s;for(this._charCount=0,h=0;h0&&(s+=q*h),"right"===this.style.align?r+=e-d[h]:"center"===this.style.align&&(r+=(e-d[h])/2),this.autoRound&&(r=Math.round(r),s=Math.round(s)),this.colors.length>0||this.strokeColors.length>0||this.fontWeights.length>0||this.fontStyles.length>0?this.updateLine(b[h],r,s):(this.style.stroke&&this.style.strokeThickness&&(this.updateShadow(this.style.shadowStroke),0===c?this.context.strokeText(b[h],r,s):this.renderTabLine(b[h],r,s,!1)),this.style.fill&&(this.updateShadow(this.style.shadowFill),0===c?this.context.fillText(b[h],r,s):this.renderTabLine(b[h],r,s,!0)));this.updateTexture(),this.dirty=!1},c.Text.prototype.renderTabLine=function(a,b,c,d){var e=a.split(/(?:\t)/),f=this.style.tabs,g=0;if(Array.isArray(f))for(var h=0,i=0;i0&&(h+=f[i-1]),g=b+h,d?this.context.fillText(e[i],g,c):this.context.strokeText(e[i],g,c);else for(var i=0;i0||this.fontStyles.length>0){var e=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(e.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(e.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(e)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill)),b+=this.context.measureText(d).width,this._charCount++}return Math.ceil(b)},c.Text.prototype.updateLine=function(a,b,c){for(var d=0;d0||this.fontStyles.length>0){var f=this.fontToComponents(this.context.font);this.fontStyles[this._charCount]&&(f.fontStyle=this.fontStyles[this._charCount]),this.fontWeights[this._charCount]&&(f.fontWeight=this.fontWeights[this._charCount]),this.context.font=this.componentsToFont(f)}this.style.stroke&&this.style.strokeThickness&&(this.strokeColors[this._charCount]&&(this.context.strokeStyle=this.strokeColors[this._charCount]),this.updateShadow(this.style.shadowStroke),this.context.strokeText(e,b,c)),this.style.fill&&(this.colors[this._charCount]&&(this.context.fillStyle=this.colors[this._charCount]),this.updateShadow(this.style.shadowFill),this.context.fillText(e,b,c)),b+=this.context.measureText(e).width,this._charCount++}},c.Text.prototype.clearColors=function(){return this.colors=[],this.strokeColors=[],this.dirty=!0,this},c.Text.prototype.clearFontValues=function(){return this.fontStyles=[],this.fontWeights=[],this.dirty=!0,this},c.Text.prototype.addColor=function(a,b){return this.colors[b]=a,this.dirty=!0,this},c.Text.prototype.addStrokeColor=function(a,b){return this.strokeColors[b]=a,this.dirty=!0,this},c.Text.prototype.addFontStyle=function(a,b){return this.fontStyles[b]=a,this.dirty=!0,this},c.Text.prototype.addFontWeight=function(a,b){return this.fontWeights[b]=a,this.dirty=!0,this},c.Text.prototype.precalculateWordWrap=function(a){return this.texture.baseTexture.resolution=this._res,this.context.font=this.style.font,this.runWordWrap(a).split(/(?:\r\n|\r|\n)/)},c.Text.prototype.runWordWrap=function(a){return this.useAdvancedWrap?this.advancedWordWrap(a):this.basicWordWrap(a)},c.Text.prototype.advancedWordWrap=function(a){for(var b=this.context,c=this.style.wordWrapWidth,d="",e=a.replace(/ +/gi," ").split(/\r?\n/gi),f=e.length,g=0;gj){if(0===l){for(var p=n;p.length&&(p=p.slice(0,-1),!((o=b.measureText(p).width)<=j)););if(!p.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var q=m.substr(p.length);k[l]=q,i+=p}var r=k[l].length?l:l+1,s=k.slice(r).join(" ").replace(/[ \n]*$/gi,"");e[g+1]=s+" "+(e[g+1]||""),f=e.length;break}i+=n,j-=o}d+=i.replace(/[ \n]*$/gi,"")+"\n"}}return d=d.replace(/[\s|\n]*$/gi,"")},c.Text.prototype.basicWordWrap=function(a){for(var b="",c=a.split("\n"),d=0;de?(g>0&&(b+="\n"),b+=f[g]+" ",e=this.style.wordWrapWidth-h):(e-=i,b+=f[g]+" ")}dd&&(this.style.wordWrapWidth=d)),this.updateTexture(),this},c.Text.prototype.updateTexture=function(){var a=this.texture.baseTexture,b=this.texture.crop,c=this.texture.frame,d=this.canvas.width,e=this.canvas.height;if(a.width=d,a.height=e,b.width=d,b.height=e,c.width=d,c.height=e,this.texture.width=d,this.texture.height=e,this._width=d,this._height=e,this.textBounds){var f=this.textBounds.x,g=this.textBounds.y;"right"===this.style.boundsAlignH?f+=this.textBounds.width-this.canvas.width/this.resolution:"center"===this.style.boundsAlignH&&(f+=this.textBounds.halfWidth-this.canvas.width/this.resolution/2),"bottom"===this.style.boundsAlignV?g+=this.textBounds.height-this.canvas.height/this.resolution:"middle"===this.style.boundsAlignV&&(g+=this.textBounds.halfHeight-this.canvas.height/this.resolution/2),this.pivot.x=-f,this.pivot.y=-g}this.renderable=0!==d&&0!==e,this.texture.requiresReTint=!0,this.texture.baseTexture.dirty()},c.Text.prototype._renderWebGL=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.Text.prototype._renderCanvas=function(a){this.dirty&&(this.updateText(),this.dirty=!1),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.Text.prototype.determineFontProperties=function(a){var b=c.Text.fontPropertiesCache[a];if(!b){b={};var d=c.Text.fontPropertiesCanvas,e=c.Text.fontPropertiesContext;e.font=a;var f=Math.ceil(e.measureText("|MÉq").width),g=Math.ceil(e.measureText("|MÉq").width),h=2*g;if(g=1.4*g|0,d.width=f,d.height=h,e.fillStyle="#f00",e.fillRect(0,0,f,h),e.font=a,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText("|MÉq",0,g),!e.getImageData(0,0,f,h))return b.ascent=g,b.descent=g+6,b.fontSize=b.ascent+b.descent,c.Text.fontPropertiesCache[a]=b,b;var i,j,k=e.getImageData(0,0,f,h).data,l=k.length,m=4*f,n=0,o=!1;for(i=0;ig;i--){for(j=0;j0?this._maxWidth:null,j=[],k=0;k=i&&f>-1)return{width:g||e,text:c.substr(0,k-(k-f)),end:l,chars:j};e+=(n.xAdvance+p)*b,j.push(d+(n.xOffset+p)*b),d+=(n.xAdvance+p)*b,h=m}return{width:e,text:c,end:l,chars:j}},c.BitmapText.prototype.cleanText=function(a,b){void 0===b&&(b="");var c=this._data.font;if(!c)return"";for(var d=/\r\n|\n\r|\n|\r/g,e=a.replace(d,"\n").split("\n"),f=0;fthis.textWidth&&(this.textWidth=f.width),e+=a.lineHeight*c,b=b.substr(f.text.length+1)}while(!1===f.end);this.textHeight=e;for(var g=0,h=0,i=this.textWidth*this.anchor.x,j=this.textHeight*this.anchor.y,k=0;k0&&(this._fontSize=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"text",{get:function(){return this._text},set:function(a){a!==this._text&&(this._text=a.toString()||"",this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(a){a!==this._maxWidth&&(this._maxWidth=a,this.updateText())}}),Object.defineProperty(c.BitmapText.prototype,"smoothed",{get:function(){return!this._data.base.scaleMode},set:function(a){this._data.base.scaleMode=a?0:1}}),c.RetroFont=function(a,b,d,e,f,g,h,i,j,k){if(!a.cache.checkImageKey(b))return!1;void 0!==g&&null!==g||(g=a.cache.getImage(b).width/d),this.characterWidth=d,this.characterHeight=e,this.characterSpacingX=h||0,this.characterSpacingY=i||0,this.characterPerRow=g,this.offsetX=j||0,this.offsetY=k||0,this.align="left",this.multiLine=!1,this.autoUpperCase=!0,this.customSpacingX=0,this.customSpacingY=0,this.fixedWidth=0,this.fontSet=a.cache.getImage(b),this._text="",this.grabData=[],this.frameData=new c.FrameData;for(var l=this.offsetX,m=this.offsetY,n=0,o=0;o?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",c.RetroFont.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",c.RetroFont.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",c.RetroFont.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",c.RetroFont.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",c.RetroFont.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",c.RetroFont.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",c.RetroFont.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c.RetroFont.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",c.RetroFont.prototype.setFixedWidth=function(a,b){void 0===b&&(b="left"),this.fixedWidth=a,this.align=b},c.RetroFont.prototype.setText=function(a,b,c,d,e,f){this.multiLine=b||!1,this.customSpacingX=c||0,this.customSpacingY=d||0,this.align=e||"left",this.autoUpperCase=!f,a.length>0&&(this.text=a)},c.RetroFont.prototype.buildRetroFontText=function(){var a=0,b=0;if(this.clear(),this.multiLine){var d=this._text.split("\n");this.fixedWidth>0?this.resize(this.fixedWidth,d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0):this.resize(this.getLongestLine()*(this.characterWidth+this.customSpacingX),d.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0);for(var e=0;e0?this.resize(this.fixedWidth,this.characterHeight,!0):this.resize(this._text.length*(this.characterWidth+this.customSpacingX),this.characterHeight,!0),a=0,this.align===c.RetroFont.ALIGN_RIGHT?a=this.width-this._text.length*(this.characterWidth+this.customSpacingX):this.align===c.RetroFont.ALIGN_CENTER&&(a=this.width/2-this._text.length*(this.characterWidth+this.customSpacingX)/2,a+=this.customSpacingX/2),a<0&&(a=0),this.pasteLine(this._text,a,0,this.customSpacingX);this.requiresReTint=!0},c.RetroFont.prototype.pasteLine=function(a,b,c,d){for(var e=0;e=0&&(this.stamp.frame=this.grabData[a.charCodeAt(e)],this.renderXY(this.stamp,b,c,!1),(b+=this.characterWidth+d)>this.width))break},c.RetroFont.prototype.getLongestLine=function(){var a=0;if(this._text.length>0)for(var b=this._text.split("\n"),c=0;ca&&(a=b[c].length);return a},c.RetroFont.prototype.removeUnsupportedCharacters=function(a){for(var b="",c=0;c=0||!a&&"\n"===d)&&(b=b.concat(d))}return b},c.RetroFont.prototype.updateOffset=function(a,b){if(this.offsetX!==a||this.offsetY!==b){for(var c=a-this.offsetX,d=b-this.offsetY,e=this.game.cache.getFrameData(this.stamp.key).getFrames(),f=e.length;f--;)e[f].x+=c,e[f].y+=d;this.buildRetroFontText()}},Object.defineProperty(c.RetroFont.prototype,"text",{get:function(){return this._text},set:function(a){var b;(b=this.autoUpperCase?a.toUpperCase():a)!==this._text&&(this._text=b,this.removeUnsupportedCharacters(this.multiLine),this.buildRetroFontText())}}),Object.defineProperty(c.RetroFont.prototype,"smoothed",{get:function(){return this.stamp.smoothed},set:function(a){this.stamp.smoothed=a,this.buildRetroFontText()}}),c.Rope=function(a,b,d,e,f,g){this.points=[],this.points=g,this._hasUpdateAnimation=!1,this._updateAnimationCallback=null,b=b||0,d=d||0,e=e||null,f=f||null,this.type=c.ROPE,PIXI.Rope.call(this,c.Cache.DEFAULT,this.points),c.Component.Core.init.call(this,a,b,d,e,f)},c.Rope.prototype=Object.create(PIXI.Rope.prototype),c.Rope.prototype.constructor=c.Rope,c.Component.Core.install.call(c.Rope.prototype,["Angle","Animation","AutoCull","Bounds","BringToTop","Crop","Delta","Destroy","FixedToCamera","InWorld","LifeSpan","LoadTexture","Overlap","PhysicsBody","Reset","ScaleMinMax","Smoothed"]),c.Rope.prototype.preUpdatePhysics=c.Component.PhysicsBody.preUpdate,c.Rope.prototype.preUpdateLifeSpan=c.Component.LifeSpan.preUpdate,c.Rope.prototype.preUpdateInWorld=c.Component.InWorld.preUpdate,c.Rope.prototype.preUpdateCore=c.Component.Core.preUpdate,c.Rope.prototype.preUpdate=function(){return!!(this.preUpdatePhysics()&&this.preUpdateLifeSpan()&&this.preUpdateInWorld())&&this.preUpdateCore()},c.Rope.prototype.update=function(){this._hasUpdateAnimation&&this.updateAnimation.call(this)},c.Rope.prototype.reset=function(a,b){return c.Component.Reset.prototype.reset.call(this,a,b),this},Object.defineProperty(c.Rope.prototype,"updateAnimation",{get:function(){return this._updateAnimation},set:function(a){a&&"function"==typeof a?(this._hasUpdateAnimation=!0,this._updateAnimation=a):(this._hasUpdateAnimation=!1,this._updateAnimation=null)}}),Object.defineProperty(c.Rope.prototype,"segments",{get:function(){for(var a,b,d,e,f,g,h,i,j=[],k=0;k2)||a}var d=this;!function(){var a=navigator.userAgent;/Playstation Vita/.test(a)?d.vita=!0:/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?d.kindle=!0:/Android/.test(a)?d.android=!0:/CrOS/.test(a)?d.chromeOS=!0:/iP[ao]d|iPhone/i.test(a)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):/Linux/.test(a)?d.linux=!0:/Mac OS/.test(a)?d.macOS=!0:/Windows/.test(a)&&(d.windows=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var b=/Silk/.test(a);(d.windows||d.macOS||d.linux&&!b||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(d.desktop=!1)}(),function(){var a=navigator.userAgent;if(/Arora/.test(a)?d.arora=!0:/Edge\/\d+/.test(a)?d.edge=!0:/Chrome\/(\d+)/.test(a)&&!d.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10)):/Epiphany/.test(a)?d.epiphany=!0:/Firefox\D+(\d+)/.test(a)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(a)&&d.iOS?d.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Midori/.test(a)?d.midori=!0:/Opera/.test(a)?d.opera=!0:/Safari\/(\d+)/.test(a)&&!d.windowsPhone?(d.safari=!0,/Version\/(\d+)\./.test(a)&&(d.safariVersion=parseInt(RegExp.$1,10))):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(a)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(a)&&(d.silk=!0),navigator.standalone&&(d.webApp=!0),void 0!==window.cordova&&(d.cordova=!0),"undefined"!=typeof process&&"undefined"!=typeof require&&(d.node=!0),d.node&&"object"==typeof process.versions&&(d.nodeWebkit=!!process.versions["node-webkit"],d.electron=!!process.versions.electron),navigator.isCocoonJS&&(d.cocoonJS=!0),void 0!==window.wx&&(d.wechatMinigame=!0),d.cocoonJS)try{d.cocoonJSApp="undefined"!=typeof CocoonJS}catch(a){d.cocoonJSApp=!1}void 0!==window.ejecta&&(d.ejecta=!0),/Crosswalk/.test(a)&&(d.crosswalk=!0)}(),function(){d.audioData=!!window.Audio,d.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var a=document.createElement("audio");try{if(a.canPlayType&&(a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(d.ogg=!0),(a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||a.canPlayType("audio/opus;").replace(/^no$/,""))&&(d.opus=!0),a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(d.mp3=!0),a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(d.wav=!0),(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))&&(d.m4a=!0),a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(d.webm=!0),""!==a.canPlayType('audio/mp4;codecs="ec-3"')))if(d.edge)d.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var b=parseInt(RegExp.$1,10),c=parseInt(RegExp.$2,10);(10===b&&c>=11||b>10)&&(d.dolby=!0)}}catch(a){}}(),function(){var a=document.createElement("video");try{!!a.canPlayType&&(a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(d.oggVideo=!0),a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.h264Video=!0,d.mp4Video=!0),a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(d.webmVideo=!0),a.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(d.vp9Video=!0),a.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(d.hlsVideo=!0))}catch(a){}}(),function(){var a,b=document.createElement("p"),c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(b,null);for(var e in c)void 0!==b.style[e]&&(b.style[e]="translate3d(1px,1px,1px)",a=window.getComputedStyle(b).getPropertyValue(c[e]));document.body.removeChild(b),d.css3D=void 0!==a&&a.length>0&&"none"!==a}(),function(){d.pixelRatio=window.devicePixelRatio||1,d.iPhone=-1!==navigator.userAgent.toLowerCase().indexOf("iphone"),d.iPhone4=2===d.pixelRatio&&d.iPhone,d.iPad=c(),"undefined"!=typeof Int8Array?d.typedArray=!0:d.typedArray=!1,"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(d.littleEndian=a(),d.LITTLE_ENDIAN=d.littleEndian),d.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==d.littleEndian&&b(),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(d.vibration=!0)}(),function(){d.canvas=!!window.CanvasRenderingContext2D||d.cocoonJS;try{d.localStorage=!!localStorage.getItem}catch(a){d.localStorage=!1}d.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),d.fileSystem=!!window.requestFileSystem;var a={stencil:!0};d.webGL=function(){try{var b=document.createElement("canvas");return b.screencanvas=!1,!!window.WebGLRenderingContext&&(b.getContext("webgl",a)||b.getContext("experimental-webgl",a))}catch(a){return!1}}(),d.webGL=!!d.webGL,d.worker=!!window.Worker,d.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,d.quirksMode="CSS1Compat"!==document.compatMode,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,d.getUserMedia=d.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(d.getUserMedia=!1),!d.iOS&&(d.ie||d.firefox||d.chrome)&&(d.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(d.canvasBitBltShift=!1)}(),function(){for(var a=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],b=document.createElement("div"),c=0;c=1)&&(d.touch=!0),(window.PointerEvent||window.MSPointerEvent||window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&(d.mspointer=!0),d.cocoonJS||("onwheel"in window||d.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll"))}()},c.Device.canPlayAudio=function(a){return!("mp3"!==a||!this.mp3)||(!("ogg"!==a||!this.ogg&&!this.opus)||(!("m4a"!==a||!this.m4a)||(!("opus"!==a||!this.opus)||(!("wav"!==a||!this.wav)||(!("webm"!==a||!this.webm)||!("mp4"!==a||!this.dolby))))))},c.Device.canPlayVideo=function(a){return!("webm"!==a||!this.webmVideo&&!this.vp9Video)||(!("mp4"!==a||!this.mp4Video&&!this.h264Video)||(!("ogg"!==a&&"ogv"!==a||!this.oggVideo)||!("mpeg"!==a||!this.hlsVideo)))},c.Device.isConsoleOpen=function(){return!(!window.console||!window.console.firebug)||!(!window.console||(console.profile(),console.profileEnd(),console.clear&&console.clear(),!console.profiles))&&console.profiles.length>0},c.Device.isAndroidStockBrowser=function(){var a=window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);return a&&a[1]<537},c.Canvas={create:function(a,b,c,d,e){b=b||256,c=c||256;var f=e?document.createElement("canvas"):PIXI.CanvasPool.create(a,b,c);return"string"==typeof d&&""!==d&&(f.id=d),f.width=b,f.height=c,f.style.display="block",f},setBackgroundColor:function(a,b){return b=b||"rgb(0,0,0)",a.style.backgroundColor=b,a},setTouchAction:function(a,b){return b=b||"none",a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a},setUserSelect:function(a,b){return b=b||"none",a.style["-webkit-touch-callout"]=b,a.style["-webkit-user-select"]=b,a.style["-khtml-user-select"]=b,a.style["-moz-user-select"]=b,a.style["-ms-user-select"]=b,a.style["user-select"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a},addToDOM:function(a,b,c){var d;return void 0===c&&(c=!0),b&&("string"==typeof b?d=document.getElementById(b):"object"==typeof b&&1===b.nodeType&&(d=b)),d||(d=document.body),c&&d.style&&(d.style.overflow="hidden"),d.appendChild(a),a},removeFromDOM:function(a){a.parentNode&&a.parentNode.removeChild(a)},setTransform:function(a,b,c,d,e,f,g){return a.setTransform(d,f,g,e,b,c),a},setSmoothingEnabled:function(a,b){var d=c.Canvas.getSmoothingPrefix(a);return d&&(a[d]=b),a},getSmoothingPrefix:function(a){var b=["i","webkitI","msI","mozI","oI"];for(var c in b){var d=b[c]+"mageSmoothingEnabled";if(d in a)return d}return null},getSmoothingEnabled:function(a){var b=c.Canvas.getSmoothingPrefix(a);if(b)return a[b]},setImageRenderingCrisp:function(a){for(var b=["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","pixelated"],c=0;cb-c},fuzzyCeil:function(a,b){return void 0===b&&(b=1e-4),Math.ceil(a-b)},fuzzyFloor:function(a,b){return void 0===b&&(b=1e-4),Math.floor(a+b)},average:function(){for(var a=0,b=arguments.length,c=0;c=c.Math.PI2-d?a=b:(Math.abs(b-a)>Math.PI&&(ba?a+=d:b=0?a:a+2*Math.PI},maxAdd:function(a,b,c){return Math.min(a+b,c)},minSub:function(a,b,c){return Math.max(a-b,c)},wrap:function(a,b,c){var d=c-b;if(d<=0)return 0;var e=(a-b)%d;return e<0&&(e+=d),e+b},wrapValue:function(a,b,c){return a=Math.abs(a),b=Math.abs(b),c=Math.abs(c),(a+b)%c},isOdd:function(a){return!!(1&a)},isEven:function(a){return!(1&a)},min:function(){if(1===arguments.length&&"object"==typeof arguments[0])var a=arguments[0];else var a=arguments;for(var b=1,c=0,d=a.length;ba[c]&&(c=b);return a[c]},minProperty:function(a){if(2===arguments.length&&"object"==typeof arguments[1])var b=arguments[1];else var b=arguments.slice(1);for(var c=1,d=0,e=b.length;cb[d][a]&&(d=c);return b[d][a]},wrapAngle:function(a,b){return b?this.wrap(a,-Math.PI,Math.PI):this.wrap(a,-180,180)},linearInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return b<0?this.linear(a[0],a[1],d):b>1?this.linear(a[c],a[c-1],c-d):this.linear(a[e],a[e+1>c?c:e+1],d-e)},bezierInterpolation:function(a,b){for(var c=0,d=a.length-1,e=0;e<=d;e++)c+=Math.pow(1-b,d-e)*Math.pow(b,e)*a[e]*this.bernstein(d,e);return c},catmullRomInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return a[0]===a[c]?(b<0&&(e=Math.floor(d=c*(1+b))),this.catmullRom(a[(e-1+c)%c],a[e],a[(e+1)%c],a[(e+2)%c],d-e)):b<0?a[0]-(this.catmullRom(a[0],a[0],a[1],a[1],-d)-a[0]):b>1?a[c]-(this.catmullRom(a[c],a[c],a[c-1],a[c-1],d-c)-a[c]):this.catmullRom(a[e?e-1:0],a[e],a[c0?Math.ceil(a):Math.floor(a)},sinCosGenerator:function(a,b,c,d){void 0===b&&(b=1),void 0===c&&(c=1),void 0===d&&(d=1);for(var e=b,f=c,g=d*Math.PI/a,h=[],i=[],j=0;j0?1:0},percent:function(a,b,c){return void 0===c&&(c=0),a>b||c>b?1:aa?0:(a-c)/b}};var g=Math.PI/180,h=180/Math.PI;return c.Math.degToRad=function(a){return a*g},c.Math.radToDeg=function(a){return a*h},c.RandomDataGenerator=function(a){void 0===a&&(a=[]),this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof a?this.state(a):this.sow(a)},c.RandomDataGenerator.prototype={rnd:function(){var a=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|a,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},sow:function(a){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,a)for(var b=0;b>>0,b-=d,b*=d,d=b>>>0,b-=d,d+=4294967296*b;return 2.3283064365386963e-10*(d>>>0)},integer:function(){return 4294967296*this.rnd.apply(this)},frac:function(){return this.rnd.apply(this)+1.1102230246251565e-16*(2097152*this.rnd.apply(this)|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(a,b){return Math.floor(this.realInRange(0,b-a+1)+a)},between:function(a,b){return this.integerInRange(a,b)},realInRange:function(a,b){return this.frac()*(b-a)+a},normal:function(){return 1-2*this.frac()},uuid:function(){var a="",b="";for(b=a="";a++<36;b+=~a%5|3*a&4?(15^a?8^this.frac()*(20^a?16:4):4).toString(16):"-");return b},pick:function(a){return a[this.integerInRange(0,a.length-1)]},sign:function(){return this.pick([-1,1])},weightedPick:function(a){return a[~~(Math.pow(this.frac(),2)*(a.length-1)+.5)]},timestamp:function(a,b){return this.realInRange(a||9466848e5,b||1577862e6)},angle:function(){return this.integerInRange(-180,180)},state:function(a){return"string"==typeof a&&a.match(/^!rnd/)&&(a=a.split(","),this.c=parseFloat(a[1]),this.s0=parseFloat(a[2]),this.s1=parseFloat(a[3]),this.s2=parseFloat(a[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}},c.RandomDataGenerator.prototype.constructor=c.RandomDataGenerator,c.QuadTree=function(a,b,c,d,e,f,g){this.maxObjects=10,this.maxLevels=4,this.level=0,this.bounds={},this.objects=[],this.nodes=[],this._empty=[],this.reset(a,b,c,d,e,f,g)},c.QuadTree.prototype={reset:function(a,b,c,d,e,f,g){this.maxObjects=e||10,this.maxLevels=f||4,this.level=g||0,this.bounds={x:Math.round(a),y:Math.round(b),width:c,height:d,subWidth:Math.floor(c/2),subHeight:Math.floor(d/2),right:Math.round(a)+Math.floor(c/2),bottom:Math.round(b)+Math.floor(d/2)},this.objects.length=0,this.nodes.length=0},populate:function(a){a.forEach(this.populateHandler,this,!0)},populateHandler:function(a){a.body&&a.exists&&this.insert(a.body)},split:function(){this.nodes[0]=new c.QuadTree(this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[1]=new c.QuadTree(this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[2]=new c.QuadTree(this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1),this.nodes[3]=new c.QuadTree(this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level+1)},insert:function(a){var b,c=0;if(null!=this.nodes[0]&&-1!==(b=this.getIndex(a)))return void this.nodes[b].insert(a);if(this.objects.push(a),this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom&&(b=2):a.x>this.bounds.right&&(a.ythis.bounds.bottom&&(b=3)),b},retrieve:function(a){if(a instanceof c.Rectangle)var b=this.objects,d=this.getIndex(a);else{if(!a.body)return this._empty;var b=this.objects,d=this.getIndex(a.body)}return this.nodes[0]&&(-1!==d?b=b.concat(this.nodes[d].retrieve(a)):(b=b.concat(this.nodes[0].retrieve(a)),b=b.concat(this.nodes[1].retrieve(a)),b=b.concat(this.nodes[2].retrieve(a)),b=b.concat(this.nodes[3].retrieve(a)))),b},clear:function(){this.objects.length=0;for(var a=this.nodes.length;a--;)this.nodes[a].clear(),this.nodes.splice(a,1);this.nodes.length=0}},c.QuadTree.prototype.constructor=c.QuadTree,c.Net=function(a){this.game=a},c.Net.prototype={getHostName:function(){return window.location&&window.location.hostname?window.location.hostname:null},checkDomainName:function(a){return-1!==window.location.hostname.indexOf(a)},updateQueryString:function(a,b,c,d){void 0===c&&(c=!1),void 0!==d&&""!==d||(d=window.location.href);var e="",f=new RegExp("([?|&])"+a+"=.*?(&|#|$)(.*)","gi");if(f.test(d))e=void 0!==b&&null!==b?d.replace(f,"$1"+a+"="+b+"$2$3"):d.replace(f,"$1$3").replace(/(&|\?)$/,"");else if(void 0!==b&&null!==b){var g=-1!==d.indexOf("?")?"&":"?",h=d.split("#");d=h[0]+g+a+"="+b,h[1]&&(d+="#"+h[1]),e=d}else e=d;if(!c)return e;window.location.href=e},getQueryString:function(a){void 0===a&&(a="");var b={},c=location.search.substring(1).split("&");for(var d in c){var e=c[d].split("=");if(e.length>1){if(a&&a===this.decodeURI(e[0]))return this.decodeURI(e[1]);b[this.decodeURI(e[0])]=this.decodeURI(e[1])}}return b},decodeURI:function(a){return decodeURIComponent(a.replace(/\+/g," "))}},c.Net.prototype.constructor=c.Net,c.TweenManager=function(a){this.game=a,this.frameBased=!1,this._tweens=[],this._add=[],this.easeMap={Power0:c.Easing.Power0,Power1:c.Easing.Power1,Power2:c.Easing.Power2,Power3:c.Easing.Power3,Power4:c.Easing.Power4,Linear:c.Easing.Linear.None,Quad:c.Easing.Quadratic.Out,Cubic:c.Easing.Cubic.Out,Quart:c.Easing.Quartic.Out,Quint:c.Easing.Quintic.Out,Sine:c.Easing.Sinusoidal.Out,Expo:c.Easing.Exponential.Out,Circ:c.Easing.Circular.Out,Elastic:c.Easing.Elastic.Out,Back:c.Easing.Back.Out,Bounce:c.Easing.Bounce.Out,"Quad.easeIn":c.Easing.Quadratic.In,"Cubic.easeIn":c.Easing.Cubic.In,"Quart.easeIn":c.Easing.Quartic.In,"Quint.easeIn":c.Easing.Quintic.In,"Sine.easeIn":c.Easing.Sinusoidal.In,"Expo.easeIn":c.Easing.Exponential.In,"Circ.easeIn":c.Easing.Circular.In,"Elastic.easeIn":c.Easing.Elastic.In,"Back.easeIn":c.Easing.Back.In,"Bounce.easeIn":c.Easing.Bounce.In,"Quad.easeOut":c.Easing.Quadratic.Out,"Cubic.easeOut":c.Easing.Cubic.Out,"Quart.easeOut":c.Easing.Quartic.Out,"Quint.easeOut":c.Easing.Quintic.Out,"Sine.easeOut":c.Easing.Sinusoidal.Out,"Expo.easeOut":c.Easing.Exponential.Out,"Circ.easeOut":c.Easing.Circular.Out,"Elastic.easeOut":c.Easing.Elastic.Out,"Back.easeOut":c.Easing.Back.Out,"Bounce.easeOut":c.Easing.Bounce.Out,"Quad.easeInOut":c.Easing.Quadratic.InOut,"Cubic.easeInOut":c.Easing.Cubic.InOut,"Quart.easeInOut":c.Easing.Quartic.InOut,"Quint.easeInOut":c.Easing.Quintic.InOut,"Sine.easeInOut":c.Easing.Sinusoidal.InOut,"Expo.easeInOut":c.Easing.Exponential.InOut,"Circ.easeInOut":c.Easing.Circular.InOut,"Elastic.easeInOut":c.Easing.Elastic.InOut,"Back.easeInOut":c.Easing.Back.InOut,"Bounce.easeInOut":c.Easing.Bounce.InOut},this.game.onPause.add(this._pauseAll,this),this.game.onResume.add(this._resumeAll,this)},c.TweenManager.prototype={getAll:function(){return this._tweens},removeAll:function(){for(var a=0;a0&&(this._tweens=this._tweens.concat(this._add),this._add.length=0),!0},isTweening:function(a){return this._tweens.some(function(b){return b.target===a})},_pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._pause()},_resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a]._resume()},pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].pause()},resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].resume(!0)}},c.TweenManager.prototype.constructor=c.TweenManager,c.Tween=function(a,b,d){this.game=b,this.target=a,this.manager=d,this.timeline=[],this.reverse=!1,this.timeScale=1,this.repeatCounter=0,this.pendingDelete=!1,this.onStart=new c.Signal,this.onLoop=new c.Signal,this.onRepeat=new c.Signal,this.onChildComplete=new c.Signal,this.onComplete=new c.Signal,this.isRunning=!1,this.current=0,this.properties={},this.chainedTween=null,this.isPaused=!1,this.frameBased=d.frameBased,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,this._pausedTime=0,this._codePaused=!1,this._hasStarted=!1},c.Tween.prototype={to:function(a,b,d,e,f,g,h){return(void 0===b||b<=0)&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.to cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).to(a,b,d,f,g,h)),e&&this.start(),this)},from:function(a,b,d,e,f,g,h){return void 0===b&&(b=1e3),void 0!==d&&null!==d||(d=c.Easing.Default),void 0===e&&(e=!1),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=!1),"string"==typeof d&&this.manager.easeMap[d]&&(d=this.manager.easeMap[d]),this.isRunning?(console.warn("Phaser.Tween.from cannot be called after Tween.start"),this):(this.timeline.push(new c.TweenData(this).from(a,b,d,f,g,h)),e&&this.start(),this)},start:function(a){if(void 0===a&&(a=0),null===this.game||null===this.target||0===this.timeline.length||this.isRunning)return this;for(var b=0;bthis.timeline.length-1)&&(a=0),this.current=a,this.timeline[this.current].start(),this},stop:function(a){return void 0===a&&(a=!1),this.isRunning=!1,this._onUpdateCallback=null,this._onUpdateCallbackContext=null,a&&(this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start()),this.manager.remove(this),this},updateTweenData:function(a,b,c){if(0===this.timeline.length)return this;if(void 0===c&&(c=0),-1===c)for(var d=0;d0?arguments[a-1].chainedTween=arguments[a]:this.chainedTween=arguments[a];return this},loop:function(a){return void 0===a&&(a=!0),this.repeatCounter=a?-1:0,this},onUpdateCallback:function(a,b){return this._onUpdateCallback=a,this._onUpdateCallbackContext=b,this},pause:function(){this.isPaused=!0,this._codePaused=!0,this._pausedTime=this.game.time.time},_pause:function(){this._codePaused||(this.isPaused=!0,this._pausedTime=this.game.time.time)},resume:function(){if(this.isPaused){this.isPaused=!1,this._codePaused=!1;for(var a=0;a0?(this.repeatCounter--,this.timeline[this.current].start(),this.onRepeat.dispatch(this.target,this),!0):(this.isRunning=!1,this.onComplete.dispatch(this.target,this),this._hasStarted=!1,this.chainedTween&&this.chainedTween.start(),!1):(this.onChildComplete.dispatch(this.target,this),this.timeline[this.current].start(),!0)}},generateData:function(a,b){if(null===this.game||null===this.target)return null;void 0===a&&(a=60),void 0===b&&(b=[]);for(var c=0;c0?this.isRunning=!1:this.isRunning=!0,this.isFrom)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a],this.parent.target[a]=this.vStart[a];return this.value=0,this.yoyoCounter=0,this.repeatCounter=this.repeatTotal,this},loadValues:function(){for(var a in this.parent.properties){if(this.vStart[a]=this.parent.properties[a],Array.isArray(this.vEnd[a])){if(0===this.vEnd[a].length)continue;0===this.percent&&(this.vEnd[a]=[this.vStart[a]].concat(this.vEnd[a]))}void 0!==this.vEnd[a]?("string"==typeof this.vEnd[a]&&(this.vEnd[a]=this.vStart[a]+parseFloat(this.vEnd[a],10)),this.parent.properties[a]=this.vEnd[a]):this.vEnd[a]=this.vStart[a],this.vStartCache[a]=this.vStart[a],this.vEndCache[a]=this.vEnd[a]}return this},update:function(a){if(this.isRunning){if(a=this.startTime))return c.TweenData.PENDING;this.isRunning=!0}var b=this.parent.frameBased?this.game.time.physicsElapsedMS:this.game.time.elapsedMS;this.parent.reverse?(this.dt-=b*this.parent.timeScale,this.dt=Math.max(this.dt,0)):(this.dt+=b*this.parent.timeScale,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);for(var d in this.vEnd){var e=this.vStart[d],f=this.vEnd[d];Array.isArray(f)?this.parent.target[d]=this.interpolationFunction.call(this.interpolationContext,f,this.value):this.parent.target[d]=e+(f-e)*this.value}return!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent?this.repeat():c.TweenData.RUNNING},generateData:function(a){this.parent.reverse?this.dt=this.duration:this.dt=0;var b=[],c=!1,d=1/a*1e3;do{this.parent.reverse?(this.dt-=d,this.dt=Math.max(this.dt,0)):(this.dt+=d,this.dt=Math.min(this.dt,this.duration)),this.percent=this.dt/this.duration,this.value=this.easingFunction(this.percent);var e={};for(var f in this.vEnd){var g=this.vStart[f],h=this.vEnd[f];Array.isArray(h)?e[f]=this.interpolationFunction(h,this.value):e[f]=g+(h-g)*this.value}b.push(e),(!this.parent.reverse&&1===this.percent||this.parent.reverse&&0===this.percent)&&(c=!0)}while(!c);if(this.yoyo){var i=b.slice();i.reverse(),b=b.concat(i)}return b},repeat:function(){if(this.yoyo){if(this.inReverse&&0===this.repeatCounter){for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];return this.inReverse=!1,c.TweenData.COMPLETE}this.inReverse=!this.inReverse}else if(0===this.repeatCounter)return c.TweenData.COMPLETE;if(this.inReverse)for(var a in this.vStartCache)this.vStart[a]=this.vEndCache[a],this.vEnd[a]=this.vStartCache[a];else{for(var a in this.vStartCache)this.vStart[a]=this.vStartCache[a],this.vEnd[a]=this.vEndCache[a];this.repeatCounter>0&&this.repeatCounter--}return this.startTime=this.game.time.time,this.yoyo&&this.inReverse?this.startTime+=this.yoyoDelay:this.inReverse||(this.startTime+=this.repeatDelay),this.parent.reverse?this.dt=this.duration:this.dt=0,c.TweenData.LOOPED}},c.TweenData.prototype.constructor=c.TweenData,c.Easing={Linear:{None:function(a){return a}},Quadratic:{In:function(a){return a*a},Out:function(a){return a*(2-a)},InOut:function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)},Out:function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)},InOut:function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:(a*=2)<1?.5*Math.pow(1024,a-1):.5*(2-Math.pow(2,-10*(a-1)))}},Circular:{In:function(a){return 1-Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),-c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4))},Out:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),c*Math.pow(2,-10*a)*Math.sin((a-b)*(2*Math.PI)/.4)+1)},InOut:function(a){var b,c=.1;return 0===a?0:1===a?1:(!c||c<1?(c=1,b=.1):b=.4*Math.asin(1/c)/(2*Math.PI),(a*=2)<1?c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*-.5:c*Math.pow(2,-10*(a-=1))*Math.sin((a-b)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(a){var b=1.70158;return a*a*((b+1)*a-b)},Out:function(a){var b=1.70158;return--a*a*((b+1)*a+b)+1},InOut:function(a){var b=2.5949095;return(a*=2)<1?a*a*((b+1)*a-b)*.5:.5*((a-=2)*a*((b+1)*a+b)+2)}},Bounce:{In:function(a){return 1-c.Easing.Bounce.Out(1-a)},Out:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},InOut:function(a){return a<.5?.5*c.Easing.Bounce.In(2*a):.5*c.Easing.Bounce.Out(2*a-1)+.5}}},c.Easing.Default=c.Easing.Linear.None,c.Easing.Power0=c.Easing.Linear.None,c.Easing.Power1=c.Easing.Quadratic.Out,c.Easing.Power2=c.Easing.Cubic.Out,c.Easing.Power3=c.Easing.Quartic.Out,c.Easing.Power4=c.Easing.Quintic.Out,c.Time=function(a){this.game=a,this.time=0,this.prevTime=0,this.now=0,this.elapsed=0,this.elapsedMS=0,this.physicsElapsed=1/60,this.physicsElapsedMS=1/60*1e3,this.desiredFpsMult=1/60,this._desiredFps=60,this.suggestedFps=this.desiredFps,this.slowMotion=1,this.advancedTiming=!1,this.frames=0,this.fps=0,this.fpsMin=1e3,this.fpsMax=0,this.msMin=1e3,this.msMax=0,this.pauseDuration=0,this.timeToCall=0,this.timeExpected=0,this.events=new c.Timer(this.game,!1),this._frameCount=0,this._elapsedAccumulator=0,this._started=0,this._timeLastSecond=0,this._pauseStarted=0,this._justResumed=!1,this._timers=[]},c.Time.prototype={boot:function(){this._started=Date.now(),this.time=Date.now(),this.events.start(),this.timeExpected=this.time},add:function(a){return this._timers.push(a),a},create:function(a){void 0===a&&(a=!0);var b=new c.Timer(this.game,a);return this._timers.push(b),b},removeAll:function(){for(var a=0;a=2*this._desiredFps&&(this.suggestedFps=5*Math.floor(200/(this._elapsedAccumulator/this._frameCount)),this._frameCount=0,this._elapsedAccumulator=0),this.msMin=Math.min(this.msMin,this.elapsed),this.msMax=Math.max(this.msMax,this.elapsed),this.frames++,this.now>this._timeLastSecond+1e3&&(this.fps=Math.round(1e3*this.frames/(this.now-this._timeLastSecond)),this.fpsMin=Math.min(this.fpsMin,this.fps),this.fpsMax=Math.max(this.fpsMax,this.fps),this._timeLastSecond=this.now,this.frames=0)},gamePaused:function(){this._pauseStarted=Date.now(),this.events.pause();for(var a=this._timers.length;a--;)this._timers[a]._pause()},gameResumed:function(){this.time=Date.now(),this.pauseDuration=this.time-this._pauseStarted,this.events.resume();for(var a=this._timers.length;a--;)this._timers[a]._resume()},totalElapsedSeconds:function(){return.001*(this.time-this._started)},elapsedSince:function(a){return this.time-a},elapsedSecondsSince:function(a){return.001*(this.time-a)},reset:function(){this._started=this.time,this.removeAll()}},Object.defineProperty(c.Time.prototype,"desiredFps",{get:function(){return this._desiredFps},set:function(a){this._desiredFps=a,this.physicsElapsed=1/a,this.physicsElapsedMS=1e3*this.physicsElapsed,this.desiredFpsMult=1/a}}),c.Time.prototype.constructor=c.Time,c.Timer=function(a,b){void 0===b&&(b=!0),this.game=a,this.running=!1,this.autoDestroy=b,this.expired=!1,this.elapsed=0,this.events=[],this.onComplete=new c.Signal,this.nextTick=0,this.timeCap=1e3,this.paused=!1,this._codePaused=!1,this._started=0,this._pauseStarted=0,this._pauseTotal=0,this._now=Date.now(),this._len=0,this._marked=0,this._i=0,this._diff=0,this._newTick=0},c.Timer.MINUTE=6e4,c.Timer.SECOND=1e3,c.Timer.HALF=500,c.Timer.QUARTER=250,c.Timer.prototype={create:function(a,b,d,e,f,g){a=Math.round(a);var h=a;0===this._now?h+=this.game.time.time:h+=this._now;var i=new c.TimerEvent(this,a,h,d,b,e,f,g);return this.events.push(i),this.order(),this.expired=!1,i},add:function(a,b,c){return this.create(a,!1,0,b,c,Array.prototype.slice.call(arguments,3))},repeat:function(a,b,c,d){return this.create(a,!1,b,c,d,Array.prototype.slice.call(arguments,4))},loop:function(a,b,c){return this.create(a,!0,0,b,c,Array.prototype.slice.call(arguments,3))},start:function(a){if(!this.running){this._started=this.game.time.time+(a||0),this.running=!0;for(var b=0;b0&&(this.events.sort(this.sortHandler),this.nextTick=this.events[0].tick)},sortHandler:function(a,b){return a.tickb.tick?1:0},clearPendingEvents:function(){for(this._i=this.events.length;this._i--;)this.events[this._i].pendingDelete&&this.events.splice(this._i,1);this._len=this.events.length,this._i=0},update:function(a){if(this.paused)return!0;if(this.elapsed=a-this._now,this._now=a,this.elapsed>this.timeCap&&this.adjustEvents(a-this.elapsed),this._marked=0,this.clearPendingEvents(),this.running&&this._now>=this.nextTick&&this._len>0){for(;this._i=this.events[this._i].tick&&!this.events[this._i].pendingDelete;)this._newTick=this._now+this.events[this._i].delay-(this._now-this.events[this._i].tick),this._newTick<0&&(this._newTick=this._now+this.events[this._i].delay),!0===this.events[this._i].loop?(this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):this.events[this._i].repeatCount>0?(this.events[this._i].repeatCount--,this.events[this._i].tick=this._newTick,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)):(this._marked++,this.events[this._i].pendingDelete=!0,this.events[this._i].callback.apply(this.events[this._i].callbackContext,this.events[this._i].args)),this._i++;this.events.length>this._marked?this.order():(this.expired=!0,this.onComplete.dispatch(this))}return!this.expired||!this.autoDestroy},pause:function(){this.running&&(this._codePaused=!0,this.paused||(this._pauseStarted=this.game.time.time,this.paused=!0))},_pause:function(){!this.paused&&this.running&&(this._pauseStarted=this.game.time.time,this.paused=!0)},adjustEvents:function(a){for(var b=0;bthis._now?this.nextTick-this._now:0}}),Object.defineProperty(c.Timer.prototype,"length",{get:function(){return this.events.length}}),Object.defineProperty(c.Timer.prototype,"ms",{get:function(){return this.running?this._now-this._started-this._pauseTotal:0}}),Object.defineProperty(c.Timer.prototype,"seconds",{get:function(){return this.running?.001*this.ms:0}}),c.Timer.prototype.constructor=c.Timer,c.TimerEvent=function(a,b,c,d,e,f,g,h){this.timer=a,this.delay=b,this.tick=c,this.repeatCount=d-1,this.loop=e,this.callback=f,this.callbackContext=g,this.args=h,this.pendingDelete=!1},c.TimerEvent.prototype.constructor=c.TimerEvent,c.AnimationManager=function(a){this.sprite=a,this.game=a.game,this.currentFrame=null,this.currentAnim=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},c.AnimationManager.prototype={loadFrameData:function(a,b){if(void 0===a)return!1;if(this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(a);return this._frameData=a,void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},copyFrameData:function(a,b){if(this._frameData=a.clone(),this.isLoaded)for(var c in this._anims)this._anims[c].updateFrameData(this._frameData);return void 0===b||null===b?this.frame=0:"string"==typeof b?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},add:function(a,b,d,e,f){return b=b||[],d=d||60,void 0===e&&(e=!1),void 0===f&&(f=!(!b||"number"!=typeof b[0])),this._outputFrames=[],this._frameData.getFrameIndexes(b,f,this._outputFrames),this._anims[a]=new c.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,d,e),this.currentAnim=this._anims[a],this.sprite.tilingTexture&&(this.sprite.refreshTexture=!0),this._anims[a]},validateFrames:function(a,b){void 0===b&&(b=!0);for(var c=0;cthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(a[c]))return!1;return!0},play:function(a,b,c,d){if(this._anims[a])return this.currentAnim===this._anims[a]?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(b,c,d)):this.currentAnim:(this.currentAnim&&this.currentAnim.isPlaying&&this.currentAnim.stop(),this.currentAnim=this._anims[a],this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(b,c,d))},stop:function(a,b){void 0===b&&(b=!1),!this.currentAnim||"string"==typeof a&&a!==this.currentAnim.name||this.currentAnim.stop(b)},update:function(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))},next:function(a){this.currentAnim&&(this.currentAnim.next(a),this.currentFrame=this.currentAnim.currentFrame)},previous:function(a){this.currentAnim&&(this.currentAnim.previous(a),this.currentFrame=this.currentAnim.currentFrame)},getAnimation:function(a){return"string"==typeof a&&this._anims[a]?this._anims[a]:null},refreshFrame:function(){},destroy:function(){var a=null;for(var a in this._anims)this._anims.hasOwnProperty(a)&&this._anims[a].destroy();this._anims={},this._outputFrames=[],this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null,this.game=null}},c.AnimationManager.prototype.constructor=c.AnimationManager,Object.defineProperty(c.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(c.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData.total}}),Object.defineProperty(c.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(c.AnimationManager.prototype,"name",{get:function(){if(this.currentAnim)return this.currentAnim.name}}),Object.defineProperty(c.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame)return this.currentFrame.index},set:function(a){"number"==typeof a&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this.currentFrame&&this.sprite.setFrame(this.currentFrame))}}),Object.defineProperty(c.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame)return this.currentFrame.name},set:function(a){"string"==typeof a&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this.currentFrame&&(this._frameIndex=this.currentFrame.index,this.sprite.setFrame(this.currentFrame))):console.warn("Cannot set frameName: "+a)}}),c.Animation=function(a,b,d,e,f,g,h){void 0===h&&(h=!1),this.game=a,this._parent=b,this._frameData=e,this.name=d,this._frames=[],this._frames=this._frames.concat(f),this.delay=1e3/g,this.loop=h,this.loopCount=0,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.onStart=new c.Signal,this.onUpdate=null,this.onComplete=new c.Signal,this.onLoop=new c.Signal,this.isReversed=!1,this.game.onPause.add(this.onPause,this),this.game.onResume.add(this.onResume,this)},c.Animation.prototype={play:function(a,b,c){return"number"==typeof a&&(this.delay=1e3/a),"boolean"==typeof b&&(this.loop=b),void 0!==c&&(this.killOnComplete=c),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=this.isReversed?this._frames.length-1:0,this.updateCurrentFrame(!1,!0),this._parent.events.onAnimationStart$dispatch(this._parent,this),this.onStart.dispatch(this._parent,this),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this},restart:function(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this._timeLastFrame=this.game.time.time,this._timeNextFrame=this.game.time.time+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setFrame(this.currentFrame),this._parent.animations.currentAnim=this,this._parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this._parent,this)},reverse:function(){return this.reversed=!this.reversed,this},reverseOnce:function(){return this.onComplete.addOnce(this.reverse,this),this.reverse()},setFrame:function(a,b){var c;if(void 0===b&&(b=!1),"string"==typeof a)for(var d=0;d=this._timeNextFrame)&&(this._frameSkip=1,this._frameDiff=this.game.time.time-this._timeNextFrame,this._timeLastFrame=this.game.time.time,this._frameDiff>this.delay&&(this._frameSkip=Math.floor(this._frameDiff/this.delay),this._frameDiff-=this._frameSkip*this.delay),this._timeNextFrame=this.game.time.time+(this.delay-this._frameDiff),this.isReversed?this._frameIndex-=this._frameSkip:this._frameIndex+=this._frameSkip,!this.isReversed&&this._frameIndex>=this._frames.length||this.isReversed&&this._frameIndex<=-1?this.loop?(this._frameIndex=Math.abs(this._frameIndex)%this._frames.length,this.isReversed&&(this._frameIndex=this._frames.length-1-this._frameIndex),this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setFrame(this.currentFrame),this.loopCount++,this._parent.events.onAnimationLoop$dispatch(this._parent,this),this.onLoop.dispatch(this._parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))},updateCurrentFrame:function(a,b){if(void 0===b&&(b=!1),!this._frameData)return!1;var c=this.currentFrame.index;return this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&(b||!b&&c!==this.currentFrame.index)&&this._parent.setFrame(this.currentFrame),!this.onUpdate||!a||(this.onUpdate.dispatch(this,this.currentFrame),!!this._frameData)},next:function(a){void 0===a&&(a=1);var b=this._frameIndex+a;b>=this._frames.length&&(this.loop?b%=this._frames.length:b=this._frames.length-1),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},previous:function(a){void 0===a&&(a=1);var b=this._frameIndex-a;b<0&&(this.loop?b=this._frames.length+b:b++),b!==this._frameIndex&&(this._frameIndex=b,this.updateCurrentFrame(!0))},updateFrameData:function(a){this._frameData=a,this.currentFrame=this._frameData?this._frameData.getFrame(this._frames[this._frameIndex%this._frames.length]):null},destroy:function(){this._frameData&&(this.game.onPause.remove(this.onPause,this),this.game.onResume.remove(this.onResume,this),this.game=null,this._parent=null,this._frames=null,this._frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())},complete:function(){this._frameIndex=this._frames.length-1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this._parent.events.onAnimationComplete$dispatch(this._parent,this),this.onComplete.dispatch(this._parent,this),this.killOnComplete&&this._parent.kill()}},c.Animation.prototype.constructor=c.Animation,Object.defineProperty(c.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(a){this.isPaused=a,a?this._pauseStartTime=this.game.time.time:this.isPlaying&&(this._timeNextFrame=this.game.time.time+this.delay)}}),Object.defineProperty(c.Animation.prototype,"reversed",{get:function(){return this.isReversed},set:function(a){this.isReversed=a}}),Object.defineProperty(c.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(c.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(a){this.currentFrame=this._frameData.getFrame(this._frames[a]),null!==this.currentFrame&&(this._frameIndex=a,this._parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}}),Object.defineProperty(c.Animation.prototype,"speed",{get:function(){return 1e3/this.delay},set:function(a){a>0&&(this.delay=1e3/a)}}),Object.defineProperty(c.Animation.prototype,"enableUpdate",{get:function(){return null!==this.onUpdate},set:function(a){a&&null===this.onUpdate?this.onUpdate=new c.Signal:a||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}}),c.Animation.generateFrameNames=function(a,b,d,e,f){void 0===e&&(e="");var g=[],h="";if(b=d;i--)h="number"==typeof f?c.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+e,g.push(h);return g},c.Frame=function(a,b,d,e,f,g){this.index=a,this.x=b,this.y=d,this.width=e,this.height=f,this.name=g,this.centerX=Math.floor(e/2),this.centerY=Math.floor(f/2),this.distance=c.Math.distance(0,0,e,f),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=e,this.sourceSizeH=f,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0,this.right=this.x+this.width,this.bottom=this.y+this.height},c.Frame.prototype={resize:function(a,b){this.width=a,this.height=b,this.centerX=Math.floor(a/2),this.centerY=Math.floor(b/2),this.distance=c.Math.distance(0,0,a,b),this.sourceSizeW=a,this.sourceSizeH=b,this.right=this.x+a,this.bottom=this.y+b},setTrim:function(a,b,c,d,e,f,g){this.trimmed=a,a&&(this.sourceSizeW=b,this.sourceSizeH=c,this.centerX=Math.floor(b/2),this.centerY=Math.floor(c/2),this.spriteSourceSizeX=d,this.spriteSourceSizeY=e,this.spriteSourceSizeW=f,this.spriteSourceSizeH=g)},clone:function(){var a=new c.Frame(this.index,this.x,this.y,this.width,this.height,this.name);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},getRect:function(a){return void 0===a?a=new c.Rectangle(this.x,this.y,this.width,this.height):a.setTo(this.x,this.y,this.width,this.height),a}},c.Frame.prototype.constructor=c.Frame,c.FrameData=function(){this._frames=[],this._frameNames=[]},c.FrameData.prototype={addFrame:function(a){return a.index=this._frames.length,this._frames.push(a),""!==a.name&&(this._frameNames[a.name]=a.index),a},getFrame:function(a){return a>=this._frames.length&&(a=0),this._frames[a]},getFrameByName:function(a){return"number"==typeof this._frameNames[a]?this._frames[this._frameNames[a]]:null},checkFrameName:function(a){return null!=this._frameNames[a]},clone:function(){for(var a=new c.FrameData,b=0;bj&&(p=g,q+=e+h);return o},JSONData:function(a,b){if(!b.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),void console.log(b);for(var d,e=new c.FrameData,f=b.frames,g=0;g tag");for(var d,e,f,g,h,i,j,k,l,m,n,o=new c.FrameData,p=b.getElementsByTagName("SubTexture"),q=0;q-1},getAssetIndex:function(a,b){for(var c=-1,d=0;d-1&&{index:c,file:this._fileList[c]}},reset:function(a,b){void 0===b&&(b=!1),this.resetLocked||(a&&(this.preloadSprite=null),this.isLoading=!1,this._processingHead=0,this._fileList.length=0,this._flightQueue.length=0,this._fileLoadStarted=!1,this._totalFileCount=0,this._totalPackCount=0,this._loadedPackCount=0,this._loadedFileCount=0,b&&(this.onLoadStart.removeAll(),this.onLoadComplete.removeAll(),this.onPackComplete.removeAll(),this.onFileStart.removeAll(),this.onFileComplete.removeAll(),this.onFileError.removeAll()))},addToFileList:function(a,b,c,d,e,f){if(void 0===e&&(e=!1),void 0===b||""===b)return console.warn("Phaser.Loader: Invalid or no key given of type "+a),this;if(void 0===c||null===c){if(!f)return console.warn("Phaser.Loader: No URL given for file type: "+a+" key: "+b),this;c=b+f}var g={type:a,key:b,path:this.path,url:c,syncPoint:this._withSyncPointDepth>0,data:null,loading:!1,loaded:!1,error:!1};if(d)for(var h in d)g[h]=d[h];var i=this.getAssetIndex(a,b);if(e&&i>-1){var j=this._fileList[i];j.loading||j.loaded?(this._fileList.push(g),this._totalFileCount++):this._fileList[i]=g}else-1===i&&(this._fileList.push(g),this._totalFileCount++);return this},replaceInFileList:function(a,b,c,d){return this.addToFileList(a,b,c,d,!0)},pack:function(a,b,c,d){if(void 0===b&&(b=null),void 0===c&&(c=null),void 0===d&&(d=null),!b&&!c)return console.warn("Phaser.Loader.pack - Both url and data are null. One must be set."),this;var e={type:"packfile",key:a,url:b,path:this.path,syncPoint:!0,data:null,loading:!1,loaded:!1,error:!1,callbackContext:d};c&&("string"==typeof c&&(c=JSON.parse(c)),e.data=c||{},e.loaded=!0);for(var f=0;f=e||d&&this._loadedPackCount===this._totalPackCount)break}if(this.updateProgress(),this._processingHead>=this._fileList.length)this.finishedLoading();else if(!this._flightQueue.length){console.warn("Phaser.Loader - aborting: processing queue empty, loading may have stalled");var f=this;setTimeout(function(){f.finishedLoading(!0)},2e3)}},finishedLoading:function(a){this.hasLoaded||(this.hasLoaded=!0,this.isLoading=!1,a||this._fileLoadStarted||(this._fileLoadStarted=!0,this.onLoadStart.dispatch()),this.onLoadComplete.dispatch(),this.game.state.loadComplete(),this.reset())},asyncComplete:function(a,b){void 0===b&&(b=""),a.loaded=!0,a.error=!!b,b&&(a.errorMessage=b,console.warn("Phaser.Loader - "+a.type+"["+a.key+"]: "+b)),this.processLoadQueue()},processPack:function(a){var b=a.data[a.key];if(!b)return void console.warn("Phaser.Loader - "+a.key+": pack has data, but not for pack key");for(var d=0;d=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.hasLoaded?window.console&&console.error(b):g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,f.send()},xhrLoadWithXDR:function(a,b,c,d,e){this._warnedAboutXDomainRequest||this.game.device.ie&&!(this.game.device.ieVersion>=10)||(this._warnedAboutXDomainRequest=!0,console.warn("Phaser.Loader - using XDomainRequest outside of IE 9"));var f=new window.XDomainRequest;f.open("GET",b,!0),f.responseType=c,f.timeout=3e3,e=e||this.fileError;var g=this;f.onerror=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.ontimeout=function(){try{return e.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},f.onprogress=function(){},f.onload=function(){try{return 4===f.readyState&&f.status>=400&&f.status<=599?e.call(g,a,f):d.call(g,a,f)}catch(b){g.asyncComplete(a,b.message||"Exception")}},a.requestObject=f,a.requestUrl=b,setTimeout(function(){f.send()},0)},getVideoURL:function(a){for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayVideo(c))return a[b]}}return null},getAudioURL:function(a){if(this.game.sound.noAudio)return null;for(var b=0;b=0&&(d=d.substr(0,d.indexOf("?")));if(c=d.substr((Math.max(0,d.lastIndexOf("."))||1/0)+1).toLowerCase(),this.game.device.canPlayAudio(c))return a[b]}}return null},fileError:function(a,b,c){var d=a.requestUrl||this.transformUrl(a.url,a),e="error loading asset from URL "+d;!c&&b&&(c=b.status),c&&(e=e+" ("+c+")"),this.asyncComplete(a,e)},fileComplete:function(a,b){var d=!0;switch(a.type){case"packfile":var e=JSON.parse(b.responseText);a.data=e||{};break;case"image":this.cache.addImage(a.key,a.url,a.data);break;case"spritesheet":this.cache.addSpriteSheet(a.key,a.url,a.data,a.frameWidth,a.frameHeight,a.frameMax,a.margin,a.spacing);break;case"textureatlas":if(null==a.atlasURL)this.cache.addTextureAtlas(a.key,a.url,a.data,a.atlasData,a.format);else if(d=!1,a.format===c.Loader.TEXTURE_ATLAS_JSON_ARRAY||a.format===c.Loader.TEXTURE_ATLAS_JSON_HASH||a.format===c.Loader.TEXTURE_ATLAS_JSON_PYXEL)this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.jsonLoadComplete);else{if(a.format!==c.Loader.TEXTURE_ATLAS_XML_STARLING)throw new Error("Phaser.Loader. Invalid Texture Atlas format: "+a.format);this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",this.xmlLoadComplete)}break;case"bitmapfont":a.atlasURL?(d=!1,this.xhrLoad(a,this.transformUrl(a.atlasURL,a),"text",function(a,b){var c;try{c=JSON.parse(b.responseText)}catch(a){}c?(a.atlasType="json",this.jsonLoadComplete(a,b)):(a.atlasType="xml",this.xmlLoadComplete(a,b))})):this.cache.addBitmapFont(a.key,a.url,a.data,a.atlasData,a.atlasType,a.xSpacing,a.ySpacing);break;case"video":if(a.asBlob)try{a.data=b.response}catch(b){throw new Error("Phaser.Loader. Unable to parse video file as Blob: "+a.key)}this.cache.addVideo(a.key,a.url,a.data,a.asBlob);break;case"audio":this.game.sound.usingWebAudio?(a.data=b.response,this.cache.addSound(a.key,a.url,a.data,!0,!1),a.autoDecode&&this.game.sound.decode(a.key)):this.cache.addSound(a.key,a.url,a.data,!1,!0);break;case"text":a.data=b.responseText,this.cache.addText(a.key,a.url,a.data);break;case"shader":a.data=b.responseText,this.cache.addShader(a.key,a.url,a.data);break;case"physics":var e=JSON.parse(b.responseText);this.cache.addPhysicsData(a.key,a.url,e,a.format);break;case"script":a.data=document.createElement("script"),a.data.language="javascript",a.data.type="text/javascript",a.data.defer=!1,a.data.text=b.responseText,document.head.appendChild(a.data),a.callback&&(a.data=a.callback.call(a.callbackContext,a.key,b.responseText));break;case"binary":a.callback?a.data=a.callback.call(a.callbackContext,a.key,b.response):a.data=b.response,this.cache.addBinary(a.key,a.data)}d&&this.asyncComplete(a)},jsonLoadComplete:function(a,b){var c=JSON.parse(b.responseText);"tilemap"===a.type?this.cache.addTilemap(a.key,a.url,c,a.format):"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,c,a.atlasType,a.xSpacing,a.ySpacing):"json"===a.type?this.cache.addJSON(a.key,a.url,c):this.cache.addTextureAtlas(a.key,a.url,a.data,c,a.format),this.asyncComplete(a)},csvLoadComplete:function(a,b){var c=b.responseText;this.cache.addTilemap(a.key,a.url,c,a.format),this.asyncComplete(a)},xmlLoadComplete:function(a,b){var c=b.responseText,d=this.parseXml(c);if(!d){var e=b.responseType||b.contentType;return console.warn("Phaser.Loader - "+a.key+": invalid XML ("+e+")"),void this.asyncComplete(a,"invalid XML")}"bitmapfont"===a.type?this.cache.addBitmapFont(a.key,a.url,a.data,d,a.atlasType,a.xSpacing,a.ySpacing):"textureatlas"===a.type?this.cache.addTextureAtlas(a.key,a.url,a.data,d,a.format):"xml"===a.type&&this.cache.addXML(a.key,a.url,d),this.asyncComplete(a)},parseXml:function(a){var b;try{if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)}catch(a){b=null}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length?b:null},updateProgress:function(){this.preloadSprite&&(0===this.preloadSprite.direction?this.preloadSprite.rect.width=Math.floor(this.preloadSprite.width/100*this.progress):this.preloadSprite.rect.height=Math.floor(this.preloadSprite.height/100*this.progress),this.preloadSprite.sprite?this.preloadSprite.sprite.updateCrop():this.preloadSprite=null)},totalLoadedFiles:function(){return this._loadedFileCount},totalQueuedFiles:function(){return this._totalFileCount-this._loadedFileCount},totalLoadedPacks:function(){return this._totalPackCount},totalQueuedPacks:function(){return this._totalPackCount-this._loadedPackCount}},Object.defineProperty(c.Loader.prototype,"progressFloat",{get:function(){var a=this._loadedFileCount/this._totalFileCount*100;return c.Math.clamp(a||0,0,100)}}),Object.defineProperty(c.Loader.prototype,"progress",{get:function(){return Math.round(this.progressFloat)}}),c.Loader.prototype.constructor=c.Loader, +c.LoaderParser={bitmapFont:function(a,b,c,d){return this.xmlBitmapFont(a,b,c,d)},xmlBitmapFont:function(a,b,c,d){var e={},f=a.getElementsByTagName("info")[0],g=a.getElementsByTagName("common")[0];e.font=f.getAttribute("face"),e.size=parseInt(f.getAttribute("size"),10),e.lineHeight=parseInt(g.getAttribute("lineHeight"),10)+d,e.chars={};for(var h=a.getElementsByTagName("char"),i=0;i=this.durationMS&&(this.usingWebAudio?this.loop?(this.onLoop.dispatch(this),this.isPlaying=!1,""===this.currentMarker?(this.currentTime=0,this.startTime=this.game.time.time,this.isPlaying=!0):(this.onMarkerComplete.dispatch(this.currentMarker,this),this.play(this.currentMarker,0,this.volume,!0,!0))):""!==this.currentMarker&&this.stop():this.loop?(this.onLoop.dispatch(this),""===this.currentMarker&&(this.currentTime=0,this.startTime=this.game.time.time),this.isPlaying=!1,this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop()))},loopFull:function(a){return this.play(null,0,a,!0)},play:function(a,b,c,d,e){if(void 0!==a&&!1!==a&&null!==a||(a=""),void 0===e&&(e=!0),this.isPlaying&&!this.allowMultiple&&!e&&!this.override)return this;if(this._sound&&this.isPlaying&&!this.allowMultiple&&(this.override||e)){if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);this.isPlaying=!1}var f=Object.keys(this.markers);if(""===a&&1===f.length&&(a=f[0]),""===a&&f.length>0)return this;if(""!==a){if(!this.markers[a])return console.warn("Phaser.Sound.play: audio marker "+a+" doesn't exist"),this;this.currentMarker=a,this.position=this.markers[a].start,this.volume=this.markers[a].volume,this.loop=this.markers[a].loop,this.duration=this.markers[a].duration,this.durationMS=this.markers[a].durationMS,void 0!==c&&(this.volume=c),void 0!==d&&(this.loop=d),this._tempMarker=a,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else b=b||0,void 0===c&&(c=this._volume),void 0===d&&(d=this.loop),this.position=Math.max(0,b),this.volume=c,this.loop=d,this.duration=0,this.durationMS=0,this._tempMarker=a,this._tempPosition=b,this._tempVolume=c,this._tempLoop=d;return this.usingWebAudio?this.game.cache.isSoundDecoded(this.key)?(this._sound=this.context.createBufferSource(),this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this._buffer=this.game.cache.getSoundData(this.key),this._sound.buffer=this._buffer,this.loop&&""===a&&(this._sound.loop=!0),this.loop||""!==a||(this._sound.onended=this.onEndedHandler.bind(this)),this.totalDuration=this._sound.buffer.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=Math.ceil(1e3*this.totalDuration)),void 0===this._sound.start?this._sound.noteGrainOn(0,this.position,this.duration):this.loop&&""===a?this._sound.start(0,0):this._sound.start(0,this.position,this.duration),this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):(this.pendingPlayback=!0,this.game.cache.getSound(this.key)&&!1===this.game.cache.getSound(this.key).isDecoding&&this.game.sound.decode(this.key,this)):this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked?(this.game.cache.reloadSound(this.key),this.pendingPlayback=!0):this._sound&&(this.game.device.wechatMinigame||this.game.device.cocoonJS||4===this._sound.readyState)?(this.loop&&(this._sound.loop=!0),!this.loop&&""===a&&this.game.device.wechatMinigame&&this._sound.addEventListener("ended",this.onEndedHandler.bind(this)),this._sound.play(),this.totalDuration=this._sound.duration,0===this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this._sound.currentTime=this.position,this._sound.muted=this._muted,this._muted||this.game.sound.mute?this._sound.volume=0:this._sound.volume=this._volume,this.isPlaying=!0,this.startTime=this.game.time.time,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):this.pendingPlayback=!0,this},restart:function(a,b,c,d){a=a||"",b=b||0,c=c||1,void 0===d&&(d=!1),this.play(a,b,c,d,!0)},pause:function(){this.isPlaying&&this._sound&&(this.paused=!0,this.pausedPosition=this.currentTime,this.pausedTime=this.game.time.time,this._tempPause=this._sound.currentTime,this.onPause.dispatch(this),this.stop())},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){var a=Math.max(0,this.position+this.pausedPosition/1e3);this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this.externalNode?this._sound.connect(this.externalNode):this._sound.connect(this.gainNode),this.loop&&(this._sound.loop=!0),this.loop||""!==this.currentMarker||(this._sound.onended=this.onEndedHandler.bind(this));var b=this.duration-this.pausedPosition/1e3;void 0===this._sound.start?this._sound.noteGrainOn(0,a,b):this.loop&&this.game.device.chrome?42===this.game.device.chromeVersion?this._sound.start(0):this._sound.start(0,a):this._sound.start(0,a,b)}else this._sound.currentTime=this._tempPause,this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.time-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound)if(this.usingWebAudio){if(void 0===this._sound.stop)this._sound.noteOff(0);else try{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}else this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);if(this.pendingPlayback=!1,this.isPlaying=!1,!this.paused){var a=this.currentMarker;""!==this.currentMarker&&this.onMarkerComplete.dispatch(this.currentMarker,this),this.currentMarker="",null!==this.fadeTween&&this.fadeTween.stop(),this.onStop.dispatch(this,a)}},fadeIn:function(a,b,c){void 0===b&&(b=!1),void 0===c&&(c=this.currentMarker),this.paused||(this.play(c,0,0,b),this.fadeTo(a,1))},fadeOut:function(a){this.fadeTo(a,0)},fadeTo:function(a,b){if(this.isPlaying&&!this.paused&&b!==this.volume){if(void 0===a&&(a=1e3),void 0===b)return void console.warn("Phaser.Sound.fadeTo: No Volume Specified.");this.fadeTween=this.game.add.tween(this).to({volume:b},a,c.Easing.Linear.None,!0),this.fadeTween.onComplete.add(this.fadeComplete,this)}},fadeComplete:function(){this.onFadeComplete.dispatch(this,this.volume),0===this.volume&&this.stop()},updateGlobalVolume:function(a){this.usingAudioTag&&this._sound&&(this._sound.volume=a*this._volume)},destroy:function(a){void 0===a&&(a=!0),this.stop(),a?this.game.sound.remove(this):(this.markers={},this.context=null,this._buffer=null,this.externalNode=null,this.onDecoded.dispose(),this.onPlay.dispose(),this.onPause.dispose(),this.onResume.dispose(),this.onLoop.dispose(),this.onStop.dispose(),this.onMute.dispose(),this.onMarkerComplete.dispose())}},c.Sound.prototype.constructor=c.Sound,Object.defineProperty(c.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(c.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(c.Sound.prototype,"mute",{get:function(){return this._muted||this.game.sound.mute},set:function(a){(a=a||!1)!==this._muted&&(a?(this._muted=!0,this._muteVolume=this._tempVolume,this.game.device.wechatMinigame?this._sound.pause():this.usingWebAudio?this.gainNode.gain.value=0:this.usingAudioTag&&this._sound&&(this._sound.volume=0)):(this._muted=!1,this.game.device.wechatMinigame&&this.isPlaying?this._sound.play():this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this))}}),Object.defineProperty(c.Sound.prototype,"volume",{get:function(){return this._volume},set:function(a){if(this.game.device.firefox&&this.usingAudioTag&&(a=this.game.math.clamp(a,0,1)),this._muted)return void(this._muteVolume=a);this._tempVolume=a,this._volume=a,this.usingWebAudio?this.gainNode.gain.value=a:this.usingAudioTag&&this._sound&&(this._sound.volume=a)}}),c.SoundManager=function(a){this.game=a,this.onSoundDecode=new c.Signal,this.onVolumeChange=new c.Signal,this.onMute=new c.Signal,this.onUnMute=new c.Signal,this.context=null,this.usingWebAudio=!1,this.usingAudioTag=!1,this.noAudio=!1,this.connectToMaster=!0,this.touchLocked=!1,this.channels=32,this.muteOnPause=!0,this._codeMuted=!1,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this._watchList=new c.ArraySet,this._watching=!1,this._watchCallback=null,this._watchContext=null},c.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&!1===this.game.device.webAudio&&(this.channels=1),window.PhaserGlobal){if(!0===window.PhaserGlobal.disableAudio)return this.noAudio=!0,void(this.touchLocked=!1);if(!0===window.PhaserGlobal.disableWebAudio)return this.usingAudioTag=!0,void(this.touchLocked=!1)}if(window.PhaserGlobal&&window.PhaserGlobal.audioContext)this.context=window.PhaserGlobal.audioContext;else if(window.AudioContext)try{this.context=new window.AudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}else if(window.webkitAudioContext)try{this.context=new window.webkitAudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}if(null===this.context){if(void 0===window.Audio)return void(this.noAudio=!0);this.usingAudioTag=!0}else this.usingWebAudio=!0,void 0===this.context.createGain?this.masterGain=this.context.createGainNode():this.masterGain=this.context.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this.context.destination);this.noAudio||!this.game.device.cocoonJS&&(this.game.device.chrome||this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)&&this.setTouchLock()},setTouchLock:function(){this.noAudio||window.PhaserGlobal&&!0===window.PhaserGlobal.disableAudio||(this.game.device.iOSVersion>8||this.game.device.chromeVersion>=55?this.game.input.touch.addTouchLockCallback(this.unlock,this,!0):this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0)},unlock:function(){if(this.noAudio||!this.touchLocked||null!==this._unlockSource)return!0;if(this.usingAudioTag)this.touchLocked=!1,this._unlockSource=null;else if(this.usingWebAudio){var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0},stopAll:function(){if(!this.noAudio)for(var a=0;a1&&(a=1),this._volume!==a){if(this._volume=a,this.usingWebAudio)this.masterGain.gain.value=a;else for(var b=0;b=400?0:100,this.dom.getOffset(this.game.canvas,this.offset);var b=this._parentBounds.width,d=this._parentBounds.height,e=this.getParentBounds(this._parentBounds),f=e.width!==b||e.height!==d,g=this.updateOrientationState();(f||g)&&(this.onResize&&this.onResize.call(this.onResizeContext,this,e),this.updateLayout(),this.signalSizeChange());var h=2*this._updateThrottle;this._updateThrottleb;return i=i?d:!d,i?(a.width=Math.floor(e),a.height=Math.floor(f)):(a.width=Math.floor(g),a.height=Math.floor(h)),a},destroy:function(){this.game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),this.compatibility.supportsFullScreen&&(document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1))}},c.ScaleManager.prototype.constructor=c.ScaleManager,Object.defineProperty(c.ScaleManager.prototype,"boundingParent",{get:function(){return this.parentIsWindow||this.isFullScreen&&this.hasPhaserSetFullScreen&&!this._createdFullScreenTarget?null:this.game.canvas&&this.game.canvas.parentNode||null}}),Object.defineProperty(c.ScaleManager.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(a){return a!==this._scaleMode&&(this.isFullScreen||(this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.queueUpdate(!0)),this._scaleMode=a),this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"fullScreenScaleMode",{get:function(){return this._fullScreenScaleMode},set:function(a){return a!==this._fullScreenScaleMode&&(this.isFullScreen?(this.prepScreenMode(!1),this._fullScreenScaleMode=a,this.prepScreenMode(!0),this.queueUpdate(!0)):this._fullScreenScaleMode=a),this._fullScreenScaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"currentScaleMode",{get:function(){return this.isFullScreen?this._fullScreenScaleMode:this._scaleMode}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignHorizontally",{get:function(){return this._pageAlignHorizontally},set:function(a){a!==this._pageAlignHorizontally&&(this._pageAlignHorizontally=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"pageAlignVertically",{get:function(){return this._pageAlignVertically},set:function(a){a!==this._pageAlignVertically&&(this._pageAlignVertically=a,this.queueUpdate(!0))}}),Object.defineProperty(c.ScaleManager.prototype,"isFullScreen",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),Object.defineProperty(c.ScaleManager.prototype,"isPortrait",{get:function(){return"portrait"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isLandscape",{get:function(){return"landscape"===this.classifyOrientation(this.screenOrientation)}}),Object.defineProperty(c.ScaleManager.prototype,"isGamePortrait",{get:function(){return this.height>this.width}}),Object.defineProperty(c.ScaleManager.prototype,"isGameLandscape",{get:function(){return this.width>this.height}}),c.Utils.Debug=function(a){this.game=a,this.sprite=null,this.bmd=null,this.canvas=null,this.context=null,this.font="14px Courier",this.columnWidth=100,this.lineHeight=16,this.renderShadow=!0,this.currentX=0,this.currentY=0,this.currentAlpha=1,this.dirty=!1},c.Utils.Debug.prototype={boot:function(){this.game.renderType===c.CANVAS?this.context=this.game.context:(this.bmd=new c.BitmapData(this.game,"__DEBUG",this.game.width,this.game.height,!0),this.sprite=this.game.make.image(0,0,this.bmd),this.game.stage.addChild(this.sprite),this.game.scale.onSizeChange.add(this.resize,this),this.canvas=PIXI.CanvasPool.create(this,this.game.width,this.game.height),this.context=this.canvas.getContext("2d"))},resize:function(a,b,c){this.bmd.resize(b,c),this.canvas.width=b,this.canvas.height=c},preUpdate:function(){this.dirty&&this.sprite&&(this.bmd.clear(),this.bmd.draw(this.canvas,0,0),this.context.clearRect(0,0,this.game.width,this.game.height),this.dirty=!1)},reset:function(){this.context&&this.context.clearRect(0,0,this.game.width,this.game.height),this.sprite&&this.bmd.clear()},start:function(a,b,c,d){"number"!=typeof a&&(a=0),"number"!=typeof b&&(b=0),c=c||"rgb(255,255,255)",void 0===d&&(d=0),this.currentX=a,this.currentY=b,this.currentColor=c,this.columnWidth=d,this.dirty=!0,this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.strokeStyle=c,this.context.fillStyle=c,this.context.font=this.font,this.context.globalAlpha=this.currentAlpha},stop:function(){this.context.restore()},line:function(){for(var a=this.currentX,b=0;b0)for(var b=0;b=0&&c.right>=0&&c.top<=this.layoutBounds.width&&c.left<=this.layoutBounds.height},getScreenOrientation:function(a){var b=window.screen,c=b.orientation||b.mozOrientation||b.msOrientation;if(c&&"string"==typeof c.type)return c.type;if("string"==typeof c)return c;var d="portrait-primary",e="landscape-primary";if("screen"===a)return b.height>b.width?d:e;if("viewport"===a)return this.visualBounds.height>this.visualBounds.width?d:e;if("window.orientation"===a&&"number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?d:e;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d;if(window.matchMedia("(orientation: landscape)").matches)return e}return this.visualBounds.height>this.visualBounds.width?d:e},visualBounds:new c.Rectangle,layoutBounds:new c.Rectangle,documentBounds:new c.Rectangle},c.Device.whenReady(function(a){var b=window&&"pageXOffset"in window?function(){return window.pageXOffset}:function(){return document.documentElement.scrollLeft},d=window&&"pageYOffset"in window?function(){return window.pageYOffset}:function(){return document.documentElement.scrollTop};if(Object.defineProperty(c.DOM,"scrollX",{get:b}),Object.defineProperty(c.DOM,"scrollY",{get:d}),Object.defineProperty(c.DOM.visualBounds,"x",{get:b}),Object.defineProperty(c.DOM.visualBounds,"y",{get:d}),Object.defineProperty(c.DOM.layoutBounds,"x",{value:0}),Object.defineProperty(c.DOM.layoutBounds,"y",{value:0}),a.desktop&&document.documentElement.clientWidth<=window.innerWidth&&document.documentElement.clientHeight<=window.innerHeight){var e=function(){return Math.max(window.innerWidth,document.documentElement.clientWidth)},f=function(){return Math.max(window.innerHeight,document.documentElement.clientHeight)};Object.defineProperty(c.DOM.visualBounds,"width",{get:e}),Object.defineProperty(c.DOM.visualBounds,"height",{get:f}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:e}),Object.defineProperty(c.DOM.layoutBounds,"height",{get:f})}else Object.defineProperty(c.DOM.visualBounds,"width",{get:function(){return window.innerWidth}}),Object.defineProperty(c.DOM.visualBounds,"height",{get:function(){return window.innerHeight}}),Object.defineProperty(c.DOM.layoutBounds,"width",{get:function(){var a=document.documentElement.clientWidth,b=window.innerWidth;return a-1},reset:function(){this.list.length=0},remove:function(a){var b=this.list.indexOf(a);if(b>-1)return this.list.splice(b,1),a},setAll:function(a,b){for(var c=this.list.length;c--;)this.list[c]&&(this.list[c][a]=b)},callAll:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=this.list.length;c--;)this.list[c]&&this.list[c][a]&&this.list[c][a].apply(this.list[c],b)},removeAll:function(a){void 0===a&&(a=!1);for(var b=this.list.length;b--;)if(this.list[b]){var c=this.remove(this.list[b]);a&&c.destroy()}this.position=0,this.list=[]}},Object.defineProperty(c.ArraySet.prototype,"total",{get:function(){return this.list.length}}),Object.defineProperty(c.ArraySet.prototype,"first",{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}}),Object.defineProperty(c.ArraySet.prototype,"next",{get:function(){return this.position0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a},transposeMatrix:function(a){for(var b=a.length,c=a[0].length,d=new Array(c),e=0;e-1;f--)d[e][f]=a[f][e]}return d},rotateMatrix:function(a,b){if("string"!=typeof b&&(b=(b%360+360)%360),90===b||-270===b||"rotateLeft"===b)a=c.ArrayUtils.transposeMatrix(a),a=a.reverse();else if(-90===b||270===b||"rotateRight"===b)a=a.reverse(),a=c.ArrayUtils.transposeMatrix(a);else if(180===Math.abs(b)||"rotate180"===b){for(var d=0;d>>0:(a<<24|b<<16|d<<8|e)>>>0},unpackPixel:function(a,b,d,e){return void 0!==b&&null!==b||(b=c.Color.createColor()),void 0!==d&&null!==d||(d=!1),void 0!==e&&null!==e||(e=!1),c.Device.LITTLE_ENDIAN?(b.a=(4278190080&a)>>>24,b.b=(16711680&a)>>>16,b.g=(65280&a)>>>8,b.r=255&a):(b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a),b.color=a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a/255+")",d&&c.Color.RGBtoHSL(b.r,b.g,b.b,b),e&&c.Color.RGBtoHSV(b.r,b.g,b.b,b),b},fromRGBA:function(a,b){return b||(b=c.Color.createColor()),b.r=(4278190080&a)>>>24,b.g=(16711680&a)>>>16,b.b=(65280&a)>>>8,b.a=255&a,b.rgba="rgba("+b.r+","+b.g+","+b.b+","+b.a+")",b},toRGBA:function(a,b,c,d){return a<<24|b<<16|c<<8|d},toABGR:function(a,b,c,d){return(d<<24|c<<16|b<<8|a)>>>0},RGBtoHSL:function(a,b,d,e){e||(e=c.Color.createColor(a,b,d,1)),a/=255,b/=255,d/=255;var f=Math.min(a,b,d),g=Math.max(a,b,d);if(e.h=0,e.s=0,e.l=(g+f)/2,g!==f){var h=g-f;e.s=e.l>.5?h/(2-g-f):h/(g+f),g===a?e.h=(b-d)/h+(b1&&(c-=1),c<1/6?a+6*(b-a)*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},createColor:function(a,b,d,e,f,g,h,i){var j={r:a||0,g:b||0,b:d||0,a:e||1,h:f||0,s:g||0,l:h||0,v:i||0,color:0,color32:0,rgba:""};return c.Color.updateColor(j)},updateColor:function(a){return a.rgba="rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+a.a.toString()+")",a.color=c.Color.getColor(a.r,a.g,a.b),a.color32=c.Color.getColor32(255*a.a,a.r,a.g,a.b),a},getColor32:function(a,b,c,d){return a<<24|b<<16|c<<8|d},getColor:function(a,b,c){return a<<16|b<<8|c},RGBtoString:function(a,b,d,e,f){return void 0===e&&(e=255),void 0===f&&(f="#"),"#"===f?"#"+((1<<24)+(a<<16)+(b<<8)+d).toString(16).slice(1):"0x"+c.Color.componentToHex(e)+c.Color.componentToHex(a)+c.Color.componentToHex(b)+c.Color.componentToHex(d)},hexToRGB:function(a){var b=c.Color.hexToColor(a);if(b)return c.Color.getColor32(b.a,b.r,b.g,b.b)},hexToColor:function(a,b){a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});var d=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(d){var e=parseInt(d[1],16),f=parseInt(d[2],16),g=parseInt(d[3],16);b?(b.r=e,b.g=f,b.b=g):b=c.Color.createColor(e,f,g)}return b},webToColor:function(a,b){b||(b=c.Color.createColor());var d=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a);return d&&(b.r=parseInt(d[1],10),b.g=parseInt(d[2],10),b.b=parseInt(d[3],10),b.a=void 0!==d[4]?parseFloat(d[4]):1,c.Color.updateColor(b)),b},valueToColor:function(a,b){if(b||(b=c.Color.createColor()),"string"==typeof a)return 0===a.indexOf("rgb")?c.Color.webToColor(a,b):(b.a=1,c.Color.hexToColor(a,b));if("number"==typeof a){var d=c.Color.getRGB(a);return b.r=d.r,b.g=d.g,b.b=d.b,b.a=d.a/255,b}return b},componentToHex:function(a){var b=a.toString(16);return 1===b.length?"0"+b:b},HSVColorWheel:function(a,b){void 0===a&&(a=1),void 0===b&&(b=1);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSVtoRGB(e/359,a,b));return d},HSLColorWheel:function(a,b){void 0===a&&(a=.5),void 0===b&&(b=.5);for(var d=[],e=0;e<=359;e++)d.push(c.Color.HSLtoRGB(e/359,a,b));return d},interpolateColor:function(a,b,d,e,f){void 0===f&&(f=255);var g=c.Color.getRGB(a),h=c.Color.getRGB(b),i=(h.red-g.red)*e/d+g.red,j=(h.green-g.green)*e/d+g.green,k=(h.blue-g.blue)*e/d+g.blue;return c.Color.getColor32(f,i,j,k)},interpolateColorWithRGB:function(a,b,d,e,f,g){var h=c.Color.getRGB(a),i=(b-h.red)*g/f+h.red,j=(d-h.green)*g/f+h.green,k=(e-h.blue)*g/f+h.blue;return c.Color.getColor(i,j,k)},interpolateRGB:function(a,b,d,e,f,g,h,i){var j=(e-a)*i/h+a,k=(f-b)*i/h+b,l=(g-d)*i/h+d;return c.Color.getColor(j,k,l)},getRandomColor:function(a,b,d){if(void 0===a&&(a=0),void 0===b&&(b=255),void 0===d&&(d=255),b>255||a>b)return c.Color.getColor(255,255,255);var e=a+Math.round(Math.random()*(b-a)),f=a+Math.round(Math.random()*(b-a)),g=a+Math.round(Math.random()*(b-a));return c.Color.getColor32(d,e,f,g)},getRGB:function(a){return a>16777215?{alpha:a>>>24,red:a>>16&255,green:a>>8&255,blue:255&a,a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{alpha:255,red:a>>16&255,green:a>>8&255,blue:255&a,a:255,r:a>>16&255,g:a>>8&255,b:255&a}},getWebRGB:function(a){if("object"==typeof a)return"rgba("+a.r.toString()+","+a.g.toString()+","+a.b.toString()+","+(a.a/255).toString()+")";var b=c.Color.getRGB(a);return"rgba("+b.r.toString()+","+b.g.toString()+","+b.b.toString()+","+(b.a/255).toString()+")"},getAlpha:function(a){return a>>>24},getAlphaFloat:function(a){return(a>>>24)/255},getRed:function(a){return a>>16&255},getGreen:function(a){return a>>8&255},getBlue:function(a){return 255&a},blendNormal:function(a){return a},blendLighten:function(a,b){return b>a?b:a},blendDarken:function(a,b){return b>a?a:b},blendMultiply:function(a,b){return a*b/255},blendAverage:function(a,b){return(a+b)/2},blendAdd:function(a,b){return Math.min(255,a+b)},blendSubtract:function(a,b){return Math.max(0,a+b-255)},blendDifference:function(a,b){return Math.abs(a-b)},blendNegation:function(a,b){return 255-Math.abs(255-a-b)},blendScreen:function(a,b){return 255-((255-a)*(255-b)>>8)},blendExclusion:function(a,b){return a+b-2*a*b/255},blendOverlay:function(a,b){return b<128?2*a*b/255:255-2*(255-a)*(255-b)/255},blendSoftLight:function(a,b){return b<128?2*(64+(a>>1))*(b/255):255-2*(255-(64+(a>>1)))*(255-b)/255},blendHardLight:function(a,b){return c.Color.blendOverlay(b,a)},blendColorDodge:function(a,b){return 255===b?b:Math.min(255,(a<<8)/(255-b))},blendColorBurn:function(a,b){return 0===b?b:Math.max(0,255-(255-a<<8)/b)},blendLinearDodge:function(a,b){return c.Color.blendAdd(a,b)},blendLinearBurn:function(a,b){return c.Color.blendSubtract(a,b)},blendLinearLight:function(a,b){return b<128?c.Color.blendLinearBurn(a,2*b):c.Color.blendLinearDodge(a,2*(b-128))},blendVividLight:function(a,b){return b<128?c.Color.blendColorBurn(a,2*b):c.Color.blendColorDodge(a,2*(b-128))},blendPinLight:function(a,b){return b<128?c.Color.blendDarken(a,2*b):c.Color.blendLighten(a,2*(b-128))},blendHardMix:function(a,b){return c.Color.blendVividLight(a,b)<128?0:255},blendReflect:function(a,b){return 255===b?b:Math.min(255,a*a/(255-b))},blendGlow:function(a,b){return c.Color.blendReflect(b,a)},blendPhoenix:function(a,b){return Math.min(a,b)-Math.max(a,b)+255}},c.Physics=function(a,b){b=b||{},this.game=a,this.config=b,this.arcade=null,this.p2=null,this.ninja=null,this.box2d=null,this.chipmunk=null,this.matter=null,this.parseConfig()},c.Physics.ARCADE=0,c.Physics.P2JS=1,c.Physics.NINJA=2,c.Physics.BOX2D=3,c.Physics.CHIPMUNK=4,c.Physics.MATTERJS=5,c.Physics.prototype={parseConfig:function(){this.config.hasOwnProperty("arcade")&&!0!==this.config.arcade||!c.Physics.hasOwnProperty("Arcade")||(this.arcade=new c.Physics.Arcade(this.game)),this.config.hasOwnProperty("ninja")&&!0===this.config.ninja&&c.Physics.hasOwnProperty("Ninja")&&(this.ninja=new c.Physics.Ninja(this.game)),this.config.hasOwnProperty("p2")&&!0===this.config.p2&&c.Physics.hasOwnProperty("P2")&&(this.p2=new c.Physics.P2(this.game,this.config)),this.config.hasOwnProperty("box2d")&&!0===this.config.box2d&&c.Physics.hasOwnProperty("BOX2D")&&(this.box2d=new c.Physics.BOX2D(this.game,this.config)),this.config.hasOwnProperty("matter")&&!0===this.config.matter&&c.Physics.hasOwnProperty("Matter")&&(this.matter=new c.Physics.Matter(this.game,this.config))},startSystem:function(a){a===c.Physics.ARCADE?this.arcade=new c.Physics.Arcade(this.game):a===c.Physics.P2JS?null===this.p2?this.p2=new c.Physics.P2(this.game,this.config):this.p2.reset():a===c.Physics.NINJA?this.ninja=new c.Physics.Ninja(this.game):a===c.Physics.BOX2D?null===this.box2d?this.box2d=new c.Physics.Box2D(this.game,this.config):this.box2d.reset():a===c.Physics.MATTERJS&&(null===this.matter?this.matter=new c.Physics.Matter(this.game,this.config):this.matter.reset())},enable:function(a,b,d){void 0===b&&(b=c.Physics.ARCADE),void 0===d&&(d=!1),b===c.Physics.ARCADE?this.arcade.enable(a):b===c.Physics.P2JS&&this.p2?this.p2.enable(a,d):b===c.Physics.NINJA&&this.ninja?this.ninja.enableAABB(a):b===c.Physics.BOX2D&&this.box2d?this.box2d.enable(a):b===c.Physics.MATTERJS&&this.matter?this.matter.enable(a):console.warn(a.key+" is attempting to enable a physics body using an unknown physics system.")},preUpdate:function(){this.p2&&this.p2.preUpdate(),this.box2d&&this.box2d.preUpdate(),this.matter&&this.matter.preUpdate()},update:function(){this.p2&&this.p2.update(),this.box2d&&this.box2d.update(),this.matter&&this.matter.update()},setBoundsToWorld:function(){this.arcade&&this.arcade.setBoundsToWorld(),this.ninja&&this.ninja.setBoundsToWorld(),this.p2&&this.p2.setBoundsToWorld(),this.box2d&&this.box2d.setBoundsToWorld(),this.matter&&this.matter.setBoundsToWorld()},clear:function(){this.p2&&this.p2.clear(),this.box2d&&this.box2d.clear(),this.matter&&this.matter.clear()},reset:function(){this.p2&&this.p2.reset(),this.box2d&&this.box2d.reset(),this.matter&&this.matter.reset()},destroy:function(){this.p2&&this.p2.destroy(),this.box2d&&this.box2d.destroy(),this.matter&&this.matter.destroy(),this.arcade=null,this.ninja=null,this.p2=null,this.box2d=null,this.matter=null}},c.Physics.prototype.constructor=c.Physics,c.Physics.Arcade=function(a){this.game=a,this.gravity=new c.Point,this.bounds=new c.Rectangle(0,0,a.world.width,a.world.height),this.checkCollision={up:!0,down:!0,left:!0,right:!0},this.maxObjects=10,this.maxLevels=4,this.OVERLAP_BIAS=4,this.forceX=!1,this.sortDirection=c.Physics.Arcade.LEFT_RIGHT,this.skipQuadTree=!0,this.isPaused=!1,this.quadTree=new c.QuadTree(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this._total=0,this.setBoundsToWorld()},c.Physics.Arcade.prototype.constructor=c.Physics.Arcade,c.Physics.Arcade.SORT_NONE=0,c.Physics.Arcade.LEFT_RIGHT=1,c.Physics.Arcade.RIGHT_LEFT=2,c.Physics.Arcade.TOP_BOTTOM=3,c.Physics.Arcade.BOTTOM_TOP=4,c.Physics.Arcade.prototype={setBounds:function(a,b,c,d){this.bounds.setTo(a,b,c,d)},setBoundsToWorld:function(){this.bounds.copyFrom(this.game.world.bounds)},enable:function(a,b){void 0===b&&(b=!0);var d=1;if(Array.isArray(a))for(d=a.length;d--;)a[d]instanceof c.Group?this.enable(a[d].children,b):(this.enableBody(a[d]),b&&a[d].hasOwnProperty("children")&&a[d].children.length>0&&this.enable(a[d],!0));else a instanceof c.Group?this.enable(a.children,b):(this.enableBody(a),b&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,!0))},enableBody:function(a){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.Arcade.Body(a),a.parent&&a.parent instanceof c.Group&&a.parent.addToHash(a))},updateMotion:function(a){var b=this.computeVelocity(0,a,a.angularVelocity,a.angularAcceleration,a.angularDrag,a.maxAngular)-a.angularVelocity;a.angularVelocity+=b,a.rotation+=a.angularVelocity*this.game.time.physicsElapsed,a.velocity.x=this.computeVelocity(1,a,a.velocity.x,a.acceleration.x,a.drag.x,a.maxVelocity.x),a.velocity.y=this.computeVelocity(2,a,a.velocity.y,a.acceleration.y,a.drag.y,a.maxVelocity.y)},computeVelocity:function(a,b,c,d,e,f){return void 0===f&&(f=1e4),1===a&&b.allowGravity?c+=(this.gravity.x+b.gravity.x)*this.game.time.physicsElapsed:2===a&&b.allowGravity&&(c+=(this.gravity.y+b.gravity.y)*this.game.time.physicsElapsed),d?c+=d*this.game.time.physicsElapsed:e&&(e*=this.game.time.physicsElapsed,c-e>0?c-=e:c+e<0?c+=e:c=0),c>f?c=f:c<-f&&(c=-f),c},overlap:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},collide:function(a,b,c,d,e){if(c=c||null,d=d||null,e=e||c,this._total=0,!Array.isArray(a)&&Array.isArray(b))for(var f=0;f0},sortLeftRight:function(a,b){return a.body&&b.body?a.body.x-b.body.x:0},sortRightLeft:function(a,b){return a.body&&b.body?b.body.x-a.body.x:0},sortTopBottom:function(a,b){return a.body&&b.body?a.body.y-b.body.y:0},sortBottomTop:function(a,b){return a.body&&b.body?b.body.y-a.body.y:0},sort:function(a,b){null!==a.physicsSortDirection?b=a.physicsSortDirection:void 0===b&&(b=this.sortDirection),b===c.Physics.Arcade.LEFT_RIGHT?a.hash.sort(this.sortLeftRight):b===c.Physics.Arcade.RIGHT_LEFT?a.hash.sort(this.sortRightLeft):b===c.Physics.Arcade.TOP_BOTTOM?a.hash.sort(this.sortTopBottom):b===c.Physics.Arcade.BOTTOM_TOP&&a.hash.sort(this.sortBottomTop)},collideHandler:function(a,b,d,e,f,g){if(void 0===b&&a.physicsType===c.GROUP)return this.sort(a),void this.collideGroupVsSelf(a,d,e,f,g);a&&b&&a.exists&&b.exists&&(this.sortDirection!==c.Physics.Arcade.SORT_NONE&&(a.physicsType===c.GROUP&&this.sort(a),b.physicsType===c.GROUP&&this.sort(b)),a.physicsType===c.SPRITE?b.physicsType===c.SPRITE?this.collideSpriteVsSprite(a,b,d,e,f,g):b.physicsType===c.GROUP?this.collideSpriteVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.GROUP?b.physicsType===c.SPRITE?this.collideSpriteVsGroup(b,a,d,e,f,g):b.physicsType===c.GROUP?this.collideGroupVsGroup(a,b,d,e,f,g):b.physicsType===c.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,d,e,f,g):a.physicsType===c.TILEMAPLAYER&&(b.physicsType===c.SPRITE?this.collideSpriteVsTilemapLayer(b,a,d,e,f,g):b.physicsType===c.GROUP&&this.collideGroupVsTilemapLayer(b,a,d,e,f,g)))},collideSpriteVsSprite:function(a,b,c,d,e,f){return!(!a.body||!b.body)&&(this.separate(a.body,b.body,d,e,f)&&(c&&c.call(e,a,b),this._total++),!0)},collideSpriteVsGroup:function(a,b,d,e,f,g){if(0!==b.length&&a.body)if(this.skipQuadTree||a.body.skipQuadTree)for(var h={},i=0;ih.right)break;if(h.x>a.body.right)continue}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(a.body.bottomh.bottom)break;if(h.y>a.body.bottom)continue}this.collideSpriteVsSprite(a,j,d,e,f,g)}}else{this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(b);for(var k=this.quadTree.retrieve(a),i=0;ik.right)continue;if(k.x>h.right)break}else if(this.sortDirection===c.Physics.Arcade.TOP_BOTTOM){if(h.bottomk.bottom)continue;if(k.y>i.body.bottom)break}this.collideSpriteVsSprite(i,l,b,d,e,f)}}}}},collideGroupVsGroup:function(a,b,d,e,f,g){if(0!==a.length&&0!==b.length)for(var h=0;hh.bottom)&&(i.xh.right))return this.separateCircle(a,b,e)}var j=!1,k=!1;this.forceX||Math.abs(this.gravity.y+a.gravity.y)=b.right)&&!(a.position.y>=b.bottom))))},circleBodyIntersects:function(a,b){var d=c.Math.clamp(a.center.x,b.left,b.right),e=c.Math.clamp(a.center.y,b.top,b.bottom);return(a.center.x-d)*(a.center.x-d)+(a.center.y-e)*(a.center.y-e)<=a.radius*a.radius},separateCircle:function(a,b,d){this.getOverlapX(a,b),this.getOverlapY(a,b);var e=b.center.x-a.center.x,f=b.center.y-a.center.y,g=Math.atan2(f,e),h=0;if(a.isCircle!==b.isCircle){var i={x:b.isCircle?a.position.x:b.position.x,y:b.isCircle?a.position.y:b.position.y,right:b.isCircle?a.right:b.right,bottom:b.isCircle?a.bottom:b.bottom},j={x:a.isCircle?a.position.x+a.radius:b.position.x+b.radius,y:a.isCircle?a.position.y+a.radius:b.position.y+b.radius,radius:a.isCircle?a.radius:b.radius};j.yi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.y)-j.radius):j.y>i.bottom&&(j.xi.right&&(h=c.Math.distance(j.x,j.y,i.right,i.bottom)-j.radius)),h*=-1}else h=a.radius+b.radius-c.Math.distance(a.center.x,a.center.y,b.center.x,b.center.y);if(d||0===h||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==h&&(a.onOverlap&&a.onOverlap.dispatch(a.sprite,b.sprite),b.onOverlap&&b.onOverlap.dispatch(b.sprite,a.sprite)),0!==h;var k={x:a.velocity.x*Math.cos(g)+a.velocity.y*Math.sin(g),y:a.velocity.x*Math.sin(g)-a.velocity.y*Math.cos(g)},l={x:b.velocity.x*Math.cos(g)+b.velocity.y*Math.sin(g),y:b.velocity.x*Math.sin(g)-b.velocity.y*Math.cos(g)},m=((a.mass-b.mass)*k.x+2*b.mass*l.x)/(a.mass+b.mass),n=(2*a.mass*k.x+(b.mass-a.mass)*l.x)/(a.mass+b.mass);return a.immovable||(a.velocity.x=(m*Math.cos(g)-k.y*Math.sin(g))*a.bounce.x,a.velocity.y=(k.y*Math.cos(g)+m*Math.sin(g))*a.bounce.y),b.immovable||(b.velocity.x=(n*Math.cos(g)-l.y*Math.sin(g))*b.bounce.x,b.velocity.y=(l.y*Math.cos(g)+n*Math.sin(g))*b.bounce.y),Math.abs(g)0&&!a.immovable&&b.velocity.x>a.velocity.x?a.velocity.x*=-1:b.velocity.x<0&&!b.immovable&&a.velocity.x0&&!a.immovable&&b.velocity.y>a.velocity.y?a.velocity.y*=-1:b.velocity.y<0&&!b.immovable&&a.velocity.yMath.PI/2&&(a.velocity.x<0&&!a.immovable&&b.velocity.x0&&!b.immovable&&a.velocity.x>b.velocity.x?b.velocity.x*=-1:a.velocity.y<0&&!a.immovable&&b.velocity.y0&&!b.immovable&&a.velocity.x>b.velocity.y&&(b.velocity.y*=-1)),a.immovable||(a.x+=a.velocity.x*this.game.time.physicsElapsed-h*Math.cos(g),a.y+=a.velocity.y*this.game.time.physicsElapsed-h*Math.sin(g)),b.immovable||(b.x+=b.velocity.x*this.game.time.physicsElapsed+h*Math.cos(g),b.y+=b.velocity.y*this.game.time.physicsElapsed+h*Math.sin(g)),a.onCollide&&a.onCollide.dispatch(a.sprite,b.sprite),b.onCollide&&b.onCollide.dispatch(b.sprite,a.sprite),!0},getOverlapX:function(a,b,c){var d=0,e=a.deltaAbsX()+b.deltaAbsX()+this.OVERLAP_BIAS;return 0===a.deltaX()&&0===b.deltaX()?(a.embedded=!0,b.embedded=!0):a.deltaX()>b.deltaX()?(d=a.right-b.x,d>e&&!c||!1===a.checkCollision.right||!1===b.checkCollision.left?d=0:(a.touching.none=!1,a.touching.right=!0,b.touching.none=!1,b.touching.left=!0)):a.deltaX()e&&!c||!1===a.checkCollision.left||!1===b.checkCollision.right?d=0:(a.touching.none=!1,a.touching.left=!0,b.touching.none=!1,b.touching.right=!0)),a.overlapX=d,b.overlapX=d,d},getOverlapY:function(a,b,c){var d=0,e=a.deltaAbsY()+b.deltaAbsY()+this.OVERLAP_BIAS;return 0===a.deltaY()&&0===b.deltaY()?(a.embedded=!0,b.embedded=!0):a.deltaY()>b.deltaY()?(d=a.bottom-b.y,d>e&&!c||!1===a.checkCollision.down||!1===b.checkCollision.up?d=0:(a.touching.none=!1,a.touching.down=!0,b.touching.none=!1,b.touching.up=!0)):a.deltaY()e&&!c||!1===a.checkCollision.up||!1===b.checkCollision.down?d=0:(a.touching.none=!1,a.touching.up=!0,b.touching.none=!1,b.touching.down=!0)),a.overlapY=d,b.overlapY=d,d},separateX:function(a,b,c){var d=this.getOverlapX(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateX||b.customSeparateX)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.x,f=b.velocity.x;if(a.immovable||b.immovable)a.immovable?(b.x+=d,b.velocity.x=e-f*b.bounce.x,a.moves&&(b.y+=(a.y-a.prev.y)*a.friction.y)):(a.x-=d,a.velocity.x=f-e*a.bounce.x,b.moves&&(a.y+=(b.y-b.prev.y)*b.friction.y));else{d*=.5,a.x-=d,b.x+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.x=i+g*a.bounce.x,b.velocity.x=i+h*b.bounce.x}return!0},separateY:function(a,b,c){var d=this.getOverlapY(a,b,c);if(c||0===d||a.immovable&&b.immovable||a.customSeparateY||b.customSeparateY)return 0!==d||a.embedded&&b.embedded;var e=a.velocity.y,f=b.velocity.y;if(a.immovable||b.immovable)a.immovable?(b.y+=d,b.velocity.y=e-f*b.bounce.y,a.moves&&(b.x+=(a.x-a.prev.x)*a.friction.x)):(a.y-=d,a.velocity.y=f-e*a.bounce.y,b.moves&&(a.x+=(b.x-b.prev.x)*b.friction.x));else{d*=.5,a.y-=d,b.y+=d;var g=Math.sqrt(f*f*b.mass/a.mass)*(f>0?1:-1),h=Math.sqrt(e*e*a.mass/b.mass)*(e>0?1:-1),i=.5*(g+h);g-=i,h-=i,a.velocity.y=i+g*a.bounce.y,b.velocity.y=i+h*b.bounce.y}return!0},getObjectsUnderPointer:function(a,b,c,d){if(0!==b.length&&a.exists)return this.getObjectsAtLocation(a.x,a.y,b,c,d,a)},getObjectsAtLocation:function(a,b,d,e,f,g){this.quadTree.clear(),this.quadTree.reset(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTree.populate(d);for(var h=new c.Rectangle(a,b,1,1),i=[],j=this.quadTree.retrieve(h),k=0;k0&&(c=this.distanceBetween(a,b)/(d/1e3)),a.body.velocity.x=Math.cos(e)*c,a.body.velocity.y=Math.sin(e)*c,e},moveToPointer:function(a,b,c,d){void 0===b&&(b=60),c=c||this.game.input.activePointer,void 0===d&&(d=0);var e=this.angleToPointer(a,c);return d>0&&(b=this.distanceToPointer(a,c)/(d/1e3)),a.body.velocity.x=Math.cos(e)*b,a.body.velocity.y=Math.sin(e)*b,e},moveToXY:function(a,b,c,d,e){void 0===d&&(d=60),void 0===e&&(e=0);var f=Math.atan2(c-a.y,b-a.x);return e>0&&(d=this.distanceToXY(a,b,c)/(e/1e3)),a.body.velocity.x=Math.cos(f)*d,a.body.velocity.y=Math.sin(f)*d,f},velocityFromAngle:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(this.game.math.degToRad(a))*b,Math.sin(this.game.math.degToRad(a))*b)},velocityFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerationFromRotation:function(a,b,d){return void 0===b&&(b=60),d=d||new c.Point,d.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerateToObject:function(a,b,c,d,e){void 0===c&&(c=60),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleBetween(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToPointer:function(a,b,c,d,e){void 0===c&&(c=60),void 0===b&&(b=this.game.input.activePointer),void 0===d&&(d=1e3),void 0===e&&(e=1e3);var f=this.angleToPointer(a,b);return a.body.acceleration.setTo(Math.cos(f)*c,Math.sin(f)*c),a.body.maxVelocity.setTo(d,e),f},accelerateToXY:function(a,b,c,d,e,f){void 0===d&&(d=60),void 0===e&&(e=1e3),void 0===f&&(f=1e3);var g=this.angleToXY(a,b,c);return a.body.acceleration.setTo(Math.cos(g)*d,Math.sin(g)*d),a.body.maxVelocity.setTo(e,f),g},distanceBetween:function(a,b,c){void 0===c&&(c=!1);var d=c?a.world.x-b.world.x:a.x-b.x,e=c?a.world.y-b.world.y:a.y-b.y;return Math.sqrt(d*d+e*e)},distanceToXY:function(a,b,c,d){void 0===d&&(d=!1);var e=d?a.world.x-b:a.x-b,f=d?a.world.y-c:a.y-c;return Math.sqrt(e*e+f*f)},distanceToPointer:function(a,b,c){void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1);var d=c?a.world.x-b.worldX:a.x-b.worldX,e=c?a.world.y-b.worldY:a.y-b.worldY;return Math.sqrt(d*d+e*e)},angleBetween:function(a,b,c){return void 0===c&&(c=!1),c?Math.atan2(b.world.y-a.world.y,b.world.x-a.world.x):Math.atan2(b.y-a.y,b.x-a.x)},angleBetweenCenters:function(a,b){var c=b.centerX-a.centerX,d=b.centerY-a.centerY;return Math.atan2(d,c)},angleToXY:function(a,b,c,d){return void 0===d&&(d=!1),d?Math.atan2(c-a.world.y,b-a.world.x):Math.atan2(c-a.y,b-a.x)},angleToPointer:function(a,b,c){return void 0===b&&(b=this.game.input.activePointer),void 0===c&&(c=!1),c?Math.atan2(b.worldY-a.world.y,b.worldX-a.world.x):Math.atan2(b.worldY-a.y,b.worldX-a.x)},worldAngleToPointer:function(a,b){return this.angleToPointer(a,b,!0)}},c.Physics.Arcade.Body=function(a){this.sprite=a,this.game=a.game,this.type=c.Physics.ARCADE,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c.Point,this.position=new c.Point(a.x,a.y),this.prev=new c.Point(this.position.x,this.position.y),this.allowRotation=!0,this.rotation=a.angle,this.preRotation=a.angle,this.width=a.width,this.height=a.height,this.sourceWidth=a.width,this.sourceHeight=a.height,a.texture&&(this.sourceWidth=a.texture.frame.width,this.sourceHeight=a.texture.frame.height),this.halfWidth=Math.abs(a.width/2),this.halfHeight=Math.abs(a.height/2),this.center=new c.Point(a.x+this.halfWidth,a.y+this.halfHeight),this.velocity=new c.Point,this.newVelocity=new c.Point,this.deltaMax=new c.Point,this.acceleration=new c.Point,this.drag=new c.Point,this.allowGravity=!0,this.gravity=new c.Point,this.bounce=new c.Point,this.worldBounce=null,this.onWorldBounds=null,this.onCollide=null,this.onOverlap=null,this.maxVelocity=new c.Point(1e4,1e4),this.friction=new c.Point(1,0),this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=c.NONE,this.immovable=!1,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={up:!1,down:!1,left:!1,right:!1},this.tilePadding=new c.Point,this.dirty=!1,this.skipQuadTree=!1,this.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.moveTimer=0,this.moveDistance=0,this.moveDuration=0,this.moveTarget=null,this.moveEnd=null,this.onMoveComplete=new c.Signal,this.movementCallback=null,this.movementCallbackContext=null,this._reset=!0,this._sx=a.scale.x,this._sy=a.scale.y,this._dx=0,this._dy=0},c.Physics.Arcade.Body.prototype={updateBounds:function(){if(this.syncBounds){var a=this.sprite.getBounds();a.ceilAll(),a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._reset=!0)}else{var b=Math.abs(this.sprite.scale.x),c=Math.abs(this.sprite.scale.y);b===this._sx&&c===this._sy||(this.width=this.sourceWidth*b,this.height=this.sourceHeight*c,this._sx=b,this._sy=c,this._reset=!0)}this._reset&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight))},preUpdate:function(){this.enable&&!this.game.physics.arcade.isPaused&&(this.dirty=!0,this.wasTouching.none=this.touching.none,this.wasTouching.up=this.touching.up,this.wasTouching.down=this.touching.down,this.wasTouching.left=this.touching.left,this.wasTouching.right=this.touching.right,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.embedded=!1,this.updateBounds(),this.position.x=this.sprite.world.x-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=this.sprite.world.y-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.rotation=this.sprite.angle,this.preRotation=this.rotation,(this._reset||this.sprite.fresh)&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves&&(this.game.physics.arcade.updateMotion(this),this.newVelocity.set(this.velocity.x*this.game.time.physicsElapsed,this.velocity.y*this.game.time.physicsElapsed),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.onWorldBounds.dispatch(this.sprite,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)),this._dx=this.deltaX(),this._dy=this.deltaY(),this._reset=!1)},updateMovement:function(){var a=0,b=0!==this.overlapX||0!==this.overlapY;if(this.moveDuration>0?(this.moveTimer+=this.game.time.elapsedMS,a=this.moveTimer/this.moveDuration):(this.moveTarget.end.set(this.position.x,this.position.y),a=this.moveTarget.length/this.moveDistance),this.movementCallback)var c=this.movementCallback.call(this.movementCallbackContext,this,this.velocity,a);return!(b||a>=1||void 0!==c&&!0!==c)||(this.stopMovement(a>=1||this.stopVelocityOnCollide&&b),!1)},stopMovement:function(a){this.isMoving&&(this.isMoving=!1,a&&this.velocity.set(0),this.onMoveComplete.dispatch(this.sprite,0!==this.overlapX||0!==this.overlapY))},postUpdate:function(){this.enable&&this.dirty&&(this.isMoving&&this.updateMovement(),this.dirty=!1,this.deltaX()<0?this.facing=c.LEFT:this.deltaX()>0&&(this.facing=c.RIGHT),this.deltaY()<0?this.facing=c.UP:this.deltaY()>0&&(this.facing=c.DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.sprite.position.x+=this._dx,this.sprite.position.y+=this._dy,this._reset=!0),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.allowRotation&&(this.sprite.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var a=this.position,b=this.game.physics.arcade.bounds,c=this.game.physics.arcade.checkCollision,d=this.worldBounce?-this.worldBounce.x:-this.bounce.x,e=this.worldBounce?-this.worldBounce.y:-this.bounce.y;if(this.isCircle){var f={x:this.center.x-this.radius,y:this.center.y-this.radius,right:this.center.x+this.radius,bottom:this.center.y+this.radius};f.xb.right&&c.right&&(a.x=b.right-this.halfWidth-this.radius,this.velocity.x*=d,this.blocked.right=!0),f.yb.bottom&&c.down&&(a.y=b.bottom-this.halfHeight-this.radius,this.velocity.y*=e,this.blocked.down=!0)}else a.xb.right&&c.right&&(a.x=b.right-this.width,this.velocity.x*=d,this.blocked.right=!0),a.yb.bottom&&c.down&&(a.y=b.bottom-this.height,this.velocity.y*=e,this.blocked.down=!0);return this.blocked.up||this.blocked.down||this.blocked.left||this.blocked.right},moveFrom:function(a,b,c){if(void 0===b&&(b=this.speed),0===b)return!1;var d;return void 0===c?(d=this.angle,c=this.game.math.radToDeg(d)):d=this.game.math.degToRad(c),this.moveTimer=0,this.moveDuration=a,0===c||180===c?this.velocity.set(Math.cos(d)*b,0):90===c||270===c?this.velocity.set(0,Math.sin(d)*b):this.velocity.set(Math.cos(d)*b,Math.sin(d)*b),this.isMoving=!0,!0},moveTo:function(a,b,d){var e=b/(a/1e3);if(0===e)return!1;var f;return void 0===d?(f=this.angle,d=this.game.math.radToDeg(f)):f=this.game.math.degToRad(d),b=Math.abs(b),this.moveDuration=0,this.moveDistance=b,null===this.moveTarget&&(this.moveTarget=new c.Line,this.moveEnd=new c.Point),this.moveTarget.fromAngle(this.x,this.y,f,b),this.moveEnd.set(this.moveTarget.end.x,this.moveTarget.end.y),this.moveTarget.setTo(this.x,this.y,this.x,this.y),0===d||180===d?this.velocity.set(Math.cos(f)*e,0):90===d||270===d?this.velocity.set(0,Math.sin(f)*e):this.velocity.set(Math.cos(f)*e,Math.sin(f)*e),this.isMoving=!0,!0},setSize:function(a,b,c,d){void 0===c&&(c=this.offset.x),void 0===d&&(d=this.offset.y),this.sourceWidth=a,this.sourceHeight=b,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(c,d),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.isCircle=!1,this.radius=0},setCircle:function(a,b,c){void 0===b&&(b=this.offset.x),void 0===c&&(c=this.offset.y),a>0?(this.isCircle=!0,this.radius=a,this.sourceWidth=2*a,this.sourceHeight=2*a,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(b,c),this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)):this.isCircle=!1},reset:function(a,b){this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this.position.x=a-this.sprite.anchor.x*this.sprite.width+this.sprite.scale.x*this.offset.x,this.position.x-=this.sprite.scale.x<0?this.width:0,this.position.y=b-this.sprite.anchor.y*this.sprite.height+this.sprite.scale.y*this.offset.y,this.position.y-=this.sprite.scale.y<0?this.height:0,this.prev.x=this.position.x,this.prev.y=this.position.y,this.rotation=this.sprite.angle,this.preRotation=this.rotation,this._sx=this.sprite.scale.x,this._sy=this.sprite.scale.y,this.center.setTo(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},getBounds:function(a){return this.isCircle?(a.x=this.center.x-this.radius,a.y=this.center.y-this.radius,a.right=this.center.x+this.radius,a.bottom=this.center.y+this.radius):(a.x=this.x,a.y=this.y,a.right=this.right,a.bottom=this.bottom),a},hitTest:function(a,b){return this.isCircle?c.Circle.contains(this,a,b):c.Rectangle.contains(this,a,b)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.sprite.parent&&this.sprite.parent instanceof c.Group&&this.sprite.parent.removeFromHash(this.sprite),this.sprite.body=null,this.sprite=null}},Object.defineProperty(c.Physics.Arcade.Body.prototype,"left",{get:function(){return this.position.x}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"right",{get:function(){return this.position.x+this.width}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"top",{get:function(){return this.position.y}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.position.y+this.height}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"x",{get:function(){return this.position.x},set:function(a){this.position.x=a}}),Object.defineProperty(c.Physics.Arcade.Body.prototype,"y",{get:function(){return this.position.y},set:function(a){this.position.y=a}}),c.Physics.Arcade.Body.render=function(a,b,c,d){void 0===d&&(d=!0),c=c||"rgba(0,255,0,0.4)",a.fillStyle=c,a.strokeStyle=c,b.isCircle?(a.beginPath(),a.arc(b.center.x-b.game.camera.x,b.center.y-b.game.camera.y,b.radius,0,2*Math.PI),d?a.fill():a.stroke()):d?a.fillRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height):a.strokeRect(b.position.x-b.game.camera.x,b.position.y-b.game.camera.y,b.width,b.height)},c.Physics.Arcade.Body.renderBodyInfo=function(a,b){a.line("x: "+b.x.toFixed(2),"y: "+b.y.toFixed(2),"width: "+b.width,"height: "+b.height),a.line("velocity x: "+b.velocity.x.toFixed(2),"y: "+b.velocity.y.toFixed(2),"deltaX: "+b._dx.toFixed(2),"deltaY: "+b._dy.toFixed(2)),a.line("acceleration x: "+b.acceleration.x.toFixed(2),"y: "+b.acceleration.y.toFixed(2),"speed: "+b.speed.toFixed(2),"angle: "+b.angle.toFixed(2)),a.line("gravity x: "+b.gravity.x,"y: "+b.gravity.y,"bounce x: "+b.bounce.x.toFixed(2),"y: "+b.bounce.y.toFixed(2)),a.line("touching left: "+b.touching.left,"right: "+b.touching.right,"up: "+b.touching.up,"down: "+b.touching.down),a.line("blocked left: "+b.blocked.left,"right: "+b.blocked.right,"up: "+b.blocked.up,"down: "+b.blocked.down)},c.Physics.Arcade.Body.prototype.constructor=c.Physics.Arcade.Body,c.Physics.Arcade.TilemapCollision=function(){},c.Physics.Arcade.TilemapCollision.prototype={TILE_BIAS:16,collideSpriteVsTilemapLayer:function(a,b,c,d,e,f){if(a.body){var g=b.getTiles(a.body.position.x-a.body.tilePadding.x,a.body.position.y-a.body.tilePadding.y,a.body.width+a.body.tilePadding.x,a.body.height+a.body.tilePadding.y,!1,!1);if(0!==g.length)for(var h=0;hb.deltaAbsY()?j=-1:b.deltaAbsX()0&&!a.blocked.right&&b.collideLeft&&a.checkCollision.right&&b.faceLeft&&a.right-e>b.left&&(d=a.right-e-b.left)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateX?a.overlapX=d:this.processTileSeparationX(a,d)),d},tileCheckY:function(a,b,c){var d=0,e=c.fixedToCamera?0:c.position.y;return a.deltaY()<0&&!a.blocked.up&&b.collideDown&&a.checkCollision.up?b.faceBottom&&a.y-e0&&!a.blocked.down&&b.collideUp&&a.checkCollision.down&&b.faceTop&&a.bottom-e>b.top&&(d=a.bottom-e-b.top)>this.TILE_BIAS&&(d=0),0!==d&&(a.customSeparateY?a.overlapY=d:this.processTileSeparationY(a,d)),d},processTileSeparationX:function(a,b){b<0?a.blocked.left=!0:b>0&&(a.blocked.right=!0),a.position.x-=b,0===a.bounce.x?a.velocity.x=0:a.velocity.x=-a.velocity.x*a.bounce.x},processTileSeparationY:function(a,b){b<0?a.blocked.up=!0:b>0&&(a.blocked.down=!0),a.position.y-=b,0===a.bounce.y?a.velocity.y=0:a.velocity.y=-a.velocity.y*a.bounce.y}},c.Utils.mixinPrototype(c.Physics.Arcade.prototype,c.Physics.Arcade.TilemapCollision.prototype),p2.Body.prototype.parent=null,p2.Spring.prototype.parent=null,c.Physics.P2=function(a,b){this.game=a,void 0===b?b={gravity:[0,0],broadphase:new p2.SAPBroadphase}:(b.hasOwnProperty("gravity")||(b.gravity=[0,0]),b.hasOwnProperty("broadphase")||(b.broadphase=new p2.SAPBroadphase)),this.config=b,this.world=new p2.World(this.config),this.frameRate=1/60,this.useElapsedTime=!1,this.paused=!1,this.materials=[],this.gravity=new c.Physics.P2.InversePointProxy(this,this.world.gravity),this.walls={left:null,right:null,top:null,bottom:null},this.onBodyAdded=new c.Signal,this.onBodyRemoved=new c.Signal,this.onSpringAdded=new c.Signal,this.onSpringRemoved=new c.Signal,this.onConstraintAdded=new c.Signal,this.onConstraintRemoved=new c.Signal,this.onContactMaterialAdded=new c.Signal,this.onContactMaterialRemoved=new c.Signal,this.postBroadphaseCallback=null,this.callbackContext=null,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,b.hasOwnProperty("mpx")&&b.hasOwnProperty("pxm")&&b.hasOwnProperty("mpxi")&&b.hasOwnProperty("pxmi")&&(this.mpx=b.mpx,this.mpxi=b.mpxi,this.pxm=b.pxm,this.pxmi=b.pxmi),this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.collisionGroups=[],this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this.boundsCollidesWith=[],this._toRemove=[],this._collisionGroupID=2,this._boundsLeft=!0,this._boundsRight=!0,this._boundsTop=!0,this._boundsBottom=!0,this._boundsOwnGroup=!1,this.setBoundsToWorld(!0,!0,!0,!0,!1)},c.Physics.P2.prototype={removeBodyNextStep:function(a){this._toRemove.push(a)},preUpdate:function(){for(var a=this._toRemove.length;a--;)this.removeBody(this._toRemove[a]);this._toRemove.length=0},enable:function(a,b,d){void 0===b&&(b=!1),void 0===d&&(d=!0);var e=1;if(Array.isArray(a))for(e=a.length;e--;)a[e]instanceof c.Group?this.enable(a[e].children,b,d):(this.enableBody(a[e],b),d&&a[e].hasOwnProperty("children")&&a[e].children.length>0&&this.enable(a[e],b,!0));else a instanceof c.Group?this.enable(a.children,b,d):(this.enableBody(a,b),d&&a.hasOwnProperty("children")&&a.children.length>0&&this.enable(a.children,b,!0))},enableBody:function(a,b){a.hasOwnProperty("body")&&null===a.body&&(a.body=new c.Physics.P2.Body(this.game,a,a.x,a.y,1),a.body.debug=b,void 0!==a.anchor&&a.anchor.set(.5))},setImpactEvents:function(a){a?this.world.on("impact",this.impactHandler,this):this.world.off("impact",this.impactHandler,this)},setPostBroadphaseCallback:function(a,b){this.postBroadphaseCallback=a,this.callbackContext=b,null!==a?this.world.on("postBroadphase",this.postBroadphaseHandler,this):this.world.off("postBroadphase",this.postBroadphaseHandler,this)},postBroadphaseHandler:function(a){if(this.postBroadphaseCallback&&0!==a.pairs.length)for(var b=a.pairs.length-2;b>=0;b-=2)a.pairs[b].parent&&a.pairs[b+1].parent&&!this.postBroadphaseCallback.call(this.callbackContext,a.pairs[b].parent,a.pairs[b+1].parent)&&a.pairs.splice(b,2)},impactHandler:function(a){if(a.bodyA.parent&&a.bodyB.parent){var b=a.bodyA.parent,c=a.bodyB.parent;b._bodyCallbacks[a.bodyB.id]&&b._bodyCallbacks[a.bodyB.id].call(b._bodyCallbackContext[a.bodyB.id],b,c,a.shapeA,a.shapeB),c._bodyCallbacks[a.bodyA.id]&&c._bodyCallbacks[a.bodyA.id].call(c._bodyCallbackContext[a.bodyA.id],c,b,a.shapeB,a.shapeA),b._groupCallbacks[a.shapeB.collisionGroup]&&b._groupCallbacks[a.shapeB.collisionGroup].call(b._groupCallbackContext[a.shapeB.collisionGroup],b,c,a.shapeA,a.shapeB),c._groupCallbacks[a.shapeA.collisionGroup]&&c._groupCallbacks[a.shapeA.collisionGroup].call(c._groupCallbackContext[a.shapeA.collisionGroup],c,b,a.shapeB,a.shapeA)}},beginContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onBeginContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyA.parent&&a.bodyA.parent.onBeginContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB,a.contactEquations),a.bodyB.parent&&a.bodyB.parent.onBeginContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA,a.contactEquations))},endContactHandler:function(a){a.bodyA&&a.bodyB&&(this.onEndContact.dispatch(a.bodyA,a.bodyB,a.shapeA,a.shapeB),a.bodyA.parent&&a.bodyA.parent.onEndContact.dispatch(a.bodyB.parent,a.bodyB,a.shapeA,a.shapeB),a.bodyB.parent&&a.bodyB.parent.onEndContact.dispatch(a.bodyA.parent,a.bodyA,a.shapeB,a.shapeA))},setBoundsToWorld:function(a,b,c,d,e){this.setBounds(this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,a,b,c,d,e)},setWorldMaterial:function(a,b,c,d,e){void 0===b&&(b=!0),void 0===c&&(c=!0),void 0===d&&(d=!0),void 0===e&&(e=!0),b&&this.walls.left&&(this.walls.left.shapes[0].material=a),c&&this.walls.right&&(this.walls.right.shapes[0].material=a),d&&this.walls.top&&(this.walls.top.shapes[0].material=a),e&&this.walls.bottom&&(this.walls.bottom.shapes[0].material=a)},updateBoundsCollisionGroup:function(a){void 0===a&&(a=!0);var b=a?this.boundsCollisionGroup.mask:this.everythingCollisionGroup.mask;this.walls.left&&(this.walls.left.shapes[0].collisionGroup=b),this.walls.right&&(this.walls.right.shapes[0].collisionGroup=b),this.walls.top&&(this.walls.top.shapes[0].collisionGroup=b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionGroup=b),this._boundsOwnGroup=a},setBounds:function(a,b,c,d,e,f,g,h,i){void 0===e&&(e=this._boundsLeft),void 0===f&&(f=this._boundsRight),void 0===g&&(g=this._boundsTop),void 0===h&&(h=this._boundsBottom),void 0===i&&(i=this._boundsOwnGroup),this.setupWall(e,"left",a,b,1.5707963267948966,i),this.setupWall(f,"right",a+c,b,-1.5707963267948966,i),this.setupWall(g,"top",a,b,-3.141592653589793,i),this.setupWall(h,"bottom",a,b+d,0,i),this._boundsLeft=e,this._boundsRight=f,this._boundsTop=g,this._boundsBottom=h,this._boundsOwnGroup=i},setupWall:function(a,b,c,d,e,f){a?(this.walls[b]?this.walls[b].position=[this.pxmi(c),this.pxmi(d)]:(this.walls[b]=new p2.Body({mass:0,position:[this.pxmi(c),this.pxmi(d)],angle:e}),this.walls[b].addShape(new p2.Plane),this.world.addBody(this.walls[b])),f&&(this.walls[b].shapes[0].collisionGroup=this.boundsCollisionGroup.mask)):this.walls[b]&&(this.world.removeBody(this.walls[b]),this.walls[b]=null)},pause:function(){this.paused=!0},resume:function(){this.paused=!1},update:function(){this.paused||(this.useElapsedTime?this.world.step(this.game.time.physicsElapsed):this.world.step(this.frameRate))},reset:function(){this.world.on("beginContact",this.beginContactHandler,this),this.world.on("endContact",this.endContactHandler,this),this.nothingCollisionGroup=new c.Physics.P2.CollisionGroup(1),this.boundsCollisionGroup=new c.Physics.P2.CollisionGroup(2),this.everythingCollisionGroup=new c.Physics.P2.CollisionGroup(2147483648),this._collisionGroupID=2,this.setBoundsToWorld(!0,!0,!0,!0,!1)},clear:function(){this.world.time=0,this.world.fixedStepTime=0,this.world.solver&&this.world.solver.equations.length&&this.world.solver.removeAllEquations();for(var a=this.world.constraints,b=a.length-1;b>=0;b--)this.world.removeConstraint(a[b]);for(var c=this.world.bodies,b=c.length-1;b>=0;b--)this.world.removeBody(c[b]);for(var d=this.world.springs,b=d.length-1;b>=0;b--)this.world.removeSpring(d[b]);for(var e=this.world.contactMaterials,b=e.length-1;b>=0;b--)this.world.removeContactMaterial(e[b]);this.world.off("beginContact",this.beginContactHandler,this),this.world.off("endContact",this.endContactHandler,this),this.postBroadphaseCallback=null,this.callbackContext=null,this.impactCallback=null,this.collisionGroups=[],this._toRemove=[],this.boundsCollidesWith=[],this.walls={left:null,right:null,top:null,bottom:null}},destroy:function(){this.clear(),this.game=null},addBody:function(a){return!a.data.world&&(this.world.addBody(a.data),this.onBodyAdded.dispatch(a),!0)},removeBody:function(a){return a.data.world===this.world&&(this.world.removeBody(a.data),this.onBodyRemoved.dispatch(a)),a},addSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.addSpring(a.data):this.world.addSpring(a),this.onSpringAdded.dispatch(a),a},removeSpring:function(a){return a instanceof c.Physics.P2.Spring||a instanceof c.Physics.P2.RotationalSpring?this.world.removeSpring(a.data):this.world.removeSpring(a),this.onSpringRemoved.dispatch(a),a},createDistanceConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.DistanceConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createGearConstraint:function(a,b,d,e){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.GearConstraint(this,a,b,d,e));console.warn("Cannot create Constraint, invalid body objects given")},createRevoluteConstraint:function(a,b,d,e,f,g){if(a=this.getBody(a),d=this.getBody(d),a&&d)return this.addConstraint(new c.Physics.P2.RevoluteConstraint(this,a,b,d,e,f,g));console.warn("Cannot create Constraint, invalid body objects given")},createLockConstraint:function(a,b,d,e,f){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.LockConstraint(this,a,b,d,e,f));console.warn("Cannot create Constraint, invalid body objects given")},createPrismaticConstraint:function(a,b,d,e,f,g,h){if(a=this.getBody(a),b=this.getBody(b),a&&b)return this.addConstraint(new c.Physics.P2.PrismaticConstraint(this,a,b,d,e,f,g,h));console.warn("Cannot create Constraint, invalid body objects given")},addConstraint:function(a){return this.world.addConstraint(a),this.onConstraintAdded.dispatch(a),a},removeConstraint:function(a){return this.world.removeConstraint(a),this.onConstraintRemoved.dispatch(a),a},addContactMaterial:function(a){return this.world.addContactMaterial(a),this.onContactMaterialAdded.dispatch(a),a},removeContactMaterial:function(a){return this.world.removeContactMaterial(a),this.onContactMaterialRemoved.dispatch(a),a},getContactMaterial:function(a,b){return this.world.getContactMaterial(a,b)},setMaterial:function(a,b){for(var c=b.length;c--;)b[c].setMaterial(a)},createMaterial:function(a,b){a=a||"";var d=new c.Physics.P2.Material(a);return this.materials.push(d),void 0!==b&&b.setMaterial(d),d},createContactMaterial:function(a,b,d){void 0===a&&(a=this.createMaterial()),void 0===b&&(b=this.createMaterial());var e=new c.Physics.P2.ContactMaterial(a,b,d);return this.addContactMaterial(e)},getBodies:function(){for(var a=[],b=this.world.bodies.length;b--;)a.push(this.world.bodies[b].parent);return a},getBody:function(a){return a instanceof p2.Body?a:a instanceof c.Physics.P2.Body?a.data:a.body&&a.body.type===c.Physics.P2JS?a.body.data:null},getSprings:function(){for(var a=[],b=this.world.springs.length;b--;)a.push(this.world.springs[b].parent);return a},getConstraints:function(){for(var a=[],b=this.world.constraints.length;b--;)a.push(this.world.constraints[b]);return a},hitTest:function(a,b,d,e){void 0===b&&(b=this.world.bodies),void 0===d&&(d=5),void 0===e&&(e=!1);for(var f=[this.pxmi(a.x),this.pxmi(a.y)],g=[],h=b.length;h--;)b[h]instanceof c.Physics.P2.Body&&(!e||b[h].data.type!==p2.Body.STATIC)?g.push(b[h].data):b[h]instanceof p2.Body&&b[h].parent&&(!e||b[h].type!==p2.Body.STATIC)?g.push(b[h]):b[h]instanceof c.Sprite&&b[h].hasOwnProperty("body")&&(!e||b[h].body.data.type!==p2.Body.STATIC)&&g.push(b[h].body.data);return this.world.hitTest(f,g,d)},toJSON:function(){return this.world.toJSON()},createCollisionGroup:function(a){var b=Math.pow(2,this._collisionGroupID);this.walls.left&&(this.walls.left.shapes[0].collisionMask=this.walls.left.shapes[0].collisionMask|b),this.walls.right&&(this.walls.right.shapes[0].collisionMask=this.walls.right.shapes[0].collisionMask|b),this.walls.top&&(this.walls.top.shapes[0].collisionMask=this.walls.top.shapes[0].collisionMask|b),this.walls.bottom&&(this.walls.bottom.shapes[0].collisionMask=this.walls.bottom.shapes[0].collisionMask|b),this._collisionGroupID++;var d=new c.Physics.P2.CollisionGroup(b);return this.collisionGroups.push(d),a&&this.setCollisionGroup(a,d),d},setCollisionGroup:function(a,b){if(a instanceof c.Group)for(var d=0;d-1&&l.collides)if(d){var m=a.getTileRight(b,j,h);if(0===e&&(f=l.x*l.width,g=l.y*l.height,e=l.width),m&&m.collides)e+=l.width;else{var n=this.createBody(f,g,0,!1);n.addRectangle(e,l.height,e/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n),e=0}}else{var n=this.createBody(l.x*l.width,l.y*l.height,0,!1);n.addRectangle(l.width,l.height,l.width/2,l.height/2,0),c&&this.addBody(n),a.layers[b].bodies.push(n)}}}return a.layers[b].bodies},mpx:function(a){return a*=20},pxm:function(a){return.05*a},mpxi:function(a){return a*=-20},pxmi:function(a){return-.05*a}},Object.defineProperty(c.Physics.P2.prototype,"friction",{get:function(){return this.world.defaultContactMaterial.friction},set:function(a){this.world.defaultContactMaterial.friction=a}}),Object.defineProperty(c.Physics.P2.prototype,"restitution",{get:function(){return this.world.defaultContactMaterial.restitution},set:function(a){this.world.defaultContactMaterial.restitution=a}}),Object.defineProperty(c.Physics.P2.prototype,"contactMaterial",{get:function(){return this.world.defaultContactMaterial},set:function(a){this.world.defaultContactMaterial=a}}),Object.defineProperty(c.Physics.P2.prototype,"applySpringForces",{get:function(){return this.world.applySpringForces},set:function(a){this.world.applySpringForces=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyDamping",{get:function(){return this.world.applyDamping},set:function(a){this.world.applyDamping=a}}),Object.defineProperty(c.Physics.P2.prototype,"applyGravity",{get:function(){return this.world.applyGravity},set:function(a){this.world.applyGravity=a}}),Object.defineProperty(c.Physics.P2.prototype,"solveConstraints",{get:function(){return this.world.solveConstraints},set:function(a){this.world.solveConstraints=a}}),Object.defineProperty(c.Physics.P2.prototype,"time",{get:function(){return this.world.time}}),Object.defineProperty(c.Physics.P2.prototype,"emitImpactEvent",{get:function(){return this.world.emitImpactEvent},set:function(a){this.world.emitImpactEvent=a}}),Object.defineProperty(c.Physics.P2.prototype,"sleepMode",{get:function(){return this.world.sleepMode},set:function(a){this.world.sleepMode=a}}),Object.defineProperty(c.Physics.P2.prototype,"total",{get:function(){return this.world.bodies.length}}),c.Physics.P2.FixtureList=function(a){Array.isArray(a)||(a=[a]),this.rawList=a,this.init(),this.parse(this.rawList)},c.Physics.P2.FixtureList.prototype={init:function(){this.namedFixtures={},this.groupedFixtures=[],this.allFixtures=[]},setCategory:function(a,b){var c=function(b){b.collisionGroup=a};this.getFixtures(b).forEach(c)},setMask:function(a,b){var c=function(b){b.collisionMask=a};this.getFixtures(b).forEach(c)},setSensor:function(a,b){var c=function(b){b.sensor=a};this.getFixtures(b).forEach(c)},setMaterial:function(a,b){var c=function(b){b.material=a};this.getFixtures(b).forEach(c)},getFixtures:function(a){var b=[];if(a){a instanceof Array||(a=[a]);var c=this;return a.forEach(function(a){c.namedFixtures[a]&&b.push(c.namedFixtures[a])}),this.flatten(b)}return this.allFixtures},getFixtureByKey:function(a){return this.namedFixtures[a]},getGroup:function(a){return this.groupedFixtures[a]},parse:function(){var a,b,c,d;c=this.rawList,d=[];for(a in c)b=c[a],isNaN(a-0)?this.namedFixtures[a]=this.flatten(b):(this.groupedFixtures[a]=this.groupedFixtures[a]||[],this.groupedFixtures[a]=this.groupedFixtures[a].concat(b)),d.push(this.allFixtures=this.flatten(this.groupedFixtures))},flatten:function(a){var b,c;return b=[],c=arguments.callee,a.forEach(function(a){return Array.prototype.push.apply(b,Array.isArray(a)?c(a):[a])}),b}},c.Physics.P2.PointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.PointProxy.prototype.constructor=c.Physics.P2.PointProxy,Object.defineProperty(c.Physics.P2.PointProxy.prototype,"x",{get:function(){return this.world.mpx(this.destination[0])},set:function(a){this.destination[0]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"y",{get:function(){return this.world.mpx(this.destination[1])},set:function(a){this.destination[1]=this.world.pxm(a)}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=a}}),Object.defineProperty(c.Physics.P2.PointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=a}}),c.Physics.P2.InversePointProxy=function(a,b){this.world=a,this.destination=b},c.Physics.P2.InversePointProxy.prototype.constructor=c.Physics.P2.InversePointProxy,Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"x",{get:function(){return this.world.mpxi(this.destination[0])},set:function(a){this.destination[0]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"y",{get:function(){return this.world.mpxi(this.destination[1])},set:function(a){this.destination[1]=this.world.pxmi(a)}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"mx",{get:function(){return this.destination[0]},set:function(a){this.destination[0]=-a}}),Object.defineProperty(c.Physics.P2.InversePointProxy.prototype,"my",{get:function(){return this.destination[1]},set:function(a){this.destination[1]=-a}}),c.Physics.P2.Body=function(a,b,d,e,f){b=b||null,d=d||0,e=e||0,void 0===f&&(f=1),this.game=a,this.world=a.physics.p2,this.sprite=b,this.type=c.Physics.P2JS,this.offset=new c.Point,this.data=new p2.Body({position:[this.world.pxmi(d),this.world.pxmi(e)],mass:f}),this.data.parent=this,this.velocity=new c.Physics.P2.InversePointProxy(this.world,this.data.velocity),this.force=new c.Physics.P2.InversePointProxy(this.world,this.data.force),this.gravity=new c.Point,this.onBeginContact=new c.Signal,this.onEndContact=new c.Signal,this.collidesWith=[],this.removeNextStep=!1,this.debugBody=null,this.dirty=!1,this._collideWorldBounds=!0,this._bodyCallbacks={},this._bodyCallbackContext={},this._groupCallbacks={},this._groupCallbackContext={},this._reset=!1,b&&(this.setRectangleFromSprite(b),b.exists&&this.game.physics.p2.addBody(this))},c.Physics.P2.Body.prototype={createBodyCallback:function(a,b,c){var d=-1;a.id?d=a.id:a.body&&(d=a.body.id),d>-1&&(null===b?(delete this._bodyCallbacks[d],delete this._bodyCallbackContext[d]):(this._bodyCallbacks[d]=b,this._bodyCallbackContext[d]=c))},createGroupCallback:function(a,b,c){null===b?(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]):(this._groupCallbacks[a.mask]=b,this._groupCallbackContext[a.mask]=c)},getCollisionMask:function(){var a=0;this._collideWorldBounds&&(a=this.game.physics.p2.boundsCollisionGroup.mask);for(var b=0;b=0;c--)this.data.shapes[c].collisionMask=b;else a.collisionMask=b},setCollisionGroup:function(a,b){var c=this.getCollisionMask();if(void 0===b)for(var d=this.data.shapes.length-1;d>=0;d--)this.data.shapes[d].collisionGroup=a.mask,this.data.shapes[d].collisionMask=c;else b.collisionGroup=a.mask,b.collisionMask=c},clearCollision:function(a,b,c){if(void 0===a&&(a=!0),void 0===b&&(b=!0),void 0===c)for(var d=this.data.shapes.length-1;d>=0;d--)a&&(this.data.shapes[d].collisionGroup=null),b&&(this.data.shapes[d].collisionMask=null);else a&&(c.collisionGroup=null),b&&(c.collisionMask=null);a&&(this.collidesWith.length=0)},removeCollisionGroup:function(a,b,c){void 0===b&&(b=!0);var d;if(Array.isArray(a))for(var e=0;e-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));else(d=this.collidesWith.indexOf(a))>-1&&(this.collidesWith.splice(d,1),b&&(delete this._groupCallbacks[a.mask],delete this._groupCallbackContext[a.mask]));var f=this.getCollisionMask();if(void 0===c)for(var e=this.data.shapes.length-1;e>=0;e--)this.data.shapes[e].collisionMask=f;else c.collisionMask=f},collides:function(a,b,c,d){if(Array.isArray(a))for(var e=0;e=0;e--)this.data.shapes[e].collisionMask=f;else d.collisionMask=f},adjustCenterOfMass:function(){this.data.adjustCenterOfMass(),this.shapeChanged()},getVelocityAtPoint:function(a,b){return this.data.getVelocityAtPoint(a,b)},applyDamping:function(a){this.data.applyDamping(a)},applyImpulse:function(a,b,c){this.data.applyImpulse(a,[this.world.pxmi(b),this.world.pxmi(c)])},applyImpulseLocal:function(a,b,c){this.data.applyImpulseLocal(a,[this.world.pxmi(b),this.world.pxmi(c)])}, +applyForce:function(a,b,c){this.data.applyForce(a,[this.world.pxmi(b),this.world.pxmi(c)])},setZeroForce:function(){this.data.setZeroForce()},setZeroRotation:function(){this.data.angularVelocity=0},setZeroVelocity:function(){this.data.velocity[0]=0,this.data.velocity[1]=0},setZeroDamping:function(){this.data.damping=0,this.data.angularDamping=0},toLocalFrame:function(a,b){return this.data.toLocalFrame(a,b)},toWorldFrame:function(a,b){return this.data.toWorldFrame(a,b)},rotateLeft:function(a){this.data.angularVelocity=this.world.pxm(-a)},rotateRight:function(a){this.data.angularVelocity=this.world.pxm(a)},moveForward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=b*Math.cos(c),this.data.velocity[1]=b*Math.sin(c)},moveBackward:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.velocity[0]=-b*Math.cos(c),this.data.velocity[1]=-b*Math.sin(c)},thrust:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustLeft:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]+=b*Math.cos(c),this.data.force[1]+=b*Math.sin(c)},thrustRight:function(a){var b=this.world.pxmi(-a),c=this.data.angle;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},reverse:function(a){var b=this.world.pxmi(-a),c=this.data.angle+Math.PI/2;this.data.force[0]-=b*Math.cos(c),this.data.force[1]-=b*Math.sin(c)},moveLeft:function(a){this.data.velocity[0]=this.world.pxmi(-a)},moveRight:function(a){this.data.velocity[0]=this.world.pxmi(a)},moveUp:function(a){this.data.velocity[1]=this.world.pxmi(-a)},moveDown:function(a){this.data.velocity[1]=this.world.pxmi(a)},preUpdate:function(){this.dirty=!0,this.removeNextStep&&(this.removeFromWorld(),this.removeNextStep=!1)},postUpdate:function(){this.sprite.x=this.world.mpxi(this.data.position[0])+this.offset.x,this.sprite.y=this.world.mpxi(this.data.position[1])+this.offset.y,this.fixedRotation||(this.sprite.rotation=this.data.angle),this.debugBody&&this.debugBody.updateSpriteTransform(),this.dirty=!1},reset:function(a,b,c,d){void 0===c&&(c=!1),void 0===d&&(d=!1),this.setZeroForce(),this.setZeroVelocity(),this.setZeroRotation(),c&&this.setZeroDamping(),d&&(this.mass=1),this.x=a,this.y=b},addToWorld:function(){if(this.game.physics.p2._toRemove)for(var a=0;a=0;c--)this.data.shapes[c].material=a;else b.material=a},shapeChanged:function(){this.debugBody&&this.debugBody.draw()},addPhaserPolygon:function(a,b){for(var c=this.game.cache.getPhysicsData(a,b),d=[],e=0;eo;e=0<=o?++n:--n)k=b.vertices[e],p2.vec2.rotate(m,k,a),l.push([(m[0]+i[0])*this.ppu,-(m[1]+i[1])*this.ppu]);this.drawConvex(j,l,b.triangles,f,c,g,this.settings.debugPolygons,[i[0]*this.ppu,-i[1]*this.ppu])}d++}}},drawRectangle:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1),a.beginFill(h),a.drawRect(b-e/2,c-f/2,e,f)},drawCircle:function(a,b,c,d,e,f,g){void 0===g&&(g=1),void 0===f&&(f=16777215),a.lineStyle(g,0,1),a.beginFill(f,1),a.drawCircle(b,c,2*-e),a.endFill(),a.moveTo(b,c),a.lineTo(b+e*Math.cos(-d),c+e*Math.sin(-d))},drawLine:function(a,b,c,d){void 0===d&&(d=1),void 0===c&&(c=0),a.lineStyle(5*d,c,1),a.moveTo(-b/2,0),a.lineTo(b/2,0)},drawConvex:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s;if(void 0===f&&(f=1),void 0===d&&(d=0),g){for(i=[16711680,65280,255],j=0;j!==b.length+1;)l=b[j%b.length],m=b[(j+1)%b.length],o=l[0],r=l[1],p=m[0],s=m[1],a.lineStyle(f,i[j%i.length],1),a.moveTo(o,-r),a.lineTo(p,-s),a.drawCircle(o,-r,2*f),j++;return a.lineStyle(f,0,1),a.drawCircle(h[0],h[1],2*f)}for(a.lineStyle(f,d,1),a.beginFill(e),j=0;j!==b.length;)k=b[j],n=k[0],q=k[1],0===j?a.moveTo(n,-q):a.lineTo(n,-q),j++;if(a.endFill(),b.length>2)return a.moveTo(b[b.length-1][0],-b[b.length-1][1]),a.lineTo(b[0][0],-b[0][1])},drawPath:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;for(void 0===e&&(e=1),void 0===c&&(c=0),a.lineStyle(e,c,1),"number"==typeof d&&a.beginFill(d),g=null,h=null,f=0;f2&&"number"==typeof d&&(a.moveTo(b[b.length-1][0],b[b.length-1][1]),a.lineTo(b[0][0],b[0][1]))},drawPlane:function(a,b,c,d,e,f,g,h,i,j){var k,l;void 0===f&&(f=1),void 0===d&&(d=16777215),a.lineStyle(f,e,11),a.beginFill(d),a.moveTo(b,-c),k=b+Math.cos(j)*this.game.width,l=c+Math.sin(j)*this.game.height,a.lineTo(k,-l),a.moveTo(b,-c),k=b+Math.cos(j)*-this.game.width,l=c+Math.sin(j)*-this.game.height,a.lineTo(k,-l)},drawCapsule:function(a,b,c,d,e,f,g,h,i){void 0===i&&(i=1),void 0===g&&(g=0),a.lineStyle(i,g,1);var j=Math.cos(d),k=Math.sin(d);a.beginFill(h,1),a.drawCircle(-e/2*j+b,-e/2*k+c,2*-f),a.drawCircle(e/2*j+b,e/2*k+c,2*-f),a.endFill(),a.lineStyle(i,g,0),a.beginFill(h,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c),a.lineTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.endFill(),a.lineStyle(i,g,1),a.moveTo(-e/2*j+f*k+b,-e/2*k+f*j+c),a.lineTo(e/2*j+f*k+b,e/2*k+f*j+c),a.moveTo(-e/2*j-f*k+b,-e/2*k-f*j+c),a.lineTo(e/2*j-f*k+b,e/2*k-f*j+c)},randomPastelHex:function(){var a,b,c,d;return c=[255,255,255],d=Math.floor(256*Math.random()),b=Math.floor(256*Math.random()),a=Math.floor(256*Math.random()),d=Math.floor((d+3*c[0])/4),b=Math.floor((b+3*c[1])/4),a=Math.floor((a+3*c[2])/4),this.rgbToHex(d,b,a)},rgbToHex:function(a,b,c){return this.componentToHex(a)+this.componentToHex(b)+this.componentToHex(c)},componentToHex:function(a){var b;return b=a.toString(16),2===b.length?b:b+"0"}}),c.Physics.P2.Spring=function(a,b,c,d,e,f,g,h,i,j){this.game=a.game,this.world=a,void 0===d&&(d=1),void 0===e&&(e=100),void 0===f&&(f=1),d=a.pxm(d);var k={restLength:d,stiffness:e,damping:f};void 0!==g&&null!==g&&(k.worldAnchorA=[a.pxm(g[0]),a.pxm(g[1])]),void 0!==h&&null!==h&&(k.worldAnchorB=[a.pxm(h[0]),a.pxm(h[1])]),void 0!==i&&null!==i&&(k.localAnchorA=[a.pxm(i[0]),a.pxm(i[1])]),void 0!==j&&null!==j&&(k.localAnchorB=[a.pxm(j[0]),a.pxm(j[1])]),this.data=new p2.LinearSpring(b,c,k),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.RotationalSpring=function(a,b,c,d,e,f){this.game=a.game,this.world=a,void 0===d&&(d=null),void 0===e&&(e=100),void 0===f&&(f=1),d&&(d=a.pxm(d));var g={restAngle:d,stiffness:e,damping:f};this.data=new p2.RotationalSpring(b,c,g),this.data.parent=this},c.Physics.P2.Spring.prototype.constructor=c.Physics.P2.Spring,c.Physics.P2.Material=function(a){this.name=a,p2.Material.call(this)},c.Physics.P2.Material.prototype=Object.create(p2.Material.prototype),c.Physics.P2.Material.prototype.constructor=c.Physics.P2.Material,c.Physics.P2.ContactMaterial=function(a,b,c){p2.ContactMaterial.call(this,a,b,c)},c.Physics.P2.ContactMaterial.prototype=Object.create(p2.ContactMaterial.prototype),c.Physics.P2.ContactMaterial.prototype.constructor=c.Physics.P2.ContactMaterial,c.Physics.P2.CollisionGroup=function(a){this.mask=a},c.Physics.P2.DistanceConstraint=function(a,b,c,d,e,f,g){void 0===d&&(d=100),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=Number.MAX_VALUE),this.game=a.game,this.world=a,d=a.pxm(d),e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var h={distance:d,localAnchorA:e,localAnchorB:f,maxForce:g};p2.DistanceConstraint.call(this,b,c,h)},c.Physics.P2.DistanceConstraint.prototype=Object.create(p2.DistanceConstraint.prototype),c.Physics.P2.DistanceConstraint.prototype.constructor=c.Physics.P2.DistanceConstraint,c.Physics.P2.GearConstraint=function(a,b,c,d,e){void 0===d&&(d=0),void 0===e&&(e=1),this.game=a.game,this.world=a;var f={angle:d,ratio:e};p2.GearConstraint.call(this,b,c,f)},c.Physics.P2.GearConstraint.prototype=Object.create(p2.GearConstraint.prototype),c.Physics.P2.GearConstraint.prototype.constructor=c.Physics.P2.GearConstraint,c.Physics.P2.LockConstraint=function(a,b,c,d,e,f){void 0===d&&(d=[0,0]),void 0===e&&(e=0),void 0===f&&(f=Number.MAX_VALUE),this.game=a.game,this.world=a,d=[a.pxm(d[0]),a.pxm(d[1])];var g={localOffsetB:d,localAngleB:e,maxForce:f};p2.LockConstraint.call(this,b,c,g)},c.Physics.P2.LockConstraint.prototype=Object.create(p2.LockConstraint.prototype),c.Physics.P2.LockConstraint.prototype.constructor=c.Physics.P2.LockConstraint,c.Physics.P2.PrismaticConstraint=function(a,b,c,d,e,f,g,h){void 0===d&&(d=!0),void 0===e&&(e=[0,0]),void 0===f&&(f=[0,0]),void 0===g&&(g=[0,0]),void 0===h&&(h=Number.MAX_VALUE),this.game=a.game,this.world=a,e=[a.pxmi(e[0]),a.pxmi(e[1])],f=[a.pxmi(f[0]),a.pxmi(f[1])];var i={localAnchorA:e,localAnchorB:f,localAxisA:g,maxForce:h,disableRotationalLock:!d};p2.PrismaticConstraint.call(this,b,c,i)},c.Physics.P2.PrismaticConstraint.prototype=Object.create(p2.PrismaticConstraint.prototype),c.Physics.P2.PrismaticConstraint.prototype.constructor=c.Physics.P2.PrismaticConstraint,c.Physics.P2.RevoluteConstraint=function(a,b,c,d,e,f,g){void 0===f&&(f=Number.MAX_VALUE),void 0===g&&(g=null),this.game=a.game,this.world=a,c=[a.pxmi(c[0]),a.pxmi(c[1])],e=[a.pxmi(e[0]),a.pxmi(e[1])],g&&(g=[a.pxmi(g[0]),a.pxmi(g[1])]);var h={worldPivot:g,localPivotA:c,localPivotB:e,maxForce:f};p2.RevoluteConstraint.call(this,b,d,h)},c.Physics.P2.RevoluteConstraint.prototype=Object.create(p2.RevoluteConstraint.prototype),c.Physics.P2.RevoluteConstraint.prototype.constructor=c.Physics.P2.RevoluteConstraint,c.ImageCollection=function(a,b,c,d,e,f,g){(void 0===c||c<=0)&&(c=32),(void 0===d||d<=0)&&(d=32),void 0===e&&(e=0),void 0===f&&(f=0),this.name=a,this.firstgid=0|b,this.imageWidth=0|c,this.imageHeight=0|d,this.imageMargin=0|e,this.imageSpacing=0|f,this.properties=g||{},this.images=[],this.total=0},c.ImageCollection.prototype={containsImageIndex:function(a){return a>=this.firstgid&&athis.right||b>this.bottom)},intersects:function(a,b,c,d){return!(c<=this.worldX)&&(!(d<=this.worldY)&&(!(a>=this.worldX+this.width)&&!(b>=this.worldY+this.height)))},setCollisionCallback:function(a,b){this.collisionCallback=a,this.collisionCallbackContext=b},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.faceLeft=a,this.faceRight=b,this.faceTop=c,this.faceBottom=d},resetCollision:function(){this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1},isInteresting:function(a,b){return a&&b?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:a?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:!!b&&(this.faceTop||this.faceBottom||this.faceLeft||this.faceRight)},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"collides",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){return this.worldX}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){return this.worldX+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){return this.worldY}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){return this.worldY+this.height}}),c.Tilemap=function(a,b,d,e,f,g){this.game=a,this.key=b;var h=c.TilemapParser.parse(this.game,b,d,e,f,g);null!==h&&(this.width=h.width,this.height=h.height,this.tileWidth=h.tileWidth,this.tileHeight=h.tileHeight,this.orientation=h.orientation,this.format=h.format,this.version=h.version,this.properties=h.properties,this.widthInPixels=h.widthInPixels,this.heightInPixels=h.heightInPixels,this.layers=h.layers,this.tilesets=h.tilesets,this.imagecollections=h.imagecollections,this.tiles=h.tiles,this.objects=h.objects,this.collideIndexes=[],this.collision=h.collision,this.images=h.images,this.enableDebug=!1,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.NORTH=0,c.Tilemap.EAST=1,c.Tilemap.SOUTH=2,c.Tilemap.WEST=3,c.Tilemap.prototype={create:function(a,b,c,d,e,f){return void 0===f&&(f=this.game.world),this.width=b,this.height=c,this.setTileSize(d,e),this.layers.length=0,this.createBlankLayer(a,b,c,d,e,f)},setTileSize:function(a,b){this.tileWidth=a,this.tileHeight=b,this.widthInPixels=this.width*a,this.heightInPixels=this.height*b},addTilesetImage:function(a,b,d,e,f,g,h){if(void 0===a)return null;void 0===d&&(d=this.tileWidth),void 0===e&&(e=this.tileHeight),void 0===f&&(f=0),void 0===g&&(g=0),void 0===h&&(h=0),0===d&&(d=32),0===e&&(e=32);var i=null;if(void 0!==b&&null!==b||(b=a),b instanceof c.BitmapData)i=b.canvas;else{if(!this.game.cache.checkImageKey(b))return console.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "'+b+'"'),null;i=this.game.cache.getImage(b)}var j=this.getTilesetIndex(a);if(null===j&&this.format===c.Tilemap.TILED_JSON)return console.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "'+a+'"'),null;if(this.tilesets[j])return this.tilesets[j].setImage(i),this.tilesets[j];var k=new c.Tileset(a,h,d,e,f,g,{});k.setImage(i),this.tilesets.push(k);for(var l=this.tilesets.length-1,m=f,n=f,o=0,p=0,q=0,r=h;r1)for(l=0;lthis.layers.length)return void console.warn("Tilemap.createLayer: Invalid layer ID given: "+f);void 0===b||b<=0?b=Math.min(this.game.width,this.layers[f].widthInPixels):b>this.game.width&&(b=this.game.width),void 0===d||d<=0?d=Math.min(this.game.height,this.layers[f].heightInPixels):d>this.game.height&&(d=this.game.height),this.enableDebug&&(console.group("Tilemap.createLayer"),console.log("Name:",this.layers[f].name),console.log("Size:",b,"x",d),console.log("Tileset:",this.tilesets[0].name,"index:",f));var g=e.add(new c.TilemapLayer(this.game,this,f,b,d));return this.enableDebug&&console.groupEnd(),g},createBlankLayer:function(a,b,d,e,f,g){if(void 0===g&&(g=this.game.world),null!==this.getLayerIndex(a))return void console.warn("Tilemap.createBlankLayer: Layer with matching name already exists: "+a);for(var h,i={name:a,x:0,y:0,width:b,height:d,widthInPixels:b*e,heightInPixels:d*f,alpha:1,visible:!0,properties:{},indexes:[],callbacks:[],bodies:[],data:null},j=[],k=0;kthis.game.width&&(m=this.game.width),n>this.game.height&&(n=this.game.height);var j=new c.TilemapLayer(this.game,this,this.layers.length-1,m,n);return j.name=a,g.add(j)},getIndex:function(a,b){for(var c=0;cb)){for(var f=a;f<=b;f++)this.setCollisionByIndex(f,c,d,!1);e&&this.calculateFaces(d)}},setCollisionByExclusion:function(a,b,c,d){void 0===b&&(b=!0),void 0===d&&(d=!0),c=this.getLayer(c);for(var e=0,f=this.tiles.length;e-1&&this.collideIndexes.splice(e,1)}for(var f=0;f0?this.layers[a].data[c-1][b]:null},getTileBelow:function(a,b,c){return c0?this.layers[a].data[c][b-1]:null},getTileRight:function(a,b,c){return b-1},removeTile:function(a,b,d){if(d=this.getLayer(d),a>=0&&a=0&&b=0&&b=0&&d-1?this.layers[e].data[d][b].setCollision(!0,!0,!0,!0):this.layers[e].data[d][b].resetCollision(),this.layers[e].dirty=!0,this.calculateFaces(e),this.layers[e].data[d][b]}return null},putTileWorldXY:function(a,b,c,d,e,f){return f=this.getLayer(f),b=this.game.math.snapToFloor(b,d)/d,c=this.game.math.snapToFloor(c,e)/e,this.putTile(a,b,c,f)},searchTileIndex:function(a,b,c,d){void 0===b&&(b=0),void 0===c&&(c=!1),d=this.getLayer(d);var e=0;if(c){for(var f=this.layers[d].height-1;f>=0;f--)for(var g=this.layers[d].width-1;g>=0;g--)if(this.layers[d].data[f][g].index===a){if(e===b)return this.layers[d].data[f][g];e++}}else for(var f=0;f=0&&a=0&&bthis.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;f1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.data=[],this.game=null}},c.Tilemap.prototype.constructor=c.Tilemap,Object.defineProperty(c.Tilemap.prototype,"layer",{get:function(){return this.layers[this.currentLayer]},set:function(a){a!==this.currentLayer&&this.setLayer(a)}}),c.TilemapLayer=function(a,b,d,e,f){e|=0,f|=0,c.Sprite.call(this,a,0,0),this.map=b,this.index=d,this.layer=b.layers[d],this.canvas=PIXI.CanvasPool.create(this,e,f),this.context=this.canvas.getContext("2d"),this.setTexture(new PIXI.Texture(new PIXI.BaseTexture(this.canvas))),this.type=c.TILEMAPLAYER,this.physicsType=c.TILEMAPLAYER,this.renderSettings={enableScrollDelta:!1,overdrawRatio:.2,copyCanvas:null},this.debug=!1,this.exists=!0,this.debugSettings={missingImageFill:"rgb(255,255,255)",debuggedTileOverfill:"rgba(0,255,0,0.4)",forceFullRedraw:!0,debugAlpha:.5,facingEdgeStroke:"rgba(0,255,0,1)",collidingTileOverfill:"rgba(0,255,0,0.2)"},this.scrollFactorX=1,this.scrollFactorY=1,this.dirty=!0,this.rayStepRate=4,this._wrap=!1,this._mc={scrollX:0,scrollY:0,renderWidth:0,renderHeight:0,tileWidth:b.tileWidth,tileHeight:b.tileHeight,cw:b.tileWidth,ch:b.tileHeight,tilesets:[]},this._scrollX=0,this._scrollY=0,this._results=[],a.device.canvasBitBltShift||(this.renderSettings.copyCanvas=c.TilemapLayer.ensureSharedCopyCanvas()),this.fixedToCamera=!0},c.TilemapLayer.prototype=Object.create(c.Sprite.prototype),c.TilemapLayer.prototype.constructor=c.TilemapLayer,c.TilemapLayer.prototype.preUpdateCore=c.Component.Core.preUpdate,c.TilemapLayer.sharedCopyCanvas=null,c.TilemapLayer.ensureSharedCopyCanvas=function(){return this.sharedCopyCanvas||(this.sharedCopyCanvas=PIXI.CanvasPool.create(this,2,2)),this.sharedCopyCanvas},c.TilemapLayer.prototype.preUpdate=function(){return this.preUpdateCore()},c.TilemapLayer.prototype.postUpdate=function(){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y},c.TilemapLayer.prototype._renderCanvas=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderCanvas.call(this,a)},c.TilemapLayer.prototype._renderWebGL=function(a){this.fixedToCamera&&(this.position.x=(this.game.camera.view.x+this.cameraOffset.x)/this.game.camera.scale.x,this.position.y=(this.game.camera.view.y+this.cameraOffset.y)/this.game.camera.scale.y),this._scrollX=this.game.camera.view.x*this.scrollFactorX/this.scale.x,this._scrollY=this.game.camera.view.y*this.scrollFactorY/this.scale.y,this.render(),PIXI.Sprite.prototype._renderWebGL.call(this,a)},c.TilemapLayer.prototype.destroy=function(){PIXI.CanvasPool.remove(this),c.Component.Destroy.prototype.destroy.call(this)},c.TilemapLayer.prototype.resize=function(a,b){this.canvas.width=a,this.canvas.height=b,this.texture.frame.resize(a,b),this.texture.width=a,this.texture.height=b,this.texture.crop.width=a,this.texture.crop.height=b,this.texture.baseTexture.width=a,this.texture.baseTexture.height=b,this.texture.baseTexture.dirty(),this.texture.requiresUpdate=!0,this.texture._updateUvs(),this.dirty=!0},c.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.layer.widthInPixels*this.scale.x,this.layer.heightInPixels*this.scale.y)},c.TilemapLayer.prototype._fixX=function(a){return 1===this.scrollFactorX||0===this.scrollFactorX&&0===this.position.x?a:0===this.scrollFactorX&&0!==this.position.x?a-this.position.x:this._scrollX+(a-this._scrollX/this.scrollFactorX)},c.TilemapLayer.prototype._unfixX=function(a){return 1===this.scrollFactorX?a:this._scrollX/this.scrollFactorX+(a-this._scrollX)},c.TilemapLayer.prototype._fixY=function(a){return 1===this.scrollFactorY||0===this.scrollFactorY&&0===this.position.y?a:0===this.scrollFactorY&&0!==this.position.y?a-this.position.y:this._scrollY+(a-this._scrollY/this.scrollFactorY)},c.TilemapLayer.prototype._unfixY=function(a){return 1===this.scrollFactorY?a:this._scrollY/this.scrollFactorY+(a-this._scrollY)},c.TilemapLayer.prototype.getTileX=function(a){return Math.floor(this._fixX(a)/this._mc.tileWidth)},c.TilemapLayer.prototype.getTileY=function(a){return Math.floor(this._fixY(a)/this._mc.tileHeight)},c.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},c.TilemapLayer.prototype.getRayCastTiles=function(a,b,c,d){b||(b=this.rayStepRate),void 0===c&&(c=!1),void 0===d&&(d=!1);var e=this.getTiles(a.x,a.y,a.width,a.height,c,d);if(0===e.length)return[];for(var f=a.coordinatesOnLine(b),g=[],h=0;h=0;q++,s--,o+=k){q>=i&&(q-=i);var x=this.layer.data[q];for(p=v,r=e-c,n=t;r>=0;p++,r--,n+=j){p>=h&&(p-=h);var y=x[p];if(y&&!(y.index<0)){var z=y.index,A=l[z];void 0===A&&(A=this.resolveTileset(z)),y.alpha===m||this.debug||(g.globalAlpha=y.alpha,m=y.alpha),A?y.rotation||y.flipped?(g.save(),g.translate(n+y.centerX,o+y.centerY),g.rotate(y.rotation),y.flipped&&g.scale(-1,1),A.draw(g,-y.centerX,-y.centerY,z),g.restore()):A.draw(g,n,o,z):this.debugSettings.missingImageFill&&(g.fillStyle=this.debugSettings.missingImageFill,g.fillRect(n,o,j,k)),y.debug&&this.debugSettings.debuggedTileOverfill&&(g.fillStyle=this.debugSettings.debuggedTileOverfill,g.fillRect(n,o,j,k))}}}},c.TilemapLayer.prototype.renderDeltaScroll=function(a,b){var c=this._mc.scrollX,d=this._mc.scrollY,e=this.canvas.width,f=this.canvas.height,g=this._mc.tileWidth,h=this._mc.tileHeight,i=0,j=-g,k=0,l=-h;if(a<0?(i=e+a,j=e-1):a>0&&(j=a),b<0?(k=f+b,l=f-1):b>0&&(l=b),this.shiftCanvas(this.context,a,b),i=Math.floor((i+c)/g),j=Math.floor((j+c)/g),k=Math.floor((k+d)/h),l=Math.floor((l+d)/h),i<=j){this.context.clearRect(i*g-c,0,(j-i+1)*g,f);var m=Math.floor((0+d)/h),n=Math.floor((f-1+d)/h);this.renderRegion(c,d,i,m,j,n)}if(k<=l){this.context.clearRect(0,k*h-d,e,(l-k+1)*h);var o=Math.floor((0+c)/g),p=Math.floor((e-1+c)/g);this.renderRegion(c,d,o,k,p,l)}},c.TilemapLayer.prototype.renderFull=function(){var a=this._mc.scrollX,b=this._mc.scrollY,c=this.canvas.width,d=this.canvas.height,e=this._mc.tileWidth,f=this._mc.tileHeight,g=Math.floor(a/e),h=Math.floor((c-1+a)/e),i=Math.floor(b/f),j=Math.floor((d-1+b)/f);this.context.clearRect(0,0,c,d),this.renderRegion(a,b,g,i,h,j)},c.TilemapLayer.prototype.render=function(){var a=!1;if(this.visible){(this.dirty||this.layer.dirty)&&(this.layer.dirty=!1,a=!0);var b=this.canvas.width,c=this.canvas.height,d=0|this._scrollX,e=0|this._scrollY,f=this._mc,g=f.scrollX-d,h=f.scrollY-e;if(a||0!==g||0!==h||f.renderWidth!==b||f.renderHeight!==c)return this.context.save(),f.scrollX=d,f.scrollY=e,f.renderWidth===b&&f.renderHeight===c||(f.renderWidth=b,f.renderHeight=c),this.debug&&(this.context.globalAlpha=this.debugSettings.debugAlpha,this.debugSettings.forceFullRedraw&&(a=!0)),!a&&this.renderSettings.enableScrollDelta&&Math.abs(g)+Math.abs(h)=0;d++,f--,b+=o){d>=m&&(d-=m);var x=this.layer.data[d];for(c=v,e=q-p,a=t;e>=0;c++,e--,a+=n){c>=l&&(c-=l);var y=x[c];!y||y.index<0||!y.collides||(this.debugSettings.collidingTileOverfill&&(i.fillStyle=this.debugSettings.collidingTileOverfill,i.fillRect(a,b,this._mc.cw,this._mc.ch)),this.debugSettings.facingEdgeStroke&&(i.beginPath(),y.faceTop&&(i.moveTo(a,b),i.lineTo(a+this._mc.cw,b)),y.faceBottom&&(i.moveTo(a,b+this._mc.ch),i.lineTo(a+this._mc.cw,b+this._mc.ch)),y.faceLeft&&(i.moveTo(a,b),i.lineTo(a,b+this._mc.ch)),y.faceRight&&(i.moveTo(a+this._mc.cw,b),i.lineTo(a+this._mc.cw,b+this._mc.ch)),i.closePath(),i.stroke()))}}},Object.defineProperty(c.TilemapLayer.prototype,"wrap",{get:function(){return this._wrap},set:function(a){this._wrap=a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollX",{get:function(){return this._scrollX},set:function(a){this._scrollX=a}}),Object.defineProperty(c.TilemapLayer.prototype,"scrollY",{get:function(){return this._scrollY},set:function(a){this._scrollY=a}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionWidth",{get:function(){return this._mc.cw},set:function(a){this._mc.cw=0|a,this.dirty=!0}}),Object.defineProperty(c.TilemapLayer.prototype,"collisionHeight",{get:function(){return this._mc.ch},set:function(a){this._mc.ch=0|a,this.dirty=!0}}),c.TilemapParser={INSERT_NULL:!1,parse:function(a,b,d,e,f,g){if(void 0===d&&(d=32),void 0===e&&(e=32),void 0===f&&(f=10),void 0===g&&(g=10),void 0===b)return this.getEmptyData();if(null===b)return this.getEmptyData(d,e,f,g);var h=a.cache.getTilemapData(b);if(h){if(h.format===c.Tilemap.CSV)return this.parseCSV(b,h.data,d,e);if(!h.format||h.format===c.Tilemap.TILED_JSON)return this.parseTiledJSON(h.data)}else console.warn("Phaser.TilemapParser.parse - No map data found for key "+b)},parseCSV:function(a,b,d,e){var f=this.getEmptyData();b=b.trim();for(var g=[],h=b.split("\n"),i=h.length,j=0,k=0;k>>0;g.data=j,delete g.encoding}else if(g.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+g.name+"'");continue}var l={name:g.name,x:g.x,y:g.y,width:g.width,height:g.height,widthInPixels:g.width*a.tilewidth,heightInPixels:g.height*a.tileheight,alpha:g.opacity,visible:g.visible,properties:{},indexes:[],callbacks:[],bodies:[]};g.properties&&(l.properties=g.properties);for(var m,n,o,p,q=0,r=[],s=[],t=0,i=g.data.length;t536870912)switch(p>2147483648&&(p-=2147483648,o+=4),p>1073741824&&(p-=1073741824,o+=2),p>536870912&&(p-=536870912,o+=1),o){case 5:m=Math.PI/2;break;case 6:m=Math.PI;break;case 3:m=3*Math.PI/2;break;case 4:m=0,n=!0;break;case 7:m=Math.PI/2,n=!0;break;case 2:m=Math.PI,n=!0;break;case 1:m=3*Math.PI/2,n=!0}if(p>0){var u=new c.Tile(l,p,q,s.length,a.tilewidth,a.tileheight);u.rotation=m,u.flipped=n,0!==o&&(u.flippedVal=o),r.push(u)}else c.TilemapParser.INSERT_NULL?r.push(null):r.push(new c.Tile(l,-1,q,s.length,a.tilewidth,a.tileheight));q++,q===g.width&&(s.push(r),q=0,r=[])}l.data=s,e.push(l)}d.layers=e;for(var v=[],f=0;f=0&&e+1=this.firstgid&&a=this._timer)if(this._timer=this.game.time.time+this.frequency*this.game.time.slowMotion,0!==this._flowTotal)if(this._flowQuantity>0){for(var a=0;a=this._flowTotal)){this.on=!1;break}}else this.emitParticle()&&(this._counter++,-1!==this._flowTotal&&this._counter>=this._flowTotal&&(this.on=!1));else this.emitParticle()&&(this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1));for(var a=this.children.length;a--;)this.children[a].exists&&this.children[a].update()},c.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,c,d,e){void 0===b&&(b=0),void 0===c&&(c=this.maxParticles),void 0===d&&(d=!1),void 0===e&&(e=!1);var f,g=0,h=a,i=b;for(this._frames=b,c>this.maxParticles&&(this.maxParticles=c);gthis.maxParticles&&(c=this.maxParticles),this._counter=0,this._flowQuantity=c,this._flowTotal=d,e?(this.start(!0,a,b,c),this._counter+=c,this.on=!0,this._timer=this.game.time.time+b*this.game.time.slowMotion):this.start(!1,a,b,c),this},c.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d,e){if(void 0===a&&(a=!0),void 0===b&&(b=0),void 0!==c&&null!==c||(c=250),void 0===d&&(d=0),void 0===e&&(e=!1),d>this.maxParticles&&(d=this.maxParticles),this.revive(),this.visible=!0,this.lifespan=b,this.frequency=c,a||e)for(var f=0;f1&&(g=f.between(this.left,this.right)),null!==b?h=b:this.height>1&&(h=f.between(this.top,this.bottom)),e.reset(g,h),e.angle=0,e.lifespan=this.lifespan,this.particleBringToTop?this.bringToTop(e):this.particleSendToBack&&this.sendToBack(e),this.autoScale?e.setScaleData(this.scaleData):1!==this.minParticleScale||1!==this.maxParticleScale?e.scale.set(f.realInRange(this.minParticleScale,this.maxParticleScale)):this._minParticleScale.x===this._maxParticleScale.x&&this._minParticleScale.y===this._maxParticleScale.y||e.scale.set(f.realInRange(this._minParticleScale.x,this._maxParticleScale.x),f.realInRange(this._minParticleScale.y,this._maxParticleScale.y)),void 0===d&&(Array.isArray(this._frames)?e.frame=this.game.rnd.pick(this._frames):e.frame=this._frames),this.autoAlpha?e.setAlphaData(this.alphaData):e.alpha=f.realInRange(this.minParticleAlpha,this.maxParticleAlpha),e.blendMode=this.blendMode;var i=e.body;return i.updateBounds(),i.bounce.copyFrom(this.bounce),i.drag.copyFrom(this.particleDrag),i.velocity.x=f.between(this.minParticleSpeed.x,this.maxParticleSpeed.x),i.velocity.y=f.between(this.minParticleSpeed.y,this.maxParticleSpeed.y),i.angularVelocity=f.between(this.minRotation,this.maxRotation),i.gravity.y=this.gravity,i.angularDrag=this.angularDrag,e.onEmit(),!0},c.Particles.Arcade.Emitter.prototype.destroy=function(){this.game.particles.remove(this),c.Group.prototype.destroy.call(this,!0,!1)},c.Particles.Arcade.Emitter.prototype.setSize=function(a,b){return this.area.width=a,this.area.height=b,this},c.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b,this},c.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){return a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b,this},c.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){return a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b,this},c.Particles.Arcade.Emitter.prototype.setAlpha=function(a,b,d,e,f){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=0),void 0===e&&(e=c.Easing.Linear.None),void 0===f&&(f=!1),this.minParticleAlpha=a,this.maxParticleAlpha=b,this.autoAlpha=!1,d>0&&a!==b){var g={v:a},h=this.game.make.tween(g).to({v:b},d,e);h.yoyo(f),this.alphaData=h.generateData(60),this.alphaData.reverse(),this.autoAlpha=!0}return this},c.Particles.Arcade.Emitter.prototype.setScale=function(a,b,d,e,f,g,h){if(void 0===a&&(a=1),void 0===b&&(b=1),void 0===d&&(d=1),void 0===e&&(e=1),void 0===f&&(f=0),void 0===g&&(g=c.Easing.Linear.None),void 0===h&&(h=!1), +this.minParticleScale=1,this.maxParticleScale=1,this._minParticleScale.set(a,d),this._maxParticleScale.set(b,e),this.autoScale=!1,f>0&&(a!==b||d!==e)){var i={x:a,y:d},j=this.game.make.tween(i).to({x:b,y:e},f,g);j.yoyo(h),this.scaleData=j.generateData(60),this.scaleData.reverse(),this.autoScale=!0}return this},c.Particles.Arcade.Emitter.prototype.at=function(a){return a.center?(this.emitX=a.center.x,this.emitY=a.center.y):(this.emitX=a.world.x+a.anchor.x*a.width,this.emitY=a.world.y+a.anchor.y*a.height),this},Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"width",{get:function(){return this.area.width},set:function(a){this.area.width=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"height",{get:function(){return this.area.height},set:function(a){this.area.height=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.area.width/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.area.height/2)}}),Object.defineProperty(c.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.area.height/2)}}),c.Weapon=function(a,b){c.Plugin.call(this,a,b),this.bullets=null,this.autoExpandBulletsGroup=!1,this.autofire=!1,this.shots=0,this.fireLimit=0,this.fireRate=100,this.fireRateVariance=0,this.fireFrom=new c.Rectangle(0,0,1,1),this.fireAngle=c.ANGLE_UP,this.bulletInheritSpriteSpeed=!1,this.bulletAnimation="",this.bulletFrameRandom=!1,this.bulletFrameCycle=!1,this.bulletWorldWrap=!1,this.bulletWorldWrapPadding=0,this.bulletAngleOffset=0,this.bulletAngleVariance=0,this.bulletSpeed=200,this.bulletSpeedVariance=0,this.bulletLifespan=0,this.bulletKillDistance=0,this.bulletGravity=new c.Point(0,0),this.bulletRotateToVelocity=!1,this.bulletKey="",this.bulletFrame="",this._bulletClass=c.Bullet,this._bulletCollideWorldBounds=!1,this._bulletKillType=c.Weapon.KILL_WORLD_BOUNDS,this._data={customBody:!1,width:0,height:0,offsetX:0,offsetY:0},this.bounds=new c.Rectangle,this.bulletBounds=a.world.bounds,this.bulletFrames=[],this.bulletFrameIndex=0,this.anims={},this.onFire=new c.Signal,this.onKill=new c.Signal,this.onFireLimit=new c.Signal,this.trackedSprite=null,this.trackedPointer=null,this.trackRotation=!1,this.trackOffset=new c.Point,this._nextFire=0,this._rotatedPoint=new c.Point},c.Weapon.prototype=Object.create(c.Plugin.prototype),c.Weapon.prototype.constructor=c.Weapon,c.Weapon.KILL_NEVER=0,c.Weapon.KILL_LIFESPAN=1,c.Weapon.KILL_DISTANCE=2,c.Weapon.KILL_WEAPON_BOUNDS=3,c.Weapon.KILL_CAMERA_BOUNDS=4,c.Weapon.KILL_WORLD_BOUNDS=5,c.Weapon.KILL_STATIC_BOUNDS=6,c.Weapon.prototype.createBullets=function(a,b,d,e){return void 0===a&&(a=1),void 0===e&&(e=this.game.world),this.bullets||(this.bullets=this.game.add.physicsGroup(c.Physics.ARCADE,e),this.bullets.classType=this._bulletClass),0!==a&&(-1===a&&(this.autoExpandBulletsGroup=!0,a=1),this.bullets.createMultiple(a,b,d),this.bullets.setAll("data.bulletManager",this),this.bulletKey=b,this.bulletFrame=d),this},c.Weapon.prototype.forEach=function(a,b){return this.bullets.forEachExists(a,b,arguments),this},c.Weapon.prototype.pauseAll=function(){return this.bullets.setAll("body.enable",!1),this},c.Weapon.prototype.resumeAll=function(){return this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.killAll=function(){return this.bullets.callAllExists("kill",!0),this.bullets.setAll("body.enable",!0),this},c.Weapon.prototype.resetShots=function(a){return this.shots=0,void 0!==a&&(this.fireLimit=a),this},c.Weapon.prototype.destroy=function(){this.parent.remove(this,!1),this.bullets.destroy(),this.game=null,this.parent=null,this.active=!1,this.visible=!1},c.Weapon.prototype.update=function(){this._bulletKillType===c.Weapon.KILL_WEAPON_BOUNDS&&(this.trackedSprite?(this.trackedSprite.updateTransform(),this.bounds.centerOn(this.trackedSprite.worldPosition.x,this.trackedSprite.worldPosition.y)):this.trackedPointer&&this.bounds.centerOn(this.trackedPointer.worldX,this.trackedPointer.worldY)),this.autofire&&this.fire()},c.Weapon.prototype.trackSprite=function(a,b,c,d){return void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=!1),this.trackedPointer=null,this.trackedSprite=a,this.trackRotation=d,this.trackOffset.set(b,c),this},c.Weapon.prototype.trackPointer=function(a,b,c){return void 0===a&&(a=this.game.input.activePointer),void 0===b&&(b=0),void 0===c&&(c=0),this.trackedPointer=a,this.trackedSprite=null,this.trackRotation=!1,this.trackOffset.set(b,c),this},c.Weapon.prototype.fire=function(a,b,d){if(this.game.time.now0&&this.shots===this.fireLimit)return!1;var e=this.bulletSpeed;0!==this.bulletSpeedVariance&&(e+=c.Math.between(-this.bulletSpeedVariance,this.bulletSpeedVariance)),a?this.fireFrom.width>1?this.fireFrom.centerOn(a.x,a.y):(this.fireFrom.x=a.x,this.fireFrom.y=a.y):this.trackedSprite?(this.trackRotation?(this._rotatedPoint.set(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y),this._rotatedPoint.rotate(this.trackedSprite.world.x,this.trackedSprite.world.y,this.trackedSprite.rotation),this.fireFrom.width>1?this.fireFrom.centerOn(this._rotatedPoint.x,this._rotatedPoint.y):(this.fireFrom.x=this._rotatedPoint.x,this.fireFrom.y=this._rotatedPoint.y)):this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedSprite.world.x+this.trackOffset.x,this.trackedSprite.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedSprite.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedSprite.world.y+this.trackOffset.y),this.bulletInheritSpriteSpeed&&(e+=this.trackedSprite.body.speed)):this.trackedPointer&&(this.fireFrom.width>1?this.fireFrom.centerOn(this.trackedPointer.world.x+this.trackOffset.x,this.trackedPointer.world.y+this.trackOffset.y):(this.fireFrom.x=this.trackedPointer.world.x+this.trackOffset.x,this.fireFrom.y=this.trackedPointer.world.y+this.trackOffset.y));var f=this.fireFrom.width>1?this.fireFrom.randomX:this.fireFrom.x,g=this.fireFrom.height>1?this.fireFrom.randomY:this.fireFrom.y,h=this.trackRotation?this.trackedSprite.angle:this.fireAngle;void 0!==b&&void 0!==d&&(h=this.game.math.radToDeg(Math.atan2(d-g,b-f))),0!==this.bulletAngleVariance&&(h+=c.Math.between(-this.bulletAngleVariance,this.bulletAngleVariance));var i=0,j=0;0===h||180===h?i=Math.cos(this.game.math.degToRad(h))*e:90===h||270===h?j=Math.sin(this.game.math.degToRad(h))*e:(i=Math.cos(this.game.math.degToRad(h))*e,j=Math.sin(this.game.math.degToRad(h))*e);var k=null;if(this.autoExpandBulletsGroup?(k=this.bullets.getFirstExists(!1,!0,f,g,this.bulletKey,this.bulletFrame),k.data.bulletManager=this):k=this.bullets.getFirstExists(!1),k){if(k.reset(f,g),k.data.fromX=f,k.data.fromY=g,k.data.killType=this.bulletKillType,k.data.killDistance=this.bulletKillDistance,k.data.rotateToVelocity=this.bulletRotateToVelocity,this.bulletKillType===c.Weapon.KILL_LIFESPAN&&(k.lifespan=this.bulletLifespan),k.angle=h+this.bulletAngleOffset,""!==this.bulletAnimation){if(null===k.animations.getAnimation(this.bulletAnimation)){var l=this.anims[this.bulletAnimation];k.animations.add(l.name,l.frames,l.frameRate,l.loop,l.useNumericIndex)}k.animations.play(this.bulletAnimation)}else this.bulletFrameCycle?(k.frame=this.bulletFrames[this.bulletFrameIndex],++this.bulletFrameIndex>=this.bulletFrames.length&&(this.bulletFrameIndex=0)):this.bulletFrameRandom&&(k.frame=this.bulletFrames[Math.floor(Math.random()*this.bulletFrames.length)]);if(k.data.bodyDirty&&(this._data.customBody&&k.body.setSize(this._data.width,this._data.height,this._data.offsetX,this._data.offsetY),k.body.collideWorldBounds=this.bulletCollideWorldBounds,k.data.bodyDirty=!1),k.body.velocity.set(i,j),k.body.gravity.set(this.bulletGravity.x,this.bulletGravity.y),0!==this.bulletSpeedVariance){var m=this.fireRate;m+=c.Math.between(-this.fireRateVariance,this.fireRateVariance),m<0&&(m=0),this._nextFire=this.game.time.now+m}else this._nextFire=this.game.time.now+this.fireRate;this.shots++,this.onFire.dispatch(k,this,e),this.fireLimit>0&&this.shots===this.fireLimit&&this.onFireLimit.dispatch(this,this.fireLimit)}return k},c.Weapon.prototype.fireAtPointer=function(a){return void 0===a&&(a=this.game.input.activePointer),this.fire(null,a.worldX,a.worldY)},c.Weapon.prototype.fireAtSprite=function(a){return this.fire(null,a.world.x,a.world.y)},c.Weapon.prototype.fireAtXY=function(a,b){return this.fire(null,a,b)},c.Weapon.prototype.setBulletBodyOffset=function(a,b,c,d){return void 0===c&&(c=0),void 0===d&&(d=0),this._data.customBody=!0,this._data.width=a,this._data.height=b,this._data.offsetX=c,this._data.offsetY=d,this.bullets.callAll("body.setSize","body",a,b,c,d),this.bullets.setAll("data.bodyDirty",!1),this},c.Weapon.prototype.setBulletFrames=function(a,b,d,e){return void 0===d&&(d=!0),void 0===e&&(e=!1),this.bulletFrames=c.ArrayUtils.numberArray(a,b),this.bulletFrameIndex=0,this.bulletFrameCycle=d,this.bulletFrameRandom=e,this},c.Weapon.prototype.addBulletAnimation=function(a,b,c,d,e){return this.anims[a]={name:a,frames:b,frameRate:c,loop:d,useNumericIndex:e},this.bullets.callAll("animations.add","animations",a,b,c,d,e),this.bulletAnimation=a,this},c.Weapon.prototype.debug=function(a,b,c){void 0===a&&(a=16),void 0===b&&(b=32),void 0===c&&(c=!1),this.game.debug.text("Weapon Plugin",a,b),this.game.debug.text("Bullets Alive: "+this.bullets.total+" - Total: "+this.bullets.length,a,b+24),c&&this.bullets.forEachExists(this.game.debug.body,this.game.debug,"rgba(255, 0, 255, 0.8)")},Object.defineProperty(c.Weapon.prototype,"bulletClass",{get:function(){return this._bulletClass},set:function(a){this._bulletClass=a,this.bullets.classType=this._bulletClass}}),Object.defineProperty(c.Weapon.prototype,"bulletKillType",{get:function(){return this._bulletKillType},set:function(a){switch(a){case c.Weapon.KILL_STATIC_BOUNDS:case c.Weapon.KILL_WEAPON_BOUNDS:this.bulletBounds=this.bounds;break;case c.Weapon.KILL_CAMERA_BOUNDS:this.bulletBounds=this.game.camera.view;break;case c.Weapon.KILL_WORLD_BOUNDS:this.bulletBounds=this.game.world.bounds}this._bulletKillType=a}}),Object.defineProperty(c.Weapon.prototype,"bulletCollideWorldBounds",{get:function(){return this._bulletCollideWorldBounds},set:function(a){this._bulletCollideWorldBounds=a,this.bullets.setAll("body.collideWorldBounds",a),this.bullets.setAll("data.bodyDirty",!1)}}),Object.defineProperty(c.Weapon.prototype,"x",{get:function(){return this.fireFrom.x},set:function(a){this.fireFrom.x=a}}),Object.defineProperty(c.Weapon.prototype,"y",{get:function(){return this.fireFrom.y},set:function(a){this.fireFrom.y=a}}),c.Bullet=function(a,b,d,e,f){c.Sprite.call(this,a,b,d,e,f),this.anchor.set(.5),this.data={bulletManager:null,fromX:0,fromY:0,bodyDirty:!0,rotateToVelocity:!1,killType:0,killDistance:0}},c.Bullet.prototype=Object.create(c.Sprite.prototype),c.Bullet.prototype.constructor=c.Bullet,c.Bullet.prototype.kill=function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.data.bulletManager.onKill.dispatch(this),this},c.Bullet.prototype.update=function(){this.exists&&(this.data.killType>c.Weapon.KILL_LIFESPAN&&(this.data.killType===c.Weapon.KILL_DISTANCE?this.game.physics.arcade.distanceToXY(this,this.data.fromX,this.data.fromY,!0)>this.data.killDistance&&this.kill():this.data.bulletManager.bulletBounds.intersects(this)||this.kill()),this.data.rotateToVelocity&&(this.rotation=Math.atan2(this.body.velocity.y,this.body.velocity.x)),this.data.bulletManager.bulletWorldWrap&&this.game.world.wrap(this,this.data.bulletManager.bulletWorldWrapPadding))},c.Video=function(a,b,d){if(void 0===b&&(b=null),void 0===d&&(d=null),this.game=a,this.key=b,this.width=0,this.height=0,this.type=c.VIDEO,this.disableTextureUpload=!1,this.touchLocked=!1,this.onPlay=new c.Signal,this.onChangeSource=new c.Signal,this.onComplete=new c.Signal,this.onAccess=new c.Signal,this.onError=new c.Signal,this.onTimeout=new c.Signal,this.timeout=15e3,this._timeOutID=null,this.video=null,this.videoStream=null,this.isStreaming=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._codeMuted=!1,this._muted=!1,this._codePaused=!1,this._paused=!1,this._pending=!1,this._autoplay=!1,this._endCallback=null,this._playCallback=null,b&&this.game.cache.checkVideoKey(b)){var e=this.game.cache.getVideo(b);e.isBlob?this.createVideoFromBlob(e.data):this.video=e.data,this.width=this.video.videoWidth,this.height=this.video.videoHeight}else d&&this.createVideoFromURL(d,!1);this.video&&!d?(this.baseTexture=new PIXI.BaseTexture(this.video),this.baseTexture.forceLoaded(this.width,this.height)):(this.baseTexture=new PIXI.BaseTexture(c.Cache.DEFAULT.baseTexture.source),this.baseTexture.forceLoaded(this.width,this.height)),this.texture=new PIXI.Texture(this.baseTexture),this.textureFrame=new c.Frame(0,0,0,this.width,this.height,"video"),this.texture.setFrame(this.textureFrame),this.texture.valid=!1,null!==b&&this.video&&(this.texture.valid=this.video.canplay),this.snapshot=null,c.BitmapData&&(this.snapshot=new c.BitmapData(this.game,"",this.width,this.height)),!this.game.device.cocoonJS&&(this.game.device.iOS||this.game.device.chrome)||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock?this.setTouchLock():e&&(e.locked=!1)},c.Video.prototype={connectToMediaStream:function(a,b){return a&&b&&(this.video=a,this.videoStream=b,this.isStreaming=!0,this.baseTexture.source=this.video,this.updateTexture(null,this.video.videoWidth,this.video.videoHeight),this.onAccess.dispatch(this)),this},startMediaStream:function(a,b,c){if(void 0===a&&(a=!1),void 0===b&&(b=null),void 0===c&&(c=null),!this.game.device.getUserMedia)return this.onError.dispatch(this,"No getUserMedia"),!1;null!==this.videoStream&&(this.videoStream.active?this.videoStream.active=!1:this.videoStream.stop()),this.removeVideoElement(),this.video=document.createElement("video"),this.video.setAttribute("autoplay","autoplay"),null!==b&&(this.video.width=b),null!==c&&(this.video.height=c),this._timeOutID=window.setTimeout(this.getUserMediaTimeout.bind(this),this.timeout);try{navigator.getUserMedia({audio:a,video:!0},this.getUserMediaSuccess.bind(this),this.getUserMediaError.bind(this))}catch(a){this.getUserMediaError(a)}return this},getUserMediaTimeout:function(){clearTimeout(this._timeOutID),this.onTimeout.dispatch(this)},getUserMediaError:function(a){clearTimeout(this._timeOutID),this.onError.dispatch(this,a)},getUserMediaSuccess:function(a){clearTimeout(this._timeOutID),this.videoStream=a,void 0!==this.video.mozSrcObject?this.video.mozSrcObject=a:this.video.src=window.URL&&window.URL.createObjectURL(a)||a;var b=this;this.video.onloadeddata=function(){function a(){if(c>0)if(b.video.videoWidth>0){var d=b.video.videoWidth,e=b.video.videoHeight;isNaN(b.video.videoHeight)&&(e=d/(4/3)),b.video.play(),b.isStreaming=!0,b.baseTexture.source=b.video,b.updateTexture(null,d,e),b.onAccess.dispatch(b)}else window.setTimeout(a,500);else console.warn("Unable to connect to video stream. Webcam error?");c--}var c=10;a()}},createVideoFromBlob:function(a){var b=this;return this.video=document.createElement("video"),this.video.controls=!1,this.video.setAttribute("autoplay","autoplay"),this.video.addEventListener("loadeddata",function(a){b.updateTexture(a)},!0),this.video.src=window.URL.createObjectURL(a),this.video.canplay=!0,this},createVideoFromURL:function(a,b){return void 0===b&&(b=!1),this.texture&&(this.texture.valid=!1),this.video=document.createElement("video"),this.video.controls=!1,b&&this.video.setAttribute("autoplay","autoplay"),this.video.src=a,this.video.canplay=!0,this.video.load(),this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval),this.key=a,this},updateTexture:function(a,b,c){var d=!1;void 0!==b&&null!==b||(b=this.video.videoWidth,d=!0),void 0!==c&&null!==c||(c=this.video.videoHeight),this.width=b,this.height=c,this.baseTexture.source!==this.video&&(this.baseTexture.source=this.video),this.baseTexture.forceLoaded(b,c),this.texture.frame.resize(b,c),this.texture.width=b,this.texture.height=c,this.texture.valid=!0,this.snapshot&&this.snapshot.resize(b,c),d&&null!==this.key&&(this.onChangeSource.dispatch(this,b,c),this._autoplay&&(this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate)))},complete:function(){this.onComplete.dispatch(this)},play:function(a,b){return void 0===a&&(a=!1),void 0===b&&(b=1),this.game.sound.onMute&&(this.game.sound.onMute.add(this.setMute,this),this.game.sound.onUnMute.add(this.unsetMute,this),this.game.sound.mute&&this.setMute()),this.game.onPause.add(this.setPause,this),this.game.onResume.add(this.setResume,this),this._endCallback=this.complete.bind(this),this.video.addEventListener("ended",this._endCallback,!0),this.video.addEventListener("webkitendfullscreen",this._endCallback,!0),this.video.loop=a?"loop":"",this.video.playbackRate=b,this.touchLocked?this._pending=!0:(this._pending=!1,null!==this.key&&(4!==this.video.readyState?(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval)):(this._playCallback=this.playHandler.bind(this),this.video.addEventListener("playing",this._playCallback,!0))),this.video.play(),this.onPlay.dispatch(this,a,b)),this},playHandler:function(){this.video.removeEventListener("playing",this._playCallback,!0),this.updateTexture()},stop:function(){return this.game.sound.onMute&&(this.game.sound.onMute.remove(this.setMute,this),this.game.sound.onUnMute.remove(this.unsetMute,this)),this.game.onPause.remove(this.setPause,this),this.game.onResume.remove(this.setResume,this),this.isStreaming?(this.video.mozSrcObject?(this.video.mozSrcObject.stop(),this.video.src=null):(this.video.src="",this.videoStream.active?this.videoStream.active=!1:this.videoStream.getTracks?this.videoStream.getTracks().forEach(function(a){a.stop()}):this.videoStream.stop()),this.videoStream=null,this.isStreaming=!1):(this.video.removeEventListener("ended",this._endCallback,!0),this.video.removeEventListener("webkitendfullscreen",this._endCallback,!0),this.video.removeEventListener("playing",this._playCallback,!0),this.touchLocked?this._pending=!1:this.video.pause()),this},add:function(a){if(Array.isArray(a))for(var b=0;b0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):console.warn("Phaser.Video: Unable to start downloading video in time",this.isStreaming))},setTouchLock:function(){this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0},unlock:function(){if(this.touchLocked=!1,this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate),this.key){var a=this.game.cache.getVideo(this.key);a&&!a.isBlob&&(a.locked=!1)}return!0},grab:function(a,b,c){return void 0===a&&(a=!1),void 0===b&&(b=1),void 0===c&&(c=null),null===this.snapshot?void console.warn("Video.grab cannot run because Phaser.BitmapData is unavailable"):(a&&this.snapshot.cls(),this.snapshot.copy(this.video,0,0,this.width,this.height,0,0,this.width,this.height,0,0,0,1,1,b,c),this.snapshot)},removeVideoElement:function(){if(this.video){for(this.video.parentNode&&this.video.parentNode.removeChild(this.video);this.video.hasChildNodes();)this.video.removeChild(this.video.firstChild);this.video.removeAttribute("autoplay"),this.video.removeAttribute("src"),this.video=null}},destroy:function(){this.stop(),this.removeVideoElement(),this.touchLocked&&this.game.input.touch.removeTouchLockCallback(this.unlock,this),this._retryID&&window.clearTimeout(this._retryID)}},Object.defineProperty(c.Video.prototype,"currentTime",{get:function(){return this.video?this.video.currentTime:0},set:function(a){this.video.currentTime=a}}),Object.defineProperty(c.Video.prototype,"duration",{get:function(){return this.video?this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"progress",{get:function(){return this.video?this.video.currentTime/this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"mute",{get:function(){return this._muted},set:function(a){if(a=a||null){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}}),Object.defineProperty(c.Video.prototype,"paused",{get:function(){return this._paused},set:function(a){if(a=a||null,!this.touchLocked)if(a){if(this._paused)return;this._codePaused=!0,this.setPause()}else{if(!this._paused)return;this._codePaused=!1,this.setResume()}}}),Object.defineProperty(c.Video.prototype,"volume",{get:function(){return this.video?this.video.volume:1},set:function(a){a<0?a=0:a>1&&(a=1),this.video&&(this.video.volume=a)}}),Object.defineProperty(c.Video.prototype,"playbackRate",{get:function(){return this.video?this.video.playbackRate:1},set:function(a){this.video&&(this.video.playbackRate=a)}}),Object.defineProperty(c.Video.prototype,"loop",{get:function(){return!!this.video&&this.video.loop},set:function(a){a&&this.video?this.video.loop="loop":this.video&&(this.video.loop="")}}),Object.defineProperty(c.Video.prototype,"playing",{get:function(){return!(this.video.paused&&this.video.ended)}}),c.Video.prototype.constructor=c.Video,void 0===PIXI.blendModes&&(PIXI.blendModes=c.blendModes),void 0===PIXI.scaleModes&&(PIXI.scaleModes=c.scaleModes),void 0===PIXI.Texture.emptyTexture&&(PIXI.Texture.emptyTexture=new PIXI.Texture(new PIXI.BaseTexture)),void 0===PIXI.DisplayObject._tempMatrix&&(PIXI.DisplayObject._tempMatrix=new PIXI.Matrix),void 0===PIXI.RenderTexture.tempMatrix&&(PIXI.RenderTexture.tempMatrix=new PIXI.Matrix),PIXI.Graphics&&void 0===PIXI.Graphics.POLY&&(PIXI.Graphics.POLY=c.POLYGON,PIXI.Graphics.RECT=c.RECTANGLE,PIXI.Graphics.CIRC=c.CIRCLE,PIXI.Graphics.ELIP=c.ELLIPSE,PIXI.Graphics.RREC=c.ROUNDEDRECTANGLE),PIXI.TextureSilentFail=!0,"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=c),exports.Phaser=c):"undefined"!=typeof define&&define.amd?define("Phaser",function(){return b.Phaser=c}()):b.Phaser=c,c}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Button",["Phaser"],function(){"use strict";return function(c){function d(b,c,e,f,g,h,i){this.destroy=a(this.destroy,this),this.disable=a(this.disable,this),this.enable=a(this.enable,this),this.setUp=a(this.setUp,this),this.setDown=a(this.setDown,this),this.soundId=i,_.isArray(g)&&(this.downFrameName=g[1],g=this.upFrameName=g[0]),null!=g?d.__super__.constructor.call(this,b,c,e,f,"_default0000"):d.__super__.constructor.call(this,b,c,e,f),g&&(this.sprite=b.make.sprite(0,0,f,g),this.sprite.anchor.set(.5),this.addChild(this.sprite)),this.id=Math.random(),this.customEvents||(this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(b.TouchManager.register(this,"touchstart",this.setDown),b.TouchManager.register(this,"touchend",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.vibrate&&navigator.vibrate&&navigator.vibrate(50),a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))):(b.TouchManager.register(this,"mousedown",this.setDown),b.TouchManager.register(this,"mouseup",function(a){return function(b,c){return c&&a.isDown&&null!=h&&(a.game.settings.fx&&a.soundId&&a.game.currentSounds[a.soundId].play(),h(a)),a.setUp()}}(this))))}return b(d,c),d.prototype.setDown=function(){if(this.isDown=!0,this.disabled||null==this.downFrameName||null==this.sprite||(this.sprite.frameName=this.downFrameName),!this.disabled&&this.label)return this.label.scale.set(.95)},d.prototype.setUp=function(){if(this.isDown=!1,this.disabled||null==this.upFrameName||null==this.sprite||(this.sprite.frameName=this.upFrameName),!this.disabled&&this.label)return this.label.scale.set(1)},d.prototype.enable=function(){return this.disabled=!1},d.prototype.disable=function(){return this.disabled=!0},d.prototype.destroy=function(){return this.game.bowser.mobile||this.game.bowser.tablet||this.game.device.iPad?(this.game.TouchManager.unregister(this,"touchstart"),this.game.TouchManager.unregister(this,"touchend")):(this.game.TouchManager.unregister(this,"mousedown"),this.game.TouchManager.unregister(this,"mouseup")),d.__super__.destroy.apply(this,arguments)},d}(Phaser.Sprite)})}.call(this),function(){var a=function(a,c){function d(){this.constructor=a}for(var e in c)b.call(c,e)&&(a[e]=c[e]);return d.prototype=c.prototype,a.prototype=new d,a.__super__=c.prototype,a},b={}.hasOwnProperty;define("States/Common/GoldButton",["./Button","Phaser"],function(b){"use strict";return function(b){function c(a,b,d,e,f,g){var h;null==g&&(g=28),c.__super__.constructor.call(this,a,b,d,"MenuAssets","",f,"pusher"),this.anchor.set(.5),h=this.game.lang.font,this.label=a.make.bitmapText(0,0,h,e+" ",g),this.label.anchor.set(.5),this.addChild(this.label)}return a(c,b),c}(b)})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Common/Navies",["./Button","Phaser"],function(c){"use strict";return function(c){function d(b,c,e,f){var g,h,i;for(null==f&&(f=3),this.update=a(this.update,this),d.__super__.constructor.call(this,b,c,e,"MenuAssets","_default0000"),this.anchor.set(.5),g=0,i=f;0<=i?g<=i:g>=i;0<=i?++g:--g)h=new Phaser.Sprite(b,0,0,"MenuAssets","Navy0000"),h.anchor.set(.5),h.scale.set(.3+.7*Math.random()),h.offsetCart={x:200*(Math.random()-.5),y:50*(Math.random()-.5)},h.offset={r:400*Math.random(),theta:Math.random()},h.rprime=0,h.speed={r:7e-4+5e-4*Math.random(),theta:3e-4+5e-4*(Math.random()-.5)},h.pos={r:Math.random(),theta:Math.random()*Math.PI*2},h.update=function(){return this.rprime+=this.speed.r,this.pos.r=this.offset.r*Math.sin(this.rprime),this.pos.theta+=this.speed.theta,this.x=this.offsetCart.x+this.pos.r*Math.cos(this.pos.theta),this.y=this.offsetCart.y+this.pos.r*Math.sin(this.pos.theta)},this.addChild(h)}return b(d,c),d.prototype.update=function(){var a,b,c,d,e;for(d=this.children,e=[],b=0,c=d.length;b0&&g[g.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!g||c[1]>g[0]&&c[1]\n
\n \n
\n
\n
\n \n
\n \n
\n
\n
'+b+"
\n "}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=c(function(a,c){!function(c,d){a.exports=function(){function a(a){var b=typeof a;return null!==a&&("object"===b||"function"===b)}function c(a){return"function"==typeof a}function d(a){N=a}function e(a){O=a}function f(){return void 0!==M?function(){M(i)}:g()}function g(){var a=setTimeout;return function(){return a(i,1)}}function i(){for(var a=0;a=a.length-1)return!1;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return!1;var d=j[a.slice(b+1)];return!!d&&d.indexOf(" "+a.slice(c+1,b)+" ")>=0},a.is=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return!1;if(a.lastIndexOf(".",b-1)>=0)return!1;var c=j[a.slice(b+1)];return!!c&&c.indexOf(" "+a.slice(0,b)+" ")>=0},a.get=function(a){var b=a.lastIndexOf(".");if(b<=0||b>=a.length-1)return null;var c=a.lastIndexOf(".",b-1);if(c<=0||c>=b-1)return null;var d=j[a.slice(b+1)];return d?d.indexOf(" "+a.slice(c+1,b)+" ")<0?null:a.slice(c+1):null},a}(),l=function(){function a(){}return a.setList=function(a){j=a||{}},a.getDomain=function(a){if(!j)return null;var b=a.match(/\./g);if(b&&b.length<2)return a;var c=this.getTld(a);if(!c)return null;var d=a.length-c.length-1;return d=a.lastIndexOf(".",d-1)+1,a.substring(d)||""},a.getTld=function(a){if(!j)return"";var b=a.lastIndexOf("."),c=a.substring(b+1);return j[c.toLowerCase()]?k.get(a)||c:c},a.KEY="Domains",a}(),m=function(){function a(){this.cache={}}return Object.defineProperty(a,"instance",{get:function(){return void 0===a.classInstance&&(a.classInstance=new a),a.classInstance},enumerable:!1,configurable:!0}),a.prototype.load=function(a,b,c){var d=this;return this.contains(a)?Promise.reject("Already in cache."):(this.cache[a]={url:b,data:null},this.requestXhr(b,c).then(function(b){return d.loadComplete(a,b)}).catch(function(b){return d.remove(a),Promise.reject(b)}))},a.prototype.loadComplete=function(a,b){if(!this.contains(a))return Promise.reject("Item was removed from cache before loading was complete.");try{var c=JSON.parse(b);return this.cache[a].data=c,Promise.resolve(c)}catch(a){return Promise.reject("There was an error parsing JSON file.")}},a.prototype.remove=function(a){this.contains(a)&&delete this.cache[a]},a.prototype.get=function(a){return this.contains(a)?this.cache[a].data:null},a.prototype.contains=function(a){return this.cache.hasOwnProperty(a)},a.prototype.isLoading=function(a){return this.contains(a)&&null===this.cache[a].data},a.prototype.isLoaded=function(a){return this.contains(a)&&null!==this.cache[a].data},a.prototype.loadScript=function(a,b,c){return void 0===b&&(b=!0),new Promise(function(b,d){var e=document.createElement("script");e.src=a,e.async=!1,e.onload=function(){"function"==typeof c&&c(),b()},document.head.appendChild(e)})},a.prototype.requestXhr=function(a,b){void 0===b&&(b="application/json");var c;return window.XMLHttpRequest?(c=new XMLHttpRequest,new Promise(function(d,e){c.onreadystatechange=function(){4===c.readyState&&(200===c.status?(d(c.responseText),c.onreadystatechange=null):c.status>0&&(e("There was a problem with the request: status "+c.status),c.onreadystatechange=null))};try{c.open("GET",a,!0),c.setRequestHeader("Content-Type",b),c.send()}catch(a){e("Error: Unable to send request, CORS not allowed.")}})):Promise.reject("Unable to send request, XMLHttpRequest not supported.")},a}();!function(a){a[a.splashscreen=0]="splashscreen",a[a.logo=1]="logo",a[a.facebook=2]="facebook",a[a.twitter=3]="twitter",a[a.playstore=4]="playstore",a[a.appstore=5]="appstore",a[a.more_games=6]="more_games",a[a.download_game=7]="download_game",a[a.walkthrough=8]="walkthrough",a[a.disclaimer=9]="disclaimer",a[a.highscores=10]="highscores"}(a.UtmTargets||(a.UtmTargets={}));var n=function(){function a(){}return a.loadPortalScript=function(a){a&&a.hasOwnProperty("minijuegos")&&-1!==a.minijuegos.indexOf(p.getSourceSite())&&(void 0!==window.mpConfig?window.mpConfig.partner="orange-games":window.mpConfig={partner:"orange-games"},d("https://ext.minijuegosgratis.com/external-host/main.js",Date.now()/1e3)),a&&a.hasOwnProperty("kongregate")&&-1!==a.kongregate.indexOf(p.getSourceSite())&&d("https://cdn1.kongregate.com/javascripts/kongregate_api.js",Date.now()/1e3,function(){"undefined"!=typeof kongregateAPI&&kongregateAPI.loadAPI(function(){window.kongregate=kongregateAPI.getAPI()})}),a&&a.hasOwnProperty("newgrounds")&&-1!==a.newgrounds.indexOf(p.getSourceSite())&&d("https://cdn.fbrq.io/@azerion/splash/assets/scripts/newgroundsio.min.js",Date.now()/1e3)},a}(),o=function(){function b(){}return b.preload=function(a){var c=Promise.all([m.instance.load(l.KEY,p.ASSET_LOCATION+"json/domains.json?v="+a,"text/plain"),m.instance.load(b.SITELOCK_PORTALS,p.ASSET_LOCATION+"json/sitelock.json?v="+a,"text/plain")]);return Promise.all([m.instance.load(b.INTERNAL_PORTALS_KEY,p.ASSET_LOCATION+"json/internal.json?v="+a,"text/plain"),m.instance.load(b.CONTRACTED_PORTALS_KEY,p.ASSET_LOCATION+"json/contracted.json?v="+a,"text/plain"),m.instance.load(b.SPECIAL_PORTALS_KEY,p.ASSET_LOCATION+"json/special.json?v="+a,"text/plain")]),c.then(function(a){var c=a[0],d=a[1];l.setList(c),n.loadPortalScript(d),b.setSiteLock(d)}).catch(function(){console.warn("Unable to parse json")})},b.setSiteLock=function(a){b.siteLocks=a},Object.defineProperty(b,"brandingLogoUrl",{get:function(){var c;switch(p.isOnDevice()||b.isAirfi()?p.ASSET_LOCATION="assets/":"fbrq.io"===p.getSourceSite(!0)&&(p.ASSET_LOCATION="https://"+window.location.host+"/@azerion/splash/assets/"),p.getBrandingDomain()){case a.BrandingDomain.Spele:c="spele";break;case a.BrandingDomain.PlayCell:c="playcell";break;case a.BrandingDomain.GameCell:c="gamecell";break;case a.BrandingDomain.Yepi:c="yepi";break;case a.BrandingDomain.Admeen:c="admeen";break;case a.BrandingDomain.Bild:c="bild";break;case a.BrandingDomain.Kizi:c="kizi";break;case a.BrandingDomain.Funnygames:c="funnygames";break;case a.BrandingDomain.PlayTime:c="playtime";break;default:case a.BrandingDomain.AGame:c="agame";break;case a.BrandingDomain.Zigiz:c="zigiz"}return p.ASSET_LOCATION+"images/branding_logo_"+c+"_small.png"},enumerable:!1,configurable:!0}),Object.defineProperty(b,"brandingBackgroundColor",{get:function(){var b;switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:b="#4a72ad";break;case a.BrandingDomain.PlayCell:b="#52a1e1";break;case a.BrandingDomain.GameCell:b="#c600b2";break;case a.BrandingDomain.Yepi:b="#0573a7";break;case a.BrandingDomain.AGame:b="#0C486C";break;case a.BrandingDomain.Admeen:b="#4267B2";break;case a.BrandingDomain.Bild:b="#de0000";break;default:case a.BrandingDomain.Kizi:b="#012f50";break;case a.BrandingDomain.Funnygames:b="#33b0ff";break;case a.BrandingDomain.PlayTime:case a.BrandingDomain.Zigiz:b="#023a63"}return b},enumerable:!1,configurable:!0}),b.openCampaignLink=function(c,d){if(!p.isOnDevice()&&!b.isSpecial()&&b.outGoingLinksAllowed()){var e,f,g=p.getSourceSite(),h=p.isOnDevice()?"https://":"//";switch(p.getBrandingDomain()){case a.BrandingDomain.Spele:e=h+"www.spele.nl";break;case a.BrandingDomain.Yepi:e=h+"www.yepi.com";break;case a.BrandingDomain.Admeen:return e="https://media.admeen.com/branding/link.php",void((f=window.open(e,"_blank"))&&f.focus&&f.focus());case a.BrandingDomain.PlayCell:e=h+"www.playcell.com";break;case a.BrandingDomain.GameCell:e=h+"www.gamecell.com";break;case a.BrandingDomain.Kizi:e=h+"www.kizi.com";break;case a.BrandingDomain.Bild:return void((f=window.open(h+"www.bildspielt.de","_blank"))&&f.focus&&f.focus());case a.BrandingDomain.Funnygames:e=h+"www.funnygames.nu";break;case a.BrandingDomain.PlayTime:e=h+"playtime.nl";break;default:case a.BrandingDomain.AGame:e=h+"www.agame.com";break;case a.BrandingDomain.Zigiz:e=h+"m.zigiz.com"}var i="string"==typeof d?d:a.UtmTargets[d];f=window.open(e+"/?utm_source="+g+"&utm_medium=html5&utm_term="+c+"&utm_content="+i+"&utm_campaign=Gamedistribution","_blank"),f&&f.focus&&f.focus()}},b.isInternal=function(){return b.hostMatchesList(m.instance.get(b.INTERNAL_PORTALS_KEY))},b.isContracted=function(){return b.hostMatchesList(m.instance.get(b.CONTRACTED_PORTALS_KEY))},b.isSpecial=function(){return b.hostMatchesList(m.instance.get(b.SPECIAL_PORTALS_KEY))},b.isAdmeen=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("admeen"))return!1;var a=b.siteLocks.admeen;return b.hostMatchesList(a)},b.isKongregate=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("kongregate"))return!1;var a=b.siteLocks.kongregate;return b.hostMatchesList(a)},b.isNewgrounds=function(){if(!b.siteLocks||!b.siteLocks.hasOwnProperty("newgrounds"))return!1;var a=b.siteLocks.newgrounds;return b.hostMatchesList(a)},b.isBild=function(){return"bild.fbrq.io"===window.location.host||-1!==window.location.host.indexOf("contentfleet.com")},b.isPlaytime=function(){return-1!==window.location.host.indexOf("playtime.nl")},b.isBip=function(){return-1!==window.location.search.indexOf("bipgaming")||"bip.fbrq.io"===window.location.host},b.isPlaycellApp=function(){return-1!==window.location.search.indexOf("playcellApp")},b.isAGame=function(){return-1!==window.location.search.indexOf("agame")},b.isAirfi=function(){return!!window.hasOwnProperty("airfi")&&window.airfi},b.outGoingLinksAllowed=function(){return!(b.isAirfi()||b.isSpecial()||b.isContracted())&&(!window.hasOwnProperty("fbrqLA")||window.fbrqLA)},b.hostMatchesList=function(a){a=a||[];for(var b=p.getSourceSite(),c=0;c-1?c.split("/")[2]:c.split("/")[0],c=c.split(":")[0];var d=l.getDomain(c);return null!==d?d:(3===c.split(".").length&&(c=c.substr(c.indexOf(".")+1)),c)},b.getBrandingDomain=function(){if(window.hasOwnProperty("fbrqBD")&&window.fbrqBD in a.BrandingDomain)return window.fbrqBD;if(o.DOMAIN_OVERWRITE)return o.DOMAIN_OVERWRITE;var c=b.getSourceSite();if(o.isAdmeen())return a.BrandingDomain.Admeen;if(o.isPlaycellApp()||o.isBip())return a.BrandingDomain.PlayCell;switch(c){case"spele.nl":return a.BrandingDomain.Spele;case"yepi.com":return a.BrandingDomain.Yepi;case"oyunskor.com":case"barbioyunu.com.tr":case"bebekoyunu.com.tr":case"oyunkolu.com":case"oyungemisi.com":case"oyunlar1.com":case"oyunkuzusu.com":case"kraloyun.com":case"rekoroyun.com":case"oyundedem.com":case"oyunoyna.com":case"pastaoyunu.com.tr":case"playcell.com":return a.BrandingDomain.PlayCell;case"gamecell.com":return a.BrandingDomain.GameCell;case"playxl.com":return a.BrandingDomain.Admeen;case"kizi.com":return a.BrandingDomain.Kizi;case"bildspielt.de":return a.BrandingDomain.Bild;case"funnygames.nl":return a.BrandingDomain.Funnygames;case"playtime.nl":return a.BrandingDomain.PlayTime;default:case"agame.com":return a.BrandingDomain.AGame;case"gmbl.nl":case"zigiz.com":return a.BrandingDomain.Zigiz;case"coolmathgames.com":return a.BrandingDomain.Neutral}},b.getReferrer=function(a){return-1!==a.indexOf("?ref=")?a.substr(a.indexOf("?ref=")+5):a},b.inIframe=function(){try{return window.self!==window.top}catch(a){return!0}},b.inGDGameZone=function(){return-1!==document.referrer.indexOf("html5.gamedistribution.com")},b.getDomain=function(a){var b=document.createElement("a");return b.href=a,b.origin},b.isOnDevice=function(){return void 0!==window.cordova&&!/(gamedistribution\.com)/.test(window.location.hostname)},b.isTc=function(){return/(teamcity\.azerdev\.com)/.test(window.location.host)},b.getRandomRange=function(a,b){return Math.random()*(b-a)+a|0},b.getUrlParameter=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},b.intTimeToString=function(a){var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=a%60;return(b<10?"0"+b:b.toString())+":"+(c<10?"0"+c:c.toString())+":"+(d<10?"0"+d:d.toString())},b.LANGUAGE="en",b.ASSET_LOCATION=window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/":"https://cdn.fbrq.io/@azerion/splash/assets/",b}(),q=function(){function a(){this.fbrqId="UA-60359297-50"}return a.addScript=function(){return o.analyticsEnabled?new Promise(function(b,c){var d=document.createElement("script"),e="https://www.googletagmanager.com/gtag/js?id="+a.GAMeasurementId;d.setAttribute("src",e),d.async=!0,d.onload=function(){b({loaded:!0})},document.head.appendChild(d)}):Promise.resolve()},a.preload=function(){return o.analyticsEnabled&&a.addScript().then(function(a,b){return new Promise(function(b,c){a.loaded&&(window.hasOwnProperty("dataLayer")&&(window.dataLayer=window.dataLayer||[]),gtag=function(){window.hasOwnProperty("dataLayer")&&window.dataLayer.push(arguments)}),b()})}),Promise.resolve()},a.prototype.setup=function(a,b,c,d,e){if(void 0===b&&(b="none"),void 0===c&&(c="none"),void 0===d&&(d="auto"),void 0===e&&(e=100),"function"!=typeof gtag)return null;if(!o.analyticsEnabled){var f="ga-disable-"+a;return window.hasOwnProperty(f)&&(window.disableID=!o.analyticsEnabled),null}var g="none";o.isAGame()&&(g=p.getReferrer(decodeURIComponent(document.referrer))),gtag("js",new Date),gtag("set","user_properties",{app_name:b,app_version:c,referrer:g}),gtag("config",a,{sample_rate:e});var h={name:"fbrq",sample_rate:1,referrer:g,app_name:"All"};if("auto"!==d)for(var i in d)d.hasOwnProperty(i)&&(h[i]=d[i]);return gtag("config",this.fbrqId,h),gtag},a.prototype.sendScreenView=function(a){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event","screen_view",{screen_name:a}),gtag("event","screen_view",{send_to:this.fbrqId,screen_name:a})))},a.prototype.sendGenericEvent=function(a,b,c){o.analyticsEnabled&&("undefined"==typeof gtag&&"function"!=typeof gtag||(gtag("event",b,{event_category:a,event_label:c}),gtag("event",b,{send_to:this.fbrqId,event_category:a,event_label:c})))},a.GAMeasurementId="none",a}(),r=r||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,b){a=this.words=a||[],this.sigBytes=void 0!=b?b:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;e>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(a){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;ij;){var k;a:{k=i;for(var l=a.sqrt(k),m=2;m<=l;m++)if(!(k%m)){k=!1;break a}k=!0}k&&(8>j&&(f[j]=h(a.pow(i,.5))),g[j]=h(a.pow(i,1/3)),j++),i++}var n=[],c=c.SHA256=e.extend({_doReset:function(){this._hash=new d.init(f.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=c[5],k=c[6],l=c[7],m=0;64>m;m++){if(16>m)n[m]=0|a[b+m];else{var o=n[m-15],p=n[m-2];n[m]=((o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3)+n[m-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[m-16]}o=l+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&j^~i&k)+g[m]+n[m],p=((d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22))+(d&e^d&f^e&f),l=k,k=j,j=i,i=h+o|0,h=f,f=e,e=d,d=o+p|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0,c[5]=c[5]+j|0,c[6]=c[6]+k|0,c[7]=c[7]+l|0},_doFinalize:function(){var b=this._data,c=b.words,d=8*this._nDataBytes,e=8*b.sigBytes;return c[e>>>5]|=128<<24-e%32,c[14+(e+64>>>9<<4)]=a.floor(d/4294967296),c[15+(e+64>>>9<<4)]=d,b.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA256=e._createHelper(c),b.HmacSHA256=e._createHmacHelper(c)}(Math),function(){var a=r,b=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,c){a=this._hasher=new a.init,"string"==typeof c&&(c=b.parse(c));var d=a.blockSize,e=4*d;c.sigBytes>e&&(c=a.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),g=this._iKey=c.clone(),h=f.words,i=g.words,j=0;j>>2]>>>24-e%4*8&255)<<16|(b[e+1>>>2]>>>24-(e+1)%4*8&255)<<8|b[e+2>>>2]>>>24-(e+2)%4*8&255,g=0;4>g&&e+.75*g>>6*(3-g)&63));if(b=d.charAt(64))for(;a.length%4;)a.push(b);return a.join("")},parse:function(a){var c=a.length,d=this._map,e=d.charAt(64);e&&-1!=(e=a.indexOf(e))&&(c=e);for(var e=[],f=0,g=0;g>>6-g%4*2;e[f>>>2]|=(h|i)<<24-f%4*8,f++}return b.create(e,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}();var s;!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Debug=1]="Debug",a[a.Info=2]="Info",a[a.Warning=3]="Warning",a[a.Error=4]="Error",a[a.Critical=5]="Critical"}(a.EGAErrorSeverity||(a.EGAErrorSeverity={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Male=1]="Male",a[a.Female=2]="Female"}(a.EGAGender||(a.EGAGender={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Start=1]="Start",a[a.Complete=2]="Complete",a[a.Fail=3]="Fail"}(a.EGAProgressionStatus||(a.EGAProgressionStatus={}));!function(a){a[a.Undefined=0]="Undefined",a[a.Source=1]="Source",a[a.Sink=2]="Sink"}(a.EGAResourceFlowType||(a.EGAResourceFlowType={}));!function(a){!function(a){a[a.Undefined=0]="Undefined",a[a.Rejected=1]="Rejected"}(a.EGASdkErrorType||(a.EGASdkErrorType={}));!function(a){a[a.NoResponse=0]="NoResponse",a[a.BadResponse=1]="BadResponse",a[a.RequestTimeout=2]="RequestTimeout",a[a.JsonEncodeFailed=3]="JsonEncodeFailed",a[a.JsonDecodeFailed=4]="JsonDecodeFailed",a[a.InternalServerError=5]="InternalServerError",a[a.BadRequest=6]="BadRequest",a[a.Unauthorized=7]="Unauthorized",a[a.UnknownResponseCode=8]="UnknownResponseCode",a[a.Ok=9]="Ok"}(a.EGAHTTPApiResponse||(a.EGAHTTPApiResponse={}))}(a.http||(a.http={}))}(s||(s={}));var s;s.EGAErrorSeverity,s.EGAGender,s.EGAProgressionStatus,s.EGAResourceFlowType;!function(a){!function(a){var b;!function(a){a[a.Error=0]="Error",a[a.Warning=1]="Warning",a[a.Info=2]="Info",a[a.Debug=3]="Debug"}(b||(b={}));var c=function(){function a(){a.debugEnabled=!1}return a.setInfoLog=function(b){a.instance.infoLogEnabled=b},a.setVerboseLog=function(b){a.instance.infoLogVerboseEnabled=b},a.i=function(c){if(a.instance.infoLogEnabled){var d="Info/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.w=function(c){var d="Warning/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Warning)},a.e=function(c){var d="Error/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Error)},a.ii=function(c){if(a.instance.infoLogVerboseEnabled){var d="Verbose/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Info)}},a.d=function(c){if(a.debugEnabled){var d="Debug/"+a.Tag+": "+c;a.instance.sendNotificationMessage(d,b.Debug)}},a.prototype.sendNotificationMessage=function(a,c){switch(c){case b.Error:console.error(a);break;case b.Warning:console.warn(a);break;case b.Debug:"function"==typeof console.debug?console.debug(a):console.log(a);break;case b.Info:console.log(a)}},a.instance=new a,a.Tag="GameAnalytics",a}();a.GALogger=c}(a.logging||(a.logging={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=function(){function a(){}return a.getHmac=function(a,b){var c=r.HmacSHA256(b,a);return r.enc.Base64.stringify(c)},a.stringMatch=function(a,b){return!(!a||!b)&&b.test(a)},a.joinStringArray=function(a,b){for(var c="",d=0,e=a.length;d0&&(c+=b),c+=a[d];return c},a.stringArrayContainsString=function(a,b){if(0===a.length)return!1;for(var c in a)if(a[c]===b)return!0;return!1},a.encode64=function(b){b=encodeURI(b);var c,d,e,f,g,h="",i=0,j=0,k=0;do{c=b.charCodeAt(k++),d=b.charCodeAt(k++),i=b.charCodeAt(k++),e=c>>2,f=(3&c)<<4|d>>4,g=(15&d)<<2|i>>6,j=63&i,isNaN(d)?g=j=64:isNaN(i)&&(j=64),h=h+a.keyStr.charAt(e)+a.keyStr.charAt(f)+a.keyStr.charAt(g)+a.keyStr.charAt(j),c=d=i=0,e=f=g=j=0}while(k0))return c.w("validateInitRequestResponse failed - invalid value in 'server_ts' field."),null;b.server_ts=d}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'server_ts' field. type="+typeof a.server_ts+", value="+a.server_ts+", "+b),null}try{var e=a.configurations;b.configurations=e}catch(b){return c.w("validateInitRequestResponse failed - invalid type in 'configurations' field. type="+typeof a.configurations+", value="+a.configurations+", "+b),null}return b},b.validateBuild=function(a){return!!b.validateShortString(a,!1)},b.validateSdkWrapperVersion=function(a){return!!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/)},b.validateEngineVersion=function(a){return!(!a||!e.stringMatch(a,/^(unity|unreal|gamemaker|cocos2d|construct|defold) [0-9]{0,5}(\.[0-9]{0,5}){0,2}$/))},b.validateUserId=function(a){return!!b.validateString(a,!1)||(c.w("Validation fail - user id: id cannot be (null), empty or above 64 characters."),!1)},b.validateShortString=function(a,b){return!(!b||a)||!(!a||a.length>32)},b.validateString=function(a,b){return!(!b||a)||!(!a||a.length>64)},b.validateLongString=function(a,b){return!(!b||a)||!(!a||a.length>8192)},b.validateConnectionType=function(a){return e.stringMatch(a,/^(wwan|wifi|lan|offline)$/)},b.validateCustomDimensions=function(a){return b.validateArrayOfStrings(20,32,!1,"custom dimensions",a)},b.validateResourceCurrencies=function(a){if(!b.validateArrayOfStrings(20,64,!1,"resource currencies",a))return!1;for(var d=0;d0&&f.length>a)return c.w(g+" validation failed: array cannot exceed "+a+" values. It has "+f.length+" values."),!1;for(var h=0;h9999)||(c.w("Validation fail - birthYear: Cannot be (null) or invalid range."),!1)},b.validateClientTs=function(a){return!(a<-4294967294||a>4294967294)},b}();b.GAValidator=f}(a.validators||(a.validators={}))}(s||(s={}));var s;!function(a){!function(a){var b=function(){function a(a,b,c){this.name=a,this.value=b,this.version=c}return a}();a.NameValueVersion=b;var c=function(){function a(a,b){this.name=a,this.version=b}return a}();a.NameVersion=c;var d=function(){function a(){}return a.touch=function(){},a.getRelevantSdkVersion=function(){return a.sdkGameEngineVersion?a.sdkGameEngineVersion:a.sdkWrapperVersion},a.getConnectionType=function(){return a.connectionType},a.updateConnectionType=function(){navigator.onLine?"ios"===a.buildPlatform||"android"===a.buildPlatform?a.connectionType="wwan":a.connectionType="lan":a.connectionType="offline"},a.getOSVersionString=function(){return a.buildPlatform+" "+a.osVersionPair.version},a.runtimePlatformToString=function(){return a.osVersionPair.name},a.getBrowserVersionString=function(){var b,c=navigator.userAgent,d=c.match(/(opera|chrome|safari|firefox|ubrowser|msie|trident|fbav(?=\/))\/?\s*(\d+)/i)||[];if(0==d.length&&"ios"===a.buildPlatform)return"webkit_"+a.osVersion;if(/trident/i.test(d[1]))return b=/\brv[ :]+(\d+)/g.exec(c)||[],"IE "+(b[1]||"");if("Chrome"===d[1]&&null!=(b=c.match(/\b(OPR|Edge|UBrowser)\/(\d+)/)))return b.slice(1).join(" ").replace("OPR","Opera").replace("UBrowser","UC").toLowerCase();if(d[1]&&"fbav"===d[1].toLowerCase()&&(d[1]="facebook",d[2]))return"facebook "+d[2];var e=d[2]?[d[1],d[2]]:[navigator.appName,navigator.appVersion,"-?"];return null!=(b=c.match(/version\/(\d+)/i))&&e.splice(1,1,b[1]),e.join(" ").toLowerCase()},a.getDeviceModel=function(){return"unknown"},a.getDeviceManufacturer=function(){return"unknown"},a.matchItem=function(a,b){var d,e,f,g,h,i=new c("unknown","0.0.0"),j=0,k=0;for(j=0;j0},a.prototype.dequeue=function(){if(this.hasItems())return this.dequeueFromHighPriorityQueue();throw new Error("The queue is empty")},a.prototype.dequeueFromHighPriorityQueue=function(){var a=this._sortedKeys[0],b=this._subQueues[a].shift();return 0===this._subQueues[a].length&&(this._sortedKeys.shift(),delete this._subQueues[a]),b},a}();a.PriorityQueue=b}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){!function(b){var c,d=a.logging.GALogger;!function(a){a[a.Equal=0]="Equal",a[a.LessOrEqual=1]="LessOrEqual",a[a.NotEqual=2]="NotEqual"}(c=b.EGAStoreArgsOperator||(b.EGAStoreArgsOperator={}));var e;!function(a){a[a.Events=0]="Events",a[a.Sessions=1]="Sessions",a[a.Progression=2]="Progression"}(e=b.EGAStore||(b.EGAStore={}));var f=function(){function a(){this.eventsStore=[],this.sessionsStore=[],this.progressionStore=[],this.storeItems={};try{"object"==typeof localStorage?(localStorage.setItem("testingLocalStorage","yes"),localStorage.removeItem("testingLocalStorage"),a.storageAvailable=!0):a.storageAvailable=!1}catch(a){}}return a.isStorageAvailable=function(){return a.storageAvailable},a.isStoreTooLargeForEvents=function(){return a.instance.eventsStore.length+a.instance.sessionsStore.length>a.MaxNumberOfEntries},a.select=function(b,d,e,f){void 0===d&&(d=[]),void 0===e&&(e=!1),void 0===f&&(f=0);var g=a.getStore(b);if(!g)return null;for(var h=[],i=0;i0&&h.length>f&&(h=h.slice(0,f+1)),h},a.update=function(b,d,e){void 0===e&&(e=[]);var f=a.getStore(b);if(!f)return!1;for(var g=0;g0)return b.instance.sdkConfig;var a,c=0;for(var d in b.instance.sdkConfigCached)0===c&&(a=d),++c;return a&&c>0?b.instance.sdkConfigCached:b.instance.sdkConfigDefault},b.isEnabled=function(){var a=b.getSdkConfig();return(!a.enabled||"false"!=a.enabled)&&!!b.instance.initAuthorized},b.setCustomDimension01=function(a){b.instance.currentCustomDimension01=a,f.setItem(b.Dimension01Key,a),e.i("Set custom01 dimension value: "+a)},b.setCustomDimension02=function(a){b.instance.currentCustomDimension02=a,f.setItem(b.Dimension02Key,a),e.i("Set custom02 dimension value: "+a)},b.setCustomDimension03=function(a){b.instance.currentCustomDimension03=a,f.setItem(b.Dimension03Key,a),e.i("Set custom03 dimension value: "+a)},b.setFacebookId=function(a){b.instance.facebookId=a,f.setItem(b.FacebookIdKey,a),e.i("Set facebook id: "+a)},b.setGender=function(c){b.instance.gender=isNaN(Number(a.EGAGender[c]))?a.EGAGender[c].toString().toLowerCase():a.EGAGender[a.EGAGender[c]].toString().toLowerCase(),f.setItem(b.GenderKey,b.instance.gender),e.i("Set gender: "+b.instance.gender)},b.setBirthYear=function(a){b.instance.birthYear=a,f.setItem(b.BirthYearKey,a.toString()),e.i("Set birth year: "+a)},b.incrementSessionNum=function(){var a=b.getSessionNum()+1;b.instance.sessionNum=a},b.incrementTransactionNum=function(){var a=b.getTransactionNum()+1;b.instance.transactionNum=a},b.incrementProgressionTries=function(a){var c=b.getProgressionTries(a)+1;b.instance.progressionTries[a]=c;var d={};d.progression=a,d.tries=c,f.insert(h.Progression,d,!0,"progression")},b.getProgressionTries=function(a){return a in b.instance.progressionTries?b.instance.progressionTries[a]:0},b.clearProgressionTries=function(a){a in b.instance.progressionTries&&delete b.instance.progressionTries[a];var c=[];c.push(["progression",i.Equal,a]),f.delete(h.Progression,c)},b.setKeys=function(a,c){b.instance.gameKey=a,b.instance.gameSecret=c},b.setManualSessionHandling=function(a){b.instance.useManualSessionHandling=a,e.i("Use manual session handling: "+a)},b.setEnabledEventSubmission=function(a){b.instance._isEventSubmissionEnabled=a},b.getEventAnnotations=function(){var a={};a.v=2,a.user_id=b.instance.identifier,a.client_ts=b.getClientTsAdjusted(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.browser_version=g.browserVersion,a.platform=g.buildPlatform,a.session_id=b.instance.sessionId,a[b.SessionNumKey]=b.instance.sessionNum;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),b.instance.build&&(a.build=b.instance.build),b.instance.facebookId&&(a[b.FacebookIdKey]=b.instance.facebookId),b.instance.gender&&(a[b.GenderKey]=b.instance.gender),0!=b.instance.birthYear&&(a[b.BirthYearKey]=b.instance.birthYear),a},b.getSdkErrorEventAnnotations=function(){var a={};a.v=2,a.category=b.CategorySdkError,a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.manufacturer=g.deviceManufacturer,a.device=g.deviceModel,a.platform=g.buildPlatform;var d=g.getConnectionType();return c.validateConnectionType(d)&&(a.connection_type=d),g.gameEngineVersion&&(a.engine_version=g.gameEngineVersion),a},b.getInitAnnotations=function(){var a={};return a.user_id=b.getIdentifier(),a.sdk_version=g.getRelevantSdkVersion(),a.os_version=g.osVersion,a.platform=g.buildPlatform,a},b.getClientTsAdjusted=function(){var a=d.timeIntervalSince1970(),e=a+b.instance.clientServerTimeOffset;return c.validateClientTs(e)?e:a},b.sessionIsStarted=function(){return 0!=b.instance.sessionStart},b.cacheIdentifier=function(){b.instance.userId?b.instance.identifier=b.instance.userId:b.instance.defaultUserId&&(b.instance.identifier=b.instance.defaultUserId)},b.ensurePersistedStates=function(){f.isStorageAvailable()&&f.load();var a=b.instance;a.setDefaultId(null!=f.getItem(b.DefaultUserIdKey)?f.getItem(b.DefaultUserIdKey):d.createGuid()),a.sessionNum=null!=f.getItem(b.SessionNumKey)?Number(f.getItem(b.SessionNumKey)):0,a.transactionNum=null!=f.getItem(b.TransactionNumKey)?Number(f.getItem(b.TransactionNumKey)):0,a.facebookId?f.setItem(b.FacebookIdKey,a.facebookId):(a.facebookId=null!=f.getItem(b.FacebookIdKey)?f.getItem(b.FacebookIdKey):"",a.facebookId),a.gender?f.setItem(b.GenderKey,a.gender):(a.gender=null!=f.getItem(b.GenderKey)?f.getItem(b.GenderKey):"",a.gender),a.birthYear&&0!=a.birthYear?f.setItem(b.BirthYearKey,a.birthYear.toString()):(a.birthYear=null!=f.getItem(b.BirthYearKey)?Number(f.getItem(b.BirthYearKey)):0,a.birthYear),a.currentCustomDimension01?f.setItem(b.Dimension01Key,a.currentCustomDimension01):(a.currentCustomDimension01=null!=f.getItem(b.Dimension01Key)?f.getItem(b.Dimension01Key):"",a.currentCustomDimension01),a.currentCustomDimension02?f.setItem(b.Dimension02Key,a.currentCustomDimension02):(a.currentCustomDimension02=null!=f.getItem(b.Dimension02Key)?f.getItem(b.Dimension02Key):"",a.currentCustomDimension02),a.currentCustomDimension03?f.setItem(b.Dimension03Key,a.currentCustomDimension03):(a.currentCustomDimension03=null!=f.getItem(b.Dimension03Key)?f.getItem(b.Dimension03Key):"",a.currentCustomDimension03);var c=null!=f.getItem(b.SdkConfigCachedKey)?f.getItem(b.SdkConfigCachedKey):"";if(c){var e=JSON.parse(d.decode64(c));e&&(a.sdkConfigCached=e)}var g=f.select(h.Progression);if(g)for(var i=0;i0?(c[g]=k,++f):e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is an empty string or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_VALUE_STRING_LENGTH+")")}else if("number"===j||h instanceof Number){var l=h;c[g]=l,++f}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its value is not a string or number")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key contains illegal character, is empty or exceeds the max number of characters ("+b.MAX_CUSTOM_FIELDS_KEY_LENGTH+")")}else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because it exceeds the max number of custom fields ("+b.MAX_CUSTOM_FIELDS_COUNT+")");else e.w("validateAndCleanCustomFields: entry with key="+g+", value="+h+" has been omitted because its key or value is null")}}return c},b.validateAndFixCurrentDimensions=function(){c.validateDimension01(b.getCurrentCustomDimension01(),b.getAvailableCustomDimensions01())||b.setCustomDimension01(""),c.validateDimension02(b.getCurrentCustomDimension02(),b.getAvailableCustomDimensions02())||b.setCustomDimension02(""),c.validateDimension03(b.getCurrentCustomDimension03(),b.getAvailableCustomDimensions03())||b.setCustomDimension03("")},b.getConfigurationStringValue=function(a,c){return b.instance.configurations[a]?b.instance.configurations[a].toString():c},b.isCommandCenterReady=function(){return b.instance.commandCenterIsReady},b.addCommandCenterListener=function(a){b.instance.commandCenterListeners.indexOf(a)<0&&b.instance.commandCenterListeners.push(a)},b.removeCommandCenterListener=function(a){var c=b.instance.commandCenterListeners.indexOf(a);c>-1&&b.instance.commandCenterListeners.splice(c,1)},b.getConfigurationsContentAsString=function(){return JSON.stringify(b.instance.configurations)},b.populateConfigurations=function(a){var c=a.configurations;if(c)for(var d=0;dh&&j=a.MaxCount)){var h=c.getHmac(g,f),i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(!i.responseText)return;if(200!=i.status)return void d.w("sdk error failed. response code not 200. status code: "+i.status+", description: "+i.statusText+", body: "+i.responseText);a.countMap[e]=a.countMap[e]+1}},i.open("POST",b,!0),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Authorization",h);try{i.send(f)}catch(a){console.error(a)}}},a.MaxCount=10,a.countMap={},a}();b.SdkErrorTask=e}(a.tasks||(a.tasks={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.state.GAState,d=a.logging.GALogger,e=a.utilities.GAUtilities,f=a.validators.GAValidator,g=a.tasks.SdkErrorTask,h=function(){function a(){this.protocol="https",this.hostName="api.gameanalytics.com",this.version="v2",this.baseUrl=this.protocol+"://"+this.hostName+"/"+this.version,this.initializeUrlPath="init",this.eventsUrlPath="events",this.useGzip=!1}return a.prototype.requestInit=function(d){var e=c.getGameKey(),f=this.baseUrl+"/"+e+"/"+this.initializeUrlPath;f="https://rubick.gameanalytics.com/v2/command_center?game_key="+e+"&interval_seconds=1000000";var g=c.getInitAnnotations(),h=JSON.stringify(g);if(!h)return void d(b.EGAHTTPApiResponse.JsonEncodeFailed,null);var i=this.createPayloadData(h,this.useGzip),j=[];j.push(h),a.sendRequest(f,i,j,this.useGzip,a.initRequestCallback,d)},a.prototype.sendEventsInArray=function(d,e,f){if(0!=d.length){var g=c.getGameKey(),h=this.baseUrl+"/"+g+"/"+this.eventsUrlPath,i=JSON.stringify(d);if(!i)return void f(b.EGAHTTPApiResponse.JsonEncodeFailed,null,e,d.length);var j=this.createPayloadData(i,this.useGzip),k=[];k.push(i),k.push(e),k.push(d.length.toString()),a.sendRequest(h,j,k,this.useGzip,a.sendEventInArrayRequestCallback,f)}},a.prototype.sendSdkErrorEvent=function(b){if(c.isEventSubmissionEnabled()){var e=c.getGameKey(),h=c.getGameSecret();if(f.validateSdkErrorEvent(e,h,b)){var i=this.baseUrl+"/"+e+"/"+this.eventsUrlPath,j="",k=c.getSdkErrorEventAnnotations(),l=a.sdkErrorTypeToString(b);k.type=l;var m=[];if(m.push(k),!(j=JSON.stringify(m)))return void d.w("sendSdkErrorEvent: JSON encoding failed.");g.execute(i,b,j,h)}}},a.sendEventInArrayRequestCallback=function(c,d,e,f){void 0===f&&(f=null);var g=(f[0],f[1],f[2]),h=parseInt(f[3]),i="",j=0;i=c.responseText,j=c.status;var k=a.instance.processRequestResponse(j,c.statusText,i,"Events");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,g,h);var l=i?JSON.parse(i):{};if(null==l)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,g,h);b.EGAHTTPApiResponse.BadRequest,e(k,l,g,h)},a.sendRequest=function(a,b,d,f,g,h){var i=new XMLHttpRequest,j=c.getGameSecret(),k=e.getHmac(j,b),l=[];l.push(k);for(var m in d)l.push(d[m]);if(i.onreadystatechange=function(){4===i.readyState&&g(i,a,h,l)},i.open("POST",a,!0),i.setRequestHeader("Content-Type","text/plain"),i.setRequestHeader("Authorization",k),f)throw new Error("gzip not supported");try{i.send(b)}catch(a){console.error(a.stack)}},a.initRequestCallback=function(c,d,e,g){void 0===g&&(g=null);var h=(g[0],g[1],""),i=0;h=c.responseText,i=c.status;var j=h?JSON.parse(h):{},k=a.instance.processRequestResponse(i,c.statusText,h,"Init");if(k!=b.EGAHTTPApiResponse.Ok&&k!=b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0);if(null==j)return void e(b.EGAHTTPApiResponse.JsonDecodeFailed,null,"",0);if(k===b.EGAHTTPApiResponse.BadRequest)return void e(k,null,"",0);var l=f.validateAndCleanInitRequestResponse(j);if(!l)return void e(b.EGAHTTPApiResponse.BadResponse,null,"",0);e(b.EGAHTTPApiResponse.Ok,l,"",0)},a.prototype.createPayloadData=function(a,b){if(b)throw new Error("gzip not supported");return a},a.prototype.processRequestResponse=function(a,c,d,e){ +return d?200===a?b.EGAHTTPApiResponse.Ok:0===a||401===a?b.EGAHTTPApiResponse.Unauthorized:400===a?b.EGAHTTPApiResponse.BadRequest:500===a?b.EGAHTTPApiResponse.InternalServerError:b.EGAHTTPApiResponse.UnknownResponseCode:b.EGAHTTPApiResponse.NoResponse},a.sdkErrorTypeToString=function(a){switch(a){case b.EGASdkErrorType.Rejected:return"rejected";default:return""}},a.instance=new a,a}();b.GAHTTPApi=h}(a.http||(a.http={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.store.GAStore,d=a.store.EGAStore,e=a.store.EGAStoreArgsOperator,f=a.state.GAState,g=a.logging.GALogger,h=a.utilities.GAUtilities,i=a.http.EGAHTTPApiResponse,j=a.http.GAHTTPApi,k=a.validators.GAValidator,l=a.http.EGASdkErrorType,m=function(){function b(){}return b.addSessionStartEvent=function(){if(f.isEventSubmissionEnabled()){var a={};a.category=b.CategorySessionStart,f.incrementSessionNum(),c.setItem(f.SessionNumKey,f.getSessionNum().toString()),b.addDimensionsToEvent(a),b.addEventToStore(a),g.i("Add SESSION START event"),b.processEvents(b.CategorySessionStart,!1)}},b.addSessionEndEvent=function(){if(f.isEventSubmissionEnabled()){var a=f.getSessionStart(),c=f.getClientTsAdjusted(),d=c-a;d<0&&(g.w("Session length was calculated to be less then 0. Should not be possible. Resetting to 0."),d=0);var e={};e.category=b.CategorySessionEnd,e.length=d,b.addDimensionsToEvent(e),b.addEventToStore(e),g.i("Add SESSION END event."),b.processEvents("",!1)}},b.addBusinessEvent=function(a,d,e,h,i,m){if(void 0===i&&(i=null),f.isEventSubmissionEnabled()){if(!k.validateBusinessEvent(a,d,i,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var n={};f.incrementTransactionNum(),c.setItem(f.TransactionNumKey,f.getTransactionNum().toString()),n.event_id=e+":"+h,n.category=b.CategoryBusiness,n.currency=a,n.amount=d,n[f.TransactionNumKey]=f.getTransactionNum(),i&&(n.cart_type=i),b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add BUSINESS event: {currency:"+a+", amount:"+d+", itemType:"+e+", itemId:"+h+", cartType:"+i+"}"),b.addEventToStore(n)}},b.addResourceEvent=function(c,d,e,h,i,m){if(f.isEventSubmissionEnabled()){if(!k.validateResourceEvent(c,d,e,h,i,f.getAvailableResourceCurrencies(),f.getAvailableResourceItemTypes()))return void j.instance.sendSdkErrorEvent(l.Rejected);c===a.EGAResourceFlowType.Sink&&(e*=-1);var n={},o=b.resourceFlowTypeToString(c);n.event_id=o+":"+d+":"+h+":"+i,n.category=b.CategoryResource,n.amount=e,b.addDimensionsToEvent(n),b.addFieldsToEvent(n,f.validateAndCleanCustomFields(m)),g.i("Add RESOURCE event: {currency:"+d+", amount:"+e+", itemType:"+h+", itemId:"+i+"}"),b.addEventToStore(n)}},b.addProgressionEvent=function(c,d,e,h,i,m,n){if(f.isEventSubmissionEnabled()){var o=b.progressionStatusToString(c);if(!k.validateProgressionEvent(c,d,e,h))return void j.instance.sendSdkErrorEvent(l.Rejected);var p,q={};p=e?h?d+":"+e+":"+h:d+":"+e:d,q.category=b.CategoryProgression,q.event_id=o+":"+p;var r=0;m&&c!=a.EGAProgressionStatus.Start&&(q.score=i),c===a.EGAProgressionStatus.Fail&&f.incrementProgressionTries(p),c===a.EGAProgressionStatus.Complete&&(f.incrementProgressionTries(p),r=f.getProgressionTries(p),q.attempt_num=r,f.clearProgressionTries(p)),b.addDimensionsToEvent(q),b.addFieldsToEvent(q,f.validateAndCleanCustomFields(n)),g.i("Add PROGRESSION event: {status:"+o+", progression01:"+d+", progression02:"+e+", progression03:"+h+", score:"+i+", attempt:"+r+"}"),b.addEventToStore(q)}},b.addDesignEvent=function(a,c,d,e){if(f.isEventSubmissionEnabled()){if(!k.validateDesignEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryDesign,h.event_id=a,d&&(h.value=c),b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(e)),g.i("Add DESIGN event: {eventId:"+a+", value:"+c+"}"),b.addEventToStore(h)}},b.addErrorEvent=function(a,c,d){if(f.isEventSubmissionEnabled()){var e=b.errorSeverityToString(a);if(!k.validateErrorEvent(a,c))return void j.instance.sendSdkErrorEvent(l.Rejected);var h={};h.category=b.CategoryError,h.severity=e,h.message=c,b.addDimensionsToEvent(h),b.addFieldsToEvent(h,f.validateAndCleanCustomFields(d)),g.i("Add ERROR event: {severity:"+e+", message:"+c+"}"),b.addEventToStore(h)}},b.processEvents=function(a,i){if(f.isEventSubmissionEnabled())try{var k=h.createGuid();i&&(b.cleanupEvents(),b.fixMissingSessionEndEvents());var l=[];l.push(["status",e.Equal,"new"]);var m=[];m.push(["status",e.Equal,"new"]),a&&(l.push(["category",e.Equal,a]),m.push(["category",e.Equal,a]));var n=[];n.push(["status",k]);var o=c.select(d.Events,l);if(!o||0==o.length)return g.i("Event queue: No events to send"),void b.updateSessionStore();if(o.length>b.MaxEventCount){if(!(o=c.select(d.Events,l,!0,b.MaxEventCount)))return;var p=o[o.length-1],q=p.client_ts;if(l.push(["client_ts",e.LessOrEqual,q]),!(o=c.select(d.Events,l)))return;m.push(["client_ts",e.LessOrEqual,q])}if(g.i("Event queue: Sending "+o.length+" events."),!c.update(d.Events,n,m))return;for(var r=[],s=0;s0&&(a.custom_fields=b)},b.resourceFlowTypeToString=function(b){return b==a.EGAResourceFlowType.Source||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Source]?"Source":b==a.EGAResourceFlowType.Sink||b==a.EGAResourceFlowType[a.EGAResourceFlowType.Sink]?"Sink":""},b.progressionStatusToString=function(b){return b==a.EGAProgressionStatus.Start||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Start]?"Start":b==a.EGAProgressionStatus.Complete||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Complete]?"Complete":b==a.EGAProgressionStatus.Fail||b==a.EGAProgressionStatus[a.EGAProgressionStatus.Fail]?"Fail":""},b.errorSeverityToString=function(b){return b==a.EGAErrorSeverity.Debug||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Debug]?"debug":b==a.EGAErrorSeverity.Info||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Info]?"info":b==a.EGAErrorSeverity.Warning||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Warning]?"warning":b==a.EGAErrorSeverity.Error||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Error]?"error":b==a.EGAErrorSeverity.Critical||b==a.EGAErrorSeverity[a.EGAErrorSeverity.Critical]?"critical":""},b.instance=new b,b.CategorySessionStart="user",b.CategorySessionEnd="session_end",b.CategoryDesign="design",b.CategoryBusiness="business",b.CategoryProgression="progression",b.CategoryResource="resource",b.CategoryError="error",b.MaxEventCount=500,b}();b.GAEvents=m}(a.events||(a.events={}))}(s||(s={}));var s;!function(a){!function(b){var c=a.logging.GALogger,d=a.state.GAState,e=a.events.GAEvents,f=function(){function a(){this.blocks=new b.PriorityQueue({compare:function(a,b){return a-b}}),this.id2TimedBlockMap={},a.startThread()}return a.createTimedBlock=function(a){void 0===a&&(a=0);var c=new Date;return c.setSeconds(c.getSeconds()+a),new b.TimedBlock(c)},a.performTaskOnGAThread=function(c,d){void 0===d&&(d=0);var e=new Date;e.setSeconds(e.getSeconds()+d);var f=new b.TimedBlock(e);f.block=c,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f)},a.performTimedBlockOnGAThread=function(b){a.instance.id2TimedBlockMap[b.id]=b,a.instance.addTimedBlock(b)},a.scheduleTimer=function(c,d){var e=new Date;e.setSeconds(e.getSeconds()+c);var f=new b.TimedBlock(e);return f.block=d,a.instance.id2TimedBlockMap[f.id]=f,a.instance.addTimedBlock(f),f.id},a.getTimedBlockById=function(b){return b in a.instance.id2TimedBlockMap?a.instance.id2TimedBlockMap[b]:null},a.ensureEventQueueIsRunning=function(){a.instance.keepRunning=!0,a.instance.isRunning||(a.instance.isRunning=!0,a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue))},a.endSessionAndStopQueue=function(){d.isInitialized()&&(c.i("Ending session."),a.stopEventQueue(),d.isEnabled()&&d.sessionIsStarted()&&(e.addSessionEndEvent(),d.instance.sessionStart=0))},a.stopEventQueue=function(){a.instance.keepRunning=!1},a.ignoreTimer=function(b){b in a.instance.id2TimedBlockMap&&(a.instance.id2TimedBlockMap[b].ignore=!0)},a.setEventProcessInterval=function(b){b>0&&(a.ProcessEventsIntervalInSeconds=b)},a.prototype.addTimedBlock=function(a){this.blocks.enqueue(a.deadline.getTime(),a)},a.run=function(){clearTimeout(a.runTimeoutId);try{for(var b;b=a.getNextBlock();)if(!b.ignore)if(b.async){if(!b.running){b.running=!0,b.block();break}}else b.block();return void(a.runTimeoutId=setTimeout(a.run,a.ThreadWaitTimeInMs))}catch(a){c.e("Error on GA thread"),c.e(a.stack)}},a.startThread=function(){a.runTimeoutId=setTimeout(a.run,0)},a.getNextBlock=function(){var b=new Date;return a.instance.blocks.hasItems()&&a.instance.blocks.peek().deadline.getTime()<=b.getTime()?a.instance.blocks.peek().async&&a.instance.blocks.peek().running?a.instance.blocks.peek():a.instance.blocks.dequeue():null},a.processEventQueue=function(){e.processEvents("",!0),a.instance.keepRunning?a.scheduleTimer(a.ProcessEventsIntervalInSeconds,a.processEventQueue):a.instance.isRunning=!1},a.instance=new a,a.ThreadWaitTimeInMs=1e3,a.ProcessEventsIntervalInSeconds=8,a}();b.GAThreading=f}(a.threading||(a.threading={}))}(s||(s={}));var s;!function(a){var b=a.threading.GAThreading,c=a.logging.GALogger,d=a.store.GAStore,e=a.state.GAState,f=a.http.GAHTTPApi,g=a.device.GADevice,h=a.validators.GAValidator,i=a.http.EGAHTTPApiResponse,j=a.utilities.GAUtilities,k=a.events.GAEvents,l=function(){function l(){}return l.init=function(){if(g.touch(),l.methodMap.configureAvailableCustomDimensions01=l.configureAvailableCustomDimensions01,l.methodMap.configureAvailableCustomDimensions02=l.configureAvailableCustomDimensions02,l.methodMap.configureAvailableCustomDimensions03=l.configureAvailableCustomDimensions03,l.methodMap.configureAvailableResourceCurrencies=l.configureAvailableResourceCurrencies,l.methodMap.configureAvailableResourceItemTypes=l.configureAvailableResourceItemTypes,l.methodMap.configureBuild=l.configureBuild,l.methodMap.configureSdkGameEngineVersion=l.configureSdkGameEngineVersion,l.methodMap.configureGameEngineVersion=l.configureGameEngineVersion,l.methodMap.configureUserId=l.configureUserId,l.methodMap.initialize=l.initialize,l.methodMap.addBusinessEvent=l.addBusinessEvent,l.methodMap.addResourceEvent=l.addResourceEvent,l.methodMap.addProgressionEvent=l.addProgressionEvent,l.methodMap.addDesignEvent=l.addDesignEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.addErrorEvent=l.addErrorEvent,l.methodMap.setEnabledInfoLog=l.setEnabledInfoLog,l.methodMap.setEnabledVerboseLog=l.setEnabledVerboseLog,l.methodMap.setEnabledManualSessionHandling=l.setEnabledManualSessionHandling,l.methodMap.setEnabledEventSubmission=l.setEnabledEventSubmission,l.methodMap.setCustomDimension01=l.setCustomDimension01,l.methodMap.setCustomDimension02=l.setCustomDimension02,l.methodMap.setCustomDimension03=l.setCustomDimension03,l.methodMap.setFacebookId=l.setFacebookId,l.methodMap.setGender=l.setGender,l.methodMap.setBirthYear=l.setBirthYear,l.methodMap.setEventProcessInterval=l.setEventProcessInterval,l.methodMap.startSession=l.startSession,l.methodMap.endSession=l.endSession,l.methodMap.onStop=l.onStop,l.methodMap.onResume=l.onResume,l.methodMap.addCommandCenterListener=l.addCommandCenterListener,l.methodMap.removeCommandCenterListener=l.removeCommandCenterListener,l.methodMap.getCommandCenterValueAsString=l.getCommandCenterValueAsString,l.methodMap.isCommandCenterReady=l.isCommandCenterReady,l.methodMap.getConfigurationsContentAsString=l.getConfigurationsContentAsString,"undefined"!=typeof window&&void 0!==window.GameAnalytics&&void 0!==window.GameAnalytics.q){var a=window.GameAnalytics.q;for(var b in a)l.gaCommand.apply(null,a[b])}},l.gaCommand=function(){for(var b=[],c=0;c0&&b[0]in a.GameAnalytics.methodMap&&(b.length>1?a.GameAnalytics.methodMap[b[0]].apply(null,Array.prototype.slice.call(b,1)):a.GameAnalytics.methodMap[b[0]]())},l.configureAvailableCustomDimensions01=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions01(a)})},l.configureAvailableCustomDimensions02=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions02(a)})},l.configureAvailableCustomDimensions03=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available custom dimensions must be set before SDK is initialized");e.setAvailableCustomDimensions03(a)})},l.configureAvailableResourceCurrencies=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource currencies must be set before SDK is initialized");e.setAvailableResourceCurrencies(a)})},l.configureAvailableResourceItemTypes=function(a){void 0===a&&(a=[]),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!1))return void c.w("Available resource item types must be set before SDK is initialized");e.setAvailableResourceItemTypes(a)})},l.configureBuild=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("Build version must be set before SDK is initialized."):h.validateBuild(a)?void e.setBuild(a):void c.i("Validation fail - configure build: Cannot be null, empty or above 32 length. String: "+a)})},l.configureSdkGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateSdkWrapperVersion(a)?void(g.sdkGameEngineVersion=a):void c.i("Validation fail - configure sdk version: Sdk version not supported. String: "+a)})},l.configureGameEngineVersion=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!l.isSdkReady(!0,!1))return h.validateEngineVersion(a)?void(g.gameEngineVersion=a):void c.i("Validation fail - configure game engine version: Game engine version not supported. String: "+a)})},l.configureUserId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){return l.isSdkReady(!0,!1)?void c.w("A custom user id must be set before SDK is initialized."):h.validateUserId(a)?void e.setUserId(a):void c.i("Validation fail - configure user_id: Cannot be null, empty or above 64 length. Will use default user_id method. Used string: "+a)})},l.initialize=function(a,d){void 0===a&&(a=""),void 0===d&&(d=""),g.updateConnectionType();var f=b.createTimedBlock();f.async=!0,l.initTimedBlockId=f.id,f.block=function(){return l.isSdkReady(!0,!1)?void c.w("SDK already initialized. Can only be called once."):h.validateKeys(a,d)?(e.setKeys(a,d),void l.internalInitialize()):void c.w("SDK failed initialize. Game key or secret key is invalid. Can only contain characters A-z 0-9, gameKey is 32 length, gameSecret is 40 length. Failed keys - gameKey: "+a+", secretKey: "+d)},b.performTimedBlockOnGAThread(f)},l.addBusinessEvent=function(a,c,d,e,f){void 0===a&&(a=""),void 0===c&&(c=0),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add business event")&&k.addBusinessEvent(a,c,d,e,f,{})})},l.addResourceEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAResourceFlowType.Undefined),void 0===d&&(d=""),void 0===e&&(e=0),void 0===f&&(f=""),void 0===h&&(h=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add resource event")&&k.addResourceEvent(c,d,e,f,h,{})})},l.addProgressionEvent=function(c,d,e,f,h){void 0===c&&(c=a.EGAProgressionStatus.Undefined),void 0===d&&(d=""),void 0===e&&(e=""),void 0===f&&(f=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add progression event")){var a="number"==typeof h;k.addProgressionEvent(c,d,e,f,a?h:0,a,{})}})},l.addDesignEvent=function(a,c){g.updateConnectionType(),b.performTaskOnGAThread(function(){if(l.isSdkReady(!0,!0,"Could not add design event")){var b="number"==typeof c;k.addDesignEvent(a,b?c:0,b,{})}})},l.addErrorEvent=function(c,d){void 0===c&&(c=a.EGAErrorSeverity.Undefined),void 0===d&&(d=""),g.updateConnectionType(),b.performTaskOnGAThread(function(){l.isSdkReady(!0,!0,"Could not add error event")&&k.addErrorEvent(c,d,{})})},l.setEnabledInfoLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setInfoLog(a),c.i("Info logging enabled")):(c.i("Info logging disabled"),c.setInfoLog(a))})},l.setEnabledVerboseLog=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(c.setVerboseLog(a),c.i("Verbose logging enabled")):(c.i("Verbose logging disabled"),c.setVerboseLog(a))})},l.setEnabledManualSessionHandling=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){e.setManualSessionHandling(a)})},l.setEnabledEventSubmission=function(a){void 0===a&&(a=!1),b.performTaskOnGAThread(function(){a?(e.setEnabledEventSubmission(a),c.i("Event submission enabled")):(c.i("Event submission disabled"),e.setEnabledEventSubmission(a))})},l.setCustomDimension01=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension01(a,e.getAvailableCustomDimensions01()))return void c.w("Could not set custom01 dimension value to '"+a+"'. Value not found in available custom01 dimension values");e.setCustomDimension01(a)})},l.setCustomDimension02=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension02(a,e.getAvailableCustomDimensions02()))return void c.w("Could not set custom02 dimension value to '"+a+"'. Value not found in available custom02 dimension values");e.setCustomDimension02(a)})},l.setCustomDimension03=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){if(!h.validateDimension03(a,e.getAvailableCustomDimensions03()))return void c.w("Could not set custom03 dimension value to '"+a+"'. Value not found in available custom03 dimension values");e.setCustomDimension03(a)})},l.setFacebookId=function(a){void 0===a&&(a=""),b.performTaskOnGAThread(function(){h.validateFacebookId(a)&&e.setFacebookId(a)})},l.setGender=function(c){void 0===c&&(c=a.EGAGender.Undefined),b.performTaskOnGAThread(function(){h.validateGender(c)&&e.setGender(c)})},l.setBirthYear=function(a){void 0===a&&(a=0),b.performTaskOnGAThread(function(){h.validateBirthyear(a)&&e.setBirthYear(a)})},l.setEventProcessInterval=function(a){b.performTaskOnGAThread(function(){b.setEventProcessInterval(a)})},l.startSession=function(){if(e.isInitialized()){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){e.isEnabled()&&e.sessionIsStarted()&&b.endSessionAndStopQueue(),l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)}},l.endSession=function(){l.onStop()},l.onStop=function(){b.performTaskOnGAThread(function(){try{b.endSessionAndStopQueue()}catch(a){}})},l.onResume=function(){var a=b.createTimedBlock();a.async=!0,l.initTimedBlockId=a.id,a.block=function(){l.resumeSessionAndStartQueue()},b.performTimedBlockOnGAThread(a)},l.getCommandCenterValueAsString=function(a,b){return void 0===b&&(b=null),e.getConfigurationStringValue(a,b)},l.isCommandCenterReady=function(){return e.isCommandCenterReady()},l.addCommandCenterListener=function(a){e.addCommandCenterListener(a)},l.removeCommandCenterListener=function(a){e.removeCommandCenterListener(a)},l.getConfigurationsContentAsString=function(){return e.getConfigurationsContentAsString()},l.internalInitialize=function(){e.ensurePersistedStates(),d.setItem(e.DefaultUserIdKey,e.getDefaultId()),e.setInitialized(!0),l.newSession(),e.isEnabled()&&b.ensureEventQueueIsRunning()},l.newSession=function(){c.i("Starting a new session."),e.validateAndFixCurrentDimensions(),f.instance.requestInit(l.startNewSessionCallback)},l.startNewSessionCallback=function(a,f){if(a===i.Ok&&f){var g=0;if(f.server_ts){var h=f.server_ts;g=e.calculateServerTimeOffset(h)}f.time_offset=g,d.setItem(e.SdkConfigCachedKey,j.encode64(JSON.stringify(f))),e.instance.sdkConfigCached=f,e.instance.sdkConfig=f,e.instance.initAuthorized=!0}else a==i.Unauthorized?(c.w("Initialize SDK failed - Unauthorized"),e.instance.initAuthorized=!1):(a===i.NoResponse||a===i.RequestTimeout?c.i("Init call (session start) failed - no response. Could be offline or timeout."):a===i.BadResponse||a===i.JsonEncodeFailed||a===i.JsonDecodeFailed?c.i("Init call (session start) failed - bad response. Could be bad response from proxy or GA servers."):a!==i.BadRequest&&a!==i.UnknownResponseCode||c.i("Init call (session start) failed - bad request or unknown response."),null==e.instance.sdkConfig?null!=e.instance.sdkConfigCached?(c.i("Init call (session start) failed - using cached init values."),e.instance.sdkConfig=e.instance.sdkConfigCached):(c.i("Init call (session start) failed - using default init values."),e.instance.sdkConfig=e.instance.sdkConfigDefault):c.i("Init call (session start) failed - using cached init values."),e.instance.initAuthorized=!0);if(e.instance.clientServerTimeOffset=e.getSdkConfig().time_offset?e.getSdkConfig().time_offset:0,e.populateConfigurations(e.getSdkConfig()),!e.isEnabled())return c.w("Could not start session: SDK is disabled."),void b.stopEventQueue();b.ensureEventQueueIsRunning();var m=j.createGuid();e.instance.sessionId=m,e.instance.sessionStart=e.getClientTsAdjusted(),k.addSessionStartEvent();var n=b.getTimedBlockById(l.initTimedBlockId);null!=n&&(n.running=!1),l.initTimedBlockId=-1},l.resumeSessionAndStartQueue=function(){e.isInitialized()&&(c.i("Resuming session."),e.sessionIsStarted()||l.newSession())},l.isSdkReady=function(a,b,d){return void 0===b&&(b=!0),void 0===d&&(d=""),d&&(d+=": "),a&&!e.isInitialized()?(b&&c.w(d+"SDK is not initialized"),!1):a&&!e.isEnabled()?(b&&c.w(d+"SDK is disabled"),!1):!(a&&!e.sessionIsStarted())||(b&&c.w(d+"Session has not started yet"),!1)},l.initTimedBlockId=-1,l.methodMap={},l}();a.GameAnalytics=l}(s||(s={})),s.GameAnalytics.init();var t=(s.GameAnalytics.gaCommand,s),u=function(){function a(){}return a.prototype.setup=function(a,b,c){o.analyticsEnabled&&(t.GameAnalytics.initialize(a,b),t.GameAnalytics.configureBuild(c),t.GameAnalytics.startSession(),window.addEventListener("beforeunload",function(){t.GameAnalytics.endSession()}))},a.prototype.addProgressionEvent=function(a,b,c,d,e){o.analyticsEnabled&&t.GameAnalytics.addProgressionEvent(a,b,c,d,e)},a.prototype.addDesignEvent=function(a,b){o.analyticsEnabled&&t.GameAnalytics.addDesignEvent(a,b)},a}(),v=c(function(a,c){!function(c){a.exports=function(){return function a(c,d,e){function f(h,i){if(!d[h]){if(!c[h]){var j="function"==typeof b&&b;if(!i&&j)return j(h,!0);if(g)return g(h,!0);var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=d[h]={exports:{}};c[h][0].call(l.exports,function(a){var b=c[h][1][a];return f(b||a)},l,l.exports,a,c,d,e)}return d[h].exports}for(var g="function"==typeof b&&b,h=0;h=t,w=d-(t-u),a.isPlaying()&&(v?(k(g,a._attachment,w),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,q),j(a,"beforeTween"),u=0?a:0-a}function k(a,b){var c,d,e,f,h,k;for(e=a,k=0;k<8;k++){if(f=g(e)-a,j(f)d)return d;for(;cf?c=e:d=e,e=.5*(d-c)+c}return e}var l=0,m=0,n=0,o=0,p=0,q=0;return n=3*b,m=3*(d-b)-n,l=1-n-m,q=3*c,p=3*(e-c)-q,o=1-q-p,function(a,b){return h(k(a,b))}(a,function(a){return 1/(200*a)}(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}d.setBezierFunction=function(a,c,e,f,g){var h=b(c,e,f,g);return h.displayName=a,h.x1=c,h.y1=e,h.x2=f,h.y2=g,d.prototype.formula[a]=h},d.unsetBezierFunction=function(a){delete d.prototype.formula[a]}}(),function(){function a(a,b,c,e,f,g){return d.tweenProps(e,b,a,c,1,g,f)}var b=new d;b._filterArgs=[],d.interpolate=function(c,e,f,g,h){var i=d.shallowCopy({},c),j=h||0,k=d.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=e,l[3]=k,d.applyFilter(b,"tweenCreated"),d.applyFilter(b,"beforeTween");var m=a(c,i,e,f,k,j);return d.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;ca.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":9}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Square:a("./square"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");c=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},c);var d;d=e.isString(b)?document.querySelector(b):b,this.path=d,this._opts=c,this._tweenable=null;var f=this.path.getTotalLength();this.path.style.strokeDasharray=f+" "+f,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing);b(this._calculateTo(a,c),this._opts.shape||this,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":9,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":9}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},c,!0),e.isObject(c)&&void 0!==c.svgStyle&&(this._opts.svgStyle=c.svgStyle),e.isObject(c)&&e.isObject(c.text)&&void 0!==c.text.style&&(this._opts.text.style=c.text.style);var f,g=this._createSvgView(this._opts);if(!(f=e.isString(b)?document.querySelector(b):b))throw new Error("Container does not exist: "+b);this._container=f,this._container.appendChild(g.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(g.svg,this._opts.svgStyle),this.svg=g.svg,this.path=g.path,this.trail=g.trail,this.text=null;var h=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(g.path,h),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};f.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.animate(a,b,c)},f.prototype.stop=function(){if(null===this._progressPath)throw new Error("Object is destroyed");void 0!==this._progressPath&&this._progressPath.stop()},f.prototype.destroy=function(){if(null===this._progressPath)throw new Error("Object is destroyed");this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},f.prototype.set=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");this._progressPath.set(a)},f.prototype.value=function(){if(null===this._progressPath)throw new Error("Object is destroyed");return void 0===this._progressPath?0:this._progressPath.value()},f.prototype.setText=function(a){if(null===this._progressPath)throw new Error("Object is destroyed");null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},f.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},f.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},f.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},f.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},f.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},f.prototype._initializeTextContainer=function(a,b,c){},f.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},f.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=f},{"./path":5,"./utils":9}],8:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=100-a.strokeWidth/2;return e.render(this._pathTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2})},f.prototype._trailString=function(a){var b=100-a.strokeWidth/2;return e.render(this._trailTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2,startMargin:a.strokeWidth/2-a.trailWidth/2})},b.exports=f},{"./shape":7,"./utils":9}],9:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;eb&&b<=460)&&!(a<600&&b<850)},enumerable:!1,configurable:!0}),b.prototype.showBanner=function(){if(!this.bannerAllowed)return null;var a=document.getElementById("h5branding-ad");return a?(a.style.display="inline-flex",a):null},b.prototype.setScriptloadProgress=function(a,b){var c=.3*b/a;this.circleLoader.animate(c,null,function(){})},b.prototype.setLoadProgress=function(a){var b=this;if(this.loaded)if(a=30+.7*a,this.progress=a,100===a){var c=document.querySelector("#h5branding-button");this.circleLoader.animate(1,null,function(){!p.inGDGameZone()&&c&&!0===b.showPlayButton?c.style.display="block":(p.inGDGameZone()||!1===b.showPlayButton)&&b.onPlayButtonClick()})}else this.circleLoader.animate(a/100,null,function(){})},b.prototype.setButtonCallback=function(a){this.buttonCallback=a},b.prototype.onPlayButtonClick=function(){this.buttonCallback&&this.buttonCallback()},b.prototype.destroy=function(){var a=document.querySelector("#h5branding-container");null!==a&&null!==a.parentNode&&a.parentNode.removeChild(a)},b.prototype.getGameLogoUrl=function(a){var b=a+"-512x512.jpeg";return window.hasOwnProperty("fbrqSA")&&!0===window.fbrqSA?"assets/"+b:"https://img.gamedistribution.com/"+b},b}(),x=t.EGAProgressionStatus,y=new q,z=new u;a.EGAProgressionStatus=x,a.google=y,a.gameanalytics=z,a.Utils=p,a.Domain=l,a.Branding=o,a.SplashLoader=w,Object.defineProperty(a,"__esModule",{value:!0})}),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;define("States/Menu/TempleHall",["require","Phaser","../Common/Button","../Common/GoldButton","../Common/Navies","h5branding"],function(c){var d,e,f,g;return f=c("Phaser"),c("../Common/Button"),d=c("../Common/GoldButton"),e=c("../Common/Navies"),g=c("h5branding"),function(c){function h(b,c,i){this.layoutContent=a(this.layoutContent,this),this.update=a(this.update,this),this.createChar=a(this.createChar,this),this.domainAllowsExtenral=a(this.domainAllowsExtenral,this);var j,k,l,m,n,o,p,q,r,s,t,u,v;for(h.__super__.constructor.call(this,b,c,i),this.w=this.game.realWidth,this.h=this.game.realHeight,this.bkg=m=this.game.make.sprite(0,0,"TempleHall"),m.anchor.set(.5),this._scale=v=Math.max(this.w/m.width,this.h/m.height),m.scale.set(v),m.height/2>this.h/2&&(m.y=this.h/2-m.height/2),this.addChild(m),this.beams=l=[],k=7,r=s=0,u=k;0<=u?s<=u:s>=u;r=0<=u?++s:--s)j=this.game.make.sprite(0,0,"HallBeam"),j.anchor.set(.5,-.5),j.alpha=.6+.4*Math.random(),j.t_offset=2*(r-k/2)*Math.PI/k-Math.random()*Math.PI/6,j.t_speed=.6*Math.random(),j.blendMode=f.blendModes.SCREEN,j.cacheAsBitmap=!0,this.addChild(j),l.push(j);this.char1=o=this.createChar("fire"),this.addChild(o),o.scale.set(v),o.x=-this.w/4,o.y=this.h/2-2*o.height,this.char2=p=this.createChar("water"),p.scale.set(v),p.x=this.w/4,p.y=this.h/2-2*p.height,this.addChild(p),this.gameName=q=this.game.make.sprite(0,0,"GameName"),q.anchor.set(.5,.5),t=Math.min(1,.9*this.game.realWidth/q.width),q.scale.set(t),this.addChild(q),this.onStart=new f.Signal,this.playBtn=n=new d(this.game,0,0,this.game.lang.locale("Play"),function(a){return function(){return a.onStart.dispatch(b.progress.get("temples")[0])}}(this),40),this.addChild(n),this.domainAllowsExtenral()&&(this.moreBtn=n=new d(this.game,0,0,this.game.lang.locale("More Games"),function(a){return function(){return g.Branding.openCampaignLink("Crystal Temple","more_games")}}(),30),this.addChild(n),this.walkthrouhgBtn=n=new d(this.game,0,0,this.game.lang.locale("Walkthrough"),function(a){return function(){return window.open("https://www.agame.com/game/fireboy--watergirl-4-crystal-temple","_blank")}}(),30),this.addChild(n)),this.navies=new e(this.game,0,0),this.addChild(this.navies),this.layoutContent()}return b(h,c),h.prototype.domainAllowsExtenral=function(){var a;return!!g.Branding.outGoingLinksAllowed()&&(a=["playcell.com"],a.reduce(function(a){return function(a,b){return null!=document.referrer&&(a=a&&document.referrer.indexOf(b)<0),null!=window.location&&null!=window.location.hostname&&(a=a&&window.location.hostname.indexOf(b)<0),a}}(),!0))},h.prototype.createChar=function(a){var b,c,d,e;return b=this.game.make.sprite(0,0,"CharAssets","_default0000"),e=this.game.make.sprite(0,0,"CharAssets",a+"_legs_idle0000"),e.anchor.set(.5),d=this.game.make.sprite(0,0,"CharAssets"),d.animations.add("idle",f.Animation.generateFrameNames(a+"_head_idle",0,29,"",4),30,!0),d.animations.play("idle"),d.anchor.set(.5),c=this.game.make.sprite(0,0,"CharAssets",a+"_glow0000"),c.anchor.set(.5),c.y=40,b.addChild(c),b.addChild(e),b.addChild(d),b},h.prototype.update=function(){var a,b,c,d;for(this.t||(this.t=0),this.t+=.003,d=this.beams,b=0,c=d.length;bthis.h/2?this.bkg.y=this.h/2-this.bkg.height/2:this.bkg.y=0,this.char1.scale.set(g),this.char1.x=-this.w/4,this.char1.y=this.h/2-2*this.char1.height,this.char2.scale.set(g),this.char2.x=this.w/4,this.char2.y=this.h/2-2*this.char2.height,f=this.beams,b=0,c=f.length;b0&&(b+="&");var d=Array.isArray(a[c])?a[c].join(","):a[c];b+=c+"="+d}return"&cust_params="+encodeURIComponent(b)}return""},b.prototype.areAdsEnabled=function(){var a=this,b=document.createElement("div");b.innerHTML=" ",b.className="adsbox",b.style.position="absolute",b.style.fontSize="10px",document.body.appendChild(b);var c=function(){var a=!0;return 0===b.offsetHeight&&(a=!1),b.parentNode&&b.parentNode.removeChild(b),a};window.setTimeout(function(){a.adsEnabled=c()},100)},b}();!function(a){a.CONTENT_PAUSED="onContentPaused",a.CONTENT_RESUMED="onContentResumed",a.AD_PROGRESSION="onAdProgression",a.AD_DISABLED="onAdsDisabled",a.AD_CLICKED="onAdClicked",a.AD_REWARDED="onAdRewardGranted",a.BANNER_SHOWN="onBannerShown",a.BANNER_HIDDEN="onBannerHidden",a.AD_LOADED="onAdLoaded",a.AD_PROVIDER_LOADED="onAdProviderLoaded"}(a.AdEvents||(a.AdEvents={})),function(a){a[a.interstitial=0]="interstitial",a[a.rewarded=1]="rewarded",a[a.banner=2]="banner"}(a.AdType||(a.AdType={}));var p=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;return b.bannerActive=!1,b.provider=null,b}return b(c,a),c.prototype.setAdProvider=function(a){this.provider=a,this.provider.setManager(this)},c.prototype.showAd=function(a){for(var b=[],c=1;c=0;--c){var d=b[c].src,e=d.lastIndexOf("?"),f=-1==e?d.length:e;if("base.js"==d.substr(f-7,7))return void(goog.basePath=d.substr(0,f-7))}},goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.global.document;if("complete"==b.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load')}return b.write(' + + +
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/fireboywatergirl4/version.js b/fireboywatergirl4/version.js new file mode 100644 index 00000000..9231575b --- /dev/null +++ b/fireboywatergirl4/version.js @@ -0,0 +1,2 @@ +version="tc-172"; +libs=["https://cdn.jsdelivr.net/npm/@azerion/phaser@2.6/build/phaser.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-cachebuster@2.0/build/phaser-cachebuster.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-spine@3.0/build/phaser-spine.min.js","https://cdn.jsdelivr.net/npm/@azerion/phaser-super-storage@2.0/build/phaser-super-storage.min.js"]; \ No newline at end of file diff --git a/games.json b/games.json index 26d0b81c..72dbd1e7 100644 --- a/games.json +++ b/games.json @@ -1,6 +1,6 @@ [ { - "name": "A Dance of Fire and Ice", + "name": "A Dance of Fire & Ice", "directory": "adofai", "image": "icon.png", "recommended": "1" @@ -65,7 +65,7 @@ "image": "icon.png" }, { - "name": "Bloons TD 3", + "name": "Bloons Tower Defense 3", "directory": "btd3", "image": "icon.png" }, @@ -311,7 +311,7 @@ "image": "icon.png" }, { - "name": "Fireboy Watergirl", + "name": "Fireboy & Watergirl 1", "directory": "fireboywatergirl", "image": "icon.png" }, @@ -699,5 +699,35 @@ "name": "Five Nights at Freddy's 4", "directory": "fnaf4", "image": "project/splash.webp" + }, + { + "name": "Temple Run 2", + "directory": "templerun2", + "image": "img/icons/icon-128x128.png" + }, + { + "name": "Happy Wheels", + "directory": "happywheels", + "image": "Untitled.jpeg" + }, + { + "name": "Fireboy & Watergirl 2", + "directory": "fireboywatergirl2", + "image": "Untitled.jpeg" + }, + { + "name": "Fireboy & Watergirl 3", + "directory": "fireboywatergirl3", + "image": "icon.png" + }, + { + "name": "Fireboy & Watergirl 4", + "directory": "fireboywatergirl4", + "image": "300.jpg" + }, + { + "name": "Rise Higher", + "directory": "risehigher", + "image": "media/graphics/promo/Icons/128x128.png" } ] diff --git a/happywheels/HappyWheels.swf b/happywheels/HappyWheels.swf new file mode 100644 index 00000000..d44890e3 Binary files /dev/null and b/happywheels/HappyWheels.swf differ diff --git a/happywheels/Untitled.jpeg b/happywheels/Untitled.jpeg new file mode 100644 index 00000000..f87ffa24 Binary files /dev/null and b/happywheels/Untitled.jpeg differ diff --git a/happywheels/index.html b/happywheels/index.html new file mode 100644 index 00000000..baee47d2 --- /dev/null +++ b/happywheels/index.html @@ -0,0 +1,27 @@ + + + + + + + Happy Wheels + + + +
+ + + + diff --git a/js/all.js b/js/all.js index 2157483f..a217a671 100644 --- a/js/all.js +++ b/js/all.js @@ -118,7 +118,7 @@ let read = 0; checkannouncements(); } - }, 10000); + }, 150000); async function checkannouncements() { if (!read) { @@ -197,7 +197,7 @@ async function checkblock() { console.log("CDN Blocked: " + data["urls"][i]); } } - alert("all cdns are blocked, join the discord at https://discord.gg/7jyufnwJNf and ping @skysthelimit.dev"); + alert("all links are blocked, join the discord at https://discord.gg/7jyufnwJNf and ping @skysthelimit.dev"); } } } diff --git a/new selenite.svg b/new selenite.svg new file mode 100644 index 00000000..2761eb5b --- /dev/null +++ b/new selenite.svg @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + s + + diff --git a/new.svg b/new.svg deleted file mode 100644 index 5aadccd1..00000000 --- a/new.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - diff --git a/risehigher/branding/logo.png b/risehigher/branding/logo.png new file mode 100644 index 00000000..6c5d06a1 Binary files /dev/null and b/risehigher/branding/logo.png differ diff --git a/risehigher/branding/splash1.png b/risehigher/branding/splash1.png new file mode 100644 index 00000000..19e7df08 Binary files /dev/null and b/risehigher/branding/splash1.png differ diff --git a/risehigher/game.css b/risehigher/game.css new file mode 100644 index 00000000..a6e6842e --- /dev/null +++ b/risehigher/game.css @@ -0,0 +1,243 @@ +html, +body { + background-color: #000; + margin: 0; + padding: 0; + position: relative; + font-family: "Arial"; + width: 100%; +} +#game { + position: absolute; + left: 0; + top: 0; + z-index: 0; +} +#ajaxbar { + background: url("media/graphics/loading/ajax-loader.gif") center no-repeat; +} +#canvas { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + -ms-interpolation-mode: nearest-neighbor; + -webkit-transform: scale3d(1, 1, 1); + z-index: 1; +} +#orientate { + position: absolute; + float: left; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 10002; + display: none; +} +#orientate img { + position: absolute; + float: left; + width: 100%; + height: 100%; +} +.play { + position: absolute; + float: left; + width: 100%; + height: 100%; + z-index: 1000; + background-color: #fff; + left: 0; + top: 0; + display: none; +} +.play img { + position: absolute; + float: left; + width: 100%; + height: 100%; + z-index: 1000; + left: 0; + top: 0; +} +#nohtml5 { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #000; + z-index: 1002; + visibility: hidden; +} +#nohtml5 img { + position: absolute; + width: 100%; + height: 100%; +} +#nohtml5-bubble { + position: absolute; + bottom: 20px; + left: 50px; + width: 380px; + height: 100px; + z-index: 1002; + color: #000; + background: rgba(255, 255, 255, 0.75); + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; +} +#nohtml5-text { + padding: 10px; +} +.horizontal-seperator { + height: 10px; + width: 100%; +} +.preloadText { + position: absolute; + top: -100; + left: -100; + display: none; + z-index: -1; +} +@font-face { + font-family: "mainfont"; + src: url("media/fonts/mainfont.ttf") format("truetype"), url("media/fonts/mainfont.woff") format("woff"); +} +@font-face { + font-family: "caviardreams"; + src: url("media/fonts/caviardreams.ttf") format("truetype"), url("media/fonts/caviardreams.woff") format("woff"); +} + +.ig_debug { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background-color: #000; + border-top: 2px solid #f57401; + font-size: 12px; + color: #fff; + z-index: 1000; + -webkit-user-select: none; + display: none; +} +.ig_debug_panel_menu { + height: 28px; + background: #222; + background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #000000), color-stop(1, #333)); + background: -moz-linear-gradient(center bottom, #000000 0%, #333 100%); + background: -o-linear-gradient(#333, #000000); +} +.ig_debug_panel_menu div { + float: left; + height: 22px; + padding: 6px 8px 0 8px; + border-right: 1px solid #333; +} +.ig_debug_panel_menu .ig_debug_head { + font-weight: bold; + color: #888; +} +.ig_debug_menu_item:hover { + cursor: pointer; + background-color: #fff; + color: #000; +} +.ig_debug_menu_item.active, +.ig_debug_menu_item.active:hover { + background-color: #000; + color: #fff; +} +.ig_debug_stats { + position: absolute; + right: 0; + top: 0; + float: right; + color: #888; + border-left: 1px solid #333; + text-align: right; +} +.ig_debug_stats span { + width: 3em; + display: inline-block; + color: #fff !important; + margin-right: 0.2em; + margin-left: 0.3em; + font-family: bitstream vera sans mono, courier new; + white-space: nowrap; +} +.ig_debug_panel { + height: 152px; + overflow: auto; + position: relative; +} +.ig_debug_panel canvas { + border-bottom: 1px solid #444; +} +.ig_debug_panel .ig_debug_panel { + padding: 8px; + height: auto; + float: left; + background-color: #000; + border-right: 2px solid #222; +} +.ig_debug_option { + padding: 2px 0 2px 8px; + cursor: pointer; +} +.ig_debug_option:first-child { + margin-top: 8px; +} +.ig_debug_option:hover { + background-color: #111; +} +.ig_debug_graph_mark { + position: absolute; + color: #888; + left: 4px; + font-size: 10px; + margin-top: -12px; +} +.ig_debug_legend { + color: #ccc; +} +.ig_debug_label_mark { + display: inline-block; + width: 10px; + height: 10px; + margin-right: 4px; + -webkit-transition: 0.1s linear; + -moz-transition: 0.1s linear; +} +.ig_debug_legend_color { + display: inline-block; + width: 6px; + height: 10px; + margin-right: 4px; + margin-left: 16px; +} +.ig_debug_legend_number { + width: 3em; + display: inline-block; + text-align: right; + font-family: bitstream vera sans mono, courier new; + color: #fff; + margin-right: 0.2em; +} +.ig_debug_map_container { + position: relative; + overflow: hidden; + border: 1px solid #888; +} +.ig_debug_map_container canvas { + position: absolute; +} +.ig_debug_map_screen { + position: absolute; + border: 1px solid #f0f; +} diff --git a/risehigher/game.js b/risehigher/game.js new file mode 100644 index 00000000..7f61ffca --- /dev/null +++ b/risehigher/game.js @@ -0,0 +1,1248 @@ +var _STRINGS={Ad:{Mobile:{Preroll:{ReadyIn:"The game is ready in ",Loading:"Your game is loading...",Close:"Close"},Header:{ReadyIn:"The game is ready in ",Loading:"Your game is loading...",Close:"Close"},End:{ReadyIn:"Advertisement ends in ",Loading:"Please wait ...",Close:"Close"}}},Splash:{Loading:"Loading ...",TapToStart:"TAP TO START"},Game:{Score:"Score:",Coins:"Coins:",Shop:"SHOP",Protect:"PROTECT THE BALLOON",Use:"Use",Best:"Best",High:"High",HighScore:"Hi-Score:",Woops:"Whoops!",BuyItems:"Buy Items", +ToUnlock:" points to unlock",StartTutorial:"Start the tutorial?",MoreGames:"More Games",Play:"Play",Settings:"Settings",Select:"Select",Selected:"Selected",ShareFacebook:"Share Facebook",GamePause:"Game Pause",GameOver:"Game Over",OK:"OK",Yes:"Yes",No:"No"},ItemsBalloon:{1:"Original Balloon",2:"Ombre Balloon",3:"Chevron Balloon",4:"Polca Dot Balloon",5:"Panda Balloon",6:"Donut Balloon",7:"Moustache Balloon"}},_LVL=[[{type:"EntityRectangle",x:60,y:-470,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle", +x:60,y:-495,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-520,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-545,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-570,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-595,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-620,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-645,settings:{w:420,h:20,checkObstacle:1}}, +{type:"EntityRectangle",x:60,y:-670,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-695,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-720,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-745,settings:{w:420,h:20,checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityCircle",x:115,y:-460,settings:{checkObstacle:1}},{type:"EntityCircle",x:170,y:-350,settings:{checkObstacle:1}},{type:"EntityCircle",x:280,y:-350,settings:{checkObstacle:1}}, +{type:"EntityCircle",x:390,y:-350,settings:{checkObstacle:1}},{type:"EntityCircle",x:60,y:-350,settings:{checkObstacle:1}},{type:"EntityCircle",x:225,y:-460,settings:{checkObstacle:1}},{type:"EntityCircle",x:335,y:-460,settings:{checkObstacle:1}},{type:"EntityCircle",x:280,y:-570,settings:{checkObstacle:1}},{type:"EntityCircle",x:170,y:-570,settings:{checkObstacle:1}},{type:"EntityCircle",x:225,y:-680,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityObstacleDynamic",x:276, +y:-460,settings:{checkObstacle:1}},{type:"EntityObstacleDynamic",x:52,y:-460,settings:{checkObstacle:1}},{type:"EntityObstacleDynamic",x:164,y:-648,settings:{checkObstacle:1}},{type:"EntityObstacleDynamic",x:276,y:-836,settings:{checkObstacle:1}},{type:"EntityObstacleDynamic",x:52,y:-836,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityDiamond",x:45,y:-500,settings:{checkObstacle:1}},{type:"EntityDiamond",x:45,y:-580,settings:{checkObstacle:1}},{type:"EntityDiamond",x:45, +y:-660,settings:{checkObstacle:1}},{type:"EntityDiamond",x:205,y:-500,settings:{checkObstacle:1}},{type:"EntityDiamond",x:205,y:-580,settings:{checkObstacle:1}},{type:"EntityDiamond",x:205,y:-660,settings:{checkObstacle:1}},{type:"EntityDiamond",x:365,y:-740,settings:{checkObstacle:1}},{type:"EntityDiamond",x:365,y:-580,settings:{checkObstacle:1}},{type:"EntityDiamond",x:365,y:-500,settings:{checkObstacle:1}},{type:"EntityDiamond",x:45,y:-740,settings:{checkObstacle:1}},{type:"EntityDiamond",x:205, +y:-740,settings:{checkObstacle:1}},{type:"EntityDiamond",x:365,y:-660,settings:{checkObstacle:1}},{type:"EntityDiamond",x:45,y:-420,settings:{checkObstacle:1}},{type:"EntityDiamond",x:205,y:-420,settings:{checkObstacle:1}},{type:"EntityDiamond",x:365,y:-420,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityPentagon",x:60,y:-450,settings:{checkObstacle:1}},{type:"EntityPentagon",x:165,y:-450,settings:{checkObstacle:1}},{type:"EntityPentagon",x:270,y:-450,settings:{checkObstacle:1}}, +{type:"EntityPentagon",x:375,y:-450,settings:{checkObstacle:1}},{type:"EntityPentagon",x:165,y:-660,settings:{checkObstacle:1}},{type:"EntityPentagon",x:215,y:-556,settings:{checkObstacle:1}},{type:"EntityPentagon",x:320,y:-556,settings:{checkObstacle:1}},{type:"EntityPentagon",x:110,y:-556,settings:{checkObstacle:1}},{type:"EntityPentagon",x:268,y:-660,settings:{checkObstacle:1}},{type:"EntityPentagon",x:215,y:-760,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityBigPentagon", +x:280,y:-510,settings:{checkObstacle:1}},{type:"EntityBigPentagon",x:60,y:-510,settings:{checkObstacle:1}},{type:"EntityBigPentagon",x:176,y:-724,settings:{checkObstacle:1}},{type:"EntityBigPentagon",x:280,y:-938,settings:{checkObstacle:1}},{type:"EntityBigPentagon",x:60,y:-938,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityBigOval",x:60,y:-500,settings:{checkObstacle:1}},{type:"EntityBigOval",x:210,y:-500,settings:{checkObstacle:1}},{type:"EntityBigOval",x:360,y:-500, +settings:{checkObstacle:1}},{type:"EntityBigOval",x:130,y:-700,settings:{checkObstacle:1}},{type:"EntityBigOval",x:290,y:-700,settings:{checkObstacle:1}},{type:"EntityBigOval",x:210,y:-900,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityCircle",x:36,y:-784,settings:{r:180,checkObstacle:0}},{type:"EntityCircle",x:412,y:-784,settings:{r:180,checkObstacle:0}},{type:"EntityCircle",x:-44,y:-524,settings:{r:180,checkObstacle:0}},{type:"EntityCircle",x:364,y:-516,settings:{r:180, +checkObstacle:0}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:135,y:-748,settings:{w:25,h:420,nColor:"#253D54",isStatic:1,dynamicType:2,isObstacle:0,checkObstacle:0}},{type:"EntityRectangle",x:360,y:-748,settings:{w:25,h:420,nColor:"#253D54",isStatic:1,dynamicType:2,isObstacle:0,checkObstacle:0}},{type:"EntityRectangle",x:165,y:-348,settings:{w:190,h:20}},{type:"EntityCircle",x:165,y:-390,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-390,settings:{checkObstacle:1, +r:15}},{type:"EntityCircle",x:245,y:-390,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-390,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325,y:-390,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-435,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-435,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:245,y:-435,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-435,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325, +y:-435,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-525,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-525,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:245,y:-525,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-525,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325,y:-525,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-570,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-570,settings:{checkObstacle:1, +r:15}},{type:"EntityCircle",x:245,y:-570,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-570,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325,y:-570,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-660,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-660,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:245,y:-660,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-660,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325, +y:-660,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-705,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-705,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:245,y:-705,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-705,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325,y:-705,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-480,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-480,settings:{checkObstacle:1, +r:15}},{type:"EntityCircle",x:245,y:-480,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-480,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325,y:-480,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:165,y:-615,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:205,y:-615,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:245,y:-615,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:285,y:-615,settings:{checkObstacle:1,r:15}},{type:"EntityCircle",x:325, +y:-615,settings:{checkObstacle:1,r:15}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:-15,y:-800,settings:{w:50,h:480,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:510,y:-800,settings:{w:50,h:480,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:-15,y:-800,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:370,y:-800,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle", +x:165,y:-348,settings:{w:220,h:20,checkObstacle:1}},{type:"EntitySmallStars",x:60,y:-720,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:170,y:-720,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:280,y:-720,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:390,y:-720,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:116,y:-604,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:230,y:-604,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:340,y:-604,settings:{checkObstacle:1}}, +{type:"EntitySmallStars",x:60,y:-500,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:170,y:-500,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:280,y:-500,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:390,y:-500,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:-15,y:-800,settings:{w:50,h:480,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:515,y:-800,settings:{w:50,h:480,nColor:"#253D54",isStatic:1,dynamicType:2}}, +{type:"EntityRectangle",x:-15,y:-800,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:375,y:-800,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:-72,y:-632,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:436,y:-552,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityRectangle",x:-16,y:-336,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}}, +{type:"EntityRectangle",x:375,y:-336,settings:{w:190,h:50,nColor:"#253D54",isStatic:1,dynamicType:2}},{type:"EntityPlus",x:416,y:-660,settings:{checkObstacle:1}},{type:"EntityPlus",x:88,y:-716,settings:{checkObstacle:1}},{type:"EntityPlus",x:208,y:-484,settings:{checkObstacle:1}},{type:"EntityPlus",x:168,y:-740,settings:{checkObstacle:1}},{type:"EntityPlus",x:224,y:-676,settings:{checkObstacle:1}},{type:"EntityPlus",x:324,y:-740,settings:{checkObstacle:1}},{type:"EntityPlus",x:76,y:-564,settings:{checkObstacle:1}}, +{type:"EntityPlus",x:164,y:-596,settings:{checkObstacle:1}},{type:"EntityPlus",x:292,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:112,y:-460,settings:{checkObstacle:1}},{type:"EntityPlus",x:376,y:-532,settings:{checkObstacle:1}},{type:"EntityPlus",x:408,y:-736,settings:{checkObstacle:1}},{type:"EntityPlus",x:244,y:-788,settings:{checkObstacle:1}},{type:"EntityPlus",x:324,y:-632,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:0,y:-800,settings:{w:60, +h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityRectangle",x:480,y:-800,settings:{w:60,h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityRectangle",x:220,y:-800,settings:{checkObstacle:1}},{type:"EntityRectangle",x:100,y:-800,settings:{checkObstacle:1}},{type:"EntityRectangle",x:340,y:-800,settings:{checkObstacle:1}},{type:"EntityRectangle",x:100,y:-690,settings:{checkObstacle:1}},{type:"EntityRectangle",x:220,y:-690,settings:{checkObstacle:1}},{type:"EntityRectangle", +x:340,y:-690,settings:{checkObstacle:1}},{type:"EntityRectangle",x:100,y:-580,settings:{checkObstacle:1}},{type:"EntityRectangle",x:220,y:-580,settings:{checkObstacle:1}},{type:"EntityRectangle",x:340,y:-580,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:0,y:-800,settings:{w:60,h:450,nColor:"#253D54",isStatic:1,dynamicType:2,isObstacle:0}},{type:"EntityRectangle",x:480,y:-800,settings:{w:60,h:450,nColor:"#253D54",isStatic:1,dynamicType:2,isObstacle:0}},{type:"EntityCircle", +x:370,y:-656,settings:{checkObstacle:1}},{type:"EntityCircle",x:215,y:-808,settings:{checkObstacle:1}},{type:"EntityCircle",x:70,y:-656,settings:{checkObstacle:1}},{type:"EntityCircle",x:215,y:-512,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:348,y:-512,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:220,y:-660,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:360,y:-800,settings:{checkObstacle:1}},{type:"EntitySmallStars",x:92,y:-796,settings:{checkObstacle:1}},{type:"EntitySmallStars", +x:96,y:-508,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:0,y:-800,settings:{w:60,h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityRectangle",x:480,y:-800,settings:{w:60,h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityBigStars",x:260,y:-468,settings:{checkObstacle:1}},{type:"EntityBigStars",x:240,y:-892,settings:{checkObstacle:1}},{type:"EntityBigStars",x:72,y:-684,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}], +[{type:"EntityRectangle",x:0,y:-800,settings:{w:60,h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityRectangle",x:480,y:-800,settings:{w:60,h:450,nColor:"#253D54",dynamicType:2,isStatic:1}},{type:"EntityCircle",x:244,y:-728,settings:{r:10}},{type:"EntityCircle",x:124,y:-796,settings:{r:10}},{type:"EntityCircle",x:88,y:-732,settings:{r:10}},{type:"EntityCircle",x:120,y:-652,settings:{r:10}},{type:"EntityCircle",x:252,y:-796,settings:{r:10}},{type:"EntityCircle",x:244,y:-536,settings:{r:10}}, +{type:"EntityCircle",x:340,y:-792,settings:{r:10}},{type:"EntityCircle",x:420,y:-788,settings:{r:10}},{type:"EntityCircle",x:424,y:-716,settings:{r:10}},{type:"EntityCircle",x:380,y:-664,settings:{r:10}},{type:"EntityCircle",x:176,y:-728,settings:{r:10}},{type:"EntityCircle",x:432,y:-612,settings:{r:10}},{type:"EntityCircle",x:292,y:-640,settings:{r:10}},{type:"EntityCircle",x:108,y:-576,settings:{r:10}},{type:"EntityCircle",x:164,y:-608,settings:{r:10}},{type:"EntityCircle",x:236,y:-592,settings:{r:10}}, +{type:"EntityCircle",x:328,y:-564,settings:{r:10}},{type:"EntityCircle",x:412,y:-548,settings:{r:10}},{type:"EntityCircle",x:428,y:-492,settings:{r:10}},{type:"EntityCircle",x:108,y:-504,settings:{r:10}},{type:"EntityCircle",x:176,y:-536,settings:{r:10}},{type:"EntityCircle",x:100,y:-400,settings:{r:10}},{type:"EntityCircle",x:332,y:-512,settings:{r:10}},{type:"EntityCircle",x:132,y:-444,settings:{r:10}},{type:"EntityCircle",x:292,y:-472,settings:{r:10}},{type:"EntityCircle",x:372,y:-456,settings:{r:10}}, +{type:"EntityCircle",x:424,y:-436,settings:{r:10}},{type:"EntityCircle",x:396,y:-404,settings:{r:10}},{type:"EntityCircle",x:200,y:-408,settings:{r:10}},{type:"EntityCircle",x:344,y:-420,settings:{r:10}},{type:"EntityCircle",x:400,y:-404,settings:{r:10}},{type:"EntityCircle",x:360,y:-720,settings:{r:10}},{type:"EntityCircle",x:188,y:-668,settings:{r:10}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:60,y:-260,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-285, +settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-310,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-335,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-360,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityCircle",x:440,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:76,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:124,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:172,y:-400,settings:{r:15, +checkObstacle:1}},{type:"EntityCircle",x:220,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:264,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:308,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:352,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityCircle",x:396,y:-400,settings:{r:15,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-430,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-455,settings:{w:420,h:20,checkObstacle:1}}, +{type:"EntityRectangle",x:60,y:-480,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-505,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-530,settings:{w:420,h:20,checkObstacle:1}},{type:"EntityCircle",x:368,y:-620,settings:{r:40,checkObstacle:1}},{type:"EntityCircle",x:84,y:-620,settings:{r:40,checkObstacle:1}},{type:"EntityCircle",x:232,y:-620,settings:{r:40,checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:150,y:-296,settings:{w:20, +h:20,checkObstacle:1}},{type:"EntityRectangle",x:175,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:200,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:225,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:250,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:275,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:300,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:325, +y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:375,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityCircle",x:196,y:-460,settings:{r:80,checkObstacle:1}},{type:"EntityRectangle",x:150,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:175,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:200,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:225,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle", +x:250,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:275,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:300,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:325,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:350,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityCircle",x:116,y:-656,settings:{r:80,checkObstacle:1}},{type:"EntityCircle",x:292,y:-652,settings:{r:80,checkObstacle:1}},{type:"EntityRectangle", +x:375,y:-484,settings:{w:20,h:20,checkObstacle:1}},{type:"EntityRectangle",x:350,y:-296,settings:{w:20,h:20,checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:60,y:-380,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-380,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-380,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-380,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-380,settings:{w:80, +h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-410,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-410,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-410,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-410,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-410,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-440,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-440, +settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-440,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-440,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-440,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-470,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-470,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-470,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle", +x:306,y:-470,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-470,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-500,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-500,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-500,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-500,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-500,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle", +x:60,y:-530,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-530,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-530,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-530,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-530,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-560,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-560,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle", +x:224,y:-560,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-560,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-560,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-590,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-590,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-590,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-590,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle", +x:388,y:-590,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-620,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:142,y:-620,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-620,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-620,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-620,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:60,y:-650,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle", +x:142,y:-650,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:224,y:-650,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:306,y:-650,settings:{w:80,h:5,checkObstacle:1}},{type:"EntityRectangle",x:388,y:-650,settings:{w:80,h:5,checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityRectangle",x:188,y:-268,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:247,y:-267,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:307,y:-267,settings:{w:40, +h:40,checkObstacle:1}},{type:"EntityRectangle",x:367,y:-267,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:187,y:-378,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:247,y:-378,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:307,y:-378,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:367,y:-378,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:188,y:-485,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:190, +y:-592,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:250,y:-485,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:310,y:-485,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:370,y:-485,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:250,y:-592,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:310,y:-592,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityRectangle",x:370,y:-592,settings:{w:40,h:40,checkObstacle:1}},{type:"EntityPlus", +x:210,y:-328,settings:{checkObstacle:1}},{type:"EntityPlus",x:390,y:-328,settings:{checkObstacle:1}},{type:"EntityPlus",x:270,y:-328,settings:{checkObstacle:1}},{type:"EntityPlus",x:330,y:-328,settings:{checkObstacle:1}},{type:"EntityPlus",x:150,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:150,y:-652,settings:{checkObstacle:1}},{type:"EntityPlus",x:150,y:-436,settings:{checkObstacle:1}},{type:"EntityPlus",x:210,y:-436,settings:{checkObstacle:1}},{type:"EntityPlus",x:270,y:-436,settings:{checkObstacle:1}}, +{type:"EntityPlus",x:330,y:-436,settings:{checkObstacle:1}},{type:"EntityPlus",x:390,y:-436,settings:{checkObstacle:1}},{type:"EntityPlus",x:210,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:270,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:330,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:390,y:-544,settings:{checkObstacle:1}},{type:"EntityPlus",x:210,y:-652,settings:{checkObstacle:1}},{type:"EntityPlus",x:270,y:-652,settings:{checkObstacle:1}},{type:"EntityPlus",x:330, +y:-652,settings:{checkObstacle:1}},{type:"EntityPlus",x:390,y:-652,settings:{checkObstacle:1}},{type:"EntityPlus",x:150,y:-328,settings:{checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntitySmallPentagon",x:-264,y:-520,settings:{checkObstacle:1,isFall:1}},{type:"EntitySmallPentagon",x:-460,y:-756,settings:{checkObstacle:1,isFall:1}},{type:"EntitySmallPentagon",x:-172,y:-672,settings:{checkObstacle:1,isFall:1}},{type:"EntitySmallPentagon",x:548,y:-868,settings:{checkObstacle:1,isFall:1, +fallLeft:1}},{type:"EntitySmallPentagon",x:608,y:-672,settings:{checkObstacle:1,isFall:1,fallLeft:1}},{type:"EntitySmallPentagon",x:808,y:-972,settings:{checkObstacle:1,isFall:1,fallLeft:1}},{type:"EntitySmallPentagon",x:-288,y:-780,settings:{checkObstacle:1,isFall:1}},{type:"EntitySmallPentagon",x:-416,y:-584,settings:{checkObstacle:1,isFall:1}},{type:"EntitySmallPentagon",x:820,y:-676,settings:{checkObstacle:1,isFall:1,fallLeft:1}},{type:"EntitySmallPentagon",x:732,y:-808,settings:{checkObstacle:1, +isFall:1,fallLeft:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityCircle",x:188,y:-852,settings:{r:80,checkObstacle:1}},{type:"EntityCircle",x:140,y:-455,settings:{r:60,checkObstacle:1}},{type:"EntityCircle",x:285,y:-455,settings:{r:60,checkObstacle:1}},{type:"EntityCircle",x:344,y:-572,settings:{r:20,checkObstacle:1}},{type:"EntityCircle",x:152,y:-572,settings:{r:20,checkObstacle:1}},{type:"EntityCircle",x:196,y:-532,settings:{r:20,checkObstacle:1}},{type:"EntityCircle",x:248,y:-500,settings:{r:20, +checkObstacle:1}},{type:"EntityCircle",x:300,y:-532,settings:{r:20,checkObstacle:1}},{type:"EntityCircle",x:256,y:-600,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:228,y:-600,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:256,y:-572,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:284,y:-600,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:256,y:-628,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:256,y:-656,settings:{r:10,checkObstacle:1}},{type:"EntityCircle", +x:256,y:-684,settings:{r:10,checkObstacle:1}},{type:"EntityCircle",x:190,y:-320,settings:{r:80,checkObstacle:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityPlus",x:-328,y:-648,settings:{isFall:1}},{type:"EntityPlus",x:-116,y:-820,settings:{isFall:1}},{type:"EntityPlus",x:-336,y:-764,settings:{isFall:1}},{type:"EntityPlus",x:-272,y:-892,settings:{isFall:1}},{type:"EntityPlus",x:-424,y:-812,settings:{isFall:1}},{type:"EntityPlus",x:-552,y:-712,settings:{isFall:1}},{type:"EntityPlus",x:828,y:-892, +settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:952,y:-792,settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:1076,y:-684,settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:576,y:-820,settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:812,y:-764,settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:824,y:-648,settings:{isFall:1,fallLeft:1}},{type:"EntityPlus",x:-212,y:-736,settings:{isFall:1}},{type:"EntityPlus",x:684,y:-724,settings:{isFall:1,fallLeft:1}},{type:"EntitySensor",x:0,y:-290}], +[{type:"EntityBigOval",x:-228,y:-556,settings:{isFall:1}},{type:"EntityBigOval",x:-404,y:-696,settings:{isFall:1}},{type:"EntityBigOval",x:840,y:-740,settings:{isFall:1,fallLeft:1}},{type:"EntityBigOval",x:652,y:-968,settings:{isFall:1,fallLeft:1}},{type:"EntityBigOval",x:-148,y:-784,settings:{isFall:1}},{type:"EntityBigOval",x:-260,y:-972,settings:{isFall:1}},{type:"EntityBigOval",x:548,y:-784,settings:{isFall:1,fallLeft:1}},{type:"EntityBigOval",x:664,y:-588,settings:{isFall:1,fallLeft:1}},{type:"EntitySensor", +x:0,y:-290}],[{type:"EntitySmallTriangle",x:-164,y:-692,settings:{isFall:1}},{type:"EntitySmallTriangle",x:728,y:-656,settings:{isFall:1,fallLeft:1}},{type:"EntitySmallTriangle",x:-352,y:-752,settings:{isFall:1}},{type:"EntitySmallTriangle",x:-564,y:-624,settings:{isFall:1}},{type:"EntitySmallTriangle",x:-364,y:-584,settings:{isFall:1}},{type:"EntitySmallTriangle",x:-196,y:-484,settings:{isFall:1}},{type:"EntitySmallTriangle",x:556,y:-588,settings:{isFall:1,fallLeft:1}},{type:"EntitySmallTriangle", +x:648,y:-776,settings:{isFall:1,fallLeft:1}},{type:"EntitySmallTriangle",x:884,y:-724,settings:{isFall:1,fallLeft:1}},{type:"EntitySmallTriangle",x:888,y:-508,settings:{isFall:1,fallLeft:1}},{type:"EntitySensor",x:0,y:-290}],[{type:"EntityCircle",x:-264,y:-780,settings:{r:100,isFall:1}},{type:"EntityCircle",x:-360,y:-500,settings:{r:50,isFall:1}},{type:"EntityCircle",x:-392,y:-652,settings:{r:30,isFall:1}},{type:"EntityCircle",x:-368,y:-848,settings:{r:100,isFall:1}},{type:"EntityCircle",x:688,y:-592, +settings:{r:100,isFall:1,fallLeft:1}},{type:"EntityCircle",x:632,y:-440,settings:{r:50,isFall:1,fallLeft:1}},{type:"EntityCircle",x:592,y:-516,settings:{r:50,isFall:1,fallLeft:1}},{type:"EntityCircle",x:588,y:-772,settings:{r:30,isFall:1,fallLeft:1}},{type:"EntityCircle",x:-304,y:-608,settings:{r:100,isFall:1}},{type:"EntityCircle",x:560,y:-692,settings:{r:100,isFall:1,fallLeft:1}},{type:"EntityCircle",x:716,y:-768,settings:{r:50,isFall:1,fallLeft:1}},{type:"EntitySensor",x:0,y:-290}]];var _SETTINGS={API:{Enabled:!1,Log:{Events:{InitializeGame:!1,EndGame:!1,Level:{Begin:!1,End:!1,Win:!1,Lose:!1,Draw:!1}}}},Ad:{Mobile:{Preroll:{Enabled:!1,Duration:5,Width:300,Height:250,Rotation:{Enabled:!1,Weight:{MobileAdInGamePreroll:40,MobileAdInGamePreroll2:40,MobileAdInGamePreroll3:20}}},Header:{Enabled:!1,Duration:5,Width:320,Height:50,Rotation:{Enabled:!1,Weight:{MobileAdInGameHeader:40,MobileAdInGameHeader2:40,MobileAdInGameHeader3:20}}},Footer:{Enabled:!1,Duration:5,Width:320,Height:50, +Rotation:{Enabled:!1,Weight:{MobileAdInGameFooter:40,MobileAdInGameFooter2:40,MobileAdInGameFooter3:20}}},End:{Enabled:!1,Duration:1,Width:300,Height:250,Rotation:{Enabled:!1,Weight:{MobileAdInGameEnd:40,MobileAdInGameEnd2:40,MobileAdInGameEnd3:20}}}}},Language:{Default:"en"},DeveloperBranding:{Splash:{Enabled:!1},Logo:{Enabled:!1,Link:"http://google.com",LinkEnabled:!1,NewWindow:!0,Width:166,Height:61}},Branding:{Splash:{Enabled:!1},Logo:{Enabled:!1,Link:"http://google.com",LinkEnabled:!1,NewWindow:!1, +Width:166,Height:61}},MoreGames:{Enabled:!0,Link:"https://selenite.cc",NewWindow:!0}};var MobileAdInGamePreroll={ad_duration:_SETTINGS.Ad.Mobile.Preroll.Duration,ad_width:_SETTINGS.Ad.Mobile.Preroll.Width,ad_height:_SETTINGS.Ad.Mobile.Preroll.Height,ready_in:_STRINGS.Ad.Mobile.Preroll.ReadyIn,loading:_STRINGS.Ad.Mobile.Preroll.Loading,close:_STRINGS.Ad.Mobile.Preroll.Close+"          ",Initialize:function(){if(_SETTINGS.Ad.Mobile.Preroll.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Preroll.Rotation.Weight,c=b.MobileAdInGamePreroll,d= +c+b.MobileAdInGamePreroll2,b=d+b.MobileAdInGamePreroll3,e=Math.floor(100*Math.random());console.log("seed: ",e);e<=c?this.selectedOverlayName="MobileAdInGamePreroll":e<=d?this.selectedOverlayName="MobileAdInGamePreroll2":e<=b&&(this.selectedOverlayName="MobileAdInGamePreroll3");console.log("Ad rotating preroll enabled")}else this.selectedOverlayName="MobileAdInGamePreroll",console.log("Ad rotating preroll disabled");console.log("selected:",this.selectedOverlayName);this.overlay=$("#"+this.selectedOverlayName); +this.box=$("#"+this.selectedOverlayName+"-Box");this.game=$("#game");this.boxContents={footer:$("#"+this.selectedOverlayName+"-Box-Footer"),header:$("#"+this.selectedOverlayName+"-Box-Header"),close:$("#"+this.selectedOverlayName+"-Box-Close"),body:$("#"+this.selectedOverlayName+"-Box-Body")};this.box.width(this.ad_width);this.box.height(this.ad_height);this.box.css("left",(this.overlay.width()-this.box.width())/2);this.box.css("top",(this.overlay.height()-this.box.height()-this.boxContents.header.height()- +this.boxContents.footer.height())/2);this.overlay.show(this.Timer(this.ad_duration))},Timer:function(b){var c=b,d=setInterval(function(){MobileAdInGamePreroll.boxContents.header.text(MobileAdInGamePreroll.ready_in+c+"...");MobileAdInGamePreroll.boxContents.footer.text(MobileAdInGamePreroll.loading);c--;0>c&&(clearInterval(d),MobileAdInGamePreroll.boxContents.close.css("left",MobileAdInGamePreroll.boxContents.body.width()-23),MobileAdInGamePreroll.boxContents.close.show(),MobileAdInGamePreroll.boxContents.header.html(MobileAdInGamePreroll.close), +MobileAdInGamePreroll.boxContents.footer.text(""))},1E3)},Close:function(){this.boxContents.close.hide();this.overlay.hide()}};var MobileAdInGameHeader={ad_duration:_SETTINGS.Ad.Mobile.Header.Duration,ad_width:_SETTINGS.Ad.Mobile.Header.Width,ad_height:_SETTINGS.Ad.Mobile.Header.Height,Initialize:function(){if(_SETTINGS.Ad.Mobile.Header.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Header.Rotation.Weight,c=b.MobileAdInGameHeader,d=c+b.MobileAdInGameHeader2,b=d+b.MobileAdInGameHeader3,e=Math.floor(100*Math.random());console.log("seed: ",e);e<=c?this.selectedOverlayName="MobileAdInGameHeader":e<=d?this.selectedOverlayName="MobileAdInGameHeader2": +e<=b&&(this.selectedOverlayName="MobileAdInGameHeader3");console.log("Ad rotating header enabled")}else this.selectedOverlayName="MobileAdInGameHeader",console.log("Ad rotating header disabled");this.div=$("#"+this.selectedOverlayName);this.game=$("#game");this.div.width(this.ad_width);this.div.height(this.ad_height);this.div.css("left",this.game.position().left+(this.game.width()-this.div.width())/2);this.div.css("top",0);this.div.show(this.Timer(this.ad_duration))},Timer:function(b){var c=setInterval(function(){b--; +0>b&&(MobileAdInGameHeader.div.hide(),clearInterval(c))},1E3)}};var MobileAdInGameFooter={ad_duration:_SETTINGS.Ad.Mobile.Footer.Duration,ad_width:_SETTINGS.Ad.Mobile.Footer.Width,ad_height:_SETTINGS.Ad.Mobile.Footer.Height,Initialize:function(){if(_SETTINGS.Ad.Mobile.Footer.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Footer.Rotation.Weight,c=b.MobileAdInGameFooter,d=c+b.MobileAdInGameFooter2,b=d+b.MobileAdInGameFooter3,e=Math.floor(100*Math.random());console.log("seed: ",e);e<=c?this.selectedOverlayName="MobileAdInGameFooter":e<=d?this.selectedOverlayName="MobileAdInGameFooter2": +e<=b&&(this.selectedOverlayName="MobileAdInGameFooter3");console.log("Ad rotating footer enabled")}else this.selectedOverlayName="MobileAdInGameFooter",console.log("Ad rotating footer disabled");this.div=$("#"+this.selectedOverlayName);this.game=$("#game");this.div.width(this.ad_width);this.div.height(this.ad_height);this.div.css("left",this.game.position().left+(this.game.width()-this.div.width())/2);this.div.css("top",this.game.height()-this.div.height()-5);this.div.show(this.Timer(this.ad_duration))}, +Timer:function(b){var c=setInterval(function(){b--;0>b&&(MobileAdInGameFooter.div.hide(),clearInterval(c))},1E3)}};var MobileAdInGameEnd={ad_duration:_SETTINGS.Ad.Mobile.End.Duration,ad_width:_SETTINGS.Ad.Mobile.End.Width,ad_height:_SETTINGS.Ad.Mobile.End.Height,ready_in:_STRINGS.Ad.Mobile.End.ReadyIn,loading:_STRINGS.Ad.Mobile.End.Loading,close:_STRINGS.Ad.Mobile.End.Close+"          ",Initialize:function(){if(_SETTINGS.Ad.Mobile.End.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.End.Rotation.Weight,c=b.MobileAdInGameEnd,d=c+b.MobileAdInGameEnd2,b=d+b.MobileAdInGameEnd3, +e=Math.floor(100*Math.random());console.log("seed: ",e);e<=c?this.selectedOverlayName="MobileAdInGameEnd":e<=d?this.selectedOverlayName="MobileAdInGameEnd2":e<=b&&(this.selectedOverlayName="MobileAdInGameEnd3");console.log("Ad rotating end enabled")}else this.selectedOverlayName="MobileAdInGameEnd",console.log("Ad rotating end disabled");console.log("selected:",this.selectedOverlayName);this.overlay=$("#"+this.selectedOverlayName);this.box=$("#"+this.selectedOverlayName+"-Box");this.game=$("#game"); +this.boxContents={footer:$("#"+this.selectedOverlayName+"-Box-Footer"),header:$("#"+this.selectedOverlayName+"-Box-Header"),close:$("#"+this.selectedOverlayName+"-Box-Close"),body:$("#"+this.selectedOverlayName+"-Box-Body")};this.box.width(this.ad_width);this.box.height(this.ad_height);this.box.css("left",(this.overlay.width()-this.box.width())/2);this.box.css("top",(this.overlay.height()-this.box.height()-this.boxContents.header.height()-this.boxContents.footer.height())/2);this.overlay.show(this.Timer(this.ad_duration))}, +Timer:function(b){var c=b,d=setInterval(function(){MobileAdInGameEnd.boxContents.header.text(MobileAdInGameEnd.ready_in+c+"...");MobileAdInGameEnd.boxContents.footer.text(MobileAdInGameEnd.loading);c--;0>c&&(clearInterval(d),MobileAdInGameEnd.boxContents.close.css("left",MobileAdInGameEnd.boxContents.body.width()-23),MobileAdInGameEnd.boxContents.close.show(),MobileAdInGameEnd.boxContents.header.html(MobileAdInGameEnd.close),MobileAdInGameEnd.boxContents.footer.text(""))},1E3)},Close:function(){this.boxContents.close.hide(); +this.overlay.hide()}};!function(b,c){"object"==typeof module&&"object"==typeof module.exports?module.exports=b.document?c(b,!0):function(b){if(!b.document)throw Error("jQuery requires a window with a document");return c(b)}:c(b)}("undefined"!=typeof window?window:this,function(b,c){function d(b,c){c=c||X;var d=c.createElement("script");d.text=b;c.head.appendChild(d).parentNode.removeChild(d)}function e(b){var c=!!b&&"length"in b&&b.length,d=p.type(b);return"function"!==d&&!p.isWindow(b)&&("array"===d||0===c||"number"== +typeof c&&0tbody",b)[0]||b:b}function fa(b){return b.type=(null!==b.getAttribute("type"))+"/"+b.type,b}function O(b){var c=Kc.exec(b.type);return c?b.type=c[1]:b.removeAttribute("type"),b}function P(b,c){var d,g,l,r,e,f;if(1===c.nodeType){if(S.hasData(b)&&(d=S.access(b),g=S.set(c,d),f=d.events))for(l in delete g.handle,g.events={},f){d=0;for(g=f[l].length;dc;c+=2)"margin"===d&&(r+=p.css(b,d+Sa[c],!0,l)),g?("content"===d&&(r-=p.css(b,"padding"+Sa[c],!0,l)),"margin"!==d&&(r-=p.css(b,"border"+Sa[c]+"Width",!0,l))):(r+=p.css(b,"padding"+Sa[c],!0,l),"padding"!==d&&(r+=p.css(b,"border"+Sa[c]+"Width",!0,l)));return r}function Z(b,c,d){var g,l=Bb(b),r=s(b,c,l),e="border-box"===p.css(b,"boxSizing",!1, +l);return Qb.test(r)?r:(g=e&&(da.boxSizingReliable()||r===b.style[c]),"auto"===r&&(r=b["offset"+c[0].toUpperCase()+c.slice(1)]),r=parseFloat(r)||0,r+H(b,c,d||(e?"border":"content"),g,l)+"px")}function R(b,c,d,g,l){return new R.prototype.init(b,c,d,g,l)}function l(){Cb&&(!1===X.hidden&&b.requestAnimationFrame?b.requestAnimationFrame(l):b.setTimeout(l,p.fx.interval),p.fx.tick())}function q(){return b.setTimeout(function(){bb=void 0}),bb=p.now()}function K(b,c){var d,g=0,l={height:b};for(c=c?1:0;4>g;g+= +2-c)d=Sa[g],l["margin"+d]=l["padding"+d]=b;return c&&(l.opacity=l.width=b),l}function r(b,c,d){for(var g,l=(N.tweeners[c]||[]).concat(N.tweeners["*"]),r=0,e=l.length;rd&&r?c: +(r||s.notifyWith(b,[m,1,0]),s.resolveWith(b,[m]),!1)},m=s.promise({elem:b,props:p.extend({},c),opts:p.extend(!0,{specialEasing:{},easing:p.easing._default},d),originalProperties:c,originalOptions:d,startTime:bb||q(),duration:d.duration,tweens:[],createTween:function(c,d){var g=p.Tween(b,m.opts,c,d,m.opts.specialEasing[c]||m.opts.easing);return m.tweens.push(g),g},stop:function(c){var d=0,g=c?m.tweens.length:0;if(l)return this;for(l=!0;db?this[b+this.length]:this[b]},pushStack:function(b){b=p.merge(this.constructor(),b);return b.prevObject=this,b},each:function(b){return p.each(this,b)},map:function(b){return this.pushStack(p.map(this,function(c,d){return b.call(c,d,c)}))},slice:function(){return this.pushStack(ya.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b){var c=this.length;b= ++b+(0>b?c:0);return this.pushStack(0<=b&&bW.cacheLength&&delete b[c.shift()],b[d+" "]=g}var c=[];return b},pa=function(b){return b[ia]=!0,b},ra=function(b){var c=Y.createElement("fieldset");try{return!!b(c)}catch(d){return!1}finally{c.parentNode&&c.parentNode.removeChild(c)}},ib=function(b,c){for(var d=b.split("|"),g=d.length;g--;)W.attrHandle[d[g]]=c},sb=function(b,c){var d=c&&b,g=d&&1===b.nodeType&&1===c.nodeType&&b.sourceIndex-c.sourceIndex;if(g)return g;if(d)for(;d=d.nextSibling;)if(d=== +c)return-1;return b?1:-1},tb=function(b){return function(c){return"input"===c.nodeName.toLowerCase()&&c.type===b}},Ib=function(b){return function(c){var d=c.nodeName.toLowerCase();return("input"===d||"button"===d)&&c.type===b}},ub=function(b){return function(c){return"form"in c?c.parentNode&&!1===c.disabled?"label"in c?"label"in c.parentNode?c.parentNode.disabled===b:c.disabled===b:c.isDisabled===b||c.isDisabled!==!b&&Qc(c)===b:c.disabled===b:"label"in c&&c.disabled===b}},Ca=function(b){return pa(function(c){return c= ++c,pa(function(d,g){for(var l,r=b([],d.length,c),e=r.length;e--;)d[l=r[e]]&&(d[l]=!(g[l]=d[l]))})})},fb=function(b){return b&&"undefined"!=typeof b.getElementsByTagName&&b},vb=function(){},Ta=function(b){for(var c=0,d=b.length,g="";c+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,Yc=/=[\x20\t\r\n\f]*([^\]'"]*?)[\x20\t\r\n\f]*\]/g,Zc=RegExp(":((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)"), +$c=/^(?:\\.|[\w-]|[^\x00-\xa0])+$/,Jb={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:/^((?:\\.|[\w-]|[^\x00-\xa0])+|[*])/,ATTR:RegExp("^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\]"),PSEUDO:RegExp("^:((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)"), +CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)", +"i")},ad=/^(?:input|select|textarea|button)$/i,bd=/^h\d$/i,wb=/^[^{]+\{\s*\[native \w/,Pc=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Sb=/[+~]/,Ga=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,Ha=function(b,c,d){b="0x"+c-65536;return b!==b||d?c:0>b?String.fromCharCode(b+65536):String.fromCharCode(b>>10|55296,1023&b|56320)},dc=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ec=function(b,c){return c?"\x00"===b?"\ufffd":b.slice(0,-1)+"\\"+b.charCodeAt(b.length-1).toString(16)+" ":"\\"+b},ic=function(){wa()}, +Qc=Ua(function(b){return!0===b.disabled&&("form"in b||"label"in b)},{dir:"parentNode",next:"legend"});try{Ma.apply($a=hc.call(va.childNodes),va.childNodes),$a[va.childNodes.length].nodeType}catch(Ed){Ma={apply:$a.length?function(b,c){Uc.apply(b,hc.call(c))}:function(b,c){for(var d=b.length,g=0;b[d++]=c[g++];);b.length=d-1}}}ea=ca.support={};jb=ca.isXML=function(b){b=b&&(b.ownerDocument||b).documentElement;return!!b&&"HTML"!==b.nodeName};wa=ca.setDocument=function(b){var c,d;b=b?b.ownerDocument||b: +va;return b!==Y&&9===b.nodeType&&b.documentElement?(Y=b,ma=Y.documentElement,la=!jb(Y),va!==Y&&(d=Y.defaultView)&&d.top!==d&&(d.addEventListener?d.addEventListener("unload",ic,!1):d.attachEvent&&d.attachEvent("onunload",ic)),ea.attributes=ra(function(b){return b.className="i",!b.getAttribute("className")}),ea.getElementsByTagName=ra(function(b){return b.appendChild(Y.createComment("")),!b.getElementsByTagName("*").length}),ea.getElementsByClassName=wb.test(Y.getElementsByClassName),ea.getById=ra(function(b){return ma.appendChild(b).id= +ia,!Y.getElementsByName||!Y.getElementsByName(ia).length}),ea.getById?(W.filter.ID=function(b){var c=b.replace(Ga,Ha);return function(b){return b.getAttribute("id")===c}},W.find.ID=function(b,c){if("undefined"!=typeof c.getElementById&&la){var d=c.getElementById(b);return d?[d]:[]}}):(W.filter.ID=function(b){var c=b.replace(Ga,Ha);return function(b){return(b="undefined"!=typeof b.getAttributeNode&&b.getAttributeNode("id"))&&b.value===c}},W.find.ID=function(b,c){if("undefined"!=typeof c.getElementById&& +la){var d,g,l,aa=c.getElementById(b);if(aa){if(d=aa.getAttributeNode("id"),d&&d.value===b)return[aa];l=c.getElementsByName(b);for(g=0;aa=l[g++];)if(d=aa.getAttributeNode("id"),d&&d.value===b)return[aa]}return[]}}),W.find.TAG=ea.getElementsByTagName?function(b,c){return"undefined"!=typeof c.getElementsByTagName?c.getElementsByTagName(b):ea.qsa?c.querySelectorAll(b):void 0}:function(b,c){var d,g=[],l=0,aa=c.getElementsByTagName(b);if("*"===b){for(;d=aa[l++];)1===d.nodeType&&g.push(d);return g}return aa}, +W.find.CLASS=ea.getElementsByClassName&&function(b,c){if("undefined"!=typeof c.getElementsByClassName&&la)return c.getElementsByClassName(b)},Aa=[],ja=[],(ea.qsa=wb.test(Y.querySelectorAll))&&(ra(function(b){ma.appendChild(b).innerHTML="";b.querySelectorAll("[msallowcapture^='']").length&&ja.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");b.querySelectorAll("[selected]").length||ja.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)"); +b.querySelectorAll("[id~="+ia+"-]").length||ja.push("~=");b.querySelectorAll(":checked").length||ja.push(":checked");b.querySelectorAll("a#"+ia+"+*").length||ja.push(".#.+[+~]")}),ra(function(b){b.innerHTML="";var c=Y.createElement("input");c.setAttribute("type","hidden");b.appendChild(c).setAttribute("name","D");b.querySelectorAll("[name=d]").length&&ja.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");2!==b.querySelectorAll(":enabled").length&& +ja.push(":enabled",":disabled");ma.appendChild(b).disabled=!0;2!==b.querySelectorAll(":disabled").length&&ja.push(":enabled",":disabled");b.querySelectorAll("*,:x");ja.push(",.*:")})),(ea.matchesSelector=wb.test(Ra=ma.matches||ma.webkitMatchesSelector||ma.mozMatchesSelector||ma.oMatchesSelector||ma.msMatchesSelector))&&ra(function(b){ea.disconnectedMatch=Ra.call(b,"*");Ra.call(b,"[s!='']:x");Aa.push("!=",":((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)")}), +ja=ja.length&&RegExp(ja.join("|")),Aa=Aa.length&&RegExp(Aa.join("|")),c=wb.test(ma.compareDocumentPosition),rb=c||wb.test(ma.contains)?function(b,c){var d=9===b.nodeType?b.documentElement:b,g=c&&c.parentNode;return b===g||!(!g||1!==g.nodeType||!(d.contains?d.contains(g):b.compareDocumentPosition&&16&b.compareDocumentPosition(g)))}:function(b,c){if(c)for(;c=c.parentNode;)if(c===b)return!0;return!1},Tb=c?function(b,c){if(b===c)return Fa=!0,0;var d=!b.compareDocumentPosition-!c.compareDocumentPosition; +return d?d:(d=(b.ownerDocument||b)===(c.ownerDocument||c)?b.compareDocumentPosition(c):1,1&d||!ea.sortDetached&&c.compareDocumentPosition(b)===d?b===Y||b.ownerDocument===va&&rb(va,b)?-1:c===Y||c.ownerDocument===va&&rb(va,c)?1:xa?Xa(xa,b)-Xa(xa,c):0:4&d?-1:1)}:function(b,c){if(b===c)return Fa=!0,0;var d,g=0;d=b.parentNode;var l=c.parentNode,aa=[b],r=[c];if(!d||!l)return b===Y?-1:c===Y?1:d?-1:l?1:xa?Xa(xa,b)-Xa(xa,c):0;if(d===l)return sb(b,c);for(d=b;d=d.parentNode;)aa.unshift(d);for(d=c;d=d.parentNode;)r.unshift(d); +for(;aa[g]===r[g];)g++;return g?sb(aa[g],r[g]):aa[g]===va?-1:r[g]===va?1:0},Y):Y};ca.matches=function(b,c){return ca(b,null,null,c)};ca.matchesSelector=function(b,c){if((b.ownerDocument||b)!==Y&&wa(b),c=c.replace(Yc,"='$1']"),ea.matchesSelector&&la&&!Gb[c+" "]&&(!Aa||!Aa.test(c))&&(!ja||!ja.test(c)))try{var d=Ra.call(b,c);if(d||ea.disconnectedMatch||b.document&&11!==b.document.nodeType)return d}catch(g){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"}, +"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(b){return b[1]=b[1].replace(Ga,Ha),b[3]=(b[3]||b[4]||b[5]||"").replace(Ga,Ha),"~="===b[2]&&(b[3]=" "+b[3]+" "),b.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),"nth"===b[1].slice(0,3)?(b[3]||ca.error(b[0]),b[4]=+(b[4]?b[5]+(b[6]||1):2*("even"===b[3]||"odd"===b[3])),b[5]=+(b[7]+b[8]||"odd"===b[3])):b[3]&&ca.error(b[0]),b},PSEUDO:function(b){var c,d=!b[6]&&b[2];return Jb.CHILD.test(b[0])?null:(b[3]? +b[2]=b[4]||b[5]||"":d&&Zc.test(d)&&(c=Na(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(b[0]=b[0].slice(0,c),b[2]=d.slice(0,c)),b.slice(0,3))}},filter:{TAG:function(b){var c=b.replace(Ga,Ha).toLowerCase();return"*"===b?function(){return!0}:function(b){return b.nodeName&&b.nodeName.toLowerCase()===c}},CLASS:function(b){var c=fc[b+" "];return c||(c=RegExp("(^|[\\x20\\t\\r\\n\\f])"+b+"([\\x20\\t\\r\\n\\f]|$)"))&&fc(b,function(b){return c.test("string"==typeof b.className&&b.className||"undefined"!= +typeof b.getAttribute&&b.getAttribute("class")||"")})},ATTR:function(b,c,d){return function(g){g=ca.attr(g,b);return null==g?"!="===c:!c||(g+="","="===c?g===d:"!="===c?g!==d:"^="===c?d&&0===g.indexOf(d):"*="===c?d&&-1b.nodeType)return!1;return!0},parent:function(b){return!W.pseudos.empty(b)},header:function(b){return bd.test(b.nodeName)}, +input:function(b){return ad.test(b.nodeName)},button:function(b){var c=b.nodeName.toLowerCase();return"input"===c&&"button"===b.type||"button"===c},text:function(b){var c;return"input"===b.nodeName.toLowerCase()&&"text"===b.type&&(null==(c=b.getAttribute("type"))||"text"===c.toLowerCase())},first:Ca(function(){return[0]}),last:Ca(function(b,c){return[c-1]}),eq:Ca(function(b,c,d){return[0>d?d+c:d]}),even:Ca(function(b,c){for(var d=0;dd?d+c:d;0<=--c;)b.push(c);return b}),gt:Ca(function(b,c,d){for(d=0>d?d+c:d;++d:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Gc=/^.[^:#\[\.,]*$/;p.filter=function(b,c,d){var g=c[0];return d&&(b=":not("+b+")"),1===c.length&&1===g.nodeType?p.find.matchesSelector(g,b)?[g]:[]:p.find.matches(b,p.grep(c,function(b){return 1===b.nodeType}))};p.fn.extend({find:function(b){var c,d,g=this.length,l=this;if("string"!=typeof b)return this.pushStack(p(b).filter(function(){for(c=0;c)[^>]*|#([\w-]+))$/;(p.fn.init=function(b,c,d){var g,l;if(!b)return this;if(d=d||mc,"string"==typeof b){if(g="<"===b[0]&&">"===b[b.length-1]&&3<=b.length?[null,b,null]:cd.exec(b),!g||!g[1]&& +c)return!c||c.jquery?(c||d).find(b):this.constructor(c).find(b);if(g[1]){if(c=c instanceof p?c[0]:c,p.merge(this,p.parseHTML(g[1],c&&c.nodeType?c.ownerDocument||c:X,!0)),lc.test(g[1])&&p.isPlainObject(c))for(g in c)p.isFunction(this[g])?this[g](c[g]):this.attr(g,c[g]);return this}return l=X.getElementById(g[2]),l&&(this[0]=l,this.length=1),this}return b.nodeType?(this[0]=b,this.length=1,this):p.isFunction(b)?void 0!==d.ready?d.ready(b):b(p):p.makeArray(b,this)}).prototype=p.fn;mc=p(X);var dd=/^(?:parents|prev(?:Until|All))/, +ed={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({has:function(b){var c=p(b,this),d=c.length;return this.filter(function(){for(var b=0;bd.nodeType&&(e?-1=f&&(l!==g&&(s=void 0,q=[b]),d.rejectWith(s,q))}};c?aa():(p.Deferred.getStackHook&&(aa.stackTrace=p.Deferred.getStackHook()),b.setTimeout(aa))}}var f=0;return p.Deferred(function(b){d[0][3].add(e(0,b,p.isFunction(r)?r:m,b.notifyWith));d[1][3].add(e(0,b,p.isFunction(c)?c:m));d[2][3].add(e(0,b,p.isFunction(l)?l:g))}).promise()},promise:function(b){return null!=b?p.extend(b,r):r}},e={};return p.each(d,function(b,c){var g=c[2],f=c[5];r[c[1]]=g.add;f&&g.add(function(){l= +f},d[3-b][2].disable,d[0][2].lock);g.add(c[3].fire);e[c[0]]=function(){return e[c[0]+"With"](this===e?void 0:this,arguments),this};e[c[0]+"With"]=g.fireWith}),r.promise(e),c&&c.call(e,e),e},when:function(b){var c=arguments.length,d=c,g=Array(d),l=ya.call(arguments),r=p.Deferred(),e=function(b){return function(d){g[b]=this;l[b]=1=c&&(t(b,r.done(e(d)).resolve,r.reject,!c),"pending"===r.state()||p.isFunction(l[d]&&l[d].then)))return r.then(); +for(;d--;)t(l[d],e(d),r.reject);return r.promise()}});var fd=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;p.Deferred.exceptionHook=function(c,d){b.console&&b.console.warn&&c&&fd.test(c.name)&&b.console.warn("jQuery.Deferred exception: "+c.message,c.stack,d)};p.readyException=function(c){b.setTimeout(function(){throw c;})};var Ub=p.Deferred();p.fn.ready=function(b){return Ub.then(b)["catch"](function(b){p.readyException(b)}),this};p.extend({isReady:!1,readyWait:1,ready:function(b){(!0=== +b?--p.readyWait:p.isReady)||(p.isReady=!0,!0!==b&&0<--p.readyWait||Ub.resolveWith(X,[p]))}});p.ready.then=Ub.then;"complete"===X.readyState||"loading"!==X.readyState&&!X.documentElement.doScroll?b.setTimeout(p.ready):(X.addEventListener("DOMContentLoaded",z),b.addEventListener("load",z));var Ia=function(b,c,d,g,l,r,e){var f=0,s=b.length,q=null==d;if("object"===p.type(d))for(f in l=!0,d)Ia(b,c,f,d[f],!0,r,e);else if(void 0!==g&&(l=!0,p.isFunction(g)||(e=!0),q&&(e?(c.call(b,g),c=null):(q=c,c=function(b, +c,d){return q.call(p(b),d)})),c))for(;f\x20\t\r\n\f]+)/i,$b=/^$|\/(?:java|ecma)script/i,sa={option:[1,""],thead:[1,"","
"],col:[2,"","
"], +tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};sa.optgroup=sa.option;sa.tbody=sa.tfoot=sa.colgroup=sa.caption=sa.thead;sa.th=sa.td;var Jc=/<|&#?\w+;/,Lb=X.createDocumentFragment().appendChild(X.createElement("div")),Mb=X.createElement("input");Mb.setAttribute("type","radio");Mb.setAttribute("checked","checked");Mb.setAttribute("name","t");Lb.appendChild(Mb);da.checkClone=Lb.cloneNode(!0).cloneNode(!0).lastChild.checked;Lb.innerHTML= +"";da.noCloneChecked=!!Lb.cloneNode(!0).lastChild.defaultValue;!0;var Nb=X.documentElement,gd=/^key/,hd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qc=/^([^.]*)(?:\.(.+)|)/;p.event={global:{},add:function(b,c,d,g,l){var r,e,f,s,q,j,m,N,t,u;if(q=S.get(b)){d.handler&&(r=d,d=r.handler,l=r.selector);l&&p.find.matchesSelector(Nb,l);d.guid||(d.guid=p.guid++);(s=q.events)||(s=q.events={});(e=q.handle)||(e=q.handle=function(c){return"undefined"!=typeof p&&p.event.triggered!==c.type? +p.event.dispatch.apply(b,arguments):void 0});c=(c||"").match(ta)||[""];for(q=c.length;q--;)f=qc.exec(c[q])||[],t=u=f[1],f=(f[2]||"").split(".").sort(),t&&(m=p.event.special[t]||{},t=(l?m.delegateType:m.bindType)||t,m=p.event.special[t]||{},j=p.extend({type:t,origType:u,data:g,handler:d,guid:d.guid,selector:l,needsContext:l&&p.expr.match.needsContext.test(l),namespace:f.join(".")},r),(N=s[t])||(N=s[t]=[],N.delegateCount=0,m.setup&&!1!==m.setup.call(b,g,f,e)||b.addEventListener&&b.addEventListener(t, +e)),m.add&&(m.add.call(b,j),j.handler.guid||(j.handler.guid=d.guid)),l?N.splice(N.delegateCount++,0,j):N.push(j),p.event.global[t]=!0)}},remove:function(b,c,d,g,l){var r,e,f,s,q,j,m,N,t,u,C,V=S.hasData(b)&&S.get(b);if(V&&(s=V.events)){c=(c||"").match(ta)||[""];for(q=c.length;q--;)if(f=qc.exec(c[q])||[],t=C=f[1],u=(f[2]||"").split(".").sort(),t){m=p.event.special[t]||{};t=(g?m.delegateType:m.bindType)||t;N=s[t]||[];f=f[2]&&RegExp("(^|\\.)"+u.join("\\.(?:.*\\.|)")+"(\\.|$)");for(e=r=N.length;r--;)j= +N[r],!l&&C!==j.origType||d&&d.guid!==j.guid||f&&!f.test(j.namespace)||g&&g!==j.selector&&("**"!==g||!j.selector)||(N.splice(r,1),j.selector&&N.delegateCount--,m.remove&&m.remove.call(b,j));e&&!N.length&&(m.teardown&&!1!==m.teardown.call(b,u,V.handle)||p.removeEvent(b,t,V.handle),delete s[t])}else for(t in s)p.event.remove(b,t+c[q],d,g,!0);p.isEmptyObject(s)&&S.remove(b,"handle events")}},dispatch:function(b){var c=p.event.fix(b),d,g,l,r,e,f,s=Array(arguments.length);g=(S.get(this,"events")||{})[c.type]|| +[];var q=p.event.special[c.type]||{};s[0]=c;for(d=1;d\x20\t\r\n\f]*)[^>]*)\/>/gi,jd=/\s*$/g;p.extend({htmlPrefilter:function(b){return b.replace(id,"<$1>")},clone:function(b,c,d){var g,l,r,e,f=b.cloneNode(!0),q=p.contains(b.ownerDocument,b);if(!da.noCloneChecked&&!(1!==b.nodeType&&11!==b.nodeType||p.isXMLDoc(b))){e=D(f);r=D(b);g=0;for(l=r.length;gp.inArray(this,b)&&(p.cleanData(D(this)),d&&d.replaceChild(c,this))},b)}});p.each({appendTo:"append",prependTo:"prepend", +insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,c){p.fn[b]=function(b){for(var d=[],g=p(b),l=g.length-1,r=0;r<=l;r++)b=r===l?this:this.clone(!0),p(g[r])[c](b),cb.apply(d,b.get());return this.pushStack(d)}});var ac=/^margin/,Qb=RegExp("^("+nc+")(?!px)[a-z%]+$","i"),Bb=function(c){var d=c.ownerDocument.defaultView;return d&&d.opener||(d=b),d.getComputedStyle(c)},Pb=function(){if(Ba){Ba.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%"; +Ba.innerHTML="";Nb.appendChild(Ob);var c=b.getComputedStyle(Ba);rc="1%"!==c.top;sc="2px"===c.marginLeft;tc="4px"===c.width;Ba.style.marginRight="50%";uc="4px"===c.marginRight;Nb.removeChild(Ob);Ba=null}},rc,tc,uc,sc,Ob=X.createElement("div"),Ba=X.createElement("div");Ba.style&&(Ba.style.backgroundClip="content-box",Ba.cloneNode(!0).style.backgroundClip="",da.clearCloneStyle="content-box"===Ba.style.backgroundClip,Ob.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", +Ob.appendChild(Ba),p.extend(da,{pixelPosition:function(){return Pb(),rc},boxSizingReliable:function(){return Pb(),tc},pixelMarginRight:function(){return Pb(),uc},reliableMarginLeft:function(){return Pb(),sc}}));!0;var kd=/^(none|table(?!-c[ea]).+)/,vc=/^--/,ld={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:"0",fontWeight:"400"},cc=["Webkit","Moz","ms"],bc=X.createElement("div").style;p.extend({cssHooks:{opacity:{get:function(b,c){if(c){var d=s(b,"opacity");return""=== +d?"1":d}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(b,c,d,g){if(b&&3!==b.nodeType&&8!==b.nodeType&&b.style){var l,r,e,f=p.camelCase(c),q=vc.test(c),s=b.style;return q||(c=F(f)),e=p.cssHooks[c]||p.cssHooks[f],void 0===d?e&&"get"in e&&void 0!==(l=e.get(b,!1,g))?l:s[c]:(r=typeof d,"string"===r&&(l=mb.exec(d))&&l[1]&& +(d=B(b,c,l),r="number"),null!=d&&d===d&&("number"===r&&(d+=l&&l[3]||(p.cssNumber[f]?"":"px")),da.clearCloneStyle||""!==d||0!==c.indexOf("background")||(s[c]="inherit"),e&&"set"in e&&void 0===(d=e.set(b,d,g))||(q?s.setProperty(c,d):s[c]=d)),void 0)}},css:function(b,c,d,g){var l,r,e,f=p.camelCase(c);return vc.test(c)||(c=F(f)),e=p.cssHooks[c]||p.cssHooks[f],e&&"get"in e&&(l=e.get(b,!0,d)),void 0===l&&(l=s(b,c,g)),"normal"===l&&c in wc&&(l=wc[c]),""===d||d?(r=parseFloat(l),!0===d||isFinite(r)?r||0:l): +l}});p.each(["height","width"],function(b,c){p.cssHooks[c]={get:function(b,d,g){if(d)return!kd.test(p.css(b,"display"))||b.getClientRects().length&&b.getBoundingClientRect().width?Z(b,c,g):oc(b,ld,function(){return Z(b,c,g)})},set:function(b,d,g){var l,r=g&&Bb(b);g=g&&H(b,c,g,"border-box"===p.css(b,"boxSizing",!1,r),r);return g&&(l=mb.exec(d))&&"px"!==(l[3]||"px")&&(b.style[c]=d,d=p.css(b,c)),C(b,d,g)}}});p.cssHooks.marginLeft=u(da.reliableMarginLeft,function(b,c){if(c)return(parseFloat(s(b,"marginLeft"))|| +b.getBoundingClientRect().left-oc(b,{marginLeft:0},function(){return b.getBoundingClientRect().left}))+"px"});p.each({margin:"",padding:"",border:"Width"},function(b,c){p.cssHooks[b+c]={expand:function(d){var g=0,l={};for(d="string"==typeof d?d.split(" "):[d];4>g;g++)l[b+Sa[g]+c]=d[g]||d[g-2]||d[0];return l}};ac.test(b)||(p.cssHooks[b+c].set=C)});p.fn.extend({css:function(b,c){return Ia(this,function(b,c,d){var g,l={},r=0;if(Array.isArray(c)){d=Bb(b);for(g=c.length;rg.indexOf(" "+r+" ")&&(g+=r+" ");g=V(g);l!==g&&d.setAttribute("class",g)}return this},removeClass:function(b){var c,d,g,l,r,e,f=0;if(p.isFunction(b))return this.each(function(c){p(this).removeClass(b.call(this, +c,ga(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof b&&b)for(c=b.match(ta)||[];d=this[f++];)if(l=ga(d),g=1===d.nodeType&&" "+V(l)+" "){for(e=0;r=c[e++];)for(;-1l?s:r?l:0;dt.indexOf(":")&&"on"+t,c=c[p.expando]?c:new p.Event(t,"object"==typeof c&&c),c.isTrigger=l?2:3,c.namespace=r.join("."),c.rnamespace=c.namespace?RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=void 0,c.target||(c.target=g),d=null==d?[c]:p.makeArray(d,[c]),m=p.event.special[t]||{},l||!m.trigger||!1!==m.trigger.apply(g, +d))){if(!l&&!m.noBubble&&!p.isWindow(g)){s=m.delegateType||t;for(yc.test(s+t)||(e=e.parentNode);e;e=e.parentNode)N.push(e),f=e;f===(g.ownerDocument||X)&&N.push(f.defaultView||f.parentWindow||b)}for(r=0;(e=N[r++])&&!c.isPropagationStopped();)c.type=1c||304===c;if(f){F=u;for(var n=H,y,A,Z,ha,B=F.contents,E=F.dataTypes;"*"===E[0];)E.shift(),void 0===y&&(y=F.mimeType||n.getResponseHeader("Content-Type")); +if(y)for(A in B)if(B[A]&&B[A].test(y)){E.unshift(A);break}if(E[0]in f)Z=E[0];else{for(A in f){if(!E[0]||F.converters[A+" "+E[0]]){Z=A;break}ha||(ha=A)}Z=Z||ha}F=f=Z?(Z!==E[0]&&E.unshift(Z),f[Z]):void 0}var oa;a:{f=u;y=F;A=H;Z=q;var ka,G,na;F={};n=f.dataTypes.slice();if(n[1])for(ka in f.converters)F[ka.toLowerCase()]=f.converters[ka];for(ha=n.shift();ha;)if(f.responseFields[ha]&&(A[f.responseFields[ha]]=y),!na&&Z&&f.dataFilter&&(y=f.dataFilter(y,f.dataType)),na=ha,ha=n.shift())if("*"===ha)ha=na;else if("*"!== +na&&na!==ha){if(ka=F[na+" "+ha]||F["* "+ha],!ka)for(oa in F)if(G=oa.split(" "),G[1]===ha&&(ka=F[na+" "+G[0]]||F["* "+G[0]])){!0===ka?ka=F[oa]:!0!==F[oa]&&(ha=G[0],n.unshift(G[1]));break}if(!0!==ka)if(ka&&f["throws"])y=ka(y);else try{y=ka(y)}catch(ua){oa={state:"parsererror",error:ka?ua:"No conversion from "+na+" to "+ha};break a}}oa={state:"success",data:y}}F=oa;q?(u.ifModified&&(R=H.getResponseHeader("Last-Modified"),R&&(p.lastModified[r]=R),R=H.getResponseHeader("etag"),R&&(p.etag[r]=R)),204=== +c||"HEAD"===u.type?ga="nocontent":304===c?ga="notmodified":(ga=F.state,N=F.data,t=F.error,q=!t)):(t=ga,!c&&ga||(ga="error",0>c&&(c=0)));H.status=c;H.statusText=(d||ga)+"";q?K.resolveWith(C,[N,ga,H]):K.rejectWith(C,[H,ga,t]);H.statusCode(z);z=void 0;m&&V.trigger(q?"ajaxSuccess":"ajaxError",[H,u,q?N:t]);x.fireWith(C,[H,ga]);m&&(V.trigger("ajaxComplete",[H,u]),--p.active||p.event.trigger("ajaxStop"))}}"object"==typeof c&&(d=c,c=void 0);d=d||{};var l,r,e,f,s,q,j,m,N,t,u=p.ajaxSetup({},d),C=u.context|| +u,V=u.context&&(C.nodeType||C.jquery)?p(C):p.event,K=p.Deferred(),x=p.Callbacks("once memory"),z=u.statusCode||{},F={},R={},ga="canceled",H={readyState:0,getResponseHeader:function(b){var c;if(j){if(!f)for(f={};c=xd.exec(e);)f[c[1].toLowerCase()]=c[2];c=f[b.toLowerCase()]}return null==c?null:c},getAllResponseHeaders:function(){return j?e:null},setRequestHeader:function(b,c){return null==j&&(b=R[b.toLowerCase()]=R[b.toLowerCase()]||b,F[b]=c),this},overrideMimeType:function(b){return null==j&&(u.mimeType= +b),this},statusCode:function(b){var c;if(b)if(j)H.always(b[H.status]);else for(c in b)z[c]=[z[c],b[c]];return this},abort:function(b){b=b||ga;return l&&l.abort(b),g(0,b),this}};if(K.promise(H),u.url=((c||u.url||yb.href)+"").replace(zd,yb.protocol+"//"),u.type=d.method||d.type||u.method||u.type,u.dataTypes=(u.dataType||"*").toLowerCase().match(ta)||[""],null==u.crossDomain){q=X.createElement("a");try{q.href=u.url,q.href=q.href,u.crossDomain=Wb.protocol+"//"+Wb.host!=q.protocol+"//"+q.host}catch(n){u.crossDomain= +!0}}if(u.data&&u.processData&&"string"!=typeof u.data&&(u.data=p.param(u.data,u.traditional)),na(Bc,u,d,H),j)return H;(m=p.event&&u.global)&&0===p.active++&&p.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!yd.test(u.type);r=u.url.replace(vd,"");u.hasContent?u.data&&u.processData&&0===(u.contentType||"").indexOf("application/x-www-form-urlencoded")&&(u.data=u.data.replace(ud,"+")):(t=u.url.slice(r.length),u.data&&(r+=(Vb.test(r)?"&":"?")+u.data,delete u.data),!1===u.cache&&(r= +r.replace(wd,"$1"),t=(Vb.test(r)?"&":"?")+"_="+zc++ +t),u.url=r+t);u.ifModified&&(p.lastModified[r]&&H.setRequestHeader("If-Modified-Since",p.lastModified[r]),p.etag[r]&&H.setRequestHeader("If-None-Match",p.etag[r]));(u.data&&u.hasContent&&!1!==u.contentType||d.contentType)&&H.setRequestHeader("Content-Type",u.contentType);H.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+Cc+"; q=0.01":""):u.accepts["*"]);for(N in u.headers)H.setRequestHeader(N, +u.headers[N]);if(u.beforeSend&&(!1===u.beforeSend.call(C,H,u)||j))return H.abort();if(ga="abort",x.add(u.complete),H.done(u.success),H.fail(u.error),l=na(Rb,u,d,H)){if(H.readyState=1,m&&V.trigger("ajaxSend",[H,u]),j)return H;u.async&&0").prop({charset:b.scriptCharset,src:b.url}).on("load error",d=function(b){c.remove();d=null;b&&l("error"===b.type?404:200,b.type)});X.head.appendChild(c[0])},abort:function(){d&&d()}}}});var Dc=[],Xb=/(=)\?(?=&|$)|\?\?/;p.ajaxSetup({jsonp:"callback", +jsonpCallback:function(){var b=Dc.pop()||p.expando+"_"+zc++;return this[b]=!0,b}});p.ajaxPrefilter("json jsonp",function(c,d,g){var l,r,e,f=!1!==c.jsonp&&(Xb.test(c.url)?"url":"string"==typeof c.data&&0===(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xb.test(c.data)&&"data");if(f||"jsonp"===c.dataTypes[0])return l=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,f?c[f]=c[f].replace(Xb,"$1"+l):!1!==c.jsonp&&(c.url+=(Vb.test(c.url)?"&":"?")+c.jsonp+ +"="+l),c.converters["script json"]=function(){return e||p.error(l+" was not called"),e[0]},c.dataTypes[0]="json",r=b[l],b[l]=function(){e=arguments},g.always(function(){void 0===r?p(b).removeProp(l):b[l]=r;c[l]&&(c.jsonpCallback=d.jsonpCallback,Dc.push(l));e&&p.isFunction(r)&&r(e[0]);e=r=void 0}),"script"});var Bd=da,Ec,Fc=X.implementation.createHTMLDocument("").body;Ec=(Fc.innerHTML="
",2===Fc.childNodes.length);Bd.createHTMLDocument=Ec;p.parseHTML=function(b,c,d){if("string"!= +typeof b)return[];"boolean"==typeof c&&(d=c,c=!1);var g,l,r;return c||(da.createHTMLDocument?(c=X.implementation.createHTMLDocument(""),g=c.createElement("base"),g.href=X.location.href,c.head.appendChild(g)):c=X),l=lc.exec(b),r=!d&&[],l?[c.createElement(l[1])]:(l=G([b],c,r),r&&r.length&&p(r).remove(),p.merge([],l.childNodes))};p.fn.load=function(b,c,d){var g,l,r,e=this,f=b.indexOf(" ");return-1").append(p.parseHTML(b)).find(g):b)}).always(d&&function(b,c){e.each(function(){d.apply(this,r||[b.responseText,c,b])})}),this};p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(b,c){p.fn[c]=function(b){return this.on(c,b)}});p.expr.pseudos.animated=function(b){return p.grep(p.timers,function(c){return b===c.elem}).length};p.offset={setOffset:function(b, +c,d){var g,l,r,e,f,q,s=p.css(b,"position"),j=p(b),m={};"static"===s&&(b.style.position="relative");f=j.offset();r=p.css(b,"top");q=p.css(b,"left");("absolute"===s||"fixed"===s)&&-1<(r+q).indexOf("auto")?(g=j.position(),e=g.top,l=g.left):(e=parseFloat(r)||0,l=parseFloat(q)||0);p.isFunction(c)&&(c=c.call(b,d,p.extend({},f)));null!=c.top&&(m.top=c.top-f.top+e);null!=c.left&&(m.left=c.left-f.left+l);"using"in c?c.using.call(b,m):j.css(m)}};p.fn.extend({offset:function(b){if(arguments.length)return void 0=== +b?this:this.each(function(c){p.offset.setOffset(this,b,c)});var c,d,g,l,r=this[0];if(r)return r.getClientRects().length?(g=r.getBoundingClientRect(),c=r.ownerDocument,d=c.documentElement,l=c.defaultView,{top:g.top+l.pageYOffset-d.clientTop,left:g.left+l.pageXOffset-d.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var b,c,d=this[0],g={top:0,left:0};return"fixed"===p.css(d,"position")?c=d.getBoundingClientRect():(b=this.offsetParent(),c=this.offset(),f(b[0],"html")||(g=b.offset()),g={top:g.top+ +p.css(b[0],"borderTopWidth",!0),left:g.left+p.css(b[0],"borderLeftWidth",!0)}),{top:c.top-g.top-p.css(d,"marginTop",!0),left:c.left-g.left-p.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var b=this.offsetParent;b&&"static"===p.css(b,"position");)b=b.offsetParent;return b||Nb})}});p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;p.fn[b]=function(g){return Ia(this,function(b,g,l){var r;return p.isWindow(b)?r=b:9===b.nodeType&& +(r=b.defaultView),void 0===l?r?r[c]:b[g]:void(r?r.scrollTo(d?r.pageXOffset:l,d?l:r.pageYOffset):b[g]=l)},b,g,arguments.length)}});p.each(["top","left"],function(b,c){p.cssHooks[c]=u(da.pixelPosition,function(b,d){if(d)return d=s(b,c),Qb.test(d)?p(b).position()[c]+"px":d})});p.each({Height:"height",Width:"width"},function(b,c){p.each({padding:"inner"+b,content:c,"":"outer"+b},function(d,g){p.fn[g]=function(l,r){var e=arguments.length&&(d||"boolean"!=typeof l),f=d||(!0===l||!0===r?"margin":"border"); +return Ia(this,function(c,d,l){var r;return p.isWindow(c)?0===g.indexOf("outer")?c["inner"+b]:c.document.documentElement["client"+b]:9===c.nodeType?(r=c.documentElement,Math.max(c.body["scroll"+b],r["scroll"+b],c.body["offset"+b],r["offset"+b],r["client"+b])):void 0===l?p.css(c,d,f):p.style(c,d,l,f)},c,e?l:void 0,e)}})});p.fn.extend({bind:function(b,c,d){return this.on(b,null,c,d)},unbind:function(b,c){return this.off(b,null,c)},delegate:function(b,c,d,g){return this.on(c,b,d,g)},undelegate:function(b, +c,d){return 1===arguments.length?this.off(b,"**"):this.off(c,b||"**",d)}});p.holdReady=function(b){b?p.readyWait++:p.ready(!0)};p.isArray=Array.isArray;p.parseJSON=JSON.parse;p.nodeName=f;"function"==typeof define&&define.amd&&define("jquery",[],function(){return p});var Cd=b.jQuery,Dd=b.$;return p.noConflict=function(c){return b.$===p&&(b.$=Dd),c&&b.jQuery===p&&(b.jQuery=Cd),p},c||(b.jQuery=b.$=p),p}); +function getInternetExplorerVersion(){var b=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(b=parseFloat(RegExp.$1));return b}var ie=getInternetExplorerVersion();function getQueryVariable(b){for(var c=window.location.search.substring(1).split("&"),d=0;d=d[f].start&&e<= +d[f].end){b=f;break}}void 0!==e&&"[object Object]"===Object.prototype.toString.call(d[b])&&(this.isPlaying=this.settings.spritemap[b],this.context.play&&this.context.play(),this.wasReady=this.setCurrentTime(e))}},stop:function(){this.__lastPosition=0;this.isPlaying=null;this.backgroundMusic?this.backgroundHackForiOS():this.context.pause();return!0},pause:function(){this.isPlaying=null;this.__lastPosition=this.getCurrentTime();this.context.pause();return this.__lastPosition},resume:function(b){b="number"=== +typeof b?b:this.__lastPosition;if(null!==b)return this.play(b),this.__lastPosition=null,!0;this.context.play();return!1},HTML5API:{getVolume:function(){return this.context.volume||1},setVolume:function(b){this.context.volume=b;return 1E-4>Math.abs(this.context.volume-b)?!0:!1},getCurrentTime:function(){return this.context.currentTime||0},setCurrentTime:function(b){try{return this.context.currentTime=b,!0}catch(c){return!1}}},FLASHAPI:{getVolume:function(){return this.context&&"function"===typeof this.context.getVolume? +this.context.getVolume():1},setVolume:function(b){return this.context&&"function"===typeof this.context.setVolume?(this.context.setVolume(b),!0):!1},getCurrentTime:function(){return this.context&&"function"===typeof this.context.getCurrentTime?this.context.getCurrentTime():0},setCurrentTime:function(b){return this.context&&"function"===typeof this.context.setCurrentTime?this.context.setCurrentTime(b):!1}}}; +if(void 0===this.jukebox)throw"jukebox.Manager requires jukebox.Player (Player.js) to run properly."; +jukebox.Manager=function(b){this.features={};this.codecs={};this.__players={};this.__playersLength=0;this.__clones={};this.__queue=[];this.settings={};for(var c in this.defaults)this.settings[c]=this.defaults[c];if("[object Object]"===Object.prototype.toString.call(b))for(var d in b)this.settings[d]=b[d];this.__detectFeatures();jukebox.Manager.__initialized=!1===this.settings.useGameLoop?window.setInterval(function(){jukebox.Manager.loop()},20):!0}; +jukebox.Manager.prototype={defaults:{useFlash:!1,useGameLoop:!1},__detectFeatures:function(){var b=window.Audio&&new Audio;if(b&&b.canPlayType&&!1===this.settings.useFlash){for(var c=[{e:"3gp",m:["audio/3gpp","audio/amr"]},{e:"aac",m:["audio/aac","audio/aacp"]},{e:"amr",m:["audio/amr","audio/3gpp"]},{e:"caf",m:["audio/IMA-ADPCM","audio/x-adpcm",'audio/x-aiff; codecs="IMA-ADPCM, ADPCM"']},{e:"m4a",m:'audio/mp4{audio/mp4; codecs="mp4a.40.2,avc1.42E01E"{audio/mpeg4{audio/mpeg4-generic{audio/mp4a-latm{audio/MP4A-LATM{audio/x-m4a'.split("{")}, +{e:"mp3",m:["audio/mp3","audio/mpeg",'audio/mpeg; codecs="mp3"',"audio/MPA","audio/mpa-robust"]},{e:"mpga",m:["audio/MPA","audio/mpa-robust","audio/mpeg","video/mpeg"]},{e:"mp4",m:["audio/mp4","video/mp4"]},{e:"ogg",m:["application/ogg","audio/ogg",'audio/ogg; codecs="theora, vorbis"',"video/ogg",'video/ogg; codecs="theora, vorbis"']},{e:"wav",m:["audio/wave","audio/wav",'audio/wav; codecs="1"',"audio/x-wav","audio/x-pn-wav"]},{e:"webm",m:["audio/webm",'audio/webm; codecs="vorbis"',"video/webm"]}], +d,e,f=0,j=c.length;fMath.abs(b.volume-0.1337));navigator.userAgent.match(/iPhone|iPod|iPad/i)&&(this.features.channels=1)}this.features.flashaudio= +!!navigator.mimeTypes["application/x-shockwave-flash"]||!!navigator.plugins["Shockwave Flash"]||!1;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10"),this.features.flashaudio=!0}catch(g){}!0===this.settings.useFlash&&(this.features.flashaudio=!0);!0===this.features.flashaudio&&!this.features.html5audio&&(this.codecs.mp3="audio/mp3",this.codecs.mpga="audio/mpeg",this.codecs.mp4="audio/mp4",this.codecs.m4a="audio/mp4",this.codecs["3gp"]="audio/3gpp",this.codecs.amr="audio/amr", +this.features.volume=!0,this.features.channels=1)},__getPlayerById:function(b){return this.__players&&void 0!==this.__players[b]?this.__players[b]:null},__getClone:function(b,c){for(var d in this.__clones){var e=this.__clones[d];if(null===e.isPlaying&&e.origin===b)return e}if("[object Object]"===Object.prototype.toString.call(c)){d={};for(var f in c)d[f]=c[f];d.autoplay=!1;f=new jukebox.Player(d,b);f.isClone=!0;f.wasReady=!1;return this.__clones[f.id]=f}return null},loop:function(){if(0!==this.__playersLength)if(this.__queue.length&& +this.__playersLengthb.isPlaying.end&&(!0===b.isPlaying.loop?b.play(b.isPlaying.start,!0):b.stop()):b.isClone&&null===b.isPlaying?this.remove(b):void 0!==b.backgroundMusic&&null===b.isPlaying&&c>b.backgroundMusic.end&&b.backgroundHackForiOS()},getPlayableResource:function(b){"[object Array]"!==Object.prototype.toString.call(b)&&(b=[b]);for(var c=0,d=b.length;c=b){d._volume=b;if(d._muted)return d; +d.usingWebAudio&&d.masterGain.gain.setValueAtTime(b,c.ctx.currentTime);for(var e=0;eparseInt(j[0].split("/")[1], +10);b._codecs={mp3:!(j||!f&&!d.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!f,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!d.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")|| +d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")};return b}, +_enableMobileAudio:function(){var b=this||c,d=/iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi/i.test(b._navigator&&b._navigator.userAgent),e=!!("ontouchend"in window||b._navigator&&0=e){if("loaded"!==b._state)return b._queue.push({event:"volume",action:function(){b.volume.apply(b,d)}}),b;"undefined"===typeof f&&(b._volume=e);f=b._getSoundIds(f);for(var m=0;mc&&n>=d)clearInterval(b._interval),b._interval=null,b._fadeTo=null,m.volume(d,b._id), +m._emit("fade",b._id)},f)},_stopFade:function(b){var d=this._soundById(b);d&&d._interval&&(this._webAudio&&d._node.gain.cancelScheduledValues(c.ctx.currentTime),clearInterval(d._interval),d._interval=null,this.volume(d._fadeTo,b),d._fadeTo=null,this._emit("fade",b));return this},loop:function(){var b=arguments,c,d;if(0===b.length)return this._loop;if(1===b.length)if("boolean"===typeof b[0])this._loop=c=b[0];else return(b=this._soundById(parseInt(b[0],10)))?b._loop:!1;else 2===b.length&&(c=b[0],d= +parseInt(b[1],10));d=this._getSoundIds(d);for(var e=0;ee&&(d=/safari/.test(c._navigator&&c._navigator.userAgent.toLowerCase()),c._navigator&&c._navigator.standalone&&!d||c._navigator&&!c._navigator.standalone&&!d))c.usingWebAudio=!1;c.usingWebAudio&&(c.masterGain="undefined"===typeof c.ctx.createGain?c.ctx.createGainNode():c.ctx.createGain(),c.masterGain.gain.setValueAtTime(c._muted?0:1,c.ctx.currentTime),c.masterGain.connect(c.ctx.destination));c._setup()};"function"===typeof define&&define.amd&&define([],function(){return{Howler:c, +Howl:d}});"undefined"!==typeof exports&&(exports.Howler=c,exports.Howl=d);"undefined"!==typeof window?(window.HowlerGlobal=b,window.Howler=c,window.Howl=d,window.Sound=e):"undefined"!==typeof global&&(global.HowlerGlobal=b,global.Howler=c,global.Howl=d,global.Sound=e)})(); +(function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(b){if(!this.ctx||!this.ctx.listener)return this;for(var c=this._howls.length-1;0<=c;c--)this._howls[c].stereo(b);return this};HowlerGlobal.prototype.pos=function(b,c,d){if(!this.ctx||!this.ctx.listener)return this;c="number"!==typeof c?this._pos[1]:c;d="number"!==typeof d?this._pos[2]:d;if("number"===typeof b)this._pos=[b,c,d],"undefined"!==typeof this.ctx.listener.positionX? +(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,0.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,0.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,0.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]);else return this._pos;return this};HowlerGlobal.prototype.orientation=function(b,c,d,e,g,t){if(!this.ctx||!this.ctx.listener)return this;var z=this._orientation;c="number"!== +typeof c?z[1]:c;d="number"!==typeof d?z[2]:d;e="number"!==typeof e?z[3]:e;g="number"!==typeof g?z[4]:g;t="number"!==typeof t?z[5]:t;if("number"===typeof b)this._orientation=[b,c,d,e,g,t],"undefined"!==typeof this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(b,Howler.ctx.currentTime,0.1),this.ctx.listener.forwardY.setTargetAtTime(c,Howler.ctx.currentTime,0.1),this.ctx.listener.forwardZ.setTargetAtTime(d,Howler.ctx.currentTime,0.1),this.ctx.listener.upX.setTargetAtTime(b,Howler.ctx.currentTime, +0.1),this.ctx.listener.upY.setTargetAtTime(c,Howler.ctx.currentTime,0.1),this.ctx.listener.upZ.setTargetAtTime(d,Howler.ctx.currentTime,0.1)):this.ctx.listener.setOrientation(b,c,d,e,g,t);else return z;return this};var b=Howl.prototype.init;Howl.prototype.init=function(c){this._orientation=c.orientation||[1,0,0];this._stereo=c.stereo||null;this._pos=c.pos||null;this._pannerAttr={coneInnerAngle:"undefined"!==typeof c.coneInnerAngle?c.coneInnerAngle:360,coneOuterAngle:"undefined"!==typeof c.coneOuterAngle? +c.coneOuterAngle:360,coneOuterGain:"undefined"!==typeof c.coneOuterGain?c.coneOuterGain:0,distanceModel:"undefined"!==typeof c.distanceModel?c.distanceModel:"inverse",maxDistance:"undefined"!==typeof c.maxDistance?c.maxDistance:1E4,panningModel:"undefined"!==typeof c.panningModel?c.panningModel:"HRTF",refDistance:"undefined"!==typeof c.refDistance?c.refDistance:1,rolloffFactor:"undefined"!==typeof c.rolloffFactor?c.rolloffFactor:1};this._onstereo=c.onstereo?[{fn:c.onstereo}]:[];this._onpos=c.onpos? +[{fn:c.onpos}]:[];this._onorientation=c.onorientation?[{fn:c.onorientation}]:[];return b.call(this,c)};Howl.prototype.stereo=function(b,c){var d=this;if(!d._webAudio)return d;if("loaded"!==d._state)return d._queue.push({event:"stereo",action:function(){d.stereo(b,c)}}),d;var m="undefined"===typeof Howler.ctx.createStereoPanner?"spatial":"stereo";if("undefined"===typeof c)if("number"===typeof b)d._stereo=b,d._pos=[b,0,0];else return d._stereo;for(var g=d._getSoundIds(c),t=0;tthis.width||f>this.height)){var m=ig.system.scale,g=Math.floor(e*m),t=Math.floor(f*m),z=j?-1:1,y=n?-1:1;if(j||n)ig.system.context.save(),ig.system.context.scale(z,y);ig.system.context.drawImage(this.data,Math.floor(d*e)%this.width*m,Math.floor(d*e/this.width)*f*m,g,t,ig.system.getDrawPos(b)*z-(j?g:0),ig.system.getDrawPos(c)*y-(n?t:0),g,t);(j|| +n)&&ig.system.context.restore();ig.Image.drawCount++}}});ig.Image.drawCount=0;ig.Image.cache={};ig.Image.reloadCache=function(){for(var b in ig.Image.cache)ig.Image.cache[b].reload()}});ig.baked=!0; +ig.module("impact.font").requires("impact.image").defines(function(){ig.Font=ig.Image.extend({widthMap:[],indices:[],firstChar:32,alpha:1,letterSpacing:1,lineSpacing:0,onload:function(b){this._loadMetrics(this.data);this.parent(b)},widthForString:function(b){if(-1!==b.indexOf("\n")){b=b.split("\n");for(var c=0,d=0;db||b>=this.indices.length)return 0;var e=ig.system.scale,f=this.widthMap[b]*e,j=(this.height-2)*e;ig.system.context.drawImage(this.data,this.indices[b]*e,0,f,j,ig.system.getDrawPos(c),ig.system.getDrawPos(d),f,j);return this.widthMap[b]+this.letterSpacing},_loadMetrics:function(b){this.height=b.height-1;this.widthMap=[];this.indices= +[];for(var c=ig.getImagePixels(b,0,b.height-1,b.width,1),d=0,e=0,f=0;fc.data[j]&&e&&(this.widthMap.push(e),this.indices.push(f-e),d++,e=0)}this.widthMap.push(e);this.indices.push(f-e)}});ig.Font.ALIGN={LEFT:0,RIGHT:1,CENTER:2}});ig.baked=!0; +ig.module("impact.sound").defines(function(){ig.SoundManager=ig.Class.extend({clips:{},volume:1,format:null,init:function(){if(!ig.Sound.enabled||!window.Audio)ig.Sound.enabled=!1;else{for(var b=new Audio,c=0;c=b?(this.stop(),this.currentTrack.volume=this._volume,clearInterval(this._fadeInterval)):this.currentTrack.volume=b},_endedCallback:function(){this._loop?this.play():this.next()}});ig.Sound=ig.Class.extend({path:"",volume:1,currentClip:null,multiChannel:!0,init:function(b,c){this.path=b;this.multiChannel=!1!==c;this.load()},load:function(b){ig.Sound.enabled?ig.ready?ig.soundManager.load(this.path, +this.multiChannel,b):ig.addResource(this):b&&b(this.path,!0)},play:function(){ig.Sound.enabled&&(this.currentClip=ig.soundManager.get(this.path),this.currentClip.volume=ig.soundManager.volume*this.volume,this.currentClip.play())},stop:function(){this.currentClip&&(this.currentClip.pause(),this.currentClip.currentTime=0)}});ig.Sound.FORMAT={MP3:{ext:"mp3",mime:"audio/mpeg"},M4A:{ext:"m4a",mime:"audio/mp4; codecs=mp4a"},OGG:{ext:"ogg",mime:"audio/ogg; codecs=vorbis"},WEBM:{ext:"webm",mime:"audio/webm; codecs=vorbis"}, +CAF:{ext:"caf",mime:"audio/x-caf"}};ig.Sound.use=[ig.Sound.FORMAT.OGG,ig.Sound.FORMAT.MP3];ig.Sound.channels=4;ig.Sound.enabled=!0});ig.baked=!0; +ig.module("impact.loader").requires("impact.image","impact.font","impact.sound").defines(function(){ig.Loader=ig.Class.extend({resources:[],gameClass:null,status:0,done:!1,_unloaded:[],_drawStatus:0,_intervalId:0,_loadCallbackBound:null,init:function(b,c){this.gameClass=b;this.resources=c;this._loadCallbackBound=this._loadCallback.bind(this);for(var d=0;db?this.initMouse():0ig.system.width||c>ig.system.height||(0>b+d||0>c+d)||(1!=this.alpha&&(ig.system.context.globalAlpha=this.alpha),0==this.angle?this.sheet.image.drawTile(b,c,this.tile,this.sheet.width,this.sheet.height,this.flip.x,this.flip.y):(ig.system.context.save(),ig.system.context.translate(ig.system.getDrawPos(b+this.pivot.x),ig.system.getDrawPos(c+this.pivot.y)),ig.system.context.rotate(this.angle), +this.sheet.image.drawTile(-this.pivot.x,-this.pivot.y,this.tile,this.sheet.width,this.sheet.height,this.flip.x,this.flip.y),ig.system.context.restore()),1!=this.alpha&&(ig.system.context.globalAlpha=1))}})});ig.baked=!0; +ig.module("impact.entity").requires("impact.animation","impact.impact").defines(function(){ig.Entity=ig.Class.extend({id:0,settings:{},size:{x:16,y:16},offset:{x:0,y:0},pos:{x:0,y:0},last:{x:0,y:0},vel:{x:0,y:0},accel:{x:0,y:0},friction:{x:0,y:0},maxVel:{x:100,y:100},zIndex:0,gravityFactor:0,standing:!1,bounciness:0,minBounceVelocity:40,anims:{},animSheet:null,currentAnim:null,health:10,type:0,checkAgainst:0,collides:0,_killed:!1,slopeStanding:{min:(44).toRad(),max:(136).toRad()},init:function(b, +c,d){this.id=++ig.Entity._lastId;this.pos.x=this.last.x=b;this.pos.y=this.last.y=c;ig.merge(this,d)},reset:function(b,c,d){var e=this.constructor.prototype;this.pos.x=b;this.pos.y=c;this.last.x=b;this.last.y=c;this.vel.x=e.vel.x;this.vel.y=e.vel.y;this.accel.x=e.accel.x;this.accel.y=e.accel.y;this.health=e.health;this._killed=e._killed;this.standing=e.standing;this.type=e.type;this.checkAgainst=e.checkAgainst;this.collides=e.collides;ig.merge(this,d)},addAnim:function(b,c,d,e){if(!this.animSheet)throw"No animSheet to add the animation "+ +b+" to.";c=new ig.Animation(this.animSheet,c,d,e);this.anims[b]=c;this.currentAnim||(this.currentAnim=c);return c},update:function(){this.last.x=this.pos.x;this.last.y=this.pos.y;this.vel.y+=ig.game.gravity*ig.system.tick*this.gravityFactor;this.vel.x=this.getNewVelocity(this.vel.x,this.accel.x,this.friction.x,this.maxVel.x);this.vel.y=this.getNewVelocity(this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var b=ig.game.collisionMap.trace(this.pos.x,this.pos.y,this.vel.x*ig.system.tick,this.vel.y* +ig.system.tick,this.size.x,this.size.y);this.handleMovementTrace(b);this.currentAnim&&this.currentAnim.update()},getNewVelocity:function(b,c,d,e){return c?(b+c*ig.system.tick).limit(-e,e):d?(c=d*ig.system.tick,0b+c?b+c:0):b.limit(-e,e)},handleMovementTrace:function(b){this.standing=!1;b.collision.y&&(0this.minBounceVelocity?this.vel.y*=-this.bounciness:(0 +this.minBounceVelocity?this.vel.x*-this.bounciness:0);if(b.collision.slope){var c=b.collision.slope;if(0this.slopeStanding.min&&c=this.health&&this.kill()},touches:function(b){return!(this.pos.x>=b.pos.x+b.size.x||this.pos.x+this.size.x<=b.pos.x||this.pos.y>=b.pos.y+b.size.y||this.pos.y+this.size.y<=b.pos.y)},distanceTo:function(b){var c=this.pos.x+this.size.x/2-(b.pos.x+b.size.x/2);b=this.pos.y+this.size.y/2-(b.pos.y+b.size.y/2);return Math.sqrt(c*c+b*b)},angleTo:function(b){return Math.atan2(b.pos.y+ +b.size.y/2-(this.pos.y+this.size.y/2),b.pos.x+b.size.x/2-(this.pos.x+this.size.x/2))},check:function(){},collideWith:function(){},ready:function(){},erase:function(){}});ig.Entity._lastId=0;ig.Entity.COLLIDES={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8};ig.Entity.TYPE={NONE:0,A:1,B:2,BOTH:3};ig.Entity.checkPair=function(b,c){b.checkAgainst&c.type&&b.check(c);c.checkAgainst&b.type&&c.check(b);b.collides&&c.collides&&b.collides+c.collides>ig.Entity.COLLIDES.ACTIVE&&ig.Entity.solveCollision(b,c)};ig.Entity.solveCollision= +function(b,c){var d=null;if(b.collides==ig.Entity.COLLIDES.LITE||c.collides==ig.Entity.COLLIDES.FIXED)d=b;else if(c.collides==ig.Entity.COLLIDES.LITE||b.collides==ig.Entity.COLLIDES.FIXED)d=c;b.last.x+b.size.x>c.last.x&&b.last.xc.last.y&&b.last.yb.minBounceVelocity?b.vel.y*=-b.bounciness:(b.standing=!0,b.vel.y=0)):(d=(b.vel.y-c.vel.y)/2,b.vel.y=-d,c.vel.y=d,f=c.vel.x*ig.system.tick,d=ig.game.collisionMap.trace(b.pos.x,b.pos.y,f,-e/2,b.size.x,b.size.y),b.pos.y=d.pos.y,b=ig.game.collisionMap.trace(c.pos.x,c.pos.y,0,e/2,c.size.x,c.size.y),c.pos.y=b.pos.y)}});ig.baked=!0; +ig.module("impact.map").defines(function(){ig.Map=ig.Class.extend({tilesize:8,width:1,height:1,data:[[]],name:null,init:function(b,c){this.tilesize=b;this.data=c;this.height=c.length;this.width=c[0].length;this.pxWidth=this.width*this.tilesize;this.pxHeight=this.height*this.tilesize},getTile:function(b,c){var d=Math.floor(b/this.tilesize),e=Math.floor(c/this.tilesize);return 0<=d&&dthis.lastSlope&&(this.lastSlope=j|0)},trace:function(b,c,f,j,n,m){var g={collision:{x:!1,y:!1,slope:!1},pos:{x:b,y:c},tile:{x:0,y:0}},t=Math.ceil(Math.max(Math.abs(f),Math.abs(j))/this.tilesize);if(1j?this.tilesize:0,A=Math.max(Math.floor(f/this.tilesize),0),D=Math.min(Math.ceil((f+g)/this.tilesize),this.height);j=Math.floor((b.pos.x+B)/this.tilesize);var x=Math.floor((c+B)/this.tilesize);if(0x||x>=this.width)x=-1;if(0<=j&&jthis.lastSlope||1n?this.tilesize:0;A=Math.max(Math.floor(b.pos.x/this.tilesize),0);I=Math.min(Math.ceil((b.pos.x+m)/this.tilesize),this.width);G=Math.floor((b.pos.y+B)/this.tilesize); +D=Math.floor((f+B)/this.tilesize);if(0D||D>=this.height)D=-1;if(0<=G&&Gthis.lastSlope||1B?g:0)-(z+A[0])*this.tilesize;t=j+m+(0n*-B+m*c)return I;z=Math.sqrt(c*c+B*B);y=B/z;z=-c/z;var D=g*y+t*z,A=y*D,D=z*D;if(A*A+D*D>=n*n+m*m)return I||0.5>c*(t-m)-B*(g-n);b.pos.x=f+n-A;b.pos.y=j+m-D;b.collision.slope={x:c,y:B,nx:y,ny:z};return!0}return!1}});var b=1/3,c=2/3;ig.CollisionMap.defaultTileDef={5:[0,1,1,c,!0],6:[0,c,1,b,!0],7:[0,b,1,0,!0],3:[0,1,1,0.5,!0],4:[0,0.5,1,0,!0],2:[0, +1,1,0,!0],10:[0.5,1,1,0,!0],21:[0,1,0.5,0,!0],32:[c,1,1,0,!0],43:[b,1,c,0,!0],54:[0,1,b,0,!0],27:[0,0,1,b,!0],28:[0,b,1,c,!0],29:[0,c,1,1,!0],25:[0,0,1,0.5,!0],26:[0,0.5,1,1,!0],24:[0,0,1,1,!0],11:[0,0,0.5,1,!0],22:[0.5,0,1,1,!0],33:[0,0,b,1,!0],44:[b,0,c,1,!0],55:[c,0,1,1,!0],16:[1,b,0,0,!0],17:[1,c,0,b,!0],18:[1,1,0,c,!0],14:[1,0.5,0,0,!0],15:[1,1,0,0.5,!0],13:[1,1,0,0,!0],8:[0.5,1,0,0,!0],19:[1,1,0.5,0,!0],30:[b,1,0,0,!0],41:[c,1,b,0,!0],52:[1,1,c,0,!0],38:[1,c,0,1,!0],39:[1,b,0,c,!0],40:[1,0, +0,b,!0],36:[1,0.5,0,1,!0],37:[1,0,0,0.5,!0],35:[1,0,0,1,!0],9:[1,0,0.5,1,!0],20:[0.5,0,0,1,!0],31:[1,0,c,1,!0],42:[c,0,b,1,!0],53:[b,0,0,1,!0],12:[0,0,1,0,!1],23:[1,1,0,1,!1],34:[1,0,1,1,!1],45:[0,1,0,0,!1]};ig.CollisionMap.staticNoCollision={trace:function(b,c,f,j){return{collision:{x:!1,y:!1,slope:!1},pos:{x:b+f,y:c+j},tile:{x:0,y:0}}}}});ig.baked=!0; +ig.module("impact.background-map").requires("impact.map","impact.image").defines(function(){ig.BackgroundMap=ig.Map.extend({tiles:null,scroll:{x:0,y:0},distance:1,repeat:!1,tilesetName:"",foreground:!1,enabled:!0,preRender:!1,preRenderedChunks:null,chunkSize:512,debugChunks:!1,anims:{},init:function(b,c,d){this.parent(b,c);this.setTileset(d)},setTileset:function(b){this.tilesetName=b instanceof ig.Image?b.path:b;this.tiles=new ig.Image(this.tilesetName);this.preRenderedChunks=null},setScreenPos:function(b, +c){this.scroll.x=b/this.distance;this.scroll.y=c/this.distance},preRenderMapToChunks:function(){var b=this.width*this.tilesize*ig.system.scale,c=this.height*this.tilesize*ig.system.scale;this.chunkSize=Math.min(Math.max(b,c),this.chunkSize);var d=Math.ceil(b/this.chunkSize),e=Math.ceil(c/this.chunkSize);this.preRenderedChunks=[];for(var f=0;f=this.height||0>t){if(!this.repeat)continue;t=(t%this.height+this.height)%this.height}for(var z=-1,y=n;y=this.width||0>b){if(!this.repeat)continue;b=(b%this.width+this.width)%this.width}if(b=this.data[t][b])(c=this.anims[b- +1])?c.draw(y,j):this.tiles.drawTile(y,j,b-1,this.tilesize)}}}})});ig.baked=!0; +ig.module("impact.game").requires("impact.impact","impact.entity","impact.collision-map","impact.background-map").defines(function(){ig.Game=ig.Class.extend({clearColor:"#000000",gravity:0,screen:{x:0,y:0},_rscreen:{x:0,y:0},entities:[],namedEntities:{},collisionMap:ig.CollisionMap.staticNoCollision,backgroundMaps:[],backgroundAnims:{},autoSort:!1,sortBy:null,cellSize:64,_deferredKill:[],_levelToLoad:null,_doSortEntities:!1,staticInstantiate:function(){this.sortBy=this.sortBy||ig.Game.SORT.Z_INDEX; +ig.game=this;return null},loadLevel:function(b){this.screen={x:0,y:0};this.entities=[];this.namedEntities={};for(var c=0;ce&&window.focus(),("touchstart"==c.type||"mousedown"==c.type)&&this.mousemove(c),e=this.bindings[e])this.actions[e]=!0,this.locks[e]||(this.presses[e]= +!0,this.locks[e]=!0),c.stopPropagation(),c.preventDefault()}})});ig.baked=!0; +ig.module("plugins.handlers.dom-handler").defines(function(){ig.DomHandler=ig.Class.extend({JQUERYAVAILABLE:!1,init:function(){this.JQUERYAVAILABLE=this._jqueryAvailable()},_jqueryAvailable:function(){return"undefined"!==typeof jQuery},addEvent:function(b,c,d,e){if(this.JQUERYAVAILABLE)b.on(c,d);else b.addEventListener(c,d,e)},create:function(b){return this.JQUERYAVAILABLE?$("<"+b+">"):ig.$new(b)},getElementByClass:function(b){return this.JQUERYAVAILABLE?$("."+b):document.getElementsByClassName(b)}, +getElementById:function(b){return this.JQUERYAVAILABLE?0<$(b).length?$(b):null:ig.$(b)},appendChild:function(b,c){this.JQUERYAVAILABLE?b.append(c):b.appendChild(c)},appendToBody:function(b){this.JQUERYAVAILABLE?$("body").append(b):document.body.appendChild(b)},resize:function(b,c,d){if(this.JQUERYAVAILABLE)b.width(c.toFixed(2)),b.height(d.toFixed(2));else{var e=b.style.visibility;c="width:"+c.toFixed(2)+"px; height:"+d.toFixed(2)+"px;";this.attr(b,"style",c);b.style.visibility=e}},resizeOffsetLeft:function(b, +c,d,e){if(this.JQUERYAVAILABLE)b.width(c.toFixed(2)),b.height(d.toFixed(2)),b.css("left",e);else{var f=b.style.visibility;c="width:"+c.toFixed(2)+"px; height:"+d.toFixed(2)+"px; left: "+e.toFixed(2)+"px;";this.attr(b,"style",c);b.style.visibility=f}},resizeOffset:function(b,c,d,e,f){if(this.JQUERYAVAILABLE)b.width(c.toFixed(2)),b.height(d.toFixed(2)),b.css("left",e),b.css("top",f);else{var j=b.style.visibility;c="width:"+c.toFixed(2)+"px; height:"+d.toFixed(2)+"px; left: "+e.toFixed(2)+"px; top: "+ +f.toFixed(2)+"px;";this.attr(b,"style",c);b.style.visibility=j}},css:function(b,c){if(this.JQUERYAVAILABLE)b.css(c);else{var d="",e;for(e in c)d+=e+":"+c[e]+";";this.attr(b,"style",d)}},getOffsets:function(b){return this.JQUERYAVAILABLE?(b=b.offset(),{left:b.left,top:b.top}):{left:b.offsetLeft,top:b.offsetTop}},attr:function(b,c,d){if("undefined"===typeof d)return this.JQUERYAVAILABLE?b.attr(c):b.getAttribute(c);this.JQUERYAVAILABLE?b.attr(c,d):b.setAttribute(c,d)},show:function(b){this.JQUERYAVAILABLE? +(b.show(),b.css("visibility","visible")):b&&(b.style?b.style.visibility="visible":b[0]&&(b[0].style.visibility="visible"))},hide:function(b){this.JQUERYAVAILABLE?(b.hide(),b.css("visibility","hidden")):b&&(b.style?b.style.visibility="hidden":b[0]&&(b[0].style.visibility="hidden"))},getQueryVariable:function(b){for(var c=window.location.search.substring(1).split("&"),d=0;dthis.maxScalingOnMobile&&(c=this.maxScalingOnMobile),cthis.maxScalingOnDesktop&&(c=this.maxScalingOnDesktop),cd&&(d=0);0>e&&(e=0);ig.domHandler.resizeOffset(c,Math.floor(ig.sizeHandler.mobile.actualSize.x),Math.floor(ig.sizeHandler.mobile.actualSize.y),d,e);var f=!1;if(this.portraitMode?window.innerHeightwindow.innerWidth)if(this.enableStretchToFitOnAntiPortraitModeFlag)ig.domHandler.resizeOffset(c,Math.floor(window.innerWidth), +Math.floor(window.innerHeight),0,0);else{var f=new Vector2(window.innerWidth/this.mobile.actualResolution.y,window.innerHeight/this.mobile.actualResolution.x),d=Math.min(f.x,f.y),f=this.mobile.actualResolution.y*d,j=this.mobile.actualResolution.x*d,d=Math.floor(ig.sizeHandler.windowSize.x/2-f/2),e=Math.floor(ig.sizeHandler.windowSize.y/2-j/2);0>d&&(d=0);0>e&&(e=0);ig.domHandler.resizeOffset(c,Math.floor(f),Math.floor(j),d,e)}}else ig.domHandler.resize(c,Math.floor(ig.sizeHandler.mobile.actualSize.x), +Math.floor(ig.sizeHandler.mobile.actualSize.y));else this.enableStretchToFitOnDesktopFlag?ig.domHandler.resize(c,Math.floor(ig.sizeHandler.desktop.actualSize.x),Math.floor(ig.sizeHandler.desktop.actualSize.y)):(d=Math.floor(ig.sizeHandler.windowSize.x/2-ig.sizeHandler.desktop.actualSize.x/2),e=Math.floor(ig.sizeHandler.windowSize.y/2-ig.sizeHandler.desktop.actualSize.y/2),0>d&&(d=0),0>e&&(e=0),ig.domHandler.resizeOffset(c,Math.floor(ig.sizeHandler.desktop.actualSize.x),Math.floor(ig.sizeHandler.desktop.actualSize.y), +d,e))}for(var n in this.adsToResize)b=ig.domHandler.getElementById("#"+n),c=ig.domHandler.getElementById("#"+n+"-Box"),f=(window.innerWidth-this.adsToResize[n]["box-width"])/2+"px",d=(window.innerHeight-this.adsToResize[n]["box-height"])/2+"px",b&&ig.domHandler.css(b,{width:window.innerWidth,height:window.innerHeight}),c&&ig.domHandler.css(c,{left:f,top:d});for(n in this.dynamicClickableEntityDivs){b=Math.min(ig.sizeHandler.scaleRatioMultiplier.x,ig.sizeHandler.scaleRatioMultiplier.y);c=ig.domHandler.getElementById("#"+ +n);if(ig.ua.mobile)var m=this.dynamicClickableEntityDivs[n].entity_pos_x,j=this.dynamicClickableEntityDivs[n].entity_pos_y,d=this.dynamicClickableEntityDivs[n].width,f=this.dynamicClickableEntityDivs[n].height,e=Math.floor(m*this.scaleRatioMultiplier.x)+"px",j=Math.floor(j*this.scaleRatioMultiplier.y)+"px",d=Math.floor(d*this.scaleRatioMultiplier.x)+"px",f=Math.floor(f*this.scaleRatioMultiplier.y)+"px";else var f=ig.domHandler.getElementById("#canvas"),f=ig.domHandler.getOffsets(f),e=f.left,g=f.top, +m=this.dynamicClickableEntityDivs[n].entity_pos_x,j=this.dynamicClickableEntityDivs[n].entity_pos_y,d=this.dynamicClickableEntityDivs[n].width,f=this.dynamicClickableEntityDivs[n].height,e=Math.floor(e+m*b)+"px",j=Math.floor(g+j*b)+"px",d=Math.floor(d*b)+"px",f=Math.floor(f*b)+"px";ig.domHandler.css(c,{"float":"left",position:"absolute",left:e,top:j,width:d,height:f,"z-index":3});this.dynamicClickableEntityDivs[n]["font-size"]&&ig.domHandler.css(c,{"font-size":this.dynamicClickableEntityDivs[n]["font-size"]* +b+"px"})}$("#ajaxbar").width(this.windowSize.x);$("#ajaxbar").height(this.windowSize.y)},resize:function(){this.sizeCalcs();this.resizeLayers()},reorient:function(){console.log("changing orientation ...");if(ig.ua.mobile){var b=!1,b=this.portraitMode?window.innerHeightwindow.innerWidth,c=this.domHandler.getElementById("#orientate"),d=this.domHandler.getElementById("#game");b?(this.domHandler.show(c),this.domHandler.hide(d),console.log("portrait"+window.innerWidth+ +","+window.innerHeight)):(this.domHandler.show(d),this.domHandler.hide(c),console.log("landscape"+window.innerWidth+","+window.innerHeight))}ig.ua.mobile?(this.resize(),this.resizeAds()):this.resize()},resizeAds:function(){for(var b in this.adsToResize){var c=ig.domHandler.getElementById("#"+b),d=ig.domHandler.getElementById("#"+b+"-Box"),e=(window.innerWidth-this.adsToResize[b]["box-width"])/2+"px",f=(window.innerHeight-this.adsToResize[b]["box-height"])/2+"px";c&&ig.domHandler.css(c,{width:window.innerWidth, +height:window.innerHeight});d&&ig.domHandler.css(d,{left:e,top:f})}},samsungFix:function(){ig.ua.android&&!(4.2>parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("Android")+8,navigator.userAgent.indexOf("Android")+11)))&&(!(0>navigator.userAgent.indexOf("GT"))&&!(0b?0:isNaN(b)?1:1b?0:isNaN(b)?1:1b){this.soundList[c].volume(0);break}isNaN(b)?this.soundList[c].volume(1):1b){this.soundList[c].volume(0);break}isNaN(b)?this.soundList[c].volume(1):1=b?this.jukeboxPlayer.setVolume(this.minVolume):isNaN(b)?this.jukeboxPlayer.setVolume(1): +1=d.indexOf("chrome")&&(j=c),d.indexOf("win64")&&(j=c));var n=new XMLHttpRequest;n.open("GET",j,!0);n.responseType="arraybuffer";n.onload=function(){this.webaudio.context.decodeAudioData(n.response, +function(b){this.webaudio.buffer=b;this.webaudio.source_loop={};this.bgmPlaying?this.play(null,!0):this.stop()}.bind(this),function(){console.log('Error decoding audio "'+j+'".')})}.bind(this);n.send();if(4==n.readyState&&"undefined"!==typeof Audio){this.useHTML5Audio=!0;try{new Audio}catch(m){this.useHTML5Audio=!1}this.useHTML5Audio&&(console.log("Using HTML5 Audio"),this.webaudio=null,this.audio=new Audio,this.isSupported=!0,this.initHTML5Audio(b))}break}},initIOSWebAudioUnlock:function(){if(this.webaudio){webaudio= +this.webaudio;var b=function(){var c=webaudio.context,d=c.createBuffer(1,1,22050),e=c.createBufferSource();e.buffer=d;e.connect(c.destination);"undefined"===typeof e.start?e.noteOn(0):e.start(0);setTimeout(function(){(e.playbackState===e.PLAYING_STATE||e.playbackState===e.FINISHED_STATE)&&window.removeEventListener("touchend",b,!1)}.bind(this),0)};window.addEventListener("touchend",b,!1)}},initHTML5Audio:function(b){if(this.useHTML5Audio&&this.audio){var c=this.audio;this.codecs={};this.codecs={mp3:!!c.canPlayType("audio/mpeg;").replace(/^no$/, +""),opus:!!c.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!c.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!c.canPlayType("audio/aac;").replace(/^no$/,""),m4a:!!(c.canPlayType("audio/x-m4a;")||c.canPlayType("audio/m4a;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(c.canPlayType("audio/x-mp4;")||c.canPlayType("audio/mp4;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!c.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, +"")};this.is={ff:Boolean(null!=window.mozInnerScreenX&&/firefox/.test(navigator.userAgent.toLowerCase())),ie:Boolean(document.all&&!window.opera),opera:Boolean(window.opera),chrome:Boolean(window.chrome),safari:Boolean(!window.chrome&&/safari/.test(navigator.userAgent.toLowerCase())&&window.getComputedStyle&&!window.globalStorage&&!window.opera)};this.playDelay=-60;this.stopDelay=30;this.is.chrome&&(this.playDelay=-25);this.is.chrome&&(this.stopDelay=25);this.is.ff&&(this.playDelay=-25);this.is.ff&& +(this.stopDelay=85);this.is.opera&&(this.playDelay=5);this.is.opera&&(this.stopDelay=0);for(var d in b){this.soundList[d]=d;var e=b[d].path,c=e+"."+ig.Sound.FORMAT.OGG.ext,e=e+"."+ig.Sound.FORMAT.MP3.ext,f=null;this.codecs[ig.Sound.FORMAT.OGG.ext.toLowerCase()]?f=c:this.codecs[ig.Sound.FORMAT.MP3.ext.toLowerCase()]&&(f=e);if(f){ig.ua.mobile?ig.ua.iOS&&(f=e):(b=navigator.userAgent.toLowerCase(),-1!=b.indexOf("safari")&&-1>=b.indexOf("chrome")&&(f=e));this.audio.addEventListener("error",function(){this.audio.error&& +4===this.audio.error.code&&(this.isSupported=!1)},!1);this.audio.src=f;this.audio._pos=0;this.audio.preload="auto";this.audio.volume=this._volume;this.inactiveAudio=new Audio;this.inactiveAudio.src=f;this.inactiveAudio._pos=0;this.inactiveAudio.preload="auto";this.inactiveAudio.volume=this._volume;this.inactiveAudio.load();var j=function(){this._duration=this.audio.duration;this._loaded||(this._loaded=!0);this.bgmPlaying?this.play(null,!0):this.stop();this.audio.removeEventListener("canplaythrough", +j,!1)}.bind(this);this.audio.addEventListener("canplaythrough",j,!1);this.audio.load();break}}}},play:function(b,c){if(this.isSupported)if(this.bgmPlaying=!0,this.webaudio){if(!c&&this.reinitOnPlay&&this.webaudio.source_loop.buffer==this.webaudio.buffer){if(this.webaudio.source_loop._playing&&(this.webaudio.source_loop[this.webaudio.compatibility.stop](0),this.webaudio.source_loop._playing=!1,this.pausedTime+=this.webaudio.context.currentTime-this.webaudio.source_loop._startTime,this.pausedTime%= +this.webaudio.source_loop.buffer.duration,this.webaudio.source_loop._startTime=0,"noteOn"===this.webaudio.compatibility.start))this.webaudio.source_once[this.webaudio.compatibility.stop](0);try{this.webaudio.context.close();this.webaudio.context=new this.AudioContext;this.webaudio.gainNode=this.webaudio.context.createGain();this.webaudio.gainNode.connect(this.webaudio.context.destination);this.webaudio.gainNode.gain.value=this._volume;var d="start",e="stop",f=this.webaudio.context.createBufferSource(); +"function"!==typeof f.start&&(d="noteOn");this.webaudio.compatibility.start=d;"function"!==typeof f.stop&&(e="noteOff");this.webaudio.compatibility.stop=e;this.webaudio.source_loop={};this.play(null,!0)}catch(j){}}if(this.webaudio.buffer){if(!this.muteFlag&&(this.bgmPlaying=!0,!this.webaudio.source_loop._playing)){this.webaudio.source_loop=this.webaudio.context.createBufferSource();this.webaudio.source_loop.buffer=this.webaudio.buffer;this.webaudio.source_loop.loop=!0;this.webaudio.source_loop.connect(this.webaudio.gainNode); +if(null==b||isNaN(b))b=0,this.pausedTime&&(b=this.pausedTime);this.webaudio.source_loop._startTime=this.webaudio.context.currentTime;if("noteOn"===this.webaudio.compatibility.start)this.webaudio.source_once=this.webaudio.context.createBufferSource(),this.webaudio.source_once.buffer=this.webaudio.buffer,this.webaudio.source_once.connect(this.webaudio.gainNode),this.webaudio.source_once.noteGrainOn(0,b,this.webaudio.buffer.duration-b),this.webaudio.source_loop[this.webaudio.compatibility.start](this.webaudio.context.currentTime+ +(this.webaudio.buffer.duration-b));else this.webaudio.source_loop[this.webaudio.compatibility.start](0,b);this.webaudio.source_loop._playing=!0}}else this.bgmPlaying=!0}else if(this.audio){var n=this.audio;if(!this.muteFlag)if(this.bgmPlaying=!0,isNaN(b)&&(b=0,this.pausedTime&&(b=this.pausedTime)),d=this._duration-b,this._onEndTimer&&(clearTimeout(this._onEndTimer),this._onEndTimer=null),this._onEndTimer=setTimeout(function(){this.audio.currentTime=0;this.audio.pause();this.pausedTime=0;if(this.inactiveAudio){var b= +this.audio;this.audio=this.inactiveAudio;this.inactiveAudio=b}this.play()}.bind(this),1E3*d+this.playDelay),4===n.readyState||!n.readyState&&navigator.isCocoonJS)n.readyState=4,n.currentTime=b,n.muted=this.muteFlag||n.muted,n.volume=this._volume,setTimeout(function(){n.play()},0);else{clearTimeout(this._onEndTimer);this._onEndTimer=null;var m=function(){typeof("function"==this.play)&&(this.play(),n.removeEventListener("canplaythrough",m,!1))}.bind(this);n.addEventListener("canplaythrough",m,!1)}}}, +stop:function(){this.bgmPlaying=!1;if(this.isSupported)if(this.webaudio){if(this.webaudio.source_loop._playing&&(this.webaudio.source_loop[this.webaudio.compatibility.stop](0),this.webaudio.source_loop._playing=!1,this.pausedTime+=this.webaudio.context.currentTime-this.webaudio.source_loop._startTime,this.pausedTime%=this.webaudio.source_loop.buffer.duration,this.webaudio.source_loop._startTime=0,"noteOn"===this.webaudio.compatibility.start))this.webaudio.source_once[this.webaudio.compatibility.stop](0)}else if(this.audio){var b= +this.audio;4==b.readyState&&(this.pausedTime=b.currentTime,b.currentTime=0,b.pause(),clearTimeout(this._onEndTimer),this._onEndTimer=null)}},volume:function(b){if(isNaN(b)||null==b)return this.getVolume();this.isSupported&&(this._volume=b,0>this._volume?this._volume=0:1=b&&(b=c.settings.spritemap.music.start,ig.ua.android?this.forcelooped||(c.play(b,!0),this.forcelooped=!0,setTimeout(function(){ig.soundHandler.forcelooped=!1},d)):c.setCurrentTime(b)))}else"ImpactMusicPlayer"==this.bgmPlayer.tagName&&(null!=window.mozInnerScreenX&&/firefox/.test(navigator.userAgent.toLowerCase()),b=Boolean(window.chrome),!window.chrome&&/safari/.test(navigator.userAgent.toLowerCase()),d=0.1,ig.ua.mobile&&(d=0.115,ig.ua.android&&(d=0.45,b&&(d=0.3))),c=0,"mp3"== +ig.soundManager.format.ext&&(c=0.05),ig.music.currentTrack&&(b=ig.music.currentTrack.duration-d,ig.music.currentTrack.currentTime>=b&&(ig.ua.android?this.forcelooped||(ig.music.currentTrack.pause(),ig.music.currentTrack.currentTime=c,ig.music.currentTrack.play(),this.forcelooped=!0,setTimeout(function(){ig.soundHandler.forcelooped=!1},d)):ig.music.currentTrack.currentTime=c)))}}})});ig.baked=!0; +ig.module("plugins.io.storage").defines(function(){ig.Storage=ig.Class.extend({staticInstantiate:function(){return!ig.Storage.instance?null:ig.Storage.instance},init:function(){ig.Storage.instance=this},isCapable:function(){return"undefined"!==typeof window.localStorage},isSet:function(b){return null!==this.get(b)},initUnset:function(b,c){null===this.get(b)&&this.set(b,c)},get:function(b){if(!this.isCapable())return null;try{return JSON.parse(localStorage.getItem(b))}catch(c){return window.localStorage.getItem(b)}}, +getInt:function(b){return~~this.get(b)},getFloat:function(b){return parseFloat(this.get(b))},getBool:function(b){return!!this.get(b)},key:function(b){return this.isCapable()?window.localStorage.key(b):null},set:function(b,c){if(!this.isCapable())return null;try{window.localStorage.setItem(b,JSON.stringify(c))}catch(d){console.log(d)}},setHighest:function(b,c){c>this.getFloat(b)&&this.set(b,c)},remove:function(b){if(!this.isCapable())return null;window.localStorage.removeItem(b)},clear:function(){if(!this.isCapable())return null; +window.localStorage.clear()}})});ig.baked=!0; +ig.module("plugins.io.mouse").defines(function(){Mouse=ig.Class.extend({bindings:{click:[ig.KEY.MOUSE1]},init:function(){ig.input.initMouse();for(var b in this.bindings){this[b]=b;for(var c=0;cd?d:b},pollGamepads:function(){if(this.isSupported){this.leftStick.x=0;this.leftStick.y=0;this.rightStick.x=0;this.rightStick.y=0;this.list=navigator.getGamepads();for(var b in this.bindings){for(var c= +!1,d=0;d=b-40&&this.touches[c].x<=b+40&&this.touches.splice(c,1)}}},windowKeyDown:function(b){var c=parseInt(ig.system.canvas.offsetWidth)||ig.system.realWidth,d=parseInt(ig.system.canvas.offsetHeight)||ig.system.realHeight,c=ig.system.scale*(c/ig.system.realWidth),d=ig.system.scale*(d/ig.system.realHeight);if(window.navigator.msPointerEnabled){var e={left:0,top:0};ig.system.canvas.getBoundingClientRect&&(e=ig.system.canvas.getBoundingClientRect()); +b=b.changedTouches?b.changedTouches:[b];for(var f=0;fthis.getFloat(b)&&this.set(b,c)},get:function(b){return"undefined"==typeof this.tempData[b]?null:JSON.parse(this.tempData[b])},getInt:function(b){return~~this.get(b)},getFloat:function(b){return parseFloat(this.get(b))}, +getBool:function(b){return!!this.get(b)},isSet:function(b){return null!==this.get(b)},remove:function(b){delete this.tempData[b]},clear:function(){this.tempData={}}})});ig.baked=!0; +ig.module("plugins.io.io-manager").requires("plugins.io.storage","plugins.io.mouse","plugins.io.keyboard","plugins.io.gamepad","plugins.io.multitouch","plugins.io.multitouch-input","plugins.io.gamepad-input","plugins.io.fake-storage").defines(function(){IoManager=ig.Class.extend({storage:null,localStorageSupport:!1,mouse:null,keyboard:null,multitouch:null,gamepad:null,init:function(){ig.multitouchInput=new ig.MultitouchInput;ig.gamepadInput=new ig.GamepadInput;this.unbindAll();this.initStorage(); +this.initMouse();this.initKeyboard()},unbindAll:function(){ig.input.unbindAll();ig.gamepadInput.unbindAll()},initStorage:function(){try{window.localStorage.setItem("test","test"),this.storage=new ig.Storage}catch(b){console.log("using fake storage"),this.storage=new ig.FakeStorage}finally{window.localStorage.removeItem("test")}},initMouse:function(){this.mouse=new Mouse},initKeyboard:function(){this.keyboard=new Keyboard},initMultitouch:function(){this.multitouch=new Multitouch},initGamepad:function(){this.gamepad= +new Gamepad},press:function(b){return ig.input.pressed(b)||this.gamepad&&this.gamepad.press(b)?!0:!1},held:function(b){return ig.input.state(b)||this.gamepad&&this.gamepad.state(b)?!0:!1},release:function(b){return ig.input.released(b)||this.gamepad&&this.gamepad.released(b)?!0:!1},getClickPos:function(){return this.mouse.getPos()},getTouchesPos:function(){return this.multitouch.getTouchesPos()},checkOverlap:function(b,c,d,e,f){return b.x>c+e||b.xd+f||b.ythis._drawStatus)){ig.system.context.fillStyle="#000";ig.system.context.fillRect(0,0,ig.system.width,ig.system.height);var b,c,d;b=this.loadingbar0.width;w2=this.loadingbar1.width;c=this.loadingbar0.height;h2=this.loadingbar1.height;d=0.5*ig.system.width-b/2;b=(b-w2)/2;c=(c-h2)/2;this.splash.draw(0,0);this.loadingbar0.draw(d, +380);0.96<=this._drawStatus&&(this._drawStatus=1);ig.system.context.drawImage(this.loadingbar1.data,0,0,w2*this._drawStatus,h2,d+b,380+c,w2*this._drawStatus,h2);ig.system.context.fillStyle="#FFFFFF";ig.system.context.textAlign="center";ig.system.context.font="22pt mainfont";ig.system.context.fillText(_STRINGS.Splash.Loading,ig.system.width/2,450)}},tapToStartDiv:function(b){this.desktopCoverDIV=document.createElement("div");this.desktopCoverDIV.id=this.desktopCoverDIVID;this.desktopCoverDIV.setAttribute("class", +"play");this.desktopCoverDIV.setAttribute("style","position: absolute; display: block; z-index: 999999; background-color: rgba(23, 32, 53, 0.7); visibility: visible; font-size: 10vmin; text-align: center; vertical-align: middle; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;");this.desktopCoverDIV.innerHTML="
"+ +_STRINGS.Splash.TapToStart+"
";(document.getElementById("play").parentNode||document.getElementById("ajaxbar")).appendChild(this.desktopCoverDIV);try{"undefined"!==typeof ig.sizeHandler?"undefined"!==typeof ig.sizeHandler.coreDivsToResize&&(ig.sizeHandler.coreDivsToResize.push("#"+this.desktopCoverDIVID),"function"===typeof ig.sizeHandler.reorient&&ig.sizeHandler.reorient()):"undefined"!==typeof coreDivsToResize&&(coreDivsToResize.push(this.desktopCoverDIVID),"function"===typeof sizeHandler&& +sizeHandler())}catch(c){console.log(c)}this.desktopCoverDIV.addEventListener("click",function(){try{"undefined"!==typeof ig.soundHandler?("undefined"!==typeof ig.soundHandler.bgmPlayer?"undefined"!==typeof ig.soundHandler.bgmPlayer.webaudio&&"undefined"!==typeof ig.soundHandler.bgmPlayer.webaudio.context&&ig.soundHandler.bgmPlayer.webaudio.context.resume():(ig.soundHandler=null,ig.soundHandler="undefined"!==typeof ig.soundList?new ig.SoundHandler(ig.soundList):new ig.SoundHandler),"undefined"!==typeof ig.soundHandler.sfxPlayer? +"function"===typeof ig.soundHandler.sfxPlayer.play&&ig.soundHandler.sfxPlayer.play("staticSound"):"undefined"!==typeof ig.soundHandler.staticSound?"function"===typeof ig.soundHandler.staticSound.play&&ig.soundHandler.staticSound.play():"function"===typeof ig.soundHandler.playSound&&ig.soundHandler.playSound("staticSound")):"undefined"!==typeof Howl?(ig.global.staticSound=new Howl({src:["media/audio/play/static.ogg","media/audio/play/static.mp3"]}),ig.global.staticSound.play()):"undefined"!==typeof createjs&& +"undefined"!==typeof createjs.Sound&&"function"===typeof createjs.Sound.play&&createjs.Sound.play("opening")}catch(c){console.log(c)}this.setAttribute("style","visibility: hidden;");"function"===typeof b&&b();ig.system.setGame(MyGame)})}})});ig.baked=!0; +ig.module("plugins.tween").requires("impact.entity").defines(function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(b){for(var c=0;c(b*=2)?0.5*b*b:-0.5*(--b*(b-2)-1)};ig.Tween.Easing.Cubic.EaseIn=function(b){return b*b*b};ig.Tween.Easing.Cubic.EaseOut=function(b){return--b*b*b+1};ig.Tween.Easing.Cubic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b:0.5*((b-=2)*b*b+2)};ig.Tween.Easing.Quartic.EaseIn=function(b){return b*b*b*b};ig.Tween.Easing.Quartic.EaseOut=function(b){return-(--b*b*b*b-1)};ig.Tween.Easing.Quartic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b*b:-0.5*((b-=2)*b*b*b-2)};ig.Tween.Easing.Quintic.EaseIn= +function(b){return b*b*b*b*b};ig.Tween.Easing.Quintic.EaseOut=function(b){return(b-=1)*b*b*b*b+1};ig.Tween.Easing.Quintic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b*b*b:0.5*((b-=2)*b*b*b*b+2)};ig.Tween.Easing.Sinusoidal.EaseIn=function(b){return-Math.cos(b*Math.PI/2)+1};ig.Tween.Easing.Sinusoidal.EaseOut=function(b){return Math.sin(b*Math.PI/2)};ig.Tween.Easing.Sinusoidal.EaseInOut=function(b){return-0.5*(Math.cos(Math.PI*b)-1)};ig.Tween.Easing.Exponential.EaseIn=function(b){return 0==b?0:Math.pow(2, +10*(b-1))};ig.Tween.Easing.Exponential.EaseOut=function(b){return 1==b?1:-Math.pow(2,-10*b)+1};ig.Tween.Easing.Exponential.EaseInOut=function(b){return 0==b?0:1==b?1:1>(b*=2)?0.5*Math.pow(2,10*(b-1)):0.5*(-Math.pow(2,-10*(b-1))+2)};ig.Tween.Easing.Circular.EaseIn=function(b){return-(Math.sqrt(1-b*b)-1)};ig.Tween.Easing.Circular.EaseOut=function(b){return Math.sqrt(1- --b*b)};ig.Tween.Easing.Circular.EaseInOut=function(b){return 1>(b/=0.5)?-0.5*(Math.sqrt(1-b*b)-1):0.5*(Math.sqrt(1-(b-=2)*b)+1)};ig.Tween.Easing.Elastic.EaseIn= +function(b){var c,d=0.1,e=0.4;if(0==b)return 0;if(1==b)return 1;e||(e=0.3);!d||1>d?(d=1,c=e/4):c=e/(2*Math.PI)*Math.asin(1/d);return-(d*Math.pow(2,10*(b-=1))*Math.sin(2*(b-c)*Math.PI/e))};ig.Tween.Easing.Elastic.EaseOut=function(b){var c,d=0.1,e=0.4;if(0==b)return 0;if(1==b)return 1;e||(e=0.3);!d||1>d?(d=1,c=e/4):c=e/(2*Math.PI)*Math.asin(1/d);return d*Math.pow(2,-10*b)*Math.sin(2*(b-c)*Math.PI/e)+1};ig.Tween.Easing.Elastic.EaseInOut=function(b){var c,d=0.1,e=0.4;if(0==b)return 0;if(1==b)return 1; +e||(e=0.3);!d||1>d?(d=1,c=e/4):c=e/(2*Math.PI)*Math.asin(1/d);return 1>(b*=2)?-0.5*d*Math.pow(2,10*(b-=1))*Math.sin(2*(b-c)*Math.PI/e):0.5*d*Math.pow(2,-10*(b-=1))*Math.sin(2*(b-c)*Math.PI/e)+1};ig.Tween.Easing.Back.EaseIn=function(b){return b*b*(2.70158*b-1.70158)};ig.Tween.Easing.Back.EaseOut=function(b){return(b-=1)*b*(2.70158*b+1.70158)+1};ig.Tween.Easing.Back.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*(3.5949095*b-2.5949095):0.5*((b-=2)*b*(3.5949095*b+2.5949095)+2)};ig.Tween.Easing.Bounce.EaseIn= +function(b){return 1-ig.Tween.Easing.Bounce.EaseOut(1-b)};ig.Tween.Easing.Bounce.EaseOut=function(b){return(b/=1)<1/2.75?7.5625*b*b:b<2/2.75?7.5625*(b-=1.5/2.75)*b+0.75:b<2.5/2.75?7.5625*(b-=2.25/2.75)*b+0.9375:7.5625*(b-=2.625/2.75)*b+0.984375};ig.Tween.Easing.Bounce.EaseInOut=function(b){return 0.5>b?0.5*ig.Tween.Easing.Bounce.EaseIn(2*b):0.5*ig.Tween.Easing.Bounce.EaseOut(2*b-1)+0.5};ig.Tween.Interpolation={Linear:function(b,c){var d=b.length-1,e=d*c,f=Math.floor(e),j=TWEEN.Interpolation.Utils.Linear; +return 0>c?j(b[0],b[1],e):1d?d:f+1],e-f)}}});ig.baked=!0; +ig.module("plugins.patches.entity-patch").requires("impact.entity").defines(function(){ig.Entity.inject({handleMovementTrace:function(b){this.standing=!1;b.collision.y&&(0this.minBounceVelocity?this.vel.y*=-this.bounciness:(0this.minBounceVelocity?this.vel.x*-this.bounciness:0);if(b.collision.slope){var c=b.collision.slope;if(0this.slopeStanding.min&&cd?n(b[0],b[1],f): +1e?e:j+1],f-j)},Bezier:function(b,d){for(var e=0,f=b.length-1,j=Math.pow,n=ig.Tween.Interpolation.Utils.Bernstein,m=0;m<=f;m++)e+=j(1-d,f-m)*j(d,m)*b[m]*n(f,m);return e},CatmullRom:function(b,d){var e=b.length-1,f=e*d,j=Math.floor(f),n=ig.Tween.Interpolation.Utils.CatmullRom;return b[0]===b[e]?(0>d&&(j=Math.floor(f=e*(1+d))),n(b[(j-1+e)%e],b[j],b[(j+1)%e],b[(j+2)%e],f-j)):0>d?b[0]-(n(b[0],b[0],b[1],b[1],-f)-b[0]):1this.getFloat(b)&&this.set(b,c)},remove:function(b){if(!this.isCapable())return null;window.localStorage.removeItem(b)},clear:function(){if(!this.isCapable())return null; +window.localStorage.clear()}})});ig.baked=!0; +ig.module("plugins.nimpact").requires("impact.entity").defines(function(){ig.Entity.inject({anchor:{x:0,y:0},scale:{x:1,y:1},collides:ig.Entity.COLLIDES.NEVER,type:ig.Entity.TYPE.NONE,children:[],init:function(b,c,d){this.parent(b,c,d)},draw:function(){var b=ig.system.context;b.save();b.translate(ig.system.getDrawPos(this.pos.x.round()-ig.game.screen.x),ig.system.getDrawPos(this.pos.y.round()-ig.game.screen.y));b.scale(this.scale.x,this.scale.y);null!=this.currentAnim&&this.currentAnim.draw(0,0); +b.restore()},setScale:function(b,c){var d=this.size.x,e=this.size.y;this.scale.x=b;this.scale.y=c||this.scale.x;var f=this.scale.x/ig.system.scale,j=this.scale.y/ig.system.scale,n=d*f,m=e*j;this.size.x=0<=n?n:-n;this.size.y=0<=m?m:-m;this.pos.x=0f?!0:!1,this.anims[g].flip.y=0>j?!0:!1},setAnchor:function(b, +c){this.anchor.x=b;this.anchor.y=null==c?b:c;this.pos.x-=this.size.x*this.anchor.x;this.pos.y-=this.size.y*this.anchor.y},nSetPos:function(b,c){this.pos.x=b;this.pos.y=c;this.setAnchor(this.anchor.x,this.anchor.y);this.setScale(this.scale.x,this.scale.y)},getCenter:function(){return{x:this.pos.x+this.size.x/2,y:this.pos.y+this.size.y/2}},getCenterX:function(){return this.pos.x+this.size.x/2},getCenterY:function(){return this.pos.y+this.size.y/2},spawnEntity:function(b,c,d,e){e=ig.merge({zIndex:this.zIndex+ +1,parents:this},e);b=ig.game.spawnEntity(b,c,d,e);this.children.push(b);return b},kill:function(){for(var b=0;bb.length;)b="0"+b;for(;2>c.length;)c="0"+ +c;for(;2>d.length;)d="0"+d;return"#"+b+c+d},getInvertedColor:function(){return new ColorRGB(255-this.r,255-this.g,255-this.b,255-this.a)},clone:function(){return new ColorRGB(this.r,this.g,this.b,this.a)}}});this.START_BRANDING_SPLASH;ig.baked=!0; +ig.module("plugins.branding.splash").requires("impact.impact","impact.entity").defines(function(){ig.BrandingSplash=ig.Class.extend({init:function(){ig.game.spawnEntity(EntityBranding,0,0);console.log("spawn branding")}});EntityBranding=ig.Entity.extend({gravityFactor:0,size:{x:32,y:32},splash:new ig.Image("branding/splash1.png"),init:function(b,c,d){this.parent(b,c,d);320>=ig.system.width?(this.size.x=320,this.size.y=200):(this.size.x=480,this.size.y=240);this.pos.x=(ig.system.width-this.size.x)/ +2;this.pos.y=-this.size.y-200;this.endPosY=(ig.system.height-this.size.y)/2;b=this.tween({pos:{y:this.endPosY}},0.5,{easing:ig.Tween.Easing.Bounce.EaseIn});c=this.tween({},2.5,{onComplete:function(){ig.game.director.loadLevel(ig.game.director.currentLevel)}});b.chain(c);b.start();this.currentAnim=this.anims.idle},createClickableLayer:function(){console.log("Build clickable layer");this.checkClickableLayer("branding-splash",_SETTINGS.Branding.Logo.Link,_SETTINGS.Branding.Logo.NewWindow)},doesClickableLayerExist:function(b){for(k in dynamicClickableEntityDivs)if(k== +b)return!0;return!1},checkClickableLayer:function(b,c,d){"undefined"==typeof wm&&(this.doesClickableLayerExist(b)?(ig.game.showOverlay([b]),$("#"+b).find("[href]").attr("href",c)):this.createClickableOutboundLayer(b,c,"media/graphics/misc/invisible.png",d))},createClickableOutboundLayer:function(b,c,d,e){var f=ig.$new("div");f.id=b;document.body.appendChild(f);f=$("#"+f.id);f.css("float","left");f.css("position","absolute");if(ig.ua.mobile){var j=window.innerHeight/mobileHeight,n=window.innerWidth/ +mobileWidth;f.css("left",this.pos.x*n);f.css("top",this.pos.y*j);f.css("width",this.size.x*n);f.css("height",this.size.y*j)}else j=w/2-destW/2,n=h/2-destH/2,console.log(j,n),f.css("left",j+this.pos.x*multiplier),f.css("top",n+this.pos.y*multiplier),f.css("width",this.size.x*multiplier),f.css("height",this.size.y*multiplier);e?f.html(""):f.html(""); +dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=this.size.x*multiplier;dynamicClickableEntityDivs[b].height=this.size.y*multiplier;dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y},draw:function(){ig.system.context.fillStyle="#ffffff";ig.system.context.fillRect(0,0,ig.system.width,ig.system.height);ig.system.context.fillStyle="#000";ig.system.context.font="12px Arial";ig.system.context.textAlign="left";320>=ig.system.width? +ig.system.context.fillText("powered by MarketJS.com",ig.system.width-150,ig.system.height-15):ig.system.context.fillText("powered by MarketJS.com",ig.system.width-160,ig.system.height-15);this.parent();this.splash&&ig.system.context.drawImage(this.splash.data,0,0,this.splash.data.width,this.splash.data.height,this.pos.x,this.pos.y,this.size.x,this.size.y)}})});this.END_BRANDING_SPLASH;ig.baked=!0; +ig.module("game.entities.buttons.button").requires("impact.entity").defines(function(){EntityButton=ig.Entity.extend({collides:ig.Entity.COLLIDES.NEVER,type:ig.Entity.TYPE.A,fillColor:null,layer:0,isClicked:!1,scale:{x:1,y:1},enabled:!0,isShown:!0,withText:!1,anchor:{x:0.5,y:0},buttonText:"",init:function(b,c,d){this.parent(b,c,d);this.setAnim();this.setAnchor(this.anchor.x,this.anchor.y);this.layer=ig.game.currentLayer;this.scaleX0=this.scale.x;this.scaleY0=this.scale.y;this.scaleX1=0.9*this.scaleX0; +this.scaleY1=0.9*this.scaleY0;this.scaleX2=1.04*this.scaleX0;this.scaleY2=1.04*this.scaleY0},ready:function(){this.parent();this.clickTime=ig.system.clock.delta()},setAnim:function(){this.animSheet=new ig.AnimationSheet(this.animImage.path,this.animImage.width,this.animImage.height);this.addAnim("idle",1,[0],!0);this.size.x=this.animSheet.width*this.scale.x;this.size.y=this.animSheet.height*this.scale.y},clicked:function(){var b=this.clickTime;this.clickTime=ig.system.clock.delta();!(0.35>this.clickTime- +b)&&this.enabled&&ig.game.currentLayer==this.layer&&(this.isClicked=!0,this.tween({scale:{x:this.scaleX1,y:this.scaleY1}},0.025).start(),ig.soundHandler.sfxPlayer.play("button"))},released:function(){this.isClicked&&this.enabled&&(ig.domHandler.getElementById("#canvas").css("cursor","default"),this.isClicked=!1,this.tween({scale:{x:this.scaleX0,y:this.scaleY0}},0.025,{onComplete:function(){this.callback()}.bind(this)}).start())},leave:function(){this.isClicked=!1;ig.domHandler.getElementById("#canvas").css("cursor", +"default");this.tween({scale:{x:this.scaleX0,y:this.scaleY0}},0.025).start()},over:function(){ig.game.currentLayer==this.layer&&this.enabled&&(ig.domHandler.getElementById("#canvas").css("cursor","pointer"),this.tween({scale:{x:this.scaleX2,y:this.scaleY2}},0.025).start())},draw:function(){if(this.isShown){var b=ig.system.context;b.save();b.translate(ig.system.getDrawPos(this.pos.x.round()-ig.game.screen.x+this.size.x/2-this.offset.x),ig.system.getDrawPos(this.pos.y.round()-ig.game.screen.y+this.size.y/ +2-this.offset.y));b.scale(this.scale.x,this.scale.y);this.currentAnim&&this.currentAnim.draw(-this.size.x/2,-this.size.y/2);this.withText&&this.drawText();b.restore()}},callback:function(){},drawText:function(){ig.game.drawText(this.buttonText,0,10,28,"#FFF","center")},setShown:function(b){this.isShown=this.enabled=b}})});ig.baked=!0; +ig.module("plugins.clickable-div-layer").requires("plugins.data.vector").defines(function(){ClickableDivLayer=ig.Class.extend({pos:new Vector2(0,0),size:new Vector2(0,0),identifier:null,invisImagePath:"media/graphics/misc/invisible.png",init:function(b){this.pos=new Vector2(b.pos.x,b.pos.y);this.size=new Vector2(b.size.x,b.size.y);var c="more-games",d="www.google.com",e=!1;b.div_layer_name&&(c=b.div_layer_name);b.link&&(d=b.link);b.newWindow&&(e=b.newWindow);this.createClickableLayer(c,d,e)},createClickableLayer:function(b, +c,d){this.identifier=b;var e=ig.domHandler.getElementById("#"+b);e?(ig.domHandler.show(e),ig.domHandler.attr(e,"href",c)):this.createClickableOutboundLayer(b,c,this.invisImagePath,d)},update:function(b,c){this.pos.x===b&&this.pos.y===c||(ig.sizeHandler.dynamicClickableEntityDivs[this.identifier]={},ig.sizeHandler.dynamicClickableEntityDivs[this.identifier].width=this.size.x,ig.sizeHandler.dynamicClickableEntityDivs[this.identifier].height=this.size.y,ig.sizeHandler.dynamicClickableEntityDivs[this.identifier].entity_pos_x= +this.pos.x,ig.sizeHandler.dynamicClickableEntityDivs[this.identifier].entity_pos_y=this.pos.y)},createClickableOutboundLayer:function(b,c,d,e){var f=ig.domHandler.create("div");ig.domHandler.attr(f,"id",b);var j=ig.domHandler.create("a");e?(ig.domHandler.attr(j,"href",c),ig.domHandler.attr(j,"target","_blank")):ig.domHandler.attr(j,"href",c);c=ig.domHandler.create("img");ig.domHandler.css(c,{width:"100%",height:"100%"});ig.domHandler.attr(c,"src",d);d=Math.min(ig.sizeHandler.scaleRatioMultiplier.x, +ig.sizeHandler.scaleRatioMultiplier.y);if(ig.ua.mobile){e=ig.domHandler.getElementById("#canvas");e=ig.domHandler.getOffsets(e);var n=e.left,m=e.top;console.log(e.left);ig.sizeHandler.disableStretchToFitOnMobileFlag?(e=Math.floor(n+this.pos.x*ig.sizeHandler.scaleRatioMultiplier.x)+"px",m=Math.floor(m+this.pos.y*ig.sizeHandler.scaleRatioMultiplier.y)+"px",n=Math.floor(this.size.x*ig.sizeHandler.scaleRatioMultiplier.x)+"px",d=Math.floor(this.size.y*ig.sizeHandler.scaleRatioMultiplier.y)+"px"):(e=Math.floor(this.pos.x* +ig.sizeHandler.sizeRatio.x)+"px",m=Math.floor(this.pos.y*ig.sizeHandler.sizeRatio.y)+"px",n=Math.floor(this.size.x*ig.sizeHandler.sizeRatio.x)+"px",d=Math.floor(this.size.y*ig.sizeHandler.sizeRatio.y)+"px")}else e=ig.domHandler.getElementById("#canvas"),e=ig.domHandler.getOffsets(e),n=e.left,m=e.top,ig.sizeHandler.enableStretchToFitOnDesktopFlag?(e=Math.floor(n+this.pos.x*ig.sizeHandler.sizeRatio.x)+"px",m=Math.floor(m+this.pos.y*ig.sizeHandler.sizeRatio.y)+"px",n=Math.floor(this.size.x*ig.sizeHandler.sizeRatio.x)+ +"px",d=Math.floor(this.size.y*ig.sizeHandler.sizeRatio.y)+"px"):(e=Math.floor(n+this.pos.x*d)+"px",m=Math.floor(m+this.pos.y*d)+"px",n=Math.floor(this.size.x*d)+"px",d=Math.floor(this.size.y*d)+"px");ig.domHandler.css(f,{"float":"left",position:"absolute",left:e,top:m,width:n,height:d,"z-index":3});ig.domHandler.addEvent(f,"mousemove",ig.input.mousemove.bind(ig.input),!1);ig.domHandler.appendChild(j,c);ig.domHandler.appendChild(f,j);ig.domHandler.appendToBody(f);ig.sizeHandler.dynamicClickableEntityDivs[b]= +{};ig.sizeHandler.dynamicClickableEntityDivs[b].width=this.size.x;ig.sizeHandler.dynamicClickableEntityDivs[b].height=this.size.y;ig.sizeHandler.dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;ig.sizeHandler.dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y}})});ig.baked=!0; +ig.module("game.entities.buttons.button-branding-logo").requires("game.entities.buttons.button","plugins.clickable-div-layer").defines(function(){EntityButtonBrandingLogo=EntityButton.extend({type:ig.Entity.TYPE.A,gravityFactor:0,logo:new ig.AnimationSheet("branding/logo.png",_SETTINGS.Branding.Logo.Width,_SETTINGS.Branding.Logo.Height),zIndex:10001,size:{x:64,y:66},clickableLayer:null,link:null,newWindow:!1,div_layer_name:"branding-logo",name:"brandinglogo",init:function(b,c,d){this.parent(b,c,d); +if(!ig.global.wm){if("undefined"==typeof wm)if(_SETTINGS.Branding.Logo.Enabled)this.size.x=_SETTINGS.Branding.Logo.Width,this.size.y=_SETTINGS.Branding.Logo.Height,this.anims.idle=new ig.Animation(this.logo,0,[0],!0),this.currentAnim=this.anims.idle,d&&d.centralize&&(this.pos.x=ig.system.width/2-this.size.x/2,console.log("centralize true ... centering branded logo ...")),_SETTINGS.Branding.Logo.LinkEnabled&&(this.link=_SETTINGS.Branding.Logo.Link,this.newWindow=_SETTINGS.Branding.Logo.NewWindow,this.clickableLayer= +new ClickableDivLayer(this));else{this.kill();return}this.div_layer_name=d.div_layer_name?d.div_layer_name:"branding-logo"}},show:function(){var b=ig.domHandler.getElementById("#"+this.div_layer_name);ig.domHandler.show(b)},hide:function(){var b=ig.domHandler.getElementById("#"+this.div_layer_name);ig.domHandler.hide(b)},clicked:function(){},clicking:function(){},released:function(){}})});ig.baked=!0; +ig.module("game.entities.branding-logo-placeholder").requires("impact.entity","game.entities.buttons.button-branding-logo").defines(function(){EntityBrandingLogoPlaceholder=ig.Entity.extend({gravityFactor:0,size:{x:32,y:32},_wmDrawBox:!0,_wmBoxColor:"rgba(0, 0, 255, 0.7)",init:function(b,c,d){this.parent(b,c,d);if(d)switch(console.log("settings found ... using that div layer name"),b=d.div_layer_name,console.log("settings.centralize:",d.centralize),d.centralize){case "true":console.log("centralize true"); +centralize=!0;break;case "false":console.log("centralize false");centralize=!1;break;default:console.log("default ... centralize false"),centralize=!1}else b="branding-logo",centralize=!1;if("undefined"==typeof wm){if(_SETTINGS.Branding.Logo.Enabled)try{ig.game.spawnEntity(EntityButtonBrandingLogo,this.pos.x,this.pos.y,{div_layer_name:b,centralize:centralize})}catch(e){console.log(e)}this.kill()}}})});ig.baked=!0; +ig.module("game.entities.buttons.button-more-games").requires("game.entities.buttons.button","plugins.clickable-div-layer").defines(function(){EntityButtonMoreGames=EntityButton.extend({type:ig.Entity.TYPE.A,gravityFactor:0,animImage:new ig.Image("media/graphics/games/ui/moregames-btn.png"),size:{x:64,y:64},zIndex:750,alpha:0,clickableLayer:null,link:null,newWindow:!1,div_layer_name:"more-games",name:"moregames",init:function(b,c,d){this.parent(b,c,d);ig.global.wm||(this.currentAnim.alpha=0,this.fadeIn(), +this.div_layer_name=d.div_layer_name?d.div_layer_name:"more-games",_SETTINGS.MoreGames.Enabled?(_SETTINGS.MoreGames.Link&&(this.link=_SETTINGS.MoreGames.Link),_SETTINGS.MoreGames.NewWindow&&(this.newWindow=_SETTINGS.MoreGames.NewWindow),this.clickableLayer=new ClickableDivLayer(this)):this.kill())},show:function(){var b=ig.domHandler.getElementById("#"+this.div_layer_name);ig.domHandler.show(b)},hide:function(){var b=ig.domHandler.getElementById("#"+this.div_layer_name);ig.domHandler.hide(b)},fadeIn:function(){this.tween({currentAnim:{alpha:1}}, +1).start()}})});1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59;60;61;62;63;64;65;66;67;68;69;70;71;72;73;74;75;76;77;78;79;80;81;82;83;84;85;86;87;88;89;90;91;92;93;94;95;96;97;98;99;100;101;102;103;104;105;106;107;108;109;110;111;112;113;114;115;116;117;118;119;120;121;122;123;124;125;126;127;128;129;130;131;132;133;134;135;136;137;138;139;140;141;142;143;144;145;146;147;148;149; +150;151;152;153;154;155;156;157;158;159;160;161;162;163;164;165;166;167;168;169;170;171;172;173;174;175;176;177;178;179;180;181;182;183;184;185;186;187;188;189;190;191;192;193;194;195;196;197;198;199;200;201;202;203;204;205;206;207;208;209;210;211;212;213;214;215;216;217;218;219;220;221;222;223;224;225;226;227;228;229;230;231;232;233;234;235;236;237;238;239;240;241;242;243;244;245;246;247;248;249;250;251;252;253;254;255;256;257;258;259;260;261;262;263;264;265;266;267;268;269;270;271;272;273;274;275; +276;277;278;279;280;281;282;283;284;285;286;287;288;289;290;291;292;293;294;295;296;297;298;299;300;301;302;303;304;305;306;307;308;309;310;311;312;313;314;315;316;317;318;319;320;321;322;323;324;325;326;327;328;329;330;331;332;333;334;335;336;337;338;339;340;341;342;343;344;345;346;347;348;349;350;351;352;353;354;355;356;357;358;359;360;361;362;363;364;365;366;367;368;369;370;371;372;373;374;375;376;377;378;379;380;381;382;383;384;385;386;387;388;389;390;391;392;393;394;395;396;397;398;399;400;401; +402;403;404;405;406;407;408;409;410;411;412;413;414;415;416;417;418;419;420;421;422;423;424;425;426;427;428;429;430;431;432;433;434;435;436;437;438;439;440;441;442;443;444;445;446;447;448;449;450;451;452;453;454;455;456;457;458;459;460;461;462;463;464;465;466;467;468;469;470;471;472;473;474;475;476;477;478;479;480;481;482;483;484;485;486;487;488;489;490;491;492;493;494;495;496;497;var Box2D={SCALE:0.1}; +(function(b,c){function d(){}var e=function(){var b,c,d,e,g=Function.call,t=Object.prototype,z=g.bind(t.hasOwnProperty),y=g.bind(t.propertyIsEnumerable),A=g.bind(t.toString),B=z(t,"__defineGetter__");B&&(b=g.bind(t.__defineGetter__),c=g.bind(t.__defineSetter__),d=g.bind(t.__lookupGetter__),e=g.bind(t.__lookupSetter__));var I=function(b){return null==b||"object"!=typeof b&&"function"!=typeof b};Object.getPrototypeOf||(Object.getPrototypeOf=function(b){var c=b.__proto__;return c||null===c?c:"[object Function]"=== +A(b.constructor)?b.constructor.prototype:b instanceof Object?t:null});g=function(b){try{return b.sentinel=0,0===Object.getOwnPropertyDescriptor(b,"sentinel").value}catch(c){return!1}};if(Object.defineProperty){var D=g({});if(!("undefined"==typeof document||g(document.createElement("div")))||!D)var x=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||x)Object.getOwnPropertyDescriptor=function(b,c){if(I(b))throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+ +b);if(x)try{return x.call(Object,b,c)}catch(f){}var g;if(!z(b,c))return g;if(g={enumerable:y(b,c),configurable:!0},B){var j=b.__proto__,E=b!==t;E&&(b.__proto__=t);var s=d(b,c),u=e(b,c);if(E&&(b.__proto__=j),s||u)return s&&(g.get=s),u&&(g.set=u),g}return g.value=b[c],g.writable=!0,g};if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(b){return Object.keys(b)}),!Object.create){var G;G="undefined"==typeof document?function(){return{__proto__:null}}:function(){var b,c,d,e,f,g=function(){if(!document.domain)return!1; +try{return!!new ActiveXObject("htmlfile")}catch(b){return!1}}()?((f=new ActiveXObject("htmlfile")).write(" + + + + + + + +
+
+ +
+
+ + + + +
+ + + + + + + + + diff --git a/risehigher/media/audio/bgm.mp3 b/risehigher/media/audio/bgm.mp3 new file mode 100644 index 00000000..ab180dfb Binary files /dev/null and b/risehigher/media/audio/bgm.mp3 differ diff --git a/risehigher/media/audio/games/button.ogg b/risehigher/media/audio/games/button.ogg new file mode 100644 index 00000000..e9aa9e8b Binary files /dev/null and b/risehigher/media/audio/games/button.ogg differ diff --git a/risehigher/media/audio/games/lose.ogg b/risehigher/media/audio/games/lose.ogg new file mode 100644 index 00000000..a5703fe9 Binary files /dev/null and b/risehigher/media/audio/games/lose.ogg differ diff --git a/risehigher/media/audio/games/over.ogg b/risehigher/media/audio/games/over.ogg new file mode 100644 index 00000000..38ce49a3 Binary files /dev/null and b/risehigher/media/audio/games/over.ogg differ diff --git a/risehigher/media/audio/games/win.ogg b/risehigher/media/audio/games/win.ogg new file mode 100644 index 00000000..9cc8f814 Binary files /dev/null and b/risehigher/media/audio/games/win.ogg differ diff --git a/risehigher/media/audio/opening/kittyopening.ogg b/risehigher/media/audio/opening/kittyopening.ogg new file mode 100644 index 00000000..e822deb3 Binary files /dev/null and b/risehigher/media/audio/opening/kittyopening.ogg differ diff --git a/risehigher/media/audio/opening/opening.ogg b/risehigher/media/audio/opening/opening.ogg new file mode 100644 index 00000000..ed68945a Binary files /dev/null and b/risehigher/media/audio/opening/opening.ogg differ diff --git a/risehigher/media/audio/sfx/static.ogg b/risehigher/media/audio/sfx/static.ogg new file mode 100644 index 00000000..ca63e9c2 Binary files /dev/null and b/risehigher/media/audio/sfx/static.ogg differ diff --git a/risehigher/media/fonts/mainfont.ttf b/risehigher/media/fonts/mainfont.ttf new file mode 100644 index 00000000..0a3fe6de Binary files /dev/null and b/risehigher/media/fonts/mainfont.ttf differ diff --git a/risehigher/media/graphics/games/background/bg1.png b/risehigher/media/graphics/games/background/bg1.png new file mode 100644 index 00000000..1eab2cf5 Binary files /dev/null and b/risehigher/media/graphics/games/background/bg1.png differ diff --git a/risehigher/media/graphics/games/background/cloud.png b/risehigher/media/graphics/games/background/cloud.png new file mode 100644 index 00000000..cd013d8a Binary files /dev/null and b/risehigher/media/graphics/games/background/cloud.png differ diff --git a/risehigher/media/graphics/games/play/chevron.png b/risehigher/media/graphics/games/play/chevron.png new file mode 100644 index 00000000..3281ddc0 Binary files /dev/null and b/risehigher/media/graphics/games/play/chevron.png differ diff --git a/risehigher/media/graphics/games/play/donut.png b/risehigher/media/graphics/games/play/donut.png new file mode 100644 index 00000000..12030442 Binary files /dev/null and b/risehigher/media/graphics/games/play/donut.png differ diff --git a/risehigher/media/graphics/games/play/moustache.png b/risehigher/media/graphics/games/play/moustache.png new file mode 100644 index 00000000..be6ecaf3 Binary files /dev/null and b/risehigher/media/graphics/games/play/moustache.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/big-oval.png b/risehigher/media/graphics/games/play/obstacles/big-oval.png new file mode 100644 index 00000000..1a2c5d24 Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/big-oval.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/big-pentagon.png b/risehigher/media/graphics/games/play/obstacles/big-pentagon.png new file mode 100644 index 00000000..d875e855 Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/big-pentagon.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/big-stars.png b/risehigher/media/graphics/games/play/obstacles/big-stars.png new file mode 100644 index 00000000..526d64a2 Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/big-stars.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/big-triangle.png b/risehigher/media/graphics/games/play/obstacles/big-triangle.png new file mode 100644 index 00000000..da3ddaca Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/big-triangle.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/diamond.png b/risehigher/media/graphics/games/play/obstacles/diamond.png new file mode 100644 index 00000000..45135f8f Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/diamond.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/pentagon.png b/risehigher/media/graphics/games/play/obstacles/pentagon.png new file mode 100644 index 00000000..f7339c78 Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/pentagon.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/plus.png b/risehigher/media/graphics/games/play/obstacles/plus.png new file mode 100644 index 00000000..4a3f1b0a Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/plus.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/small-oval.png b/risehigher/media/graphics/games/play/obstacles/small-oval.png new file mode 100644 index 00000000..2193baf9 Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/small-oval.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/small-pentagon.png b/risehigher/media/graphics/games/play/obstacles/small-pentagon.png new file mode 100644 index 00000000..caba695d Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/small-pentagon.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/small-stars.png b/risehigher/media/graphics/games/play/obstacles/small-stars.png new file mode 100644 index 00000000..b134d59e Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/small-stars.png differ diff --git a/risehigher/media/graphics/games/play/obstacles/small-triangle.png b/risehigher/media/graphics/games/play/obstacles/small-triangle.png new file mode 100644 index 00000000..8f47a9bb Binary files /dev/null and b/risehigher/media/graphics/games/play/obstacles/small-triangle.png differ diff --git a/risehigher/media/graphics/games/play/ombre.png b/risehigher/media/graphics/games/play/ombre.png new file mode 100644 index 00000000..49822a20 Binary files /dev/null and b/risehigher/media/graphics/games/play/ombre.png differ diff --git a/risehigher/media/graphics/games/play/original.png b/risehigher/media/graphics/games/play/original.png new file mode 100644 index 00000000..7b1709b9 Binary files /dev/null and b/risehigher/media/graphics/games/play/original.png differ diff --git a/risehigher/media/graphics/games/play/panda.png b/risehigher/media/graphics/games/play/panda.png new file mode 100644 index 00000000..c4117813 Binary files /dev/null and b/risehigher/media/graphics/games/play/panda.png differ diff --git a/risehigher/media/graphics/games/play/polcadot.png b/risehigher/media/graphics/games/play/polcadot.png new file mode 100644 index 00000000..4411ac8f Binary files /dev/null and b/risehigher/media/graphics/games/play/polcadot.png differ diff --git a/risehigher/media/graphics/games/play/protect.png b/risehigher/media/graphics/games/play/protect.png new file mode 100644 index 00000000..d4ab66e6 Binary files /dev/null and b/risehigher/media/graphics/games/play/protect.png differ diff --git a/risehigher/media/graphics/games/ui/back-btn.png b/risehigher/media/graphics/games/ui/back-btn.png new file mode 100644 index 00000000..d044cdd4 Binary files /dev/null and b/risehigher/media/graphics/games/ui/back-btn.png differ diff --git a/risehigher/media/graphics/games/ui/balloon-frame.png b/risehigher/media/graphics/games/ui/balloon-frame.png new file mode 100644 index 00000000..38c33db8 Binary files /dev/null and b/risehigher/media/graphics/games/ui/balloon-frame.png differ diff --git a/risehigher/media/graphics/games/ui/bar0.png b/risehigher/media/graphics/games/ui/bar0.png new file mode 100644 index 00000000..42eb2cdf Binary files /dev/null and b/risehigher/media/graphics/games/ui/bar0.png differ diff --git a/risehigher/media/graphics/games/ui/bar1.png b/risehigher/media/graphics/games/ui/bar1.png new file mode 100644 index 00000000..06256499 Binary files /dev/null and b/risehigher/media/graphics/games/ui/bar1.png differ diff --git a/risehigher/media/graphics/games/ui/cover.png b/risehigher/media/graphics/games/ui/cover.png new file mode 100644 index 00000000..57482ce3 Binary files /dev/null and b/risehigher/media/graphics/games/ui/cover.png differ diff --git a/risehigher/media/graphics/games/ui/enter-fullscreen-transparent.png b/risehigher/media/graphics/games/ui/enter-fullscreen-transparent.png new file mode 100644 index 00000000..de28ef95 Binary files /dev/null and b/risehigher/media/graphics/games/ui/enter-fullscreen-transparent.png differ diff --git a/risehigher/media/graphics/games/ui/exit-fullscreen-transparent.png b/risehigher/media/graphics/games/ui/exit-fullscreen-transparent.png new file mode 100644 index 00000000..5fdb3726 Binary files /dev/null and b/risehigher/media/graphics/games/ui/exit-fullscreen-transparent.png differ diff --git a/risehigher/media/graphics/games/ui/home-btn-game-end.png b/risehigher/media/graphics/games/ui/home-btn-game-end.png new file mode 100644 index 00000000..e9d2f919 Binary files /dev/null and b/risehigher/media/graphics/games/ui/home-btn-game-end.png differ diff --git a/risehigher/media/graphics/games/ui/home-btn.png b/risehigher/media/graphics/games/ui/home-btn.png new file mode 100644 index 00000000..b81681bd Binary files /dev/null and b/risehigher/media/graphics/games/ui/home-btn.png differ diff --git a/risehigher/media/graphics/games/ui/loading-bar0.png b/risehigher/media/graphics/games/ui/loading-bar0.png new file mode 100644 index 00000000..c1178106 Binary files /dev/null and b/risehigher/media/graphics/games/ui/loading-bar0.png differ diff --git a/risehigher/media/graphics/games/ui/loading-bar1.png b/risehigher/media/graphics/games/ui/loading-bar1.png new file mode 100644 index 00000000..0a66d249 Binary files /dev/null and b/risehigher/media/graphics/games/ui/loading-bar1.png differ diff --git a/risehigher/media/graphics/games/ui/moregames-btn.png b/risehigher/media/graphics/games/ui/moregames-btn.png new file mode 100644 index 00000000..ea356ff0 Binary files /dev/null and b/risehigher/media/graphics/games/ui/moregames-btn.png differ diff --git a/risehigher/media/graphics/games/ui/music.png b/risehigher/media/graphics/games/ui/music.png new file mode 100644 index 00000000..763ecebf Binary files /dev/null and b/risehigher/media/graphics/games/ui/music.png differ diff --git a/risehigher/media/graphics/games/ui/pause-btn.png b/risehigher/media/graphics/games/ui/pause-btn.png new file mode 100644 index 00000000..8f7ad9c3 Binary files /dev/null and b/risehigher/media/graphics/games/ui/pause-btn.png differ diff --git a/risehigher/media/graphics/games/ui/play-btn.png b/risehigher/media/graphics/games/ui/play-btn.png new file mode 100644 index 00000000..bcbb472c Binary files /dev/null and b/risehigher/media/graphics/games/ui/play-btn.png differ diff --git a/risehigher/media/graphics/games/ui/prevnext-btn.png b/risehigher/media/graphics/games/ui/prevnext-btn.png new file mode 100644 index 00000000..82203d85 Binary files /dev/null and b/risehigher/media/graphics/games/ui/prevnext-btn.png differ diff --git a/risehigher/media/graphics/games/ui/retry-btn.png b/risehigher/media/graphics/games/ui/retry-btn.png new file mode 100644 index 00000000..e6ee7214 Binary files /dev/null and b/risehigher/media/graphics/games/ui/retry-btn.png differ diff --git a/risehigher/media/graphics/games/ui/select-buy-btn.png b/risehigher/media/graphics/games/ui/select-buy-btn.png new file mode 100644 index 00000000..f1d59d59 Binary files /dev/null and b/risehigher/media/graphics/games/ui/select-buy-btn.png differ diff --git a/risehigher/media/graphics/games/ui/setting-btn.png b/risehigher/media/graphics/games/ui/setting-btn.png new file mode 100644 index 00000000..41aaa984 Binary files /dev/null and b/risehigher/media/graphics/games/ui/setting-btn.png differ diff --git a/risehigher/media/graphics/games/ui/shop-btn.png b/risehigher/media/graphics/games/ui/shop-btn.png new file mode 100644 index 00000000..c11e9d12 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop-btn.png differ diff --git a/risehigher/media/graphics/games/ui/shop/chevron.png b/risehigher/media/graphics/games/ui/shop/chevron.png new file mode 100644 index 00000000..bc3da086 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/chevron.png differ diff --git a/risehigher/media/graphics/games/ui/shop/donut.png b/risehigher/media/graphics/games/ui/shop/donut.png new file mode 100644 index 00000000..e5c62066 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/donut.png differ diff --git a/risehigher/media/graphics/games/ui/shop/moustache.png b/risehigher/media/graphics/games/ui/shop/moustache.png new file mode 100644 index 00000000..c63ebf53 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/moustache.png differ diff --git a/risehigher/media/graphics/games/ui/shop/ombre.png b/risehigher/media/graphics/games/ui/shop/ombre.png new file mode 100644 index 00000000..2ae3b7c5 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/ombre.png differ diff --git a/risehigher/media/graphics/games/ui/shop/original.png b/risehigher/media/graphics/games/ui/shop/original.png new file mode 100644 index 00000000..bbfb71dc Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/original.png differ diff --git a/risehigher/media/graphics/games/ui/shop/panda.png b/risehigher/media/graphics/games/ui/shop/panda.png new file mode 100644 index 00000000..4daf23ea Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/panda.png differ diff --git a/risehigher/media/graphics/games/ui/shop/polcadot.png b/risehigher/media/graphics/games/ui/shop/polcadot.png new file mode 100644 index 00000000..13f084c0 Binary files /dev/null and b/risehigher/media/graphics/games/ui/shop/polcadot.png differ diff --git a/risehigher/media/graphics/games/ui/slider.png b/risehigher/media/graphics/games/ui/slider.png new file mode 100644 index 00000000..69ce28db Binary files /dev/null and b/risehigher/media/graphics/games/ui/slider.png differ diff --git a/risehigher/media/graphics/games/ui/sound.png b/risehigher/media/graphics/games/ui/sound.png new file mode 100644 index 00000000..5ad642be Binary files /dev/null and b/risehigher/media/graphics/games/ui/sound.png differ diff --git a/risehigher/media/graphics/games/ui/title.png b/risehigher/media/graphics/games/ui/title.png new file mode 100644 index 00000000..a4fbf79a Binary files /dev/null and b/risehigher/media/graphics/games/ui/title.png differ diff --git a/risehigher/media/graphics/loading/ajax-loader.gif b/risehigher/media/graphics/loading/ajax-loader.gif new file mode 100644 index 00000000..c95d05a0 Binary files /dev/null and b/risehigher/media/graphics/loading/ajax-loader.gif differ diff --git a/risehigher/media/graphics/misc/invisible.png b/risehigher/media/graphics/misc/invisible.png new file mode 100644 index 00000000..36de275e Binary files /dev/null and b/risehigher/media/graphics/misc/invisible.png differ diff --git a/risehigher/media/graphics/opening/kitty.png b/risehigher/media/graphics/opening/kitty.png new file mode 100644 index 00000000..9670218b Binary files /dev/null and b/risehigher/media/graphics/opening/kitty.png differ diff --git a/risehigher/media/graphics/opening/kittytitle.png b/risehigher/media/graphics/opening/kittytitle.png new file mode 100644 index 00000000..8eae287c Binary files /dev/null and b/risehigher/media/graphics/opening/kittytitle.png differ diff --git a/risehigher/media/graphics/opening/m_icon.png b/risehigher/media/graphics/opening/m_icon.png new file mode 100644 index 00000000..dda12859 Binary files /dev/null and b/risehigher/media/graphics/opening/m_icon.png differ diff --git a/risehigher/media/graphics/opening/shield.png b/risehigher/media/graphics/opening/shield.png new file mode 100644 index 00000000..9efd3070 Binary files /dev/null and b/risehigher/media/graphics/opening/shield.png differ diff --git a/risehigher/media/graphics/opening/title.png b/risehigher/media/graphics/opening/title.png new file mode 100644 index 00000000..f38d7f34 Binary files /dev/null and b/risehigher/media/graphics/opening/title.png differ diff --git a/risehigher/media/graphics/orientate/orientate.jpg b/risehigher/media/graphics/orientate/orientate.jpg new file mode 100644 index 00000000..529196af Binary files /dev/null and b/risehigher/media/graphics/orientate/orientate.jpg differ diff --git a/risehigher/media/graphics/promo/Icons/128x128.png b/risehigher/media/graphics/promo/Icons/128x128.png new file mode 100644 index 00000000..8b879eba Binary files /dev/null and b/risehigher/media/graphics/promo/Icons/128x128.png differ diff --git a/risehigher/media/graphics/splash/cover-start.png b/risehigher/media/graphics/splash/cover-start.png new file mode 100644 index 00000000..52077f66 Binary files /dev/null and b/risehigher/media/graphics/splash/cover-start.png differ diff --git a/style.css b/style.css index b1d9a2ab..b539d6ff 100644 --- a/style.css +++ b/style.css @@ -163,7 +163,7 @@ img { } .game h1, .suggest h1 { - font-size: 13px; + font-size: 12px; float: right; margin-right: 10px; margin-top: 3px; diff --git a/templerun2/079dea52d8f43464bedd59bc35cc7999.jpg b/templerun2/079dea52d8f43464bedd59bc35cc7999.jpg new file mode 100644 index 00000000..ce02180d Binary files /dev/null and b/templerun2/079dea52d8f43464bedd59bc35cc7999.jpg differ diff --git a/templerun2/2.bundle.js b/templerun2/2.bundle.js new file mode 100644 index 00000000..17865468 --- /dev/null +++ b/templerun2/2.bundle.js @@ -0,0 +1,88 @@ +(window.webpackJsonp = window.webpackJsonp || []).push([ + [2], + { + 354: function (e, r, o) { + var n = o(66), + u = o(104), + a = o(355), + c = o(356), + t = o(357), + i = o(243), + d = o(246), + b = o(207), + g = o(216), + p = o(220), + l = o(218), + s = o(242), + f = o(244), + k = o(241), + m = o(240); + r = n(!1); + var w = u(a), + h = u(c), + v = u(t), + y = u(i), + x = u(d), + J = u(b), + _ = u(g), + M = u(p), + j = u(l), + q = u(s), + z = u(f), + A = u(k), + B = u(m); + r.push([ + e.i, + ".idol,.logo,.main-1,.play{background-image:url(" + + w + + ")}.powerupglow,.powerupbar,.fill,.pause,.count-holder{background-image:url(" + + h + + ")}.cracked-border,.divider,.brown-bg,.distance-toast,.coins-chest-open,.coins-in-hand,.coins-urn,.coins-vault-open,.chest-closed,.check-button,.boost-icon,.boost-meter,.magnet-icon,.shield-icon,.off-button,.on-button,.timer-icon,.ads-movie,.tutorialarrowup,.coin-single{background-image:url(" + + v + + ")}.pr-loading-screen{background-image:url(" + + y + + ")}.pr-button-brown{background-image:url(" + + x + + ")}.pr-button-green{background-image:url(" + + J + + ")}.pr-button{background-image:url(" + + _ + + ")}.pr-decor-border{background-image:url(" + + M + + ")}.pr-green-button{background-image:url(" + + j + + ")}.pr-guy-dangerous-death{background-image:url(" + + q + + ")}.pr-power-unlock-sprite{background-image:url(" + + z + + ")}.pr-beige-bg{background-image:url(" + + A + + ")}.reward-button-png{background-image:url(" + + B + + ")}\n", + "", + ]), + (e.exports = r); + }, + 355: function (e, r, o) { + "use strict"; + o.r(r), (r.default = o.p + "ac268c48131d7ef2e42100beed84990f.webp"); + }, + 356: function (e, r, o) { + "use strict"; + o.r(r), (r.default = o.p + "6bbd8797ffdaf4e4c44b49e4732c9bf1.webp"); + }, + 357: function (e, r, o) { + "use strict"; + o.r(r), (r.default = o.p + "72bdc992cae069c7b8720c3106e5d3c8.webp"); + }, + 362: function (e, r, o) { + var n = o(65), + u = o(354); + "string" == typeof (u = u.__esModule ? u.default : u) && (u = [[e.i, u, ""]]); + var a = { insert: "head", singleton: !1 }; + n(u, a); + e.exports = u.locals || {}; + }, + }, +]); diff --git a/templerun2/379241e29c75c9e274f9190a2e0874bb.jpg b/templerun2/379241e29c75c9e274f9190a2e0874bb.jpg new file mode 100644 index 00000000..70e683cd Binary files /dev/null and b/templerun2/379241e29c75c9e274f9190a2e0874bb.jpg differ diff --git a/templerun2/4720d910d9d723ec173e17ce10f31bfb.jpg b/templerun2/4720d910d9d723ec173e17ce10f31bfb.jpg new file mode 100644 index 00000000..e0e6bac6 Binary files /dev/null and b/templerun2/4720d910d9d723ec173e17ce10f31bfb.jpg differ diff --git a/templerun2/52d79153235ad2a88f8b1ff2ffdbe067.jpg b/templerun2/52d79153235ad2a88f8b1ff2ffdbe067.jpg new file mode 100644 index 00000000..503f5b31 Binary files /dev/null and b/templerun2/52d79153235ad2a88f8b1ff2ffdbe067.jpg differ diff --git a/templerun2/6bbd8797ffdaf4e4c44b49e4732c9bf1.webp b/templerun2/6bbd8797ffdaf4e4c44b49e4732c9bf1.webp new file mode 100644 index 00000000..148fa1b6 Binary files /dev/null and b/templerun2/6bbd8797ffdaf4e4c44b49e4732c9bf1.webp differ diff --git a/templerun2/72bdc992cae069c7b8720c3106e5d3c8.webp b/templerun2/72bdc992cae069c7b8720c3106e5d3c8.webp new file mode 100644 index 00000000..380cea1a Binary files /dev/null and b/templerun2/72bdc992cae069c7b8720c3106e5d3c8.webp differ diff --git a/templerun2/859534eabad5724a69cd5381dc82428f.webp b/templerun2/859534eabad5724a69cd5381dc82428f.webp new file mode 100644 index 00000000..b629004c Binary files /dev/null and b/templerun2/859534eabad5724a69cd5381dc82428f.webp differ diff --git a/templerun2/ac268c48131d7ef2e42100beed84990f.webp b/templerun2/ac268c48131d7ef2e42100beed84990f.webp new file mode 100644 index 00000000..01112ef0 Binary files /dev/null and b/templerun2/ac268c48131d7ef2e42100beed84990f.webp differ diff --git a/templerun2/appmanifest.json b/templerun2/appmanifest.json new file mode 100644 index 00000000..16340cf5 --- /dev/null +++ b/templerun2/appmanifest.json @@ -0,0 +1,53 @@ +{ + "name": "Temple Run 2", + "short_name": "Temple Run 2", + "description": "Play one of the top mobile games made by Imangi Studios right in your browser! Run as you are being chased, how far will you go?", + "version": "2.0", + "theme_color": "#000000", + "background_color": "#000000", + "display": "fullScreen", + "orientation": "any", + "start_url": "index.html", + "icons": [ + { + "src": "img/icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "img/icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "img/icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "img/icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "img/icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "img/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "img/icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "img/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/templerun2/assets/babylonjs/babylonjs.materials.js b/templerun2/assets/babylonjs/babylonjs.materials.js new file mode 100644 index 00000000..7c31049a --- /dev/null +++ b/templerun2/assets/babylonjs/babylonjs.materials.js @@ -0,0 +1,7621 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("babylonjs")); + else if(typeof define === 'function' && define.amd) + define("babylonjs-materials", ["babylonjs"], factory); + else if(typeof exports === 'object') + exports["babylonjs-materials"] = factory(require("babylonjs")); + else + root["MATERIALS"] = factory(root["BABYLON"]); +})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./legacy/legacy.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../../node_modules/tslib/tslib.es6.js": +/*!***********************************************************!*\ + !*** C:/Repos/Babylon.js/node_modules/tslib/tslib.es6.js ***! + \***********************************************************/ +/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArray", function() { return __spreadArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; }); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); + +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +/** @deprecated */ +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +/** @deprecated */ +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} + +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} + +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +} + + +/***/ }), + +/***/ "../../node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), + +/***/ "./cell/cell.fragment.ts": +/*!*******************************!*\ + !*** ./cell/cell.fragment.ts ***! + \*******************************/ +/*! exports provided: cellPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellPixelShader", function() { return cellPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'cellPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\n\nvec3 computeCustomDiffuseLighting(lightingInfo info,vec3 diffuseBase,float shadow)\n{\ndiffuseBase=info.diffuse*shadow;\n#ifdef CELLBASIC\nfloat level=1.0;\nif (info.ndl<0.5)\nlevel=0.5;\ndiffuseBase.rgb*vec3(level,level,level);\n#else\nfloat ToonThresholds[4];\nToonThresholds[0]=0.95;\nToonThresholds[1]=0.5;\nToonThresholds[2]=0.2;\nToonThresholds[3]=0.03;\nfloat ToonBrightnessLevels[5];\nToonBrightnessLevels[0]=1.0;\nToonBrightnessLevels[1]=0.8;\nToonBrightnessLevels[2]=0.6;\nToonBrightnessLevels[3]=0.35;\nToonBrightnessLevels[4]=0.2;\nif (info.ndl>ToonThresholds[0])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[0];\n}\nelse if (info.ndl>ToonThresholds[1])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[1];\n}\nelse if (info.ndl>ToonThresholds[2])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[2];\n}\nelse if (info.ndl>ToonThresholds[3])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[3];\n}\nelse\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[4];\n}\n#endif\nreturn max(diffuseBase,vec3(0.2));\n}\nvoid main(void)\n{\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nlightingInfo info;\nvec3 diffuseBase=vec3(0.,0.,0.);\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var cellPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./cell/cell.vertex.ts": +/*!*****************************!*\ + !*** ./cell/cell.vertex.ts ***! + \*****************************/ +/*! exports provided: cellVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellVertexShader", function() { return cellVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'cellVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var cellVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./cell/cellMaterial.ts": +/*!******************************!*\ + !*** ./cell/cellMaterial.ts ***! + \******************************/ +/*! exports provided: CellMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return CellMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.fragment */ "./cell/cell.fragment.ts"); +/* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cell.vertex */ "./cell/cell.vertex.ts"); + + + + + + + + + + + + + +var CellMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CellMaterialDefines, _super); + function CellMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.NDOTL = true; + _this.CUSTOMUSERLIGHTING = true; + _this.CELLBASIC = true; + _this.DEPTHPREPASS = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return CellMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var CellMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CellMaterial, _super); + function CellMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._computeHighLevel = false; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + CellMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + CellMaterial.prototype.needAlphaTesting = function () { + return false; + }; + CellMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + CellMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new CellMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // High level + defines.CELLBASIC = !this.computeHighLevel; + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "cell"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights - 1 } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + CellMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + CellMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + return results; + }; + CellMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + CellMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + return this._diffuseTexture === texture; + }; + CellMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + CellMaterial.prototype.getClassName = function () { + return "CellMaterial"; + }; + CellMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new CellMaterial(name, _this.getScene()); }, this); + }; + CellMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.CellMaterial"; + return serializationObject; + }; + // Statics + CellMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new CellMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], CellMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], CellMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], CellMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("computeHighLevel") + ], CellMaterial.prototype, "_computeHighLevel", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], CellMaterial.prototype, "computeHighLevel", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], CellMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], CellMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], CellMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], CellMaterial.prototype, "maxSimultaneousLights", void 0); + return CellMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.CellMaterial"] = CellMaterial; + + +/***/ }), + +/***/ "./cell/index.ts": +/*!***********************!*\ + !*** ./cell/index.ts ***! + \***********************/ +/*! exports provided: CellMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cellMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cellMaterial */ "./cell/cellMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _cellMaterial__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + + + + +/***/ }), + +/***/ "./custom/customMaterial.ts": +/*!**********************************!*\ + !*** ./custom/customMaterial.ts ***! + \**********************************/ +/*! exports provided: CustomShaderStructure, ShaderSpecialParts, CustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return CustomShaderStructure; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return ShaderSpecialParts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return CustomMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__); + + + + +var CustomShaderStructure = /** @class */ (function () { + function CustomShaderStructure() { + } + return CustomShaderStructure; +}()); + +var ShaderSpecialParts = /** @class */ (function () { + function ShaderSpecialParts() { + } + return ShaderSpecialParts; +}()); + +var CustomMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(CustomMaterial, _super); + function CustomMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.CustomParts = new ShaderSpecialParts(); + _this.customShaderNameResolve = _this.Builder; + _this.FragmentShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["defaultPixelShader"]; + _this.VertexShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["defaultVertexShader"]; + return _this; + } + CustomMaterial.prototype.AttachAfterBind = function (mesh, effect) { + if (this._newUniformInstances) { + for (var el in this._newUniformInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'vec2') { + effect.setVector2(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec3') { + effect.setVector3(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec4') { + effect.setVector4(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'mat4') { + effect.setMatrix(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'float') { + effect.setFloat(ea[1], this._newUniformInstances[el]); + } + } + } + if (this._newSamplerInstances) { + for (var el in this._newSamplerInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'sampler2D' && this._newSamplerInstances[el].isReady && this._newSamplerInstances[el].isReady()) { + effect.setTexture(ea[1], this._newSamplerInstances[el]); + } + } + } + }; + CustomMaterial.prototype.ReviewUniform = function (name, arr) { + if (name == "uniform" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') == -1) { + arr.push(this._newUniforms[ind]); + } + } + } + if (name == "sampler" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') != -1) { + arr.push(this._newUniforms[ind]); + } + } + } + return arr; + }; + CustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines, attributes) { + var _this = this; + if (attributes && this._customAttributes && this._customAttributes.length > 0) { + attributes.push.apply(attributes, this._customAttributes); + } + this.ReviewUniform("uniform", uniforms); + this.ReviewUniform("sampler", samplers); + if (this._isCreatedShader) { + return this._createdShaderName; + } + this._isCreatedShader = false; + CustomMaterial.ShaderIndexer++; + var name = "custom_" + CustomMaterial.ShaderIndexer; + var fn_afterBind = this._afterBind.bind(this); + this._afterBind = function (m, e) { + if (!e) { + return; + } + _this.AttachAfterBind(m, e); + try { + fn_afterBind(m, e); + } + catch (e) { } + }; + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = this.VertexShader + .replace('#define CUSTOM_VERTEX_BEGIN', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : "")) + .replace('#define CUSTOM_VERTEX_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : "")) + .replace('#define CUSTOM_VERTEX_MAIN_BEGIN', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_POSITION', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_NORMAL', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : "")) + .replace('#define CUSTOM_VERTEX_MAIN_END', (this.CustomParts.Vertex_MainEnd ? this.CustomParts.Vertex_MainEnd : "")); + if (this.CustomParts.Vertex_After_WorldPosComputed) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"].replace('#define CUSTOM_VERTEX_UPDATE_WORLDPOS', this.CustomParts.Vertex_After_WorldPosComputed); + } + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = this.FragmentShader + .replace('#define CUSTOM_FRAGMENT_BEGIN', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : "")) + .replace('#define CUSTOM_FRAGMENT_MAIN_BEGIN', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : "")) + .replace('#define CUSTOM_FRAGMENT_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALPHA', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_LIGHTS', (this.CustomParts.Fragment_Before_Lights ? this.CustomParts.Fragment_Before_Lights : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : "")); + if (this.CustomParts.Fragment_Before_Fog) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"].replace('#define CUSTOM_FRAGMENT_BEFORE_FOG', this.CustomParts.Fragment_Before_Fog); + } + this._isCreatedShader = true; + this._createdShaderName = name; + return name; + }; + CustomMaterial.prototype.AddUniform = function (name, kind, param) { + if (!this._customUniform) { + this._customUniform = new Array(); + this._newUniforms = new Array(); + this._newSamplerInstances = {}; + this._newUniformInstances = {}; + } + if (param) { + if (kind.indexOf("sampler") != -1) { + this._newSamplerInstances[kind + "-" + name] = param; + } + else { + this._newUniformInstances[kind + "-" + name] = param; + } + } + this._customUniform.push("uniform " + kind + " " + name + ";"); + this._newUniforms.push(name); + return this; + }; + CustomMaterial.prototype.AddAttribute = function (name) { + if (!this._customAttributes) { + this._customAttributes = []; + } + this._customAttributes.push(name); + return this; + }; + CustomMaterial.prototype.Fragment_Begin = function (shaderPart) { + this.CustomParts.Fragment_Begin = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Definitions = function (shaderPart) { + this.CustomParts.Fragment_Definitions = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) { + this.CustomParts.Fragment_MainBegin = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Custom_Diffuse = function (shaderPart) { + this.CustomParts.Fragment_Custom_Diffuse = shaderPart.replace("result", "diffuseColor"); + return this; + }; + CustomMaterial.prototype.Fragment_Custom_Alpha = function (shaderPart) { + this.CustomParts.Fragment_Custom_Alpha = shaderPart.replace("result", "alpha"); + return this; + }; + CustomMaterial.prototype.Fragment_Before_Lights = function (shaderPart) { + this.CustomParts.Fragment_Before_Lights = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Before_Fog = function (shaderPart) { + this.CustomParts.Fragment_Before_Fog = shaderPart; + return this; + }; + CustomMaterial.prototype.Fragment_Before_FragColor = function (shaderPart) { + this.CustomParts.Fragment_Before_FragColor = shaderPart.replace("result", "color"); + return this; + }; + CustomMaterial.prototype.Vertex_Begin = function (shaderPart) { + this.CustomParts.Vertex_Begin = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_Definitions = function (shaderPart) { + this.CustomParts.Vertex_Definitions = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) { + this.CustomParts.Vertex_MainBegin = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated"); + return this; + }; + CustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated"); + return this; + }; + CustomMaterial.prototype.Vertex_After_WorldPosComputed = function (shaderPart) { + this.CustomParts.Vertex_After_WorldPosComputed = shaderPart; + return this; + }; + CustomMaterial.prototype.Vertex_MainEnd = function (shaderPart) { + this.CustomParts.Vertex_MainEnd = shaderPart; + return this; + }; + CustomMaterial.ShaderIndexer = 1; + return CustomMaterial; +}(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["StandardMaterial"])); + +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.CustomMaterial"] = CustomMaterial; + + +/***/ }), + +/***/ "./custom/index.ts": +/*!*************************!*\ + !*** ./custom/index.ts ***! + \*************************/ +/*! exports provided: CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _customMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./customMaterial */ "./custom/customMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _customMaterial__WEBPACK_IMPORTED_MODULE_0__["CustomMaterial"]; }); + +/* harmony import */ var _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pbrCustomMaterial */ "./custom/pbrCustomMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _pbrCustomMaterial__WEBPACK_IMPORTED_MODULE_1__["PBRCustomMaterial"]; }); + + + + + +/***/ }), + +/***/ "./custom/pbrCustomMaterial.ts": +/*!*************************************!*\ + !*** ./custom/pbrCustomMaterial.ts ***! + \*************************************/ +/*! exports provided: ShaderAlebdoParts, PBRCustomMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return ShaderAlebdoParts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return PBRCustomMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__); + + + + + +var ShaderAlebdoParts = /** @class */ (function () { + function ShaderAlebdoParts() { + } + return ShaderAlebdoParts; +}()); + +var PBRCustomMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PBRCustomMaterial, _super); + function PBRCustomMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.CustomParts = new ShaderAlebdoParts(); + _this.customShaderNameResolve = _this.Builder; + _this.FragmentShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["pbrPixelShader"]; + _this.VertexShader = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore["pbrVertexShader"]; + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockAlbedoOpacity"]); + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockReflectivity"]); + _this.FragmentShader = _this.FragmentShader.replace(/#include/g, babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].IncludesShadersStore["pbrBlockFinalColorComposition"]); + return _this; + } + PBRCustomMaterial.prototype.AttachAfterBind = function (mesh, effect) { + if (this._newUniformInstances) { + for (var el in this._newUniformInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'vec2') { + effect.setVector2(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec3') { + effect.setVector3(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'vec4') { + effect.setVector4(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'mat4') { + effect.setMatrix(ea[1], this._newUniformInstances[el]); + } + else if (ea[0] == 'float') { + effect.setFloat(ea[1], this._newUniformInstances[el]); + } + } + } + if (this._newSamplerInstances) { + for (var el in this._newSamplerInstances) { + var ea = el.toString().split('-'); + if (ea[0] == 'sampler2D' && this._newSamplerInstances[el].isReady && this._newSamplerInstances[el].isReady()) { + effect.setTexture(ea[1], this._newSamplerInstances[el]); + } + } + } + }; + PBRCustomMaterial.prototype.ReviewUniform = function (name, arr) { + if (name == "uniform" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') == -1) { + arr.push(this._newUniforms[ind]); + } + } + } + if (name == "sampler" && this._newUniforms) { + for (var ind = 0; ind < this._newUniforms.length; ind++) { + if (this._customUniform[ind].indexOf('sampler') != -1) { + arr.push(this._newUniforms[ind]); + } + } + } + return arr; + }; + PBRCustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines, attributes, options) { + var _this = this; + if (options) { + var currentProcessing_1 = options.processFinalCode; + options.processFinalCode = function (type, code) { + if (type === "vertex") { + return currentProcessing_1 ? currentProcessing_1(type, code) : code; + } + var sci = new babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["ShaderCodeInliner"](code); + sci.inlineToken = "#define pbr_inline"; + sci.processCode(); + return currentProcessing_1 ? currentProcessing_1(type, sci.code) : sci.code; + }; + } + if (attributes && this._customAttributes && this._customAttributes.length > 0) { + attributes.push.apply(attributes, this._customAttributes); + } + this.ReviewUniform("uniform", uniforms); + this.ReviewUniform("sampler", samplers); + if (this._isCreatedShader) { + return this._createdShaderName; + } + this._isCreatedShader = false; + PBRCustomMaterial.ShaderIndexer++; + var name = "custom_" + PBRCustomMaterial.ShaderIndexer; + var fn_afterBind = this._afterBind.bind(this); + this._afterBind = function (m, e) { + if (!e) { + return; + } + _this.AttachAfterBind(m, e); + try { + fn_afterBind(m, e); + } + catch (e) { } + }; + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = this.VertexShader + .replace('#define CUSTOM_VERTEX_BEGIN', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : "")) + .replace('#define CUSTOM_VERTEX_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : "")) + .replace('#define CUSTOM_VERTEX_MAIN_BEGIN', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_POSITION', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : "")) + .replace('#define CUSTOM_VERTEX_UPDATE_NORMAL', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : "")) + .replace('#define CUSTOM_VERTEX_MAIN_END', (this.CustomParts.Vertex_MainEnd ? this.CustomParts.Vertex_MainEnd : "")); + if (this.CustomParts.Vertex_After_WorldPosComputed) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "VertexShader"].replace('#define CUSTOM_VERTEX_UPDATE_WORLDPOS', this.CustomParts.Vertex_After_WorldPosComputed); + } + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = this.FragmentShader + .replace('#define CUSTOM_FRAGMENT_BEGIN', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : "")) + .replace('#define CUSTOM_FRAGMENT_MAIN_BEGIN', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : "")) + .replace('#define CUSTOM_FRAGMENT_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALBEDO', (this.CustomParts.Fragment_Custom_Albedo ? this.CustomParts.Fragment_Custom_Albedo : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_ALPHA', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_LIGHTS', (this.CustomParts.Fragment_Before_Lights ? this.CustomParts.Fragment_Before_Lights : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS', (this.CustomParts.Fragment_Custom_MetallicRoughness ? this.CustomParts.Fragment_Custom_MetallicRoughness : "")) + .replace('#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE', (this.CustomParts.Fragment_Custom_MicroSurface ? this.CustomParts.Fragment_Custom_MicroSurface : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION', (this.CustomParts.Fragment_Before_FinalColorComposition ? this.CustomParts.Fragment_Before_FinalColorComposition : "")) + .replace('#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : "")); + if (this.CustomParts.Fragment_Before_Fog) { + babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"] = babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["Effect"].ShadersStore[name + "PixelShader"].replace('#define CUSTOM_FRAGMENT_BEFORE_FOG', this.CustomParts.Fragment_Before_Fog); + } + this._isCreatedShader = true; + this._createdShaderName = name; + return name; + }; + PBRCustomMaterial.prototype.AddUniform = function (name, kind, param) { + if (!this._customUniform) { + this._customUniform = new Array(); + this._newUniforms = new Array(); + this._newSamplerInstances = {}; + this._newUniformInstances = {}; + } + if (param) { + if (kind.indexOf("sampler") != -1) { + this._newSamplerInstances[kind + "-" + name] = param; + } + else { + this._newUniformInstances[kind + "-" + name] = param; + } + } + this._customUniform.push("uniform " + kind + " " + name + ";"); + this._newUniforms.push(name); + return this; + }; + PBRCustomMaterial.prototype.AddAttribute = function (name) { + if (!this._customAttributes) { + this._customAttributes = []; + } + this._customAttributes.push(name); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Begin = function (shaderPart) { + this.CustomParts.Fragment_Begin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Definitions = function (shaderPart) { + this.CustomParts.Fragment_Definitions = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) { + this.CustomParts.Fragment_MainBegin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_Albedo = function (shaderPart) { + this.CustomParts.Fragment_Custom_Albedo = shaderPart.replace("result", "surfaceAlbedo"); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_Alpha = function (shaderPart) { + this.CustomParts.Fragment_Custom_Alpha = shaderPart.replace("result", "alpha"); + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_Lights = function (shaderPart) { + this.CustomParts.Fragment_Before_Lights = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_MetallicRoughness = function (shaderPart) { + this.CustomParts.Fragment_Custom_MetallicRoughness = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Custom_MicroSurface = function (shaderPart) { + this.CustomParts.Fragment_Custom_MicroSurface = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_Fog = function (shaderPart) { + this.CustomParts.Fragment_Before_Fog = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_FinalColorComposition = function (shaderPart) { + this.CustomParts.Fragment_Before_FinalColorComposition = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Fragment_Before_FragColor = function (shaderPart) { + this.CustomParts.Fragment_Before_FragColor = shaderPart.replace("result", "color"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_Begin = function (shaderPart) { + this.CustomParts.Vertex_Begin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_Definitions = function (shaderPart) { + this.CustomParts.Vertex_Definitions = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) { + this.CustomParts.Vertex_MainBegin = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) { + this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated"); + return this; + }; + PBRCustomMaterial.prototype.Vertex_After_WorldPosComputed = function (shaderPart) { + this.CustomParts.Vertex_After_WorldPosComputed = shaderPart; + return this; + }; + PBRCustomMaterial.prototype.Vertex_MainEnd = function (shaderPart) { + this.CustomParts.Vertex_MainEnd = shaderPart; + return this; + }; + PBRCustomMaterial.ShaderIndexer = 1; + return PBRCustomMaterial; +}(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["PBRMaterial"])); + +babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.PBRCustomMaterial"] = PBRCustomMaterial; + + +/***/ }), + +/***/ "./fire/fire.fragment.ts": +/*!*******************************!*\ + !*** ./fire/fire.fragment.ts ***! + \*******************************/ +/*! exports provided: firePixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firePixelShader", function() { return firePixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + +var name = 'firePixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n\nuniform sampler2D distortionSampler;\nuniform sampler2D opacitySampler;\n#ifdef DIFFUSE\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n#endif\n#include\n\n#include\nvec4 bx2(vec4 x)\n{\nreturn vec4(2.0)*x-vec4(1.0);\n}\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\n\nfloat alpha=1.0;\n#ifdef DIFFUSE\n\nconst float distortionAmount0=0.092;\nconst float distortionAmount1=0.092;\nconst float distortionAmount2=0.092;\nvec2 heightAttenuation=vec2(0.3,0.39);\nvec4 noise0=texture2D(distortionSampler,vDistortionCoords1);\nvec4 noise1=texture2D(distortionSampler,vDistortionCoords2);\nvec4 noise2=texture2D(distortionSampler,vDistortionCoords3);\nvec4 noiseSum=bx2(noise0)*distortionAmount0+bx2(noise1)*distortionAmount1+bx2(noise2)*distortionAmount2;\nvec4 perturbedBaseCoords=vec4(vDiffuseUV,0.0,1.0)+noiseSum*(vDiffuseUV.y*heightAttenuation.x+heightAttenuation.y);\nvec4 opacityColor=texture2D(opacitySampler,perturbedBaseCoords.xy);\n#ifdef ALPHATEST\nif (opacityColor.r<0.1)\ndiscard;\n#endif\n#include\nbaseColor=texture2D(diffuseSampler,perturbedBaseCoords.xy)*2.0;\nbaseColor*=opacityColor;\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(1.0,1.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n\nvec4 color=vec4(baseColor.rgb,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var firePixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fire/fire.vertex.ts": +/*!*****************************!*\ + !*** ./fire/fire.vertex.ts ***! + \*****************************/ +/*! exports provided: fireVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fireVertexShader", function() { return fireVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + +var name = 'fireVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n\nuniform float time;\nuniform float speed;\n#ifdef DIFFUSE\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n#endif\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n\n#ifdef DIFFUSE\nvDiffuseUV=uv;\nvDiffuseUV.y-=0.2;\n#endif\n\n#include\n\n#include\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n#ifdef DIFFUSE\n\nvec3 layerSpeed=vec3(-0.2,-0.52,-0.1)*speed;\nvDistortionCoords1.x=uv.x;\nvDistortionCoords1.y=uv.y+layerSpeed.x*time/1000.0;\nvDistortionCoords2.x=uv.x;\nvDistortionCoords2.y=uv.y+layerSpeed.y*time/1000.0;\nvDistortionCoords3.x=uv.x;\nvDistortionCoords3.y=uv.y+layerSpeed.z*time/1000.0;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var fireVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fire/fireMaterial.ts": +/*!******************************!*\ + !*** ./fire/fireMaterial.ts ***! + \******************************/ +/*! exports provided: FireMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return FireMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _fire_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire.fragment */ "./fire/fire.fragment.ts"); +/* harmony import */ var _fire_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fire.vertex */ "./fire/fire.vertex.ts"); + + + + + + + + + + + + + + + +var FireMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FireMaterialDefines, _super); + function FireMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.UV1 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.BonesPerMesh = 0; + _this.NUM_BONE_INFLUENCERS = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return FireMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var FireMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FireMaterial, _super); + function FireMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.speed = 1.0; + _this._scaledDiffuse = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](); + _this._lastTime = 0; + return _this; + } + FireMaterial.prototype.needAlphaBlending = function () { + return false; + }; + FireMaterial.prototype.needAlphaTesting = function () { + return true; + }; + FireMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + FireMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new FireMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + defines.ALPHATEST = this._opacityTexture ? true : false; + // Misc. + if (defines._areMiscDirty) { + defines.POINTSIZE = (this.pointsCloud || scene.forcePointsCloud); + defines.FOG = (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE && this.fogEnabled); + } + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "fire"; + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: ["world", "view", "viewProjection", "vEyePosition", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + // Fire + "time", "speed" + ], + uniformBuffersNames: [], + samplers: ["diffuseSampler", + // Fire + "distortionSampler", "opacitySampler" + ], + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: null, + maxSimultaneousLights: 4, + transformFeedbackVaryings: null + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + FireMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + this._activeEffect.setTexture("distortionSampler", this._distortionTexture); + this._activeEffect.setTexture("opacitySampler", this._opacityTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this._scaledDiffuse, this.alpha * mesh.visibility); + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Time + this._lastTime += scene.getEngine().getDeltaTime(); + this._activeEffect.setFloat("time", this._lastTime); + // Speed + this._activeEffect.setFloat("speed", this.speed); + this._afterBind(mesh, this._activeEffect); + }; + FireMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + if (this._distortionTexture && this._distortionTexture.animations && this._distortionTexture.animations.length > 0) { + results.push(this._distortionTexture); + } + if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) { + results.push(this._opacityTexture); + } + return results; + }; + FireMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + if (this._distortionTexture) { + activeTextures.push(this._distortionTexture); + } + if (this._opacityTexture) { + activeTextures.push(this._opacityTexture); + } + return activeTextures; + }; + FireMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._diffuseTexture === texture) { + return true; + } + if (this._distortionTexture === texture) { + return true; + } + if (this._opacityTexture === texture) { + return true; + } + return false; + }; + FireMaterial.prototype.getClassName = function () { + return "FireMaterial"; + }; + FireMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + if (this._distortionTexture) { + this._distortionTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + FireMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FireMaterial(name, _this.getScene()); }, this); + }; + FireMaterial.prototype.serialize = function () { + var serializationObject = _super.prototype.serialize.call(this); + serializationObject.customType = "BABYLON.FireMaterial"; + serializationObject.diffuseColor = this.diffuseColor.asArray(); + serializationObject.speed = this.speed; + if (this._diffuseTexture) { + serializationObject._diffuseTexture = this._diffuseTexture.serialize(); + } + if (this._distortionTexture) { + serializationObject._distortionTexture = this._distortionTexture.serialize(); + } + if (this._opacityTexture) { + serializationObject._opacityTexture = this._opacityTexture.serialize(); + } + return serializationObject; + }; + FireMaterial.Parse = function (source, scene, rootUrl) { + var material = new FireMaterial(source.name, scene); + material.diffuseColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].FromArray(source.diffuseColor); + material.speed = source.speed; + material.alpha = source.alpha; + material.id = source.id; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].AddTagsTo(material, source.tags); + material.backFaceCulling = source.backFaceCulling; + material.wireframe = source.wireframe; + if (source._diffuseTexture) { + material._diffuseTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._diffuseTexture, scene, rootUrl); + } + if (source._distortionTexture) { + material._distortionTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._distortionTexture, scene, rootUrl); + } + if (source._opacityTexture) { + material._opacityTexture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].Parse(source._opacityTexture, scene, rootUrl); + } + return material; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], FireMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("distortionTexture") + ], FireMaterial.prototype, "_distortionTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "distortionTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("opacityTexture") + ], FireMaterial.prototype, "_opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FireMaterial.prototype, "opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], FireMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FireMaterial.prototype, "speed", void 0); + return FireMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.FireMaterial"] = FireMaterial; + + +/***/ }), + +/***/ "./fire/index.ts": +/*!***********************!*\ + !*** ./fire/index.ts ***! + \***********************/ +/*! exports provided: FireMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _fireMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireMaterial */ "./fire/fireMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _fireMaterial__WEBPACK_IMPORTED_MODULE_0__["FireMaterial"]; }); + + + + +/***/ }), + +/***/ "./fur/fur.fragment.ts": +/*!*****************************!*\ + !*** ./fur/fur.fragment.ts ***! + \*****************************/ +/*! exports provided: furPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furPixelShader", function() { return furPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'furPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nuniform vec4 furColor;\nuniform float furLength;\nvarying vec3 vPositionW;\nvarying float vfur_length;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n\n#ifdef HIGHLEVEL\nuniform float furOffset;\nuniform float furOcclusion;\nuniform sampler2D furTexture;\nvarying vec2 vFurUV;\n#endif\n#include\n#include\n#include\n#include\nfloat Rand(vec3 rv) {\nfloat x=dot(rv,vec3(12.9898,78.233,24.65487));\nreturn fract(sin(x)*43758.5453);\n}\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=furColor;\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor*=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef HIGHLEVEL\n\nvec4 furTextureColor=texture2D(furTexture,vec2(vFurUV.x,vFurUV.y));\nif (furTextureColor.a<=0.0 || furTextureColor.g[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase.rgb*baseColor.rgb,0.0,1.0);\n\n#ifdef HIGHLEVEL\nvec4 color=vec4(finalDiffuse,alpha);\n#else\nfloat r=vfur_length/furLength*0.5;\nvec4 color=vec4(finalDiffuse*(0.5+r),alpha);\n#endif\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var furPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fur/fur.vertex.ts": +/*!***************************!*\ + !*** ./fur/fur.vertex.ts ***! + \***************************/ +/*! exports provided: furVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "furVertexShader", function() { return furVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'furVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\nuniform float furLength;\nuniform float furAngle;\n#ifdef HIGHLEVEL\nuniform float furOffset;\nuniform vec3 furGravity;\nuniform float furTime;\nuniform float furSpacing;\nuniform float furDensity;\n#endif\n#ifdef HEIGHTMAP\nuniform sampler2D heightTexture;\n#endif\n#ifdef HIGHLEVEL\nvarying vec2 vFurUV;\n#endif\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\nvarying float vfur_length;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nfloat Rand(vec3 rv) {\nfloat x=dot(rv,vec3(12.9898,78.233,24.65487));\nreturn fract(sin(x)*43758.5453);\n}\nvoid main(void) {\n#include\n#include\n\nfloat r=Rand(position);\n#ifdef HEIGHTMAP\n#if __VERSION__>100\nvfur_length=furLength*texture(heightTexture,uv).x;\n#else\nvfur_length=furLength*texture2D(heightTexture,uv).r;\n#endif\n#else\nvfur_length=(furLength*r);\n#endif\nvec3 tangent1=vec3(normal.y,-normal.x,0);\nvec3 tangent2=vec3(-normal.z,0,normal.x);\nr=Rand(tangent1*r);\nfloat J=(2.0+4.0*r);\nr=Rand(tangent2*r);\nfloat K=(2.0+2.0*r);\ntangent1=tangent1*J+tangent2*K;\ntangent1=normalize(tangent1);\nvec3 newPosition=position+normal*vfur_length*cos(furAngle)+tangent1*vfur_length*sin(furAngle);\n#ifdef HIGHLEVEL\n\nvec3 forceDirection=vec3(0.0,0.0,0.0);\nforceDirection.x=sin(furTime+position.x*0.05)*0.2;\nforceDirection.y=cos(furTime*0.7+position.y*0.04)*0.2;\nforceDirection.z=sin(furTime*0.7+position.z*0.04)*0.2;\nvec3 displacement=vec3(0.0,0.0,0.0);\ndisplacement=furGravity+forceDirection;\nfloat displacementFactor=pow(furOffset,3.0);\nvec3 aNormal=normal;\naNormal.xyz+=displacement*displacementFactor;\nnewPosition=vec3(newPosition.x,newPosition.y,newPosition.z)+(normalize(aNormal)*furOffset*furSpacing);\n#endif\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\ngl_Position=viewProjection*finalWorld*vec4(newPosition,1.0);\nvec4 worldPos=finalWorld*vec4(newPosition,1.0);\nvPositionW=vec3(worldPos);\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#ifdef HIGHLEVEL\nvFurUV=vDiffuseUV*furDensity;\n#endif\n#else\n#ifdef HIGHLEVEL\nvFurUV=uv*furDensity;\n#endif\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var furVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./fur/furMaterial.ts": +/*!****************************!*\ + !*** ./fur/furMaterial.ts ***! + \****************************/ +/*! exports provided: FurMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return FurMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _fur_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fur.fragment */ "./fur/fur.fragment.ts"); +/* harmony import */ var _fur_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur.vertex */ "./fur/fur.vertex.ts"); + + + + + + + + + + + + + + + + + +var FurMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FurMaterialDefines, _super); + function FurMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.HEIGHTMAP = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.HIGHLEVEL = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return FurMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var FurMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(FurMaterial, _super); + function FurMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.furLength = 1; + _this.furAngle = 0; + _this.furColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.44, 0.21, 0.02); + _this.furOffset = 0.0; + _this.furSpacing = 12; + _this.furGravity = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 0, 0); + _this.furSpeed = 100; + _this.furDensity = 20; + _this.furOcclusion = 0.0; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + _this.highLevelFur = true; + _this._furTime = 0; + return _this; + } + Object.defineProperty(FurMaterial.prototype, "furTime", { + get: function () { + return this._furTime; + }, + set: function (furTime) { + this._furTime = furTime; + }, + enumerable: false, + configurable: true + }); + FurMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + FurMaterial.prototype.needAlphaTesting = function () { + return false; + }; + FurMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + FurMaterial.prototype.updateFur = function () { + for (var i = 1; i < this._meshes.length; i++) { + var offsetFur = this._meshes[i].material; + offsetFur.furLength = this.furLength; + offsetFur.furAngle = this.furAngle; + offsetFur.furGravity = this.furGravity; + offsetFur.furSpacing = this.furSpacing; + offsetFur.furSpeed = this.furSpeed; + offsetFur.furColor = this.furColor; + offsetFur.diffuseTexture = this.diffuseTexture; + offsetFur.furTexture = this.furTexture; + offsetFur.highLevelFur = this.highLevelFur; + offsetFur.furTime = this.furTime; + offsetFur.furDensity = this.furDensity; + } + }; + // Methods + FurMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new FurMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + if (scene.texturesEnabled) { + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this.diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + if (this.heightTexture && engine.getCaps().maxVertexTextureImageUnits) { + if (!this.heightTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.HEIGHTMAP = true; + } + } + } + } + // High level + if (this.highLevelFur !== defines.HIGHLEVEL) { + defines.HIGHLEVEL = true; + defines.markAsUnprocessed(); + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "fur"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + "furLength", "furAngle", "furColor", "furOffset", "furGravity", "furTime", "furSpacing", "furDensity", "furOcclusion" + ]; + var samplers = ["diffuseSampler", + "heightTexture", "furTexture" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + FurMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (scene.getCachedMaterial() !== this) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + if (this._heightTexture) { + this._activeEffect.setTexture("heightTexture", this._heightTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._activeEffect.setFloat("furLength", this.furLength); + this._activeEffect.setFloat("furAngle", this.furAngle); + this._activeEffect.setColor4("furColor", this.furColor, 1.0); + if (this.highLevelFur) { + this._activeEffect.setVector3("furGravity", this.furGravity); + this._activeEffect.setFloat("furOffset", this.furOffset); + this._activeEffect.setFloat("furSpacing", this.furSpacing); + this._activeEffect.setFloat("furDensity", this.furDensity); + this._activeEffect.setFloat("furOcclusion", this.furOcclusion); + this._furTime += this.getScene().getEngine().getDeltaTime() / this.furSpeed; + this._activeEffect.setFloat("furTime", this._furTime); + this._activeEffect.setTexture("furTexture", this.furTexture); + } + this._afterBind(mesh, this._activeEffect); + }; + FurMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + if (this.heightTexture && this.heightTexture.animations && this.heightTexture.animations.length > 0) { + results.push(this.heightTexture); + } + return results; + }; + FurMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + if (this._heightTexture) { + activeTextures.push(this._heightTexture); + } + return activeTextures; + }; + FurMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + if (this._heightTexture === texture) { + return true; + } + return false; + }; + FurMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + if (this._meshes) { + for (var i = 1; i < this._meshes.length; i++) { + var mat = this._meshes[i].material; + if (mat) { + mat.dispose(forceDisposeEffect); + } + this._meshes[i].dispose(); + } + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + FurMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FurMaterial(name, _this.getScene()); }, this); + }; + FurMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.FurMaterial"; + if (this._meshes) { + serializationObject.sourceMeshName = this._meshes[0].name; + serializationObject.quality = this._meshes.length; + } + return serializationObject; + }; + FurMaterial.prototype.getClassName = function () { + return "FurMaterial"; + }; + // Statics + FurMaterial.Parse = function (source, scene, rootUrl) { + var material = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new FurMaterial(source.name, scene); }, source, scene, rootUrl); + if (source.sourceMeshName && material.highLevelFur) { + scene.executeWhenReady(function () { + var sourceMesh = scene.getMeshByName(source.sourceMeshName); + if (sourceMesh) { + var furTexture = FurMaterial.GenerateTexture("Fur Texture", scene); + material.furTexture = furTexture; + FurMaterial.FurifyMesh(sourceMesh, source.quality); + } + }); + } + return material; + }; + FurMaterial.GenerateTexture = function (name, scene) { + // Generate fur textures + var texture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["DynamicTexture"]("FurTexture " + name, 256, scene, true); + var context = texture.getContext(); + for (var i = 0; i < 20000; ++i) { + context.fillStyle = "rgba(255, " + Math.floor(Math.random() * 255) + ", " + Math.floor(Math.random() * 255) + ", 1)"; + context.fillRect((Math.random() * texture.getSize().width), (Math.random() * texture.getSize().height), 2, 2); + } + texture.update(false); + texture.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].WRAP_ADDRESSMODE; + texture.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].WRAP_ADDRESSMODE; + return texture; + }; + // Creates and returns an array of meshes used as shells for the Fur Material + // that can be disposed later in your code + // The quality is in interval [0, 100] + FurMaterial.FurifyMesh = function (sourceMesh, quality) { + var meshes = [sourceMesh]; + var mat = sourceMesh.material; + var i; + if (!(mat instanceof FurMaterial)) { + throw "The material of the source mesh must be a Fur Material"; + } + for (i = 1; i < quality; i++) { + var offsetFur = new FurMaterial(mat.name + i, sourceMesh.getScene()); + sourceMesh.getScene().materials.pop(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].EnableFor(offsetFur); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Tags"].AddTagsTo(offsetFur, "furShellMaterial"); + offsetFur.furLength = mat.furLength; + offsetFur.furAngle = mat.furAngle; + offsetFur.furGravity = mat.furGravity; + offsetFur.furSpacing = mat.furSpacing; + offsetFur.furSpeed = mat.furSpeed; + offsetFur.furColor = mat.furColor; + offsetFur.diffuseTexture = mat.diffuseTexture; + offsetFur.furOffset = i / quality; + offsetFur.furTexture = mat.furTexture; + offsetFur.highLevelFur = mat.highLevelFur; + offsetFur.furTime = mat.furTime; + offsetFur.furDensity = mat.furDensity; + var offsetMesh = sourceMesh.clone(sourceMesh.name + i); + offsetMesh.material = offsetFur; + offsetMesh.skeleton = sourceMesh.skeleton; + offsetMesh.position = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + meshes.push(offsetMesh); + } + for (i = 1; i < meshes.length; i++) { + meshes[i].parent = sourceMesh; + } + sourceMesh.material._meshes = meshes; + return meshes; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], FurMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FurMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("heightTexture") + ], FurMaterial.prototype, "_heightTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], FurMaterial.prototype, "heightTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], FurMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furLength", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furAngle", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], FurMaterial.prototype, "furColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furOffset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furSpacing", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], FurMaterial.prototype, "furGravity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furDensity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furOcclusion", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], FurMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], FurMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], FurMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], FurMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "highLevelFur", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], FurMaterial.prototype, "furTime", null); + return FurMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.FurMaterial"] = FurMaterial; + + +/***/ }), + +/***/ "./fur/index.ts": +/*!**********************!*\ + !*** ./fur/index.ts ***! + \**********************/ +/*! exports provided: FurMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _furMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./furMaterial */ "./fur/furMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _furMaterial__WEBPACK_IMPORTED_MODULE_0__["FurMaterial"]; }); + + + + +/***/ }), + +/***/ "./gradient/gradient.fragment.ts": +/*!***************************************!*\ + !*** ./gradient/gradient.fragment.ts ***! + \***************************************/ +/*! exports provided: gradientPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientPixelShader", function() { return gradientPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'gradientPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\n\nuniform vec4 topColor;\nuniform vec4 bottomColor;\nuniform float offset;\nuniform float scale;\nuniform float smoothness;\n\nvarying vec3 vPositionW;\nvarying vec3 vPosition;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\nfloat h=vPosition.y*scale+offset;\nfloat mysmoothness=clamp(smoothness,0.01,max(smoothness,10.));\nvec4 baseColor=mix(bottomColor,topColor,max(pow(max(h,0.0),mysmoothness),0.0));\n\nvec3 diffuseColor=baseColor.rgb;\n\nfloat alpha=baseColor.a;\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\n#ifdef EMISSIVE\nvec3 diffuseBase=baseColor.rgb;\n#else\nvec3 diffuseBase=vec3(0.,0.,0.);\n#endif\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var gradientPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./gradient/gradient.vertex.ts": +/*!*************************************!*\ + !*** ./gradient/gradient.vertex.ts ***! + \*************************************/ +/*! exports provided: gradientVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gradientVertexShader", function() { return gradientVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'gradientVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\nvarying vec3 vPosition;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\nvPosition=position;\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var gradientVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./gradient/gradientMaterial.ts": +/*!**************************************!*\ + !*** ./gradient/gradientMaterial.ts ***! + \**************************************/ +/*! exports provided: GradientMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return GradientMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _gradient_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gradient.fragment */ "./gradient/gradient.fragment.ts"); +/* harmony import */ var _gradient_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gradient.vertex */ "./gradient/gradient.vertex.ts"); + + + + + + + + + + + + +var GradientMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GradientMaterialDefines, _super); + function GradientMaterialDefines() { + var _this = _super.call(this) || this; + _this.EMISSIVE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return GradientMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var GradientMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GradientMaterial, _super); + function GradientMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this._maxSimultaneousLights = 4; + // The gradient top color, red by default + _this.topColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 0, 0); + _this.topColorAlpha = 1.0; + // The gradient top color, blue by default + _this.bottomColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 1); + _this.bottomColorAlpha = 1.0; + // Gradient offset + _this.offset = 0; + _this.scale = 1.0; + _this.smoothness = 1.0; + _this._disableLighting = false; + return _this; + } + GradientMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0 || this.topColorAlpha < 1.0 || this.bottomColorAlpha < 1.0); + }; + GradientMaterial.prototype.needAlphaTesting = function () { + return true; + }; + GradientMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + GradientMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new GradientMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + defines.EMISSIVE = this._disableLighting; + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "gradient"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", + "vFogInfos", "vFogColor", "pointSize", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "topColor", "bottomColor", "offset", "smoothness", "scale" + ]; + var samplers = []; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 4 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 4 } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + GradientMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, effect); + if (this._mustRebind(scene, effect)) { + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(effect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._activeEffect.setColor4("topColor", this.topColor, this.topColorAlpha); + this._activeEffect.setColor4("bottomColor", this.bottomColor, this.bottomColorAlpha); + this._activeEffect.setFloat("offset", this.offset); + this._activeEffect.setFloat("scale", this.scale); + this._activeEffect.setFloat("smoothness", this.smoothness); + this._afterBind(mesh, this._activeEffect); + }; + GradientMaterial.prototype.getAnimatables = function () { + return []; + }; + GradientMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + GradientMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new GradientMaterial(name, _this.getScene()); }, this); + }; + GradientMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.GradientMaterial"; + return serializationObject; + }; + GradientMaterial.prototype.getClassName = function () { + return "GradientMaterial"; + }; + // Statics + GradientMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new GradientMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], GradientMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], GradientMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GradientMaterial.prototype, "topColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "topColorAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GradientMaterial.prototype, "bottomColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "bottomColorAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "offset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "scale", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GradientMaterial.prototype, "smoothness", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], GradientMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], GradientMaterial.prototype, "disableLighting", void 0); + return GradientMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.GradientMaterial"] = GradientMaterial; + + +/***/ }), + +/***/ "./gradient/index.ts": +/*!***************************!*\ + !*** ./gradient/index.ts ***! + \***************************/ +/*! exports provided: GradientMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _gradientMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gradientMaterial */ "./gradient/gradientMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _gradientMaterial__WEBPACK_IMPORTED_MODULE_0__["GradientMaterial"]; }); + + + + +/***/ }), + +/***/ "./grid/grid.fragment.ts": +/*!*******************************!*\ + !*** ./grid/grid.fragment.ts ***! + \*******************************/ +/*! exports provided: gridPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridPixelShader", function() { return gridPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + +var name = 'gridPixelShader'; +var shader = "#extension GL_OES_standard_derivatives : enable\n#define SQRT2 1.41421356\n#define PI 3.14159\nprecision highp float;\nuniform float visibility;\nuniform vec3 mainColor;\nuniform vec3 lineColor;\nuniform vec4 gridControl;\nuniform vec3 gridOffset;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include\n\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform sampler2D opacitySampler;\nuniform vec2 vOpacityInfos;\n#endif\nfloat getDynamicVisibility(float position) {\n\nfloat majorGridFrequency=gridControl.y;\nif (floor(position+0.5) == floor(position/majorGridFrequency+0.5)*majorGridFrequency)\n{\nreturn 1.0;\n}\nreturn gridControl.z;\n}\nfloat getAnisotropicAttenuation(float differentialLength) {\nconst float maxNumberOfLines=10.0;\nreturn clamp(1.0/(differentialLength+1.0)-1.0/maxNumberOfLines,0.0,1.0);\n}\nfloat isPointOnLine(float position,float differentialLength) {\nfloat fractionPartOfPosition=position-floor(position+0.5);\nfractionPartOfPosition/=differentialLength;\nfractionPartOfPosition=clamp(fractionPartOfPosition,-1.,1.);\nfloat result=0.5+0.5*cos(fractionPartOfPosition*PI);\nreturn result;\n}\nfloat contributionOnAxis(float position) {\nfloat differentialLength=length(vec2(dFdx(position),dFdy(position)));\ndifferentialLength*=SQRT2;\n\nfloat result=isPointOnLine(position,differentialLength);\n\nfloat dynamicVisibility=getDynamicVisibility(position);\nresult*=dynamicVisibility;\n\nfloat anisotropicAttenuation=getAnisotropicAttenuation(differentialLength);\nresult*=anisotropicAttenuation;\nreturn result;\n}\nfloat normalImpactOnAxis(float x) {\nfloat normalImpact=clamp(1.0-3.0*abs(x*x*x),0.0,1.0);\nreturn normalImpact;\n}\nvoid main(void) {\n\nfloat gridRatio=gridControl.x;\nvec3 gridPos=(vPosition+gridOffset.xyz)/gridRatio;\n\nfloat x=contributionOnAxis(gridPos.x);\nfloat y=contributionOnAxis(gridPos.y);\nfloat z=contributionOnAxis(gridPos.z);\n\nvec3 normal=normalize(vNormal);\nx*=normalImpactOnAxis(normal.x);\ny*=normalImpactOnAxis(normal.y);\nz*=normalImpactOnAxis(normal.z);\n\nfloat grid=clamp(x+y+z,0.,1.);\n\nvec3 color=mix(mainColor,lineColor,grid);\n#ifdef FOG\n#include\n#endif\nfloat opacity=1.0;\n#ifdef TRANSPARENT\nopacity=clamp(grid,0.08,gridControl.w*grid);\n#endif\n#ifdef OPACITY\nopacity*=texture2D(opacitySampler,vOpacityUV).a;\n#endif\n\ngl_FragColor=vec4(color.rgb,opacity*visibility);\n#ifdef TRANSPARENT\n#ifdef PREMULTIPLYALPHA\ngl_FragColor.rgb*=opacity;\n#endif\n#else\n#endif\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var gridPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./grid/grid.vertex.ts": +/*!*****************************!*\ + !*** ./grid/grid.vertex.ts ***! + \*****************************/ +/*! exports provided: gridVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridVertexShader", function() { return gridVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + +var name = 'gridVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#include\n\nuniform mat4 projection;\nuniform mat4 view;\n\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\nvoid main(void) {\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include\nvec4 cameraSpacePosition=view*worldPos;\ngl_Position=projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\nvPosition=position;\nvNormal=normal;\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var gridVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./grid/gridMaterial.ts": +/*!******************************!*\ + !*** ./grid/gridMaterial.ts ***! + \******************************/ +/*! exports provided: GridMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return GridMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _grid_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./grid.fragment */ "./grid/grid.fragment.ts"); +/* harmony import */ var _grid_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grid.vertex */ "./grid/grid.vertex.ts"); + + + + + + + + + + + + +var GridMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GridMaterialDefines, _super); + function GridMaterialDefines() { + var _this = _super.call(this) || this; + _this.OPACITY = false; + _this.TRANSPARENT = false; + _this.FOG = false; + _this.PREMULTIPLYALPHA = false; + _this.UV1 = false; + _this.UV2 = false; + _this.INSTANCES = false; + _this.THIN_INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return GridMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +/** + * The grid materials allows you to wrap any shape with a grid. + * Colors are customizable. + */ +var GridMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(GridMaterial, _super); + /** + * constructor + * @param name The name given to the material in order to identify it afterwards. + * @param scene The scene the material is used in. + */ + function GridMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Main color of the grid (e.g. between lines) + */ + _this.mainColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + /** + * Color of the grid lines. + */ + _this.lineColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Teal(); + /** + * The scale of the grid compared to unit. + */ + _this.gridRatio = 1.0; + /** + * Allows setting an offset for the grid lines. + */ + _this.gridOffset = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + /** + * The frequency of thicker lines. + */ + _this.majorUnitFrequency = 10; + /** + * The visibility of minor units in the grid. + */ + _this.minorUnitVisibility = 0.33; + /** + * The grid opacity outside of the lines. + */ + _this.opacity = 1.0; + /** + * Determine RBG output is premultiplied by alpha value. + */ + _this.preMultiplyAlpha = false; + _this._gridControl = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector4"](_this.gridRatio, _this.majorUnitFrequency, _this.minorUnitVisibility, _this.opacity); + return _this; + } + /** + * Returns wehter or not the grid requires alpha blending. + */ + GridMaterial.prototype.needAlphaBlending = function () { + return this.opacity < 1.0 || this._opacityTexture && this._opacityTexture.isReady(); + }; + GridMaterial.prototype.needAlphaBlendingForMesh = function (mesh) { + return mesh.visibility < 1.0 || this.needAlphaBlending(); + }; + GridMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new GridMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + if (defines.TRANSPARENT !== (this.opacity < 1.0)) { + defines.TRANSPARENT = !defines.TRANSPARENT; + defines.markAsUnprocessed(); + } + if (defines.PREMULTIPLYALPHA != this.preMultiplyAlpha) { + defines.PREMULTIPLYALPHA = !defines.PREMULTIPLYALPHA; + defines.markAsUnprocessed(); + } + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._opacityTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].OpacityTextureEnabled) { + if (!this._opacityTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.OPACITY = true; + } + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, false, this.fogEnabled, false, defines); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, scene.getEngine(), defines, !!useInstances); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Attributes + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, false); + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind]; + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Defines + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect("grid", attribs, ["projection", "mainColor", "lineColor", "gridControl", "gridOffset", "vFogInfos", "vFogColor", "world", "view", + "opacityMatrix", "vOpacityInfos", "visibility"], ["opacitySampler"], join, undefined, this.onCompiled, this.onError), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + GridMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + this._activeEffect.setFloat("visibility", mesh.visibility); + // Matrices + if (!defines.INSTANCES || defines.THIN_INSTANCE) { + this.bindOnlyWorldMatrix(world); + } + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + this._activeEffect.setMatrix("projection", scene.getProjectionMatrix()); + // Uniforms + if (this._mustRebind(scene, effect)) { + this._activeEffect.setColor3("mainColor", this.mainColor); + this._activeEffect.setColor3("lineColor", this.lineColor); + this._activeEffect.setVector3("gridOffset", this.gridOffset); + this._gridControl.x = this.gridRatio; + this._gridControl.y = Math.round(this.majorUnitFrequency); + this._gridControl.z = this.minorUnitVisibility; + this._gridControl.w = this.opacity; + this._activeEffect.setVector4("gridControl", this._gridControl); + if (this._opacityTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].OpacityTextureEnabled) { + this._activeEffect.setTexture("opacitySampler", this._opacityTexture); + this._activeEffect.setFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level); + this._activeEffect.setMatrix("opacityMatrix", this._opacityTexture.getTextureMatrix()); + } + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + /** + * Dispose the material and its associated resources. + * @param forceDisposeEffect will also dispose the used effect when true + */ + GridMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + GridMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new GridMaterial(name, _this.getScene()); }, this); + }; + GridMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.GridMaterial"; + return serializationObject; + }; + GridMaterial.prototype.getClassName = function () { + return "GridMaterial"; + }; + GridMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new GridMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GridMaterial.prototype, "mainColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], GridMaterial.prototype, "lineColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "gridRatio", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], GridMaterial.prototype, "gridOffset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "majorUnitFrequency", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "minorUnitVisibility", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "opacity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], GridMaterial.prototype, "preMultiplyAlpha", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("opacityTexture") + ], GridMaterial.prototype, "_opacityTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], GridMaterial.prototype, "opacityTexture", void 0); + return GridMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.GridMaterial"] = GridMaterial; + + +/***/ }), + +/***/ "./grid/index.ts": +/*!***********************!*\ + !*** ./grid/index.ts ***! + \***********************/ +/*! exports provided: GridMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _gridMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gridMaterial */ "./grid/gridMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _gridMaterial__WEBPACK_IMPORTED_MODULE_0__["GridMaterial"]; }); + + + + +/***/ }), + +/***/ "./index.ts": +/*!******************!*\ + !*** ./index.ts ***! + \******************/ +/*! exports provided: CellMaterial, CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial, FireMaterial, FurMaterial, GradientMaterial, GridMaterial, LavaMaterial, MixMaterial, NormalMaterial, ShadowOnlyMaterial, SimpleMaterial, SkyMaterial, TerrainMaterial, TriPlanarMaterial, WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell */ "./cell/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _cell__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + +/* harmony import */ var _custom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./custom */ "./custom/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["CustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _custom__WEBPACK_IMPORTED_MODULE_1__["PBRCustomMaterial"]; }); + +/* harmony import */ var _fire__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire */ "./fire/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _fire__WEBPACK_IMPORTED_MODULE_2__["FireMaterial"]; }); + +/* harmony import */ var _fur__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fur */ "./fur/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _fur__WEBPACK_IMPORTED_MODULE_3__["FurMaterial"]; }); + +/* harmony import */ var _gradient__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gradient */ "./gradient/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _gradient__WEBPACK_IMPORTED_MODULE_4__["GradientMaterial"]; }); + +/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./grid */ "./grid/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _grid__WEBPACK_IMPORTED_MODULE_5__["GridMaterial"]; }); + +/* harmony import */ var _lava__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lava */ "./lava/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _lava__WEBPACK_IMPORTED_MODULE_6__["LavaMaterial"]; }); + +/* harmony import */ var _mix__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mix */ "./mix/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _mix__WEBPACK_IMPORTED_MODULE_7__["MixMaterial"]; }); + +/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./normal */ "./normal/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _normal__WEBPACK_IMPORTED_MODULE_8__["NormalMaterial"]; }); + +/* harmony import */ var _shadowOnly__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./shadowOnly */ "./shadowOnly/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _shadowOnly__WEBPACK_IMPORTED_MODULE_9__["ShadowOnlyMaterial"]; }); + +/* harmony import */ var _simple__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./simple */ "./simple/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _simple__WEBPACK_IMPORTED_MODULE_10__["SimpleMaterial"]; }); + +/* harmony import */ var _sky__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sky */ "./sky/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _sky__WEBPACK_IMPORTED_MODULE_11__["SkyMaterial"]; }); + +/* harmony import */ var _terrain__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./terrain */ "./terrain/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _terrain__WEBPACK_IMPORTED_MODULE_12__["TerrainMaterial"]; }); + +/* harmony import */ var _triPlanar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./triPlanar */ "./triPlanar/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _triPlanar__WEBPACK_IMPORTED_MODULE_13__["TriPlanarMaterial"]; }); + +/* harmony import */ var _water__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./water */ "./water/index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _water__WEBPACK_IMPORTED_MODULE_14__["WaterMaterial"]; }); + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "./lava/index.ts": +/*!***********************!*\ + !*** ./lava/index.ts ***! + \***********************/ +/*! exports provided: LavaMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _lavaMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lavaMaterial */ "./lava/lavaMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _lavaMaterial__WEBPACK_IMPORTED_MODULE_0__["LavaMaterial"]; }); + + + + +/***/ }), + +/***/ "./lava/lava.fragment.ts": +/*!*******************************!*\ + !*** ./lava/lava.fragment.ts ***! + \*******************************/ +/*! exports provided: lavaPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaPixelShader", function() { return lavaPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'lavaPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n\nuniform float time;\nuniform float speed;\nuniform float movingSpeed;\nuniform vec3 fogColor;\nuniform sampler2D noiseTexture;\nuniform float fogDensity;\n\nvarying float noise;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nfloat random( vec3 scale,float seed ){\nreturn fract( sin( dot( gl_FragCoord.xyz+seed,scale ) )*43758.5453+seed ) ;\n}\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\n\nvec4 noiseTex=texture2D( noiseTexture,vDiffuseUV );\nvec2 T1=vDiffuseUV+vec2( 1.5,-1.5 )*time*0.02;\nvec2 T2=vDiffuseUV+vec2( -0.5,2.0 )*time*0.01*speed;\nT1.x+=noiseTex.x*2.0;\nT1.y+=noiseTex.y*2.0;\nT2.x-=noiseTex.y*0.2+time*0.001*movingSpeed;\nT2.y+=noiseTex.z*0.2+time*0.002*movingSpeed;\nfloat p=texture2D( noiseTexture,T1*3.0 ).a;\nvec4 lavaColor=texture2D( diffuseSampler,T2*4.0);\nvec4 temp=lavaColor*( vec4( p,p,p,p )*2. )+( lavaColor*lavaColor-0.1 );\nbaseColor=temp;\nfloat depth=gl_FragCoord.z*4.0;\nconst float LOG2=1.442695;\nfloat fogFactor=exp2(-fogDensity*fogDensity*depth*depth*LOG2 );\nfogFactor=1.0-clamp( fogFactor,0.0,1.0 );\nbaseColor=mix( baseColor,vec4( fogColor,baseColor.w ),fogFactor );\ndiffuseColor=baseColor.rgb;\n\n\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0]\n#include[1]\n#include[2]\n#include[3]\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var lavaPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./lava/lava.vertex.ts": +/*!*****************************!*\ + !*** ./lava/lava.vertex.ts ***! + \*****************************/ +/*! exports provided: lavaVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lavaVertexShader", function() { return lavaVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'lavaVertexShader'; +var shader = "precision highp float;\n\nuniform float time;\nuniform float lowFrequencySpeed;\n\nvarying float noise;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n\n\nvec3 mod289(vec3 x)\n{\nreturn x-floor(x*(1.0/289.0))*289.0;\n}\nvec4 mod289(vec4 x)\n{\nreturn x-floor(x*(1.0/289.0))*289.0;\n}\nvec4 permute(vec4 x)\n{\nreturn mod289(((x*34.0)+1.0)*x);\n}\nvec4 taylorInvSqrt(vec4 r)\n{\nreturn 1.79284291400159-0.85373472095314*r;\n}\nvec3 fade(vec3 t) {\nreturn t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\nfloat pnoise(vec3 P,vec3 rep)\n{\nvec3 Pi0=mod(floor(P),rep);\nvec3 Pi1=mod(Pi0+vec3(1.0),rep);\nPi0=mod289(Pi0);\nPi1=mod289(Pi1);\nvec3 Pf0=fract(P);\nvec3 Pf1=Pf0-vec3(1.0);\nvec4 ix=vec4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);\nvec4 iy=vec4(Pi0.yy,Pi1.yy);\nvec4 iz0=Pi0.zzzz;\nvec4 iz1=Pi1.zzzz;\nvec4 ixy=permute(permute(ix)+iy);\nvec4 ixy0=permute(ixy+iz0);\nvec4 ixy1=permute(ixy+iz1);\nvec4 gx0=ixy0*(1.0/7.0);\nvec4 gy0=fract(floor(gx0)*(1.0/7.0))-0.5;\ngx0=fract(gx0);\nvec4 gz0=vec4(0.5)-abs(gx0)-abs(gy0);\nvec4 sz0=step(gz0,vec4(0.0));\ngx0-=sz0*(step(0.0,gx0)-0.5);\ngy0-=sz0*(step(0.0,gy0)-0.5);\nvec4 gx1=ixy1*(1.0/7.0);\nvec4 gy1=fract(floor(gx1)*(1.0/7.0))-0.5;\ngx1=fract(gx1);\nvec4 gz1=vec4(0.5)-abs(gx1)-abs(gy1);\nvec4 sz1=step(gz1,vec4(0.0));\ngx1-=sz1*(step(0.0,gx1)-0.5);\ngy1-=sz1*(step(0.0,gy1)-0.5);\nvec3 g000=vec3(gx0.x,gy0.x,gz0.x);\nvec3 g100=vec3(gx0.y,gy0.y,gz0.y);\nvec3 g010=vec3(gx0.z,gy0.z,gz0.z);\nvec3 g110=vec3(gx0.w,gy0.w,gz0.w);\nvec3 g001=vec3(gx1.x,gy1.x,gz1.x);\nvec3 g101=vec3(gx1.y,gy1.y,gz1.y);\nvec3 g011=vec3(gx1.z,gy1.z,gz1.z);\nvec3 g111=vec3(gx1.w,gy1.w,gz1.w);\nvec4 norm0=taylorInvSqrt(vec4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));\ng000*=norm0.x;\ng010*=norm0.y;\ng100*=norm0.z;\ng110*=norm0.w;\nvec4 norm1=taylorInvSqrt(vec4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));\ng001*=norm1.x;\ng011*=norm1.y;\ng101*=norm1.z;\ng111*=norm1.w;\nfloat n000=dot(g000,Pf0);\nfloat n100=dot(g100,vec3(Pf1.x,Pf0.yz));\nfloat n010=dot(g010,vec3(Pf0.x,Pf1.y,Pf0.z));\nfloat n110=dot(g110,vec3(Pf1.xy,Pf0.z));\nfloat n001=dot(g001,vec3(Pf0.xy,Pf1.z));\nfloat n101=dot(g101,vec3(Pf1.x,Pf0.y,Pf1.z));\nfloat n011=dot(g011,vec3(Pf0.x,Pf1.yz));\nfloat n111=dot(g111,Pf1);\nvec3 fade_xyz=fade(Pf0);\nvec4 n_z=mix(vec4(n000,n100,n010,n110),vec4(n001,n101,n011,n111),fade_xyz.z);\nvec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);\nfloat n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);\nreturn 2.2*n_xyz;\n}\n\nfloat turbulence( vec3 p ) {\nfloat w=100.0;\nfloat t=-.5;\nfor (float f=1.0 ; f<=10.0 ; f++ ){\nfloat power=pow( 2.0,f );\nt+=abs( pnoise( vec3( power*p ),vec3( 10.0,10.0,10.0 ) )/power );\n}\nreturn t;\n}\nvoid main(void) {\n#include\n#include\n#ifdef NORMAL\n\nnoise=10.0*-.10*turbulence( .5*normal+time*1.15 );\n\nfloat b=lowFrequencySpeed*5.0*pnoise( 0.05*position +vec3(time*1.025),vec3( 100.0 ) );\n\nfloat displacement =-1.5*noise+b;\n\nvec3 newPosition=position+normal*displacement;\ngl_Position=viewProjection*finalWorld*vec4( newPosition,1.0 );\nvec4 worldPos=finalWorld*vec4(newPosition,1.0);\nvPositionW=vec3(worldPos);\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var lavaVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./lava/lavaMaterial.ts": +/*!******************************!*\ + !*** ./lava/lavaMaterial.ts ***! + \******************************/ +/*! exports provided: LavaMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return LavaMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _lava_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lava.fragment */ "./lava/lava.fragment.ts"); +/* harmony import */ var _lava_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lava.vertex */ "./lava/lava.vertex.ts"); + + + + + + + + + + + + + +var LavaMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LavaMaterialDefines, _super); + function LavaMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.LIGHT0 = false; + _this.LIGHT1 = false; + _this.LIGHT2 = false; + _this.LIGHT3 = false; + _this.SPOTLIGHT0 = false; + _this.SPOTLIGHT1 = false; + _this.SPOTLIGHT2 = false; + _this.SPOTLIGHT3 = false; + _this.HEMILIGHT0 = false; + _this.HEMILIGHT1 = false; + _this.HEMILIGHT2 = false; + _this.HEMILIGHT3 = false; + _this.DIRLIGHT0 = false; + _this.DIRLIGHT1 = false; + _this.DIRLIGHT2 = false; + _this.DIRLIGHT3 = false; + _this.POINTLIGHT0 = false; + _this.POINTLIGHT1 = false; + _this.POINTLIGHT2 = false; + _this.POINTLIGHT3 = false; + _this.SHADOW0 = false; + _this.SHADOW1 = false; + _this.SHADOW2 = false; + _this.SHADOW3 = false; + _this.SHADOWS = false; + _this.SHADOWESM0 = false; + _this.SHADOWESM1 = false; + _this.SHADOWESM2 = false; + _this.SHADOWESM3 = false; + _this.SHADOWPOISSON0 = false; + _this.SHADOWPOISSON1 = false; + _this.SHADOWPOISSON2 = false; + _this.SHADOWPOISSON3 = false; + _this.SHADOWPCF0 = false; + _this.SHADOWPCF1 = false; + _this.SHADOWPCF2 = false; + _this.SHADOWPCF3 = false; + _this.SHADOWPCSS0 = false; + _this.SHADOWPCSS1 = false; + _this.SHADOWPCSS2 = false; + _this.SHADOWPCSS3 = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.UNLIT = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return LavaMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var LavaMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(LavaMaterial, _super); + function LavaMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.speed = 1; + _this.movingSpeed = 1; + _this.lowFrequencySpeed = 1; + _this.fogDensity = 0.15; + _this._lastTime = 0; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._unlit = false; + _this._maxSimultaneousLights = 4; + _this._scaledDiffuse = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](); + return _this; + } + LavaMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + LavaMaterial.prototype.needAlphaTesting = function () { + return false; + }; + LavaMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + LavaMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new LavaMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = true; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "lava"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix", + "time", "speed", "movingSpeed", + "fogColor", "fogDensity", "lowFrequencySpeed" + ]; + var samplers = ["diffuseSampler", + "noiseTexture" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + LavaMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + defines.UNLIT = this._unlit; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this.diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this.diffuseTexture.coordinatesIndex, this.diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this.diffuseTexture.getTextureMatrix()); + } + if (this.noiseTexture) { + this._activeEffect.setTexture("noiseTexture", this.noiseTexture); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this._scaledDiffuse, this.alpha * mesh.visibility); + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._lastTime += scene.getEngine().getDeltaTime(); + this._activeEffect.setFloat("time", this._lastTime * this.speed / 1000); + if (!this.fogColor) { + this.fogColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + } + this._activeEffect.setColor3("fogColor", this.fogColor); + this._activeEffect.setFloat("fogDensity", this.fogDensity); + this._activeEffect.setFloat("lowFrequencySpeed", this.lowFrequencySpeed); + this._activeEffect.setFloat("movingSpeed", this.movingSpeed); + this._afterBind(mesh, this._activeEffect); + }; + LavaMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + if (this.noiseTexture && this.noiseTexture.animations && this.noiseTexture.animations.length > 0) { + results.push(this.noiseTexture); + } + return results; + }; + LavaMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + LavaMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + LavaMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + if (this.noiseTexture) { + this.noiseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + LavaMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new LavaMaterial(name, _this.getScene()); }, this); + }; + LavaMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.LavaMaterial"; + return serializationObject; + }; + LavaMaterial.prototype.getClassName = function () { + return "LavaMaterial"; + }; + // Statics + LavaMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new LavaMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], LavaMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], LavaMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])() + ], LavaMaterial.prototype, "noiseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], LavaMaterial.prototype, "fogColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "speed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "movingSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "lowFrequencySpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], LavaMaterial.prototype, "fogDensity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], LavaMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], LavaMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("unlit") + ], LavaMaterial.prototype, "_unlit", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "unlit", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], LavaMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], LavaMaterial.prototype, "maxSimultaneousLights", void 0); + return LavaMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.LavaMaterial"] = LavaMaterial; + + +/***/ }), + +/***/ "./legacy/legacy.ts": +/*!**************************!*\ + !*** ./legacy/legacy.ts ***! + \**************************/ +/*! exports provided: CellMaterial, CustomShaderStructure, ShaderSpecialParts, CustomMaterial, ShaderAlebdoParts, PBRCustomMaterial, FireMaterial, FurMaterial, GradientMaterial, GridMaterial, LavaMaterial, MixMaterial, NormalMaterial, ShadowOnlyMaterial, SimpleMaterial, SkyMaterial, TerrainMaterial, TriPlanarMaterial, WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "./index.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CellMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CellMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomShaderStructure", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CustomShaderStructure"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderSpecialParts", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShaderSpecialParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["CustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShaderAlebdoParts", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShaderAlebdoParts"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PBRCustomMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["PBRCustomMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FireMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["FireMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FurMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["FurMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GradientMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["GradientMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["GridMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LavaMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["LavaMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["MixMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["NormalMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["ShadowOnlyMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["SimpleMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["SkyMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TerrainMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TriPlanarMaterial"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["WaterMaterial"]; }); + + +/** + * Legacy support, defining window.BABYLON.GridMaterial... (global variable). + * + * This is the entry point for the UMD module. + * The entry point for a future ESM package should be index.ts + */ +var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined); +if (typeof globalObject !== "undefined") { + globalObject.BABYLON = globalObject.BABYLON || {}; + for (var mat in _index__WEBPACK_IMPORTED_MODULE_0__) { + globalObject.BABYLON[mat] = _index__WEBPACK_IMPORTED_MODULE_0__[mat]; + } +} + + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"))) + +/***/ }), + +/***/ "./mix/index.ts": +/*!**********************!*\ + !*** ./mix/index.ts ***! + \**********************/ +/*! exports provided: MixMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _mixMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mixMaterial */ "./mix/mixMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return _mixMaterial__WEBPACK_IMPORTED_MODULE_0__["MixMaterial"]; }); + + + + +/***/ }), + +/***/ "./mix/mix.fragment.ts": +/*!*****************************!*\ + !*** ./mix/mix.fragment.ts ***! + \*****************************/ +/*! exports provided: mixPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixPixelShader", function() { return mixPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'mixPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform sampler2D mixMap1Sampler;\nuniform vec2 vTextureInfos;\n#ifdef MIXMAP2\nuniform sampler2D mixMap2Sampler;\n#endif\nuniform sampler2D diffuse1Sampler;\nuniform sampler2D diffuse2Sampler;\nuniform sampler2D diffuse3Sampler;\nuniform sampler2D diffuse4Sampler;\nuniform vec2 diffuse1Infos;\nuniform vec2 diffuse2Infos;\nuniform vec2 diffuse3Infos;\nuniform vec2 diffuse4Infos;\n#ifdef MIXMAP2\nuniform sampler2D diffuse5Sampler;\nuniform sampler2D diffuse6Sampler;\nuniform sampler2D diffuse7Sampler;\nuniform sampler2D diffuse8Sampler;\nuniform vec2 diffuse5Infos;\nuniform vec2 diffuse6Infos;\nuniform vec2 diffuse7Infos;\nuniform vec2 diffuse8Infos;\n#endif\n#endif\n\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 finalMixColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n#ifdef MIXMAP2\nvec4 mixColor2=vec4(1.,1.,1.,1.);\n#endif\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef DIFFUSE\nvec4 mixColor=texture2D(mixMap1Sampler,vTextureUV);\n#include\nmixColor.rgb*=vTextureInfos.y;\nvec4 diffuse1Color=texture2D(diffuse1Sampler,vTextureUV*diffuse1Infos);\nvec4 diffuse2Color=texture2D(diffuse2Sampler,vTextureUV*diffuse2Infos);\nvec4 diffuse3Color=texture2D(diffuse3Sampler,vTextureUV*diffuse3Infos);\nvec4 diffuse4Color=texture2D(diffuse4Sampler,vTextureUV*diffuse4Infos);\ndiffuse1Color.rgb*=mixColor.r;\ndiffuse2Color.rgb=mix(diffuse1Color.rgb,diffuse2Color.rgb,mixColor.g);\ndiffuse3Color.rgb=mix(diffuse2Color.rgb,diffuse3Color.rgb,mixColor.b);\nfinalMixColor.rgb=mix(diffuse3Color.rgb,diffuse4Color.rgb,1.0-mixColor.a);\n#ifdef MIXMAP2\nmixColor=texture2D(mixMap2Sampler,vTextureUV);\nmixColor.rgb*=vTextureInfos.y;\nvec4 diffuse5Color=texture2D(diffuse5Sampler,vTextureUV*diffuse5Infos);\nvec4 diffuse6Color=texture2D(diffuse6Sampler,vTextureUV*diffuse6Infos);\nvec4 diffuse7Color=texture2D(diffuse7Sampler,vTextureUV*diffuse7Infos);\nvec4 diffuse8Color=texture2D(diffuse8Sampler,vTextureUV*diffuse8Infos);\ndiffuse5Color.rgb=mix(finalMixColor.rgb,diffuse5Color.rgb,mixColor.r);\ndiffuse6Color.rgb=mix(diffuse5Color.rgb,diffuse6Color.rgb,mixColor.g);\ndiffuse7Color.rgb=mix(diffuse6Color.rgb,diffuse7Color.rgb,mixColor.b);\nfinalMixColor.rgb=mix(diffuse7Color.rgb,diffuse8Color.rgb,1.0-mixColor.a);\n#endif\n#endif\n#ifdef VERTEXCOLOR\nfinalMixColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor*finalMixColor.rgb,0.0,1.0);\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var mixPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./mix/mix.vertex.ts": +/*!***************************!*\ + !*** ./mix/mix.vertex.ts ***! + \***************************/ +/*! exports provided: mixVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixVertexShader", function() { return mixVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'mixVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform mat4 textureMatrix;\nuniform vec2 vTextureInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vTextureInfos.x == 0.)\n{\nvTextureUV=vec2(textureMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvTextureUV=vec2(textureMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var mixVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./mix/mixMaterial.ts": +/*!****************************!*\ + !*** ./mix/mixMaterial.ts ***! + \****************************/ +/*! exports provided: MixMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MixMaterial", function() { return MixMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _mix_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mix.fragment */ "./mix/mix.fragment.ts"); +/* harmony import */ var _mix_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mix.vertex */ "./mix/mix.vertex.ts"); + + + + + + + + + + + + + +var MixMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MixMaterialDefines, _super); + function MixMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.MIXMAP2 = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return MixMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var MixMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(MixMaterial, _super); + function MixMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Uniforms + */ + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + MixMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + MixMaterial.prototype.needAlphaTesting = function () { + return false; + }; + MixMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + MixMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new MixMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (scene.texturesEnabled) { + if (!this._mixTexture1 || !this._mixTexture1.isReady()) { + return false; + } + defines._needUVs = true; + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture1 || !this._diffuseTexture1.isReady()) { + return false; + } + defines.DIFFUSE = true; + if (!this._diffuseTexture2 || !this._diffuseTexture2.isReady()) { + return false; + } + if (!this._diffuseTexture3 || !this._diffuseTexture3.isReady()) { + return false; + } + if (!this._diffuseTexture4 || !this._diffuseTexture4.isReady()) { + return false; + } + if (this._mixTexture2) { + if (!this._mixTexture2.isReady()) { + return false; + } + defines.MIXMAP2 = true; + if (!this._diffuseTexture5 || !this._diffuseTexture5.isReady()) { + return false; + } + if (!this._diffuseTexture6 || !this._diffuseTexture6.isReady()) { + return false; + } + if (!this._diffuseTexture7 || !this._diffuseTexture7.isReady()) { + return false; + } + if (!this._diffuseTexture8 || !this._diffuseTexture8.isReady()) { + return false; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "mix"; + var join = defines.toString(); + var uniforms = [ + "world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vTextureInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "textureMatrix", + "diffuse1Infos", "diffuse2Infos", "diffuse3Infos", "diffuse4Infos", + "diffuse5Infos", "diffuse6Infos", "diffuse7Infos", "diffuse8Infos" + ]; + var samplers = [ + "mixMap1Sampler", "mixMap2Sampler", + "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler", "diffuse4Sampler", + "diffuse5Sampler", "diffuse6Sampler", "diffuse7Sampler", "diffuse8Sampler" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + MixMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._mixTexture1) { + this._activeEffect.setTexture("mixMap1Sampler", this._mixTexture1); + this._activeEffect.setFloat2("vTextureInfos", this._mixTexture1.coordinatesIndex, this._mixTexture1.level); + this._activeEffect.setMatrix("textureMatrix", this._mixTexture1.getTextureMatrix()); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture1) { + this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1); + this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale); + } + if (this._diffuseTexture2) { + this._activeEffect.setTexture("diffuse2Sampler", this._diffuseTexture2); + this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale); + } + if (this._diffuseTexture3) { + this._activeEffect.setTexture("diffuse3Sampler", this._diffuseTexture3); + this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale); + } + if (this._diffuseTexture4) { + this._activeEffect.setTexture("diffuse4Sampler", this._diffuseTexture4); + this._activeEffect.setFloat2("diffuse4Infos", this._diffuseTexture4.uScale, this._diffuseTexture4.vScale); + } + } + } + if (this._mixTexture2) { + this._activeEffect.setTexture("mixMap2Sampler", this._mixTexture2); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture5) { + this._activeEffect.setTexture("diffuse5Sampler", this._diffuseTexture5); + this._activeEffect.setFloat2("diffuse5Infos", this._diffuseTexture5.uScale, this._diffuseTexture5.vScale); + } + if (this._diffuseTexture6) { + this._activeEffect.setTexture("diffuse6Sampler", this._diffuseTexture6); + this._activeEffect.setFloat2("diffuse6Infos", this._diffuseTexture6.uScale, this._diffuseTexture6.vScale); + } + if (this._diffuseTexture7) { + this._activeEffect.setTexture("diffuse7Sampler", this._diffuseTexture7); + this._activeEffect.setFloat2("diffuse7Infos", this._diffuseTexture7.uScale, this._diffuseTexture7.vScale); + } + if (this._diffuseTexture8) { + this._activeEffect.setTexture("diffuse8Sampler", this._diffuseTexture8); + this._activeEffect.setFloat2("diffuse8Infos", this._diffuseTexture8.uScale, this._diffuseTexture8.vScale); + } + } + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + MixMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._mixTexture1 && this._mixTexture1.animations && this._mixTexture1.animations.length > 0) { + results.push(this._mixTexture1); + } + if (this._mixTexture2 && this._mixTexture2.animations && this._mixTexture2.animations.length > 0) { + results.push(this._mixTexture2); + } + return results; + }; + MixMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + // Mix map 1 + if (this._mixTexture1) { + activeTextures.push(this._mixTexture1); + } + if (this._diffuseTexture1) { + activeTextures.push(this._diffuseTexture1); + } + if (this._diffuseTexture2) { + activeTextures.push(this._diffuseTexture2); + } + if (this._diffuseTexture3) { + activeTextures.push(this._diffuseTexture3); + } + if (this._diffuseTexture4) { + activeTextures.push(this._diffuseTexture4); + } + // Mix map 2 + if (this._mixTexture2) { + activeTextures.push(this._mixTexture2); + } + if (this._diffuseTexture5) { + activeTextures.push(this._diffuseTexture5); + } + if (this._diffuseTexture6) { + activeTextures.push(this._diffuseTexture6); + } + if (this._diffuseTexture7) { + activeTextures.push(this._diffuseTexture7); + } + if (this._diffuseTexture8) { + activeTextures.push(this._diffuseTexture8); + } + return activeTextures; + }; + MixMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + // Mix map 1 + if (this._mixTexture1 === texture) { + return true; + } + if (this._diffuseTexture1 === texture) { + return true; + } + if (this._diffuseTexture2 === texture) { + return true; + } + if (this._diffuseTexture3 === texture) { + return true; + } + if (this._diffuseTexture4 === texture) { + return true; + } + // Mix map 2 + if (this._mixTexture2 === texture) { + return true; + } + if (this._diffuseTexture5 === texture) { + return true; + } + if (this._diffuseTexture6 === texture) { + return true; + } + if (this._diffuseTexture7 === texture) { + return true; + } + if (this._diffuseTexture8 === texture) { + return true; + } + return false; + }; + MixMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._mixTexture1) { + this._mixTexture1.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + MixMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new MixMaterial(name, _this.getScene()); }, this); + }; + MixMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.MixMaterial"; + return serializationObject; + }; + MixMaterial.prototype.getClassName = function () { + return "MixMaterial"; + }; + // Statics + MixMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new MixMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture1") + ], MixMaterial.prototype, "_mixTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "mixTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture2") + ], MixMaterial.prototype, "_mixTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "mixTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], MixMaterial.prototype, "_diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], MixMaterial.prototype, "_diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], MixMaterial.prototype, "_diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture4") + ], MixMaterial.prototype, "_diffuseTexture4", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture4", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], MixMaterial.prototype, "_diffuseTexture5", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture5", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], MixMaterial.prototype, "_diffuseTexture6", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture6", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], MixMaterial.prototype, "_diffuseTexture7", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture7", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture4") + ], MixMaterial.prototype, "_diffuseTexture8", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], MixMaterial.prototype, "diffuseTexture8", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], MixMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], MixMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], MixMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], MixMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], MixMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], MixMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], MixMaterial.prototype, "maxSimultaneousLights", void 0); + return MixMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.MixMaterial"] = MixMaterial; + + +/***/ }), + +/***/ "./normal/index.ts": +/*!*************************!*\ + !*** ./normal/index.ts ***! + \*************************/ +/*! exports provided: NormalMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _normalMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalMaterial */ "./normal/normalMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return _normalMaterial__WEBPACK_IMPORTED_MODULE_0__["NormalMaterial"]; }); + + + + +/***/ }), + +/***/ "./normal/normal.fragment.ts": +/*!***********************************!*\ + !*** ./normal/normal.fragment.ts ***! + \***********************************/ +/*! exports provided: normalPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalPixelShader", function() { return normalPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'normalPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef LIGHTING\n\n#include\n\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include\n#include\n#endif\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef NORMAL\nbaseColor=mix(baseColor,vec4(vNormalW,1.0),0.5);\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\n#ifdef LIGHTING\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0]\n#include[1]\n#include[2]\n#include[3]\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n#else\nvec3 finalDiffuse=baseColor.rgb;\n#endif\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var normalPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./normal/normal.vertex.ts": +/*!*********************************!*\ + !*** ./normal/normal.vertex.ts ***! + \*********************************/ +/*! exports provided: normalVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalVertexShader", function() { return normalVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'normalVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var normalVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./normal/normalMaterial.ts": +/*!**********************************!*\ + !*** ./normal/normalMaterial.ts ***! + \**********************************/ +/*! exports provided: NormalMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NormalMaterial", function() { return NormalMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _normal_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.fragment */ "./normal/normal.fragment.ts"); +/* harmony import */ var _normal_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./normal.vertex */ "./normal/normal.vertex.ts"); + + + + + + + + + + + + + +var NormalMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NormalMaterialDefines, _super); + function NormalMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.LIGHT0 = false; + _this.LIGHT1 = false; + _this.LIGHT2 = false; + _this.LIGHT3 = false; + _this.SPOTLIGHT0 = false; + _this.SPOTLIGHT1 = false; + _this.SPOTLIGHT2 = false; + _this.SPOTLIGHT3 = false; + _this.HEMILIGHT0 = false; + _this.HEMILIGHT1 = false; + _this.HEMILIGHT2 = false; + _this.HEMILIGHT3 = false; + _this.DIRLIGHT0 = false; + _this.DIRLIGHT1 = false; + _this.DIRLIGHT2 = false; + _this.DIRLIGHT3 = false; + _this.POINTLIGHT0 = false; + _this.POINTLIGHT1 = false; + _this.POINTLIGHT2 = false; + _this.POINTLIGHT3 = false; + _this.SHADOW0 = false; + _this.SHADOW1 = false; + _this.SHADOW2 = false; + _this.SHADOW3 = false; + _this.SHADOWS = false; + _this.SHADOWESM0 = false; + _this.SHADOWESM1 = false; + _this.SHADOWESM2 = false; + _this.SHADOWESM3 = false; + _this.SHADOWPOISSON0 = false; + _this.SHADOWPOISSON1 = false; + _this.SHADOWPOISSON2 = false; + _this.SHADOWPOISSON3 = false; + _this.SHADOWPCF0 = false; + _this.SHADOWPCF1 = false; + _this.SHADOWPCF2 = false; + _this.SHADOWPCF3 = false; + _this.SHADOWPCSS0 = false; + _this.SHADOWPCSS1 = false; + _this.SHADOWPCSS2 = false; + _this.SHADOWPCSS3 = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.LIGHTING = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return NormalMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var NormalMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(NormalMaterial, _super); + function NormalMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + NormalMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + NormalMaterial.prototype.needAlphaBlendingForMesh = function (mesh) { + return this.needAlphaBlending() || (mesh.visibility < 1.0); + }; + NormalMaterial.prototype.needAlphaTesting = function () { + return false; + }; + NormalMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + NormalMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new NormalMaterialDefines(); + } + var defines = subMesh.materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = true; + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + defines.LIGHTING = !this._disableLighting; + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "normal"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 4 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 4 } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + NormalMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this.diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this.diffuseTexture.coordinatesIndex, this.diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this.diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + NormalMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.diffuseTexture && this.diffuseTexture.animations && this.diffuseTexture.animations.length > 0) { + results.push(this.diffuseTexture); + } + return results; + }; + NormalMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + NormalMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + NormalMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.diffuseTexture) { + this.diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + NormalMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new NormalMaterial(name, _this.getScene()); }, this); + }; + NormalMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.NormalMaterial"; + return serializationObject; + }; + NormalMaterial.prototype.getClassName = function () { + return "NormalMaterial"; + }; + // Statics + NormalMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new NormalMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], NormalMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], NormalMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], NormalMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], NormalMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], NormalMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], NormalMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], NormalMaterial.prototype, "maxSimultaneousLights", void 0); + return NormalMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.NormalMaterial"] = NormalMaterial; + + +/***/ }), + +/***/ "./shadowOnly/index.ts": +/*!*****************************!*\ + !*** ./shadowOnly/index.ts ***! + \*****************************/ +/*! exports provided: ShadowOnlyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _shadowOnlyMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shadowOnlyMaterial */ "./shadowOnly/shadowOnlyMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return _shadowOnlyMaterial__WEBPACK_IMPORTED_MODULE_0__["ShadowOnlyMaterial"]; }); + + + + +/***/ }), + +/***/ "./shadowOnly/shadowOnly.fragment.ts": +/*!*******************************************!*\ + !*** ./shadowOnly/shadowOnly.fragment.ts ***! + \*******************************************/ +/*! exports provided: shadowOnlyPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyPixelShader", function() { return shadowOnlyPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'shadowOnlyPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform float alpha;\nuniform vec3 shadowColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#include[0..1]\n\nvec4 color=vec4(shadowColor,(1.0-clamp(shadow,0.,1.))*alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var shadowOnlyPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./shadowOnly/shadowOnly.vertex.ts": +/*!*****************************************!*\ + !*** ./shadowOnly/shadowOnly.vertex.ts ***! + \*****************************************/ +/*! exports provided: shadowOnlyVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowOnlyVertexShader", function() { return shadowOnlyVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'shadowOnlyVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var shadowOnlyVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./shadowOnly/shadowOnlyMaterial.ts": +/*!******************************************!*\ + !*** ./shadowOnly/shadowOnlyMaterial.ts ***! + \******************************************/ +/*! exports provided: ShadowOnlyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShadowOnlyMaterial", function() { return ShadowOnlyMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _shadowOnly_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shadowOnly.fragment */ "./shadowOnly/shadowOnly.fragment.ts"); +/* harmony import */ var _shadowOnly_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shadowOnly.vertex */ "./shadowOnly/shadowOnly.vertex.ts"); + + + + + + + + + + + + +var ShadowOnlyMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ShadowOnlyMaterialDefines, _super); + function ShadowOnlyMaterialDefines() { + var _this = _super.call(this) || this; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return ShadowOnlyMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var ShadowOnlyMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ShadowOnlyMaterial, _super); + function ShadowOnlyMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this._needAlphaBlending = true; + _this.shadowColor = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black(); + return _this; + } + ShadowOnlyMaterial.prototype.needAlphaBlending = function () { + return this._needAlphaBlending; + }; + ShadowOnlyMaterial.prototype.needAlphaTesting = function () { + return false; + }; + ShadowOnlyMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + Object.defineProperty(ShadowOnlyMaterial.prototype, "activeLight", { + get: function () { + return this._activeLight; + }, + set: function (light) { + this._activeLight = light; + }, + enumerable: false, + configurable: true + }); + ShadowOnlyMaterial.prototype._getFirstShadowLightForMesh = function (mesh) { + for (var _i = 0, _a = mesh.lightSources; _i < _a.length; _i++) { + var light = _a[_i]; + if (light.shadowEnabled) { + return light; + } + } + return null; + }; + // Methods + ShadowOnlyMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + var _a; + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new ShadowOnlyMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Ensure that active light is the first shadow light + if (this._activeLight) { + for (var _i = 0, _b = mesh.lightSources; _i < _b.length; _i++) { + var light = _b[_i]; + if (light.shadowEnabled) { + if (this._activeLight === light) { + break; // We are good + } + var lightPosition = mesh.lightSources.indexOf(this._activeLight); + if (lightPosition !== -1) { + mesh.lightSources.splice(lightPosition, 1); + mesh.lightSources.splice(0, 0, this._activeLight); + } + break; + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, 1); + var shadowGenerator = (_a = this._getFirstShadowLightForMesh(mesh)) === null || _a === void 0 ? void 0 : _a.getShadowGenerator(); + this._needAlphaBlending = true; + if (shadowGenerator && shadowGenerator.getClassName && shadowGenerator.getClassName() === 'CascadedShadowGenerator') { + var csg = shadowGenerator; + this._needAlphaBlending = !csg.autoCalcDepthBounds; + } + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, false, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, 1); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "shadowOnly"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", + "vFogInfos", "vFogColor", "pointSize", "alpha", "shadowColor", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6" + ]; + var samplers = new Array(); + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: 1 + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: 1 } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + ShadowOnlyMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + this._activeEffect.setFloat("alpha", this.alpha); + this._activeEffect.setColor3("shadowColor", this.shadowColor); + scene.bindEyePosition(effect); + } + // Lights + if (scene.lightsEnabled) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, 1); + var light = this._getFirstShadowLightForMesh(mesh); + if (light) { + // Make sure the uniforms for this light will be rebound for other materials using this light when rendering the current frame. + // Indeed, there is an optimization in Light that binds the light uniforms only once per frame for a given light (if using ubo). + // Doing this way assumes that all uses of this light are the same, meaning all parameters passed to Light._bindLlight + // are the same, notably useSpecular. However, isReadyForSubMesh (see above) is passing false for this parameter, which may not be + // the value the other materials may pass. + light._renderId = -1; + } + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE || defines["SHADOWCSM0"]) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + ShadowOnlyMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new ShadowOnlyMaterial(name, _this.getScene()); }, this); + }; + ShadowOnlyMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.ShadowOnlyMaterial"; + return serializationObject; + }; + ShadowOnlyMaterial.prototype.getClassName = function () { + return "ShadowOnlyMaterial"; + }; + // Statics + ShadowOnlyMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new ShadowOnlyMaterial(source.name, scene); }, source, scene, rootUrl); + }; + return ShadowOnlyMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.ShadowOnlyMaterial"] = ShadowOnlyMaterial; + + +/***/ }), + +/***/ "./simple/index.ts": +/*!*************************!*\ + !*** ./simple/index.ts ***! + \*************************/ +/*! exports provided: SimpleMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _simpleMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./simpleMaterial */ "./simple/simpleMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return _simpleMaterial__WEBPACK_IMPORTED_MODULE_0__["SimpleMaterial"]; }); + + + + +/***/ }), + +/***/ "./simple/simple.fragment.ts": +/*!***********************************!*\ + !*** ./simple/simple.fragment.ts ***! + \***********************************/ +/*! exports provided: simplePixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplePixelShader", function() { return simplePixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'simplePixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include\n\n#include\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse,alpha);\n#include\ngl_FragColor=color;\n#include\n}"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var simplePixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./simple/simple.vertex.ts": +/*!*********************************!*\ + !*** ./simple/simple.vertex.ts ***! + \*********************************/ +/*! exports provided: simpleVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simpleVertexShader", function() { return simpleVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'simpleVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var simpleVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./simple/simpleMaterial.ts": +/*!**********************************!*\ + !*** ./simple/simpleMaterial.ts ***! + \**********************************/ +/*! exports provided: SimpleMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleMaterial", function() { return SimpleMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _simple_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.fragment */ "./simple/simple.fragment.ts"); +/* harmony import */ var _simple_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simple.vertex */ "./simple/simple.vertex.ts"); + + + + + + + + + + + + + +var SimpleMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimpleMaterialDefines, _super); + function SimpleMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return SimpleMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var SimpleMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SimpleMaterial, _super); + function SimpleMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + SimpleMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + SimpleMaterial.prototype.needAlphaTesting = function () { + return false; + }; + SimpleMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + SimpleMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new SimpleMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.DIFFUSE = true; + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + var shaderName = "simple"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", + "vFogInfos", "vFogColor", "pointSize", + "vDiffuseInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "diffuseMatrix" + ]; + var samplers = ["diffuseSampler"]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights - 1 } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + SimpleMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture); + this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level); + this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + // Lights + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + SimpleMaterial.prototype.getAnimatables = function () { + var results = []; + if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) { + results.push(this._diffuseTexture); + } + return results; + }; + SimpleMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTexture) { + activeTextures.push(this._diffuseTexture); + } + return activeTextures; + }; + SimpleMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this.diffuseTexture === texture) { + return true; + } + return false; + }; + SimpleMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this._diffuseTexture) { + this._diffuseTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + SimpleMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new SimpleMaterial(name, _this.getScene()); }, this); + }; + SimpleMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.SimpleMaterial"; + return serializationObject; + }; + SimpleMaterial.prototype.getClassName = function () { + return "SimpleMaterial"; + }; + // Statics + SimpleMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new SimpleMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture") + ], SimpleMaterial.prototype, "_diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], SimpleMaterial.prototype, "diffuseTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])("diffuse") + ], SimpleMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], SimpleMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], SimpleMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], SimpleMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], SimpleMaterial.prototype, "maxSimultaneousLights", void 0); + return SimpleMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.SimpleMaterial"] = SimpleMaterial; + + +/***/ }), + +/***/ "./sky/index.ts": +/*!**********************!*\ + !*** ./sky/index.ts ***! + \**********************/ +/*! exports provided: SkyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _skyMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./skyMaterial */ "./sky/skyMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return _skyMaterial__WEBPACK_IMPORTED_MODULE_0__["SkyMaterial"]; }); + + + + +/***/ }), + +/***/ "./sky/sky.fragment.ts": +/*!*****************************!*\ + !*** ./sky/sky.fragment.ts ***! + \*****************************/ +/*! exports provided: skyPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyPixelShader", function() { return skyPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + +var name = 'skyPixelShader'; +var shader = "precision highp float;\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n\nuniform vec3 cameraPosition;\nuniform vec3 cameraOffset;\nuniform vec3 up;\nuniform float luminance;\nuniform float turbidity;\nuniform float rayleigh;\nuniform float mieCoefficient;\nuniform float mieDirectionalG;\nuniform vec3 sunPosition;\n\n#include\n\nconst float e=2.71828182845904523536028747135266249775724709369995957;\nconst float pi=3.141592653589793238462643383279502884197169;\nconst float n=1.0003;\nconst float N=2.545E25;\nconst float pn=0.035;\nconst vec3 lambda=vec3(680E-9,550E-9,450E-9);\nconst vec3 K=vec3(0.686,0.678,0.666);\nconst float v=4.0;\nconst float rayleighZenithLength=8.4E3;\nconst float mieZenithLength=1.25E3;\nconst float EE=1000.0;\nconst float sunAngularDiameterCos=0.999956676946448443553574619906976478926848692873900859324;\nconst float cutoffAngle=pi/1.95;\nconst float steepness=1.5;\nvec3 totalRayleigh(vec3 lambda)\n{\nreturn (8.0*pow(pi,3.0)*pow(pow(n,2.0)-1.0,2.0)*(6.0+3.0*pn))/(3.0*N*pow(lambda,vec3(4.0))*(6.0-7.0*pn));\n}\nvec3 simplifiedRayleigh()\n{\nreturn 0.0005/vec3(94,40,18);\n}\nfloat rayleighPhase(float cosTheta)\n{\nreturn (3.0/(16.0*pi))*(1.0+pow(cosTheta,2.0));\n}\nvec3 totalMie(vec3 lambda,vec3 K,float T)\n{\nfloat c=(0.2*T )*10E-18;\nreturn 0.434*c*pi*pow((2.0*pi)/lambda,vec3(v-2.0))*K;\n}\nfloat hgPhase(float cosTheta,float g)\n{\nreturn (1.0/(4.0*pi))*((1.0-pow(g,2.0))/pow(1.0-2.0*g*cosTheta+pow(g,2.0),1.5));\n}\nfloat sunIntensity(float zenithAngleCos)\n{\nreturn EE*max(0.0,1.0-exp((-(cutoffAngle-acos(zenithAngleCos))/steepness)));\n}\nfloat A=0.15;\nfloat B=0.50;\nfloat C=0.10;\nfloat D=0.20;\nfloat EEE=0.02;\nfloat F=0.30;\nfloat W=1000.0;\nvec3 Uncharted2Tonemap(vec3 x)\n{\nreturn ((x*(A*x+C*B)+D*EEE)/(x*(A*x+B)+D*F))-EEE/F;\n}\nvoid main(void) {\n\n#include\n\nfloat sunfade=1.0-clamp(1.0-exp((sunPosition.y/450000.0)),0.0,1.0);\nfloat rayleighCoefficient=rayleigh-(1.0*(1.0-sunfade));\nvec3 sunDirection=normalize(sunPosition);\nfloat sunE=sunIntensity(dot(sunDirection,up));\nvec3 betaR=simplifiedRayleigh()*rayleighCoefficient;\nvec3 betaM=totalMie(lambda,K,turbidity)*mieCoefficient;\nfloat zenithAngle=acos(max(0.0,dot(up,normalize(vPositionW-cameraPosition+cameraOffset))));\nfloat sR=rayleighZenithLength/(cos(zenithAngle)+0.15*pow(93.885-((zenithAngle*180.0)/pi),-1.253));\nfloat sM=mieZenithLength/(cos(zenithAngle)+0.15*pow(93.885-((zenithAngle*180.0)/pi),-1.253));\nvec3 Fex=exp(-(betaR*sR+betaM*sM));\nfloat cosTheta=dot(normalize(vPositionW-cameraPosition),sunDirection);\nfloat rPhase=rayleighPhase(cosTheta*0.5+0.5);\nvec3 betaRTheta=betaR*rPhase;\nfloat mPhase=hgPhase(cosTheta,mieDirectionalG);\nvec3 betaMTheta=betaM*mPhase;\nvec3 Lin=pow(sunE*((betaRTheta+betaMTheta)/(betaR+betaM))*(1.0-Fex),vec3(1.5));\nLin*=mix(vec3(1.0),pow(sunE*((betaRTheta+betaMTheta)/(betaR+betaM))*Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up,sunDirection),5.0),0.0,1.0));\nvec3 direction=normalize(vPositionW-cameraPosition);\nfloat theta=acos(direction.y);\nfloat phi=atan(direction.z,direction.x);\nvec2 uv=vec2(phi,theta)/vec2(2.0*pi,pi)+vec2(0.5,0.0);\nvec3 L0=vec3(0.1)*Fex;\nfloat sundisk=smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);\nL0+=(sunE*19000.0*Fex)*sundisk;\nvec3 whiteScale=1.0/Uncharted2Tonemap(vec3(W));\nvec3 texColor=(Lin+L0);\ntexColor*=0.04 ;\ntexColor+=vec3(0.0,0.001,0.0025)*0.3;\nfloat g_fMaxLuminance=1.0;\nfloat fLumScaled=0.1/luminance;\nfloat fLumCompressed=(fLumScaled*(1.0+(fLumScaled/(g_fMaxLuminance*g_fMaxLuminance))))/(1.0+fLumScaled);\nfloat ExposureBias=fLumCompressed;\nvec3 curr=Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);\n\n\n\nvec3 retColor=curr*whiteScale;\n\n\nfloat alpha=1.0;\n#ifdef VERTEXCOLOR\nretColor.rgb*=vColor.rgb;\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n\nvec4 color=clamp(vec4(retColor.rgb,alpha),0.0,1.0);\n\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var skyPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./sky/sky.vertex.ts": +/*!***************************!*\ + !*** ./sky/sky.vertex.ts ***! + \***************************/ +/*! exports provided: skyVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skyVertexShader", function() { return skyVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + +var name = 'skyVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n\nuniform mat4 world;\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\nvoid main(void) {\ngl_Position=viewProjection*world*vec4(position,1.0);\nvec4 worldPos=world*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n\n#include\n\n#include\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var skyVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./sky/skyMaterial.ts": +/*!****************************!*\ + !*** ./sky/skyMaterial.ts ***! + \****************************/ +/*! exports provided: SkyMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkyMaterial", function() { return SkyMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _sky_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sky.fragment */ "./sky/sky.fragment.ts"); +/* harmony import */ var _sky_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sky.vertex */ "./sky/sky.vertex.ts"); + + + + + + + + + + + + +/** @hidden */ +var SkyMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SkyMaterialDefines, _super); + function SkyMaterialDefines() { + var _this = _super.call(this) || this; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return SkyMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +/** + * This is the sky material which allows to create dynamic and texture free effects for skyboxes. + * @see https://doc.babylonjs.com/extensions/sky + */ +var SkyMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SkyMaterial, _super); + /** + * Instantiates a new sky material. + * This material allows to create dynamic and texture free + * effects for skyboxes by taking care of the atmosphere state. + * @see https://doc.babylonjs.com/extensions/sky + * @param name Define the name of the material in the scene + * @param scene Define the scene the material belong to + */ + function SkyMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + /** + * Defines the overall luminance of sky in interval ]0, 1[. + */ + _this.luminance = 1.0; + /** + * Defines the amount (scattering) of haze as opposed to molecules in atmosphere. + */ + _this.turbidity = 10.0; + /** + * Defines the sky appearance (light intensity). + */ + _this.rayleigh = 2.0; + /** + * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG. + */ + _this.mieCoefficient = 0.005; + /** + * Defines the amount of haze particles following the Mie scattering theory. + */ + _this.mieDirectionalG = 0.8; + /** + * Defines the distance of the sun according to the active scene camera. + */ + _this.distance = 500; + /** + * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said + * "inclined". + */ + _this.inclination = 0.49; + /** + * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between + * an object direction and a reference direction. + */ + _this.azimuth = 0.25; + /** + * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then + * the property is overriden by the inclination and the azimuth and can be read at any moment. + */ + _this.sunPosition = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 100, 0); + /** + * Defines if the sun position should be computed (inclination and azimuth) according to the given + * .sunPosition property. + */ + _this.useSunPosition = false; + /** + * Defines an offset vector used to get a horizon offset. + * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis + */ + _this.cameraOffset = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + /** + * Defines the vector the skyMaterial should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up()) + */ + _this.up = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Up(); + // Private members + _this._cameraPosition = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero(); + _this._skyOrientation = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Quaternion"](); + return _this; + } + /** + * Specifies if the material will require alpha blending + * @returns a boolean specifying if alpha blending is needed + */ + SkyMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + /** + * Specifies if this material should be rendered in alpha test mode + * @returns false as the sky material doesn't need alpha testing. + */ + SkyMaterial.prototype.needAlphaTesting = function () { + return false; + }; + /** + * Get the texture used for alpha test purpose. + * @returns null as the sky material has no texture. + */ + SkyMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + /** + * Get if the submesh is ready to be used and all its information available. + * Child classes can use it to update shaders + * @param mesh defines the mesh to check + * @param subMesh defines which submesh to check + * @param useInstances specifies that instances should be used + * @returns a boolean indicating that the submesh is ready or not + */ + SkyMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new SkyMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, false, defines); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, false); + if (defines.IMAGEPROCESSINGPOSTPROCESS !== scene.imageProcessingConfiguration.applyByPostProcess) { + defines.markAsMiscDirty(); + } + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + var shaderName = "sky"; + var join = defines.toString(); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, attribs, ["world", "viewProjection", "view", + "vFogInfos", "vFogColor", "pointSize", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "luminance", "turbidity", "rayleigh", "mieCoefficient", "mieDirectionalG", "sunPosition", + "cameraPosition", "cameraOffset", "up" + ], [], join, fallbacks, this.onCompiled, this.onError), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + /** + * Binds the submesh to this material by preparing the effect and shader to draw + * @param world defines the world transformation matrix + * @param mesh defines the mesh containing the submesh + * @param subMesh defines the submesh to bind the material to + */ + SkyMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + if (this._mustRebind(scene, effect)) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Sky + var camera = scene.activeCamera; + if (camera) { + var cameraWorldMatrix = camera.getWorldMatrix(); + this._cameraPosition.x = cameraWorldMatrix.m[12]; + this._cameraPosition.y = cameraWorldMatrix.m[13]; + this._cameraPosition.z = cameraWorldMatrix.m[14]; + this._activeEffect.setVector3("cameraPosition", this._cameraPosition); + } + this._activeEffect.setVector3("cameraOffset", this.cameraOffset); + this._activeEffect.setVector3("up", this.up); + if (this.luminance > 0) { + this._activeEffect.setFloat("luminance", this.luminance); + } + this._activeEffect.setFloat("turbidity", this.turbidity); + this._activeEffect.setFloat("rayleigh", this.rayleigh); + this._activeEffect.setFloat("mieCoefficient", this.mieCoefficient); + this._activeEffect.setFloat("mieDirectionalG", this.mieDirectionalG); + if (!this.useSunPosition) { + var theta = Math.PI * (this.inclination - 0.5); + var phi = 2 * Math.PI * (this.azimuth - 0.5); + this.sunPosition.x = this.distance * Math.cos(phi); + this.sunPosition.y = this.distance * Math.sin(phi) * Math.sin(theta); + this.sunPosition.z = this.distance * Math.sin(phi) * Math.cos(theta); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Quaternion"].FromUnitVectorsToRef(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].UpReadOnly, this.up, this._skyOrientation); + this.sunPosition.rotateByQuaternionToRef(this._skyOrientation, this.sunPosition); + } + this._activeEffect.setVector3("sunPosition", this.sunPosition); + this._afterBind(mesh, this._activeEffect); + }; + /** + * Get the list of animatables in the material. + * @returns the list of animatables object used in the material + */ + SkyMaterial.prototype.getAnimatables = function () { + return []; + }; + /** + * Disposes the material + * @param forceDisposeEffect specifies if effects should be forcefully disposed + */ + SkyMaterial.prototype.dispose = function (forceDisposeEffect) { + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + /** + * Makes a duplicate of the material, and gives it a new name + * @param name defines the new name for the duplicated material + * @returns the cloned material + */ + SkyMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new SkyMaterial(name, _this.getScene()); }, this); + }; + /** + * Serializes this material in a JSON representation + * @returns the serialized material object + */ + SkyMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.SkyMaterial"; + return serializationObject; + }; + /** + * Gets the current class name of the material e.g. "SkyMaterial" + * Mainly use in serialization. + * @returns the class name + */ + SkyMaterial.prototype.getClassName = function () { + return "SkyMaterial"; + }; + /** + * Creates a sky material from parsed material data + * @param source defines the JSON representation of the material + * @param scene defines the hosting scene + * @param rootUrl defines the root URL to use to load textures and relative dependencies + * @returns a new sky material + */ + SkyMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new SkyMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "luminance", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "turbidity", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "rayleigh", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "mieCoefficient", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "mieDirectionalG", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "distance", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "inclination", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "azimuth", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], SkyMaterial.prototype, "sunPosition", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], SkyMaterial.prototype, "useSunPosition", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], SkyMaterial.prototype, "cameraOffset", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector3"])() + ], SkyMaterial.prototype, "up", void 0); + return SkyMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.SkyMaterial"] = SkyMaterial; + + +/***/ }), + +/***/ "./terrain/index.ts": +/*!**************************!*\ + !*** ./terrain/index.ts ***! + \**************************/ +/*! exports provided: TerrainMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _terrainMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./terrainMaterial */ "./terrain/terrainMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return _terrainMaterial__WEBPACK_IMPORTED_MODULE_0__["TerrainMaterial"]; }); + + + + +/***/ }), + +/***/ "./terrain/terrain.fragment.ts": +/*!*************************************!*\ + !*** ./terrain/terrain.fragment.ts ***! + \*************************************/ +/*! exports provided: terrainPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainPixelShader", function() { return terrainPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'terrainPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform sampler2D textureSampler;\nuniform vec2 vTextureInfos;\nuniform sampler2D diffuse1Sampler;\nuniform sampler2D diffuse2Sampler;\nuniform sampler2D diffuse3Sampler;\nuniform vec2 diffuse1Infos;\nuniform vec2 diffuse2Infos;\nuniform vec2 diffuse3Infos;\n#endif\n#ifdef BUMP\nuniform sampler2D bump1Sampler;\nuniform sampler2D bump2Sampler;\nuniform sampler2D bump3Sampler;\n#endif\n\n#include\n#include\n#include\n\n#include\n\n#ifdef BUMP\n#extension GL_OES_standard_derivatives : enable\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv)\n{\n\nvec3 dp1=dFdx(p);\nvec3 dp2=dFdy(p);\nvec2 duv1=dFdx(uv);\nvec2 duv2=dFdy(uv);\n\nvec3 dp2perp=cross(dp2,normal);\nvec3 dp1perp=cross(normal,dp1);\nvec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;\nvec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;\n\nfloat invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));\nreturn mat3(tangent*invmax,binormal*invmax,normal);\n}\nvec3 perturbNormal(vec3 viewDir,vec3 mixColor)\n{\nvec3 bump1Color=texture2D(bump1Sampler,vTextureUV*diffuse1Infos).xyz;\nvec3 bump2Color=texture2D(bump2Sampler,vTextureUV*diffuse2Infos).xyz;\nvec3 bump3Color=texture2D(bump3Sampler,vTextureUV*diffuse3Infos).xyz;\nbump1Color.rgb*=mixColor.r;\nbump2Color.rgb=mix(bump1Color.rgb,bump2Color.rgb,mixColor.g);\nvec3 map=mix(bump2Color.rgb,bump3Color.rgb,mixColor.b);\nmap=map*255./127.-128./127.;\nmat3 TBN=cotangent_frame(vNormalW*vTextureInfos.y,-viewDir,vTextureUV);\nreturn normalize(TBN*map);\n}\n#endif\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\n#ifdef DIFFUSE\nbaseColor=texture2D(textureSampler,vTextureUV);\n#if defined(BUMP) && defined(DIFFUSE)\nnormalW=perturbNormal(viewDirectionW,baseColor.rgb);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\nbaseColor.rgb*=vTextureInfos.y;\nvec4 diffuse1Color=texture2D(diffuse1Sampler,vTextureUV*diffuse1Infos);\nvec4 diffuse2Color=texture2D(diffuse2Sampler,vTextureUV*diffuse2Infos);\nvec4 diffuse3Color=texture2D(diffuse3Sampler,vTextureUV*diffuse3Infos);\ndiffuse1Color.rgb*=baseColor.r;\ndiffuse2Color.rgb=mix(diffuse1Color.rgb,diffuse2Color.rgb,baseColor.g);\nbaseColor.rgb=mix(diffuse2Color.rgb,diffuse3Color.rgb,baseColor.b);\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor*baseColor.rgb,0.0,1.0);\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var terrainPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./terrain/terrain.vertex.ts": +/*!***********************************!*\ + !*** ./terrain/terrain.vertex.ts ***! + \***********************************/ +/*! exports provided: terrainVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "terrainVertexShader", function() { return terrainVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'terrainVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vTextureUV;\nuniform mat4 textureMatrix;\nuniform vec2 vTextureInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vTextureInfos.x == 0.)\n{\nvTextureUV=vec2(textureMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvTextureUV=vec2(textureMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var terrainVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./terrain/terrainMaterial.ts": +/*!************************************!*\ + !*** ./terrain/terrainMaterial.ts ***! + \************************************/ +/*! exports provided: TerrainMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TerrainMaterial", function() { return TerrainMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _terrain_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./terrain.fragment */ "./terrain/terrain.fragment.ts"); +/* harmony import */ var _terrain_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./terrain.vertex */ "./terrain/terrain.vertex.ts"); + + + + + + + + + + + + + +var TerrainMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TerrainMaterialDefines, _super); + function TerrainMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSE = false; + _this.BUMP = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return TerrainMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var TerrainMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TerrainMaterial, _super); + function TerrainMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + TerrainMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + TerrainMaterial.prototype.needAlphaTesting = function () { + return false; + }; + TerrainMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + TerrainMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new TerrainMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (scene.texturesEnabled) { + if (!this.mixTexture || !this.mixTexture.isReady()) { + return false; + } + defines._needUVs = true; + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (!this.diffuseTexture1 || !this.diffuseTexture1.isReady()) { + return false; + } + if (!this.diffuseTexture2 || !this.diffuseTexture2.isReady()) { + return false; + } + if (!this.diffuseTexture3 || !this.diffuseTexture3.isReady()) { + return false; + } + defines.DIFFUSE = true; + } + if (this.bumpTexture1 && this.bumpTexture2 && this.bumpTexture3 && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + if (!this.bumpTexture1.isReady()) { + return false; + } + if (!this.bumpTexture2.isReady()) { + return false; + } + if (!this.bumpTexture3.isReady()) { + return false; + } + defines._needNormals = true; + defines.BUMP = true; + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "terrain"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vTextureInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "textureMatrix", + "diffuse1Infos", "diffuse2Infos", "diffuse3Infos" + ]; + var samplers = ["textureSampler", "diffuse1Sampler", "diffuse2Sampler", "diffuse3Sampler", + "bump1Sampler", "bump2Sampler", "bump3Sampler" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + TerrainMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.mixTexture) { + this._activeEffect.setTexture("textureSampler", this._mixTexture); + this._activeEffect.setFloat2("vTextureInfos", this._mixTexture.coordinatesIndex, this._mixTexture.level); + this._activeEffect.setMatrix("textureMatrix", this._mixTexture.getTextureMatrix()); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + if (this._diffuseTexture1) { + this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1); + this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale); + } + if (this._diffuseTexture2) { + this._activeEffect.setTexture("diffuse2Sampler", this._diffuseTexture2); + this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale); + } + if (this._diffuseTexture3) { + this._activeEffect.setTexture("diffuse3Sampler", this._diffuseTexture3); + this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale); + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled && scene.getEngine().getCaps().standardDerivatives) { + if (this._bumpTexture1) { + this._activeEffect.setTexture("bump1Sampler", this._bumpTexture1); + } + if (this._bumpTexture2) { + this._activeEffect.setTexture("bump2Sampler", this._bumpTexture2); + } + if (this._bumpTexture3) { + this._activeEffect.setTexture("bump3Sampler", this._bumpTexture3); + } + } + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + TerrainMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) { + results.push(this.mixTexture); + } + return results; + }; + TerrainMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._mixTexture) { + activeTextures.push(this._mixTexture); + } + if (this._diffuseTexture1) { + activeTextures.push(this._diffuseTexture1); + } + if (this._diffuseTexture2) { + activeTextures.push(this._diffuseTexture2); + } + if (this._diffuseTexture3) { + activeTextures.push(this._diffuseTexture3); + } + if (this._bumpTexture1) { + activeTextures.push(this._bumpTexture1); + } + if (this._bumpTexture2) { + activeTextures.push(this._bumpTexture2); + } + if (this._bumpTexture3) { + activeTextures.push(this._bumpTexture3); + } + return activeTextures; + }; + TerrainMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._mixTexture === texture) { + return true; + } + if (this._diffuseTexture1 === texture) { + return true; + } + if (this._diffuseTexture2 === texture) { + return true; + } + if (this._diffuseTexture3 === texture) { + return true; + } + if (this._bumpTexture1 === texture) { + return true; + } + if (this._bumpTexture2 === texture) { + return true; + } + if (this._bumpTexture3 === texture) { + return true; + } + return false; + }; + TerrainMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.mixTexture) { + this.mixTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + TerrainMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new TerrainMaterial(name, _this.getScene()); }, this); + }; + TerrainMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.TerrainMaterial"; + return serializationObject; + }; + TerrainMaterial.prototype.getClassName = function () { + return "TerrainMaterial"; + }; + // Statics + TerrainMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new TerrainMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("mixTexture") + ], TerrainMaterial.prototype, "_mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture1") + ], TerrainMaterial.prototype, "_diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture2") + ], TerrainMaterial.prototype, "_diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexture3") + ], TerrainMaterial.prototype, "_diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "diffuseTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture1") + ], TerrainMaterial.prototype, "_bumpTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture1", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture2") + ], TerrainMaterial.prototype, "_bumpTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture3") + ], TerrainMaterial.prototype, "_bumpTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TerrainMaterial.prototype, "bumpTexture3", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TerrainMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TerrainMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TerrainMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], TerrainMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TerrainMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], TerrainMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TerrainMaterial.prototype, "maxSimultaneousLights", void 0); + return TerrainMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.TerrainMaterial"] = TerrainMaterial; + + +/***/ }), + +/***/ "./triPlanar/index.ts": +/*!****************************!*\ + !*** ./triPlanar/index.ts ***! + \****************************/ +/*! exports provided: TriPlanarMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _triPlanarMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./triPlanarMaterial */ "./triPlanar/triPlanarMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return _triPlanarMaterial__WEBPACK_IMPORTED_MODULE_0__["TriPlanarMaterial"]; }); + + + + +/***/ }), + +/***/ "./triPlanar/triPlanarMaterial.ts": +/*!****************************************!*\ + !*** ./triPlanar/triPlanarMaterial.ts ***! + \****************************************/ +/*! exports provided: TriPlanarMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriPlanarMaterial", function() { return TriPlanarMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _triplanar_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./triplanar.fragment */ "./triPlanar/triplanar.fragment.ts"); +/* harmony import */ var _triplanar_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./triplanar.vertex */ "./triPlanar/triplanar.vertex.ts"); + + + + + + + + + + + + + +var TriPlanarMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TriPlanarMaterialDefines, _super); + function TriPlanarMaterialDefines() { + var _this = _super.call(this) || this; + _this.DIFFUSEX = false; + _this.DIFFUSEY = false; + _this.DIFFUSEZ = false; + _this.BUMPX = false; + _this.BUMPY = false; + _this.BUMPZ = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.SPECULARTERM = false; + _this.NORMAL = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return TriPlanarMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var TriPlanarMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TriPlanarMaterial, _super); + function TriPlanarMaterial(name, scene) { + var _this = _super.call(this, name, scene) || this; + _this.tileSize = 1; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.2, 0.2, 0.2); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + return _this; + } + TriPlanarMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + TriPlanarMaterial.prototype.needAlphaTesting = function () { + return false; + }; + TriPlanarMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + // Methods + TriPlanarMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new TriPlanarMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + if (scene.texturesEnabled) { + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].DiffuseTextureEnabled) { + var textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ]; + var textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"]; + for (var i = 0; i < textures.length; i++) { + if (textures[i]) { + if (!textures[i].isReady()) { + return false; + } + else { + defines[textureDefines[i]] = true; + } + } + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + var textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ]; + var textureDefines = ["BUMPX", "BUMPY", "BUMPZ"]; + for (var i = 0; i < textures.length; i++) { + if (textures[i]) { + if (!textures[i].isReady()) { + return false; + } + else { + defines[textureDefines[i]] = true; + } + } + } + } + } + } + // Misc. + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting); + // Values that need to be evaluated on every frame + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess; + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "triplanar"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", + "tileSize" + ]; + var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ", + "normalSamplerX", "normalSamplerY", "normalSamplerZ" + ]; + var uniformBuffers = new Array(); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + TriPlanarMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + this._activeEffect.setFloat("tileSize", this.tileSize); + if (scene.getCachedMaterial() !== this) { + // Textures + if (this.diffuseTextureX) { + this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX); + } + if (this.diffuseTextureY) { + this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY); + } + if (this.diffuseTextureZ) { + this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ); + } + if (this.normalTextureX) { + this._activeEffect.setTexture("normalSamplerX", this.normalTextureX); + } + if (this.normalTextureY) { + this._activeEffect.setTexture("normalSamplerY", this.normalTextureY); + } + if (this.normalTextureZ) { + this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + this._afterBind(mesh, this._activeEffect); + }; + TriPlanarMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) { + results.push(this.mixTexture); + } + return results; + }; + TriPlanarMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._diffuseTextureX) { + activeTextures.push(this._diffuseTextureX); + } + if (this._diffuseTextureY) { + activeTextures.push(this._diffuseTextureY); + } + if (this._diffuseTextureZ) { + activeTextures.push(this._diffuseTextureZ); + } + if (this._normalTextureX) { + activeTextures.push(this._normalTextureX); + } + if (this._normalTextureY) { + activeTextures.push(this._normalTextureY); + } + if (this._normalTextureZ) { + activeTextures.push(this._normalTextureZ); + } + return activeTextures; + }; + TriPlanarMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._diffuseTextureX === texture) { + return true; + } + if (this._diffuseTextureY === texture) { + return true; + } + if (this._diffuseTextureZ === texture) { + return true; + } + if (this._normalTextureX === texture) { + return true; + } + if (this._normalTextureY === texture) { + return true; + } + if (this._normalTextureZ === texture) { + return true; + } + return false; + }; + TriPlanarMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.mixTexture) { + this.mixTexture.dispose(); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + TriPlanarMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new TriPlanarMaterial(name, _this.getScene()); }, this); + }; + TriPlanarMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.TriPlanarMaterial"; + return serializationObject; + }; + TriPlanarMaterial.prototype.getClassName = function () { + return "TriPlanarMaterial"; + }; + // Statics + TriPlanarMaterial.Parse = function (source, scene, rootUrl) { + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl); + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])() + ], TriPlanarMaterial.prototype, "mixTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTextureX") + ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTexturY") + ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("diffuseTextureZ") + ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureX") + ], TriPlanarMaterial.prototype, "_normalTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureX", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureY") + ], TriPlanarMaterial.prototype, "_normalTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureY", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("normalTextureZ") + ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], TriPlanarMaterial.prototype, "normalTextureZ", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TriPlanarMaterial.prototype, "tileSize", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TriPlanarMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], TriPlanarMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], TriPlanarMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], TriPlanarMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TriPlanarMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0); + return TriPlanarMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.TriPlanarMaterial"] = TriPlanarMaterial; + + +/***/ }), + +/***/ "./triPlanar/triplanar.fragment.ts": +/*!*****************************************!*\ + !*** ./triPlanar/triplanar.fragment.ts ***! + \*****************************************/ +/*! exports provided: triplanarPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarPixelShader", function() { return triplanarPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + +var name = 'triplanarPixelShader'; +var shader = "precision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\n#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\nuniform sampler2D diffuseSamplerX;\n#ifdef BUMPX\nuniform sampler2D normalSamplerX;\n#endif\n#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\nuniform sampler2D diffuseSamplerY;\n#ifdef BUMPY\nuniform sampler2D normalSamplerY;\n#endif\n#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\nuniform sampler2D diffuseSamplerZ;\n#ifdef BUMPZ\nuniform sampler2D normalSamplerZ;\n#endif\n#endif\n#ifdef NORMAL\nvarying mat3 tangentSpace;\n#endif\n#include\n#include\n#include\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(0.,0.,0.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=tangentSpace[2];\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\nvec4 baseNormal=vec4(0.0,0.0,0.0,1.0);\nnormalW*=normalW;\n#ifdef DIFFUSEX\nbaseColor+=texture2D(diffuseSamplerX,vTextureUVX)*normalW.x;\n#ifdef BUMPX\nbaseNormal+=texture2D(normalSamplerX,vTextureUVX)*normalW.x;\n#endif\n#endif\n#ifdef DIFFUSEY\nbaseColor+=texture2D(diffuseSamplerY,vTextureUVY)*normalW.y;\n#ifdef BUMPY\nbaseNormal+=texture2D(normalSamplerY,vTextureUVY)*normalW.y;\n#endif\n#endif\n#ifdef DIFFUSEZ\nbaseColor+=texture2D(diffuseSamplerZ,vTextureUVZ)*normalW.z;\n#ifdef BUMPZ\nbaseNormal+=texture2D(normalSamplerZ,vTextureUVZ)*normalW.z;\n#endif\n#endif\n#ifdef NORMAL\nnormalW=normalize((2.0*baseNormal.xyz-1.0)*tangentSpace);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\ngl_FragColor=color;\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var triplanarPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./triPlanar/triplanar.vertex.ts": +/*!***************************************!*\ + !*** ./triPlanar/triplanar.vertex.ts ***! + \***************************************/ +/*! exports provided: triplanarVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "triplanarVertexShader", function() { return triplanarVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + +var name = 'triplanarVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\n#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\n#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\n#endif\nuniform float tileSize;\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying mat3 tangentSpace;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\nvoid main(void)\n{\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef DIFFUSEX\nvTextureUVX=worldPos.zy/tileSize;\n#endif\n#ifdef DIFFUSEY\nvTextureUVY=worldPos.xz/tileSize;\n#endif\n#ifdef DIFFUSEZ\nvTextureUVZ=worldPos.xy/tileSize;\n#endif\n#ifdef NORMAL\n\nvec3 xtan=vec3(0,0,1);\nvec3 xbin=vec3(0,1,0);\nvec3 ytan=vec3(1,0,0);\nvec3 ybin=vec3(0,0,1);\nvec3 ztan=vec3(1,0,0);\nvec3 zbin=vec3(0,1,0);\nvec3 normalizedNormal=normalize(normal);\nnormalizedNormal*=normalizedNormal;\nvec3 worldBinormal=normalize(xbin*normalizedNormal.x+ybin*normalizedNormal.y+zbin*normalizedNormal.z);\nvec3 worldTangent=normalize(xtan*normalizedNormal.x+ytan*normalizedNormal.y+ztan*normalizedNormal.z);\nworldTangent=(world*vec4(worldTangent,0.0)).xyz;\nworldBinormal=(world*vec4(worldBinormal,0.0)).xyz;\nvec3 worldNormal=(world*vec4(normalize(normal),0.0)).xyz;\ntangentSpace[0]=worldTangent;\ntangentSpace[1]=worldBinormal;\ntangentSpace[2]=worldNormal;\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var triplanarVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/index.ts": +/*!************************!*\ + !*** ./water/index.ts ***! + \************************/ +/*! exports provided: WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _waterMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./waterMaterial */ "./water/waterMaterial.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return _waterMaterial__WEBPACK_IMPORTED_MODULE_0__["WaterMaterial"]; }); + + + + +/***/ }), + +/***/ "./water/water.fragment.ts": +/*!*********************************!*\ + !*** ./water/water.fragment.ts ***! + \*********************************/ +/*! exports provided: waterPixelShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waterPixelShader", function() { return waterPixelShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + + + +var name = 'waterPixelShader'; +var shader = "#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nprecision highp float;\n\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#include\n#include\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef BUMP\nvarying vec2 vNormalUV;\n#ifdef BUMPSUPERIMPOSE\nvarying vec2 vNormalUV2;\n#endif\nuniform sampler2D normalSampler;\nuniform vec2 vNormalInfos;\n#endif\nuniform sampler2D refractionSampler;\nuniform sampler2D reflectionSampler;\n\nconst float LOG2=1.442695;\nuniform vec3 cameraPosition;\nuniform vec4 waterColor;\nuniform float colorBlendFactor;\nuniform vec4 waterColor2;\nuniform float colorBlendFactor2;\nuniform float bumpHeight;\nuniform float time;\n\nvarying vec3 vRefractionMapTexCoord;\nvarying vec3 vReflectionMapTexCoord;\nvarying vec3 vPosition;\n#include\n#include\n\n#include\nvoid main(void) {\n\n#include\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n#ifdef BUMP\n#ifdef BUMPSUPERIMPOSE\nbaseColor=0.6*texture2D(normalSampler,vNormalUV)+0.4*texture2D(normalSampler,vec2(vNormalUV2.x,vNormalUV2.y));\n#else\nbaseColor=texture2D(normalSampler,vNormalUV);\n#endif\nvec3 bumpColor=baseColor.rgb;\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\nbaseColor.rgb*=vNormalInfos.y;\n#else\nvec3 bumpColor=vec3(1.0);\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n\n#ifdef NORMAL\nvec2 perturbation=bumpHeight*(baseColor.rg-0.5);\n#ifdef BUMPAFFECTSREFLECTION\nvec3 normalW=normalize(vNormalW+vec3(perturbation.x*8.0,0.0,perturbation.y*8.0));\nif (normalW.y<0.0) {\nnormalW.y=-normalW.y;\n}\n#else\nvec3 normalW=normalize(vNormalW);\n#endif\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\nvec2 perturbation=bumpHeight*(vec2(1.0,1.0)-0.5);\n#endif\n#ifdef FRESNELSEPARATE\n#ifdef REFLECTION\n\nvec2 projectedRefractionTexCoords=clamp(vRefractionMapTexCoord.xy/vRefractionMapTexCoord.z+perturbation*0.5,0.0,1.0);\nvec4 refractiveColor=texture2D(refractionSampler,projectedRefractionTexCoords);\n#ifdef IS_REFRACTION_LINEAR\nrefractiveColor.rgb=toGammaSpace(refractiveColor.rgb);\n#endif\nvec2 projectedReflectionTexCoords=clamp(vec2(\nvReflectionMapTexCoord.x/vReflectionMapTexCoord.z+perturbation.x*0.3,\nvReflectionMapTexCoord.y/vReflectionMapTexCoord.z+perturbation.y\n),0.0,1.0);\nvec4 reflectiveColor=texture2D(reflectionSampler,projectedReflectionTexCoords);\n#ifdef IS_REFLECTION_LINEAR\nreflectiveColor.rgb=toGammaSpace(reflectiveColor.rgb);\n#endif\nvec3 upVector=vec3(0.0,1.0,0.0);\nfloat fresnelTerm=clamp(abs(pow(dot(viewDirectionW,upVector),3.0)),0.05,0.65);\nfloat IfresnelTerm=1.0-fresnelTerm;\nrefractiveColor=colorBlendFactor*waterColor+(1.0-colorBlendFactor)*refractiveColor;\nreflectiveColor=IfresnelTerm*colorBlendFactor2*waterColor+(1.0-colorBlendFactor2*IfresnelTerm)*reflectiveColor;\nvec4 combinedColor=refractiveColor*fresnelTerm+reflectiveColor*IfresnelTerm;\nbaseColor=combinedColor;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\nvec3 finalDiffuse=clamp(baseColor.rgb,0.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#else\n#ifdef REFLECTION\n\nvec2 projectedRefractionTexCoords=clamp(vRefractionMapTexCoord.xy/vRefractionMapTexCoord.z+perturbation,0.0,1.0);\nvec4 refractiveColor=texture2D(refractionSampler,projectedRefractionTexCoords);\n#ifdef IS_REFRACTION_LINEAR\nrefractiveColor.rgb=toGammaSpace(refractiveColor.rgb);\n#endif\nvec2 projectedReflectionTexCoords=clamp(vReflectionMapTexCoord.xy/vReflectionMapTexCoord.z+perturbation,0.0,1.0);\nvec4 reflectiveColor=texture2D(reflectionSampler,projectedReflectionTexCoords);\n#ifdef IS_REFLECTION_LINEAR\nreflectiveColor.rgb=toGammaSpace(reflectiveColor.rgb);\n#endif\nvec3 upVector=vec3(0.0,1.0,0.0);\nfloat fresnelTerm=max(dot(viewDirectionW,upVector),0.0);\nvec4 combinedColor=refractiveColor*fresnelTerm+reflectiveColor*(1.0-fresnelTerm);\nbaseColor=colorBlendFactor*waterColor+(1.0-colorBlendFactor)*combinedColor;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\nfloat shadow=1.;\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularBase=vec3(0.,0.,0.);\nvec3 specularColor=vSpecularColor.rgb;\n#else\nfloat glossiness=0.;\n#endif\n#include[0..maxSimultaneousLights]\nvec3 finalDiffuse=clamp(baseColor.rgb,0.0,1.0);\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#endif\n\nvec4 color=vec4(finalDiffuse+finalSpecular,alpha);\n#include\n#include\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\ncolor.rgb=toLinearSpace(color.rgb);\n#elif defined(IMAGEPROCESSING)\ncolor.rgb=toLinearSpace(color.rgb);\ncolor=applyImageProcessing(color);\n#endif\ngl_FragColor=color;\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var waterPixelShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/water.vertex.ts": +/*!*******************************!*\ + !*** ./water/water.vertex.ts ***! + \*******************************/ +/*! exports provided: waterVertexShader */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waterVertexShader", function() { return waterVertexShader; }); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__); + + + + + + + + + + + + + + +var name = 'waterVertexShader'; +var shader = "precision highp float;\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n\n#include\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef BUMP\nvarying vec2 vNormalUV;\n#ifdef BUMPSUPERIMPOSE\nvarying vec2 vNormalUV2;\n#endif\nuniform mat4 normalMatrix;\nuniform vec2 vNormalInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n\nuniform mat4 worldReflectionViewProjection;\nuniform vec2 windDirection;\nuniform float waveLength;\nuniform float time;\nuniform float windForce;\nuniform float waveHeight;\nuniform float waveSpeed;\nuniform float waveCount;\n\nvarying vec3 vPosition;\nvarying vec3 vRefractionMapTexCoord;\nvarying vec3 vReflectionMapTexCoord;\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef BUMP\nif (vNormalInfos.x == 0.)\n{\nvNormalUV=vec2(normalMatrix*vec4((uv*1.0)/waveLength+time*windForce*windDirection,1.0,0.0));\n#ifdef BUMPSUPERIMPOSE\nvNormalUV2=vec2(normalMatrix*vec4((uv*0.721)/waveLength+time*1.2*windForce*windDirection,1.0,0.0));\n#endif\n}\nelse\n{\nvNormalUV=vec2(normalMatrix*vec4((uv2*1.0)/waveLength+time*windForce*windDirection ,1.0,0.0));\n#ifdef BUMPSUPERIMPOSE\nvNormalUV2=vec2(normalMatrix*vec4((uv2*0.721)/waveLength+time*1.2*windForce*windDirection ,1.0,0.0));\n#endif\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\nfloat finalWaveCount=1.0/(waveCount*0.5);\nvec3 p=position;\nfloat newY=(sin(((p.x/finalWaveCount)+time*waveSpeed))*waveHeight*windDirection.x*5.0)\n+(cos(((p.z/finalWaveCount)+time*waveSpeed))*waveHeight*windDirection.y*5.0);\np.y+=abs(newY);\ngl_Position=viewProjection*finalWorld*vec4(p,1.0);\n#ifdef REFLECTION\nworldPos=viewProjection*finalWorld*vec4(p,1.0);\n\nvPosition=position;\nvRefractionMapTexCoord.x=0.5*(worldPos.w+worldPos.x);\nvRefractionMapTexCoord.y=0.5*(worldPos.w+worldPos.y);\nvRefractionMapTexCoord.z=worldPos.w;\nworldPos=worldReflectionViewProjection*vec4(position,1.0);\nvReflectionMapTexCoord.x=0.5*(worldPos.w+worldPos.x);\nvReflectionMapTexCoord.y=0.5*(worldPos.w+worldPos.y);\nvReflectionMapTexCoord.z=worldPos.w;\n#endif\n#include\n}\n"; +babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__["ShaderStore"].ShadersStore[name] = shader; +/** @hidden */ +var waterVertexShader = { name: name, shader: shader }; + + +/***/ }), + +/***/ "./water/waterMaterial.ts": +/*!********************************!*\ + !*** ./water/waterMaterial.ts ***! + \********************************/ +/*! exports provided: WaterMaterial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WaterMaterial", function() { return WaterMaterial; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/decorators"); +/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _water_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./water.fragment */ "./water/water.fragment.ts"); +/* harmony import */ var _water_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./water.vertex */ "./water/water.vertex.ts"); + + + + + + + + + + + + + + + + + + + + +var WaterMaterialDefines = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterMaterialDefines, _super); + function WaterMaterialDefines() { + var _this = _super.call(this) || this; + _this.BUMP = false; + _this.REFLECTION = false; + _this.CLIPPLANE = false; + _this.CLIPPLANE2 = false; + _this.CLIPPLANE3 = false; + _this.CLIPPLANE4 = false; + _this.CLIPPLANE5 = false; + _this.CLIPPLANE6 = false; + _this.ALPHATEST = false; + _this.DEPTHPREPASS = false; + _this.POINTSIZE = false; + _this.FOG = false; + _this.NORMAL = false; + _this.UV1 = false; + _this.UV2 = false; + _this.VERTEXCOLOR = false; + _this.VERTEXALPHA = false; + _this.NUM_BONE_INFLUENCERS = 0; + _this.BonesPerMesh = 0; + _this.INSTANCES = false; + _this.SPECULARTERM = false; + _this.LOGARITHMICDEPTH = false; + _this.USE_REVERSE_DEPTHBUFFER = false; + _this.FRESNELSEPARATE = false; + _this.BUMPSUPERIMPOSE = false; + _this.BUMPAFFECTSREFLECTION = false; + _this.IMAGEPROCESSING = false; + _this.VIGNETTE = false; + _this.VIGNETTEBLENDMODEMULTIPLY = false; + _this.VIGNETTEBLENDMODEOPAQUE = false; + _this.TONEMAPPING = false; + _this.TONEMAPPING_ACES = false; + _this.CONTRAST = false; + _this.EXPOSURE = false; + _this.COLORCURVES = false; + _this.COLORGRADING = false; + _this.COLORGRADING3D = false; + _this.SAMPLER3DGREENDEPTH = false; + _this.SAMPLER3DBGRMAP = false; + _this.IMAGEPROCESSINGPOSTPROCESS = false; + _this.rebuild(); + return _this; + } + return WaterMaterialDefines; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialDefines"])); +var WaterMaterial = /** @class */ (function (_super) { + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(WaterMaterial, _super); + /** + * Constructor + */ + function WaterMaterial(name, scene, renderTargetSize) { + if (renderTargetSize === void 0) { renderTargetSize = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector2"](512, 512); } + var _this = _super.call(this, name, scene) || this; + _this.renderTargetSize = renderTargetSize; + _this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](1, 1, 1); + _this.specularColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0, 0, 0); + _this.specularPower = 64; + _this._disableLighting = false; + _this._maxSimultaneousLights = 4; + /** + * Defines the wind force. + */ + _this.windForce = 6; + /** + * Defines the direction of the wind in the plane (X, Z). + */ + _this.windDirection = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector2"](0, 1); + /** + * Defines the height of the waves. + */ + _this.waveHeight = 0.4; + /** + * Defines the bump height related to the bump map. + */ + _this.bumpHeight = 0.4; + /** + * Defines wether or not: to add a smaller moving bump to less steady waves. + */ + _this._bumpSuperimpose = false; + /** + * Defines wether or not color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel. + */ + _this._fresnelSeparate = false; + /** + * Defines wether or not bump Wwves modify the reflection. + */ + _this._bumpAffectsReflection = false; + /** + * Defines the water color blended with the refraction (near). + */ + _this.waterColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.1, 0.1, 0.6); + /** + * Defines the blend factor related to the water color. + */ + _this.colorBlendFactor = 0.2; + /** + * Defines the water color blended with the reflection (far). + */ + _this.waterColor2 = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.1, 0.1, 0.6); + /** + * Defines the blend factor related to the water color (reflection, far). + */ + _this.colorBlendFactor2 = 0.2; + /** + * Defines the maximum length of a wave. + */ + _this.waveLength = 0.1; + /** + * Defines the waves speed. + */ + _this.waveSpeed = 1.0; + /** + * Defines the number of times waves are repeated. This is typically used to adjust waves count according to the ground's size where the material is applied on. + */ + _this.waveCount = 20; + /** + * Sets or gets whether or not automatic clipping should be enabled or not. Setting to true will save performances and + * will avoid calculating useless pixels in the pixel shader of the water material. + */ + _this.disableClipPlane = false; + _this._renderTargets = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SmartArray"](16); + /* + * Private members + */ + _this._mesh = null; + _this._reflectionTransform = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].Zero(); + _this._lastTime = 0; + _this._lastDeltaTime = 0; + _this._createRenderTargets(scene, renderTargetSize); + // Create render targets + _this.getRenderTargetTextures = function () { + _this._renderTargets.reset(); + _this._renderTargets.push(_this._reflectionRTT); + _this._renderTargets.push(_this._refractionRTT); + return _this._renderTargets; + }; + _this._imageProcessingConfiguration = _this.getScene().imageProcessingConfiguration; + if (_this._imageProcessingConfiguration) { + _this._imageProcessingObserver = _this._imageProcessingConfiguration.onUpdateParameters.add(function () { + _this._markAllSubMeshesAsImageProcessingDirty(); + }); + } + return _this; + } + Object.defineProperty(WaterMaterial.prototype, "hasRenderTargetTextures", { + /** + * Gets a boolean indicating that current material needs to register RTT + */ + get: function () { + return true; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "useLogarithmicDepth", { + get: function () { + return this._useLogarithmicDepth; + }, + set: function (value) { + this._useLogarithmicDepth = value && this.getScene().getEngine().getCaps().fragmentDepthSupported; + this._markAllSubMeshesAsMiscDirty(); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "refractionTexture", { + // Get / Set + get: function () { + return this._refractionRTT; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WaterMaterial.prototype, "reflectionTexture", { + get: function () { + return this._reflectionRTT; + }, + enumerable: false, + configurable: true + }); + // Methods + WaterMaterial.prototype.addToRenderList = function (node) { + if (this._refractionRTT && this._refractionRTT.renderList) { + this._refractionRTT.renderList.push(node); + } + if (this._reflectionRTT && this._reflectionRTT.renderList) { + this._reflectionRTT.renderList.push(node); + } + }; + WaterMaterial.prototype.enableRenderTargets = function (enable) { + var refreshRate = enable ? 1 : 0; + if (this._refractionRTT) { + this._refractionRTT.refreshRate = refreshRate; + } + if (this._reflectionRTT) { + this._reflectionRTT.refreshRate = refreshRate; + } + }; + WaterMaterial.prototype.getRenderList = function () { + return this._refractionRTT ? this._refractionRTT.renderList : []; + }; + Object.defineProperty(WaterMaterial.prototype, "renderTargetsEnabled", { + get: function () { + return !(this._refractionRTT && this._refractionRTT.refreshRate === 0); + }, + enumerable: false, + configurable: true + }); + WaterMaterial.prototype.needAlphaBlending = function () { + return (this.alpha < 1.0); + }; + WaterMaterial.prototype.needAlphaTesting = function () { + return false; + }; + WaterMaterial.prototype.getAlphaTestTexture = function () { + return null; + }; + WaterMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) { + if (this.isFrozen) { + if (subMesh.effect && subMesh.effect._wasPreviouslyReady) { + return true; + } + } + if (!subMesh._materialDefines) { + subMesh.materialDefines = new WaterMaterialDefines(); + } + var defines = subMesh._materialDefines; + var scene = this.getScene(); + if (this._isReadyForSubMesh(subMesh)) { + return true; + } + var engine = scene.getEngine(); + // Textures + if (defines._areTexturesDirty) { + defines._needUVs = false; + if (scene.texturesEnabled) { + if (this.bumpTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + if (!this.bumpTexture.isReady()) { + return false; + } + else { + defines._needUVs = true; + defines.BUMP = true; + } + } + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].ReflectionTextureEnabled) { + defines.REFLECTION = true; + } + } + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines); + if (defines._areMiscDirty) { + if (this._fresnelSeparate) { + defines.FRESNELSEPARATE = true; + } + if (this._bumpSuperimpose) { + defines.BUMPSUPERIMPOSE = true; + } + if (this._bumpAffectsReflection) { + defines.BUMPAFFECTSREFLECTION = true; + } + } + // Lights + defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting); + // Image processing + if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) { + if (!this._imageProcessingConfiguration.isReady()) { + return false; + } + this._imageProcessingConfiguration.prepareDefines(defines); + defines.IS_REFLECTION_LINEAR = (this.reflectionTexture != null && !this.reflectionTexture.gammaSpace); + defines.IS_REFRACTION_LINEAR = (this.refractionTexture != null && !this.refractionTexture.gammaSpace); + } + // Attribs + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareDefinesForAttributes(mesh, defines, true, true); + // Configure this + this._mesh = mesh; + if (this._waitingRenderList) { + for (var i = 0; i < this._waitingRenderList.length; i++) { + this.addToRenderList(scene.getNodeById(this._waitingRenderList[i])); + } + this._waitingRenderList = null; + } + // Get correct effect + if (defines.isDirty) { + defines.markAsProcessed(); + scene.resetCachedMaterial(); + // Fallbacks + var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["EffectFallbacks"](); + if (defines.FOG) { + fallbacks.addFallback(1, "FOG"); + } + if (defines.LOGARITHMICDEPTH) { + fallbacks.addFallback(0, "LOGARITHMICDEPTH"); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights); + if (defines.NUM_BONE_INFLUENCERS > 0) { + fallbacks.addCPUSkinningFallback(0, mesh); + } + //Attributes + var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].PositionKind]; + if (defines.NORMAL) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].NormalKind); + } + if (defines.UV1) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UVKind); + } + if (defines.UV2) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].UV2Kind); + } + if (defines.VERTEXCOLOR) { + attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["VertexBuffer"].ColorKind); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForBones(attribs, mesh, defines, fallbacks); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareAttributesForInstances(attribs, defines); + // Legacy browser patch + var shaderName = "water"; + var join = defines.toString(); + var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor", + "vFogInfos", "vFogColor", "pointSize", + "vNormalInfos", + "mBones", + "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "normalMatrix", + "logarithmicDepthConstant", + // Water + "worldReflectionViewProjection", "windDirection", "waveLength", "time", "windForce", + "cameraPosition", "bumpHeight", "waveHeight", "waterColor", "waterColor2", "colorBlendFactor", "colorBlendFactor2", "waveSpeed", + "waveCount" + ]; + var samplers = ["normalSampler", + // Water + "refractionSampler", "reflectionSampler" + ]; + var uniformBuffers = new Array(); + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"]) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"].PrepareUniforms(uniforms, defines); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["ImageProcessingConfiguration"].PrepareSamplers(samplers, defines); + } + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].PrepareUniformsAndSamplersList({ + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: defines, + maxSimultaneousLights: this.maxSimultaneousLights + }); + subMesh.setEffect(scene.getEngine().createEffect(shaderName, { + attributes: attribs, + uniformsNames: uniforms, + uniformBuffersNames: uniformBuffers, + samplers: samplers, + defines: join, + fallbacks: fallbacks, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights } + }, engine), defines, this._materialContext); + } + if (!subMesh.effect || !subMesh.effect.isReady()) { + return false; + } + defines._renderId = scene.getRenderId(); + subMesh.effect._wasPreviouslyReady = true; + return true; + }; + WaterMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) { + var scene = this.getScene(); + var defines = subMesh._materialDefines; + if (!defines) { + return; + } + var effect = subMesh.effect; + if (!effect || !this._mesh) { + return; + } + this._activeEffect = effect; + // Matrices + this.bindOnlyWorldMatrix(world); + this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix()); + // Bones + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindBonesParameters(mesh, this._activeEffect); + if (this._mustRebind(scene, effect)) { + // Textures + if (this.bumpTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].BumpTextureEnabled) { + this._activeEffect.setTexture("normalSampler", this.bumpTexture); + this._activeEffect.setFloat2("vNormalInfos", this.bumpTexture.coordinatesIndex, this.bumpTexture.level); + this._activeEffect.setMatrix("normalMatrix", this.bumpTexture.getTextureMatrix()); + } + // Clip plane + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindClipPlane(this._activeEffect, scene); + // Point size + if (this.pointsCloud) { + this._activeEffect.setFloat("pointSize", this.pointSize); + } + scene.bindEyePosition(effect); + } + this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility); + if (defines.SPECULARTERM) { + this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower); + } + if (scene.lightsEnabled && !this.disableLighting) { + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights); + } + // View + if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Scene"].FOGMODE_NONE) { + this._activeEffect.setMatrix("view", scene.getViewMatrix()); + } + // Fog + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindFogParameters(scene, mesh, this._activeEffect); + // Log. depth + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialHelper"].BindLogDepth(defines, this._activeEffect, scene); + // Water + if (babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["MaterialFlags"].ReflectionTextureEnabled) { + this._activeEffect.setTexture("refractionSampler", this._refractionRTT); + this._activeEffect.setTexture("reflectionSampler", this._reflectionRTT); + } + var wrvp = this._mesh.getWorldMatrix().multiply(this._reflectionTransform).multiply(scene.getProjectionMatrix()); + // Add delta time. Prevent adding delta time if it hasn't changed. + var deltaTime = scene.getEngine().getDeltaTime(); + if (deltaTime !== this._lastDeltaTime) { + this._lastDeltaTime = deltaTime; + this._lastTime += this._lastDeltaTime; + } + this._activeEffect.setMatrix("worldReflectionViewProjection", wrvp); + this._activeEffect.setVector2("windDirection", this.windDirection); + this._activeEffect.setFloat("waveLength", this.waveLength); + this._activeEffect.setFloat("time", this._lastTime / 100000); + this._activeEffect.setFloat("windForce", this.windForce); + this._activeEffect.setFloat("waveHeight", this.waveHeight); + this._activeEffect.setFloat("bumpHeight", this.bumpHeight); + this._activeEffect.setColor4("waterColor", this.waterColor, 1.0); + this._activeEffect.setFloat("colorBlendFactor", this.colorBlendFactor); + this._activeEffect.setColor4("waterColor2", this.waterColor2, 1.0); + this._activeEffect.setFloat("colorBlendFactor2", this.colorBlendFactor2); + this._activeEffect.setFloat("waveSpeed", this.waveSpeed); + this._activeEffect.setFloat("waveCount", this.waveCount); + // image processing + if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) { + this._imageProcessingConfiguration.bind(this._activeEffect); + } + this._afterBind(mesh, this._activeEffect); + }; + WaterMaterial.prototype._createRenderTargets = function (scene, renderTargetSize) { + var _this = this; + // Render targets + this._refractionRTT = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["RenderTargetTexture"](name + "_refraction", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true); + this._refractionRTT.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._refractionRTT.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._refractionRTT.ignoreCameraViewport = true; + this._reflectionRTT = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["RenderTargetTexture"](name + "_reflection", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true); + this._reflectionRTT.wrapU = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._reflectionRTT.wrapV = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].TEXTURE_MIRROR_ADDRESSMODE; + this._reflectionRTT.ignoreCameraViewport = true; + var isVisible; + var clipPlane = null; + var savedViewMatrix; + var mirrorMatrix = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].Zero(); + this._refractionRTT.onBeforeRender = function () { + if (_this._mesh) { + isVisible = _this._mesh.isVisible; + _this._mesh.isVisible = false; + } + // Clip plane + if (!_this.disableClipPlane) { + clipPlane = scene.clipPlane; + var positiony = _this._mesh ? _this._mesh.position.y : 0.0; + scene.clipPlane = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Plane"].FromPositionAndNormal(new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, positiony + 0.05, 0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, 1, 0)); + } + }; + this._refractionRTT.onAfterRender = function () { + if (_this._mesh) { + _this._mesh.isVisible = isVisible; + } + // Clip plane + if (!_this.disableClipPlane) { + scene.clipPlane = clipPlane; + } + }; + this._reflectionRTT.onBeforeRender = function () { + if (_this._mesh) { + isVisible = _this._mesh.isVisible; + _this._mesh.isVisible = false; + } + // Clip plane + if (!_this.disableClipPlane) { + clipPlane = scene.clipPlane; + var positiony = _this._mesh ? _this._mesh.position.y : 0.0; + scene.clipPlane = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Plane"].FromPositionAndNormal(new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, positiony - 0.05, 0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"](0, -1, 0)); + babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Matrix"].ReflectionToRef(scene.clipPlane, mirrorMatrix); + } + // Transform + savedViewMatrix = scene.getViewMatrix(); + mirrorMatrix.multiplyToRef(savedViewMatrix, _this._reflectionTransform); + scene.setTransformMatrix(_this._reflectionTransform, scene.getProjectionMatrix()); + scene.getEngine().cullBackFaces = false; + scene._mirroredCameraPosition = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector3"].TransformCoordinates(scene.activeCamera.position, mirrorMatrix); + }; + this._reflectionRTT.onAfterRender = function () { + if (_this._mesh) { + _this._mesh.isVisible = isVisible; + } + // Clip plane + scene.clipPlane = clipPlane; + // Transform + scene.setTransformMatrix(savedViewMatrix, scene.getProjectionMatrix()); + scene.getEngine().cullBackFaces = null; + scene._mirroredCameraPosition = null; + }; + }; + WaterMaterial.prototype.getAnimatables = function () { + var results = []; + if (this.bumpTexture && this.bumpTexture.animations && this.bumpTexture.animations.length > 0) { + results.push(this.bumpTexture); + } + if (this._reflectionRTT && this._reflectionRTT.animations && this._reflectionRTT.animations.length > 0) { + results.push(this._reflectionRTT); + } + if (this._refractionRTT && this._refractionRTT.animations && this._refractionRTT.animations.length > 0) { + results.push(this._refractionRTT); + } + return results; + }; + WaterMaterial.prototype.getActiveTextures = function () { + var activeTextures = _super.prototype.getActiveTextures.call(this); + if (this._bumpTexture) { + activeTextures.push(this._bumpTexture); + } + return activeTextures; + }; + WaterMaterial.prototype.hasTexture = function (texture) { + if (_super.prototype.hasTexture.call(this, texture)) { + return true; + } + if (this._bumpTexture === texture) { + return true; + } + return false; + }; + WaterMaterial.prototype.dispose = function (forceDisposeEffect) { + if (this.bumpTexture) { + this.bumpTexture.dispose(); + } + var index = this.getScene().customRenderTargets.indexOf(this._refractionRTT); + if (index != -1) { + this.getScene().customRenderTargets.splice(index, 1); + } + index = -1; + index = this.getScene().customRenderTargets.indexOf(this._reflectionRTT); + if (index != -1) { + this.getScene().customRenderTargets.splice(index, 1); + } + if (this._reflectionRTT) { + this._reflectionRTT.dispose(); + } + if (this._refractionRTT) { + this._refractionRTT.dispose(); + } + // Remove image-processing observer + if (this._imageProcessingConfiguration && this._imageProcessingObserver) { + this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver); + } + _super.prototype.dispose.call(this, forceDisposeEffect); + }; + WaterMaterial.prototype.clone = function (name) { + var _this = this; + return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new WaterMaterial(name, _this.getScene()); }, this); + }; + WaterMaterial.prototype.serialize = function () { + var serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Serialize(this); + serializationObject.customType = "BABYLON.WaterMaterial"; + serializationObject.renderList = []; + if (this._refractionRTT && this._refractionRTT.renderList) { + for (var i = 0; i < this._refractionRTT.renderList.length; i++) { + serializationObject.renderList.push(this._refractionRTT.renderList[i].id); + } + } + return serializationObject; + }; + WaterMaterial.prototype.getClassName = function () { + return "WaterMaterial"; + }; + // Statics + WaterMaterial.Parse = function (source, scene, rootUrl) { + var mat = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Parse(function () { return new WaterMaterial(source.name, scene); }, source, scene, rootUrl); + mat._waitingRenderList = source.renderList; + return mat; + }; + WaterMaterial.CreateDefaultMesh = function (name, scene) { + var mesh = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Mesh"].CreateGround(name, 512, 512, 32, scene, false); + return mesh; + }; + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsTexture"])("bumpTexture") + ], WaterMaterial.prototype, "_bumpTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsTexturesDirty") + ], WaterMaterial.prototype, "bumpTexture", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "diffuseColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "specularColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "specularPower", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("disableLighting") + ], WaterMaterial.prototype, "_disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], WaterMaterial.prototype, "disableLighting", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("maxSimultaneousLights") + ], WaterMaterial.prototype, "_maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsLightsDirty") + ], WaterMaterial.prototype, "maxSimultaneousLights", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "windForce", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsVector2"])() + ], WaterMaterial.prototype, "windDirection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveHeight", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "bumpHeight", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("bumpSuperimpose") + ], WaterMaterial.prototype, "_bumpSuperimpose", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "bumpSuperimpose", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("fresnelSeparate") + ], WaterMaterial.prototype, "_fresnelSeparate", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "fresnelSeparate", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("bumpAffectsReflection") + ], WaterMaterial.prototype, "_bumpAffectsReflection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["expandToProperty"])("_markAllSubMeshesAsMiscDirty") + ], WaterMaterial.prototype, "bumpAffectsReflection", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "waterColor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "colorBlendFactor", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsColor3"])() + ], WaterMaterial.prototype, "waterColor2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "colorBlendFactor2", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveLength", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveSpeed", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "waveCount", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "disableClipPlane", void 0); + Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ + Object(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])() + ], WaterMaterial.prototype, "useLogarithmicDepth", null); + return WaterMaterial; +}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["PushMaterial"])); + +babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes["BABYLON.WaterMaterial"] = WaterMaterial; + + +/***/ }), + +/***/ "babylonjs/Misc/decorators": +/*!****************************************************************************************************!*\ + !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__; + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=babylonjs.materials.js.map \ No newline at end of file diff --git a/templerun2/assets/babylonjs/babylonjs.serializers.min.js b/templerun2/assets/babylonjs/babylonjs.serializers.min.js new file mode 100644 index 00000000..a40e6404 --- /dev/null +++ b/templerun2/assets/babylonjs/babylonjs.serializers.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-serializers",["babylonjs"],t):"object"==typeof exports?exports["babylonjs-serializers"]=t(require("babylonjs")):e.SERIALIZERS=t(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),a=function(){function e(){}return e._CreateBufferView=function(e,t,r,n,a){var o={buffer:e,byteLength:r};return t&&(o.byteOffset=t),a&&(o.name=a),n&&(o.byteStride=n),o},e._CreateAccessor=function(e,t,r,n,a,o,i,s){var u={name:t,bufferView:e,componentType:n,count:a,type:r};return null!=i&&(u.min=i),null!=s&&(u.max=s),null!=o&&(u.byteOffset=o),u},e._CalculateMinMaxPositions=function(t,r,a,o){var i,s,u,l=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0];if(a)for(var f=r,h=r+a;fc[p]&&(c[p]=d),++i}}return{min:l,max:c}},e._GetRightHandedPositionVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedPositionVector3FromRef=function(e){e.z*=-1},e._GetRightHandedPositionArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedNormalVector3=function(e){return new n.Vector3(e.x,e.y,-e.z)},e._GetRightHandedNormalVector3FromRef=function(e){e.z*=-1},e._GetRightHandedNormalArray3FromRef=function(e){e[2]*=-1},e._GetRightHandedVector4FromRef=function(e){e.z*=-1,e.w*=-1},e._GetRightHandedArray4FromRef=function(e){e[2]*=-1,e[3]*=-1},e._GetRightHandedQuaternionFromRef=function(e){e.x*=-1,e.y*=-1},e._GetRightHandedQuaternionArrayFromRef=function(e){e[0]*=-1,e[1]*=-1},e._NormalizeTangentFromRef=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z);t>0&&(e.x/=t,e.y/=t,e.z/=t)},e._GetRightHandedMatrixFromRef=function(e){var t=e.m;n.Matrix.FromValuesToRef(t[0],t[1],-t[2],t[3],t[4],t[5],-t[6],t[7],-t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15],e)},e._GetDataAccessorElementCount=function(e){switch(e){case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16;case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":return 4}},e}()},function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return c}));var n=r(3),a=r(0),o=r(11),i=r(1),s=r(4),u=r(8),l=function(){function e(e,t){this._includeCoordinateSystemConversionNodes=!1,this._extensions={},this._glTF={asset:{generator:"BabylonJS",version:"2.0"}},this._babylonScene=e,this._bufferViews=[],this._accessors=[],this._meshes=[],this._scenes=[],this._nodes=[],this._images=[],this._materials=[],this._materialMap=[],this._textures=[],this._samplers=[],this._skins=[],this._animations=[],this._imageData={},this._orderedImageData=[],this._options=t||{},this._animationSampleRate=t&&t.animationSampleRate?t.animationSampleRate:1/60,this._includeCoordinateSystemConversionNodes=!(!t||!t.includeCoordinateSystemConversionNodes),this._glTFMaterialExporter=new o.a(this),this._loadExtensions()}return e.prototype._applyExtension=function(e,t,r,n){var a=this;if(r>=t.length)return Promise.resolve(e);var o=n(t[r],e);return o?o.then((function(e){return a._applyExtension(e,t,r+1,n)})):this._applyExtension(e,t,r+1,n)},e.prototype._applyExtensions=function(t,r){for(var n=[],a=0,o=e._ExtensionNames;a=f;--i)o.setUInt32(r[i],n),n+=4;break;case a.Material.TriangleStripDrawMode:e.indexCount>=3&&(o.setUInt32(r[e.indexStart+2],n+4),o.setUInt32(r[e.indexStart+1],n+8))}},e.prototype.reorderVertexAttributeDataBasedOnPrimitiveMode=function(e,t,r,n,o,i,s,u){if(u&&r===a.Material.ClockWiseSideOrientation)switch(t){case a.Material.TriangleFillMode:this.reorderTriangleFillMode(e,t,r,n,o,i,s,u);break;case a.Material.TriangleStripDrawMode:this.reorderTriangleStripDrawMode(e,t,r,n,o,i,s,u);break;case a.Material.TriangleFanDrawMode:this.reorderTriangleFanMode(e,t,r,n,o,i,s,u)}},e.prototype.reorderTriangleFillMode=function(e,t,r,n,o,i,s,u){var l=this.getVertexBufferFromMesh(n,e.getMesh());if(l){var c=l.byteStride/a.VertexBuffer.GetTypeByteLength(l.type);if(e.verticesCount%3!=0)a.Tools.Error("The submesh vertices for the triangle fill mode is not divisible by 3!");else{var f=[],h=0;switch(n){case a.VertexBuffer.PositionKind:case a.VertexBuffer.NormalKind:for(var p=e.verticesStart;p=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h));break;case a.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,4===l.getSize()?f.push(a.Vector4.FromArray(o,h)):f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector2.FromArray(o,h));break;default:a.Tools.Error("Unsupported Vertex Buffer type: "+n)}this.writeVertexAttributeData(f,i+12,n,o,s,u)}else a.Tools.Warn("reorderTriangleStripDrawMode: Vertex buffer kind "+n+" not present!")},e.prototype.reorderTriangleFanMode=function(e,t,r,n,o,i,s,u){var l=this.getVertexBufferFromMesh(n,e.getMesh());if(l){var c=l.byteStride/a.VertexBuffer.GetTypeByteLength(l.type),f=[],h=0;switch(n){case a.VertexBuffer.PositionKind:case a.VertexBuffer.NormalKind:for(var p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.TangentKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h));break;case a.VertexBuffer.ColorKind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector4.FromArray(o,h)),4===l.getSize()?f.push(a.Vector4.FromArray(o,h)):f.push(a.Vector3.FromArray(o,h));break;case a.VertexBuffer.UVKind:case a.VertexBuffer.UV2Kind:for(p=e.verticesStart+e.verticesCount-1;p>=e.verticesStart;--p)h=p*c,f.push(a.Vector2.FromArray(o,h));break;default:a.Tools.Error("Unsupported Vertex Buffer type: "+n)}this.writeVertexAttributeData(f,i,n,o,s,u)}else a.Tools.Warn("reorderTriangleFanMode: Vertex buffer kind "+n+" not present!")},e.prototype.writeVertexAttributeData=function(e,t,r,n,o,s){for(var u=0,l=e;u0){var K=null!==c.overrideMaterialSideOrientation?c.overrideMaterialSideOrientation:V.sideOrientation;if(K==a.Material.ClockWiseSideOrientation&&this._babylonScene.useRightHandedSystem||K==a.Material.ClockWiseSideOrientation&&n&&c.overrideMaterialSideOrientation!==(null===(o=c.material)||void 0===o?void 0:o.sideOrientation)){var k=null!=h?this._bufferViews[h].byteOffset:null;null==k&&(k=0);var U=null;if(null!=h&&(U=c.getIndices()),U)this.reorderIndicesBasedOnPrimitiveMode(R,p,U,k,r);else for(var D=0,H=f;Da.Epsilon)return!1;return!(e instanceof a.Mesh&&null!==e.geometry||e instanceof a.InstancedMesh&&null!==e.sourceMesh.geometry)&&!this._includeCoordinateSystemConversionNodes}return!1},e.prototype.createSceneAsync=function(e,t){var r,o,i,s=this,u={nodes:[]},l=Object(n.c)(Object(n.c)(Object(n.c)([],e.transformNodes,!0),e.meshes,!0),e.lights,!0),c=[];return this._convertToRightHandedSystem=!e.useRightHandedSystem,this._convertToRightHandedSystemMap={},e.rootNodes.forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=s._convertToRightHandedSystem,e.getDescendants(!1).forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=s._convertToRightHandedSystem}))})),e.rootNodes.forEach((function(e){if(s.isBabylonCoordinateSystemConvertingNode(e)){c.push(e);var t=l.indexOf(e);-1!==t&&l.splice(t,1),e.getDescendants(!1).forEach((function(e){s._convertToRightHandedSystemMap[e.uniqueId]=!1}))}})),this._glTFMaterialExporter._convertMaterialsToGLTFAsync(e.materials,"image/png",!0).then((function(){return s.createNodeMapAndAnimationsAsync(e,l,t).then((function(n){return s.createSkinsAsync(e,n,t).then((function(e){if(s._nodeMap=n,s._totalByteLength=t.getByteOffset(),null==s._totalByteLength)throw new Error("undefined byte length!");for(var f=0,h=l;f0){i.weights=[];for(var u=0;u-1&&(c[h]=g),f=Math.max(f,h)}for(var m=0;m<=f;++m){var g,_=(g=c[m]).getTransformNode();if(_){var x=g.getInvertedAbsoluteTransform();s._convertToRightHandedSystem&&i.a._GetRightHandedMatrixFromRef(x),u.push(x),o.joints.push(t[_.uniqueId])}}var y=64*u.length,T=r.getByteOffset(),v=i.a._CreateBufferView(0,T,y,64,"InverseBindMatrices - "+n.name);s._bufferViews.push(v);var b=s._bufferViews.length-1,A=i.a._CreateAccessor(b,"InverseBindMatrices - "+n.name,"MAT4",5126,u.length,null,null,null),F=s._accessors.push(A)-1;o.inverseBindMatrices=F,s._skins.push(o),a[n.uniqueId]=s._skins.length-1,u.forEach((function(e){e.m.forEach((function(e){r.setFloat32(e)}))}))},s=this,u=0,l=e.skeletons;uthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint8(this._byteOffset,e),this._byteOffset+=1)},e.prototype.setUInt16=function(e,t){null!=t?tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint16(this._byteOffset,e,!0),this._byteOffset+=2)},e.prototype.getUInt32=function(e){if(ethis._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0))},e.prototype.setVector3Float32FromRef=function(e,t){t+8>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0))},e.prototype.getVector4Float32FromRef=function(e,t){t+12>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(e.x=this._dataView.getFloat32(t,!0),e.y=this._dataView.getFloat32(t+4,!0),e.z=this._dataView.getFloat32(t+8,!0),e.w=this._dataView.getFloat32(t+12,!0))},e.prototype.setVector4Float32FromRef=function(e,t){t+12>this._byteOffset?a.Tools.Error("BinaryWriter: byteoffset is greater than the current binary buffer length!"):(this._dataView.setFloat32(t,e.x,!0),this._dataView.setFloat32(t+4,e.y,!0),this._dataView.setFloat32(t+8,e.z,!0),this._dataView.setFloat32(t+12,e.w,!0))},e.prototype.setFloat32=function(e,t){isNaN(e)&&a.Tools.Error("Invalid data being written!"),null!=t&&(tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setFloat32(this._byteOffset,e,!0),this._byteOffset+=4},e.prototype.setUInt32=function(e,t){null!=t?tthis._arrayBuffer.byteLength&&this.resizeBuffer(2*this._arrayBuffer.byteLength),this._dataView.setUint32(this._byteOffset,e,!0),this._byteOffset+=4)},e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o}));function n(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0;)E=A.inputs.shift(),F%m==0&&M.push(E),F++;A.inputs=M}var R=u[n.uniqueId],V=4*A.inputs.length;g=o.a._CreateBufferView(0,l.getByteOffset(),V,void 0,t+" keyframe data view"),c.push(g),A.inputs.forEach((function(e){l.setFloat32(e)})),_=o.a._CreateAccessor(c.length-1,t+" keyframes","SCALAR",5126,A.inputs.length,null,[A.inputsMin],[A.inputsMax]),f.push(_),x=f.length-1,T=A.outputs.length,V=4*o.a._GetDataAccessorElementCount(i)*A.outputs.length,g=o.a._CreateBufferView(0,l.getByteOffset(),V,void 0,t+" data view"),c.push(g),A.outputs.forEach((function(e){e.forEach((function(e){l.setFloat32(e)}))})),_=o.a._CreateAccessor(c.length-1,t+" data",i,5126,T,null,null,null),f.push(_),y=f.length-1,v={interpolation:A.samplerInterpolation,input:x,output:y},r.samplers.push(v),b={sampler:r.samplers.length-1,target:{node:R,path:s}},r.channels.push(b)}},e._CreateBakedAnimation=function(t,r,n,o,i,s,u,l,c,f,h,p){var d,m,g=a.Quaternion.Identity(),_=null,x=null,y=null,T=null,v=null,b=null;f.min=a.Tools.FloatRound(o/s);for(var A=r.getKeys(),F=0,E=A.length;Fs.width?(o=t&&t instanceof a.Texture?a.TextureTools.CreateResizedCopy(t,i.width,i.height,!0):this._createWhiteTexture(i.width,i.height,r),n=e):(n=e,o=t),{texture1:n,texture2:o}},e.prototype._convertPixelArrayToFloat32=function(e){if(e instanceof Uint8Array){for(var t=e.length,r=new Float32Array(e.length),n=0;ne._Epsilon?w.baseColor.r:1,T[N+1]/=w.baseColor.g>e._Epsilon?w.baseColor.g:1,T[N+2]/=w.baseColor.b>e._Epsilon?w.baseColor.b:1,L=a.Color3.FromInts(T[N],T[N+1],T[N+2]),O=L.toGammaSpace(),T[N]=255*O.r,T[N+1]=255*O.g,T[N+2]=255*O.b,e.FuzzyEquals(O,a.Color3.White(),e._Epsilon)||(B=!0),y[N+1]/=w.roughness>e._Epsilon?w.roughness:1,y[N+2]/=w.metallic>e._Epsilon?w.metallic:1,G=a.Color3.FromInts(255,y[N+1],y[N+2]),e.FuzzyEquals(G,a.Color3.White(),e._Epsilon)||(S=!0);return S&&(K=this._createBase64FromCanvasAsync(y,d,m,i).then((function(e){w.metallicRoughnessTextureBase64=e})),u.push(K)),B&&(K=this._createBase64FromCanvasAsync(T,d,m,i).then((function(e){w.baseColorTextureBase64=e})),u.push(K)),[2,Promise.all(u).then((function(){return w}))];case 3:return[2,Promise.reject("_ConvertSpecularGlossinessTexturesToMetallicRoughness: Scene from textures is missing!")]}}))}))},e.prototype._convertSpecularGlossinessToMetallicRoughness=function(t){var r=this._getPerceivedBrightness(t.diffuseColor),n=this._getPerceivedBrightness(t.specularColor),o=1-this._getMaxComponent(t.specularColor),i=e._SolveMetallic(r,n,o),s=t.diffuseColor.scale(o/(1-e._DielectricSpecular.r)/Math.max(1-i,e._Epsilon)),u=t.specularColor.subtract(e._DielectricSpecular.scale(1-i)).scale(1/Math.max(i,e._Epsilon)),l=a.Color3.Lerp(s,u,i*i);return{baseColor:l=l.clampToRef(0,1,l),metallic:i,roughness:1-t.glossiness}},e.prototype._getPerceivedBrightness=function(e){return e?Math.sqrt(.299*e.r*e.r+.587*e.g*e.g+.114*e.b*e.b):0},e.prototype._getMaxComponent=function(e){return e?Math.max(e.r,Math.max(e.g,e.b)):0},e.prototype._convertMetalRoughFactorsToMetallicRoughnessAsync=function(e,t,r,n){var a=[],o={baseColor:e._albedoColor,metallic:e._metallic,roughness:e._roughness};if(n){e._albedoTexture&&a.push(this._exportTextureAsync(e._albedoTexture,t).then((function(e){e&&(r.baseColorTexture=e)})));var i=e._metallicTexture;i&&a.push(this._exportTextureAsync(i,t).then((function(e){e&&(r.metallicRoughnessTexture=e)})))}return Promise.all(a).then((function(){return o}))},e.prototype._getGLTFTextureSampler=function(e){var t=this._getGLTFTextureWrapModesSampler(e),r=e instanceof a.Texture?e.samplingMode:null;if(null!=r)switch(r){case a.Texture.LINEAR_LINEAR:t.magFilter=9729,t.minFilter=9729;break;case a.Texture.LINEAR_NEAREST:t.magFilter=9729,t.minFilter=9728;break;case a.Texture.NEAREST_LINEAR:t.magFilter=9728,t.minFilter=9729;break;case a.Texture.NEAREST_LINEAR_MIPLINEAR:t.magFilter=9728,t.minFilter=9987;break;case a.Texture.NEAREST_NEAREST:t.magFilter=9728,t.minFilter=9728;break;case a.Texture.NEAREST_LINEAR_MIPNEAREST:t.magFilter=9728,t.minFilter=9985;break;case a.Texture.LINEAR_NEAREST_MIPNEAREST:t.magFilter=9729,t.minFilter=9984;break;case a.Texture.LINEAR_NEAREST_MIPLINEAR:t.magFilter=9729,t.minFilter=9986;break;case a.Texture.NEAREST_NEAREST_MIPLINEAR:t.magFilter=9728,t.minFilter=9986;break;case a.Texture.LINEAR_LINEAR_MIPLINEAR:t.magFilter=9729,t.minFilter=9987;break;case a.Texture.LINEAR_LINEAR_MIPNEAREST:t.magFilter=9729,t.minFilter=9985;break;case a.Texture.NEAREST_NEAREST_MIPNEAREST:t.magFilter=9728,t.minFilter=9984}return t},e.prototype._getGLTFTextureWrapMode=function(e){switch(e){case a.Texture.WRAP_ADDRESSMODE:return 10497;case a.Texture.CLAMP_ADDRESSMODE:return 33071;case a.Texture.MIRROR_ADDRESSMODE:return 33648;default:return a.Tools.Error("Unsupported Texture Wrap Mode "+e+"!"),10497}},e.prototype._getGLTFTextureWrapModesSampler=function(e){var t=this._getGLTFTextureWrapMode(e instanceof a.Texture?e.wrapU:a.Texture.WRAP_ADDRESSMODE),r=this._getGLTFTextureWrapMode(e instanceof a.Texture?e.wrapV:a.Texture.WRAP_ADDRESSMODE);return 10497===t&&10497===r?{}:{wrapS:t,wrapT:r}},e.prototype._convertSpecGlossFactorsToMetallicRoughnessAsync=function(e,t,r,n){var a=this;return Promise.resolve().then((function(){var o=a._exporter._samplers,i=a._exporter._textures,s={diffuseColor:e._albedoColor,specularColor:e._reflectivityColor,glossiness:e._microSurface},u=null,l=e._albedoTexture,c=e._reflectivityTexture;if(l){var f=a._getGLTFTextureSampler(l);null!=f.magFilter&&null!=f.minFilter&&null!=f.wrapS&&null!=f.wrapT&&(o.push(f),u=o.length-1)}var h=e._useMicroSurfaceFromReflectivityMapAlpha;return c&&!h?Promise.reject("_ConvertPBRMaterial: Glossiness values not included in the reflectivity texture are currently not supported"):(l||c)&&n?a._convertSpecularGlossinessTexturesToMetallicRoughnessAsync(l,c,s,t).then((function(e){if(e.baseColorTextureBase64){var n=a._getTextureInfoFromBase64(e.baseColorTextureBase64,"bjsBaseColorTexture_"+i.length+".png",t,l?l.coordinatesIndex:null,u);n&&(r.baseColorTexture=n)}if(e.metallicRoughnessTextureBase64){var o=a._getTextureInfoFromBase64(e.metallicRoughnessTextureBase64,"bjsMetallicRoughnessTexture_"+i.length+".png",t,c?c.coordinatesIndex:null,u);o&&(r.metallicRoughnessTexture=o)}return e})):a._convertSpecularGlossinessToMetallicRoughness(s)}))},e.prototype._convertPBRMaterialAsync=function(e,t,r){var n=this,a={},o={name:e.name};if(e.isMetallicWorkflow()){var i=e._albedoColor,s=e.alpha;return i&&(a.baseColorFactor=[i.r,i.g,i.b,s]),this._convertMetalRoughFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))}return this._convertSpecGlossFactorsToMetallicRoughnessAsync(e,t,a,r).then((function(i){return n.setMetallicRoughnessPbrMaterial(i,e,o,a,t,r)}))},e.prototype.setMetallicRoughnessPbrMaterial=function(t,r,n,o,i,s){var u=this._exporter._materialMap,l=this._exporter._materials,c=[];if(t){if(e._SetAlphaMode(n,r),e.FuzzyEquals(t.baseColor,a.Color3.White(),e._Epsilon)&&r.alpha>=e._Epsilon||(o.baseColorFactor=[t.baseColor.r,t.baseColor.g,t.baseColor.b,r.alpha]),null!=t.metallic&&1!==t.metallic&&(o.metallicFactor=t.metallic),null!=t.roughness&&1!==t.roughness&&(o.roughnessFactor=t.roughness),null==r.backFaceCulling||r.backFaceCulling||(r._twoSidedLighting||a.Tools.Warn(r.name+": Back-face culling enabled and two-sided lighting disabled is not supported in glTF."),n.doubleSided=!0),s){var f=r._bumpTexture;if(f){var h=this._exportTextureAsync(f,i).then((function(e){e&&(n.normalTexture=e,1!==f.level&&(n.normalTexture.scale=f.level))}));c.push(h)}var p=r._ambientTexture;if(p){h=this._exportTextureAsync(p,i).then((function(e){if(e){var t={index:e.index,texCoord:e.texCoord};n.occlusionTexture=t;var a=r._ambientTextureStrength;a&&(t.strength=a)}}));c.push(h)}var d=r._emissiveTexture;if(d){h=this._exportTextureAsync(d,i).then((function(e){e&&(n.emissiveTexture=e)}));c.push(h)}}var m=r._emissiveColor;e.FuzzyEquals(m,a.Color3.Black(),e._Epsilon)||(n.emissiveFactor=m.asArray()),n.pbrMetallicRoughness=o,l.push(n),u[r.uniqueId]=l.length-1}return this._finishMaterial(c,n,r,i)},e.prototype.getPixelsFromTexture=function(e){return e.textureType,a.Constants.TEXTURETYPE_UNSIGNED_INT,e.readPixels()},e.prototype._exportTextureAsync=function(e,t){var r=this,n=this._exporter._extensionsPreExportTextureAsync("exporter",e,t);return n?n.then((function(n){return n?r._exportTextureInfoAsync(n,t):r._exportTextureInfoAsync(e,t)})):this._exportTextureInfoAsync(e,t)},e.prototype._exportTextureInfoAsync=function(e,t){var r=this;return Promise.resolve().then((function(){return Object(n.a)(r,void 0,void 0,(function(){var r,a,o,i,s,u,l,c,f,h=this;return Object(n.b)(this,(function(n){switch(n.label){case 0:return(r=e.uid)in this._textureMap?[2,this._textureMap[r]]:[3,1];case 1:return[4,this.getPixelsFromTexture(e)];case 2:if(!(a=n.sent()))return[2,null];for(o=this._exporter._samplers,i=this._getGLTFTextureSampler(e),s=null,u=null,l=0;l-1||(l.GLTF2.Exporter[f]=s[f])}}.call(this,r(12))},function(e,t,r){"use strict";r.r(t),function(e){var n=r(6);r.d(t,"OBJExport",(function(){return n.OBJExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}.call(this,r(12))},function(e,t,r){"use strict";(function(e){var n=r(13);r.d(t,"a",(function(){return n.STLExport}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==a)for(var o in n)a.BABYLON[o]=n[o]}).call(this,r(12))},function(e,t,r){"use strict";r.r(t),r.d(t,"__IGLTFExporterExtension",(function(){return n.__IGLTFExporterExtension})),r.d(t,"_GLTFAnimation",(function(){return n._GLTFAnimation})),r.d(t,"GLTFData",(function(){return n.GLTFData})),r.d(t,"_Exporter",(function(){return n._Exporter})),r.d(t,"_BinaryWriter",(function(){return n._BinaryWriter})),r.d(t,"__IGLTFExporterExtensionV2",(function(){return n.__IGLTFExporterExtensionV2})),r.d(t,"_GLTFMaterialExporter",(function(){return n._GLTFMaterialExporter})),r.d(t,"GLTF2Export",(function(){return n.GLTF2Export})),r.d(t,"_GLTFUtilities",(function(){return n._GLTFUtilities})),r.d(t,"KHR_texture_transform",(function(){return n.KHR_texture_transform})),r.d(t,"KHR_lights_punctual",(function(){return n.KHR_lights_punctual})),r.d(t,"KHR_materials_clearcoat",(function(){return n.KHR_materials_clearcoat})),r.d(t,"KHR_materials_sheen",(function(){return n.KHR_materials_sheen})),r.d(t,"KHR_materials_unlit",(function(){return n.KHR_materials_unlit})),r.d(t,"OBJExport",(function(){return a.OBJExport})),r.d(t,"STLExport",(function(){return o.a}));r(6),r(5),r(7),r(13);var n=r(14),a=r(15),o=r(16)}])})); \ No newline at end of file diff --git a/templerun2/assets/babylonjs/basis_transcoder.js b/templerun2/assets/babylonjs/basis_transcoder.js new file mode 100644 index 00000000..e2ad281f --- /dev/null +++ b/templerun2/assets/babylonjs/basis_transcoder.js @@ -0,0 +1 @@ +var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}else{return scriptDirectory+path}}if(ENVIRONMENT_IS_NODE){scriptDirectory=__dirname+"/";var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename);return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);Module["quit"]=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){return read(f)}}Module["readBinary"]=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=function(status){quit(status)}}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}Module["read"]=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=function(title){document.title=title}}else{}var out=Module["print"]||(typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null);var err=Module["printErr"]||(typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||out);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var asm2wasmImports={"f64-rem":function(x,y){return x%y},"debugger":function(){debugger}};var functionPointers=new Array(0);var tempRet0=0;var setTempRet0=function(value){tempRet0=value};if(typeof WebAssembly!=="object"){err("no native wasm support detected")}var wasmMemory;var wasmTable;var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var DYNAMIC_BASE=5401280,DYNAMICTOP_PTR=158368;var TOTAL_STACK=5242880;var INITIAL_TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(INITIAL_TOTAL_MEMORY>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile="basis_transcoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(Module["wasmBinary"]){return new Uint8Array(Module["wasmBinary"])}if(Module["readBinary"]){return Module["readBinary"](wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!Module["wasmBinary"]&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(env){var info={"env":env,"global":{"NaN":NaN,Infinity:Infinity},"global.Math":Math,"asm2wasm":asm2wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}if(!Module["wasmBinary"]&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){WebAssembly.instantiateStreaming(fetch(wasmBinaryFile,{credentials:"same-origin"}),info).then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})}else{instantiateArrayBuffer(receiveInstantiatedSource)}return{}}Module["asm"]=function(global,env,providedBuffer){env["memory"]=wasmMemory;env["table"]=wasmTable=new WebAssembly.Table({"initial":70,"maximum":70,"element":"anyfunc"});env["__memory_base"]=1024;env["__table_base"]=0;var exports=createWasm(env);return exports};__ATINIT__.push({func:function(){globalCtors()}});function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}function ___cxa_free_exception(ptr){try{return _free(ptr)}catch(e){}}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var key in EXCEPTIONS.infos){var ptr=+key;var adj=EXCEPTIONS.infos[ptr].adjusted;var len=adj.length;for(var i=0;i0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}},clearRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0}};function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:[ptr],type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr}var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}});clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function runDestructor(handle){var $$=handle.$$;if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}this.$$.count.value-=1;var toDelete=0===this.$$.count.value;if(toDelete){runDestructor(this)}if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}var delayFunction=undefined;var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return Object.create(prototype,{$$:{value:record}})}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(dynCall){var args=[];for(var i=1;i>2)+i])}return array}function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){classType.registeredClass.constructor_body[argCount-1]=function constructor_body(){if(arguments.length!==argCount-1){throwBindingError(humanName+" called with "+arguments.length+" arguments, expected "+(argCount-1))}var destructors=[];var args=new Array(argCount);args[0]=rawConstructor;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<>>bitshift}}var isUnsignedType=name.indexOf("unsigned")!=-1;registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(valuemaxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0},"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(heap["buffer"],data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var endChar=HEAPU8[value+4+length];var endCharSwap=0;if(endChar!=0){endCharSwap=endChar;HEAPU8[value+4+length]=0}var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(HEAPU8[currentBytePtr]==0){var stringSegment=UTF8ToString(decodeStartPtr);if(str===undefined)str=stringSegment;else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}if(endCharSwap!=0)HEAPU8[value+4+length]=endCharSwap}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i>2];var a=new Array(length);var start=value+4>>shift;for(var i=0;i>2]=length;var start=ptr+4>>shift;for(var i=0;i>2]=rd;return returnType["toWireType"](destructors,handle)}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function emval_get_global(){return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return __emval_register(emval_get_global())}else{name=getStringOrSymbol(name);return __emval_register(emval_get_global()[name])}}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes,argWireTypes){var a=new Array(argCount);for(var i=0;i>2)+i],"parameter "+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;i> 2) + "+i+'], "parameter '+i+'");\n'+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return __emval_register(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","__emval_register",functionBody)(requireRegisteredType,Module,__emval_register)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=requireHandle(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_cstring(v){return __emval_register(getStringOrSymbol(v))}function __emval_run_destructors(handle){var destructors=emval_handle_array[handle].value;runDestructors(destructors);__emval_decref(handle)}function _abort(){Module["abort"]()}function _emscripten_get_heap_size(){return HEAP8.length}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function emscripten_realloc_buffer(size){var PAGE_MULTIPLE=65536;size=alignUp(size,PAGE_MULTIPLE);var oldSize=buffer.byteLength;try{var result=wasmMemory.grow((size-oldSize)/65536);if(result!==(-1|0)){buffer=wasmMemory.buffer;return true}else{return false}}catch(e){return false}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize>2]=value;return value}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_ClassHandle();init_RegisteredPointer();init_embind();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmGlobalArg={};var asmLibraryArg={"d":abort,"B":setTempRet0,"i":___cxa_allocate_exception,"h":___cxa_throw,"n":___setErrNo,"A":___syscall140,"m":___syscall146,"z":___syscall6,"y":__embind_register_bool,"x":__embind_register_class,"w":__embind_register_class_constructor,"g":__embind_register_class_function,"K":__embind_register_emval,"v":__embind_register_float,"J":__embind_register_function,"f":__embind_register_integer,"c":__embind_register_memory_view,"u":__embind_register_std_string,"I":__embind_register_std_wstring,"H":__embind_register_void,"t":__emval_as,"s":__emval_call_void_method,"b":__emval_decref,"G":__emval_get_global,"r":__emval_get_method_caller,"q":__emval_get_module_property,"k":__emval_get_property,"l":__emval_incref,"p":__emval_new,"j":__emval_new_cstring,"o":__emval_run_destructors,"e":_abort,"F":_emscripten_get_heap_size,"E":_emscripten_memcpy_big,"D":_emscripten_resize_heap,"C":abortOnCannotGrowMemory,"a":DYNAMICTOP_PTR};var asm=Module["asm"](asmGlobalArg,asmLibraryArg,buffer);Module["asm"]=asm;var ___errno_location=Module["___errno_location"]=function(){return Module["asm"]["L"].apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return Module["asm"]["M"].apply(null,arguments)};var _free=Module["_free"]=function(){return Module["asm"]["N"].apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return Module["asm"]["O"].apply(null,arguments)};var globalCtors=Module["globalCtors"]=function(){return Module["asm"]["ca"].apply(null,arguments)};var dynCall_ii=Module["dynCall_ii"]=function(){return Module["asm"]["P"].apply(null,arguments)};var dynCall_iidiiii=Module["dynCall_iidiiii"]=function(){return Module["asm"]["Q"].apply(null,arguments)};var dynCall_iii=Module["dynCall_iii"]=function(){return Module["asm"]["R"].apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return Module["asm"]["S"].apply(null,arguments)};var dynCall_iiiii=Module["dynCall_iiiii"]=function(){return Module["asm"]["T"].apply(null,arguments)};var dynCall_iiiiii=Module["dynCall_iiiiii"]=function(){return Module["asm"]["U"].apply(null,arguments)};var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=function(){return Module["asm"]["V"].apply(null,arguments)};var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=function(){return Module["asm"]["W"].apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return Module["asm"]["X"].apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return Module["asm"]["Y"].apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return Module["asm"]["Z"].apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return Module["asm"]["_"].apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return Module["asm"]["$"].apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return Module["asm"]["aa"].apply(null,arguments)};var dynCall_viiiiii=Module["dynCall_viiiiii"]=function(){return Module["asm"]["ba"].apply(null,arguments)};Module["asm"]=asm;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run(); \ No newline at end of file diff --git a/templerun2/assets/babylonjs/basis_transcoder.wasm b/templerun2/assets/babylonjs/basis_transcoder.wasm new file mode 100644 index 00000000..c5b4d204 Binary files /dev/null and b/templerun2/assets/babylonjs/basis_transcoder.wasm differ diff --git a/templerun2/assets/babylonjs/draco_decoder_gltf.wasm b/templerun2/assets/babylonjs/draco_decoder_gltf.wasm new file mode 100644 index 00000000..2b6789f5 Binary files /dev/null and b/templerun2/assets/babylonjs/draco_decoder_gltf.wasm differ diff --git a/templerun2/assets/babylonjs/draco_wasm_wrapper_gltf.js b/templerun2/assets/babylonjs/draco_wasm_wrapper_gltf.js new file mode 100644 index 00000000..f22c4fa1 --- /dev/null +++ b/templerun2/assets/babylonjs/draco_wasm_wrapper_gltf.js @@ -0,0 +1,104 @@ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(f){var m=0;return function(){return m=d);)++b;if(16k?d+=String.fromCharCode(k):(k-=65536,d+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else d+=String.fromCharCode(k)}return d}function X(a,c){return a?h(ca,a,c):""}function e(a,c){0=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++b)&1023);127>=d?++c:c=2047>=d?c+2:65535>=d?c+3:c+4}c=Array(c+1);b=0;d=c.length;if(0=e){var f=a.charCodeAt(++k);e=65536+((e&1023)<<10)|f&1023}if(127>=e){if(b>=d)break;c[b++]=e}else{if(2047>=e){if(b+1>=d)break;c[b++]=192|e>>6}else{if(65535>=e){if(b+2>=d)break;c[b++]=224|e>>12}else{if(b+3>=d)break;c[b++]=240|e>>18;c[b++]=128|e>>12&63}c[b++]=128|e>>6&63}c[b++]=128| +e&63}}c[b]=0}a=n.alloc(c,T);n.copy(c,T,a)}return a}function x(){throw"cannot construct a Status, no constructor in IDL";}function A(){this.ptr=Oa();u(A)[this.ptr]=this}function B(){this.ptr=Pa();u(B)[this.ptr]=this}function C(){this.ptr=Qa();u(C)[this.ptr]=this}function D(){this.ptr=Ra();u(D)[this.ptr]=this}function E(){this.ptr=Sa();u(E)[this.ptr]=this}function q(){this.ptr=Ta();u(q)[this.ptr]=this}function J(){this.ptr=Ua();u(J)[this.ptr]=this}function w(){this.ptr=Va();u(w)[this.ptr]=this}function F(){this.ptr= +Wa();u(F)[this.ptr]=this}function r(){this.ptr=Xa();u(r)[this.ptr]=this}function G(){this.ptr=Ya();u(G)[this.ptr]=this}function H(){this.ptr=Za();u(H)[this.ptr]=this}function O(){this.ptr=$a();u(O)[this.ptr]=this}function K(){this.ptr=ab();u(K)[this.ptr]=this}function g(){this.ptr=bb();u(g)[this.ptr]=this}function y(){this.ptr=cb();u(y)[this.ptr]=this}function Q(){throw"cannot construct a VoidPtr, no constructor in IDL";}function I(){this.ptr=db();u(I)[this.ptr]=this}function L(){this.ptr=eb();u(L)[this.ptr]= +this}m=m||{};var a="undefined"!==typeof m?m:{},Ga=!1,Ha=!1;a.onRuntimeInitialized=function(){Ga=!0;if(Ha&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Ha=!0;if(Ga&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(a){if("string"!==typeof a)return!1;a=a.split(".");return 2>a.length||3=a[1]?!0:0!=a[0]||10>2]},getStr:function(){return X(R.get())}, +get64:function(){var a=R.get();R.get();return a},getZero:function(){R.get()}},Ka={__cxa_allocate_exception:function(a){return ib(a)},__cxa_throw:function(a,c,b){"uncaught_exception"in ta?ta.uncaught_exceptions++:ta.uncaught_exceptions=1;throw a;},abort:function(){z()},emscripten_get_sbrk_ptr:function(){return 13664},emscripten_memcpy_big:function(a,c,b){ca.set(ca.subarray(c,c+b),a)},emscripten_resize_heap:function(a){if(2147418112= +c?e(2*c,65536):Math.min(e((3*c+2147483648)/4,65536),2147418112);a:{try{ia.grow(c-ka.byteLength+65535>>16);l(ia.buffer);var b=1;break a}catch(d){}b=void 0}return b?!0:!1},environ_get:function(a,c){var b=0;ba().forEach(function(d,e){var f=c+b;e=P[a+4*e>>2]=f;for(f=0;f>0]=d.charCodeAt(f);T[e>>0]=0;b+=d.length+1});return 0},environ_sizes_get:function(a,c){var b=ba();P[a>>2]=b.length;var d=0;b.forEach(function(a){d+=a.length+1});P[c>>2]=d;return 0},fd_close:function(a){return 0},fd_seek:function(a, +c,b,d,e){return 0},fd_write:function(a,c,b,d){try{for(var e=0,f=0;f>2],k=P[c+(8*f+4)>>2],h=0;h>2]=e;return 0}catch(ua){return"undefined"!==typeof FS&&ua instanceof FS.ErrnoError||z(ua),ua.errno}},memory:ia,setTempRet0:function(a){},table:gb},La=function(){function e(c,b){a.asm=c.exports;aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==sa&&(clearInterval(sa),sa=null),ja&&(c=ja,ja=null,c()))}function c(a){e(a.instance)} +function b(a){return Ma().then(function(a){return WebAssembly.instantiate(a,d)}).then(a,function(a){Y("failed to asynchronously prepare wasm: "+a);z(a)})}var d={env:Ka,wasi_unstable:Ka};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(Na){return Y("Module.instantiateWasm callback failed with error: "+Na),!1}(function(){if(da||"function"!==typeof WebAssembly.instantiateStreaming||va(U)||"function"!==typeof fetch)return b(c);fetch(U, +{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,d).then(c,function(a){Y("wasm streaming compile failed: "+a);Y("falling back to ArrayBuffer instantiation");b(c)})})})();return{}}();a.asm=La;var hb=a.___wasm_call_ctors=function(){return a.asm.__wasm_call_ctors.apply(null,arguments)},jb=a._emscripten_bind_Status_code_0=function(){return a.asm.emscripten_bind_Status_code_0.apply(null,arguments)},kb=a._emscripten_bind_Status_ok_0=function(){return a.asm.emscripten_bind_Status_ok_0.apply(null, +arguments)},lb=a._emscripten_bind_Status_error_msg_0=function(){return a.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},mb=a._emscripten_bind_Status___destroy___0=function(){return a.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},nb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null, +arguments)},ob=a._emscripten_bind_DracoUInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},pb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Pa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return a.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},qb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return a.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null, +arguments)},rb=a._emscripten_bind_PointCloud_num_points_0=function(){return a.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},sb=a._emscripten_bind_PointCloud___destroy___0=function(){return a.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},tb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null, +arguments)},ub=a._emscripten_bind_DracoUInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},vb=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ra=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},wb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null, +arguments)},xb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},yb=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Sa=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},zb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1= +function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},Ab=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Bb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},Ta=a._emscripten_bind_PointAttribute_PointAttribute_0= +function(){return a.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Cb=a._emscripten_bind_PointAttribute_size_0=function(){return a.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return a.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},Eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return a.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null, +arguments)},Fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return a.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},Gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return a.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},Hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return a.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},Ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null, +arguments)},Jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return a.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},Kb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return a.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},Lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return a.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},Ua=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= +function(){return a.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},Mb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return a.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},Nb=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return a.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},Va=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0= +function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},Ob=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},Pb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)}, +Qb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},Rb=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},Sb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return a.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)}, +Wa=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return a.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Tb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},Ub=a._emscripten_bind_DracoInt8Array_size_0=function(){return a.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Vb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null, +arguments)},Xa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return a.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Wb=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Xb=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},Yb=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= +function(){return a.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},Zb=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},$b=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return a.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null, +arguments)},bc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return a.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return a.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Ya=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return a.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},dc=a._emscripten_bind_DracoInt16Array_GetValue_1= +function(){return a.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},ec=a._emscripten_bind_DracoInt16Array_size_0=function(){return a.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},fc=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},Za=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null, +arguments)},gc=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},hc=a._emscripten_bind_DracoFloat32Array_size_0=function(){return a.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},ic=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},$a=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return a.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null, +arguments)},jc=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return a.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},ab=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return a.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},kc=a._emscripten_bind_DecoderBuffer_Init_2=function(){return a.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},lc=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return a.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null, +arguments)},bb=a._emscripten_bind_Decoder_Decoder_0=function(){return a.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return a.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return a.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null, +arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2= +function(){return a.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return a.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return a.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null, +arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return a.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return a.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3= +function(){return a.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null, +arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)}, +Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return a.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},Jc= +a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return a.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return a.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},Lc=a._emscripten_bind_Decoder___destroy___0=function(){return a.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},cb=a._emscripten_bind_Mesh_Mesh_0=function(){return a.asm.emscripten_bind_Mesh_Mesh_0.apply(null, +arguments)},Mc=a._emscripten_bind_Mesh_num_faces_0=function(){return a.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Nc=a._emscripten_bind_Mesh_num_attributes_0=function(){return a.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},Oc=a._emscripten_bind_Mesh_num_points_0=function(){return a.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Pc=a._emscripten_bind_Mesh___destroy___0=function(){return a.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)}, +Qc=a._emscripten_bind_VoidPtr___destroy___0=function(){return a.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},db=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return a.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Rc=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return a.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},Sc=a._emscripten_bind_DracoInt32Array_size_0=function(){return a.asm.emscripten_bind_DracoInt32Array_size_0.apply(null, +arguments)},Tc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return a.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},eb=a._emscripten_bind_Metadata_Metadata_0=function(){return a.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},Uc=a._emscripten_bind_Metadata___destroy___0=function(){return a.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Vc=a._emscripten_enum_draco_StatusCode_OK=function(){return a.asm.emscripten_enum_draco_StatusCode_OK.apply(null, +arguments)},Wc=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Xc=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return a.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Yc=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return a.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Zc=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION= +function(){return a.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},$c=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return a.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return a.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null, +arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null, +arguments)},gd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null, +arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return a.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},ld=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return a.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return a.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},nd=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null, +arguments)},od=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},pd=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return a.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},qd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null, +arguments)},rd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},sd=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},td=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return a.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null, +arguments)},ud=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},vd=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},wd=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},xd=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR= +function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},yd=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},zd=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return a.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};a._setThrew=function(){return a.asm.setThrew.apply(null,arguments)};var ta=a.__ZSt18uncaught_exceptionv= +function(){return a.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};a._free=function(){return a.asm.free.apply(null,arguments)};var ib=a._malloc=function(){return a.asm.malloc.apply(null,arguments)};a.stackSave=function(){return a.asm.stackSave.apply(null,arguments)};a.stackAlloc=function(){return a.asm.stackAlloc.apply(null,arguments)};a.stackRestore=function(){return a.asm.stackRestore.apply(null,arguments)};a.__growWasmMemory=function(){return a.asm.__growWasmMemory.apply(null,arguments)}; +a.dynCall_ii=function(){return a.asm.dynCall_ii.apply(null,arguments)};a.dynCall_vi=function(){return a.asm.dynCall_vi.apply(null,arguments)};a.dynCall_iii=function(){return a.asm.dynCall_iii.apply(null,arguments)};a.dynCall_vii=function(){return a.asm.dynCall_vii.apply(null,arguments)};a.dynCall_iiii=function(){return a.asm.dynCall_iiii.apply(null,arguments)};a.dynCall_v=function(){return a.asm.dynCall_v.apply(null,arguments)};a.dynCall_viii=function(){return a.asm.dynCall_viii.apply(null,arguments)}; +a.dynCall_viiii=function(){return a.asm.dynCall_viiii.apply(null,arguments)};a.dynCall_iiiiiii=function(){return a.asm.dynCall_iiiiiii.apply(null,arguments)};a.dynCall_iidiiii=function(){return a.asm.dynCall_iidiiii.apply(null,arguments)};a.dynCall_jiji=function(){return a.asm.dynCall_jiji.apply(null,arguments)};a.dynCall_viiiiii=function(){return a.asm.dynCall_viiiiii.apply(null,arguments)};a.dynCall_viiiii=function(){return a.asm.dynCall_viiiii.apply(null,arguments)};a.asm=La;var fa;a.then=function(e){if(fa)e(a); +else{var c=a.onRuntimeInitialized;a.onRuntimeInitialized=function(){c&&c();e(a)}}return a};ja=function c(){fa||ma();fa||(ja=c)};a.run=ma;if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=n.size?(t(0>=1;break;case 4:d>>=2;break;case 8:d>>=3}for(var c=0;c 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + process.prependListener = noop; + process.prependOnceListener = noop; + + process.listeners = function (name) { return [] } + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { return 0; }; + + },{}],2:[function(require,module,exports){ + GLTFValidator = require('gltf-validator'); + },{"gltf-validator":4}],3:[function(require,module,exports){ + (function (process,global,__filename,__argument0,__argument1,__argument2,__argument3,__dirname){ + var dartNodePreambleSelf="undefined"!=typeof global?global:window,self=Object.create(dartNodePreambleSelf);if(self.scheduleImmediate=self.setImmediate?function(e){dartNodePreambleSelf.setImmediate(e)}:function(e){setTimeout(e,0)},self.exports=exports,"undefined"!=typeof process)self.process=process;if("undefined"!=typeof __dirname)self.__dirname=__dirname;if("undefined"!=typeof __filename)self.__filename=__filename;var dartNodeIsActuallyNode=!dartNodePreambleSelf.window;try{if("undefined"!=typeof WorkerGlobalScope&&dartNodePreambleSelf instanceof WorkerGlobalScope)dartNodeIsActuallyNode=!1;if(dartNodePreambleSelf.process&&dartNodePreambleSelf.process.versions&&dartNodePreambleSelf.process.versions.hasOwnProperty("electron")&&dartNodePreambleSelf.process.versions.hasOwnProperty("node"))dartNodeIsActuallyNode=!0}catch(e){}if(dartNodeIsActuallyNode){var url=("undefined"!=typeof __webpack_require__?__non_webpack_require__:require)("url");self.location={get href(){if(url.pathToFileURL)return url.pathToFileURL(process.cwd()).href+"/";else return"file://"+function(){var e=process.cwd();if("win32"!=process.platform)return e;else return"/"+e.replace(/\\/g,"/")}()+"/"}},function(){function e(){try{throw new Error}catch(t){var e=t.stack,r=new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$","mg"),l=null;do{var o=r.exec(e);if(null!=o)l=o}while(null!=o);return l[1]}}var r=null;self.document={get currentScript(){if(null==r)r={src:e()};return r}}}(),self.dartDeferredLibraryLoader=function(e,r,l){try{load(e),r()}catch(e){l(e)}}}(function dartProgram(){function copyProperties(a,b){var s=Object.keys(a) + for(var r=0;r=0)return true + if(typeof version=="function"&&version.length==0){var q=version() + if(/^\d+\.\d+\.\d+\.\d+$/.test(q))return true}}catch(p){}return false}() + function setFunctionNamesIfNecessary(a){function t(){};if(typeof t.name=="string")return + for(var s=0;s").b(a))return new H.dC(a,b.h("@<0>").D(c).h("dC<1,2>")) + return new H.bX(a,b.h("@<0>").D(c).h("bX<1,2>"))}, + nM:function(a){return new H.eD(a)}, + m8:function(a){var s,r=a^48 + if(r<=9)return r + s=a|32 + if(97<=s&&s<=102)return s-87 + return-1}, + p5:function(a,b){var s=H.m8(C.a.A(a,b)),r=H.m8(C.a.A(a,b+1)) + return s*16+r-(r&256)}, + du:function(a,b,c,d){P.aU(b,"start") + if(c!=null){P.aU(c,"end") + if(b>c)H.a2(P.S(b,0,c,"start",null))}return new H.dt(a,b,c,d.h("dt<0>"))}, + ja:function(a,b,c,d){if(t.O.b(a))return new H.c_(a,b,c.h("@<0>").D(d).h("c_<1,2>")) + return new H.b9(a,b,c.h("@<0>").D(d).h("b9<1,2>"))}, + o5:function(a,b,c){var s="count" + if(t.O.b(a)){P.aM(b,s) + P.aU(b,s) + return new H.cw(a,b,c.h("cw<0>"))}P.aM(b,s) + P.aU(b,s) + return new H.bc(a,b,c.h("bc<0>"))}, + mB:function(){return new P.bz("No element")}, + tg:function(){return new P.bz("Too few elements")}, + bE:function bE(){}, + d3:function d3(a,b){this.a=a + this.$ti=b}, + bX:function bX(a,b){this.a=a + this.$ti=b}, + dC:function dC(a,b){this.a=a + this.$ti=b}, + dx:function dx(){}, + b3:function b3(a,b){this.a=a + this.$ti=b}, + bY:function bY(a,b){this.a=a + this.$ti=b}, + fQ:function fQ(a,b){this.a=a + this.b=b}, + eD:function eD(a){this.a=a}, + cu:function cu(a){this.a=a}, + n:function n(){}, + af:function af(){}, + dt:function dt(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.$ti=d}, + a6:function a6(a,b,c){var _=this + _.a=a + _.b=b + _.c=0 + _.d=null + _.$ti=c}, + b9:function b9(a,b,c){this.a=a + this.b=b + this.$ti=c}, + c_:function c_(a,b,c){this.a=a + this.b=b + this.$ti=c}, + a7:function a7(a,b,c){var _=this + _.a=null + _.b=a + _.c=b + _.$ti=c}, + a8:function a8(a,b,c){this.a=a + this.b=b + this.$ti=c}, + l_:function l_(a,b,c){this.a=a + this.b=b + this.$ti=c}, + cm:function cm(a,b,c){this.a=a + this.b=b + this.$ti=c}, + bc:function bc(a,b,c){this.a=a + this.b=b + this.$ti=c}, + cw:function cw(a,b,c){this.a=a + this.b=b + this.$ti=c}, + dr:function dr(a,b,c){this.a=a + this.b=b + this.$ti=c}, + b6:function b6(a){this.$ti=a}, + d6:function d6(a){this.$ti=a}, + d8:function d8(){}, + f7:function f7(){}, + cI:function cI(){}, + cG:function cG(a){this.a=a}, + e4:function e4(){}, + t2:function(){throw H.c(P.ab("Cannot modify unmodifiable Map"))}, + pd:function(a){var s,r=H.pc(a) + if(r!=null)return r + s="minified:"+a + return s}, + p1:function(a,b){var s + if(b!=null){s=b.x + if(s!=null)return s}return t.aU.b(a)}, + b:function(a){var s + if(typeof a=="string")return a + if(typeof a=="number"){if(a!==0)return""+a}else if(!0===a)return"true" + else if(!1===a)return"false" + else if(a==null)return"null" + s=J.ag(a) + if(typeof s!="string")throw H.c(H.bM(a)) + return s}, + cj:function(a){var s=a.$identityHash + if(s==null){s=Math.random()*0x3fffffff|0 + a.$identityHash=s}return s}, + o1:function(a,b){var s,r,q,p,o,n,m=null + if(typeof a!="string")H.a2(H.bM(a)) + s=/^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(a) + if(s==null)return m + r=s[3] + if(b==null){if(r!=null)return parseInt(a,10) + if(s[2]!=null)return parseInt(a,16) + return m}if(b<2||b>36)throw H.c(P.S(b,2,36,"radix",m)) + if(b===10&&r!=null)return parseInt(a,10) + if(b<10||r==null){q=b<=10?47+b:86+b + p=s[1] + for(o=p.length,n=0;nq)return m}return parseInt(a,b)}, + ju:function(a){return H.tG(a)}, + tG:function(a){var s,r,q + if(a instanceof P.e)return H.az(H.ac(a),null) + if(J.cq(a)===C.by||t.ak.b(a)){s=C.a_(a) + if(H.nV(s))return s + r=a.constructor + if(typeof r=="function"){q=r.name + if(typeof q=="string"&&H.nV(q))return q}}return H.az(H.ac(a),null)}, + nV:function(a){var s=a!=="Object"&&a!=="" + return s}, + nU:function(a){var s,r,q,p,o=a.length + if(o<=500)return String.fromCharCode.apply(null,a) + for(s="",r=0;r65535)return H.tJ(a)}return H.nU(a)}, + tK:function(a,b,c){var s,r,q,p + if(c<=500&&b===0&&c===a.length)return String.fromCharCode.apply(null,a) + for(s=b,r="";s>>0,56320|s&1023)}}throw H.c(P.S(a,0,1114111,null,null))}, + aw:function(a){if(a.date===void 0)a.date=new Date(a.a) + return a.date}, + eV:function(a){return a.b?H.aw(a).getUTCFullYear()+0:H.aw(a).getFullYear()+0}, + o_:function(a){return a.b?H.aw(a).getUTCMonth()+1:H.aw(a).getMonth()+1}, + nW:function(a){return a.b?H.aw(a).getUTCDate()+0:H.aw(a).getDate()+0}, + nX:function(a){return a.b?H.aw(a).getUTCHours()+0:H.aw(a).getHours()+0}, + nZ:function(a){return a.b?H.aw(a).getUTCMinutes()+0:H.aw(a).getMinutes()+0}, + o0:function(a){return a.b?H.aw(a).getUTCSeconds()+0:H.aw(a).getSeconds()+0}, + nY:function(a){return a.b?H.aw(a).getUTCMilliseconds()+0:H.aw(a).getMilliseconds()+0}, + bu:function(a,b,c){var s,r,q={} + q.a=0 + s=[] + r=[] + q.a=b.length + C.d.K(s,b) + q.b="" + if(c!=null&&c.a!==0)c.J(0,new H.jt(q,r,s)) + ""+q.a + return J.ry(a,new H.ig(C.d5,0,s,r,0))}, + tH:function(a,b,c){var s,r,q,p + if(b instanceof Array)s=c==null||c.a===0 + else s=!1 + if(s){r=b + q=r.length + if(q===0){if(!!a.$0)return a.$0()}else if(q===1){if(!!a.$1)return a.$1(r[0])}else if(q===2){if(!!a.$2)return a.$2(r[0],r[1])}else if(q===3){if(!!a.$3)return a.$3(r[0],r[1],r[2])}else if(q===4){if(!!a.$4)return a.$4(r[0],r[1],r[2],r[3])}else if(q===5)if(!!a.$5)return a.$5(r[0],r[1],r[2],r[3],r[4]) + p=a[""+"$"+q] + if(p!=null)return p.apply(a,r)}return H.tF(a,b,c)}, + tF:function(a,b,c){var s,r,q,p,o,n,m,l,k,j,i,h,g + if(b!=null)s=b instanceof Array?b:P.dh(b,!0,t.z) + else s=[] + r=s.length + q=a.$R + if(rq+n.length)return H.bu(a,s,null) + C.d.K(s,n.slice(r-q)) + return l.apply(a,s)}else{if(r>q)return H.bu(a,s,c) + k=Object.keys(n) + if(c==null)for(o=k.length,j=0;j=s)return P.ex(b,a,r,null,s) + return P.jv(b,r)}, + vw:function(a,b,c){if(a<0||a>c)return P.S(a,0,c,"start",null) + if(b!=null)if(bc)return P.S(b,a,c,"end",null) + return new P.ak(!0,b,"end",null)}, + bM:function(a){return new P.ak(!0,a,null,null)}, + c:function(a){var s,r + if(a==null)a=new P.eR() + s=new Error() + s.dartException=a + r=H.w9 + if("defineProperty" in Object){Object.defineProperty(s,"message",{get:r}) + s.name=""}else s.toString=r + return s}, + w9:function(){return J.ag(this.dartException)}, + a2:function(a){throw H.c(a)}, + cs:function(a){throw H.c(P.ad(a))}, + bd:function(a){var s,r,q,p,o,n + a=H.p8(a.replace(String({}),'$receiver$')) + s=a.match(/\\\$[a-zA-Z]+\\\$/g) + if(s==null)s=H.a([],t.s) + r=s.indexOf("\\$arguments\\$") + q=s.indexOf("\\$argumentsExpr\\$") + p=s.indexOf("\\$expr\\$") + o=s.indexOf("\\$method\\$") + n=s.indexOf("\\$receiver\\$") + return new H.kJ(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),r,q,p,o,n)}, + kK:function(a){return function($expr$){var $argumentsExpr$='$arguments$' + try{$expr$.$method$($argumentsExpr$)}catch(s){return s.message}}(a)}, + o8:function(a){return function($expr$){try{$expr$.$method$}catch(s){return s.message}}(a)}, + nT:function(a,b){return new H.eQ(a,b==null?null:b.method)}, + mE:function(a,b){var s=b==null,r=s?null:b.method + return new H.eC(a,r,s?null:b.receiver)}, + E:function(a){if(a==null)return new H.eS(a) + if(a instanceof H.d7)return H.bN(a,a.a) + if(typeof a!=="object")return a + if("dartException" in a)return H.bN(a,a.dartException) + return H.vc(a)}, + bN:function(a,b){if(t.C.b(b))if(b.$thrownJsError==null)b.$thrownJsError=a + return b}, + vc:function(a){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=null + if(!("message" in a))return a + s=a.message + if("number" in a&&typeof a.number=="number"){r=a.number + q=r&65535 + if((C.c.ad(r,16)&8191)===10)switch(q){case 438:return H.bN(a,H.mE(H.b(s)+" (Error "+q+")",e)) + case 445:case 5007:return H.bN(a,H.nT(H.b(s)+" (Error "+q+")",e))}}if(a instanceof TypeError){p=$.r9() + o=$.ra() + n=$.rb() + m=$.rc() + l=$.rf() + k=$.rg() + j=$.re() + $.rd() + i=$.ri() + h=$.rh() + g=p.a4(s) + if(g!=null)return H.bN(a,H.mE(s,g)) + else{g=o.a4(s) + if(g!=null){g.method="call" + return H.bN(a,H.mE(s,g))}else{g=n.a4(s) + if(g==null){g=m.a4(s) + if(g==null){g=l.a4(s) + if(g==null){g=k.a4(s) + if(g==null){g=j.a4(s) + if(g==null){g=m.a4(s) + if(g==null){g=i.a4(s) + if(g==null){g=h.a4(s) + f=g!=null}else f=!0}else f=!0}else f=!0}else f=!0}else f=!0}else f=!0}else f=!0 + if(f)return H.bN(a,H.nT(s,g))}}return H.bN(a,new H.f6(typeof s=="string"?s:""))}if(a instanceof RangeError){if(typeof s=="string"&&s.indexOf("call stack")!==-1)return new P.ds() + s=function(b){try{return String(b)}catch(d){}return null}(a) + return H.bN(a,new P.ak(!1,e,e,typeof s=="string"?s.replace(/^RangeError:\s*/,""):s))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof s=="string"&&s==="too much recursion")return new P.ds() + return a}, + aK:function(a){var s + if(a instanceof H.d7)return a.b + if(a==null)return new H.dS(a) + s=a.$cachedTrace + if(s!=null)return s + return a.$cachedTrace=new H.dS(a)}, + p4:function(a){if(a==null||typeof a!='object')return J.aL(a) + else return H.cj(a)}, + oU:function(a,b){var s,r,q,p=a.length + for(s=0;s=27 + if(o)return H.rZ(r,!p,s,b) + if(r===0){p=$.b4 + $.b4=p+1 + n="self"+H.b(p) + return new Function("return function(){var "+n+" = this."+H.b(H.mA())+";return "+n+"."+H.b(s)+"();}")()}m="abcdefghijklmnopqrstuvwxyz".split("").splice(0,r).join(",") + p=$.b4 + $.b4=p+1 + m+=H.b(p) + return new Function("return function("+m+"){return this."+H.b(H.mA())+"."+H.b(s)+"("+m+");}")()}, + t_:function(a,b,c,d){var s=H.nE,r=H.rS + switch(b?-1:a){case 0:throw H.c(new H.eZ("Intercepted function with no arguments.")) + case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,s,r) + case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,s,r) + case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,s,r) + case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,s,r) + case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,s,r) + case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,s,r) + default:return function(e,f,g,h){return function(){h=[g(this)] + Array.prototype.push.apply(h,arguments) + return e.apply(f(this),h)}}(d,s,r)}}, + t0:function(a,b){var s,r,q,p,o,n,m=H.mA(),l=$.nC + if(l==null)l=$.nC=H.nB("receiver") + s=b.$stubName + r=b.length + q=a[s] + p=b==null?q==null:b===q + o=!p||r>=28 + if(o)return H.t_(r,!p,s,b) + if(r===1){p="return function(){return this."+H.b(m)+"."+H.b(s)+"(this."+l+");" + o=$.b4 + $.b4=o+1 + return new Function(p+H.b(o)+"}")()}n="abcdefghijklmnopqrstuvwxyz".split("").splice(0,r-1).join(",") + p="return function("+n+"){return this."+H.b(m)+"."+H.b(s)+"(this."+l+", "+n+");" + o=$.b4 + $.b4=o+1 + return new Function(p+H.b(o)+"}")()}, + mX:function(a,b,c,d,e,f,g){return H.t1(a,b,c,d,!!e,!!f,g)}, + rQ:function(a,b){return H.fv(v.typeUniverse,H.ac(a.a),b)}, + rR:function(a,b){return H.fv(v.typeUniverse,H.ac(a.c),b)}, + nE:function(a){return a.a}, + rS:function(a){return a.c}, + mA:function(){var s=$.nD + return s==null?$.nD=H.nB("self"):s}, + nB:function(a){var s,r,q,p=new H.ct("self","target","receiver","name"),o=J.mC(Object.getOwnPropertyNames(p)) + for(s=o.length,r=0;r=0)return a.replace(/\$/g,"$$$$") + return a}, + p8:function(a){if(/[[\]{}()*+?.\\^$|]/.test(a))return a.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&") + return a}, + pa:function(a,b,c){var s=H.w6(a,b,c) + return s}, + w6:function(a,b,c){var s,r,q,p + if(b===""){if(a==="")return c + s=a.length + for(r=c,q=0;q=0)return a.split(b).join(c) + return a.replace(new RegExp(H.p8(b),'g'),H.vx(c))}, + d4:function d4(a,b){this.a=a + this.$ti=b}, + cv:function cv(){}, + aq:function aq(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.$ti=d}, + dz:function dz(a,b){this.a=a + this.$ti=b}, + al:function al(a,b){this.a=a + this.$ti=b}, + ig:function ig(a,b,c,d,e){var _=this + _.a=a + _.c=b + _.d=c + _.e=d + _.f=e}, + jt:function jt(a,b,c){this.a=a + this.b=b + this.c=c}, + kJ:function kJ(a,b,c,d,e,f){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.f=f}, + eQ:function eQ(a,b){this.a=a + this.b=b}, + eC:function eC(a,b,c){this.a=a + this.b=b + this.c=c}, + f6:function f6(a){this.a=a}, + eS:function eS(a){this.a=a}, + d7:function d7(a,b){this.a=a + this.b=b}, + dS:function dS(a){this.a=a + this.b=null}, + bZ:function bZ(){}, + f1:function f1(){}, + f_:function f_(){}, + ct:function ct(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + eZ:function eZ(a){this.a=a}, + lA:function lA(){}, + aG:function aG(a){var _=this + _.a=0 + _.f=_.e=_.d=_.c=_.b=null + _.r=0 + _.$ti=a}, + im:function im(a){this.a=a}, + j7:function j7(a,b){this.a=a + this.b=b + this.c=null}, + au:function au(a,b){this.a=a + this.$ti=b}, + df:function df(a,b,c){var _=this + _.a=a + _.b=b + _.d=_.c=null + _.$ti=c}, + m9:function m9(a){this.a=a}, + ma:function ma(a){this.a=a}, + mb:function mb(a){this.a=a}, + ih:function ih(a,b){var _=this + _.a=a + _.b=b + _.d=_.c=null}, + ly:function ly(a){this.b=a}, + cW:function(a,b,c){}, + uH:function(a){return a}, + jm:function(a,b,c){var s + H.cW(a,b,c) + s=new DataView(a,b) + return s}, + ty:function(a){return new Float32Array(a)}, + tz:function(a){return new Int8Array(a)}, + nQ:function(a,b,c){var s + H.cW(a,b,c) + s=new Uint16Array(a,b,c) + return s}, + nR:function(a,b,c){var s + H.cW(a,b,c) + s=new Uint32Array(a,b,c) + return s}, + tA:function(a){return new Uint8Array(a)}, + mH:function(a,b,c){var s + H.cW(a,b,c) + s=new Uint8Array(a,b,c) + return s}, + bf:function(a,b,c){if(a>>>0!==a||a>=c)throw H.c(H.ef(b,a))}, + bJ:function(a,b,c){var s + if(!(a>>>0!==a))s=b>>>0!==b||a>b||b>c + else s=!0 + if(s)throw H.c(H.vw(a,b,c)) + return b}, + dm:function dm(){}, + cE:function cE(){}, + dl:function dl(){}, + av:function av(){}, + dk:function dk(){}, + eI:function eI(){}, + eJ:function eJ(){}, + eK:function eK(){}, + eL:function eL(){}, + eM:function eM(){}, + eN:function eN(){}, + dn:function dn(){}, + cf:function cf(){}, + dO:function dO(){}, + dP:function dP(){}, + dQ:function dQ(){}, + dR:function dR(){}, + tN:function(a,b){var s=b.c + return s==null?b.c=H.mP(a,b.z,!0):s}, + o3:function(a,b){var s=b.c + return s==null?b.c=H.dZ(a,"ae",[b.z]):s}, + o4:function(a){var s=a.y + if(s===6||s===7||s===8)return H.o4(a.z) + return s===11||s===12}, + tM:function(a){return a.cy}, + ap:function(a){return H.fu(v.typeUniverse,a,!1)}, + bL:function(a,b,a0,a1){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c=b.y + switch(c){case 5:case 1:case 2:case 3:case 4:return b + case 6:s=b.z + r=H.bL(a,s,a0,a1) + if(r===s)return b + return H.ou(a,r,!0) + case 7:s=b.z + r=H.bL(a,s,a0,a1) + if(r===s)return b + return H.mP(a,r,!0) + case 8:s=b.z + r=H.bL(a,s,a0,a1) + if(r===s)return b + return H.ot(a,r,!0) + case 9:q=b.Q + p=H.ed(a,q,a0,a1) + if(p===q)return b + return H.dZ(a,b.z,p) + case 10:o=b.z + n=H.bL(a,o,a0,a1) + m=b.Q + l=H.ed(a,m,a0,a1) + if(n===o&&l===m)return b + return H.mN(a,n,l) + case 11:k=b.z + j=H.bL(a,k,a0,a1) + i=b.Q + h=H.v9(a,i,a0,a1) + if(j===k&&h===i)return b + return H.os(a,j,h) + case 12:g=b.Q + a1+=g.length + f=H.ed(a,g,a0,a1) + o=b.z + n=H.bL(a,o,a0,a1) + if(f===g&&n===o)return b + return H.mO(a,n,f,!0) + case 13:e=b.z + if(e0;--p)a5.push("T"+(q+p)) + for(o=t.x,n=t._,m=t.K,l="<",k="",p=0;p0){a1+=a2+"[" + for(a2="",p=0;p0){a1+=a2+"{" + for(a2="",p=0;p "+H.b(a0)}, + az:function(a,b){var s,r,q,p,o,n,m=a.y + if(m===5)return"erased" + if(m===2)return"dynamic" + if(m===3)return"void" + if(m===1)return"Never" + if(m===4)return"any" + if(m===6){s=H.az(a.z,b) + return s}if(m===7){r=a.z + s=H.az(r,b) + q=r.y + return J.ns(q===11||q===12?C.a.ah("(",s)+")":s,"?")}if(m===8)return"FutureOr<"+H.b(H.az(a.z,b))+">" + if(m===9){p=H.vb(a.z) + o=a.Q + return o.length!==0?p+("<"+H.v5(o,b)+">"):p}if(m===11)return H.oH(a,b,null) + if(m===12)return H.oH(a.z,b,a.Q) + if(m===13){b.toString + n=a.z + return b[b.length-1-n]}return"?"}, + vb:function(a){var s,r=H.pc(a) + if(r!=null)return r + s="minified:"+a + return s}, + ov:function(a,b){var s=a.tR[b] + for(;typeof s=="string";)s=a.tR[s] + return s}, + uj:function(a,b){var s,r,q,p,o,n=a.eT,m=n[b] + if(m==null)return H.fu(a,b,!1) + else if(typeof m=="number"){s=m + r=H.e_(a,5,"#") + q=[] + for(p=0;p" + s=a.eC.get(p) + if(s!=null)return s + r=new H.aI(null,null) + r.y=9 + r.z=b + r.Q=c + if(c.length>0)r.c=c[0] + r.cy=p + q=H.bI(a,r) + a.eC.set(p,q) + return q}, + mN:function(a,b,c){var s,r,q,p,o,n + if(b.y===10){s=b.z + r=b.Q.concat(c)}else{r=c + s=b}q=s.cy+(";<"+H.ft(r)+">") + p=a.eC.get(q) + if(p!=null)return p + o=new H.aI(null,null) + o.y=10 + o.z=s + o.Q=r + o.cy=q + n=H.bI(a,o) + a.eC.set(q,n) + return n}, + os:function(a,b,c){var s,r,q,p,o,n=b.cy,m=c.a,l=m.length,k=c.b,j=k.length,i=c.c,h=i.length,g="("+H.ft(m) + if(j>0){s=l>0?",":"" + r=H.ft(k) + g+=s+"["+r+"]"}if(h>0){s=l>0?",":"" + r=H.ua(i) + g+=s+"{"+r+"}"}q=n+(g+")") + p=a.eC.get(q) + if(p!=null)return p + o=new H.aI(null,null) + o.y=11 + o.z=b + o.Q=c + o.cy=q + r=H.bI(a,o) + a.eC.set(q,r) + return r}, + mO:function(a,b,c,d){var s,r=b.cy+("<"+H.ft(c)+">"),q=a.eC.get(r) + if(q!=null)return q + s=H.uc(a,b,c,r,d) + a.eC.set(r,s) + return s}, + uc:function(a,b,c,d,e){var s,r,q,p,o,n,m,l + if(e){s=c.length + r=new Array(s) + for(q=0,p=0;p0){n=H.bL(a,b,r,0) + m=H.ed(a,c,r,0) + return H.mO(a,n,m,c!==m)}}l=new H.aI(null,null) + l.y=12 + l.z=b + l.Q=c + l.cy=d + return H.bI(a,l)}, + op:function(a,b,c,d){return{u:a,e:b,r:c,s:[],p:0,n:d}}, + or:function(a){var s,r,q,p,o,n,m,l,k,j,i,h,g=a.r,f=a.s + for(s=g.length,r=0;r=48&&q<=57)r=H.u4(r+1,q,g,f) + else if((((q|32)>>>0)-97&65535)<26||q===95||q===36)r=H.oq(a,r,g,f,!1) + else if(q===46)r=H.oq(a,r,g,f,!0) + else{++r + switch(q){case 44:break + case 58:f.push(!1) + break + case 33:f.push(!0) + break + case 59:f.push(H.bH(a.u,a.e,f.pop())) + break + case 94:f.push(H.uf(a.u,f.pop())) + break + case 35:f.push(H.e_(a.u,5,"#")) + break + case 64:f.push(H.e_(a.u,2,"@")) + break + case 126:f.push(H.e_(a.u,3,"~")) + break + case 60:f.push(a.p) + a.p=f.length + break + case 62:p=a.u + o=f.splice(a.p) + H.mM(a.u,a.e,o) + a.p=f.pop() + n=f.pop() + if(typeof n=="string")f.push(H.dZ(p,n,o)) + else{m=H.bH(p,a.e,n) + switch(m.y){case 11:f.push(H.mO(p,m,o,a.n)) + break + default:f.push(H.mN(p,m,o)) + break}}break + case 38:H.u5(a,f) + break + case 42:l=a.u + f.push(H.ou(l,H.bH(l,a.e,f.pop()),a.n)) + break + case 63:l=a.u + f.push(H.mP(l,H.bH(l,a.e,f.pop()),a.n)) + break + case 47:l=a.u + f.push(H.ot(l,H.bH(l,a.e,f.pop()),a.n)) + break + case 40:f.push(a.p) + a.p=f.length + break + case 41:p=a.u + k=new H.fj() + j=p.sEA + i=p.sEA + n=f.pop() + if(typeof n=="number")switch(n){case-1:j=f.pop() + break + case-2:i=f.pop() + break + default:f.push(n) + break}else f.push(n) + o=f.splice(a.p) + H.mM(a.u,a.e,o) + a.p=f.pop() + k.a=o + k.b=j + k.c=i + f.push(H.os(p,H.bH(p,a.e,f.pop()),k)) + break + case 91:f.push(a.p) + a.p=f.length + break + case 93:o=f.splice(a.p) + H.mM(a.u,a.e,o) + a.p=f.pop() + f.push(o) + f.push(-1) + break + case 123:f.push(a.p) + a.p=f.length + break + case 125:o=f.splice(a.p) + H.u7(a.u,a.e,o) + a.p=f.pop() + f.push(o) + f.push(-2) + break + default:throw"Bad character "+q}}}h=f.pop() + return H.bH(a.u,a.e,h)}, + u4:function(a,b,c,d){var s,r,q=b-48 + for(s=c.length;a=48&&r<=57))break + q=q*10+(r-48)}d.push(q) + return a}, + oq:function(a,b,c,d,e){var s,r,q,p,o,n,m=b+1 + for(s=c.length;m>>0)-97&65535)<26||r===95||r===36))q=r>=48&&r<=57 + else q=!0 + if(!q)break}}p=c.substring(b,m) + if(e){s=a.u + o=a.e + if(o.y===10)o=o.z + n=H.ov(s,o.z)[p] + if(n==null)H.a2('No "'+p+'" in "'+H.tM(o)+'"') + d.push(H.fv(s,o,n))}else d.push(p) + return m}, + u5:function(a,b){var s=b.pop() + if(0===s){b.push(H.e_(a.u,1,"0&")) + return}if(1===s){b.push(H.e_(a.u,4,"1&")) + return}throw H.c(P.fJ("Unexpected extended operation "+H.b(s)))}, + bH:function(a,b,c){if(typeof c=="string")return H.dZ(a,c,a.sEA) + else if(typeof c=="number")return H.u6(a,b,c) + else return c}, + mM:function(a,b,c){var s,r=c.length + for(s=0;sn)return!1 + m=n-o + l=s.b + k=r.b + j=l.length + i=k.length + if(o+j=d)return!1 + a1=f[b] + b+=3 + if(a04294967295)throw H.c(P.S(a,0,4294967295,"length",null)) + return J.eA(new Array(a),b)}, + th:function(a,b){if(a<0)throw H.c(P.O("Length must be a non-negative integer: "+a)) + return H.a(new Array(a),b.h("p<0>"))}, + eA:function(a,b){return J.mC(H.a(a,b.h("p<0>")))}, + mC:function(a){a.fixed$length=Array + return a}, + ti:function(a){if(a<256)switch(a){case 9:case 10:case 11:case 12:case 13:case 32:case 133:case 160:return!0 + default:return!1}switch(a){case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8232:case 8233:case 8239:case 8287:case 12288:case 65279:return!0 + default:return!1}}, + nK:function(a,b){var s,r + for(;b>0;b=s){s=b-1 + r=C.a.A(a,s) + if(r!==32&&r!==13&&!J.ti(r))break}return b}, + cq:function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.de.prototype + return J.eB.prototype}if(typeof a=="string")return J.br.prototype + if(a==null)return J.cB.prototype + if(typeof a=="boolean")return J.dd.prototype + if(a.constructor==Array)return J.p.prototype + if(typeof a!="object"){if(typeof a=="function")return J.aQ.prototype + return a}if(a instanceof P.e)return a + return J.fA(a)}, + vD:function(a){if(typeof a=="number")return J.c5.prototype + if(typeof a=="string")return J.br.prototype + if(a==null)return a + if(a.constructor==Array)return J.p.prototype + if(typeof a!="object"){if(typeof a=="function")return J.aQ.prototype + return a}if(a instanceof P.e)return a + return J.fA(a)}, + M:function(a){if(typeof a=="string")return J.br.prototype + if(a==null)return a + if(a.constructor==Array)return J.p.prototype + if(typeof a!="object"){if(typeof a=="function")return J.aQ.prototype + return a}if(a instanceof P.e)return a + return J.fA(a)}, + bg:function(a){if(a==null)return a + if(a.constructor==Array)return J.p.prototype + if(typeof a!="object"){if(typeof a=="function")return J.aQ.prototype + return a}if(a instanceof P.e)return a + return J.fA(a)}, + vE:function(a){if(typeof a=="number")return J.c5.prototype + if(a==null)return a + if(!(a instanceof P.e))return J.cl.prototype + return a}, + mZ:function(a){if(typeof a=="string")return J.br.prototype + if(a==null)return a + if(!(a instanceof P.e))return J.cl.prototype + return a}, + b0:function(a){if(a==null)return a + if(typeof a!="object"){if(typeof a=="function")return J.aQ.prototype + return a}if(a instanceof P.e)return a + return J.fA(a)}, + ns:function(a,b){if(typeof a=="number"&&typeof b=="number")return a+b + return J.vD(a).ah(a,b)}, + aA:function(a,b){if(a==null)return b==null + if(typeof a!="object")return b!=null&&a===b + return J.cq(a).N(a,b)}, + nt:function(a,b){if(typeof b==="number")if(a.constructor==Array||typeof a=="string"||H.p1(a,a[v.dispatchPropertyName]))if(b>>>0===b&&b>>0===b&&b")),a.h("fc<0>"))}, + e7:function(a,b){a.$2(0,null) + b.b=!0 + return b.a}, + cV:function(a,b){P.uC(a,b)}, + e6:function(a,b){b.T(a)}, + e5:function(a,b){b.bD(H.E(a),H.aK(a))}, + uC:function(a,b){var s,r,q=new P.lK(b),p=new P.lL(b) + if(a instanceof P.C)a.cu(q,p,t.z) + else{s=t.z + if(t.c.b(a))a.ao(0,q,p,s) + else{r=new P.C($.x,t.eI) + r.a=4 + r.c=a + r.cu(q,p,s)}}}, + ee:function(a){var s=function(b,c){return function(d,e){while(true)try{b(d,e) + break}catch(r){e=r + d=c}}}(a,1) + return $.x.bV(new P.m_(s))}, + lv:function(a){return new P.cO(a,1)}, + bF:function(){return C.dy}, + bG:function(a){return new P.cO(a,3)}, + bK:function(a,b){return new P.dW(a,b.h("dW<0>"))}, + ol:function(a,b){var s,r,q + b.a=1 + try{a.ao(0,new P.lm(b),new P.ln(b),t.P)}catch(q){s=H.E(q) + r=H.aK(q) + P.p9(new P.lo(b,s,r))}}, + ll:function(a,b){var s,r + for(;s=a.a,s===2;)a=a.c + if(s>=4){r=b.b1() + b.a=a.a + b.c=a.c + P.cN(b,r)}else{r=b.c + b.a=2 + b.c=a + a.co(r)}}, + cN:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f=null,e={},d=e.a=a + for(s=t.c;!0;){r={} + q=d.a===8 + if(b==null){if(q){s=d.c + P.cY(f,f,d.b,s.a,s.b)}return}r.a=b + p=b.a + for(d=b;p!=null;d=p,p=o){d.a=null + P.cN(e.a,d) + r.a=p + o=p.a}n=e.a + m=n.c + r.b=q + r.c=m + l=!q + if(l){k=d.c + k=(k&1)!==0||(k&15)===8}else k=!0 + if(k){j=d.b.b + if(q){k=n.b===j + k=!(k||k)}else k=!1 + if(k){P.cY(f,f,n.b,m.a,m.b) + return}i=$.x + if(i!==j)$.x=j + else i=f + d=d.c + if((d&15)===8)new P.lt(r,e,q).$0() + else if(l){if((d&1)!==0)new P.ls(r,m).$0()}else if((d&2)!==0)new P.lr(e,r).$0() + if(i!=null)$.x=i + d=r.c + if(s.b(d)){h=r.a.b + if(d.a>=4){g=h.c + h.c=null + b=h.b2(g) + h.a=d.a + h.c=d.c + e.a=d + continue}else P.ll(d,h) + return}}h=r.a.b + g=h.c + h.c=null + b=h.b2(g) + d=r.b + n=r.c + if(!d){h.a=4 + h.c=n}else{h.a=8 + h.c=n}e.a=h + d=h}}, + v4:function(a,b){if(t.Q.b(a))return b.bV(a) + if(t.bI.b(a))return a + throw H.c(P.nz(a,"onError","Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"))}, + v_:function(){var s,r + for(s=$.cX;s!=null;s=$.cX){$.eb=null + r=s.b + $.cX=r + if(r==null)$.ea=null + s.a.$0()}}, + v7:function(){$.mT=!0 + try{P.v_()}finally{$.eb=null + $.mT=!1 + if($.cX!=null)$.np().$1(P.oS())}}, + oP:function(a){var s=new P.fd(a),r=$.ea + if(r==null){$.cX=$.ea=s + if(!$.mT)$.np().$1(P.oS())}else $.ea=r.b=s}, + v6:function(a){var s,r,q,p=$.cX + if(p==null){P.oP(a) + $.eb=$.ea + return}s=new P.fd(a) + r=$.eb + if(r==null){s.b=p + $.cX=$.eb=s}else{q=r.b + s.b=q + $.eb=r.b=s + if(q==null)$.ea=s}}, + p9:function(a){var s=null,r=$.x + if(C.f===r){P.cZ(s,s,C.f,a) + return}P.cZ(s,s,r,r.cw(a))}, + tR:function(a,b){var s=null,r=b.h("cT<0>"),q=new P.cT(s,s,s,s,r) + a.ao(0,new P.kC(q,b),new P.kD(q),t.P) + return new P.an(q,r.h("an<1>"))}, + mI:function(a,b){return new P.dE(new P.kE(a,b),b.h("dE<0>"))}, + yG:function(a){P.aM(a,"stream") + return new P.fq()}, + o6:function(a,b,c,d){return new P.bD(null,b,c,a,d.h("bD<0>"))}, + mV:function(a){var s,r,q,p + if(a==null)return + try{a.$0()}catch(q){s=H.E(q) + r=H.aK(q) + p=$.x + P.cY(null,null,p,s,r)}}, + oi:function(a,b,c,d){var s=$.x,r=d?1:0,q=P.oj(s,b) + return new P.cK(a,q,c,s,r)}, + oj:function(a,b){if(b==null)b=P.vn() + if(t.k.b(b))return a.bV(b) + if(t.d5.b(b))return b + throw H.c(P.O("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace."))}, + v0:function(a,b){P.cY(null,null,$.x,a,b)}, + fK:function(a,b){var s=b==null?P.el(a):b + P.aM(a,"error") + return new P.ek(a,s)}, + el:function(a){var s + if(t.C.b(a)){s=a.gaP() + if(s!=null)return s}return C.bg}, + cY:function(a,b,c,d,e){P.v6(new P.lY(d,e))}, + oL:function(a,b,c,d){var s,r=$.x + if(r===c)return d.$0() + $.x=c + s=r + try{r=d.$0() + return r}finally{$.x=s}}, + oN:function(a,b,c,d,e){var s,r=$.x + if(r===c)return d.$1(e) + $.x=c + s=r + try{r=d.$1(e) + return r}finally{$.x=s}}, + oM:function(a,b,c,d,e,f){var s,r=$.x + if(r===c)return d.$2(e,f) + $.x=c + s=r + try{r=d.$2(e,f) + return r}finally{$.x=s}}, + cZ:function(a,b,c,d){var s=C.f!==c + if(s)d=!(!s||!1)?c.cw(d):c.dQ(d,t.H) + P.oP(d)}, + lb:function lb(a){this.a=a}, + la:function la(a,b,c){this.a=a + this.b=b + this.c=c}, + lc:function lc(a){this.a=a}, + ld:function ld(a){this.a=a}, + lG:function lG(){}, + lH:function lH(a,b){this.a=a + this.b=b}, + fc:function fc(a,b){this.a=a + this.b=!1 + this.$ti=b}, + lK:function lK(a){this.a=a}, + lL:function lL(a){this.a=a}, + m_:function m_(a){this.a=a}, + cO:function cO(a,b){this.a=a + this.b=b}, + aB:function aB(a,b){var _=this + _.a=a + _.d=_.c=_.b=null + _.$ti=b}, + dW:function dW(a,b){this.a=a + this.$ti=b}, + ff:function ff(){}, + ax:function ax(a,b){this.a=a + this.$ti=b}, + cM:function cM(a,b,c,d){var _=this + _.a=null + _.b=a + _.c=b + _.d=c + _.e=d}, + C:function C(a,b){var _=this + _.a=0 + _.b=a + _.c=null + _.$ti=b}, + li:function li(a,b){this.a=a + this.b=b}, + lq:function lq(a,b){this.a=a + this.b=b}, + lm:function lm(a){this.a=a}, + ln:function ln(a){this.a=a}, + lo:function lo(a,b,c){this.a=a + this.b=b + this.c=c}, + lk:function lk(a,b){this.a=a + this.b=b}, + lp:function lp(a,b){this.a=a + this.b=b}, + lj:function lj(a,b,c){this.a=a + this.b=b + this.c=c}, + lt:function lt(a,b,c){this.a=a + this.b=b + this.c=c}, + lu:function lu(a){this.a=a}, + ls:function ls(a,b){this.a=a + this.b=b}, + lr:function lr(a,b){this.a=a + this.b=b}, + fd:function fd(a){this.a=a + this.b=null}, + aW:function aW(){}, + kC:function kC(a,b){this.a=a + this.b=b}, + kD:function kD(a){this.a=a}, + kE:function kE(a,b){this.a=a + this.b=b}, + kF:function kF(a,b){this.a=a + this.b=b}, + kG:function kG(a,b){this.a=a + this.b=b}, + f0:function f0(){}, + cS:function cS(){}, + lF:function lF(a){this.a=a}, + lE:function lE(a){this.a=a}, + fs:function fs(){}, + fe:function fe(){}, + bD:function bD(a,b,c,d,e){var _=this + _.a=null + _.b=0 + _.c=null + _.d=a + _.e=b + _.f=c + _.r=d + _.$ti=e}, + cT:function cT(a,b,c,d,e){var _=this + _.a=null + _.b=0 + _.c=null + _.d=a + _.e=b + _.f=c + _.r=d + _.$ti=e}, + an:function an(a,b){this.a=a + this.$ti=b}, + dA:function dA(a,b,c,d,e,f){var _=this + _.x=a + _.a=b + _.b=c + _.c=d + _.d=e + _.e=f + _.r=_.f=null}, + cK:function cK(a,b,c,d,e){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.r=_.f=null}, + lg:function lg(a,b,c){this.a=a + this.b=b + this.c=c}, + lf:function lf(a){this.a=a}, + dT:function dT(){}, + dE:function dE(a,b){this.a=a + this.b=!1 + this.$ti=b}, + dL:function dL(a){this.b=a + this.a=0}, + fh:function fh(){}, + cn:function cn(a){this.b=a + this.a=null}, + dB:function dB(a,b){this.b=a + this.c=b + this.a=null}, + lh:function lh(){}, + fn:function fn(){}, + lz:function lz(a,b){this.a=a + this.b=b}, + dU:function dU(){this.c=this.b=null + this.a=0}, + fq:function fq(){}, + ek:function ek(a,b){this.a=a + this.b=b}, + lJ:function lJ(){}, + lY:function lY(a,b){this.a=a + this.b=b}, + lB:function lB(){}, + lD:function lD(a,b,c){this.a=a + this.b=b + this.c=c}, + lC:function lC(a,b){this.a=a + this.b=b}, + om:function(a,b){var s=a[b] + return s===a?null:s}, + mK:function(a,b,c){if(c==null)a[b]=a + else a[b]=c}, + on:function(){var s=Object.create(null) + P.mK(s,"",s) + delete s[""] + return s}, + mF:function(a,b,c){return H.oU(a,new H.aG(b.h("@<0>").D(c).h("aG<1,2>")))}, + a5:function(a,b){return new H.aG(a.h("@<0>").D(b).h("aG<1,2>"))}, + nN:function(a){return new P.aZ(a.h("aZ<0>"))}, + aR:function(a){return new P.aZ(a.h("aZ<0>"))}, + b8:function(a,b){return H.vA(a,new P.aZ(b.h("aZ<0>")))}, + mL:function(){var s=Object.create(null) + s[""]=s + delete s[""] + return s}, + tf:function(a,b,c){var s,r + if(P.mU(a)){if(b==="("&&c===")")return"(...)" + return b+"..."+c}s=H.a([],t.s) + $.co.push(a) + try{P.uY(a,s)}finally{$.co.pop()}r=P.mJ(b,s,", ")+c + return r.charCodeAt(0)==0?r:r}, + id:function(a,b,c){var s,r + if(P.mU(a))return b+"..."+c + s=new P.a9(b) + $.co.push(a) + try{r=s + r.a=P.mJ(r.a,a,", ")}finally{$.co.pop()}s.a+=c + r=s.a + return r.charCodeAt(0)==0?r:r}, + mU:function(a){var s,r + for(s=$.co.length,r=0;r100){while(!0){if(!(k>75&&j>3))break + k-=b.pop().length+2;--j}b.push("...") + return}}q=H.b(p) + r=H.b(o) + k+=r.length+q.length+4}}if(j>b.length+2){k+=5 + m="..."}else m=null + while(!0){if(!(k>80&&b.length>3))break + k-=b.pop().length+2 + if(m==null){k+=5 + m="..."}}if(m!=null)b.push(m) + b.push(q) + b.push(r)}, + tt:function(a,b){var s,r,q=P.nN(b) + for(s=a.length,r=0;r=0)return null + return r}return null}, + tX:function(a,b,c,d){var s=a?$.rk():$.rj() + if(s==null)return null + if(0===c&&d===b.length)return P.od(s,b) + return P.od(s,b.subarray(c,P.aV(c,d,b.length)))}, + od:function(a,b){var s,r + try{s=a.decode(b) + return s}catch(r){H.E(r)}return null}, + nA:function(a,b,c,d,e,f){if(C.c.bg(f,4)!==0)throw H.c(P.K("Invalid base64 padding, padded length must be multiple of four, is "+f,a,c)) + if(d+e!==f)throw H.c(P.K("Invalid base64 padding, '=' not at the end",a,b)) + if(e>2)throw H.c(P.K("Invalid base64 padding, more than two '=' characters",a,b))}, + u3:function(a,b,c,d,e,f){var s,r,q,p,o,n,m="Invalid encoding before padding",l="Invalid character",k=C.c.ad(f,2),j=f&3,i=$.nq() + for(s=b,r=0;s=0){k=(k<<6|p)&16777215 + j=j+1&3 + if(j===0){o=e+1 + d[e]=k>>>16&255 + e=o+1 + d[o]=k>>>8&255 + o=e+1 + d[e]=k&255 + e=o + k=0}continue}else if(p===-1&&j>1){if(r>127)break + if(j===3){if((k&3)!==0)throw H.c(P.K(m,a,s)) + d[e]=k>>>10 + d[e+1]=k>>>2}else{if((k&15)!==0)throw H.c(P.K(m,a,s)) + d[e]=k>>>4}n=(3-j)*3 + if(q===37)n+=2 + return P.oh(a,s+1,c,-n-1)}throw H.c(P.K(l,a,s))}if(r>=0&&r<=127)return(k<<2|j)>>>0 + for(s=b;s127)break}throw H.c(P.K(l,a,s))}, + u1:function(a,b,c,d){var s=P.u2(a,b,c),r=(d&3)+(s-b),q=C.c.ad(r,2)*3,p=r&3 + if(p!==0&&s0)return new Uint8Array(q) + return $.rl()}, + u2:function(a,b,c){var s,r=c,q=r,p=0 + while(!0){if(!(q>b&&p<2))break + c$0:{--q + s=C.a.A(a,q) + if(s===61){++p + r=q + break c$0}if((s|32)===100){if(q===b)break;--q + s=C.a.A(a,q)}if(s===51){if(q===b)break;--q + s=C.a.A(a,q)}if(s===37){++p + r=q + break c$0}break}}return r}, + oh:function(a,b,c,d){var s,r + if(b===c)return d + s=-d-1 + for(;s>0;){r=C.a.A(a,b) + if(s===3){if(r===61){s-=3;++b + break}if(r===37){--s;++b + if(b===c)break + r=C.a.A(a,b)}else break}if((s>3?s-3:s)===2){if(r!==51)break;++b;--s + if(b===c)break + r=C.a.A(a,b)}if((r|32)!==100)break;++b;--s + if(b===c)break}if(b!==c)throw H.c(P.K("Invalid padding character",a,b)) + return-s-1}, + oC:function(a){switch(a){case 65:return"Missing extension byte" + case 67:return"Unexpected extension byte" + case 69:return"Invalid UTF-8 byte" + case 71:return"Overlong encoding" + case 73:return"Out of unicode range" + case 75:return"Encoded surrogate" + case 77:return"Unfinished UTF-8 octet sequence" + default:return""}}, + uz:function(a,b,c){var s,r,q,p=c-b,o=new Uint8Array(p) + for(s=J.M(a),r=0;r>>0!==0?255:q}return o}, + fl:function fl(a,b){this.a=a + this.b=b + this.c=null}, + fm:function fm(a){this.a=a}, + lw:function lw(a,b,c){this.b=a + this.c=b + this.a=c}, + kT:function kT(){}, + kU:function kU(){}, + fL:function fL(){}, + fN:function fN(){}, + fM:function fM(){}, + le:function le(){this.a=0}, + fO:function fO(){}, + em:function em(){}, + fo:function fo(a,b,c){this.a=a + this.b=b + this.$ti=c}, + eo:function eo(){}, + eq:function eq(){}, + hw:function hw(){}, + io:function io(){}, + ip:function ip(a){this.a=a}, + kH:function kH(){}, + kI:function kI(){}, + dV:function dV(){}, + lI:function lI(a,b,c){this.a=a + this.b=b + this.c=c}, + kR:function kR(){}, + kS:function kS(a){this.a=a}, + fx:function fx(a){this.a=a + this.b=16 + this.c=0}, + cr:function(a,b){var s=H.o1(a,b) + if(s!=null)return s + throw H.c(P.K(a,null,null))}, + t6:function(a){if(a instanceof H.bZ)return a.l(0) + return"Instance of '"+H.b(H.ju(a))+"'"}, + bt:function(a,b,c,d){var s,r=J.ie(a,d) + if(a!==0&&b!=null)for(s=0;s")) + for(s=J.a_(a);s.n();)r.push(s.gq()) + if(b)return r + return J.mC(r)}, + nO:function(a,b,c,d){var s,r=c?J.th(a,d):J.ie(a,d) + for(s=0;s")) + for(q=0;q=1000)return""+a + if(s>=100)return r+"0"+s + if(s>=10)return r+"00"+s + return r+"000"+s}, + t5:function(a){var s=Math.abs(a),r=a<0?"-":"+" + if(s>=1e5)return r+s + return r+"0"+s}, + nH:function(a){if(a>=100)return""+a + if(a>=10)return"0"+a + return"00"+a}, + b5:function(a){if(a>=10)return""+a + return"0"+a}, + cx:function(a){if(typeof a=="number"||H.e9(a)||null==a)return J.ag(a) + if(typeof a=="string")return JSON.stringify(a) + return P.t6(a)}, + fJ:function(a){return new P.ej(a)}, + O:function(a){return new P.ak(!1,null,null,a)}, + nz:function(a,b,c){return new P.ak(!0,a,b,c)}, + aM:function(a,b){if(a==null)throw H.c(new P.ak(!1,null,b,"Must not be null")) + return a}, + jv:function(a,b){return new P.dq(null,null,!0,a,b,"Value not in range")}, + S:function(a,b,c,d,e){return new P.dq(b,c,!0,a,d,"Invalid value")}, + aV:function(a,b,c){if(0>a||a>c)throw H.c(P.S(a,0,c,"start",null)) + if(b!=null){if(a>b||b>c)throw H.c(P.S(b,a,c,"end",null)) + return b}return c}, + aU:function(a,b){if(a<0)throw H.c(P.S(a,0,null,b,null)) + return a}, + ex:function(a,b,c,d,e){var s=e==null?J.X(b):e + return new P.ew(s,!0,a,c,"Index out of range")}, + ab:function(a){return new P.f8(a)}, + o9:function(a){return new P.f3(a)}, + cF:function(a){return new P.bz(a)}, + ad:function(a){return new P.ep(a)}, + t7:function(a){return new P.dD(a)}, + K:function(a,b,c){return new P.aD(a,b,c)}, + nJ:function(a,b,c){if(a<=0)return new H.b6(c.h("b6<0>")) + return new P.dF(a,b,c.h("dF<0>"))}, + nP:function(a,b,c,d,e){return new H.bY(a,b.h("@<0>").D(c).D(d).D(e).h("bY<1,2,3,4>"))}, + ob:function(a6){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4=null,a5=a6.length + if(a5>=5){s=P.oQ(a6,0) + if(s===0){r=P.kM(a5=14)q[7]=a5 + p=q[1] + if(p>=0)if(P.oO(a6,0,p,20,q)===20)q[7]=p + o=q[2]+1 + n=q[3] + m=q[4] + l=q[5] + k=q[6] + if(kp+3){i=a4 + j=!1}else{r=n>0 + if(r&&n+1===m){i=a4 + j=!1}else{if(!(lm+2&&C.a.U(a6,"/..",l-3) + else h=!0 + if(h){i=a4 + j=!1}else{if(p===4)if(C.a.U(a6,"file",0)){if(o<=0){if(!C.a.U(a6,"/",m)){g="file:///" + f=3}else{g="file://" + f=2}a6=g+C.a.t(a6,m,a5) + p-=0 + r=f-0 + l+=r + k+=r + a5=a6.length + o=7 + n=7 + m=7}else if(m===l){++k + e=l+1 + a6=C.a.az(a6,m,l,"/");++a5 + l=e}i="file"}else if(C.a.U(a6,"http",0)){if(r&&n+3===m&&C.a.U(a6,"80",n+1)){k-=3 + d=m-3 + l-=3 + a6=C.a.az(a6,n,m,"") + a5-=3 + m=d}i="http"}else i=a4 + else if(p===5&&C.a.U(a6,"https",0)){if(r&&n+4===m&&C.a.U(a6,"443",n+1)){k-=4 + d=m-4 + l-=4 + a6=C.a.az(a6,n,m,"") + a5-=3 + m=d}i="https"}else i=a4 + j=!0}}}else i=a4 + if(j){if(a50)i=P.us(a6,0,p) + else{if(p===0)P.cU(a6,0,"Invalid empty scheme") + i=""}if(o>0){c=p+3 + b=c9)k.$2("invalid character",s)}else{if(q===3)k.$2(m,s) + o=P.cr(C.a.t(a,r,s),null) + if(o>255)k.$2(l,r) + n=q+1 + j[q]=o + r=s+1 + q=n}}if(q!==3)k.$2(m,c) + o=P.cr(C.a.t(a,r,c),null) + if(o>255)k.$2(l,r) + j[q]=o + return j}, + oc:function(a,b,c){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=new P.kO(a),d=new P.kP(e,a) + if(a.length<2)e.$1("address is too short") + s=H.a([],t.Z) + for(r=b,q=r,p=!1,o=!1;r>>0) + s.push((k[2]<<8|k[3])>>>0)}if(p){if(s.length>7)e.$1("an address with a wildcard must have less than 7 parts")}else if(s.length!==8)e.$1("an address without a wildcard must contain exactly 8 parts") + j=new Uint8Array(16) + for(l=s.length,i=9-l,r=0,h=0;r=b&&q=b&&s>>4]&1<<(p&15))!==0){if(q&&65<=p&&90>=p){if(i==null)i=new P.a9("") + if(r>>4]&1<<(o&15))!==0){if(p&&65<=o&&90>=o){if(q==null)q=new P.a9("") + if(r>>4]&1<<(o&15))!==0)P.cU(a,s,"Invalid character") + else{if((o&64512)===55296&&s+1>>4]&1<<(q&15))!==0))P.cU(a,s,"Illegal scheme character") + if(65<=q&&q<=90)r=!0}a=C.a.t(a,b,c) + return P.uk(r?a.toLowerCase():a)}, + uk:function(a){if(a==="http")return"http" + if(a==="file")return"file" + if(a==="https")return"https" + if(a==="package")return"package" + return a}, + ut:function(a,b,c){return P.e3(a,b,c,C.cm,!1)}, + up:function(a,b,c,d,e,f){var s=e==="file",r=s||f,q=P.e3(a,b,c,C.am,!0) + if(q.length===0){if(s)return"/"}else if(r&&!C.a.V(q,"/"))q="/"+q + return P.uu(q,e,f)}, + uu:function(a,b,c){var s=b.length===0 + if(s&&!c&&!C.a.V(a,"/"))return P.uw(a,!s||c) + return P.ux(a)}, + ur:function(a,b,c,d){return P.e3(a,b,c,C.x,!0)}, + un:function(a,b,c){return P.e3(a,b,c,C.x,!0)}, + mR:function(a,b,c){var s,r,q,p,o,n=b+2 + if(n>=a.length)return"%" + s=C.a.A(a,b+1) + r=C.a.A(a,n) + q=H.m8(s) + p=H.m8(r) + if(q<0||p<0)return"%" + o=q*16+p + if(o<127&&(C.aj[C.c.ad(o,4)]&1<<(o&15))!==0)return H.ba(c&&65<=o&&90>=o?(o|32)>>>0:o) + if(s>=97||r>=97)return C.a.t(a,b,b+3).toUpperCase() + return null}, + mQ:function(a){var s,r,q,p,o,n="0123456789ABCDEF" + if(a<128){s=new Uint8Array(3) + s[0]=37 + s[1]=C.a.H(n,a>>>4) + s[2]=C.a.H(n,a&15)}else{if(a>2047)if(a>65535){r=240 + q=4}else{r=224 + q=3}else{r=192 + q=2}s=new Uint8Array(3*q) + for(p=0;--q,q>=0;r=128){o=C.c.dL(a,6*q)&63|r + s[p]=37 + s[p+1]=C.a.H(n,o>>>4) + s[p+2]=C.a.H(n,o&15) + p+=3}}return P.o7(s,0,null)}, + e3:function(a,b,c,d,e){var s=P.oA(a,b,c,d,e) + return s==null?C.a.t(a,b,c):s}, + oA:function(a,b,c,d,e){var s,r,q,p,o,n,m,l,k,j=null + for(s=!e,r=b,q=r,p=j;r>>4]&1<<(o&15))!==0)++r + else{if(o===37){n=P.mR(a,r,!1) + if(n==null){r+=3 + continue}if("%"===n){n="%25" + m=1}else m=3}else if(s&&o<=93&&(C.ac[o>>>4]&1<<(o&15))!==0){P.cU(a,r,"Invalid character") + m=j + n=m}else{if((o&64512)===55296){l=r+1 + if(l=2&&P.oy(J.rs(a,0)))for(s=1;s127||(C.ah[r>>>4]&1<<(r&15))===0)break}return a}, + um:function(a,b){var s,r,q + for(s=0,r=0;r<2;++r){q=C.a.A(a,b+r) + if(48<=q&&q<=57)s=s*16+q-48 + else{q|=32 + if(97<=q&&q<=102)s=s*16+q-87 + else throw H.c(P.O("Invalid URL encoding"))}}return s}, + uy:function(a,b,c,d,e){var s,r,q,p,o=b + while(!0){if(!(o127)throw H.c(P.O("Illegal percent encoding in URI")) + if(r===37){if(o+3>q)throw H.c(P.O("Truncated URI")) + p.push(P.um(a,o+1)) + o+=2}else p.push(r)}}return C.dw.dT(p)}, + oy:function(a){var s=a|32 + return 97<=s&&s<=122}, + oa:function(a){var s + if(a.length>=5){s=P.oQ(a,0) + if(s===0)return P.kM(a,5,null) + if(s===32)return P.kM(C.a.bj(a,5),0,null)}throw H.c(P.K("Does not start with 'data:'",a,0))}, + kM:function(a,b,c){var s,r,q,p,o,n,m,l,k="Invalid MIME type",j=H.a([b-1],t.Z) + for(s=a.length,r=b,q=-1,p=null;rb)throw H.c(P.K(k,a,r)) + for(;p!==44;){j.push(r);++r + for(o=-1;r=0)j.push(o) + else{n=C.d.gaH(j) + if(p!==44||r!==n+7||!C.a.U(a,"base64",n+1))throw H.c(P.K("Expecting '='",a,r)) + break}}j.push(r) + m=r+1 + if((j.length&1)===1)a=C.b5.ec(a,m,s) + else{l=P.oA(a,m,s,C.x,!0) + if(l!=null)a=C.a.az(a,m,s,l)}return new P.kL(a,j,c)}, + uG:function(){var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~!$&'()*+,;=",r=".",q=":",p="/",o="?",n="#",m=P.nO(22,new P.lP(),!0,t.E),l=new P.lO(m),k=new P.lQ(),j=new P.lR(),i=l.$2(0,225) + k.$3(i,s,1) + k.$3(i,r,14) + k.$3(i,q,34) + k.$3(i,p,3) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(14,225) + k.$3(i,s,1) + k.$3(i,r,15) + k.$3(i,q,34) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(15,225) + k.$3(i,s,1) + k.$3(i,"%",225) + k.$3(i,q,34) + k.$3(i,p,9) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(1,225) + k.$3(i,s,1) + k.$3(i,q,34) + k.$3(i,p,10) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(2,235) + k.$3(i,s,139) + k.$3(i,p,131) + k.$3(i,r,146) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(3,235) + k.$3(i,s,11) + k.$3(i,p,68) + k.$3(i,r,18) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(4,229) + k.$3(i,s,5) + j.$3(i,"AZ",229) + k.$3(i,q,102) + k.$3(i,"@",68) + k.$3(i,"[",232) + k.$3(i,p,138) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(5,229) + k.$3(i,s,5) + j.$3(i,"AZ",229) + k.$3(i,q,102) + k.$3(i,"@",68) + k.$3(i,p,138) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(6,231) + j.$3(i,"19",7) + k.$3(i,"@",68) + k.$3(i,p,138) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(7,231) + j.$3(i,"09",7) + k.$3(i,"@",68) + k.$3(i,p,138) + k.$3(i,o,172) + k.$3(i,n,205) + k.$3(l.$2(8,8),"]",5) + i=l.$2(9,235) + k.$3(i,s,11) + k.$3(i,r,16) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(16,235) + k.$3(i,s,11) + k.$3(i,r,17) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(17,235) + k.$3(i,s,11) + k.$3(i,p,9) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(10,235) + k.$3(i,s,11) + k.$3(i,r,18) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(18,235) + k.$3(i,s,11) + k.$3(i,r,19) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(19,235) + k.$3(i,s,11) + k.$3(i,p,234) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(11,235) + k.$3(i,s,11) + k.$3(i,p,10) + k.$3(i,o,172) + k.$3(i,n,205) + i=l.$2(12,236) + k.$3(i,s,12) + k.$3(i,o,12) + k.$3(i,n,205) + i=l.$2(13,237) + k.$3(i,s,13) + k.$3(i,o,13) + j.$3(l.$2(20,245),"az",21) + i=l.$2(21,245) + j.$3(i,"az",21) + j.$3(i,"09",21) + k.$3(i,"+-.",21) + return m}, + oO:function(a,b,c,d,e){var s,r,q,p,o=$.rp() + for(s=b;s95?31:q] + d=p&31 + e[p>>>5]=s}return d}, + oQ:function(a,b){return((C.a.H(a,b+4)^58)*3|C.a.H(a,b)^100|C.a.H(a,b+1)^97|C.a.H(a,b+2)^116|C.a.H(a,b+3)^97)>>>0}, + jn:function jn(a,b){this.a=a + this.b=b}, + d5:function d5(a,b){this.a=a + this.b=b}, + F:function F(){}, + ej:function ej(a){this.a=a}, + f2:function f2(){}, + eR:function eR(){}, + ak:function ak(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + dq:function dq(a,b,c,d,e,f){var _=this + _.e=a + _.f=b + _.a=c + _.b=d + _.c=e + _.d=f}, + ew:function ew(a,b,c,d,e){var _=this + _.f=a + _.a=b + _.b=c + _.c=d + _.d=e}, + eO:function eO(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + f8:function f8(a){this.a=a}, + f3:function f3(a){this.a=a}, + bz:function bz(a){this.a=a}, + ep:function ep(a){this.a=a}, + eT:function eT(){}, + ds:function ds(){}, + er:function er(a){this.a=a}, + dD:function dD(a){this.a=a}, + aD:function aD(a,b,c){this.a=a + this.b=b + this.c=c}, + i:function i(){}, + dF:function dF(a,b,c){this.a=a + this.b=b + this.$ti=c}, + H:function H(){}, + cC:function cC(a,b,c){this.a=a + this.b=b + this.$ti=c}, + k:function k(){}, + e:function e(){}, + fr:function fr(){}, + a9:function a9(a){this.a=a}, + kN:function kN(a){this.a=a}, + kO:function kO(a){this.a=a}, + kP:function kP(a,b){this.a=a + this.b=b}, + e2:function e2(a,b,c,d,e,f,g){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.f=f + _.r=g + _.z=_.x=null}, + kL:function kL(a,b,c){this.a=a + this.b=b + this.c=c}, + lP:function lP(){}, + lO:function lO(a){this.a=a}, + lQ:function lQ(){}, + lR:function lR(){}, + fp:function fp(a,b,c,d,e,f,g,h){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.f=f + _.r=g + _.x=h + _.y=null}, + fg:function fg(a,b,c,d,e,f,g){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.f=f + _.r=g + _.z=_.x=null}, + n2:function(a){if(!t.I.b(a)&&!t.U.b(a))throw H.c(P.O("object must be a Map or Iterable")) + return P.uF(a)}, + uF:function(a){var s=new P.lM(new P.dJ(t.aH)).$1(a) + s.toString + return s}, + lM:function lM(a){this.a=a}, + uE:function(a){var s,r=a.$dart_jsFunction + if(r!=null)return r + s=function(b,c){return function(){return b(c,Array.prototype.slice.apply(arguments))}}(P.uD,a) + s[$.n6()]=a + a.$dart_jsFunction=s + return s}, + uD:function(a,b){return H.tH(a,b,null)}, + cp:function(a){if(typeof a=="function")return a + else return P.uE(a)}},M={ + rM:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e="byteOffset",d=null,c="normalized" + F.A(a,C.cu,b) + s=F.P(a,"bufferView",b,!1) + if(s===-1){r=a.w(e) + if(r)b.k($.d1(),H.a(["bufferView"],t.M),e) + q=0}else q=F.W(a,e,b,0,d,-1,0,!1) + p=F.W(a,"componentType",b,-1,C.c3,-1,0,!0) + o=F.W(a,"count",b,-1,d,-1,1,!0) + n=F.J(a,"type",b,d,C.l.gL(),d,!0) + m=F.oV(a,c,b) + if(n!=null&&p!==-1){l=C.l.j(0,n) + if(l!=null)if(p===5126){r=t.V + k=F.aj(a,"min",b,d,H.a([l],r),1/0,-1/0,!0) + j=F.aj(a,"max",b,d,H.a([l],r),1/0,-1/0,!0)}else{k=F.oW(a,"min",b,p,l) + j=F.oW(a,"max",b,p,l)}else{k=d + j=k}}else{k=d + j=k}i=F.V(a,"sparse",b,M.vf(),!1) + if(m)r=p===5126||p===5125 + else r=!1 + if(r)b.p($.qw(),c) + if((n==="MAT2"||n==="MAT3"||n==="MAT4")&&q!==-1&&(q&3)!==0)b.p($.qv(),e) + switch(p){case 5120:case 5121:case 5122:case 5123:case 5125:r=t.w + r.a(j) + r.a(k) + F.J(a,"name",b,d,d,d,!1) + r=F.y(a,C.L,b,d) + h=F.z(a,b) + g=new M.fb(s,q,p,o,n,m,j,k,i,Z.b_(p),r,h,!1) + if(k!=null){r=b.O() + h=P.bt(k.length,0,!1,t.e) + f=new Array(k.length) + f.fixed$length=Array + b.W(g,new M.eH(h,H.a(f,t.V),J.fG(k,!1),r))}if(j!=null){r=b.O() + h=P.bt(j.length,0,!1,t.e) + f=new Array(j.length) + f.fixed$length=Array + b.W(g,new M.eF(h,H.a(f,t.V),J.fG(j,!1),r))}break + default:r=t.fy + r.a(j) + r.a(k) + F.J(a,"name",b,d,d,d,!1) + r=F.y(a,C.L,b,d) + h=F.z(a,b) + g=new M.fa(s,q,p,o,n,m,j,k,i,Z.b_(p),r,h,!1) + b.W(g,new M.ez(b.O())) + if(k!=null){r=b.O() + h=P.bt(k.length,0,!1,t.e) + f=new Array(k.length) + f.fixed$length=Array + b.W(g,new M.eG(h,H.a(f,t.m),J.fG(k,!1),r))}if(j!=null){r=b.O() + h=P.bt(j.length,0,!1,t.e) + f=new Array(j.length) + f.fixed$length=Array + b.W(g,new M.eE(h,H.a(f,t.m),J.fG(j,!1),r))}break}return g}, + bm:function(a,b,c,d,e,f){var s,r,q="byteOffset" + if(a===-1)return!1 + if(a%b!==0)if(f!=null)f.k($.qx(),H.a([a,b],t.M),q) + else return!1 + s=d.y + if(s===-1)return!1 + r=s+a + if(r%b!==0)if(f!=null)f.E($.pV(),H.a([r,b],t.M)) + else return!1 + s=d.z + if(a>s)if(f!=null)f.k($.nd(),H.a([a,c,e,s],t.M),q) + else return!1 + else if(a+c>s)if(f!=null)f.E($.nd(),H.a([a,c,e,s],t.M)) + else return!1 + return!0}, + mz:function(a,b,c,d){var s=b.byteLength,r=Z.b_(a) + if(sp.gb8()))s=p.gcM()==p.gb8()&&p.geb()>p.gbO() + else s=!0 + if(s)b.k($.qR(),H.a([r,q],t.M),n)}return p}, + bo:function bo(a,b,c,d,e,f){var _=this + _.e=a + _.f=b + _.r=c + _.a=d + _.b=e + _.a$=f}, + te:function(a,b){var s,r,q,p,o,n,m,l,k,j,i="bufferView",h=null + F.A(a,C.cc,b) + p=F.P(a,i,b,!1) + o=b.k1 + n=F.J(a,"mimeType",b,h,o,h,!1) + s=F.J(a,"uri",b,h,h,h,!1) + m=p===-1 + l=!m + if(l&&n==null)b.k($.d1(),H.a(["mimeType"],t.M),i) + if(!(l&&s!=null))m=m&&s==null + else m=!0 + if(m)b.E($.nl(),H.a(["bufferView","uri"],t.M)) + r=null + if(s!=null){q=null + try{q=P.oa(s)}catch(k){if(H.E(k) instanceof P.aD)r=F.p_(s,b) + else throw k}if(q!=null){if(b.id)b.p($.nc(),"uri") + j=q.cB() + if(n==null){m=C.d.F(o,q.gax()) + if(!m)b.k($.nm(),H.a([q.gax(),o],t.M),"uri") + n=q.gax()}}else j=h}else j=h + o=r + F.J(a,"name",b,h,h,h,!1) + return new T.aO(p,n,o,j,F.y(a,C.au,b,h),F.z(a,b),!1)}, + aO:function aO(a,b,c,d,e,f,g){var _=this + _.x=a + _.y=b + _.z=c + _.Q=d + _.cx=_.ch=null + _.a=e + _.b=f + _.a$=g}, + tO:function(a,b){var s=null + F.A(a,C.cH,b) + F.W(a,"magFilter",b,-1,C.bU,-1,0,!1) + F.W(a,"minFilter",b,-1,C.bX,-1,0,!1) + F.W(a,"wrapS",b,10497,C.ad,-1,0,!1) + F.W(a,"wrapT",b,10497,C.ad,-1,0,!1) + F.J(a,"name",b,s,s,s,!1) + return new T.bv(F.y(a,C.dv,b,s),F.z(a,b),!1)}, + bv:function bv(a,b,c){this.a=a + this.b=b + this.a$=c}, + tv:function(){return new T.cD(new Float32Array(16))}, + tL:function(){return new T.eW(new Float32Array(4))}, + og:function(a){var s=new Float32Array(3) + s[2]=a[2] + s[1]=a[1] + s[0]=a[0] + return new T.cJ(s)}, + of:function(){return new T.cJ(new Float32Array(3))}, + cD:function cD(a){this.a=a}, + eW:function eW(a){this.a=a}, + cJ:function cJ(a){this.a=a}, + f9:function f9(a){this.a=a}},Q={ + rU:function(a,b){var s,r,q,p,o,n,m,l,k,j="byteLength",i=null,h="uri" + F.A(a,C.cO,b) + p=F.W(a,j,b,-1,i,-1,1,!0) + s=null + o=a.w(h) + if(o){r=F.J(a,h,b,i,i,i,!1) + if(r!=null){q=null + try{q=P.oa(r)}catch(n){if(H.E(n) instanceof P.aD)s=F.p_(r,b) + else throw n}if(q!=null){if(b.id)b.p($.nc(),h) + if(q.gax()==="application/octet-stream"||q.gax()==="application/gltf-buffer")m=q.cB() + else{b.k($.qA(),H.a([q.gax()],t.M),h) + m=i}}else m=i + if(m!=null&&p!==-1&&m.length!==p){l=$.pw() + k=m.length + b.k(l,H.a([k,p],t.M),j) + p=k}}else m=i}else m=i + l=s + F.J(a,"name",b,i,i,i,!1) + return new Q.aN(l,p,o,m,F.y(a,C.dd,b,i),F.z(a,b),!1)}, + aN:function aN(a,b,c,d,e,f,g){var _=this + _.x=a + _.y=b + _.z=c + _.Q=d + _.a=e + _.b=f + _.a$=g}, + p2:function(){var s=new Q.mo() + J.rB(self.exports,P.cp(new Q.mk(s))) + J.rC(self.exports,P.cp(new Q.ml(s))) + J.rD(self.exports,P.cp(new Q.mm())) + J.rA(self.exports,P.cp(new Q.mn()))}, + fB:function(a,b){return Q.wc(a,b)}, + wc:function(a,b){var s=0,r=P.ec(t.t),q,p=2,o,n=[],m,l,k,j,i,h + var $async$fB=P.ee(function(c,d){if(c===1){o=d + s=p}while(true)switch(s){case 0:if(!t.a.b(a))throw H.c(P.O("data: Argument must be a Uint8Array.")) + j=Q.oE(b) + m=Q.oI(j) + l=null + p=4 + s=7 + return P.cV(K.tb(P.mI(H.a([a],t.d),t.w),m),$async$fB) + case 7:k=d + s=8 + return P.cV(k.bU(),$async$fB) + case 8:l=d + p=2 + s=6 + break + case 4:p=3 + h=o + if(H.E(h) instanceof K.db)throw h + else throw h + s=6 + break + case 3:s=2 + break + case 6:q=Q.fz(j,m,l) + s=1 + break + case 1:return P.e6(q,r) + case 2:return P.e5(o,r)}}) + return P.e7($async$fB,r)}, + n5:function(a,b){var s=0,r=P.ec(t.t),q,p,o + var $async$n5=P.ee(function(c,d){if(c===1)return P.e5(d,r) + while(true)switch(s){case 0:if(typeof a!="string")throw H.c(P.O("json: Argument must be a string.")) + p=Q.oE(b) + o=Q.oI(p) + q=Q.fz(p,o,K.ta(a,o)) + s=1 + break + case 1:return P.e6(q,r)}}) + return P.e7($async$n5,r)}, + oE:function(a){var s + if(a!=null)s=typeof a=="number"||H.e9(a)||typeof a=="string"||t.l.b(a) + else s=!1 + if(s)throw H.c(P.O("options: Value must be an object.")) + return t.bv.a(a)}, + fz:function(a,b,c){var s=0,r=P.ec(t.t),q,p,o,n,m + var $async$fz=P.ee(function(d,e){if(d===1)return P.e5(e,r) + while(true)switch(s){case 0:m=a==null + if(!m){p=J.b0(a) + o=Q.uM(p.gbd(a)) + if(p.gbE(a)!=null&&!t.b1.b(p.gbE(a)))throw H.c(P.O("options.externalResourceFunction: Value must be a function.")) + else n=p.gbE(a) + if(p.gc_(a)!=null&&!H.e9(p.gc_(a)))throw H.c(P.O("options.writeTimestamp: Value must be a boolean."))}else{o=null + n=null}s=(c==null?null:c.b)!=null?3:4 + break + case 3:s=5 + return P.cV(Q.uL(b,c,n).aJ(),$async$fz) + case 5:case 4:m=m?null:J.rw(a) + q=new A.kW(o,b,c,m==null?!0:m).bc() + s=1 + break + case 1:return P.e6(q,r)}}) + return P.e7($async$fz,r)}, + uM:function(a){var s,r,q + if(a!=null)if(typeof a=="string")try{r=P.ob(a) + return r}catch(q){r=H.E(q) + if(r instanceof P.aD){s=r + throw H.c(P.O("options.uri: "+H.b(s)+"."))}else throw q}else throw H.c(P.O("options.uri: Value must be a string.")) + return null}, + oI:function(a){var s,r,q,p,o,n,m,l,k + if(a!=null){s=J.b0(a) + if(s.gb9(a)!=null)r=!H.aJ(s.gb9(a))||s.gb9(a)<0 + else r=!1 + if(r)throw H.c(P.O("options.maxIssues: Value must be a non-negative integer.")) + if(s.gb6(a)!=null){if(!t.l.b(s.gb6(a)))throw H.c(P.O("options.ignoredIssues: Value must be an array.")) + q=H.a([],t.i) + for(p=0;p"));r.n();){m=r.d + l=s.gai(a)[m] + if(H.aJ(l)&&l>=0&&l<=3)n.m(0,m,C.cF[l]) + else throw H.c(P.O('options.severityOverrides["'+H.b(m)+'"]: Value must be one of [0, 1, 2, 3].'))}}else n=null + k=M.oe(q,s.gb9(a),n)}else k=null + return M.t3(k)}, + uL:function(a,b,c){var s=new Q.lU(c),r=new P.dD("options.externalResourceFunction is required to load this resource.") + return new N.jw(b.b,a,new Q.lS(a,b,c,s,r),new Q.lT(c,s,r))}, + bb:function bb(){}, + hx:function hx(){}, + cP:function cP(){}, + mo:function mo(){}, + mk:function mk(a){this.a=a}, + mj:function mj(a,b,c){this.a=a + this.b=b + this.c=c}, + mg:function mg(a){this.a=a}, + mh:function mh(a,b){this.a=a + this.b=b}, + ml:function ml(a){this.a=a}, + mi:function mi(a,b,c){this.a=a + this.b=b + this.c=c}, + me:function me(a){this.a=a}, + mf:function mf(a,b){this.a=a + this.b=b}, + mm:function mm(){}, + mn:function mn(){}, + lU:function lU(a){this.a=a}, + lV:function lV(a){this.a=a}, + lW:function lW(a){this.a=a}, + lS:function lS(a,b,c,d,e){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e}, + lT:function lT(a,b,c){this.a=a + this.b=b + this.c=c}, + eP:function eP(a){this.a=a}},V={ + rT:function(a,b){var s,r,q,p,o,n=null,m="byteStride" + F.A(a,C.c_,b) + s=F.W(a,"byteLength",b,-1,n,-1,1,!0) + r=F.W(a,m,b,-1,n,252,4,!1) + q=F.W(a,"target",b,-1,C.bP,-1,0,!1) + if(r!==-1){if(s!==-1&&r>s)b.k($.qB(),H.a([r,s],t.M),m) + if(r%4!==0)b.k($.qu(),H.a([r,4],t.M),m) + if(q===34963)b.p($.mv(),m)}p=F.P(a,"buffer",b,!0) + o=F.W(a,"byteOffset",b,0,n,-1,0,!1) + F.J(a,"name",b,n,n,n,!1) + return new V.bp(p,o,s,r,q,F.y(a,C.as,b,n),F.z(a,b),!1)}, + bp:function bp(a,b,c,d,e,f,g,h){var _=this + _.x=a + _.y=b + _.z=c + _.Q=d + _.ch=e + _.cy=_.cx=null + _.db=-1 + _.a=f + _.b=g + _.a$=h}, + nI:function(b9,c0){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0,b1,b2,b3,b4,b5="extensionsRequired",b6="extensionsUsed",b7=null,b8=new V.i0(c0) + b8.$0() + F.A(b9,C.cQ,c0) + if(b9.w(b5)&&!b9.w(b6))c0.k($.d1(),H.a(["extensionsUsed"],t.M),b5) + s=F.oX(b9,b6,c0) + if(s==null)s=H.a([],t.i) + r=F.oX(b9,b5,c0) + if(r==null)r=H.a([],t.i) + c0.e4(s,r) + q=new V.i1(b9,b8,c0) + p=new V.i2(b8,b9,c0).$1$3$req("asset",T.vj(),!0,t.gP) + if((p==null?b7:p.f)==null)return b7 + else if(p.gb8()!==2){o=$.r5() + n=p.gb8() + c0.k(o,H.a([n],t.M),"version") + return b7}else if(p.gbO()>0){o=$.r6() + n=p.gbO() + c0.k(o,H.a([n],t.M),"version")}m=q.$1$2("accessors",M.vg(),t.W) + l=q.$1$2("animations",Z.vi(),t.bj) + k=q.$1$2("buffers",Q.vo(),t.cT) + j=q.$1$2("bufferViews",V.vp(),t.u) + i=q.$1$2("cameras",G.vs(),t.h2) + h=q.$1$2("images",T.vG(),t.ec) + g=q.$1$2("materials",Y.vZ(),t.fC) + f=q.$1$2("meshes",S.w1(),t.eM) + o=t.L + e=q.$1$2("nodes",V.w2(),o) + d=q.$1$2("samplers",T.w3(),t.c2) + c=q.$1$2("scenes",B.w4(),t.J) + b8.$0() + b=F.P(b9,"scene",c0,!1) + a=c.j(0,b) + n=b!==-1&&a==null + if(n)c0.k($.N(),H.a([b],t.M),"scene") + a0=q.$1$2("skins",O.w5(),t.aV) + a1=q.$1$2("textures",U.w7(),t.ai) + b8.$0() + a2=F.y(b9,C.at,c0,b7) + b8.$0() + a3=new V.da(s,r,m,l,p,k,j,i,h,g,f,e,d,a,a0,a1,a2,F.z(b9,c0),!1) + a4=new V.hZ(c0,a3) + a4.$2(j,C.as) + a4.$2(m,C.L) + a4.$2(h,C.au) + a4.$2(a1,C.N) + a4.$2(g,C.h) + a4.$2(f,C.av) + a4.$2(e,C.M) + a4.$2(a0,C.az) + a4.$2(l,C.ar) + a4.$2(c,C.ay) + if(a2.a!==0){n=c0.c + n.push("extensions") + a2.J(0,new V.hX(c0,a3)) + n.pop()}n=c0.c + n.push("nodes") + e.a9(new V.hY(c0,P.aR(o))) + n.pop() + a5=[m,k,j,i,h,g,f,e,d,a0,a1] + for(a6=0;a6<11;++a6){a7=a5[a6] + if(a7.gi(a7)===0)continue + n.push(a7.c) + for(o=a7.b,a8=a7.a,a9=a8.length,b0=0;b0=a9 + b1=b1?b7:a8[b0] + if((b1==null?b7:b1.a$)===!1)c0.X($.fD(),b0)}n.pop()}o=c0.y + if(o.a!==0){for(a8=new H.au(o,H.r(o).h("au<1>")),a8=a8.gC(a8);a8.n();){a9=a8.d + if(a9.gi(a9)===0)continue + b2=o.j(0,a9) + C.d.si(n,0) + C.d.K(n,b2) + for(b1=a9.b,a9=a9.a,b3=a9.length,b0=0;b0=b3 + b4=b4?b7:a9[b0] + if((b4==null?b7:b4.ge7())===!1)c0.X($.fD(),b0)}}C.d.si(n,0)}return a3}, + da:function da(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var _=this + _.d=a + _.e=b + _.f=c + _.r=d + _.x=e + _.y=f + _.z=g + _.Q=h + _.ch=i + _.cx=j + _.cy=k + _.db=l + _.dx=m + _.dy=n + _.fx=o + _.fy=p + _.a=q + _.b=r + _.a$=s}, + i0:function i0(a){this.a=a}, + i1:function i1(a,b,c){this.a=a + this.b=b + this.c=c}, + i2:function i2(a,b,c){this.a=a + this.b=b + this.c=c}, + hZ:function hZ(a,b){this.a=a + this.b=b}, + i_:function i_(a,b){this.a=a + this.b=b}, + hX:function hX(a,b){this.a=a + this.b=b}, + hY:function hY(a,b){this.a=a + this.b=b}, + hV:function hV(){}, + hW:function hW(){}, + i3:function i3(a,b){this.a=a + this.b=b}, + i4:function i4(a,b){this.a=a + this.b=b}, + kQ:function kQ(){}, + o:function o(){}, + es:function es(){}, + fk:function fk(){}, + d2:function(a){return new V.u(a.ch,a.z,a.cx)}, + bU:function bU(a){this.a=a}, + bS:function bS(a){this.a=a}, + u:function u(a,b,c){this.a=a + this.b=b + this.c=c}, + tB:function(b4,b5){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0=null,b1="matrix",b2="translation",b3="rotation" + F.A(b4,C.bW,b5) + if(b4.w(b1)){s=F.aj(b4,b1,b5,b0,C.bI,1/0,-1/0,!1) + if(s!=null){r=new Float32Array(16) + q=new T.cD(r) + p=s[0] + o=s[1] + n=s[2] + m=s[3] + l=s[4] + k=s[5] + j=s[6] + i=s[7] + h=s[8] + g=s[9] + f=s[10] + e=s[11] + d=s[12] + c=s[13] + b=s[14] + r[15]=s[15] + r[14]=b + r[13]=c + r[12]=d + r[11]=e + r[10]=f + r[9]=g + r[8]=h + r[7]=i + r[6]=j + r[5]=k + r[4]=l + r[3]=m + r[2]=n + r[1]=o + r[0]=p}else q=b0}else q=b0 + if(b4.w(b2)){a=F.aj(b4,b2,b5,b0,C.m,1/0,-1/0,!1) + a0=a!=null?T.og(a):b0}else a0=b0 + if(b4.w(b3)){a1=F.aj(b4,b3,b5,b0,C.J,1,-1,!1) + if(a1!=null){r=a1[0] + p=a1[1] + o=a1[2] + n=a1[3] + m=new Float32Array(4) + a2=new T.eW(m) + m[0]=r + m[1]=p + m[2]=o + m[3]=n + r=Math.sqrt(a2.gaI()) + if(Math.abs(1-r)>0.00769)b5.p($.r2(),b3)}else a2=b0}else a2=b0 + if(b4.w("scale")){a3=F.aj(b4,"scale",b5,b0,C.m,1/0,-1/0,!1) + a4=a3!=null?T.og(a3):b0}else a4=b0 + a5=F.P(b4,"camera",b5,!1) + a6=F.mY(b4,"children",b5,!1) + a7=F.P(b4,"mesh",b5,!1) + a8=F.P(b4,"skin",b5,!1) + a9=F.aj(b4,"weights",b5,b0,b0,1/0,-1/0,!1) + if(a7===-1){if(a8!==-1)b5.k($.d1(),H.a(["mesh"],t.M),"skin") + if(a9!=null)b5.k($.d1(),H.a(["mesh"],t.M),"weights")}if(q!=null){if(a0!=null||a2!=null||a4!=null)b5.p($.qV(),b1) + if(q.cK())b5.p($.qT(),b1) + else if(!F.vM(q))b5.p($.qW(),b1)}F.J(b4,"name",b5,b0,b0,b0,!1) + return new V.ah(a5,a6,a8,q,a7,a0,a2,a4,a9,P.aR(t.J),F.y(b4,C.M,b5,b0),F.z(b4,b5),!1)}, + ah:function ah(a,b,c,d,e,f,g,h,i,j,k,l,m){var _=this + _.x=a + _.y=b + _.z=c + _.Q=d + _.ch=e + _.cx=f + _.cy=g + _.db=h + _.dx=i + _.dy=j + _.id=_.go=_.fy=_.fx=_.fr=null + _.k1=!1 + _.a=k + _.b=l + _.a$=m}, + jo:function jo(){}, + jp:function jp(){}, + jq:function jq(a,b){this.a=a + this.b=b}},G={ + rX:function(a,b){var s,r=null,q="orthographic",p="perspective" + F.A(a,C.cN,b) + s=a.w(q)&&a.w(p) + if(s)b.E($.nl(),C.al) + switch(F.J(a,"type",b,r,C.al,r,!0)){case"orthographic":F.V(a,q,b,G.vq(),!0) + break + case"perspective":F.V(a,p,b,G.vr(),!0) + break}F.J(a,"name",b,r,r,r,!1) + return new G.bq(F.y(a,C.dg,b,r),F.z(a,b),!1)}, + rV:function(a,b){var s,r,q,p + F.A(a,C.cP,b) + s=F.R(a,"xmag",b,0/0,1/0,-1/0,1/0,-1/0,!0) + r=F.R(a,"ymag",b,0/0,1/0,-1/0,1/0,-1/0,!0) + q=F.R(a,"zfar",b,0/0,1/0,0,1/0,-1/0,!0) + p=F.R(a,"znear",b,0/0,1/0,-1/0,1/0,0,!0) + if(!isNaN(q)&&!isNaN(p)&&q<=p)b.R($.nn()) + if(s===0||r===0)b.R($.qC()) + return new G.bV(F.y(a,C.de,b,null),F.z(a,b),!1)}, + rW:function(a,b){var s,r,q,p + F.A(a,C.c9,b) + s=F.R(a,"yfov",b,0/0,1/0,0,1/0,-1/0,!0) + r=!isNaN(s)&&s>=3.141592653589793 + if(r)b.R($.qD()) + q=F.R(a,"zfar",b,0/0,1/0,0,1/0,-1/0,!1) + p=F.R(a,"znear",b,0/0,1/0,0,1/0,-1/0,!0) + r=!isNaN(q)&&!isNaN(p)&&q<=p + if(r)b.R($.nn()) + F.R(a,"aspectRatio",b,0/0,1/0,0,1/0,-1/0,!1) + return new G.bW(F.y(a,C.df,b,null),F.z(a,b),!1)}, + bq:function bq(a,b,c){this.a=a + this.b=b + this.a$=c}, + bV:function bV(a,b,c){this.a=a + this.b=b + this.a$=c}, + bW:function bW(a,b,c){this.a=a + this.b=b + this.a$=c}},Y={ + tu:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h=null,g="alphaCutoff" + F.A(a,C.c2,b) + s=F.V(a,"pbrMetallicRoughness",b,Y.w0(),!1) + r=F.V(a,"normalTexture",b,Y.p3(),!1) + q=F.V(a,"occlusionTexture",b,Y.w_(),!1) + p=F.V(a,"emissiveTexture",b,Y.bi(),!1) + F.aj(a,"emissiveFactor",b,C.a8,C.m,1,0,!1) + o=F.J(a,"alphaMode",b,"OPAQUE",C.c1,h,!1) + F.R(a,g,b,0.5,1/0,-1/0,1/0,0,!1) + n=o!=="MASK"&&a.w(g) + if(n)b.p($.qI(),g) + F.oV(a,"doubleSided",b) + m=F.y(a,C.h,b,h) + F.J(a,"name",b,h,h,h,!1) + l=new Y.aS(s,r,q,p,P.a5(t.X,t.e),m,F.z(a,b),!1) + n=H.a([],t.M) + n.push(s) + n.push(r) + n.push(q) + n.push(p) + for(k=m.gab(),j=H.r(k),j=new H.a7(J.a_(k.a),k.b,j.h("@<1>").D(j.Q[1]).h("a7<1,2>"));j.n();){i=j.a + n.push(i)}b.aa(l,n) + return l}, + tE:function(a,b){var s,r,q,p,o,n,m,l + F.A(a,C.ce,b) + F.aj(a,"baseColorFactor",b,C.aa,C.J,1,0,!1) + s=F.V(a,"baseColorTexture",b,Y.bi(),!1) + F.R(a,"metallicFactor",b,1,1/0,-1/0,1,0,!1) + F.R(a,"roughnessFactor",b,1,1/0,-1/0,1,0,!1) + r=F.V(a,"metallicRoughnessTexture",b,Y.bi(),!1) + q=F.y(a,C.du,b,null) + p=new Y.ci(s,r,q,F.z(a,b),!1) + o=H.a([],t.M) + o.push(s) + o.push(r) + for(n=q.gab(),m=H.r(n),m=new H.a7(J.a_(n.a),n.b,m.h("@<1>").D(m.Q[1]).h("a7<1,2>"));m.n();){l=m.a + o.push(l)}b.aa(p,o) + return p}, + tD:function(a,b){var s,r,q,p + F.A(a,C.cq,b) + s=F.y(a,C.ax,b,C.h) + r=F.P(a,"index",b,!0) + q=F.W(a,"texCoord",b,0,null,-1,0,!1) + F.R(a,"strength",b,1,1/0,-1/0,1,0,!1) + p=new Y.ch(r,q,s,F.z(a,b),!1) + b.aa(p,s.gab()) + return p}, + tC:function(a,b){var s,r,q,p + F.A(a,C.cp,b) + s=F.y(a,C.aw,b,C.h) + r=F.P(a,"index",b,!0) + q=F.W(a,"texCoord",b,0,null,-1,0,!1) + F.R(a,"scale",b,1,1/0,-1/0,1/0,-1/0,!1) + p=new Y.cg(r,q,s,F.z(a,b),!1) + b.aa(p,s.gab()) + return p}, + tT:function(a,b){var s,r + F.A(a,C.co,b) + s=F.y(a,C.aA,b,C.h) + r=new Y.bB(F.P(a,"index",b,!0),F.W(a,"texCoord",b,0,null,-1,0,!1),s,F.z(a,b),!1) + b.aa(r,s.gab()) + return r}, + aS:function aS(a,b,c,d,e,f,g,h){var _=this + _.x=a + _.y=b + _.z=c + _.Q=d + _.dx=e + _.a=f + _.b=g + _.a$=h}, + jb:function jb(a,b){this.a=a + this.b=b}, + ci:function ci(a,b,c,d,e){var _=this + _.e=a + _.x=b + _.a=c + _.b=d + _.a$=e}, + ch:function ch(a,b,c,d,e){var _=this + _.d=a + _.e=b + _.f=null + _.a=c + _.b=d + _.a$=e}, + cg:function cg(a,b,c,d,e){var _=this + _.d=a + _.e=b + _.f=null + _.a=c + _.b=d + _.a$=e}, + bB:function bB(a,b,c,d,e){var _=this + _.d=a + _.e=b + _.f=null + _.a=c + _.b=d + _.a$=e}, + td:function(a){var s,r,q={} + q.a=q.b=null + s=new P.C($.x,t.dD) + r=new P.ax(s,t.eP) + q.c=!1 + q.a=a.bM(new Y.i7(q,r),new Y.i8(q),new Y.i9(q,r)) + return s}, + tc:function(a){var s=new Y.i6() + if(s.$2(a,C.bK))return C.aB + if(s.$2(a,C.bN))return C.aC + if(s.$2(a,C.bT))return C.aD + return null}, + dK:function dK(a){this.b=a}, + dy:function dy(a,b){this.a=a + this.b=b}, + cL:function cL(a,b){this.a=a + this.b=b}, + c2:function c2(a,b){this.a=a + this.b=b}, + c3:function c3(a,b,c,d,e,f,g,h,i){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e + _.f=f + _.r=g + _.x=h + _.y=i}, + i7:function i7(a,b){this.a=a + this.b=b}, + i9:function i9(a,b){this.a=a + this.b=b}, + i8:function i8(a){this.a=a}, + i6:function i6(){}, + i5:function i5(){}, + ij:function ij(a,b){var _=this + _.f=_.e=_.d=_.c=0 + _.r=null + _.a=a + _.b=b}, + il:function il(){}, + ik:function ik(){}, + jr:function jr(a,b,c,d,e,f){var _=this + _.y=_.x=_.r=_.f=_.e=_.d=_.c=0 + _.Q=_.z=!1 + _.ch=a + _.cx=b + _.cy=!1 + _.db=c + _.dx=d + _.a=e + _.b=f}, + js:function js(a){this.a=a}, + kZ:function kZ(a,b,c){var _=this + _.c=a + _.d=0 + _.a=b + _.b=c}, + dw:function dw(){}, + dv:function dv(){}, + aP:function aP(a){this.a=a}},S={ + tx:function(a,b){var s,r,q,p,o,n,m,l,k,j,i=null,h="primitives" + F.A(a,C.cE,b) + s=F.aj(a,"weights",b,i,i,1/0,-1/0,!1) + r=F.m6(a,h,b) + if(r!=null){q=r.gi(r) + p=new Array(q) + p.fixed$length=Array + p=H.a(p,t.bZ) + o=new F.L(p,q,h,t.b_) + q=b.c + q.push(h) + for(n=i,m=-1,l=0;l").D(l.Q[1]).h("a7<1,2>"));l.n();){k=l.a + n.push(k)}b.aa(o,n) + return o}, + c8:function c8(a,b,c,d,e,f){var _=this + _.e=a + _.r=b + _.x=c + _.a=d + _.b=e + _.a$=f}, + tq:function(a,b){var s,r,q,p,o,n,m + b.toString + F.A(a,C.bS,b) + F.R(a,"transmissionFactor",b,0,1/0,-1/0,1,0,!1) + s=F.V(a,"transmissionTexture",b,Y.bi(),!1) + r=F.y(a,C.dq,b,null) + q=new B.cb(s,r,F.z(a,b),!1) + p=H.a([],t.M) + p.push(s) + for(o=r.gab(),n=H.r(o),n=new H.a7(J.a_(o.a),o.b,n.h("@<1>").D(n.Q[1]).h("a7<1,2>"));n.n();){m=n.a + p.push(m)}b.aa(q,p) + return q}, + cb:function cb(a,b,c,d){var _=this + _.e=a + _.a=b + _.b=c + _.a$=d}},O={ + tQ:function(a,b){var s,r,q,p=null + F.A(a,C.c4,b) + s=F.P(a,"inverseBindMatrices",b,!1) + r=F.P(a,"skeleton",b,!1) + q=F.mY(a,"joints",b,!0) + F.J(a,"name",b,p,p,p,!1) + return new O.by(s,r,q,P.aR(t.L),F.y(a,C.az,b,p),F.z(a,b),!1)}, + by:function by(a,b,c,d,e,f,g){var _=this + _.x=a + _.y=b + _.z=c + _.cx=_.ch=_.Q=null + _.cy=d + _.a=e + _.b=f + _.a$=g}, + kB:function kB(a){this.a=a}, + eu:function eu(a){this.a=a}, + lX:function(a){if(a==null)return null + if(a.ch==null||a.z===-1||a.Q===-1)return null + if(a.fr==null&&a.dx==null)return null + return a}, + wb:function(a1,a2){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0 + a1.f.a9(new O.mq(a2)) + O.v2(a2) + s=H.a([],t.B) + r=H.a([],t.bd) + q=a2.c + C.d.si(q,0) + q.push("meshes") + for(p=a1.cy,o=p.b,n=a1.db,m=n.$ti.h("a6"),l=a1.fx,p=p.a,k=p.length,j=0;j=k + g=h?null:p[j] + if((g==null?null:g.x)==null)continue + h=g.x + if(h.b4(h,new O.mr()))continue + i.a=i.b=-1 + for(f=new H.a6(n,n.gi(n),m);f.n();){e=f.d + if(e.fy==g){d=e.id + d=(d==null?null:d.ch)!=null}else d=!1 + if(d){d=e.id + c=d.ch.length + b=i.b + if(b===-1||c")),m=J.M(n),l=0,k=0,j=!1;q.n();j=!0){i=q.gq() + for(h=0;h").D(m.Q[1]).h("a7<1,2>"));m.n();){l=m.a + o.push(l)}b.aa(p,o) + return p}, + ca:function ca(a,b,c,d,e){var _=this + _.e=a + _.r=b + _.a=c + _.b=d + _.a$=e}, + uO:function(a){var s="POSITION",r=a.k2 + r.j(0,s).K(0,C.cL) + r.j(0,"NORMAL").K(0,C.K) + r.j(0,"TANGENT").K(0,C.cR) + r.j(0,"TEXCOORD").K(0,C.bQ) + r=a.k3 + r.j(0,s).K(0,C.c5) + r.j(0,"NORMAL").K(0,C.K) + r.j(0,"TANGENT").K(0,C.K)}},N={cR:function cR(a,b){this.a=a + this.b=b},eX:function eX(a){var _=this + _.a=a + _.f=_.e=_.d=_.c=_.b=null},jw:function jw(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d},jx:function jx(a,b,c){this.a=a + this.b=b + this.c=c},jy:function jy(a,b){this.a=a + this.b=b}},E={ + D:function(a,b,c){return new E.fZ(c,a,b)}, + ai:function(a,b,c){return new E.jA(c,a,b)}, + q:function(a,b,c){return new E.jR(c,a,b)}, + v:function(a,b,c){return new E.ir(c,a,b)}, + ar:function(a,b,c){return new E.hy(c,a,b)}, + v3:function(a){return"'"+H.b(a)+"'"}, + uZ:function(a){return typeof a=="string"?"'"+a+"'":J.ag(a)}, + bx:function bx(a,b){this.a=a + this.b=b}, + ic:function ic(){}, + fZ:function fZ(a,b,c){this.a=a + this.b=b + this.c=c}, + h8:function h8(){}, + h6:function h6(){}, + h5:function h5(){}, + hd:function hd(){}, + ha:function ha(){}, + hb:function hb(){}, + h9:function h9(){}, + hm:function hm(){}, + ho:function ho(){}, + hf:function hf(){}, + hl:function hl(){}, + he:function he(){}, + hk:function hk(){}, + hi:function hi(){}, + hj:function hj(){}, + hh:function hh(){}, + hg:function hg(){}, + hr:function hr(){}, + hq:function hq(){}, + hp:function hp(){}, + hv:function hv(){}, + hu:function hu(){}, + h2:function h2(){}, + h3:function h3(){}, + h4:function h4(){}, + ht:function ht(){}, + hs:function hs(){}, + h7:function h7(){}, + hn:function hn(){}, + hc:function hc(){}, + h1:function h1(){}, + h_:function h_(){}, + h0:function h0(){}, + ia:function ia(a,b,c){this.a=a + this.b=b + this.c=c}, + ib:function ib(){}, + jA:function jA(a,b,c){this.a=a + this.b=b + this.c=c}, + jK:function jK(){}, + jL:function jL(){}, + jQ:function jQ(){}, + jO:function jO(){}, + jI:function jI(){}, + jE:function jE(){}, + jM:function jM(){}, + jF:function jF(){}, + jP:function jP(){}, + jB:function jB(){}, + jJ:function jJ(){}, + jD:function jD(){}, + jG:function jG(){}, + jC:function jC(){}, + jN:function jN(){}, + jH:function jH(){}, + jR:function jR(a,b,c){this.a=a + this.b=b + this.c=c}, + kp:function kp(){}, + ko:function ko(){}, + ke:function ke(){}, + kc:function kc(){}, + kd:function kd(){}, + kb:function kb(){}, + k9:function k9(){}, + ka:function ka(){}, + kk:function kk(){}, + kl:function kl(){}, + k8:function k8(){}, + k7:function k7(){}, + k6:function k6(){}, + k5:function k5(){}, + k3:function k3(){}, + k2:function k2(){}, + k0:function k0(){}, + jV:function jV(){}, + kz:function kz(){}, + ky:function ky(){}, + k_:function k_(){}, + jX:function jX(){}, + jZ:function jZ(){}, + jW:function jW(){}, + jY:function jY(){}, + kx:function kx(){}, + kv:function kv(){}, + kq:function kq(){}, + kf:function kf(){}, + kw:function kw(){}, + kr:function kr(){}, + ks:function ks(){}, + kt:function kt(){}, + ku:function ku(){}, + kj:function kj(){}, + ki:function ki(){}, + kh:function kh(){}, + kg:function kg(){}, + kn:function kn(){}, + km:function km(){}, + k1:function k1(){}, + jT:function jT(){}, + jS:function jS(){}, + k4:function k4(){}, + jU:function jU(){}, + ir:function ir(a,b,c){this.a=a + this.b=b + this.c=c}, + j0:function j0(){}, + j5:function j5(){}, + iQ:function iQ(){}, + iC:function iC(){}, + j6:function j6(){}, + iy:function iy(){}, + ix:function ix(){}, + iA:function iA(){}, + iB:function iB(){}, + iw:function iw(){}, + iz:function iz(){}, + iv:function iv(){}, + iF:function iF(){}, + iD:function iD(){}, + j4:function j4(){}, + iE:function iE(){}, + iX:function iX(){}, + iI:function iI(){}, + iJ:function iJ(){}, + iG:function iG(){}, + iH:function iH(){}, + iP:function iP(){}, + iO:function iO(){}, + iN:function iN(){}, + iM:function iM(){}, + iR:function iR(){}, + iL:function iL(){}, + iK:function iK(){}, + j3:function j3(){}, + iS:function iS(){}, + iV:function iV(){}, + iU:function iU(){}, + iT:function iT(){}, + iW:function iW(){}, + iY:function iY(){}, + iZ:function iZ(){}, + iu:function iu(){}, + it:function it(){}, + is:function is(){}, + j_:function j_(){}, + j1:function j1(){}, + j2:function j2(){}, + hy:function hy(a,b,c){this.a=a + this.b=b + this.c=c}, + hE:function hE(){}, + hD:function hD(){}, + hC:function hC(){}, + hM:function hM(){}, + hA:function hA(){}, + hL:function hL(){}, + hH:function hH(){}, + hI:function hI(){}, + hB:function hB(){}, + hz:function hz(){}, + hF:function hF(){}, + hK:function hK(){}, + hJ:function hJ(){}, + hG:function hG(){}, + cA:function cA(a,b,c,d,e){var _=this + _.a=a + _.b=b + _.c=c + _.d=d + _.e=e}},D={ + uN:function(a){a.k1.push("image/webp")}, + t8:function(a,b){b.toString + F.A(a,C.cK,b) + return new D.c0(F.P(a,"source",b,!1),F.y(a,C.di,b,null),F.z(a,b),!1)}, + c0:function c0(a,b,c,d){var _=this + _.d=a + _.e=null + _.a=b + _.b=c + _.a$=d}, + T:function T(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + a4:function a4(a,b){this.a=a + this.b=b}, + c1:function c1(a,b){this.a=a + this.b=b}, + ce:function ce(a,b){this.a=a + this.b=b}, + eY:function eY(a,b){this.a=a + this.b=b}},X={ + tk:function(a,b){var s,r,q,p,o,n,m,l,k,j,i=null,h="lights",g="spot" + b.toString + F.A(a,C.cx,b) + s=F.m6(a,h,b) + r=t.dB + q=t.du + if(s!=null){p=s.gi(s) + o=new Array(p) + o.fixed$length=Array + r=H.a(o,r) + n=new F.L(r,p,h,q) + q=b.c + q.push(h) + for(m=0;m").D(m.Q[1]).h("a7<1,2>"));m.n();){l=m.a + o.push(l)}b.aa(p,o) + return p}, + c9:function c9(a,b,c,d,e){var _=this + _.e=a + _.x=b + _.a=c + _.b=d + _.a$=e}, + d9:function d9(a,b,c){var _=this + _.a=a + _.b=null + _.c=b + _.d=null + _.e=c + _.f=null + _.cx=_.ch=_.Q=_.z=_.y=_.x=_.r=0 + _.cy=!1 + _.dy=_.dx=_.db=null + _.fr=!1 + _.fx=null}, + hP:function hP(a){this.a=a}, + hN:function hN(a){this.a=a}, + hO:function hO(a){this.a=a}, + kW:function kW(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + kY:function kY(){}, + kX:function kX(){}, + n0:function(a){var s=C.d2.e1(a,0,new A.m7()),r=536870911&s+((67108863&s)<<3) + r^=r>>>11 + return 536870911&r+((16383&r)<<15)}, + m7:function m7(){}, + fy:function(a,b){var s=536870911&a+b + s=536870911&s+((524287&s)<<10) + return s^s>>>6}, + oG:function(a){var s=536870911&a+((67108863&a)<<3) + s^=s>>>11 + return 536870911&s+((16383&s)<<15)}},L={ + ts:function(a,b){b.toString + F.A(a,C.cD,b) + F.aj(a,"offset",b,C.bH,C.ab,1/0,-1/0,!1) + F.R(a,"rotation",b,0,1/0,-1/0,1/0,-1/0,!1) + F.aj(a,"scale",b,C.bJ,C.ab,1/0,-1/0,!1) + return new L.cd(F.W(a,"texCoord",b,-1,null,-1,0,!1),F.y(a,C.ds,b,null),F.z(a,b),!1)}, + cd:function cd(a,b,c,d){var _=this + _.r=a + _.a=b + _.b=c + _.a$=d}},K={ + tb:function(a,b){var s,r={},q=new P.C($.x,t.eD) + r.a=!1 + r.b=null + s=P.o6(new K.hR(r),new K.hS(r),new K.hT(r),t.w) + r.b=a.e8(new K.hU(r,s,new P.ax(q,t.a_),b),s.gdS()) + return q}, + t9:function(a,b){var s=new K.cy(a,new P.ax(new P.C($.x,t.f),t.G)) + s.e=b + return s}, + ta:function(a,b){var s,r,q,p,o=null,n=null + try{n=C.a1.dV(a)}catch(q){p=H.E(q) + if(p instanceof P.aD){s=p + b.av($.fF(),H.a([s],t.M),!0) + return o}else throw q}if(t.t.b(n))try{r=V.nI(n,b) + return new K.as("model/gltf+json",r,o)}catch(q){if(H.E(q) instanceof M.c4)return o + else throw q}else{b.av($.Z(),H.a([n,"object"],t.M),!0) + return o}}, + as:function as(a,b,c){this.a=a + this.b=b + this.c=c}, + hS:function hS(a){this.a=a}, + hT:function hT(a){this.a=a}, + hR:function hR(a){this.a=a}, + hU:function hU(a,b,c,d){var _=this + _.a=a + _.b=b + _.c=c + _.d=d}, + cy:function cy(a,b){var _=this + _.a=a + _.b=null + _.c=b + _.e=_.d=null + _.f=!0}, + hQ:function hQ(a){this.a=a}, + db:function db(){}},F={ + ay:function(a,b,c,d){var s=a.j(0,b) + if(s==null&&a.w(b))d.k($.Z(),H.a([null,c],t.M),b) + return s}, + P:function(a,b,c,d){var s=F.ay(a,b,"integer",c) + if(H.aJ(s)){if(s>=0)return s + c.p($.fE(),b)}else if(s==null){if(d)c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([s,"integer"],t.M),b) + return-1}, + oV:function(a,b,c){var s=F.ay(a,b,"boolean",c) + if(s==null)return!1 + if(H.e9(s))return s + c.k($.Z(),H.a([s,"boolean"],t.M),b) + return!1}, + W:function(a,b,c,d,e,f,g,h){var s,r=F.ay(a,b,"integer",c) + if(H.aJ(r)){if(e!=null){if(!F.mW(b,r,e,c,!1))return-1}else{if(!(rf + else s=!0 + if(s){c.k($.mu(),H.a([r],t.M),b) + return-1}}return r}else if(r==null){if(!h)return d + c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([r,"integer"],t.M),b) + return-1}, + R:function(a,b,c,d,e,f,g,h,i){var s=F.ay(a,b,"number",c) + if(typeof s=="number"){if(sg||s>=e){c.k($.mu(),H.a([s],t.M),b) + return 0/0}return s}else if(s==null){if(!i)return d + c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([s,"number"],t.M),b) + return 0/0}, + J:function(a,b,c,d,e,f,g){var s,r=F.ay(a,b,"string",c) + if(typeof r=="string"){if(e!=null)F.mW(b,r,e,c,!1) + else{if(f==null)s=null + else{s=f.b + s=s.test(r)}if(s===!1){c.k($.qs(),H.a([r,f.a],t.M),b) + return null}}return r}else if(r==null){if(!g)return d + c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([r,"string"],t.M),b) + return null}, + p_:function(a,b){var s,r,q,p + try{s=P.ob(a) + q=s + if(q.gcI()||q.gbG()||q.gcH()||q.gbI()||q.gbH())b.k($.r0(),H.a([a],t.M),"uri") + return s}catch(p){q=H.E(p) + if(q instanceof P.aD){r=q + b.k($.qr(),H.a([a,r],t.M),"uri") + return null}else throw p}}, + n_:function(a,b,c,d){var s=F.ay(a,b,"object",c) + if(t.t.b(s))return s + else if(s==null){if(d){c.E($.bk(),H.a([b],t.M)) + return null}}else{c.k($.Z(),H.a([s,"object"],t.M),b) + if(d)return null}return P.a5(t.X,t._)}, + V:function(a,b,c,d,e){var s,r,q=F.ay(a,b,"object",c) + if(t.t.b(q)){s=c.c + s.push(b) + r=d.$2(q,c) + s.pop() + return r}else if(q==null){if(e)c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([q,"object"],t.M),b) + return null}, + mY:function(a,b,c,d){var s,r,q,p,o,n,m=F.ay(a,b,"array",c) + if(t.o.b(m)){s=J.M(m) + if(s.gu(m)){c.p($.bO(),b) + return null}r=c.c + r.push(b) + q=t.e + p=P.aR(q) + for(o=0;o=0){if(!p.B(0,n))c.X($.nj(),o)}else{s.m(m,o,-1) + c.X($.fE(),o)}}r.pop() + return s.ae(m,q)}else if(m==null){if(d)c.E($.bk(),H.a([b],t.M))}else c.k($.Z(),H.a([m,"array"],t.M),b) + return null}, + vB:function(a,b,c,d){var s,r=F.ay(a,b,"object",c) + if(t.t.b(r)){if(r.gu(r)){c.p($.bO(),b) + return null}s=c.c + s.push(b) + r.J(0,new F.m3(d,r,c)) + s.pop() + return r.af(0,t.X,t.e)}else{s=t.M + if(r==null)c.E($.bk(),H.a([b],s)) + else c.k($.Z(),H.a([r,"object"],s),b)}return null}, + vC:function(a,b,c,d){var s,r,q,p,o,n,m,l=F.ay(a,b,"array",c) + if(t.o.b(l)){s=J.M(l) + if(s.gu(l)){c.p($.bO(),b) + return null}else{r=c.c + r.push(b) + for(q=t.M,p=t.t,o=!1,n=0;n*>") + return P.dh(new H.a8(s,new F.m5(),r),!1,r.h("af.E"))}else if(l!=null)c.k($.Z(),H.a([l,"array"],t.M),b) + return null}, + aj:function(a,b,c,d,e,f,g,h){var s,r,q,p,o,n,m,l=null,k=F.ay(a,b,"array",c) + if(t.o.b(k)){s=J.M(k) + if(s.gu(k)){c.p($.bO(),b) + return l}if(e!=null&&!F.mW(b,s.gi(k),e,c,!0))return l + r=new Array(s.gi(k)) + r.fixed$length=Array + q=H.a(r,t.m) + for(r=t.M,p=!1,o=0;of + if(m){c.k($.mu(),H.a([n],r),b) + p=!0}if(h){m=$.nr() + m[0]=n + q[o]=m[0]}else q[o]=n}else{c.k($.eg(),H.a([n,"number"],r),b) + p=!0}}if(p)return l + return q}else if(k==null){if(d==null)s=l + else s=J.eA(d.slice(0),H.U(d).c) + return s}else c.k($.Z(),H.a([k,"array"],t.M),b) + return l}, + oW:function(a,b,c,d,e){var s,r,q,p,o,n,m,l,k,j=F.ay(a,b,"array",c) + if(t.o.b(j)){s=J.M(j) + if(s.gi(j)!==e){c.k($.nk(),H.a([s.gi(j),H.a([e],t.V)],t.M),b) + return null}r=Z.wa(d) + q=Z.pb(d) + p=F.vv(d,e) + for(o=t.M,n=!1,m=0;mq + if(k){c.k($.qG(),H.a([l,C.ao.j(0,d)],o),b) + n=!0}p[m]=J.rH(l)}else{c.k($.eg(),H.a([l,"integer"],o),b) + n=!0}}if(n)return null + return p}else if(j!=null)c.k($.Z(),H.a([j,"array"],t.M),b) + return null}, + oX:function(a,b,c){var s,r,q,p,o,n,m,l,k=F.ay(a,b,"array",c) + if(t.o.b(k)){s=J.M(k) + if(s.gu(k)){c.p($.bO(),b) + return null}r=c.c + r.push(b) + q=t.X + p=P.aR(q) + for(o=t.M,n=!1,m=0;m1&&i.b)c.p($.qS(),l) + if(k!=null){s.push(l) + h=i.a.$2(k,c) + f.m(0,l,h) + if(p.b(h)){l=o?b:d + l=n.bS(l,new F.m2()) + j=H.a(s.slice(0),H.U(s).h("p<1>")) + j.fixed$length=Array + J.mx(l,new D.ce(h,j))}if(q.b(h)){l=H.a(s.slice(0),H.U(s).h("p<1>")) + l.fixed$length=Array + m.push(new D.eY(h,l))}s.pop()}}s.pop() + return f}, + z:function(a,b){var s=a.j(0,"extras"),r=s!=null&&!t.h.b(s) + if(r)b.p($.r_(),"extras") + return s}, + mW:function(a,b,c,d,e){var s + if(!J.nu(c,b)){s=e?$.nk():$.nm() + d.k(s,H.a([b,c],t.M),a) + return!1}return!0}, + A:function(a,b,c){var s,r,q + for(s=a.gL(),s=s.gC(s);s.n();){r=s.gq() + if(!C.d.F(b,r)){q=C.d.F(C.cl,r) + q=!q}else q=!1 + if(q)c.p($.qt(),r)}}, + n4:function(a,b,c,d,e,f){var s,r,q,p,o,n,m=e.c + m.push(d) + for(s=t.M,r=c.a,q=r.length,p=0;p=q?null:r[o] + if(n!=null){n.a$=!0 + b[p]=n + f.$3(n,o,p)}else e.aE($.N(),H.a([o],s),p)}m.pop()}, + vM:function(b6){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,b0,b1,b2,b3,b4,b5=b6.a + if(b5[3]!==0||b5[7]!==0||b5[11]!==0||b5[15]!==1)return!1 + if(b6.cE()===0)return!1 + s=$.rq() + r=$.rn() + q=$.ro() + p=new T.cJ(new Float32Array(3)) + p.bi(b5[0],b5[1],b5[2]) + o=Math.sqrt(p.gaI()) + p.bi(b5[4],b5[5],b5[6]) + n=Math.sqrt(p.gaI()) + p.bi(b5[8],b5[9],b5[10]) + m=Math.sqrt(p.gaI()) + if(b6.cE()<0)o=-o + s=s.a + s[0]=b5[12] + s[1]=b5[13] + s[2]=b5[14] + l=1/o + k=1/n + j=1/m + b5=new Float32Array(16) + new T.cD(b5).d_(b6) + b5[0]=b5[0]*l + b5[1]=b5[1]*l + b5[2]=b5[2]*l + b5[4]=b5[4]*k + b5[5]=b5[5]*k + b5[6]=b5[6]*k + b5[8]=b5[8]*j + b5[9]=b5[9]*j + b5[10]=b5[10]*j + i=new Float32Array(9) + i[0]=b5[0] + i[1]=b5[1] + i[2]=b5[2] + i[3]=b5[4] + i[4]=b5[5] + i[5]=b5[6] + i[6]=b5[8] + i[7]=b5[9] + i[8]=b5[10] + r.toString + b5=i[0] + h=i[4] + g=i[8] + f=0+b5+h+g + if(f>0){e=Math.sqrt(f+1) + b5=r.a + b5[3]=e*0.5 + e=0.5/e + b5[0]=(i[5]-i[7])*e + b5[1]=(i[6]-i[2])*e + b5[2]=(i[1]-i[3])*e}else{if(b5").D(b).h("b3<1,2>"))}, + B:function(a,b){if(!!a.fixed$length)H.a2(P.ab("add")) + a.push(b)}, + dI:function(a,b,c){var s,r,q,p=[],o=a.length + for(s=0;s").D(c).h("a8<1,2>"))}, + cL:function(a,b){var s,r=P.bt(a.length,"",!1,t.S) + for(s=0;sa.length)throw H.c(P.S(b,0,a.length,"start",null)) + if(ca.length)throw H.c(P.S(c,b,a.length,"end",null)) + if(b===c)return H.a([],H.U(a)) + return H.a(a.slice(b,c),H.U(a))}, + aM:function(a,b,c){P.aV(b,c,a.length) + return H.du(a,b,c,H.U(a).c)}, + gaH:function(a){var s=a.length + if(s>0)return a[s-1] + throw H.c(H.mB())}, + F:function(a,b){var s + for(s=0;s"))}, + gG:function(a){return H.cj(a)}, + gi:function(a){return a.length}, + si:function(a,b){if(!!a.fixed$length)H.a2(P.ab("set length")) + if(b<0)throw H.c(P.S(b,0,null,"newLength",null)) + a.length=b}, + j:function(a,b){if(b>=a.length||b<0)throw H.c(H.ef(a,b)) + return a[b]}, + m:function(a,b,c){if(!!a.immutable$list)H.a2(P.ab("indexed set")) + if(b>=a.length||b<0)throw H.c(H.ef(a,b)) + a[b]=c}, + $in:1, + $ii:1, + $il:1} + J.ii.prototype={} + J.aC.prototype={ + gq:function(){return this.d}, + n:function(){var s,r=this,q=r.a,p=q.length + if(r.b!==p)throw H.c(H.cs(q)) + s=r.c + if(s>=p){r.d=null + return!1}r.d=q[s] + r.c=s+1 + return!0}, + $iH:1} + J.c5.prototype={ + cW:function(a){var s + if(a>=-2147483648&&a<=2147483647)return a|0 + if(isFinite(a)){s=a<0?Math.ceil(a):Math.floor(a) + return s+0}throw H.c(P.ab(""+a+".toInt()"))}, + ap:function(a,b){var s,r,q,p + if(b<2||b>36)throw H.c(P.S(b,2,36,"radix",null)) + s=a.toString(b) + if(C.a.A(s,s.length-1)!==41)return s + r=/^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(s) + if(r==null)H.a2(P.ab("Unexpected toString result: "+s)) + s=r[1] + q=+r[3] + p=r[2] + if(p!=null){s+=p + q-=p.length}return s+C.a.bh("0",q)}, + l:function(a){if(a===0&&1/a<0)return"-0.0" + else return""+a}, + gG:function(a){var s,r,q,p,o=a|0 + if(a===o)return 536870911&o + s=Math.abs(a) + r=Math.log(s)/0.6931471805599453|0 + q=Math.pow(2,r) + p=s<1?s/q:q/s + return 536870911&((p*9007199254740992|0)+(p*3542243181176521|0))*599197+r*1259}, + bg:function(a,b){var s=a%b + if(s===0)return 0 + if(s>0)return s + if(b<0)return s-b + else return s+b}, + aq:function(a,b){if((a|0)===a)if(b>=1||b<-1)return a/b|0 + return this.cs(a,b)}, + bA:function(a,b){return(a|0)===a?a/b|0:this.cs(a,b)}, + cs:function(a,b){var s=a/b + if(s>=-2147483648&&s<=2147483647)return s|0 + if(s>0){if(s!==1/0)return Math.floor(s)}else if(s>-1/0)return Math.ceil(s) + throw H.c(P.ab("Result of truncating division is "+H.b(s)+": "+H.b(a)+" ~/ "+b))}, + aA:function(a,b){if(b<0)throw H.c(H.bM(b)) + return b>31?0:a<>>0}, + ad:function(a,b){var s + if(a>0)s=this.cr(a,b) + else{s=b>31?31:b + s=a>>s>>>0}return s}, + dL:function(a,b){if(b<0)throw H.c(H.bM(b)) + return this.cr(a,b)}, + cr:function(a,b){return b>31?0:a>>>b}, + $iw:1, + $iG:1} + J.de.prototype={$id:1} + J.eB.prototype={} + J.br.prototype={ + A:function(a,b){if(b<0)throw H.c(H.ef(a,b)) + if(b>=a.length)H.a2(H.ef(a,b)) + return a.charCodeAt(b)}, + H:function(a,b){if(b>=a.length)throw H.c(H.ef(a,b)) + return a.charCodeAt(b)}, + ah:function(a,b){if(typeof b!="string")throw H.c(P.nz(b,null,null)) + return a+b}, + az:function(a,b,c,d){var s=P.aV(b,c,a.length),r=a.substring(0,b),q=a.substring(s) + return r+d+q}, + U:function(a,b,c){var s + if(c<0||c>a.length)throw H.c(P.S(c,0,a.length,null,null)) + s=c+b.length + if(s>a.length)return!1 + return b===a.substring(c,s)}, + V:function(a,b){return this.U(a,b,0)}, + t:function(a,b,c){if(c==null)c=a.length + if(b<0)throw H.c(P.jv(b,null)) + if(b>c)throw H.c(P.jv(b,null)) + if(c>a.length)throw H.c(P.jv(c,null)) + return a.substring(b,c)}, + bj:function(a,b){return this.t(a,b,null)}, + ev:function(a){var s,r,q + if(typeof a.trimRight!="undefined"){s=a.trimRight() + r=s.length + if(r===0)return s + q=r-1 + if(this.A(s,q)===133)r=J.nK(s,q)}else{r=J.nK(a,a.length) + s=a}if(r===s.length)return s + if(r===0)return"" + return s.substring(0,r)}, + bh:function(a,b){var s,r + if(0>=b)return"" + if(b===1||a.length===0)return a + if(b!==b>>>0)throw H.c(C.be) + for(s=a,r="";!0;){if((b&1)===1)r=s+r + b=b>>>1 + if(b===0)break + s+=s}return r}, + am:function(a,b,c){var s=b-a.length + if(s<=0)return a + return this.bh(c,s)+a}, + b7:function(a,b,c){var s + if(c<0||c>a.length)throw H.c(P.S(c,0,a.length,null,null)) + s=a.indexOf(b,c) + return s}, + bK:function(a,b){return this.b7(a,b,0)}, + l:function(a){return a}, + gG:function(a){var s,r,q + for(s=a.length,r=0,q=0;q>6}r=536870911&r+((67108863&r)<<3) + r^=r>>11 + return 536870911&r+((16383&r)<<15)}, + gi:function(a){return a.length}, + $if:1} + H.bE.prototype={ + gC:function(a){var s=H.r(this) + return new H.d3(J.a_(this.ga5()),s.h("@<1>").D(s.Q[1]).h("d3<1,2>"))}, + gi:function(a){return J.X(this.ga5())}, + gu:function(a){return J.nv(this.ga5())}, + ga3:function(a){return J.ru(this.ga5())}, + a1:function(a,b){var s=H.r(this) + return H.fP(J.nw(this.ga5(),b),s.c,s.Q[1])}, + S:function(a,b){return H.r(this).Q[1].a(J.eh(this.ga5(),b))}, + F:function(a,b){return J.nu(this.ga5(),b)}, + l:function(a){return J.ag(this.ga5())}} + H.d3.prototype={ + n:function(){return this.a.n()}, + gq:function(){return this.$ti.Q[1].a(this.a.gq())}, + $iH:1} + H.bX.prototype={ + ga5:function(){return this.a}} + H.dC.prototype={$in:1} + H.dx.prototype={ + j:function(a,b){return this.$ti.Q[1].a(J.nt(this.a,b))}, + m:function(a,b,c){J.rr(this.a,b,this.$ti.c.a(c))}, + si:function(a,b){J.rz(this.a,b)}, + B:function(a,b){J.mx(this.a,this.$ti.c.a(b))}, + aM:function(a,b,c){var s=this.$ti + return H.fP(J.rx(this.a,b,c),s.c,s.Q[1])}, + $in:1, + $il:1} + H.b3.prototype={ + ae:function(a,b){return new H.b3(this.a,this.$ti.h("@<1>").D(b).h("b3<1,2>"))}, + ga5:function(){return this.a}} + H.bY.prototype={ + af:function(a,b,c){var s=this.$ti + return new H.bY(this.a,s.h("@<1>").D(s.Q[1]).D(b).D(c).h("bY<1,2,3,4>"))}, + w:function(a){return this.a.w(a)}, + j:function(a,b){return this.$ti.h("4?").a(this.a.j(0,b))}, + m:function(a,b,c){var s=this.$ti + this.a.m(0,s.c.a(b),s.Q[1].a(c))}, + J:function(a,b){this.a.J(0,new H.fQ(this,b))}, + gL:function(){var s=this.$ti + return H.fP(this.a.gL(),s.c,s.Q[2])}, + gi:function(a){var s=this.a + return s.gi(s)}, + gu:function(a){var s=this.a + return s.gu(s)}} + H.fQ.prototype={ + $2:function(a,b){var s=this.a.$ti + this.b.$2(s.Q[2].a(a),s.Q[3].a(b))}, + $S:function(){return this.a.$ti.h("k(1,2)")}} + H.eD.prototype={ + l:function(a){var s="LateInitializationError: "+this.a + return s}} + H.cu.prototype={ + gi:function(a){return this.a.length}, + j:function(a,b){return C.a.A(this.a,b)}} + H.n.prototype={} + H.af.prototype={ + gC:function(a){var s=this + return new H.a6(s,s.gi(s),H.r(s).h("a6"))}, + gu:function(a){return this.gi(this)===0}, + F:function(a,b){var s,r=this,q=r.gi(r) + for(s=0;s").D(c).h("a8<1,2>"))}, + a1:function(a,b){return H.du(this,b,null,H.r(this).h("af.E"))}} + H.dt.prototype={ + gdj:function(){var s=J.X(this.a),r=this.c + if(r==null||r>s)return s + return r}, + gdM:function(){var s=J.X(this.a),r=this.b + if(r>s)return s + return r}, + gi:function(a){var s,r=J.X(this.a),q=this.b + if(q>=r)return 0 + s=this.c + if(s==null||s>=r)return r-q + return s-q}, + S:function(a,b){var s=this,r=s.gdM()+b + if(b<0||r>=s.gdj())throw H.c(P.ex(b,s,"index",null,null)) + return J.eh(s.a,r)}, + a1:function(a,b){var s,r,q=this + P.aU(b,"count") + s=q.b+b + r=q.c + if(r!=null&&s>=r)return new H.b6(q.$ti.h("b6<1>")) + return H.du(q.a,s,r,q.$ti.c)}, + aL:function(a,b){var s,r,q,p=this,o=p.b,n=p.a,m=J.M(n),l=m.gi(n),k=p.c + if(k!=null&&k=o){r.d=null + return!1}r.d=p.S(q,s);++r.c + return!0}, + $iH:1} + H.b9.prototype={ + gC:function(a){var s=H.r(this) + return new H.a7(J.a_(this.a),this.b,s.h("@<1>").D(s.Q[1]).h("a7<1,2>"))}, + gi:function(a){return J.X(this.a)}, + gu:function(a){return J.nv(this.a)}, + S:function(a,b){return this.b.$1(J.eh(this.a,b))}} + H.c_.prototype={$in:1} + H.a7.prototype={ + n:function(){var s=this,r=s.b + if(r.n()){s.a=s.c.$1(r.gq()) + return!0}s.a=null + return!1}, + gq:function(){var s=this.a + return s}} + H.a8.prototype={ + gi:function(a){return J.X(this.a)}, + S:function(a,b){return this.b.$1(J.eh(this.a,b))}} + H.l_.prototype={ + gC:function(a){return new H.cm(J.a_(this.a),this.b,this.$ti.h("cm<1>"))}, + ag:function(a,b,c){return new H.b9(this,b,this.$ti.h("@<1>").D(c).h("b9<1,2>"))}} + H.cm.prototype={ + n:function(){var s,r + for(s=this.a,r=this.b;s.n();)if(r.$1(s.gq()))return!0 + return!1}, + gq:function(){return this.a.gq()}} + H.bc.prototype={ + a1:function(a,b){P.aM(b,"count") + P.aU(b,"count") + return new H.bc(this.a,this.b+b,H.r(this).h("bc<1>"))}, + gC:function(a){return new H.dr(J.a_(this.a),this.b,H.r(this).h("dr<1>"))}} + H.cw.prototype={ + gi:function(a){var s=J.X(this.a)-this.b + if(s>=0)return s + return 0}, + a1:function(a,b){P.aM(b,"count") + P.aU(b,"count") + return new H.cw(this.a,this.b+b,this.$ti)}, + $in:1} + H.dr.prototype={ + n:function(){var s,r + for(s=this.a,r=0;r"))}, + a1:function(a,b){P.aU(b,"count") + return this}} + H.d6.prototype={ + n:function(){return!1}, + gq:function(){throw H.c(H.mB())}, + $iH:1} + H.d8.prototype={ + si:function(a,b){throw H.c(P.ab("Cannot change the length of a fixed-length list"))}, + B:function(a,b){throw H.c(P.ab("Cannot add to a fixed-length list"))}} + H.f7.prototype={ + m:function(a,b,c){throw H.c(P.ab("Cannot modify an unmodifiable list"))}, + si:function(a,b){throw H.c(P.ab("Cannot change the length of an unmodifiable list"))}, + B:function(a,b){throw H.c(P.ab("Cannot add to an unmodifiable list"))}} + H.cI.prototype={} + H.cG.prototype={ + gG:function(a){var s=this._hashCode + if(s!=null)return s + s=536870911&664597*J.aL(this.a) + this._hashCode=s + return s}, + l:function(a){return'Symbol("'+H.b(this.a)+'")'}, + N:function(a,b){if(b==null)return!1 + return b instanceof H.cG&&this.a==b.a}, + $icH:1} + H.e4.prototype={} + H.d4.prototype={} + H.cv.prototype={ + af:function(a,b,c){var s=H.r(this) + return P.nP(this,s.c,s.Q[1],b,c)}, + gu:function(a){return this.gi(this)===0}, + l:function(a){return P.mG(this)}, + m:function(a,b,c){H.t2()}, + $ih:1} + H.aq.prototype={ + gi:function(a){return this.a}, + w:function(a){if(typeof a!="string")return!1 + if("__proto__"===a)return!1 + return this.b.hasOwnProperty(a)}, + j:function(a,b){if(!this.w(b))return null + return this.ce(b)}, + ce:function(a){return this.b[a]}, + J:function(a,b){var s,r,q,p=this.c + for(s=p.length,r=0;r"))}} + H.dz.prototype={ + gC:function(a){var s=this.a.c + return new J.aC(s,s.length,H.U(s).h("aC<1>"))}, + gi:function(a){return this.a.c.length}} + H.al.prototype={ + aD:function(){var s,r=this,q=r.$map + if(q==null){s=r.$ti + q=new H.aG(s.h("@<1>").D(s.Q[1]).h("aG<1,2>")) + H.oU(r.a,q) + r.$map=q}return q}, + w:function(a){return this.aD().w(a)}, + j:function(a,b){return this.aD().j(0,b)}, + J:function(a,b){this.aD().J(0,b)}, + gL:function(){var s=this.aD() + return new H.au(s,H.r(s).h("au<1>"))}, + gi:function(a){return this.aD().a}} + H.ig.prototype={ + gcN:function(){var s=this.a + return s}, + gcR:function(){var s,r,q,p,o=this + if(o.c===1)return C.ai + s=o.d + r=s.length-o.e.length-o.f + if(r===0)return C.ai + q=[] + for(p=0;p>>0}, + l:function(a){var s=this.c + if(s==null)s=this.a + return"Closure '"+H.b(this.d)+"' of "+("Instance of '"+H.b(H.ju(s))+"'")}} + H.eZ.prototype={ + l:function(a){return"RuntimeError: "+this.a}} + H.lA.prototype={} + H.aG.prototype={ + gi:function(a){return this.a}, + gu:function(a){return this.a===0}, + gL:function(){return new H.au(this,H.r(this).h("au<1>"))}, + gab:function(){var s=H.r(this) + return H.ja(new H.au(this,s.h("au<1>")),new H.im(this),s.c,s.Q[1])}, + w:function(a){var s,r,q=this + if(typeof a=="string"){s=q.b + if(s==null)return!1 + return q.cc(s,a)}else if(typeof a=="number"&&(a&0x3ffffff)===a){r=q.c + if(r==null)return!1 + return q.cc(r,a)}else return q.e5(a)}, + e5:function(a){var s=this.d + if(s==null)return!1 + return this.bL(this.bu(s,J.aL(a)&0x3ffffff),a)>=0}, + j:function(a,b){var s,r,q,p,o=this,n=null + if(typeof b=="string"){s=o.b + if(s==null)return n + r=o.aW(s,b) + q=r==null?n:r.b + return q}else if(typeof b=="number"&&(b&0x3ffffff)===b){p=o.c + if(p==null)return n + r=o.aW(p,b) + q=r==null?n:r.b + return q}else return o.e6(b)}, + e6:function(a){var s,r,q=this.d + if(q==null)return null + s=this.bu(q,J.aL(a)&0x3ffffff) + r=this.bL(s,a) + if(r<0)return null + return s[r].b}, + m:function(a,b,c){var s,r,q,p,o,n,m=this + if(typeof b=="string"){s=m.b + m.c2(s==null?m.b=m.bx():s,b,c)}else if(typeof b=="number"&&(b&0x3ffffff)===b){r=m.c + m.c2(r==null?m.c=m.bx():r,b,c)}else{q=m.d + if(q==null)q=m.d=m.bx() + p=J.aL(b)&0x3ffffff + o=m.bu(q,p) + if(o==null)m.bz(q,p,[m.by(b,c)]) + else{n=m.bL(o,b) + if(n>=0)o[n].b=c + else o.push(m.by(b,c))}}}, + bS:function(a,b){var s + if(this.w(a))return this.j(0,a) + s=b.$0() + this.m(0,a,s) + return s}, + J:function(a,b){var s=this,r=s.e,q=s.r + for(;r!=null;){b.$2(r.a,r.b) + if(q!==s.r)throw H.c(P.ad(s)) + r=r.c}}, + c2:function(a,b,c){var s=this.aW(a,b) + if(s==null)this.bz(a,b,this.by(b,c)) + else s.b=c}, + by:function(a,b){var s=this,r=new H.j7(a,b) + if(s.e==null)s.e=s.f=r + else s.f=s.f.c=r;++s.a + s.r=s.r+1&67108863 + return r}, + bL:function(a,b){var s,r + if(a==null)return-1 + s=a.length + for(r=0;r")) + r.c=s.e + return r}, + F:function(a,b){return this.a.w(b)}} + H.df.prototype={ + gq:function(){return this.d}, + n:function(){var s,r=this,q=r.a + if(r.b!==q.r)throw H.c(P.ad(q)) + s=r.c + if(s==null){r.d=null + return!1}else{r.d=s.a + r.c=s.c + return!0}}, + $iH:1} + H.m9.prototype={ + $1:function(a){return this.a(a)}, + $S:33} + H.ma.prototype={ + $2:function(a,b){return this.a(a,b)}, + $S:62} + H.mb.prototype={ + $1:function(a){return this.a(a)}, + $S:83} + H.ih.prototype={ + l:function(a){return"RegExp/"+this.a+"/"+this.b.flags}, + aG:function(a){var s + if(typeof a!="string")H.a2(H.bM(a)) + s=this.b.exec(a) + if(s==null)return null + return new H.ly(s)}} + H.ly.prototype={} + H.dm.prototype={ + dv:function(a,b,c,d){var s=P.S(b,0,c,d,null) + throw H.c(s)}, + c8:function(a,b,c,d){if(b>>>0!==b||b>c)this.dv(a,b,c,d)}} + H.cE.prototype={ + gi:function(a){return a.length}, + dJ:function(a,b,c,d,e){var s,r,q=a.length + this.c8(a,b,q,"start") + this.c8(a,c,q,"end") + if(b>c)throw H.c(P.S(b,0,c,null,null)) + s=c-b + if(e<0)throw H.c(P.O(e)) + r=d.length + if(r-e").b(a))s.c6(a) + else s.ca(a)}}, + bD:function(a,b){var s + if(b==null)b=P.el(a) + s=this.a + if(this.b)s.aB(a,b) + else s.aT(a,b)}} + P.lK.prototype={ + $1:function(a){return this.a.$2(0,a)}, + $S:116} + P.lL.prototype={ + $2:function(a,b){this.a.$2(1,new H.d7(a,b))}, + $C:"$2", + $R:2, + $S:31} + P.m_.prototype={ + $2:function(a,b){this.a(a,b)}, + $S:32} + P.cO.prototype={ + l:function(a){return"IterationMarker("+this.b+", "+H.b(this.a)+")"}} + P.aB.prototype={ + gq:function(){var s=this.c + if(s==null)return this.b + return s.gq()}, + n:function(){var s,r,q,p,o,n=this + for(;!0;){s=n.c + if(s!=null)if(s.n())return!0 + else n.c=null + r=function(a,b,c){var m,l=b + while(true)try{return a(l,m)}catch(k){m=k + l=c}}(n.a,0,1) + if(r instanceof P.cO){q=r.b + if(q===2){p=n.d + if(p==null||p.length===0){n.b=null + return!1}n.a=p.pop() + continue}else{s=r.a + if(q===3)throw s + else{o=J.a_(s) + if(o instanceof P.aB){s=n.d + if(s==null)s=n.d=[] + s.push(n.a) + n.a=o.a + continue}else{n.c=o + continue}}}}else{n.b=r + return!0}}return!1}, + $iH:1} + P.dW.prototype={ + gC:function(a){return new P.aB(this.a(),this.$ti.h("aB<1>"))}} + P.ff.prototype={ + bD:function(a,b){var s + P.aM(a,"error") + s=this.a + if(s.a!==0)throw H.c(P.cF("Future already completed")) + if(b==null)b=P.el(a) + s.aT(a,b)}, + M:function(a){return this.bD(a,null)}} + P.ax.prototype={ + T:function(a){var s=this.a + if(s.a!==0)throw H.c(P.cF("Future already completed")) + s.bk(a)}, + b3:function(){return this.T(null)}} + P.cM.prototype={ + ea:function(a){if((this.c&15)!==6)return!0 + return this.b.b.bW(this.d,a.a)}, + e2:function(a){var s=this.e,r=this.b.b + if(t.Q.b(s))return r.ej(s,a.a,a.b) + else return r.bW(s,a.a)}} + P.C.prototype={ + ao:function(a,b,c,d){var s,r=$.x + if(r!==C.f)c=c!=null?P.v4(c,r):c + s=new P.C($.x,d.h("C<0>")) + this.aR(new P.cM(s,c==null?1:3,b,c)) + return s}, + cV:function(a,b,c){return this.ao(a,b,null,c)}, + cu:function(a,b,c){var s=new P.C($.x,c.h("C<0>")) + this.aR(new P.cM(s,19,a,b)) + return s}, + be:function(a){var s=new P.C($.x,this.$ti) + this.aR(new P.cM(s,8,a,null)) + return s}, + dK:function(a){this.a=4 + this.c=a}, + aR:function(a){var s,r=this,q=r.a + if(q<=1){a.a=r.c + r.c=a}else{if(q===2){q=r.c + s=q.a + if(s<4){q.aR(a) + return}r.a=s + r.c=q.c}P.cZ(null,null,r.b,new P.li(r,a))}}, + co:function(a){var s,r,q,p,o,n,m=this,l={} + l.a=a + if(a==null)return + s=m.a + if(s<=1){r=m.c + m.c=a + if(r!=null){q=a.a + for(p=a;q!=null;p=q,q=o)o=q.a + p.a=r}}else{if(s===2){s=m.c + n=s.a + if(n<4){s.co(a) + return}m.a=n + m.c=s.c}l.a=m.b2(a) + P.cZ(null,null,m.b,new P.lq(l,m))}}, + b1:function(){var s=this.c + this.c=null + return this.b2(s)}, + b2:function(a){var s,r,q + for(s=a,r=null;s!=null;r=s,s=q){q=s.a + s.a=r}return r}, + c9:function(a){var s,r=this,q=r.$ti + if(q.h("ae<1>").b(a))if(q.b(a))P.ll(a,r) + else P.ol(a,r) + else{s=r.b1() + r.a=4 + r.c=a + P.cN(r,s)}}, + ca:function(a){var s=this,r=s.b1() + s.a=4 + s.c=a + P.cN(s,r)}, + aB:function(a,b){var s=this,r=s.b1(),q=P.fK(a,b) + s.a=8 + s.c=q + P.cN(s,r)}, + bk:function(a){if(this.$ti.h("ae<1>").b(a)){this.c6(a) + return}this.d9(a)}, + d9:function(a){this.a=1 + P.cZ(null,null,this.b,new P.lk(this,a))}, + c6:function(a){var s=this + if(s.$ti.b(a)){if(a.a===8){s.a=1 + P.cZ(null,null,s.b,new P.lp(s,a))}else P.ll(a,s) + return}P.ol(a,s)}, + aT:function(a,b){this.a=1 + P.cZ(null,null,this.b,new P.lj(this,a,b))}, + $iae:1} + P.li.prototype={ + $0:function(){P.cN(this.a,this.b)}, + $S:2} + P.lq.prototype={ + $0:function(){P.cN(this.b,this.a.a)}, + $S:2} + P.lm.prototype={ + $1:function(a){var s=this.a + s.a=0 + s.c9(a)}, + $S:13} + P.ln.prototype={ + $2:function(a,b){this.a.aB(a,b)}, + $C:"$2", + $R:2, + $S:41} + P.lo.prototype={ + $0:function(){this.a.aB(this.b,this.c)}, + $S:2} + P.lk.prototype={ + $0:function(){this.a.ca(this.b)}, + $S:2} + P.lp.prototype={ + $0:function(){P.ll(this.b,this.a)}, + $S:2} + P.lj.prototype={ + $0:function(){this.a.aB(this.b,this.c)}, + $S:2} + P.lt.prototype={ + $0:function(){var s,r,q,p,o,n,m=this,l=null + try{q=m.a.a + l=q.b.b.cS(q.d)}catch(p){s=H.E(p) + r=H.aK(p) + if(m.c){q=m.b.a.c.a + o=s + o=q==null?o==null:q===o + q=o}else q=!1 + o=m.a + if(q)o.c=m.b.a.c + else o.c=P.fK(s,r) + o.b=!0 + return}if(l instanceof P.C&&l.a>=4){if(l.a===8){q=m.a + q.c=l.c + q.b=!0}return}if(t.c.b(l)){n=m.b.a + q=m.a + q.c=J.rF(l,new P.lu(n),t.z) + q.b=!1}}, + $S:1} + P.lu.prototype={ + $1:function(a){return this.a}, + $S:47} + P.ls.prototype={ + $0:function(){var s,r,q,p,o + try{q=this.a + p=q.a + q.c=p.b.b.bW(p.d,this.b)}catch(o){s=H.E(o) + r=H.aK(o) + q=this.a + q.c=P.fK(s,r) + q.b=!0}}, + $S:1} + P.lr.prototype={ + $0:function(){var s,r,q,p,o,n,m,l,k=this + try{s=k.a.a.c + p=k.b + if(p.a.ea(s)&&p.a.e!=null){p.c=p.a.e2(s) + p.b=!1}}catch(o){r=H.E(o) + q=H.aK(o) + p=k.a.a.c + n=p.a + m=r + l=k.b + if(n==null?m==null:n===m)l.c=p + else l.c=P.fK(r,q) + l.b=!0}}, + $S:1} + P.fd.prototype={} + P.aW.prototype={ + gi:function(a){var s={},r=new P.C($.x,t.fJ) + s.a=0 + this.bN(new P.kF(s,this),!0,new P.kG(s,r),r.gde()) + return r}} + P.kC.prototype={ + $1:function(a){var s=this.a + s.aS(a) + s.aU()}, + $S:function(){return this.b.h("k(0)")}} + P.kD.prototype={ + $2:function(a,b){var s=this.a + s.aQ(a,b) + s.aU()}, + $C:"$2", + $R:2, + $S:48} + P.kE.prototype={ + $0:function(){var s=this.a + return new P.dL(new J.aC(s,1,H.U(s).h("aC<1>")))}, + $S:function(){return this.b.h("dL<0>()")}} + P.kF.prototype={ + $1:function(a){++this.a.a}, + $S:function(){return H.r(this.b).h("k(1)")}} + P.kG.prototype={ + $0:function(){this.b.c9(this.a.a)}, + $C:"$0", + $R:0, + $S:2} + P.f0.prototype={} + P.cS.prototype={ + gdE:function(){if((this.b&8)===0)return this.a + return this.a.gbZ()}, + aV:function(){var s,r=this + if((r.b&8)===0){s=r.a + return s==null?r.a=new P.dU():s}s=r.a.gbZ() + return s}, + gau:function(){var s=this.a + return(this.b&8)!==0?s.gbZ():s}, + bl:function(){if((this.b&4)!==0)return new P.bz("Cannot add event after closing") + return new P.bz("Cannot add event while adding a stream")}, + cd:function(){var s=this.c + if(s==null)s=this.c=(this.b&2)!==0?$.fC():new P.C($.x,t.D) + return s}, + B:function(a,b){if(this.b>=4)throw H.c(this.bl()) + this.aS(b)}, + a2:function(){var s=this,r=s.b + if((r&4)!==0)return s.cd() + if(r>=4)throw H.c(s.bl()) + s.aU() + return s.cd()}, + aU:function(){var s=this.b|=4 + if((s&1)!==0)this.as() + else if((s&3)===0)this.aV().B(0,C.G)}, + aS:function(a){var s=this.b + if((s&1)!==0)this.ak(a) + else if((s&3)===0)this.aV().B(0,new P.cn(a))}, + aQ:function(a,b){var s=this.b + if((s&1)!==0)this.at(a,b) + else if((s&3)===0)this.aV().B(0,new P.dB(a,b))}, + dN:function(a,b,c,d){var s,r,q,p,o,n,m=this + if((m.b&3)!==0)throw H.c(P.cF("Stream has already been listened to.")) + s=$.x + r=d?1:0 + q=P.oj(s,b) + p=new P.dA(m,a,q,c,s,r) + o=m.gdE() + s=m.b|=1 + if((s&8)!==0){n=m.a + n.sbZ(p) + n.an()}else m.a=p + p.cq(o) + p.bv(new P.lF(m)) + return p}, + dG:function(a){var s,r,q,p,o,n,m,l=this,k=null + if((l.b&8)!==0)k=l.a.I() + l.a=null + l.b=l.b&4294967286|2 + s=l.r + if(s!=null)if(k==null)try{r=s.$0() + if(t.bq.b(r))k=r}catch(o){q=H.E(o) + p=H.aK(o) + n=new P.C($.x,t.D) + n.aT(q,p) + k=n}else k=k.be(s) + m=new P.lE(l) + if(k!=null)k=k.be(m) + else m.$0() + return k}} + P.lF.prototype={ + $0:function(){P.mV(this.a.d)}, + $S:2} + P.lE.prototype={ + $0:function(){var s=this.a.c + if(s!=null&&s.a===0)s.bk(null)}, + $S:1} + P.fs.prototype={ + ak:function(a){this.gau().aS(a)}, + at:function(a,b){this.gau().aQ(a,b)}, + as:function(){this.gau().dd()}} + P.fe.prototype={ + ak:function(a){this.gau().ar(new P.cn(a))}, + at:function(a,b){this.gau().ar(new P.dB(a,b))}, + as:function(){this.gau().ar(C.G)}} + P.bD.prototype={} + P.cT.prototype={} + P.an.prototype={ + br:function(a,b,c,d){return this.a.dN(a,b,c,d)}, + gG:function(a){return(H.cj(this.a)^892482866)>>>0}, + N:function(a,b){if(b==null)return!1 + if(this===b)return!0 + return b instanceof P.an&&b.a===this.a}} + P.dA.prototype={ + cl:function(){return this.x.dG(this)}, + b_:function(){var s=this.x + if((s.b&8)!==0)s.a.aK() + P.mV(s.e)}, + b0:function(){var s=this.x + if((s.b&8)!==0)s.a.an() + P.mV(s.f)}} + P.cK.prototype={ + cq:function(a){var s=this + if(a==null)return + s.r=a + if(!a.gu(a)){s.e=(s.e|64)>>>0 + a.aO(s)}}, + cQ:function(a){var s,r,q=this,p=q.e + if((p&8)!==0)return + s=(p+128|4)>>>0 + q.e=s + if(p<128){r=q.r + if(r!=null)if(r.a===1)r.a=3}if((p&4)===0&&(s&32)===0)q.bv(q.gcm())}, + aK:function(){return this.cQ(null)}, + an:function(){var s=this,r=s.e + if((r&8)!==0)return + if(r>=128){r=s.e=r-128 + if(r<128){if((r&64)!==0){r=s.r + r=!r.gu(r)}else r=!1 + if(r)s.r.aO(s) + else{r=(s.e&4294967291)>>>0 + s.e=r + if((r&32)===0)s.bv(s.gcn())}}}}, + I:function(){var s=this,r=(s.e&4294967279)>>>0 + s.e=r + if((r&8)===0)s.bm() + r=s.f + return r==null?$.fC():r}, + bm:function(){var s,r=this,q=r.e=(r.e|8)>>>0 + if((q&64)!==0){s=r.r + if(s.a===1)s.a=3}if((q&32)===0)r.r=null + r.f=r.cl()}, + aS:function(a){var s=this.e + if((s&8)!==0)return + if(s<32)this.ak(a) + else this.ar(new P.cn(a))}, + aQ:function(a,b){var s=this.e + if((s&8)!==0)return + if(s<32)this.at(a,b) + else this.ar(new P.dB(a,b))}, + dd:function(){var s=this,r=s.e + if((r&8)!==0)return + r=(r|2)>>>0 + s.e=r + if(r<32)s.as() + else s.ar(C.G)}, + b_:function(){}, + b0:function(){}, + cl:function(){return null}, + ar:function(a){var s,r=this,q=r.r + if(q==null)q=new P.dU() + r.r=q + q.B(0,a) + s=r.e + if((s&64)===0){s=(s|64)>>>0 + r.e=s + if(s<128)q.aO(r)}}, + ak:function(a){var s=this,r=s.e + s.e=(r|32)>>>0 + s.d.cU(s.a,a) + s.e=(s.e&4294967263)>>>0 + s.bn((r&4)!==0)}, + at:function(a,b){var s,r=this,q=r.e,p=new P.lg(r,a,b) + if((q&1)!==0){r.e=(q|16)>>>0 + r.bm() + s=r.f + if(s!=null&&s!==$.fC())s.be(p) + else p.$0()}else{p.$0() + r.bn((q&4)!==0)}}, + as:function(){var s,r=this,q=new P.lf(r) + r.bm() + r.e=(r.e|16)>>>0 + s=r.f + if(s!=null&&s!==$.fC())s.be(q) + else q.$0()}, + bv:function(a){var s=this,r=s.e + s.e=(r|32)>>>0 + a.$0() + s.e=(s.e&4294967263)>>>0 + s.bn((r&4)!==0)}, + bn:function(a){var s,r,q=this + if((q.e&64)!==0){s=q.r + s=s.gu(s)}else s=!1 + if(s){s=q.e=(q.e&4294967231)>>>0 + if((s&4)!==0)if(s<128){s=q.r + s=s==null?null:s.gu(s) + s=s!==!1}else s=!1 + else s=!1 + if(s)q.e=(q.e&4294967291)>>>0}for(;!0;a=r){s=q.e + if((s&8)!==0){q.r=null + return}r=(s&4)!==0 + if(a===r)break + q.e=(s^32)>>>0 + if(r)q.b_() + else q.b0() + q.e=(q.e&4294967263)>>>0}s=q.e + if((s&64)!==0&&s<128)q.r.aO(q)}} + P.lg.prototype={ + $0:function(){var s,r,q=this.a,p=q.e + if((p&8)!==0&&(p&16)===0)return + q.e=(p|32)>>>0 + s=q.b + p=this.b + r=q.d + if(t.k.b(s))r.em(s,p,this.c) + else r.cU(s,p) + q.e=(q.e&4294967263)>>>0}, + $S:1} + P.lf.prototype={ + $0:function(){var s=this.a,r=s.e + if((r&16)===0)return + s.e=(r|42)>>>0 + s.d.cT(s.c) + s.e=(s.e&4294967263)>>>0}, + $S:1} + P.dT.prototype={ + bN:function(a,b,c,d){return this.br(a,d,c,b===!0)}, + bM:function(a,b,c){return this.bN(a,null,b,c)}, + e8:function(a,b){return this.bN(a,null,b,null)}, + br:function(a,b,c,d){return P.oi(a,b,c,d)}} + P.dE.prototype={ + br:function(a,b,c,d){var s + if(this.b)throw H.c(P.cF("Stream has already been listened to.")) + this.b=!0 + s=P.oi(a,b,c,d) + s.cq(this.a.$0()) + return s}} + P.dL.prototype={ + gu:function(a){return this.b==null}, + cG:function(a){var s,r,q,p,o=this.b + if(o==null)throw H.c(P.cF("No events pending.")) + s=!1 + try{if(o.n()){s=!0 + a.ak(o.gq())}else{this.b=null + a.as()}}catch(p){r=H.E(p) + q=H.aK(p) + if(!s)this.b=C.Y + a.at(r,q)}}} + P.fh.prototype={ + gay:function(){return this.a}, + say:function(a){return this.a=a}} + P.cn.prototype={ + bQ:function(a){a.ak(this.b)}} + P.dB.prototype={ + bQ:function(a){a.at(this.b,this.c)}} + P.lh.prototype={ + bQ:function(a){a.as()}, + gay:function(){return null}, + say:function(a){throw H.c(P.cF("No events after a done."))}} + P.fn.prototype={ + aO:function(a){var s=this,r=s.a + if(r===1)return + if(r>=1){s.a=1 + return}P.p9(new P.lz(s,a)) + s.a=1}} + P.lz.prototype={ + $0:function(){var s=this.a,r=s.a + s.a=0 + if(r===3)return + s.cG(this.b)}, + $S:2} + P.dU.prototype={ + gu:function(a){return this.c==null}, + B:function(a,b){var s=this,r=s.c + if(r==null)s.b=s.c=b + else{r.say(b) + s.c=b}}, + cG:function(a){var s=this.b,r=s.gay() + this.b=r + if(r==null)this.c=null + s.bQ(a)}} + P.fq.prototype={} + P.ek.prototype={ + l:function(a){return H.b(this.a)}, + $iF:1, + gaP:function(){return this.b}} + P.lJ.prototype={} + P.lY.prototype={ + $0:function(){var s=H.c(this.a) + s.stack=J.ag(this.b) + throw s}, + $S:2} + P.lB.prototype={ + cT:function(a){var s,r,q,p=null + try{if(C.f===$.x){a.$0() + return}P.oL(p,p,this,a)}catch(q){s=H.E(q) + r=H.aK(q) + P.cY(p,p,this,s,r)}}, + eo:function(a,b){var s,r,q,p=null + try{if(C.f===$.x){a.$1(b) + return}P.oN(p,p,this,a,b)}catch(q){s=H.E(q) + r=H.aK(q) + P.cY(p,p,this,s,r)}}, + cU:function(a,b){return this.eo(a,b,t.z)}, + el:function(a,b,c){var s,r,q,p=null + try{if(C.f===$.x){a.$2(b,c) + return}P.oM(p,p,this,a,b,c)}catch(q){s=H.E(q) + r=H.aK(q) + P.cY(p,p,this,s,r)}}, + em:function(a,b,c){return this.el(a,b,c,t.z,t.z)}, + dQ:function(a,b){return new P.lD(this,a,b)}, + cw:function(a){return new P.lC(this,a)}, + ei:function(a){if($.x===C.f)return a.$0() + return P.oL(null,null,this,a)}, + cS:function(a){return this.ei(a,t.z)}, + en:function(a,b){if($.x===C.f)return a.$1(b) + return P.oN(null,null,this,a,b)}, + bW:function(a,b){return this.en(a,b,t.z,t.z)}, + ek:function(a,b,c){if($.x===C.f)return a.$2(b,c) + return P.oM(null,null,this,a,b,c)}, + ej:function(a,b,c){return this.ek(a,b,c,t.z,t.z,t.z)}, + ef:function(a){return a}, + bV:function(a){return this.ef(a,t.z,t.z,t.z)}} + P.lD.prototype={ + $0:function(){return this.a.cS(this.b)}, + $S:function(){return this.c.h("0()")}} + P.lC.prototype={ + $0:function(){return this.a.cT(this.b)}, + $S:1} + P.dG.prototype={ + gi:function(a){return this.a}, + gu:function(a){return this.a===0}, + gL:function(){return new P.dH(this,this.$ti.h("dH<1>"))}, + w:function(a){var s,r + if(typeof a=="string"&&a!=="__proto__"){s=this.b + return s==null?!1:s[a]!=null}else if(typeof a=="number"&&(a&1073741823)===a){r=this.c + return r==null?!1:r[a]!=null}else return this.dh(a)}, + dh:function(a){var s=this.d + if(s==null)return!1 + return this.aj(this.cf(s,a),a)>=0}, + j:function(a,b){var s,r,q + if(typeof b=="string"&&b!=="__proto__"){s=this.b + r=s==null?null:P.om(s,b) + return r}else if(typeof b=="number"&&(b&1073741823)===b){q=this.c + r=q==null?null:P.om(q,b) + return r}else return this.dl(b)}, + dl:function(a){var s,r,q=this.d + if(q==null)return null + s=this.cf(q,a) + r=this.aj(s,a) + return r<0?null:s[r+1]}, + m:function(a,b,c){var s,r,q,p,o,n=this + if(typeof b=="string"&&b!=="__proto__"){s=n.b + n.d8(s==null?n.b=P.on():s,b,c)}else{r=n.d + if(r==null)r=n.d=P.on() + q=H.p4(b)&1073741823 + p=r[q] + if(p==null){P.mK(r,q,[b,c]);++n.a + n.e=null}else{o=n.aj(p,b) + if(o>=0)p[o+1]=c + else{p.push(b,c);++n.a + n.e=null}}}}, + J:function(a,b){var s,r,q,p=this,o=p.cb() + for(s=o.length,r=0;r"))}, + F:function(a,b){return this.a.w(b)}} + P.dI.prototype={ + gq:function(){return this.d}, + n:function(){var s=this,r=s.b,q=s.c,p=s.a + if(r!==p.e)throw H.c(P.ad(p)) + else if(q>=r.length){s.d=null + return!1}else{s.d=r[q] + s.c=q+1 + return!0}}, + $iH:1} + P.aZ.prototype={ + gC:function(a){var s=this,r=new P.dM(s,s.r,H.r(s).h("dM<1>")) + r.c=s.e + return r}, + gi:function(a){return this.a}, + gu:function(a){return this.a===0}, + ga3:function(a){return this.a!==0}, + F:function(a,b){var s,r + if(typeof b=="string"&&b!=="__proto__"){s=this.b + if(s==null)return!1 + return s[b]!=null}else if(typeof b=="number"&&(b&1073741823)===b){r=this.c + if(r==null)return!1 + return r[b]!=null}else return this.dg(b)}, + dg:function(a){var s=this.d + if(s==null)return!1 + return this.aj(s[this.bp(a)],a)>=0}, + B:function(a,b){var s,r,q=this + if(typeof b=="string"&&b!=="__proto__"){s=q.b + return q.c4(s==null?q.b=P.mL():s,b)}else if(typeof b=="number"&&(b&1073741823)===b){r=q.c + return q.c4(r==null?q.c=P.mL():r,b)}else return q.d7(b)}, + d7:function(a){var s,r,q=this,p=q.d + if(p==null)p=q.d=P.mL() + s=q.bp(a) + r=p[s] + if(r==null)p[s]=[q.bo(a)] + else{if(q.aj(r,a)>=0)return!1 + r.push(q.bo(a))}return!0}, + eg:function(a,b){var s=this + if(typeof b=="string"&&b!=="__proto__")return s.cp(s.b,b) + else if(typeof b=="number"&&(b&1073741823)===b)return s.cp(s.c,b) + else return s.dH(b)}, + dH:function(a){var s,r,q,p,o=this,n=o.d + if(n==null)return!1 + s=o.bp(a) + r=n[s] + q=o.aj(r,a) + if(q<0)return!1 + p=r.splice(q,1)[0] + if(0===r.length)delete n[s] + o.cv(p) + return!0}, + dk:function(a,b){var s,r,q,p,o=this,n=o.e + for(;n!=null;n=r){s=n.a + r=n.b + q=o.r + p=a.$1(s) + if(q!==o.r)throw H.c(P.ad(o)) + if(!1===p)o.eg(0,s)}}, + cz:function(a){var s=this + if(s.a>0){s.b=s.c=s.d=s.e=s.f=null + s.a=0 + s.bw()}}, + c4:function(a,b){if(a[b]!=null)return!1 + a[b]=this.bo(b) + return!0}, + cp:function(a,b){var s + if(a==null)return!1 + s=a[b] + if(s==null)return!1 + this.cv(s) + delete a[b] + return!0}, + bw:function(){this.r=1073741823&this.r+1}, + bo:function(a){var s,r=this,q=new P.lx(a) + if(r.e==null)r.e=r.f=q + else{s=r.f + s.toString + q.c=s + r.f=s.b=q}++r.a + r.bw() + return q}, + cv:function(a){var s=this,r=a.c,q=a.b + if(r==null)s.e=q + else r.b=q + if(q==null)s.f=r + else q.c=r;--s.a + s.bw()}, + bp:function(a){return J.aL(a)&1073741823}, + aj:function(a,b){var s,r + if(a==null)return-1 + s=a.length + for(r=0;r"))}, + gi:function(a){return J.X(this.a)}, + j:function(a,b){return J.eh(this.a,b)}} + P.dc.prototype={} + P.dg.prototype={$in:1,$ii:1,$il:1} + P.m.prototype={ + gC:function(a){return new H.a6(a,this.gi(a),H.ac(a).h("a6"))}, + S:function(a,b){return this.j(a,b)}, + gu:function(a){return this.gi(a)===0}, + ga3:function(a){return!this.gu(a)}, + gcF:function(a){if(this.gi(a)===0)throw H.c(H.mB()) + return this.j(a,0)}, + F:function(a,b){var s,r=this.gi(a) + for(s=0;s").D(c).h("a8<1,2>"))}, + e0:function(a,b,c){var s,r,q=this.gi(a) + for(s=b,r=0;r").D(b).h("b3<1,2>"))}, + Z:function(a,b,c){var s=this.gi(a) + P.aV(b,c,s) + return P.dh(this.aM(a,b,c),!0,H.ac(a).h("m.E"))}, + aM:function(a,b,c){P.aV(b,c,this.gi(a)) + return H.du(a,b,c,H.ac(a).h("m.E"))}, + dZ:function(a,b,c,d){var s + P.aV(b,c,this.gi(a)) + for(s=b;s").b(d)){r=e + q=d}else{q=J.nw(d,e).aL(0,!1) + r=0}p=J.M(q) + if(r+s>p.gi(q))throw H.c(H.tg()) + if(r=0;--o)this.m(a,b+o,p.j(q,r+o)) + else for(o=0;o"))}, + w:function(a){return this.gL().F(0,a)}, + gi:function(a){var s=this.gL() + return s.gi(s)}, + gu:function(a){var s=this.gL() + return s.gu(s)}, + l:function(a){return P.mG(this)}, + $ih:1} + P.j9.prototype={ + $1:function(a){var s=this.a,r=H.r(s) + return new P.cC(a,s.j(0,a),r.h("@").D(r.h("I.V")).h("cC<1,2>"))}, + $S:function(){return H.r(this.a).h("cC(I.K)")}} + P.fw.prototype={ + m:function(a,b,c){throw H.c(P.ab("Cannot modify unmodifiable map"))}} + P.dj.prototype={ + af:function(a,b,c){return this.a.af(0,b,c)}, + j:function(a,b){return this.a.j(0,b)}, + m:function(a,b,c){this.a.m(0,b,c)}, + w:function(a){return this.a.w(a)}, + J:function(a,b){this.a.J(0,b)}, + gu:function(a){var s=this.a + return s.gu(s)}, + gi:function(a){var s=this.a + return s.gi(s)}, + gL:function(){return this.a.gL()}, + l:function(a){return this.a.l(0)}, + $ih:1} + P.be.prototype={ + af:function(a,b,c){return new P.be(this.a.af(0,b,c),b.h("@<0>").D(c).h("be<1,2>"))}} + P.cQ.prototype={ + gu:function(a){return this.gi(this)===0}, + ga3:function(a){return this.gi(this)!==0}, + K:function(a,b){var s + for(s=J.a_(b);s.n();)this.B(0,s.gq())}, + ag:function(a,b,c){return new H.c_(this,b,H.r(this).h("@<1>").D(c).h("c_<1,2>"))}, + l:function(a){return P.id(this,"{","}")}, + b4:function(a,b){var s + for(s=this.gC(this);s.n();)if(!b.$1(s.gq()))return!1 + return!0}, + a1:function(a,b){return H.o5(this,b,H.r(this).c)}, + b5:function(a,b,c){var s,r + for(s=this.gC(this);s.n();){r=s.gq() + if(b.$1(r))return r}return c.$0()}, + S:function(a,b){var s,r,q,p="index" + P.aM(b,p) + P.aU(b,p) + for(s=this.gC(this),r=0;s.n();){q=s.gq() + if(b===r)return q;++r}throw H.c(P.ex(b,this,p,null,r))}, + $in:1, + $ii:1} + P.e1.prototype={ + F:function(a,b){return this.a.w(b)}, + gC:function(a){var s=this.a.gL() + return s.gC(s)}, + gi:function(a){var s=this.a + return s.gi(s)}, + B:function(a,b){throw H.c(P.ab("Cannot change unmodifiable set"))}} + P.dN.prototype={} + P.e0.prototype={} + P.fl.prototype={ + j:function(a,b){var s,r=this.b + if(r==null)return this.c.j(0,b) + else if(typeof b!="string")return null + else{s=r[b] + return typeof s=="undefined"?this.dF(b):s}}, + gi:function(a){return this.b==null?this.c.a:this.aC().length}, + gu:function(a){return this.gi(this)===0}, + gL:function(){if(this.b==null){var s=this.c + return new H.au(s,H.r(s).h("au<1>"))}return new P.fm(this)}, + m:function(a,b,c){var s,r,q=this + if(q.b==null)q.c.m(0,b,c) + else if(q.w(b)){s=q.b + s[b]=c + r=q.a + if(r==null?s!=null:r!==s)r[b]=null}else q.dO().m(0,b,c)}, + w:function(a){if(this.b==null)return this.c.w(a) + if(typeof a!="string")return!1 + return Object.prototype.hasOwnProperty.call(this.a,a)}, + J:function(a,b){var s,r,q,p,o=this + if(o.b==null)return o.c.J(0,b) + s=o.aC() + for(r=0;r"))}return s}, + F:function(a,b){return this.a.w(b)}} + P.lw.prototype={ + a2:function(){var s,r,q,p=this + p.d4() + s=p.a + r=s.a + s.a="" + s=p.c + q=s.b + q.push(P.oK(r.charCodeAt(0)==0?r:r,p.b)) + s.a.$1(q)}} + P.kT.prototype={ + $0:function(){var s,r + try{s=new TextDecoder("utf-8",{fatal:true}) + return s}catch(r){H.E(r)}return null}, + $S:4} + P.kU.prototype={ + $0:function(){var s,r + try{s=new TextDecoder("utf-8",{fatal:false}) + return s}catch(r){H.E(r)}return null}, + $S:4} + P.fL.prototype={ + ec:function(a,b,a0){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c="Invalid base64 encoding length " + a0=P.aV(b,a0,a.length) + s=$.nq() + for(r=b,q=r,p=null,o=-1,n=-1,m=0;r=0){i=C.a.A("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h) + if(i===k)continue + k=i}else{if(h===-1){if(o<0){g=p==null?null:p.a.length + if(g==null)g=0 + o=g+(r-q) + n=r}++m + if(k===61)continue}k=i}if(h!==-2){if(p==null){p=new P.a9("") + g=p}else g=p + g.a+=C.a.t(a,q,r) + g.a+=H.ba(k) + q=l + continue}}throw H.c(P.K("Invalid base64 data",a,r))}if(p!=null){g=p.a+=C.a.t(a,q,a0) + f=g.length + if(o>=0)P.nA(a,n,a0,o,m,f) + else{e=C.c.bg(f-1,4)+1 + if(e===1)throw H.c(P.K(c,a,a0)) + for(;e<4;){g+="=" + p.a=g;++e}}g=p.a + return C.a.az(a,b,a0,g.charCodeAt(0)==0?g:g)}d=a0-b + if(o>=0)P.nA(a,n,a0,o,m,d) + else{e=C.c.bg(d,4) + if(e===1)throw H.c(P.K(c,a,a0)) + if(e>1)a=C.a.az(a,a0,a0,e===2?"==":"=")}return a}} + P.fN.prototype={} + P.fM.prototype={ + dU:function(a,b){var s,r,q,p=P.aV(b,null,a.length) + if(b===p)return new Uint8Array(0) + s=new P.le() + r=s.dW(a,b,p) + r.toString + q=s.a + if(q<-1)H.a2(P.K("Missing padding character",a,p)) + if(q>0)H.a2(P.K("Invalid length, must be multiple of four",a,p)) + s.a=-1 + return r}} + P.le.prototype={ + dW:function(a,b,c){var s,r=this,q=r.a + if(q<0){r.a=P.oh(a,b,c,q) + return null}if(b===c)return new Uint8Array(0) + s=P.u1(a,b,c,q) + r.a=P.u3(a,b,c,s,0,r.a) + return s}} + P.fO.prototype={} + P.em.prototype={} + P.fo.prototype={} + P.eo.prototype={} + P.eq.prototype={} + P.hw.prototype={} + P.io.prototype={ + dV:function(a){var s=P.oK(a,this.gcD().a) + return s}, + gcD:function(){return C.bG}} + P.ip.prototype={} + P.kH.prototype={} + P.kI.prototype={} + P.dV.prototype={ + a2:function(){}} + P.lI.prototype={ + a2:function(){this.a.e_(this.c) + this.b.a2()}, + dP:function(a,b,c,d){this.c.a+=this.a.cC(a,b,c,!1)}} + P.kR.prototype={} + P.kS.prototype={ + dT:function(a){var s=this.a,r=P.tW(s,a,0,null) + if(r!=null)return r + return new P.fx(s).cC(a,0,null,!0)}} + P.fx.prototype={ + cC:function(a,b,c,d){var s,r,q,p,o,n=this,m=P.aV(b,c,J.X(a)) + if(b===m)return"" + if(t.E.b(a)){s=a + r=0}else{s=P.uz(a,b,m) + m-=b + r=b + b=0}q=n.bq(s,b,m,d) + p=n.b + if((p&1)!==0){o=P.oC(p) + n.b=0 + throw H.c(P.K(o,a,r+n.c))}return q}, + bq:function(a,b,c,d){var s,r,q=this + if(c-b>1000){s=C.c.bA(b+c,2) + r=q.bq(a,b,s,!1) + if((q.b&1)!==0)return r + return r+q.bq(a,s,c,d)}return q.dX(a,b,c,d)}, + e_:function(a){var s=this.b + this.b=0 + if(s<=32)return + if(this.a)a.a+=H.ba(65533) + else throw H.c(P.K(P.oC(77),null,null))}, + dX:function(a,b,c,d){var s,r,q,p,o,n,m,l=this,k=65533,j=l.b,i=l.c,h=new P.a9(""),g=b+1,f=a[b] + $label0$0:for(s=l.a;!0;){for(;!0;g=p){r=C.a.H("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHIHHHJEEBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKCCCCCCCCCCCCDCLONNNMEEEEEEEEEEE",f)&31 + i=j<=32?f&61694>>>r:(f&63|i<<6)>>>0 + j=C.a.H(" \x000:XECCCCCN:lDb \x000:XECCCCCNvlDb \x000:XECCCCCN:lDb AAAAA\x00\x00\x00\x00\x00AAAAA00000AAAAA:::::AAAAAGG000AAAAA00KKKAAAAAG::::AAAAA:IIIIAAAAA000\x800AAAAA\x00\x00\x00\x00 AAAAA",j+r) + if(j===0){h.a+=H.ba(i) + if(g===c)break $label0$0 + break}else if((j&1)!==0){if(s)switch(j){case 69:case 67:h.a+=H.ba(k) + break + case 65:h.a+=H.ba(k);--g + break + default:q=h.a+=H.ba(k) + h.a=q+H.ba(k) + break}else{l.b=j + l.c=g-1 + return""}j=0}if(g===c)break $label0$0 + p=g+1 + f=a[g]}p=g+1 + f=a[g] + if(f<128){while(!0){if(!(p=128){o=n-1 + p=n + break}p=n}if(o-g<20)for(m=g;m32)if(s)h.a+=H.ba(k) + else{l.b=77 + l.c=c + return""}l.b=j + l.c=i + s=h.a + return s.charCodeAt(0)==0?s:s}} + P.jn.prototype={ + $2:function(a,b){var s,r=this.b,q=this.a + r.a+=q.a + s=r.a+=H.b(a.a) + r.a=s+": " + r.a+=P.cx(b) + q.a=", "}, + $S:61} + P.d5.prototype={ + N:function(a,b){if(b==null)return!1 + return b instanceof P.d5&&this.a===b.a&&this.b===b.b}, + gG:function(a){var s=this.a + return(s^C.c.ad(s,30))&1073741823}, + es:function(){var s,r + if(this.b)return this + s=this.a + if(Math.abs(s)<=864e13)r=!1 + else r=!0 + if(r)H.a2(P.O("DateTime is outside valid range: "+s)) + P.aM(!0,"isUtc") + return new P.d5(s,!0)}, + l:function(a){var s=this,r=P.nG(H.eV(s)),q=P.b5(H.o_(s)),p=P.b5(H.nW(s)),o=P.b5(H.nX(s)),n=P.b5(H.nZ(s)),m=P.b5(H.o0(s)),l=P.nH(H.nY(s)) + if(s.b)return r+"-"+q+"-"+p+" "+o+":"+n+":"+m+"."+l+"Z" + else return r+"-"+q+"-"+p+" "+o+":"+n+":"+m+"."+l}, + er:function(){var s=this,r=H.eV(s)>=-9999&&H.eV(s)<=9999?P.nG(H.eV(s)):P.t5(H.eV(s)),q=P.b5(H.o_(s)),p=P.b5(H.nW(s)),o=P.b5(H.nX(s)),n=P.b5(H.nZ(s)),m=P.b5(H.o0(s)),l=P.nH(H.nY(s)) + if(s.b)return r+"-"+q+"-"+p+"T"+o+":"+n+":"+m+"."+l+"Z" + else return r+"-"+q+"-"+p+"T"+o+":"+n+":"+m+"."+l}} + P.F.prototype={ + gaP:function(){return H.aK(this.$thrownJsError)}} + P.ej.prototype={ + l:function(a){var s=this.a + if(s!=null)return"Assertion failed: "+P.cx(s) + return"Assertion failed"}} + P.f2.prototype={} + P.eR.prototype={ + l:function(a){return"Throw of null."}} + P.ak.prototype={ + gbt:function(){return"Invalid argument"+(!this.a?"(s)":"")}, + gbs:function(){return""}, + l:function(a){var s,r,q=this,p=q.c,o=p==null?"":" ("+p+")",n=q.d,m=n==null?"":": "+H.b(n),l=q.gbt()+o+m + if(!q.a)return l + s=q.gbs() + r=P.cx(q.b) + return l+s+": "+r}} + P.dq.prototype={ + gbt:function(){return"RangeError"}, + gbs:function(){var s,r=this.e,q=this.f + if(r==null)s=q!=null?": Not less than or equal to "+H.b(q):"" + else if(q==null)s=": Not greater than or equal to "+H.b(r) + else if(q>r)s=": Not in inclusive range "+H.b(r)+".."+H.b(q) + else s=qd.length + else s=!1 + if(s)e=null + if(e==null){if(d.length>78)d=C.a.t(d,0,75)+"..." + return f+"\n"+d}for(r=1,q=0,p=!1,o=0;o1?f+(" (at line "+r+", character "+(e-q+1)+")\n"):f+(" (at character "+(e+1)+")\n") + m=d.length + for(o=e;o78)if(e-q<75){l=q+75 + k=q + j="" + i="..."}else{if(m-e<75){k=m-75 + l=m + i=""}else{k=e-36 + l=e+36 + i="..."}j="..."}else{l=m + k=q + j="" + i=""}h=C.a.t(d,k,l) + return f+j+h+i+"\n"+C.a.bh(" ",e-k+j.length)+"^\n"}else return e!=null?f+(" (at offset "+H.b(e)+")"):f}, + $ia3:1} + P.i.prototype={ + ae:function(a,b){return H.fP(this,H.r(this).h("i.E"),b)}, + ag:function(a,b,c){return H.ja(this,b,H.r(this).h("i.E"),c)}, + F:function(a,b){var s + for(s=this.gC(this);s.n();)if(J.aA(s.gq(),b))return!0 + return!1}, + aL:function(a,b){return P.dh(this,!1,H.r(this).h("i.E"))}, + gi:function(a){var s,r=this.gC(this) + for(s=0;r.n();)++s + return s}, + gu:function(a){return!this.gC(this).n()}, + ga3:function(a){return!this.gu(this)}, + a1:function(a,b){return H.o5(this,b,H.r(this).h("i.E"))}, + S:function(a,b){var s,r,q + P.aU(b,"index") + for(s=this.gC(this),r=0;s.n();){q=s.gq() + if(b===r)return q;++r}throw H.c(P.ex(b,this,"index",null,r))}, + l:function(a){return P.tf(this,"(",")")}} + P.dF.prototype={ + S:function(a,b){var s=this.a + if(0>b||b>=s)H.a2(P.ex(b,this,"index",null,s)) + return this.b.$1(b)}, + gi:function(a){return this.a}} + P.H.prototype={} + P.cC.prototype={ + l:function(a){return"MapEntry("+H.b(J.ag(this.a))+": "+H.b(J.ag(this.b))+")"}} + P.k.prototype={ + gG:function(a){return P.e.prototype.gG.call(C.bD,this)}, + l:function(a){return"null"}} + P.e.prototype={constructor:P.e,$ie:1, + N:function(a,b){return this===b}, + gG:function(a){return H.cj(this)}, + l:function(a){return"Instance of '"+H.b(H.ju(this))+"'"}, + bb:function(a,b){throw H.c(P.nS(this,b.gcN(),b.gcR(),b.gcO()))}, + toString:function(){return this.l(this)}} + P.fr.prototype={ + l:function(a){return""}, + $iam:1} + P.a9.prototype={ + gi:function(a){return this.a.length}, + l:function(a){var s=this.a + return s.charCodeAt(0)==0?s:s}} + P.kN.prototype={ + $2:function(a,b){throw H.c(P.K("Illegal IPv4 address, "+a,this.a,b))}, + $S:126} + P.kO.prototype={ + $2:function(a,b){throw H.c(P.K("Illegal IPv6 address, "+a,this.a,b))}, + $1:function(a){return this.$2(a,null)}, + $S:68} + P.kP.prototype={ + $2:function(a,b){var s + if(b-a>4)this.a.$2("an IPv6 part can only contain a maximum of 4 hex digits",a) + s=P.cr(C.a.t(this.b,a,b),16) + if(s<0||s>65535)this.a.$2("each part must be in the range of `0x0..0xFFFF`",a) + return s}, + $S:70} + P.e2.prototype={ + gct:function(){var s,r,q,p=this,o=p.x + if(o==null){o=p.a + s=o.length!==0?o+":":"" + r=p.c + q=r==null + if(!q||o==="file"){o=s+"//" + s=p.b + if(s.length!==0)o=o+s+"@" + if(!q)o+=r + s=p.d + if(s!=null)o=o+":"+H.b(s)}else o=s + o+=p.e + s=p.f + if(s!=null)o=o+"?"+s + s=p.r + if(s!=null)o=o+"#"+s + o=o.charCodeAt(0)==0?o:o + if(p.x==null)p.x=o + else o=H.a2(H.nM("Field '_text' has been assigned during initialization."))}return o}, + gG:function(a){var s=this,r=s.z + if(r==null){r=C.a.gG(s.gct()) + if(s.z==null)s.z=r + else r=H.a2(H.nM("Field 'hashCode' has been assigned during initialization."))}return r}, + gcX:function(){return this.b}, + gbJ:function(){var s=this.c + if(s==null)return"" + if(C.a.V(s,"["))return C.a.t(s,1,s.length-1) + return s}, + gbR:function(){var s=this.d + return s==null?P.ow(this.a):s}, + gbT:function(){var s=this.f + return s==null?"":s}, + gbF:function(){var s=this.r + return s==null?"":s}, + gcI:function(){return this.a.length!==0}, + gbG:function(){return this.c!=null}, + gbI:function(){return this.f!=null}, + gbH:function(){return this.r!=null}, + gcH:function(){return C.a.V(this.e,"/")}, + l:function(a){return this.gct()}, + N:function(a,b){var s=this + if(b==null)return!1 + if(s===b)return!0 + return t.n.b(b)&&s.a===b.gc1()&&s.c!=null===b.gbG()&&s.b===b.gcX()&&s.gbJ()===b.gbJ()&&s.gbR()===b.gbR()&&s.e===b.gcP()&&s.f!=null===b.gbI()&&s.gbT()===b.gbT()&&s.r!=null===b.gbH()&&s.gbF()===b.gbF()}, + $iaY:1, + gc1:function(){return this.a}, + gcP:function(){return this.e}} + P.kL.prototype={ + gbd:function(a){var s,r,q,p,o=this,n=null,m=o.c + if(m==null){m=o.a + s=o.b[0]+1 + r=C.a.b7(m,"?",s) + q=m.length + if(r>=0){p=P.e3(m,r+1,q,C.x,!1) + q=r}else p=n + m=o.c=new P.fg("data","",n,n,P.e3(m,s,q,C.am,!1),p,n)}return m}, + gax:function(){var s=this.b,r=s[0]+1,q=s[1] + if(r===q)return"text/plain" + return P.uy(this.a,r,q,C.a3,!1)}, + cB:function(){var s,r,q,p,o,n,m,l,k=this.a,j=this.b,i=C.d.gaH(j)+1 + if((j.length&1)===1)return C.b6.dU(k,i) + j=k.length + s=j-i + for(r=i;r=0){n=p+1 + q[p]=l + r=m + p=n + continue}}throw H.c(P.K("Invalid percent escape",k,r))}p=n}return q}, + l:function(a){var s=this.a + return this.b[0]===-1?"data:"+s:s}} + P.lP.prototype={ + $1:function(a){return new Uint8Array(96)}, + $S:71} + P.lO.prototype={ + $2:function(a,b){var s=this.a[a] + J.rt(s,0,96,b) + return s}, + $S:82} + P.lQ.prototype={ + $3:function(a,b,c){var s,r + for(s=b.length,r=0;r>>0]=c}, + $S:16} + P.fp.prototype={ + gcI:function(){return this.b>0}, + gbG:function(){return this.c>0}, + gbI:function(){return this.fr?C.a.t(this.a,r,s-1):""}, + gbJ:function(){var s=this.c + return s>0?C.a.t(this.a,s,this.d):""}, + gbR:function(){var s=this + if(s.c>0&&s.d+1s)b.k($.qy(),H.a([l,s],t.M),"count") + s=m.f + r=s.d + s.f=n.j(0,r) + k.push("indices") + q=m.e + m=q.d + if(m!==-1){n=q.r=n.j(0,m) + if(n==null)b.k($.N(),H.a([m],t.M),o) + else{n.P(C.v,o,b) + if(q.r.Q!==-1)b.p($.mv(),o) + n=q.f + if(n!==-1)M.bm(q.e,Z.b_(n),Z.b_(n)*l,q.r,m,b)}}k.pop() + k.push("values") + if(r!==-1){n=s.f + if(n==null)b.k($.N(),H.a([r],t.M),o) + else{n.P(C.v,o,b) + if(s.f.Q!==-1)b.p($.mv(),o) + n=p.dy + m=C.l.j(0,p.ch) + if(m==null)m=0 + M.bm(s.e,n,n*m*l,s.f,r,b)}}k.pop() + k.pop()}}, + P:function(a,b,c){var s + this.a$=!0 + s=this.k2 + if(s==null)this.k2=a + else if(s!==a)c.k($.pW(),H.a([s,a],t.M),b)}, + ex:function(a){var s=this.k1 + if(s==null)this.k1=a + else if(s!==a)return!1 + return!0}, + ed:function(a){var s,r,q=this + if(!q.cx||5126===q.z){a.toString + return a}s=q.dy*8 + r=q.z + if(r===5120||r===5122||r===5124)return Math.max(a/(C.c.aA(1,s-1)-1),-1) + else return a/(C.c.aA(1,s)-1)}} + M.fb.prototype={ + ac:function(){var s=this + return P.bK(function(){var r=0,q=2,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0 + return function $async$ac(a1,a2){if(a1===1){p=a2 + r=q}while(true)switch(r){case 0:a0=s.z + if(a0===-1||s.Q===-1||s.ch==null){r=1 + break}o=s.ga7() + n=s.Q + m=s.fr + if(m!=null){m=m.cx + if((m==null?null:m.Q)==null){r=1 + break}if(s.gal()n){r=1 + break}n=m.e + m=n.e + e=n.f + if(M.bm(m,Z.b_(e),Z.b_(e)*f,n.r,null,null)){d=s.dy + c=C.l.j(0,s.ch) + if(c==null)c=0 + c=!M.bm(k,d,d*c*f,l.f,null,null) + d=c}else d=!0 + if(d){r=1 + break}n=n.r + b=M.mz(e,n.cx.Q.buffer,n.y+m,f) + l=l.f + a=M.ny(a0,l.cx.Q.buffer,l.y+k,f*o) + if(b==null||a==null){r=1 + break}g=new M.l9(s,b,g,o,a).$0()}r=3 + return P.lv(g) + case 3:case 1:return P.bF() + case 2:return P.bG(p)}}},t.e)}, + bf:function(){var s=this + return P.bK(function(){var r=0,q=1,p,o,n,m,l + return function $async$bf(a,b){if(a===1){p=b + r=q}while(true)switch(r){case 0:m=s.dy*8 + l=s.z + l=l===5120||l===5122||l===5124 + o=t.F + r=l?2:4 + break + case 2:l=C.c.aA(1,m-1) + n=s.ac() + n.toString + r=5 + return P.lv(H.ja(n,new M.l4(1/(l-1)),n.$ti.h("i.E"),o)) + case 5:r=3 + break + case 4:l=C.c.aA(1,m) + n=s.ac() + n.toString + r=6 + return P.lv(H.ja(n,new M.l5(1/(l-1)),n.$ti.h("i.E"),o)) + case 6:case 3:return P.bF() + case 1:return P.bG(p)}}},t.F)}} + M.l6.prototype={ + $0:function(){var s=this + return P.bK(function(){var r=0,q=1,p,o,n,m,l,k,j,i,h + return function $async$$0(a,b){if(a===1){p=b + r=q}while(true)switch(r){case 0:o=s.a,n=s.c,m=s.b,l=s.d,k=s.e,j=0,i=0,h=0 + case 2:if(!(jn){r=1 + break}n=m.e + m=n.e + e=n.f + if(M.bm(m,Z.b_(e),Z.b_(e)*f,n.r,null,null)){d=s.dy + c=C.l.j(0,s.ch) + if(c==null)c=0 + c=!M.bm(k,d,d*c*f,l.f,null,null) + d=c}else d=!0 + if(d){r=1 + break}n=n.r + b=M.mz(e,n.cx.Q.buffer,n.y+m,f) + l=l.f + a=M.nx(a0,l.cx.Q.buffer,l.y+k,f*o) + if(b==null||a==null){r=1 + break}g=new M.l3(s,b,g,o,a).$0()}r=3 + return P.lv(g) + case 3:case 1:return P.bF() + case 2:return P.bG(p)}}},t.F)}, + bf:function(){return this.ac()}} + M.l0.prototype={ + $0:function(){var s=this + return P.bK(function(){var r=0,q=1,p,o,n,m,l,k,j,i,h + return function $async$$0(a,b){if(a===1){p=b + r=q}while(true)switch(r){case 0:o=s.a,n=s.c,m=s.b,l=s.d,k=s.e,j=0,i=0,h=0 + case 2:if(!(jd)r.b[c]=d + if(d0){l=$.n8() + k=o+"/min/"+m + a.k(l,H.a([p[m],q[m]],n),k)}}return!0}} + M.eE.prototype={ + Y:function(a,b,c,d){var s,r=this + if(b===c||r.b[c]r.c[c]){s=r.a + s[c]=s[c]+1}return!0}, + aw:function(a){var s,r,q,p,o,n,m,l,k,j=this + for(s=j.b,r=s.length,q=j.c,p=j.a,o=j.d,n=t.M,m=0;m0){l=$.n7() + k=o+"/max/"+m + a.k(l,H.a([p[m],q[m]],n),k)}}return!0}} + M.eH.prototype={ + Y:function(a,b,c,d){var s,r=this + if(b===c||r.b[c]>d)r.b[c]=d + if(d0){l=$.n8() + k=o+"/min/"+m + a.k(l,H.a([p[m],q[m]],n),k)}}return!0}} + M.eF.prototype={ + Y:function(a,b,c,d){var s,r=this + if(b===c||r.b[c]r.c[c]){s=r.a + s[c]=s[c]+1}return!0}, + aw:function(a){var s,r,q,p,o,n,m,l,k,j=this + for(s=j.b,r=s.length,q=j.c,p=j.a,o=j.d,n=t.M,m=0;m0){l=$.n7() + k=o+"/max/"+m + a.k(l,H.a([p[m],q[m]],n),k)}}return!0}} + Z.bn.prototype={ + v:function(a,b){var s,r,q,p,o,n=this,m="samplers",l=n.y + if(l==null||n.x==null)return + s=b.c + s.push(m) + l.a9(new Z.fH(b,a)) + s.pop() + s.push("channels") + n.x.a9(new Z.fI(n,b,a)) + s.pop() + s.push(m) + for(r=l.b,l=l.a,q=l.length,p=0;p=q + if(!(o?null:l[p]).a$)b.X($.fD(),p)}s.pop()}} + Z.fH.prototype={ + $2:function(a,b){var s,r,q,p,o="input",n="output",m=this.a,l=m.c + l.push(C.c.l(a)) + s=this.b.f + r=b.d + b.r=s.j(0,r) + q=b.f + b.x=s.j(0,q) + if(r!==-1){s=b.r + if(s==null)m.k($.N(),H.a([r],t.M),o) + else{s.P(C.b_,o,m) + s=b.r.fr + if(s!=null)s.P(C.v,o,m) + l.push(o) + p=V.d2(b.r) + if(!p.N(0,C.A))m.E($.q_(),H.a([p,H.a([C.A],t.p)],t.M)) + else m.W(b.r,new Z.ei(m.O())) + s=b.r + if(s.db==null||s.cy==null)m.R($.q1()) + if(b.e==="CUBICSPLINE"&&b.r.Q<2)m.E($.q0(),H.a(["CUBICSPLINE",2,b.r.Q],t.M)) + l.pop()}}if(q!==-1){s=b.x + if(s==null)m.k($.N(),H.a([q],t.M),n) + else{s.P(C.b0,n,m) + s=b.x.fr + if(s!=null)s.P(C.v,n,m) + b.x.ex("CUBICSPLINE"===b.e)}}l.pop()}, + $S:35} + Z.fI.prototype={ + $2:function(a,a0){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=null,d="sampler",c=this.b,b=c.c + b.push(C.c.l(a)) + s=this.a + r=a0.d + a0.f=s.y.j(0,r) + q=a0.e + p=q!=null + if(p){o=q.d + q.f=this.c.db.j(0,o) + if(o!==-1){b.push("target") + n=q.f + if(n==null)c.k($.N(),H.a([o],t.M),"node") + else{n.a$=!0 + switch(q.e){case"translation":case"rotation":case"scale":if(n.Q!=null)c.R($.pX()) + if(q.f.id!=null)c.p($.qz(),"path") + break + case"weights":o=n.fy + o=o==null?e:o.x + o=o==null?e:o.gcF(o) + if((o==null?e:o.fx)==null)c.R($.pY()) + break}}b.pop()}}if(r!==-1){o=a0.f + if(o==null)c.k($.N(),H.a([r],t.M),d) + else{o.a$=!0 + if(p&&o.x!=null){r=q.e + if(r==="rotation"){m=o.x + if(m.ga7()===4){b.push(d) + o=c.O() + n=5126===m.z?e:m.gbP() + c.W(m,new Z.dp("CUBICSPLINE"===a0.f.e,n,o,t.ed)) + b.pop()}o=a0.f + o.x.toString}l=V.d2(o.x) + k=C.cS.j(0,r) + if((k==null?e:C.d.F(k,l))===!1)c.k($.q3(),H.a([l,k,r],t.M),d) + o=a0.f + n=o.r + if(n!=null&&n.Q!==-1&&o.x.Q!==-1&&o.e!=null){j=n.Q + if(o.e==="CUBICSPLINE")j*=3 + if(r==="weights"){r=q.f + r=r==null?e:r.fy + r=r==null?e:r.x + r=r==null?e:r.gcF(r) + r=r==null?e:r.fx + i=r==null?e:r.length + j*=i==null?0:i}if(j!==0&&j!==a0.f.x.Q)c.k($.q2(),H.a([j,a0.f.x.Q],t.M),d)}}}for(h=a+1,s=s.x,r=s.b,o=t.M,s=s.a,n=s.length;h=n + f=(g?e:s[h]).e + g=f!=null&&q.d===f.d&&q.e==f.e}else g=!1 + if(g)c.k($.pZ(),H.a([h],o),"target")}b.pop()}}, + $S:36} + Z.b1.prototype={} + Z.bT.prototype={} + Z.b2.prototype={} + Z.ei.prototype={ + Y:function(a,b,c,d){var s=this + if(d<0)a.k($.pf(),H.a([b,d],t.M),s.b) + else{if(b!==0&&d<=s.a)a.k($.pg(),H.a([b,d,s.a],t.M),s.b) + s.a=d}return!0}} + Z.dp.prototype={ + Y:function(a,b,c,d){var s,r,q=this + if(!q.a||4===(4&q.d)){s=q.b + r=s!=null?s.$1(d):d + s=q.e+r*r + q.e=s + if(3===c){if(Math.abs(Math.sqrt(s)-1)>0.00769)a.k($.ph(),H.a([b-3,b,Math.sqrt(q.e)],t.M),q.c) + q.e=0}}if(++q.d===12)q.d=0 + return!0}} + T.bo.prototype={ + gb8:function(){var s,r=this.f + if(r!=null){s=$.bj().b + s=!s.test(r)}else s=!0 + if(s)return 0 + return P.cr($.bj().aG(r).b[1],null)}, + gbO:function(){var s,r=this.f + if(r!=null){s=$.bj().b + s=!s.test(r)}else s=!0 + if(s)return 0 + return P.cr($.bj().aG(r).b[2],null)}, + gcM:function(){var s,r=this.r + if(r!=null){s=$.bj().b + s=!s.test(r)}else s=!0 + if(s)return 2 + return P.cr($.bj().aG(r).b[1],null)}, + geb:function(){var s,r=this.r + if(r!=null){s=$.bj().b + s=!s.test(r)}else s=!0 + if(s)return 0 + return P.cr($.bj().aG(r).b[2],null)}} + Q.aN.prototype={} + V.bp.prototype={ + P:function(a,b,c){var s + this.a$=!0 + s=this.cy + if(s==null)this.cy=a + else if(s!==a)c.k($.q5(),H.a([s,a],t.M),b)}, + v:function(a,b){var s,r=this,q=r.x,p=r.cx=a.y.j(0,q) + r.db=r.Q + s=r.ch + if(s===34962)r.cy=C.F + else if(s===34963)r.cy=C.X + if(q!==-1)if(p==null)b.k($.N(),H.a([q],t.M),"buffer") + else{p.a$=!0 + p=p.y + if(p!==-1){s=r.y + if(s>=p)b.k($.ne(),H.a([q,p],t.M),"byteOffset") + else if(s+r.z>p)b.k($.ne(),H.a([q,p],t.M),"byteLength")}}}} + G.bq.prototype={} + G.bV.prototype={} + G.bW.prototype={} + V.da.prototype={ + ez:function(a){var s,r,q,p,o + new V.i3(this,a).$1(this.fy) + s=a.r + for(r=s.length,q=a.c,p=0;p")),0,a,c.h("L<0*>"))}i.b.$0() + s=h.j(0,a) + if(t.o.b(s)){h=J.M(s) + r=i.c + q=c.h("p<0*>") + p=c.h("L<0*>") + if(h.ga3(s)){o=h.gi(s) + n=new Array(o) + n.fixed$length=Array + q=H.a(n,q) + n=r.c + n.push(a) + for(m=t.M,l=t.t,k=0;k")),0,a,c.h("L<0*>"))}}, + $2:function(a,b){return this.$1$2(a,b,t.z)}, + $S:37} + V.i2.prototype={ + $1$3$req:function(a,b,c,d){var s,r + this.a.$0() + s=this.c + r=F.n_(this.b,a,s,!0) + if(r==null)return null + s.c.push(a) + return b.$2(r,s)}, + $2:function(a,b){return this.$1$3$req(a,b,!1,t.z)}, + $1$2:function(a,b,c){return this.$1$3$req(a,b,!1,c)}, + $S:38} + V.hZ.prototype={ + $2:function(a,b){var s,r,q,p,o,n=this.a,m=n.c + m.push(a.c) + s=this.b + a.a9(new V.i_(n,s)) + r=n.f.j(0,b) + if(r!=null){q=J.eA(m.slice(0),H.U(m).c) + for(p=J.a_(r);p.n();){o=p.gq() + C.d.si(m,0) + C.d.K(m,o.b) + o.a.v(s,n)}C.d.si(m,0) + C.d.K(m,q)}m.pop()}, + $S:39} + V.i_.prototype={ + $2:function(a,b){var s=this.a,r=s.c + r.push(C.c.l(a)) + b.v(this.b,s) + r.pop()}, + $S:40} + V.hX.prototype={ + $2:function(a,b){var s,r + if(t.v.b(b)){s=this.a + r=s.c + r.push(a) + b.v(this.b,s) + r.pop()}}, + $S:6} + V.hY.prototype={ + $2:function(a,b){var s,r,q,p=this + if(!b.k1&&b.fx==null&&b.fy==null&&b.fr==null&&b.a.a===0&&b.b==null)p.a.X($.qU(),a) + if(b.go!=null){s=p.b + s.cz(0) + for(r=b;r.go!=null;)if(s.B(0,r))r=r.go + else{if(r===b)p.a.X($.qg(),a) + break}}if(b.id!=null){if(b.go!=null)p.a.X($.qZ(),a) + s=b.Q + if(s==null||s.cK()){s=b.cx + if(s!=null){s=s.a + s=s[0]===0&&s[1]===0&&s[2]===0}else s=!0 + if(s){s=b.cy + if(s!=null){s=s.a + s=s[0]===0&&s[1]===0&&s[2]===0&&s[3]===1}else s=!0 + if(s){s=b.db + if(s!=null){s=s.a + s=s[0]===1&&s[1]===1&&s[2]===1}else s=!0}else s=!1}else s=!1}else s=!1 + if(!s)p.a.X($.qY(),a) + q=b.id.cy.b5(0,new V.hV(),new V.hW()) + if(q!=null){s=q.dy + s=!b.dy.b4(0,s.gcA(s))}else s=!1 + if(s)p.a.X($.qX(),a)}}, + $S:29} + V.hV.prototype={ + $1:function(a){return a.go==null}, + $S:43} + V.hW.prototype={ + $0:function(){return null}, + $S:2} + V.i3.prototype={ + $1:function(a){var s=this.b,r=s.c + C.d.si(r,0) + r.push(a.c) + a.a9(new V.i4(this.a,s)) + r.pop()}, + $S:44} + V.i4.prototype={ + $2:function(a,b){var s=this.b,r=s.c + r.push(C.c.l(a)) + b.bY(this.a,s) + r.pop()}, + $S:45} + V.kQ.prototype={ + ge7:function(){return this.a$}} + V.o.prototype={ + v:function(a,b){}, + $it:1} + V.es.prototype={} + V.fk.prototype={} + T.aO.prototype={ + v:function(a,b){var s,r="bufferView",q=this.x + if(q!==-1){s=this.ch=a.z.j(0,q) + if(s==null)b.k($.N(),H.a([q],t.M),r) + else{s.P(C.b4,r,b) + if(this.ch.Q!==-1)b.p($.q6(),r)}}}, + ew:function(){var s,r=this.ch,q=r==null?null:r.cx + if((q==null?null:q.Q)!=null)try{this.Q=H.mH(r.cx.Q.buffer,r.y,r.z)}catch(s){if(!(H.E(s) instanceof P.ak))throw s}}} + Y.aS.prototype={ + v:function(a,b){var s=this,r=new Y.jb(b,a) + r.$2(s.x,"pbrMetallicRoughness") + r.$2(s.y,"normalTexture") + r.$2(s.z,"occlusionTexture") + r.$2(s.Q,"emissiveTexture")}} + Y.jb.prototype={ + $2:function(a,b){var s,r + if(a!=null){s=this.a + r=s.c + r.push(b) + a.v(this.b,s) + r.pop()}}, + $S:46} + Y.ci.prototype={ + v:function(a,b){var s,r=this.e + if(r!=null){s=b.c + s.push("baseColorTexture") + r.v(a,b) + s.pop()}r=this.x + if(r!=null){s=b.c + s.push("metallicRoughnessTexture") + r.v(a,b) + s.pop()}}} + Y.ch.prototype={} + Y.cg.prototype={} + Y.bB.prototype={ + v:function(a,b){var s,r=this,q=r.d,p=r.f=a.fy.j(0,q) + if(q!==-1)if(p==null)b.k($.N(),H.a([q],t.M),"index") + else p.a$=!0 + for(q=b.e,s=r;s!=null;){s=q.j(0,s) + if(s instanceof Y.aS){s.dx.m(0,b.O(),r.e) + break}}}} + V.bU.prototype={ + l:function(a){return this.a}} + V.bS.prototype={ + l:function(a){return this.a}} + V.u.prototype={ + l:function(a){var s="{"+H.b(this.a)+", "+H.b(C.ao.j(0,this.b)) + return s+(this.c?" normalized":"")+"}"}, + N:function(a,b){if(b==null)return!1 + return b instanceof V.u&&b.a==this.a&&b.b===this.b&&b.c===this.c}, + gG:function(a){return A.oG(A.fy(A.fy(A.fy(0,J.aL(this.a)),C.c.gG(this.b)),C.bC.gG(this.c)))}} + S.aT.prototype={ + v:function(a,b){var s,r=b.c + r.push("primitives") + s=this.x + if(s!=null)s.a9(new S.jl(b,a)) + r.pop()}} + S.jl.prototype={ + $2:function(a,b){var s=this.a,r=s.c + r.push(C.c.l(a)) + b.v(this.b,s) + r.pop()}, + $S:20} + S.aH.prototype={ + geu:function(){switch(this.r){case 4:return C.c.bA(this.dy,3) + case 5:case 6:var s=this.dy + return s>2?s-2:0 + default:return 0}}, + v:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h=this,g="attributes",f="indices",e=h.d + if(e!=null){s=b.c + s.push(g) + e.J(0,new S.jg(h,a,b)) + s.pop()}e=h.e + if(e!==-1){s=h.fy=a.f.j(0,e) + if(s==null)b.k($.N(),H.a([e],t.M),f) + else{h.dy=s.Q + s.P(C.b2,f,b) + e=h.fy.fr + if(e!=null)e.P(C.X,f,b) + e=b.c + e.push(f) + s=h.fy.fr + if(s!=null&&s.Q!==-1)b.R($.qb()) + r=V.d2(h.fy) + if(!C.d.F(C.af,r))b.E($.qa(),H.a([r,C.af],t.M)) + else{s=h.fr + q=s!==-1?s-1:-1 + s=h.r + p=s!==-1?C.c.aA(1,s):-1 + if(p!==0&&q>=-1){s=h.fy + o=b.O() + n=C.c.bA(h.dy,3) + m=h.fy.z + l=new Uint32Array(3) + b.W(s,new S.ev(q,n,Z.pb(m),16===(16&p),l,o))}}e.pop()}}e=h.dy + if(e!==-1){s=h.r + if(!(s===1&&e%2!==0))if(!((s===2||s===3)&&e<2))if(!(s===4&&e%3!==0))e=(s===5||s===6)&&e<3 + else e=!0 + else e=!0 + else e=!0}else e=!1 + if(e)b.E($.q9(),H.a([h.dy,C.c7[h.r]],t.M)) + e=h.f + h.go=a.cx.j(0,e) + k=P.nO(h.db,new S.jh(),!1,t.e) + if(e!==-1){s=h.go + if(s==null)b.k($.N(),H.a([e],t.M),"material") + else{s.a$=!0 + s.dx.J(0,new S.ji(h,b,k))}}for(e=C.d.gC(k),s=new H.cm(e,new S.jj(),H.U(k).h("cm<1>")),o=b.c;s.n();){n=e.gq() + o.push(g) + b.p($.fD(),"TEXCOORD_"+H.b(n)) + o.pop()}e=h.x + if(e!=null){s=b.c + s.push("targets") + o=new Array(e.length) + o.fixed$length=Array + h.fx=H.a(o,t.ar) + for(o=t.X,n=t.W,j=0;j1)c.p($.q8(),b)}}} + S.jc.prototype={ + $1:function(a){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=this + if(a.length!==0&&C.a.H(a,0)===95)return + switch(a){case"POSITION":e.a.c=!0 + break + case"NORMAL":e.a.b=!0 + break + case"TANGENT":e.a.a=!0 + break + default:s=a.split("_") + r=s[0] + if(!C.d.F(C.bY,r)||s.length!==2){e.b.p($.mw(),a) + break}q=s[1] + q.toString + p=new H.cu(q) + if(p.gi(p)===0){o=0 + n=!1}else{m=q.length + if(m===1){o=C.a.H(q,0)-48 + n=!(o<0||o>9)||!1}else{o=0 + l=0 + while(!0){if(!(l=0)j=l===0&&k===0 + else j=!0 + else j=!0 + if(j){n=!1 + break}o=10*o+k;++l}}}if(n)switch(r){case"COLOR":q=e.a;++q.d + i=q.e + q.e=o>i?o:i + break + case"JOINTS":q=e.a;++q.f + h=q.r + q.r=o>h?o:h + break + case"TEXCOORD":q=e.a;++q.z + g=q.Q + q.Q=o>g?o:g + break + case"WEIGHTS":q=e.a;++q.x + f=q.y + q.y=o>f?o:f + break}else e.b.p($.mw(),a)}}, + $S:21} + S.jd.prototype={ + $3:function(a,b,c){var s=a+1 + if(s!==b){this.a.E($.qK(),H.a([c,s,b],t.M)) + return 0}return b}, + $S:49} + S.je.prototype={ + $1:function(a){var s=this.a + if(!s.k3.w(a)&&!J.rE(a,"_"))s.p($.mw(),a)}, + $S:21} + S.jg.prototype={ + $2:function(a,b){var s,r,q,p,o,n,m,l=this + if(b===-1)return + s=l.b.f.j(0,b) + if(s==null){l.c.k($.N(),H.a([b],t.M),a) + return}r=l.a + r.dx.m(0,a,s) + q=l.c + s.P(C.W,a,q) + p=s.fr + if(p!=null)p.P(C.F,a,q) + if(a==="POSITION")p=s.db==null||s.cy==null + else p=!1 + if(p)q.p($.nh(),"POSITION") + o=V.d2(s) + n=q.k2.j(0,H.a(a.split("_"),t.s)[0]) + if(n!=null)if(!n.F(0,o))q.k($.ng(),H.a([o,n],t.M),a) + else if(a==="NORMAL"){p=q.c + p.push("NORMAL") + m=q.O() + q.W(s,new F.f4(m,5126===s.z?null:s.gbP())) + p.pop()}else if(a==="TANGENT"){p=q.c + p.push("TANGENT") + m=q.O() + q.W(s,new F.f5(m,5126===s.z?null:s.gbP())) + p.pop()}else if(C.a.V(a,"COLOR_")&&5126===s.z){p=q.c + p.push(a) + q.W(s,new F.en(q.O())) + p.pop()}p=s.y + if(!(p!==-1&&p%4!==0))if(s.ga8()%4!==0){p=s.fr + p=p!=null&&p.Q===-1}else p=!1 + else p=!0 + if(p)q.p($.nf(),a) + p=r.fr + if(p===-1)r.dy=r.fr=s.Q + else if(p!==s.Q)q.p($.qf(),a) + p=s.fr + if(p!=null&&p.Q===-1){if(p.db===-1)p.db=s.ga8() + r.c7(s,a,q)}}, + $S:7} + S.jh.prototype={ + $1:function(a){return a}, + $S:18} + S.ji.prototype={ + $2:function(a,b){if(b!==-1)if(b+1>this.a.db)this.b.k($.qe(),H.a([a,b],t.M),"material") + else this.c[b]=-1}, + $S:7} + S.jj.prototype={ + $1:function(a){return a!==-1}, + $S:8} + S.jk.prototype={ + $2:function(a,b){var s,r,q,p,o,n,m=this + if(b===-1)return + s=m.b.f.j(0,b) + if(s==null)m.c.k($.N(),H.a([b],t.M),a) + else{r=m.c + s.P(C.W,a,r) + q=s.fr + if(q!=null)q.P(C.F,a,r) + p=m.a.dx.j(0,a) + if(p==null)r.p($.qd(),a) + else if(p.Q!==s.Q)r.p($.qc(),a) + if(a==="POSITION")q=s.db==null||s.cy==null + else q=!1 + if(q)r.p($.nh(),"POSITION") + o=V.d2(s) + n=r.k3.j(0,a) + if(n!=null&&!n.F(0,o))r.k($.ng(),H.a([o,n],t.M),a) + q=s.y + if(!(q!==-1&&q%4!==0))if(s.ga8()%4!==0){q=s.fr + q=q!=null&&q.Q===-1}else q=!1 + else q=!0 + if(q)r.p($.nf(),a) + q=s.fr + if(q!=null&&q.Q===-1){if(q.db===-1)q.db=s.ga8() + m.a.c7(s,a,r)}}m.a.fx[m.d].m(0,a,s)}, + $S:7} + S.jf.prototype={ + $0:function(){return P.aR(t.W)}, + $S:52} + S.ev.prototype={ + Y:function(a,b,c,d){var s,r,q=this,p=q.a + if(d>p)a.k($.pi(),H.a([b,d,p],t.M),q.cy) + if(d===q.c)a.k($.pj(),H.a([d,b],t.M),q.cy) + if(q.x){p=q.cx + s=q.Q + p[s]=d;++s + q.Q=s + if(s===3){q.Q=0 + s=p[0] + r=p[1] + if(s!==r){p=p[2] + p=r===p||p===s}else p=!0 + if(p)++q.ch}}return!0}, + aw:function(a){var s=this.ch + if(s>0)a.k($.pk(),H.a([s,this.b],t.M),this.cy) + return!0}} + V.ah.prototype={ + v:function(a,b){var s,r,q,p=this,o=p.x + p.fr=a.Q.j(0,o) + s=p.z + p.id=a.fx.j(0,s) + r=p.ch + p.fy=a.cy.j(0,r) + if(o!==-1){q=p.fr + if(q==null)b.k($.N(),H.a([o],t.M),"camera") + else q.a$=!0}if(s!==-1){o=p.id + if(o==null)b.k($.N(),H.a([s],t.M),"skin") + else o.a$=!0}if(r!==-1){o=p.fy + if(o==null)b.k($.N(),H.a([r],t.M),"mesh") + else{o.a$=!0 + o=o.x + if(o!=null){s=p.dx + if(s!=null){o=o.j(0,0).fx + o=o==null?null:o.length + o=o!==s.length}else o=!1 + if(o){o=$.qk() + s=s.length + r=p.fy.x.j(0,0).fx + b.k(o,H.a([s,r==null?null:r.length],t.M),"weights")}if(p.id!=null){o=p.fy.x + if(o.b4(o,new V.jo()))b.R($.qi())}else{o=p.fy.x + if(o.bC(o,new V.jp()))b.R($.qj())}}}}o=p.y + if(o!=null){s=new Array(o.gi(o)) + s.fixed$length=Array + s=H.a(s,t.R) + p.fx=s + F.n4(o,s,a.db,"children",b,new V.jq(p,b))}}, + c5:function(a,b){var s,r,q,p,o=this + o.dy.B(0,a) + if(o.fx==null||!b.B(0,o))return + for(s=o.fx,r=s.length,q=0;q")),"/") + if(s)p.pop() + p=r.a + r.a="" + return p.charCodeAt(0)==0?p:p}, + O:function(){return this.c0(null)}, + e4:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f=this,e="/extensionsUsed/" + C.d.K(f.cx,a) + for(s=J.M(a),r=f.db,q=f.fx,p=C.d3.a,o=t.M,n=J.M(b),m=0;m0&&p.fy.length===s){p.z=!0 + throw H.c(C.b7)}o=o.c + r=o!=null?o.j(0,n):null + if(f!=null)p.fy.push(new E.cA(a,r,null,f,b)) + else{q=c!=null?C.c.l(c):d + o=e?"":p.c0(q) + p.fy.push(new E.cA(a,r,o,null,b))}}, + p:function(a,b){return this.a6(a,null,null,b,!1,null)}, + E:function(a,b){return this.a6(a,b,null,null,!1,null)}, + k:function(a,b,c){return this.a6(a,b,null,c,!1,null)}, + R:function(a){return this.a6(a,null,null,null,!1,null)}, + av:function(a,b,c){return this.a6(a,b,null,null,c,null)}, + X:function(a,b){return this.a6(a,null,b,null,!1,null)}, + aE:function(a,b,c){return this.a6(a,b,c,null,!1,null)}, + bB:function(a,b){return this.a6(a,null,null,null,!1,b)}, + a_:function(a,b,c){return this.a6(a,b,null,null,!1,c)}} + M.fS.prototype={ + $1:function(a){return a.a}, + $S:55} + M.fR.prototype={ + $0:function(){return H.a([],t.gd)}, + $S:56} + M.fT.prototype={ + $1:function(a){var s + a.toString + s=H.pa(a,"~","~0") + return H.pa(s,"/","~1")}, + $S:57} + M.fW.prototype={ + $1:function(a){return a.a===this.a}, + $S:22} + M.fX.prototype={ + $0:function(){return C.d.b5(C.ak,new M.fU(this.a),new M.fV())}, + $S:59} + M.fU.prototype={ + $1:function(a){return a.a===this.a}, + $S:22} + M.fV.prototype={ + $0:function(){return null}, + $S:2} + M.fY.prototype={ + $2:function(a,b){this.a.Q.m(0,new D.c1(a,this.b.a),b)}, + $S:60} + M.c4.prototype={$ia3:1} + Y.dK.prototype={ + l:function(a){return this.b}} + Y.dy.prototype={ + l:function(a){return this.b}} + Y.cL.prototype={ + l:function(a){return this.b}} + Y.c2.prototype={ + l:function(a){return this.b}} + Y.c3.prototype={} + Y.i7.prototype={ + $1:function(a){var s,r,q,p=this.a + if(!p.c)if(J.X(a)<9){p.a.I() + this.b.M(C.a2) + return}else{s=Y.tc(a) + r=p.a + q=this.b + switch(s){case C.aB:p.b=new Y.ij(q,r) + break + case C.aC:s=new Uint8Array(13) + p.b=new Y.jr(C.r,C.p,s,new Uint8Array(32),q,r) + break + case C.aD:p.b=new Y.kZ(new Uint8Array(30),q,r) + break + default:r.I() + q.M(C.bf) + return}p.c=!0}p.b.B(0,a)}, + $S:23} + Y.i9.prototype={ + $1:function(a){this.a.a.I() + this.b.M(a)}, + $S:24} + Y.i8.prototype={ + $0:function(){var s=this.a.b + s.b.I() + s=s.a + if(s.a.a===0)s.M(C.a2)}, + $C:"$0", + $R:0, + $S:2} + Y.i6.prototype={ + $2:function(a,b){var s,r,q + for(s=b.length,r=J.M(a),q=0;q>>0 + i.c=2 + break + case 2:o=i.e+p + i.e=o + if(o<2)throw H.c(C.bA) + if(h.$1(i.d)){o=i.e + i.r=new Uint8Array(o-2)}i.c=3 + break + case 3:q=Math.min(s.gi(a)-r,i.e-i.f-2) + o=h.$1(i.d) + n=i.f + m=n+q + if(o){o=i.r + i.f=m;(o&&C.j).a0(o,n,m,a,r) + if(i.f===i.e-2){i.b.I() + a=i.r + l=a[0] + s=a[1] + o=a[2] + n=a[3] + m=a[4] + k=a[5] + if(k===3)j=C.n + else j=k===1?C.a5:C.I + i.a.T(new Y.c3("image/jpeg",l,j,(n<<8|m)>>>0,(s<<8|o)>>>0,C.p,C.r,!1,!1)) + return}}else{i.f=m + if(m===i.e-2)i.c=255}r+=q + continue}++r}}} + Y.il.prototype={ + $1:function(a){return(a&240)===192&&a!==196&&a!==200&&a!==204||a===222}, + $S:8} + Y.ik.prototype={ + $1:function(a){return!(a===1||(a&248)===208||a===216||a===217||a===255)}, + $S:8} + Y.jr.prototype={ + B:function(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=this,d=new Y.js(e) + for(s=J.M(b),r=e.dx,q=e.db,p=0,o=0;p!==s.gi(b);){n=s.j(b,p) + switch(e.y){case 0:p+=8 + e.y=1 + continue + case 1:e.c=(e.c<<8|n)>>>0 + if(++e.d===4)e.y=2 + break + case 2:m=(e.e<<8|n)>>>0 + e.e=m + if(++e.f===4){switch(m){case 1229472850:if(e.c!==13){e.b.I() + s=e.a + if(s.a.a===0)s.M(C.o) + return}e.z=!0 + break + case 1951551059:e.Q=!0 + break + case 1665684045:if(e.c!==32){e.b.I() + s=e.a + if(s.a.a===0)s.M(C.o) + return}break + case 1934772034:if(e.c!==1){e.b.I() + s=e.a + if(s.a.a===0)s.M(C.o) + return}break + case 1883789683:if(e.c!==9){e.b.I() + s=e.a + if(s.a.a===0)s.M(C.o) + return}break + case 1732332865:if(e.c!==4){e.b.I() + s=e.a + if(s.a.a===0)s.M(C.o) + return}break + case 1766015824:e.ch=C.z + e.cx=C.y + break + case 1229209940:e.b.I() + if(!e.z)e.a.M(C.bz) + s=q.buffer + b=new DataView(s,0) + l=b.getUint32(0,!1) + k=b.getUint32(4,!1) + j=b.getUint8(8) + switch(b.getUint8(9)){case 0:i=e.Q?C.a6:C.a5 + break + case 2:case 3:i=e.Q?C.w:C.n + break + case 4:i=C.a6 + break + case 6:i=C.w + break + default:i=C.I}s=e.cx + if(s===C.p)s=e.cx=C.q + r=e.ch + if(r===C.r)r=e.ch=C.t + e.a.T(new Y.c3("image/png",j,i,l,k,s,r,e.cy,!1)) + return}if(e.c===0)e.y=4 + else e.y=3}break + case 3:m=s.gi(b) + h=e.c + g=e.x + o=Math.min(m-p,h-g) + switch(e.e){case 1229472850:m=g+o + e.x=m + C.j.a0(q,g,m,b,p) + break + case 1665684045:case 1732332865:case 1883789683:m=g+o + e.x=m + C.j.a0(r,g,m,b,p) + break + case 1934772034:e.ch=C.t + e.cx=C.q + e.x=g+1 + break + default:e.x=g+o}if(e.x===e.c){switch(e.e){case 1665684045:if(e.cx===C.p)e.da() + break + case 1732332865:if(e.ch===C.r)e.dc() + break + case 1883789683:m=r.buffer + f=new DataView(m,0) + if(f.getUint32(0,!1)!==f.getUint32(4,!1))e.cy=!0 + break}e.y=4}p+=o + continue + case 4:if(++e.r===4){d.$0() + e.y=1}break}++p}}, + dc:function(){var s=this + if(s.ch===C.t)return + switch(H.jm(s.dx.buffer,0,null).getUint32(0,!1)){case 45455:s.ch=C.t + break + case 1e5:s.ch=C.dx + break + default:s.ch=C.z}}, + da:function(){var s,r=this + if(r.cx===C.q)return + s=H.jm(r.dx.buffer,0,null) + if(s.getUint32(0,!1)===31270&&s.getUint32(4,!1)===32900&&s.getUint32(8,!1)===64e3&&s.getUint32(12,!1)===33e3&&s.getUint32(16,!1)===3e4&&s.getUint32(20,!1)===6e4&&s.getUint32(24,!1)===15e3&&s.getUint32(28,!1)===6000)r.cx=C.q + else r.cx=C.y}} + Y.js.prototype={ + $0:function(){var s=this.a + s.r=s.x=s.f=s.e=s.d=s.c=0}, + $S:1} + Y.kZ.prototype={ + B:function(a,b){var s,r,q,p,o,n,m,l=this,k=J.X(b),j=l.d,i=l.c + k=j+Math.min(k,30-j) + l.d=k + C.j.d0(i,j,k,b) + k=l.d + if(k>=25)k=k<30&&i[15]!==76 + else k=!0 + if(k)return + l.b.I() + s=H.jm(i.buffer,0,null) + if(s.getUint32(0,!1)!==1380533830||s.getUint32(8,!1)!==1464156752){l.c3(C.a7) + return}switch(s.getUint32(12,!1)){case 1448097824:r=s.getUint16(26,!0)&16383 + q=s.getUint16(28,!0)&16383 + p=C.n + o=!1 + n=!1 + break + case 1448097868:k=i[21] + j=i[22] + r=1+((k|(j&63)<<8)>>>0) + k=i[23] + i=i[24] + q=1+((j>>>6|k<<2|(i&15)<<10)>>>0) + p=(i&16)===16?C.w:C.n + o=!1 + n=!1 + break + case 1448097880:m=i[20] + n=(m&2)===2 + o=(m&32)===32 + p=(m&16)===16?C.w:C.n + r=((i[24]|i[25]<<8|i[26]<<16)>>>0)+1 + q=((i[27]|i[28]<<8|i[29]<<16)>>>0)+1 + break + default:l.c3(C.a7) + return}k=o?C.z:C.t + j=o?C.y:C.q + l.a.T(new Y.c3("image/webp",8,p,r,q,j,k,!1,n))}, + c3:function(a){var s + this.b.I() + s=this.a + if(s.a.a===0)s.M(a)}} + Y.dw.prototype={$ia3:1} + Y.dv.prototype={$ia3:1} + Y.aP.prototype={ + l:function(a){return this.a}, + $ia3:1} + N.cR.prototype={ + l:function(a){return this.b}} + N.eX.prototype={ + bc:function(){var s,r=this,q=t.X,p=t._,o=P.a5(q,p) + o.m(0,"pointer",r.a) + s=r.b + if(s!=null)o.m(0,"mimeType",s) + s=r.c + if(s!=null)o.m(0,"storage",C.c6[s.a]) + s=r.e + if(s!=null)o.m(0,"uri",s) + s=r.d + if(s!=null)o.m(0,"byteLength",s) + s=r.f + if(s==null)q=null + else{q=P.a5(q,p) + q.m(0,"width",s.d) + q.m(0,"height",s.e) + p=s.c + if(p!==C.I)q.m(0,"format",C.cI[p.a]) + p=s.f + if(p!==C.p)q.m(0,"primaries",C.cB[p.a]) + p=s.r + if(p!==C.r)q.m(0,"transfer",C.cA[p.a]) + p=s.b + if(p>0)q.m(0,"bits",p)}if(q!=null)o.m(0,"image",q) + return o}} + N.jw.prototype={ + aJ:function(){var s=!0 + return this.e9()}, + e9:function(){var s=0,r=P.ec(t.H),q,p=2,o,n=[],m=this,l,k,j + var $async$aJ=P.ee(function(a,b){if(a===1){o=b + s=p}while(true)switch(s){case 0:k=!0 + p=4 + s=7 + return P.cV(m.aY(),$async$aJ) + case 7:s=8 + return P.cV(m.aZ(),$async$aJ) + case 8:if(k)O.wb(m.a,m.b) + m.a.ez(m.b) + p=2 + s=6 + break + case 4:p=3 + j=o + if(H.E(j) instanceof M.c4){s=1 + break}else throw j + s=6 + break + case 3:s=2 + break + case 6:case 1:return P.e6(q,r) + case 2:return P.e5(o,r)}}) + return P.e7($async$aJ,r)}, + aY:function(){var s=0,r=P.ec(t.H),q=1,p,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6 + var $async$aY=P.ee(function(a7,a8){if(a7===1){p=a8 + s=q}while(true)switch(s){case 0:a3=n.b + a4=a3.c + C.d.si(a4,0) + a4.push("buffers") + i=n.a.y,h=i.b,g=a3.dy,f=t.M,e=t.y,d=t.a,i=i.a,c=i.length,b=0 + case 2:if(!(b=c + m=a?null:i[b] + if(m==null){s=3 + break}a4.push(C.c.l(b)) + a0=new N.eX(a3.O()) + a0.b="application/gltf-buffer" + l=new N.jx(n,a0,b) + k=null + q=6 + a6=d + s=9 + return P.cV(l.$1(m),$async$aY) + case 9:k=a6.a(a8) + q=1 + s=8 + break + case 6:q=5 + a5=p + a=H.E(a5) + if(e.b(a)){j=a + a3.k($.mt(),H.a([j],f),"uri")}else throw a5 + s=8 + break + case 5:s=1 + break + case 8:if(k!=null){a0.d=J.X(k) + if(J.X(k)a2)a3.E($.py(),H.a([J.X(k)-a2],f))}a=m + if(a.Q==null)a.Q=k}}g.push(a0.bc()) + a4.pop() + case 3:++b + s=2 + break + case 4:return P.e6(null,r) + case 1:return P.e5(p,r)}}) + return P.e7($async$aY,r)}, + aZ:function(){var s=0,r=P.ec(t.H),q=1,p,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1,a2,a3,a4,a5,a6,a7 + var $async$aZ=P.ee(function(a9,b0){if(a9===1){p=b0 + s=q}while(true)switch(s){case 0:a5=n.b + a6=a5.c + C.d.si(a6,0) + a6.push("images") + f=n.a.ch,e=f.b,d=a5.dy,c=t.M,b=t.y,a=a5.k1,f=f.a,a0=f.length,a1=0 + case 2:if(!(a1=a0 + m=a2?null:f[a1] + if(m==null){s=3 + break}a6.push(C.c.l(a1)) + a3=new N.eX(a5.O()) + l=new N.jy(n,a3) + k=null + try{k=l.$1(m)}catch(a8){a2=H.E(a8) + if(b.b(a2)){j=a2 + a5.k($.mt(),H.a([j],c),"uri")}else throw a8}i=null + s=k!=null?5:6 + break + case 5:q=8 + s=11 + return P.cV(Y.td(k),$async$aZ) + case 11:i=b0 + a2=i + if(!C.d.F(a,a2.a))a5.E($.pC(),H.a([i.a],c)) + q=1 + s=10 + break + case 8:q=7 + a7=p + a2=H.E(a7) + if(a2 instanceof Y.dw)a5.R($.pF()) + else if(a2 instanceof Y.dv)a5.R($.pE()) + else if(a2 instanceof Y.aP){h=a2 + a5.E($.pz(),H.a([h],c))}else if(b.b(a2)){g=a2 + a5.k($.mt(),H.a([g],c),"uri")}else throw a7 + s=10 + break + case 7:s=1 + break + case 10:if(i!=null){a3.b=i.a + if(m.y!=null&&m.y!==i.a)a5.E($.pB(),H.a([i.a,m.y],c)) + a2=i.d + if(a2!==0&&(a2&a2-1)>>>0===0){a2=i.e + a2=!(a2!==0&&(a2&a2-1)>>>0===0)}else a2=!0 + if(a2)a5.E($.pD(),H.a([i.d,i.e],c)) + a2=i + if(a2.f===C.y||a2.r===C.z||i.y||i.x)a5.R($.pA()) + m.cx=i + a3.f=i}case 6:d.push(a3.bc()) + a6.pop() + case 3:++a1 + s=2 + break + case 4:return P.e6(null,r) + case 1:return P.e5(p,r)}}) + return P.e7($async$aZ,r)}} + N.jx.prototype={ + $1:function(a){var s,r,q,p=this + if(a.a.a===0){s=a.x + if(s!=null){r=p.b + r.c=C.aF + r.e=s.l(0) + return p.a.c.$1(s)}else{s=a.Q + if(s!=null){p.b.c=C.aE + return s}else{s=p.a + r=s.b + if(r.id&&p.c===0&&!a.z){p.b.c=C.dA + q=s.c.$0() + if(q==null)r.R($.q4()) + return q}}}}return null}, + $S:64} + N.jy.prototype={ + $1:function(a){var s,r,q=this + if(a.a.a===0){s=a.z + if(s!=null){r=q.b + r.c=C.aF + r.e=s.l(0) + return q.a.d.$1(s)}else{s=a.Q + if(s!=null&&a.y!=null){q.b.c=C.aE + return P.mI(H.a([s],t.d),t.w)}else if(a.ch!=null){q.b.c=C.dz + a.ew() + s=a.Q + if(s!=null)return P.mI(H.a([s],t.d),t.w)}}}return null}, + $S:65} + O.mq.prototype={ + $2:function(a,b){var s,r,q,p,o,n,m,l,k=O.lX(b) + if((k==null?null:k.dx)!=null){k=this.a + s=k.c + C.d.si(s,0) + s.push("accessors") + s.push(C.c.l(a)) + r=b.dx.ge3() + if(r!=null)for(s=r.length,q=b.Q,p=t.M,o=0,n=-1,m=0;m=q)k.k($.ps(),H.a([o,l,q],p),"sparse");++o}}}, + $S:66} + O.mr.prototype={ + $1:function(a){return a.cx===0}, + $S:3} + O.ms.prototype={ + $2:function(a,b){var s,r,q,p,o,n,m,l,k=this,j=b.fr,i=b.cx,h=new Array(i) + h.fixed$length=Array + s=H.a(h,t.fK) + h=new Array(i) + h.fixed$length=Array + r=H.a(h,t.e2) + h=t.hc + p=b.dx + o=0 + while(!0){if(!(o")) + l=m.bf() + r[o]=new P.aB(l.a(),H.r(l).h("aB<1>"));++o}if(q)return + i=k.b + h=i.c + h.push(C.c.l(a)) + h.push("attributes") + p=k.c + C.d.K(p,s) + C.d.K(p,r) + i=i.O() + p=k.a + k.d.push(new O.ey(s,r,p.b-1,p.a,i,P.aR(t.e))) + h.pop() + h.pop()}, + $S:20} + O.lZ.prototype={ + $1:function(a){return a.gq()==null}, + $S:67} + O.ey.prototype={ + dR:function(a){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e=this + for(s=e.a,r=s.length,q=e.b,p=e.c,o=e.e,n=t.M,m=e.Q,l=e.d,k=0;kp){i=$.pp() + h=o+"/JOINTS_"+k + a.k(i,H.a([e.f,e.r,j,p,l],n),h) + continue}g=q[k].gq() + if(g!==0){if(!m.B(0,j)){i=$.po() + h=o+"/JOINTS_"+k + a.k(i,H.a([e.f,e.r,j],n),h) + f=!1}else f=!0 + if(g<0){i=$.pu() + h=o+"/WEIGHTS_"+k + a.k(i,H.a([e.f,e.r,g],n),h)}else if(f){i=e.y + h=$.nr() + h[0]=i+g + e.y=h[0] + e.z+=2e-7}}else if(j!==0){i=$.pq() + h=o+"/JOINTS_"+k + a.k(i,H.a([e.f,e.r,j],n),h)}}if(4===++e.r){if(Math.abs(e.y-1)>e.z)for(k=0;k= "+H.b(a[2])+"."}, + $S:0} + E.hp.prototype={ + $1:function(a){return"Matrix element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") contains invalid value: "+H.b(a[2])+"."}, + $S:0} + E.hv.prototype={ + $1:function(a){return"Image data is invalid. "+H.b(a[0])}, + $S:0} + E.hu.prototype={ + $1:function(a){return"Recognized image format "+("'"+H.b(a[0])+"'")+" does not match declared image format "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.h2.prototype={ + $1:function(a){return"Unexpected end of image stream."}, + $S:0} + E.h3.prototype={ + $1:function(a){return"Image format not recognized."}, + $S:0} + E.h4.prototype={ + $1:function(a){return"'"+H.b(a[0])+"' MIME type requires an extension."}, + $S:0} + E.ht.prototype={ + $1:function(a){return"Image has non-power-of-two dimensions: "+H.b(a[0])+"x"+H.b(a[1])+"."}, + $S:0} + E.hs.prototype={ + $1:function(a){return"Image contains unsupported features like non-default colorspace information, non-square pixels, or animation."}, + $S:0} + E.h7.prototype={ + $1:function(a){return"Data URI is used in GLB container."}, + $S:0} + E.hn.prototype={ + $1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has value "+H.b(a[2])+" that is greater than the maximum joint index ("+H.b(a[3])+") set by skin "+H.b(a[4])+"."}, + $S:0} + E.hc.prototype={ + $1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has value "+H.b(a[2])+" that is already in use for the vertex."}, + $S:0} + E.h1.prototype={ + $1:function(a){return"Weights accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") has negative value "+H.b(a[2])+"."}, + $S:0} + E.h_.prototype={ + $1:function(a){return"Weights accessor elements (at indices "+H.b(a[0])+".."+H.b(a[1])+") have non-normalized sum: "+H.b(a[2])+"."}, + $S:0} + E.h0.prototype={ + $1:function(a){return"Joints accessor element at index "+H.b(a[0])+" (component index "+H.b(a[1])+") is used with zero weight but has non-zero value ("+H.b(a[2])+")."}, + $S:0} + E.ia.prototype={} + E.ib.prototype={ + $1:function(a){return J.ag(a[0])}, + $S:0} + E.jA.prototype={} + E.jK.prototype={ + $1:function(a){return"Invalid array length "+H.b(a[0])+". Valid lengths are: "+J.bl(t.Y.a(a[1]),E.oT(),t.X).l(0)+"."}, + $S:0} + E.jL.prototype={ + $1:function(a){var s=a[0] + return"Type mismatch. Array element "+H.b(typeof s=="string"?"'"+s+"'":J.ag(s))+" is not a "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.jQ.prototype={ + $1:function(a){return"Duplicate element."}, + $S:0} + E.jO.prototype={ + $1:function(a){return"Index must be a non-negative integer."}, + $S:0} + E.jI.prototype={ + $1:function(a){return"Invalid JSON data. Parser output: "+H.b(a[0])}, + $S:0} + E.jE.prototype={ + $1:function(a){return"Invalid URI "+("'"+H.b(a[0])+"'")+". Parser output:\n"+H.b(a[1])}, + $S:0} + E.jM.prototype={ + $1:function(a){return"Entity cannot be empty."}, + $S:0} + E.jF.prototype={ + $1:function(a){a.toString + return"Exactly one of "+new H.a8(a,E.d0(),H.U(a).h("a8<1,f*>")).l(0)+" properties must be defined."}, + $S:0} + E.jP.prototype={ + $1:function(a){return"Value "+("'"+H.b(a[0])+"'")+" does not match regexp pattern "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.jB.prototype={ + $1:function(a){var s=a[0] + return"Type mismatch. Property value "+H.b(typeof s=="string"?"'"+s+"'":J.ag(s))+" is not a "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.jJ.prototype={ + $1:function(a){var s=a[0] + return"Invalid value "+H.b(typeof s=="string"?"'"+s+"'":J.ag(s))+". Valid values are "+J.bl(t.Y.a(a[1]),E.oT(),t.X).l(0)+"."}, + $S:0} + E.jD.prototype={ + $1:function(a){return"Value "+H.b(a[0])+" is out of range."}, + $S:0} + E.jG.prototype={ + $1:function(a){return"Value "+H.b(a[0])+" is not a multiple of "+H.b(a[1])+"."}, + $S:0} + E.jC.prototype={ + $1:function(a){return"Property "+("'"+H.b(a[0])+"'")+" must be defined."}, + $S:0} + E.jN.prototype={ + $1:function(a){return"Unexpected property."}, + $S:0} + E.jH.prototype={ + $1:function(a){return"Dependency failed. "+("'"+H.b(a[0])+"'")+" must be defined."}, + $S:0} + E.jR.prototype={} + E.kp.prototype={ + $1:function(a){return"Unknown glTF major asset version: "+H.b(a[0])+"."}, + $S:0} + E.ko.prototype={ + $1:function(a){return"Unknown glTF minor asset version: "+H.b(a[0])+"."}, + $S:0} + E.ke.prototype={ + $1:function(a){return"Asset minVersion "+("'"+H.b(a[0])+"'")+" is greater than version "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.kc.prototype={ + $1:function(a){return"Invalid value "+H.b(a[0])+" for GL type "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.kd.prototype={ + $1:function(a){return"Integer value is written with fractional part: "+H.b(a[0])+"."}, + $S:0} + E.kb.prototype={ + $1:function(a){return"Only (u)byte and (u)short accessors can be normalized."}, + $S:0} + E.k9.prototype={ + $1:function(a){return"Offset "+H.b(a[0])+" is not a multiple of componentType length "+H.b(a[1])+"."}, + $S:0} + E.ka.prototype={ + $1:function(a){return"Matrix accessors must be aligned to 4-byte boundaries."}, + $S:0} + E.kk.prototype={ + $1:function(a){return"Sparse accessor overrides more elements ("+H.b(a[0])+") than the base accessor contains ("+H.b(a[1])+")."}, + $S:0} + E.kl.prototype={ + $1:function(a){return"Animated TRS properties will not affect a skinned mesh."}, + $S:0} + E.k8.prototype={ + $1:function(a){return"Buffer's Data URI MIME-Type must be 'application/octet-stream' or 'application/gltf-buffer'. Found "+("'"+H.b(a[0])+"'")+" instead."}, + $S:0} + E.k7.prototype={ + $1:function(a){return"Buffer view's byteStride ("+H.b(a[0])+") is greater than byteLength ("+H.b(a[1])+")."}, + $S:0} + E.k6.prototype={ + $1:function(a){return"Only buffer views with raw vertex data can have byteStride."}, + $S:0} + E.k5.prototype={ + $1:function(a){return"xmag and ymag must not be zero."}, + $S:0} + E.k3.prototype={ + $1:function(a){return"yfov should be less than Pi."}, + $S:0} + E.k2.prototype={ + $1:function(a){return"zfar must be greater than znear."}, + $S:0} + E.k0.prototype={ + $1:function(a){return"Alpha cutoff is supported only for 'MASK' alpha mode."}, + $S:0} + E.jV.prototype={ + $1:function(a){return"Invalid attribute name."}, + $S:0} + E.kz.prototype={ + $1:function(a){return"All primitives must have the same number of morph targets."}, + $S:0} + E.ky.prototype={ + $1:function(a){return"All primitives should contain the same number of 'JOINTS' and 'WEIGHTS' attribute sets."}, + $S:0} + E.k_.prototype={ + $1:function(a){return"No POSITION attribute found."}, + $S:0} + E.jX.prototype={ + $1:function(a){return"Indices for indexed attribute semantic "+("'"+H.b(a[0])+"'")+" must start with 0 and be continuous. Total expected indices: "+H.b(a[1])+", total provided indices: "+H.b(a[2])+"."}, + $S:0} + E.jZ.prototype={ + $1:function(a){return"TANGENT attribute without NORMAL found."}, + $S:0} + E.jW.prototype={ + $1:function(a){return"Number of JOINTS attribute semantics ("+H.b(a[0])+") does not match the number of WEIGHTS ("+H.b(a[1])+")."}, + $S:0} + E.jY.prototype={ + $1:function(a){return"TANGENT attribute defined for POINTS rendering mode."}, + $S:0} + E.kx.prototype={ + $1:function(a){return"The length of weights array ("+H.b(a[0])+u.p+H.b(a[1])+")."}, + $S:0} + E.kv.prototype={ + $1:function(a){return"A node can have either a matrix or any combination of translation/rotation/scale (TRS) properties."}, + $S:0} + E.kq.prototype={ + $1:function(a){return"Do not specify default transform matrix."}, + $S:0} + E.kf.prototype={ + $1:function(a){return"Matrix must be decomposable to TRS."}, + $S:0} + E.kw.prototype={ + $1:function(a){return"Rotation quaternion must be normalized."}, + $S:0} + E.kr.prototype={ + $1:function(a){return"Unused extension "+("'"+H.b(a[0])+"'")+" cannot be required."}, + $S:0} + E.ks.prototype={ + $1:function(a){return"Extension "+("'"+H.b(a[0])+"'")+" cannot be optional."}, + $S:0} + E.kt.prototype={ + $1:function(a){return"Extension uses unreserved extension prefix "+("'"+H.b(a[0])+"'")+"."}, + $S:0} + E.ku.prototype={ + $1:function(a){return"Extension name has invalid format."}, + $S:0} + E.kj.prototype={ + $1:function(a){return"Empty node encountered."}, + $S:0} + E.ki.prototype={ + $1:function(a){return"Node with a skinned mesh is not root. Parent transforms will not affect a skinned mesh."}, + $S:0} + E.kh.prototype={ + $1:function(a){return"Local transforms will not affect a skinned mesh."}, + $S:0} + E.kg.prototype={ + $1:function(a){return"A node with a skinned mesh is used in a scene that does not contain joint nodes."}, + $S:0} + E.kn.prototype={ + $1:function(a){return"Joints do not have a common root."}, + $S:0} + E.km.prototype={ + $1:function(a){return"Skeleton node is not a common root."}, + $S:0} + E.k1.prototype={ + $1:function(a){return"Non-relative URI found: "+("'"+H.b(a[0])+"'")+"."}, + $S:0} + E.jT.prototype={ + $1:function(a){return"This extension may be incompatible with other extensions for the object."}, + $S:0} + E.jS.prototype={ + $1:function(a){return"Prefer JSON Objects for extras."}, + $S:0} + E.k4.prototype={ + $1:function(a){return"This property should not be defined as it will not be used."}, + $S:0} + E.jU.prototype={ + $1:function(a){return"outerConeAngle ("+H.b(a[1])+") is less than or equal to innerConeAngle ("+H.b(a[0])+")."}, + $S:0} + E.ir.prototype={} + E.j0.prototype={ + $1:function(a){return"Accessor's total byteOffset "+H.b(a[0])+" isn't a multiple of componentType length "+H.b(a[1])+"."}, + $S:0} + E.j5.prototype={ + $1:function(a){return"Referenced bufferView's byteStride value "+H.b(a[0])+" is less than accessor element's length "+H.b(a[1])+"."}, + $S:0} + E.iQ.prototype={ + $1:function(a){return"Accessor (offset: "+H.b(a[0])+", length: "+H.b(a[1])+") does not fit referenced bufferView ["+H.b(a[2])+"] length "+H.b(a[3])+"."}, + $S:0} + E.iC.prototype={ + $1:function(a){return"Override of previously set accessor usage. Initial: "+("'"+H.b(a[0])+"'")+", new: "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.j6.prototype={ + $1:function(a){return"Animation channel has the same target as channel "+H.b(a[0])+"."}, + $S:0} + E.iy.prototype={ + $1:function(a){return"Animation channel cannot target TRS properties of a node with defined matrix."}, + $S:0} + E.ix.prototype={ + $1:function(a){return"Animation channel cannot target WEIGHTS when mesh does not have morph targets."}, + $S:0} + E.iA.prototype={ + $1:function(a){return"accessor.min and accessor.max must be defined for animation input accessor."}, + $S:0} + E.iB.prototype={ + $1:function(a){return"Invalid Animation sampler input accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+"."}, + $S:0} + E.iw.prototype={ + $1:function(a){return"Invalid animation sampler output accessor format "+("'"+H.b(a[0])+"'")+" for path "+("'"+H.b(a[2])+"'")+". Must be one of "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+"."}, + $S:0} + E.iz.prototype={ + $1:function(a){return"Animation sampler output accessor with "+("'"+H.b(a[0])+"'")+" interpolation must have at least "+H.b(a[1])+" elements. Got "+H.b(a[2])+"."}, + $S:0} + E.iv.prototype={ + $1:function(a){return"Animation sampler output accessor of count "+H.b(a[0])+" expected. Found "+H.b(a[1])+"."}, + $S:0} + E.iF.prototype={ + $1:function(a){return"Buffer refers to an unresolved GLB binary chunk."}, + $S:0} + E.iD.prototype={ + $1:function(a){return"BufferView does not fit buffer ("+H.b(a[0])+") byteLength ("+H.b(a[1])+")."}, + $S:0} + E.j4.prototype={ + $1:function(a){return"Override of previously set bufferView target or usage. Initial: "+("'"+H.b(a[0])+"'")+", new: "+("'"+H.b(a[1])+"'")+"."}, + $S:0} + E.iE.prototype={ + $1:function(a){return"bufferView.byteStride must not be defined for buffer views containing image data."}, + $S:0} + E.iX.prototype={ + $1:function(a){return"Accessor of count "+H.b(a[0])+" expected. Found "+H.b(a[1])+"."}, + $S:0} + E.iI.prototype={ + $1:function(a){return"Invalid accessor format "+("'"+H.b(a[0])+"'")+" for this attribute semantic. Must be one of "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+"."}, + $S:0} + E.iJ.prototype={ + $1:function(a){return"accessor.min and accessor.max must be defined for POSITION attribute accessor."}, + $S:0} + E.iG.prototype={ + $1:function(a){return"bufferView.byteStride must be defined when two or more accessors use the same buffer view."}, + $S:0} + E.iH.prototype={ + $1:function(a){return"Vertex attribute data must be aligned to 4-byte boundaries."}, + $S:0} + E.iP.prototype={ + $1:function(a){return"bufferView.byteStride must not be defined for indices accessor."}, + $S:0} + E.iO.prototype={ + $1:function(a){return"Invalid indices accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+". "}, + $S:0} + E.iN.prototype={ + $1:function(a){return"Number of vertices or indices ("+H.b(a[0])+") is not compatible with used drawing mode ("+("'"+H.b(a[1])+"'")+")."}, + $S:0} + E.iM.prototype={ + $1:function(a){return"Material is incompatible with mesh primitive: Texture binding "+("'"+H.b(a[0])+"'")+" needs 'TEXCOORD_"+H.b(a[1])+"' attribute."}, + $S:0} + E.iR.prototype={ + $1:function(a){return"All accessors of the same primitive must have the same count."}, + $S:0} + E.iL.prototype={ + $1:function(a){return"No base accessor for this attribute semantic."}, + $S:0} + E.iK.prototype={ + $1:function(a){return"Base accessor has different count."}, + $S:0} + E.j3.prototype={ + $1:function(a){return"Node is a part of a node loop."}, + $S:0} + E.iS.prototype={ + $1:function(a){return"Value overrides parent of node "+H.b(a[0])+"."}, + $S:0} + E.iV.prototype={ + $1:function(a){var s="The length of weights array ("+H.b(a[0])+u.p,r=a[1] + return s+H.b(r==null?0:r)+")."}, + $S:0} + E.iU.prototype={ + $1:function(a){return"Node has skin defined, but mesh has no joints data."}, + $S:0} + E.iT.prototype={ + $1:function(a){return"Node uses skinned mesh, but has no skin defined."}, + $S:0} + E.iW.prototype={ + $1:function(a){return"Node "+H.b(a[0])+" is not a root node."}, + $S:0} + E.iY.prototype={ + $1:function(a){return"Invalid IBM accessor format "+("'"+H.b(a[0])+"'")+". Must be one of "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+". "}, + $S:0} + E.iZ.prototype={ + $1:function(a){return"bufferView.byteStride must not be defined for buffer views used by inverse bind matrices accessors."}, + $S:0} + E.iu.prototype={ + $1:function(a){return"Invalid MIME type "+("'"+H.b(a[0])+"'")+" for the texture source. Valid MIME types are "+J.bl(t.Y.a(a[1]),E.d0(),t.X).l(0)+"."}, + $S:0} + E.it.prototype={ + $1:function(a){return"Extension is not declared in extensionsUsed."}, + $S:0} + E.is.prototype={ + $1:function(a){return"Unexpected location for this extension."}, + $S:0} + E.j_.prototype={ + $1:function(a){return"Unresolved reference: "+H.b(a[0])+"."}, + $S:0} + E.j1.prototype={ + $1:function(a){return"Cannot validate an extension as it is not supported by the validator: "+("'"+H.b(a[0])+"'")+"."}, + $S:0} + E.j2.prototype={ + $1:function(a){return"This object may be unused."}, + $S:0} + E.hy.prototype={} + E.hE.prototype={ + $1:function(a){return"Invalid GLB magic value ("+H.b(a[0])+")."}, + $S:0} + E.hD.prototype={ + $1:function(a){return"Invalid GLB version value "+H.b(a[0])+"."}, + $S:0} + E.hC.prototype={ + $1:function(a){return"Declared GLB length ("+H.b(a[0])+") is too small."}, + $S:0} + E.hM.prototype={ + $1:function(a){return"Length of "+H.b(a[0])+" chunk is not aligned to 4-byte boundaries."}, + $S:0} + E.hA.prototype={ + $1:function(a){return"Declared length ("+H.b(a[0])+") does not match GLB length ("+H.b(a[1])+")."}, + $S:0} + E.hL.prototype={ + $1:function(a){return"Chunk ("+H.b(a[0])+") length ("+H.b(a[1])+") does not fit total GLB length."}, + $S:0} + E.hH.prototype={ + $1:function(a){return"Chunk ("+H.b(a[0])+") cannot have zero length."}, + $S:0} + E.hI.prototype={ + $1:function(a){return"Chunk of type "+H.b(a[0])+" has already been used."}, + $S:0} + E.hB.prototype={ + $1:function(a){return"Unexpected end of chunk header."}, + $S:0} + E.hz.prototype={ + $1:function(a){return"Unexpected end of chunk data."}, + $S:0} + E.hF.prototype={ + $1:function(a){return"Unexpected end of header."}, + $S:0} + E.hK.prototype={ + $1:function(a){return"First chunk must be of JSON type. Found "+H.b(a[0])+" instead."}, + $S:0} + E.hJ.prototype={ + $1:function(a){return"BIN chunk must be the second chunk."}, + $S:0} + E.hG.prototype={ + $1:function(a){return"Unknown GLB chunk type: "+H.b(a[0])+"."}, + $S:0} + E.cA.prototype={ + gba:function(){var s=J.rI(this.a.c.$1(this.e)) + return s}, + gG:function(a){return C.a.gG(this.l(0))}, + N:function(a,b){if(b==null)return!1 + return b instanceof E.cA&&b.l(0)===this.l(0)}, + l:function(a){var s=this,r=s.c + if(r!=null&&r.length!==0)return H.b(r)+": "+s.gba() + r=s.d + if(r!=null)return"@"+H.b(r)+": "+s.gba() + return s.gba()}} + D.c0.prototype={ + v:function(a,b){var s=this.d,r=this.e=a.ch.j(0,s) + if(s!==-1)if(r==null)b.k($.N(),H.a([s],t.M),"source") + else r.a$=!0}, + bY:function(a,b){var s,r=this.e + r=r==null?null:r.cx + s=r==null?null:r.a + if(s!=null&&s!=="image/webp")b.k($.ni(),H.a([s,C.cC],t.M),"source")}, + $ick:1} + X.bs.prototype={ + v:function(a,b){var s,r,q=b.c + q.push("lights") + s=this.d + r=J.eA(q.slice(0),H.U(q).c) + b.y.m(0,s,r) + s.a9(new X.iq(b,a)) + q.pop()}} + X.iq.prototype={ + $2:function(a,b){var s=this.a.c + s.push(C.c.l(a)) + s.pop()}, + $S:69} + X.b7.prototype={} + X.c6.prototype={} + X.c7.prototype={ + v:function(a,b){var s,r,q=a.a.j(0,"KHR_lights_punctual") + if(q instanceof X.bs){s=this.d + r=this.e=q.d.j(0,s) + if(s!==-1)if(r==null)b.k($.N(),H.a([s],t.M),"light") + else r.a$=!0}else b.E($.d1(),H.a(["/extensions/KHR_lights_punctual"],t.M))}} + B.c8.prototype={ + v:function(a,b){var s,r=this.e + if(r!=null){s=b.c + s.push("clearcoatTexture") + r.v(a,b) + s.pop()}r=this.r + if(r!=null){s=b.c + s.push("clearcoatRoughnessTexture") + r.v(a,b) + s.pop()}r=this.x + if(r!=null){s=b.c + s.push("clearcoatNormalTexture") + r.v(a,b) + s.pop()}}} + A.c9.prototype={ + v:function(a,b){var s,r=this.e + if(r!=null){s=b.c + s.push("diffuseTexture") + r.v(a,b) + s.pop()}r=this.x + if(r!=null){s=b.c + s.push("specularGlossinessTexture") + r.v(a,b) + s.pop()}}} + U.ca.prototype={ + v:function(a,b){var s,r=this.e + if(r!=null){s=b.c + s.push("sheenColorTexture") + r.v(a,b) + s.pop()}r=this.r + if(r!=null){s=b.c + s.push("sheenRoughnessTexture") + r.v(a,b) + s.pop()}}} + B.cb.prototype={ + v:function(a,b){var s,r=this.e + if(r!=null){s=b.c + s.push("transmissionTexture") + r.v(a,b) + s.pop()}}} + S.cc.prototype={} + L.cd.prototype={ + v:function(a,b){var s,r + for(s=b.e,r=this;r!=null;){r=s.j(0,r) + if(r instanceof Y.aS){r.dx.m(0,b.O(),this.r) + break}}}} + D.T.prototype={} + D.a4.prototype={} + D.c1.prototype={ + gG:function(a){var s=J.aL(this.a),r=J.aL(this.b) + return A.oG(A.fy(A.fy(0,C.c.gG(s)),C.c.gG(r)))}, + N:function(a,b){if(b==null)return!1 + return b instanceof D.c1&&this.b==b.b&&this.a==b.a}} + D.ce.prototype={} + D.eY.prototype={} + A.d9.prototype={ + bU:function(){var s=this,r=s.d=s.c.bM(s.gdn(),s.gdr(),s.gcg()),q=s.dy + q.e=r.gee() + q.f=r.geh() + q.r=new A.hP(s) + return s.e.a}, + aX:function(){this.d.I() + var s=this.e + if(s.a.a===0)s.T(new K.as("model/gltf-binary",null,this.fx))}, + dq:function(a0){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c=this,b="model/gltf-binary",a="0" + c.d.aK() + for(s=J.M(a0),r=t.f,q=t.G,p=t.M,o=c.a,n=0,m=0;n!==s.gi(a0);)switch(c.r){case 0:l=s.gi(a0) + k=c.x + m=Math.min(l-n,12-k) + l=k+m + c.x=l + C.j.a0(o,k,l,a0,n) + n+=m + c.y=m + if(c.x!==12)break + j=c.b.getUint32(0,!0) + if(j!==1179937895){c.f.a_($.pK(),H.a([j],p),0) + c.d.I() + s=c.e + if(s.a.a===0)s.T(new K.as(b,null,c.fx)) + return}i=c.b.getUint32(4,!0) + if(i!==2){c.f.a_($.pL(),H.a([i],p),4) + c.d.I() + s=c.e + if(s.a.a===0)s.T(new K.as(b,null,c.fx)) + return}l=c.z=c.b.getUint32(8,!0) + if(l<=c.y)c.f.a_($.pN(),H.a([l],p),8) + c.r=1 + c.x=0 + break + case 1:l=s.gi(a0) + k=c.x + m=Math.min(l-n,8-k) + l=k+m + c.x=l + C.j.a0(o,k,l,a0,n) + n+=m + c.y+=m + if(c.x!==8)break + c.ch=c.b.getUint32(0,!0) + l=c.b.getUint32(4,!0) + c.cx=l + if((c.ch&3)!==0){k=c.f + h=$.pG() + g=c.y + k.a_(h,H.a(["0x"+C.a.am(C.c.ap(l,16),8,a)],p),g-8)}if(c.y+c.ch>c.z)c.f.a_($.pH(),H.a(["0x"+C.a.am(C.c.ap(c.cx,16),8,a),c.ch],p),c.y-8) + if(c.Q===0&&c.cx!==1313821514)c.f.a_($.pS(),H.a(["0x"+C.a.am(C.c.ap(c.cx,16),8,a)],p),c.y-8) + l=c.cx + if(l===5130562&&c.Q>1&&!c.fr)c.f.a_($.pO(),H.a(["0x"+C.a.am(C.c.ap(l,16),8,a)],p),c.y-8) + f=new A.hN(c) + l=c.cx + switch(l){case 1313821514:if(c.ch===0){k=c.f + h=$.pJ() + g=c.y + k.a_(h,H.a(["0x"+C.a.am(C.c.ap(l,16),8,a)],p),g-8)}f.$1$seen(c.cy) + c.cy=!0 + break + case 5130562:f.$1$seen(c.fr) + c.fr=!0 + break + default:c.f.a_($.pT(),H.a(["0x"+C.a.am(C.c.ap(l,16),8,a)],p),c.y-8) + c.r=4294967295}++c.Q + c.x=0 + break + case 1313821514:m=Math.min(s.gi(a0)-n,c.ch-c.x) + if(c.db==null){l=c.dy + k=c.f + l=new K.cy(new P.an(l,H.r(l).h("an<1>")),new P.ax(new P.C($.x,r),q)) + l.e=k + c.db=l + c.dx=l.bU()}l=c.dy + e=n+m + k=s.Z(a0,n,e) + if(l.b>=4)H.a2(l.bl()) + h=l.b + if((h&1)!==0)l.ak(k) + else if((h&3)===0){l=l.aV() + k=new P.cn(k) + d=l.c + if(d==null)l.b=l.c=k + else{d.say(k) + l.c=k}}l=c.x+=m + c.y+=m + if(l===c.ch){c.dy.a2() + c.r=1 + c.x=0}n=e + break + case 5130562:l=s.gi(a0) + k=c.ch + m=Math.min(l-n,k-c.x) + l=c.fx + if(l==null)l=c.fx=new Uint8Array(k) + k=c.x + h=k+m + c.x=h + C.j.a0(l,k,h,a0,n) + n+=m + c.y+=m + if(c.x===c.ch){c.r=1 + c.x=0}break + case 4294967295:l=s.gi(a0) + k=c.ch + h=c.x + m=Math.min(l-n,k-h) + h+=m + c.x=h + n+=m + c.y+=m + if(h===k){c.r=1 + c.x=0}break}c.d.an()}, + ds:function(){var s,r,q=this + switch(q.r){case 0:q.f.bB($.pR(),q.y) + q.aX() + break + case 1:if(q.x!==0){q.f.bB($.pQ(),q.y) + q.aX()}else{s=q.z + r=q.y + if(s!==r)q.f.a_($.pM(),H.a([s,r],t.M),q.y) + s=q.dx + if(s!=null)s.ao(0,new A.hO(q),q.gcg(),t.P) + else q.e.T(new K.as("model/gltf-binary",null,q.fx))}break + default:if(q.ch>0)q.f.bB($.pP(),q.y) + q.aX()}}, + dt:function(a){var s + this.d.I() + s=this.e + if(s.a.a===0)s.M(a)}, + $iet:1} + A.hP.prototype={ + $0:function(){var s=this.a + if((s.dy.b&4)!==0)s.d.an() + else s.aX()}, + $S:2} + A.hN.prototype={ + $1$seen:function(a){var s=this.a + if(a){s.f.a_($.pI(),H.a(["0x"+C.a.am(C.c.ap(s.cx,16),8,"0")],t.M),s.y-8) + s.r=4294967295}else s.r=s.cx}, + $0:function(){return this.$1$seen(null)}, + $S:72} + A.hO.prototype={ + $1:function(a){var s=this.a,r=a==null?null:a.b + s.e.T(new K.as("model/gltf-binary",r,s.fx))}, + $S:73} + K.as.prototype={} + K.hS.prototype={ + $0:function(){return this.a.b.aK()}, + $S:1} + K.hT.prototype={ + $0:function(){return this.a.b.an()}, + $S:1} + K.hR.prototype={ + $0:function(){return this.a.b.I()}, + $S:74} + K.hU.prototype={ + $1:function(a){var s,r,q,p,o=this,n=null,m=o.a + if(!m.a){s=J.M(a) + if(s.gu(a)){m.b.I() + o.b.a2() + o.c.M(C.Z) + return}r=s.j(a,0) + if(103===r){s=o.b + q=o.d + p=new Uint8Array(12) + s=new A.d9(p,new P.an(s,H.r(s).h("an<1>")),new P.ax(new P.C($.x,t.f),t.G)) + q.id=!0 + s.f=q + s.b=H.jm(p.buffer,0,n) + s.dy=P.o6(n,n,n,t.w) + o.c.T(s) + m.a=!0}else{s=123===r||9===r||32===r||10===r||13===r||239===r + q=o.c + p=o.b + if(s){q.T(K.t9(new P.an(p,H.r(p).h("an<1>")),o.d)) + m.a=!0}else{m.b.I() + p.a2() + q.M(C.Z) + return}}}o.b.B(0,a)}, + $S:23} + K.cy.prototype={ + bU:function(){var s=this,r=H.a([],t.M),q=new P.a9("") + s.d=new P.lI(new P.fx(!1),new P.lw(C.a1.gcD().a,new P.fo(new K.hQ(s),r,t.cy),q),q) + s.b=s.a.bM(s.gdw(),s.gdA(),s.gdC()) + return s.c.a}, + dz:function(a){var s,r,q,p=this + p.b.aK() + if(p.f){r=J.M(a) + if(r.ga3(a)&&239===r.j(a,0))p.e.av($.fF(),H.a(["BOM found at the beginning of UTF-8 stream."],t.M),!0) + p.f=!1}try{p.d.dP(a,0,J.X(a),!1) + p.b.an()}catch(q){r=H.E(q) + if(r instanceof P.aD){s=r + p.e.av($.fF(),H.a([s],t.M),!0) + p.b.I() + p.c.b3()}else throw q}}, + dD:function(a){var s + this.b.I() + s=this.c + if(s.a.a===0)s.M(a)}, + dB:function(){var s,r,q,p=this + try{p.d.a2()}catch(r){q=H.E(r) + if(q instanceof P.aD){s=q + p.e.av($.fF(),H.a([s],t.M),!0) + p.b.I() + p.c.b3()}else throw r}}, + $iet:1} + K.hQ.prototype={ + $1:function(a){var s,r,q,p=a[0] + if(t.t.b(p))try{r=this.a + s=V.nI(p,r.e) + r.c.T(new K.as("model/gltf+json",s,null))}catch(q){if(H.E(q) instanceof M.c4){r=this.a + r.b.I() + r.c.b3()}else throw q}else{r=this.a + r.e.av($.Z(),H.a([p,"object"],t.M),!0) + r.b.I() + r.c.b3()}}, + $S:75} + K.db.prototype={ + l:function(a){return"Invalid data: could not detect glTF format."}, + $ia3:1} + F.m3.prototype={ + $2:function(a,b){this.a.$1(a) + if(!(H.aJ(b)&&b>=0)){this.b.m(0,a,-1) + this.c.p($.fE(),a)}}, + $S:6} + F.m4.prototype={ + $2:function(a,b){this.a.$1(a) + if(!(H.aJ(b)&&b>=0)){this.b.m(0,a,-1) + this.c.p($.fE(),a)}}, + $S:6} + F.m5.prototype={ + $1:function(a){return a.af(0,t.X,t.e)}, + $S:76} + F.m2.prototype={ + $0:function(){return H.a([],t.bH)}, + $S:77} + F.L.prototype={ + j:function(a,b){return b==null||b<0||b>=this.a.length?null:this.a[b]}, + m:function(a,b,c){this.a[b]=c}, + gi:function(a){return this.b}, + si:function(a,b){throw H.c(P.ab("Changing length is not supported"))}, + l:function(a){return P.id(this.a,"[","]")}, + a9:function(a){var s,r,q,p + for(s=this.b,r=this.a,q=0;q0.00674)a.k($.nb(),H.a([b-2,b,Math.sqrt(s.a)],t.M),s.b) + s.a=0}return!0}} + F.f5.prototype={ + Y:function(a,b,c,d){var s=this,r=s.c,q=r!=null?r.$1(d):d + if(3===c){if(1!==q&&-1!==q)a.k($.pn(),H.a([b-3,b,q],t.M),s.b)}else{r=s.a+q*q + s.a=r + if(2===c){if(Math.abs(Math.sqrt(r)-1)>0.00674)a.k($.nb(),H.a([b-2,b,Math.sqrt(s.a)],t.M),s.b) + s.a=0}}return!0}} + F.en.prototype={ + Y:function(a,b,c,d){if(1d)a.k($.pr(),H.a([b,d],t.M),this.a) + return!0}} + A.kW.prototype={ + bc:function(){var s,r,q,p,o,n,m,l,k,j,i,h,g=this,f=t.X,e=t._,d=P.a5(f,e),c=g.a + if(c!=null)d.m(0,"uri",c.l(0)) + c=g.c + s=c==null + if((s?null:c.a)!=null)d.m(0,"mimeType",s?null:c.a) + d.m(0,"validatorVersion","2.0.0-dev.3.3") + if(g.d)d.m(0,"validatedAt",new P.d5(Date.now(),!1).es().er()) + c=g.b + r=c.fy + q=P.a5(f,e) + p=H.a([0,0,0,0],t.V) + s=new Array(r.length) + s.fixed$length=Array + o=H.a(s,t.j) + for(s=o.length,n=0;n")),q=0,p=0,o=0,n=0,m=0,l=0;h.n();){k=h.d + r=k.x + if(r!=null){q+=r.b + for(r=new H.a6(r,r.gi(r),r.$ti.h("a6"));r.n();){k=r.d + j=k.fr + if(j!==-1)m+=j + l+=k.geu() + p=Math.max(p,k.dx.a) + o=Math.max(o,k.db) + n=Math.max(n,k.cx*4)}}}s.m(0,"drawCallCount",q) + s.m(0,"totalVertexCount",m) + s.m(0,"totalTriangleCount",l) + s.m(0,"maxUVs",o) + s.m(0,"maxInfluences",n) + s.m(0,"maxAttributes",p) + return s}} + A.kY.prototype={ + $1:function(a){var s=a.x + return s!=null&&s.bC(s,new A.kX())}, + $S:78} + A.kX.prototype={ + $1:function(a){return a.fx!=null}, + $S:3} + A.m7.prototype={ + $2:function(a,b){var s=536870911&a+J.aL(b) + s=536870911&s+((524287&s)<<10) + return s^s>>>6}, + $S:79} + T.cD.prototype={ + d_:function(a){var s=a.a,r=this.a + r[15]=s[15] + r[14]=s[14] + r[13]=s[13] + r[12]=s[12] + r[11]=s[11] + r[10]=s[10] + r[9]=s[9] + r[8]=s[8] + r[7]=s[7] + r[6]=s[6] + r[5]=s[5] + r[4]=s[4] + r[3]=s[3] + r[2]=s[2] + r[1]=s[1] + r[0]=s[0]}, + l:function(a){var s=this + return"[0] "+s.aN(0).l(0)+"\n[1] "+s.aN(1).l(0)+"\n[2] "+s.aN(2).l(0)+"\n[3] "+s.aN(3).l(0)+"\n"}, + N:function(a,b){var s,r,q + if(b==null)return!1 + if(b instanceof T.cD){s=this.a + r=s[0] + q=b.a + s=r===q[0]&&s[1]===q[1]&&s[2]===q[2]&&s[3]===q[3]&&s[4]===q[4]&&s[5]===q[5]&&s[6]===q[6]&&s[7]===q[7]&&s[8]===q[8]&&s[9]===q[9]&&s[10]===q[10]&&s[11]===q[11]&&s[12]===q[12]&&s[13]===q[13]&&s[14]===q[14]&&s[15]===q[15]}else s=!1 + return s}, + gG:function(a){return A.n0(this.a)}, + aN:function(a){var s=new Float32Array(4),r=this.a + s[0]=r[a] + s[1]=r[4+a] + s[2]=r[8+a] + s[3]=r[12+a] + return new T.f9(s)}, + cE:function(){var s=this.a,r=s[0],q=s[5],p=s[1],o=s[4],n=r*q-p*o,m=s[6],l=s[2],k=r*m-l*o,j=s[7],i=s[3],h=r*j-i*o,g=p*m-l*q,f=p*j-i*q,e=l*j-i*m + m=s[8] + i=s[9] + j=s[10] + l=s[11] + return-(i*e-j*f+l*g)*s[12]+(m*e-j*h+l*k)*s[13]-(m*f-i*h+l*n)*s[14]+(m*g-i*k+j*n)*s[15]}, + cJ:function(){var s=this.a,r=0+Math.abs(s[0])+Math.abs(s[1])+Math.abs(s[2])+Math.abs(s[3]),q=r>0?r:0 + r=0+Math.abs(s[4])+Math.abs(s[5])+Math.abs(s[6])+Math.abs(s[7]) + if(r>q)q=r + r=0+Math.abs(s[8])+Math.abs(s[9])+Math.abs(s[10])+Math.abs(s[11]) + if(r>q)q=r + r=0+Math.abs(s[12])+Math.abs(s[13])+Math.abs(s[14])+Math.abs(s[15]) + return r>q?r:q}, + cK:function(){var s=this.a + return s[0]===1&&s[1]===0&&s[2]===0&&s[3]===0&&s[4]===0&&s[5]===1&&s[6]===0&&s[7]===0&&s[8]===0&&s[9]===0&&s[10]===1&&s[11]===0&&s[12]===0&&s[13]===0&&s[14]===0&&s[15]===1}} + T.eW.prototype={ + gaI:function(){var s=this.a,r=s[0],q=s[1],p=s[2],o=s[3] + return r*r+q*q+p*p+o*o}, + gi:function(a){var s=this.a,r=s[0],q=s[1],p=s[2],o=s[3] + return Math.sqrt(r*r+q*q+p*p+o*o)}, + l:function(a){var s=this.a + return H.b(s[0])+", "+H.b(s[1])+", "+H.b(s[2])+" @ "+H.b(s[3])}} + T.cJ.prototype={ + bi:function(a,b,c){var s=this.a + s[0]=a + s[1]=b + s[2]=c}, + l:function(a){var s=this.a + return"["+H.b(s[0])+","+H.b(s[1])+","+H.b(s[2])+"]"}, + N:function(a,b){var s,r,q + if(b==null)return!1 + if(b instanceof T.cJ){s=this.a + r=s[0] + q=b.a + s=r===q[0]&&s[1]===q[1]&&s[2]===q[2]}else s=!1 + return s}, + gG:function(a){return A.n0(this.a)}, + gi:function(a){var s=this.a,r=s[0],q=s[1] + s=s[2] + return Math.sqrt(r*r+q*q+s*s)}, + gaI:function(){var s=this.a,r=s[0],q=s[1] + s=s[2] + return r*r+q*q+s*s}} + T.f9.prototype={ + l:function(a){var s=this.a + return H.b(s[0])+","+H.b(s[1])+","+H.b(s[2])+","+H.b(s[3])}, + N:function(a,b){var s,r,q + if(b==null)return!1 + if(b instanceof T.f9){s=this.a + r=s[0] + q=b.a + s=r===q[0]&&s[1]===q[1]&&s[2]===q[2]&&s[3]===q[3]}else s=!1 + return s}, + gG:function(a){return A.n0(this.a)}, + gi:function(a){var s=this.a,r=s[0],q=s[1],p=s[2] + s=s[3] + return Math.sqrt(r*r+q*q+p*p+s*s)}} + Q.bb.prototype={} + Q.hx.prototype={} + Q.cP.prototype={} + Q.mo.prototype={ + $3:function(a,b,c){var s=c.$1(J.ag(a)) + return s}, + $S:80} + Q.mk.prototype={ + $2:function(a,b){return new self.Promise(P.cp(new Q.mj(a,b,this.a)),t._)}, + $C:"$2", + $R:2, + $S:81} + Q.mj.prototype={ + $2:function(a,b){Q.fB(this.a,this.b).ao(0,new Q.mg(a),new Q.mh(this.c,b),t.P)}, + $C:"$2", + $R:2, + $S:26} + Q.mg.prototype={ + $1:function(a){this.a.$1(P.n2(a))}, + $S:27} + Q.mh.prototype={ + $2:function(a,b){return this.a.$3(a,b,this.b)}, + $C:"$2", + $R:2, + $S:15} + Q.ml.prototype={ + $2:function(a,b){return new self.Promise(P.cp(new Q.mi(a,b,this.a)),t._)}, + $C:"$2", + $R:2, + $S:85} + Q.mi.prototype={ + $2:function(a,b){Q.n5(this.a,this.b).ao(0,new Q.me(a),new Q.mf(this.c,b),t.P)}, + $C:"$2", + $R:2, + $S:26} + Q.me.prototype={ + $1:function(a){this.a.$1(P.n2(a))}, + $S:27} + Q.mf.prototype={ + $2:function(a,b){return this.a.$3(a,b,this.b)}, + $C:"$2", + $R:2, + $S:15} + Q.mm.prototype={ + $0:function(){return"2.0.0-dev.3.3"}, + $C:"$0", + $R:0, + $S:86} + Q.mn.prototype={ + $0:function(){return P.n2(M.t4())}, + $C:"$0", + $R:0, + $S:4} + Q.lU.prototype={ + $1:function(a){var s=new P.C($.x,t.q),r=new P.ax(s,t.as),q=this.a.$1(J.ag(a)) + if((q==null?null:J.rv(q))==null)r.M(new P.ak(!1,null,null,"options.externalResourceFunction: Function must return a Promise.")) + else J.rG(q,P.cp(new Q.lV(r)),P.cp(new Q.lW(r))) + return s}, + $S:87} + Q.lV.prototype={ + $1:function(a){var s=this.a + if(t.a.b(a))s.T(a) + else s.M(new P.ak(!1,null,null,"options.externalResourceFunction: Promise must be fulfilled with Uint8Array or rejected."))}, + $S:24} + Q.lW.prototype={ + $1:function(a){return this.a.M(new Q.eP(J.ag(a)))}, + $S:10} + Q.lS.prototype={ + $1:function(a){var s,r,q,p=this + if(p.a.id&&a==null)return p.b.c + if(p.c!=null)s=p.d.$1(a) + else{r=p.e + P.aM(r,"error") + $.x!==C.f + q=P.el(r) + s=new P.C($.x,t.q) + s.aT(r,q)}return s}, + $0:function(){return this.$1(null)}, + $C:"$1", + $R:0, + $D:function(){return[null]}, + $S:88} + Q.lT.prototype={ + $1:function(a){var s,r,q,p,o=null + if(this.a!=null){s=this.b.$1(a) + s=P.tR(s,H.ac(s).c)}else{s=this.c + P.aM(s,"error") + r=t.f1 + q=new P.bD(o,o,o,o,r) + p=P.el(s) + q.aQ(s,p) + q.aU() + s=new P.an(q,r.h("an<1>"))}return s}, + $S:89} + Q.eP.prototype={ + l:function(a){return"Node Exception: "+H.b(this.a)}, + $ia3:1};(function aliases(){var s=J.cz.prototype + s.d1=s.bb + s=J.aF.prototype + s.d2=s.l + s=P.m.prototype + s.d3=s.a0 + s=P.dV.prototype + s.d4=s.a2})();(function installTearOffs(){var s=hunkHelpers._static_1,r=hunkHelpers._static_0,q=hunkHelpers._static_2,p=hunkHelpers._instance_2u,o=hunkHelpers._instance_0u,n=hunkHelpers.installInstanceTearOff,m=hunkHelpers._instance_1i,l=hunkHelpers._instance_1u + s(P,"vk","tZ",11) + s(P,"vl","u_",11) + s(P,"vm","u0",11) + r(P,"oS","v7",1) + q(P,"vn","v0",14) + p(P.C.prototype,"gde","aB",14) + o(P.cS.prototype,"gdS","a2",50) + var k + o(k=P.dA.prototype,"gcm","b_",1) + o(k,"gcn","b0",1) + n(k=P.cK.prototype,"gee",0,0,null,["$1","$0"],["cQ","aK"],51,0) + o(k,"geh","an",1) + o(k,"gcm","b_",1) + o(k,"gcn","b0",1) + m(P.aZ.prototype,"gcA","F",53) + q(M,"vg","rM",91) + q(M,"vf","rL",92) + q(M,"vd","rJ",93) + q(M,"ve","rK",94) + l(M.a0.prototype,"gbP","ed",115) + q(Z,"vi","rO",95) + q(Z,"vh","rN",96) + q(T,"vj","rP",97) + q(Q,"vo","rU",98) + q(V,"vp","rT",99) + q(G,"vs","rX",100) + q(G,"vq","rV",101) + q(G,"vr","rW",102) + q(T,"vG","te",103) + q(Y,"vZ","tu",104) + q(Y,"w0","tE",105) + q(Y,"w_","tD",106) + q(Y,"p3","tC",107) + q(Y,"bi","tT",108) + q(S,"w1","tx",109) + q(V,"w2","tB",110) + q(T,"w3","tO",111) + q(B,"w4","tP",112) + q(O,"w5","tQ",113) + q(U,"w7","tU",114) + s(E,"d0","v3",28) + s(E,"oT","uZ",28) + s(D,"vz","uN",12) + q(D,"vy","t8",117) + q(X,"vN","tk",118) + q(X,"vO","tl",119) + q(X,"vP","tm",120) + q(B,"vQ","tn",121) + q(A,"vR","to",122) + q(U,"vS","tp",123) + q(B,"vT","tq",124) + q(S,"vU","tr",125) + q(L,"vW","ts",84) + l(k=A.d9.prototype,"gdn","dq",25) + o(k,"gdr","ds",1) + l(k,"gcg","dt",10) + l(k=K.cy.prototype,"gdw","dz",25) + l(k,"gdC","dD",10) + o(k,"gdA","dB",1) + s(U,"vV","uO",12)})();(function inheritance(){var s=hunkHelpers.mixin,r=hunkHelpers.inherit,q=hunkHelpers.inheritMany + r(P.e,null) + q(P.e,[H.mD,J.cz,J.aC,P.i,H.d3,P.I,H.bZ,P.F,P.dN,H.a6,P.H,H.d6,H.d8,H.f7,H.cG,P.dj,H.cv,H.ig,H.kJ,H.eS,H.d7,H.dS,H.lA,H.j7,H.df,H.ih,H.ly,H.aI,H.fj,H.dX,P.lG,P.fc,P.cO,P.aB,P.ff,P.cM,P.C,P.fd,P.aW,P.f0,P.cS,P.fs,P.fe,P.cK,P.fn,P.fh,P.lh,P.fq,P.ek,P.lJ,P.dI,P.cQ,P.lx,P.dM,P.m,P.fw,P.kI,P.eo,P.le,P.em,P.fx,P.d5,P.eT,P.ds,P.dD,P.aD,P.cC,P.k,P.fr,P.a9,P.e2,P.kL,P.fp,V.fk,F.Y,V.kQ,V.bU,V.bS,V.u,M.kV,M.j,M.c4,Y.dK,Y.dy,Y.cL,Y.c2,Y.c3,Y.i5,Y.dw,Y.dv,Y.aP,N.cR,N.eX,N.jw,O.ey,E.bx,E.ic,E.cA,D.T,D.a4,D.c1,D.ce,D.eY,A.d9,K.as,K.cy,K.db,A.kW,T.cD,T.eW,T.cJ,T.f9,Q.eP]) + q(J.cz,[J.dd,J.cB,J.aF,J.p,J.c5,J.br,H.dm]) + q(J.aF,[J.eU,J.cl,J.aQ,Q.bb,Q.hx,Q.cP]) + r(J.ii,J.p) + q(J.c5,[J.de,J.eB]) + q(P.i,[H.bE,H.n,H.b9,H.l_,H.bc,H.dz,P.dc]) + q(H.bE,[H.bX,H.e4]) + r(H.dC,H.bX) + r(H.dx,H.e4) + r(H.b3,H.dx) + r(P.di,P.I) + q(P.di,[H.bY,H.aG,P.dG,P.fl]) + q(H.bZ,[H.fQ,H.jt,H.f1,H.im,H.m9,H.ma,H.mb,P.lb,P.la,P.lc,P.ld,P.lH,P.lK,P.lL,P.m_,P.li,P.lq,P.lm,P.ln,P.lo,P.lk,P.lp,P.lj,P.lt,P.lu,P.ls,P.lr,P.kC,P.kD,P.kE,P.kF,P.kG,P.lF,P.lE,P.lg,P.lf,P.lz,P.lY,P.lD,P.lC,P.j8,P.j9,P.kT,P.kU,P.jn,P.kN,P.kO,P.kP,P.lP,P.lO,P.lQ,P.lR,P.lM,M.l6,M.l7,M.l8,M.l9,M.l4,M.l5,M.l0,M.l1,M.l2,M.l3,Z.fH,Z.fI,V.i0,V.i1,V.i2,V.hZ,V.i_,V.hX,V.hY,V.hV,V.hW,V.i3,V.i4,Y.jb,S.jl,S.jc,S.jd,S.je,S.jg,S.jh,S.ji,S.jj,S.jk,S.jf,V.jo,V.jp,V.jq,B.jz,O.kB,M.fS,M.fR,M.fT,M.fW,M.fX,M.fU,M.fV,M.fY,Y.i7,Y.i9,Y.i8,Y.i6,Y.il,Y.ik,Y.js,N.jx,N.jy,O.mq,O.mr,O.ms,O.lZ,E.h8,E.h6,E.h5,E.hd,E.ha,E.hb,E.h9,E.hm,E.ho,E.hf,E.hl,E.he,E.hk,E.hi,E.hj,E.hh,E.hg,E.hr,E.hq,E.hp,E.hv,E.hu,E.h2,E.h3,E.h4,E.ht,E.hs,E.h7,E.hn,E.hc,E.h1,E.h_,E.h0,E.ib,E.jK,E.jL,E.jQ,E.jO,E.jI,E.jE,E.jM,E.jF,E.jP,E.jB,E.jJ,E.jD,E.jG,E.jC,E.jN,E.jH,E.kp,E.ko,E.ke,E.kc,E.kd,E.kb,E.k9,E.ka,E.kk,E.kl,E.k8,E.k7,E.k6,E.k5,E.k3,E.k2,E.k0,E.jV,E.kz,E.ky,E.k_,E.jX,E.jZ,E.jW,E.jY,E.kx,E.kv,E.kq,E.kf,E.kw,E.kr,E.ks,E.kt,E.ku,E.kj,E.ki,E.kh,E.kg,E.kn,E.km,E.k1,E.jT,E.jS,E.k4,E.jU,E.j0,E.j5,E.iQ,E.iC,E.j6,E.iy,E.ix,E.iA,E.iB,E.iw,E.iz,E.iv,E.iF,E.iD,E.j4,E.iE,E.iX,E.iI,E.iJ,E.iG,E.iH,E.iP,E.iO,E.iN,E.iM,E.iR,E.iL,E.iK,E.j3,E.iS,E.iV,E.iU,E.iT,E.iW,E.iY,E.iZ,E.iu,E.it,E.is,E.j_,E.j1,E.j2,E.hE,E.hD,E.hC,E.hM,E.hA,E.hL,E.hH,E.hI,E.hB,E.hz,E.hF,E.hK,E.hJ,E.hG,X.iq,A.hP,A.hN,A.hO,K.hS,K.hT,K.hR,K.hU,K.hQ,F.m3,F.m4,F.m5,F.m2,A.kY,A.kX,A.m7,Q.mo,Q.mk,Q.mj,Q.mg,Q.mh,Q.ml,Q.mi,Q.me,Q.mf,Q.mm,Q.mn,Q.lU,Q.lV,Q.lW,Q.lS,Q.lT]) + q(P.F,[H.eD,P.f2,H.eC,H.f6,H.eZ,H.fi,P.ej,P.eR,P.ak,P.eO,P.f8,P.f3,P.bz,P.ep,P.er]) + r(P.dg,P.dN) + q(P.dg,[H.cI,F.L]) + q(H.cI,[H.cu,P.aX]) + q(H.n,[H.af,H.b6,H.au,P.dH]) + q(H.af,[H.dt,H.a8,P.fm,P.dF]) + r(H.c_,H.b9) + q(P.H,[H.a7,H.cm,H.dr]) + r(H.cw,H.bc) + r(P.e0,P.dj) + r(P.be,P.e0) + r(H.d4,P.be) + q(H.cv,[H.aq,H.al]) + r(H.eQ,P.f2) + q(H.f1,[H.f_,H.ct]) + r(H.cE,H.dm) + q(H.cE,[H.dO,H.dQ]) + r(H.dP,H.dO) + r(H.dl,H.dP) + r(H.dR,H.dQ) + r(H.av,H.dR) + q(H.dl,[H.dk,H.eI]) + q(H.av,[H.eJ,H.eK,H.eL,H.eM,H.eN,H.dn,H.cf]) + r(H.dY,H.fi) + r(P.dW,P.dc) + r(P.ax,P.ff) + q(P.cS,[P.bD,P.cT]) + r(P.dT,P.aW) + q(P.dT,[P.an,P.dE]) + r(P.dA,P.cK) + q(P.fn,[P.dL,P.dU]) + q(P.fh,[P.cn,P.dB]) + r(P.lB,P.lJ) + r(P.dJ,P.dG) + q(P.cQ,[P.aZ,P.e1]) + r(P.kH,P.kI) + r(P.dV,P.kH) + r(P.lw,P.dV) + q(P.eo,[P.fL,P.hw,P.io]) + r(P.eq,P.f0) + q(P.eq,[P.fN,P.fM,P.ip,P.kS]) + q(P.em,[P.fO,P.fo]) + r(P.lI,P.fO) + r(P.kR,P.hw) + q(P.ak,[P.dq,P.ew]) + r(P.fg,P.e2) + r(V.o,V.fk) + q(V.o,[V.es,M.bP,M.bQ,M.bR,Z.b1,Z.bT,Z.b2,T.bo,G.bV,G.bW,V.da,Y.ci,Y.bB,S.aH,D.c0,X.bs,X.c6,X.c7,B.c8,A.c9,U.ca,B.cb,S.cc,L.cd]) + q(V.es,[M.a0,Z.bn,Q.aN,V.bp,G.bq,T.aO,Y.aS,S.aT,V.ah,T.bv,B.bw,O.by,U.bA,X.b7]) + q(M.a0,[M.fb,M.fa]) + q(F.Y,[M.ez,M.eG,M.eE,M.eH,M.eF,Z.ei,Z.dp,S.ev,O.eu,F.f4,F.f5,F.en]) + q(Y.bB,[Y.ch,Y.cg]) + q(Y.i5,[Y.ij,Y.jr,Y.kZ]) + q(E.ic,[E.fZ,E.ia,E.jA,E.jR,E.ir,E.hy]) + s(H.cI,H.f7) + s(H.e4,P.m) + s(H.dO,P.m) + s(H.dP,H.d8) + s(H.dQ,P.m) + s(H.dR,H.d8) + s(P.bD,P.fe) + s(P.cT,P.fs) + s(P.dN,P.m) + s(P.e0,P.fw) + s(V.fk,V.kQ)})() + var v={typeUniverse:{eC:new Map(),tR:{},eT:{},tPV:{},sEA:[]},mangledGlobalNames:{d:"int",w:"double",G:"num",f:"String",Q:"bool",k:"Null",l:"List"},mangledNames:{},getTypeFromName:getGlobalFromName,metadata:[],types:["f*(l<@>*)","~()","k()","Q*(aH*)","@()","w*(d*)","k(f*,e*)","k(f*,d*)","Q*(d*)","k(ah*,d*,d*)","~(e*)","~(~())","~(j*)","k(@)","~(e,am)","~(e*,am*)","~(aa,f,d)","i*()","d*(d*)","i*()","k(d*,aH*)","~(f*)","Q*(T*)","k(l*)","k(e*)","~(l*)","k(~(e*)*,aE*)","k(h*)","f*(e*)","k(d*,ah*)","i*(d*,d*,d*)","k(@,am)","k(d,@)","@(@)","i*(d*,d*,d*)","k(d*,b2*)","k(d*,b1*)","L<0^*>*(f*,0^*(h*,j*)*)","0^*(f*,0^*(h*,j*)*{req:Q*})","~(L*,bC*)","k(d*,o*)","k(e,am)","k(f,@)","Q*(ah*)","~(L*)","k(d*,ck*)","~(o*,f*)","C<@>(@)","k(@,@)","d*(d*,d*,f*)","ae<@>()","~([ae<~>?])","kA*>*()","Q(e?)","k(e?,e?)","f*(T*)","l*>*()","f*(f*)","k(~())","T*()","k(bC*,a4*)","k(cH,@)","@(@,f)","Q*(l*,l*)","l*/*(aN*)","aW*>*(aO*)","k(d*,a0*)","Q*(H*)","~(f[@])","k(d*,b7*)","d(d,d)","aa(d)","~({seen:Q*})","k(as*)","ae<~>*()","k(l*)","h*(h<@,@>*)","l*()","Q*(aT*)","d*(d*,e*)","~(e*,am*,aE*)","bb<1&>*(aa*,e*)","aa(@,@)","@(f)","cd*(h*,j*)","bb<1&>*(f*,e*)","f*()","ae*(aY*)","aa*/*([aY*])","aW*>*(aY*)","e?(e?)","a0*(h*,j*)","bP*(h*,j*)","bQ*(h*,j*)","bR*(h*,j*)","bn*(h*,j*)","bT*(h*,j*)","bo*(h*,j*)","aN*(h*,j*)","bp*(h*,j*)","bq*(h*,j*)","bV*(h*,j*)","bW*(h*,j*)","aO*(h*,j*)","aS*(h*,j*)","ci*(h*,j*)","ch*(h*,j*)","cg*(h*,j*)","bB*(h*,j*)","aT*(h*,j*)","ah*(h*,j*)","bv*(h*,j*)","bw*(h*,j*)","by*(h*,j*)","bA*(h*,j*)","w*(G*)","~(@)","c0*(h*,j*)","bs*(h*,j*)","c6*(h*,j*)","c7*(h*,j*)","c8*(h*,j*)","c9*(h*,j*)","ca*(h*,j*)","cb*(h*,j*)","cc*(h*,j*)","~(f,d)"],interceptorsByTag:null,leafTags:null,arrayRti:typeof Symbol=="function"&&typeof Symbol()=="symbol"?Symbol("$ti"):"$ti"} + H.uh(v.typeUniverse,JSON.parse('{"bb":"aF","hx":"aF","cP":"aF","eU":"aF","cl":"aF","aQ":"aF","dd":{"Q":[]},"cB":{"k":[]},"aF":{"aE":[],"bb":["1&"],"cP":[]},"p":{"l":["1"],"n":["1"],"i":["1"]},"ii":{"p":["1"],"l":["1"],"n":["1"],"i":["1"]},"aC":{"H":["1"]},"c5":{"w":[],"G":[]},"de":{"w":[],"d":[],"G":[]},"eB":{"w":[],"G":[]},"br":{"f":[]},"bE":{"i":["2"]},"d3":{"H":["2"]},"bX":{"bE":["1","2"],"i":["2"],"i.E":"2"},"dC":{"bX":["1","2"],"bE":["1","2"],"n":["2"],"i":["2"],"i.E":"2"},"dx":{"m":["2"],"l":["2"],"bE":["1","2"],"n":["2"],"i":["2"]},"b3":{"dx":["1","2"],"m":["2"],"l":["2"],"bE":["1","2"],"n":["2"],"i":["2"],"m.E":"2","i.E":"2"},"bY":{"I":["3","4"],"h":["3","4"],"I.K":"3","I.V":"4"},"eD":{"F":[]},"cu":{"m":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"n":{"i":["1"]},"af":{"n":["1"],"i":["1"]},"dt":{"af":["1"],"n":["1"],"i":["1"],"i.E":"1","af.E":"1"},"a6":{"H":["1"]},"b9":{"i":["2"],"i.E":"2"},"c_":{"b9":["1","2"],"n":["2"],"i":["2"],"i.E":"2"},"a7":{"H":["2"]},"a8":{"af":["2"],"n":["2"],"i":["2"],"i.E":"2","af.E":"2"},"l_":{"i":["1"],"i.E":"1"},"cm":{"H":["1"]},"bc":{"i":["1"],"i.E":"1"},"cw":{"bc":["1"],"n":["1"],"i":["1"],"i.E":"1"},"dr":{"H":["1"]},"b6":{"n":["1"],"i":["1"],"i.E":"1"},"d6":{"H":["1"]},"cI":{"m":["1"],"l":["1"],"n":["1"],"i":["1"]},"cG":{"cH":[]},"d4":{"be":["1","2"],"h":["1","2"]},"cv":{"h":["1","2"]},"aq":{"cv":["1","2"],"h":["1","2"]},"dz":{"i":["1"],"i.E":"1"},"al":{"cv":["1","2"],"h":["1","2"]},"eQ":{"F":[]},"eC":{"F":[]},"f6":{"F":[]},"eS":{"a3":[]},"dS":{"am":[]},"bZ":{"aE":[]},"f1":{"aE":[]},"f_":{"aE":[]},"ct":{"aE":[]},"eZ":{"F":[]},"aG":{"I":["1","2"],"h":["1","2"],"I.K":"1","I.V":"2"},"au":{"n":["1"],"i":["1"],"i.E":"1"},"df":{"H":["1"]},"cE":{"at":["1"]},"dl":{"m":["w"],"at":["w"],"l":["w"],"n":["w"],"i":["w"]},"av":{"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"]},"dk":{"m":["w"],"at":["w"],"l":["w"],"n":["w"],"i":["w"],"m.E":"w"},"eI":{"m":["w"],"at":["w"],"l":["w"],"n":["w"],"i":["w"],"m.E":"w"},"eJ":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"eK":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"eL":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"eM":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"eN":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"dn":{"av":[],"m":["d"],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"cf":{"av":[],"m":["d"],"aa":[],"at":["d"],"l":["d"],"n":["d"],"i":["d"],"m.E":"d"},"dX":{"bC":[]},"fi":{"F":[]},"dY":{"F":[]},"aB":{"H":["1"]},"dW":{"i":["1"],"i.E":"1"},"ax":{"ff":["1"]},"C":{"ae":["1"]},"bD":{"cS":["1"]},"cT":{"cS":["1"]},"an":{"aW":["1"]},"dT":{"aW":["1"]},"dE":{"aW":["1"]},"ek":{"F":[]},"dG":{"I":["1","2"],"h":["1","2"]},"dJ":{"dG":["1","2"],"I":["1","2"],"h":["1","2"],"I.K":"1","I.V":"2"},"dH":{"n":["1"],"i":["1"],"i.E":"1"},"dI":{"H":["1"]},"aZ":{"cQ":["1"],"n":["1"],"i":["1"]},"dM":{"H":["1"]},"aX":{"m":["1"],"l":["1"],"n":["1"],"i":["1"],"m.E":"1"},"dc":{"i":["1"]},"dg":{"m":["1"],"l":["1"],"n":["1"],"i":["1"]},"di":{"I":["1","2"],"h":["1","2"]},"I":{"h":["1","2"]},"dj":{"h":["1","2"]},"be":{"h":["1","2"]},"cQ":{"n":["1"],"i":["1"]},"e1":{"cQ":["1"],"n":["1"],"i":["1"]},"fl":{"I":["f","@"],"h":["f","@"],"I.K":"f","I.V":"@"},"fm":{"af":["f"],"n":["f"],"i":["f"],"i.E":"f","af.E":"f"},"w":{"G":[]},"d":{"G":[]},"l":{"n":["1"],"i":["1"]},"kA":{"n":["1"],"i":["1"]},"ej":{"F":[]},"f2":{"F":[]},"eR":{"F":[]},"ak":{"F":[]},"dq":{"F":[]},"ew":{"F":[]},"eO":{"F":[]},"f8":{"F":[]},"f3":{"F":[]},"bz":{"F":[]},"ep":{"F":[]},"eT":{"F":[]},"ds":{"F":[]},"er":{"F":[]},"dD":{"a3":[]},"aD":{"a3":[]},"dF":{"af":["1"],"n":["1"],"i":["1"],"i.E":"1","af.E":"1"},"fr":{"am":[]},"e2":{"aY":[]},"fp":{"aY":[]},"fg":{"aY":[]},"a0":{"o":[],"t":[]},"fb":{"a0":["d*"],"o":[],"t":[]},"fa":{"a0":["w*"],"o":[],"t":[]},"bP":{"o":[],"t":[]},"bQ":{"o":[],"t":[]},"bR":{"o":[],"t":[]},"ez":{"Y":["w*"]},"eG":{"Y":["w*"]},"eE":{"Y":["w*"]},"eH":{"Y":["d*"]},"eF":{"Y":["d*"]},"bn":{"o":[],"t":[]},"b1":{"o":[],"t":[]},"bT":{"o":[],"t":[]},"b2":{"o":[],"t":[]},"ei":{"Y":["w*"]},"dp":{"Y":["1*"]},"bo":{"o":[],"t":[]},"aN":{"o":[],"t":[]},"bp":{"o":[],"t":[]},"bq":{"o":[],"t":[]},"bV":{"o":[],"t":[]},"bW":{"o":[],"t":[]},"da":{"o":[],"t":[]},"o":{"t":[]},"es":{"o":[],"t":[]},"aO":{"o":[],"t":[]},"aS":{"o":[],"t":[]},"ci":{"o":[],"t":[]},"ch":{"o":[],"t":[]},"cg":{"o":[],"t":[]},"bB":{"o":[],"t":[]},"aT":{"o":[],"t":[]},"aH":{"o":[],"t":[]},"ev":{"Y":["d*"]},"ah":{"o":[],"t":[]},"bv":{"o":[],"t":[]},"bw":{"o":[],"t":[]},"by":{"o":[],"t":[]},"eu":{"Y":["w*"]},"bA":{"o":[],"t":[],"ck":[]},"c4":{"a3":[]},"dw":{"a3":[]},"dv":{"a3":[]},"aP":{"a3":[]},"c0":{"o":[],"t":[],"ck":[]},"bs":{"o":[],"t":[]},"b7":{"o":[],"t":[]},"c6":{"o":[],"t":[]},"c7":{"o":[],"t":[]},"c8":{"o":[],"t":[]},"c9":{"o":[],"t":[]},"ca":{"o":[],"t":[]},"cb":{"o":[],"t":[]},"cc":{"o":[],"t":[]},"cd":{"o":[],"t":[]},"d9":{"et":[]},"cy":{"et":[]},"db":{"a3":[]},"L":{"m":["1*"],"l":["1*"],"n":["1*"],"i":["1*"],"m.E":"1*"},"f4":{"Y":["G*"]},"f5":{"Y":["G*"]},"en":{"Y":["w*"]},"eP":{"a3":[]},"aa":{"l":["d"],"n":["d"],"i":["d"]}}')) + H.ug(v.typeUniverse,JSON.parse('{"d8":1,"f7":1,"cI":1,"e4":2,"cE":1,"cM":2,"f0":2,"fs":1,"fe":1,"dA":1,"cK":1,"dT":1,"dL":1,"fh":1,"cn":1,"fn":1,"dU":1,"fq":1,"dc":1,"dg":1,"di":2,"fw":2,"dj":2,"dN":1,"e0":2,"em":1,"eo":2,"eq":2,"dV":1}')) + var u={p:") does not match the number of morph targets (",c:"Accessor sparse indices element at index ",m:"Animation input accessor element at index "} + var t=(function rtii(){var s=H.ap + return{gF:s("d4"),O:s("n<@>"),C:s("F"),b8:s("aE"),c:s("ae<@>"),bq:s("ae<~>"),N:s("al"),U:s("i<@>"),s:s("p"),b:s("p<@>"),Z:s("p"),p:s("p"),fr:s("p"),es:s("p"),gd:s("p*>"),bd:s("p"),a9:s("p"),e2:s("p*>"),fK:s("p*>"),B:s("p*>"),dB:s("p"),bH:s("p"),d:s("p*>"),ar:s("p*>*>"),j:s("p*>"),bZ:s("p"),R:s("p"),M:s("p"),d6:s("p"),i:s("p"),m:s("p"),V:s("p"),T:s("cB"),g:s("aQ"),aU:s("at<@>"),eo:s("aG"),I:s("h<@,@>"),gw:s("a8"),eB:s("av"),bm:s("cf"),P:s("k"),K:s("e"),ed:s("dp"),eq:s("L"),az:s("L"),du:s("L"),b_:s("L"),S:s("f"),E:s("aa"),ak:s("cl"),go:s("aX*>"),em:s("aX"),f8:s("be"),n:s("aY"),a_:s("ax"),G:s("ax"),eP:s("ax"),as:s("ax"),f1:s("bD*>"),eI:s("C<@>"),fJ:s("C"),eD:s("C"),f:s("C"),dD:s("C"),q:s("C"),D:s("C<~>"),aH:s("dJ<@,@>"),cy:s("fo"),cJ:s("Q"),gR:s("w"),z:s("@"),bI:s("@(e)"),Q:s("@(e,am)"),r:s("d"),aD:s("u*"),hc:s("a0*"),W:s("a0*"),bj:s("bn*"),gP:s("bo*"),cT:s("aN*"),u:s("bp*"),h2:s("bq*"),y:s("a3*"),af:s("T*"),f9:s("a4*"),al:s("c1*"),b1:s("aE*"),ec:s("aO*"),Y:s("i<@>*"),v:s("t*"),l:s("l<@>*"),b7:s("l*>*"),an:s("l*"),o:s("l*"),eG:s("l*"),fy:s("l*"),w:s("l*"),h:s("h<@,@>*"),t:s("h*"),fC:s("aS*"),eM:s("aT*"),A:s("0&*"),L:s("ah*"),_:s("e*"),ax:s("ck*"),cl:s("L<@>*"),c2:s("bv*"),J:s("bw*"),cn:s("kA*"),gz:s("kA*>*"),dz:s("bx*"),aV:s("by*"),X:s("f*"),ai:s("bA*"),f7:s("bC*"),a:s("aa*"),bv:s("cP*"),F:s("w*"),e:s("d*"),eH:s("ae?"),x:s("e?"),di:s("G"),H:s("~"),d5:s("~(e)"),k:s("~(e,am)")}})();(function constants(){var s=hunkHelpers.makeConstList + C.by=J.cz.prototype + C.d=J.p.prototype + C.bC=J.dd.prototype + C.c=J.de.prototype + C.bD=J.cB.prototype + C.bE=J.c5.prototype + C.a=J.br.prototype + C.bF=J.aQ.prototype + C.d2=H.dk.prototype + C.j=H.cf.prototype + C.aq=J.eU.prototype + C.O=J.cl.prototype + C.P=new V.u("MAT4",5126,!1) + C.A=new V.u("SCALAR",5126,!1) + C.aQ=new V.u("VEC2",5121,!0) + C.aU=new V.u("VEC2",5123,!0) + C.aV=new V.u("VEC2",5126,!1) + C.R=new V.u("VEC3",5121,!0) + C.T=new V.u("VEC3",5123,!0) + C.k=new V.u("VEC3",5126,!1) + C.aY=new V.u("VEC4",5121,!1) + C.D=new V.u("VEC4",5121,!0) + C.aZ=new V.u("VEC4",5123,!1) + C.E=new V.u("VEC4",5123,!0) + C.u=new V.u("VEC4",5126,!1) + C.b_=new V.bS("AnimationInput") + C.b0=new V.bS("AnimationOutput") + C.b1=new V.bS("IBM") + C.b2=new V.bS("PrimitiveIndices") + C.W=new V.bS("VertexAttribute") + C.b3=new V.bU("IBM") + C.b4=new V.bU("Image") + C.X=new V.bU("IndexBuffer") + C.v=new V.bU("Other") + C.F=new V.bU("VertexBuffer") + C.dB=new P.fN() + C.b5=new P.fL() + C.b6=new P.fM() + C.Y=new H.d6(H.ap("d6")) + C.Z=new K.db() + C.b7=new M.c4() + C.a_=function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); + } + C.b8=function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; + } + C.bd=function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; + } + C.b9=function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); + } + C.ba=function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; + } + C.bc=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; + } + C.bb=function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; + } + C.a0=function(hooks) { return hooks; } + + C.a1=new P.io() + C.be=new P.eT() + C.a2=new Y.dv() + C.bf=new Y.dw() + C.a3=new P.kR() + C.G=new P.lh() + C.a4=new H.lA() + C.f=new P.lB() + C.bg=new P.fr() + C.I=new Y.c2(0,"Format.Unknown") + C.n=new Y.c2(1,"Format.RGB") + C.w=new Y.c2(2,"Format.RGBA") + C.a5=new Y.c2(3,"Format.Luminance") + C.a6=new Y.c2(4,"Format.LuminanceAlpha") + C.a7=new Y.aP("Wrong WebP header.") + C.bz=new Y.aP("PNG header not found.") + C.bA=new Y.aP("Invalid JPEG marker segment length.") + C.o=new Y.aP("Wrong chunk length.") + C.bB=new Y.aP("Invalid start of file.") + C.bG=new P.ip(null) + C.bH=H.a(s([0,0]),t.m) + C.a8=H.a(s([0,0,0]),t.m) + C.bI=H.a(s([16]),t.V) + C.bJ=H.a(s([1,1]),t.m) + C.a9=H.a(s([1,1,1]),t.m) + C.aa=H.a(s([1,1,1,1]),t.m) + C.ab=H.a(s([2]),t.V) + C.bK=H.a(s([255,216]),t.V) + C.bM=H.a(s(["sheenColorFactor","sheenColorTexture","sheenRoughnessFactor","sheenRoughnessTexture"]),t.i) + C.ac=H.a(s([0,0,32776,33792,1,10240,0,0]),t.V) + C.bN=H.a(s([137,80,78,71,13,10,26,10]),t.V) + C.bO=H.a(s(["clearcoatFactor","clearcoatTexture","clearcoatRoughnessFactor","clearcoatRoughnessTexture","clearcoatNormalTexture"]),t.i) + C.m=H.a(s([3]),t.V) + C.ad=H.a(s([33071,33648,10497]),t.V) + C.bP=H.a(s([34962,34963]),t.V) + C.J=H.a(s([4]),t.V) + C.aN=new V.u("VEC2",5120,!1) + C.aO=new V.u("VEC2",5120,!0) + C.aP=new V.u("VEC2",5121,!1) + C.aR=new V.u("VEC2",5122,!1) + C.aS=new V.u("VEC2",5122,!0) + C.aT=new V.u("VEC2",5123,!1) + C.bQ=H.a(s([C.aN,C.aO,C.aP,C.aR,C.aS,C.aT]),t.p) + C.bR=H.a(s([5121,5123,5125]),t.V) + C.ae=H.a(s(["image/jpeg","image/png"]),t.i) + C.bS=H.a(s(["transmissionFactor","transmissionTexture"]),t.i) + C.bT=H.a(s([82,73,70,70]),t.V) + C.bU=H.a(s([9728,9729]),t.V) + C.aH=new V.u("SCALAR",5121,!1) + C.aK=new V.u("SCALAR",5123,!1) + C.aM=new V.u("SCALAR",5125,!1) + C.af=H.a(s([C.aH,C.aK,C.aM]),t.p) + C.bW=H.a(s(["camera","children","skin","matrix","mesh","rotation","scale","translation","weights","name"]),t.i) + C.bX=H.a(s([9728,9729,9984,9985,9986,9987]),t.V) + C.bY=H.a(s(["COLOR","JOINTS","TEXCOORD","WEIGHTS"]),t.i) + C.x=H.a(s([0,0,65490,45055,65535,34815,65534,18431]),t.V) + C.bZ=H.a(s(["color","intensity","spot","type","range","name"]),t.i) + C.c_=H.a(s(["buffer","byteOffset","byteLength","byteStride","target","name"]),t.i) + C.ah=H.a(s([0,0,26624,1023,65534,2047,65534,2047]),t.V) + C.c0=H.a(s(["LINEAR","STEP","CUBICSPLINE"]),t.i) + C.c1=H.a(s(["OPAQUE","MASK","BLEND"]),t.i) + C.c2=H.a(s(["pbrMetallicRoughness","normalTexture","occlusionTexture","emissiveTexture","emissiveFactor","alphaMode","alphaCutoff","doubleSided","name"]),t.i) + C.c3=H.a(s([5120,5121,5122,5123,5125,5126]),t.V) + C.c4=H.a(s(["inverseBindMatrices","skeleton","joints","name"]),t.i) + C.Q=new V.u("VEC3",5120,!1) + C.B=new V.u("VEC3",5120,!0) + C.S=new V.u("VEC3",5122,!1) + C.C=new V.u("VEC3",5122,!0) + C.c5=H.a(s([C.Q,C.B,C.S,C.C]),t.p) + C.c6=H.a(s(["data-uri","buffer-view","glb","external"]),t.i) + C.c7=H.a(s(["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]),t.i) + C.c8=H.a(s(["bufferView","byteOffset","componentType"]),t.i) + C.K=H.a(s([C.B,C.C]),t.p) + C.c9=H.a(s(["aspectRatio","yfov","zfar","znear"]),t.i) + C.ca=H.a(s(["copyright","generator","version","minVersion"]),t.i) + C.cb=H.a(s(["bufferView","byteOffset"]),t.i) + C.cc=H.a(s(["bufferView","mimeType","uri","name"]),t.i) + C.cd=H.a(s(["channels","samplers","name"]),t.i) + C.ce=H.a(s(["baseColorFactor","baseColorTexture","metallicFactor","roughnessFactor","metallicRoughnessTexture"]),t.i) + C.cf=H.a(s(["count","indices","values"]),t.i) + C.cg=H.a(s(["diffuseFactor","diffuseTexture","specularFactor","glossinessFactor","specularGlossinessTexture"]),t.i) + C.ch=H.a(s(["directional","point","spot"]),t.i) + C.ai=H.a(s([]),t.b) + C.ci=H.a(s([]),t.i) + C.cl=H.a(s(["extensions","extras"]),t.i) + C.cm=H.a(s([0,0,32722,12287,65534,34815,65534,18431]),t.V) + C.co=H.a(s(["index","texCoord"]),t.i) + C.cp=H.a(s(["index","texCoord","scale"]),t.i) + C.cq=H.a(s(["index","texCoord","strength"]),t.i) + C.cr=H.a(s(["innerConeAngle","outerConeAngle"]),t.i) + C.cs=H.a(s(["input","interpolation","output"]),t.i) + C.ct=H.a(s(["attributes","indices","material","mode","targets"]),t.i) + C.cu=H.a(s(["bufferView","byteOffset","componentType","count","type","normalized","max","min","sparse","name"]),t.i) + C.cw=H.a(s(["light"]),t.i) + C.cx=H.a(s(["lights"]),t.i) + C.cy=H.a(s(["node","path"]),t.i) + C.cz=H.a(s(["nodes","name"]),t.i) + C.cA=H.a(s([null,"linear","srgb","custom"]),t.i) + C.cB=H.a(s([null,"srgb","custom"]),t.i) + C.aj=H.a(s([0,0,24576,1023,65534,34815,65534,18431]),t.V) + C.cC=H.a(s(["image/webp"]),t.i) + C.cD=H.a(s(["offset","rotation","scale","texCoord"]),t.i) + C.N=H.B("bA") + C.bh=new D.a4(D.vy(),!1) + C.d_=new H.al([C.N,C.bh],t.N) + C.bu=new D.T("EXT_texture_webp",C.d_,D.vz(),!1) + C.at=H.B("da") + C.M=H.B("ah") + C.bi=new D.a4(X.vN(),!1) + C.bj=new D.a4(X.vP(),!1) + C.cY=new H.al([C.at,C.bi,C.M,C.bj],t.N) + C.bq=new D.T("KHR_lights_punctual",C.cY,null,!1) + C.h=H.B("aS") + C.bk=new D.a4(B.vQ(),!1) + C.cT=new H.al([C.h,C.bk],t.N) + C.bt=new D.T("KHR_materials_clearcoat",C.cT,null,!1) + C.bn=new D.a4(A.vR(),!0) + C.cU=new H.al([C.h,C.bn],t.N) + C.bw=new D.T("KHR_materials_pbrSpecularGlossiness",C.cU,null,!1) + C.bl=new D.a4(B.vT(),!1) + C.cV=new H.al([C.h,C.bl],t.N) + C.bs=new D.T("KHR_materials_transmission",C.cV,null,!1) + C.bm=new D.a4(U.vS(),!1) + C.cW=new H.al([C.h,C.bm],t.N) + C.bp=new D.T("KHR_materials_sheen",C.cW,null,!1) + C.bo=new D.a4(S.vU(),!0) + C.cX=new H.al([C.h,C.bo],t.N) + C.br=new D.T("KHR_materials_unlit",C.cX,null,!1) + C.cj=H.a(s([]),H.ap("p")) + C.d0=new H.aq(0,{},C.cj,H.ap("aq")) + C.bx=new D.T("KHR_mesh_quantization",C.d0,U.vV(),!0) + C.aA=H.B("bB") + C.aw=H.B("cg") + C.ax=H.B("ch") + C.H=new D.a4(L.vW(),!1) + C.cZ=new H.al([C.aA,C.H,C.aw,C.H,C.ax,C.H],t.N) + C.bv=new D.T("KHR_texture_transform",C.cZ,null,!1) + C.ak=H.a(s([C.bu,C.bq,C.bt,C.bw,C.bs,C.bp,C.br,C.bx,C.bv]),H.ap("p")) + C.al=H.a(s(["orthographic","perspective"]),t.i) + C.cE=H.a(s(["primitives","weights","name"]),t.i) + C.b=new E.bx(0,"Severity.Error") + C.e=new E.bx(1,"Severity.Warning") + C.i=new E.bx(2,"Severity.Information") + C.d4=new E.bx(3,"Severity.Hint") + C.cF=H.a(s([C.b,C.e,C.i,C.d4]),H.ap("p")) + C.cG=H.a(s([0,0,32754,11263,65534,34815,65534,18431]),t.V) + C.cH=H.a(s(["magFilter","minFilter","wrapS","wrapT","name"]),t.i) + C.cI=H.a(s([null,"rgb","rgba","luminance","luminance-alpha"]),t.i) + C.am=H.a(s([0,0,65490,12287,65535,34815,65534,18431]),t.V) + C.cJ=H.a(s(["sampler","source","name"]),t.i) + C.cK=H.a(s(["source"]),t.i) + C.aW=new V.u("VEC3",5121,!1) + C.aX=new V.u("VEC3",5123,!1) + C.cL=H.a(s([C.Q,C.B,C.aW,C.R,C.S,C.C,C.aX,C.T]),t.p) + C.cM=H.a(s(["target","sampler"]),t.i) + C.an=H.a(s(["translation","rotation","scale","weights"]),t.i) + C.cN=H.a(s(["type","orthographic","perspective","name"]),t.i) + C.cO=H.a(s(["uri","byteLength","name"]),t.i) + C.cP=H.a(s(["xmag","ymag","zfar","znear"]),t.i) + C.cQ=H.a(s(["extensionsUsed","extensionsRequired","accessors","animations","asset","buffers","bufferViews","cameras","images","materials","meshes","nodes","samplers","scene","scenes","skins","textures"]),t.i) + C.U=new V.u("VEC4",5120,!0) + C.V=new V.u("VEC4",5122,!0) + C.cR=H.a(s([C.U,C.V]),t.p) + C.ag=H.a(s([C.k]),t.p) + C.bL=H.a(s([C.u,C.D,C.U,C.E,C.V]),t.p) + C.aI=new V.u("SCALAR",5121,!0) + C.aG=new V.u("SCALAR",5120,!0) + C.aL=new V.u("SCALAR",5123,!0) + C.aJ=new V.u("SCALAR",5122,!0) + C.cn=H.a(s([C.A,C.aI,C.aG,C.aL,C.aJ]),t.p) + C.cS=new H.aq(4,{translation:C.ag,rotation:C.bL,scale:C.ag,weights:C.cn},C.an,H.ap("aq*>")) + C.bV=H.a(s(["SCALAR","VEC2","VEC3","VEC4","MAT2","MAT3","MAT4"]),t.i) + C.l=new H.aq(7,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},C.bV,H.ap("aq")) + C.ao=new H.al([5120,"BYTE",5121,"UNSIGNED_BYTE",5122,"SHORT",5123,"UNSIGNED_SHORT",5124,"INT",5125,"UNSIGNED_INT",5126,"FLOAT",35664,"FLOAT_VEC2",35665,"FLOAT_VEC3",35666,"FLOAT_VEC4",35667,"INT_VEC2",35668,"INT_VEC3",35669,"INT_VEC4",35670,"BOOL",35671,"BOOL_VEC2",35672,"BOOL_VEC3",35673,"BOOL_VEC4",35674,"FLOAT_MAT2",35675,"FLOAT_MAT3",35676,"FLOAT_MAT4",35678,"SAMPLER_2D"],H.ap("al")) + C.ck=H.a(s([]),H.ap("p")) + C.ap=new H.aq(0,{},C.ck,H.ap("aq")) + C.cv=H.a(s(["KHR","EXT","ADOBE","AGI","AGT","ALCM","ALI","AMZN","ANIMECH","AVR","BLENDER","CAPTURE","CESIUM","CVTOOLS","EPIC","FB","FOXIT","GOOGLE","GRIFFEL","KDAB","LLQ","MAXAR","MESHOPT","MOZ","MPEG","MSFT","NV","OWLII","PANDA3D","POLUTROPON","PTC","S8S","SEIN","SI","SKFB","SKYLINE","SPECTRUM","TRYON","UX3D","VRMC","WEB3D"]),t.i) + C.d1=new H.aq(41,{KHR:null,EXT:null,ADOBE:null,AGI:null,AGT:null,ALCM:null,ALI:null,AMZN:null,ANIMECH:null,AVR:null,BLENDER:null,CAPTURE:null,CESIUM:null,CVTOOLS:null,EPIC:null,FB:null,FOXIT:null,GOOGLE:null,GRIFFEL:null,KDAB:null,LLQ:null,MAXAR:null,MESHOPT:null,MOZ:null,MPEG:null,MSFT:null,NV:null,OWLII:null,PANDA3D:null,POLUTROPON:null,PTC:null,S8S:null,SEIN:null,SI:null,SKFB:null,SKYLINE:null,SPECTRUM:null,TRYON:null,UX3D:null,VRMC:null,WEB3D:null},C.cv,H.ap("aq")) + C.d3=new P.e1(C.d1,H.ap("e1")) + C.d5=new H.cG("call") + C.d6=H.B("bQ") + C.d7=H.B("bR") + C.d8=H.B("bP") + C.L=H.B("a0") + C.d9=H.B("bT") + C.da=H.B("b1") + C.db=H.B("b2") + C.ar=H.B("bn") + C.dc=H.B("bo") + C.as=H.B("bp") + C.dd=H.B("aN") + C.de=H.B("bV") + C.df=H.B("bW") + C.dg=H.B("bq") + C.dh=H.B("c9") + C.di=H.B("c0") + C.au=H.B("aO") + C.dj=H.B("bs") + C.dk=H.B("c6") + C.dl=H.B("b7") + C.dm=H.B("c7") + C.dn=H.B("c8") + C.dp=H.B("ca") + C.dq=H.B("cb") + C.dr=H.B("cc") + C.ds=H.B("cd") + C.dt=H.B("aH") + C.av=H.B("aT") + C.du=H.B("ci") + C.dv=H.B("bv") + C.ay=H.B("bw") + C.az=H.B("by") + C.dw=new P.kS(!1) + C.p=new Y.dy(0,"_ColorPrimaries.Unknown") + C.q=new Y.dy(1,"_ColorPrimaries.sRGB") + C.y=new Y.dy(2,"_ColorPrimaries.Custom") + C.r=new Y.cL(0,"_ColorTransfer.Unknown") + C.dx=new Y.cL(1,"_ColorTransfer.Linear") + C.t=new Y.cL(2,"_ColorTransfer.sRGB") + C.z=new Y.cL(3,"_ColorTransfer.Custom") + C.aB=new Y.dK("_ImageCodec.JPEG") + C.aC=new Y.dK("_ImageCodec.PNG") + C.aD=new Y.dK("_ImageCodec.WebP") + C.dy=new P.cO(null,2) + C.aE=new N.cR(0,"_Storage.DataUri") + C.dz=new N.cR(1,"_Storage.BufferView") + C.dA=new N.cR(2,"_Storage.GLB") + C.aF=new N.cR(3,"_Storage.External")})();(function staticFields(){$.oo=null + $.b4=0 + $.nD=null + $.nC=null + $.oY=null + $.oR=null + $.p7=null + $.m1=null + $.mc=null + $.n1=null + $.cX=null + $.ea=null + $.eb=null + $.mT=!1 + $.x=C.f + $.co=H.a([],H.ap("p"))})();(function lazyInitializers(){var s=hunkHelpers.lazy,r=hunkHelpers.lazyOld + s($,"wf","n6",function(){return H.vF("_$dart_dartClosure")}) + s($,"yH","r9",function(){return H.bd(H.kK({ + toString:function(){return"$receiver$"}}))}) + s($,"yI","ra",function(){return H.bd(H.kK({$method$:null, + toString:function(){return"$receiver$"}}))}) + s($,"yJ","rb",function(){return H.bd(H.kK(null))}) + s($,"yK","rc",function(){return H.bd(function(){var $argumentsExpr$='$arguments$' + try{null.$method$($argumentsExpr$)}catch(q){return q.message}}())}) + s($,"yN","rf",function(){return H.bd(H.kK(void 0))}) + s($,"yO","rg",function(){return H.bd(function(){var $argumentsExpr$='$arguments$' + try{(void 0).$method$($argumentsExpr$)}catch(q){return q.message}}())}) + s($,"yM","re",function(){return H.bd(H.o8(null))}) + s($,"yL","rd",function(){return H.bd(function(){try{null.$method$}catch(q){return q.message}}())}) + s($,"yQ","ri",function(){return H.bd(H.o8(void 0))}) + s($,"yP","rh",function(){return H.bd(function(){try{(void 0).$method$}catch(q){return q.message}}())}) + s($,"yT","np",function(){return P.tY()}) + s($,"wN","fC",function(){var q=new P.C(C.f,H.ap("C")) + q.dK(null) + return q}) + s($,"yR","rj",function(){return new P.kT().$0()}) + s($,"yS","rk",function(){return new P.kU().$0()}) + s($,"yV","nq",function(){return H.tz(H.uH(H.a([-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-2,-2,-2,-2,-2,62,-2,62,-2,63,52,53,54,55,56,57,58,59,60,61,-2,-2,-2,-1,-2,-2,-2,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-2,-2,-2,-2,63,-2,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-2,-2,-2,-2,-2],t.Z)))}) + s($,"yU","rl",function(){return H.tA(0)}) + s($,"zf","rp",function(){return P.uG()}) + r($,"wd","bj",function(){return P.o2("^([0-9]+)\\.([0-9]+)$")}) + r($,"we","pe",function(){return P.o2("^([A-Z0-9]+)_[A-Za-z0-9_]+$")}) + r($,"wC","pw",function(){return E.D("BUFFER_EMBEDDED_BYTELENGTH_MISMATCH",new E.h8(),C.b)}) + r($,"wD","px",function(){return E.D("BUFFER_EXTERNAL_BYTELENGTH_MISMATCH",new E.h6(),C.b)}) + r($,"wE","py",function(){return E.D("BUFFER_GLB_CHUNK_TOO_BIG",new E.h5(),C.e)}) + r($,"wv","na",function(){return E.D("ACCESSOR_MIN_MISMATCH",new E.hd(),C.b)}) + r($,"wu","n9",function(){return E.D("ACCESSOR_MAX_MISMATCH",new E.ha(),C.b)}) + r($,"wk","n8",function(){return E.D("ACCESSOR_ELEMENT_OUT_OF_MIN_BOUND",new E.hb(),C.b)}) + r($,"wj","n7",function(){return E.D("ACCESSOR_ELEMENT_OUT_OF_MAX_BOUND",new E.h9(),C.b)}) + r($,"wz","nb",function(){return E.D("ACCESSOR_VECTOR3_NON_UNIT",new E.hm(),C.b)}) + r($,"wq","pn",function(){return E.D("ACCESSOR_INVALID_SIGN",new E.ho(),C.b)}) + r($,"wi","ph",function(){return E.D("ACCESSOR_ANIMATION_SAMPLER_OUTPUT_NON_NORMALIZED_QUATERNION",new E.hf(),C.b)}) + r($,"ww","pr",function(){return E.D("ACCESSOR_NON_CLAMPED",new E.hl(),C.b)}) + r($,"wo","pl",function(){return E.D("ACCESSOR_INVALID_FLOAT",new E.he(),C.b)}) + r($,"wl","pi",function(){return E.D("ACCESSOR_INDEX_OOB",new E.hk(),C.b)}) + r($,"wn","pk",function(){return E.D("ACCESSOR_INDEX_TRIANGLE_DEGENERATE",new E.hi(),C.i)}) + r($,"wm","pj",function(){return E.D("ACCESSOR_INDEX_PRIMITIVE_RESTART",new E.hj(),C.b)}) + r($,"wg","pf",function(){return E.D("ACCESSOR_ANIMATION_INPUT_NEGATIVE",new E.hh(),C.b)}) + r($,"wh","pg",function(){return E.D("ACCESSOR_ANIMATION_INPUT_NON_INCREASING",new E.hg(),C.b)}) + r($,"wy","pt",function(){return E.D("ACCESSOR_SPARSE_INDICES_NON_INCREASING",new E.hr(),C.b)}) + r($,"wx","ps",function(){return E.D("ACCESSOR_SPARSE_INDEX_OOB",new E.hq(),C.b)}) + r($,"wp","pm",function(){return E.D("ACCESSOR_INVALID_IBM",new E.hp(),C.b)}) + r($,"wG","pz",function(){return E.D("IMAGE_DATA_INVALID",new E.hv(),C.b)}) + r($,"wI","pB",function(){return E.D("IMAGE_MIME_TYPE_INVALID",new E.hu(),C.b)}) + r($,"wL","pE",function(){return E.D("IMAGE_UNEXPECTED_EOS",new E.h2(),C.b)}) + r($,"wM","pF",function(){return E.D("IMAGE_UNRECOGNIZED_FORMAT",new E.h3(),C.e)}) + r($,"wJ","pC",function(){return E.D("IMAGE_NON_ENABLED_MIME_TYPE",new E.h4(),C.b)}) + r($,"wK","pD",function(){return E.D("IMAGE_NPOT_DIMENSIONS",new E.ht(),C.i)}) + r($,"wH","pA",function(){return E.D("IMAGE_FEATURES_UNSUPPORTED",new E.hs(),C.e)}) + r($,"wF","nc",function(){return E.D("DATA_URI_GLB",new E.h7(),C.i)}) + r($,"ws","pp",function(){return E.D("ACCESSOR_JOINTS_INDEX_OOB",new E.hn(),C.b)}) + r($,"wr","po",function(){return E.D("ACCESSOR_JOINTS_INDEX_DUPLICATE",new E.hc(),C.b)}) + r($,"wA","pu",function(){return E.D("ACCESSOR_WEIGHTS_NEGATIVE",new E.h1(),C.b)}) + r($,"wB","pv",function(){return E.D("ACCESSOR_WEIGHTS_NON_NORMALIZED",new E.h_(),C.b)}) + r($,"wt","pq",function(){return E.D("ACCESSOR_JOINTS_USED_ZERO_WEIGHT",new E.h0(),C.e)}) + r($,"x1","mt",function(){return new E.ia(C.b,"IO_ERROR",new E.ib())}) + r($,"xJ","nk",function(){return E.ai("ARRAY_LENGTH_NOT_IN_LIST",new E.jK(),C.b)}) + r($,"xK","eg",function(){return E.ai("ARRAY_TYPE_MISMATCH",new E.jL(),C.b)}) + r($,"xI","nj",function(){return E.ai("DUPLICATE_ELEMENTS",new E.jQ(),C.b)}) + r($,"xM","fE",function(){return E.ai("INVALID_INDEX",new E.jO(),C.b)}) + r($,"xN","fF",function(){return E.ai("INVALID_JSON",new E.jI(),C.b)}) + r($,"xO","qr",function(){return E.ai("INVALID_URI",new E.jE(),C.b)}) + r($,"xL","bO",function(){return E.ai("EMPTY_ENTITY",new E.jM(),C.b)}) + r($,"xP","nl",function(){return E.ai("ONE_OF_MISMATCH",new E.jF(),C.b)}) + r($,"xQ","qs",function(){return E.ai("PATTERN_MISMATCH",new E.jP(),C.b)}) + r($,"xR","Z",function(){return E.ai("TYPE_MISMATCH",new E.jB(),C.b)}) + r($,"xW","nm",function(){return E.ai("VALUE_NOT_IN_LIST",new E.jJ(),C.e)}) + r($,"xX","mu",function(){return E.ai("VALUE_NOT_IN_RANGE",new E.jD(),C.b)}) + r($,"xV","qu",function(){return E.ai("VALUE_MULTIPLE_OF",new E.jG(),C.b)}) + r($,"xS","bk",function(){return E.ai("UNDEFINED_PROPERTY",new E.jC(),C.b)}) + r($,"xT","qt",function(){return E.ai("UNEXPECTED_PROPERTY",new E.jN(),C.e)}) + r($,"xU","d1",function(){return E.ai("UNSATISFIED_DEPENDENCY",new E.jH(),C.b)}) + r($,"yC","r5",function(){return E.q("UNKNOWN_ASSET_MAJOR_VERSION",new E.kp(),C.b)}) + r($,"yD","r6",function(){return E.q("UNKNOWN_ASSET_MINOR_VERSION",new E.ko(),C.e)}) + r($,"yn","qR",function(){return E.q("ASSET_MIN_VERSION_GREATER_THAN_VERSION",new E.ke(),C.e)}) + r($,"yb","qG",function(){return E.q("INVALID_GL_VALUE",new E.kc(),C.b)}) + r($,"y9","qE",function(){return E.q("INTEGER_WRITTEN_AS_FLOAT",new E.kd(),C.e)}) + r($,"xZ","qw",function(){return E.q("ACCESSOR_NORMALIZED_INVALID",new E.kb(),C.b)}) + r($,"y_","qx",function(){return E.q("ACCESSOR_OFFSET_ALIGNMENT",new E.k9(),C.b)}) + r($,"xY","qv",function(){return E.q("ACCESSOR_MATRIX_ALIGNMENT",new E.ka(),C.b)}) + r($,"y0","qy",function(){return E.q("ACCESSOR_SPARSE_COUNT_OUT_OF_RANGE",new E.kk(),C.b)}) + r($,"y1","qz",function(){return E.q("ANIMATION_CHANNEL_TARGET_NODE_SKIN",new E.kl(),C.e)}) + r($,"y2","qA",function(){return E.q("BUFFER_DATA_URI_MIME_TYPE_INVALID",new E.k8(),C.b)}) + r($,"y4","qB",function(){return E.q("BUFFER_VIEW_TOO_BIG_BYTE_STRIDE",new E.k7(),C.b)}) + r($,"y3","mv",function(){return E.q("BUFFER_VIEW_INVALID_BYTE_STRIDE",new E.k6(),C.b)}) + r($,"y5","qC",function(){return E.q("CAMERA_XMAG_YMAG_ZERO",new E.k5(),C.e)}) + r($,"y6","qD",function(){return E.q("CAMERA_YFOV_GEQUAL_PI",new E.k3(),C.e)}) + r($,"y7","nn",function(){return E.q("CAMERA_ZFAR_LEQUAL_ZNEAR",new E.k2(),C.b)}) + r($,"yd","qI",function(){return E.q("MATERIAL_ALPHA_CUTOFF_INVALID_MODE",new E.k0(),C.e)}) + r($,"yg","mw",function(){return E.q("MESH_PRIMITIVE_INVALID_ATTRIBUTE",new E.jV(),C.b)}) + r($,"ym","qQ",function(){return E.q("MESH_PRIMITIVES_UNEQUAL_TARGETS_COUNT",new E.kz(),C.b)}) + r($,"yl","qP",function(){return E.q("MESH_PRIMITIVES_UNEQUAL_JOINTS_COUNT",new E.ky(),C.e)}) + r($,"yi","qM",function(){return E.q("MESH_PRIMITIVE_NO_POSITION",new E.k_(),C.e)}) + r($,"yf","qK",function(){return E.q("MESH_PRIMITIVE_INDEXED_SEMANTIC_CONTINUITY",new E.jX(),C.b)}) + r($,"yk","qO",function(){return E.q("MESH_PRIMITIVE_TANGENT_WITHOUT_NORMAL",new E.jZ(),C.e)}) + r($,"yh","qL",function(){return E.q("MESH_PRIMITIVE_JOINTS_WEIGHTS_MISMATCH",new E.jW(),C.b)}) + r($,"yj","qN",function(){return E.q("MESH_PRIMITIVE_TANGENT_POINTS",new E.jY(),C.e)}) + r($,"ye","qJ",function(){return E.q("MESH_INVALID_WEIGHTS_COUNT",new E.kx(),C.b)}) + r($,"yr","qV",function(){return E.q("NODE_MATRIX_TRS",new E.kv(),C.b)}) + r($,"yp","qT",function(){return E.q("NODE_MATRIX_DEFAULT",new E.kq(),C.i)}) + r($,"ys","qW",function(){return E.q("NODE_MATRIX_NON_TRS",new E.kf(),C.b)}) + r($,"yz","r2",function(){return E.q("ROTATION_NON_UNIT",new E.kw(),C.b)}) + r($,"yF","r8",function(){return E.q("UNUSED_EXTENSION_REQUIRED",new E.kr(),C.b)}) + r($,"yy","r1",function(){return E.q("NON_REQUIRED_EXTENSION",new E.ks(),C.b)}) + r($,"yE","r7",function(){return E.q("UNRESERVED_EXTENSION_PREFIX",new E.kt(),C.e)}) + r($,"ya","qF",function(){return E.q("INVALID_EXTENSION_NAME_FORMAT",new E.ku(),C.e)}) + r($,"yq","qU",function(){return E.q("NODE_EMPTY",new E.kj(),C.i)}) + r($,"yv","qZ",function(){return E.q("NODE_SKINNED_MESH_NON_ROOT",new E.ki(),C.e)}) + r($,"yu","qY",function(){return E.q("NODE_SKINNED_MESH_LOCAL_TRANSFORMS",new E.kh(),C.e)}) + r($,"yt","qX",function(){return E.q("NODE_SKIN_NO_SCENE",new E.kg(),C.b)}) + r($,"yA","r3",function(){return E.q("SKIN_NO_COMMON_ROOT",new E.kn(),C.b)}) + r($,"yB","r4",function(){return E.q("SKIN_SKELETON_INVALID",new E.km(),C.b)}) + r($,"yx","r0",function(){return E.q("NON_RELATIVE_URI",new E.k1(),C.e)}) + r($,"yo","qS",function(){return E.q("MULTIPLE_EXTENSIONS",new E.jT(),C.e)}) + r($,"yw","r_",function(){return E.q("NON_OBJECT_EXTRAS",new E.jS(),C.i)}) + r($,"y8","no",function(){return E.q("EXTRA_PROPERTY",new E.k4(),C.i)}) + r($,"yc","qH",function(){return E.q("KHR_LIGHTS_PUNCTUAL_LIGHT_SPOT_ANGLES",new E.jU(),C.b)}) + r($,"x4","pV",function(){return E.v("ACCESSOR_TOTAL_OFFSET_ALIGNMENT",new E.j0(),C.b)}) + r($,"x2","pU",function(){return E.v("ACCESSOR_SMALL_BYTESTRIDE",new E.j5(),C.b)}) + r($,"x3","nd",function(){return E.v("ACCESSOR_TOO_LONG",new E.iQ(),C.b)}) + r($,"x5","pW",function(){return E.v("ACCESSOR_USAGE_OVERRIDE",new E.iC(),C.b)}) + r($,"x8","pZ",function(){return E.v("ANIMATION_DUPLICATE_TARGETS",new E.j6(),C.b)}) + r($,"x6","pX",function(){return E.v("ANIMATION_CHANNEL_TARGET_NODE_MATRIX",new E.iy(),C.b)}) + r($,"x7","pY",function(){return E.v("ANIMATION_CHANNEL_TARGET_NODE_WEIGHTS_NO_MORPHS",new E.ix(),C.b)}) + r($,"xb","q1",function(){return E.v("ANIMATION_SAMPLER_INPUT_ACCESSOR_WITHOUT_BOUNDS",new E.iA(),C.b)}) + r($,"x9","q_",function(){return E.v("ANIMATION_SAMPLER_INPUT_ACCESSOR_INVALID_FORMAT",new E.iB(),C.b)}) + r($,"xd","q3",function(){return E.v("ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_FORMAT",new E.iw(),C.b)}) + r($,"xa","q0",function(){return E.v("ANIMATION_SAMPLER_INPUT_ACCESSOR_TOO_FEW_ELEMENTS",new E.iz(),C.b)}) + r($,"xc","q2",function(){return E.v("ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_COUNT",new E.iv(),C.b)}) + r($,"xe","q4",function(){return E.v("BUFFER_MISSING_GLB_DATA",new E.iF(),C.b)}) + r($,"xg","ne",function(){return E.v("BUFFER_VIEW_TOO_LONG",new E.iD(),C.b)}) + r($,"xf","q5",function(){return E.v("BUFFER_VIEW_TARGET_OVERRIDE",new E.j4(),C.b)}) + r($,"xh","q6",function(){return E.v("IMAGE_BUFFER_VIEW_WITH_BYTESTRIDE",new E.iE(),C.b)}) + r($,"xi","q7",function(){return E.v("INVALID_IBM_ACCESSOR_COUNT",new E.iX(),C.b)}) + r($,"xl","ng",function(){return E.v("MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT",new E.iI(),C.b)}) + r($,"xr","nh",function(){return E.v("MESH_PRIMITIVE_POSITION_ACCESSOR_WITHOUT_BOUNDS",new E.iJ(),C.b)}) + r($,"xk","q8",function(){return E.v("MESH_PRIMITIVE_ACCESSOR_WITHOUT_BYTESTRIDE",new E.iG(),C.b)}) + r($,"xj","nf",function(){return E.v("MESH_PRIMITIVE_ACCESSOR_UNALIGNED",new E.iH(),C.b)}) + r($,"xo","qb",function(){return E.v("MESH_PRIMITIVE_INDICES_ACCESSOR_WITH_BYTESTRIDE",new E.iP(),C.b)}) + r($,"xn","qa",function(){return E.v("MESH_PRIMITIVE_INDICES_ACCESSOR_INVALID_FORMAT",new E.iO(),C.b)}) + r($,"xm","q9",function(){return E.v("MESH_PRIMITIVE_INCOMPATIBLE_MODE",new E.iN(),C.e)}) + r($,"xs","qe",function(){return E.v("MESH_PRIMITIVE_TOO_FEW_TEXCOORDS",new E.iM(),C.b)}) + r($,"xt","qf",function(){return E.v("MESH_PRIMITIVE_UNEQUAL_ACCESSOR_COUNT",new E.iR(),C.b)}) + r($,"xq","qd",function(){return E.v("MESH_PRIMITIVE_MORPH_TARGET_NO_BASE_ACCESSOR",new E.iL(),C.b)}) + r($,"xp","qc",function(){return E.v("MESH_PRIMITIVE_MORPH_TARGET_INVALID_ATTRIBUTE_COUNT",new E.iK(),C.b)}) + r($,"xu","qg",function(){return E.v("NODE_LOOP",new E.j3(),C.b)}) + r($,"xv","qh",function(){return E.v("NODE_PARENT_OVERRIDE",new E.iS(),C.b)}) + r($,"xy","qk",function(){return E.v("NODE_WEIGHTS_INVALID",new E.iV(),C.b)}) + r($,"xw","qi",function(){return E.v("NODE_SKIN_WITH_NON_SKINNED_MESH",new E.iU(),C.b)}) + r($,"xx","qj",function(){return E.v("NODE_SKINNED_MESH_WITHOUT_SKIN",new E.iT(),C.e)}) + r($,"xz","ql",function(){return E.v("SCENE_NON_ROOT_NODE",new E.iW(),C.b)}) + r($,"xB","qn",function(){return E.v("SKIN_IBM_INVALID_FORMAT",new E.iY(),C.b)}) + r($,"xA","qm",function(){return E.v("SKIN_IBM_ACCESSOR_WITH_BYTESTRIDE",new E.iZ(),C.b)}) + r($,"xC","ni",function(){return E.v("TEXTURE_INVALID_IMAGE_MIME_TYPE",new E.iu(),C.b)}) + r($,"xD","qo",function(){return E.v("UNDECLARED_EXTENSION",new E.it(),C.b)}) + r($,"xE","qp",function(){return E.v("UNEXPECTED_EXTENSION_OBJECT",new E.is(),C.b)}) + r($,"xF","N",function(){return E.v("UNRESOLVED_REFERENCE",new E.j_(),C.b)}) + r($,"xG","qq",function(){return E.v("UNSUPPORTED_EXTENSION",new E.j1(),C.e)}) + r($,"xH","fD",function(){return E.v("UNUSED_OBJECT",new E.j2(),C.i)}) + r($,"wS","pK",function(){return E.ar("GLB_INVALID_MAGIC",new E.hE(),C.b)}) + r($,"wT","pL",function(){return E.ar("GLB_INVALID_VERSION",new E.hD(),C.b)}) + r($,"wV","pN",function(){return E.ar("GLB_LENGTH_TOO_SMALL",new E.hC(),C.b)}) + r($,"wO","pG",function(){return E.ar("GLB_CHUNK_LENGTH_UNALIGNED",new E.hM(),C.b)}) + r($,"wU","pM",function(){return E.ar("GLB_LENGTH_MISMATCH",new E.hA(),C.b)}) + r($,"wP","pH",function(){return E.ar("GLB_CHUNK_TOO_BIG",new E.hL(),C.b)}) + r($,"wR","pJ",function(){return E.ar("GLB_EMPTY_CHUNK",new E.hH(),C.b)}) + r($,"wQ","pI",function(){return E.ar("GLB_DUPLICATE_CHUNK",new E.hI(),C.b)}) + r($,"wY","pQ",function(){return E.ar("GLB_UNEXPECTED_END_OF_CHUNK_HEADER",new E.hB(),C.b)}) + r($,"wX","pP",function(){return E.ar("GLB_UNEXPECTED_END_OF_CHUNK_DATA",new E.hz(),C.b)}) + r($,"wZ","pR",function(){return E.ar("GLB_UNEXPECTED_END_OF_HEADER",new E.hF(),C.b)}) + r($,"x_","pS",function(){return E.ar("GLB_UNEXPECTED_FIRST_CHUNK",new E.hK(),C.b)}) + r($,"wW","pO",function(){return E.ar("GLB_UNEXPECTED_BIN_CHUNK",new E.hJ(),C.b)}) + r($,"x0","pT",function(){return E.ar("GLB_UNKNOWN_CHUNK_TYPE",new E.hG(),C.e)}) + r($,"za","nr",function(){return H.ty(1)}) + r($,"zc","rm",function(){return T.tv()}) + r($,"zg","rq",function(){return T.of()}) + r($,"zd","rn",function(){var q=T.tL() + q.a[3]=1 + return q}) + r($,"ze","ro",function(){return T.of()})})();(function nativeSupport(){!function(){var s=function(a){var m={} + m[a]=1 + return Object.keys(hunkHelpers.convertToFastObject(m))[0]} + v.getIsolateTag=function(a){return s("___dart_"+a+v.isolateTag)} + var r="___dart_isolate_tags_" + var q=Object[r]||(Object[r]=Object.create(null)) + var p="_ZxYxX" + for(var o=0;;o++){var n=s(p+"_"+o+"_") + if(!(n in q)){q[n]=1 + v.isolateTag=n + break}}v.dispatchPropertyName=v.getIsolateTag("dispatch_record")}() + hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer:J.cz,DataView:H.dm,ArrayBufferView:H.dm,Float32Array:H.dk,Float64Array:H.eI,Int16Array:H.eJ,Int32Array:H.eK,Int8Array:H.eL,Uint16Array:H.eM,Uint32Array:H.eN,Uint8ClampedArray:H.dn,CanvasPixelArray:H.dn,Uint8Array:H.cf}) + hunkHelpers.setOrUpdateLeafTags({ArrayBuffer:true,DataView:true,ArrayBufferView:false,Float32Array:true,Float64Array:true,Int16Array:true,Int32Array:true,Int8Array:true,Uint16Array:true,Uint32Array:true,Uint8ClampedArray:true,CanvasPixelArray:true,Uint8Array:false}) + H.cE.$nativeSuperclassTag="ArrayBufferView" + H.dO.$nativeSuperclassTag="ArrayBufferView" + H.dP.$nativeSuperclassTag="ArrayBufferView" + H.dl.$nativeSuperclassTag="ArrayBufferView" + H.dQ.$nativeSuperclassTag="ArrayBufferView" + H.dR.$nativeSuperclassTag="ArrayBufferView" + H.av.$nativeSuperclassTag="ArrayBufferView"})() + Function.prototype.$1=function(a){return this(a)} + Function.prototype.$0=function(){return this()} + Function.prototype.$2=function(a,b){return this(a,b)} + Function.prototype.$1$1=function(a){return this(a)} + Function.prototype.$3=function(a,b,c){return this(a,b,c)} + Function.prototype.$1$0=function(){return this()} + Function.prototype.$4=function(a,b,c,d){return this(a,b,c,d)} + Function.prototype.$1$2=function(a,b){return this(a,b)} + Function.prototype.$2$0=function(){return this()} + convertAllToFastObject(w) + convertToFastObject($);(function(a){if(typeof document==="undefined"){a(null) + return}if(typeof document.currentScript!='undefined'){a(document.currentScript) + return}var s=document.scripts + function onLoad(b){for(var q=0;q validator.version(); + + /** + * Returns an array of supported extensions names. + * @returns {string[]} + */ + exports.supportedExtensions = () => validator.supportedExtensions(); + + /** + * Validates an asset from bytes. + * @param {Uint8Array} data - Byte array containing glTF or GLB data. + * @param {ValidationOptions} options - Object with validation options. + * @returns {Promise} Promise with validation result in object form. + */ + exports.validateBytes = (data, options) => validator.validateBytes(data, options); + + /** + * Validates an asset from JSON string. + * @param {string} json - String containing glTF JSON. + * @param {ValidationOptions} options - Object with validation options. + * @returns {Promise} Promise with validation result in object form. + */ + exports.validateString = (json, options) => validator.validateString(json, options); + + /** + @typedef {Object} ValidationOptions + @property {string} uri - Absolute or relative asset URI that will be copied to validation report. + @property {ExternalResourceFunction} externalResourceFunction - Function for loading external resources. If omitted, external resources are not validated. + @property {boolean} writeTimestamp - Set to `false` to omit timestamp from the validation report. Default is `true`. + @property {number} maxIssues - Max number of reported issues. Use `0` for unlimited output. + @property {string[]} ignoredIssues - Array of ignored issue codes. + @property {Object} severityOverrides - Object with overridden severities for issue codes. + */ + + /** + * @callback ExternalResourceFunction + * @param {string} uri - Relative URI of the external resource. + * @returns {Promise} - Promise with Uint8Array data. + */ + + },{"./gltf_validator.dart.js":3}]},{},[2]); \ No newline at end of file diff --git a/templerun2/assets/characters/demon_monkey/demon_monkey_chaser.glb b/templerun2/assets/characters/demon_monkey/demon_monkey_chaser.glb new file mode 100644 index 00000000..9de6a68c Binary files /dev/null and b/templerun2/assets/characters/demon_monkey/demon_monkey_chaser.glb differ diff --git a/templerun2/assets/characters/guy_dangerous/guy_dangerous.glb b/templerun2/assets/characters/guy_dangerous/guy_dangerous.glb new file mode 100644 index 00000000..7dd1faa9 Binary files /dev/null and b/templerun2/assets/characters/guy_dangerous/guy_dangerous.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Left_Skullmonkey.glb b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Left_Skullmonkey.glb new file mode 100644 index 00000000..fa55eea1 Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Left_Skullmonkey.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Right_Skullmonkey.glb b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Right_Skullmonkey.glb new file mode 100644 index 00000000..987ad2e8 Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_a_Turn_Right_Skullmonkey.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Left_Skullmonkey.glb b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Left_Skullmonkey.glb new file mode 100644 index 00000000..a9ffe9ea Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Left_Skullmonkey.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Right_Skullmonkey.glb b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Right_Skullmonkey.glb new file mode 100644 index 00000000..064d66c2 Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Arctic_Forest_junction_b_Turn_Right_Skullmonkey.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Arctic.glb b/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Arctic.glb new file mode 100644 index 00000000..05802a59 Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Arctic.glb differ diff --git a/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Skin_Arctic.jpg b/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Skin_Arctic.jpg new file mode 100644 index 00000000..6fcf813e Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/Scarlett_Fox_Skin_Arctic.jpg differ diff --git a/templerun2/assets/characters/scarlett_fox/skull_sled_a_prefab.glb b/templerun2/assets/characters/scarlett_fox/skull_sled_a_prefab.glb new file mode 100644 index 00000000..2cac80ff Binary files /dev/null and b/templerun2/assets/characters/scarlett_fox/skull_sled_a_prefab.glb differ diff --git a/templerun2/assets/effects/effects_additive.jpg b/templerun2/assets/effects/effects_additive.jpg new file mode 100644 index 00000000..09cd503b Binary files /dev/null and b/templerun2/assets/effects/effects_additive.jpg differ diff --git a/templerun2/assets/effects/effects_transparent.webp b/templerun2/assets/effects/effects_transparent.webp new file mode 100644 index 00000000..38e46f7b Binary files /dev/null and b/templerun2/assets/effects/effects_transparent.webp differ diff --git a/templerun2/assets/effects/effects_transparent_Arctic.webp b/templerun2/assets/effects/effects_transparent_Arctic.webp new file mode 100644 index 00000000..ba78eea3 Binary files /dev/null and b/templerun2/assets/effects/effects_transparent_Arctic.webp differ diff --git a/templerun2/assets/effects/power_up_fx_mesh.glb b/templerun2/assets/effects/power_up_fx_mesh.glb new file mode 100644 index 00000000..a8d6771e Binary files /dev/null and b/templerun2/assets/effects/power_up_fx_mesh.glb differ diff --git a/templerun2/assets/environments/Arctic_Skybox.glb b/templerun2/assets/environments/Arctic_Skybox.glb new file mode 100644 index 00000000..67276a19 Binary files /dev/null and b/templerun2/assets/environments/Arctic_Skybox.glb differ diff --git a/templerun2/assets/environments/Machu_Skybox.glb b/templerun2/assets/environments/Machu_Skybox.glb new file mode 100644 index 00000000..b1d292fb Binary files /dev/null and b/templerun2/assets/environments/Machu_Skybox.glb differ diff --git a/templerun2/assets/objects/chest/chest.glb b/templerun2/assets/objects/chest/chest.glb new file mode 100644 index 00000000..1110cb30 Binary files /dev/null and b/templerun2/assets/objects/chest/chest.glb differ diff --git a/templerun2/assets/objects/chest/chest.jpg b/templerun2/assets/objects/chest/chest.jpg new file mode 100644 index 00000000..ae733f14 Binary files /dev/null and b/templerun2/assets/objects/chest/chest.jpg differ diff --git a/templerun2/assets/objects/coins/coin_default.jpg b/templerun2/assets/objects/coins/coin_default.jpg new file mode 100644 index 00000000..192f5b26 Binary files /dev/null and b/templerun2/assets/objects/coins/coin_default.jpg differ diff --git a/templerun2/assets/objects/coins/default_coin_gold.glb b/templerun2/assets/objects/coins/default_coin_gold.glb new file mode 100644 index 00000000..27ef416d Binary files /dev/null and b/templerun2/assets/objects/coins/default_coin_gold.glb differ diff --git a/templerun2/assets/objects/pickups/PickUps01.jpg b/templerun2/assets/objects/pickups/PickUps01.jpg new file mode 100644 index 00000000..d04465b2 Binary files /dev/null and b/templerun2/assets/objects/pickups/PickUps01.jpg differ diff --git a/templerun2/assets/objects/pickups/pickupBoost.glb b/templerun2/assets/objects/pickups/pickupBoost.glb new file mode 100644 index 00000000..da926e2d Binary files /dev/null and b/templerun2/assets/objects/pickups/pickupBoost.glb differ diff --git a/templerun2/assets/objects/pickups/pickupShield.glb b/templerun2/assets/objects/pickups/pickupShield.glb new file mode 100644 index 00000000..03f92386 Binary files /dev/null and b/templerun2/assets/objects/pickups/pickupShield.glb differ diff --git a/templerun2/assets/objects/pickups/pickupVacuum.glb b/templerun2/assets/objects/pickups/pickupVacuum.glb new file mode 100644 index 00000000..52456457 Binary files /dev/null and b/templerun2/assets/objects/pickups/pickupVacuum.glb differ diff --git a/templerun2/assets/sounds/music/Game.mp3 b/templerun2/assets/sounds/music/Game.mp3 new file mode 100644 index 00000000..28f2a320 Binary files /dev/null and b/templerun2/assets/sounds/music/Game.mp3 differ diff --git a/templerun2/assets/sounds/music/Game.ogg b/templerun2/assets/sounds/music/Game.ogg new file mode 100644 index 00000000..638a270a Binary files /dev/null and b/templerun2/assets/sounds/music/Game.ogg differ diff --git a/templerun2/assets/sounds/music/NightMusic.mp3 b/templerun2/assets/sounds/music/NightMusic.mp3 new file mode 100644 index 00000000..4cc8f029 Binary files /dev/null and b/templerun2/assets/sounds/music/NightMusic.mp3 differ diff --git a/templerun2/assets/sounds/music/NightMusic.ogg b/templerun2/assets/sounds/music/NightMusic.ogg new file mode 100644 index 00000000..ce953ea7 Binary files /dev/null and b/templerun2/assets/sounds/music/NightMusic.ogg differ diff --git a/templerun2/assets/sounds/sfx/sfx.mp3 b/templerun2/assets/sounds/sfx/sfx.mp3 new file mode 100644 index 00000000..007a72cd Binary files /dev/null and b/templerun2/assets/sounds/sfx/sfx.mp3 differ diff --git a/templerun2/assets/sounds/sfx/sfx.ogg b/templerun2/assets/sounds/sfx/sfx.ogg new file mode 100644 index 00000000..6bf10edb Binary files /dev/null and b/templerun2/assets/sounds/sfx/sfx.ogg differ diff --git a/templerun2/assets/sounds/sfx/track_sfx.mp3 b/templerun2/assets/sounds/sfx/track_sfx.mp3 new file mode 100644 index 00000000..6160a83f Binary files /dev/null and b/templerun2/assets/sounds/sfx/track_sfx.mp3 differ diff --git a/templerun2/assets/sounds/sfx/track_sfx.ogg b/templerun2/assets/sounds/sfx/track_sfx.ogg new file mode 100644 index 00000000..13409a77 Binary files /dev/null and b/templerun2/assets/sounds/sfx/track_sfx.ogg differ diff --git a/templerun2/assets/textures/Arctic_Flags01.jpg b/templerun2/assets/textures/Arctic_Flags01.jpg new file mode 100644 index 00000000..57b268a4 Binary files /dev/null and b/templerun2/assets/textures/Arctic_Flags01.jpg differ diff --git a/templerun2/assets/textures/Arrow.jpg b/templerun2/assets/textures/Arrow.jpg new file mode 100644 index 00000000..f607a201 Binary files /dev/null and b/templerun2/assets/textures/Arrow.jpg differ diff --git a/templerun2/assets/textures/Atlas_Opaque_Arctic_B.jpg b/templerun2/assets/textures/Atlas_Opaque_Arctic_B.jpg new file mode 100644 index 00000000..7664a39c Binary files /dev/null and b/templerun2/assets/textures/Atlas_Opaque_Arctic_B.jpg differ diff --git a/templerun2/assets/textures/Atlas_Opaque_Arctic_Gloss_B.png b/templerun2/assets/textures/Atlas_Opaque_Arctic_Gloss_B.png new file mode 100644 index 00000000..7afe226a Binary files /dev/null and b/templerun2/assets/textures/Atlas_Opaque_Arctic_Gloss_B.png differ diff --git a/templerun2/assets/textures/BlobShadow.webp b/templerun2/assets/textures/BlobShadow.webp new file mode 100644 index 00000000..6e892eb4 Binary files /dev/null and b/templerun2/assets/textures/BlobShadow.webp differ diff --git a/templerun2/assets/textures/Sky_Arctic01.jpg b/templerun2/assets/textures/Sky_Arctic01.jpg new file mode 100644 index 00000000..70cc24bc Binary files /dev/null and b/templerun2/assets/textures/Sky_Arctic01.jpg differ diff --git a/templerun2/assets/textures/beige_bg.jpg b/templerun2/assets/textures/beige_bg.jpg new file mode 100644 index 00000000..70e683cd Binary files /dev/null and b/templerun2/assets/textures/beige_bg.jpg differ diff --git a/templerun2/assets/textures/foliage_transparent.webp b/templerun2/assets/textures/foliage_transparent.webp new file mode 100644 index 00000000..ade0b795 Binary files /dev/null and b/templerun2/assets/textures/foliage_transparent.webp differ diff --git a/templerun2/assets/textures/machu_lightmaps.jpg b/templerun2/assets/textures/machu_lightmaps.jpg new file mode 100644 index 00000000..a0e20644 Binary files /dev/null and b/templerun2/assets/textures/machu_lightmaps.jpg differ diff --git a/templerun2/assets/textures/machu_master_a.jpg b/templerun2/assets/textures/machu_master_a.jpg new file mode 100644 index 00000000..81a231ea Binary files /dev/null and b/templerun2/assets/textures/machu_master_a.jpg differ diff --git a/templerun2/assets/textures/pan_water_b.webp b/templerun2/assets/textures/pan_water_b.webp new file mode 100644 index 00000000..0f526b50 Binary files /dev/null and b/templerun2/assets/textures/pan_water_b.webp differ diff --git a/templerun2/assets/tracks/Machu/Base/base_pack.glb b/templerun2/assets/tracks/Machu/Base/base_pack.glb new file mode 100644 index 00000000..e7131a74 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Base/base_pack.glb differ diff --git a/templerun2/assets/tracks/Machu/Base/base_pack_1.glb b/templerun2/assets/tracks/Machu/Base/base_pack_1.glb new file mode 100644 index 00000000..e7169159 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Base/base_pack_1.glb differ diff --git a/templerun2/assets/tracks/Machu/Base/base_pack_2.glb b/templerun2/assets/tracks/Machu/Base/base_pack_2.glb new file mode 100644 index 00000000..8dbfe099 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Base/base_pack_2.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_entrance_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_entrance_a.glb new file mode 100644 index 00000000..5681e1d8 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_entrance_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_exit_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_exit_a.glb new file mode 100644 index 00000000..d1871b21 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_exit_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_hill_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_hill_a.glb new file mode 100644 index 00000000..ed751d23 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_hill_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_jump_over_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_jump_over_a.glb new file mode 100644 index 00000000..9a36015e Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_jump_over_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_jump_over_b.glb b/templerun2/assets/tracks/Machu/Forest/forest_jump_over_b.glb new file mode 100644 index 00000000..577df6dc Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_jump_over_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_junction_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_junction_a.glb new file mode 100644 index 00000000..881a89ec Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_junction_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_junction_b.glb b/templerun2/assets/tracks/Machu/Forest/forest_junction_b.glb new file mode 100644 index 00000000..de3739b1 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_junction_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_river_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_river_a.glb new file mode 100644 index 00000000..7382049a Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_river_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_slide_under_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_slide_under_a.glb new file mode 100644 index 00000000..3e4b7cdf Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_slide_under_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_straight_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_straight_a.glb new file mode 100644 index 00000000..81451260 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_straight_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_straight_b.glb b/templerun2/assets/tracks/Machu/Forest/forest_straight_b.glb new file mode 100644 index 00000000..075c37d0 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_straight_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_stumble_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_stumble_a.glb new file mode 100644 index 00000000..c6221bec Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_stumble_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_stumble_b.glb b/templerun2/assets/tracks/Machu/Forest/forest_stumble_b.glb new file mode 100644 index 00000000..a7426c28 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_stumble_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_turn_left_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_turn_left_a.glb new file mode 100644 index 00000000..ee17541c Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_turn_left_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Forest/forest_turn_right_a.glb b/templerun2/assets/tracks/Machu/Forest/forest_turn_right_a.glb new file mode 100644 index 00000000..97896b38 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Forest/forest_turn_right_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_cart_a_prefab.glb b/templerun2/assets/tracks/Machu/MineCart/mine_cart_a_prefab.glb new file mode 100644 index 00000000..16f4d988 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_cart_a_prefab.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_curve_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_curve_a.glb new file mode 100644 index 00000000..4edac869 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_curve_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_curve_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_curve_b.glb new file mode 100644 index 00000000..f391257b Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_curve_b.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_curve_c.glb b/templerun2/assets/tracks/Machu/MineCart/mine_curve_c.glb new file mode 100644 index 00000000..6d18685f Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_curve_c.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_curve_d.glb b/templerun2/assets/tracks/Machu/MineCart/mine_curve_d.glb new file mode 100644 index 00000000..0c7c8f14 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_curve_d.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_duck_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_duck_a.glb new file mode 100644 index 00000000..9ae6b9ce Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_duck_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_duck_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_duck_b.glb new file mode 100644 index 00000000..a7fe2b4b Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_duck_b.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_entrance_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_entrance_a.glb new file mode 100644 index 00000000..e596d5c4 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_entrance_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_exit_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_exit_a.glb new file mode 100644 index 00000000..3ae1fe32 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_exit_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_junction_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_junction_a.glb new file mode 100644 index 00000000..e14a91a6 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_junction_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_junction_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_junction_b.glb new file mode 100644 index 00000000..25cc3ba1 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_junction_b.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_junction_c.glb b/templerun2/assets/tracks/Machu/MineCart/mine_junction_c.glb new file mode 100644 index 00000000..fc1bfe13 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_junction_c.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_a.glb new file mode 100644 index 00000000..f2e756db Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_b.glb new file mode 100644 index 00000000..57cbd9f9 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_b.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_end_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_end_a.glb new file mode 100644 index 00000000..baa07d19 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_end_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_start_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_start_a.glb new file mode 100644 index 00000000..43b0858f Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_left_start_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_a.glb new file mode 100644 index 00000000..6c47f2c1 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_b.glb new file mode 100644 index 00000000..37722a51 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_b.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_end_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_end_a.glb new file mode 100644 index 00000000..2509bcb6 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_end_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_start_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_start_a.glb new file mode 100644 index 00000000..36ad6c8e Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_ledge_right_start_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_straight_a.glb b/templerun2/assets/tracks/Machu/MineCart/mine_straight_a.glb new file mode 100644 index 00000000..01a96f15 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_straight_a.glb differ diff --git a/templerun2/assets/tracks/Machu/MineCart/mine_straight_b.glb b/templerun2/assets/tracks/Machu/MineCart/mine_straight_b.glb new file mode 100644 index 00000000..75e9c4c8 Binary files /dev/null and b/templerun2/assets/tracks/Machu/MineCart/mine_straight_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_end_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_end_a.glb new file mode 100644 index 00000000..ed3856e9 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_end_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_jump_or_slide_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_or_slide_a.glb new file mode 100644 index 00000000..950f088a Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_or_slide_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_a.glb new file mode 100644 index 00000000..3ad83570 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_b.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_b.glb new file mode 100644 index 00000000..830bc4ad Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_jump_over_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_junction_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_junction_a.glb new file mode 100644 index 00000000..959ef7ae Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_junction_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_start_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_start_a.glb new file mode 100644 index 00000000..765f268c Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_start_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_straight_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_a.glb new file mode 100644 index 00000000..791203cf Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_straight_b.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_b.glb new file mode 100644 index 00000000..1df0b394 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_b.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_straight_c.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_c.glb new file mode 100644 index 00000000..6c47b56a Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_c.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_straight_d.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_d.glb new file mode 100644 index 00000000..906324b8 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_d.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_straight_e.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_e.glb new file mode 100644 index 00000000..c404590b Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_straight_e.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_stumble_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_stumble_a.glb new file mode 100644 index 00000000..9eaccbae Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_stumble_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_turn_left_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_turn_left_a.glb new file mode 100644 index 00000000..0ef2686f Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_turn_left_a.glb differ diff --git a/templerun2/assets/tracks/Machu/Narrows/narrow_turn_right_a.glb b/templerun2/assets/tracks/Machu/Narrows/narrow_turn_right_a.glb new file mode 100644 index 00000000..09a57062 Binary files /dev/null and b/templerun2/assets/tracks/Machu/Narrows/narrow_turn_right_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_a.glb new file mode 100644 index 00000000..42fa1c4b Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_b.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_b.glb new file mode 100644 index 00000000..91dec481 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_45_b.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_a.glb new file mode 100644 index 00000000..75968f25 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_b.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_b.glb new file mode 100644 index 00000000..a4565fde Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_curve_90_b.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_b.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_b.glb new file mode 100644 index 00000000..b0468fb5 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_b.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_center.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_center.glb new file mode 100644 index 00000000..70cc11cd Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_center.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_left.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_left.glb new file mode 100644 index 00000000..fe23a58b Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_left.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_right.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_right.glb new file mode 100644 index 00000000..ebceca38 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_blocked_right.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_center_blocked_sides.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_center_blocked_sides.glb new file mode 100644 index 00000000..54bec854 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_center_blocked_sides.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_left_tilt_right.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_left_tilt_right.glb new file mode 100644 index 00000000..24a9d37b Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_left_tilt_right.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_right_tilt_left.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_right_tilt_left.glb new file mode 100644 index 00000000..f71933a2 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_duck_right_tilt_left.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_end_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_end_a.glb new file mode 100644 index 00000000..3c86bc65 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_end_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_junction_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_junction_a.glb new file mode 100644 index 00000000..e54f6c82 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_junction_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_start_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_start_a.glb new file mode 100644 index 00000000..e834fbde Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_start_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_a.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_a.glb new file mode 100644 index 00000000..b8f04857 Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_a.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_b.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_b.glb new file mode 100644 index 00000000..b2247cba Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_b.glb differ diff --git a/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_c.glb b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_c.glb new file mode 100644 index 00000000..d6c3a88c Binary files /dev/null and b/templerun2/assets/tracks/Machu/WaterSlide/waterslide_straight_c.glb differ diff --git a/templerun2/bundle.js b/templerun2/bundle.js new file mode 100644 index 00000000..3c06d6b8 --- /dev/null +++ b/templerun2/bundle.js @@ -0,0 +1,172169 @@ +!(function (e) { + function t(t) { + for (var n, r, o = t[0], a = t[1], s = 0, l = []; s < o.length; s++) (r = o[s]), Object.prototype.hasOwnProperty.call(i, r) && i[r] && l.push(i[r][0]), (i[r] = 0); + for (n in a) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]); + for (c && c(t); l.length; ) l.shift()(); + } + var n = {}, + i = { 0: 0 }; + function r(t) { + if (n[t]) return n[t].exports; + var i = (n[t] = { i: t, l: !1, exports: {} }); + return e[t].call(i.exports, i, i.exports, r), (i.l = !0), i.exports; + } + (r.e = function (e) { + var t = [], + n = i[e]; + if (0 !== n) + if (n) t.push(n[2]); + else { + var o = new Promise(function (t, r) { + n = i[e] = [t, r]; + }); + t.push((n[2] = o)); + var a, + s = document.createElement("script"); + (s.charset = "utf-8"), + (s.timeout = 120), + r.nc && s.setAttribute("nonce", r.nc), + (s.src = (function (e) { + return r.p + "" + e + ".bundle.js"; + })(e)); + var c = new Error(); + a = function (t) { + (s.onerror = s.onload = null), clearTimeout(l); + var n = i[e]; + if (0 !== n) { + if (n) { + var r = t && ("load" === t.type ? "missing" : t.type), + o = t && t.target && t.target.src; + (c.message = "Loading chunk " + e + " failed.\n(" + r + ": " + o + ")"), (c.name = "ChunkLoadError"), (c.type = r), (c.request = o), n[1](c); + } + i[e] = void 0; + } + }; + var l = setTimeout(function () { + a({ type: "timeout", target: s }); + }, 12e4); + (s.onerror = s.onload = a), document.head.appendChild(s); + } + return Promise.all(t); + }), + (r.m = e), + (r.c = n), + (r.d = function (e, t, n) { + r.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n }); + }), + (r.r = function (e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (r.t = function (e, t) { + if ((1 & t && (e = r(e)), 8 & t)) return e; + if (4 & t && "object" == typeof e && e && e.__esModule) return e; + var n = Object.create(null); + if ((r.r(n), Object.defineProperty(n, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e)) + for (var i in e) + r.d( + n, + i, + function (t) { + return e[t]; + }.bind(null, i) + ); + return n; + }), + (r.n = function (e) { + var t = + e && e.__esModule + ? function () { + return e.default; + } + : function () { + return e; + }; + return r.d(t, "a", t), t; + }), + (r.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }), + (r.p = ""), + (r.oe = function (e) { + throw e; + }); + var o = (window.webpackJsonp = window.webpackJsonp || []), + a = o.push.bind(o); + (o.push = t), (o = o.slice()); + for (var s = 0; s < o.length; s++) t(o[s]); + var c = a; + r((r.s = 351)); +})([ + function (e, t, n) { + "use strict"; + function i() {} + n.d(t, "a", function () { + return ae; + }), + n.d(t, "b", function () { + return U; + }), + n.d(t, "c", function () { + return L; + }), + n.d(t, "d", function () { + return m; + }), + n.d(t, "e", function () { + return T; + }), + n.d(t, "f", function () { + return k; + }), + n.d(t, "g", function () { + return Q; + }), + n.d(t, "h", function () { + return ne; + }), + n.d(t, "i", function () { + return h; + }), + n.d(t, "j", function () { + return re; + }), + n.d(t, "k", function () { + return _; + }), + n.d(t, "l", function () { + return b; + }), + n.d(t, "m", function () { + return v; + }), + n.d(t, "n", function () { + return P; + }), + n.d(t, "o", function () { + return S; + }), + n.d(t, "p", function () { + return u; + }), + n.d(t, "q", function () { + return ee; + }), + n.d(t, "r", function () { + return q; + }), + n.d(t, "s", function () { + return oe; + }), + n.d(t, "t", function () { + return g; + }), + n.d(t, "u", function () { + return s; + }), + n.d(t, "v", function () { + return x; + }), + n.d(t, "w", function () { + return ie; + }), + n.d(t, "x", function () { + return i; + }), + n.d(t, "y", function () { + return f; + }), + n.d(t, "z", function () { + return F; + }), + n.d(t, "A", function () { + return w; + }), + n.d(t, "B", function () { + return a; + }), + n.d(t, "C", function () { + return c; + }), + n.d(t, "D", function () { + return M; + }), + n.d(t, "E", function () { + return A; + }), + n.d(t, "F", function () { + return O; + }), + n.d(t, "G", function () { + return E; + }), + n.d(t, "H", function () { + return C; + }), + n.d(t, "I", function () { + return l; + }), + n.d(t, "J", function () { + return y; + }), + n.d(t, "K", function () { + return J; + }), + n.d(t, "L", function () { + return $; + }), + n.d(t, "M", function () { + return p; + }); + function r(e) { + return e(); + } + function o() { + return Object.create(null); + } + function a(e) { + e.forEach(r); + } + function s(e) { + return "function" == typeof e; + } + function c(e, t) { + return e != e ? t == t : e !== t || (e && "object" == typeof e) || "function" == typeof e; + } + function l(e, ...t) { + if (null == e) return i; + const n = e.subscribe(...t); + return n.unsubscribe ? () => n.unsubscribe() : n; + } + function u(e) { + let t; + return l(e, (e) => (t = e))(), t; + } + function h(e, t, n, i) { + if (e) { + const r = d(e, t, n, i); + return e[0](r); + } + } + function d(e, t, n, i) { + return e[1] && i + ? (function (e, t) { + for (const n in t) e[n] = t[n]; + return e; + })(n.ctx.slice(), e[1](i(t))) + : n.ctx; + } + function p(e, t, n, i, r, o, a) { + const s = (function (e, t, n, i) { + if (e[2] && i) { + const r = e[2](i(n)); + if (void 0 === t.dirty) return r; + if ("object" == typeof r) { + const e = [], + n = Math.max(t.dirty.length, r.length); + for (let i = 0; i < n; i += 1) e[i] = t.dirty[i] | r[i]; + return e; + } + return t.dirty | r; + } + return t.dirty; + })(t, i, r, o); + if (s) { + const r = d(t, n, i, a); + e.p(r, s); + } + } + function f(e) { + return null == e ? "" : e; + } + new Set(); + function m(e, t) { + e.appendChild(t); + } + function g(e, t, n) { + e.insertBefore(t, n || null); + } + function b(e) { + e.parentNode.removeChild(e); + } + function _(e, t) { + for (let n = 0; n < e.length; n += 1) e[n] && e[n].d(t); + } + function v(e) { + return document.createElement(e); + } + function y(e) { + return document.createTextNode(e); + } + function C() { + return y(" "); + } + function P() { + return y(""); + } + function x(e, t, n, i) { + return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i); + } + function T(e, t, n) { + null == n ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n); + } + function S(e, t, n) { + const i = new Set(); + for (let t = 0; t < e.length; t += 1) e[t].checked && i.add(e[t].__value); + return n || i.delete(t), Array.from(i); + } + function O(e, t) { + (t = "" + t), e.wholeText !== t && (e.data = t); + } + function E(e, t, n, i) { + e.style.setProperty(t, n, i ? "important" : ""); + } + function M(e, t) { + for (let n = 0; n < e.options.length; n += 1) { + const i = e.options[n]; + if (i.__value === t) return void (i.selected = !0); + } + } + function A(e) { + const t = e.querySelector(":checked") || e.options[0]; + return t && t.__value; + } + new Set(); + let I; + function D(e) { + I = e; + } + function R() { + if (!I) throw new Error("Function called outside component initialization"); + return I; + } + function w(e) { + R().$$.on_mount.push(e); + } + function L(e) { + R().$$.after_update.push(e); + } + function F(e) { + R().$$.on_destroy.push(e); + } + const N = [], + k = [], + z = [], + j = [], + B = Promise.resolve(); + let V = !1; + function G() { + V || ((V = !0), B.then(X)); + } + function U(e) { + z.push(e); + } + let H = !1; + const W = new Set(); + function X() { + if (!H) { + H = !0; + do { + for (let e = 0; e < N.length; e += 1) { + const t = N[e]; + D(t), Y(t.$$); + } + for (N.length = 0; k.length; ) k.pop()(); + for (let e = 0; e < z.length; e += 1) { + const t = z[e]; + W.has(t) || (W.add(t), t()); + } + z.length = 0; + } while (N.length); + for (; j.length; ) j.pop()(); + (V = !1), (H = !1), W.clear(); + } + } + function Y(e) { + if (null !== e.fragment) { + e.update(), a(e.before_update); + const t = e.dirty; + (e.dirty = [-1]), e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(U); + } + } + const K = new Set(); + let Z; + function q() { + Z = { r: 0, c: [], p: Z }; + } + function Q() { + Z.r || a(Z.c), (Z = Z.p); + } + function J(e, t) { + e && e.i && (K.delete(e), e.i(t)); + } + function $(e, t, n, i) { + if (e && e.o) { + if (K.has(e)) return; + K.add(e), + Z.c.push(() => { + K.delete(e), i && (n && e.d(1), i()); + }), + e.o(t); + } + } + const ee = "undefined" != typeof window ? window : "undefined" != typeof globalThis ? globalThis : global; + new Set([ + "allowfullscreen", + "allowpaymentrequest", + "async", + "autofocus", + "autoplay", + "checked", + "controls", + "default", + "defer", + "disabled", + "formnovalidate", + "hidden", + "ismap", + "loop", + "multiple", + "muted", + "nomodule", + "novalidate", + "open", + "playsinline", + "readonly", + "required", + "reversed", + "selected", + ]); + let te; + function ne(e) { + e && e.c(); + } + function ie(e, t, n) { + const { fragment: i, on_mount: o, on_destroy: c, after_update: l } = e.$$; + i && i.m(t, n), + U(() => { + const t = o.map(r).filter(s); + c ? c.push(...t) : a(t), (e.$$.on_mount = []); + }), + l.forEach(U); + } + function re(e, t) { + const n = e.$$; + null !== n.fragment && (a(n.on_destroy), n.fragment && n.fragment.d(t), (n.on_destroy = n.fragment = null), (n.ctx = [])); + } + function oe(e, t, n, r, s, c, l = [-1]) { + const u = I; + D(e); + const h = t.props || {}, + d = (e.$$ = { fragment: null, ctx: null, props: c, update: i, not_equal: s, bound: o(), on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(u ? u.$$.context : []), callbacks: o(), dirty: l }); + let p = !1; + if ( + ((d.ctx = n + ? n(e, h, (t, n, ...i) => { + const r = i.length ? i[0] : n; + return ( + d.ctx && + s(d.ctx[t], (d.ctx[t] = r)) && + (d.bound[t] && d.bound[t](r), + p && + (function (e, t) { + -1 === e.$$.dirty[0] && (N.push(e), G(), e.$$.dirty.fill(0)), (e.$$.dirty[(t / 31) | 0] |= 1 << t % 31); + })(e, t)), + n + ); + }) + : []), + d.update(), + (p = !0), + a(d.before_update), + (d.fragment = !!r && r(d.ctx)), + t.target) + ) { + if (t.hydrate) { + const e = (function (e) { + return Array.from(e.childNodes); + })(t.target); + d.fragment && d.fragment.l(e), e.forEach(b); + } else d.fragment && d.fragment.c(); + t.intro && J(e.$$.fragment), ie(e, t.target, t.anchor), X(); + } + D(u); + } + "function" == typeof HTMLElement && + (te = class extends HTMLElement { + constructor() { + super(), this.attachShadow({ mode: "open" }); + } + connectedCallback() { + for (const e in this.$$.slotted) this.appendChild(this.$$.slotted[e]); + } + attributeChangedCallback(e, t, n) { + this[e] = n; + } + $destroy() { + re(this, 1), (this.$destroy = i); + } + $on(e, t) { + const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); + return ( + n.push(t), + () => { + const e = n.indexOf(t); + -1 !== e && n.splice(e, 1); + } + ); + } + $set() {} + }); + class ae { + $destroy() { + re(this, 1), (this.$destroy = i); + } + $on(e, t) { + const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); + return ( + n.push(t), + () => { + const e = n.indexOf(t); + -1 !== e && n.splice(e, 1); + } + ); + } + $set() {} + } + }, + function (e, t, n) { + "use strict"; + n.d(t, "d", function () { + return s; + }), + n.d(t, "e", function () { + return c; + }), + n.d(t, "f", function () { + return l; + }), + n.d(t, "b", function () { + return u; + }), + n.d(t, "a", function () { + return h; + }), + n.d(t, "c", function () { + return p; + }); + var i = n(15), + r = n(34), + o = n(58), + a = n(13), + s = (function () { + function e(e, t) { + void 0 === e && (e = 0), void 0 === t && (t = 0), (this.x = e), (this.y = t); + } + return ( + (e.prototype.toString = function () { + return "{X: " + this.x + " Y:" + this.y + "}"; + }), + (e.prototype.getClassName = function () { + return "Vector2"; + }), + (e.prototype.getHashCode = function () { + var e = 0 | this.x; + return (e = (397 * e) ^ (0 | this.y)); + }), + (e.prototype.toArray = function (e, t) { + return void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), this; + }), + (e.prototype.asArray = function () { + var e = new Array(); + return this.toArray(e, 0), e; + }), + (e.prototype.copyFrom = function (e) { + return (this.x = e.x), (this.y = e.y), this; + }), + (e.prototype.copyFromFloats = function (e, t) { + return (this.x = e), (this.y = t), this; + }), + (e.prototype.set = function (e, t) { + return this.copyFromFloats(e, t); + }), + (e.prototype.add = function (t) { + return new e(this.x + t.x, this.y + t.y); + }), + (e.prototype.addToRef = function (e, t) { + return (t.x = this.x + e.x), (t.y = this.y + e.y), this; + }), + (e.prototype.addInPlace = function (e) { + return (this.x += e.x), (this.y += e.y), this; + }), + (e.prototype.addVector3 = function (t) { + return new e(this.x + t.x, this.y + t.y); + }), + (e.prototype.subtract = function (t) { + return new e(this.x - t.x, this.y - t.y); + }), + (e.prototype.subtractToRef = function (e, t) { + return (t.x = this.x - e.x), (t.y = this.y - e.y), this; + }), + (e.prototype.subtractInPlace = function (e) { + return (this.x -= e.x), (this.y -= e.y), this; + }), + (e.prototype.multiplyInPlace = function (e) { + return (this.x *= e.x), (this.y *= e.y), this; + }), + (e.prototype.multiply = function (t) { + return new e(this.x * t.x, this.y * t.y); + }), + (e.prototype.multiplyToRef = function (e, t) { + return (t.x = this.x * e.x), (t.y = this.y * e.y), this; + }), + (e.prototype.multiplyByFloats = function (t, n) { + return new e(this.x * t, this.y * n); + }), + (e.prototype.divide = function (t) { + return new e(this.x / t.x, this.y / t.y); + }), + (e.prototype.divideToRef = function (e, t) { + return (t.x = this.x / e.x), (t.y = this.y / e.y), this; + }), + (e.prototype.divideInPlace = function (e) { + return this.divideToRef(e, this); + }), + (e.prototype.negate = function () { + return new e(-this.x, -this.y); + }), + (e.prototype.negateInPlace = function () { + return (this.x *= -1), (this.y *= -1), this; + }), + (e.prototype.negateToRef = function (e) { + return e.copyFromFloats(-1 * this.x, -1 * this.y); + }), + (e.prototype.scaleInPlace = function (e) { + return (this.x *= e), (this.y *= e), this; + }), + (e.prototype.scale = function (t) { + var n = new e(0, 0); + return this.scaleToRef(t, n), n; + }), + (e.prototype.scaleToRef = function (e, t) { + return (t.x = this.x * e), (t.y = this.y * e), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return (t.x += this.x * e), (t.y += this.y * e), this; + }), + (e.prototype.equals = function (e) { + return e && this.x === e.x && this.y === e.y; + }), + (e.prototype.equalsWithEpsilon = function (e, t) { + return void 0 === t && (t = r.a), e && i.a.WithinEpsilon(this.x, e.x, t) && i.a.WithinEpsilon(this.y, e.y, t); + }), + (e.prototype.floor = function () { + return new e(Math.floor(this.x), Math.floor(this.y)); + }), + (e.prototype.fract = function () { + return new e(this.x - Math.floor(this.x), this.y - Math.floor(this.y)); + }), + (e.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }), + (e.prototype.lengthSquared = function () { + return this.x * this.x + this.y * this.y; + }), + (e.prototype.normalize = function () { + var e = this.length(); + return 0 === e || ((this.x /= e), (this.y /= e)), this; + }), + (e.prototype.clone = function () { + return new e(this.x, this.y); + }), + (e.Zero = function () { + return new e(0, 0); + }), + (e.One = function () { + return new e(1, 1); + }), + (e.FromArray = function (t, n) { + return void 0 === n && (n = 0), new e(t[n], t[n + 1]); + }), + (e.FromArrayToRef = function (e, t, n) { + (n.x = e[t]), (n.y = e[t + 1]); + }), + (e.CatmullRom = function (t, n, i, r, o) { + var a = o * o, + s = o * a; + return new e( + 0.5 * (2 * n.x + (-t.x + i.x) * o + (2 * t.x - 5 * n.x + 4 * i.x - r.x) * a + (-t.x + 3 * n.x - 3 * i.x + r.x) * s), + 0.5 * (2 * n.y + (-t.y + i.y) * o + (2 * t.y - 5 * n.y + 4 * i.y - r.y) * a + (-t.y + 3 * n.y - 3 * i.y + r.y) * s) + ); + }), + (e.Clamp = function (t, n, i) { + var r = t.x; + r = (r = r > i.x ? i.x : r) < n.x ? n.x : r; + var o = t.y; + return new e(r, (o = (o = o > i.y ? i.y : o) < n.y ? n.y : o)); + }), + (e.Hermite = function (t, n, i, r, o) { + var a = o * o, + s = o * a, + c = 2 * s - 3 * a + 1, + l = -2 * s + 3 * a, + u = s - 2 * a + o, + h = s - a; + return new e(t.x * c + i.x * l + n.x * u + r.x * h, t.y * c + i.y * l + n.y * u + r.y * h); + }), + (e.Lerp = function (t, n, i) { + return new e(t.x + (n.x - t.x) * i, t.y + (n.y - t.y) * i); + }), + (e.Dot = function (e, t) { + return e.x * t.x + e.y * t.y; + }), + (e.Normalize = function (e) { + var t = e.clone(); + return t.normalize(), t; + }), + (e.Minimize = function (t, n) { + return new e(t.x < n.x ? t.x : n.x, t.y < n.y ? t.y : n.y); + }), + (e.Maximize = function (t, n) { + return new e(t.x > n.x ? t.x : n.x, t.y > n.y ? t.y : n.y); + }), + (e.Transform = function (t, n) { + var i = e.Zero(); + return e.TransformToRef(t, n, i), i; + }), + (e.TransformToRef = function (e, t, n) { + var i = t.m, + r = e.x * i[0] + e.y * i[4] + i[12], + o = e.x * i[1] + e.y * i[5] + i[13]; + (n.x = r), (n.y = o); + }), + (e.PointInTriangle = function (e, t, n, i) { + var r = 0.5 * (-n.y * i.x + t.y * (-n.x + i.x) + t.x * (n.y - i.y) + n.x * i.y), + o = r < 0 ? -1 : 1, + a = (t.y * i.x - t.x * i.y + (i.y - t.y) * e.x + (t.x - i.x) * e.y) * o, + s = (t.x * n.y - t.y * n.x + (t.y - n.y) * e.x + (n.x - t.x) * e.y) * o; + return a > 0 && s > 0 && a + s < 2 * r * o; + }), + (e.Distance = function (t, n) { + return Math.sqrt(e.DistanceSquared(t, n)); + }), + (e.DistanceSquared = function (e, t) { + var n = e.x - t.x, + i = e.y - t.y; + return n * n + i * i; + }), + (e.Center = function (e, t) { + var n = e.add(t); + return n.scaleInPlace(0.5), n; + }), + (e.DistanceOfPointFromSegment = function (t, n, i) { + var r = e.DistanceSquared(n, i); + if (0 === r) return e.Distance(t, n); + var o = i.subtract(n), + a = Math.max(0, Math.min(1, e.Dot(t.subtract(n), o) / r)), + s = n.add(o.multiplyByFloats(a, a)); + return e.Distance(t, s); + }), + e + ); + })(), + c = (function () { + function e(e, t, n) { + void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), (this.x = e), (this.y = t), (this.z = n); + } + return ( + (e.prototype.toString = function () { + return "{X: " + this.x + " Y:" + this.y + " Z:" + this.z + "}"; + }), + (e.prototype.getClassName = function () { + return "Vector3"; + }), + (e.prototype.getHashCode = function () { + var e = 0 | this.x; + return (e = (397 * (e = (397 * e) ^ (0 | this.y))) ^ (0 | this.z)); + }), + (e.prototype.asArray = function () { + var e = []; + return this.toArray(e, 0), e; + }), + (e.prototype.toArray = function (e, t) { + return void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), this; + }), + (e.prototype.toQuaternion = function () { + return u.RotationYawPitchRoll(this.y, this.x, this.z); + }), + (e.prototype.addInPlace = function (e) { + return this.addInPlaceFromFloats(e.x, e.y, e.z); + }), + (e.prototype.addInPlaceFromFloats = function (e, t, n) { + return (this.x += e), (this.y += t), (this.z += n), this; + }), + (e.prototype.add = function (t) { + return new e(this.x + t.x, this.y + t.y, this.z + t.z); + }), + (e.prototype.addToRef = function (e, t) { + return t.copyFromFloats(this.x + e.x, this.y + e.y, this.z + e.z); + }), + (e.prototype.subtractInPlace = function (e) { + return (this.x -= e.x), (this.y -= e.y), (this.z -= e.z), this; + }), + (e.prototype.subtract = function (t) { + return new e(this.x - t.x, this.y - t.y, this.z - t.z); + }), + (e.prototype.subtractToRef = function (e, t) { + return this.subtractFromFloatsToRef(e.x, e.y, e.z, t); + }), + (e.prototype.subtractFromFloats = function (t, n, i) { + return new e(this.x - t, this.y - n, this.z - i); + }), + (e.prototype.subtractFromFloatsToRef = function (e, t, n, i) { + return i.copyFromFloats(this.x - e, this.y - t, this.z - n); + }), + (e.prototype.negate = function () { + return new e(-this.x, -this.y, -this.z); + }), + (e.prototype.negateInPlace = function () { + return (this.x *= -1), (this.y *= -1), (this.z *= -1), this; + }), + (e.prototype.negateToRef = function (e) { + return e.copyFromFloats(-1 * this.x, -1 * this.y, -1 * this.z); + }), + (e.prototype.scaleInPlace = function (e) { + return (this.x *= e), (this.y *= e), (this.z *= e), this; + }), + (e.prototype.scale = function (t) { + return new e(this.x * t, this.y * t, this.z * t); + }), + (e.prototype.scaleToRef = function (e, t) { + return t.copyFromFloats(this.x * e, this.y * e, this.z * e); + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return t.addInPlaceFromFloats(this.x * e, this.y * e, this.z * e); + }), + (e.prototype.equals = function (e) { + return e && this.x === e.x && this.y === e.y && this.z === e.z; + }), + (e.prototype.equalsWithEpsilon = function (e, t) { + return void 0 === t && (t = r.a), e && i.a.WithinEpsilon(this.x, e.x, t) && i.a.WithinEpsilon(this.y, e.y, t) && i.a.WithinEpsilon(this.z, e.z, t); + }), + (e.prototype.equalsToFloats = function (e, t, n) { + return this.x === e && this.y === t && this.z === n; + }), + (e.prototype.multiplyInPlace = function (e) { + return (this.x *= e.x), (this.y *= e.y), (this.z *= e.z), this; + }), + (e.prototype.multiply = function (e) { + return this.multiplyByFloats(e.x, e.y, e.z); + }), + (e.prototype.multiplyToRef = function (e, t) { + return t.copyFromFloats(this.x * e.x, this.y * e.y, this.z * e.z); + }), + (e.prototype.multiplyByFloats = function (t, n, i) { + return new e(this.x * t, this.y * n, this.z * i); + }), + (e.prototype.divide = function (t) { + return new e(this.x / t.x, this.y / t.y, this.z / t.z); + }), + (e.prototype.divideToRef = function (e, t) { + return t.copyFromFloats(this.x / e.x, this.y / e.y, this.z / e.z); + }), + (e.prototype.divideInPlace = function (e) { + return this.divideToRef(e, this); + }), + (e.prototype.minimizeInPlace = function (e) { + return this.minimizeInPlaceFromFloats(e.x, e.y, e.z); + }), + (e.prototype.maximizeInPlace = function (e) { + return this.maximizeInPlaceFromFloats(e.x, e.y, e.z); + }), + (e.prototype.minimizeInPlaceFromFloats = function (e, t, n) { + return e < this.x && (this.x = e), t < this.y && (this.y = t), n < this.z && (this.z = n), this; + }), + (e.prototype.maximizeInPlaceFromFloats = function (e, t, n) { + return e > this.x && (this.x = e), t > this.y && (this.y = t), n > this.z && (this.z = n), this; + }), + (e.prototype.isNonUniformWithinEpsilon = function (e) { + var t = Math.abs(this.x), + n = Math.abs(this.y); + if (!i.a.WithinEpsilon(t, n, e)) return !0; + var r = Math.abs(this.z); + return !i.a.WithinEpsilon(t, r, e) || !i.a.WithinEpsilon(n, r, e); + }), + Object.defineProperty(e.prototype, "isNonUniform", { + get: function () { + var e = Math.abs(this.x), + t = Math.abs(this.y); + if (e !== t) return !0; + var n = Math.abs(this.z); + return e !== n || t !== n; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.floor = function () { + return new e(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z)); + }), + (e.prototype.fract = function () { + return new e(this.x - Math.floor(this.x), this.y - Math.floor(this.y), this.z - Math.floor(this.z)); + }), + (e.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); + }), + (e.prototype.lengthSquared = function () { + return this.x * this.x + this.y * this.y + this.z * this.z; + }), + (e.prototype.normalize = function () { + return this.normalizeFromLength(this.length()); + }), + (e.prototype.reorderInPlace = function (e) { + var t = this; + return ( + "xyz" === (e = e.toLowerCase()) || + (d.Vector3[0].copyFrom(this), + ["x", "y", "z"].forEach(function (n, i) { + t[n] = d.Vector3[0][e[i]]; + })), + this + ); + }), + (e.prototype.rotateByQuaternionToRef = function (t, n) { + return t.toRotationMatrix(d.Matrix[0]), e.TransformCoordinatesToRef(this, d.Matrix[0], n), n; + }), + (e.prototype.rotateByQuaternionAroundPointToRef = function (e, t, n) { + return this.subtractToRef(t, d.Vector3[0]), d.Vector3[0].rotateByQuaternionToRef(e, d.Vector3[0]), t.addToRef(d.Vector3[0], n), n; + }), + (e.prototype.cross = function (t) { + return e.Cross(this, t); + }), + (e.prototype.normalizeFromLength = function (e) { + return 0 === e || 1 === e ? this : this.scaleInPlace(1 / e); + }), + (e.prototype.normalizeToNew = function () { + var t = new e(0, 0, 0); + return this.normalizeToRef(t), t; + }), + (e.prototype.normalizeToRef = function (e) { + var t = this.length(); + return 0 === t || 1 === t ? e.copyFromFloats(this.x, this.y, this.z) : this.scaleToRef(1 / t, e); + }), + (e.prototype.clone = function () { + return new e(this.x, this.y, this.z); + }), + (e.prototype.copyFrom = function (e) { + return this.copyFromFloats(e.x, e.y, e.z); + }), + (e.prototype.copyFromFloats = function (e, t, n) { + return (this.x = e), (this.y = t), (this.z = n), this; + }), + (e.prototype.set = function (e, t, n) { + return this.copyFromFloats(e, t, n); + }), + (e.prototype.setAll = function (e) { + return (this.x = this.y = this.z = e), this; + }), + (e.GetClipFactor = function (t, n, i, r) { + var o = e.Dot(t, i) - r; + return o / (o - (e.Dot(n, i) - r)); + }), + (e.GetAngleBetweenVectors = function (t, n, i) { + var r = t.normalizeToRef(d.Vector3[1]), + o = n.normalizeToRef(d.Vector3[2]), + a = e.Dot(r, o), + s = d.Vector3[3]; + return e.CrossToRef(r, o, s), e.Dot(s, i) > 0 ? Math.acos(a) : -Math.acos(a); + }), + (e.FromArray = function (t, n) { + return void 0 === n && (n = 0), new e(t[n], t[n + 1], t[n + 2]); + }), + (e.FromFloatArray = function (t, n) { + return e.FromArray(t, n); + }), + (e.FromArrayToRef = function (e, t, n) { + (n.x = e[t]), (n.y = e[t + 1]), (n.z = e[t + 2]); + }), + (e.FromFloatArrayToRef = function (t, n, i) { + return e.FromArrayToRef(t, n, i); + }), + (e.FromFloatsToRef = function (e, t, n, i) { + i.copyFromFloats(e, t, n); + }), + (e.Zero = function () { + return new e(0, 0, 0); + }), + (e.One = function () { + return new e(1, 1, 1); + }), + (e.Up = function () { + return new e(0, 1, 0); + }), + Object.defineProperty(e, "UpReadOnly", { + get: function () { + return e._UpReadOnly; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ZeroReadOnly", { + get: function () { + return e._ZeroReadOnly; + }, + enumerable: !0, + configurable: !0, + }), + (e.Down = function () { + return new e(0, -1, 0); + }), + (e.Forward = function () { + return new e(0, 0, 1); + }), + (e.Backward = function () { + return new e(0, 0, -1); + }), + (e.Right = function () { + return new e(1, 0, 0); + }), + (e.Left = function () { + return new e(-1, 0, 0); + }), + (e.TransformCoordinates = function (t, n) { + var i = e.Zero(); + return e.TransformCoordinatesToRef(t, n, i), i; + }), + (e.TransformCoordinatesToRef = function (t, n, i) { + e.TransformCoordinatesFromFloatsToRef(t.x, t.y, t.z, n, i); + }), + (e.TransformCoordinatesFromFloatsToRef = function (e, t, n, i, r) { + var o = i.m, + a = e * o[0] + t * o[4] + n * o[8] + o[12], + s = e * o[1] + t * o[5] + n * o[9] + o[13], + c = e * o[2] + t * o[6] + n * o[10] + o[14], + l = 1 / (e * o[3] + t * o[7] + n * o[11] + o[15]); + (r.x = a * l), (r.y = s * l), (r.z = c * l); + }), + (e.TransformNormal = function (t, n) { + var i = e.Zero(); + return e.TransformNormalToRef(t, n, i), i; + }), + (e.TransformNormalToRef = function (e, t, n) { + this.TransformNormalFromFloatsToRef(e.x, e.y, e.z, t, n); + }), + (e.TransformNormalFromFloatsToRef = function (e, t, n, i, r) { + var o = i.m; + (r.x = e * o[0] + t * o[4] + n * o[8]), (r.y = e * o[1] + t * o[5] + n * o[9]), (r.z = e * o[2] + t * o[6] + n * o[10]); + }), + (e.CatmullRom = function (t, n, i, r, o) { + var a = o * o, + s = o * a; + return new e( + 0.5 * (2 * n.x + (-t.x + i.x) * o + (2 * t.x - 5 * n.x + 4 * i.x - r.x) * a + (-t.x + 3 * n.x - 3 * i.x + r.x) * s), + 0.5 * (2 * n.y + (-t.y + i.y) * o + (2 * t.y - 5 * n.y + 4 * i.y - r.y) * a + (-t.y + 3 * n.y - 3 * i.y + r.y) * s), + 0.5 * (2 * n.z + (-t.z + i.z) * o + (2 * t.z - 5 * n.z + 4 * i.z - r.z) * a + (-t.z + 3 * n.z - 3 * i.z + r.z) * s) + ); + }), + (e.Clamp = function (t, n, i) { + var r = new e(); + return e.ClampToRef(t, n, i, r), r; + }), + (e.ClampToRef = function (e, t, n, i) { + var r = e.x; + r = (r = r > n.x ? n.x : r) < t.x ? t.x : r; + var o = e.y; + o = (o = o > n.y ? n.y : o) < t.y ? t.y : o; + var a = e.z; + (a = (a = a > n.z ? n.z : a) < t.z ? t.z : a), i.copyFromFloats(r, o, a); + }), + (e.CheckExtends = function (e, t, n) { + t.minimizeInPlace(e), n.maximizeInPlace(e); + }), + (e.Hermite = function (t, n, i, r, o) { + var a = o * o, + s = o * a, + c = 2 * s - 3 * a + 1, + l = -2 * s + 3 * a, + u = s - 2 * a + o, + h = s - a; + return new e(t.x * c + i.x * l + n.x * u + r.x * h, t.y * c + i.y * l + n.y * u + r.y * h, t.z * c + i.z * l + n.z * u + r.z * h); + }), + (e.Lerp = function (t, n, i) { + var r = new e(0, 0, 0); + return e.LerpToRef(t, n, i, r), r; + }), + (e.LerpToRef = function (e, t, n, i) { + (i.x = e.x + (t.x - e.x) * n), (i.y = e.y + (t.y - e.y) * n), (i.z = e.z + (t.z - e.z) * n); + }), + (e.Dot = function (e, t) { + return e.x * t.x + e.y * t.y + e.z * t.z; + }), + (e.Cross = function (t, n) { + var i = e.Zero(); + return e.CrossToRef(t, n, i), i; + }), + (e.CrossToRef = function (e, t, n) { + var i = e.y * t.z - e.z * t.y, + r = e.z * t.x - e.x * t.z, + o = e.x * t.y - e.y * t.x; + n.copyFromFloats(i, r, o); + }), + (e.Normalize = function (t) { + var n = e.Zero(); + return e.NormalizeToRef(t, n), n; + }), + (e.NormalizeToRef = function (e, t) { + e.normalizeToRef(t); + }), + (e.Project = function (t, n, i, r) { + var o = r.width, + a = r.height, + s = r.x, + c = r.y, + l = d.Matrix[1]; + h.FromValuesToRef(o / 2, 0, 0, 0, 0, -a / 2, 0, 0, 0, 0, 0.5, 0, s + o / 2, a / 2 + c, 0.5, 1, l); + var u = d.Matrix[0]; + return n.multiplyToRef(i, u), u.multiplyToRef(l, u), e.TransformCoordinates(t, u); + }), + (e._UnprojectFromInvertedMatrixToRef = function (t, n, r) { + e.TransformCoordinatesToRef(t, n, r); + var o = n.m, + a = t.x * o[3] + t.y * o[7] + t.z * o[11] + o[15]; + i.a.WithinEpsilon(a, 1) && r.scaleInPlace(1 / a); + }), + (e.UnprojectFromTransform = function (t, n, i, r, o) { + var a = d.Matrix[0]; + r.multiplyToRef(o, a), a.invert(), (t.x = (t.x / n) * 2 - 1), (t.y = -((t.y / i) * 2 - 1)); + var s = new e(); + return e._UnprojectFromInvertedMatrixToRef(t, a, s), s; + }), + (e.Unproject = function (t, n, i, r, o, a) { + var s = e.Zero(); + return e.UnprojectToRef(t, n, i, r, o, a, s), s; + }), + (e.UnprojectToRef = function (t, n, i, r, o, a, s) { + e.UnprojectFloatsToRef(t.x, t.y, t.z, n, i, r, o, a, s); + }), + (e.UnprojectFloatsToRef = function (t, n, i, r, o, a, s, c, l) { + var u = d.Matrix[0]; + a.multiplyToRef(s, u), u.multiplyToRef(c, u), u.invert(); + var h = d.Vector3[0]; + (h.x = (t / r) * 2 - 1), (h.y = -((n / o) * 2 - 1)), (h.z = 2 * i - 1), e._UnprojectFromInvertedMatrixToRef(h, u, l); + }), + (e.Minimize = function (e, t) { + var n = e.clone(); + return n.minimizeInPlace(t), n; + }), + (e.Maximize = function (e, t) { + var n = e.clone(); + return n.maximizeInPlace(t), n; + }), + (e.Distance = function (t, n) { + return Math.sqrt(e.DistanceSquared(t, n)); + }), + (e.DistanceSquared = function (e, t) { + var n = e.x - t.x, + i = e.y - t.y, + r = e.z - t.z; + return n * n + i * i + r * r; + }), + (e.Center = function (e, t) { + var n = e.add(t); + return n.scaleInPlace(0.5), n; + }), + (e.RotationFromAxis = function (t, n, i) { + var r = e.Zero(); + return e.RotationFromAxisToRef(t, n, i, r), r; + }), + (e.RotationFromAxisToRef = function (e, t, n, i) { + var r = d.Quaternion[0]; + u.RotationQuaternionFromAxisToRef(e, t, n, r), r.toEulerAnglesToRef(i); + }), + (e._UpReadOnly = e.Up()), + (e._ZeroReadOnly = e.Zero()), + e + ); + })(), + l = (function () { + function e(e, t, n, i) { + (this.x = e), (this.y = t), (this.z = n), (this.w = i); + } + return ( + (e.prototype.toString = function () { + return "{X: " + this.x + " Y:" + this.y + " Z:" + this.z + " W:" + this.w + "}"; + }), + (e.prototype.getClassName = function () { + return "Vector4"; + }), + (e.prototype.getHashCode = function () { + var e = 0 | this.x; + return (e = (397 * (e = (397 * (e = (397 * e) ^ (0 | this.y))) ^ (0 | this.z))) ^ (0 | this.w)); + }), + (e.prototype.asArray = function () { + var e = new Array(); + return this.toArray(e, 0), e; + }), + (e.prototype.toArray = function (e, t) { + return void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), (e[t + 3] = this.w), this; + }), + (e.prototype.addInPlace = function (e) { + return (this.x += e.x), (this.y += e.y), (this.z += e.z), (this.w += e.w), this; + }), + (e.prototype.add = function (t) { + return new e(this.x + t.x, this.y + t.y, this.z + t.z, this.w + t.w); + }), + (e.prototype.addToRef = function (e, t) { + return (t.x = this.x + e.x), (t.y = this.y + e.y), (t.z = this.z + e.z), (t.w = this.w + e.w), this; + }), + (e.prototype.subtractInPlace = function (e) { + return (this.x -= e.x), (this.y -= e.y), (this.z -= e.z), (this.w -= e.w), this; + }), + (e.prototype.subtract = function (t) { + return new e(this.x - t.x, this.y - t.y, this.z - t.z, this.w - t.w); + }), + (e.prototype.subtractToRef = function (e, t) { + return (t.x = this.x - e.x), (t.y = this.y - e.y), (t.z = this.z - e.z), (t.w = this.w - e.w), this; + }), + (e.prototype.subtractFromFloats = function (t, n, i, r) { + return new e(this.x - t, this.y - n, this.z - i, this.w - r); + }), + (e.prototype.subtractFromFloatsToRef = function (e, t, n, i, r) { + return (r.x = this.x - e), (r.y = this.y - t), (r.z = this.z - n), (r.w = this.w - i), this; + }), + (e.prototype.negate = function () { + return new e(-this.x, -this.y, -this.z, -this.w); + }), + (e.prototype.negateInPlace = function () { + return (this.x *= -1), (this.y *= -1), (this.z *= -1), (this.w *= -1), this; + }), + (e.prototype.negateToRef = function (e) { + return e.copyFromFloats(-1 * this.x, -1 * this.y, -1 * this.z, -1 * this.w); + }), + (e.prototype.scaleInPlace = function (e) { + return (this.x *= e), (this.y *= e), (this.z *= e), (this.w *= e), this; + }), + (e.prototype.scale = function (t) { + return new e(this.x * t, this.y * t, this.z * t, this.w * t); + }), + (e.prototype.scaleToRef = function (e, t) { + return (t.x = this.x * e), (t.y = this.y * e), (t.z = this.z * e), (t.w = this.w * e), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return (t.x += this.x * e), (t.y += this.y * e), (t.z += this.z * e), (t.w += this.w * e), this; + }), + (e.prototype.equals = function (e) { + return e && this.x === e.x && this.y === e.y && this.z === e.z && this.w === e.w; + }), + (e.prototype.equalsWithEpsilon = function (e, t) { + return void 0 === t && (t = r.a), e && i.a.WithinEpsilon(this.x, e.x, t) && i.a.WithinEpsilon(this.y, e.y, t) && i.a.WithinEpsilon(this.z, e.z, t) && i.a.WithinEpsilon(this.w, e.w, t); + }), + (e.prototype.equalsToFloats = function (e, t, n, i) { + return this.x === e && this.y === t && this.z === n && this.w === i; + }), + (e.prototype.multiplyInPlace = function (e) { + return (this.x *= e.x), (this.y *= e.y), (this.z *= e.z), (this.w *= e.w), this; + }), + (e.prototype.multiply = function (t) { + return new e(this.x * t.x, this.y * t.y, this.z * t.z, this.w * t.w); + }), + (e.prototype.multiplyToRef = function (e, t) { + return (t.x = this.x * e.x), (t.y = this.y * e.y), (t.z = this.z * e.z), (t.w = this.w * e.w), this; + }), + (e.prototype.multiplyByFloats = function (t, n, i, r) { + return new e(this.x * t, this.y * n, this.z * i, this.w * r); + }), + (e.prototype.divide = function (t) { + return new e(this.x / t.x, this.y / t.y, this.z / t.z, this.w / t.w); + }), + (e.prototype.divideToRef = function (e, t) { + return (t.x = this.x / e.x), (t.y = this.y / e.y), (t.z = this.z / e.z), (t.w = this.w / e.w), this; + }), + (e.prototype.divideInPlace = function (e) { + return this.divideToRef(e, this); + }), + (e.prototype.minimizeInPlace = function (e) { + return e.x < this.x && (this.x = e.x), e.y < this.y && (this.y = e.y), e.z < this.z && (this.z = e.z), e.w < this.w && (this.w = e.w), this; + }), + (e.prototype.maximizeInPlace = function (e) { + return e.x > this.x && (this.x = e.x), e.y > this.y && (this.y = e.y), e.z > this.z && (this.z = e.z), e.w > this.w && (this.w = e.w), this; + }), + (e.prototype.floor = function () { + return new e(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z), Math.floor(this.w)); + }), + (e.prototype.fract = function () { + return new e(this.x - Math.floor(this.x), this.y - Math.floor(this.y), this.z - Math.floor(this.z), this.w - Math.floor(this.w)); + }), + (e.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + }), + (e.prototype.lengthSquared = function () { + return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + }), + (e.prototype.normalize = function () { + var e = this.length(); + return 0 === e ? this : this.scaleInPlace(1 / e); + }), + (e.prototype.toVector3 = function () { + return new c(this.x, this.y, this.z); + }), + (e.prototype.clone = function () { + return new e(this.x, this.y, this.z, this.w); + }), + (e.prototype.copyFrom = function (e) { + return (this.x = e.x), (this.y = e.y), (this.z = e.z), (this.w = e.w), this; + }), + (e.prototype.copyFromFloats = function (e, t, n, i) { + return (this.x = e), (this.y = t), (this.z = n), (this.w = i), this; + }), + (e.prototype.set = function (e, t, n, i) { + return this.copyFromFloats(e, t, n, i); + }), + (e.prototype.setAll = function (e) { + return (this.x = this.y = this.z = this.w = e), this; + }), + (e.FromArray = function (t, n) { + return n || (n = 0), new e(t[n], t[n + 1], t[n + 2], t[n + 3]); + }), + (e.FromArrayToRef = function (e, t, n) { + (n.x = e[t]), (n.y = e[t + 1]), (n.z = e[t + 2]), (n.w = e[t + 3]); + }), + (e.FromFloatArrayToRef = function (t, n, i) { + e.FromArrayToRef(t, n, i); + }), + (e.FromFloatsToRef = function (e, t, n, i, r) { + (r.x = e), (r.y = t), (r.z = n), (r.w = i); + }), + (e.Zero = function () { + return new e(0, 0, 0, 0); + }), + (e.One = function () { + return new e(1, 1, 1, 1); + }), + (e.Normalize = function (t) { + var n = e.Zero(); + return e.NormalizeToRef(t, n), n; + }), + (e.NormalizeToRef = function (e, t) { + t.copyFrom(e), t.normalize(); + }), + (e.Minimize = function (e, t) { + var n = e.clone(); + return n.minimizeInPlace(t), n; + }), + (e.Maximize = function (e, t) { + var n = e.clone(); + return n.maximizeInPlace(t), n; + }), + (e.Distance = function (t, n) { + return Math.sqrt(e.DistanceSquared(t, n)); + }), + (e.DistanceSquared = function (e, t) { + var n = e.x - t.x, + i = e.y - t.y, + r = e.z - t.z, + o = e.w - t.w; + return n * n + i * i + r * r + o * o; + }), + (e.Center = function (e, t) { + var n = e.add(t); + return n.scaleInPlace(0.5), n; + }), + (e.TransformNormal = function (t, n) { + var i = e.Zero(); + return e.TransformNormalToRef(t, n, i), i; + }), + (e.TransformNormalToRef = function (e, t, n) { + var i = t.m, + r = e.x * i[0] + e.y * i[4] + e.z * i[8], + o = e.x * i[1] + e.y * i[5] + e.z * i[9], + a = e.x * i[2] + e.y * i[6] + e.z * i[10]; + (n.x = r), (n.y = o), (n.z = a), (n.w = e.w); + }), + (e.TransformNormalFromFloatsToRef = function (e, t, n, i, r, o) { + var a = r.m; + (o.x = e * a[0] + t * a[4] + n * a[8]), (o.y = e * a[1] + t * a[5] + n * a[9]), (o.z = e * a[2] + t * a[6] + n * a[10]), (o.w = i); + }), + (e.FromVector3 = function (t, n) { + return void 0 === n && (n = 0), new e(t.x, t.y, t.z, n); + }), + e + ); + })(), + u = (function () { + function e(e, t, n, i) { + void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 1), (this.x = e), (this.y = t), (this.z = n), (this.w = i); + } + return ( + (e.prototype.toString = function () { + return "{X: " + this.x + " Y:" + this.y + " Z:" + this.z + " W:" + this.w + "}"; + }), + (e.prototype.getClassName = function () { + return "Quaternion"; + }), + (e.prototype.getHashCode = function () { + var e = 0 | this.x; + return (e = (397 * (e = (397 * (e = (397 * e) ^ (0 | this.y))) ^ (0 | this.z))) ^ (0 | this.w)); + }), + (e.prototype.asArray = function () { + return [this.x, this.y, this.z, this.w]; + }), + (e.prototype.equals = function (e) { + return e && this.x === e.x && this.y === e.y && this.z === e.z && this.w === e.w; + }), + (e.prototype.equalsWithEpsilon = function (e, t) { + return void 0 === t && (t = r.a), e && i.a.WithinEpsilon(this.x, e.x, t) && i.a.WithinEpsilon(this.y, e.y, t) && i.a.WithinEpsilon(this.z, e.z, t) && i.a.WithinEpsilon(this.w, e.w, t); + }), + (e.prototype.clone = function () { + return new e(this.x, this.y, this.z, this.w); + }), + (e.prototype.copyFrom = function (e) { + return (this.x = e.x), (this.y = e.y), (this.z = e.z), (this.w = e.w), this; + }), + (e.prototype.copyFromFloats = function (e, t, n, i) { + return (this.x = e), (this.y = t), (this.z = n), (this.w = i), this; + }), + (e.prototype.set = function (e, t, n, i) { + return this.copyFromFloats(e, t, n, i); + }), + (e.prototype.add = function (t) { + return new e(this.x + t.x, this.y + t.y, this.z + t.z, this.w + t.w); + }), + (e.prototype.addInPlace = function (e) { + return (this.x += e.x), (this.y += e.y), (this.z += e.z), (this.w += e.w), this; + }), + (e.prototype.subtract = function (t) { + return new e(this.x - t.x, this.y - t.y, this.z - t.z, this.w - t.w); + }), + (e.prototype.scale = function (t) { + return new e(this.x * t, this.y * t, this.z * t, this.w * t); + }), + (e.prototype.scaleToRef = function (e, t) { + return (t.x = this.x * e), (t.y = this.y * e), (t.z = this.z * e), (t.w = this.w * e), this; + }), + (e.prototype.scaleInPlace = function (e) { + return (this.x *= e), (this.y *= e), (this.z *= e), (this.w *= e), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return (t.x += this.x * e), (t.y += this.y * e), (t.z += this.z * e), (t.w += this.w * e), this; + }), + (e.prototype.multiply = function (t) { + var n = new e(0, 0, 0, 1); + return this.multiplyToRef(t, n), n; + }), + (e.prototype.multiplyToRef = function (e, t) { + var n = this.x * e.w + this.y * e.z - this.z * e.y + this.w * e.x, + i = -this.x * e.z + this.y * e.w + this.z * e.x + this.w * e.y, + r = this.x * e.y - this.y * e.x + this.z * e.w + this.w * e.z, + o = -this.x * e.x - this.y * e.y - this.z * e.z + this.w * e.w; + return t.copyFromFloats(n, i, r, o), this; + }), + (e.prototype.multiplyInPlace = function (e) { + return this.multiplyToRef(e, this), this; + }), + (e.prototype.conjugateToRef = function (e) { + return e.copyFromFloats(-this.x, -this.y, -this.z, this.w), this; + }), + (e.prototype.conjugateInPlace = function () { + return (this.x *= -1), (this.y *= -1), (this.z *= -1), this; + }), + (e.prototype.conjugate = function () { + return new e(-this.x, -this.y, -this.z, this.w); + }), + (e.prototype.length = function () { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); + }), + (e.prototype.normalize = function () { + var e = this.length(); + if (0 === e) return this; + var t = 1 / e; + return (this.x *= t), (this.y *= t), (this.z *= t), (this.w *= t), this; + }), + (e.prototype.toEulerAngles = function (e) { + void 0 === e && (e = "YZX"); + var t = c.Zero(); + return this.toEulerAnglesToRef(t), t; + }), + (e.prototype.toEulerAnglesToRef = function (e) { + var t = this.z, + n = this.x, + i = this.y, + r = this.w, + o = r * r, + a = t * t, + s = n * n, + c = i * i, + l = i * t - n * r; + return ( + l < -0.4999999 + ? ((e.y = 2 * Math.atan2(i, r)), (e.x = Math.PI / 2), (e.z = 0)) + : l > 0.4999999 + ? ((e.y = 2 * Math.atan2(i, r)), (e.x = -Math.PI / 2), (e.z = 0)) + : ((e.z = Math.atan2(2 * (n * i + t * r), -a - s + c + o)), (e.x = Math.asin(-2 * (t * i - n * r))), (e.y = Math.atan2(2 * (t * n + i * r), a - s - c + o))), + this + ); + }), + (e.prototype.toRotationMatrix = function (e) { + return h.FromQuaternionToRef(this, e), this; + }), + (e.prototype.fromRotationMatrix = function (t) { + return e.FromRotationMatrixToRef(t, this), this; + }), + (e.FromRotationMatrix = function (t) { + var n = new e(); + return e.FromRotationMatrixToRef(t, n), n; + }), + (e.FromRotationMatrixToRef = function (e, t) { + var n, + i = e.m, + r = i[0], + o = i[4], + a = i[8], + s = i[1], + c = i[5], + l = i[9], + u = i[2], + h = i[6], + d = i[10], + p = r + c + d; + p > 0 + ? ((n = 0.5 / Math.sqrt(p + 1)), (t.w = 0.25 / n), (t.x = (h - l) * n), (t.y = (a - u) * n), (t.z = (s - o) * n)) + : r > c && r > d + ? ((n = 2 * Math.sqrt(1 + r - c - d)), (t.w = (h - l) / n), (t.x = 0.25 * n), (t.y = (o + s) / n), (t.z = (a + u) / n)) + : c > d + ? ((n = 2 * Math.sqrt(1 + c - r - d)), (t.w = (a - u) / n), (t.x = (o + s) / n), (t.y = 0.25 * n), (t.z = (l + h) / n)) + : ((n = 2 * Math.sqrt(1 + d - r - c)), (t.w = (s - o) / n), (t.x = (a + u) / n), (t.y = (l + h) / n), (t.z = 0.25 * n)); + }), + (e.Dot = function (e, t) { + return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w; + }), + (e.AreClose = function (t, n) { + return e.Dot(t, n) >= 0; + }), + (e.Zero = function () { + return new e(0, 0, 0, 0); + }), + (e.Inverse = function (t) { + return new e(-t.x, -t.y, -t.z, t.w); + }), + (e.InverseToRef = function (e, t) { + return t.set(-e.x, -e.y, -e.z, e.w), t; + }), + (e.Identity = function () { + return new e(0, 0, 0, 1); + }), + (e.IsIdentity = function (e) { + return e && 0 === e.x && 0 === e.y && 0 === e.z && 1 === e.w; + }), + (e.RotationAxis = function (t, n) { + return e.RotationAxisToRef(t, n, new e()); + }), + (e.RotationAxisToRef = function (e, t, n) { + var i = Math.sin(t / 2); + return e.normalize(), (n.w = Math.cos(t / 2)), (n.x = e.x * i), (n.y = e.y * i), (n.z = e.z * i), n; + }), + (e.FromArray = function (t, n) { + return n || (n = 0), new e(t[n], t[n + 1], t[n + 2], t[n + 3]); + }), + (e.FromEulerAngles = function (t, n, i) { + var r = new e(); + return e.RotationYawPitchRollToRef(n, t, i, r), r; + }), + (e.FromEulerAnglesToRef = function (t, n, i, r) { + return e.RotationYawPitchRollToRef(n, t, i, r), r; + }), + (e.FromEulerVector = function (t) { + var n = new e(); + return e.RotationYawPitchRollToRef(t.y, t.x, t.z, n), n; + }), + (e.FromEulerVectorToRef = function (t, n) { + return e.RotationYawPitchRollToRef(t.y, t.x, t.z, n), n; + }), + (e.RotationYawPitchRoll = function (t, n, i) { + var r = new e(); + return e.RotationYawPitchRollToRef(t, n, i, r), r; + }), + (e.RotationYawPitchRollToRef = function (e, t, n, i) { + var r = 0.5 * n, + o = 0.5 * t, + a = 0.5 * e, + s = Math.sin(r), + c = Math.cos(r), + l = Math.sin(o), + u = Math.cos(o), + h = Math.sin(a), + d = Math.cos(a); + (i.x = d * l * c + h * u * s), (i.y = h * u * c - d * l * s), (i.z = d * u * s - h * l * c), (i.w = d * u * c + h * l * s); + }), + (e.RotationAlphaBetaGamma = function (t, n, i) { + var r = new e(); + return e.RotationAlphaBetaGammaToRef(t, n, i, r), r; + }), + (e.RotationAlphaBetaGammaToRef = function (e, t, n, i) { + var r = 0.5 * (n + e), + o = 0.5 * (n - e), + a = 0.5 * t; + (i.x = Math.cos(o) * Math.sin(a)), (i.y = Math.sin(o) * Math.sin(a)), (i.z = Math.sin(r) * Math.cos(a)), (i.w = Math.cos(r) * Math.cos(a)); + }), + (e.RotationQuaternionFromAxis = function (t, n, i) { + var r = new e(0, 0, 0, 0); + return e.RotationQuaternionFromAxisToRef(t, n, i, r), r; + }), + (e.RotationQuaternionFromAxisToRef = function (t, n, i, r) { + var o = d.Matrix[0]; + h.FromXYZAxesToRef(t.normalize(), n.normalize(), i.normalize(), o), e.FromRotationMatrixToRef(o, r); + }), + (e.Slerp = function (t, n, i) { + var r = e.Identity(); + return e.SlerpToRef(t, n, i, r), r; + }), + (e.SlerpToRef = function (e, t, n, i) { + var r, + o, + a = e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w, + s = !1; + if ((a < 0 && ((s = !0), (a = -a)), a > 0.999999)) (o = 1 - n), (r = s ? -n : n); + else { + var c = Math.acos(a), + l = 1 / Math.sin(c); + (o = Math.sin((1 - n) * c) * l), (r = s ? -Math.sin(n * c) * l : Math.sin(n * c) * l); + } + (i.x = o * e.x + r * t.x), (i.y = o * e.y + r * t.y), (i.z = o * e.z + r * t.z), (i.w = o * e.w + r * t.w); + }), + (e.Hermite = function (t, n, i, r, o) { + var a = o * o, + s = o * a, + c = 2 * s - 3 * a + 1, + l = -2 * s + 3 * a, + u = s - 2 * a + o, + h = s - a; + return new e(t.x * c + i.x * l + n.x * u + r.x * h, t.y * c + i.y * l + n.y * u + r.y * h, t.z * c + i.z * l + n.z * u + r.z * h, t.w * c + i.w * l + n.w * u + r.w * h); + }), + e + ); + })(), + h = (function () { + function e() { + (this._isIdentity = !1), (this._isIdentityDirty = !0), (this._isIdentity3x2 = !0), (this._isIdentity3x2Dirty = !0), (this.updateFlag = -1), (this._m = new Float32Array(16)), this._updateIdentityStatus(!1); + } + return ( + Object.defineProperty(e.prototype, "m", { + get: function () { + return this._m; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._markAsUpdated = function () { + (this.updateFlag = e._updateFlagSeed++), (this._isIdentity = !1), (this._isIdentity3x2 = !1), (this._isIdentityDirty = !0), (this._isIdentity3x2Dirty = !0); + }), + (e.prototype._updateIdentityStatus = function (t, n, i, r) { + void 0 === n && (n = !1), + void 0 === i && (i = !1), + void 0 === r && (r = !0), + (this.updateFlag = e._updateFlagSeed++), + (this._isIdentity = t), + (this._isIdentity3x2 = t || i), + (this._isIdentityDirty = !this._isIdentity && n), + (this._isIdentity3x2Dirty = !this._isIdentity3x2 && r); + }), + (e.prototype.isIdentity = function () { + if (this._isIdentityDirty) { + this._isIdentityDirty = !1; + var e = this._m; + this._isIdentity = + 1 === e[0] && + 0 === e[1] && + 0 === e[2] && + 0 === e[3] && + 0 === e[4] && + 1 === e[5] && + 0 === e[6] && + 0 === e[7] && + 0 === e[8] && + 0 === e[9] && + 1 === e[10] && + 0 === e[11] && + 0 === e[12] && + 0 === e[13] && + 0 === e[14] && + 1 === e[15]; + } + return this._isIdentity; + }), + (e.prototype.isIdentityAs3x2 = function () { + return ( + this._isIdentity3x2Dirty && + ((this._isIdentity3x2Dirty = !1), + 1 !== this._m[0] || + 1 !== this._m[5] || + 1 !== this._m[15] || + 0 !== this._m[1] || + 0 !== this._m[2] || + 0 !== this._m[3] || + 0 !== this._m[4] || + 0 !== this._m[6] || + 0 !== this._m[7] || + 0 !== this._m[8] || + 0 !== this._m[9] || + 0 !== this._m[10] || + 0 !== this._m[11] || + 0 !== this._m[12] || + 0 !== this._m[13] || + 0 !== this._m[14] + ? (this._isIdentity3x2 = !1) + : (this._isIdentity3x2 = !0)), + this._isIdentity3x2 + ); + }), + (e.prototype.determinant = function () { + if (!0 === this._isIdentity) return 1; + var e = this._m, + t = e[0], + n = e[1], + i = e[2], + r = e[3], + o = e[4], + a = e[5], + s = e[6], + c = e[7], + l = e[8], + u = e[9], + h = e[10], + d = e[11], + p = e[12], + f = e[13], + m = e[14], + g = e[15], + b = h * g - m * d, + _ = u * g - f * d, + v = u * m - f * h, + y = l * g - p * d, + C = l * m - h * p, + P = l * f - p * u; + return t * +(a * b - s * _ + c * v) + n * -(o * b - s * y + c * C) + i * +(o * _ - a * y + c * P) + r * -(o * v - a * C + s * P); + }), + (e.prototype.toArray = function () { + return this._m; + }), + (e.prototype.asArray = function () { + return this._m; + }), + (e.prototype.invert = function () { + return this.invertToRef(this), this; + }), + (e.prototype.reset = function () { + return e.FromValuesToRef(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, this), this._updateIdentityStatus(!1), this; + }), + (e.prototype.add = function (t) { + var n = new e(); + return this.addToRef(t, n), n; + }), + (e.prototype.addToRef = function (e, t) { + for (var n = this._m, i = t._m, r = e.m, o = 0; o < 16; o++) i[o] = n[o] + r[o]; + return t._markAsUpdated(), this; + }), + (e.prototype.addToSelf = function (e) { + for (var t = this._m, n = e.m, i = 0; i < 16; i++) t[i] += n[i]; + return this._markAsUpdated(), this; + }), + (e.prototype.invertToRef = function (t) { + if (!0 === this._isIdentity) return e.IdentityToRef(t), this; + var n = this._m, + i = n[0], + r = n[1], + o = n[2], + a = n[3], + s = n[4], + c = n[5], + l = n[6], + u = n[7], + h = n[8], + d = n[9], + p = n[10], + f = n[11], + m = n[12], + g = n[13], + b = n[14], + _ = n[15], + v = p * _ - b * f, + y = d * _ - g * f, + C = d * b - g * p, + P = h * _ - m * f, + x = h * b - p * m, + T = h * g - m * d, + S = +(c * v - l * y + u * C), + O = -(s * v - l * P + u * x), + E = +(s * y - c * P + u * T), + M = -(s * C - c * x + l * T), + A = i * S + r * O + o * E + a * M; + if (0 === A) return t.copyFrom(this), this; + var I = 1 / A, + D = l * _ - b * u, + R = c * _ - g * u, + w = c * b - g * l, + L = s * _ - m * u, + F = s * b - m * l, + N = s * g - m * c, + k = l * f - p * u, + z = c * f - d * u, + j = c * p - d * l, + B = s * f - h * u, + V = s * p - h * l, + G = s * d - h * c, + U = -(r * v - o * y + a * C), + H = +(i * v - o * P + a * x), + W = -(i * y - r * P + a * T), + X = +(i * C - r * x + o * T), + Y = +(r * D - o * R + a * w), + K = -(i * D - o * L + a * F), + Z = +(i * R - r * L + a * N), + q = -(i * w - r * F + o * N), + Q = -(r * k - o * z + a * j), + J = +(i * k - o * B + a * V), + $ = -(i * z - r * B + a * G), + ee = +(i * j - r * V + o * G); + return e.FromValuesToRef(S * I, U * I, Y * I, Q * I, O * I, H * I, K * I, J * I, E * I, W * I, Z * I, $ * I, M * I, X * I, q * I, ee * I, t), this; + }), + (e.prototype.addAtIndex = function (e, t) { + return (this._m[e] += t), this._markAsUpdated(), this; + }), + (e.prototype.multiplyAtIndex = function (e, t) { + return (this._m[e] *= t), this._markAsUpdated(), this; + }), + (e.prototype.setTranslationFromFloats = function (e, t, n) { + return (this._m[12] = e), (this._m[13] = t), (this._m[14] = n), this._markAsUpdated(), this; + }), + (e.prototype.addTranslationFromFloats = function (e, t, n) { + return (this._m[12] += e), (this._m[13] += t), (this._m[14] += n), this._markAsUpdated(), this; + }), + (e.prototype.setTranslation = function (e) { + return this.setTranslationFromFloats(e.x, e.y, e.z); + }), + (e.prototype.getTranslation = function () { + return new c(this._m[12], this._m[13], this._m[14]); + }), + (e.prototype.getTranslationToRef = function (e) { + return (e.x = this._m[12]), (e.y = this._m[13]), (e.z = this._m[14]), this; + }), + (e.prototype.removeRotationAndScaling = function () { + var t = this.m; + return e.FromValuesToRef(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t[12], t[13], t[14], t[15], this), this._updateIdentityStatus(0 === t[12] && 0 === t[13] && 0 === t[14] && 1 === t[15]), this; + }), + (e.prototype.multiply = function (t) { + var n = new e(); + return this.multiplyToRef(t, n), n; + }), + (e.prototype.copyFrom = function (e) { + e.copyToArray(this._m); + var t = e; + return this._updateIdentityStatus(t._isIdentity, t._isIdentityDirty, t._isIdentity3x2, t._isIdentity3x2Dirty), this; + }), + (e.prototype.copyToArray = function (e, t) { + void 0 === t && (t = 0); + var n = this._m; + return ( + (e[t] = n[0]), + (e[t + 1] = n[1]), + (e[t + 2] = n[2]), + (e[t + 3] = n[3]), + (e[t + 4] = n[4]), + (e[t + 5] = n[5]), + (e[t + 6] = n[6]), + (e[t + 7] = n[7]), + (e[t + 8] = n[8]), + (e[t + 9] = n[9]), + (e[t + 10] = n[10]), + (e[t + 11] = n[11]), + (e[t + 12] = n[12]), + (e[t + 13] = n[13]), + (e[t + 14] = n[14]), + (e[t + 15] = n[15]), + this + ); + }), + (e.prototype.multiplyToRef = function (e, t) { + return this._isIdentity ? (t.copyFrom(e), this) : e._isIdentity ? (t.copyFrom(this), this) : (this.multiplyToArray(e, t._m, 0), t._markAsUpdated(), this); + }), + (e.prototype.multiplyToArray = function (e, t, n) { + var i = this._m, + r = e.m, + o = i[0], + a = i[1], + s = i[2], + c = i[3], + l = i[4], + u = i[5], + h = i[6], + d = i[7], + p = i[8], + f = i[9], + m = i[10], + g = i[11], + b = i[12], + _ = i[13], + v = i[14], + y = i[15], + C = r[0], + P = r[1], + x = r[2], + T = r[3], + S = r[4], + O = r[5], + E = r[6], + M = r[7], + A = r[8], + I = r[9], + D = r[10], + R = r[11], + w = r[12], + L = r[13], + F = r[14], + N = r[15]; + return ( + (t[n] = o * C + a * S + s * A + c * w), + (t[n + 1] = o * P + a * O + s * I + c * L), + (t[n + 2] = o * x + a * E + s * D + c * F), + (t[n + 3] = o * T + a * M + s * R + c * N), + (t[n + 4] = l * C + u * S + h * A + d * w), + (t[n + 5] = l * P + u * O + h * I + d * L), + (t[n + 6] = l * x + u * E + h * D + d * F), + (t[n + 7] = l * T + u * M + h * R + d * N), + (t[n + 8] = p * C + f * S + m * A + g * w), + (t[n + 9] = p * P + f * O + m * I + g * L), + (t[n + 10] = p * x + f * E + m * D + g * F), + (t[n + 11] = p * T + f * M + m * R + g * N), + (t[n + 12] = b * C + _ * S + v * A + y * w), + (t[n + 13] = b * P + _ * O + v * I + y * L), + (t[n + 14] = b * x + _ * E + v * D + y * F), + (t[n + 15] = b * T + _ * M + v * R + y * N), + this + ); + }), + (e.prototype.equals = function (e) { + var t = e; + if (!t) return !1; + if ((this._isIdentity || t._isIdentity) && !this._isIdentityDirty && !t._isIdentityDirty) return this._isIdentity && t._isIdentity; + var n = this.m, + i = t.m; + return ( + n[0] === i[0] && + n[1] === i[1] && + n[2] === i[2] && + n[3] === i[3] && + n[4] === i[4] && + n[5] === i[5] && + n[6] === i[6] && + n[7] === i[7] && + n[8] === i[8] && + n[9] === i[9] && + n[10] === i[10] && + n[11] === i[11] && + n[12] === i[12] && + n[13] === i[13] && + n[14] === i[14] && + n[15] === i[15] + ); + }), + (e.prototype.clone = function () { + var t = new e(); + return t.copyFrom(this), t; + }), + (e.prototype.getClassName = function () { + return "Matrix"; + }), + (e.prototype.getHashCode = function () { + for (var e = 0 | this._m[0], t = 1; t < 16; t++) e = (397 * e) ^ (0 | this._m[t]); + return e; + }), + (e.prototype.decompose = function (t, n, i) { + if (this._isIdentity) return i && i.setAll(0), t && t.setAll(1), n && n.copyFromFloats(0, 0, 0, 1), !0; + var r = this._m; + if ( + (i && i.copyFromFloats(r[12], r[13], r[14]), + ((t = t || d.Vector3[0]).x = Math.sqrt(r[0] * r[0] + r[1] * r[1] + r[2] * r[2])), + (t.y = Math.sqrt(r[4] * r[4] + r[5] * r[5] + r[6] * r[6])), + (t.z = Math.sqrt(r[8] * r[8] + r[9] * r[9] + r[10] * r[10])), + this.determinant() <= 0 && (t.y *= -1), + 0 === t.x || 0 === t.y || 0 === t.z) + ) + return n && n.copyFromFloats(0, 0, 0, 1), !1; + if (n) { + var o = 1 / t.x, + a = 1 / t.y, + s = 1 / t.z; + e.FromValuesToRef(r[0] * o, r[1] * o, r[2] * o, 0, r[4] * a, r[5] * a, r[6] * a, 0, r[8] * s, r[9] * s, r[10] * s, 0, 0, 0, 0, 1, d.Matrix[0]), u.FromRotationMatrixToRef(d.Matrix[0], n); + } + return !0; + }), + (e.prototype.getRow = function (e) { + if (e < 0 || e > 3) return null; + var t = 4 * e; + return new l(this._m[t + 0], this._m[t + 1], this._m[t + 2], this._m[t + 3]); + }), + (e.prototype.setRow = function (e, t) { + return this.setRowFromFloats(e, t.x, t.y, t.z, t.w); + }), + (e.prototype.transpose = function () { + return e.Transpose(this); + }), + (e.prototype.transposeToRef = function (t) { + return e.TransposeToRef(this, t), this; + }), + (e.prototype.setRowFromFloats = function (e, t, n, i, r) { + if (e < 0 || e > 3) return this; + var o = 4 * e; + return (this._m[o + 0] = t), (this._m[o + 1] = n), (this._m[o + 2] = i), (this._m[o + 3] = r), this._markAsUpdated(), this; + }), + (e.prototype.scale = function (t) { + var n = new e(); + return this.scaleToRef(t, n), n; + }), + (e.prototype.scaleToRef = function (e, t) { + for (var n = 0; n < 16; n++) t._m[n] = this._m[n] * e; + return t._markAsUpdated(), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + for (var n = 0; n < 16; n++) t._m[n] += this._m[n] * e; + return t._markAsUpdated(), this; + }), + (e.prototype.toNormalMatrix = function (t) { + var n = d.Matrix[0]; + this.invertToRef(n), n.transposeToRef(t); + var i = t._m; + e.FromValuesToRef(i[0], i[1], i[2], 0, i[4], i[5], i[6], 0, i[8], i[9], i[10], 0, 0, 0, 0, 1, t); + }), + (e.prototype.getRotationMatrix = function () { + var t = new e(); + return this.getRotationMatrixToRef(t), t; + }), + (e.prototype.getRotationMatrixToRef = function (t) { + var n = d.Vector3[0]; + if (!this.decompose(n)) return e.IdentityToRef(t), this; + var i = this._m, + r = 1 / n.x, + o = 1 / n.y, + a = 1 / n.z; + return e.FromValuesToRef(i[0] * r, i[1] * r, i[2] * r, 0, i[4] * o, i[5] * o, i[6] * o, 0, i[8] * a, i[9] * a, i[10] * a, 0, 0, 0, 0, 1, t), this; + }), + (e.prototype.toggleModelMatrixHandInPlace = function () { + var e = this._m; + (e[2] *= -1), (e[6] *= -1), (e[8] *= -1), (e[9] *= -1), (e[14] *= -1), this._markAsUpdated(); + }), + (e.prototype.toggleProjectionMatrixHandInPlace = function () { + var e = this._m; + (e[8] *= -1), (e[9] *= -1), (e[10] *= -1), (e[11] *= -1), this._markAsUpdated(); + }), + (e.FromArray = function (t, n) { + void 0 === n && (n = 0); + var i = new e(); + return e.FromArrayToRef(t, n, i), i; + }), + (e.FromArrayToRef = function (e, t, n) { + for (var i = 0; i < 16; i++) n._m[i] = e[i + t]; + n._markAsUpdated(); + }), + (e.FromFloat32ArrayToRefScaled = function (e, t, n, i) { + for (var r = 0; r < 16; r++) i._m[r] = e[r + t] * n; + i._markAsUpdated(); + }), + Object.defineProperty(e, "IdentityReadOnly", { + get: function () { + return e._identityReadOnly; + }, + enumerable: !0, + configurable: !0, + }), + (e.FromValuesToRef = function (e, t, n, i, r, o, a, s, c, l, u, h, d, p, f, m, g) { + var b = g._m; + (b[0] = e), + (b[1] = t), + (b[2] = n), + (b[3] = i), + (b[4] = r), + (b[5] = o), + (b[6] = a), + (b[7] = s), + (b[8] = c), + (b[9] = l), + (b[10] = u), + (b[11] = h), + (b[12] = d), + (b[13] = p), + (b[14] = f), + (b[15] = m), + g._markAsUpdated(); + }), + (e.FromValues = function (t, n, i, r, o, a, s, c, l, u, h, d, p, f, m, g) { + var b = new e(), + _ = b._m; + return ( + (_[0] = t), + (_[1] = n), + (_[2] = i), + (_[3] = r), + (_[4] = o), + (_[5] = a), + (_[6] = s), + (_[7] = c), + (_[8] = l), + (_[9] = u), + (_[10] = h), + (_[11] = d), + (_[12] = p), + (_[13] = f), + (_[14] = m), + (_[15] = g), + b._markAsUpdated(), + b + ); + }), + (e.Compose = function (t, n, i) { + var r = new e(); + return e.ComposeToRef(t, n, i, r), r; + }), + (e.ComposeToRef = function (e, t, n, i) { + var r = i._m, + o = t.x, + a = t.y, + s = t.z, + c = t.w, + l = o + o, + u = a + a, + h = s + s, + d = o * l, + p = o * u, + f = o * h, + m = a * u, + g = a * h, + b = s * h, + _ = c * l, + v = c * u, + y = c * h, + C = e.x, + P = e.y, + x = e.z; + (r[0] = (1 - (m + b)) * C), + (r[1] = (p + y) * C), + (r[2] = (f - v) * C), + (r[3] = 0), + (r[4] = (p - y) * P), + (r[5] = (1 - (d + b)) * P), + (r[6] = (g + _) * P), + (r[7] = 0), + (r[8] = (f + v) * x), + (r[9] = (g - _) * x), + (r[10] = (1 - (d + m)) * x), + (r[11] = 0), + (r[12] = n.x), + (r[13] = n.y), + (r[14] = n.z), + (r[15] = 1), + i._markAsUpdated(); + }), + (e.Identity = function () { + var t = e.FromValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + return t._updateIdentityStatus(!0), t; + }), + (e.IdentityToRef = function (t) { + e.FromValuesToRef(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, t), t._updateIdentityStatus(!0); + }), + (e.Zero = function () { + var t = e.FromValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + return t._updateIdentityStatus(!1), t; + }), + (e.RotationX = function (t) { + var n = new e(); + return e.RotationXToRef(t, n), n; + }), + (e.Invert = function (t) { + var n = new e(); + return t.invertToRef(n), n; + }), + (e.RotationXToRef = function (t, n) { + var i = Math.sin(t), + r = Math.cos(t); + e.FromValuesToRef(1, 0, 0, 0, 0, r, i, 0, 0, -i, r, 0, 0, 0, 0, 1, n), n._updateIdentityStatus(1 === r && 0 === i); + }), + (e.RotationY = function (t) { + var n = new e(); + return e.RotationYToRef(t, n), n; + }), + (e.RotationYToRef = function (t, n) { + var i = Math.sin(t), + r = Math.cos(t); + e.FromValuesToRef(r, 0, -i, 0, 0, 1, 0, 0, i, 0, r, 0, 0, 0, 0, 1, n), n._updateIdentityStatus(1 === r && 0 === i); + }), + (e.RotationZ = function (t) { + var n = new e(); + return e.RotationZToRef(t, n), n; + }), + (e.RotationZToRef = function (t, n) { + var i = Math.sin(t), + r = Math.cos(t); + e.FromValuesToRef(r, i, 0, 0, -i, r, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, n), n._updateIdentityStatus(1 === r && 0 === i); + }), + (e.RotationAxis = function (t, n) { + var i = new e(); + return e.RotationAxisToRef(t, n, i), i; + }), + (e.RotationAxisToRef = function (e, t, n) { + var i = Math.sin(-t), + r = Math.cos(-t), + o = 1 - r; + e.normalize(); + var a = n._m; + (a[0] = e.x * e.x * o + r), + (a[1] = e.x * e.y * o - e.z * i), + (a[2] = e.x * e.z * o + e.y * i), + (a[3] = 0), + (a[4] = e.y * e.x * o + e.z * i), + (a[5] = e.y * e.y * o + r), + (a[6] = e.y * e.z * o - e.x * i), + (a[7] = 0), + (a[8] = e.z * e.x * o - e.y * i), + (a[9] = e.z * e.y * o + e.x * i), + (a[10] = e.z * e.z * o + r), + (a[11] = 0), + (a[12] = 0), + (a[13] = 0), + (a[14] = 0), + (a[15] = 1), + n._markAsUpdated(); + }), + (e.RotationAlignToRef = function (e, t, n) { + var i = c.Cross(t, e), + r = c.Dot(t, e), + o = 1 / (1 + r), + a = n._m; + (a[0] = i.x * i.x * o + r), + (a[1] = i.y * i.x * o - i.z), + (a[2] = i.z * i.x * o + i.y), + (a[3] = 0), + (a[4] = i.x * i.y * o + i.z), + (a[5] = i.y * i.y * o + r), + (a[6] = i.z * i.y * o - i.x), + (a[7] = 0), + (a[8] = i.x * i.z * o - i.y), + (a[9] = i.y * i.z * o + i.x), + (a[10] = i.z * i.z * o + r), + (a[11] = 0), + (a[12] = 0), + (a[13] = 0), + (a[14] = 0), + (a[15] = 1), + n._markAsUpdated(); + }), + (e.RotationYawPitchRoll = function (t, n, i) { + var r = new e(); + return e.RotationYawPitchRollToRef(t, n, i, r), r; + }), + (e.RotationYawPitchRollToRef = function (e, t, n, i) { + u.RotationYawPitchRollToRef(e, t, n, d.Quaternion[0]), d.Quaternion[0].toRotationMatrix(i); + }), + (e.Scaling = function (t, n, i) { + var r = new e(); + return e.ScalingToRef(t, n, i, r), r; + }), + (e.ScalingToRef = function (t, n, i, r) { + e.FromValuesToRef(t, 0, 0, 0, 0, n, 0, 0, 0, 0, i, 0, 0, 0, 0, 1, r), r._updateIdentityStatus(1 === t && 1 === n && 1 === i); + }), + (e.Translation = function (t, n, i) { + var r = new e(); + return e.TranslationToRef(t, n, i, r), r; + }), + (e.TranslationToRef = function (t, n, i, r) { + e.FromValuesToRef(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, n, i, 1, r), r._updateIdentityStatus(0 === t && 0 === n && 0 === i); + }), + (e.Lerp = function (t, n, i) { + var r = new e(); + return e.LerpToRef(t, n, i, r), r; + }), + (e.LerpToRef = function (e, t, n, i) { + for (var r = i._m, o = e.m, a = t.m, s = 0; s < 16; s++) r[s] = o[s] * (1 - n) + a[s] * n; + i._markAsUpdated(); + }), + (e.DecomposeLerp = function (t, n, i) { + var r = new e(); + return e.DecomposeLerpToRef(t, n, i, r), r; + }), + (e.DecomposeLerpToRef = function (t, n, i, r) { + var o = d.Vector3[0], + a = d.Quaternion[0], + s = d.Vector3[1]; + t.decompose(o, a, s); + var l = d.Vector3[2], + h = d.Quaternion[1], + p = d.Vector3[3]; + n.decompose(l, h, p); + var f = d.Vector3[4]; + c.LerpToRef(o, l, i, f); + var m = d.Quaternion[2]; + u.SlerpToRef(a, h, i, m); + var g = d.Vector3[5]; + c.LerpToRef(s, p, i, g), e.ComposeToRef(f, m, g, r); + }), + (e.LookAtLH = function (t, n, i) { + var r = new e(); + return e.LookAtLHToRef(t, n, i, r), r; + }), + (e.LookAtLHToRef = function (t, n, i, r) { + var o = d.Vector3[0], + a = d.Vector3[1], + s = d.Vector3[2]; + n.subtractToRef(t, s), s.normalize(), c.CrossToRef(i, s, o); + var l = o.lengthSquared(); + 0 === l ? (o.x = 1) : o.normalizeFromLength(Math.sqrt(l)), c.CrossToRef(s, o, a), a.normalize(); + var u = -c.Dot(o, t), + h = -c.Dot(a, t), + p = -c.Dot(s, t); + e.FromValuesToRef(o.x, a.x, s.x, 0, o.y, a.y, s.y, 0, o.z, a.z, s.z, 0, u, h, p, 1, r); + }), + (e.LookAtRH = function (t, n, i) { + var r = new e(); + return e.LookAtRHToRef(t, n, i, r), r; + }), + (e.LookAtRHToRef = function (t, n, i, r) { + var o = d.Vector3[0], + a = d.Vector3[1], + s = d.Vector3[2]; + t.subtractToRef(n, s), s.normalize(), c.CrossToRef(i, s, o); + var l = o.lengthSquared(); + 0 === l ? (o.x = 1) : o.normalizeFromLength(Math.sqrt(l)), c.CrossToRef(s, o, a), a.normalize(); + var u = -c.Dot(o, t), + h = -c.Dot(a, t), + p = -c.Dot(s, t); + e.FromValuesToRef(o.x, a.x, s.x, 0, o.y, a.y, s.y, 0, o.z, a.z, s.z, 0, u, h, p, 1, r); + }), + (e.OrthoLH = function (t, n, i, r) { + var o = new e(); + return e.OrthoLHToRef(t, n, i, r, o), o; + }), + (e.OrthoLHToRef = function (t, n, i, r, o) { + var a = 2 / t, + s = 2 / n, + c = 2 / (r - i), + l = -(r + i) / (r - i); + e.FromValuesToRef(a, 0, 0, 0, 0, s, 0, 0, 0, 0, c, 0, 0, 0, l, 1, o), o._updateIdentityStatus(1 === a && 1 === s && 1 === c && 0 === l); + }), + (e.OrthoOffCenterLH = function (t, n, i, r, o, a) { + var s = new e(); + return e.OrthoOffCenterLHToRef(t, n, i, r, o, a, s), s; + }), + (e.OrthoOffCenterLHToRef = function (t, n, i, r, o, a, s) { + var c = 2 / (n - t), + l = 2 / (r - i), + u = 2 / (a - o), + h = -(a + o) / (a - o), + d = (t + n) / (t - n), + p = (r + i) / (i - r); + e.FromValuesToRef(c, 0, 0, 0, 0, l, 0, 0, 0, 0, u, 0, d, p, h, 1, s), s._markAsUpdated(); + }), + (e.OrthoOffCenterRH = function (t, n, i, r, o, a) { + var s = new e(); + return e.OrthoOffCenterRHToRef(t, n, i, r, o, a, s), s; + }), + (e.OrthoOffCenterRHToRef = function (t, n, i, r, o, a, s) { + e.OrthoOffCenterLHToRef(t, n, i, r, o, a, s), (s._m[10] *= -1); + }), + (e.PerspectiveLH = function (t, n, i, r) { + var o = new e(), + a = (2 * i) / t, + s = (2 * i) / n, + c = (r + i) / (r - i), + l = (-2 * r * i) / (r - i); + return e.FromValuesToRef(a, 0, 0, 0, 0, s, 0, 0, 0, 0, c, 1, 0, 0, l, 0, o), o._updateIdentityStatus(!1), o; + }), + (e.PerspectiveFovLH = function (t, n, i, r) { + var o = new e(); + return e.PerspectiveFovLHToRef(t, n, i, r, o), o; + }), + (e.PerspectiveFovLHToRef = function (t, n, i, r, o, a) { + void 0 === a && (a = !0); + var s = i, + c = r, + l = 1 / Math.tan(0.5 * t), + u = a ? l / n : l, + h = a ? l : l * n, + d = (c + s) / (c - s), + p = (-2 * c * s) / (c - s); + e.FromValuesToRef(u, 0, 0, 0, 0, h, 0, 0, 0, 0, d, 1, 0, 0, p, 0, o), o._updateIdentityStatus(!1); + }), + (e.PerspectiveFovReverseLHToRef = function (t, n, i, r, o, a) { + void 0 === a && (a = !0); + var s = 1 / Math.tan(0.5 * t), + c = a ? s / n : s, + l = a ? s : s * n; + e.FromValuesToRef(c, 0, 0, 0, 0, l, 0, 0, 0, 0, -i, 1, 0, 0, 1, 0, o), o._updateIdentityStatus(!1); + }), + (e.PerspectiveFovRH = function (t, n, i, r) { + var o = new e(); + return e.PerspectiveFovRHToRef(t, n, i, r, o), o; + }), + (e.PerspectiveFovRHToRef = function (t, n, i, r, o, a) { + void 0 === a && (a = !0); + var s = i, + c = r, + l = 1 / Math.tan(0.5 * t), + u = a ? l / n : l, + h = a ? l : l * n, + d = -(c + s) / (c - s), + p = (-2 * c * s) / (c - s); + e.FromValuesToRef(u, 0, 0, 0, 0, h, 0, 0, 0, 0, d, -1, 0, 0, p, 0, o), o._updateIdentityStatus(!1); + }), + (e.PerspectiveFovReverseRHToRef = function (t, n, i, r, o, a) { + void 0 === a && (a = !0); + var s = 1 / Math.tan(0.5 * t), + c = a ? s / n : s, + l = a ? s : s * n; + e.FromValuesToRef(c, 0, 0, 0, 0, l, 0, 0, 0, 0, -i, -1, 0, 0, -1, 0, o), o._updateIdentityStatus(!1); + }), + (e.PerspectiveFovWebVRToRef = function (e, t, n, i, r) { + void 0 === r && (r = !1); + var o = r ? -1 : 1, + a = Math.tan((e.upDegrees * Math.PI) / 180), + s = Math.tan((e.downDegrees * Math.PI) / 180), + c = Math.tan((e.leftDegrees * Math.PI) / 180), + l = Math.tan((e.rightDegrees * Math.PI) / 180), + u = 2 / (c + l), + h = 2 / (a + s), + d = i._m; + (d[0] = u), + (d[1] = d[2] = d[3] = d[4] = 0), + (d[5] = h), + (d[6] = d[7] = 0), + (d[8] = (c - l) * u * 0.5), + (d[9] = -(a - s) * h * 0.5), + (d[10] = -n / (t - n)), + (d[11] = 1 * o), + (d[12] = d[13] = d[15] = 0), + (d[14] = (-2 * n * t) / (n - t)), + i._markAsUpdated(); + }), + (e.GetFinalMatrix = function (t, n, i, r, o, a) { + var s = t.width, + c = t.height, + l = t.x, + u = t.y, + h = e.FromValues(s / 2, 0, 0, 0, 0, -c / 2, 0, 0, 0, 0, a - o, 0, l + s / 2, c / 2 + u, o, 1), + p = d.Matrix[0]; + return n.multiplyToRef(i, p), p.multiplyToRef(r, p), p.multiply(h); + }), + (e.GetAsMatrix2x2 = function (e) { + var t = e.m; + return new Float32Array([t[0], t[1], t[4], t[5]]); + }), + (e.GetAsMatrix3x3 = function (e) { + var t = e.m; + return new Float32Array([t[0], t[1], t[2], t[4], t[5], t[6], t[8], t[9], t[10]]); + }), + (e.Transpose = function (t) { + var n = new e(); + return e.TransposeToRef(t, n), n; + }), + (e.TransposeToRef = function (e, t) { + var n = t._m, + i = e.m; + (n[0] = i[0]), + (n[1] = i[4]), + (n[2] = i[8]), + (n[3] = i[12]), + (n[4] = i[1]), + (n[5] = i[5]), + (n[6] = i[9]), + (n[7] = i[13]), + (n[8] = i[2]), + (n[9] = i[6]), + (n[10] = i[10]), + (n[11] = i[14]), + (n[12] = i[3]), + (n[13] = i[7]), + (n[14] = i[11]), + (n[15] = i[15]), + t._updateIdentityStatus(e._isIdentity, e._isIdentityDirty); + }), + (e.Reflection = function (t) { + var n = new e(); + return e.ReflectionToRef(t, n), n; + }), + (e.ReflectionToRef = function (t, n) { + t.normalize(); + var i = t.normal.x, + r = t.normal.y, + o = t.normal.z, + a = -2 * i, + s = -2 * r, + c = -2 * o; + e.FromValuesToRef(a * i + 1, s * i, c * i, 0, a * r, s * r + 1, c * r, 0, a * o, s * o, c * o + 1, 0, a * t.d, s * t.d, c * t.d, 1, n); + }), + (e.FromXYZAxesToRef = function (t, n, i, r) { + e.FromValuesToRef(t.x, t.y, t.z, 0, n.x, n.y, n.z, 0, i.x, i.y, i.z, 0, 0, 0, 0, 1, r); + }), + (e.FromQuaternionToRef = function (e, t) { + var n = e.x * e.x, + i = e.y * e.y, + r = e.z * e.z, + o = e.x * e.y, + a = e.z * e.w, + s = e.z * e.x, + c = e.y * e.w, + l = e.y * e.z, + u = e.x * e.w; + (t._m[0] = 1 - 2 * (i + r)), + (t._m[1] = 2 * (o + a)), + (t._m[2] = 2 * (s - c)), + (t._m[3] = 0), + (t._m[4] = 2 * (o - a)), + (t._m[5] = 1 - 2 * (r + n)), + (t._m[6] = 2 * (l + u)), + (t._m[7] = 0), + (t._m[8] = 2 * (s + c)), + (t._m[9] = 2 * (l - u)), + (t._m[10] = 1 - 2 * (i + n)), + (t._m[11] = 0), + (t._m[12] = 0), + (t._m[13] = 0), + (t._m[14] = 0), + (t._m[15] = 1), + t._markAsUpdated(); + }), + (e._updateFlagSeed = 0), + (e._identityReadOnly = e.Identity()), + e + ); + })(), + d = (function () { + function e() {} + return (e.Vector3 = o.a.BuildArray(6, c.Zero)), (e.Matrix = o.a.BuildArray(2, h.Identity)), (e.Quaternion = o.a.BuildArray(3, u.Zero)), e; + })(), + p = (function () { + function e() {} + return (e.Vector2 = o.a.BuildArray(3, s.Zero)), (e.Vector3 = o.a.BuildArray(13, c.Zero)), (e.Vector4 = o.a.BuildArray(3, l.Zero)), (e.Quaternion = o.a.BuildArray(2, u.Zero)), (e.Matrix = o.a.BuildArray(8, h.Identity)), e; + })(); + (a.a.RegisteredTypes["BABYLON.Vector2"] = s), (a.a.RegisteredTypes["BABYLON.Vector3"] = c), (a.a.RegisteredTypes["BABYLON.Vector4"] = l), (a.a.RegisteredTypes["BABYLON.Matrix"] = h); + }, + function (e, t, n) { + "use strict"; + n.d(t, "d", function () { + return r; + }), + n.d(t, "a", function () { + return o; + }), + n.d(t, "c", function () { + return a; + }), + n.d(t, "b", function () { + return s; + }), + n.d(t, "e", function () { + return c; + }), + n.d(t, "f", function () { + return l; + }); + var i = function (e, t) { + return (i = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (e, t) { + e.__proto__ = t; + }) || + function (e, t) { + for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); + })(e, t); + }; + function r(e, t) { + function n() { + this.constructor = e; + } + i(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n())); + } + var o = function () { + return (o = + Object.assign || + function (e) { + for (var t, n = 1, i = arguments.length; n < i; n++) for (var r in (t = arguments[n])) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); + return e; + }).apply(this, arguments); + }; + function a(e, t, n, i) { + var r, + o = arguments.length, + a = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, i); + else for (var s = e.length - 1; s >= 0; s--) (r = e[s]) && (a = (o < 3 ? r(a) : o > 3 ? r(t, n, a) : r(t, n)) || a); + return o > 3 && a && Object.defineProperty(t, n, a), a; + } + function s(e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + } + function c(e, t) { + var n, + i, + r, + o, + a = { + label: 0, + sent: function () { + if (1 & r[0]) throw r[1]; + return r[1]; + }, + trys: [], + ops: [], + }; + return ( + (o = { next: s(0), throw: s(1), return: s(2) }), + "function" == typeof Symbol && + (o[Symbol.iterator] = function () { + return this; + }), + o + ); + function s(o) { + return function (s) { + return (function (o) { + if (n) throw new TypeError("Generator is already executing."); + for (; a; ) + try { + if (((n = 1), i && (r = 2 & o[0] ? i.return : o[0] ? i.throw || ((r = i.return) && r.call(i), 0) : i.next) && !(r = r.call(i, o[1])).done)) return r; + switch (((i = 0), r && (o = [2 & o[0], r.value]), o[0])) { + case 0: + case 1: + r = o; + break; + case 4: + return a.label++, { value: o[1], done: !1 }; + case 5: + a.label++, (i = o[1]), (o = [0]); + continue; + case 7: + (o = a.ops.pop()), a.trys.pop(); + continue; + default: + if (!((r = a.trys), (r = r.length > 0 && r[r.length - 1]) || (6 !== o[0] && 2 !== o[0]))) { + a = 0; + continue; + } + if (3 === o[0] && (!r || (o[1] > r[0] && o[1] < r[3]))) { + a.label = o[1]; + break; + } + if (6 === o[0] && a.label < r[1]) { + (a.label = r[1]), (r = o); + break; + } + if (r && a.label < r[2]) { + (a.label = r[2]), a.ops.push(o); + break; + } + r[2] && a.ops.pop(), a.trys.pop(); + continue; + } + o = t.call(e, a); + } catch (e) { + (o = [6, e]), (i = 0); + } finally { + n = r = 0; + } + if (5 & o[0]) throw o[1]; + return { value: o[0] ? o[1] : void 0, done: !0 }; + })([o, s]); + }; + } + } + function l() { + for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length; + var i = Array(e), + r = 0; + for (t = 0; t < n; t++) for (var o = arguments[t], a = 0, s = o.length; a < s; a++, r++) i[r] = o[a]; + return i; + } + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return d; + }), + n.d(t, "c", function () { + return p; + }), + n.d(t, "m", function () { + return f; + }), + n.d(t, "e", function () { + return m; + }), + n.d(t, "h", function () { + return g; + }), + n.d(t, "n", function () { + return b; + }), + n.d(t, "o", function () { + return _; + }), + n.d(t, "k", function () { + return v; + }), + n.d(t, "g", function () { + return y; + }), + n.d(t, "f", function () { + return C; + }), + n.d(t, "i", function () { + return P; + }), + n.d(t, "l", function () { + return x; + }), + n.d(t, "j", function () { + return T; + }), + n.d(t, "d", function () { + return S; + }), + n.d(t, "a", function () { + return O; + }); + var i = n(45), + r = n(1), + o = n(22), + a = n(5), + s = {}, + c = {}, + l = function (e, t, n) { + var r = e(); + i.a && i.a.AddTagsTo(r, t.tags); + var o = u(r); + for (var a in o) { + var s = o[a], + c = t[a], + l = s.type; + if (null != c && "uniqueId" !== a) + switch (l) { + case 0: + case 6: + case 11: + r[a] = c; + break; + case 1: + r[a] = n || c.isRenderTarget ? c : c.clone(); + break; + case 2: + case 3: + case 4: + case 5: + case 7: + case 10: + case 12: + r[a] = n ? c : c.clone(); + } + } + return r; + }; + function u(e) { + var t = e.getClassName(); + if (c[t]) return c[t]; + c[t] = {}; + for (var n = c[t], i = e, r = t; r; ) { + var o = s[r]; + for (var a in o) n[a] = o[a]; + var l = void 0, + u = !1; + do { + if (!(l = Object.getPrototypeOf(i)).getClassName) { + u = !0; + break; + } + if (l.getClassName() !== r) break; + i = l; + } while (l); + if (u) break; + (r = l.getClassName()), (i = l); + } + return n; + } + function h(e, t) { + return function (n, i) { + var r = (function (e) { + var t = e.getClassName(); + return s[t] || (s[t] = {}), s[t]; + })(n); + r[i] || (r[i] = { type: e, sourceName: t }); + }; + } + function d(e, t) { + return ( + void 0 === t && (t = null), + (function (e, t) { + return ( + void 0 === t && (t = null), + function (n, i) { + var r = t || "_" + i; + Object.defineProperty(n, i, { + get: function () { + return this[r]; + }, + set: function (t) { + this[r] !== t && ((this[r] = t), n[e].apply(this)); + }, + enumerable: !0, + configurable: !0, + }); + } + ); + })(e, t) + ); + } + function p(e) { + return h(0, e); + } + function f(e) { + return h(1, e); + } + function m(e) { + return h(2, e); + } + function g(e) { + return h(3, e); + } + function b(e) { + return h(4, e); + } + function _(e) { + return h(5, e); + } + function v(e) { + return h(6, e); + } + function y(e) { + return h(7, e); + } + function C(e) { + return h(8, e); + } + function P(e) { + return h(9, e); + } + function x(e) { + return h(10, e); + } + function T(e) { + return h(12, e); + } + function S(e) { + return h(11, e); + } + var O = (function () { + function e() {} + return ( + (e.AppendSerializedAnimations = function (e, t) { + if (e.animations) { + t.animations = []; + for (var n = 0; n < e.animations.length; n++) { + var i = e.animations[n]; + t.animations.push(i.serialize()); + } + } + }), + (e.Serialize = function (e, t) { + t || (t = {}), i.a && (t.tags = i.a.GetTags(e)); + var n = u(e); + for (var r in n) { + var o = n[r], + a = o.sourceName || r, + s = o.type, + c = e[r]; + if (null != c) + switch (s) { + case 0: + t[a] = c; + break; + case 1: + t[a] = c.serialize(); + break; + case 2: + t[a] = c.asArray(); + break; + case 3: + t[a] = c.serialize(); + break; + case 4: + case 5: + t[a] = c.asArray(); + break; + case 6: + t[a] = c.id; + break; + case 7: + t[a] = c.serialize(); + break; + case 8: + t[a] = c.asArray(); + break; + case 9: + t[a] = c.serialize(); + break; + case 10: + t[a] = c.asArray(); + break; + case 11: + t[a] = c.id; + case 12: + t[a] = c.asArray(); + } + } + return t; + }), + (e.Parse = function (t, n, o, s) { + void 0 === s && (s = null); + var c = t(); + s || (s = ""), i.a && i.a.AddTagsTo(c, n.tags); + var l = u(c); + for (var h in l) { + var d = l[h], + p = n[d.sourceName || h], + f = d.type; + if (null != p) { + var m = c; + switch (f) { + case 0: + m[h] = p; + break; + case 1: + o && (m[h] = e._TextureParser(p, o, s)); + break; + case 2: + m[h] = a.a.FromArray(p); + break; + case 3: + m[h] = e._FresnelParametersParser(p); + break; + case 4: + m[h] = r.d.FromArray(p); + break; + case 5: + m[h] = r.e.FromArray(p); + break; + case 6: + o && (m[h] = o.getLastMeshByID(p)); + break; + case 7: + m[h] = e._ColorCurvesParser(p); + break; + case 8: + m[h] = a.b.FromArray(p); + break; + case 9: + m[h] = e._ImageProcessingConfigurationParser(p); + break; + case 10: + m[h] = r.b.FromArray(p); + break; + case 11: + o && (m[h] = o.getCameraByID(p)); + case 12: + m[h] = r.a.FromArray(p); + } + } + } + return c; + }), + (e.Clone = function (e, t) { + return l(e, t, !1); + }), + (e.Instanciate = function (e, t) { + return l(e, t, !0); + }), + (e._ImageProcessingConfigurationParser = function (e) { + throw o.a.WarnImport("ImageProcessingConfiguration"); + }), + (e._FresnelParametersParser = function (e) { + throw o.a.WarnImport("FresnelParameters"); + }), + (e._ColorCurvesParser = function (e) { + throw o.a.WarnImport("ColorCurves"); + }), + (e._TextureParser = function (e, t, n) { + throw o.a.WarnImport("Texture"); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }), + n.d(t, "b", function () { + return r; + }); + var i = (function () { + function e(e, t, n, i, r, o, a, s) { + void 0 === i && (i = 0), + void 0 === r && (r = !1), + void 0 === o && (o = !1), + void 0 === a && (a = !1), + e.getScene ? (this._engine = e.getScene().getEngine()) : (this._engine = e), + (this._updatable = n), + (this._instanced = o), + (this._divisor = s || 1), + (this._data = t), + (this.byteStride = a ? i : i * Float32Array.BYTES_PER_ELEMENT), + r || this.create(); + } + return ( + (e.prototype.createVertexBuffer = function (e, t, n, i, o, a, s) { + void 0 === a && (a = !1); + var c = a ? t : t * Float32Array.BYTES_PER_ELEMENT, + l = i ? (a ? i : i * Float32Array.BYTES_PER_ELEMENT) : this.byteStride; + return new r(this._engine, this, e, this._updatable, !0, l, void 0 === o ? this._instanced : o, c, n, void 0, void 0, !0, this._divisor || s); + }), + (e.prototype.isUpdatable = function () { + return this._updatable; + }), + (e.prototype.getData = function () { + return this._data; + }), + (e.prototype.getBuffer = function () { + return this._buffer; + }), + (e.prototype.getStrideSize = function () { + return this.byteStride / Float32Array.BYTES_PER_ELEMENT; + }), + (e.prototype.create = function (e) { + void 0 === e && (e = null), + (!e && this._buffer) || + ((e = e || this._data) && + (this._buffer + ? this._updatable && (this._engine.updateDynamicVertexBuffer(this._buffer, e), (this._data = e)) + : this._updatable + ? ((this._buffer = this._engine.createDynamicVertexBuffer(e)), (this._data = e)) + : (this._buffer = this._engine.createVertexBuffer(e)))); + }), + (e.prototype._rebuild = function () { + (this._buffer = null), this.create(this._data); + }), + (e.prototype.update = function (e) { + this.create(e); + }), + (e.prototype.updateDirectly = function (e, t, n, i) { + void 0 === i && (i = !1), + this._buffer && this._updatable && (this._engine.updateDynamicVertexBuffer(this._buffer, e, i ? t : t * Float32Array.BYTES_PER_ELEMENT, n ? n * this.byteStride : void 0), (this._data = null)); + }), + (e.prototype.dispose = function () { + this._buffer && this._engine._releaseBuffer(this._buffer) && (this._buffer = null); + }), + e + ); + })(), + r = (function () { + function e(t, n, r, o, a, s, c, l, u, h, d, p, f) { + if ( + (void 0 === d && (d = !1), + void 0 === p && (p = !1), + void 0 === f && (f = 1), + n instanceof i ? ((this._buffer = n), (this._ownsBuffer = !1)) : ((this._buffer = new i(t, n, o, s, a, c, p)), (this._ownsBuffer = !0)), + (this._kind = r), + null == h) + ) { + var m = this.getData(); + (this.type = e.FLOAT), + m instanceof Int8Array + ? (this.type = e.BYTE) + : m instanceof Uint8Array + ? (this.type = e.UNSIGNED_BYTE) + : m instanceof Int16Array + ? (this.type = e.SHORT) + : m instanceof Uint16Array + ? (this.type = e.UNSIGNED_SHORT) + : m instanceof Int32Array + ? (this.type = e.INT) + : m instanceof Uint32Array && (this.type = e.UNSIGNED_INT); + } else this.type = h; + var g = e.GetTypeByteLength(this.type); + p + ? ((this._size = u || (s ? s / g : e.DeduceStride(r))), (this.byteStride = s || this._buffer.byteStride || this._size * g), (this.byteOffset = l || 0)) + : ((this._size = u || s || e.DeduceStride(r)), (this.byteStride = s ? s * g : this._buffer.byteStride || this._size * g), (this.byteOffset = (l || 0) * g)), + (this.normalized = d), + (this._instanced = void 0 !== c && c), + (this._instanceDivisor = c ? f : 0); + } + return ( + Object.defineProperty(e.prototype, "instanceDivisor", { + get: function () { + return this._instanceDivisor; + }, + set: function (e) { + (this._instanceDivisor = e), (this._instanced = 0 != e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._rebuild = function () { + this._buffer && this._buffer._rebuild(); + }), + (e.prototype.getKind = function () { + return this._kind; + }), + (e.prototype.isUpdatable = function () { + return this._buffer.isUpdatable(); + }), + (e.prototype.getData = function () { + return this._buffer.getData(); + }), + (e.prototype.getBuffer = function () { + return this._buffer.getBuffer(); + }), + (e.prototype.getStrideSize = function () { + return this.byteStride / e.GetTypeByteLength(this.type); + }), + (e.prototype.getOffset = function () { + return this.byteOffset / e.GetTypeByteLength(this.type); + }), + (e.prototype.getSize = function () { + return this._size; + }), + (e.prototype.getIsInstanced = function () { + return this._instanced; + }), + (e.prototype.getInstanceDivisor = function () { + return this._instanceDivisor; + }), + (e.prototype.create = function (e) { + this._buffer.create(e); + }), + (e.prototype.update = function (e) { + this._buffer.update(e); + }), + (e.prototype.updateDirectly = function (e, t, n) { + void 0 === n && (n = !1), this._buffer.updateDirectly(e, t, void 0, n); + }), + (e.prototype.dispose = function () { + this._ownsBuffer && this._buffer.dispose(); + }), + (e.prototype.forEach = function (t, n) { + e.ForEach(this._buffer.getData(), this.byteOffset, this.byteStride, this._size, this.type, t, this.normalized, n); + }), + (e.DeduceStride = function (t) { + switch (t) { + case e.UVKind: + case e.UV2Kind: + case e.UV3Kind: + case e.UV4Kind: + case e.UV5Kind: + case e.UV6Kind: + return 2; + case e.NormalKind: + case e.PositionKind: + return 3; + case e.ColorKind: + case e.MatricesIndicesKind: + case e.MatricesIndicesExtraKind: + case e.MatricesWeightsKind: + case e.MatricesWeightsExtraKind: + case e.TangentKind: + return 4; + default: + throw new Error("Invalid kind '" + t + "'"); + } + }), + (e.GetTypeByteLength = function (t) { + switch (t) { + case e.BYTE: + case e.UNSIGNED_BYTE: + return 1; + case e.SHORT: + case e.UNSIGNED_SHORT: + return 2; + case e.INT: + case e.UNSIGNED_INT: + case e.FLOAT: + return 4; + default: + throw new Error("Invalid type '" + t + "'"); + } + }), + (e.ForEach = function (t, n, i, r, o, a, s, c) { + if (t instanceof Array) + for (var l = n / 4, u = i / 4, h = 0; h < a; h += r) { + for (var d = 0; d < r; d++) c(t[l + d], h + d); + l += u; + } + else { + var p = t instanceof ArrayBuffer ? new DataView(t) : new DataView(t.buffer, t.byteOffset, t.byteLength), + f = e.GetTypeByteLength(o); + for (h = 0; h < a; h += r) { + var m = n; + for (d = 0; d < r; d++) { + c(e._GetFloatValue(p, o, m, s), h + d), (m += f); + } + n += i; + } + } + }), + (e._GetFloatValue = function (t, n, i, r) { + switch (n) { + case e.BYTE: + var o = t.getInt8(i); + return r && (o = Math.max(o / 127, -1)), o; + case e.UNSIGNED_BYTE: + o = t.getUint8(i); + return r && (o /= 255), o; + case e.SHORT: + o = t.getInt16(i, !0); + return r && (o = Math.max(o / 32767, -1)), o; + case e.UNSIGNED_SHORT: + o = t.getUint16(i, !0); + return r && (o /= 65535), o; + case e.INT: + return t.getInt32(i, !0); + case e.UNSIGNED_INT: + return t.getUint32(i, !0); + case e.FLOAT: + return t.getFloat32(i, !0); + default: + throw new Error("Invalid component type " + n); + } + }), + (e.BYTE = 5120), + (e.UNSIGNED_BYTE = 5121), + (e.SHORT = 5122), + (e.UNSIGNED_SHORT = 5123), + (e.INT = 5124), + (e.UNSIGNED_INT = 5125), + (e.FLOAT = 5126), + (e.PositionKind = "position"), + (e.NormalKind = "normal"), + (e.TangentKind = "tangent"), + (e.UVKind = "uv"), + (e.UV2Kind = "uv2"), + (e.UV3Kind = "uv3"), + (e.UV4Kind = "uv4"), + (e.UV5Kind = "uv5"), + (e.UV6Kind = "uv6"), + (e.ColorKind = "color"), + (e.MatricesIndicesKind = "matricesIndices"), + (e.MatricesWeightsKind = "matricesWeights"), + (e.MatricesIndicesExtraKind = "matricesIndicesExtra"), + (e.MatricesWeightsExtraKind = "matricesWeightsExtra"), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }), + n.d(t, "b", function () { + return c; + }), + n.d(t, "c", function () { + return l; + }); + var i = n(15), + r = n(34), + o = n(58), + a = n(13), + s = (function () { + function e(e, t, n) { + void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), (this.r = e), (this.g = t), (this.b = n); + } + return ( + (e.prototype.toString = function () { + return "{R: " + this.r + " G:" + this.g + " B:" + this.b + "}"; + }), + (e.prototype.getClassName = function () { + return "Color3"; + }), + (e.prototype.getHashCode = function () { + var e = (255 * this.r) | 0; + return (e = (397 * (e = (397 * e) ^ ((255 * this.g) | 0))) ^ ((255 * this.b) | 0)); + }), + (e.prototype.toArray = function (e, t) { + return void 0 === t && (t = 0), (e[t] = this.r), (e[t + 1] = this.g), (e[t + 2] = this.b), this; + }), + (e.prototype.toColor4 = function (e) { + return void 0 === e && (e = 1), new c(this.r, this.g, this.b, e); + }), + (e.prototype.asArray = function () { + var e = new Array(); + return this.toArray(e, 0), e; + }), + (e.prototype.toLuminance = function () { + return 0.3 * this.r + 0.59 * this.g + 0.11 * this.b; + }), + (e.prototype.multiply = function (t) { + return new e(this.r * t.r, this.g * t.g, this.b * t.b); + }), + (e.prototype.multiplyToRef = function (e, t) { + return (t.r = this.r * e.r), (t.g = this.g * e.g), (t.b = this.b * e.b), this; + }), + (e.prototype.equals = function (e) { + return e && this.r === e.r && this.g === e.g && this.b === e.b; + }), + (e.prototype.equalsFloats = function (e, t, n) { + return this.r === e && this.g === t && this.b === n; + }), + (e.prototype.scale = function (t) { + return new e(this.r * t, this.g * t, this.b * t); + }), + (e.prototype.scaleToRef = function (e, t) { + return (t.r = this.r * e), (t.g = this.g * e), (t.b = this.b * e), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return (t.r += this.r * e), (t.g += this.g * e), (t.b += this.b * e), this; + }), + (e.prototype.clampToRef = function (e, t, n) { + return void 0 === e && (e = 0), void 0 === t && (t = 1), (n.r = i.a.Clamp(this.r, e, t)), (n.g = i.a.Clamp(this.g, e, t)), (n.b = i.a.Clamp(this.b, e, t)), this; + }), + (e.prototype.add = function (t) { + return new e(this.r + t.r, this.g + t.g, this.b + t.b); + }), + (e.prototype.addToRef = function (e, t) { + return (t.r = this.r + e.r), (t.g = this.g + e.g), (t.b = this.b + e.b), this; + }), + (e.prototype.subtract = function (t) { + return new e(this.r - t.r, this.g - t.g, this.b - t.b); + }), + (e.prototype.subtractToRef = function (e, t) { + return (t.r = this.r - e.r), (t.g = this.g - e.g), (t.b = this.b - e.b), this; + }), + (e.prototype.clone = function () { + return new e(this.r, this.g, this.b); + }), + (e.prototype.copyFrom = function (e) { + return (this.r = e.r), (this.g = e.g), (this.b = e.b), this; + }), + (e.prototype.copyFromFloats = function (e, t, n) { + return (this.r = e), (this.g = t), (this.b = n), this; + }), + (e.prototype.set = function (e, t, n) { + return this.copyFromFloats(e, t, n); + }), + (e.prototype.toHexString = function () { + var e = (255 * this.r) | 0, + t = (255 * this.g) | 0, + n = (255 * this.b) | 0; + return "#" + i.a.ToHex(e) + i.a.ToHex(t) + i.a.ToHex(n); + }), + (e.prototype.toLinearSpace = function () { + var t = new e(); + return this.toLinearSpaceToRef(t), t; + }), + (e.prototype.toHSV = function () { + var t = new e(); + return this.toHSVToRef(t), t; + }), + (e.prototype.toHSVToRef = function (e) { + var t = this.r, + n = this.g, + i = this.b, + r = Math.max(t, n, i), + o = Math.min(t, n, i), + a = 0, + s = 0, + c = r, + l = r - o; + 0 !== r && (s = l / r), r != o && (r == t ? ((a = (n - i) / l), n < i && (a += 6)) : r == n ? (a = (i - t) / l + 2) : r == i && (a = (t - n) / l + 4), (a *= 60)), (e.r = a), (e.g = s), (e.b = c); + }), + (e.prototype.toLinearSpaceToRef = function (e) { + return (e.r = Math.pow(this.r, r.c)), (e.g = Math.pow(this.g, r.c)), (e.b = Math.pow(this.b, r.c)), this; + }), + (e.prototype.toGammaSpace = function () { + var t = new e(); + return this.toGammaSpaceToRef(t), t; + }), + (e.prototype.toGammaSpaceToRef = function (e) { + return (e.r = Math.pow(this.r, r.b)), (e.g = Math.pow(this.g, r.b)), (e.b = Math.pow(this.b, r.b)), this; + }), + (e.HSVtoRGBToRef = function (e, t, n, i) { + var r = n * t, + o = e / 60, + a = r * (1 - Math.abs((o % 2) - 1)), + s = 0, + c = 0, + l = 0; + o >= 0 && o <= 1 + ? ((s = r), (c = a)) + : o >= 1 && o <= 2 + ? ((s = a), (c = r)) + : o >= 2 && o <= 3 + ? ((c = r), (l = a)) + : o >= 3 && o <= 4 + ? ((c = a), (l = r)) + : o >= 4 && o <= 5 + ? ((s = a), (l = r)) + : o >= 5 && o <= 6 && ((s = r), (l = a)); + var u = n - r; + i.set(s + u, c + u, l + u); + }), + (e.FromHexString = function (t) { + if ("#" !== t.substring(0, 1) || 7 !== t.length) return new e(0, 0, 0); + var n = parseInt(t.substring(1, 3), 16), + i = parseInt(t.substring(3, 5), 16), + r = parseInt(t.substring(5, 7), 16); + return e.FromInts(n, i, r); + }), + (e.FromArray = function (t, n) { + return void 0 === n && (n = 0), new e(t[n], t[n + 1], t[n + 2]); + }), + (e.FromInts = function (t, n, i) { + return new e(t / 255, n / 255, i / 255); + }), + (e.Lerp = function (t, n, i) { + var r = new e(0, 0, 0); + return e.LerpToRef(t, n, i, r), r; + }), + (e.LerpToRef = function (e, t, n, i) { + (i.r = e.r + (t.r - e.r) * n), (i.g = e.g + (t.g - e.g) * n), (i.b = e.b + (t.b - e.b) * n); + }), + (e.Red = function () { + return new e(1, 0, 0); + }), + (e.Green = function () { + return new e(0, 1, 0); + }), + (e.Blue = function () { + return new e(0, 0, 1); + }), + (e.Black = function () { + return new e(0, 0, 0); + }), + Object.defineProperty(e, "BlackReadOnly", { + get: function () { + return e._BlackReadOnly; + }, + enumerable: !0, + configurable: !0, + }), + (e.White = function () { + return new e(1, 1, 1); + }), + (e.Purple = function () { + return new e(0.5, 0, 0.5); + }), + (e.Magenta = function () { + return new e(1, 0, 1); + }), + (e.Yellow = function () { + return new e(1, 1, 0); + }), + (e.Gray = function () { + return new e(0.5, 0.5, 0.5); + }), + (e.Teal = function () { + return new e(0, 1, 1); + }), + (e.Random = function () { + return new e(Math.random(), Math.random(), Math.random()); + }), + (e._BlackReadOnly = e.Black()), + e + ); + })(), + c = (function () { + function e(e, t, n, i) { + void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 1), (this.r = e), (this.g = t), (this.b = n), (this.a = i); + } + return ( + (e.prototype.addInPlace = function (e) { + return (this.r += e.r), (this.g += e.g), (this.b += e.b), (this.a += e.a), this; + }), + (e.prototype.asArray = function () { + var e = new Array(); + return this.toArray(e, 0), e; + }), + (e.prototype.toArray = function (e, t) { + return void 0 === t && (t = 0), (e[t] = this.r), (e[t + 1] = this.g), (e[t + 2] = this.b), (e[t + 3] = this.a), this; + }), + (e.prototype.equals = function (e) { + return e && this.r === e.r && this.g === e.g && this.b === e.b && this.a === e.a; + }), + (e.prototype.add = function (t) { + return new e(this.r + t.r, this.g + t.g, this.b + t.b, this.a + t.a); + }), + (e.prototype.subtract = function (t) { + return new e(this.r - t.r, this.g - t.g, this.b - t.b, this.a - t.a); + }), + (e.prototype.subtractToRef = function (e, t) { + return (t.r = this.r - e.r), (t.g = this.g - e.g), (t.b = this.b - e.b), (t.a = this.a - e.a), this; + }), + (e.prototype.scale = function (t) { + return new e(this.r * t, this.g * t, this.b * t, this.a * t); + }), + (e.prototype.scaleToRef = function (e, t) { + return (t.r = this.r * e), (t.g = this.g * e), (t.b = this.b * e), (t.a = this.a * e), this; + }), + (e.prototype.scaleAndAddToRef = function (e, t) { + return (t.r += this.r * e), (t.g += this.g * e), (t.b += this.b * e), (t.a += this.a * e), this; + }), + (e.prototype.clampToRef = function (e, t, n) { + return void 0 === e && (e = 0), void 0 === t && (t = 1), (n.r = i.a.Clamp(this.r, e, t)), (n.g = i.a.Clamp(this.g, e, t)), (n.b = i.a.Clamp(this.b, e, t)), (n.a = i.a.Clamp(this.a, e, t)), this; + }), + (e.prototype.multiply = function (t) { + return new e(this.r * t.r, this.g * t.g, this.b * t.b, this.a * t.a); + }), + (e.prototype.multiplyToRef = function (e, t) { + return (t.r = this.r * e.r), (t.g = this.g * e.g), (t.b = this.b * e.b), (t.a = this.a * e.a), t; + }), + (e.prototype.toString = function () { + return "{R: " + this.r + " G:" + this.g + " B:" + this.b + " A:" + this.a + "}"; + }), + (e.prototype.getClassName = function () { + return "Color4"; + }), + (e.prototype.getHashCode = function () { + var e = (255 * this.r) | 0; + return (e = (397 * (e = (397 * (e = (397 * e) ^ ((255 * this.g) | 0))) ^ ((255 * this.b) | 0))) ^ ((255 * this.a) | 0)); + }), + (e.prototype.clone = function () { + return new e(this.r, this.g, this.b, this.a); + }), + (e.prototype.copyFrom = function (e) { + return (this.r = e.r), (this.g = e.g), (this.b = e.b), (this.a = e.a), this; + }), + (e.prototype.copyFromFloats = function (e, t, n, i) { + return (this.r = e), (this.g = t), (this.b = n), (this.a = i), this; + }), + (e.prototype.set = function (e, t, n, i) { + return this.copyFromFloats(e, t, n, i); + }), + (e.prototype.toHexString = function () { + var e = (255 * this.r) | 0, + t = (255 * this.g) | 0, + n = (255 * this.b) | 0, + r = (255 * this.a) | 0; + return "#" + i.a.ToHex(e) + i.a.ToHex(t) + i.a.ToHex(n) + i.a.ToHex(r); + }), + (e.prototype.toLinearSpace = function () { + var t = new e(); + return this.toLinearSpaceToRef(t), t; + }), + (e.prototype.toLinearSpaceToRef = function (e) { + return (e.r = Math.pow(this.r, r.c)), (e.g = Math.pow(this.g, r.c)), (e.b = Math.pow(this.b, r.c)), (e.a = this.a), this; + }), + (e.prototype.toGammaSpace = function () { + var t = new e(); + return this.toGammaSpaceToRef(t), t; + }), + (e.prototype.toGammaSpaceToRef = function (e) { + return (e.r = Math.pow(this.r, r.b)), (e.g = Math.pow(this.g, r.b)), (e.b = Math.pow(this.b, r.b)), (e.a = this.a), this; + }), + (e.FromHexString = function (t) { + if ("#" !== t.substring(0, 1) || 9 !== t.length) return new e(0, 0, 0, 0); + var n = parseInt(t.substring(1, 3), 16), + i = parseInt(t.substring(3, 5), 16), + r = parseInt(t.substring(5, 7), 16), + o = parseInt(t.substring(7, 9), 16); + return e.FromInts(n, i, r, o); + }), + (e.Lerp = function (t, n, i) { + var r = new e(0, 0, 0, 0); + return e.LerpToRef(t, n, i, r), r; + }), + (e.LerpToRef = function (e, t, n, i) { + (i.r = e.r + (t.r - e.r) * n), (i.g = e.g + (t.g - e.g) * n), (i.b = e.b + (t.b - e.b) * n), (i.a = e.a + (t.a - e.a) * n); + }), + (e.FromColor3 = function (t, n) { + return void 0 === n && (n = 1), new e(t.r, t.g, t.b, n); + }), + (e.FromArray = function (t, n) { + return void 0 === n && (n = 0), new e(t[n], t[n + 1], t[n + 2], t[n + 3]); + }), + (e.FromInts = function (t, n, i, r) { + return new e(t / 255, n / 255, i / 255, r / 255); + }), + (e.CheckColors4 = function (e, t) { + if (e.length === 3 * t) { + for (var n = [], i = 0; i < e.length; i += 3) { + var r = (i / 3) * 4; + (n[r] = e[i]), (n[r + 1] = e[i + 1]), (n[r + 2] = e[i + 2]), (n[r + 3] = 1); + } + return n; + } + return e; + }), + e + ); + })(), + l = (function () { + function e() {} + return ( + (e.Color3 = o.a.BuildArray(3, s.Black)), + (e.Color4 = o.a.BuildArray(3, function () { + return new c(0, 0, 0, 0); + })), + e + ); + })(); + (a.a.RegisteredTypes["BABYLON.Color3"] = s), (a.a.RegisteredTypes["BABYLON.Color4"] = c); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }), + n.d(t, "d", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }), + n.d(t, "c", function () { + return a; + }); + var i = (function () { + function e(e, t, n, i) { + void 0 === t && (t = !1), this.initalize(e, t, n, i); + } + return ( + (e.prototype.initalize = function (e, t, n, i) { + return void 0 === t && (t = !1), (this.mask = e), (this.skipNextObservers = t), (this.target = n), (this.currentTarget = i), this; + }), + e + ); + })(), + r = function (e, t, n) { + void 0 === n && (n = null), (this.callback = e), (this.mask = t), (this.scope = n), (this._willBeUnregistered = !1), (this.unregisterOnNextCall = !1); + }, + o = (function () { + function e() {} + return ( + (e.prototype.dispose = function () { + if (this._observers && this._observables) for (var e = 0; e < this._observers.length; e++) this._observables[e].remove(this._observers[e]); + (this._observers = null), (this._observables = null); + }), + (e.Watch = function (t, n, i, r) { + void 0 === i && (i = -1), void 0 === r && (r = null); + var o = new e(); + (o._observers = new Array()), (o._observables = t); + for (var a = 0, s = t; a < s.length; a++) { + var c = s[a].add(n, i, !1, r); + c && o._observers.push(c); + } + return o; + }), + e + ); + })(), + a = (function () { + function e(e) { + (this._observers = new Array()), (this._eventState = new i(0)), e && (this._onObserverAdded = e); + } + return ( + Object.defineProperty(e.prototype, "observers", { + get: function () { + return this._observers; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.add = function (e, t, n, i, o) { + if ((void 0 === t && (t = -1), void 0 === n && (n = !1), void 0 === i && (i = null), void 0 === o && (o = !1), !e)) return null; + var a = new r(e, t, i); + return (a.unregisterOnNextCall = o), n ? this._observers.unshift(a) : this._observers.push(a), this._onObserverAdded && this._onObserverAdded(a), a; + }), + (e.prototype.addOnce = function (e) { + return this.add(e, void 0, void 0, void 0, !0); + }), + (e.prototype.remove = function (e) { + return !!e && -1 !== this._observers.indexOf(e) && (this._deferUnregister(e), !0); + }), + (e.prototype.removeCallback = function (e, t) { + for (var n = 0; n < this._observers.length; n++) { + var i = this._observers[n]; + if (!i._willBeUnregistered && i.callback === e && (!t || t === i.scope)) return this._deferUnregister(i), !0; + } + return !1; + }), + (e.prototype._deferUnregister = function (e) { + var t = this; + (e.unregisterOnNextCall = !1), + (e._willBeUnregistered = !0), + setTimeout(function () { + t._remove(e); + }, 0); + }), + (e.prototype._remove = function (e) { + if (!e) return !1; + var t = this._observers.indexOf(e); + return -1 !== t && (this._observers.splice(t, 1), !0); + }), + (e.prototype.makeObserverTopPriority = function (e) { + this._remove(e), this._observers.unshift(e); + }), + (e.prototype.makeObserverBottomPriority = function (e) { + this._remove(e), this._observers.push(e); + }), + (e.prototype.notifyObservers = function (e, t, n, i) { + if ((void 0 === t && (t = -1), !this._observers.length)) return !0; + var r = this._eventState; + (r.mask = t), (r.target = n), (r.currentTarget = i), (r.skipNextObservers = !1), (r.lastReturnValue = e); + for (var o = 0, a = this._observers; o < a.length; o++) { + var s = a[o]; + if ( + !s._willBeUnregistered && + (s.mask & t && (s.scope ? (r.lastReturnValue = s.callback.apply(s.scope, [e, r])) : (r.lastReturnValue = s.callback(e, r)), s.unregisterOnNextCall && this._deferUnregister(s)), r.skipNextObservers) + ) + return !1; + } + return !0; + }), + (e.prototype.notifyObserversWithPromise = function (e, t, n, i) { + var r = this; + void 0 === t && (t = -1); + var o = Promise.resolve(e); + if (!this._observers.length) return o; + var a = this._eventState; + return ( + (a.mask = t), + (a.target = n), + (a.currentTarget = i), + (a.skipNextObservers = !1), + this._observers.forEach(function (n) { + a.skipNextObservers || + n._willBeUnregistered || + (n.mask & t && + ((o = n.scope + ? o.then(function (t) { + return (a.lastReturnValue = t), n.callback.apply(n.scope, [e, a]); + }) + : o.then(function (t) { + return (a.lastReturnValue = t), n.callback(e, a); + })), + n.unregisterOnNextCall && r._deferUnregister(n))); + }), + o.then(function () { + return e; + }) + ); + }), + (e.prototype.notifyObserver = function (e, t, n) { + void 0 === n && (n = -1); + var i = this._eventState; + (i.mask = n), (i.skipNextObservers = !1), e.callback(t, i); + }), + (e.prototype.hasObservers = function () { + return this._observers.length > 0; + }), + (e.prototype.clear = function () { + (this._observers = new Array()), (this._onObserverAdded = null); + }), + (e.prototype.clone = function () { + var t = new e(); + return (t._observers = this._observers.slice(0)), t; + }), + (e.prototype.hasSpecificMask = function (e) { + void 0 === e && (e = -1); + for (var t = 0, n = this._observers; t < n.length; t++) { + var i = n[t]; + if (i.mask & e || i.mask === e) return !0; + } + return !1; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(6), + r = n(56), + o = n(10), + a = n(170), + s = (function () { + function e(t, n, o, s, c, l, u, h, d, p) { + var f, + m, + g = this; + if ( + (void 0 === s && (s = null), + void 0 === l && (l = null), + void 0 === u && (u = null), + void 0 === h && (h = null), + void 0 === d && (d = null), + (this.name = null), + (this.defines = ""), + (this.onCompiled = null), + (this.onError = null), + (this.onBind = null), + (this.uniqueId = 0), + (this.onCompileObservable = new i.c()), + (this.onErrorObservable = new i.c()), + (this._onBindObservable = null), + (this._wasPreviouslyReady = !1), + (this._bonesComputationForcedToCPU = !1), + (this._uniformBuffersNames = {}), + (this._samplers = {}), + (this._isReady = !1), + (this._compilationError = ""), + (this._allFallbacksProcessed = !1), + (this._uniforms = {}), + (this._key = ""), + (this._fallbacks = null), + (this._vertexSourceCode = ""), + (this._fragmentSourceCode = ""), + (this._vertexSourceCodeOverride = ""), + (this._fragmentSourceCodeOverride = ""), + (this._transformFeedbackVaryings = null), + (this._pipelineContext = null), + (this._valueCache = {}), + (this.name = t), + n.attributes) + ) { + var b = n; + if ( + ((this._engine = o), + (this._attributesNames = b.attributes), + (this._uniformsNames = b.uniformsNames.concat(b.samplers)), + (this._samplerList = b.samplers.slice()), + (this.defines = b.defines), + (this.onError = b.onError), + (this.onCompiled = b.onCompiled), + (this._fallbacks = b.fallbacks), + (this._indexParameters = b.indexParameters), + (this._transformFeedbackVaryings = b.transformFeedbackVaryings || null), + b.uniformBuffersNames) + ) + for (var _ = 0; _ < b.uniformBuffersNames.length; _++) this._uniformBuffersNames[b.uniformBuffersNames[_]] = _; + } else + (this._engine = c), + (this.defines = null == l ? "" : l), + (this._uniformsNames = o.concat(s)), + (this._samplerList = s ? s.slice() : []), + (this._attributesNames = n), + (this.onError = d), + (this.onCompiled = h), + (this._indexParameters = p), + (this._fallbacks = u); + (this._attributeLocationByName = {}), (this.uniqueId = e._uniqueIdSeed++); + var v = r.a.IsWindowObjectExist() ? this._engine.getHostDocument() : null; + t.vertexSource ? (f = "source:" + t.vertexSource) : t.vertexElement ? (f = v ? v.getElementById(t.vertexElement) : null) || (f = t.vertexElement) : (f = t.vertex || t), + t.fragmentSource ? (m = "source:" + t.fragmentSource) : t.fragmentElement ? (m = v ? v.getElementById(t.fragmentElement) : null) || (m = t.fragmentElement) : (m = t.fragment || t); + var y = { + defines: this.defines.split("\n"), + indexParameters: this._indexParameters, + isFragment: !1, + shouldUseHighPrecisionShader: this._engine._shouldUseHighPrecisionShader, + processor: this._engine._shaderProcessor, + supportsUniformBuffers: this._engine.supportsUniformBuffers, + shadersRepository: e.ShadersRepository, + includesShadersStore: e.IncludesShadersStore, + version: (100 * this._engine.webGLVersion).toString(), + platformName: this._engine.webGLVersion >= 2 ? "WEBGL2" : "WEBGL1", + }; + this._loadShader(f, "Vertex", "", function (e) { + g._loadShader(m, "Fragment", "Pixel", function (n) { + a.a.Process(e, y, function (e) { + (y.isFragment = !0), + a.a.Process(n, y, function (n) { + g._useFinalCode(e, n, t); + }); + }); + }); + }); + } + return ( + Object.defineProperty(e.prototype, "onBindObservable", { + get: function () { + return this._onBindObservable || (this._onBindObservable = new i.c()), this._onBindObservable; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._useFinalCode = function (e, t, n) { + if (n) { + var i = n.vertexElement || n.vertex || n.spectorName || n, + r = n.fragmentElement || n.fragment || n.spectorName || n; + (this._vertexSourceCode = "#define SHADER_NAME vertex:" + i + "\n" + e), (this._fragmentSourceCode = "#define SHADER_NAME fragment:" + r + "\n" + t); + } else (this._vertexSourceCode = e), (this._fragmentSourceCode = t); + this._prepareEffect(); + }), + Object.defineProperty(e.prototype, "key", { + get: function () { + return this._key; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isReady = function () { + try { + return this._isReadyInternal(); + } catch (e) { + return !1; + } + }), + (e.prototype._isReadyInternal = function () { + return !!this._isReady || (!!this._pipelineContext && this._pipelineContext.isReady); + }), + (e.prototype.getEngine = function () { + return this._engine; + }), + (e.prototype.getPipelineContext = function () { + return this._pipelineContext; + }), + (e.prototype.getAttributesNames = function () { + return this._attributesNames; + }), + (e.prototype.getAttributeLocation = function (e) { + return this._attributes[e]; + }), + (e.prototype.getAttributeLocationByName = function (e) { + return this._attributeLocationByName[e]; + }), + (e.prototype.getAttributesCount = function () { + return this._attributes.length; + }), + (e.prototype.getUniformIndex = function (e) { + return this._uniformsNames.indexOf(e); + }), + (e.prototype.getUniform = function (e) { + return this._uniforms[e]; + }), + (e.prototype.getSamplers = function () { + return this._samplerList; + }), + (e.prototype.getCompilationError = function () { + return this._compilationError; + }), + (e.prototype.allFallbacksProcessed = function () { + return this._allFallbacksProcessed; + }), + (e.prototype.executeWhenCompiled = function (e) { + var t = this; + this.isReady() + ? e(this) + : (this.onCompileObservable.add(function (t) { + e(t); + }), + (this._pipelineContext && !this._pipelineContext.isAsync) || + setTimeout(function () { + t._checkIsReady(null); + }, 16)); + }), + (e.prototype._checkIsReady = function (e) { + var t = this; + try { + if (this._isReadyInternal()) return; + } catch (t) { + return void this._processCompilationErrors(t, e); + } + setTimeout(function () { + t._checkIsReady(e); + }, 16); + }), + (e.prototype._loadShader = function (t, n, i, o) { + var a; + if ("undefined" != typeof HTMLElement && t instanceof HTMLElement) return void o(r.a.GetDOMTextContent(t)); + "source:" !== t.substr(0, 7) + ? "base64:" !== t.substr(0, 7) + ? e.ShadersStore[t + n + "Shader"] + ? o(e.ShadersStore[t + n + "Shader"]) + : i && e.ShadersStore[t + i + "Shader"] + ? o(e.ShadersStore[t + i + "Shader"]) + : ((a = "." === t[0] || "/" === t[0] || t.indexOf("http") > -1 ? t : e.ShadersRepository + t), this._engine._loadFile(a + "." + n.toLowerCase() + ".fx", o)) + : o(window.atob(t.substr(7))) + : o(t.substr(7)); + }), + (e.prototype._rebuildProgram = function (e, t, n, i) { + var r = this; + (this._isReady = !1), + (this._vertexSourceCodeOverride = e), + (this._fragmentSourceCodeOverride = t), + (this.onError = function (e, t) { + i && i(t); + }), + (this.onCompiled = function () { + var e = r.getEngine().scenes; + if (e) for (var t = 0; t < e.length; t++) e[t].markAllMaterialsAsDirty(31); + r._pipelineContext._handlesSpectorRebuildCallback(n); + }), + (this._fallbacks = null), + this._prepareEffect(); + }), + (e.prototype._prepareEffect = function () { + var e = this, + t = this._attributesNames, + n = this.defines; + this._valueCache = {}; + var i = this._pipelineContext; + try { + var r = this._engine; + this._pipelineContext = r.createPipelineContext(); + var o = this._rebuildProgram.bind(this); + this._vertexSourceCodeOverride && this._fragmentSourceCodeOverride + ? r._preparePipelineContext(this._pipelineContext, this._vertexSourceCodeOverride, this._fragmentSourceCodeOverride, !0, o, null, this._transformFeedbackVaryings) + : r._preparePipelineContext(this._pipelineContext, this._vertexSourceCode, this._fragmentSourceCode, !1, o, n, this._transformFeedbackVaryings), + r._executeWhenRenderingStateIsCompiled(this._pipelineContext, function () { + if (r.supportsUniformBuffers) for (var n in e._uniformBuffersNames) e.bindUniformBlock(n, e._uniformBuffersNames[n]); + var o; + if ( + (r.getUniforms(e._pipelineContext, e._uniformsNames).forEach(function (t, n) { + e._uniforms[e._uniformsNames[n]] = t; + }), + (e._attributes = r.getAttributes(e._pipelineContext, t)), + t) + ) + for (var a = 0; a < t.length; a++) { + var s = t[a]; + e._attributeLocationByName[s] = e._attributes[a]; + } + for (o = 0; o < e._samplerList.length; o++) { + null == e.getUniform(e._samplerList[o]) && (e._samplerList.splice(o, 1), o--); + } + e._samplerList.forEach(function (t, n) { + e._samplers[t] = n; + }), + r.bindSamplers(e), + (e._compilationError = ""), + (e._isReady = !0), + e.onCompiled && e.onCompiled(e), + e.onCompileObservable.notifyObservers(e), + e.onCompileObservable.clear(), + e._fallbacks && e._fallbacks.unBindMesh(), + i && e.getEngine()._deletePipelineContext(i); + }), + this._pipelineContext.isAsync && this._checkIsReady(i); + } catch (e) { + this._processCompilationErrors(e, i); + } + }), + (e.prototype._processCompilationErrors = function (e, t) { + void 0 === t && (t = null), (this._compilationError = e.message); + var n = this._attributesNames, + i = this._fallbacks; + o.a.Error("Unable to compile effect:"), + o.a.Error( + "Uniforms: " + + this._uniformsNames.map(function (e) { + return " " + e; + }) + ), + o.a.Error( + "Attributes: " + + n.map(function (e) { + return " " + e; + }) + ), + o.a.Error("Defines:\r\n" + this.defines), + o.a.Error("Error: " + this._compilationError), + t && ((this._pipelineContext = t), (this._isReady = !0), this.onError && this.onError(this, this._compilationError), this.onErrorObservable.notifyObservers(this)), + i + ? ((this._pipelineContext = null), + i.hasMoreFallbacks + ? ((this._allFallbacksProcessed = !1), o.a.Error("Trying next fallback."), (this.defines = i.reduce(this.defines, this)), this._prepareEffect()) + : ((this._allFallbacksProcessed = !0), + this.onError && this.onError(this, this._compilationError), + this.onErrorObservable.notifyObservers(this), + this.onErrorObservable.clear(), + this._fallbacks && this._fallbacks.unBindMesh())) + : (this._allFallbacksProcessed = !0); + }), + Object.defineProperty(e.prototype, "isSupported", { + get: function () { + return "" === this._compilationError; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._bindTexture = function (e, t) { + this._engine._bindTexture(this._samplers[e], t); + }), + (e.prototype.setTexture = function (e, t) { + this._engine.setTexture(this._samplers[e], this._uniforms[e], t); + }), + (e.prototype.setDepthStencilTexture = function (e, t) { + this._engine.setDepthStencilTexture(this._samplers[e], this._uniforms[e], t); + }), + (e.prototype.setTextureArray = function (e, t) { + var n = e + "Ex"; + if (-1 === this._samplerList.indexOf(n + "0")) { + for (var i = this._samplerList.indexOf(e), r = 1; r < t.length; r++) { + var o = n + (r - 1).toString(); + this._samplerList.splice(i + r, 0, o); + } + for (var a = 0, s = 0, c = this._samplerList; s < c.length; s++) { + var l = c[s]; + (this._samplers[l] = a), (a += 1); + } + } + this._engine.setTextureArray(this._samplers[e], this._uniforms[e], t); + }), + (e.prototype.setTextureFromPostProcess = function (e, t) { + this._engine.setTextureFromPostProcess(this._samplers[e], t); + }), + (e.prototype.setTextureFromPostProcessOutput = function (e, t) { + this._engine.setTextureFromPostProcessOutput(this._samplers[e], t); + }), + (e.prototype._cacheMatrix = function (e, t) { + var n = this._valueCache[e], + i = t.updateFlag; + return (void 0 === n || n !== i) && ((this._valueCache[e] = i), !0); + }), + (e.prototype._cacheFloat2 = function (e, t, n) { + var i = this._valueCache[e]; + if (!i || 2 !== i.length) return (i = [t, n]), (this._valueCache[e] = i), !0; + var r = !1; + return i[0] !== t && ((i[0] = t), (r = !0)), i[1] !== n && ((i[1] = n), (r = !0)), r; + }), + (e.prototype._cacheFloat3 = function (e, t, n, i) { + var r = this._valueCache[e]; + if (!r || 3 !== r.length) return (r = [t, n, i]), (this._valueCache[e] = r), !0; + var o = !1; + return r[0] !== t && ((r[0] = t), (o = !0)), r[1] !== n && ((r[1] = n), (o = !0)), r[2] !== i && ((r[2] = i), (o = !0)), o; + }), + (e.prototype._cacheFloat4 = function (e, t, n, i, r) { + var o = this._valueCache[e]; + if (!o || 4 !== o.length) return (o = [t, n, i, r]), (this._valueCache[e] = o), !0; + var a = !1; + return o[0] !== t && ((o[0] = t), (a = !0)), o[1] !== n && ((o[1] = n), (a = !0)), o[2] !== i && ((o[2] = i), (a = !0)), o[3] !== r && ((o[3] = r), (a = !0)), a; + }), + (e.prototype.bindUniformBuffer = function (t, n) { + var i = this._uniformBuffersNames[n]; + void 0 !== i && e._baseCache[i] !== t && ((e._baseCache[i] = t), this._engine.bindUniformBufferBase(t, i)); + }), + (e.prototype.bindUniformBlock = function (e, t) { + this._engine.bindUniformBlock(this._pipelineContext, e, t); + }), + (e.prototype.setInt = function (e, t) { + var n = this._valueCache[e]; + return (void 0 !== n && n === t) || ((this._valueCache[e] = t), this._engine.setInt(this._uniforms[e], t)), this; + }), + (e.prototype.setIntArray = function (e, t) { + return (this._valueCache[e] = null), this._engine.setIntArray(this._uniforms[e], t), this; + }), + (e.prototype.setIntArray2 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setIntArray2(this._uniforms[e], t), this; + }), + (e.prototype.setIntArray3 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setIntArray3(this._uniforms[e], t), this; + }), + (e.prototype.setIntArray4 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setIntArray4(this._uniforms[e], t), this; + }), + (e.prototype.setFloatArray = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray(this._uniforms[e], t), this; + }), + (e.prototype.setFloatArray2 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray2(this._uniforms[e], t), this; + }), + (e.prototype.setFloatArray3 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray3(this._uniforms[e], t), this; + }), + (e.prototype.setFloatArray4 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray4(this._uniforms[e], t), this; + }), + (e.prototype.setArray = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray(this._uniforms[e], t), this; + }), + (e.prototype.setArray2 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray2(this._uniforms[e], t), this; + }), + (e.prototype.setArray3 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray3(this._uniforms[e], t), this; + }), + (e.prototype.setArray4 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setArray4(this._uniforms[e], t), this; + }), + (e.prototype.setMatrices = function (e, t) { + return t ? ((this._valueCache[e] = null), this._engine.setMatrices(this._uniforms[e], t), this) : this; + }), + (e.prototype.setMatrix = function (e, t) { + return this._cacheMatrix(e, t) && this._engine.setMatrices(this._uniforms[e], t.toArray()), this; + }), + (e.prototype.setMatrix3x3 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setMatrix3x3(this._uniforms[e], t), this; + }), + (e.prototype.setMatrix2x2 = function (e, t) { + return (this._valueCache[e] = null), this._engine.setMatrix2x2(this._uniforms[e], t), this; + }), + (e.prototype.setFloat = function (e, t) { + var n = this._valueCache[e]; + return (void 0 !== n && n === t) || ((this._valueCache[e] = t), this._engine.setFloat(this._uniforms[e], t)), this; + }), + (e.prototype.setBool = function (e, t) { + var n = this._valueCache[e]; + return (void 0 !== n && n === t) || ((this._valueCache[e] = t), this._engine.setInt(this._uniforms[e], t ? 1 : 0)), this; + }), + (e.prototype.setVector2 = function (e, t) { + return this._cacheFloat2(e, t.x, t.y) && this._engine.setFloat2(this._uniforms[e], t.x, t.y), this; + }), + (e.prototype.setFloat2 = function (e, t, n) { + return this._cacheFloat2(e, t, n) && this._engine.setFloat2(this._uniforms[e], t, n), this; + }), + (e.prototype.setVector3 = function (e, t) { + return this._cacheFloat3(e, t.x, t.y, t.z) && this._engine.setFloat3(this._uniforms[e], t.x, t.y, t.z), this; + }), + (e.prototype.setFloat3 = function (e, t, n, i) { + return this._cacheFloat3(e, t, n, i) && this._engine.setFloat3(this._uniforms[e], t, n, i), this; + }), + (e.prototype.setVector4 = function (e, t) { + return this._cacheFloat4(e, t.x, t.y, t.z, t.w) && this._engine.setFloat4(this._uniforms[e], t.x, t.y, t.z, t.w), this; + }), + (e.prototype.setFloat4 = function (e, t, n, i, r) { + return this._cacheFloat4(e, t, n, i, r) && this._engine.setFloat4(this._uniforms[e], t, n, i, r), this; + }), + (e.prototype.setColor3 = function (e, t) { + return this._cacheFloat3(e, t.r, t.g, t.b) && this._engine.setFloat3(this._uniforms[e], t.r, t.g, t.b), this; + }), + (e.prototype.setColor4 = function (e, t, n) { + return this._cacheFloat4(e, t.r, t.g, t.b, n) && this._engine.setFloat4(this._uniforms[e], t.r, t.g, t.b, n), this; + }), + (e.prototype.setDirectColor4 = function (e, t) { + return this._cacheFloat4(e, t.r, t.g, t.b, t.a) && this._engine.setFloat4(this._uniforms[e], t.r, t.g, t.b, t.a), this; + }), + (e.prototype.dispose = function () { + this._engine._releaseEffect(this); + }), + (e.RegisterShader = function (t, n, i) { + n && (e.ShadersStore[t + "PixelShader"] = n), i && (e.ShadersStore[t + "VertexShader"] = i); + }), + (e.ResetCache = function () { + e._baseCache = {}; + }), + (e.ShadersRepository = "src/Shaders/"), + (e._uniqueIdSeed = 0), + (e._baseCache = {}), + (e.ShadersStore = {}), + (e.IncludesShadersStore = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return f; + }); + var i = n(2), + r = n(3), + o = n(6), + a = n(1), + s = n(68), + c = n(13), + l = n(22), + u = n(169), + h = n(164), + d = n(85), + p = n(53), + f = (function (e) { + function t(n, i, r, a, s, c, l, h, d, p, f) { + void 0 === r && (r = !1), void 0 === a && (a = !0), void 0 === s && (s = t.TRILINEAR_SAMPLINGMODE), void 0 === c && (c = null), void 0 === l && (l = null), void 0 === h && (h = null), void 0 === d && (d = !1); + var m = e.call(this, i && "Scene" === i.getClassName() ? i : null) || this; + (m.url = null), + (m.uOffset = 0), + (m.vOffset = 0), + (m.uScale = 1), + (m.vScale = 1), + (m.uAng = 0), + (m.vAng = 0), + (m.wAng = 0), + (m.uRotationCenter = 0.5), + (m.vRotationCenter = 0.5), + (m.wRotationCenter = 0.5), + (m.inspectableCustomProperties = null), + (m._noMipmap = !1), + (m._invertY = !1), + (m._rowGenerationMatrix = null), + (m._cachedTextureMatrix = null), + (m._projectionModeMatrix = null), + (m._t0 = null), + (m._t1 = null), + (m._t2 = null), + (m._cachedUOffset = -1), + (m._cachedVOffset = -1), + (m._cachedUScale = 0), + (m._cachedVScale = 0), + (m._cachedUAng = -1), + (m._cachedVAng = -1), + (m._cachedWAng = -1), + (m._cachedProjectionMatrixId = -1), + (m._cachedCoordinatesMode = -1), + (m._initialSamplingMode = t.BILINEAR_SAMPLINGMODE), + (m._buffer = null), + (m._deleteBuffer = !1), + (m._format = null), + (m._delayedOnLoad = null), + (m._delayedOnError = null), + (m.onLoadObservable = new o.c()), + (m._isBlocking = !0), + (m.name = n || ""), + (m.url = n), + (m._noMipmap = r), + (m._invertY = a), + (m._initialSamplingMode = s), + (m._buffer = h), + (m._deleteBuffer = d), + (m._mimeType = f), + p && (m._format = p); + var g = m.getScene(), + b = i && i.getCaps ? i : g ? g.getEngine() : null; + if (!b) return m; + b.onBeforeTextureInitObservable.notifyObservers(m); + var _ = function () { + m._texture && + (m._texture._invertVScale && ((m.vScale *= -1), (m.vOffset += 1)), + null !== m._texture._cachedWrapU && ((m.wrapU = m._texture._cachedWrapU), (m._texture._cachedWrapU = null)), + null !== m._texture._cachedWrapV && ((m.wrapV = m._texture._cachedWrapV), (m._texture._cachedWrapV = null)), + null !== m._texture._cachedWrapR && ((m.wrapR = m._texture._cachedWrapR), (m._texture._cachedWrapR = null))), + m.onLoadObservable.hasObservers() && m.onLoadObservable.notifyObservers(m), + c && c(), + !m.isBlocking && g && g.resetCachedMaterial(); + }; + return m.url + ? ((m._texture = m._getFromCache(m.url, r, s, a)), + m._texture + ? m._texture.isReady + ? u.a.SetImmediate(function () { + return _(); + }) + : m._texture.onLoadedObservable.add(_) + : g && g.useDelayedTextureLoading + ? ((m.delayLoadState = 4), (m._delayedOnLoad = _), (m._delayedOnError = l)) + : ((m._texture = b.createTexture(m.url, r, a, g, s, _, l, m._buffer, void 0, m._format, null, f)), d && delete m._buffer), + m) + : ((m._delayedOnLoad = _), (m._delayedOnError = l), m); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "noMipmap", { + get: function () { + return this._noMipmap; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isBlocking", { + get: function () { + return this._isBlocking; + }, + set: function (e) { + this._isBlocking = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "samplingMode", { + get: function () { + return this._texture ? this._texture.samplingMode : this._initialSamplingMode; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "invertY", { + get: function () { + return this._invertY; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.updateURL = function (e, t, n) { + void 0 === t && (t = null), + this.url && (this.releaseInternalTexture(), this.getScene().markAllMaterialsAsDirty(1)), + (this.name && !p.a.StartsWith(this.name, "data:")) || (this.name = e), + (this.url = e), + (this._buffer = t), + (this.delayLoadState = 4), + n && (this._delayedOnLoad = n), + this.delayLoad(); + }), + (t.prototype.delayLoad = function () { + if (4 === this.delayLoadState) { + var e = this.getScene(); + e && + ((this.delayLoadState = 1), + (this._texture = this._getFromCache(this.url, this._noMipmap, this.samplingMode, this._invertY)), + this._texture + ? this._delayedOnLoad && (this._texture.isReady ? u.a.SetImmediate(this._delayedOnLoad) : this._texture.onLoadedObservable.add(this._delayedOnLoad)) + : ((this._texture = e + .getEngine() + .createTexture(this.url, this._noMipmap, this._invertY, e, this.samplingMode, this._delayedOnLoad, this._delayedOnError, this._buffer, null, this._format, null, this._mimeType)), + this._deleteBuffer && delete this._buffer), + (this._delayedOnLoad = null), + (this._delayedOnError = null)); + } + }), + (t.prototype._prepareRowForTextureGeneration = function (e, t, n, i) { + (e *= this._cachedUScale), + (t *= this._cachedVScale), + (e -= this.uRotationCenter * this._cachedUScale), + (t -= this.vRotationCenter * this._cachedVScale), + (n -= this.wRotationCenter), + a.e.TransformCoordinatesFromFloatsToRef(e, t, n, this._rowGenerationMatrix, i), + (i.x += this.uRotationCenter * this._cachedUScale + this._cachedUOffset), + (i.y += this.vRotationCenter * this._cachedVScale + this._cachedVOffset), + (i.z += this.wRotationCenter); + }), + (t.prototype.getTextureMatrix = function (e) { + var t = this; + if ( + (void 0 === e && (e = 1), + this.uOffset === this._cachedUOffset && + this.vOffset === this._cachedVOffset && + this.uScale * e === this._cachedUScale && + this.vScale === this._cachedVScale && + this.uAng === this._cachedUAng && + this.vAng === this._cachedVAng && + this.wAng === this._cachedWAng) + ) + return this._cachedTextureMatrix; + (this._cachedUOffset = this.uOffset), + (this._cachedVOffset = this.vOffset), + (this._cachedUScale = this.uScale * e), + (this._cachedVScale = this.vScale), + (this._cachedUAng = this.uAng), + (this._cachedVAng = this.vAng), + (this._cachedWAng = this.wAng), + this._cachedTextureMatrix || ((this._cachedTextureMatrix = a.a.Zero()), (this._rowGenerationMatrix = new a.a()), (this._t0 = a.e.Zero()), (this._t1 = a.e.Zero()), (this._t2 = a.e.Zero())), + a.a.RotationYawPitchRollToRef(this.vAng, this.uAng, this.wAng, this._rowGenerationMatrix), + this._prepareRowForTextureGeneration(0, 0, 0, this._t0), + this._prepareRowForTextureGeneration(1, 0, 0, this._t1), + this._prepareRowForTextureGeneration(0, 1, 0, this._t2), + this._t1.subtractInPlace(this._t0), + this._t2.subtractInPlace(this._t0), + a.a.FromValuesToRef(this._t1.x, this._t1.y, this._t1.z, 0, this._t2.x, this._t2.y, this._t2.z, 0, this._t0.x, this._t0.y, this._t0.z, 0, 0, 0, 0, 1, this._cachedTextureMatrix); + var n = this.getScene(); + return n + ? (n.markAllMaterialsAsDirty(1, function (e) { + return e.hasTexture(t); + }), + this._cachedTextureMatrix) + : this._cachedTextureMatrix; + }), + (t.prototype.getReflectionTextureMatrix = function () { + var e = this, + n = this.getScene(); + if (!n) return this._cachedTextureMatrix; + if (this.uOffset === this._cachedUOffset && this.vOffset === this._cachedVOffset && this.uScale === this._cachedUScale && this.vScale === this._cachedVScale && this.coordinatesMode === this._cachedCoordinatesMode) { + if (this.coordinatesMode !== t.PROJECTION_MODE) return this._cachedTextureMatrix; + if (this._cachedProjectionMatrixId === n.getProjectionMatrix().updateFlag) return this._cachedTextureMatrix; + } + switch ( + (this._cachedTextureMatrix || (this._cachedTextureMatrix = a.a.Zero()), + this._projectionModeMatrix || (this._projectionModeMatrix = a.a.Zero()), + (this._cachedUOffset = this.uOffset), + (this._cachedVOffset = this.vOffset), + (this._cachedUScale = this.uScale), + (this._cachedVScale = this.vScale), + (this._cachedCoordinatesMode = this.coordinatesMode), + this.coordinatesMode) + ) { + case t.PLANAR_MODE: + a.a.IdentityToRef(this._cachedTextureMatrix), + (this._cachedTextureMatrix[0] = this.uScale), + (this._cachedTextureMatrix[5] = this.vScale), + (this._cachedTextureMatrix[12] = this.uOffset), + (this._cachedTextureMatrix[13] = this.vOffset); + break; + case t.PROJECTION_MODE: + a.a.FromValuesToRef(0.5, 0, 0, 0, 0, -0.5, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 1, 1, this._projectionModeMatrix); + var i = n.getProjectionMatrix(); + (this._cachedProjectionMatrixId = i.updateFlag), i.multiplyToRef(this._projectionModeMatrix, this._cachedTextureMatrix); + break; + default: + a.a.IdentityToRef(this._cachedTextureMatrix); + } + return ( + n.markAllMaterialsAsDirty(1, function (t) { + return -1 !== t.getActiveTextures().indexOf(e); + }), + this._cachedTextureMatrix + ); + }), + (t.prototype.clone = function () { + var e = this; + return r.a.Clone(function () { + return new t(e._texture ? e._texture.url : null, e.getScene(), e._noMipmap, e._invertY, e.samplingMode, void 0, void 0, e._texture ? e._texture._buffer : void 0); + }, this); + }), + (t.prototype.serialize = function () { + var n = this.name; + t.SerializeBuffers || (p.a.StartsWith(this.name, "data:") && (this.name = "")); + var i = e.prototype.serialize.call(this); + return i + ? (t.SerializeBuffers && + ("string" == typeof this._buffer && "data:" === this._buffer.substr(0, 5) + ? ((i.base64String = this._buffer), (i.name = i.name.replace("data:", ""))) + : this.url && p.a.StartsWith(this.url, "data:") && this._buffer instanceof Uint8Array && (i.base64String = "data:image/png;base64," + p.a.EncodeArrayBufferToBase64(this._buffer))), + (i.invertY = this._invertY), + (i.samplingMode = this.samplingMode), + (this.name = n), + i) + : null; + }), + (t.prototype.getClassName = function () { + return "Texture"; + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onLoadObservable.clear(), (this._delayedOnLoad = null), (this._delayedOnError = null); + }), + (t.Parse = function (e, n, i) { + if (e.customType) { + var o = h.a.Instantiate(e.customType).Parse(e, n, i); + return e.samplingMode && o.updateSamplingMode && o._samplingMode && o._samplingMode !== e.samplingMode && o.updateSamplingMode(e.samplingMode), o; + } + if (e.isCube && !e.isRenderTarget) return t._CubeTextureParser(e, n, i); + if (!e.name && !e.isRenderTarget) return null; + var a = r.a.Parse( + function () { + var r, + o = !0; + if ((e.noMipmap && (o = !1), e.mirrorPlane)) { + var a = t._CreateMirror(e.name, e.renderTargetSize, n, o); + return (a._waitingRenderList = e.renderList), (a.mirrorPlane = d.a.FromArray(e.mirrorPlane)), a; + } + if (e.isRenderTarget) { + var s = null; + if (e.isCube) { + if (n.reflectionProbes) + for (var c = 0; c < n.reflectionProbes.length; c++) { + var l = n.reflectionProbes[c]; + if (l.name === e.name) return l.cubeTexture; + } + } else (s = t._CreateRenderTargetTexture(e.name, e.renderTargetSize, n, o))._waitingRenderList = e.renderList; + return s; + } + if (e.base64String) r = t.CreateFromBase64String(e.base64String, e.name, n, !o, e.invertY); + else { + var u = i + e.name; + t.UseSerializedUrlIfAny && e.url && (u = e.url), (r = new t(u, n, !o, e.invertY)); + } + return r; + }, + e, + n + ); + if ((a && a._texture && ((a._texture._cachedWrapU = null), (a._texture._cachedWrapV = null), (a._texture._cachedWrapR = null)), e.samplingMode)) { + var s = e.samplingMode; + a && a.samplingMode !== s && a.updateSamplingMode(s); + } + if (a && e.animations) + for (var l = 0; l < e.animations.length; l++) { + var u = e.animations[l], + p = c.a.GetClass("BABYLON.Animation"); + p && a.animations.push(p.Parse(u)); + } + return a; + }), + (t.CreateFromBase64String = function (e, n, i, r, o, a, s, c, l) { + return void 0 === a && (a = t.TRILINEAR_SAMPLINGMODE), void 0 === s && (s = null), void 0 === c && (c = null), void 0 === l && (l = 5), new t("data:" + n, i, r, o, a, s, c, e, !1, l); + }), + (t.LoadFromDataString = function (e, n, i, r, o, a, s, c, l, u) { + return ( + void 0 === r && (r = !1), + void 0 === o && (o = !1), + void 0 === a && (a = !0), + void 0 === s && (s = t.TRILINEAR_SAMPLINGMODE), + void 0 === c && (c = null), + void 0 === l && (l = null), + void 0 === u && (u = 5), + "data:" !== e.substr(0, 5) && (e = "data:" + e), + new t(e, i, o, a, s, c, l, n, r, u) + ); + }), + (t.SerializeBuffers = !0), + (t._CubeTextureParser = function (e, t, n) { + throw l.a.WarnImport("CubeTexture"); + }), + (t._CreateMirror = function (e, t, n, i) { + throw l.a.WarnImport("MirrorTexture"); + }), + (t._CreateRenderTargetTexture = function (e, t, n, i) { + throw l.a.WarnImport("RenderTargetTexture"); + }), + (t.NEAREST_SAMPLINGMODE = 1), + (t.NEAREST_NEAREST_MIPLINEAR = 8), + (t.BILINEAR_SAMPLINGMODE = 2), + (t.LINEAR_LINEAR_MIPNEAREST = 11), + (t.TRILINEAR_SAMPLINGMODE = 3), + (t.LINEAR_LINEAR_MIPLINEAR = 3), + (t.NEAREST_NEAREST_MIPNEAREST = 4), + (t.NEAREST_LINEAR_MIPNEAREST = 5), + (t.NEAREST_LINEAR_MIPLINEAR = 6), + (t.NEAREST_LINEAR = 7), + (t.NEAREST_NEAREST = 1), + (t.LINEAR_NEAREST_MIPNEAREST = 9), + (t.LINEAR_NEAREST_MIPLINEAR = 10), + (t.LINEAR_LINEAR = 2), + (t.LINEAR_NEAREST = 12), + (t.EXPLICIT_MODE = 0), + (t.SPHERICAL_MODE = 1), + (t.PLANAR_MODE = 2), + (t.CUBIC_MODE = 3), + (t.PROJECTION_MODE = 4), + (t.SKYBOX_MODE = 5), + (t.INVCUBIC_MODE = 6), + (t.EQUIRECTANGULAR_MODE = 7), + (t.FIXED_EQUIRECTANGULAR_MODE = 8), + (t.FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9), + (t.CLAMP_ADDRESSMODE = 0), + (t.WRAP_ADDRESSMODE = 1), + (t.MIRROR_ADDRESSMODE = 2), + (t.UseSerializedUrlIfAny = !1), + Object(i.c)([Object(r.c)()], t.prototype, "url", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "uOffset", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "vOffset", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "uScale", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "vScale", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "uAng", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "vAng", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "wAng", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "uRotationCenter", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "vRotationCenter", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "wRotationCenter", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "isBlocking", null), + t + ); + })(s.a); + r.a._TextureParser = f.Parse; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return E; + }), + n.d(t, "c", function () { + return A; + }), + n.d(t, "a", function () { + return D; + }); + var i = n(2), + r = n(6), + o = n(12), + a = n(51), + s = n(45), + c = n(1), + l = n(5), + u = n(35), + h = n(4), + d = n(16), + p = n(79), + f = n(31), + m = n(78), + g = n(63), + b = n(28), + _ = n(94), + v = n(103), + y = n(3), + C = n(10), + P = n(13), + x = n(22), + T = n(21), + S = n(191), + O = n(112), + E = function () {}, + M = function () { + (this.visibleInstances = {}), (this.batchCache = new A()), (this.instancesBufferSize = 2048); + }, + A = function () { + (this.mustReturn = !1), (this.visibleInstances = new Array()), (this.renderSelf = new Array()), (this.hardwareInstancedRendering = new Array()); + }, + I = function () { + (this._areNormalsFrozen = !1), (this._source = null), (this.meshMap = null), (this._preActivateId = -1), (this._LODLevels = new Array()), (this._morphTargetManager = null); + }, + D = (function (e) { + function t(n, i, r, o, c, l) { + void 0 === i && (i = null), void 0 === r && (r = null), void 0 === o && (o = null), void 0 === l && (l = !0); + var u = e.call(this, n, i) || this; + if ( + ((u._internalMeshDataInfo = new I()), + (u.delayLoadState = 0), + (u.instances = new Array()), + (u._creationDataStorage = null), + (u._geometry = null), + (u._instanceDataStorage = new M()), + (u._effectiveMaterial = null), + (u._shouldGenerateFlatShading = !1), + (u._originalBuilderSideOrientation = t.DEFAULTSIDE), + (u.overrideMaterialSideOrientation = null), + (i = u.getScene()), + o) + ) { + if ( + (o._geometry && o._geometry.applyToMesh(u), + a.a.DeepCopy( + o, + u, + [ + "name", + "material", + "skeleton", + "instances", + "parent", + "uniqueId", + "source", + "metadata", + "hasLODLevels", + "geometry", + "isBlocked", + "areNormalsFrozen", + "onBeforeDrawObservable", + "onBeforeRenderObservable", + "onAfterRenderObservable", + "onBeforeDraw", + "onAfterWorldMatrixUpdateObservable", + "onCollideObservable", + "onCollisionPositionChangeObservable", + "onRebuildObservable", + "onDisposeObservable", + "lightSources", + "morphTargetManager", + ], + ["_poseMatrix"] + ), + (u._internalMeshDataInfo._source = o), + i.useClonedMeshMap && (o._internalMeshDataInfo.meshMap || (o._internalMeshDataInfo.meshMap = {}), (o._internalMeshDataInfo.meshMap[u.uniqueId] = u)), + (u._originalBuilderSideOrientation = o._originalBuilderSideOrientation), + (u._creationDataStorage = o._creationDataStorage), + o._ranges) + ) { + var h = o._ranges; + for (var n in h) h.hasOwnProperty(n) && h[n] && u.createAnimationRange(n, h[n].from, h[n].to); + } + var d; + if ( + (o.metadata && o.metadata.clone ? (u.metadata = o.metadata.clone()) : (u.metadata = o.metadata), + s.a && s.a.HasTags(o) && s.a.AddTagsTo(u, s.a.GetTags(o, !0)), + (u.parent = o.parent), + u.setPivotMatrix(o.getPivotMatrix()), + (u.id = n + "." + o.id), + (u.material = o.material), + !c) + ) + for (var p = o.getDescendants(!0), f = 0; f < p.length; f++) { + var m = p[f]; + m.clone && m.clone(n + "." + m.name, u); + } + if ((o.morphTargetManager && (u.morphTargetManager = o.morphTargetManager), i.getPhysicsEngine)) { + var g = i.getPhysicsEngine(); + if (l && g) { + var b = g.getImpostorForPhysicsObject(o); + b && (u.physicsImpostor = b.clone(u)); + } + } + for (d = 0; d < i.particleSystems.length; d++) { + var _ = i.particleSystems[d]; + _.emitter === o && _.clone(_.name, u); + } + u.refreshBoundingInfo(), u.computeWorldMatrix(!0); + } + return null !== r && (u.parent = r), (u._instanceDataStorage.hardwareInstancedRendering = u.getEngine().getCaps().instancedArrays), u; + } + return ( + Object(i.d)(t, e), + (t._GetDefaultSideOrientation = function (e) { + return e || t.FRONTSIDE; + }), + Object.defineProperty(t.prototype, "onBeforeRenderObservable", { + get: function () { + return this._internalMeshDataInfo._onBeforeRenderObservable || (this._internalMeshDataInfo._onBeforeRenderObservable = new r.c()), this._internalMeshDataInfo._onBeforeRenderObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onBeforeBindObservable", { + get: function () { + return this._internalMeshDataInfo._onBeforeBindObservable || (this._internalMeshDataInfo._onBeforeBindObservable = new r.c()), this._internalMeshDataInfo._onBeforeBindObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onAfterRenderObservable", { + get: function () { + return this._internalMeshDataInfo._onAfterRenderObservable || (this._internalMeshDataInfo._onAfterRenderObservable = new r.c()), this._internalMeshDataInfo._onAfterRenderObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onBeforeDrawObservable", { + get: function () { + return this._internalMeshDataInfo._onBeforeDrawObservable || (this._internalMeshDataInfo._onBeforeDrawObservable = new r.c()), this._internalMeshDataInfo._onBeforeDrawObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onBeforeDraw", { + set: function (e) { + this._onBeforeDrawObserver && this.onBeforeDrawObservable.remove(this._onBeforeDrawObserver), (this._onBeforeDrawObserver = this.onBeforeDrawObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasInstances", { + get: function () { + return this.instances.length > 0; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "morphTargetManager", { + get: function () { + return this._internalMeshDataInfo._morphTargetManager; + }, + set: function (e) { + this._internalMeshDataInfo._morphTargetManager !== e && ((this._internalMeshDataInfo._morphTargetManager = e), this._syncGeometryWithMorphTargetManager()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "source", { + get: function () { + return this._internalMeshDataInfo._source; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isUnIndexed", { + get: function () { + return this._unIndexed; + }, + set: function (e) { + this._unIndexed !== e && ((this._unIndexed = e), this._markSubMeshesAsAttributesDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldMatrixInstancedBuffer", { + get: function () { + return this._instanceDataStorage.instancesData; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "manualUpdateOfWorldMatrixInstancedBuffer", { + get: function () { + return this._instanceDataStorage.manualUpdate; + }, + set: function (e) { + this._instanceDataStorage.manualUpdate = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.instantiateHierarchy = function (e, t, n) { + void 0 === e && (e = null); + var i = !(this.getTotalVertices() > 0) || (t && t.doNotInstantiate) ? this.clone("Clone of " + (this.name || this.id), e || this.parent, !0) : this.createInstance("instance of " + (this.name || this.id)); + i && + ((i.parent = e || this.parent), + (i.position = this.position.clone()), + (i.scaling = this.scaling.clone()), + this.rotationQuaternion ? (i.rotationQuaternion = this.rotationQuaternion.clone()) : (i.rotation = this.rotation.clone()), + n && n(this, i)); + for (var r = 0, o = this.getChildTransformNodes(!0); r < o.length; r++) { + o[r].instantiateHierarchy(i, t, n); + } + return i; + }), + (t.prototype.getClassName = function () { + return "Mesh"; + }), + Object.defineProperty(t.prototype, "_isMesh", { + get: function () { + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.toString = function (t) { + var n = e.prototype.toString.call(this, t); + if (((n += ", n vertices: " + this.getTotalVertices()), (n += ", parent: " + (this._waitingParentId ? this._waitingParentId : this.parent ? this.parent.name : "NONE")), this.animations)) + for (var i = 0; i < this.animations.length; i++) n += ", animation[0]: " + this.animations[i].toString(t); + if (t) + if (this._geometry) { + var r = this.getIndices(), + o = this.getVerticesData(h.b.PositionKind); + o && r && (n += ", flat shading: " + (o.length / 3 === r.length ? "YES" : "NO")); + } else n += ", flat shading: UNKNOWN"; + return n; + }), + (t.prototype._unBindEffect = function () { + e.prototype._unBindEffect.call(this); + for (var t = 0, n = this.instances; t < n.length; t++) { + n[t]._unBindEffect(); + } + }), + Object.defineProperty(t.prototype, "hasLODLevels", { + get: function () { + return this._internalMeshDataInfo._LODLevels.length > 0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getLODLevels = function () { + return this._internalMeshDataInfo._LODLevels; + }), + (t.prototype._sortLODLevels = function () { + this._internalMeshDataInfo._LODLevels.sort(function (e, t) { + return e.distance < t.distance ? 1 : e.distance > t.distance ? -1 : 0; + }); + }), + (t.prototype.addLODLevel = function (e, t) { + if (t && t._masterMesh) return C.a.Warn("You cannot use a mesh as LOD level twice"), this; + var n = new S.a(e, t); + return this._internalMeshDataInfo._LODLevels.push(n), t && (t._masterMesh = this), this._sortLODLevels(), this; + }), + (t.prototype.getLODLevelAtDistance = function (e) { + for (var t = this._internalMeshDataInfo, n = 0; n < t._LODLevels.length; n++) { + var i = t._LODLevels[n]; + if (i.distance === e) return i.mesh; + } + return null; + }), + (t.prototype.removeLODLevel = function (e) { + for (var t = this._internalMeshDataInfo, n = 0; n < t._LODLevels.length; n++) t._LODLevels[n].mesh === e && (t._LODLevels.splice(n, 1), e && (e._masterMesh = null)); + return this._sortLODLevels(), this; + }), + (t.prototype.getLOD = function (e, t) { + var n, + i = this._internalMeshDataInfo; + if (!i._LODLevels || 0 === i._LODLevels.length) return this; + t ? (n = t) : (n = this.getBoundingInfo().boundingSphere); + var r = n.centerWorld.subtract(e.globalPosition).length(); + if (i._LODLevels[i._LODLevels.length - 1].distance > r) return this.onLODLevelSelection && this.onLODLevelSelection(r, this, this), this; + for (var o = 0; o < i._LODLevels.length; o++) { + var a = i._LODLevels[o]; + if (a.distance < r) return a.mesh && (a.mesh._preActivate(), a.mesh._updateSubMeshesBoundingInfo(this.worldMatrixFromCache)), this.onLODLevelSelection && this.onLODLevelSelection(r, this, a.mesh), a.mesh; + } + return this.onLODLevelSelection && this.onLODLevelSelection(r, this, this), this; + }), + Object.defineProperty(t.prototype, "geometry", { + get: function () { + return this._geometry; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getTotalVertices = function () { + return null === this._geometry || void 0 === this._geometry ? 0 : this._geometry.getTotalVertices(); + }), + (t.prototype.getVerticesData = function (e, t, n) { + return this._geometry ? this._geometry.getVerticesData(e, t, n) : null; + }), + (t.prototype.getVertexBuffer = function (e) { + return this._geometry ? this._geometry.getVertexBuffer(e) : null; + }), + (t.prototype.isVerticesDataPresent = function (e) { + return this._geometry ? this._geometry.isVerticesDataPresent(e) : !!this._delayInfo && -1 !== this._delayInfo.indexOf(e); + }), + (t.prototype.isVertexBufferUpdatable = function (e) { + return this._geometry ? this._geometry.isVertexBufferUpdatable(e) : !!this._delayInfo && -1 !== this._delayInfo.indexOf(e); + }), + (t.prototype.getVerticesDataKinds = function () { + if (!this._geometry) { + var e = new Array(); + return ( + this._delayInfo && + this._delayInfo.forEach(function (t) { + e.push(t); + }), + e + ); + } + return this._geometry.getVerticesDataKinds(); + }), + (t.prototype.getTotalIndices = function () { + return this._geometry ? this._geometry.getTotalIndices() : 0; + }), + (t.prototype.getIndices = function (e, t) { + return this._geometry ? this._geometry.getIndices(e, t) : []; + }), + Object.defineProperty(t.prototype, "isBlocked", { + get: function () { + return null !== this._masterMesh && void 0 !== this._masterMesh; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.isReady = function (t, n) { + if ((void 0 === t && (t = !1), void 0 === n && (n = !1), 2 === this.delayLoadState)) return !1; + if (!e.prototype.isReady.call(this, t)) return !1; + if (!this.subMeshes || 0 === this.subMeshes.length) return !0; + if (!t) return !0; + var i = this.getEngine(), + r = this.getScene(), + o = n || (i.getCaps().instancedArrays && this.instances.length > 0); + this.computeWorldMatrix(); + var a = this.material || r.defaultMaterial; + if (a) + if (a._storeEffectOnSubMeshes) + for (var s = 0, c = this.subMeshes; s < c.length; s++) { + var l = (m = c[s]).getMaterial(); + if (l) + if (l._storeEffectOnSubMeshes) { + if (!l.isReadyForSubMesh(this, m, o)) return !1; + } else if (!l.isReady(this, o)) return !1; + } + else if (!a.isReady(this, o)) return !1; + for (var u = 0, h = this.lightSources; u < h.length; u++) { + var d = h[u].getShadowGenerator(); + if (d) + for (var p = 0, f = this.subMeshes; p < f.length; p++) { + var m = f[p]; + if (!d.isReady(m, o)) return !1; + } + } + for (var g = 0, b = this._internalMeshDataInfo._LODLevels; g < b.length; g++) { + var _ = b[g]; + if (_.mesh && !_.mesh.isReady(o)) return !1; + } + return !0; + }), + Object.defineProperty(t.prototype, "areNormalsFrozen", { + get: function () { + return this._internalMeshDataInfo._areNormalsFrozen; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.freezeNormals = function () { + return (this._internalMeshDataInfo._areNormalsFrozen = !0), this; + }), + (t.prototype.unfreezeNormals = function () { + return (this._internalMeshDataInfo._areNormalsFrozen = !1), this; + }), + Object.defineProperty(t.prototype, "overridenInstanceCount", { + set: function (e) { + this._instanceDataStorage.overridenInstanceCount = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._preActivate = function () { + var e = this._internalMeshDataInfo, + t = this.getScene().getRenderId(); + return e._preActivateId === t || ((e._preActivateId = t), (this._instanceDataStorage.visibleInstances = null)), this; + }), + (t.prototype._preActivateForIntermediateRendering = function (e) { + return this._instanceDataStorage.visibleInstances && (this._instanceDataStorage.visibleInstances.intermediateDefaultRenderId = e), this; + }), + (t.prototype._registerInstanceForRenderId = function (e, t) { + return ( + this._instanceDataStorage.visibleInstances || (this._instanceDataStorage.visibleInstances = { defaultRenderId: t, selfDefaultRenderId: this._renderId }), + this._instanceDataStorage.visibleInstances[t] || (this._instanceDataStorage.visibleInstances[t] = new Array()), + this._instanceDataStorage.visibleInstances[t].push(e), + this + ); + }), + (t.prototype.refreshBoundingInfo = function (e) { + if ((void 0 === e && (e = !1), this._boundingInfo && this._boundingInfo.isLocked)) return this; + var t = this.geometry ? this.geometry.boundingBias : null; + return this._refreshBoundingInfo(this._getPositionData(e), t), this; + }), + (t.prototype._createGlobalSubMesh = function (e) { + var t = this.getTotalVertices(); + if (!t || !this.getIndices()) return null; + if (this.subMeshes && this.subMeshes.length > 0) { + var n = this.getIndices(); + if (!n) return null; + var i = n.length, + r = !1; + if (e) r = !0; + else + for (var o = 0, a = this.subMeshes; o < a.length; o++) { + var s = a[o]; + if (s.indexStart + s.indexCount >= i) { + r = !0; + break; + } + if (s.verticesStart + s.verticesCount >= t) { + r = !0; + break; + } + } + if (!r) return this.subMeshes[0]; + } + return this.releaseSubMeshes(), new m.b(0, 0, t, 0, this.getTotalIndices(), this); + }), + (t.prototype.subdivide = function (e) { + if (!(e < 1)) { + for (var t = this.getTotalIndices(), n = (t / e) | 0, i = 0; n % 3 != 0; ) n++; + this.releaseSubMeshes(); + for (var r = 0; r < e && !(i >= t); r++) m.b.CreateFromIndices(0, i, Math.min(n, t - i), this), (i += n); + this.synchronizeInstances(); + } + }), + (t.prototype.setVerticesData = function (e, t, n, i) { + if ((void 0 === n && (n = !1), this._geometry)) this._geometry.setVerticesData(e, t, n, i); + else { + var r = new d.a(); + r.set(t, e); + var o = this.getScene(); + new p.a(p.a.RandomId(), o, r, n, this); + } + return this; + }), + (t.prototype.removeVerticesData = function (e) { + this._geometry && this._geometry.removeVerticesData(e); + }), + (t.prototype.markVerticesDataAsUpdatable = function (e, t) { + void 0 === t && (t = !0); + var n = this.getVertexBuffer(e); + n && n.isUpdatable() !== t && this.setVerticesData(e, this.getVerticesData(e), t); + }), + (t.prototype.setVerticesBuffer = function (e) { + return this._geometry || (this._geometry = p.a.CreateGeometryForMesh(this)), this._geometry.setVerticesBuffer(e), this; + }), + (t.prototype.updateVerticesData = function (e, t, n, i) { + return this._geometry ? (i ? (this.makeGeometryUnique(), this.updateVerticesData(e, t, n, !1)) : this._geometry.updateVerticesData(e, t, n), this) : this; + }), + (t.prototype.updateMeshPositions = function (e, t) { + void 0 === t && (t = !0); + var n = this.getVerticesData(h.b.PositionKind); + if (!n) return this; + if ((e(n), this.updateVerticesData(h.b.PositionKind, n, !1, !1), t)) { + var i = this.getIndices(), + r = this.getVerticesData(h.b.NormalKind); + if (!r) return this; + d.a.ComputeNormals(n, i, r), this.updateVerticesData(h.b.NormalKind, r, !1, !1); + } + return this; + }), + (t.prototype.makeGeometryUnique = function () { + if (!this._geometry) return this; + var e = this._geometry, + t = this._geometry.copy(p.a.RandomId()); + return e.releaseForMesh(this, !0), t.applyToMesh(this), this; + }), + (t.prototype.setIndices = function (e, t, n) { + if ((void 0 === t && (t = null), void 0 === n && (n = !1), this._geometry)) this._geometry.setIndices(e, t, n); + else { + var i = new d.a(); + i.indices = e; + var r = this.getScene(); + new p.a(p.a.RandomId(), r, i, n, this); + } + return this; + }), + (t.prototype.updateIndices = function (e, t, n) { + return void 0 === n && (n = !1), this._geometry ? (this._geometry.updateIndices(e, t, n), this) : this; + }), + (t.prototype.toLeftHanded = function () { + return this._geometry ? (this._geometry.toLeftHanded(), this) : this; + }), + (t.prototype._bind = function (e, t, n) { + if (!this._geometry) return this; + var i, + r = this.getScene().getEngine(); + if (this._unIndexed) i = null; + else + switch (n) { + case b.a.PointFillMode: + i = null; + break; + case b.a.WireFrameFillMode: + i = e._getLinesIndexBuffer(this.getIndices(), r); + break; + default: + case b.a.TriangleFillMode: + i = this._geometry.getIndexBuffer(); + } + return this._geometry._bind(t, i), this; + }), + (t.prototype._draw = function (e, t, n) { + if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) return this; + this._internalMeshDataInfo._onBeforeDrawObservable && this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this); + var i = this.getScene().getEngine(); + return ( + this._unIndexed || t == b.a.PointFillMode + ? i.drawArraysType(t, e.verticesStart, e.verticesCount, n) + : t == b.a.WireFrameFillMode + ? i.drawElementsType(t, 0, e._linesIndexCount, n) + : i.drawElementsType(t, e.indexStart, e.indexCount, n), + this + ); + }), + (t.prototype.registerBeforeRender = function (e) { + return this.onBeforeRenderObservable.add(e), this; + }), + (t.prototype.unregisterBeforeRender = function (e) { + return this.onBeforeRenderObservable.removeCallback(e), this; + }), + (t.prototype.registerAfterRender = function (e) { + return this.onAfterRenderObservable.add(e), this; + }), + (t.prototype.unregisterAfterRender = function (e) { + return this.onAfterRenderObservable.removeCallback(e), this; + }), + (t.prototype._getInstancesRenderList = function (e, t) { + if ((void 0 === t && (t = !1), this._instanceDataStorage.isFrozen && this._instanceDataStorage.previousBatch)) return this._instanceDataStorage.previousBatch; + var n = this.getScene(), + i = n._isInIntermediateRendering(), + r = i ? this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate : this._internalAbstractMeshDataInfo._onlyForInstances, + o = this._instanceDataStorage.batchCache; + if (((o.mustReturn = !1), (o.renderSelf[e] = t || (!r && this.isEnabled() && this.isVisible)), (o.visibleInstances[e] = null), this._instanceDataStorage.visibleInstances && !t)) { + var a = this._instanceDataStorage.visibleInstances, + s = n.getRenderId(), + c = i ? a.intermediateDefaultRenderId : a.defaultRenderId; + (o.visibleInstances[e] = a[s]), !o.visibleInstances[e] && c && (o.visibleInstances[e] = a[c]); + } + return ( + (o.hardwareInstancedRendering[e] = !t && this._instanceDataStorage.hardwareInstancedRendering && null !== o.visibleInstances[e] && void 0 !== o.visibleInstances[e]), + (this._instanceDataStorage.previousBatch = o), + o + ); + }), + (t.prototype._renderWithInstances = function (e, t, n, i, r) { + var o = n.visibleInstances[e._id]; + if (!o) return this; + for (var a = this._instanceDataStorage, s = a.instancesBufferSize, c = a.instancesBuffer, l = 16 * (o.length + 1) * 4; a.instancesBufferSize < l; ) a.instancesBufferSize *= 2; + (a.instancesData && s == a.instancesBufferSize) || (a.instancesData = new Float32Array(a.instancesBufferSize / 4)); + var u = 0, + d = 0, + p = n.renderSelf[e._id]; + if (this._instanceDataStorage.manualUpdate) d = (p ? 1 : 0) + o.length; + else { + var f = this._effectiveMesh.getWorldMatrix(); + if ((p && (f.copyToArray(a.instancesData, u), (u += 16), d++), o)) + for (var m = 0; m < o.length; m++) { + o[m].getWorldMatrix().copyToArray(a.instancesData, u), (u += 16), d++; + } + } + return ( + c && s == a.instancesBufferSize + ? c.updateDirectly(a.instancesData, 0, d) + : (c && c.dispose(), + (c = new h.a(r, a.instancesData, !0, 16, !1, !0)), + (a.instancesBuffer = c), + this.setVerticesBuffer(c.createVertexBuffer("world0", 0, 4)), + this.setVerticesBuffer(c.createVertexBuffer("world1", 4, 4)), + this.setVerticesBuffer(c.createVertexBuffer("world2", 8, 4)), + this.setVerticesBuffer(c.createVertexBuffer("world3", 12, 4))), + this._processInstancedBuffers(o, p), + this.getScene()._activeIndices.addCount(e.indexCount * d, !1), + this._bind(e, i, t), + this._draw(e, t, d), + r.unbindInstanceAttributes(), + this + ); + }), + (t.prototype._processInstancedBuffers = function (e, t) {}), + (t.prototype._processRendering = function (e, t, n, i, r, o, a) { + var s = this.getScene(), + c = s.getEngine(); + if (r) this._renderWithInstances(e, n, i, t, c); + else { + var l = 0; + i.renderSelf[e._id] && (o && o(!1, this._effectiveMesh.getWorldMatrix(), a), l++, this._draw(e, n, this._instanceDataStorage.overridenInstanceCount)); + var u = i.visibleInstances[e._id]; + if (u) { + var h = u.length; + l += h; + for (var d = 0; d < h; d++) { + var p = u[d].getWorldMatrix(); + o && o(!0, p, a), this._draw(e, n); + } + } + s._activeIndices.addCount(e.indexCount * l, !1); + } + return this; + }), + (t.prototype._rebuild = function () { + this._instanceDataStorage.instancesBuffer && (this._instanceDataStorage.instancesBuffer.dispose(), (this._instanceDataStorage.instancesBuffer = null)), e.prototype._rebuild.call(this); + }), + (t.prototype._freeze = function () { + if (this.subMeshes) { + for (var e = 0; e < this.subMeshes.length; e++) this._getInstancesRenderList(e); + (this._effectiveMaterial = null), (this._instanceDataStorage.isFrozen = !0); + } + }), + (t.prototype._unFreeze = function () { + (this._instanceDataStorage.isFrozen = !1), (this._instanceDataStorage.previousBatch = null); + }), + (t.prototype.render = function (e, t, n) { + var i = this.getScene(); + if ((this._internalAbstractMeshDataInfo._isActiveIntermediate ? (this._internalAbstractMeshDataInfo._isActiveIntermediate = !1) : (this._internalAbstractMeshDataInfo._isActive = !1), this._checkOcclusionQuery())) + return this; + var r = this._getInstancesRenderList(e._id, !!n); + if (r.mustReturn) return this; + if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) return this; + this._internalMeshDataInfo._onBeforeRenderObservable && this._internalMeshDataInfo._onBeforeRenderObservable.notifyObservers(this); + var o, + a = i.getEngine(), + s = r.hardwareInstancedRendering[e._id], + c = this._instanceDataStorage, + l = e.getMaterial(); + if (!l) return this; + if (!c.isFrozen || !this._effectiveMaterial || this._effectiveMaterial !== l) { + if (l._storeEffectOnSubMeshes) { + if (!l.isReadyForSubMesh(this, e, s)) return this; + } else if (!l.isReady(this, s)) return this; + this._effectiveMaterial = l; + } + t && a.setAlphaMode(this._effectiveMaterial.alphaMode); + for (var u = 0, h = i._beforeRenderingMeshStage; u < h.length; u++) { + h[u].action(this, e, r); + } + if (!(o = this._effectiveMaterial._storeEffectOnSubMeshes ? e.effect : this._effectiveMaterial.getEffect())) return this; + var d, + p = n || this._effectiveMesh; + if (!c.isFrozen && this._effectiveMaterial.backFaceCulling) { + var f = p._getWorldMatrixDeterminant(); + null == (d = this.overrideMaterialSideOrientation) && (d = this._effectiveMaterial.sideOrientation), + f < 0 && (d = d === b.a.ClockWiseSideOrientation ? b.a.CounterClockWiseSideOrientation : b.a.ClockWiseSideOrientation), + (c.sideOrientation = d); + } else d = c.sideOrientation; + var m = this._effectiveMaterial._preBind(o, d); + this._effectiveMaterial.forceDepthWrite && a.setDepthWrite(!0); + var g = i.forcePointsCloud ? b.a.PointFillMode : i.forceWireframe ? b.a.WireFrameFillMode : this._effectiveMaterial.fillMode; + this._internalMeshDataInfo._onBeforeBindObservable && this._internalMeshDataInfo._onBeforeBindObservable.notifyObservers(this), s || this._bind(e, o, g); + var _ = p.getWorldMatrix(); + this._effectiveMaterial._storeEffectOnSubMeshes ? this._effectiveMaterial.bindForSubMesh(_, this, e) : this._effectiveMaterial.bind(_, this), + !this._effectiveMaterial.backFaceCulling && + this._effectiveMaterial.separateCullingPass && + (a.setState(!0, this._effectiveMaterial.zOffset, !1, !m), this._processRendering(e, o, g, r, s, this._onBeforeDraw, this._effectiveMaterial), a.setState(!0, this._effectiveMaterial.zOffset, !1, m)), + this._processRendering(e, o, g, r, s, this._onBeforeDraw, this._effectiveMaterial), + this._effectiveMaterial.unbind(); + for (var v = 0, y = i._afterRenderingMeshStage; v < y.length; v++) { + y[v].action(this, e, r); + } + return this._internalMeshDataInfo._onAfterRenderObservable && this._internalMeshDataInfo._onAfterRenderObservable.notifyObservers(this), this; + }), + (t.prototype._onBeforeDraw = function (e, t, n) { + e && n && n.bindOnlyWorldMatrix(t); + }), + (t.prototype.cleanMatrixWeights = function () { + this.isVerticesDataPresent(h.b.MatricesWeightsKind) && (this.isVerticesDataPresent(h.b.MatricesWeightsExtraKind) ? this.normalizeSkinWeightsAndExtra() : this.normalizeSkinFourWeights()); + }), + (t.prototype.normalizeSkinFourWeights = function () { + for (var e = this.getVerticesData(h.b.MatricesWeightsKind), t = e.length, n = 0; n < t; n += 4) { + var i = e[n] + e[n + 1] + e[n + 2] + e[n + 3]; + if (0 === i) e[n] = 1; + else { + var r = 1 / i; + (e[n] *= r), (e[n + 1] *= r), (e[n + 2] *= r), (e[n + 3] *= r); + } + } + this.setVerticesData(h.b.MatricesWeightsKind, e); + }), + (t.prototype.normalizeSkinWeightsAndExtra = function () { + for (var e = this.getVerticesData(h.b.MatricesWeightsExtraKind), t = this.getVerticesData(h.b.MatricesWeightsKind), n = t.length, i = 0; i < n; i += 4) { + var r = t[i] + t[i + 1] + t[i + 2] + t[i + 3]; + if (0 === (r += e[i] + e[i + 1] + e[i + 2] + e[i + 3])) t[i] = 1; + else { + var o = 1 / r; + (t[i] *= o), (t[i + 1] *= o), (t[i + 2] *= o), (t[i + 3] *= o), (e[i] *= o), (e[i + 1] *= o), (e[i + 2] *= o), (e[i + 3] *= o); + } + } + this.setVerticesData(h.b.MatricesWeightsKind, t), this.setVerticesData(h.b.MatricesWeightsKind, e); + }), + (t.prototype.validateSkinning = function () { + var e = this.getVerticesData(h.b.MatricesWeightsExtraKind), + t = this.getVerticesData(h.b.MatricesWeightsKind); + if (null === t || null == this.skeleton) return { skinned: !1, valid: !0, report: "not skinned" }; + for (var n = t.length, i = 0, r = 0, o = 0, a = 0, s = null === e ? 4 : 8, c = new Array(), l = 0; l <= s; l++) c[l] = 0; + for (l = 0; l < n; l += 4) { + for (var u = t[l], d = u, p = 0 === d ? 0 : 1, f = 1; f < s; f++) { + var m = f < 4 ? t[l + f] : e[l + f - 4]; + m > u && i++, 0 !== m && p++, (d += m), (u = m); + } + if ((c[p]++, p > o && (o = p), 0 === d)) r++; + else { + var g = 1 / d, + b = 0; + for (f = 0; f < s; f++) b += f < 4 ? Math.abs(t[l + f] - t[l + f] * g) : Math.abs(e[l + f - 4] - e[l + f - 4] * g); + b > 0.001 && a++; + } + } + var _ = this.skeleton.bones.length, + v = this.getVerticesData(h.b.MatricesIndicesKind), + y = this.getVerticesData(h.b.MatricesIndicesExtraKind), + C = 0; + for (l = 0; l < n; l++) + for (f = 0; f < s; f++) { + var P = f < 4 ? v[f] : y[f - 4]; + (P >= _ || P < 0) && C++; + } + return { + skinned: !0, + valid: 0 === r && 0 === a && 0 === C, + report: + "Number of Weights = " + + n / 4 + + "\nMaximum influences = " + + o + + "\nMissing Weights = " + + r + + "\nNot Sorted = " + + i + + "\nNot Normalized = " + + a + + "\nWeightCounts = [" + + c + + "]\nNumber of bones = " + + _ + + "\nBad Bone Indices = " + + C, + }; + }), + (t.prototype._checkDelayState = function () { + var e = this.getScene(); + return this._geometry ? this._geometry.load(e) : 4 === this.delayLoadState && ((this.delayLoadState = 2), this._queueLoad(e)), this; + }), + (t.prototype._queueLoad = function (e) { + var t = this; + e._addPendingData(this); + var n = -1 !== this.delayLoadingFile.indexOf(".babylonbinarymeshdata"); + return ( + o.b.LoadFile( + this.delayLoadingFile, + function (n) { + n instanceof ArrayBuffer ? t._delayLoadingFunction(n, t) : t._delayLoadingFunction(JSON.parse(n), t), + t.instances.forEach(function (e) { + e.refreshBoundingInfo(), e._syncSubMeshes(); + }), + (t.delayLoadState = 1), + e._removePendingData(t); + }, + function () {}, + e.offlineProvider, + n + ), + this + ); + }), + (t.prototype.isInFrustum = function (t) { + return 2 !== this.delayLoadState && !!e.prototype.isInFrustum.call(this, t) && (this._checkDelayState(), !0); + }), + (t.prototype.setMaterialByID = function (e) { + var t, + n = this.getScene().materials; + for (t = n.length - 1; t > -1; t--) if (n[t].id === e) return (this.material = n[t]), this; + var i = this.getScene().multiMaterials; + for (t = i.length - 1; t > -1; t--) if (i[t].id === e) return (this.material = i[t]), this; + return this; + }), + (t.prototype.getAnimatables = function () { + var e = new Array(); + return this.material && e.push(this.material), this.skeleton && e.push(this.skeleton), e; + }), + (t.prototype.bakeTransformIntoVertices = function (e) { + if (!this.isVerticesDataPresent(h.b.PositionKind)) return this; + var t = this.subMeshes.splice(0); + this._resetPointsArrayCache(); + var n, + i = this.getVerticesData(h.b.PositionKind), + r = new Array(); + for (n = 0; n < i.length; n += 3) c.e.TransformCoordinates(c.e.FromArray(i, n), e).toArray(r, n); + if ((this.setVerticesData(h.b.PositionKind, r, this.getVertexBuffer(h.b.PositionKind).isUpdatable()), this.isVerticesDataPresent(h.b.NormalKind))) { + for (i = this.getVerticesData(h.b.NormalKind), r = [], n = 0; n < i.length; n += 3) c.e.TransformNormal(c.e.FromArray(i, n), e).normalize().toArray(r, n); + this.setVerticesData(h.b.NormalKind, r, this.getVertexBuffer(h.b.NormalKind).isUpdatable()); + } + return e.m[0] * e.m[5] * e.m[10] < 0 && this.flipFaces(), this.releaseSubMeshes(), (this.subMeshes = t), this; + }), + (t.prototype.bakeCurrentTransformIntoVertices = function (e) { + return void 0 === e && (e = !0), this.bakeTransformIntoVertices(this.computeWorldMatrix(!0)), this.resetLocalMatrix(e), this; + }), + Object.defineProperty(t.prototype, "_positions", { + get: function () { + return this._geometry ? this._geometry._positions : null; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._resetPointsArrayCache = function () { + return this._geometry && this._geometry._resetPointsArrayCache(), this; + }), + (t.prototype._generatePointsArray = function () { + return !!this._geometry && this._geometry._generatePointsArray(); + }), + (t.prototype.clone = function (e, n, i, r) { + return void 0 === e && (e = ""), void 0 === n && (n = null), void 0 === r && (r = !0), new t(e, this.getScene(), n, this, i, r); + }), + (t.prototype.dispose = function (t, n) { + void 0 === n && (n = !1), (this.morphTargetManager = null), this._geometry && this._geometry.releaseForMesh(this, !0); + var i = this._internalMeshDataInfo; + if ( + (i._onBeforeDrawObservable && i._onBeforeDrawObservable.clear(), + i._onBeforeBindObservable && i._onBeforeBindObservable.clear(), + i._onBeforeRenderObservable && i._onBeforeRenderObservable.clear(), + i._onAfterRenderObservable && i._onAfterRenderObservable.clear(), + this._scene.useClonedMeshMap) + ) { + if (i.meshMap) + for (var r in i.meshMap) { + (s = i.meshMap[r]) && ((s._internalMeshDataInfo._source = null), (i.meshMap[r] = void 0)); + } + i._source && i._source._internalMeshDataInfo.meshMap && (i._source._internalMeshDataInfo.meshMap[this.uniqueId] = void 0); + } else + for (var o = 0, a = this.getScene().meshes; o < a.length; o++) { + var s; + (s = a[o])._internalMeshDataInfo && s._internalMeshDataInfo._source && s._internalMeshDataInfo._source === this && (s._internalMeshDataInfo._source = null); + } + (i._source = null), this._disposeInstanceSpecificData(), e.prototype.dispose.call(this, t, n); + }), + (t.prototype._disposeInstanceSpecificData = function () {}), + (t.prototype.applyDisplacementMap = function (e, t, n, i, r, a, s) { + var c = this; + void 0 === s && (s = !1); + var l = this.getScene(); + return ( + o.b.LoadImage( + e, + function (e) { + var o = e.width, + l = e.height, + u = O.a.CreateCanvas(o, l).getContext("2d"); + u.drawImage(e, 0, 0); + var h = u.getImageData(0, 0, o, l).data; + c.applyDisplacementMapFromBuffer(h, o, l, t, n, r, a, s), i && i(c); + }, + function () {}, + l.offlineProvider + ), + this + ); + }), + (t.prototype.applyDisplacementMapFromBuffer = function (e, t, n, i, r, o, a, s) { + if ((void 0 === s && (s = !1), !this.isVerticesDataPresent(h.b.PositionKind) || !this.isVerticesDataPresent(h.b.NormalKind) || !this.isVerticesDataPresent(h.b.UVKind))) + return C.a.Warn("Cannot call applyDisplacementMap: Given mesh is not complete. Position, Normal or UV are missing"), this; + var l = this.getVerticesData(h.b.PositionKind, !0, !0), + u = this.getVerticesData(h.b.NormalKind), + p = this.getVerticesData(h.b.UVKind), + f = c.e.Zero(), + m = c.e.Zero(), + g = c.d.Zero(); + (o = o || c.d.Zero()), (a = a || new c.d(1, 1)); + for (var b = 0; b < l.length; b += 3) { + c.e.FromArrayToRef(l, b, f), c.e.FromArrayToRef(u, b, m), c.d.FromArrayToRef(p, (b / 3) * 2, g); + var _ = 4 * (((Math.abs(g.x * a.x + o.x) * t) % t | 0) + ((Math.abs(g.y * a.y + o.y) * n) % n | 0) * t), + v = 0.3 * (e[_] / 255) + 0.59 * (e[_ + 1] / 255) + 0.11 * (e[_ + 2] / 255); + m.normalize(), m.scaleInPlace(i + (r - i) * v), (f = f.add(m)).toArray(l, b); + } + return ( + d.a.ComputeNormals(l, this.getIndices(), u), + s ? (this.setVerticesData(h.b.PositionKind, l), this.setVerticesData(h.b.NormalKind, u)) : (this.updateVerticesData(h.b.PositionKind, l), this.updateVerticesData(h.b.NormalKind, u)), + this + ); + }), + (t.prototype.convertToFlatShadedMesh = function () { + var e, + t, + n = this.getVerticesDataKinds(), + i = {}, + r = {}, + o = {}, + a = !1; + for (e = 0; e < n.length; e++) { + t = n[e]; + var s = this.getVertexBuffer(t); + t !== h.b.NormalKind ? ((i[t] = s), (r[t] = i[t].getData()), (o[t] = [])) : ((a = s.isUpdatable()), n.splice(e, 1), e--); + } + var l, + u = this.subMeshes.slice(0), + d = this.getIndices(), + p = this.getTotalIndices(); + for (l = 0; l < p; l++) { + var f = d[l]; + for (e = 0; e < n.length; e++) for (var g = i[(t = n[e])].getStrideSize(), b = 0; b < g; b++) o[t].push(r[t][f * g + b]); + } + var _ = [], + v = o[h.b.PositionKind]; + for (l = 0; l < p; l += 3) { + (d[l] = l), (d[l + 1] = l + 1), (d[l + 2] = l + 2); + for (var y = c.e.FromArray(v, 3 * l), C = c.e.FromArray(v, 3 * (l + 1)), P = c.e.FromArray(v, 3 * (l + 2)), x = y.subtract(C), T = P.subtract(C), S = c.e.Normalize(c.e.Cross(x, T)), O = 0; O < 3; O++) + _.push(S.x), _.push(S.y), _.push(S.z); + } + for (this.setIndices(d), this.setVerticesData(h.b.NormalKind, _, a), e = 0; e < n.length; e++) (t = n[e]), this.setVerticesData(t, o[t], i[t].isUpdatable()); + this.releaseSubMeshes(); + for (var E = 0; E < u.length; E++) { + var M = u[E]; + m.b.AddToMesh(M.materialIndex, M.indexStart, M.indexCount, M.indexStart, M.indexCount, this); + } + return this.synchronizeInstances(), this; + }), + (t.prototype.convertToUnIndexedMesh = function () { + var e, + t, + n = this.getVerticesDataKinds(), + i = {}, + r = {}, + o = {}; + for (e = 0; e < n.length; e++) { + t = n[e]; + var a = this.getVertexBuffer(t); + (i[t] = a), (r[t] = i[t].getData()), (o[t] = []); + } + var s, + c = this.subMeshes.slice(0), + l = this.getIndices(), + u = this.getTotalIndices(); + for (s = 0; s < u; s++) { + var h = l[s]; + for (e = 0; e < n.length; e++) for (var d = i[(t = n[e])].getStrideSize(), p = 0; p < d; p++) o[t].push(r[t][h * d + p]); + } + for (s = 0; s < u; s += 3) (l[s] = s), (l[s + 1] = s + 1), (l[s + 2] = s + 2); + for (this.setIndices(l), e = 0; e < n.length; e++) (t = n[e]), this.setVerticesData(t, o[t], i[t].isUpdatable()); + this.releaseSubMeshes(); + for (var f = 0; f < c.length; f++) { + var g = c[f]; + m.b.AddToMesh(g.materialIndex, g.indexStart, g.indexCount, g.indexStart, g.indexCount, this); + } + return (this._unIndexed = !0), this.synchronizeInstances(), this; + }), + (t.prototype.flipFaces = function (e) { + void 0 === e && (e = !1); + var t, + n, + i = d.a.ExtractFromMesh(this); + if (e && this.isVerticesDataPresent(h.b.NormalKind) && i.normals) for (t = 0; t < i.normals.length; t++) i.normals[t] *= -1; + if (i.indices) for (t = 0; t < i.indices.length; t += 3) (n = i.indices[t + 1]), (i.indices[t + 1] = i.indices[t + 2]), (i.indices[t + 2] = n); + return i.applyToMesh(this, this.isVertexBufferUpdatable(h.b.PositionKind)), this; + }), + (t.prototype.increaseVertices = function (e) { + var t = d.a.ExtractFromMesh(this), + n = t.uvs, + i = t.indices, + r = t.positions, + o = t.normals; + if (null === i || null === r || null === o || null === n) C.a.Warn("VertexData contains null entries"); + else { + for (var a, s, l = e + 1, u = new Array(), p = 0; p < l + 1; p++) u[p] = new Array(); + var f, + m = new c.e(0, 0, 0), + g = new c.e(0, 0, 0), + b = new c.d(0, 0), + _ = new Array(), + v = new Array(), + y = new Array(), + P = r.length, + x = n.length; + for (p = 0; p < i.length; p += 3) { + (v[0] = i[p]), (v[1] = i[p + 1]), (v[2] = i[p + 2]); + for (var T = 0; T < 3; T++) + if ( + ((a = v[T]), + (s = v[(T + 1) % 3]), + void 0 === y[a] && void 0 === y[s] ? ((y[a] = new Array()), (y[s] = new Array())) : (void 0 === y[a] && (y[a] = new Array()), void 0 === y[s] && (y[s] = new Array())), + void 0 === y[a][s] && void 0 === y[s][a]) + ) { + (y[a][s] = []), + (m.x = (r[3 * s] - r[3 * a]) / l), + (m.y = (r[3 * s + 1] - r[3 * a + 1]) / l), + (m.z = (r[3 * s + 2] - r[3 * a + 2]) / l), + (g.x = (o[3 * s] - o[3 * a]) / l), + (g.y = (o[3 * s + 1] - o[3 * a + 1]) / l), + (g.z = (o[3 * s + 2] - o[3 * a + 2]) / l), + (b.x = (n[2 * s] - n[2 * a]) / l), + (b.y = (n[2 * s + 1] - n[2 * a + 1]) / l), + y[a][s].push(a); + for (var S = 1; S < l; S++) + y[a][s].push(r.length / 3), + (r[P] = r[3 * a] + S * m.x), + (o[P++] = o[3 * a] + S * g.x), + (r[P] = r[3 * a + 1] + S * m.y), + (o[P++] = o[3 * a + 1] + S * g.y), + (r[P] = r[3 * a + 2] + S * m.z), + (o[P++] = o[3 * a + 2] + S * g.z), + (n[x++] = n[2 * a] + S * b.x), + (n[x++] = n[2 * a + 1] + S * b.y); + y[a][s].push(s), (y[s][a] = new Array()), (f = y[a][s].length); + for (var O = 0; O < f; O++) y[s][a][O] = y[a][s][f - 1 - O]; + } + (u[0][0] = i[p]), (u[1][0] = y[i[p]][i[p + 1]][1]), (u[1][1] = y[i[p]][i[p + 2]][1]); + for (S = 2; S < l; S++) { + (u[S][0] = y[i[p]][i[p + 1]][S]), + (u[S][S] = y[i[p]][i[p + 2]][S]), + (m.x = (r[3 * u[S][S]] - r[3 * u[S][0]]) / S), + (m.y = (r[3 * u[S][S] + 1] - r[3 * u[S][0] + 1]) / S), + (m.z = (r[3 * u[S][S] + 2] - r[3 * u[S][0] + 2]) / S), + (g.x = (o[3 * u[S][S]] - o[3 * u[S][0]]) / S), + (g.y = (o[3 * u[S][S] + 1] - o[3 * u[S][0] + 1]) / S), + (g.z = (o[3 * u[S][S] + 2] - o[3 * u[S][0] + 2]) / S), + (b.x = (n[2 * u[S][S]] - n[2 * u[S][0]]) / S), + (b.y = (n[2 * u[S][S] + 1] - n[2 * u[S][0] + 1]) / S); + for (T = 1; T < S; T++) + (u[S][T] = r.length / 3), + (r[P] = r[3 * u[S][0]] + T * m.x), + (o[P++] = o[3 * u[S][0]] + T * g.x), + (r[P] = r[3 * u[S][0] + 1] + T * m.y), + (o[P++] = o[3 * u[S][0] + 1] + T * g.y), + (r[P] = r[3 * u[S][0] + 2] + T * m.z), + (o[P++] = o[3 * u[S][0] + 2] + T * g.z), + (n[x++] = n[2 * u[S][0]] + T * b.x), + (n[x++] = n[2 * u[S][0] + 1] + T * b.y); + } + (u[l] = y[i[p + 1]][i[p + 2]]), _.push(u[0][0], u[1][0], u[1][1]); + for (S = 1; S < l; S++) { + for (T = 0; T < S; T++) _.push(u[S][T], u[S + 1][T], u[S + 1][T + 1]), _.push(u[S][T], u[S + 1][T + 1], u[S][T + 1]); + _.push(u[S][T], u[S + 1][T], u[S + 1][T + 1]); + } + } + (t.indices = _), t.applyToMesh(this, this.isVertexBufferUpdatable(h.b.PositionKind)); + } + }), + (t.prototype.forceSharedVertices = function () { + var e = d.a.ExtractFromMesh(this), + t = e.uvs, + n = e.indices, + i = e.positions, + r = e.colors; + if (void 0 === n || void 0 === i || null === n || null === i) C.a.Warn("VertexData contains empty entries"); + else { + for (var o, a, s = new Array(), c = new Array(), l = new Array(), u = new Array(), p = new Array(), f = 0, m = new Array(), g = 0; g < n.length; g += 3) { + (a = [n[g], n[g + 1], n[g + 2]]), (p = new Array()); + for (var b = 0; b < 3; b++) { + p[b] = ""; + for (var _ = 0; _ < 3; _++) Math.abs(i[3 * a[b] + _]) < 1e-8 && (i[3 * a[b] + _] = 0), (p[b] += i[3 * a[b] + _] + "|"); + p[b] = p[b].slice(0, -1); + } + if (p[0] != p[1] && p[0] != p[2] && p[1] != p[2]) + for (b = 0; b < 3; b++) { + if ((o = m.indexOf(p[b])) < 0) { + m.push(p[b]), (o = f++); + for (_ = 0; _ < 3; _++) s.push(i[3 * a[b] + _]); + if (null != r) for (_ = 0; _ < 4; _++) u.push(r[4 * a[b] + _]); + if (null != t) for (_ = 0; _ < 2; _++) l.push(t[2 * a[b] + _]); + } + c.push(o); + } + } + var v = new Array(); + d.a.ComputeNormals(s, c, v), (e.positions = s), (e.indices = c), (e.normals = v), null != t && (e.uvs = l), null != r && (e.colors = u), e.applyToMesh(this, this.isVertexBufferUpdatable(h.b.PositionKind)); + } + }), + (t._instancedMeshFactory = function (e, t) { + throw x.a.WarnImport("InstancedMesh"); + }), + (t._PhysicsImpostorParser = function (e, t, n) { + throw x.a.WarnImport("PhysicsImpostor"); + }), + (t.prototype.createInstance = function (e) { + return t._instancedMeshFactory(e, this); + }), + (t.prototype.synchronizeInstances = function () { + for (var e = 0; e < this.instances.length; e++) { + this.instances[e]._syncSubMeshes(); + } + return this; + }), + (t.prototype.optimizeIndices = function (e) { + var t = this, + n = this.getIndices(), + i = this.getVerticesData(h.b.PositionKind); + if (!i || !n) return this; + for (var r = new Array(), a = 0; a < i.length; a += 3) r.push(c.e.FromArray(i, a)); + var s = new Array(); + return ( + o.a.SyncAsyncForLoop( + r.length, + 40, + function (e) { + for (var t = r.length - 1 - e, n = r[t], i = 0; i < t; ++i) { + var o = r[i]; + if (n.equals(o)) { + s[t] = i; + break; + } + } + }, + function () { + for (var i = 0; i < n.length; ++i) n[i] = s[n[i]] || n[i]; + var r = t.subMeshes.slice(0); + t.setIndices(n), (t.subMeshes = r), e && e(t); + } + ), + this + ); + }), + (t.prototype.serialize = function (e) { + (e.name = this.name), + (e.id = this.id), + (e.type = this.getClassName()), + s.a && s.a.HasTags(this) && (e.tags = s.a.GetTags(this)), + (e.position = this.position.asArray()), + this.rotationQuaternion ? (e.rotationQuaternion = this.rotationQuaternion.asArray()) : this.rotation && (e.rotation = this.rotation.asArray()), + (e.scaling = this.scaling.asArray()), + this._postMultiplyPivotMatrix ? (e.pivotMatrix = this.getPivotMatrix().asArray()) : (e.localMatrix = this.getPivotMatrix().asArray()), + (e.isEnabled = this.isEnabled(!1)), + (e.isVisible = this.isVisible), + (e.infiniteDistance = this.infiniteDistance), + (e.pickable = this.isPickable), + (e.receiveShadows = this.receiveShadows), + (e.billboardMode = this.billboardMode), + (e.visibility = this.visibility), + (e.checkCollisions = this.checkCollisions), + (e.isBlocker = this.isBlocker), + (e.overrideMaterialSideOrientation = this.overrideMaterialSideOrientation), + this.parent && (e.parentId = this.parent.id), + (e.isUnIndexed = this.isUnIndexed); + var t = this._geometry; + if (t) { + var n = t.id; + (e.geometryId = n), (e.subMeshes = []); + for (var i = 0; i < this.subMeshes.length; i++) { + var r = this.subMeshes[i]; + e.subMeshes.push({ materialIndex: r.materialIndex, verticesStart: r.verticesStart, verticesCount: r.verticesCount, indexStart: r.indexStart, indexCount: r.indexCount }); + } + } + if ( + (this.material ? this.material.doNotSerialize || (e.materialId = this.material.id) : (this.material = null), + this.morphTargetManager && (e.morphTargetManagerId = this.morphTargetManager.uniqueId), + this.skeleton && (e.skeletonId = this.skeleton.id), + this.getScene()._getComponent(T.a.NAME_PHYSICSENGINE)) + ) { + var o = this.getPhysicsImpostor(); + o && ((e.physicsMass = o.getParam("mass")), (e.physicsFriction = o.getParam("friction")), (e.physicsRestitution = o.getParam("mass")), (e.physicsImpostor = o.type)); + } + this.metadata && (e.metadata = this.metadata), (e.instances = []); + for (var a = 0; a < this.instances.length; a++) { + var c = this.instances[a]; + if (!c.doNotSerialize) { + var l = { name: c.name, id: c.id, position: c.position.asArray(), scaling: c.scaling.asArray() }; + c.parent && (l.parentId = c.parent.id), + c.rotationQuaternion ? (l.rotationQuaternion = c.rotationQuaternion.asArray()) : c.rotation && (l.rotation = c.rotation.asArray()), + e.instances.push(l), + y.a.AppendSerializedAnimations(c, l), + (l.ranges = c.serializeAnimationRanges()); + } + } + y.a.AppendSerializedAnimations(this, e), + (e.ranges = this.serializeAnimationRanges()), + (e.layerMask = this.layerMask), + (e.alphaIndex = this.alphaIndex), + (e.hasVertexAlpha = this.hasVertexAlpha), + (e.overlayAlpha = this.overlayAlpha), + (e.overlayColor = this.overlayColor.asArray()), + (e.renderOverlay = this.renderOverlay), + (e.applyFog = this.applyFog), + this.actionManager && (e.actions = this.actionManager.serialize(this.name)); + }), + (t.prototype._syncGeometryWithMorphTargetManager = function () { + if (this.geometry) { + this._markSubMeshesAsAttributesDirty(); + var e = this._internalMeshDataInfo._morphTargetManager; + if (e && e.vertexCount) { + if (e.vertexCount !== this.getTotalVertices()) return C.a.Error("Mesh is incompatible with morph targets. Targets and mesh must all have the same vertices count."), void (this.morphTargetManager = null); + for (var t = 0; t < e.numInfluencers; t++) { + var n = e.getActiveTarget(t), + i = n.getPositions(); + if (!i) return void C.a.Error("Invalid morph target. Target must have positions."); + this.geometry.setVerticesData(h.b.PositionKind + t, i, !1, 3); + var r = n.getNormals(); + r && this.geometry.setVerticesData(h.b.NormalKind + t, r, !1, 3); + var o = n.getTangents(); + o && this.geometry.setVerticesData(h.b.TangentKind + t, o, !1, 3); + var a = n.getUVs(); + a && this.geometry.setVerticesData(h.b.UVKind + "_" + t, a, !1, 2); + } + } else + for (t = 0; this.geometry.isVerticesDataPresent(h.b.PositionKind + t); ) + this.geometry.removeVerticesData(h.b.PositionKind + t), + this.geometry.isVerticesDataPresent(h.b.NormalKind + t) && this.geometry.removeVerticesData(h.b.NormalKind + t), + this.geometry.isVerticesDataPresent(h.b.TangentKind + t) && this.geometry.removeVerticesData(h.b.TangentKind + t), + this.geometry.isVerticesDataPresent(h.b.UVKind + t) && this.geometry.removeVerticesData(h.b.UVKind + "_" + t), + t++; + } + }), + (t.Parse = function (e, n, i) { + var r; + if ( + (((r = e.type && "GroundMesh" === e.type ? t._GroundMeshParser(e, n) : new t(e.name, n)).id = e.id), + s.a && s.a.AddTagsTo(r, e.tags), + (r.position = c.e.FromArray(e.position)), + void 0 !== e.metadata && (r.metadata = e.metadata), + e.rotationQuaternion ? (r.rotationQuaternion = c.b.FromArray(e.rotationQuaternion)) : e.rotation && (r.rotation = c.e.FromArray(e.rotation)), + (r.scaling = c.e.FromArray(e.scaling)), + e.localMatrix ? r.setPreTransformMatrix(c.a.FromArray(e.localMatrix)) : e.pivotMatrix && r.setPivotMatrix(c.a.FromArray(e.pivotMatrix)), + r.setEnabled(e.isEnabled), + (r.isVisible = e.isVisible), + (r.infiniteDistance = e.infiniteDistance), + (r.showBoundingBox = e.showBoundingBox), + (r.showSubMeshesBoundingBox = e.showSubMeshesBoundingBox), + void 0 !== e.applyFog && (r.applyFog = e.applyFog), + void 0 !== e.pickable && (r.isPickable = e.pickable), + void 0 !== e.alphaIndex && (r.alphaIndex = e.alphaIndex), + (r.receiveShadows = e.receiveShadows), + (r.billboardMode = e.billboardMode), + void 0 !== e.visibility && (r.visibility = e.visibility), + (r.checkCollisions = e.checkCollisions), + (r.overrideMaterialSideOrientation = e.overrideMaterialSideOrientation), + void 0 !== e.isBlocker && (r.isBlocker = e.isBlocker), + (r._shouldGenerateFlatShading = e.useFlatShading), + e.freezeWorldMatrix && (r._waitingData.freezeWorldMatrix = e.freezeWorldMatrix), + e.parentId && (r._waitingParentId = e.parentId), + void 0 !== e.actions && (r._waitingData.actions = e.actions), + void 0 !== e.overlayAlpha && (r.overlayAlpha = e.overlayAlpha), + void 0 !== e.overlayColor && (r.overlayColor = l.a.FromArray(e.overlayColor)), + void 0 !== e.renderOverlay && (r.renderOverlay = e.renderOverlay), + (r.isUnIndexed = !!e.isUnIndexed), + (r.hasVertexAlpha = e.hasVertexAlpha), + e.delayLoadingFile + ? ((r.delayLoadState = 4), + (r.delayLoadingFile = i + e.delayLoadingFile), + (r._boundingInfo = new g.a(c.e.FromArray(e.boundingBoxMinimum), c.e.FromArray(e.boundingBoxMaximum))), + e._binaryInfo && (r._binaryInfo = e._binaryInfo), + (r._delayInfo = []), + e.hasUVs && r._delayInfo.push(h.b.UVKind), + e.hasUVs2 && r._delayInfo.push(h.b.UV2Kind), + e.hasUVs3 && r._delayInfo.push(h.b.UV3Kind), + e.hasUVs4 && r._delayInfo.push(h.b.UV4Kind), + e.hasUVs5 && r._delayInfo.push(h.b.UV5Kind), + e.hasUVs6 && r._delayInfo.push(h.b.UV6Kind), + e.hasColors && r._delayInfo.push(h.b.ColorKind), + e.hasMatricesIndices && r._delayInfo.push(h.b.MatricesIndicesKind), + e.hasMatricesWeights && r._delayInfo.push(h.b.MatricesWeightsKind), + (r._delayLoadingFunction = p.a._ImportGeometry), + v.a.ForceFullSceneLoadingForIncremental && r._checkDelayState()) + : p.a._ImportGeometry(e, r), + e.materialId ? r.setMaterialByID(e.materialId) : (r.material = null), + e.morphTargetManagerId > -1 && (r.morphTargetManager = n.getMorphTargetManagerById(e.morphTargetManagerId)), + e.skeletonId > -1 && ((r.skeleton = n.getLastSkeletonByID(e.skeletonId)), e.numBoneInfluencers && (r.numBoneInfluencers = e.numBoneInfluencers)), + e.animations) + ) { + for (var o = 0; o < e.animations.length; o++) { + var a = e.animations[o]; + (b = P.a.GetClass("BABYLON.Animation")) && r.animations.push(b.Parse(a)); + } + u.a.ParseAnimationRanges(r, e, n); + } + if ( + (e.autoAnimate && n.beginAnimation(r, e.autoAnimateFrom, e.autoAnimateTo, e.autoAnimateLoop, e.autoAnimateSpeed || 1), + e.layerMask && !isNaN(e.layerMask) ? (r.layerMask = Math.abs(parseInt(e.layerMask))) : (r.layerMask = 268435455), + e.physicsImpostor && t._PhysicsImpostorParser(n, r, e), + e.lodMeshIds && (r._waitingData.lods = { ids: e.lodMeshIds, distances: e.lodDistances ? e.lodDistances : null, coverages: e.lodCoverages ? e.lodCoverages : null }), + e.instances) + ) + for (var d = 0; d < e.instances.length; d++) { + var f = e.instances[d], + m = r.createInstance(f.name); + if ( + (f.id && (m.id = f.id), + s.a && (f.tags ? s.a.AddTagsTo(m, f.tags) : s.a.AddTagsTo(m, e.tags)), + (m.position = c.e.FromArray(f.position)), + void 0 !== f.metadata && (m.metadata = f.metadata), + f.parentId && (m._waitingParentId = f.parentId), + f.rotationQuaternion ? (m.rotationQuaternion = c.b.FromArray(f.rotationQuaternion)) : f.rotation && (m.rotation = c.e.FromArray(f.rotation)), + (m.scaling = c.e.FromArray(f.scaling)), + null != f.checkCollisions && null != f.checkCollisions && (m.checkCollisions = f.checkCollisions), + null != f.pickable && null != f.pickable && (m.isPickable = f.pickable), + null != f.showBoundingBox && null != f.showBoundingBox && (m.showBoundingBox = f.showBoundingBox), + null != f.showSubMeshesBoundingBox && null != f.showSubMeshesBoundingBox && (m.showSubMeshesBoundingBox = f.showSubMeshesBoundingBox), + null != f.alphaIndex && null != f.showSubMeshesBoundingBox && (m.alphaIndex = f.alphaIndex), + f.physicsImpostor && t._PhysicsImpostorParser(n, m, f), + f.animations) + ) { + for (o = 0; o < f.animations.length; o++) { + var b; + (a = f.animations[o]), (b = P.a.GetClass("BABYLON.Animation")) && m.animations.push(b.Parse(a)); + } + u.a.ParseAnimationRanges(m, f, n), f.autoAnimate && n.beginAnimation(m, f.autoAnimateFrom, f.autoAnimateTo, f.autoAnimateLoop, f.autoAnimateSpeed || 1); + } + } + return r; + }), + (t.CreateRibbon = function (e, t, n, i, r, o, a, s, c) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateDisc = function (e, t, n, i, r, o) { + throw (void 0 === i && (i = null), x.a.WarnImport("MeshBuilder")); + }), + (t.CreateBox = function (e, t, n, i, r) { + throw (void 0 === n && (n = null), x.a.WarnImport("MeshBuilder")); + }), + (t.CreateSphere = function (e, t, n, i, r, o) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateHemisphere = function (e, t, n, i) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateCylinder = function (e, t, n, i, r, o, a, s, c) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateTorus = function (e, t, n, i, r, o, a) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateTorusKnot = function (e, t, n, i, r, o, a, s, c, l) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateLines = function (e, t, n, i, r) { + throw (void 0 === n && (n = null), void 0 === i && (i = !1), void 0 === r && (r = null), x.a.WarnImport("MeshBuilder")); + }), + (t.CreateDashedLines = function (e, t, n, i, r, o, a, s) { + throw (void 0 === o && (o = null), x.a.WarnImport("MeshBuilder")); + }), + (t.CreatePolygon = function (e, t, n, i, r, o, a) { + throw (void 0 === a && (a = earcut), x.a.WarnImport("MeshBuilder")); + }), + (t.ExtrudePolygon = function (e, t, n, i, r, o, a, s) { + throw (void 0 === s && (s = earcut), x.a.WarnImport("MeshBuilder")); + }), + (t.ExtrudeShape = function (e, t, n, i, r, o, a, s, c, l) { + throw (void 0 === a && (a = null), x.a.WarnImport("MeshBuilder")); + }), + (t.ExtrudeShapeCustom = function (e, t, n, i, r, o, a, s, c, l, u, h) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateLathe = function (e, t, n, i, r, o, a) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreatePlane = function (e, t, n, i, r) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateGround = function (e, t, n, i, r, o) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateTiledGround = function (e, t, n, i, r, o, a, s, c) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateGroundFromHeightMap = function (e, t, n, i, r, o, a, s, c, l, u) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateTube = function (e, t, n, i, r, o, a, s, c, l) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreatePolyhedron = function (e, t, n) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateIcoSphere = function (e, t, n) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.CreateDecal = function (e, t, n, i, r, o) { + throw x.a.WarnImport("MeshBuilder"); + }), + (t.prototype.setPositionsForCPUSkinning = function () { + var e = this._internalMeshDataInfo; + if (!e._sourcePositions) { + var t = this.getVerticesData(h.b.PositionKind); + if (!t) return e._sourcePositions; + (e._sourcePositions = new Float32Array(t)), this.isVertexBufferUpdatable(h.b.PositionKind) || this.setVerticesData(h.b.PositionKind, t, !0); + } + return e._sourcePositions; + }), + (t.prototype.setNormalsForCPUSkinning = function () { + var e = this._internalMeshDataInfo; + if (!e._sourceNormals) { + var t = this.getVerticesData(h.b.NormalKind); + if (!t) return e._sourceNormals; + (e._sourceNormals = new Float32Array(t)), this.isVertexBufferUpdatable(h.b.NormalKind) || this.setVerticesData(h.b.NormalKind, t, !0); + } + return e._sourceNormals; + }), + (t.prototype.applySkeleton = function (e) { + if (!this.geometry) return this; + if (this.geometry._softwareSkinningFrameId == this.getScene().getFrameId()) return this; + if (((this.geometry._softwareSkinningFrameId = this.getScene().getFrameId()), !this.isVerticesDataPresent(h.b.PositionKind))) return this; + if (!this.isVerticesDataPresent(h.b.NormalKind)) return this; + if (!this.isVerticesDataPresent(h.b.MatricesIndicesKind)) return this; + if (!this.isVerticesDataPresent(h.b.MatricesWeightsKind)) return this; + var t = this._internalMeshDataInfo; + if (!t._sourcePositions) { + var n = this.subMeshes.slice(); + this.setPositionsForCPUSkinning(), (this.subMeshes = n); + } + t._sourceNormals || this.setNormalsForCPUSkinning(); + var i = this.getVerticesData(h.b.PositionKind); + if (!i) return this; + i instanceof Float32Array || (i = new Float32Array(i)); + var r = this.getVerticesData(h.b.NormalKind); + if (!r) return this; + r instanceof Float32Array || (r = new Float32Array(r)); + var o = this.getVerticesData(h.b.MatricesIndicesKind), + a = this.getVerticesData(h.b.MatricesWeightsKind); + if (!a || !o) return this; + for ( + var s, + l = this.numBoneInfluencers > 4, + u = l ? this.getVerticesData(h.b.MatricesIndicesExtraKind) : null, + d = l ? this.getVerticesData(h.b.MatricesWeightsExtraKind) : null, + p = e.getTransformMatrices(this), + f = c.e.Zero(), + m = new c.a(), + g = new c.a(), + b = 0, + _ = 0; + _ < i.length; + _ += 3, b += 4 + ) { + var v; + for (s = 0; s < 4; s++) (v = a[b + s]) > 0 && (c.a.FromFloat32ArrayToRefScaled(p, Math.floor(16 * o[b + s]), v, g), m.addToSelf(g)); + if (l) for (s = 0; s < 4; s++) (v = d[b + s]) > 0 && (c.a.FromFloat32ArrayToRefScaled(p, Math.floor(16 * u[b + s]), v, g), m.addToSelf(g)); + c.e.TransformCoordinatesFromFloatsToRef(t._sourcePositions[_], t._sourcePositions[_ + 1], t._sourcePositions[_ + 2], m, f), + f.toArray(i, _), + c.e.TransformNormalFromFloatsToRef(t._sourceNormals[_], t._sourceNormals[_ + 1], t._sourceNormals[_ + 2], m, f), + f.toArray(r, _), + m.reset(); + } + return this.updateVerticesData(h.b.PositionKind, i), this.updateVerticesData(h.b.NormalKind, r), this; + }), + (t.MinMax = function (e) { + var t = null, + n = null; + return ( + e.forEach(function (e) { + var i = e.getBoundingInfo().boundingBox; + t && n ? (t.minimizeInPlace(i.minimumWorld), n.maximizeInPlace(i.maximumWorld)) : ((t = i.minimumWorld), (n = i.maximumWorld)); + }), + t && n ? { min: t, max: n } : { min: c.e.Zero(), max: c.e.Zero() } + ); + }), + (t.Center = function (e) { + var n = e instanceof Array ? t.MinMax(e) : e; + return c.e.Center(n.min, n.max); + }), + (t.MergeMeshes = function (e, n, i, r, o, a) { + var s; + if ((void 0 === n && (n = !0), !i)) { + var c = 0; + for (s = 0; s < e.length; s++) + if (e[s] && (c += e[s].getTotalVertices()) >= 65536) + return C.a.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"), null; + } + if (a) { + var l, + u, + h = null; + o = !1; + } + var p, + f = new Array(), + g = new Array(), + b = null, + v = new Array(), + y = null; + for (s = 0; s < e.length; s++) + if (e[s]) { + var P = e[s]; + if (P.isAnInstance) return C.a.Warn("Cannot merge instance meshes."), null; + var x = P.computeWorldMatrix(!0); + if (((p = d.a.ExtractFromMesh(P, !0, !0)).transform(x), b ? b.merge(p, i) : ((b = p), (y = P)), o && v.push(P.getTotalIndices()), a)) + if (P.material) { + var T = P.material; + if (T instanceof _.a) { + for (u = 0; u < T.subMaterials.length; u++) f.indexOf(T.subMaterials[u]) < 0 && f.push(T.subMaterials[u]); + for (l = 0; l < P.subMeshes.length; l++) g.push(f.indexOf(T.subMaterials[P.subMeshes[l].materialIndex])), v.push(P.subMeshes[l].indexCount); + } else for (f.indexOf(T) < 0 && f.push(T), l = 0; l < P.subMeshes.length; l++) g.push(f.indexOf(T)), v.push(P.subMeshes[l].indexCount); + } else for (l = 0; l < P.subMeshes.length; l++) g.push(0), v.push(P.subMeshes[l].indexCount); + } + if (((y = y), r || (r = new t(y.name + "_merged", y.getScene())), b.applyToMesh(r), (r.checkCollisions = y.checkCollisions), n)) for (s = 0; s < e.length; s++) e[s] && e[s].dispose(); + if (o || a) { + r.releaseSubMeshes(), (s = 0); + for (var S = 0; s < v.length; ) m.b.CreateFromIndices(0, S, v[s], r), (S += v[s]), s++; + } + if (a) { + for ((h = new _.a(y.name + "_merged", y.getScene())).subMaterials = f, l = 0; l < r.subMeshes.length; l++) r.subMeshes[l].materialIndex = g[l]; + r.material = h; + } else r.material = y.material; + return r; + }), + (t.prototype.addInstance = function (e) { + (e._indexInSourceMeshInstanceArray = this.instances.length), this.instances.push(e); + }), + (t.prototype.removeInstance = function (e) { + var t = e._indexInSourceMeshInstanceArray; + if (-1 != t) { + if (t !== this.instances.length - 1) { + var n = this.instances[this.instances.length - 1]; + (this.instances[t] = n), (n._indexInSourceMeshInstanceArray = t); + } + (e._indexInSourceMeshInstanceArray = -1), this.instances.pop(); + } + }), + (t.FRONTSIDE = d.a.FRONTSIDE), + (t.BACKSIDE = d.a.BACKSIDE), + (t.DOUBLESIDE = d.a.DOUBLESIDE), + (t.DEFAULTSIDE = d.a.DEFAULTSIDE), + (t.NO_CAP = 0), + (t.CAP_START = 1), + (t.CAP_END = 2), + (t.CAP_ALL = 3), + (t.NO_FLIP = 0), + (t.FLIP_TILE = 1), + (t.ROTATE_TILE = 2), + (t.FLIP_ROW = 3), + (t.ROTATE_ROW = 4), + (t.FLIP_N_ROTATE_TILE = 5), + (t.FLIP_N_ROTATE_ROW = 6), + (t.CENTER = 0), + (t.LEFT = 1), + (t.RIGHT = 2), + (t.TOP = 3), + (t.BOTTOM = 4), + (t._GroundMeshParser = function (e, t) { + throw x.a.WarnImport("GroundMesh"); + }), + t + ); + })(f.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e._AddLogEntry = function (t) { + (e._LogCache = t + e._LogCache), e.OnNewCacheEntry && e.OnNewCacheEntry(t); + }), + (e._FormatMessage = function (e) { + var t = function (e) { + return e < 10 ? "0" + e : "" + e; + }, + n = new Date(); + return "[" + t(n.getHours()) + ":" + t(n.getMinutes()) + ":" + t(n.getSeconds()) + "]: " + e; + }), + (e._LogDisabled = function (e) {}), + (e._LogEnabled = function (t) { + var n = "
" + e._FormatMessage(t) + "

"; + e._AddLogEntry(n); + }), + (e._WarnDisabled = function (e) {}), + (e._WarnEnabled = function (t) { + var n = "
" + e._FormatMessage(t) + "

"; + e._AddLogEntry(n); + }), + (e._ErrorDisabled = function (e) {}), + (e._ErrorEnabled = function (t) { + e.errorsCount++; + var n = "
" + e._FormatMessage(t) + "

"; + e._AddLogEntry(n); + }), + Object.defineProperty(e, "LogCache", { + get: function () { + return e._LogCache; + }, + enumerable: !0, + configurable: !0, + }), + (e.ClearLogCache = function () { + (e._LogCache = ""), (e.errorsCount = 0); + }), + Object.defineProperty(e, "LogLevels", { + set: function (t) { + (t & e.MessageLogLevel) === e.MessageLogLevel ? (e.Log = e._LogEnabled) : (e.Log = e._LogDisabled), + (t & e.WarningLogLevel) === e.WarningLogLevel ? (e.Warn = e._WarnEnabled) : (e.Warn = e._WarnDisabled), + (t & e.ErrorLogLevel) === e.ErrorLogLevel ? (e.Error = e._ErrorEnabled) : (e.Error = e._ErrorDisabled); + }, + enumerable: !0, + configurable: !0, + }), + (e.NoneLogLevel = 0), + (e.MessageLogLevel = 1), + (e.WarningLogLevel = 2), + (e.ErrorLogLevel = 4), + (e.AllLogLevel = 7), + (e._LogCache = ""), + (e.errorsCount = 0), + (e.Log = e._LogEnabled), + (e.Warn = e._WarnEnabled), + (e.Error = e._ErrorEnabled), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(10), + r = n(18), + o = n(25), + a = n(4), + s = n(57), + c = n(5), + l = (function () { + function e() {} + return ( + (e.BindEyePosition = function (e, t) { + if (t._forcedViewPosition) e.setVector3("vEyePosition", t._forcedViewPosition); + else { + var n = t.activeCamera.globalPosition; + n || (n = t.activeCamera.devicePosition), e.setVector3("vEyePosition", t._mirroredCameraPosition ? t._mirroredCameraPosition : n); + } + }), + (e.PrepareDefinesForMergedUV = function (e, t, n) { + (t._needUVs = !0), (t[n] = !0), e.getTextureMatrix().isIdentityAs3x2() ? ((t[n + "DIRECTUV"] = e.coordinatesIndex + 1), 0 === e.coordinatesIndex ? (t.MAINUV1 = !0) : (t.MAINUV2 = !0)) : (t[n + "DIRECTUV"] = 0); + }), + (e.BindTextureMatrix = function (e, t, n) { + var i = e.getTextureMatrix(); + t.updateMatrix(n + "Matrix", i); + }), + (e.GetFogState = function (e, t) { + return t.fogEnabled && e.applyFog && t.fogMode !== r.a.FOGMODE_NONE; + }), + (e.PrepareDefinesForMisc = function (e, t, n, i, r, o, a) { + a._areMiscDirty && ((a.LOGARITHMICDEPTH = n), (a.POINTSIZE = i), (a.FOG = r && this.GetFogState(e, t)), (a.NONUNIFORMSCALING = e.nonUniformScaling), (a.ALPHATEST = o)); + }), + (e.PrepareDefinesForFrameBoundValues = function (e, t, n, i, r) { + void 0 === r && (r = null); + var o, + a, + s, + c, + l, + u, + h = !1; + (o = null == r ? void 0 !== e.clipPlane && null !== e.clipPlane : r), + (a = null == r ? void 0 !== e.clipPlane2 && null !== e.clipPlane2 : r), + (s = null == r ? void 0 !== e.clipPlane3 && null !== e.clipPlane3 : r), + (c = null == r ? void 0 !== e.clipPlane4 && null !== e.clipPlane4 : r), + (l = null == r ? void 0 !== e.clipPlane5 && null !== e.clipPlane5 : r), + (u = null == r ? void 0 !== e.clipPlane6 && null !== e.clipPlane6 : r), + n.CLIPPLANE !== o && ((n.CLIPPLANE = o), (h = !0)), + n.CLIPPLANE2 !== a && ((n.CLIPPLANE2 = a), (h = !0)), + n.CLIPPLANE3 !== s && ((n.CLIPPLANE3 = s), (h = !0)), + n.CLIPPLANE4 !== c && ((n.CLIPPLANE4 = c), (h = !0)), + n.CLIPPLANE5 !== l && ((n.CLIPPLANE5 = l), (h = !0)), + n.CLIPPLANE6 !== u && ((n.CLIPPLANE6 = u), (h = !0)), + n.DEPTHPREPASS !== !t.getColorWrite() && ((n.DEPTHPREPASS = !n.DEPTHPREPASS), (h = !0)), + n.INSTANCES !== i && ((n.INSTANCES = i), (h = !0)), + h && n.markAsUnprocessed(); + }), + (e.PrepareDefinesForBones = function (e, t) { + if (e.useBones && e.computeBonesUsingShaders && e.skeleton) { + t.NUM_BONE_INFLUENCERS = e.numBoneInfluencers; + var n = void 0 !== t.BONETEXTURE; + e.skeleton.isUsingTextureForMatrices && n ? (t.BONETEXTURE = !0) : ((t.BonesPerMesh = e.skeleton.bones.length + 1), (t.BONETEXTURE = !n && void 0)); + } else (t.NUM_BONE_INFLUENCERS = 0), (t.BonesPerMesh = 0); + }), + (e.PrepareDefinesForMorphTargets = function (e, t) { + var n = e.morphTargetManager; + n + ? ((t.MORPHTARGETS_UV = n.supportsUVs && t.UV1), + (t.MORPHTARGETS_TANGENT = n.supportsTangents && t.TANGENT), + (t.MORPHTARGETS_NORMAL = n.supportsNormals && t.NORMAL), + (t.MORPHTARGETS = n.numInfluencers > 0), + (t.NUM_MORPH_INFLUENCERS = n.numInfluencers)) + : ((t.MORPHTARGETS_UV = !1), (t.MORPHTARGETS_TANGENT = !1), (t.MORPHTARGETS_NORMAL = !1), (t.MORPHTARGETS = !1), (t.NUM_MORPH_INFLUENCERS = 0)); + }), + (e.PrepareDefinesForAttributes = function (e, t, n, i, r, o) { + if ((void 0 === r && (r = !1), void 0 === o && (o = !0), !t._areAttributesDirty && t._needNormals === t._normals && t._needUVs === t._uvs)) return !1; + if ( + ((t._normals = t._needNormals), + (t._uvs = t._needUVs), + (t.NORMAL = t._needNormals && e.isVerticesDataPresent(a.b.NormalKind)), + t._needNormals && e.isVerticesDataPresent(a.b.TangentKind) && (t.TANGENT = !0), + t._needUVs ? ((t.UV1 = e.isVerticesDataPresent(a.b.UVKind)), (t.UV2 = e.isVerticesDataPresent(a.b.UV2Kind))) : ((t.UV1 = !1), (t.UV2 = !1)), + n) + ) { + var s = e.useVertexColors && e.isVerticesDataPresent(a.b.ColorKind); + (t.VERTEXCOLOR = s), (t.VERTEXALPHA = e.hasVertexAlpha && s && o); + } + return i && this.PrepareDefinesForBones(e, t), r && this.PrepareDefinesForMorphTargets(e, t), !0; + }), + (e.PrepareDefinesForMultiview = function (e, t) { + if (e.activeCamera) { + var n = t.MULTIVIEW; + (t.MULTIVIEW = null !== e.activeCamera.outputRenderTarget && e.activeCamera.outputRenderTarget.getViewCount() > 1), t.MULTIVIEW != n && t.markAsUnprocessed(); + } + }), + (e.PrepareDefinesForLight = function (e, t, n, i, r, o, a) { + switch ( + ((a.needNormals = !0), + void 0 === r["LIGHT" + i] && (a.needRebuild = !0), + (r["LIGHT" + i] = !0), + (r["SPOTLIGHT" + i] = !1), + (r["HEMILIGHT" + i] = !1), + (r["POINTLIGHT" + i] = !1), + (r["DIRLIGHT" + i] = !1), + n.prepareLightSpecificDefines(r, i), + (r["LIGHT_FALLOFF_PHYSICAL" + i] = !1), + (r["LIGHT_FALLOFF_GLTF" + i] = !1), + (r["LIGHT_FALLOFF_STANDARD" + i] = !1), + n.falloffType) + ) { + case s.a.FALLOFF_GLTF: + r["LIGHT_FALLOFF_GLTF" + i] = !0; + break; + case s.a.FALLOFF_PHYSICAL: + r["LIGHT_FALLOFF_PHYSICAL" + i] = !0; + break; + case s.a.FALLOFF_STANDARD: + r["LIGHT_FALLOFF_STANDARD" + i] = !0; + } + if ( + (o && !n.specular.equalsFloats(0, 0, 0) && (a.specularEnabled = !0), + (r["SHADOW" + i] = !1), + (r["SHADOWCSM" + i] = !1), + (r["SHADOWCSMDEBUG" + i] = !1), + (r["SHADOWCSMNUM_CASCADES" + i] = !1), + (r["SHADOWCSMUSESHADOWMAXZ" + i] = !1), + (r["SHADOWCSMNOBLEND" + i] = !1), + (r["SHADOWCSM_RIGHTHANDED" + i] = !1), + (r["SHADOWPCF" + i] = !1), + (r["SHADOWPCSS" + i] = !1), + (r["SHADOWPOISSON" + i] = !1), + (r["SHADOWESM" + i] = !1), + (r["SHADOWCUBE" + i] = !1), + (r["SHADOWLOWQUALITY" + i] = !1), + (r["SHADOWMEDIUMQUALITY" + i] = !1), + t && t.receiveShadows && e.shadowsEnabled && n.shadowEnabled) + ) { + var c = n.getShadowGenerator(); + if (c) { + var l = c.getShadowMap(); + l && l.renderList && l.renderList.length > 0 && ((a.shadowEnabled = !0), c.prepareDefines(r, i)); + } + } + n.lightmapMode != s.a.LIGHTMAP_DEFAULT + ? ((a.lightmapMode = !0), (r["LIGHTMAPEXCLUDED" + i] = !0), (r["LIGHTMAPNOSPECULAR" + i] = n.lightmapMode == s.a.LIGHTMAP_SHADOWSONLY)) + : ((r["LIGHTMAPEXCLUDED" + i] = !1), (r["LIGHTMAPNOSPECULAR" + i] = !1)); + }), + (e.PrepareDefinesForLights = function (e, t, n, i, r, o) { + if ((void 0 === r && (r = 4), void 0 === o && (o = !1), !n._areLightsDirty)) return n._needNormals; + var a = 0, + s = { needNormals: !1, needRebuild: !1, lightmapMode: !1, shadowEnabled: !1, specularEnabled: !1 }; + if (e.lightsEnabled && !o) + for (var c = 0, l = t.lightSources; c < l.length; c++) { + var u = l[c]; + if ((this.PrepareDefinesForLight(e, t, u, a, n, i, s), ++a === r)) break; + } + (n.SPECULARTERM = s.specularEnabled), (n.SHADOWS = s.shadowEnabled); + for (var h = a; h < r; h++) + void 0 !== n["LIGHT" + h] && + ((n["LIGHT" + h] = !1), + (n["HEMILIGHT" + h] = !1), + (n["POINTLIGHT" + h] = !1), + (n["DIRLIGHT" + h] = !1), + (n["SPOTLIGHT" + h] = !1), + (n["SHADOW" + h] = !1), + (n["SHADOWCSM" + h] = !1), + (n["SHADOWCSMDEBUG" + h] = !1), + (n["SHADOWCSMNUM_CASCADES" + h] = !1), + (n["SHADOWCSMUSESHADOWMAXZ" + h] = !1), + (n["SHADOWCSMNOBLEND" + h] = !1), + (n["SHADOWCSM_RIGHTHANDED" + h] = !1), + (n["SHADOWPCF" + h] = !1), + (n["SHADOWPCSS" + h] = !1), + (n["SHADOWPOISSON" + h] = !1), + (n["SHADOWESM" + h] = !1), + (n["SHADOWCUBE" + h] = !1), + (n["SHADOWLOWQUALITY" + h] = !1), + (n["SHADOWMEDIUMQUALITY" + h] = !1)); + var d = e.getEngine().getCaps(); + return ( + void 0 === n.SHADOWFLOAT && (s.needRebuild = !0), + (n.SHADOWFLOAT = s.shadowEnabled && ((d.textureFloatRender && d.textureFloatLinearFiltering) || (d.textureHalfFloatRender && d.textureHalfFloatLinearFiltering))), + (n.LIGHTMAPEXCLUDED = s.lightmapMode), + s.needRebuild && n.rebuild(), + s.needNormals + ); + }), + (e.PrepareUniformsAndSamplersForLight = function (e, t, n, i, r) { + void 0 === r && (r = null), + t.push("vLightData" + e, "vLightDiffuse" + e, "vLightSpecular" + e, "vLightDirection" + e, "vLightFalloff" + e, "vLightGround" + e, "lightMatrix" + e, "shadowsInfo" + e, "depthValues" + e), + r && r.push("Light" + e), + n.push("shadowSampler" + e), + n.push("depthSampler" + e), + t.push("viewFrustumZ" + e, "cascadeBlendFactor" + e, "lightSizeUVCorrection" + e, "depthCorrection" + e, "penumbraDarkness" + e, "frustumLengths" + e), + i && (n.push("projectionLightSampler" + e), t.push("textureProjectionMatrix" + e)); + }), + (e.PrepareUniformsAndSamplersList = function (e, t, n, i) { + var r; + void 0 === i && (i = 4); + var o = null; + if (e.uniformsNames) { + var a = e; + (r = a.uniformsNames), (o = a.uniformBuffersNames), (t = a.samplers), (n = a.defines), (i = a.maxSimultaneousLights || 0); + } else (r = e), t || (t = []); + for (var s = 0; s < i && n["LIGHT" + s]; s++) this.PrepareUniformsAndSamplersForLight(s, r, t, n["PROJECTEDLIGHTTEXTURE" + s], o); + n.NUM_MORPH_INFLUENCERS && r.push("morphTargetInfluences"); + }), + (e.HandleFallbacksForShadows = function (e, t, n, i) { + void 0 === n && (n = 4), void 0 === i && (i = 0); + for (var r = 0, o = 0; o < n && e["LIGHT" + o]; o++) + o > 0 && ((r = i + o), t.addFallback(r, "LIGHT" + o)), + e.SHADOWS || + (e["SHADOW" + o] && t.addFallback(i, "SHADOW" + o), + e["SHADOWPCF" + o] && t.addFallback(i, "SHADOWPCF" + o), + e["SHADOWPCSS" + o] && t.addFallback(i, "SHADOWPCSS" + o), + e["SHADOWPOISSON" + o] && t.addFallback(i, "SHADOWPOISSON" + o), + e["SHADOWESM" + o] && t.addFallback(i, "SHADOWESM" + o)); + return r++; + }), + (e.PrepareAttributesForMorphTargetsInfluencers = function (e, t, n) { + (this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS = n), this.PrepareAttributesForMorphTargets(e, t, this._TmpMorphInfluencers); + }), + (e.PrepareAttributesForMorphTargets = function (e, t, n) { + var r = n.NUM_MORPH_INFLUENCERS; + if (r > 0 && o.a.LastCreatedEngine) + for ( + var s = o.a.LastCreatedEngine.getCaps().maxVertexAttribs, c = t.morphTargetManager, l = c && c.supportsNormals && n.NORMAL, u = c && c.supportsTangents && n.TANGENT, h = c && c.supportsUVs && n.UV1, d = 0; + d < r; + d++ + ) + e.push(a.b.PositionKind + d), + l && e.push(a.b.NormalKind + d), + u && e.push(a.b.TangentKind + d), + h && e.push(a.b.UVKind + "_" + d), + e.length > s && i.a.Error("Cannot add more vertex attributes for mesh " + t.name); + }), + (e.PrepareAttributesForBones = function (e, t, n, i) { + n.NUM_BONE_INFLUENCERS > 0 && + (i.addCPUSkinningFallback(0, t), e.push(a.b.MatricesIndicesKind), e.push(a.b.MatricesWeightsKind), n.NUM_BONE_INFLUENCERS > 4 && (e.push(a.b.MatricesIndicesExtraKind), e.push(a.b.MatricesWeightsExtraKind))); + }), + (e.PrepareAttributesForInstances = function (e, t) { + t.INSTANCES && this.PushAttributesForInstances(e); + }), + (e.PushAttributesForInstances = function (e) { + e.push("world0"), e.push("world1"), e.push("world2"), e.push("world3"); + }), + (e.BindLightProperties = function (e, t, n) { + e.transferToEffect(t, n + ""); + }), + (e.BindLight = function (e, t, n, i, r, o) { + void 0 === o && (o = !1), e._bindLight(t, n, i, r, o); + }), + (e.BindLights = function (e, t, n, i, r, o) { + void 0 === r && (r = 4), void 0 === o && (o = !1); + for (var a = Math.min(t.lightSources.length, r), s = 0; s < a; s++) { + var c = t.lightSources[s]; + this.BindLight(c, s, e, n, "boolean" == typeof i ? i : i.SPECULARTERM, o); + } + }), + (e.BindFogParameters = function (e, t, n, i) { + void 0 === i && (i = !1), + e.fogEnabled && + t.applyFog && + e.fogMode !== r.a.FOGMODE_NONE && + (n.setFloat4("vFogInfos", e.fogMode, e.fogStart, e.fogEnd, e.fogDensity), + i ? (e.fogColor.toLinearSpaceToRef(this._tempFogColor), n.setColor3("vFogColor", this._tempFogColor)) : n.setColor3("vFogColor", e.fogColor)); + }), + (e.BindBonesParameters = function (e, t) { + if (t && e && (e.computeBonesUsingShaders && t._bonesComputationForcedToCPU && (e.computeBonesUsingShaders = !1), e.useBones && e.computeBonesUsingShaders && e.skeleton)) { + var n = e.skeleton; + if (n.isUsingTextureForMatrices && t.getUniformIndex("boneTextureWidth") > -1) { + var i = n.getTransformMatrixTexture(e); + t.setTexture("boneSampler", i), t.setFloat("boneTextureWidth", 4 * (n.bones.length + 1)); + } else { + var r = n.getTransformMatrices(e); + r && t.setMatrices("mBones", r); + } + } + }), + (e.BindMorphTargetParameters = function (e, t) { + var n = e.morphTargetManager; + e && n && t.setFloatArray("morphTargetInfluences", n.influences); + }), + (e.BindLogDepth = function (e, t, n) { + e.LOGARITHMICDEPTH && t.setFloat("logarithmicDepthConstant", 2 / (Math.log(n.activeCamera.maxZ + 1) / Math.LN2)); + }), + (e.BindClipPlane = function (e, t) { + if (t.clipPlane) { + var n = t.clipPlane; + e.setFloat4("vClipPlane", n.normal.x, n.normal.y, n.normal.z, n.d); + } + if (t.clipPlane2) { + n = t.clipPlane2; + e.setFloat4("vClipPlane2", n.normal.x, n.normal.y, n.normal.z, n.d); + } + if (t.clipPlane3) { + n = t.clipPlane3; + e.setFloat4("vClipPlane3", n.normal.x, n.normal.y, n.normal.z, n.d); + } + if (t.clipPlane4) { + n = t.clipPlane4; + e.setFloat4("vClipPlane4", n.normal.x, n.normal.y, n.normal.z, n.d); + } + if (t.clipPlane5) { + n = t.clipPlane5; + e.setFloat4("vClipPlane5", n.normal.x, n.normal.y, n.normal.z, n.d); + } + if (t.clipPlane6) { + n = t.clipPlane6; + e.setFloat4("vClipPlane6", n.normal.x, n.normal.y, n.normal.z, n.d); + } + }), + (e._TmpMorphInfluencers = { NUM_MORPH_INFLUENCERS: 0 }), + (e._tempFogColor = c.a.Black()), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return g; + }), + n.d(t, "c", function () { + return b; + }), + n.d(t, "a", function () { + return _; + }); + var i = n(6), + r = n(56), + o = n(10), + a = n(51), + s = n(76), + c = n(22), + l = n(97), + u = n(25), + h = n(74), + d = n(186), + p = n(169), + f = n(164), + m = n(204), + g = (function () { + function e() {} + return ( + Object.defineProperty(e, "BaseUrl", { + get: function () { + return h.a.BaseUrl; + }, + set: function (e) { + h.a.BaseUrl = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "DefaultRetryStrategy", { + get: function () { + return h.a.DefaultRetryStrategy; + }, + set: function (e) { + h.a.DefaultRetryStrategy = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "UseFallbackTexture", { + get: function () { + return u.a.UseFallbackTexture; + }, + set: function (e) { + u.a.UseFallbackTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "RegisteredExternalClasses", { + get: function () { + return f.a.RegisteredExternalClasses; + }, + set: function (e) { + f.a.RegisteredExternalClasses = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "fallbackTexture", { + get: function () { + return u.a.FallbackTexture; + }, + set: function (e) { + u.a.FallbackTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.FetchToRef = function (e, t, n, i, r, o) { + var a = 4 * (((Math.abs(e) * n) % n | 0) + ((Math.abs(t) * i) % i | 0) * n); + (o.r = r[a] / 255), (o.g = r[a + 1] / 255), (o.b = r[a + 2] / 255), (o.a = r[a + 3] / 255); + }), + (e.Mix = function (e, t, n) { + return e * (1 - n) + t * n; + }), + (e.Instantiate = function (e) { + return f.a.Instantiate(e); + }), + (e.Slice = function (e, t, n) { + return e.slice ? e.slice(t, n) : Array.prototype.slice.call(e, t, n); + }), + (e.SetImmediate = function (e) { + p.a.SetImmediate(e); + }), + (e.IsExponentOfTwo = function (e) { + var t = 1; + do { + t *= 2; + } while (t < e); + return t === e; + }), + (e.FloatRound = function (t) { + return Math.fround ? Math.fround(t) : (e._tmpFloatArray[0] = t); + }), + (e.GetFilename = function (e) { + var t = e.lastIndexOf("/"); + return t < 0 ? e : e.substring(t + 1); + }), + (e.GetFolderPath = function (e, t) { + void 0 === t && (t = !1); + var n = e.lastIndexOf("/"); + return n < 0 ? (t ? e : "") : e.substring(0, n + 1); + }), + (e.ToDegrees = function (e) { + return (180 * e) / Math.PI; + }), + (e.ToRadians = function (e) { + return (e * Math.PI) / 180; + }), + (e.MakeArray = function (e, t) { + return !0 === t || (void 0 !== e && null != e) ? (Array.isArray(e) ? e : [e]) : null; + }), + (e.GetPointerPrefix = function () { + var e = "pointer"; + return r.a.IsWindowObjectExist() && !window.PointerEvent && r.a.IsNavigatorAvailable() && !navigator.pointerEnabled && (e = "mouse"), e; + }), + (e.SetCorsBehavior = function (e, t) { + h.a.SetCorsBehavior(e, t); + }), + (e.CleanUrl = function (e) { + return (e = e.replace(/#/gm, "%23")); + }), + Object.defineProperty(e, "PreprocessUrl", { + get: function () { + return h.a.PreprocessUrl; + }, + set: function (e) { + h.a.PreprocessUrl = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.LoadImage = function (e, t, n, i, r) { + return h.a.LoadImage(e, t, n, i, r); + }), + (e.LoadFile = function (e, t, n, i, r, o) { + return h.a.LoadFile(e, t, n, i, r, o); + }), + (e.LoadFileAsync = function (e, t) { + return ( + void 0 === t && (t = !0), + new Promise(function (n, i) { + h.a.LoadFile( + e, + function (e) { + n(e); + }, + void 0, + void 0, + t, + function (e, t) { + i(t); + } + ); + }) + ); + }), + (e.LoadScript = function (e, t, n, i) { + if (r.a.IsWindowObjectExist()) { + var o = document.getElementsByTagName("head")[0], + a = document.createElement("script"); + a.setAttribute("type", "text/javascript"), + a.setAttribute("src", e), + i && (a.id = i), + (a.onload = function () { + t && t(); + }), + (a.onerror = function (t) { + n && n("Unable to load script '" + e + "'", t); + }), + o.appendChild(a); + } + }), + (e.LoadScriptAsync = function (e, t) { + var n = this; + return new Promise(function (t, i) { + n.LoadScript( + e, + function () { + t(); + }, + function (e, t) { + i(t); + } + ); + }); + }), + (e.ReadFileAsDataURL = function (e, t, n) { + var r = new FileReader(), + o = { + onCompleteObservable: new i.c(), + abort: function () { + return r.abort(); + }, + }; + return ( + (r.onloadend = function (e) { + o.onCompleteObservable.notifyObservers(o); + }), + (r.onload = function (e) { + t(e.target.result); + }), + (r.onprogress = n), + r.readAsDataURL(e), + o + ); + }), + (e.ReadFile = function (e, t, n, i, r) { + return h.a.ReadFile(e, t, n, i, r); + }), + (e.FileAsURL = function (e) { + var t = new Blob([e]); + return (window.URL || window.webkitURL).createObjectURL(t); + }), + (e.Format = function (e, t) { + return void 0 === t && (t = 2), e.toFixed(t); + }), + (e.DeepCopy = function (e, t, n, i) { + a.a.DeepCopy(e, t, n, i); + }), + (e.IsEmpty = function (e) { + for (var t in e) if (e.hasOwnProperty(t)) return !1; + return !0; + }), + (e.RegisterTopRootEvents = function (e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + e.addEventListener(i.name, i.handler, !1); + try { + window.parent && window.parent.addEventListener(i.name, i.handler, !1); + } catch (e) {} + } + }), + (e.UnregisterTopRootEvents = function (e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + e.removeEventListener(i.name, i.handler); + try { + e.parent && e.parent.removeEventListener(i.name, i.handler); + } catch (e) {} + } + }), + (e.DumpFramebuffer = function (t, n, i, r, o, a) { + void 0 === o && (o = "image/png"); + for (var s = 4 * t, c = n / 2, l = i.readPixels(0, 0, t, n), u = 0; u < c; u++) + for (var h = 0; h < s; h++) { + var d = h + u * s, + p = h + (n - u - 1) * s, + f = l[d]; + (l[d] = l[p]), (l[p] = f); + } + e._ScreenshotCanvas || (e._ScreenshotCanvas = document.createElement("canvas")), (e._ScreenshotCanvas.width = t), (e._ScreenshotCanvas.height = n); + var m = e._ScreenshotCanvas.getContext("2d"); + if (m) { + var g = m.createImageData(t, n); + g.data.set(l), m.putImageData(g, 0, 0), e.EncodeScreenshotCanvasData(r, o, a); + } + }), + (e.ToBlob = function (e, t, n) { + void 0 === n && (n = "image/png"), + e.toBlob || + (e.toBlob = function (e, t, n) { + var i = this; + setTimeout(function () { + for (var r = atob(i.toDataURL(t, n).split(",")[1]), o = r.length, a = new Uint8Array(o), s = 0; s < o; s++) a[s] = r.charCodeAt(s); + e(new Blob([a])); + }); + }), + e.toBlob(function (e) { + t(e); + }, n); + }), + (e.EncodeScreenshotCanvasData = function (t, n, i) { + (void 0 === n && (n = "image/png"), t) + ? t(e._ScreenshotCanvas.toDataURL(n)) + : this.ToBlob( + e._ScreenshotCanvas, + function (t) { + if ("download" in document.createElement("a")) { + if (!i) { + var n = new Date(), + r = (n.getFullYear() + "-" + (n.getMonth() + 1)).slice(2) + "-" + n.getDate() + "_" + n.getHours() + "-" + ("0" + n.getMinutes()).slice(-2); + i = "screenshot_" + r + ".png"; + } + e.Download(t, i); + } else { + var o = URL.createObjectURL(t), + a = window.open(""); + if (!a) return; + var s = a.document.createElement("img"); + (s.onload = function () { + URL.revokeObjectURL(o); + }), + (s.src = o), + a.document.body.appendChild(s); + } + }, + n + ); + }), + (e.Download = function (e, t) { + if (navigator && navigator.msSaveBlob) navigator.msSaveBlob(e, t); + else { + var n = window.URL.createObjectURL(e), + i = document.createElement("a"); + document.body.appendChild(i), + (i.style.display = "none"), + (i.href = n), + (i.download = t), + i.addEventListener("click", function () { + i.parentElement && i.parentElement.removeChild(i); + }), + i.click(), + window.URL.revokeObjectURL(n); + } + }), + (e.CreateScreenshot = function (e, t, n, i, r) { + throw (void 0 === r && (r = "image/png"), c.a.WarnImport("ScreenshotTools")); + }), + (e.CreateScreenshotAsync = function (e, t, n, i) { + throw (void 0 === i && (i = "image/png"), c.a.WarnImport("ScreenshotTools")); + }), + (e.CreateScreenshotUsingRenderTarget = function (e, t, n, i, r, o, a, s) { + throw (void 0 === r && (r = "image/png"), void 0 === o && (o = 1), void 0 === a && (a = !1), c.a.WarnImport("ScreenshotTools")); + }), + (e.CreateScreenshotUsingRenderTargetAsync = function (e, t, n, i, r, o, a) { + throw (void 0 === i && (i = "image/png"), void 0 === r && (r = 1), void 0 === o && (o = !1), c.a.WarnImport("ScreenshotTools")); + }), + (e.RandomId = function () { + return m.a.RandomId(); + }), + (e.IsBase64 = function (e) { + return !(e.length < 5) && "data:" === e.substr(0, 5); + }), + (e.DecodeBase64 = function (e) { + for (var t = atob(e.split(",")[1]), n = t.length, i = new Uint8Array(new ArrayBuffer(n)), r = 0; r < n; r++) i[r] = t.charCodeAt(r); + return i.buffer; + }), + (e.GetAbsoluteUrl = function (e) { + var t = document.createElement("a"); + return (t.href = e), t.href; + }), + Object.defineProperty(e, "errorsCount", { + get: function () { + return o.a.errorsCount; + }, + enumerable: !0, + configurable: !0, + }), + (e.Log = function (e) { + o.a.Log(e); + }), + (e.Warn = function (e) { + o.a.Warn(e); + }), + (e.Error = function (e) { + o.a.Error(e); + }), + Object.defineProperty(e, "LogCache", { + get: function () { + return o.a.LogCache; + }, + enumerable: !0, + configurable: !0, + }), + (e.ClearLogCache = function () { + o.a.ClearLogCache(); + }), + Object.defineProperty(e, "LogLevels", { + set: function (e) { + o.a.LogLevels = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "PerformanceLogLevel", { + set: function (t) { + return (t & e.PerformanceUserMarkLogLevel) === e.PerformanceUserMarkLogLevel + ? ((e.StartPerformanceCounter = e._StartUserMark), void (e.EndPerformanceCounter = e._EndUserMark)) + : (t & e.PerformanceConsoleLogLevel) === e.PerformanceConsoleLogLevel + ? ((e.StartPerformanceCounter = e._StartPerformanceConsole), void (e.EndPerformanceCounter = e._EndPerformanceConsole)) + : ((e.StartPerformanceCounter = e._StartPerformanceCounterDisabled), void (e.EndPerformanceCounter = e._EndPerformanceCounterDisabled)); + }, + enumerable: !0, + configurable: !0, + }), + (e._StartPerformanceCounterDisabled = function (e, t) {}), + (e._EndPerformanceCounterDisabled = function (e, t) {}), + (e._StartUserMark = function (t, n) { + if ((void 0 === n && (n = !0), !e._performance)) { + if (!r.a.IsWindowObjectExist()) return; + e._performance = window.performance; + } + n && e._performance.mark && e._performance.mark(t + "-Begin"); + }), + (e._EndUserMark = function (t, n) { + void 0 === n && (n = !0), n && e._performance.mark && (e._performance.mark(t + "-End"), e._performance.measure(t, t + "-Begin", t + "-End")); + }), + (e._StartPerformanceConsole = function (t, n) { + void 0 === n && (n = !0), n && (e._StartUserMark(t, n), console.time); + }), + (e._EndPerformanceConsole = function (t, n) { + void 0 === n && (n = !0), n && e._EndUserMark(t, n); + }), + Object.defineProperty(e, "Now", { + get: function () { + return s.a.Now; + }, + enumerable: !0, + configurable: !0, + }), + (e.GetClassName = function (e, t) { + void 0 === t && (t = !1); + var n = null; + if (!t && e.getClassName) n = e.getClassName(); + else { + if (e instanceof Object) n = (t ? e : Object.getPrototypeOf(e)).constructor.__bjsclassName__; + n || (n = typeof e); + } + return n; + }), + (e.First = function (e, t) { + for (var n = 0, i = e; n < i.length; n++) { + var r = i[n]; + if (t(r)) return r; + } + return null; + }), + (e.getFullClassName = function (e, t) { + void 0 === t && (t = !1); + var n = null, + i = null; + if (!t && e.getClassName) n = e.getClassName(); + else { + if (e instanceof Object) { + var r = t ? e : Object.getPrototypeOf(e); + (n = r.constructor.__bjsclassName__), (i = r.constructor.__bjsmoduleName__); + } + n || (n = typeof e); + } + return n ? (null != i ? i + "." : "") + n : null; + }), + (e.DelayAsync = function (e) { + return new Promise(function (t) { + setTimeout(function () { + t(); + }, e); + }); + }), + (e.IsSafari = function () { + return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + }), + (e.UseCustomRequestHeaders = !1), + (e.CustomRequestHeaders = l.a.CustomRequestHeaders), + (e.CorsBehavior = "anonymous"), + (e._tmpFloatArray = new Float32Array(1)), + (e.GetDOMTextContent = r.a.GetDOMTextContent), + (e.NoneLogLevel = o.a.NoneLogLevel), + (e.MessageLogLevel = o.a.MessageLogLevel), + (e.WarningLogLevel = o.a.WarningLogLevel), + (e.ErrorLogLevel = o.a.ErrorLogLevel), + (e.AllLogLevel = o.a.AllLogLevel), + (e.IsWindowObjectExist = r.a.IsWindowObjectExist), + (e.PerformanceNoneLogLevel = 0), + (e.PerformanceUserMarkLogLevel = 1), + (e.PerformanceConsoleLogLevel = 2), + (e.StartPerformanceCounter = e._StartPerformanceCounterDisabled), + (e.EndPerformanceCounter = e._EndPerformanceCounterDisabled), + e + ); + })(); + function b(e, t) { + return function (n) { + (n.__bjsclassName__ = e), (n.__bjsmoduleName__ = null != t ? t : null); + }; + } + var _ = (function () { + function e(e, t, n, i) { + void 0 === i && (i = 0), (this.iterations = e), (this.index = i - 1), (this._done = !1), (this._fn = t), (this._successCallback = n); + } + return ( + (e.prototype.executeNext = function () { + this._done || (this.index + 1 < this.iterations ? (++this.index, this._fn(this)) : this.breakLoop()); + }), + (e.prototype.breakLoop = function () { + (this._done = !0), this._successCallback(); + }), + (e.Run = function (t, n, i, r) { + void 0 === r && (r = 0); + var o = new e(t, n, i, r); + return o.executeNext(), o; + }), + (e.SyncAsyncForLoop = function (t, n, i, r, o, a) { + return ( + void 0 === a && (a = 0), + e.Run( + Math.ceil(t / n), + function (e) { + o && o() + ? e.breakLoop() + : setTimeout(function () { + for (var r = 0; r < n; ++r) { + var a = e.index * n + r; + if (a >= t) break; + if ((i(a), o && o())) { + e.breakLoop(); + break; + } + } + e.executeNext(); + }, a); + }, + r + ) + ); + }), + e + ); + })(); + (u.a.FallbackTexture = + "data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z"), + d.a.Apply(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.GetClass = function (e) { + return this.RegisteredTypes && this.RegisteredTypes[e] ? this.RegisteredTypes[e] : null; + }), + (e.RegisteredTypes = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return p; + }); + var i = n(2), + r = n(6), + o = n(56), + a = n(25), + s = n(22), + c = n(38), + l = n(187), + u = n(69), + h = n(126), + d = n(10); + (c.a.prototype.setAlphaConstants = function (e, t, n, i) { + this._alphaState.setAlphaBlendConstants(e, t, n, i); + }), + (c.a.prototype.setAlphaMode = function (e, t) { + if ((void 0 === t && (t = !1), this._alphaMode !== e)) { + switch (e) { + case 0: + this._alphaState.alphaBlend = !1; + break; + case 7: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 8: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA), (this._alphaState.alphaBlend = !0); + break; + case 2: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 6: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ZERO, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 1: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 3: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 4: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR, this._gl.ZERO, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 5: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 9: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR, this._gl.ONE_MINUS_CONSTANT_COLOR, this._gl.CONSTANT_ALPHA, this._gl.ONE_MINUS_CONSTANT_ALPHA), (this._alphaState.alphaBlend = !0); + break; + case 10: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA), (this._alphaState.alphaBlend = !0); + break; + case 11: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ONE), (this._alphaState.alphaBlend = !0); + break; + case 12: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ZERO), (this._alphaState.alphaBlend = !0); + break; + case 13: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE_MINUS_DST_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA), (this._alphaState.alphaBlend = !0); + break; + case 14: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA), (this._alphaState.alphaBlend = !0); + break; + case 15: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ZERO), (this._alphaState.alphaBlend = !0); + break; + case 16: + this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ZERO, this._gl.ONE), (this._alphaState.alphaBlend = !0); + } + t || (this.depthCullingState.depthMask = 0 === e), (this._alphaMode = e); + } + }), + (c.a.prototype.getAlphaMode = function () { + return this._alphaMode; + }), + (c.a.prototype.setAlphaEquation = function (e) { + if (this._alphaEquation !== e) { + switch (e) { + case 0: + this._alphaState.setAlphaEquationParameters(this._gl.FUNC_ADD, this._gl.FUNC_ADD); + break; + case 1: + this._alphaState.setAlphaEquationParameters(this._gl.FUNC_SUBTRACT, this._gl.FUNC_SUBTRACT); + break; + case 2: + this._alphaState.setAlphaEquationParameters(this._gl.FUNC_REVERSE_SUBTRACT, this._gl.FUNC_REVERSE_SUBTRACT); + break; + case 3: + this._alphaState.setAlphaEquationParameters(this._gl.MAX, this._gl.MAX); + break; + case 4: + this._alphaState.setAlphaEquationParameters(this._gl.MIN, this._gl.MIN); + break; + case 5: + this._alphaState.setAlphaEquationParameters(this._gl.MIN, this._gl.FUNC_ADD); + } + this._alphaEquation = e; + } + }), + (c.a.prototype.getAlphaEquation = function () { + return this._alphaEquation; + }); + var p = (function (e) { + function t(n, i, a, s) { + void 0 === s && (s = !1); + var c = e.call(this, n, i, a, s) || this; + if ( + ((c.enableOfflineSupport = !1), + (c.disableManifestCheck = !1), + (c.scenes = new Array()), + (c.onNewSceneAddedObservable = new r.c()), + (c.postProcesses = new Array()), + (c.isPointerLock = !1), + (c.onResizeObservable = new r.c()), + (c.onCanvasBlurObservable = new r.c()), + (c.onCanvasFocusObservable = new r.c()), + (c.onCanvasPointerOutObservable = new r.c()), + (c.onBeginFrameObservable = new r.c()), + (c.customAnimationFrameRequester = null), + (c.onEndFrameObservable = new r.c()), + (c.onBeforeShaderCompilationObservable = new r.c()), + (c.onAfterShaderCompilationObservable = new r.c()), + (c._deterministicLockstep = !1), + (c._lockstepMaxSteps = 4), + (c._timeStep = 1 / 60), + (c._fps = 60), + (c._deltaTime = 0), + (c._drawCalls = new u.a()), + (c.canvasTabIndex = 1), + (c.disablePerformanceMonitorInBackground = !1), + (c._performanceMonitor = new l.a()), + !n) + ) + return c; + if (((a = c._creationOptions), t.Instances.push(c), n.getContext)) { + var h = n; + if ( + ((c._onCanvasFocus = function () { + c.onCanvasFocusObservable.notifyObservers(c); + }), + (c._onCanvasBlur = function () { + c.onCanvasBlurObservable.notifyObservers(c); + }), + h.addEventListener("focus", c._onCanvasFocus), + h.addEventListener("blur", c._onCanvasBlur), + (c._onBlur = function () { + c.disablePerformanceMonitorInBackground && c._performanceMonitor.disable(), (c._windowIsBackground = !0); + }), + (c._onFocus = function () { + c.disablePerformanceMonitorInBackground && c._performanceMonitor.enable(), (c._windowIsBackground = !1); + }), + (c._onCanvasPointerOut = function (e) { + c.onCanvasPointerOutObservable.notifyObservers(e); + }), + h.addEventListener("pointerout", c._onCanvasPointerOut), + o.a.IsWindowObjectExist()) + ) { + var d = c.getHostWindow(); + d.addEventListener("blur", c._onBlur), d.addEventListener("focus", c._onFocus); + var p = document; + (c._onFullscreenChange = function () { + void 0 !== p.fullscreen + ? (c.isFullscreen = p.fullscreen) + : void 0 !== p.mozFullScreen + ? (c.isFullscreen = p.mozFullScreen) + : void 0 !== p.webkitIsFullScreen + ? (c.isFullscreen = p.webkitIsFullScreen) + : void 0 !== p.msIsFullScreen && (c.isFullscreen = p.msIsFullScreen), + c.isFullscreen && c._pointerLockRequested && h && t._RequestPointerlock(h); + }), + document.addEventListener("fullscreenchange", c._onFullscreenChange, !1), + document.addEventListener("mozfullscreenchange", c._onFullscreenChange, !1), + document.addEventListener("webkitfullscreenchange", c._onFullscreenChange, !1), + document.addEventListener("msfullscreenchange", c._onFullscreenChange, !1), + (c._onPointerLockChange = function () { + c.isPointerLock = p.mozPointerLockElement === h || p.webkitPointerLockElement === h || p.msPointerLockElement === h || p.pointerLockElement === h; + }), + document.addEventListener("pointerlockchange", c._onPointerLockChange, !1), + document.addEventListener("mspointerlockchange", c._onPointerLockChange, !1), + document.addEventListener("mozpointerlockchange", c._onPointerLockChange, !1), + document.addEventListener("webkitpointerlockchange", c._onPointerLockChange, !1), + !t.audioEngine && a.audioEngine && t.AudioEngineFactory && (t.audioEngine = t.AudioEngineFactory(c.getRenderingCanvas())); + } + c._connectVREvents(), + (c.enableOfflineSupport = void 0 !== t.OfflineProviderFactory), + a.doNotHandleTouchAction || c._disableTouchAction(), + (c._deterministicLockstep = !!a.deterministicLockstep), + (c._lockstepMaxSteps = a.lockstepMaxSteps || 0), + (c._timeStep = a.timeStep || 1 / 60); + } + return c._prepareVRComponent(), a.autoEnableWebVR && c.initWebVR(), c; + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t, "NpmPackage", { + get: function () { + return c.a.NpmPackage; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "Version", { + get: function () { + return c.a.Version; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "Instances", { + get: function () { + return a.a.Instances; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "LastCreatedEngine", { + get: function () { + return a.a.LastCreatedEngine; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "LastCreatedScene", { + get: function () { + return a.a.LastCreatedScene; + }, + enumerable: !0, + configurable: !0, + }), + (t.MarkAllMaterialsAsDirty = function (e, n) { + for (var i = 0; i < t.Instances.length; i++) for (var r = t.Instances[i], o = 0; o < r.scenes.length; o++) r.scenes[o].markAllMaterialsAsDirty(e, n); + }), + (t.DefaultLoadingScreenFactory = function (e) { + throw s.a.WarnImport("LoadingScreen"); + }), + Object.defineProperty(t.prototype, "_supportsHardwareTextureRescaling", { + get: function () { + return !!t._RescalePostProcessFactory; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "performanceMonitor", { + get: function () { + return this._performanceMonitor; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getInputElement = function () { + return this._renderingCanvas; + }), + (t.prototype.getAspectRatio = function (e, t) { + void 0 === t && (t = !1); + var n = e.viewport; + return (this.getRenderWidth(t) * n.width) / (this.getRenderHeight(t) * n.height); + }), + (t.prototype.getScreenAspectRatio = function () { + return this.getRenderWidth(!0) / this.getRenderHeight(!0); + }), + (t.prototype.getRenderingCanvasClientRect = function () { + return this._renderingCanvas ? this._renderingCanvas.getBoundingClientRect() : null; + }), + (t.prototype.getInputElementClientRect = function () { + return this._renderingCanvas ? this.getInputElement().getBoundingClientRect() : null; + }), + (t.prototype.isDeterministicLockStep = function () { + return this._deterministicLockstep; + }), + (t.prototype.getLockstepMaxSteps = function () { + return this._lockstepMaxSteps; + }), + (t.prototype.getTimeStep = function () { + return 1e3 * this._timeStep; + }), + (t.prototype.generateMipMapsForCubemap = function (e, t) { + if ((void 0 === t && (t = !0), e.generateMipMaps)) { + var n = this._gl; + this._bindTextureDirectly(n.TEXTURE_CUBE_MAP, e, !0), n.generateMipmap(n.TEXTURE_CUBE_MAP), t && this._bindTextureDirectly(n.TEXTURE_CUBE_MAP, null); + } + }), + (t.prototype.setState = function (e, t, n, i) { + void 0 === t && (t = 0), void 0 === i && (i = !1), (this._depthCullingState.cull !== e || n) && (this._depthCullingState.cull = e); + var r = this.cullBackFaces ? this._gl.BACK : this._gl.FRONT; + (this._depthCullingState.cullFace !== r || n) && (this._depthCullingState.cullFace = r), this.setZOffset(t); + var o = i ? this._gl.CW : this._gl.CCW; + (this._depthCullingState.frontFace !== o || n) && (this._depthCullingState.frontFace = o); + }), + (t.prototype.setZOffset = function (e) { + this._depthCullingState.zOffset = e; + }), + (t.prototype.getZOffset = function () { + return this._depthCullingState.zOffset; + }), + (t.prototype.setDepthBuffer = function (e) { + this._depthCullingState.depthTest = e; + }), + (t.prototype.getDepthWrite = function () { + return this._depthCullingState.depthMask; + }), + (t.prototype.setDepthWrite = function (e) { + this._depthCullingState.depthMask = e; + }), + (t.prototype.getStencilBuffer = function () { + return this._stencilState.stencilTest; + }), + (t.prototype.setStencilBuffer = function (e) { + this._stencilState.stencilTest = e; + }), + (t.prototype.getStencilMask = function () { + return this._stencilState.stencilMask; + }), + (t.prototype.setStencilMask = function (e) { + this._stencilState.stencilMask = e; + }), + (t.prototype.getStencilFunction = function () { + return this._stencilState.stencilFunc; + }), + (t.prototype.getStencilFunctionReference = function () { + return this._stencilState.stencilFuncRef; + }), + (t.prototype.getStencilFunctionMask = function () { + return this._stencilState.stencilFuncMask; + }), + (t.prototype.setStencilFunction = function (e) { + this._stencilState.stencilFunc = e; + }), + (t.prototype.setStencilFunctionReference = function (e) { + this._stencilState.stencilFuncRef = e; + }), + (t.prototype.setStencilFunctionMask = function (e) { + this._stencilState.stencilFuncMask = e; + }), + (t.prototype.getStencilOperationFail = function () { + return this._stencilState.stencilOpStencilFail; + }), + (t.prototype.getStencilOperationDepthFail = function () { + return this._stencilState.stencilOpDepthFail; + }), + (t.prototype.getStencilOperationPass = function () { + return this._stencilState.stencilOpStencilDepthPass; + }), + (t.prototype.setStencilOperationFail = function (e) { + this._stencilState.stencilOpStencilFail = e; + }), + (t.prototype.setStencilOperationDepthFail = function (e) { + this._stencilState.stencilOpDepthFail = e; + }), + (t.prototype.setStencilOperationPass = function (e) { + this._stencilState.stencilOpStencilDepthPass = e; + }), + (t.prototype.setDitheringState = function (e) { + e ? this._gl.enable(this._gl.DITHER) : this._gl.disable(this._gl.DITHER); + }), + (t.prototype.setRasterizerState = function (e) { + e ? this._gl.disable(this._gl.RASTERIZER_DISCARD) : this._gl.enable(this._gl.RASTERIZER_DISCARD); + }), + (t.prototype.getDepthFunction = function () { + return this._depthCullingState.depthFunc; + }), + (t.prototype.setDepthFunction = function (e) { + this._depthCullingState.depthFunc = e; + }), + (t.prototype.setDepthFunctionToGreater = function () { + this._depthCullingState.depthFunc = this._gl.GREATER; + }), + (t.prototype.setDepthFunctionToGreaterOrEqual = function () { + this._depthCullingState.depthFunc = this._gl.GEQUAL; + }), + (t.prototype.setDepthFunctionToLess = function () { + this._depthCullingState.depthFunc = this._gl.LESS; + }), + (t.prototype.setDepthFunctionToLessOrEqual = function () { + this._depthCullingState.depthFunc = this._gl.LEQUAL; + }), + (t.prototype.cacheStencilState = function () { + (this._cachedStencilBuffer = this.getStencilBuffer()), + (this._cachedStencilFunction = this.getStencilFunction()), + (this._cachedStencilMask = this.getStencilMask()), + (this._cachedStencilOperationPass = this.getStencilOperationPass()), + (this._cachedStencilOperationFail = this.getStencilOperationFail()), + (this._cachedStencilOperationDepthFail = this.getStencilOperationDepthFail()), + (this._cachedStencilReference = this.getStencilFunctionReference()); + }), + (t.prototype.restoreStencilState = function () { + this.setStencilFunction(this._cachedStencilFunction), + this.setStencilMask(this._cachedStencilMask), + this.setStencilBuffer(this._cachedStencilBuffer), + this.setStencilOperationPass(this._cachedStencilOperationPass), + this.setStencilOperationFail(this._cachedStencilOperationFail), + this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail), + this.setStencilFunctionReference(this._cachedStencilReference); + }), + (t.prototype.setDirectViewport = function (e, t, n, i) { + var r = this._cachedViewport; + return (this._cachedViewport = null), this._viewport(e, t, n, i), r; + }), + (t.prototype.scissorClear = function (e, t, n, i, r) { + this.enableScissor(e, t, n, i), this.clear(r, !0, !0, !0), this.disableScissor(); + }), + (t.prototype.enableScissor = function (e, t, n, i) { + var r = this._gl; + r.enable(r.SCISSOR_TEST), r.scissor(e, t, n, i); + }), + (t.prototype.disableScissor = function () { + var e = this._gl; + e.disable(e.SCISSOR_TEST); + }), + (t.prototype._reportDrawCall = function () { + this._drawCalls.addCount(1, !1); + }), + (t.prototype.initWebVR = function () { + throw s.a.WarnImport("WebVRCamera"); + }), + (t.prototype._prepareVRComponent = function () {}), + (t.prototype._connectVREvents = function (e, t) {}), + (t.prototype._submitVRFrame = function () {}), + (t.prototype.disableVR = function () {}), + (t.prototype.isVRPresenting = function () { + return !1; + }), + (t.prototype._requestVRFrame = function () {}), + (t.prototype._loadFileAsync = function (e, t, n) { + var i = this; + return new Promise(function (r, o) { + i._loadFile( + e, + function (e) { + r(e); + }, + void 0, + t, + n, + function (e, t) { + o(t); + } + ); + }); + }), + (t.prototype.getVertexShaderSource = function (e) { + var t = this._gl.getAttachedShaders(e); + return t ? this._gl.getShaderSource(t[0]) : null; + }), + (t.prototype.getFragmentShaderSource = function (e) { + var t = this._gl.getAttachedShaders(e); + return t ? this._gl.getShaderSource(t[1]) : null; + }), + (t.prototype.setDepthStencilTexture = function (e, t, n) { + void 0 !== e && (t && (this._boundUniforms[e] = t), n && n.depthStencilTexture ? this._setTexture(e, n, !1, !0) : this._setTexture(e, null)); + }), + (t.prototype.setTextureFromPostProcess = function (e, t) { + this._bindTexture(e, t ? t._textures.data[t._currentRenderTextureInd] : null); + }), + (t.prototype.setTextureFromPostProcessOutput = function (e, t) { + this._bindTexture(e, t ? t._outputTexture : null); + }), + (t.prototype._convertRGBtoRGBATextureData = function (e, t, n, i) { + var r; + r = 1 === i ? new Float32Array(t * n * 4) : new Uint32Array(t * n * 4); + for (var o = 0; o < t; o++) + for (var a = 0; a < n; a++) { + var s = 3 * (a * t + o), + c = 4 * (a * t + o); + (r[c + 0] = e[s + 0]), (r[c + 1] = e[s + 1]), (r[c + 2] = e[s + 2]), (r[c + 3] = 1); + } + return r; + }), + (t.prototype._rebuildBuffers = function () { + for (var t = 0, n = this.scenes; t < n.length; t++) { + var i = n[t]; + i.resetCachedMaterial(), i._rebuildGeometries(), i._rebuildTextures(); + } + e.prototype._rebuildBuffers.call(this); + }), + (t.prototype._renderFrame = function () { + for (var e = 0; e < this._activeRenderLoops.length; e++) { + (0, this._activeRenderLoops[e])(); + } + }), + (t.prototype._renderLoop = function () { + if (!this._contextWasLost) { + var e = !0; + !this.renderEvenInBackground && this._windowIsBackground && (e = !1), e && (this.beginFrame(), this._renderViews() || this._renderFrame(), this.endFrame()); + } + this._activeRenderLoops.length > 0 + ? this.customAnimationFrameRequester + ? ((this.customAnimationFrameRequester.requestID = this._queueNewFrame(this.customAnimationFrameRequester.renderFunction || this._boundRenderFunction, this.customAnimationFrameRequester)), + (this._frameHandler = this.customAnimationFrameRequester.requestID)) + : this.isVRPresenting() + ? this._requestVRFrame() + : (this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow())) + : (this._renderingQueueLaunched = !1); + }), + (t.prototype._renderViews = function () { + return !1; + }), + (t.prototype.switchFullscreen = function (e) { + this.isFullscreen ? this.exitFullscreen() : this.enterFullscreen(e); + }), + (t.prototype.enterFullscreen = function (e) { + this.isFullscreen || ((this._pointerLockRequested = e), this._renderingCanvas && t._RequestFullscreen(this._renderingCanvas)); + }), + (t.prototype.exitFullscreen = function () { + this.isFullscreen && t._ExitFullscreen(); + }), + (t.prototype.enterPointerlock = function () { + this._renderingCanvas && t._RequestPointerlock(this._renderingCanvas); + }), + (t.prototype.exitPointerlock = function () { + t._ExitPointerlock(); + }), + (t.prototype.beginFrame = function () { + this._measureFps(), this.onBeginFrameObservable.notifyObservers(this), e.prototype.beginFrame.call(this); + }), + (t.prototype.endFrame = function () { + e.prototype.endFrame.call(this), this._submitVRFrame(), this.onEndFrameObservable.notifyObservers(this); + }), + (t.prototype.resize = function () { + this.isVRPresenting() || e.prototype.resize.call(this); + }), + (t.prototype.setSize = function (t, n) { + if (this._renderingCanvas && (e.prototype.setSize.call(this, t, n), this.scenes)) { + for (var i = 0; i < this.scenes.length; i++) + for (var r = this.scenes[i], o = 0; o < r.cameras.length; o++) { + r.cameras[o]._currentRenderId = 0; + } + this.onResizeObservable.hasObservers && this.onResizeObservable.notifyObservers(this); + } + }), + (t.prototype.updateDynamicVertexBuffer = function (e, t, n, i) { + this.bindArrayBuffer(e), void 0 === n && (n = 0); + var r = t.length || t.byteLength; + void 0 === i || (i >= r && 0 === n) + ? t instanceof Array + ? this._gl.bufferSubData(this._gl.ARRAY_BUFFER, n, new Float32Array(t)) + : this._gl.bufferSubData(this._gl.ARRAY_BUFFER, n, t) + : t instanceof Array + ? this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(t).subarray(n, n + i)) + : ((t = t instanceof ArrayBuffer ? new Uint8Array(t, n, i) : new Uint8Array(t.buffer, t.byteOffset + n, i)), this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, t)), + this._resetVertexBufferBinding(); + }), + (t.prototype._deletePipelineContext = function (t) { + var n = t; + n && n.program && n.transformFeedback && (this.deleteTransformFeedback(n.transformFeedback), (n.transformFeedback = null)), e.prototype._deletePipelineContext.call(this, t); + }), + (t.prototype.createShaderProgram = function (t, n, i, r, o, a) { + void 0 === a && (a = null), (o = o || this._gl), this.onBeforeShaderCompilationObservable.notifyObservers(this); + var s = e.prototype.createShaderProgram.call(this, t, n, i, r, o, a); + return this.onAfterShaderCompilationObservable.notifyObservers(this), s; + }), + (t.prototype._createShaderProgram = function (e, t, n, i, r) { + void 0 === r && (r = null); + var o = i.createProgram(); + if (((e.program = o), !o)) throw new Error("Unable to create program"); + if ((i.attachShader(o, t), i.attachShader(o, n), this.webGLVersion > 1 && r)) { + var a = this.createTransformFeedback(); + this.bindTransformFeedback(a), this.setTranformFeedbackVaryings(o, r), (e.transformFeedback = a); + } + return i.linkProgram(o), this.webGLVersion > 1 && r && this.bindTransformFeedback(null), (e.context = i), (e.vertexShader = t), (e.fragmentShader = n), e.isParallelCompiled || this._finalizePipelineContext(e), o; + }), + (t.prototype._releaseTexture = function (t) { + e.prototype._releaseTexture.call(this, t), + this.scenes.forEach(function (e) { + e.postProcesses.forEach(function (e) { + e._outputTexture == t && (e._outputTexture = null); + }), + e.cameras.forEach(function (e) { + e._postProcesses.forEach(function (e) { + e && e._outputTexture == t && (e._outputTexture = null); + }); + }); + }); + }), + (t.prototype._rescaleTexture = function (e, n, i, r, o) { + var a = this; + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR), + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, this._gl.LINEAR), + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._gl.CLAMP_TO_EDGE), + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE); + var s = this.createRenderTargetTexture({ width: n.width, height: n.height }, { generateMipMaps: !1, type: 0, samplingMode: 2, generateDepthBuffer: !1, generateStencilBuffer: !1 }); + !this._rescalePostProcess && t._RescalePostProcessFactory && (this._rescalePostProcess = t._RescalePostProcessFactory(this)), + this._rescalePostProcess.getEffect().executeWhenCompiled(function () { + a._rescalePostProcess.onApply = function (t) { + t._bindTexture("textureSampler", e); + }; + var t = i; + t || (t = a.scenes[a.scenes.length - 1]), + t.postProcessManager.directRender([a._rescalePostProcess], s, !0), + a._bindTextureDirectly(a._gl.TEXTURE_2D, n, !0), + a._gl.copyTexImage2D(a._gl.TEXTURE_2D, 0, r, 0, 0, n.width, n.height, 0), + a.unBindFramebuffer(s), + a._releaseTexture(s), + o && o(); + }); + }), + (t.prototype.getFps = function () { + return this._fps; + }), + (t.prototype.getDeltaTime = function () { + return this._deltaTime; + }), + (t.prototype._measureFps = function () { + this._performanceMonitor.sampleFrame(), (this._fps = this._performanceMonitor.averageFPS), (this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0); + }), + (t.prototype._uploadImageToTexture = function (e, t, n, i) { + void 0 === n && (n = 0), void 0 === i && (i = 0); + var r = this._gl, + o = this._getWebGLTextureType(e.type), + a = this._getInternalFormat(e.format), + s = this._getRGBABufferInternalSizedFormat(e.type, a), + c = e.isCube ? r.TEXTURE_CUBE_MAP : r.TEXTURE_2D; + this._bindTextureDirectly(c, e, !0), this._unpackFlipY(e.invertY); + var l = r.TEXTURE_2D; + e.isCube && (l = r.TEXTURE_CUBE_MAP_POSITIVE_X + n), r.texImage2D(l, i, s, a, o, t), this._bindTextureDirectly(c, null, !0); + }), + (t.prototype.updateDynamicIndexBuffer = function (e, t, n) { + var i; + void 0 === n && (n = 0), + (this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER] = null), + this.bindIndexBuffer(e), + (i = t instanceof Uint16Array || t instanceof Uint32Array ? t : e.is32Bits ? new Uint32Array(t) : new Uint16Array(t)), + this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, i, this._gl.DYNAMIC_DRAW), + this._resetIndexBufferBinding(); + }), + (t.prototype.updateRenderTargetTextureSampleCount = function (e, t) { + if (this.webGLVersion < 2 || !e) return 1; + if (e.samples === t) return t; + var n = this._gl; + if ( + ((t = Math.min(t, this.getCaps().maxMSAASamples)), + e._depthStencilBuffer && (n.deleteRenderbuffer(e._depthStencilBuffer), (e._depthStencilBuffer = null)), + e._MSAAFramebuffer && (n.deleteFramebuffer(e._MSAAFramebuffer), (e._MSAAFramebuffer = null)), + e._MSAARenderBuffer && (n.deleteRenderbuffer(e._MSAARenderBuffer), (e._MSAARenderBuffer = null)), + t > 1 && n.renderbufferStorageMultisample) + ) { + var i = n.createFramebuffer(); + if (!i) throw new Error("Unable to create multi sampled framebuffer"); + (e._MSAAFramebuffer = i), this._bindUnboundFramebuffer(e._MSAAFramebuffer); + var r = n.createRenderbuffer(); + if (!r) throw new Error("Unable to create multi sampled framebuffer"); + n.bindRenderbuffer(n.RENDERBUFFER, r), + n.renderbufferStorageMultisample(n.RENDERBUFFER, t, this._getRGBAMultiSampleBufferFormat(e.type), e.width, e.height), + n.framebufferRenderbuffer(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.RENDERBUFFER, r), + (e._MSAARenderBuffer = r); + } else this._bindUnboundFramebuffer(e._framebuffer); + return (e.samples = t), (e._depthStencilBuffer = this._setupFramebufferDepthAttachments(e._generateStencilBuffer, e._generateDepthBuffer, e.width, e.height, t)), this._bindUnboundFramebuffer(null), t; + }), + (t.prototype.updateTextureComparisonFunction = function (e, t) { + if (1 !== this.webGLVersion) { + var n = this._gl; + e.isCube + ? (this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, e, !0), + 0 === t + ? (n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_COMPARE_FUNC, 515), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_COMPARE_MODE, n.NONE)) + : (n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_COMPARE_FUNC, t), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE)), + this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null)) + : (this._bindTextureDirectly(this._gl.TEXTURE_2D, e, !0), + 0 === t + ? (n.texParameteri(n.TEXTURE_2D, n.TEXTURE_COMPARE_FUNC, 515), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_COMPARE_MODE, n.NONE)) + : (n.texParameteri(n.TEXTURE_2D, n.TEXTURE_COMPARE_FUNC, t), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE)), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null)), + (e._comparisonFunction = t); + } else d.a.Error("WebGL 1 does not support texture comparison."); + }), + (t.prototype.createInstancesBuffer = function (e) { + var t = this._gl.createBuffer(); + if (!t) throw new Error("Unable to create instance buffer"); + var n = new h.a(t); + return (n.capacity = e), this.bindArrayBuffer(n), this._gl.bufferData(this._gl.ARRAY_BUFFER, e, this._gl.DYNAMIC_DRAW), n; + }), + (t.prototype.deleteInstancesBuffer = function (e) { + this._gl.deleteBuffer(e); + }), + (t.prototype._clientWaitAsync = function (e, t, n) { + void 0 === t && (t = 0), void 0 === n && (n = 10); + var i = this._gl; + return new Promise(function (r, o) { + var a = function () { + var s = i.clientWaitSync(e, t, 0); + s != i.WAIT_FAILED ? (s != i.TIMEOUT_EXPIRED ? r() : setTimeout(a, n)) : o(); + }; + a(); + }); + }), + (t.prototype._readPixelsAsync = function (e, t, n, i, r, o, a) { + if (this._webGLVersion < 2) throw new Error("_readPixelsAsync only work on WebGL2+"); + var s = this._gl, + c = s.createBuffer(); + s.bindBuffer(s.PIXEL_PACK_BUFFER, c), s.bufferData(s.PIXEL_PACK_BUFFER, a.byteLength, s.STREAM_READ), s.readPixels(e, t, n, i, r, o, 0), s.bindBuffer(s.PIXEL_PACK_BUFFER, null); + var l = s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE, 0); + return l + ? (s.flush(), + this._clientWaitAsync(l, 0, 10).then(function () { + return s.deleteSync(l), s.bindBuffer(s.PIXEL_PACK_BUFFER, c), s.getBufferSubData(s.PIXEL_PACK_BUFFER, 0, a), s.bindBuffer(s.PIXEL_PACK_BUFFER, null), s.deleteBuffer(c), a; + })) + : null; + }), + (t.prototype._readTexturePixels = function (e, t, n, i, r, o) { + void 0 === i && (i = -1), void 0 === r && (r = 0), void 0 === o && (o = null); + var a = this._gl; + if (!this._dummyFramebuffer) { + var s = a.createFramebuffer(); + if (!s) throw new Error("Unable to create dummy framebuffer"); + this._dummyFramebuffer = s; + } + a.bindFramebuffer(a.FRAMEBUFFER, this._dummyFramebuffer), + i > -1 + ? a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_CUBE_MAP_POSITIVE_X + i, e._webGLTexture, r) + : a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, e._webGLTexture, r); + var c = void 0 !== e.type ? this._getWebGLTextureType(e.type) : a.UNSIGNED_BYTE; + switch (c) { + case a.UNSIGNED_BYTE: + o || (o = new Uint8Array(4 * t * n)), (c = a.UNSIGNED_BYTE); + break; + default: + o || (o = new Float32Array(4 * t * n)), (c = a.FLOAT); + } + return a.readPixels(0, 0, t, n, a.RGBA, c, o), a.bindFramebuffer(a.FRAMEBUFFER, this._currentFramebuffer), o; + }), + (t.prototype.dispose = function () { + for (this.hideLoadingUI(), this.onNewSceneAddedObservable.clear(); this.postProcesses.length; ) this.postProcesses[0].dispose(); + for (this._rescalePostProcess && this._rescalePostProcess.dispose(); this.scenes.length; ) this.scenes[0].dispose(); + 1 === t.Instances.length && t.audioEngine && t.audioEngine.dispose(), + this._dummyFramebuffer && this._gl.deleteFramebuffer(this._dummyFramebuffer), + this.disableVR(), + o.a.IsWindowObjectExist() && + (window.removeEventListener("blur", this._onBlur), + window.removeEventListener("focus", this._onFocus), + this._renderingCanvas && + (this._renderingCanvas.removeEventListener("focus", this._onCanvasFocus), + this._renderingCanvas.removeEventListener("blur", this._onCanvasBlur), + this._renderingCanvas.removeEventListener("pointerout", this._onCanvasPointerOut)), + document.removeEventListener("fullscreenchange", this._onFullscreenChange), + document.removeEventListener("mozfullscreenchange", this._onFullscreenChange), + document.removeEventListener("webkitfullscreenchange", this._onFullscreenChange), + document.removeEventListener("msfullscreenchange", this._onFullscreenChange), + document.removeEventListener("pointerlockchange", this._onPointerLockChange), + document.removeEventListener("mspointerlockchange", this._onPointerLockChange), + document.removeEventListener("mozpointerlockchange", this._onPointerLockChange), + document.removeEventListener("webkitpointerlockchange", this._onPointerLockChange)), + e.prototype.dispose.call(this); + var n = t.Instances.indexOf(this); + n >= 0 && t.Instances.splice(n, 1), + this.onResizeObservable.clear(), + this.onCanvasBlurObservable.clear(), + this.onCanvasFocusObservable.clear(), + this.onCanvasPointerOutObservable.clear(), + this.onBeginFrameObservable.clear(), + this.onEndFrameObservable.clear(); + }), + (t.prototype._disableTouchAction = function () { + this._renderingCanvas && + this._renderingCanvas.setAttribute && + (this._renderingCanvas.setAttribute("touch-action", "none"), (this._renderingCanvas.style.touchAction = "none"), (this._renderingCanvas.style.msTouchAction = "none")); + }), + (t.prototype.displayLoadingUI = function () { + if (o.a.IsWindowObjectExist()) { + var e = this.loadingScreen; + e && e.displayLoadingUI(); + } + }), + (t.prototype.hideLoadingUI = function () { + if (o.a.IsWindowObjectExist()) { + var e = this._loadingScreen; + e && e.hideLoadingUI(); + } + }), + Object.defineProperty(t.prototype, "loadingScreen", { + get: function () { + return !this._loadingScreen && this._renderingCanvas && (this._loadingScreen = t.DefaultLoadingScreenFactory(this._renderingCanvas)), this._loadingScreen; + }, + set: function (e) { + this._loadingScreen = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "loadingUIText", { + set: function (e) { + this.loadingScreen.loadingUIText = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "loadingUIBackgroundColor", { + set: function (e) { + this.loadingScreen.loadingUIBackgroundColor = e; + }, + enumerable: !0, + configurable: !0, + }), + (t._RequestPointerlock = function (e) { + (e.requestPointerLock = e.requestPointerLock || e.msRequestPointerLock || e.mozRequestPointerLock || e.webkitRequestPointerLock), e.requestPointerLock && e.requestPointerLock(); + }), + (t._ExitPointerlock = function () { + var e = document; + (document.exitPointerLock = document.exitPointerLock || e.msExitPointerLock || e.mozExitPointerLock || e.webkitExitPointerLock), document.exitPointerLock && document.exitPointerLock(); + }), + (t._RequestFullscreen = function (e) { + var t = e.requestFullscreen || e.msRequestFullscreen || e.webkitRequestFullscreen || e.mozRequestFullScreen; + t && t.call(e); + }), + (t._ExitFullscreen = function () { + var e = document; + document.exitFullscreen ? document.exitFullscreen() : e.mozCancelFullScreen ? e.mozCancelFullScreen() : e.webkitCancelFullScreen ? e.webkitCancelFullScreen() : e.msCancelFullScreen && e.msCancelFullScreen(); + }), + (t.ALPHA_DISABLE = 0), + (t.ALPHA_ADD = 1), + (t.ALPHA_COMBINE = 2), + (t.ALPHA_SUBTRACT = 3), + (t.ALPHA_MULTIPLY = 4), + (t.ALPHA_MAXIMIZED = 5), + (t.ALPHA_ONEONE = 6), + (t.ALPHA_PREMULTIPLIED = 7), + (t.ALPHA_PREMULTIPLIED_PORTERDUFF = 8), + (t.ALPHA_INTERPOLATE = 9), + (t.ALPHA_SCREENMODE = 10), + (t.DELAYLOADSTATE_NONE = 0), + (t.DELAYLOADSTATE_LOADED = 1), + (t.DELAYLOADSTATE_LOADING = 2), + (t.DELAYLOADSTATE_NOTLOADED = 4), + (t.NEVER = 512), + (t.ALWAYS = 519), + (t.LESS = 513), + (t.EQUAL = 514), + (t.LEQUAL = 515), + (t.GREATER = 516), + (t.GEQUAL = 518), + (t.NOTEQUAL = 517), + (t.KEEP = 7680), + (t.REPLACE = 7681), + (t.INCR = 7682), + (t.DECR = 7683), + (t.INVERT = 5386), + (t.INCR_WRAP = 34055), + (t.DECR_WRAP = 34056), + (t.TEXTURE_CLAMP_ADDRESSMODE = 0), + (t.TEXTURE_WRAP_ADDRESSMODE = 1), + (t.TEXTURE_MIRROR_ADDRESSMODE = 2), + (t.TEXTUREFORMAT_ALPHA = 0), + (t.TEXTUREFORMAT_LUMINANCE = 1), + (t.TEXTUREFORMAT_LUMINANCE_ALPHA = 2), + (t.TEXTUREFORMAT_RGB = 4), + (t.TEXTUREFORMAT_RGBA = 5), + (t.TEXTUREFORMAT_RED = 6), + (t.TEXTUREFORMAT_R = 6), + (t.TEXTUREFORMAT_RG = 7), + (t.TEXTUREFORMAT_RED_INTEGER = 8), + (t.TEXTUREFORMAT_R_INTEGER = 8), + (t.TEXTUREFORMAT_RG_INTEGER = 9), + (t.TEXTUREFORMAT_RGB_INTEGER = 10), + (t.TEXTUREFORMAT_RGBA_INTEGER = 11), + (t.TEXTURETYPE_UNSIGNED_BYTE = 0), + (t.TEXTURETYPE_UNSIGNED_INT = 0), + (t.TEXTURETYPE_FLOAT = 1), + (t.TEXTURETYPE_HALF_FLOAT = 2), + (t.TEXTURETYPE_BYTE = 3), + (t.TEXTURETYPE_SHORT = 4), + (t.TEXTURETYPE_UNSIGNED_SHORT = 5), + (t.TEXTURETYPE_INT = 6), + (t.TEXTURETYPE_UNSIGNED_INTEGER = 7), + (t.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8), + (t.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9), + (t.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10), + (t.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11), + (t.TEXTURETYPE_UNSIGNED_INT_24_8 = 12), + (t.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13), + (t.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14), + (t.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15), + (t.TEXTURE_NEAREST_SAMPLINGMODE = 1), + (t.TEXTURE_BILINEAR_SAMPLINGMODE = 2), + (t.TEXTURE_TRILINEAR_SAMPLINGMODE = 3), + (t.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8), + (t.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11), + (t.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3), + (t.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4), + (t.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5), + (t.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6), + (t.TEXTURE_NEAREST_LINEAR = 7), + (t.TEXTURE_NEAREST_NEAREST = 1), + (t.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9), + (t.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10), + (t.TEXTURE_LINEAR_LINEAR = 2), + (t.TEXTURE_LINEAR_NEAREST = 12), + (t.TEXTURE_EXPLICIT_MODE = 0), + (t.TEXTURE_SPHERICAL_MODE = 1), + (t.TEXTURE_PLANAR_MODE = 2), + (t.TEXTURE_CUBIC_MODE = 3), + (t.TEXTURE_PROJECTION_MODE = 4), + (t.TEXTURE_SKYBOX_MODE = 5), + (t.TEXTURE_INVCUBIC_MODE = 6), + (t.TEXTURE_EQUIRECTANGULAR_MODE = 7), + (t.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8), + (t.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9), + (t.SCALEMODE_FLOOR = 1), + (t.SCALEMODE_NEAREST = 2), + (t.SCALEMODE_CEILING = 3), + (t._RescalePostProcessFactory = null), + t + ); + })(c.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.WithinEpsilon = function (e, t, n) { + void 0 === n && (n = 1401298e-51); + var i = e - t; + return -n <= i && i <= n; + }), + (e.ToHex = function (e) { + var t = e.toString(16); + return e <= 15 ? ("0" + t).toUpperCase() : t.toUpperCase(); + }), + (e.Sign = function (e) { + return 0 === (e = +e) || isNaN(e) ? e : e > 0 ? 1 : -1; + }), + (e.Clamp = function (e, t, n) { + return void 0 === t && (t = 0), void 0 === n && (n = 1), Math.min(n, Math.max(t, e)); + }), + (e.Log2 = function (e) { + return Math.log(e) * Math.LOG2E; + }), + (e.Repeat = function (e, t) { + return e - Math.floor(e / t) * t; + }), + (e.Normalize = function (e, t, n) { + return (e - t) / (n - t); + }), + (e.Denormalize = function (e, t, n) { + return e * (n - t) + t; + }), + (e.DeltaAngle = function (t, n) { + var i = e.Repeat(n - t, 360); + return i > 180 && (i -= 360), i; + }), + (e.PingPong = function (t, n) { + var i = e.Repeat(t, 2 * n); + return n - Math.abs(i - n); + }), + (e.SmoothStep = function (t, n, i) { + var r = e.Clamp(i); + return n * (r = -2 * r * r * r + 3 * r * r) + t * (1 - r); + }), + (e.MoveTowards = function (t, n, i) { + return Math.abs(n - t) <= i ? n : t + e.Sign(n - t) * i; + }), + (e.MoveTowardsAngle = function (t, n, i) { + var r = e.DeltaAngle(t, n), + o = 0; + return -i < r && r < i ? (o = n) : ((n = t + r), (o = e.MoveTowards(t, n, i))), o; + }), + (e.Lerp = function (e, t, n) { + return e + (t - e) * n; + }), + (e.LerpAngle = function (t, n, i) { + var r = e.Repeat(n - t, 360); + return r > 180 && (r -= 360), t + r * e.Clamp(i); + }), + (e.InverseLerp = function (t, n, i) { + return t != n ? e.Clamp((i - t) / (n - t)) : 0; + }), + (e.Hermite = function (e, t, n, i, r) { + var o = r * r, + a = r * o; + return e * (2 * a - 3 * o + 1) + n * (-2 * a + 3 * o) + t * (a - 2 * o + r) + i * (a - o); + }), + (e.RandomRange = function (e, t) { + return e === t ? e : Math.random() * (t - e) + e; + }), + (e.RangeToPercent = function (e, t, n) { + return (e - t) / (n - t); + }), + (e.PercentToRange = function (e, t, n) { + return (n - t) * e + t; + }), + (e.NormalizeRadians = function (t) { + return (t -= e.TwoPi * Math.floor((t + Math.PI) / e.TwoPi)); + }), + (e.TwoPi = 2 * Math.PI), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(1), + r = n(4), + o = n(22), + a = n(5), + s = (function () { + function e() {} + return ( + (e.prototype.set = function (e, t) { + switch (t) { + case r.b.PositionKind: + this.positions = e; + break; + case r.b.NormalKind: + this.normals = e; + break; + case r.b.TangentKind: + this.tangents = e; + break; + case r.b.UVKind: + this.uvs = e; + break; + case r.b.UV2Kind: + this.uvs2 = e; + break; + case r.b.UV3Kind: + this.uvs3 = e; + break; + case r.b.UV4Kind: + this.uvs4 = e; + break; + case r.b.UV5Kind: + this.uvs5 = e; + break; + case r.b.UV6Kind: + this.uvs6 = e; + break; + case r.b.ColorKind: + this.colors = e; + break; + case r.b.MatricesIndicesKind: + this.matricesIndices = e; + break; + case r.b.MatricesWeightsKind: + this.matricesWeights = e; + break; + case r.b.MatricesIndicesExtraKind: + this.matricesIndicesExtra = e; + break; + case r.b.MatricesWeightsExtraKind: + this.matricesWeightsExtra = e; + } + }), + (e.prototype.applyToMesh = function (e, t) { + return this._applyTo(e, t), this; + }), + (e.prototype.applyToGeometry = function (e, t) { + return this._applyTo(e, t), this; + }), + (e.prototype.updateMesh = function (e) { + return this._update(e), this; + }), + (e.prototype.updateGeometry = function (e) { + return this._update(e), this; + }), + (e.prototype._applyTo = function (e, t) { + return ( + void 0 === t && (t = !1), + this.positions && e.setVerticesData(r.b.PositionKind, this.positions, t), + this.normals && e.setVerticesData(r.b.NormalKind, this.normals, t), + this.tangents && e.setVerticesData(r.b.TangentKind, this.tangents, t), + this.uvs && e.setVerticesData(r.b.UVKind, this.uvs, t), + this.uvs2 && e.setVerticesData(r.b.UV2Kind, this.uvs2, t), + this.uvs3 && e.setVerticesData(r.b.UV3Kind, this.uvs3, t), + this.uvs4 && e.setVerticesData(r.b.UV4Kind, this.uvs4, t), + this.uvs5 && e.setVerticesData(r.b.UV5Kind, this.uvs5, t), + this.uvs6 && e.setVerticesData(r.b.UV6Kind, this.uvs6, t), + this.colors && e.setVerticesData(r.b.ColorKind, this.colors, t), + this.matricesIndices && e.setVerticesData(r.b.MatricesIndicesKind, this.matricesIndices, t), + this.matricesWeights && e.setVerticesData(r.b.MatricesWeightsKind, this.matricesWeights, t), + this.matricesIndicesExtra && e.setVerticesData(r.b.MatricesIndicesExtraKind, this.matricesIndicesExtra, t), + this.matricesWeightsExtra && e.setVerticesData(r.b.MatricesWeightsExtraKind, this.matricesWeightsExtra, t), + this.indices ? e.setIndices(this.indices, null, t) : e.setIndices([], null), + this + ); + }), + (e.prototype._update = function (e, t, n) { + return ( + this.positions && e.updateVerticesData(r.b.PositionKind, this.positions, t, n), + this.normals && e.updateVerticesData(r.b.NormalKind, this.normals, t, n), + this.tangents && e.updateVerticesData(r.b.TangentKind, this.tangents, t, n), + this.uvs && e.updateVerticesData(r.b.UVKind, this.uvs, t, n), + this.uvs2 && e.updateVerticesData(r.b.UV2Kind, this.uvs2, t, n), + this.uvs3 && e.updateVerticesData(r.b.UV3Kind, this.uvs3, t, n), + this.uvs4 && e.updateVerticesData(r.b.UV4Kind, this.uvs4, t, n), + this.uvs5 && e.updateVerticesData(r.b.UV5Kind, this.uvs5, t, n), + this.uvs6 && e.updateVerticesData(r.b.UV6Kind, this.uvs6, t, n), + this.colors && e.updateVerticesData(r.b.ColorKind, this.colors, t, n), + this.matricesIndices && e.updateVerticesData(r.b.MatricesIndicesKind, this.matricesIndices, t, n), + this.matricesWeights && e.updateVerticesData(r.b.MatricesWeightsKind, this.matricesWeights, t, n), + this.matricesIndicesExtra && e.updateVerticesData(r.b.MatricesIndicesExtraKind, this.matricesIndicesExtra, t, n), + this.matricesWeightsExtra && e.updateVerticesData(r.b.MatricesWeightsExtraKind, this.matricesWeightsExtra, t, n), + this.indices && e.setIndices(this.indices, null), + this + ); + }), + (e.prototype.transform = function (e) { + var t, + n = e.m[0] * e.m[5] * e.m[10] < 0, + r = i.e.Zero(); + if (this.positions) { + var o = i.e.Zero(); + for (t = 0; t < this.positions.length; t += 3) + i.e.FromArrayToRef(this.positions, t, o), i.e.TransformCoordinatesToRef(o, e, r), (this.positions[t] = r.x), (this.positions[t + 1] = r.y), (this.positions[t + 2] = r.z); + } + if (this.normals) { + var a = i.e.Zero(); + for (t = 0; t < this.normals.length; t += 3) i.e.FromArrayToRef(this.normals, t, a), i.e.TransformNormalToRef(a, e, r), (this.normals[t] = r.x), (this.normals[t + 1] = r.y), (this.normals[t + 2] = r.z); + } + if (this.tangents) { + var s = i.f.Zero(), + c = i.f.Zero(); + for (t = 0; t < this.tangents.length; t += 4) + i.f.FromArrayToRef(this.tangents, t, s), i.f.TransformNormalToRef(s, e, c), (this.tangents[t] = c.x), (this.tangents[t + 1] = c.y), (this.tangents[t + 2] = c.z), (this.tangents[t + 3] = c.w); + } + if (n && this.indices) + for (t = 0; t < this.indices.length; t += 3) { + var l = this.indices[t + 1]; + (this.indices[t + 1] = this.indices[t + 2]), (this.indices[t + 2] = l); + } + return this; + }), + (e.prototype.merge = function (e, t) { + if ( + (void 0 === t && (t = !1), + this._validate(), + e._validate(), + !this.normals != !e.normals || + !this.tangents != !e.tangents || + !this.uvs != !e.uvs || + !this.uvs2 != !e.uvs2 || + !this.uvs3 != !e.uvs3 || + !this.uvs4 != !e.uvs4 || + !this.uvs5 != !e.uvs5 || + !this.uvs6 != !e.uvs6 || + !this.colors != !e.colors || + !this.matricesIndices != !e.matricesIndices || + !this.matricesWeights != !e.matricesWeights || + !this.matricesIndicesExtra != !e.matricesIndicesExtra || + !this.matricesWeightsExtra != !e.matricesWeightsExtra) + ) + throw new Error("Cannot merge vertex data that do not have the same set of attributes"); + if (e.indices) { + this.indices || (this.indices = []); + var n = this.positions ? this.positions.length / 3 : 0; + if (void 0 !== this.indices.BYTES_PER_ELEMENT) { + var i = this.indices.length + e.indices.length, + r = t || this.indices instanceof Uint32Array ? new Uint32Array(i) : new Uint16Array(i); + r.set(this.indices); + for (var o = this.indices.length, a = 0; a < e.indices.length; a++) r[o + a] = e.indices[a] + n; + this.indices = r; + } else for (a = 0; a < e.indices.length; a++) this.indices.push(e.indices[a] + n); + } + return ( + (this.positions = this._mergeElement(this.positions, e.positions)), + (this.normals = this._mergeElement(this.normals, e.normals)), + (this.tangents = this._mergeElement(this.tangents, e.tangents)), + (this.uvs = this._mergeElement(this.uvs, e.uvs)), + (this.uvs2 = this._mergeElement(this.uvs2, e.uvs2)), + (this.uvs3 = this._mergeElement(this.uvs3, e.uvs3)), + (this.uvs4 = this._mergeElement(this.uvs4, e.uvs4)), + (this.uvs5 = this._mergeElement(this.uvs5, e.uvs5)), + (this.uvs6 = this._mergeElement(this.uvs6, e.uvs6)), + (this.colors = this._mergeElement(this.colors, e.colors)), + (this.matricesIndices = this._mergeElement(this.matricesIndices, e.matricesIndices)), + (this.matricesWeights = this._mergeElement(this.matricesWeights, e.matricesWeights)), + (this.matricesIndicesExtra = this._mergeElement(this.matricesIndicesExtra, e.matricesIndicesExtra)), + (this.matricesWeightsExtra = this._mergeElement(this.matricesWeightsExtra, e.matricesWeightsExtra)), + this + ); + }), + (e.prototype._mergeElement = function (e, t) { + if (!e) return t; + if (!t) return e; + var n = t.length + e.length, + i = e instanceof Float32Array, + r = t instanceof Float32Array; + if (i) { + var o = new Float32Array(n); + return o.set(e), o.set(t, e.length), o; + } + if (r) { + var a = e.slice(0), + s = 0; + for (n = t.length; s < n; s++) a.push(t[s]); + return a; + } + return e.concat(t); + }), + (e.prototype._validate = function () { + if (!this.positions) throw new Error("Positions are required"); + var e = function (e, t) { + var n = r.b.DeduceStride(e); + if (t.length % n != 0) throw new Error("The " + e + "s array count must be a multiple of " + n); + return t.length / n; + }, + t = e(r.b.PositionKind, this.positions), + n = function (n, i) { + var r = e(n, i); + if (r !== t) throw new Error("The " + n + "s element count (" + r + ") does not match the positions count (" + t + ")"); + }; + this.normals && n(r.b.NormalKind, this.normals), + this.tangents && n(r.b.TangentKind, this.tangents), + this.uvs && n(r.b.UVKind, this.uvs), + this.uvs2 && n(r.b.UV2Kind, this.uvs2), + this.uvs3 && n(r.b.UV3Kind, this.uvs3), + this.uvs4 && n(r.b.UV4Kind, this.uvs4), + this.uvs5 && n(r.b.UV5Kind, this.uvs5), + this.uvs6 && n(r.b.UV6Kind, this.uvs6), + this.colors && n(r.b.ColorKind, this.colors), + this.matricesIndices && n(r.b.MatricesIndicesKind, this.matricesIndices), + this.matricesWeights && n(r.b.MatricesWeightsKind, this.matricesWeights), + this.matricesIndicesExtra && n(r.b.MatricesIndicesExtraKind, this.matricesIndicesExtra), + this.matricesWeightsExtra && n(r.b.MatricesWeightsExtraKind, this.matricesWeightsExtra); + }), + (e.prototype.serialize = function () { + var e = this.serialize(); + return ( + this.positions && (e.positions = this.positions), + this.normals && (e.normals = this.normals), + this.tangents && (e.tangents = this.tangents), + this.uvs && (e.uvs = this.uvs), + this.uvs2 && (e.uvs2 = this.uvs2), + this.uvs3 && (e.uvs3 = this.uvs3), + this.uvs4 && (e.uvs4 = this.uvs4), + this.uvs5 && (e.uvs5 = this.uvs5), + this.uvs6 && (e.uvs6 = this.uvs6), + this.colors && (e.colors = this.colors), + this.matricesIndices && ((e.matricesIndices = this.matricesIndices), (e.matricesIndices._isExpanded = !0)), + this.matricesWeights && (e.matricesWeights = this.matricesWeights), + this.matricesIndicesExtra && ((e.matricesIndicesExtra = this.matricesIndicesExtra), (e.matricesIndicesExtra._isExpanded = !0)), + this.matricesWeightsExtra && (e.matricesWeightsExtra = this.matricesWeightsExtra), + (e.indices = this.indices), + e + ); + }), + (e.ExtractFromMesh = function (t, n, i) { + return e._ExtractFrom(t, n, i); + }), + (e.ExtractFromGeometry = function (t, n, i) { + return e._ExtractFrom(t, n, i); + }), + (e._ExtractFrom = function (t, n, i) { + var o = new e(); + return ( + t.isVerticesDataPresent(r.b.PositionKind) && (o.positions = t.getVerticesData(r.b.PositionKind, n, i)), + t.isVerticesDataPresent(r.b.NormalKind) && (o.normals = t.getVerticesData(r.b.NormalKind, n, i)), + t.isVerticesDataPresent(r.b.TangentKind) && (o.tangents = t.getVerticesData(r.b.TangentKind, n, i)), + t.isVerticesDataPresent(r.b.UVKind) && (o.uvs = t.getVerticesData(r.b.UVKind, n, i)), + t.isVerticesDataPresent(r.b.UV2Kind) && (o.uvs2 = t.getVerticesData(r.b.UV2Kind, n, i)), + t.isVerticesDataPresent(r.b.UV3Kind) && (o.uvs3 = t.getVerticesData(r.b.UV3Kind, n, i)), + t.isVerticesDataPresent(r.b.UV4Kind) && (o.uvs4 = t.getVerticesData(r.b.UV4Kind, n, i)), + t.isVerticesDataPresent(r.b.UV5Kind) && (o.uvs5 = t.getVerticesData(r.b.UV5Kind, n, i)), + t.isVerticesDataPresent(r.b.UV6Kind) && (o.uvs6 = t.getVerticesData(r.b.UV6Kind, n, i)), + t.isVerticesDataPresent(r.b.ColorKind) && (o.colors = t.getVerticesData(r.b.ColorKind, n, i)), + t.isVerticesDataPresent(r.b.MatricesIndicesKind) && (o.matricesIndices = t.getVerticesData(r.b.MatricesIndicesKind, n, i)), + t.isVerticesDataPresent(r.b.MatricesWeightsKind) && (o.matricesWeights = t.getVerticesData(r.b.MatricesWeightsKind, n, i)), + t.isVerticesDataPresent(r.b.MatricesIndicesExtraKind) && (o.matricesIndicesExtra = t.getVerticesData(r.b.MatricesIndicesExtraKind, n, i)), + t.isVerticesDataPresent(r.b.MatricesWeightsExtraKind) && (o.matricesWeightsExtra = t.getVerticesData(r.b.MatricesWeightsExtraKind, n, i)), + (o.indices = t.getIndices(n, i)), + o + ); + }), + (e.CreateRibbon = function (e) { + throw o.a.WarnImport("ribbonBuilder"); + }), + (e.CreateBox = function (e) { + throw o.a.WarnImport("boxBuilder"); + }), + (e.CreateTiledBox = function (e) { + throw o.a.WarnImport("tiledBoxBuilder"); + }), + (e.CreateTiledPlane = function (e) { + throw o.a.WarnImport("tiledPlaneBuilder"); + }), + (e.CreateSphere = function (e) { + throw o.a.WarnImport("sphereBuilder"); + }), + (e.CreateCylinder = function (e) { + throw o.a.WarnImport("cylinderBuilder"); + }), + (e.CreateTorus = function (e) { + throw o.a.WarnImport("torusBuilder"); + }), + (e.CreateLineSystem = function (e) { + throw o.a.WarnImport("linesBuilder"); + }), + (e.CreateDashedLines = function (e) { + throw o.a.WarnImport("linesBuilder"); + }), + (e.CreateGround = function (e) { + throw o.a.WarnImport("groundBuilder"); + }), + (e.CreateTiledGround = function (e) { + throw o.a.WarnImport("groundBuilder"); + }), + (e.CreateGroundFromHeightMap = function (e) { + throw o.a.WarnImport("groundBuilder"); + }), + (e.CreatePlane = function (e) { + throw o.a.WarnImport("planeBuilder"); + }), + (e.CreateDisc = function (e) { + throw o.a.WarnImport("discBuilder"); + }), + (e.CreatePolygon = function (e, t, n, i, r, a) { + throw o.a.WarnImport("polygonBuilder"); + }), + (e.CreateIcoSphere = function (e) { + throw o.a.WarnImport("icoSphereBuilder"); + }), + (e.CreatePolyhedron = function (e) { + throw o.a.WarnImport("polyhedronBuilder"); + }), + (e.CreateTorusKnot = function (e) { + throw o.a.WarnImport("torusKnotBuilder"); + }), + (e.ComputeNormals = function (e, t, n, r) { + var o = 0, + a = 0, + s = 0, + c = 0, + l = 0, + u = 0, + h = 0, + d = 0, + p = 0, + f = 0, + m = 0, + g = 0, + b = 0, + _ = 0, + v = 0, + y = 0, + C = 0, + P = 0, + x = 0, + T = 0, + S = !1, + O = !1, + E = !1, + M = !1, + A = 1, + I = 0, + D = null; + if (r && ((S = !!r.facetNormals), (O = !!r.facetPositions), (E = !!r.facetPartitioning), (A = !0 === r.useRightHandedSystem ? -1 : 1), (I = r.ratio || 0), (M = !!r.depthSort), (D = r.distanceTo), M)) { + void 0 === D && (D = i.e.Zero()); + var R = r.depthSortedFacets; + } + var w = 0, + L = 0, + F = 0, + N = 0; + if (E && r && r.bbSize) { + var k = 0, + z = 0, + j = 0, + B = 0, + V = 0, + G = 0, + U = 0, + H = 0, + W = 0, + X = 0, + Y = 0, + K = 0, + Z = 0, + q = 0, + Q = 0, + J = 0, + $ = r.bbSize.x > r.bbSize.y ? r.bbSize.x : r.bbSize.y; + ($ = $ > r.bbSize.z ? $ : r.bbSize.z), + (w = (r.subDiv.X * I) / r.bbSize.x), + (L = (r.subDiv.Y * I) / r.bbSize.y), + (F = (r.subDiv.Z * I) / r.bbSize.z), + (N = r.subDiv.max * r.subDiv.max), + (r.facetPartitioning.length = 0); + } + for (o = 0; o < e.length; o++) n[o] = 0; + var ee = (t.length / 3) | 0; + for (o = 0; o < ee; o++) { + if ( + ((b = (g = 3 * t[3 * o]) + 1), + (_ = g + 2), + (y = (v = 3 * t[3 * o + 1]) + 1), + (C = v + 2), + (x = (P = 3 * t[3 * o + 2]) + 1), + (T = P + 2), + (a = e[g] - e[v]), + (s = e[b] - e[y]), + (c = e[_] - e[C]), + (l = e[P] - e[v]), + (u = e[x] - e[y]), + (d = A * (s * (h = e[T] - e[C]) - c * u)), + (p = A * (c * l - a * h)), + (f = A * (a * u - s * l)), + (d /= m = 0 === (m = Math.sqrt(d * d + p * p + f * f)) ? 1 : m), + (p /= m), + (f /= m), + S && r && ((r.facetNormals[o].x = d), (r.facetNormals[o].y = p), (r.facetNormals[o].z = f)), + O && r && ((r.facetPositions[o].x = (e[g] + e[v] + e[P]) / 3), (r.facetPositions[o].y = (e[b] + e[y] + e[x]) / 3), (r.facetPositions[o].z = (e[_] + e[C] + e[T]) / 3)), + E && + r && + ((k = Math.floor((r.facetPositions[o].x - r.bInfo.minimum.x * I) * w)), + (z = Math.floor((r.facetPositions[o].y - r.bInfo.minimum.y * I) * L)), + (j = Math.floor((r.facetPositions[o].z - r.bInfo.minimum.z * I) * F)), + (B = Math.floor((e[g] - r.bInfo.minimum.x * I) * w)), + (V = Math.floor((e[b] - r.bInfo.minimum.y * I) * L)), + (G = Math.floor((e[_] - r.bInfo.minimum.z * I) * F)), + (U = Math.floor((e[v] - r.bInfo.minimum.x * I) * w)), + (H = Math.floor((e[y] - r.bInfo.minimum.y * I) * L)), + (W = Math.floor((e[C] - r.bInfo.minimum.z * I) * F)), + (X = Math.floor((e[P] - r.bInfo.minimum.x * I) * w)), + (Y = Math.floor((e[x] - r.bInfo.minimum.y * I) * L)), + (K = Math.floor((e[T] - r.bInfo.minimum.z * I) * F)), + (q = B + r.subDiv.max * V + N * G), + (Q = U + r.subDiv.max * H + N * W), + (J = X + r.subDiv.max * Y + N * K), + (Z = k + r.subDiv.max * z + N * j), + (r.facetPartitioning[Z] = r.facetPartitioning[Z] ? r.facetPartitioning[Z] : new Array()), + (r.facetPartitioning[q] = r.facetPartitioning[q] ? r.facetPartitioning[q] : new Array()), + (r.facetPartitioning[Q] = r.facetPartitioning[Q] ? r.facetPartitioning[Q] : new Array()), + (r.facetPartitioning[J] = r.facetPartitioning[J] ? r.facetPartitioning[J] : new Array()), + r.facetPartitioning[q].push(o), + Q != q && r.facetPartitioning[Q].push(o), + J != Q && J != q && r.facetPartitioning[J].push(o), + Z != q && Z != Q && Z != J && r.facetPartitioning[Z].push(o)), + M && r && r.facetPositions) + ) { + var te = R[o]; + (te.ind = 3 * o), (te.sqDistance = i.e.DistanceSquared(r.facetPositions[o], D)); + } + (n[g] += d), (n[b] += p), (n[_] += f), (n[v] += d), (n[y] += p), (n[C] += f), (n[P] += d), (n[x] += p), (n[T] += f); + } + for (o = 0; o < n.length / 3; o++) + (d = n[3 * o]), (p = n[3 * o + 1]), (f = n[3 * o + 2]), (d /= m = 0 === (m = Math.sqrt(d * d + p * p + f * f)) ? 1 : m), (p /= m), (f /= m), (n[3 * o] = d), (n[3 * o + 1] = p), (n[3 * o + 2] = f); + }), + (e._ComputeSides = function (t, n, r, o, a, s, c) { + var l, + u, + h = r.length, + d = o.length; + switch ((t = t || e.DEFAULTSIDE)) { + case e.FRONTSIDE: + break; + case e.BACKSIDE: + var p; + for (l = 0; l < h; l += 3) (p = r[l]), (r[l] = r[l + 2]), (r[l + 2] = p); + for (u = 0; u < d; u++) o[u] = -o[u]; + break; + case e.DOUBLESIDE: + for (var f = n.length, m = f / 3, g = 0; g < f; g++) n[f + g] = n[g]; + for (l = 0; l < h; l += 3) (r[l + h] = r[l + 2] + m), (r[l + 1 + h] = r[l + 1] + m), (r[l + 2 + h] = r[l] + m); + for (u = 0; u < d; u++) o[d + u] = -o[u]; + var b = a.length, + _ = 0; + for (_ = 0; _ < b; _++) a[_ + b] = a[_]; + for (s = s || new i.f(0, 0, 1, 1), c = c || new i.f(0, 0, 1, 1), _ = 0, l = 0; l < b / 2; l++) + (a[_] = s.x + (s.z - s.x) * a[_]), (a[_ + 1] = s.y + (s.w - s.y) * a[_ + 1]), (a[_ + b] = c.x + (c.z - c.x) * a[_ + b]), (a[_ + b + 1] = c.y + (c.w - c.y) * a[_ + b + 1]), (_ += 2); + } + }), + (e.ImportVertexData = function (t, n) { + var i = new e(), + o = t.positions; + o && i.set(o, r.b.PositionKind); + var s = t.normals; + s && i.set(s, r.b.NormalKind); + var c = t.tangents; + c && i.set(c, r.b.TangentKind); + var l = t.uvs; + l && i.set(l, r.b.UVKind); + var u = t.uv2s; + u && i.set(u, r.b.UV2Kind); + var h = t.uv3s; + h && i.set(h, r.b.UV3Kind); + var d = t.uv4s; + d && i.set(d, r.b.UV4Kind); + var p = t.uv5s; + p && i.set(p, r.b.UV5Kind); + var f = t.uv6s; + f && i.set(f, r.b.UV6Kind); + var m = t.colors; + m && i.set(a.b.CheckColors4(m, o.length / 3), r.b.ColorKind); + var g = t.matricesIndices; + g && i.set(g, r.b.MatricesIndicesKind); + var b = t.matricesWeights; + b && i.set(b, r.b.MatricesWeightsKind); + var _ = t.indices; + _ && (i.indices = _), n.setAllVerticesData(i, t.updatable); + }), + (e.FRONTSIDE = 0), + (e.BACKSIDE = 1), + (e.DOUBLESIDE = 2), + (e.DEFAULTSIDE = 0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(14), + r = (function () { + function e() {} + return ( + Object.defineProperty(e, "DiffuseTextureEnabled", { + get: function () { + return this._DiffuseTextureEnabled; + }, + set: function (e) { + this._DiffuseTextureEnabled !== e && ((this._DiffuseTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "AmbientTextureEnabled", { + get: function () { + return this._AmbientTextureEnabled; + }, + set: function (e) { + this._AmbientTextureEnabled !== e && ((this._AmbientTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "OpacityTextureEnabled", { + get: function () { + return this._OpacityTextureEnabled; + }, + set: function (e) { + this._OpacityTextureEnabled !== e && ((this._OpacityTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ReflectionTextureEnabled", { + get: function () { + return this._ReflectionTextureEnabled; + }, + set: function (e) { + this._ReflectionTextureEnabled !== e && ((this._ReflectionTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "EmissiveTextureEnabled", { + get: function () { + return this._EmissiveTextureEnabled; + }, + set: function (e) { + this._EmissiveTextureEnabled !== e && ((this._EmissiveTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "SpecularTextureEnabled", { + get: function () { + return this._SpecularTextureEnabled; + }, + set: function (e) { + this._SpecularTextureEnabled !== e && ((this._SpecularTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "BumpTextureEnabled", { + get: function () { + return this._BumpTextureEnabled; + }, + set: function (e) { + this._BumpTextureEnabled !== e && ((this._BumpTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "LightmapTextureEnabled", { + get: function () { + return this._LightmapTextureEnabled; + }, + set: function (e) { + this._LightmapTextureEnabled !== e && ((this._LightmapTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "RefractionTextureEnabled", { + get: function () { + return this._RefractionTextureEnabled; + }, + set: function (e) { + this._RefractionTextureEnabled !== e && ((this._RefractionTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ColorGradingTextureEnabled", { + get: function () { + return this._ColorGradingTextureEnabled; + }, + set: function (e) { + this._ColorGradingTextureEnabled !== e && ((this._ColorGradingTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "FresnelEnabled", { + get: function () { + return this._FresnelEnabled; + }, + set: function (e) { + this._FresnelEnabled !== e && ((this._FresnelEnabled = e), i.a.MarkAllMaterialsAsDirty(4)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ClearCoatTextureEnabled", { + get: function () { + return this._ClearCoatTextureEnabled; + }, + set: function (e) { + this._ClearCoatTextureEnabled !== e && ((this._ClearCoatTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ClearCoatBumpTextureEnabled", { + get: function () { + return this._ClearCoatBumpTextureEnabled; + }, + set: function (e) { + this._ClearCoatBumpTextureEnabled !== e && ((this._ClearCoatBumpTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ClearCoatTintTextureEnabled", { + get: function () { + return this._ClearCoatTintTextureEnabled; + }, + set: function (e) { + this._ClearCoatTintTextureEnabled !== e && ((this._ClearCoatTintTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "SheenTextureEnabled", { + get: function () { + return this._SheenTextureEnabled; + }, + set: function (e) { + this._SheenTextureEnabled !== e && ((this._SheenTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "AnisotropicTextureEnabled", { + get: function () { + return this._AnisotropicTextureEnabled; + }, + set: function (e) { + this._AnisotropicTextureEnabled !== e && ((this._AnisotropicTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ThicknessTextureEnabled", { + get: function () { + return this._ThicknessTextureEnabled; + }, + set: function (e) { + this._ThicknessTextureEnabled !== e && ((this._ThicknessTextureEnabled = e), i.a.MarkAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + (e._DiffuseTextureEnabled = !0), + (e._AmbientTextureEnabled = !0), + (e._OpacityTextureEnabled = !0), + (e._ReflectionTextureEnabled = !0), + (e._EmissiveTextureEnabled = !0), + (e._SpecularTextureEnabled = !0), + (e._BumpTextureEnabled = !0), + (e._LightmapTextureEnabled = !0), + (e._RefractionTextureEnabled = !0), + (e._ColorGradingTextureEnabled = !0), + (e._FresnelEnabled = !0), + (e._ClearCoatTextureEnabled = !0), + (e._ClearCoatBumpTextureEnabled = !0), + (e._ClearCoatTintTextureEnabled = !0), + (e._SheenTextureEnabled = !0), + (e._AnisotropicTextureEnabled = !0), + (e._ThicknessTextureEnabled = !0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return k; + }); + var i = n(2), + r = n(12), + o = n(76), + a = n(6), + s = n(47), + c = n(151), + l = n(45), + u = n(1), + h = n(39), + d = n(31), + p = n(26), + f = n(54), + m = n(50), + g = n(124), + b = n(57), + _ = n(81), + v = n(64), + y = n(135), + C = n(136), + P = n(21), + x = n(56), + T = n(10), + S = n(25), + O = n(22), + E = n(20), + M = n(130), + A = n(89), + I = (function () { + function e() { + (this._singleClick = !1), (this._doubleClick = !1), (this._hasSwiped = !1), (this._ignore = !1); + } + return ( + Object.defineProperty(e.prototype, "singleClick", { + get: function () { + return this._singleClick; + }, + set: function (e) { + this._singleClick = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "doubleClick", { + get: function () { + return this._doubleClick; + }, + set: function (e) { + this._doubleClick = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasSwiped", { + get: function () { + return this._hasSwiped; + }, + set: function (e) { + this._hasSwiped = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "ignore", { + get: function () { + return this._ignore; + }, + set: function (e) { + this._ignore = e; + }, + enumerable: !0, + configurable: !0, + }), + e + ); + })(), + D = (function () { + function e(e) { + (this._wheelEventName = ""), + (this._meshPickProceed = !1), + (this._currentPickResult = null), + (this._previousPickResult = null), + (this._totalPointersPressed = 0), + (this._doubleClickOccured = !1), + (this._pointerX = 0), + (this._pointerY = 0), + (this._startingPointerPosition = new u.d(0, 0)), + (this._previousStartingPointerPosition = new u.d(0, 0)), + (this._startingPointerTime = 0), + (this._previousStartingPointerTime = 0), + (this._pointerCaptures = {}), + (this._scene = e); + } + return ( + Object.defineProperty(e.prototype, "meshUnderPointer", { + get: function () { + return this._pointerOverMesh; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "unTranslatedPointer", { + get: function () { + return new u.d(this._unTranslatedPointerX, this._unTranslatedPointerY); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "pointerX", { + get: function () { + return this._pointerX; + }, + set: function (e) { + this._pointerX = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "pointerY", { + get: function () { + return this._pointerY; + }, + set: function (e) { + this._pointerY = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._updatePointerPosition = function (e) { + var t = this._scene.getEngine().getInputElementClientRect(); + t && ((this._pointerX = e.clientX - t.left), (this._pointerY = e.clientY - t.top), (this._unTranslatedPointerX = this._pointerX), (this._unTranslatedPointerY = this._pointerY)); + }), + (e.prototype._processPointerMove = function (e, t) { + var n = this._scene, + i = n.getEngine(), + r = i.getInputElement(); + if (r) { + (r.tabIndex = i.canvasTabIndex), n.doNotHandleCursors || (r.style.cursor = n.defaultCursor); + var o = !!(e && e.hit && e.pickedMesh); + o + ? (n.setPointerOverMesh(e.pickedMesh), + this._pointerOverMesh && + this._pointerOverMesh.actionManager && + this._pointerOverMesh.actionManager.hasPointerTriggers && + (n.doNotHandleCursors || (this._pointerOverMesh.actionManager.hoverCursor ? (r.style.cursor = this._pointerOverMesh.actionManager.hoverCursor) : (r.style.cursor = n.hoverCursor)))) + : n.setPointerOverMesh(null); + for (var a = 0, s = n._pointerMoveStage; a < s.length; a++) { + e = s[a].action(this._unTranslatedPointerX, this._unTranslatedPointerY, e, o, r); + } + if (e) { + var c = t.type === this._wheelEventName ? E.a.POINTERWHEEL : E.a.POINTERMOVE; + if ((n.onPointerMove && n.onPointerMove(t, e, c), n.onPointerObservable.hasObservers())) { + var l = new E.b(c, t, e); + this._setRayOnPointerInfo(l), n.onPointerObservable.notifyObservers(l, c); + } + } + } + }), + (e.prototype._setRayOnPointerInfo = function (e) { + var t = this._scene; + e.pickInfo && !e.pickInfo._pickingUnavailable && (e.pickInfo.ray || (e.pickInfo.ray = t.createPickingRay(e.event.offsetX, e.event.offsetY, u.a.Identity(), t.activeCamera))); + }), + (e.prototype._checkPrePointerObservable = function (e, t, n) { + var i = this._scene, + r = new E.d(n, t, this._unTranslatedPointerX, this._unTranslatedPointerY); + return e && (r.ray = e.ray), i.onPrePointerObservable.notifyObservers(r, n), !!r.skipOnPointerObservable; + }), + (e.prototype.simulatePointerMove = function (e, t) { + var n = new PointerEvent("pointermove", t); + this._checkPrePointerObservable(e, n, E.a.POINTERMOVE) || this._processPointerMove(e, n); + }), + (e.prototype.simulatePointerDown = function (e, t) { + var n = new PointerEvent("pointerdown", t); + this._checkPrePointerObservable(e, n, E.a.POINTERDOWN) || this._processPointerDown(e, n); + }), + (e.prototype._processPointerDown = function (t, n) { + var i = this, + r = this._scene; + if (t && t.hit && t.pickedMesh) { + this._pickedDownMesh = t.pickedMesh; + var o = t.pickedMesh._getActionManagerForTrigger(); + if (o) { + if (o.hasPickTriggers) + switch ((o.processTrigger(5, v.a.CreateNew(t.pickedMesh, n)), n.button)) { + case 0: + o.processTrigger(2, v.a.CreateNew(t.pickedMesh, n)); + break; + case 1: + o.processTrigger(4, v.a.CreateNew(t.pickedMesh, n)); + break; + case 2: + o.processTrigger(3, v.a.CreateNew(t.pickedMesh, n)); + } + o.hasSpecificTrigger(8) && + window.setTimeout(function () { + var t = r.pick( + i._unTranslatedPointerX, + i._unTranslatedPointerY, + function (e) { + return e.isPickable && e.isVisible && e.isReady() && e.actionManager && e.actionManager.hasSpecificTrigger(8) && e == i._pickedDownMesh; + }, + !1, + r.cameraToUseForPointers + ); + t && + t.hit && + t.pickedMesh && + o && + 0 !== i._totalPointersPressed && + Date.now() - i._startingPointerTime > e.LongPressDelay && + !i._isPointerSwiping() && + ((i._startingPointerTime = 0), o.processTrigger(8, v.a.CreateNew(t.pickedMesh, n))); + }, e.LongPressDelay); + } + } else + for (var a = 0, s = r._pointerDownStage; a < s.length; a++) { + t = s[a].action(this._unTranslatedPointerX, this._unTranslatedPointerY, t, n); + } + if (t) { + var c = E.a.POINTERDOWN; + if ((r.onPointerDown && r.onPointerDown(n, t, c), r.onPointerObservable.hasObservers())) { + var l = new E.b(c, n, t); + this._setRayOnPointerInfo(l), r.onPointerObservable.notifyObservers(l, c); + } + } + }), + (e.prototype._isPointerSwiping = function () { + return Math.abs(this._startingPointerPosition.x - this._pointerX) > e.DragMovementThreshold || Math.abs(this._startingPointerPosition.y - this._pointerY) > e.DragMovementThreshold; + }), + (e.prototype.simulatePointerUp = function (e, t, n) { + var i = new PointerEvent("pointerup", t), + r = new I(); + n ? (r.doubleClick = !0) : (r.singleClick = !0), this._checkPrePointerObservable(e, i, E.a.POINTERUP) || this._processPointerUp(e, i, r); + }), + (e.prototype._processPointerUp = function (e, t, n) { + var i = this._scene; + if (e && e && e.pickedMesh) { + if (((this._pickedUpMesh = e.pickedMesh), this._pickedDownMesh === this._pickedUpMesh && (i.onPointerPick && i.onPointerPick(t, e), n.singleClick && !n.ignore && i.onPointerObservable.hasObservers()))) { + var r = E.a.POINTERPICK, + o = new E.b(r, t, e); + this._setRayOnPointerInfo(o), i.onPointerObservable.notifyObservers(o, r); + } + var a = e.pickedMesh._getActionManagerForTrigger(); + if (a && !n.ignore) { + a.processTrigger(7, v.a.CreateNew(e.pickedMesh, t)), !n.hasSwiped && n.singleClick && a.processTrigger(1, v.a.CreateNew(e.pickedMesh, t)); + var s = e.pickedMesh._getActionManagerForTrigger(6); + n.doubleClick && s && s.processTrigger(6, v.a.CreateNew(e.pickedMesh, t)); + } + } else if (!n.ignore) + for (var c = 0, l = i._pointerUpStage; c < l.length; c++) { + e = l[c].action(this._unTranslatedPointerX, this._unTranslatedPointerY, e, t); + } + if (this._pickedDownMesh && this._pickedDownMesh !== this._pickedUpMesh) { + var u = this._pickedDownMesh._getActionManagerForTrigger(16); + u && u.processTrigger(16, v.a.CreateNew(this._pickedDownMesh, t)); + } + var h = 0; + if (i.onPointerObservable.hasObservers()) { + if ( + !n.ignore && + !n.hasSwiped && + (n.singleClick && i.onPointerObservable.hasSpecificMask(E.a.POINTERTAP) ? (h = E.a.POINTERTAP) : n.doubleClick && i.onPointerObservable.hasSpecificMask(E.a.POINTERDOUBLETAP) && (h = E.a.POINTERDOUBLETAP), h) + ) { + o = new E.b(h, t, e); + this._setRayOnPointerInfo(o), i.onPointerObservable.notifyObservers(o, h); + } + if (!n.ignore) { + h = E.a.POINTERUP; + o = new E.b(h, t, e); + this._setRayOnPointerInfo(o), i.onPointerObservable.notifyObservers(o, h); + } + } + i.onPointerUp && !n.ignore && i.onPointerUp(t, e, h); + }), + (e.prototype.isPointerCaptured = function (e) { + return void 0 === e && (e = 0), this._pointerCaptures[e]; + }), + (e.prototype.attachControl = function (t, n, i, o) { + var a = this; + void 0 === t && (t = !0), void 0 === n && (n = !0), void 0 === i && (i = !0), void 0 === o && (o = null); + var s = this._scene; + if ((o || (o = s.getEngine().getInputElement()), o)) { + var c, + l = s.getEngine(); + (this._initActionManager = function (e, t) { + if (!a._meshPickProceed) { + var n = s.pick(a._unTranslatedPointerX, a._unTranslatedPointerY, s.pointerDownPredicate, !1, s.cameraToUseForPointers); + (a._currentPickResult = n), n && (e = n.hit && n.pickedMesh ? n.pickedMesh._getActionManagerForTrigger() : null), (a._meshPickProceed = !0); + } + return e; + }), + (this._delayedSimpleClick = function (t, n, i) { + ((Date.now() - a._previousStartingPointerTime > e.DoubleClickDelay && !a._doubleClickOccured) || t !== a._previousButtonPressed) && + ((a._doubleClickOccured = !1), (n.singleClick = !0), (n.ignore = !1), i(n, a._currentPickResult)); + }), + (this._initClickEvent = function (t, n, i, r) { + var o = new I(); + a._currentPickResult = null; + var s = null, + c = + t.hasSpecificMask(E.a.POINTERPICK) || + n.hasSpecificMask(E.a.POINTERPICK) || + t.hasSpecificMask(E.a.POINTERTAP) || + n.hasSpecificMask(E.a.POINTERTAP) || + t.hasSpecificMask(E.a.POINTERDOUBLETAP) || + n.hasSpecificMask(E.a.POINTERDOUBLETAP); + !c && M.a && (s = a._initActionManager(s, o)) && (c = s.hasPickTriggers); + var l = !1; + if (c) { + var u = i.button; + if (((o.hasSwiped = a._isPointerSwiping()), !o.hasSwiped)) { + var h = !e.ExclusiveDoubleClickMode; + h || + ((h = !t.hasSpecificMask(E.a.POINTERDOUBLETAP) && !n.hasSpecificMask(E.a.POINTERDOUBLETAP)) && + !M.a.HasSpecificTrigger(6) && + (s = a._initActionManager(s, o)) && + (h = !s.hasSpecificTrigger(6))), + h + ? (Date.now() - a._previousStartingPointerTime > e.DoubleClickDelay || u !== a._previousButtonPressed) && ((o.singleClick = !0), r(o, a._currentPickResult), (l = !0)) + : ((a._previousDelayedSimpleClickTimeout = a._delayedSimpleClickTimeout), (a._delayedSimpleClickTimeout = window.setTimeout(a._delayedSimpleClick.bind(a, u, o, r), e.DoubleClickDelay))); + var d = t.hasSpecificMask(E.a.POINTERDOUBLETAP) || n.hasSpecificMask(E.a.POINTERDOUBLETAP); + !d && M.a.HasSpecificTrigger(6) && (s = a._initActionManager(s, o)) && (d = s.hasSpecificTrigger(6)), + d && + (u === a._previousButtonPressed && Date.now() - a._previousStartingPointerTime < e.DoubleClickDelay && !a._doubleClickOccured + ? (o.hasSwiped || a._isPointerSwiping() + ? ((a._doubleClickOccured = !1), + (a._previousStartingPointerTime = a._startingPointerTime), + (a._previousStartingPointerPosition.x = a._startingPointerPosition.x), + (a._previousStartingPointerPosition.y = a._startingPointerPosition.y), + (a._previousButtonPressed = u), + e.ExclusiveDoubleClickMode + ? (a._previousDelayedSimpleClickTimeout && clearTimeout(a._previousDelayedSimpleClickTimeout), + (a._previousDelayedSimpleClickTimeout = a._delayedSimpleClickTimeout), + r(o, a._previousPickResult)) + : r(o, a._currentPickResult)) + : ((a._previousStartingPointerTime = 0), + (a._doubleClickOccured = !0), + (o.doubleClick = !0), + (o.ignore = !1), + e.ExclusiveDoubleClickMode && a._previousDelayedSimpleClickTimeout && clearTimeout(a._previousDelayedSimpleClickTimeout), + (a._previousDelayedSimpleClickTimeout = a._delayedSimpleClickTimeout), + r(o, a._currentPickResult)), + (l = !0)) + : ((a._doubleClickOccured = !1), + (a._previousStartingPointerTime = a._startingPointerTime), + (a._previousStartingPointerPosition.x = a._startingPointerPosition.x), + (a._previousStartingPointerPosition.y = a._startingPointerPosition.y), + (a._previousButtonPressed = u))); + } + } + l || r(o, a._currentPickResult); + }), + (this._onPointerMove = function (e) { + if ((a._updatePointerPosition(e), !a._checkPrePointerObservable(null, e, e.type === a._wheelEventName ? E.a.POINTERWHEEL : E.a.POINTERMOVE) && (s.cameraToUseForPointers || s.activeCamera))) { + s.pointerMovePredicate || + (s.pointerMovePredicate = function (e) { + return ( + e.isPickable && + e.isVisible && + e.isReady() && + e.isEnabled() && + (e.enablePointerMoveEvents || s.constantlyUpdateMeshUnderPointer || null != e._getActionManagerForTrigger()) && + (!s.cameraToUseForPointers || 0 != (s.cameraToUseForPointers.layerMask & e.layerMask)) + ); + }); + var t = s.pick(a._unTranslatedPointerX, a._unTranslatedPointerY, s.pointerMovePredicate, !1, s.cameraToUseForPointers); + a._processPointerMove(t, e); + } + }), + (this._onPointerDown = function (e) { + if ( + (a._totalPointersPressed++, + (a._pickedDownMesh = null), + (a._meshPickProceed = !1), + a._updatePointerPosition(e), + s.preventDefaultOnPointerDown && o && (e.preventDefault(), o.focus()), + (a._startingPointerPosition.x = a._pointerX), + (a._startingPointerPosition.y = a._pointerY), + (a._startingPointerTime = Date.now()), + !a._checkPrePointerObservable(null, e, E.a.POINTERDOWN) && (s.cameraToUseForPointers || s.activeCamera)) + ) { + (a._pointerCaptures[e.pointerId] = !0), + s.pointerDownPredicate || + (s.pointerDownPredicate = function (e) { + return e.isPickable && e.isVisible && e.isReady() && e.isEnabled() && (!s.cameraToUseForPointers || 0 != (s.cameraToUseForPointers.layerMask & e.layerMask)); + }), + (a._pickedDownMesh = null); + var t = s.pick(a._unTranslatedPointerX, a._unTranslatedPointerY, s.pointerDownPredicate, !1, s.cameraToUseForPointers); + a._processPointerDown(t, e); + } + }), + (this._onPointerUp = function (e) { + 0 !== a._totalPointersPressed && + (a._totalPointersPressed--, + (a._pickedUpMesh = null), + (a._meshPickProceed = !1), + a._updatePointerPosition(e), + s.preventDefaultOnPointerUp && o && (e.preventDefault(), o.focus()), + a._initClickEvent(s.onPrePointerObservable, s.onPointerObservable, e, function (t, n) { + if (s.onPrePointerObservable.hasObservers() && !t.ignore) { + if (!t.hasSwiped) { + if (t.singleClick && s.onPrePointerObservable.hasSpecificMask(E.a.POINTERTAP) && a._checkPrePointerObservable(null, e, E.a.POINTERTAP)) return; + if (t.doubleClick && s.onPrePointerObservable.hasSpecificMask(E.a.POINTERDOUBLETAP) && a._checkPrePointerObservable(null, e, E.a.POINTERDOUBLETAP)) return; + } + if (a._checkPrePointerObservable(null, e, E.a.POINTERUP)) return; + } + a._pointerCaptures[e.pointerId] && + ((a._pointerCaptures[e.pointerId] = !1), + (s.cameraToUseForPointers || s.activeCamera) && + (s.pointerUpPredicate || + (s.pointerUpPredicate = function (e) { + return e.isPickable && e.isVisible && e.isReady() && e.isEnabled() && (!s.cameraToUseForPointers || 0 != (s.cameraToUseForPointers.layerMask & e.layerMask)); + }), + !a._meshPickProceed && ((M.a && M.a.HasTriggers) || s.onPointerObservable.hasObservers()) && a._initActionManager(null, t), + n || (n = a._currentPickResult), + a._processPointerUp(n, e, t), + (a._previousPickResult = a._currentPickResult))); + })); + }), + (this._onKeyDown = function (e) { + var t = A.a.KEYDOWN; + if (s.onPreKeyboardObservable.hasObservers()) { + var n = new A.c(t, e); + if ((s.onPreKeyboardObservable.notifyObservers(n, t), n.skipOnPointerObservable)) return; + } + if (s.onKeyboardObservable.hasObservers()) { + n = new A.b(t, e); + s.onKeyboardObservable.notifyObservers(n, t); + } + s.actionManager && s.actionManager.processTrigger(14, v.a.CreateNewFromScene(s, e)); + }), + (this._onKeyUp = function (e) { + var t = A.a.KEYUP; + if (s.onPreKeyboardObservable.hasObservers()) { + var n = new A.c(t, e); + if ((s.onPreKeyboardObservable.notifyObservers(n, t), n.skipOnPointerObservable)) return; + } + if (s.onKeyboardObservable.hasObservers()) { + n = new A.b(t, e); + s.onKeyboardObservable.notifyObservers(n, t); + } + s.actionManager && s.actionManager.processTrigger(15, v.a.CreateNewFromScene(s, e)); + }), + (this._onCanvasFocusObserver = l.onCanvasFocusObservable.add( + ((c = function () { + o && (o.addEventListener("keydown", a._onKeyDown, !1), o.addEventListener("keyup", a._onKeyUp, !1)); + }), + document.activeElement === o && c(), + c) + )), + (this._onCanvasBlurObserver = l.onCanvasBlurObservable.add(function () { + o && (o.removeEventListener("keydown", a._onKeyDown), o.removeEventListener("keyup", a._onKeyUp)); + })); + var u = r.b.GetPointerPrefix(); + if ( + (i && + (o.addEventListener(u + "move", this._onPointerMove, !1), + (this._wheelEventName = "onwheel" in document.createElement("div") ? "wheel" : void 0 !== document.onmousewheel ? "mousewheel" : "DOMMouseScroll"), + o.addEventListener(this._wheelEventName, this._onPointerMove, !1)), + n && o.addEventListener(u + "down", this._onPointerDown, !1), + t) + ) { + var h = s.getEngine().getHostWindow(); + h && h.addEventListener(u + "up", this._onPointerUp, !1); + } + } + }), + (e.prototype.detachControl = function () { + var e = r.b.GetPointerPrefix(), + t = this._scene.getEngine().getInputElement(), + n = this._scene.getEngine(); + t && + (t.removeEventListener(e + "move", this._onPointerMove), + t.removeEventListener(this._wheelEventName, this._onPointerMove), + t.removeEventListener(e + "down", this._onPointerDown), + window.removeEventListener(e + "up", this._onPointerUp), + this._onCanvasBlurObserver && n.onCanvasBlurObservable.remove(this._onCanvasBlurObserver), + this._onCanvasFocusObserver && n.onCanvasFocusObservable.remove(this._onCanvasFocusObserver), + t.removeEventListener("keydown", this._onKeyDown), + t.removeEventListener("keyup", this._onKeyUp), + this._scene.doNotHandleCursors || (t.style.cursor = this._scene.defaultCursor)); + }), + (e.prototype.setPointerOverMesh = function (e) { + var t; + this._pointerOverMesh !== e && + (this._pointerOverMesh && (t = this._pointerOverMesh._getActionManagerForTrigger(10)) && t.processTrigger(10, v.a.CreateNew(this._pointerOverMesh)), + (this._pointerOverMesh = e), + this._pointerOverMesh && (t = this._pointerOverMesh._getActionManagerForTrigger(9)) && t.processTrigger(9, v.a.CreateNew(this._pointerOverMesh))); + }), + (e.prototype.getPointerOverMesh = function () { + return this._pointerOverMesh; + }), + (e.DragMovementThreshold = 10), + (e.LongPressDelay = 500), + (e.DoubleClickDelay = 300), + (e.ExclusiveDoubleClickMode = !1), + e + ); + })(), + R = n(69), + w = n(5), + L = n(128), + F = n(205), + N = n(74), + k = (function (e) { + function t(n, r) { + var o = e.call(this) || this; + (o._inputManager = new D(o)), + (o.cameraToUseForPointers = null), + (o._isScene = !0), + (o._blockEntityCollection = !1), + (o.autoClear = !0), + (o.autoClearDepthAndStencil = !0), + (o.clearColor = new w.b(0.2, 0.2, 0.3, 1)), + (o.ambientColor = new w.a(0, 0, 0)), + (o._environmentIntensity = 1), + (o._forceWireframe = !1), + (o._skipFrustumClipping = !1), + (o._forcePointsCloud = !1), + (o.animationsEnabled = !0), + (o._animationPropertiesOverride = null), + (o.useConstantAnimationDeltaTime = !1), + (o.constantlyUpdateMeshUnderPointer = !1), + (o.hoverCursor = "pointer"), + (o.defaultCursor = ""), + (o.doNotHandleCursors = !1), + (o.preventDefaultOnPointerDown = !0), + (o.preventDefaultOnPointerUp = !0), + (o.metadata = null), + (o.reservedDataStore = null), + (o.disableOfflineSupportExceptionRules = new Array()), + (o.onDisposeObservable = new a.c()), + (o._onDisposeObserver = null), + (o.onBeforeRenderObservable = new a.c()), + (o._onBeforeRenderObserver = null), + (o.onAfterRenderObservable = new a.c()), + (o.onAfterRenderCameraObservable = new a.c()), + (o._onAfterRenderObserver = null), + (o.onBeforeAnimationsObservable = new a.c()), + (o.onAfterAnimationsObservable = new a.c()), + (o.onBeforeDrawPhaseObservable = new a.c()), + (o.onAfterDrawPhaseObservable = new a.c()), + (o.onReadyObservable = new a.c()), + (o.onBeforeCameraRenderObservable = new a.c()), + (o._onBeforeCameraRenderObserver = null), + (o.onAfterCameraRenderObservable = new a.c()), + (o._onAfterCameraRenderObserver = null), + (o.onBeforeActiveMeshesEvaluationObservable = new a.c()), + (o.onAfterActiveMeshesEvaluationObservable = new a.c()), + (o.onBeforeParticlesRenderingObservable = new a.c()), + (o.onAfterParticlesRenderingObservable = new a.c()), + (o.onDataLoadedObservable = new a.c()), + (o.onNewCameraAddedObservable = new a.c()), + (o.onCameraRemovedObservable = new a.c()), + (o.onNewLightAddedObservable = new a.c()), + (o.onLightRemovedObservable = new a.c()), + (o.onNewGeometryAddedObservable = new a.c()), + (o.onGeometryRemovedObservable = new a.c()), + (o.onNewTransformNodeAddedObservable = new a.c()), + (o.onTransformNodeRemovedObservable = new a.c()), + (o.onNewMeshAddedObservable = new a.c()), + (o.onMeshRemovedObservable = new a.c()), + (o.onNewSkeletonAddedObservable = new a.c()), + (o.onSkeletonRemovedObservable = new a.c()), + (o.onNewMaterialAddedObservable = new a.c()), + (o.onMaterialRemovedObservable = new a.c()), + (o.onNewTextureAddedObservable = new a.c()), + (o.onTextureRemovedObservable = new a.c()), + (o.onBeforeRenderTargetsRenderObservable = new a.c()), + (o.onAfterRenderTargetsRenderObservable = new a.c()), + (o.onBeforeStepObservable = new a.c()), + (o.onAfterStepObservable = new a.c()), + (o.onActiveCameraChanged = new a.c()), + (o.onBeforeRenderingGroupObservable = new a.c()), + (o.onAfterRenderingGroupObservable = new a.c()), + (o.onMeshImportedObservable = new a.c()), + (o.onAnimationFileImportedObservable = new a.c()), + (o._registeredForLateAnimationBindings = new s.b(256)), + (o.onPrePointerObservable = new a.c()), + (o.onPointerObservable = new a.c()), + (o.onPreKeyboardObservable = new a.c()), + (o.onKeyboardObservable = new a.c()), + (o._useRightHandedSystem = !1), + (o._timeAccumulator = 0), + (o._currentStepId = 0), + (o._currentInternalStep = 0), + (o._fogEnabled = !0), + (o._fogMode = t.FOGMODE_NONE), + (o.fogColor = new w.a(0.2, 0.2, 0.3)), + (o.fogDensity = 0.1), + (o.fogStart = 0), + (o.fogEnd = 1e3), + (o._shadowsEnabled = !0), + (o._lightsEnabled = !0), + (o.activeCameras = new Array()), + (o._texturesEnabled = !0), + (o.particlesEnabled = !0), + (o.spritesEnabled = !0), + (o._skeletonsEnabled = !0), + (o.lensFlaresEnabled = !0), + (o.collisionsEnabled = !0), + (o.gravity = new u.e(0, -9.807, 0)), + (o.postProcessesEnabled = !0), + (o.postProcesses = new Array()), + (o.renderTargetsEnabled = !0), + (o.dumpNextRenderTargets = !1), + (o.customRenderTargets = new Array()), + (o.importedMeshesFiles = new Array()), + (o.probesEnabled = !0), + (o._meshesForIntersections = new s.b(256)), + (o.proceduralTexturesEnabled = !0), + (o._totalVertices = new R.a()), + (o._activeIndices = new R.a()), + (o._activeParticles = new R.a()), + (o._activeBones = new R.a()), + (o._animationTime = 0), + (o.animationTimeScale = 1), + (o._renderId = 0), + (o._frameId = 0), + (o._executeWhenReadyTimeoutId = -1), + (o._intermediateRendering = !1), + (o._viewUpdateFlag = -1), + (o._projectionUpdateFlag = -1), + (o._toBeDisposed = new Array(256)), + (o._activeRequests = new Array()), + (o._pendingData = new Array()), + (o._isDisposed = !1), + (o.dispatchAllSubMeshesOfActiveMeshes = !1), + (o._activeMeshes = new s.a(256)), + (o._processedMaterials = new s.a(256)), + (o._renderTargets = new s.b(256)), + (o._activeParticleSystems = new s.a(256)), + (o._activeSkeletons = new s.b(32)), + (o._softwareSkinnedMeshes = new s.b(32)), + (o._activeAnimatables = new Array()), + (o._transformMatrix = u.a.Zero()), + (o.requireLightSorting = !1), + (o._components = []), + (o._serializableComponents = []), + (o._transientComponents = []), + (o._beforeCameraUpdateStage = P.b.Create()), + (o._beforeClearStage = P.b.Create()), + (o._gatherRenderTargetsStage = P.b.Create()), + (o._gatherActiveCameraRenderTargetsStage = P.b.Create()), + (o._isReadyForMeshStage = P.b.Create()), + (o._beforeEvaluateActiveMeshStage = P.b.Create()), + (o._evaluateSubMeshStage = P.b.Create()), + (o._activeMeshStage = P.b.Create()), + (o._cameraDrawRenderTargetStage = P.b.Create()), + (o._beforeCameraDrawStage = P.b.Create()), + (o._beforeRenderTargetDrawStage = P.b.Create()), + (o._beforeRenderingGroupDrawStage = P.b.Create()), + (o._beforeRenderingMeshStage = P.b.Create()), + (o._afterRenderingMeshStage = P.b.Create()), + (o._afterRenderingGroupDrawStage = P.b.Create()), + (o._afterCameraDrawStage = P.b.Create()), + (o._afterRenderTargetDrawStage = P.b.Create()), + (o._afterRenderStage = P.b.Create()), + (o._pointerMoveStage = P.b.Create()), + (o._pointerDownStage = P.b.Create()), + (o._pointerUpStage = P.b.Create()), + (o.geometriesByUniqueId = null), + (o._defaultMeshCandidates = { data: [], length: 0 }), + (o._defaultSubMeshCandidates = { data: [], length: 0 }), + (o._preventFreeActiveMeshesAndRenderingGroups = !1), + (o._activeMeshesFrozen = !1), + (o._skipEvaluateActiveMeshesCompletely = !1), + (o._allowPostProcessClearColor = !0), + (o.getDeterministicFrameTime = function () { + return o._engine.getTimeStep(); + }), + (o._blockMaterialDirtyMechanism = !1); + var c = Object(i.a)({ useGeometryUniqueIdsMap: !0, useMaterialMeshMap: !0, useClonedMeshMap: !0, virtual: !1 }, r); + return ( + (o._engine = n || S.a.LastCreatedEngine), + c.virtual || ((S.a._LastCreatedScene = o), o._engine.scenes.push(o)), + (o._uid = null), + (o._renderingManager = new C.b(o)), + y.a && (o.postProcessManager = new y.a(o)), + x.a.IsWindowObjectExist() && o.attachControl(), + o._createUbo(), + m.a && (o._imageProcessingConfiguration = new m.a()), + o.setDefaultCandidateProviders(), + c.useGeometryUniqueIdsMap && (o.geometriesByUniqueId = {}), + (o.useMaterialMeshMap = c.useMaterialMeshMap), + (o.useClonedMeshMap = c.useClonedMeshMap), + (r && r.virtual) || o._engine.onNewSceneAddedObservable.notifyObservers(o), + o + ); + } + return ( + Object(i.d)(t, e), + (t.DefaultMaterialFactory = function (e) { + throw O.a.WarnImport("StandardMaterial"); + }), + (t.CollisionCoordinatorFactory = function () { + throw O.a.WarnImport("DefaultCollisionCoordinator"); + }), + Object.defineProperty(t.prototype, "environmentTexture", { + get: function () { + return this._environmentTexture; + }, + set: function (e) { + this._environmentTexture !== e && ((this._environmentTexture = e), this.markAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "environmentIntensity", { + get: function () { + return this._environmentIntensity; + }, + set: function (e) { + this._environmentIntensity !== e && ((this._environmentIntensity = e), this.markAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "forceWireframe", { + get: function () { + return this._forceWireframe; + }, + set: function (e) { + this._forceWireframe !== e && ((this._forceWireframe = e), this.markAllMaterialsAsDirty(16)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "skipFrustumClipping", { + get: function () { + return this._skipFrustumClipping; + }, + set: function (e) { + this._skipFrustumClipping !== e && (this._skipFrustumClipping = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "forcePointsCloud", { + get: function () { + return this._forcePointsCloud; + }, + set: function (e) { + this._forcePointsCloud !== e && ((this._forcePointsCloud = e), this.markAllMaterialsAsDirty(16)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "animationPropertiesOverride", { + get: function () { + return this._animationPropertiesOverride; + }, + set: function (e) { + this._animationPropertiesOverride = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "beforeRender", { + set: function (e) { + this._onBeforeRenderObserver && this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver), e && (this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "afterRender", { + set: function (e) { + this._onAfterRenderObserver && this.onAfterRenderObservable.remove(this._onAfterRenderObserver), e && (this._onAfterRenderObserver = this.onAfterRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "beforeCameraRender", { + set: function (e) { + this._onBeforeCameraRenderObserver && this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), (this._onBeforeCameraRenderObserver = this.onBeforeCameraRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "afterCameraRender", { + set: function (e) { + this._onAfterCameraRenderObserver && this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver), (this._onAfterCameraRenderObserver = this.onAfterCameraRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "unTranslatedPointer", { + get: function () { + return this._inputManager.unTranslatedPointer; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "DragMovementThreshold", { + get: function () { + return D.DragMovementThreshold; + }, + set: function (e) { + D.DragMovementThreshold = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "LongPressDelay", { + get: function () { + return D.LongPressDelay; + }, + set: function (e) { + D.LongPressDelay = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "DoubleClickDelay", { + get: function () { + return D.DoubleClickDelay; + }, + set: function (e) { + D.DoubleClickDelay = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "ExclusiveDoubleClickMode", { + get: function () { + return D.ExclusiveDoubleClickMode; + }, + set: function (e) { + D.ExclusiveDoubleClickMode = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useRightHandedSystem", { + get: function () { + return this._useRightHandedSystem; + }, + set: function (e) { + this._useRightHandedSystem !== e && ((this._useRightHandedSystem = e), this.markAllMaterialsAsDirty(16)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setStepId = function (e) { + this._currentStepId = e; + }), + (t.prototype.getStepId = function () { + return this._currentStepId; + }), + (t.prototype.getInternalStep = function () { + return this._currentInternalStep; + }), + Object.defineProperty(t.prototype, "fogEnabled", { + get: function () { + return this._fogEnabled; + }, + set: function (e) { + this._fogEnabled !== e && ((this._fogEnabled = e), this.markAllMaterialsAsDirty(16)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fogMode", { + get: function () { + return this._fogMode; + }, + set: function (e) { + this._fogMode !== e && ((this._fogMode = e), this.markAllMaterialsAsDirty(16)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowsEnabled", { + get: function () { + return this._shadowsEnabled; + }, + set: function (e) { + this._shadowsEnabled !== e && ((this._shadowsEnabled = e), this.markAllMaterialsAsDirty(2)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "lightsEnabled", { + get: function () { + return this._lightsEnabled; + }, + set: function (e) { + this._lightsEnabled !== e && ((this._lightsEnabled = e), this.markAllMaterialsAsDirty(2)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "activeCamera", { + get: function () { + return this._activeCamera; + }, + set: function (e) { + e !== this._activeCamera && ((this._activeCamera = e), this.onActiveCameraChanged.notifyObservers(this)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "defaultMaterial", { + get: function () { + return this._defaultMaterial || (this._defaultMaterial = t.DefaultMaterialFactory(this)), this._defaultMaterial; + }, + set: function (e) { + this._defaultMaterial = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "texturesEnabled", { + get: function () { + return this._texturesEnabled; + }, + set: function (e) { + this._texturesEnabled !== e && ((this._texturesEnabled = e), this.markAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "skeletonsEnabled", { + get: function () { + return this._skeletonsEnabled; + }, + set: function (e) { + this._skeletonsEnabled !== e && ((this._skeletonsEnabled = e), this.markAllMaterialsAsDirty(8)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "collisionCoordinator", { + get: function () { + return this._collisionCoordinator || ((this._collisionCoordinator = t.CollisionCoordinatorFactory()), this._collisionCoordinator.init(this)), this._collisionCoordinator; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "frustumPlanes", { + get: function () { + return this._frustumPlanes; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._registerTransientComponents = function () { + if (this._transientComponents.length > 0) { + for (var e = 0, t = this._transientComponents; e < t.length; e++) { + t[e].register(); + } + this._transientComponents = []; + } + }), + (t.prototype._addComponent = function (e) { + this._components.push(e), this._transientComponents.push(e); + var t = e; + t.addFromContainer && t.serialize && this._serializableComponents.push(t); + }), + (t.prototype._getComponent = function (e) { + for (var t = 0, n = this._components; t < n.length; t++) { + var i = n[t]; + if (i.name === e) return i; + } + return null; + }), + (t.prototype.getClassName = function () { + return "Scene"; + }), + (t.prototype._getDefaultMeshCandidates = function () { + return (this._defaultMeshCandidates.data = this.meshes), (this._defaultMeshCandidates.length = this.meshes.length), this._defaultMeshCandidates; + }), + (t.prototype._getDefaultSubMeshCandidates = function (e) { + return (this._defaultSubMeshCandidates.data = e.subMeshes), (this._defaultSubMeshCandidates.length = e.subMeshes.length), this._defaultSubMeshCandidates; + }), + (t.prototype.setDefaultCandidateProviders = function () { + (this.getActiveMeshCandidates = this._getDefaultMeshCandidates.bind(this)), + (this.getActiveSubMeshCandidates = this._getDefaultSubMeshCandidates.bind(this)), + (this.getIntersectingSubMeshCandidates = this._getDefaultSubMeshCandidates.bind(this)), + (this.getCollidingSubMeshCandidates = this._getDefaultSubMeshCandidates.bind(this)); + }), + Object.defineProperty(t.prototype, "meshUnderPointer", { + get: function () { + return this._inputManager.meshUnderPointer; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "pointerX", { + get: function () { + return this._inputManager.pointerX; + }, + set: function (e) { + this._inputManager.pointerX = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "pointerY", { + get: function () { + return this._inputManager.pointerY; + }, + set: function (e) { + this._inputManager.pointerY = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getCachedMaterial = function () { + return this._cachedMaterial; + }), + (t.prototype.getCachedEffect = function () { + return this._cachedEffect; + }), + (t.prototype.getCachedVisibility = function () { + return this._cachedVisibility; + }), + (t.prototype.isCachedMaterialInvalid = function (e, t, n) { + return void 0 === n && (n = 1), this._cachedEffect !== t || this._cachedMaterial !== e || this._cachedVisibility !== n; + }), + (t.prototype.getEngine = function () { + return this._engine; + }), + (t.prototype.getTotalVertices = function () { + return this._totalVertices.current; + }), + Object.defineProperty(t.prototype, "totalVerticesPerfCounter", { + get: function () { + return this._totalVertices; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getActiveIndices = function () { + return this._activeIndices.current; + }), + Object.defineProperty(t.prototype, "totalActiveIndicesPerfCounter", { + get: function () { + return this._activeIndices; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getActiveParticles = function () { + return this._activeParticles.current; + }), + Object.defineProperty(t.prototype, "activeParticlesPerfCounter", { + get: function () { + return this._activeParticles; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getActiveBones = function () { + return this._activeBones.current; + }), + Object.defineProperty(t.prototype, "activeBonesPerfCounter", { + get: function () { + return this._activeBones; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getActiveMeshes = function () { + return this._activeMeshes; + }), + (t.prototype.getAnimationRatio = function () { + return void 0 !== this._animationRatio ? this._animationRatio : 1; + }), + (t.prototype.getRenderId = function () { + return this._renderId; + }), + (t.prototype.getFrameId = function () { + return this._frameId; + }), + (t.prototype.incrementRenderId = function () { + this._renderId++; + }), + (t.prototype._createUbo = function () { + (this._sceneUbo = new g.a(this._engine, void 0, !0)), this._sceneUbo.addUniform("viewProjection", 16), this._sceneUbo.addUniform("view", 16); + }), + (t.prototype.simulatePointerMove = function (e, t) { + return this._inputManager.simulatePointerMove(e, t), this; + }), + (t.prototype.simulatePointerDown = function (e, t) { + return this._inputManager.simulatePointerDown(e, t), this; + }), + (t.prototype.simulatePointerUp = function (e, t, n) { + return this._inputManager.simulatePointerUp(e, t, n), this; + }), + (t.prototype.isPointerCaptured = function (e) { + return void 0 === e && (e = 0), this._inputManager.isPointerCaptured(e); + }), + (t.prototype.attachControl = function (e, t, n) { + void 0 === e && (e = !0), void 0 === t && (t = !0), void 0 === n && (n = !0), this._inputManager.attachControl(e, t, n); + }), + (t.prototype.detachControl = function () { + this._inputManager.detachControl(); + }), + (t.prototype.isReady = function () { + if (this._isDisposed) return !1; + var e, + t = this.getEngine(); + if (!t.areAllEffectsReady()) return !1; + if (this._pendingData.length > 0) return !1; + for (e = 0; e < this.meshes.length; e++) { + var n = this.meshes[e]; + if (n.isEnabled() && n.subMeshes && 0 !== n.subMeshes.length) { + if (!n.isReady(!0)) return !1; + for ( + var i = "InstancedMesh" === n.getClassName() || "InstancedLinesMesh" === n.getClassName() || (t.getCaps().instancedArrays && n.instances.length > 0), r = 0, o = this._isReadyForMeshStage; + r < o.length; + r++ + ) { + if (!o[r].action(n, i)) return !1; + } + } + } + for (e = 0; e < this.geometries.length; e++) { + if (2 === this.geometries[e].delayLoadState) return !1; + } + if (this.activeCameras && this.activeCameras.length > 0) + for (var a = 0, s = this.activeCameras; a < s.length; a++) { + if (!s[a].isReady(!0)) return !1; + } + else if (this.activeCamera && !this.activeCamera.isReady(!0)) return !1; + for (var c = 0, l = this.particleSystems; c < l.length; c++) { + if (!l[c].isReady()) return !1; + } + return !0; + }), + (t.prototype.resetCachedMaterial = function () { + (this._cachedMaterial = null), (this._cachedEffect = null), (this._cachedVisibility = null); + }), + (t.prototype.registerBeforeRender = function (e) { + this.onBeforeRenderObservable.add(e); + }), + (t.prototype.unregisterBeforeRender = function (e) { + this.onBeforeRenderObservable.removeCallback(e); + }), + (t.prototype.registerAfterRender = function (e) { + this.onAfterRenderObservable.add(e); + }), + (t.prototype.unregisterAfterRender = function (e) { + this.onAfterRenderObservable.removeCallback(e); + }), + (t.prototype._executeOnceBeforeRender = function (e) { + var t = this, + n = function () { + e(), + setTimeout(function () { + t.unregisterBeforeRender(n); + }); + }; + this.registerBeforeRender(n); + }), + (t.prototype.executeOnceBeforeRender = function (e, t) { + var n = this; + void 0 !== t + ? setTimeout(function () { + n._executeOnceBeforeRender(e); + }, t) + : this._executeOnceBeforeRender(e); + }), + (t.prototype._addPendingData = function (e) { + this._pendingData.push(e); + }), + (t.prototype._removePendingData = function (e) { + var t = this.isLoading, + n = this._pendingData.indexOf(e); + -1 !== n && this._pendingData.splice(n, 1), t && !this.isLoading && this.onDataLoadedObservable.notifyObservers(this); + }), + (t.prototype.getWaitingItemsCount = function () { + return this._pendingData.length; + }), + Object.defineProperty(t.prototype, "isLoading", { + get: function () { + return this._pendingData.length > 0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.executeWhenReady = function (e) { + var t = this; + this.onReadyObservable.add(e), + -1 === this._executeWhenReadyTimeoutId && + (this._executeWhenReadyTimeoutId = setTimeout(function () { + t._checkIsReady(); + }, 150)); + }), + (t.prototype.whenReadyAsync = function () { + var e = this; + return new Promise(function (t) { + e.executeWhenReady(function () { + t(); + }); + }); + }), + (t.prototype._checkIsReady = function () { + var e = this; + return ( + this._registerTransientComponents(), + this.isReady() + ? (this.onReadyObservable.notifyObservers(this), this.onReadyObservable.clear(), void (this._executeWhenReadyTimeoutId = -1)) + : this._isDisposed + ? (this.onReadyObservable.clear(), void (this._executeWhenReadyTimeoutId = -1)) + : void (this._executeWhenReadyTimeoutId = setTimeout(function () { + e._checkIsReady(); + }, 150)) + ); + }), + Object.defineProperty(t.prototype, "animatables", { + get: function () { + return this._activeAnimatables; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.resetLastAnimationTimeFrame = function () { + this._animationTimeLast = o.a.Now; + }), + (t.prototype.getViewMatrix = function () { + return this._viewMatrix; + }), + (t.prototype.getProjectionMatrix = function () { + return this._projectionMatrix; + }), + (t.prototype.getTransformMatrix = function () { + return this._transformMatrix; + }), + (t.prototype.setTransformMatrix = function (e, t, n, i) { + (this._viewUpdateFlag === e.updateFlag && this._projectionUpdateFlag === t.updateFlag) || + ((this._viewUpdateFlag = e.updateFlag), + (this._projectionUpdateFlag = t.updateFlag), + (this._viewMatrix = e), + (this._projectionMatrix = t), + this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix), + this._frustumPlanes ? L.a.GetPlanesToRef(this._transformMatrix, this._frustumPlanes) : (this._frustumPlanes = L.a.GetPlanes(this._transformMatrix)), + this._multiviewSceneUbo && this._multiviewSceneUbo.useUbo + ? this._updateMultiviewUbo(n, i) + : this._sceneUbo.useUbo && (this._sceneUbo.updateMatrix("viewProjection", this._transformMatrix), this._sceneUbo.updateMatrix("view", this._viewMatrix), this._sceneUbo.update())); + }), + (t.prototype.getSceneUniformBuffer = function () { + return this._multiviewSceneUbo ? this._multiviewSceneUbo : this._sceneUbo; + }), + (t.prototype.getUniqueId = function () { + return F.a.UniqueId; + }), + (t.prototype.addMesh = function (e, t) { + var n = this; + void 0 === t && (t = !1), + this._blockEntityCollection || + (this.meshes.push(e), + e._resyncLightSources(), + e.parent || e._addToSceneRootNodes(), + this.onNewMeshAddedObservable.notifyObservers(e), + t && + e.getChildMeshes().forEach(function (e) { + n.addMesh(e); + })); + }), + (t.prototype.removeMesh = function (e, t) { + var n = this; + void 0 === t && (t = !1); + var i = this.meshes.indexOf(e); + return ( + -1 !== i && ((this.meshes[i] = this.meshes[this.meshes.length - 1]), this.meshes.pop(), e.parent || e._removeFromSceneRootNodes()), + this.onMeshRemovedObservable.notifyObservers(e), + t && + e.getChildMeshes().forEach(function (e) { + n.removeMesh(e); + }), + i + ); + }), + (t.prototype.addTransformNode = function (e) { + this._blockEntityCollection || + ((e._indexInSceneTransformNodesArray = this.transformNodes.length), this.transformNodes.push(e), e.parent || e._addToSceneRootNodes(), this.onNewTransformNodeAddedObservable.notifyObservers(e)); + }), + (t.prototype.removeTransformNode = function (e) { + var t = e._indexInSceneTransformNodesArray; + if (-1 !== t) { + if (t !== this.transformNodes.length - 1) { + var n = this.transformNodes[this.transformNodes.length - 1]; + (this.transformNodes[t] = n), (n._indexInSceneTransformNodesArray = t); + } + (e._indexInSceneTransformNodesArray = -1), this.transformNodes.pop(), e.parent || e._removeFromSceneRootNodes(); + } + return this.onTransformNodeRemovedObservable.notifyObservers(e), t; + }), + (t.prototype.removeSkeleton = function (e) { + var t = this.skeletons.indexOf(e); + return -1 !== t && (this.skeletons.splice(t, 1), this.onSkeletonRemovedObservable.notifyObservers(e)), t; + }), + (t.prototype.removeMorphTargetManager = function (e) { + var t = this.morphTargetManagers.indexOf(e); + return -1 !== t && this.morphTargetManagers.splice(t, 1), t; + }), + (t.prototype.removeLight = function (e) { + var t = this.lights.indexOf(e); + if (-1 !== t) { + for (var n = 0, i = this.meshes; n < i.length; n++) { + i[n]._removeLightSource(e, !1); + } + this.lights.splice(t, 1), this.sortLightsByPriority(), e.parent || e._removeFromSceneRootNodes(); + } + return this.onLightRemovedObservable.notifyObservers(e), t; + }), + (t.prototype.removeCamera = function (e) { + var t = this.cameras.indexOf(e); + -1 !== t && (this.cameras.splice(t, 1), e.parent || e._removeFromSceneRootNodes()); + var n = this.activeCameras.indexOf(e); + return ( + -1 !== n && this.activeCameras.splice(n, 1), + this.activeCamera === e && (this.cameras.length > 0 ? (this.activeCamera = this.cameras[0]) : (this.activeCamera = null)), + this.onCameraRemovedObservable.notifyObservers(e), + t + ); + }), + (t.prototype.removeParticleSystem = function (e) { + var t = this.particleSystems.indexOf(e); + return -1 !== t && this.particleSystems.splice(t, 1), t; + }), + (t.prototype.removeAnimation = function (e) { + var t = this.animations.indexOf(e); + return -1 !== t && this.animations.splice(t, 1), t; + }), + (t.prototype.stopAnimation = function (e, t, n) {}), + (t.prototype.removeAnimationGroup = function (e) { + var t = this.animationGroups.indexOf(e); + return -1 !== t && this.animationGroups.splice(t, 1), t; + }), + (t.prototype.removeMultiMaterial = function (e) { + var t = this.multiMaterials.indexOf(e); + return -1 !== t && this.multiMaterials.splice(t, 1), t; + }), + (t.prototype.removeMaterial = function (e) { + var t = e._indexInSceneMaterialArray; + if (-1 !== t && t < this.materials.length) { + if (t !== this.materials.length - 1) { + var n = this.materials[this.materials.length - 1]; + (this.materials[t] = n), (n._indexInSceneMaterialArray = t); + } + (e._indexInSceneMaterialArray = -1), this.materials.pop(); + } + return this.onMaterialRemovedObservable.notifyObservers(e), t; + }), + (t.prototype.removeActionManager = function (e) { + var t = this.actionManagers.indexOf(e); + return -1 !== t && this.actionManagers.splice(t, 1), t; + }), + (t.prototype.removeTexture = function (e) { + var t = this.textures.indexOf(e); + return -1 !== t && this.textures.splice(t, 1), this.onTextureRemovedObservable.notifyObservers(e), t; + }), + (t.prototype.addLight = function (e) { + if (!this._blockEntityCollection) { + this.lights.push(e), this.sortLightsByPriority(), e.parent || e._addToSceneRootNodes(); + for (var t = 0, n = this.meshes; t < n.length; t++) { + var i = n[t]; + -1 === i.lightSources.indexOf(e) && (i.lightSources.push(e), i._resyncLightSources()); + } + this.onNewLightAddedObservable.notifyObservers(e); + } + }), + (t.prototype.sortLightsByPriority = function () { + this.requireLightSorting && this.lights.sort(b.a.CompareLightsPriority); + }), + (t.prototype.addCamera = function (e) { + this._blockEntityCollection || (this.cameras.push(e), this.onNewCameraAddedObservable.notifyObservers(e), e.parent || e._addToSceneRootNodes()); + }), + (t.prototype.addSkeleton = function (e) { + this._blockEntityCollection || (this.skeletons.push(e), this.onNewSkeletonAddedObservable.notifyObservers(e)); + }), + (t.prototype.addParticleSystem = function (e) { + this._blockEntityCollection || this.particleSystems.push(e); + }), + (t.prototype.addAnimation = function (e) { + this._blockEntityCollection || this.animations.push(e); + }), + (t.prototype.addAnimationGroup = function (e) { + this._blockEntityCollection || this.animationGroups.push(e); + }), + (t.prototype.addMultiMaterial = function (e) { + this._blockEntityCollection || this.multiMaterials.push(e); + }), + (t.prototype.addMaterial = function (e) { + this._blockEntityCollection || ((e._indexInSceneMaterialArray = this.materials.length), this.materials.push(e), this.onNewMaterialAddedObservable.notifyObservers(e)); + }), + (t.prototype.addMorphTargetManager = function (e) { + this._blockEntityCollection || this.morphTargetManagers.push(e); + }), + (t.prototype.addGeometry = function (e) { + this._blockEntityCollection || (this.geometriesByUniqueId && (this.geometriesByUniqueId[e.uniqueId] = this.geometries.length), this.geometries.push(e)); + }), + (t.prototype.addActionManager = function (e) { + this.actionManagers.push(e); + }), + (t.prototype.addTexture = function (e) { + this._blockEntityCollection || (this.textures.push(e), this.onNewTextureAddedObservable.notifyObservers(e)); + }), + (t.prototype.switchActiveCamera = function (e, t) { + void 0 === t && (t = !0); + var n = this._engine.getInputElement(); + n && (this.activeCamera && this.activeCamera.detachControl(n), (this.activeCamera = e), t && e.attachControl(n)); + }), + (t.prototype.setActiveCameraByID = function (e) { + var t = this.getCameraByID(e); + return t ? ((this.activeCamera = t), t) : null; + }), + (t.prototype.setActiveCameraByName = function (e) { + var t = this.getCameraByName(e); + return t ? ((this.activeCamera = t), t) : null; + }), + (t.prototype.getAnimationGroupByName = function (e) { + for (var t = 0; t < this.animationGroups.length; t++) if (this.animationGroups[t].name === e) return this.animationGroups[t]; + return null; + }), + (t.prototype.getMaterialByUniqueID = function (e) { + for (var t = 0; t < this.materials.length; t++) if (this.materials[t].uniqueId === e) return this.materials[t]; + return null; + }), + (t.prototype.getMaterialByID = function (e) { + for (var t = 0; t < this.materials.length; t++) if (this.materials[t].id === e) return this.materials[t]; + return null; + }), + (t.prototype.getLastMaterialByID = function (e) { + for (var t = this.materials.length - 1; t >= 0; t--) if (this.materials[t].id === e) return this.materials[t]; + return null; + }), + (t.prototype.getMaterialByName = function (e) { + for (var t = 0; t < this.materials.length; t++) if (this.materials[t].name === e) return this.materials[t]; + return null; + }), + (t.prototype.getTextureByUniqueID = function (e) { + for (var t = 0; t < this.textures.length; t++) if (this.textures[t].uniqueId === e) return this.textures[t]; + return null; + }), + (t.prototype.getCameraByID = function (e) { + for (var t = 0; t < this.cameras.length; t++) if (this.cameras[t].id === e) return this.cameras[t]; + return null; + }), + (t.prototype.getCameraByUniqueID = function (e) { + for (var t = 0; t < this.cameras.length; t++) if (this.cameras[t].uniqueId === e) return this.cameras[t]; + return null; + }), + (t.prototype.getCameraByName = function (e) { + for (var t = 0; t < this.cameras.length; t++) if (this.cameras[t].name === e) return this.cameras[t]; + return null; + }), + (t.prototype.getBoneByID = function (e) { + for (var t = 0; t < this.skeletons.length; t++) for (var n = this.skeletons[t], i = 0; i < n.bones.length; i++) if (n.bones[i].id === e) return n.bones[i]; + return null; + }), + (t.prototype.getBoneByName = function (e) { + for (var t = 0; t < this.skeletons.length; t++) for (var n = this.skeletons[t], i = 0; i < n.bones.length; i++) if (n.bones[i].name === e) return n.bones[i]; + return null; + }), + (t.prototype.getLightByName = function (e) { + for (var t = 0; t < this.lights.length; t++) if (this.lights[t].name === e) return this.lights[t]; + return null; + }), + (t.prototype.getLightByID = function (e) { + for (var t = 0; t < this.lights.length; t++) if (this.lights[t].id === e) return this.lights[t]; + return null; + }), + (t.prototype.getLightByUniqueID = function (e) { + for (var t = 0; t < this.lights.length; t++) if (this.lights[t].uniqueId === e) return this.lights[t]; + return null; + }), + (t.prototype.getParticleSystemByID = function (e) { + for (var t = 0; t < this.particleSystems.length; t++) if (this.particleSystems[t].id === e) return this.particleSystems[t]; + return null; + }), + (t.prototype.getGeometryByID = function (e) { + for (var t = 0; t < this.geometries.length; t++) if (this.geometries[t].id === e) return this.geometries[t]; + return null; + }), + (t.prototype._getGeometryByUniqueID = function (e) { + if (this.geometriesByUniqueId) { + var t = this.geometriesByUniqueId[e]; + if (void 0 !== t) return this.geometries[t]; + } else for (var n = 0; n < this.geometries.length; n++) if (this.geometries[n].uniqueId === e) return this.geometries[n]; + return null; + }), + (t.prototype.pushGeometry = function (e, t) { + return !(!t && this._getGeometryByUniqueID(e.uniqueId)) && (this.addGeometry(e), this.onNewGeometryAddedObservable.notifyObservers(e), !0); + }), + (t.prototype.removeGeometry = function (e) { + var t; + if (this.geometriesByUniqueId) { + if (void 0 === (t = this.geometriesByUniqueId[e.uniqueId])) return !1; + } else if ((t = this.geometries.indexOf(e)) < 0) return !1; + if (t !== this.geometries.length - 1) { + var n = this.geometries[this.geometries.length - 1]; + (this.geometries[t] = n), this.geometriesByUniqueId && ((this.geometriesByUniqueId[n.uniqueId] = t), (this.geometriesByUniqueId[e.uniqueId] = void 0)); + } + return this.geometries.pop(), this.onGeometryRemovedObservable.notifyObservers(e), !0; + }), + (t.prototype.getGeometries = function () { + return this.geometries; + }), + (t.prototype.getMeshByID = function (e) { + for (var t = 0; t < this.meshes.length; t++) if (this.meshes[t].id === e) return this.meshes[t]; + return null; + }), + (t.prototype.getMeshesByID = function (e) { + return this.meshes.filter(function (t) { + return t.id === e; + }); + }), + (t.prototype.getTransformNodeByID = function (e) { + for (var t = 0; t < this.transformNodes.length; t++) if (this.transformNodes[t].id === e) return this.transformNodes[t]; + return null; + }), + (t.prototype.getTransformNodeByUniqueID = function (e) { + for (var t = 0; t < this.transformNodes.length; t++) if (this.transformNodes[t].uniqueId === e) return this.transformNodes[t]; + return null; + }), + (t.prototype.getTransformNodesByID = function (e) { + return this.transformNodes.filter(function (t) { + return t.id === e; + }); + }), + (t.prototype.getMeshByUniqueID = function (e) { + for (var t = 0; t < this.meshes.length; t++) if (this.meshes[t].uniqueId === e) return this.meshes[t]; + return null; + }), + (t.prototype.getLastMeshByID = function (e) { + for (var t = this.meshes.length - 1; t >= 0; t--) if (this.meshes[t].id === e) return this.meshes[t]; + return null; + }), + (t.prototype.getLastEntryByID = function (e) { + var t; + for (t = this.meshes.length - 1; t >= 0; t--) if (this.meshes[t].id === e) return this.meshes[t]; + for (t = this.transformNodes.length - 1; t >= 0; t--) if (this.transformNodes[t].id === e) return this.transformNodes[t]; + for (t = this.cameras.length - 1; t >= 0; t--) if (this.cameras[t].id === e) return this.cameras[t]; + for (t = this.lights.length - 1; t >= 0; t--) if (this.lights[t].id === e) return this.lights[t]; + return null; + }), + (t.prototype.getNodeByID = function (e) { + var t = this.getMeshByID(e); + if (t) return t; + var n = this.getTransformNodeByID(e); + if (n) return n; + var i = this.getLightByID(e); + if (i) return i; + var r = this.getCameraByID(e); + if (r) return r; + var o = this.getBoneByID(e); + return o || null; + }), + (t.prototype.getNodeByName = function (e) { + var t = this.getMeshByName(e); + if (t) return t; + var n = this.getTransformNodeByName(e); + if (n) return n; + var i = this.getLightByName(e); + if (i) return i; + var r = this.getCameraByName(e); + if (r) return r; + var o = this.getBoneByName(e); + return o || null; + }), + (t.prototype.getMeshByName = function (e) { + for (var t = 0; t < this.meshes.length; t++) if (this.meshes[t].name === e) return this.meshes[t]; + return null; + }), + (t.prototype.getTransformNodeByName = function (e) { + for (var t = 0; t < this.transformNodes.length; t++) if (this.transformNodes[t].name === e) return this.transformNodes[t]; + return null; + }), + (t.prototype.getLastSkeletonByID = function (e) { + for (var t = this.skeletons.length - 1; t >= 0; t--) if (this.skeletons[t].id === e) return this.skeletons[t]; + return null; + }), + (t.prototype.getSkeletonByUniqueId = function (e) { + for (var t = 0; t < this.skeletons.length; t++) if (this.skeletons[t].uniqueId === e) return this.skeletons[t]; + return null; + }), + (t.prototype.getSkeletonById = function (e) { + for (var t = 0; t < this.skeletons.length; t++) if (this.skeletons[t].id === e) return this.skeletons[t]; + return null; + }), + (t.prototype.getSkeletonByName = function (e) { + for (var t = 0; t < this.skeletons.length; t++) if (this.skeletons[t].name === e) return this.skeletons[t]; + return null; + }), + (t.prototype.getMorphTargetManagerById = function (e) { + for (var t = 0; t < this.morphTargetManagers.length; t++) if (this.morphTargetManagers[t].uniqueId === e) return this.morphTargetManagers[t]; + return null; + }), + (t.prototype.getMorphTargetById = function (e) { + for (var t = 0; t < this.morphTargetManagers.length; ++t) + for (var n = this.morphTargetManagers[t], i = 0; i < n.numTargets; ++i) { + var r = n.getTarget(i); + if (r.id === e) return r; + } + return null; + }), + (t.prototype.isActiveMesh = function (e) { + return -1 !== this._activeMeshes.indexOf(e); + }), + Object.defineProperty(t.prototype, "uid", { + get: function () { + return this._uid || (this._uid = r.b.RandomId()), this._uid; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.addExternalData = function (e, t) { + return this._externalData || (this._externalData = new c.a()), this._externalData.add(e, t); + }), + (t.prototype.getExternalData = function (e) { + return this._externalData ? this._externalData.get(e) : null; + }), + (t.prototype.getOrAddExternalDataWithFactory = function (e, t) { + return this._externalData || (this._externalData = new c.a()), this._externalData.getOrAddWithFactory(e, t); + }), + (t.prototype.removeExternalData = function (e) { + return this._externalData.remove(e); + }), + (t.prototype._evaluateSubMesh = function (e, t, n) { + if (n.hasInstances || n.isAnInstance || this.dispatchAllSubMeshesOfActiveMeshes || this._skipFrustumClipping || t.alwaysSelectAsActiveMesh || 1 === t.subMeshes.length || e.isInFrustum(this._frustumPlanes)) { + for (var i = 0, r = this._evaluateSubMeshStage; i < r.length; i++) { + r[i].action(t, e); + } + var o = e.getMaterial(); + null != o && + (o.hasRenderTargetTextures && + null != o.getRenderTargetTextures && + -1 === this._processedMaterials.indexOf(o) && + (this._processedMaterials.push(o), this._renderTargets.concatWithNoDuplicate(o.getRenderTargetTextures())), + this._renderingManager.dispatch(e, t, o)); + } + }), + (t.prototype.freeProcessedMaterials = function () { + this._processedMaterials.dispose(); + }), + Object.defineProperty(t.prototype, "blockfreeActiveMeshesAndRenderingGroups", { + get: function () { + return this._preventFreeActiveMeshesAndRenderingGroups; + }, + set: function (e) { + this._preventFreeActiveMeshesAndRenderingGroups !== e && (e && (this.freeActiveMeshes(), this.freeRenderingGroups()), (this._preventFreeActiveMeshesAndRenderingGroups = e)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.freeActiveMeshes = function () { + if (!this.blockfreeActiveMeshesAndRenderingGroups && (this._activeMeshes.dispose(), this.activeCamera && this.activeCamera._activeMeshes && this.activeCamera._activeMeshes.dispose(), this.activeCameras)) + for (var e = 0; e < this.activeCameras.length; e++) { + var t = this.activeCameras[e]; + t && t._activeMeshes && t._activeMeshes.dispose(); + } + }), + (t.prototype.freeRenderingGroups = function () { + if (!this.blockfreeActiveMeshesAndRenderingGroups && (this._renderingManager && this._renderingManager.freeRenderingGroups(), this.textures)) + for (var e = 0; e < this.textures.length; e++) { + var t = this.textures[e]; + t && t.renderList && t.freeRenderingGroups(); + } + }), + (t.prototype._isInIntermediateRendering = function () { + return this._intermediateRendering; + }), + (t.prototype.freezeActiveMeshes = function (e) { + var t = this; + return ( + void 0 === e && (e = !1), + this.executeWhenReady(function () { + if (t.activeCamera) { + t._frustumPlanes || t.setTransformMatrix(t.activeCamera.getViewMatrix(), t.activeCamera.getProjectionMatrix()), + t._evaluateActiveMeshes(), + (t._activeMeshesFrozen = !0), + (t._skipEvaluateActiveMeshesCompletely = e); + for (var n = 0; n < t._activeMeshes.length; n++) t._activeMeshes.data[n]._freeze(); + } + }), + this + ); + }), + (t.prototype.unfreezeActiveMeshes = function () { + for (var e = 0; e < this.meshes.length; e++) { + var t = this.meshes[e]; + t._internalAbstractMeshDataInfo && (t._internalAbstractMeshDataInfo._isActive = !1); + } + for (e = 0; e < this._activeMeshes.length; e++) this._activeMeshes.data[e]._unFreeze(); + return (this._activeMeshesFrozen = !1), this; + }), + (t.prototype._evaluateActiveMeshes = function () { + if (this._activeMeshesFrozen && this._activeMeshes.length) { + if (!this._skipEvaluateActiveMeshesCompletely) + for (var e = this._activeMeshes.length, t = 0; t < e; t++) { + (a = this._activeMeshes.data[t]).computeWorldMatrix(); + } + } else if (this.activeCamera) { + this.onBeforeActiveMeshesEvaluationObservable.notifyObservers(this), + this.activeCamera._activeMeshes.reset(), + this._activeMeshes.reset(), + this._renderingManager.reset(), + this._processedMaterials.reset(), + this._activeParticleSystems.reset(), + this._activeSkeletons.reset(), + this._softwareSkinnedMeshes.reset(); + for (var n = 0, i = this._beforeEvaluateActiveMeshStage; n < i.length; n++) { + i[n].action(); + } + var r = this.getActiveMeshCandidates(), + o = r.length; + for (t = 0; t < o; t++) { + var a; + if (!(a = r.data[t]).isBlocked && (this._totalVertices.addCount(a.getTotalVertices(), !1), a.isReady() && a.isEnabled() && 0 !== a.scaling.lengthSquared())) { + a.computeWorldMatrix(), a.actionManager && a.actionManager.hasSpecificTriggers2(12, 13) && this._meshesForIntersections.pushNoDuplicate(a); + var s = this.customLODSelector ? this.customLODSelector(a, this.activeCamera) : a.getLOD(this.activeCamera); + null != s && + (s !== a && s.billboardMode !== h.a.BILLBOARDMODE_NONE && s.computeWorldMatrix(), + a._preActivate(), + a.isVisible && + a.visibility > 0 && + 0 != (a.layerMask & this.activeCamera.layerMask) && + (this._skipFrustumClipping || a.alwaysSelectAsActiveMesh || a.isInFrustum(this._frustumPlanes)) && + (this._activeMeshes.push(a), + this.activeCamera._activeMeshes.push(a), + s !== a && s._activate(this._renderId, !1), + a._activate(this._renderId, !1) && + (a.isAnInstance ? a._internalAbstractMeshDataInfo._actAsRegularMesh && (s = a) : (s._internalAbstractMeshDataInfo._onlyForInstances = !1), + (s._internalAbstractMeshDataInfo._isActive = !0), + this._activeMesh(a, s)), + a._postActivate())); + } + } + if ((this.onAfterActiveMeshesEvaluationObservable.notifyObservers(this), this.particlesEnabled)) { + this.onBeforeParticlesRenderingObservable.notifyObservers(this); + for (var c = 0; c < this.particleSystems.length; c++) { + var l = this.particleSystems[c]; + if (l.isStarted() && l.emitter) { + var u = l.emitter; + (u.position && !u.isEnabled()) || (this._activeParticleSystems.push(l), l.animate(), this._renderingManager.dispatchParticles(l)); + } + } + this.onAfterParticlesRenderingObservable.notifyObservers(this); + } + } + }), + (t.prototype._activeMesh = function (e, t) { + this._skeletonsEnabled && + null !== t.skeleton && + void 0 !== t.skeleton && + (this._activeSkeletons.pushNoDuplicate(t.skeleton) && t.skeleton.prepare(), t.computeBonesUsingShaders || this._softwareSkinnedMeshes.pushNoDuplicate(t)); + for (var n = 0, i = this._activeMeshStage; n < i.length; n++) { + i[n].action(e, t); + } + if (null != t && void 0 !== t.subMeshes && null !== t.subMeshes && t.subMeshes.length > 0) + for (var r = this.getActiveSubMeshCandidates(t), o = r.length, a = 0; a < o; a++) { + var s = r.data[a]; + this._evaluateSubMesh(s, t, e); + } + }), + (t.prototype.updateTransformMatrix = function (e) { + this.activeCamera && this.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix(e)); + }), + (t.prototype._bindFrameBuffer = function () { + if (this.activeCamera && this.activeCamera._multiviewTexture) this.activeCamera._multiviewTexture._bindFrameBuffer(); + else if (this.activeCamera && this.activeCamera.outputRenderTarget) { + if (this.getEngine().getCaps().multiview && this.activeCamera.outputRenderTarget && this.activeCamera.outputRenderTarget.getViewCount() > 1) this.activeCamera.outputRenderTarget._bindFrameBuffer(); + else { + var e = this.activeCamera.outputRenderTarget.getInternalTexture(); + e ? this.getEngine().bindFramebuffer(e) : T.a.Error("Camera contains invalid customDefaultRenderTarget"); + } + } else this.getEngine().restoreDefaultFramebuffer(); + }), + (t.prototype._renderForCamera = function (e, t) { + if (!e || !e._skipRendering) { + var n = this._engine; + if (((this._activeCamera = e), !this.activeCamera)) throw new Error("Active camera not set"); + n.setViewport(this.activeCamera.viewport), + this.resetCachedMaterial(), + this._renderId++, + this.getEngine().getCaps().multiview && e.outputRenderTarget && e.outputRenderTarget.getViewCount() > 1 + ? this.setTransformMatrix(e._rigCameras[0].getViewMatrix(), e._rigCameras[0].getProjectionMatrix(), e._rigCameras[1].getViewMatrix(), e._rigCameras[1].getProjectionMatrix()) + : this.updateTransformMatrix(), + this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera), + this._evaluateActiveMeshes(); + for (var i = 0; i < this._softwareSkinnedMeshes.length; i++) { + var o = this._softwareSkinnedMeshes.data[i]; + o.applySkeleton(o.skeleton); + } + this.onBeforeRenderTargetsRenderObservable.notifyObservers(this), + e.customRenderTargets && e.customRenderTargets.length > 0 && this._renderTargets.concatWithNoDuplicate(e.customRenderTargets), + t && t.customRenderTargets && t.customRenderTargets.length > 0 && this._renderTargets.concatWithNoDuplicate(t.customRenderTargets); + for (var a = 0, s = this._gatherActiveCameraRenderTargetsStage; a < s.length; a++) { + s[a].action(this._renderTargets); + } + if (this.renderTargetsEnabled) { + this._intermediateRendering = !0; + var c = !1; + if (this._renderTargets.length > 0) { + r.b.StartPerformanceCounter("Render targets", this._renderTargets.length > 0); + for (var l = 0; l < this._renderTargets.length; l++) { + var u = this._renderTargets.data[l]; + if (u._shouldRender()) { + this._renderId++; + var h = u.activeCamera && u.activeCamera !== this.activeCamera; + u.render(h, this.dumpNextRenderTargets), (c = !0); + } + } + r.b.EndPerformanceCounter("Render targets", this._renderTargets.length > 0), this._renderId++; + } + for (var d = 0, p = this._cameraDrawRenderTargetStage; d < p.length; d++) { + c = p[d].action(this.activeCamera) || c; + } + (this._intermediateRendering = !1), this.activeCamera && this.activeCamera.outputRenderTarget && (c = !0), c && this._bindFrameBuffer(); + } + this.onAfterRenderTargetsRenderObservable.notifyObservers(this), this.postProcessManager && !e._multiviewTexture && this.postProcessManager._prepareFrame(); + for (var f = 0, m = this._beforeCameraDrawStage; f < m.length; f++) { + m[f].action(this.activeCamera); + } + this.onBeforeDrawPhaseObservable.notifyObservers(this), this._renderingManager.render(null, null, !0, !0), this.onAfterDrawPhaseObservable.notifyObservers(this); + for (var g = 0, b = this._afterCameraDrawStage; g < b.length; g++) { + b[g].action(this.activeCamera); + } + this.postProcessManager && !e._multiviewTexture && this.postProcessManager._finalizeFrame(e.isIntermediate), this._renderTargets.reset(), this.onAfterCameraRenderObservable.notifyObservers(this.activeCamera); + } + }), + (t.prototype._processSubCameras = function (e) { + if (e.cameraRigMode === p.a.RIG_MODE_NONE || (e.outputRenderTarget && e.outputRenderTarget.getViewCount() > 1 && this.getEngine().getCaps().multiview)) + return this._renderForCamera(e), void this.onAfterRenderCameraObservable.notifyObservers(e); + if (e._useMultiviewToSingleView) this._renderMultiviewToSingleView(e); + else for (var t = 0; t < e._rigCameras.length; t++) this._renderForCamera(e._rigCameras[t], e); + (this._activeCamera = e), this.setTransformMatrix(this._activeCamera.getViewMatrix(), this._activeCamera.getProjectionMatrix()), this.onAfterRenderCameraObservable.notifyObservers(e); + }), + (t.prototype._checkIntersections = function () { + for (var e = 0; e < this._meshesForIntersections.length; e++) { + var t = this._meshesForIntersections.data[e]; + if (t.actionManager) + for (var n = 0; t.actionManager && n < t.actionManager.actions.length; n++) { + var i = t.actionManager.actions[n]; + if (12 === i.trigger || 13 === i.trigger) { + var r = i.getTriggerParameter(), + o = r instanceof d.a ? r : r.mesh, + a = o.intersectsMesh(t, r.usePreciseIntersection), + s = t._intersectionsInProgress.indexOf(o); + a && -1 === s + ? 12 === i.trigger + ? (i._executeCurrent(v.a.CreateNew(t, void 0, o)), t._intersectionsInProgress.push(o)) + : 13 === i.trigger && t._intersectionsInProgress.push(o) + : !a && + s > -1 && + (13 === i.trigger && i._executeCurrent(v.a.CreateNew(t, void 0, o)), + (t.actionManager.hasSpecificTrigger(13, function (e) { + var t = e instanceof d.a ? e : e.mesh; + return o === t; + }) && + 13 !== i.trigger) || + t._intersectionsInProgress.splice(s, 1)); + } + } + } + }), + (t.prototype._advancePhysicsEngineStep = function (e) {}), + (t.prototype._animate = function () {}), + (t.prototype.animate = function () { + if (this._engine.isDeterministicLockStep()) { + var e = Math.max(t.MinDeltaTime, Math.min(this._engine.getDeltaTime(), t.MaxDeltaTime)) + this._timeAccumulator, + n = this._engine.getTimeStep(), + i = 1e3 / n / 1e3, + r = 0, + o = this._engine.getLockstepMaxSteps(), + a = Math.floor(e / n); + for (a = Math.min(a, o); e > 0 && r < a; ) + this.onBeforeStepObservable.notifyObservers(this), + (this._animationRatio = n * i), + this._animate(), + this.onAfterAnimationsObservable.notifyObservers(this), + this._advancePhysicsEngineStep(n), + this.onAfterStepObservable.notifyObservers(this), + this._currentStepId++, + r++, + (e -= n); + this._timeAccumulator = e < 0 ? 0 : e; + } else { + e = this.useConstantAnimationDeltaTime ? 16 : Math.max(t.MinDeltaTime, Math.min(this._engine.getDeltaTime(), t.MaxDeltaTime)); + (this._animationRatio = 0.06 * e), this._animate(), this.onAfterAnimationsObservable.notifyObservers(this), this._advancePhysicsEngineStep(e); + } + }), + (t.prototype.render = function (e, t) { + if ((void 0 === e && (e = !0), void 0 === t && (t = !1), !this.isDisposed)) { + this._frameId++, + this._registerTransientComponents(), + this._activeParticles.fetchNewFrame(), + this._totalVertices.fetchNewFrame(), + this._activeIndices.fetchNewFrame(), + this._activeBones.fetchNewFrame(), + this._meshesForIntersections.reset(), + this.resetCachedMaterial(), + this.onBeforeAnimationsObservable.notifyObservers(this), + this.actionManager && this.actionManager.processTrigger(11), + t || this.animate(); + for (var n = 0, i = this._beforeCameraUpdateStage; n < i.length; n++) { + i[n].action(); + } + if (e) + if (this.activeCameras.length > 0) + for (var o = 0; o < this.activeCameras.length; o++) { + var a = this.activeCameras[o]; + if ((a.update(), a.cameraRigMode !== p.a.RIG_MODE_NONE)) for (var s = 0; s < a._rigCameras.length; s++) a._rigCameras[s].update(); + } + else if (this.activeCamera && (this.activeCamera.update(), this.activeCamera.cameraRigMode !== p.a.RIG_MODE_NONE)) + for (s = 0; s < this.activeCamera._rigCameras.length; s++) this.activeCamera._rigCameras[s].update(); + this.onBeforeRenderObservable.notifyObservers(this), this.onBeforeRenderTargetsRenderObservable.notifyObservers(this); + var c = this.getEngine(), + l = this.activeCamera; + if (this.renderTargetsEnabled) { + r.b.StartPerformanceCounter("Custom render targets", this.customRenderTargets.length > 0), (this._intermediateRendering = !0); + for (var u = 0; u < this.customRenderTargets.length; u++) { + var h = this.customRenderTargets[u]; + if (h._shouldRender()) { + if ((this._renderId++, (this.activeCamera = h.activeCamera || this.activeCamera), !this.activeCamera)) throw new Error("Active camera not set"); + c.setViewport(this.activeCamera.viewport), this.updateTransformMatrix(), h.render(l !== this.activeCamera, this.dumpNextRenderTargets); + } + } + r.b.EndPerformanceCounter("Custom render targets", this.customRenderTargets.length > 0), (this._intermediateRendering = !1), this._renderId++; + } + (this.activeCamera = l), this._bindFrameBuffer(), this.onAfterRenderTargetsRenderObservable.notifyObservers(this); + for (var d = 0, f = this._beforeClearStage; d < f.length; d++) { + f[d].action(); + } + (this.autoClearDepthAndStencil || this.autoClear) && + this._engine.clear(this.clearColor, this.autoClear || this.forceWireframe || this.forcePointsCloud, this.autoClearDepthAndStencil, this.autoClearDepthAndStencil); + for (var m = 0, g = this._gatherRenderTargetsStage; m < g.length; m++) { + g[m].action(this._renderTargets); + } + if (this.activeCameras.length > 0) for (o = 0; o < this.activeCameras.length; o++) o > 0 && this._engine.clear(null, !1, !0, !0), this._processSubCameras(this.activeCameras[o]); + else { + if (!this.activeCamera) throw new Error("No camera defined"); + this._processSubCameras(this.activeCamera); + } + this._checkIntersections(); + for (var b = 0, _ = this._afterRenderStage; b < _.length; b++) { + _[b].action(); + } + if ((this.afterRender && this.afterRender(), this.onAfterRenderObservable.notifyObservers(this), this._toBeDisposed.length)) { + for (s = 0; s < this._toBeDisposed.length; s++) { + var v = this._toBeDisposed[s]; + v && v.dispose(); + } + this._toBeDisposed = []; + } + this.dumpNextRenderTargets && (this.dumpNextRenderTargets = !1), this._activeBones.addCount(0, !0), this._activeIndices.addCount(0, !0), this._activeParticles.addCount(0, !0); + } + }), + (t.prototype.freezeMaterials = function () { + for (var e = 0; e < this.materials.length; e++) this.materials[e].freeze(); + }), + (t.prototype.unfreezeMaterials = function () { + for (var e = 0; e < this.materials.length; e++) this.materials[e].unfreeze(); + }), + (t.prototype.dispose = function () { + (this.beforeRender = null), + (this.afterRender = null), + S.a._LastCreatedScene === this && (S.a._LastCreatedScene = null), + (this.skeletons = []), + (this.morphTargetManagers = []), + (this._transientComponents = []), + this._isReadyForMeshStage.clear(), + this._beforeEvaluateActiveMeshStage.clear(), + this._evaluateSubMeshStage.clear(), + this._activeMeshStage.clear(), + this._cameraDrawRenderTargetStage.clear(), + this._beforeCameraDrawStage.clear(), + this._beforeRenderTargetDrawStage.clear(), + this._beforeRenderingGroupDrawStage.clear(), + this._beforeRenderingMeshStage.clear(), + this._afterRenderingMeshStage.clear(), + this._afterRenderingGroupDrawStage.clear(), + this._afterCameraDrawStage.clear(), + this._afterRenderTargetDrawStage.clear(), + this._afterRenderStage.clear(), + this._beforeCameraUpdateStage.clear(), + this._beforeClearStage.clear(), + this._gatherRenderTargetsStage.clear(), + this._gatherActiveCameraRenderTargetsStage.clear(), + this._pointerMoveStage.clear(), + this._pointerDownStage.clear(), + this._pointerUpStage.clear(); + for (var e = 0, t = this._components; e < t.length; e++) { + t[e].dispose(); + } + (this.importedMeshesFiles = new Array()), + this.stopAllAnimations && this.stopAllAnimations(), + this.resetCachedMaterial(), + this.activeCamera && (this.activeCamera._activeMeshes.dispose(), (this.activeCamera = null)), + this._activeMeshes.dispose(), + this._renderingManager.dispose(), + this._processedMaterials.dispose(), + this._activeParticleSystems.dispose(), + this._activeSkeletons.dispose(), + this._softwareSkinnedMeshes.dispose(), + this._renderTargets.dispose(), + this._registeredForLateAnimationBindings.dispose(), + this._meshesForIntersections.dispose(), + (this._toBeDisposed = []); + for (var n = 0, i = this._activeRequests; n < i.length; n++) { + i[n].abort(); + } + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(), + this.onBeforeRenderObservable.clear(), + this.onAfterRenderObservable.clear(), + this.onBeforeRenderTargetsRenderObservable.clear(), + this.onAfterRenderTargetsRenderObservable.clear(), + this.onAfterStepObservable.clear(), + this.onBeforeStepObservable.clear(), + this.onBeforeActiveMeshesEvaluationObservable.clear(), + this.onAfterActiveMeshesEvaluationObservable.clear(), + this.onBeforeParticlesRenderingObservable.clear(), + this.onAfterParticlesRenderingObservable.clear(), + this.onBeforeDrawPhaseObservable.clear(), + this.onAfterDrawPhaseObservable.clear(), + this.onBeforeAnimationsObservable.clear(), + this.onAfterAnimationsObservable.clear(), + this.onDataLoadedObservable.clear(), + this.onBeforeRenderingGroupObservable.clear(), + this.onAfterRenderingGroupObservable.clear(), + this.onMeshImportedObservable.clear(), + this.onBeforeCameraRenderObservable.clear(), + this.onAfterCameraRenderObservable.clear(), + this.onReadyObservable.clear(), + this.onNewCameraAddedObservable.clear(), + this.onCameraRemovedObservable.clear(), + this.onNewLightAddedObservable.clear(), + this.onLightRemovedObservable.clear(), + this.onNewGeometryAddedObservable.clear(), + this.onGeometryRemovedObservable.clear(), + this.onNewTransformNodeAddedObservable.clear(), + this.onTransformNodeRemovedObservable.clear(), + this.onNewMeshAddedObservable.clear(), + this.onMeshRemovedObservable.clear(), + this.onNewSkeletonAddedObservable.clear(), + this.onSkeletonRemovedObservable.clear(), + this.onNewMaterialAddedObservable.clear(), + this.onMaterialRemovedObservable.clear(), + this.onNewTextureAddedObservable.clear(), + this.onTextureRemovedObservable.clear(), + this.onPrePointerObservable.clear(), + this.onPointerObservable.clear(), + this.onPreKeyboardObservable.clear(), + this.onKeyboardObservable.clear(), + this.onActiveCameraChanged.clear(), + this.detachControl(); + var r, + o = this._engine.getInputElement(); + if (o) for (r = 0; r < this.cameras.length; r++) this.cameras[r].detachControl(o); + for (; this.animationGroups.length; ) this.animationGroups[0].dispose(); + for (; this.lights.length; ) this.lights[0].dispose(); + for (; this.meshes.length; ) this.meshes[0].dispose(!0); + for (; this.transformNodes.length; ) this.transformNodes[0].dispose(!0); + for (; this.cameras.length; ) this.cameras[0].dispose(); + for (this._defaultMaterial && this._defaultMaterial.dispose(); this.multiMaterials.length; ) this.multiMaterials[0].dispose(); + for (; this.materials.length; ) this.materials[0].dispose(); + for (; this.particleSystems.length; ) this.particleSystems[0].dispose(); + for (; this.postProcesses.length; ) this.postProcesses[0].dispose(); + for (; this.textures.length; ) this.textures[0].dispose(); + this._sceneUbo.dispose(), + this._multiviewSceneUbo && this._multiviewSceneUbo.dispose(), + this.postProcessManager.dispose(), + (r = this._engine.scenes.indexOf(this)) > -1 && this._engine.scenes.splice(r, 1), + this._engine.wipeCaches(!0), + (this._isDisposed = !0); + }), + Object.defineProperty(t.prototype, "isDisposed", { + get: function () { + return this._isDisposed; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.clearCachedVertexData = function () { + for (var e = 0; e < this.meshes.length; e++) { + var t = this.meshes[e].geometry; + if (t) for (var n in ((t._indices = []), t._vertexBuffers)) t._vertexBuffers.hasOwnProperty(n) && (t._vertexBuffers[n]._buffer._data = null); + } + }), + (t.prototype.cleanCachedTextureBuffer = function () { + for (var e = 0, t = this.textures; e < t.length; e++) { + var n = t[e]; + n._buffer && (n._buffer = null); + } + }), + (t.prototype.getWorldExtends = function (e) { + var t = new u.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), + n = new u.e(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE); + return ( + (e = + e || + function () { + return !0; + }), + this.meshes.filter(e).forEach(function (e) { + if ((e.computeWorldMatrix(!0), e.subMeshes && 0 !== e.subMeshes.length && !e.infiniteDistance)) { + var i = e.getBoundingInfo(), + r = i.boundingBox.minimumWorld, + o = i.boundingBox.maximumWorld; + u.e.CheckExtends(r, t, n), u.e.CheckExtends(o, t, n); + } + }), + { min: t, max: n } + ); + }), + (t.prototype.createPickingRay = function (e, t, n, i, r) { + throw (void 0 === r && (r = !1), O.a.WarnImport("Ray")); + }), + (t.prototype.createPickingRayToRef = function (e, t, n, i, r, o) { + throw (void 0 === o && (o = !1), O.a.WarnImport("Ray")); + }), + (t.prototype.createPickingRayInCameraSpace = function (e, t, n) { + throw O.a.WarnImport("Ray"); + }), + (t.prototype.createPickingRayInCameraSpaceToRef = function (e, t, n, i) { + throw O.a.WarnImport("Ray"); + }), + (t.prototype.pick = function (e, t, n, i, r, o) { + var a = new _.a(); + return (a._pickingUnavailable = !0), a; + }), + (t.prototype.pickWithRay = function (e, t, n, i) { + throw O.a.WarnImport("Ray"); + }), + (t.prototype.multiPick = function (e, t, n, i, r) { + throw O.a.WarnImport("Ray"); + }), + (t.prototype.multiPickWithRay = function (e, t, n) { + throw O.a.WarnImport("Ray"); + }), + (t.prototype.setPointerOverMesh = function (e) { + this._inputManager.setPointerOverMesh(e); + }), + (t.prototype.getPointerOverMesh = function () { + return this._inputManager.getPointerOverMesh(); + }), + (t.prototype._rebuildGeometries = function () { + for (var e = 0, t = this.geometries; e < t.length; e++) { + t[e]._rebuild(); + } + for (var n = 0, i = this.meshes; n < i.length; n++) { + i[n]._rebuild(); + } + this.postProcessManager && this.postProcessManager._rebuild(); + for (var r = 0, o = this._components; r < o.length; r++) { + o[r].rebuild(); + } + for (var a = 0, s = this.particleSystems; a < s.length; a++) { + s[a].rebuild(); + } + }), + (t.prototype._rebuildTextures = function () { + for (var e = 0, t = this.textures; e < t.length; e++) { + t[e]._rebuild(); + } + this.markAllMaterialsAsDirty(1); + }), + (t.prototype._getByTags = function (e, t, n) { + if (void 0 === t) return e; + var i = []; + for (var r in ((n = n || function (e) {}), e)) { + var o = e[r]; + l.a && l.a.MatchesQuery(o, t) && (i.push(o), n(o)); + } + return i; + }), + (t.prototype.getMeshesByTags = function (e, t) { + return this._getByTags(this.meshes, e, t); + }), + (t.prototype.getCamerasByTags = function (e, t) { + return this._getByTags(this.cameras, e, t); + }), + (t.prototype.getLightsByTags = function (e, t) { + return this._getByTags(this.lights, e, t); + }), + (t.prototype.getMaterialByTags = function (e, t) { + return this._getByTags(this.materials, e, t).concat(this._getByTags(this.multiMaterials, e, t)); + }), + (t.prototype.setRenderingOrder = function (e, t, n, i) { + void 0 === t && (t = null), void 0 === n && (n = null), void 0 === i && (i = null), this._renderingManager.setRenderingOrder(e, t, n, i); + }), + (t.prototype.setRenderingAutoClearDepthStencil = function (e, t, n, i) { + void 0 === n && (n = !0), void 0 === i && (i = !0), this._renderingManager.setRenderingAutoClearDepthStencil(e, t, n, i); + }), + (t.prototype.getAutoClearDepthStencilSetup = function (e) { + return this._renderingManager.getAutoClearDepthStencilSetup(e); + }), + Object.defineProperty(t.prototype, "blockMaterialDirtyMechanism", { + get: function () { + return this._blockMaterialDirtyMechanism; + }, + set: function (e) { + this._blockMaterialDirtyMechanism !== e && ((this._blockMaterialDirtyMechanism = e), e || this.markAllMaterialsAsDirty(31)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.markAllMaterialsAsDirty = function (e, t) { + if (!this._blockMaterialDirtyMechanism) + for (var n = 0, i = this.materials; n < i.length; n++) { + var r = i[n]; + (t && !t(r)) || r.markAsDirty(e); + } + }), + (t.prototype._loadFile = function (e, t, n, i, r, o) { + var a = this, + s = N.a.LoadFile(e, t, n, i ? this.offlineProvider : void 0, r, o); + return ( + this._activeRequests.push(s), + s.onCompleteObservable.add(function (e) { + a._activeRequests.splice(a._activeRequests.indexOf(e), 1); + }), + s + ); + }), + (t.prototype._loadFileAsync = function (e, t, n, i) { + var r = this; + return new Promise(function (o, a) { + r._loadFile( + e, + function (e) { + o(e); + }, + t, + n, + i, + function (e, t) { + a(t); + } + ); + }); + }), + (t.prototype._requestFile = function (e, t, n, i, r, o, a) { + var s = this, + c = N.a.RequestFile(e, t, n, i ? this.offlineProvider : void 0, r, o, a); + return ( + this._activeRequests.push(c), + c.onCompleteObservable.add(function (e) { + s._activeRequests.splice(s._activeRequests.indexOf(e), 1); + }), + c + ); + }), + (t.prototype._requestFileAsync = function (e, t, n, i, r) { + var o = this; + return new Promise(function (a, s) { + o._requestFile( + e, + function (e) { + a(e); + }, + t, + n, + i, + function (e) { + s(e); + }, + r + ); + }); + }), + (t.prototype._readFile = function (e, t, n, i, r) { + var o = this, + a = N.a.ReadFile(e, t, n, i, r); + return ( + this._activeRequests.push(a), + a.onCompleteObservable.add(function (e) { + o._activeRequests.splice(o._activeRequests.indexOf(e), 1); + }), + a + ); + }), + (t.prototype._readFileAsync = function (e, t, n) { + var i = this; + return new Promise(function (r, o) { + i._readFile( + e, + function (e) { + r(e); + }, + t, + n, + function (e) { + o(e); + } + ); + }); + }), + (t.FOGMODE_NONE = 0), + (t.FOGMODE_EXP = 1), + (t.FOGMODE_EXP2 = 2), + (t.FOGMODE_LINEAR = 3), + (t.MinDeltaTime = 1), + (t.MaxDeltaTime = 1e3), + t + ); + })(f.a); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.WebUtils = void 0); + class r { + static isSafari() { + let e = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + return e && (e = !navigator.userAgent.match("CriOS")), e; + } + static isChrome() { + const e = window.chrome, + t = window.navigator, + n = t.vendor, + i = void 0 !== window.opr, + r = t.userAgent.indexOf("Edge") > -1; + return !!t.userAgent.match("CriOS") || (null != e && "Google Inc." === n && !1 === i && !1 === r); + } + static check_webp_feature(e) { + return i(this, void 0, void 0, function* () { + const t = { + lossy: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", + lossless: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", + alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", + animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA", + }; + return new Promise((n) => { + const i = new Image(); + (i.onload = () => n(i.width > 0 && i.height > 0)), (i.onerror = () => n(!1)), (i.src = "data:image/webp;base64," + t[e]); + }); + }); + } + static isWebpSupported() { + return i(this, void 0, void 0, function* () { + if (-1 != r._webpSupported) return 1 == r._webpSupported; + const e = yield r.check_webp_feature("lossless"); + return (r._webpSupported = e ? 1 : 0), 1 == r._webpSupported; + }); + } + static get textureExtension() { + return 1 == r._webpSupported ? "webp" : "png"; + } + static get loadWebpAssets() { + return 1 == r._webpSupported; + } + static isOggSupported() { + return i(this, void 0, void 0, function* () { + if (-1 != r._isOggSupported) return 1 == r._isOggSupported; + const e = new Audio(); + return (r._isOggSupported = e.canPlayType("audio/ogg") ? 1 : 0), 1 == r._isOggSupported; + }); + } + static get audioExtension() { + return 1 == r._isOggSupported ? "ogg" : "mp3"; + } + static openFullscreen(e) { + let t; + e.requestFullscreen + ? (t = e.requestFullscreen()) + : e.mozRequestFullScreen + ? (t = e.mozRequestFullScreen()) + : e.webkitRequestFullscreen + ? (t = e.webkitRequestFullscreen()) + : e.msRequestFullscreen && (t = e.msRequestFullscreen()), + t && r.hasTouch && t.then(() => r.lockOrientation()); + } + static closeFullscreen(e) { + (e && null == e.fullscreenElement) || + (e.exitFullscreen ? e.exitFullscreen() : e.mozCancelFullScreen ? e.mozCancelFullScreen() : e.webkitExitFullscreen ? e.webkitExitFullscreen() : e.msExitFullscreen && e.msExitFullscreen()); + } + static formatNumber(e) { + return r.INTL_NUMBER.format(e); + } + static lockOrientation() { + null != window.screen.orientation && + window.screen.orientation + .lock("portrait") + .then( + () => {}, + () => {} + ) + .catch((e) => {}); + } + static get isIOS() { + return ( + null != r._isIOS || (r._isIOS = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || (navigator.userAgent.includes("Mac") && "ontouchend" in document)), + r._isIOS + ); + } + } + (t.WebUtils = r), (r._webpSupported = -1), (r._isOggSupported = -1), (r.INTL_NUMBER = new Intl.NumberFormat("en-US")), (r.hasTouch = !1), (r.orientationCheckDone = !1), (r._isIOS = void 0); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }), + n.d(t, "c", function () { + return a; + }), + n.d(t, "d", function () { + return s; + }), + n.d(t, "b", function () { + return c; + }); + var i = n(2), + r = n(1), + o = (function () { + function e() {} + return (e.POINTERDOWN = 1), (e.POINTERUP = 2), (e.POINTERMOVE = 4), (e.POINTERWHEEL = 8), (e.POINTERPICK = 16), (e.POINTERTAP = 32), (e.POINTERDOUBLETAP = 64), e; + })(), + a = function (e, t) { + (this.type = e), (this.event = t); + }, + s = (function (e) { + function t(t, n, i, o) { + var a = e.call(this, t, n) || this; + return (a.ray = null), (a.skipOnPointerObservable = !1), (a.localPosition = new r.d(i, o)), a; + } + return Object(i.d)(t, e), t; + })(a), + c = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n) || this; + return (r.pickInfo = i), r; + } + return Object(i.d)(t, e), t; + })(a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }); + var i = n(2), + r = (function () { + function e() {} + return ( + (e.NAME_EFFECTLAYER = "EffectLayer"), + (e.NAME_LAYER = "Layer"), + (e.NAME_LENSFLARESYSTEM = "LensFlareSystem"), + (e.NAME_BOUNDINGBOXRENDERER = "BoundingBoxRenderer"), + (e.NAME_PARTICLESYSTEM = "ParticleSystem"), + (e.NAME_GAMEPAD = "Gamepad"), + (e.NAME_SIMPLIFICATIONQUEUE = "SimplificationQueue"), + (e.NAME_GEOMETRYBUFFERRENDERER = "GeometryBufferRenderer"), + (e.NAME_DEPTHRENDERER = "DepthRenderer"), + (e.NAME_POSTPROCESSRENDERPIPELINEMANAGER = "PostProcessRenderPipelineManager"), + (e.NAME_SPRITE = "Sprite"), + (e.NAME_OUTLINERENDERER = "Outline"), + (e.NAME_PROCEDURALTEXTURE = "ProceduralTexture"), + (e.NAME_SHADOWGENERATOR = "ShadowGenerator"), + (e.NAME_OCTREE = "Octree"), + (e.NAME_PHYSICSENGINE = "PhysicsEngine"), + (e.NAME_AUDIO = "Audio"), + (e.STEP_ISREADYFORMESH_EFFECTLAYER = 0), + (e.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER = 0), + (e.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER = 0), + (e.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER = 0), + (e.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER = 1), + (e.STEP_BEFORECAMERADRAW_EFFECTLAYER = 0), + (e.STEP_BEFORECAMERADRAW_LAYER = 1), + (e.STEP_BEFORERENDERTARGETDRAW_LAYER = 0), + (e.STEP_BEFORERENDERINGMESH_OUTLINE = 0), + (e.STEP_AFTERRENDERINGMESH_OUTLINE = 0), + (e.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW = 0), + (e.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER = 1), + (e.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE = 0), + (e.STEP_BEFORECAMERAUPDATE_GAMEPAD = 1), + (e.STEP_BEFORECLEAR_PROCEDURALTEXTURE = 0), + (e.STEP_AFTERRENDERTARGETDRAW_LAYER = 0), + (e.STEP_AFTERCAMERADRAW_EFFECTLAYER = 0), + (e.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM = 1), + (e.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW = 2), + (e.STEP_AFTERCAMERADRAW_LAYER = 3), + (e.STEP_AFTERRENDER_AUDIO = 0), + (e.STEP_GATHERRENDERTARGETS_DEPTHRENDERER = 0), + (e.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER = 1), + (e.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR = 2), + (e.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER = 3), + (e.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER = 0), + (e.STEP_POINTERMOVE_SPRITE = 0), + (e.STEP_POINTERDOWN_SPRITE = 0), + (e.STEP_POINTERUP_SPRITE = 0), + e + ); + })(), + o = (function (e) { + function t(t) { + return e.apply(this, t) || this; + } + return ( + Object(i.d)(t, e), + (t.Create = function () { + return Object.create(t.prototype); + }), + (t.prototype.registerStep = function (e, t, n) { + var i = 0; + for (Number.MAX_VALUE; i < this.length; i++) { + if (e < this[i].index) break; + } + this.splice(i, 0, { index: e, component: t, action: n.bind(t) }); + }), + (t.prototype.clear = function () { + this.length = 0; + }), + t + ); + })(Array); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.WarnImport = function (e) { + return e + " needs to be imported before as it contains a side-effect required by your code."; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return i; + }), + n.d(t, "a", function () { + return o; + }); + var i, + r = n(1); + !(function (e) { + (e[(e.LOCAL = 0)] = "LOCAL"), (e[(e.WORLD = 1)] = "WORLD"), (e[(e.BONE = 2)] = "BONE"); + })(i || (i = {})); + var o = (function () { + function e() {} + return (e.X = new r.e(1, 0, 0)), (e.Y = new r.e(0, 1, 0)), (e.Z = new r.e(0, 0, 1)), e; + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(47), + r = n(6), + o = n(1), + a = (n(208), n(14)), + s = + (n(166), + (function () { + function e(e, t, n, a, s, c, l, u, h, d, p, f, m, g, b) { + void 0 === l && (l = 1), + void 0 === d && (d = null), + void 0 === p && (p = 0), + void 0 === f && (f = "postprocess"), + void 0 === g && (g = !1), + void 0 === b && (b = 5), + (this.name = e), + (this.width = -1), + (this.height = -1), + (this._outputTexture = null), + (this.autoClear = !0), + (this.alphaMode = 0), + (this.animations = new Array()), + (this.enablePixelPerfectMode = !1), + (this.forceFullscreenViewport = !0), + (this.scaleMode = 1), + (this.alwaysForcePOT = !1), + (this._samples = 1), + (this.adaptScaleToCurrentViewport = !1), + (this._reusable = !1), + (this._textures = new i.a(2)), + (this._currentRenderTextureInd = 0), + (this._scaleRatio = new o.d(1, 1)), + (this._texelSize = o.d.Zero()), + (this.onActivateObservable = new r.c()), + (this.onSizeChangedObservable = new r.c()), + (this.onApplyObservable = new r.c()), + (this.onBeforeRenderObservable = new r.c()), + (this.onAfterRenderObservable = new r.c()), + null != c + ? ((this._camera = c), (this._scene = c.getScene()), c.attachPostProcess(this), (this._engine = this._scene.getEngine()), this._scene.postProcesses.push(this), (this.uniqueId = this._scene.getUniqueId())) + : u && ((this._engine = u), this._engine.postProcesses.push(this)), + (this._options = s), + (this.renderTargetSamplingMode = l || 1), + (this._reusable = h || !1), + (this._textureType = p), + (this._textureFormat = b), + (this._samplers = a || []), + this._samplers.push("textureSampler"), + (this._fragmentUrl = t), + (this._vertexUrl = f), + (this._parameters = n || []), + this._parameters.push("scale"), + (this._indexParameters = m), + g || this.updateEffect(d); + } + return ( + Object.defineProperty(e.prototype, "samples", { + get: function () { + return this._samples; + }, + set: function (e) { + var t = this; + (this._samples = Math.min(e, this._engine.getCaps().maxMSAASamples)), + this._textures.forEach(function (e) { + e.samples !== t._samples && t._engine.updateRenderTargetTextureSampleCount(e, t._samples); + }); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getEffectName = function () { + return this._fragmentUrl; + }), + Object.defineProperty(e.prototype, "onActivate", { + set: function (e) { + this._onActivateObserver && this.onActivateObservable.remove(this._onActivateObserver), e && (this._onActivateObserver = this.onActivateObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onSizeChanged", { + set: function (e) { + this._onSizeChangedObserver && this.onSizeChangedObservable.remove(this._onSizeChangedObserver), (this._onSizeChangedObserver = this.onSizeChangedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onApply", { + set: function (e) { + this._onApplyObserver && this.onApplyObservable.remove(this._onApplyObserver), (this._onApplyObserver = this.onApplyObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onBeforeRender", { + set: function (e) { + this._onBeforeRenderObserver && this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver), (this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onAfterRender", { + set: function (e) { + this._onAfterRenderObserver && this.onAfterRenderObservable.remove(this._onAfterRenderObserver), (this._onAfterRenderObserver = this.onAfterRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "inputTexture", { + get: function () { + return this._textures.data[this._currentRenderTextureInd]; + }, + set: function (e) { + this._forcedOutputTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getCamera = function () { + return this._camera; + }), + Object.defineProperty(e.prototype, "texelSize", { + get: function () { + return this._shareOutputWithPostProcess + ? this._shareOutputWithPostProcess.texelSize + : (this._forcedOutputTexture && this._texelSize.copyFromFloats(1 / this._forcedOutputTexture.width, 1 / this._forcedOutputTexture.height), this._texelSize); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "PostProcess"; + }), + (e.prototype.getEngine = function () { + return this._engine; + }), + (e.prototype.getEffect = function () { + return this._effect; + }), + (e.prototype.shareOutputWith = function (e) { + return this._disposeTextures(), (this._shareOutputWithPostProcess = e), this; + }), + (e.prototype.useOwnOutput = function () { + 0 == this._textures.length && (this._textures = new i.a(2)), (this._shareOutputWithPostProcess = null); + }), + (e.prototype.updateEffect = function (e, t, n, i, r, o) { + void 0 === e && (e = null), + void 0 === t && (t = null), + void 0 === n && (n = null), + (this._effect = this._engine.createEffect( + { vertex: this._vertexUrl, fragment: this._fragmentUrl }, + ["position"], + t || this._parameters, + n || this._samplers, + null !== e ? e : "", + void 0, + r, + o, + i || this._indexParameters + )); + }), + (e.prototype.isReusable = function () { + return this._reusable; + }), + (e.prototype.markTextureDirty = function () { + this.width = -1; + }), + (e.prototype.activate = function (e, t, n) { + var i = this; + void 0 === t && (t = null); + var r = (e = e || this._camera).getScene(), + o = r.getEngine(), + s = o.getCaps().maxTextureSize, + c = ((t ? t.width : this._engine.getRenderWidth(!0)) * this._options) | 0, + l = ((t ? t.height : this._engine.getRenderHeight(!0)) * this._options) | 0, + u = e.parent; + !u || (u.leftCamera != e && u.rightCamera != e) || (c /= 2); + var h, + d = this._options.width || c, + p = this._options.height || l, + f = 7 !== this.renderTargetSamplingMode && 1 !== this.renderTargetSamplingMode && 2 !== this.renderTargetSamplingMode; + if (!this._shareOutputWithPostProcess && !this._forcedOutputTexture) { + if (this.adaptScaleToCurrentViewport) { + var m = o.currentViewport; + m && ((d *= m.width), (p *= m.height)); + } + if ( + ((f || this.alwaysForcePOT) && + (this._options.width || (d = o.needPOTTextures ? a.a.GetExponentOfTwo(d, s, this.scaleMode) : d), this._options.height || (p = o.needPOTTextures ? a.a.GetExponentOfTwo(p, s, this.scaleMode) : p)), + this.width !== d || this.height !== p) + ) { + if (this._textures.length > 0) { + for (var g = 0; g < this._textures.length; g++) this._engine._releaseTexture(this._textures.data[g]); + this._textures.reset(); + } + (this.width = d), (this.height = p); + var b = { width: this.width, height: this.height }, + _ = { + generateMipMaps: f, + generateDepthBuffer: n || 0 === e._postProcesses.indexOf(this), + generateStencilBuffer: (n || 0 === e._postProcesses.indexOf(this)) && this._engine.isStencilEnable, + samplingMode: this.renderTargetSamplingMode, + type: this._textureType, + format: this._textureFormat, + }; + this._textures.push(this._engine.createRenderTargetTexture(b, _)), + this._reusable && this._textures.push(this._engine.createRenderTargetTexture(b, _)), + this._texelSize.copyFromFloats(1 / this.width, 1 / this.height), + this.onSizeChangedObservable.notifyObservers(this); + } + this._textures.forEach(function (e) { + e.samples !== i.samples && i._engine.updateRenderTargetTextureSampleCount(e, i.samples); + }); + } + return ( + this._shareOutputWithPostProcess + ? (h = this._shareOutputWithPostProcess.inputTexture) + : this._forcedOutputTexture + ? ((h = this._forcedOutputTexture), (this.width = this._forcedOutputTexture.width), (this.height = this._forcedOutputTexture.height)) + : (h = this.inputTexture), + this.enablePixelPerfectMode + ? (this._scaleRatio.copyFromFloats(c / d, l / p), this._engine.bindFramebuffer(h, 0, c, l, this.forceFullscreenViewport)) + : (this._scaleRatio.copyFromFloats(1, 1), this._engine.bindFramebuffer(h, 0, void 0, void 0, this.forceFullscreenViewport)), + this.onActivateObservable.notifyObservers(e), + this.autoClear && 0 === this.alphaMode && this._engine.clear(this.clearColor ? this.clearColor : r.clearColor, r._allowPostProcessClearColor, !0, !0), + this._reusable && (this._currentRenderTextureInd = (this._currentRenderTextureInd + 1) % 2), + h + ); + }), + Object.defineProperty(e.prototype, "isSupported", { + get: function () { + return this._effect.isSupported; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "aspectRatio", { + get: function () { + return this._shareOutputWithPostProcess + ? this._shareOutputWithPostProcess.aspectRatio + : this._forcedOutputTexture + ? this._forcedOutputTexture.width / this._forcedOutputTexture.height + : this.width / this.height; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isReady = function () { + return this._effect && this._effect.isReady(); + }), + (e.prototype.apply = function () { + return this._effect && this._effect.isReady() + ? (this._engine.enableEffect(this._effect), + this._engine.setState(!1), + this._engine.setDepthBuffer(!1), + this._engine.setDepthWrite(!1), + this._engine.setAlphaMode(this.alphaMode), + this.alphaConstants && this.getEngine().setAlphaConstants(this.alphaConstants.r, this.alphaConstants.g, this.alphaConstants.b, this.alphaConstants.a), + (e = this._shareOutputWithPostProcess ? this._shareOutputWithPostProcess.inputTexture : this._forcedOutputTexture ? this._forcedOutputTexture : this.inputTexture), + this._effect._bindTexture("textureSampler", e), + this._effect.setVector2("scale", this._scaleRatio), + this.onApplyObservable.notifyObservers(this._effect), + this._effect) + : null; + var e; + }), + (e.prototype._disposeTextures = function () { + if (!this._shareOutputWithPostProcess && !this._forcedOutputTexture) { + if (this._textures.length > 0) for (var e = 0; e < this._textures.length; e++) this._engine._releaseTexture(this._textures.data[e]); + this._textures.dispose(); + } + }), + (e.prototype.dispose = function (e) { + if (((e = e || this._camera), this._disposeTextures(), this._scene)) { + var t = this._scene.postProcesses.indexOf(this); + -1 !== t && this._scene.postProcesses.splice(t, 1); + } else { + var n = this._engine.postProcesses.indexOf(this); + -1 !== n && this._engine.postProcesses.splice(n, 1); + } + if (e) { + if ((e.detachPostProcess(this), 0 === e._postProcesses.indexOf(this) && e._postProcesses.length > 0)) { + var i = this._camera._getFirstPostProcess(); + i && i.markTextureDirty(); + } + this.onActivateObservable.clear(), this.onAfterRenderObservable.clear(), this.onApplyObservable.clear(), this.onBeforeRenderObservable.clear(), this.onSizeChangedObservable.clear(); + } + }), + e + ); + })()); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + Object.defineProperty(e, "LastCreatedEngine", { + get: function () { + return 0 === this.Instances.length ? null : this.Instances[this.Instances.length - 1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "LastCreatedScene", { + get: function () { + return this._LastCreatedScene; + }, + enumerable: !0, + configurable: !0, + }), + (e.Instances = new Array()), + (e._LastCreatedScene = null), + (e.UseFallbackTexture = !0), + (e.FallbackTexture = ""), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return m; + }); + var i = n(2), + r = n(3), + o = n(47), + a = n(12), + s = n(6), + c = n(1), + l = n(35), + u = n(10), + h = n(13), + d = n(22), + p = n(77), + f = n(128), + m = (function (e) { + function t(n, i, r, a) { + void 0 === a && (a = !0); + var l = e.call(this, n, r) || this; + return ( + (l._position = c.e.Zero()), + (l.upVector = c.e.Up()), + (l.orthoLeft = null), + (l.orthoRight = null), + (l.orthoBottom = null), + (l.orthoTop = null), + (l.fov = 0.8), + (l.minZ = 1), + (l.maxZ = 1e4), + (l.inertia = 0.9), + (l.mode = t.PERSPECTIVE_CAMERA), + (l.isIntermediate = !1), + (l.viewport = new p.a(0, 0, 1, 1)), + (l.layerMask = 268435455), + (l.fovMode = t.FOVMODE_VERTICAL_FIXED), + (l.cameraRigMode = t.RIG_MODE_NONE), + (l.customRenderTargets = new Array()), + (l.outputRenderTarget = null), + (l.onViewMatrixChangedObservable = new s.c()), + (l.onProjectionMatrixChangedObservable = new s.c()), + (l.onAfterCheckInputsObservable = new s.c()), + (l.onRestoreStateObservable = new s.c()), + (l.isRigCamera = !1), + (l._rigCameras = new Array()), + (l._webvrViewMatrix = c.a.Identity()), + (l._skipRendering = !1), + (l._projectionMatrix = new c.a()), + (l._postProcesses = new Array()), + (l._activeMeshes = new o.a(256)), + (l._globalPosition = c.e.Zero()), + (l._computedViewMatrix = c.a.Identity()), + (l._doNotComputeProjectionMatrix = !1), + (l._transformMatrix = c.a.Zero()), + (l._refreshFrustumPlanes = !0), + (l._isCamera = !0), + (l._isLeftCamera = !1), + (l._isRightCamera = !1), + l.getScene().addCamera(l), + a && !l.getScene().activeCamera && (l.getScene().activeCamera = l), + (l.position = i), + l + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._position; + }, + set: function (e) { + this._position = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.storeState = function () { + return (this._stateStored = !0), (this._storedFov = this.fov), this; + }), + (t.prototype._restoreStateValues = function () { + return !!this._stateStored && ((this.fov = this._storedFov), !0); + }), + (t.prototype.restoreState = function () { + return !!this._restoreStateValues() && (this.onRestoreStateObservable.notifyObservers(this), !0); + }), + (t.prototype.getClassName = function () { + return "Camera"; + }), + (t.prototype.toString = function (e) { + var t = "Name: " + this.name; + if (((t += ", type: " + this.getClassName()), this.animations)) for (var n = 0; n < this.animations.length; n++) t += ", animation[0]: " + this.animations[n].toString(e); + return t; + }), + Object.defineProperty(t.prototype, "globalPosition", { + get: function () { + return this._globalPosition; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getActiveMeshes = function () { + return this._activeMeshes; + }), + (t.prototype.isActiveMesh = function (e) { + return -1 !== this._activeMeshes.indexOf(e); + }), + (t.prototype.isReady = function (t) { + if ((void 0 === t && (t = !1), t)) + for (var n = 0, i = this._postProcesses; n < i.length; n++) { + var r = i[n]; + if (r && !r.isReady()) return !1; + } + return e.prototype.isReady.call(this, t); + }), + (t.prototype._initCache = function () { + e.prototype._initCache.call(this), + (this._cache.position = new c.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), + (this._cache.upVector = new c.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), + (this._cache.mode = void 0), + (this._cache.minZ = void 0), + (this._cache.maxZ = void 0), + (this._cache.fov = void 0), + (this._cache.fovMode = void 0), + (this._cache.aspectRatio = void 0), + (this._cache.orthoLeft = void 0), + (this._cache.orthoRight = void 0), + (this._cache.orthoBottom = void 0), + (this._cache.orthoTop = void 0), + (this._cache.renderWidth = void 0), + (this._cache.renderHeight = void 0); + }), + (t.prototype._updateCache = function (t) { + t || e.prototype._updateCache.call(this), this._cache.position.copyFrom(this.position), this._cache.upVector.copyFrom(this.upVector); + }), + (t.prototype._isSynchronized = function () { + return this._isSynchronizedViewMatrix() && this._isSynchronizedProjectionMatrix(); + }), + (t.prototype._isSynchronizedViewMatrix = function () { + return !!e.prototype._isSynchronized.call(this) && this._cache.position.equals(this.position) && this._cache.upVector.equals(this.upVector) && this.isSynchronizedWithParent(); + }), + (t.prototype._isSynchronizedProjectionMatrix = function () { + var e = this._cache.mode === this.mode && this._cache.minZ === this.minZ && this._cache.maxZ === this.maxZ; + if (!e) return !1; + var n = this.getEngine(); + return (e = + this.mode === t.PERSPECTIVE_CAMERA + ? this._cache.fov === this.fov && this._cache.fovMode === this.fovMode && this._cache.aspectRatio === n.getAspectRatio(this) + : this._cache.orthoLeft === this.orthoLeft && + this._cache.orthoRight === this.orthoRight && + this._cache.orthoBottom === this.orthoBottom && + this._cache.orthoTop === this.orthoTop && + this._cache.renderWidth === n.getRenderWidth() && + this._cache.renderHeight === n.getRenderHeight()); + }), + (t.prototype.attachControl = function (e, t) {}), + (t.prototype.detachControl = function (e) {}), + (t.prototype.update = function () { + this._checkInputs(), this.cameraRigMode !== t.RIG_MODE_NONE && this._updateRigCameras(); + }), + (t.prototype._checkInputs = function () { + this.onAfterCheckInputsObservable.notifyObservers(this); + }), + Object.defineProperty(t.prototype, "rigCameras", { + get: function () { + return this._rigCameras; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rigPostProcess", { + get: function () { + return this._rigPostProcess; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._getFirstPostProcess = function () { + for (var e = 0; e < this._postProcesses.length; e++) if (null !== this._postProcesses[e]) return this._postProcesses[e]; + return null; + }), + (t.prototype._cascadePostProcessesToRigCams = function () { + var e = this._getFirstPostProcess(); + e && e.markTextureDirty(); + for (var t = 0, n = this._rigCameras.length; t < n; t++) { + var i = this._rigCameras[t], + r = i._rigPostProcess; + if (r) "pass" === r.getEffectName() && (i.isIntermediate = 0 === this._postProcesses.length), (i._postProcesses = this._postProcesses.slice(0).concat(r)), r.markTextureDirty(); + else i._postProcesses = this._postProcesses.slice(0); + } + }), + (t.prototype.attachPostProcess = function (e, t) { + return ( + void 0 === t && (t = null), + !e.isReusable() && this._postProcesses.indexOf(e) > -1 + ? (u.a.Error("You're trying to reuse a post process not defined as reusable."), 0) + : (null == t || t < 0 ? this._postProcesses.push(e) : null === this._postProcesses[t] ? (this._postProcesses[t] = e) : this._postProcesses.splice(t, 0, e), + this._cascadePostProcessesToRigCams(), + this._postProcesses.indexOf(e)) + ); + }), + (t.prototype.detachPostProcess = function (e) { + var t = this._postProcesses.indexOf(e); + -1 !== t && (this._postProcesses[t] = null), this._cascadePostProcessesToRigCams(); + }), + (t.prototype.getWorldMatrix = function () { + return this._isSynchronizedViewMatrix() || this.getViewMatrix(), this._worldMatrix; + }), + (t.prototype._getViewMatrix = function () { + return c.a.Identity(); + }), + (t.prototype.getViewMatrix = function (e) { + return ( + (!e && this._isSynchronizedViewMatrix()) || + (this.updateCache(), + (this._computedViewMatrix = this._getViewMatrix()), + (this._currentRenderId = this.getScene().getRenderId()), + this._childUpdateId++, + (this._refreshFrustumPlanes = !0), + this._cameraRigParams && this._cameraRigParams.vrPreViewMatrix && this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix, this._computedViewMatrix), + this.parent && this.parent.onViewMatrixChangedObservable && this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent), + this.onViewMatrixChangedObservable.notifyObservers(this), + this._computedViewMatrix.invertToRef(this._worldMatrix)), + this._computedViewMatrix + ); + }), + (t.prototype.freezeProjectionMatrix = function (e) { + (this._doNotComputeProjectionMatrix = !0), void 0 !== e && (this._projectionMatrix = e); + }), + (t.prototype.unfreezeProjectionMatrix = function () { + this._doNotComputeProjectionMatrix = !1; + }), + (t.prototype.getProjectionMatrix = function (e) { + if (this._doNotComputeProjectionMatrix || (!e && this._isSynchronizedProjectionMatrix())) return this._projectionMatrix; + (this._cache.mode = this.mode), (this._cache.minZ = this.minZ), (this._cache.maxZ = this.maxZ), (this._refreshFrustumPlanes = !0); + var n = this.getEngine(), + i = this.getScene(); + if (this.mode === t.PERSPECTIVE_CAMERA) { + (this._cache.fov = this.fov), (this._cache.fovMode = this.fovMode), (this._cache.aspectRatio = n.getAspectRatio(this)), this.minZ <= 0 && (this.minZ = 0.1); + var r = n.useReverseDepthBuffer; + (i.useRightHandedSystem ? (r ? c.a.PerspectiveFovReverseRHToRef : c.a.PerspectiveFovRHToRef) : r ? c.a.PerspectiveFovReverseLHToRef : c.a.PerspectiveFovLHToRef)( + this.fov, + n.getAspectRatio(this), + this.minZ, + this.maxZ, + this._projectionMatrix, + this.fovMode === t.FOVMODE_VERTICAL_FIXED + ); + } else { + var o = n.getRenderWidth() / 2, + a = n.getRenderHeight() / 2; + i.useRightHandedSystem + ? c.a.OrthoOffCenterRHToRef(this.orthoLeft || -o, this.orthoRight || o, this.orthoBottom || -a, this.orthoTop || a, this.minZ, this.maxZ, this._projectionMatrix) + : c.a.OrthoOffCenterLHToRef(this.orthoLeft || -o, this.orthoRight || o, this.orthoBottom || -a, this.orthoTop || a, this.minZ, this.maxZ, this._projectionMatrix), + (this._cache.orthoLeft = this.orthoLeft), + (this._cache.orthoRight = this.orthoRight), + (this._cache.orthoBottom = this.orthoBottom), + (this._cache.orthoTop = this.orthoTop), + (this._cache.renderWidth = n.getRenderWidth()), + (this._cache.renderHeight = n.getRenderHeight()); + } + return this.onProjectionMatrixChangedObservable.notifyObservers(this), this._projectionMatrix; + }), + (t.prototype.getTransformationMatrix = function () { + return this._computedViewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix), this._transformMatrix; + }), + (t.prototype._updateFrustumPlanes = function () { + this._refreshFrustumPlanes && + (this.getTransformationMatrix(), + this._frustumPlanes ? f.a.GetPlanesToRef(this._transformMatrix, this._frustumPlanes) : (this._frustumPlanes = f.a.GetPlanes(this._transformMatrix)), + (this._refreshFrustumPlanes = !1)); + }), + (t.prototype.isInFrustum = function (e, t) { + if ((void 0 === t && (t = !1), this._updateFrustumPlanes(), t && this.rigCameras.length > 0)) { + var n = !1; + return ( + this.rigCameras.forEach(function (t) { + t._updateFrustumPlanes(), (n = n || e.isInFrustum(t._frustumPlanes)); + }), + n + ); + } + return e.isInFrustum(this._frustumPlanes); + }), + (t.prototype.isCompletelyInFrustum = function (e) { + return this._updateFrustumPlanes(), e.isCompletelyInFrustum(this._frustumPlanes); + }), + (t.prototype.getForwardRay = function (e, t, n) { + throw (void 0 === e && (e = 100), d.a.WarnImport("Ray")); + }), + (t.prototype.dispose = function (n, i) { + for ( + void 0 === i && (i = !1), + this.onViewMatrixChangedObservable.clear(), + this.onProjectionMatrixChangedObservable.clear(), + this.onAfterCheckInputsObservable.clear(), + this.onRestoreStateObservable.clear(), + this.inputs && this.inputs.clear(), + this.getScene().stopAnimation(this), + this.getScene().removeCamera(this); + this._rigCameras.length > 0; + + ) { + var r = this._rigCameras.pop(); + r && r.dispose(); + } + if (this._rigPostProcess) this._rigPostProcess.dispose(this), (this._rigPostProcess = null), (this._postProcesses = []); + else if (this.cameraRigMode !== t.RIG_MODE_NONE) (this._rigPostProcess = null), (this._postProcesses = []); + else + for (var o = this._postProcesses.length; --o >= 0; ) { + var a = this._postProcesses[o]; + a && a.dispose(this); + } + for (o = this.customRenderTargets.length; --o >= 0; ) this.customRenderTargets[o].dispose(); + (this.customRenderTargets = []), this._activeMeshes.dispose(), e.prototype.dispose.call(this, n, i); + }), + Object.defineProperty(t.prototype, "isLeftCamera", { + get: function () { + return this._isLeftCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isRightCamera", { + get: function () { + return this._isRightCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "leftCamera", { + get: function () { + return this._rigCameras.length < 1 ? null : this._rigCameras[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rightCamera", { + get: function () { + return this._rigCameras.length < 2 ? null : this._rigCameras[1]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getLeftTarget = function () { + return this._rigCameras.length < 1 ? null : this._rigCameras[0].getTarget(); + }), + (t.prototype.getRightTarget = function () { + return this._rigCameras.length < 2 ? null : this._rigCameras[1].getTarget(); + }), + (t.prototype.setCameraRigMode = function (e, n) { + if (this.cameraRigMode !== e) { + for (; this._rigCameras.length > 0; ) { + var i = this._rigCameras.pop(); + i && i.dispose(); + } + if ( + ((this.cameraRigMode = e), + (this._cameraRigParams = {}), + (this._cameraRigParams.interaxialDistance = n.interaxialDistance || 0.0637), + (this._cameraRigParams.stereoHalfAngle = a.b.ToRadians(this._cameraRigParams.interaxialDistance / 0.0637)), + this.cameraRigMode !== t.RIG_MODE_NONE) + ) { + var r = this.createRigCamera(this.name + "_L", 0); + r && (r._isLeftCamera = !0); + var o = this.createRigCamera(this.name + "_R", 1); + o && (o._isRightCamera = !0), r && o && (this._rigCameras.push(r), this._rigCameras.push(o)); + } + switch (this.cameraRigMode) { + case t.RIG_MODE_STEREOSCOPIC_ANAGLYPH: + t._setStereoscopicAnaglyphRigMode(this); + break; + case t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: + case t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: + case t.RIG_MODE_STEREOSCOPIC_OVERUNDER: + case t.RIG_MODE_STEREOSCOPIC_INTERLACED: + t._setStereoscopicRigMode(this); + break; + case t.RIG_MODE_VR: + t._setVRRigMode(this, n); + break; + case t.RIG_MODE_WEBVR: + t._setWebVRRigMode(this, n); + } + this._cascadePostProcessesToRigCams(), this.update(); + } + }), + (t._setStereoscopicRigMode = function (e) { + throw "Import Cameras/RigModes/stereoscopicRigMode before using stereoscopic rig mode"; + }), + (t._setStereoscopicAnaglyphRigMode = function (e) { + throw "Import Cameras/RigModes/stereoscopicAnaglyphRigMode before using stereoscopic anaglyph rig mode"; + }), + (t._setVRRigMode = function (e, t) { + throw "Import Cameras/RigModes/vrRigMode before using VR rig mode"; + }), + (t._setWebVRRigMode = function (e, t) { + throw "Import Cameras/RigModes/WebVRRigMode before using Web VR rig mode"; + }), + (t.prototype._getVRProjectionMatrix = function () { + return ( + c.a.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov, this._cameraRigParams.vrMetrics.aspectRatio, this.minZ, this.maxZ, this._cameraRigParams.vrWorkMatrix), + this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix, this._projectionMatrix), + this._projectionMatrix + ); + }), + (t.prototype._updateCameraRotationMatrix = function () {}), + (t.prototype._updateWebVRCameraRotationMatrix = function () {}), + (t.prototype._getWebVRProjectionMatrix = function () { + return c.a.Identity(); + }), + (t.prototype._getWebVRViewMatrix = function () { + return c.a.Identity(); + }), + (t.prototype.setCameraRigParameter = function (e, t) { + this._cameraRigParams || (this._cameraRigParams = {}), (this._cameraRigParams[e] = t), "interaxialDistance" === e && (this._cameraRigParams.stereoHalfAngle = a.b.ToRadians(t / 0.0637)); + }), + (t.prototype.createRigCamera = function (e, t) { + return null; + }), + (t.prototype._updateRigCameras = function () { + for (var e = 0; e < this._rigCameras.length; e++) + (this._rigCameras[e].minZ = this.minZ), (this._rigCameras[e].maxZ = this.maxZ), (this._rigCameras[e].fov = this.fov), this._rigCameras[e].upVector.copyFrom(this.upVector); + this.cameraRigMode === t.RIG_MODE_STEREOSCOPIC_ANAGLYPH && (this._rigCameras[0].viewport = this._rigCameras[1].viewport = this.viewport); + }), + (t.prototype._setupInputs = function () {}), + (t.prototype.serialize = function () { + var e = r.a.Serialize(this); + return (e.type = this.getClassName()), this.parent && (e.parentId = this.parent.id), this.inputs && this.inputs.serialize(e), r.a.AppendSerializedAnimations(this, e), (e.ranges = this.serializeAnimationRanges()), e; + }), + (t.prototype.clone = function (e) { + return r.a.Clone(t.GetConstructorFromName(this.getClassName(), e, this.getScene(), this.interaxialDistance, this.isStereoscopicSideBySide), this); + }), + (t.prototype.getDirection = function (e) { + var t = c.e.Zero(); + return this.getDirectionToRef(e, t), t; + }), + Object.defineProperty(t.prototype, "absoluteRotation", { + get: function () { + var e = c.b.Zero(); + return this.getWorldMatrix().decompose(void 0, e), e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getDirectionToRef = function (e, t) { + c.e.TransformNormalToRef(e, this.getWorldMatrix(), t); + }), + (t.GetConstructorFromName = function (e, n, i, r, o) { + void 0 === r && (r = 0), void 0 === o && (o = !0); + var a = l.a.Construct(e, n, i, { interaxial_distance: r, isStereoscopicSideBySide: o }); + return ( + a || + function () { + return t._createDefaultParsedCamera(n, i); + } + ); + }), + (t.prototype.computeWorldMatrix = function () { + return this.getWorldMatrix(); + }), + (t.Parse = function (e, n) { + var i = e.type, + o = t.GetConstructorFromName(i, e.name, n, e.interaxial_distance, e.isStereoscopicSideBySide), + a = r.a.Parse(o, e, n); + if ( + (e.parentId && (a._waitingParentId = e.parentId), + a.inputs && (a.inputs.parse(e), a._setupInputs()), + a.setPosition && (a.position.copyFromFloats(0, 0, 0), a.setPosition(c.e.FromArray(e.position))), + e.target && a.setTarget && a.setTarget(c.e.FromArray(e.target)), + e.cameraRigMode) + ) { + var s = e.interaxial_distance ? { interaxialDistance: e.interaxial_distance } : {}; + a.setCameraRigMode(e.cameraRigMode, s); + } + if (e.animations) { + for (var u = 0; u < e.animations.length; u++) { + var d = e.animations[u], + p = h.a.GetClass("BABYLON.Animation"); + p && a.animations.push(p.Parse(d)); + } + l.a.ParseAnimationRanges(a, e, n); + } + return e.autoAnimate && n.beginAnimation(a, e.autoAnimateFrom, e.autoAnimateTo, e.autoAnimateLoop, e.autoAnimateSpeed || 1), a; + }), + (t._createDefaultParsedCamera = function (e, t) { + throw d.a.WarnImport("UniversalCamera"); + }), + (t.PERSPECTIVE_CAMERA = 0), + (t.ORTHOGRAPHIC_CAMERA = 1), + (t.FOVMODE_VERTICAL_FIXED = 0), + (t.FOVMODE_HORIZONTAL_FIXED = 1), + (t.RIG_MODE_NONE = 0), + (t.RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10), + (t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11), + (t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12), + (t.RIG_MODE_STEREOSCOPIC_OVERUNDER = 13), + (t.RIG_MODE_STEREOSCOPIC_INTERLACED = 14), + (t.RIG_MODE_VR = 20), + (t.RIG_MODE_WEBVR = 21), + (t.RIG_MODE_CUSTOM = 22), + (t.ForceAttachControlToAlwaysPreventDefault = !1), + Object(i.c)([Object(r.o)("position")], t.prototype, "_position", void 0), + Object(i.c)([Object(r.o)()], t.prototype, "upVector", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "orthoLeft", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "orthoRight", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "orthoBottom", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "orthoTop", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "fov", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "minZ", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "maxZ", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "inertia", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "mode", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "layerMask", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "fovMode", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "cameraRigMode", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "interaxialDistance", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "isStereoscopicSideBySide", void 0), + t + ); + })(l.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return d; + }), + n.d(t, "a", function () { + return p; + }); + var i = n(1), + r = n(5), + o = n(15), + a = n(3), + s = n(13), + c = n(134), + l = n(146), + u = n(35), + h = n(109), + d = function () {}, + p = (function () { + function e(t, n, i, r, o, a) { + (this.name = t), + (this.targetProperty = n), + (this.framePerSecond = i), + (this.dataType = r), + (this.loopMode = o), + (this.enableBlending = a), + (this._runtimeAnimations = new Array()), + (this._events = new Array()), + (this.blendingSpeed = 0.01), + (this._ranges = {}), + (this.targetPropertyPath = n.split(".")), + (this.dataType = r), + (this.loopMode = void 0 === o ? e.ANIMATIONLOOPMODE_CYCLE : o); + } + return ( + (e._PrepareAnimation = function (t, n, o, a, s, c, l, u) { + var d = void 0; + if ( + (!isNaN(parseFloat(s)) && isFinite(s) + ? (d = e.ANIMATIONTYPE_FLOAT) + : s instanceof i.b + ? (d = e.ANIMATIONTYPE_QUATERNION) + : s instanceof i.e + ? (d = e.ANIMATIONTYPE_VECTOR3) + : s instanceof i.d + ? (d = e.ANIMATIONTYPE_VECTOR2) + : s instanceof r.a + ? (d = e.ANIMATIONTYPE_COLOR3) + : s instanceof r.b + ? (d = e.ANIMATIONTYPE_COLOR4) + : s instanceof h.a && (d = e.ANIMATIONTYPE_SIZE), + null == d) + ) + return null; + var p = new e(t, n, o, d, l), + f = [ + { frame: 0, value: s }, + { frame: a, value: c }, + ]; + return p.setKeys(f), void 0 !== u && p.setEasingFunction(u), p; + }), + (e.CreateAnimation = function (t, n, i, r) { + var o = new e(t + "Animation", t, i, n, e.ANIMATIONLOOPMODE_CONSTANT); + return o.setEasingFunction(r), o; + }), + (e.CreateAndStartAnimation = function (t, n, i, r, o, a, s, c, l, u) { + var h = e._PrepareAnimation(t, i, r, o, a, s, c, l); + return h ? n.getScene().beginDirectAnimation(n, [h], 0, o, 1 === h.loopMode, 1, u) : null; + }), + (e.CreateAndStartHierarchyAnimation = function (t, n, i, r, o, a, s, c, l, u, h) { + var d = e._PrepareAnimation(t, r, o, a, s, c, l, u); + return d ? n.getScene().beginDirectHierarchyAnimation(n, i, [d], 0, a, 1 === d.loopMode, 1, h) : null; + }), + (e.CreateMergeAndStartAnimation = function (t, n, i, r, o, a, s, c, l, u) { + var h = e._PrepareAnimation(t, i, r, o, a, s, c, l); + return h ? (n.animations.push(h), n.getScene().beginAnimation(n, 0, o, 1 === h.loopMode, 1, u)) : null; + }), + (e.TransitionTo = function (e, t, n, i, r, o, a, s) { + if ((void 0 === s && (s = null), a <= 0)) return (n[e] = t), s && s(), null; + var c = r * (a / 1e3); + o.setKeys([ + { frame: 0, value: n[e].clone ? n[e].clone() : n[e] }, + { frame: c, value: t }, + ]), + n.animations || (n.animations = []), + n.animations.push(o); + var l = i.beginAnimation(n, 0, c, !1); + return (l.onAnimationEnd = s), l; + }), + Object.defineProperty(e.prototype, "runtimeAnimations", { + get: function () { + return this._runtimeAnimations; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasRunningRuntimeAnimations", { + get: function () { + for (var e = 0, t = this._runtimeAnimations; e < t.length; e++) { + if (!t[e].isStopped) return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.toString = function (e) { + var t = "Name: " + this.name + ", property: " + this.targetProperty; + if ( + ((t += ", datatype: " + ["Float", "Vector3", "Quaternion", "Matrix", "Color3", "Vector2"][this.dataType]), + (t += ", nKeys: " + (this._keys ? this._keys.length : "none")), + (t += ", nRanges: " + (this._ranges ? Object.keys(this._ranges).length : "none")), + e) + ) { + t += ", Ranges: {"; + var n = !0; + for (var i in this._ranges) n && ((t += ", "), (n = !1)), (t += i); + t += "}"; + } + return t; + }), + (e.prototype.addEvent = function (e) { + this._events.push(e); + }), + (e.prototype.removeEvents = function (e) { + for (var t = 0; t < this._events.length; t++) this._events[t].frame === e && (this._events.splice(t, 1), t--); + }), + (e.prototype.getEvents = function () { + return this._events; + }), + (e.prototype.createRange = function (e, t, n) { + this._ranges[e] || (this._ranges[e] = new l.a(e, t, n)); + }), + (e.prototype.deleteRange = function (e, t) { + void 0 === t && (t = !0); + var n = this._ranges[e]; + if (n) { + if (t) for (var i = n.from, r = n.to, o = this._keys.length - 1; o >= 0; o--) this._keys[o].frame >= i && this._keys[o].frame <= r && this._keys.splice(o, 1); + this._ranges[e] = null; + } + }), + (e.prototype.getRange = function (e) { + return this._ranges[e]; + }), + (e.prototype.getKeys = function () { + return this._keys; + }), + (e.prototype.getHighestFrame = function () { + for (var e = 0, t = 0, n = this._keys.length; t < n; t++) e < this._keys[t].frame && (e = this._keys[t].frame); + return e; + }), + (e.prototype.getEasingFunction = function () { + return this._easingFunction; + }), + (e.prototype.setEasingFunction = function (e) { + this._easingFunction = e; + }), + (e.prototype.floatInterpolateFunction = function (e, t, n) { + return o.a.Lerp(e, t, n); + }), + (e.prototype.floatInterpolateFunctionWithTangents = function (e, t, n, i, r) { + return o.a.Hermite(e, t, n, i, r); + }), + (e.prototype.quaternionInterpolateFunction = function (e, t, n) { + return i.b.Slerp(e, t, n); + }), + (e.prototype.quaternionInterpolateFunctionWithTangents = function (e, t, n, r, o) { + return i.b.Hermite(e, t, n, r, o).normalize(); + }), + (e.prototype.vector3InterpolateFunction = function (e, t, n) { + return i.e.Lerp(e, t, n); + }), + (e.prototype.vector3InterpolateFunctionWithTangents = function (e, t, n, r, o) { + return i.e.Hermite(e, t, n, r, o); + }), + (e.prototype.vector2InterpolateFunction = function (e, t, n) { + return i.d.Lerp(e, t, n); + }), + (e.prototype.vector2InterpolateFunctionWithTangents = function (e, t, n, r, o) { + return i.d.Hermite(e, t, n, r, o); + }), + (e.prototype.sizeInterpolateFunction = function (e, t, n) { + return h.a.Lerp(e, t, n); + }), + (e.prototype.color3InterpolateFunction = function (e, t, n) { + return r.a.Lerp(e, t, n); + }), + (e.prototype.color4InterpolateFunction = function (e, t, n) { + return r.b.Lerp(e, t, n); + }), + (e.prototype._getKeyValue = function (e) { + return "function" == typeof e ? e() : e; + }), + (e.prototype._interpolate = function (t, n) { + if (n.loopMode === e.ANIMATIONLOOPMODE_CONSTANT && n.repeatCount > 0) return n.highLimitValue.clone ? n.highLimitValue.clone() : n.highLimitValue; + var i = this._keys; + if (1 === i.length) return this._getKeyValue(i[0].value); + var r = n.key; + if (i[r].frame >= t) for (; r - 1 >= 0 && i[r].frame >= t; ) r--; + for (var o = r; o < i.length; o++) { + var a = i[o + 1]; + if (a.frame >= t) { + n.key = o; + var s = i[o], + l = this._getKeyValue(s.value); + if (s.interpolation === c.a.STEP) return l; + var u = this._getKeyValue(a.value), + h = void 0 !== s.outTangent && void 0 !== a.inTangent, + d = a.frame - s.frame, + p = (t - s.frame) / d, + f = this.getEasingFunction(); + switch ((null != f && (p = f.ease(p)), this.dataType)) { + case e.ANIMATIONTYPE_FLOAT: + var m = h ? this.floatInterpolateFunctionWithTangents(l, s.outTangent * d, u, a.inTangent * d, p) : this.floatInterpolateFunction(l, u, p); + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return m; + case e.ANIMATIONLOOPMODE_RELATIVE: + return n.offsetValue * n.repeatCount + m; + } + break; + case e.ANIMATIONTYPE_QUATERNION: + var g = h ? this.quaternionInterpolateFunctionWithTangents(l, s.outTangent.scale(d), u, a.inTangent.scale(d), p) : this.quaternionInterpolateFunction(l, u, p); + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return g; + case e.ANIMATIONLOOPMODE_RELATIVE: + return g.addInPlace(n.offsetValue.scale(n.repeatCount)); + } + return g; + case e.ANIMATIONTYPE_VECTOR3: + var b = h ? this.vector3InterpolateFunctionWithTangents(l, s.outTangent.scale(d), u, a.inTangent.scale(d), p) : this.vector3InterpolateFunction(l, u, p); + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return b; + case e.ANIMATIONLOOPMODE_RELATIVE: + return b.add(n.offsetValue.scale(n.repeatCount)); + } + case e.ANIMATIONTYPE_VECTOR2: + var _ = h ? this.vector2InterpolateFunctionWithTangents(l, s.outTangent.scale(d), u, a.inTangent.scale(d), p) : this.vector2InterpolateFunction(l, u, p); + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return _; + case e.ANIMATIONLOOPMODE_RELATIVE: + return _.add(n.offsetValue.scale(n.repeatCount)); + } + case e.ANIMATIONTYPE_SIZE: + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return this.sizeInterpolateFunction(l, u, p); + case e.ANIMATIONLOOPMODE_RELATIVE: + return this.sizeInterpolateFunction(l, u, p).add(n.offsetValue.scale(n.repeatCount)); + } + case e.ANIMATIONTYPE_COLOR3: + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return this.color3InterpolateFunction(l, u, p); + case e.ANIMATIONLOOPMODE_RELATIVE: + return this.color3InterpolateFunction(l, u, p).add(n.offsetValue.scale(n.repeatCount)); + } + case e.ANIMATIONTYPE_COLOR4: + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + return this.color4InterpolateFunction(l, u, p); + case e.ANIMATIONLOOPMODE_RELATIVE: + return this.color4InterpolateFunction(l, u, p).add(n.offsetValue.scale(n.repeatCount)); + } + case e.ANIMATIONTYPE_MATRIX: + switch (n.loopMode) { + case e.ANIMATIONLOOPMODE_CYCLE: + case e.ANIMATIONLOOPMODE_CONSTANT: + if (e.AllowMatricesInterpolation) return this.matrixInterpolateFunction(l, u, p, n.workValue); + case e.ANIMATIONLOOPMODE_RELATIVE: + return l; + } + } + break; + } + } + return this._getKeyValue(i[i.length - 1].value); + }), + (e.prototype.matrixInterpolateFunction = function (t, n, r, o) { + return e.AllowMatrixDecomposeForInterpolation ? (o ? (i.a.DecomposeLerpToRef(t, n, r, o), o) : i.a.DecomposeLerp(t, n, r)) : o ? (i.a.LerpToRef(t, n, r, o), o) : i.a.Lerp(t, n, r); + }), + (e.prototype.clone = function () { + var t = new e(this.name, this.targetPropertyPath.join("."), this.framePerSecond, this.dataType, this.loopMode); + if (((t.enableBlending = this.enableBlending), (t.blendingSpeed = this.blendingSpeed), this._keys && t.setKeys(this._keys), this._ranges)) + for (var n in ((t._ranges = {}), this._ranges)) { + var i = this._ranges[n]; + i && (t._ranges[n] = i.clone()); + } + return t; + }), + (e.prototype.setKeys = function (e) { + this._keys = e.slice(0); + }), + (e.prototype.serialize = function () { + var t = {}; + (t.name = this.name), + (t.property = this.targetProperty), + (t.framePerSecond = this.framePerSecond), + (t.dataType = this.dataType), + (t.loopBehavior = this.loopMode), + (t.enableBlending = this.enableBlending), + (t.blendingSpeed = this.blendingSpeed); + var n = this.dataType; + t.keys = []; + for (var i = this.getKeys(), r = 0; r < i.length; r++) { + var o = i[r], + a = {}; + switch (((a.frame = o.frame), n)) { + case e.ANIMATIONTYPE_FLOAT: + a.values = [o.value]; + break; + case e.ANIMATIONTYPE_QUATERNION: + case e.ANIMATIONTYPE_MATRIX: + case e.ANIMATIONTYPE_VECTOR3: + case e.ANIMATIONTYPE_COLOR3: + case e.ANIMATIONTYPE_COLOR4: + a.values = o.value.asArray(); + } + t.keys.push(a); + } + for (var s in ((t.ranges = []), this._ranges)) { + var c = this._ranges[s]; + if (c) { + var l = {}; + (l.name = s), (l.from = c.from), (l.to = c.to), t.ranges.push(l); + } + } + return t; + }), + (e._UniversalLerp = function (e, t, n) { + var i = e.constructor; + return i.Lerp ? i.Lerp(e, t, n) : i.Slerp ? i.Slerp(e, t, n) : e.toFixed ? e * (1 - n) + n * t : t; + }), + (e.Parse = function (t) { + var n, + o, + a = new e(t.name, t.property, t.framePerSecond, t.dataType, t.loopBehavior), + s = t.dataType, + c = []; + for (t.enableBlending && (a.enableBlending = t.enableBlending), t.blendingSpeed && (a.blendingSpeed = t.blendingSpeed), o = 0; o < t.keys.length; o++) { + var l, + u, + h = t.keys[o]; + switch (s) { + case e.ANIMATIONTYPE_FLOAT: + (n = h.values[0]), h.values.length >= 1 && (l = h.values[1]), h.values.length >= 2 && (u = h.values[2]); + break; + case e.ANIMATIONTYPE_QUATERNION: + if (((n = i.b.FromArray(h.values)), h.values.length >= 8)) { + var d = i.b.FromArray(h.values.slice(4, 8)); + d.equals(i.b.Zero()) || (l = d); + } + if (h.values.length >= 12) { + var p = i.b.FromArray(h.values.slice(8, 12)); + p.equals(i.b.Zero()) || (u = p); + } + break; + case e.ANIMATIONTYPE_MATRIX: + n = i.a.FromArray(h.values); + break; + case e.ANIMATIONTYPE_COLOR3: + n = r.a.FromArray(h.values); + break; + case e.ANIMATIONTYPE_COLOR4: + n = r.b.FromArray(h.values); + break; + case e.ANIMATIONTYPE_VECTOR3: + default: + n = i.e.FromArray(h.values); + } + var f = {}; + (f.frame = h.frame), (f.value = n), null != l && (f.inTangent = l), null != u && (f.outTangent = u), c.push(f); + } + if ((a.setKeys(c), t.ranges)) for (o = 0; o < t.ranges.length; o++) (n = t.ranges[o]), a.createRange(n.name, n.from, n.to); + return a; + }), + (e.AppendSerializedAnimations = function (e, t) { + a.a.AppendSerializedAnimations(e, t); + }), + (e.AllowMatricesInterpolation = !1), + (e.AllowMatrixDecomposeForInterpolation = !0), + (e.ANIMATIONTYPE_FLOAT = 0), + (e.ANIMATIONTYPE_VECTOR3 = 1), + (e.ANIMATIONTYPE_QUATERNION = 2), + (e.ANIMATIONTYPE_MATRIX = 3), + (e.ANIMATIONTYPE_COLOR3 = 4), + (e.ANIMATIONTYPE_COLOR4 = 7), + (e.ANIMATIONTYPE_VECTOR2 = 5), + (e.ANIMATIONTYPE_SIZE = 6), + (e.ANIMATIONLOOPMODE_RELATIVE = 0), + (e.ANIMATIONLOOPMODE_CYCLE = 1), + (e.ANIMATIONLOOPMODE_CONSTANT = 2), + e + ); + })(); + (s.a.RegisteredTypes["BABYLON.Animation"] = p), + (u.a._AnimationRangeFactory = function (e, t, n) { + return new l.a(e, t, n); + }); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return d; + }); + var i = n(2), + r = n(3), + o = n(12), + a = n(6), + s = n(25), + c = n(78), + l = n(124), + u = n(10), + h = n(85), + d = (function () { + function e(t, n, i) { + (this.metadata = null), + (this.reservedDataStore = null), + (this.checkReadyOnEveryCall = !1), + (this.checkReadyOnlyOnce = !1), + (this.state = ""), + (this._alpha = 1), + (this._backFaceCulling = !0), + (this.onCompiled = null), + (this.onError = null), + (this.getRenderTargetTextures = null), + (this.doNotSerialize = !1), + (this._storeEffectOnSubMeshes = !1), + (this.animations = null), + (this.onDisposeObservable = new a.c()), + (this._onDisposeObserver = null), + (this._onUnBindObservable = null), + (this._onBindObserver = null), + (this._alphaMode = 2), + (this._needDepthPrePass = !1), + (this.disableDepthWrite = !1), + (this.forceDepthWrite = !1), + (this.depthFunction = 0), + (this.separateCullingPass = !1), + (this._fogEnabled = !0), + (this.pointSize = 1), + (this.zOffset = 0), + (this._effect = null), + (this._useUBO = !1), + (this._fillMode = e.TriangleFillMode), + (this._cachedDepthWriteState = !1), + (this._cachedDepthFunctionState = 0), + (this._indexInSceneMaterialArray = -1), + (this.meshMap = null), + (this.name = t), + (this.id = t || o.b.RandomId()), + (this._scene = n || s.a.LastCreatedScene), + (this.uniqueId = this._scene.getUniqueId()), + this._scene.useRightHandedSystem ? (this.sideOrientation = e.ClockWiseSideOrientation) : (this.sideOrientation = e.CounterClockWiseSideOrientation), + (this._uniformBuffer = new l.a(this._scene.getEngine())), + (this._useUBO = this.getScene().getEngine().supportsUniformBuffers), + i || this._scene.addMaterial(this), + this._scene.useMaterialMeshMap && (this.meshMap = {}); + } + return ( + Object.defineProperty(e.prototype, "alpha", { + get: function () { + return this._alpha; + }, + set: function (t) { + this._alpha !== t && ((this._alpha = t), this.markAsDirty(e.MiscDirtyFlag)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "backFaceCulling", { + get: function () { + return this._backFaceCulling; + }, + set: function (t) { + this._backFaceCulling !== t && ((this._backFaceCulling = t), this.markAsDirty(e.TextureDirtyFlag)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasRenderTargetTextures", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onBindObservable", { + get: function () { + return this._onBindObservable || (this._onBindObservable = new a.c()), this._onBindObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onBind", { + set: function (e) { + this._onBindObserver && this.onBindObservable.remove(this._onBindObserver), (this._onBindObserver = this.onBindObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onUnBindObservable", { + get: function () { + return this._onUnBindObservable || (this._onUnBindObservable = new a.c()), this._onUnBindObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "alphaMode", { + get: function () { + return this._alphaMode; + }, + set: function (t) { + this._alphaMode !== t && ((this._alphaMode = t), this.markAsDirty(e.TextureDirtyFlag)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "needDepthPrePass", { + get: function () { + return this._needDepthPrePass; + }, + set: function (e) { + this._needDepthPrePass !== e && ((this._needDepthPrePass = e), this._needDepthPrePass && (this.checkReadyOnEveryCall = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "fogEnabled", { + get: function () { + return this._fogEnabled; + }, + set: function (t) { + this._fogEnabled !== t && ((this._fogEnabled = t), this.markAsDirty(e.MiscDirtyFlag)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "wireframe", { + get: function () { + switch (this._fillMode) { + case e.WireFrameFillMode: + case e.LineListDrawMode: + case e.LineLoopDrawMode: + case e.LineStripDrawMode: + return !0; + } + return this._scene.forceWireframe; + }, + set: function (t) { + this.fillMode = t ? e.WireFrameFillMode : e.TriangleFillMode; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "pointsCloud", { + get: function () { + switch (this._fillMode) { + case e.PointFillMode: + case e.PointListDrawMode: + return !0; + } + return this._scene.forcePointsCloud; + }, + set: function (t) { + this.fillMode = t ? e.PointFillMode : e.TriangleFillMode; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "fillMode", { + get: function () { + return this._fillMode; + }, + set: function (t) { + this._fillMode !== t && ((this._fillMode = t), this.markAsDirty(e.MiscDirtyFlag)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.toString = function (e) { + return "Name: " + this.name; + }), + (e.prototype.getClassName = function () { + return "Material"; + }), + Object.defineProperty(e.prototype, "isFrozen", { + get: function () { + return this.checkReadyOnlyOnce; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.freeze = function () { + this.markDirty(), (this.checkReadyOnlyOnce = !0); + }), + (e.prototype.unfreeze = function () { + this.markDirty(), (this.checkReadyOnlyOnce = !1); + }), + (e.prototype.isReady = function (e, t) { + return !0; + }), + (e.prototype.isReadyForSubMesh = function (e, t, n) { + return !1; + }), + (e.prototype.getEffect = function () { + return this._effect; + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.needAlphaBlending = function () { + return this.alpha < 1; + }), + (e.prototype.needAlphaBlendingForMesh = function (e) { + return this.needAlphaBlending() || e.visibility < 1 || e.hasVertexAlpha; + }), + (e.prototype.needAlphaTesting = function () { + return !1; + }), + (e.prototype.getAlphaTestTexture = function () { + return null; + }), + (e.prototype.markDirty = function () { + for (var e = 0, t = this.getScene().meshes; e < t.length; e++) { + var n = t[e]; + if (n.subMeshes) + for (var i = 0, r = n.subMeshes; i < r.length; i++) { + var o = r[i]; + o.getMaterial() === this && o.effect && (o.effect._wasPreviouslyReady = !1); + } + } + }), + (e.prototype._preBind = function (t, n) { + void 0 === n && (n = null); + var i = this._scene.getEngine(), + r = (null == n ? this.sideOrientation : n) === e.ClockWiseSideOrientation; + return i.enableEffect(t || this._effect), i.setState(this.backFaceCulling, this.zOffset, !1, r), r; + }), + (e.prototype.bind = function (e, t) {}), + (e.prototype.bindForSubMesh = function (e, t, n) {}), + (e.prototype.bindOnlyWorldMatrix = function (e) {}), + (e.prototype.bindSceneUniformBuffer = function (e, t) { + t.bindToEffect(e, "Scene"); + }), + (e.prototype.bindView = function (e) { + this._useUBO ? this.bindSceneUniformBuffer(e, this.getScene().getSceneUniformBuffer()) : e.setMatrix("view", this.getScene().getViewMatrix()); + }), + (e.prototype.bindViewProjection = function (e) { + this._useUBO ? this.bindSceneUniformBuffer(e, this.getScene().getSceneUniformBuffer()) : e.setMatrix("viewProjection", this.getScene().getTransformMatrix()); + }), + (e.prototype._shouldTurnAlphaTestOn = function (e) { + return !this.needAlphaBlendingForMesh(e) && this.needAlphaTesting(); + }), + (e.prototype._afterBind = function (e) { + if (((this._scene._cachedMaterial = this), (this._scene._cachedVisibility = e ? e.visibility : 1), this._onBindObservable && e && this._onBindObservable.notifyObservers(e), this.disableDepthWrite)) { + var t = this._scene.getEngine(); + (this._cachedDepthWriteState = t.getDepthWrite()), t.setDepthWrite(!1); + } + if (0 !== this.depthFunction) { + t = this._scene.getEngine(); + (this._cachedDepthFunctionState = t.getDepthFunction() || 0), t.setDepthFunction(this.depthFunction); + } + }), + (e.prototype.unbind = function () { + (this._onUnBindObservable && this._onUnBindObservable.notifyObservers(this), 0 !== this.depthFunction) && this._scene.getEngine().setDepthFunction(this._cachedDepthFunctionState); + this.disableDepthWrite && this._scene.getEngine().setDepthWrite(this._cachedDepthWriteState); + }), + (e.prototype.getActiveTextures = function () { + return []; + }), + (e.prototype.hasTexture = function (e) { + return !1; + }), + (e.prototype.clone = function (e) { + return null; + }), + (e.prototype.getBindedMeshes = function () { + var e = this; + if (this.meshMap) { + var t = new Array(); + for (var n in this.meshMap) { + var i = this.meshMap[n]; + i && t.push(i); + } + return t; + } + return this._scene.meshes.filter(function (t) { + return t.material === e; + }); + }), + (e.prototype.forceCompilation = function (e, t, n, r) { + var o = this, + a = Object(i.a)({ clipPlane: !1, useInstances: !1 }, n), + s = new c.a(), + l = this.getScene(), + u = function () { + if (o._scene && o._scene.getEngine()) { + s._materialDefines && (s._materialDefines._renderId = -1); + var n = l.clipPlane; + a.clipPlane && (l.clipPlane = new h.a(0, 0, 0, 1)), + o._storeEffectOnSubMeshes + ? o.isReadyForSubMesh(e, s, a.useInstances) + ? t && t(o) + : s.effect && s.effect.getCompilationError() && s.effect.allFallbacksProcessed() + ? r && r(s.effect.getCompilationError()) + : setTimeout(u, 16) + : o.isReady() + ? t && t(o) + : setTimeout(u, 16), + a.clipPlane && (l.clipPlane = n); + } + }; + u(); + }), + (e.prototype.forceCompilationAsync = function (e, t) { + var n = this; + return new Promise(function (i, r) { + n.forceCompilation( + e, + function () { + i(); + }, + t, + function (e) { + r(e); + } + ); + }); + }), + (e.prototype.markAsDirty = function (t) { + this.getScene().blockMaterialDirtyMechanism || + ((e._DirtyCallbackArray.length = 0), + t & e.TextureDirtyFlag && e._DirtyCallbackArray.push(e._TextureDirtyCallBack), + t & e.LightDirtyFlag && e._DirtyCallbackArray.push(e._LightsDirtyCallBack), + t & e.FresnelDirtyFlag && e._DirtyCallbackArray.push(e._FresnelDirtyCallBack), + t & e.AttributesDirtyFlag && e._DirtyCallbackArray.push(e._AttributeDirtyCallBack), + t & e.MiscDirtyFlag && e._DirtyCallbackArray.push(e._MiscDirtyCallBack), + e._DirtyCallbackArray.length && this._markAllSubMeshesAsDirty(e._RunDirtyCallBacks), + this.getScene().resetCachedMaterial()); + }), + (e.prototype._markAllSubMeshesAsDirty = function (e) { + if (!this.getScene().blockMaterialDirtyMechanism) + for (var t = 0, n = this.getScene().meshes; t < n.length; t++) { + var i = n[t]; + if (i.subMeshes) + for (var r = 0, o = i.subMeshes; r < o.length; r++) { + var a = o[r]; + a.getMaterial() === this && a._materialDefines && e(a._materialDefines); + } + } + }), + (e.prototype._markAllSubMeshesAsAllDirty = function () { + this._markAllSubMeshesAsDirty(e._AllDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsImageProcessingDirty = function () { + this._markAllSubMeshesAsDirty(e._ImageProcessingDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + this._markAllSubMeshesAsDirty(e._TextureDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsFresnelDirty = function () { + this._markAllSubMeshesAsDirty(e._FresnelDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsFresnelAndMiscDirty = function () { + this._markAllSubMeshesAsDirty(e._FresnelAndMiscDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsLightsDirty = function () { + this._markAllSubMeshesAsDirty(e._LightsDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsAttributesDirty = function () { + this._markAllSubMeshesAsDirty(e._AttributeDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsMiscDirty = function () { + this._markAllSubMeshesAsDirty(e._MiscDirtyCallBack); + }), + (e.prototype._markAllSubMeshesAsTexturesAndMiscDirty = function () { + this._markAllSubMeshesAsDirty(e._TextureAndMiscDirtyCallBack); + }), + (e.prototype.dispose = function (e, t, n) { + var i = this.getScene(); + if ((i.stopAnimation(this), i.freeProcessedMaterials(), i.removeMaterial(this), !0 !== n)) + if (this.meshMap) + for (var r in this.meshMap) { + (s = this.meshMap[r]) && ((s.material = null), this.releaseVertexArrayObject(s, e)); + } + else + for (var o = 0, a = i.meshes; o < a.length; o++) { + var s; + (s = a[o]).material !== this || s.sourceMesh || ((s.material = null), this.releaseVertexArrayObject(s, e)); + } + this._uniformBuffer.dispose(), + e && this._effect && (this._storeEffectOnSubMeshes || this._effect.dispose(), (this._effect = null)), + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(), + this._onBindObservable && this._onBindObservable.clear(), + this._onUnBindObservable && this._onUnBindObservable.clear(); + }), + (e.prototype.releaseVertexArrayObject = function (e, t) { + if (e.geometry) { + var n = e.geometry; + if (this._storeEffectOnSubMeshes) + for (var i = 0, r = e.subMeshes; i < r.length; i++) { + var o = r[i]; + n._releaseVertexArrayObject(o._materialEffect), t && o._materialEffect && o._materialEffect.dispose(); + } + else n._releaseVertexArrayObject(this._effect); + } + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.Parse = function (e, t, n) { + if (e.customType) { + if ("BABYLON.PBRMaterial" === e.customType && e.overloadedAlbedo && ((e.customType = "BABYLON.LegacyPBRMaterial"), !BABYLON.LegacyPBRMaterial)) + return u.a.Error("Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library."), null; + } else e.customType = "BABYLON.StandardMaterial"; + return o.b.Instantiate(e.customType).Parse(e, t, n); + }), + (e.TriangleFillMode = 0), + (e.WireFrameFillMode = 1), + (e.PointFillMode = 2), + (e.PointListDrawMode = 3), + (e.LineListDrawMode = 4), + (e.LineLoopDrawMode = 5), + (e.LineStripDrawMode = 6), + (e.TriangleStripDrawMode = 7), + (e.TriangleFanDrawMode = 8), + (e.ClockWiseSideOrientation = 0), + (e.CounterClockWiseSideOrientation = 1), + (e.TextureDirtyFlag = 1), + (e.LightDirtyFlag = 2), + (e.FresnelDirtyFlag = 4), + (e.AttributesDirtyFlag = 8), + (e.MiscDirtyFlag = 16), + (e.AllDirtyFlag = 31), + (e._AllDirtyCallBack = function (e) { + return e.markAllAsDirty(); + }), + (e._ImageProcessingDirtyCallBack = function (e) { + return e.markAsImageProcessingDirty(); + }), + (e._TextureDirtyCallBack = function (e) { + return e.markAsTexturesDirty(); + }), + (e._FresnelDirtyCallBack = function (e) { + return e.markAsFresnelDirty(); + }), + (e._MiscDirtyCallBack = function (e) { + return e.markAsMiscDirty(); + }), + (e._LightsDirtyCallBack = function (e) { + return e.markAsLightDirty(); + }), + (e._AttributeDirtyCallBack = function (e) { + return e.markAsAttributesDirty(); + }), + (e._FresnelAndMiscDirtyCallBack = function (t) { + e._FresnelDirtyCallBack(t), e._MiscDirtyCallBack(t); + }), + (e._TextureAndMiscDirtyCallBack = function (t) { + e._TextureDirtyCallBack(t), e._MiscDirtyCallBack(t); + }), + (e._DirtyCallbackArray = []), + (e._RunDirtyCallBacks = function (t) { + for (var n = 0, i = e._DirtyCallbackArray; n < i.length; n++) { + (0, i[n])(t); + } + }), + Object(i.c)([Object(r.c)()], e.prototype, "id", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "uniqueId", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "name", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "checkReadyOnEveryCall", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "checkReadyOnlyOnce", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "state", void 0), + Object(i.c)([Object(r.c)("alpha")], e.prototype, "_alpha", void 0), + Object(i.c)([Object(r.c)("backFaceCulling")], e.prototype, "_backFaceCulling", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "sideOrientation", void 0), + Object(i.c)([Object(r.c)("alphaMode")], e.prototype, "_alphaMode", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_needDepthPrePass", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "disableDepthWrite", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "forceDepthWrite", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "depthFunction", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "separateCullingPass", void 0), + Object(i.c)([Object(r.c)("fogEnabled")], e.prototype, "_fogEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "pointSize", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "zOffset", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "wireframe", null), + Object(i.c)([Object(r.c)()], e.prototype, "pointsCloud", null), + Object(i.c)([Object(r.c)()], e.prototype, "fillMode", null), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.EventHandler = t.EventID = void 0), + (function (e) { + (e[(e.None = -1)] = "None"), + (e[(e.OnKeyPress = 0)] = "OnKeyPress"), + (e[(e.OnStopInputs = 1)] = "OnStopInputs"), + (e[(e.OnStartInputs = 2)] = "OnStartInputs"), + (e[(e.OnFirstUserInput = 3)] = "OnFirstUserInput"), + (e[(e.OnResetGame = 4)] = "OnResetGame"), + (e[(e.OnPauseGame = 5)] = "OnPauseGame"), + (e[(e.OnResumeGame = 6)] = "OnResumeGame"), + (e[(e.OnPlayGame = 7)] = "OnPlayGame"), + (e[(e.OnContinueGame = 8)] = "OnContinueGame"), + (e[(e.OnGodModeEnabled = 9)] = "OnGodModeEnabled"), + (e[(e.OnGodModeDisabled = 10)] = "OnGodModeDisabled"), + (e[(e.OnGodModeExhausted = 11)] = "OnGodModeExhausted"), + (e[(e.OnEndGame = 12)] = "OnEndGame"), + (e[(e.OnLoadingUpdate = 13)] = "OnLoadingUpdate"), + (e[(e.OnGameLoaded = 14)] = "OnGameLoaded"), + (e[(e.OnTrackRootInit = 15)] = "OnTrackRootInit"), + (e[(e.OnPlayerDeath = 16)] = "OnPlayerDeath"), + (e[(e.ChangeSpeed = 17)] = "ChangeSpeed"), + (e[(e.OnPowerupCollect = 18)] = "OnPowerupCollect"), + (e[(e.OnStumble = 19)] = "OnStumble"), + (e[(e.OnPlayerJumpState = 20)] = "OnPlayerJumpState"), + (e[(e.OnPlayerRunState = 21)] = "OnPlayerRunState"), + (e[(e.OnPlayerEnteringNewZone = 22)] = "OnPlayerEnteringNewZone"), + (e[(e.PlayerDeathTypeUpdate = 23)] = "PlayerDeathTypeUpdate"), + (e[(e.PlayerDeathDebugInfo = 24)] = "PlayerDeathDebugInfo"), + (e[(e.OnUnlockPowerup = 25)] = "OnUnlockPowerup"), + (e[(e.OnMeterFull = 26)] = "OnMeterFull"), + (e[(e.OnMeterReset = 27)] = "OnMeterReset"), + (e[(e.OnPowerupStart = 28)] = "OnPowerupStart"), + (e[(e.OnPowerupComplete = 29)] = "OnPowerupComplete"), + (e[(e.OnPowerupCooldown = 30)] = "OnPowerupCooldown"), + (e[(e.PlaySFX = 31)] = "PlaySFX"), + (e[(e.PlaySFXLoop = 32)] = "PlaySFXLoop"), + (e[(e.PlaySFXDelay = 33)] = "PlaySFXDelay"), + (e[(e.StopSFX = 34)] = "StopSFX"), + (e[(e.PlayMusic = 35)] = "PlayMusic"), + (e[(e.StopMusic = 36)] = "StopMusic"), + (e[(e.MusicVolumeChange = 37)] = "MusicVolumeChange"), + (e[(e.SoundVolumeChange = 38)] = "SoundVolumeChange"), + (e[(e.MuteAll = 39)] = "MuteAll"), + (e[(e.UnmuteAll = 40)] = "UnmuteAll"), + (e[(e.OnDebugButton = 41)] = "OnDebugButton"), + (e[(e.OnDebugFeatureChange = 42)] = "OnDebugFeatureChange"), + (e[(e.OnForceDailyChallenge = 43)] = "OnForceDailyChallenge"), + (e[(e.OnDebugCoinsUpdated = 44)] = "OnDebugCoinsUpdated"), + (e[(e.OnChangeTutorialState = 45)] = "OnChangeTutorialState"), + (e[(e.OnTutorialStart = 46)] = "OnTutorialStart"), + (e[(e.OnTutorialComplete = 47)] = "OnTutorialComplete"), + (e[(e.OnTutorialStepStart = 48)] = "OnTutorialStepStart"), + (e[(e.OnTutorialStepComplete = 49)] = "OnTutorialStepComplete"), + (e[(e.OnPowerupUnlockAnim = 50)] = "OnPowerupUnlockAnim"), + (e[(e.OnCameraFlySkip = 51)] = "OnCameraFlySkip"), + (e[(e.OnCameraFlyEnd = 52)] = "OnCameraFlyEnd"), + (e[(e.OnCameraIntroEnd = 53)] = "OnCameraIntroEnd"), + (e[(e.OnDebugCameraStateChange = 54)] = "OnDebugCameraStateChange"), + (e[(e.OnPersistGameState = 55)] = "OnPersistGameState"), + (e[(e.OnAbilityUpgraded = 56)] = "OnAbilityUpgraded"), + (e[(e.NotEnoughCoins = 57)] = "NotEnoughCoins"), + (e[(e.OnResumeCounterChange = 58)] = "OnResumeCounterChange"), + (e[(e.OnResetCurrentGameData = 59)] = "OnResetCurrentGameData"), + (e[(e.OnShowDistanceToast = 60)] = "OnShowDistanceToast"), + (e[(e.OnHudToastMessage = 61)] = "OnHudToastMessage"), + (e[(e.OnRewardCoins = 62)] = "OnRewardCoins"), + (e[(e.OnDailyChallengeDataUpdate = 63)] = "OnDailyChallengeDataUpdate"), + (e[(e.OnResetDayStatData = 64)] = "OnResetDayStatData"), + (e[(e.OnMineCartSurvived = 65)] = "OnMineCartSurvived"), + (e[(e.OnWaterSlideSurvived = 66)] = "OnWaterSlideSurvived"), + (e[(e.OnRessurect = 67)] = "OnRessurect"), + (e[(e.OnPowerMeterUsed = 68)] = "OnPowerMeterUsed"), + (e[(e.NextChallengeTimerChanged = 69)] = "NextChallengeTimerChanged"), + (e[(e.OnCheckDailyChallenge = 70)] = "OnCheckDailyChallenge"), + (e[(e.OnEnablingChestUI = 71)] = "OnEnablingChestUI"), + (e[(e.OnDisablingChestUI = 72)] = "OnDisablingChestUI"), + (e[(e.OnChestTap = 73)] = "OnChestTap"), + (e[(e.OnChestLandingDone = 74)] = "OnChestLandingDone"), + (e[(e.OnChestReward = 75)] = "OnChestReward"); + })(t.EventID || (t.EventID = {})); + class i { + constructor() { + this._handlers = new Map(); + } + static get instance() { + return i._instance || (i._instance = new i()), i._instance; + } + addListener(e, t) { + let n = new Array(); + this._handlers.has(e) ? ((n = this._handlers.get(e)), n.push(t)) : n.push(t), this._handlers.set(e, n); + } + removeListener(e, t) { + if (this._handlers.has(e)) { + const n = this._handlers.get(e), + i = n.findIndex((e) => e.name == t.name); + i >= 0 && (n.splice(i, 1), 0 == n.length ? this._handlers.delete(e) : this._handlers.set(e, n)); + } + } + fireEvent(e, t = {}) { + if (this._handlers.has(e)) { + const n = this._handlers.get(e), + i = new Array(); + n.forEach((e) => { + i.push(e); + }), + i.forEach((e) => { + null != e && e(t); + }); + } + } + } + t.EventHandler = i; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.sprites_data = void 0), + (t.sprites_data = { + idol: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAAIcAQMAAAADk1U4AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAFZJREFUeNrtwTEBAAAAwqD1T20IX6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4Df88AAHZoHy8AAAAAElFTkSuQmCC", + logo: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyQAAAGyAQMAAAAvZJIwAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAEJJREFUeNrtwTEBAAAAwqD1T20ND6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACARwOs7AABD0ZQxQAAAABJRU5ErkJggg==", + "main-1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApAAAAEzAQMAAAC8G6HOAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAC9JREFUeNrtwQENAAAAwqD3T20PBxQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcGGOJAAH56bUCAAAAAElFTkSuQmCC", + play: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAi4AAAC7AQMAAAB4sIdFAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAACRJREFUeNrtwTEBAAAAwqD1T20MH6AAAAAAAAAAAAAAAACAiwEz3QABMWPOqAAAAABJRU5ErkJggg==", + powerupglow: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYoAAAP4AQMAAAD5xSmwAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAElJREFUeNrtwQENAAAAwqD3T20PBxQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwKcBymgAAclHvtEAAAAASUVORK5CYII=", + powerupbar: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYIAAAP4AQMAAADqEmlEAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAEdJREFUeNrtwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8GMZwAAFpB0tbAAAAAElFTkSuQmCC", + fill: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYIAAAP4AQMAAADqEmlEAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAEdJREFUeNrtwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8GMZwAAFpB0tbAAAAAElFTkSuQmCC", + pause: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUMAAAFBAQMAAADXNV9PAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAACRJREFUeNrtwTEBAAAAwqD1T20IX6AAAAAAAAAAAAAAAAAAXgM0qgAB5W9iOwAAAABJRU5ErkJggg==", + "count-holder": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAACqAQMAAAAJNG+HAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB5JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAACAJwMb5AABtIBNHwAAAABJRU5ErkJggg==", + "cracked-border": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/8AAABnAQMAAABsEWCmAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAACRJREFUeNrtwTEBAAAAwqD1T20MH6AAAAAAAAAAAAAAAACAswEz5wAB8LYrLgAAAABJRU5ErkJggg==", + divider: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5sAAAAtAQMAAAAa3u2mAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABxJREFUeNrtwTEBAAAAwqD1T20LL6AAAAAAAE4GFJEAAXkbVUgAAAAASUVORK5CYII=", + "brown-bg": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfwAAACFAQMAAACExtjtAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB9JREFUeNrtwTEBAAAAwqD1T20MH6AAAAAAAAAAALgbIcUAASmHDOcAAAAASUVORK5CYII=", + "distance-toast": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAFJAQMAAACPQOloAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAACdJREFUeNrtwTEBAAAAwqD1T+1jDKAAAAAAAAAAAAAAAAAAAAAAuAFBiwABBg64oAAAAABJRU5ErkJggg==", + "coins-chest-open": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB9JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAAAAAL4NIQAAAWDknZcAAAAASUVORK5CYII=", + "coins-in-hand": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB9JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAAAAAL4NIQAAAWDknZcAAAAASUVORK5CYII=", + "coins-urn": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB9JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAAAAAL4NIQAAAWDknZcAAAAASUVORK5CYII=", + "coins-vault-open": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB9JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAAAAAL4NIQAAAWDknZcAAAAASUVORK5CYII=", + "chest-closed": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO8AAAC9AQMAAABh+LgGAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB1JREFUeNrtwQENAAAAwqD3T20ON6AAAAAAAODSABbjAAEkmyefAAAAAElFTkSuQmCC", + "check-button": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAD1AQMAAABgLyt+AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAB5JREFUeNrtwTEBAAAAwqD1T20MH6AAAAAAAAAAngYctgABfTVLSQAAAABJRU5ErkJggg==", + "boost-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADLAQMAAAAC1Q6HAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABxJREFUeNrtwQENAAAAwqD3T20ON6AAAAAAgCMDE9MAAVyNpbYAAAAASUVORK5CYII=", + "boost-meter": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAADBAQMAAABLzpjKAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABxJREFUeNrtwQENAAAAwqD3T20ON6AAAAAA4NAAEtkAAba2GocAAAAASUVORK5CYII=", + "magnet-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAADBAQMAAABVB6h5AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABtJREFUeNrtwTEBAAAAwqD1T20Hb6AAAAAAOAwRVwABCAvLvgAAAABJRU5ErkJggg==", + "shield-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKkAAADEAQMAAADecZPoAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABtJREFUeNrtwTEBAAAAwqD1T20MH6AAAAAAeBkRnAAB8Sqe1gAAAABJRU5ErkJggg==", + "off-button": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAABKAQMAAAC7E1m6AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABJJREFUeNpjYBgFo2AUjILBCQAEoAABR6p4dgAAAABJRU5ErkJggg==", + "on-button": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAABKAQMAAAC7E1m6AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABJJREFUeNpjYBgFo2AUjILBCQAEoAABR6p4dgAAAABJRU5ErkJggg==", + "timer-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAAByAQMAAABjts1bAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABZJREFUeNpjYBgFo2AUjIJRMAoGOwAABq4AAUJ9WPcAAAAASUVORK5CYII=", + "ads-movie": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGcAAABsAQMAAABNSD55AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABRJREFUeNpjYBgFo2AUjIJRMJwBAAXoAAHYHUGlAAAAAElFTkSuQmCC", + tutorialarrowup: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAAEMAQMAAACRBFghAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABpJREFUeNrtwTEBAAAAwqD1T20MH6AAAAB4Gw2cAAFUkNtcAAAAAElFTkSuQmCC", + "coin-single": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAABWAQMAAABb4TKoAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABFJREFUeNpjYBgFo2AUDB0AAAOyAAGApPSVAAAAAElFTkSuQmCC", + }); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return C; + }); + var i = n(2), + r = n(12), + o = n(6), + a = n(1), + s = n(14), + c = n(4), + l = n(16), + u = n(39), + h = n(81), + d = n(63), + p = n(188), + f = n(22), + m = n(161), + g = n(5), + b = n(34), + _ = n(23), + v = function () { + (this.facetNb = 0), + (this.partitioningSubdivisions = 10), + (this.partitioningBBoxRatio = 1.01), + (this.facetDataEnabled = !1), + (this.facetParameters = {}), + (this.bbSize = a.e.Zero()), + (this.subDiv = { max: 1, X: 1, Y: 1, Z: 1 }), + (this.facetDepthSort = !1), + (this.facetDepthSortEnabled = !1); + }, + y = function () { + (this._hasVertexAlpha = !1), + (this._useVertexColors = !0), + (this._numBoneInfluencers = 4), + (this._applyFog = !0), + (this._receiveShadows = !1), + (this._facetData = new v()), + (this._visibility = 1), + (this._skeleton = null), + (this._layerMask = 268435455), + (this._computeBonesUsingShaders = !0), + (this._isActive = !1), + (this._onlyForInstances = !1), + (this._isActiveIntermediate = !1), + (this._onlyForInstancesIntermediate = !1), + (this._actAsRegularMesh = !1); + }, + C = (function (e) { + function t(n, i) { + void 0 === i && (i = null); + var r = e.call(this, n, i, !1) || this; + return ( + (r._internalAbstractMeshDataInfo = new y()), + (r.cullingStrategy = t.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY), + (r.onCollideObservable = new o.c()), + (r.onCollisionPositionChangeObservable = new o.c()), + (r.onMaterialChangedObservable = new o.c()), + (r.definedFacingForward = !0), + (r._occlusionQuery = null), + (r._renderingGroup = null), + (r.alphaIndex = Number.MAX_VALUE), + (r.isVisible = !0), + (r.isPickable = !0), + (r.showSubMeshesBoundingBox = !1), + (r.isBlocker = !1), + (r.enablePointerMoveEvents = !1), + (r.renderingGroupId = 0), + (r._material = null), + (r.outlineColor = g.a.Red()), + (r.outlineWidth = 0.02), + (r.overlayColor = g.a.Red()), + (r.overlayAlpha = 0.5), + (r.useOctreeForRenderingSelection = !0), + (r.useOctreeForPicking = !0), + (r.useOctreeForCollisions = !0), + (r.alwaysSelectAsActiveMesh = !1), + (r.doNotSyncBoundingInfo = !1), + (r.actionManager = null), + (r._meshCollisionData = new p.a()), + (r.ellipsoid = new a.e(0.5, 1, 0.5)), + (r.ellipsoidOffset = new a.e(0, 0, 0)), + (r.edgesWidth = 1), + (r.edgesColor = new g.b(1, 0, 0, 1)), + (r._edgesRenderer = null), + (r._masterMesh = null), + (r._boundingInfo = null), + (r._renderId = 0), + (r._intersectionsInProgress = new Array()), + (r._unIndexed = !1), + (r._lightSources = new Array()), + (r._waitingData = { lods: null, actions: null, freezeWorldMatrix: null }), + (r._bonesTransformMatrices = null), + (r._transformMatrixTexture = null), + (r.onRebuildObservable = new o.c()), + (r._onCollisionPositionChange = function (e, t, n) { + void 0 === n && (n = null), + t.subtractToRef(r._meshCollisionData._oldPositionForCollisions, r._meshCollisionData._diffPositionForCollisions), + r._meshCollisionData._diffPositionForCollisions.length() > s.a.CollisionsEpsilon && r.position.addInPlace(r._meshCollisionData._diffPositionForCollisions), + n && r.onCollideObservable.notifyObservers(n), + r.onCollisionPositionChangeObservable.notifyObservers(r.position); + }), + r.getScene().addMesh(r), + r._resyncLightSources(), + r + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t, "BILLBOARDMODE_NONE", { + get: function () { + return u.a.BILLBOARDMODE_NONE; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BILLBOARDMODE_X", { + get: function () { + return u.a.BILLBOARDMODE_X; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BILLBOARDMODE_Y", { + get: function () { + return u.a.BILLBOARDMODE_Y; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BILLBOARDMODE_Z", { + get: function () { + return u.a.BILLBOARDMODE_Z; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BILLBOARDMODE_ALL", { + get: function () { + return u.a.BILLBOARDMODE_ALL; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BILLBOARDMODE_USE_POSITION", { + get: function () { + return u.a.BILLBOARDMODE_USE_POSITION; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "facetNb", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.facetNb; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "partitioningSubdivisions", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "partitioningBBoxRatio", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "mustDepthSortFacets", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.facetDepthSort; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._facetData.facetDepthSort = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "facetDepthSortFrom", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isFacetDataEnabled", { + get: function () { + return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._updateNonUniformScalingState = function (t) { + return !!e.prototype._updateNonUniformScalingState.call(this, t) && (this._markSubMeshesAsMiscDirty(), !0); + }), + Object.defineProperty(t.prototype, "onCollide", { + set: function (e) { + this._meshCollisionData._onCollideObserver && this.onCollideObservable.remove(this._meshCollisionData._onCollideObserver), (this._meshCollisionData._onCollideObserver = this.onCollideObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onCollisionPositionChange", { + set: function (e) { + this._meshCollisionData._onCollisionPositionChangeObserver && this.onCollisionPositionChangeObservable.remove(this._meshCollisionData._onCollisionPositionChangeObserver), + (this._meshCollisionData._onCollisionPositionChangeObserver = this.onCollisionPositionChangeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "visibility", { + get: function () { + return this._internalAbstractMeshDataInfo._visibility; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._visibility !== e && ((this._internalAbstractMeshDataInfo._visibility = e), this._markSubMeshesAsMiscDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "material", { + get: function () { + return this._material; + }, + set: function (e) { + this._material !== e && + (this._material && this._material.meshMap && (this._material.meshMap[this.uniqueId] = void 0), + (this._material = e), + e && e.meshMap && (e.meshMap[this.uniqueId] = this), + this.onMaterialChangedObservable.hasObservers() && this.onMaterialChangedObservable.notifyObservers(this), + this.subMeshes && this._unBindEffect()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "receiveShadows", { + get: function () { + return this._internalAbstractMeshDataInfo._receiveShadows; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._receiveShadows !== e && ((this._internalAbstractMeshDataInfo._receiveShadows = e), this._markSubMeshesAsLightDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasVertexAlpha", { + get: function () { + return this._internalAbstractMeshDataInfo._hasVertexAlpha; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._hasVertexAlpha !== e && ((this._internalAbstractMeshDataInfo._hasVertexAlpha = e), this._markSubMeshesAsAttributesDirty(), this._markSubMeshesAsMiscDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useVertexColors", { + get: function () { + return this._internalAbstractMeshDataInfo._useVertexColors; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._useVertexColors !== e && ((this._internalAbstractMeshDataInfo._useVertexColors = e), this._markSubMeshesAsAttributesDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "computeBonesUsingShaders", { + get: function () { + return this._internalAbstractMeshDataInfo._computeBonesUsingShaders; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._computeBonesUsingShaders !== e && ((this._internalAbstractMeshDataInfo._computeBonesUsingShaders = e), this._markSubMeshesAsAttributesDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "numBoneInfluencers", { + get: function () { + return this._internalAbstractMeshDataInfo._numBoneInfluencers; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._numBoneInfluencers !== e && ((this._internalAbstractMeshDataInfo._numBoneInfluencers = e), this._markSubMeshesAsAttributesDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "applyFog", { + get: function () { + return this._internalAbstractMeshDataInfo._applyFog; + }, + set: function (e) { + this._internalAbstractMeshDataInfo._applyFog !== e && ((this._internalAbstractMeshDataInfo._applyFog = e), this._markSubMeshesAsMiscDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "layerMask", { + get: function () { + return this._internalAbstractMeshDataInfo._layerMask; + }, + set: function (e) { + e !== this._internalAbstractMeshDataInfo._layerMask && ((this._internalAbstractMeshDataInfo._layerMask = e), this._resyncLightSources()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "collisionMask", { + get: function () { + return this._meshCollisionData._collisionMask; + }, + set: function (e) { + this._meshCollisionData._collisionMask = isNaN(e) ? -1 : e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "collisionGroup", { + get: function () { + return this._meshCollisionData._collisionGroup; + }, + set: function (e) { + this._meshCollisionData._collisionGroup = isNaN(e) ? -1 : e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "lightSources", { + get: function () { + return this._lightSources; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "_positions", { + get: function () { + return null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "skeleton", { + get: function () { + return this._internalAbstractMeshDataInfo._skeleton; + }, + set: function (e) { + var t = this._internalAbstractMeshDataInfo._skeleton; + t && t.needInitialSkinMatrix && t._unregisterMeshWithPoseMatrix(this), + e && e.needInitialSkinMatrix && e._registerMeshWithPoseMatrix(this), + (this._internalAbstractMeshDataInfo._skeleton = e), + this._internalAbstractMeshDataInfo._skeleton || (this._bonesTransformMatrices = null), + this._markSubMeshesAsAttributesDirty(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "AbstractMesh"; + }), + (t.prototype.toString = function (e) { + var t = "Name: " + this.name + ", isInstance: " + ("InstancedMesh" !== this.getClassName() ? "YES" : "NO"); + t += ", # of submeshes: " + (this.subMeshes ? this.subMeshes.length : 0); + var n = this._internalAbstractMeshDataInfo._skeleton; + return ( + n && (t += ", skeleton: " + n.name), + e && + ((t += ", billboard mode: " + ["NONE", "X", "Y", null, "Z", null, null, "ALL"][this.billboardMode]), + (t += ", freeze wrld mat: " + (this._isWorldMatrixFrozen || this._waitingData.freezeWorldMatrix ? "YES" : "NO"))), + t + ); + }), + (t.prototype._getEffectiveParent = function () { + return this._masterMesh && this.billboardMode !== u.a.BILLBOARDMODE_NONE ? this._masterMesh : e.prototype._getEffectiveParent.call(this); + }), + (t.prototype._getActionManagerForTrigger = function (e, t) { + if ((void 0 === t && (t = !0), this.actionManager && (t || this.actionManager.isRecursive))) { + if (!e) return this.actionManager; + if (this.actionManager.hasSpecificTrigger(e)) return this.actionManager; + } + return this.parent ? this.parent._getActionManagerForTrigger(e, !1) : null; + }), + (t.prototype._rebuild = function () { + if ((this.onRebuildObservable.notifyObservers(this), this._occlusionQuery && (this._occlusionQuery = null), this.subMeshes)) + for (var e = 0, t = this.subMeshes; e < t.length; e++) { + t[e]._rebuild(); + } + }), + (t.prototype._resyncLightSources = function () { + this._lightSources.length = 0; + for (var e = 0, t = this.getScene().lights; e < t.length; e++) { + var n = t[e]; + n.isEnabled() && n.canAffectMesh(this) && this._lightSources.push(n); + } + this._markSubMeshesAsLightDirty(); + }), + (t.prototype._resyncLightSource = function (e) { + var t = e.isEnabled() && e.canAffectMesh(this), + n = this._lightSources.indexOf(e); + if (-1 === n) { + if (!t) return; + this._lightSources.push(e); + } else { + if (t) return; + this._lightSources.splice(n, 1); + } + this._markSubMeshesAsLightDirty(); + }), + (t.prototype._unBindEffect = function () { + for (var e = 0, t = this.subMeshes; e < t.length; e++) { + t[e].setEffect(null); + } + }), + (t.prototype._removeLightSource = function (e, t) { + var n = this._lightSources.indexOf(e); + -1 !== n && (this._lightSources.splice(n, 1), this._markSubMeshesAsLightDirty(t)); + }), + (t.prototype._markSubMeshesAsDirty = function (e) { + if (this.subMeshes) + for (var t = 0, n = this.subMeshes; t < n.length; t++) { + var i = n[t]; + i._materialDefines && e(i._materialDefines); + } + }), + (t.prototype._markSubMeshesAsLightDirty = function (e) { + void 0 === e && (e = !1), + this._markSubMeshesAsDirty(function (t) { + return t.markAsLightDirty(e); + }); + }), + (t.prototype._markSubMeshesAsAttributesDirty = function () { + this._markSubMeshesAsDirty(function (e) { + return e.markAsAttributesDirty(); + }); + }), + (t.prototype._markSubMeshesAsMiscDirty = function () { + if (this.subMeshes) + for (var e = 0, t = this.subMeshes; e < t.length; e++) { + var n = t[e].getMaterial(); + n && n.markAsDirty(16); + } + }), + Object.defineProperty(t.prototype, "scaling", { + get: function () { + return this._scaling; + }, + set: function (e) { + this._scaling = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isBlocked", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getLOD = function (e) { + return this; + }), + (t.prototype.getTotalVertices = function () { + return 0; + }), + (t.prototype.getTotalIndices = function () { + return 0; + }), + (t.prototype.getIndices = function () { + return null; + }), + (t.prototype.getVerticesData = function (e) { + return null; + }), + (t.prototype.setVerticesData = function (e, t, n, i) { + return this; + }), + (t.prototype.updateVerticesData = function (e, t, n, i) { + return this; + }), + (t.prototype.setIndices = function (e, t) { + return this; + }), + (t.prototype.isVerticesDataPresent = function (e) { + return !1; + }), + (t.prototype.getBoundingInfo = function () { + return this._masterMesh ? this._masterMesh.getBoundingInfo() : (this._boundingInfo || this._updateBoundingInfo(), this._boundingInfo); + }), + (t.prototype.normalizeToUnitCube = function (t, n, i) { + return void 0 === t && (t = !0), void 0 === n && (n = !1), e.prototype.normalizeToUnitCube.call(this, t, n, i); + }), + (t.prototype.setBoundingInfo = function (e) { + return (this._boundingInfo = e), this; + }), + Object.defineProperty(t.prototype, "useBones", { + get: function () { + return this.skeleton && this.getScene().skeletonsEnabled && this.isVerticesDataPresent(c.b.MatricesIndicesKind) && this.isVerticesDataPresent(c.b.MatricesWeightsKind); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._preActivate = function () {}), + (t.prototype._preActivateForIntermediateRendering = function (e) {}), + (t.prototype._activate = function (e, t) { + return (this._renderId = e), !0; + }), + (t.prototype._postActivate = function () {}), + (t.prototype._freeze = function () {}), + (t.prototype._unFreeze = function () {}), + (t.prototype.getWorldMatrix = function () { + return this._masterMesh && this.billboardMode === u.a.BILLBOARDMODE_NONE ? this._masterMesh.getWorldMatrix() : e.prototype.getWorldMatrix.call(this); + }), + (t.prototype._getWorldMatrixDeterminant = function () { + return this._masterMesh ? this._masterMesh._getWorldMatrixDeterminant() : e.prototype._getWorldMatrixDeterminant.call(this); + }), + Object.defineProperty(t.prototype, "isAnInstance", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasInstances", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.movePOV = function (e, t, n) { + return this.position.addInPlace(this.calcMovePOV(e, t, n)), this; + }), + (t.prototype.calcMovePOV = function (e, t, n) { + var i = new a.a(); + (this.rotationQuaternion ? this.rotationQuaternion : a.b.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z)).toRotationMatrix(i); + var r = a.e.Zero(), + o = this.definedFacingForward ? -1 : 1; + return a.e.TransformCoordinatesFromFloatsToRef(e * o, t, n * o, i, r), r; + }), + (t.prototype.rotatePOV = function (e, t, n) { + return this.rotation.addInPlace(this.calcRotatePOV(e, t, n)), this; + }), + (t.prototype.calcRotatePOV = function (e, t, n) { + var i = this.definedFacingForward ? 1 : -1; + return new a.e(e * i, t, n * i); + }), + (t.prototype.refreshBoundingInfo = function (e) { + return void 0 === e && (e = !1), (this._boundingInfo && this._boundingInfo.isLocked) || this._refreshBoundingInfo(this._getPositionData(e), null), this; + }), + (t.prototype._refreshBoundingInfo = function (e, t) { + if (e) { + var n = Object(m.a)(e, 0, this.getTotalVertices(), t); + this._boundingInfo ? this._boundingInfo.reConstruct(n.minimum, n.maximum) : (this._boundingInfo = new d.a(n.minimum, n.maximum)); + } + if (this.subMeshes) for (var i = 0; i < this.subMeshes.length; i++) this.subMeshes[i].refreshBoundingInfo(e); + this._updateBoundingInfo(); + }), + (t.prototype._getPositionData = function (e) { + var t = this.getVerticesData(c.b.PositionKind); + if (t && e && this.skeleton) { + (t = r.b.Slice(t)), this._generatePointsArray(); + var n = this.getVerticesData(c.b.MatricesIndicesKind), + i = this.getVerticesData(c.b.MatricesWeightsKind); + if (i && n) { + var o = this.numBoneInfluencers > 4, + s = o ? this.getVerticesData(c.b.MatricesIndicesExtraKind) : null, + l = o ? this.getVerticesData(c.b.MatricesWeightsExtraKind) : null; + this.skeleton.prepare(); + for (var u = this.skeleton.getTransformMatrices(this), h = a.c.Vector3[0], d = a.c.Matrix[0], p = a.c.Matrix[1], f = 0, m = 0; m < t.length; m += 3, f += 4) { + var g, b; + for (d.reset(), g = 0; g < 4; g++) (b = i[f + g]) > 0 && (a.a.FromFloat32ArrayToRefScaled(u, Math.floor(16 * n[f + g]), b, p), d.addToSelf(p)); + if (o) for (g = 0; g < 4; g++) (b = l[f + g]) > 0 && (a.a.FromFloat32ArrayToRefScaled(u, Math.floor(16 * s[f + g]), b, p), d.addToSelf(p)); + a.e.TransformCoordinatesFromFloatsToRef(t[m], t[m + 1], t[m + 2], d, h), h.toArray(t, m), this._positions && this._positions[m / 3].copyFrom(h); + } + } + } + return t; + }), + (t.prototype._updateBoundingInfo = function () { + var e = this._effectiveMesh; + return ( + this._boundingInfo ? this._boundingInfo.update(e.worldMatrixFromCache) : (this._boundingInfo = new d.a(this.absolutePosition, this.absolutePosition, e.worldMatrixFromCache)), + this._updateSubMeshesBoundingInfo(e.worldMatrixFromCache), + this + ); + }), + (t.prototype._updateSubMeshesBoundingInfo = function (e) { + if (!this.subMeshes) return this; + for (var t = this.subMeshes.length, n = 0; n < t; n++) { + var i = this.subMeshes[n]; + (t > 1 || !i.IsGlobal) && i.updateBoundingInfo(e); + } + return this; + }), + (t.prototype._afterComputeWorldMatrix = function () { + this.doNotSyncBoundingInfo || this._updateBoundingInfo(); + }), + Object.defineProperty(t.prototype, "_effectiveMesh", { + get: function () { + return (this.skeleton && this.skeleton.overrideMesh) || this; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.isInFrustum = function (e) { + return null !== this._boundingInfo && this._boundingInfo.isInFrustum(e, this.cullingStrategy); + }), + (t.prototype.isCompletelyInFrustum = function (e) { + return null !== this._boundingInfo && this._boundingInfo.isCompletelyInFrustum(e); + }), + (t.prototype.intersectsMesh = function (e, t, n) { + if ((void 0 === t && (t = !1), !this._boundingInfo || !e._boundingInfo)) return !1; + if (this._boundingInfo.intersects(e._boundingInfo, t)) return !0; + if (n) + for (var i = 0, r = this.getChildMeshes(); i < r.length; i++) { + if (r[i].intersectsMesh(e, t, !0)) return !0; + } + return !1; + }), + (t.prototype.intersectsPoint = function (e) { + return !!this._boundingInfo && this._boundingInfo.intersectsPoint(e); + }), + Object.defineProperty(t.prototype, "checkCollisions", { + get: function () { + return this._meshCollisionData._checkCollisions; + }, + set: function (e) { + this._meshCollisionData._checkCollisions = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "collider", { + get: function () { + return this._meshCollisionData._collider; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.moveWithCollisions = function (e) { + this.getAbsolutePosition().addToRef(this.ellipsoidOffset, this._meshCollisionData._oldPositionForCollisions); + var t = this.getScene().collisionCoordinator; + return ( + this._meshCollisionData._collider || (this._meshCollisionData._collider = t.createCollider()), + (this._meshCollisionData._collider._radius = this.ellipsoid), + t.getNewPosition(this._meshCollisionData._oldPositionForCollisions, e, this._meshCollisionData._collider, 3, this, this._onCollisionPositionChange, this.uniqueId), + this + ); + }), + (t.prototype._collideForSubMesh = function (e, t, n) { + if ((this._generatePointsArray(), !this._positions)) return this; + if (!e._lastColliderWorldVertices || !e._lastColliderTransformMatrix.equals(t)) { + (e._lastColliderTransformMatrix = t.clone()), (e._lastColliderWorldVertices = []), (e._trianglePlanes = []); + for (var i = e.verticesStart, r = e.verticesStart + e.verticesCount, o = i; o < r; o++) e._lastColliderWorldVertices.push(a.e.TransformCoordinates(this._positions[o], t)); + } + return n._collide(e._trianglePlanes, e._lastColliderWorldVertices, this.getIndices(), e.indexStart, e.indexStart + e.indexCount, e.verticesStart, !!e.getMaterial(), this), this; + }), + (t.prototype._processCollisionsForSubMeshes = function (e, t) { + for (var n = this._scene.getCollidingSubMeshCandidates(this, e), i = n.length, r = 0; r < i; r++) { + var o = n.data[r]; + (i > 1 && !o._checkCollision(e)) || this._collideForSubMesh(o, t, e); + } + return this; + }), + (t.prototype._checkCollision = function (e) { + if (!this._boundingInfo || !this._boundingInfo._checkCollision(e)) return this; + var t = a.c.Matrix[0], + n = a.c.Matrix[1]; + return a.a.ScalingToRef(1 / e._radius.x, 1 / e._radius.y, 1 / e._radius.z, t), this.worldMatrixFromCache.multiplyToRef(t, n), this._processCollisionsForSubMeshes(e, n), this; + }), + (t.prototype._generatePointsArray = function () { + return !1; + }), + (t.prototype.intersects = function (e, t, n) { + var i = new h.a(), + r = "InstancedLinesMesh" === this.getClassName() || "LinesMesh" === this.getClassName() ? this.intersectionThreshold : 0, + o = this._boundingInfo; + if (!(this.subMeshes && o && e.intersectsSphere(o.boundingSphere, r) && e.intersectsBox(o.boundingBox, r))) return i; + if (!this._generatePointsArray()) return i; + for (var s = null, c = this._scene.getIntersectingSubMeshCandidates(this, e), l = c.length, u = 0; u < l; u++) { + var d = c.data[u]; + if (!(l > 1) || d.canIntersects(e)) { + var p = d.intersects(e, this._positions, this.getIndices(), t, n); + if (p && (t || !s || p.distance < s.distance) && (((s = p).subMeshId = u), t)) break; + } + } + if (s) { + var f = this.getWorldMatrix(), + m = a.c.Vector3[0], + g = a.c.Vector3[1]; + a.e.TransformCoordinatesToRef(e.origin, f, m), e.direction.scaleToRef(s.distance, g); + var b = a.e.TransformNormal(g, f).addInPlace(m); + return (i.hit = !0), (i.distance = a.e.Distance(m, b)), (i.pickedPoint = b), (i.pickedMesh = this), (i.bu = s.bu || 0), (i.bv = s.bv || 0), (i.faceId = s.faceId), (i.subMeshId = s.subMeshId), i; + } + return i; + }), + (t.prototype.clone = function (e, t, n) { + return null; + }), + (t.prototype.releaseSubMeshes = function () { + if (this.subMeshes) for (; this.subMeshes.length; ) this.subMeshes[0].dispose(); + else this.subMeshes = new Array(); + return this; + }), + (t.prototype.dispose = function (t, n) { + var i, + r = this; + for ( + void 0 === n && (n = !1), + this._scene.useMaterialMeshMap && this._material && this._material.meshMap && (this._material.meshMap[this.uniqueId] = void 0), + this.getScene().freeActiveMeshes(), + this.getScene().freeRenderingGroups(), + void 0 !== this.actionManager && null !== this.actionManager && (this.actionManager.dispose(), (this.actionManager = null)), + this._internalAbstractMeshDataInfo._skeleton = null, + this._transformMatrixTexture && (this._transformMatrixTexture.dispose(), (this._transformMatrixTexture = null)), + i = 0; + i < this._intersectionsInProgress.length; + i++ + ) { + var o = this._intersectionsInProgress[i], + a = o._intersectionsInProgress.indexOf(this); + o._intersectionsInProgress.splice(a, 1); + } + (this._intersectionsInProgress = []), + this.getScene().lights.forEach(function (e) { + var t = e.includedOnlyMeshes.indexOf(r); + -1 !== t && e.includedOnlyMeshes.splice(t, 1), -1 !== (t = e.excludedMeshes.indexOf(r)) && e.excludedMeshes.splice(t, 1); + var n = e.getShadowGenerator(); + if (n) { + var i = n.getShadowMap(); + i && i.renderList && -1 !== (t = i.renderList.indexOf(r)) && i.renderList.splice(t, 1); + } + }), + ("InstancedMesh" === this.getClassName() && "InstancedLinesMesh" === this.getClassName()) || this.releaseSubMeshes(); + var s = this.getScene().getEngine(); + if ( + (this._occlusionQuery && ((this.isOcclusionQueryInProgress = !1), s.deleteQuery(this._occlusionQuery), (this._occlusionQuery = null)), + s.wipeCaches(), + this.getScene().removeMesh(this), + n && this.material && ("MultiMaterial" === this.material.getClassName() ? this.material.dispose(!1, !0, !0) : this.material.dispose(!1, !0)), + !t) + ) + for (i = 0; i < this.getScene().particleSystems.length; i++) this.getScene().particleSystems[i].emitter === this && (this.getScene().particleSystems[i].dispose(), i--); + this._internalAbstractMeshDataInfo._facetData.facetDataEnabled && this.disableFacetData(), + this.onAfterWorldMatrixUpdateObservable.clear(), + this.onCollideObservable.clear(), + this.onCollisionPositionChangeObservable.clear(), + this.onRebuildObservable.clear(), + e.prototype.dispose.call(this, t, n); + }), + (t.prototype.addChild = function (e) { + return e.setParent(this), this; + }), + (t.prototype.removeChild = function (e) { + return e.setParent(null), this; + }), + (t.prototype._initFacetData = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + e.facetNormals || (e.facetNormals = new Array()), + e.facetPositions || (e.facetPositions = new Array()), + e.facetPartitioning || (e.facetPartitioning = new Array()), + (e.facetNb = (this.getIndices().length / 3) | 0), + (e.partitioningSubdivisions = e.partitioningSubdivisions ? e.partitioningSubdivisions : 10), + (e.partitioningBBoxRatio = e.partitioningBBoxRatio ? e.partitioningBBoxRatio : 1.01); + for (var t = 0; t < e.facetNb; t++) (e.facetNormals[t] = a.e.Zero()), (e.facetPositions[t] = a.e.Zero()); + return (e.facetDataEnabled = !0), this; + }), + (t.prototype.updateFacetData = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + e.facetDataEnabled || this._initFacetData(); + var t = this.getVerticesData(c.b.PositionKind), + n = this.getIndices(), + i = this.getVerticesData(c.b.NormalKind), + r = this.getBoundingInfo(); + if (e.facetDepthSort && !e.facetDepthSortEnabled) { + if (((e.facetDepthSortEnabled = !0), n instanceof Uint16Array)) e.depthSortedIndices = new Uint16Array(n); + else if (n instanceof Uint32Array) e.depthSortedIndices = new Uint32Array(n); + else { + for (var o = !1, s = 0; s < n.length; s++) + if (n[s] > 65535) { + o = !0; + break; + } + e.depthSortedIndices = o ? new Uint32Array(n) : new Uint16Array(n); + } + if ( + ((e.facetDepthSortFunction = function (e, t) { + return t.sqDistance - e.sqDistance; + }), + !e.facetDepthSortFrom) + ) { + var u = this.getScene().activeCamera; + e.facetDepthSortFrom = u ? u.position : a.e.Zero(); + } + e.depthSortedFacets = []; + for (var h = 0; h < e.facetNb; h++) { + var d = { ind: 3 * h, sqDistance: 0 }; + e.depthSortedFacets.push(d); + } + (e.invertedMatrix = a.a.Identity()), (e.facetDepthSortOrigin = a.e.Zero()); + } + (e.bbSize.x = r.maximum.x - r.minimum.x > b.a ? r.maximum.x - r.minimum.x : b.a), + (e.bbSize.y = r.maximum.y - r.minimum.y > b.a ? r.maximum.y - r.minimum.y : b.a), + (e.bbSize.z = r.maximum.z - r.minimum.z > b.a ? r.maximum.z - r.minimum.z : b.a); + var p = e.bbSize.x > e.bbSize.y ? e.bbSize.x : e.bbSize.y; + if ( + ((p = p > e.bbSize.z ? p : e.bbSize.z), + (e.subDiv.max = e.partitioningSubdivisions), + (e.subDiv.X = Math.floor((e.subDiv.max * e.bbSize.x) / p)), + (e.subDiv.Y = Math.floor((e.subDiv.max * e.bbSize.y) / p)), + (e.subDiv.Z = Math.floor((e.subDiv.max * e.bbSize.z) / p)), + (e.subDiv.X = e.subDiv.X < 1 ? 1 : e.subDiv.X), + (e.subDiv.Y = e.subDiv.Y < 1 ? 1 : e.subDiv.Y), + (e.subDiv.Z = e.subDiv.Z < 1 ? 1 : e.subDiv.Z), + (e.facetParameters.facetNormals = this.getFacetLocalNormals()), + (e.facetParameters.facetPositions = this.getFacetLocalPositions()), + (e.facetParameters.facetPartitioning = this.getFacetLocalPartitioning()), + (e.facetParameters.bInfo = r), + (e.facetParameters.bbSize = e.bbSize), + (e.facetParameters.subDiv = e.subDiv), + (e.facetParameters.ratio = this.partitioningBBoxRatio), + (e.facetParameters.depthSort = e.facetDepthSort), + e.facetDepthSort && + e.facetDepthSortEnabled && + (this.computeWorldMatrix(!0), + this._worldMatrix.invertToRef(e.invertedMatrix), + a.e.TransformCoordinatesToRef(e.facetDepthSortFrom, e.invertedMatrix, e.facetDepthSortOrigin), + (e.facetParameters.distanceTo = e.facetDepthSortOrigin)), + (e.facetParameters.depthSortedFacets = e.depthSortedFacets), + l.a.ComputeNormals(t, n, i, e.facetParameters), + e.facetDepthSort && e.facetDepthSortEnabled) + ) { + e.depthSortedFacets.sort(e.facetDepthSortFunction); + var f = (e.depthSortedIndices.length / 3) | 0; + for (h = 0; h < f; h++) { + var m = e.depthSortedFacets[h].ind; + (e.depthSortedIndices[3 * h] = n[m]), (e.depthSortedIndices[3 * h + 1] = n[m + 1]), (e.depthSortedIndices[3 * h + 2] = n[m + 2]); + } + this.updateIndices(e.depthSortedIndices, void 0, !0); + } + return this; + }), + (t.prototype.getFacetLocalNormals = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + return e.facetNormals || this.updateFacetData(), e.facetNormals; + }), + (t.prototype.getFacetLocalPositions = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + return e.facetPositions || this.updateFacetData(), e.facetPositions; + }), + (t.prototype.getFacetLocalPartitioning = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + return e.facetPartitioning || this.updateFacetData(), e.facetPartitioning; + }), + (t.prototype.getFacetPosition = function (e) { + var t = a.e.Zero(); + return this.getFacetPositionToRef(e, t), t; + }), + (t.prototype.getFacetPositionToRef = function (e, t) { + var n = this.getFacetLocalPositions()[e], + i = this.getWorldMatrix(); + return a.e.TransformCoordinatesToRef(n, i, t), this; + }), + (t.prototype.getFacetNormal = function (e) { + var t = a.e.Zero(); + return this.getFacetNormalToRef(e, t), t; + }), + (t.prototype.getFacetNormalToRef = function (e, t) { + var n = this.getFacetLocalNormals()[e]; + return a.e.TransformNormalToRef(n, this.getWorldMatrix(), t), this; + }), + (t.prototype.getFacetsAtLocalCoordinates = function (e, t, n) { + var i = this.getBoundingInfo(), + r = this._internalAbstractMeshDataInfo._facetData, + o = Math.floor(((e - i.minimum.x * r.partitioningBBoxRatio) * r.subDiv.X * r.partitioningBBoxRatio) / r.bbSize.x), + a = Math.floor(((t - i.minimum.y * r.partitioningBBoxRatio) * r.subDiv.Y * r.partitioningBBoxRatio) / r.bbSize.y), + s = Math.floor(((n - i.minimum.z * r.partitioningBBoxRatio) * r.subDiv.Z * r.partitioningBBoxRatio) / r.bbSize.z); + return o < 0 || o > r.subDiv.max || a < 0 || a > r.subDiv.max || s < 0 || s > r.subDiv.max ? null : r.facetPartitioning[o + r.subDiv.max * a + r.subDiv.max * r.subDiv.max * s]; + }), + (t.prototype.getClosestFacetAtCoordinates = function (e, t, n, i, r, o) { + void 0 === r && (r = !1), void 0 === o && (o = !0); + var s = this.getWorldMatrix(), + c = a.c.Matrix[5]; + s.invertToRef(c); + var l = a.c.Vector3[8]; + a.e.TransformCoordinatesFromFloatsToRef(e, t, n, c, l); + var u = this.getClosestFacetAtLocalCoordinates(l.x, l.y, l.z, i, r, o); + return i && a.e.TransformCoordinatesFromFloatsToRef(i.x, i.y, i.z, s, i), u; + }), + (t.prototype.getClosestFacetAtLocalCoordinates = function (e, t, n, i, r, o) { + void 0 === r && (r = !1), void 0 === o && (o = !0); + var a = null, + s = 0, + c = 0, + l = 0, + u = 0, + h = 0, + d = 0, + p = 0, + f = 0, + m = this.getFacetLocalPositions(), + g = this.getFacetLocalNormals(), + b = this.getFacetsAtLocalCoordinates(e, t, n); + if (!b) return null; + for (var _, v, y, C = Number.MAX_VALUE, P = C, x = 0; x < b.length; x++) + (v = g[(_ = b[x])]), + (u = (e - (y = m[_]).x) * v.x + (t - y.y) * v.y + (n - y.z) * v.z), + (!r || (r && o && u >= 0) || (r && !o && u <= 0)) && + ((u = v.x * y.x + v.y * y.y + v.z * y.z), + (h = -(v.x * e + v.y * t + v.z * n - u) / (v.x * v.x + v.y * v.y + v.z * v.z)), + (P = (s = (d = e + v.x * h) - e) * s + (c = (p = t + v.y * h) - t) * c + (l = (f = n + v.z * h) - n) * l) < C && ((C = P), (a = _), i && ((i.x = d), (i.y = p), (i.z = f)))); + return a; + }), + (t.prototype.getFacetDataParameters = function () { + return this._internalAbstractMeshDataInfo._facetData.facetParameters; + }), + (t.prototype.disableFacetData = function () { + var e = this._internalAbstractMeshDataInfo._facetData; + return ( + e.facetDataEnabled && + ((e.facetDataEnabled = !1), (e.facetPositions = new Array()), (e.facetNormals = new Array()), (e.facetPartitioning = new Array()), (e.facetParameters = null), (e.depthSortedIndices = new Uint32Array(0))), + this + ); + }), + (t.prototype.updateIndices = function (e, t, n) { + return void 0 === n && (n = !1), this; + }), + (t.prototype.createNormals = function (e) { + var t, + n = this.getVerticesData(c.b.PositionKind), + i = this.getIndices(); + return ( + (t = this.isVerticesDataPresent(c.b.NormalKind) ? this.getVerticesData(c.b.NormalKind) : []), + l.a.ComputeNormals(n, i, t, { useRightHandedSystem: this.getScene().useRightHandedSystem }), + this.setVerticesData(c.b.NormalKind, t, e), + this + ); + }), + (t.prototype.alignWithNormal = function (e, t) { + t || (t = _.a.Y); + var n = a.c.Vector3[0], + i = a.c.Vector3[1]; + return a.e.CrossToRef(t, e, i), a.e.CrossToRef(e, i, n), this.rotationQuaternion ? a.b.RotationQuaternionFromAxisToRef(n, e, i, this.rotationQuaternion) : a.e.RotationFromAxisToRef(n, e, i, this.rotation), this; + }), + (t.prototype._checkOcclusionQuery = function () { + return !1; + }), + (t.prototype.disableEdgesRendering = function () { + throw f.a.WarnImport("EdgesRenderer"); + }), + (t.prototype.enableEdgesRendering = function (e, t) { + throw f.a.WarnImport("EdgesRenderer"); + }), + (t.OCCLUSION_TYPE_NONE = 0), + (t.OCCLUSION_TYPE_OPTIMISTIC = 1), + (t.OCCLUSION_TYPE_STRICT = 2), + (t.OCCLUSION_ALGORITHM_TYPE_ACCURATE = 0), + (t.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE = 1), + (t.CULLINGSTRATEGY_STANDARD = 0), + (t.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1), + (t.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2), + (t.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3), + t + ); + })(u.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return i; + }), + n.d(t, "a", function () { + return s; + }); + var i, + r = n(6), + o = n(147), + a = n(22); + !(function (e) { + (e[(e.Unknown = 0)] = "Unknown"), + (e[(e.Url = 1)] = "Url"), + (e[(e.Temp = 2)] = "Temp"), + (e[(e.Raw = 3)] = "Raw"), + (e[(e.Dynamic = 4)] = "Dynamic"), + (e[(e.RenderTarget = 5)] = "RenderTarget"), + (e[(e.MultiRenderTarget = 6)] = "MultiRenderTarget"), + (e[(e.Cube = 7)] = "Cube"), + (e[(e.CubeRaw = 8)] = "CubeRaw"), + (e[(e.CubePrefiltered = 9)] = "CubePrefiltered"), + (e[(e.Raw3D = 10)] = "Raw3D"), + (e[(e.Raw2DArray = 11)] = "Raw2DArray"), + (e[(e.Depth = 12)] = "Depth"), + (e[(e.CubeRawRGBD = 13)] = "CubeRawRGBD"); + })(i || (i = {})); + var s = (function () { + function e(e, t, n) { + void 0 === n && (n = !1), + (this.isReady = !1), + (this.isCube = !1), + (this.is3D = !1), + (this.is2DArray = !1), + (this.isMultiview = !1), + (this.url = ""), + (this.samplingMode = -1), + (this.generateMipMaps = !1), + (this.samples = 0), + (this.type = -1), + (this.format = -1), + (this.onLoadedObservable = new r.c()), + (this.width = 0), + (this.height = 0), + (this.depth = 0), + (this.baseWidth = 0), + (this.baseHeight = 0), + (this.baseDepth = 0), + (this.invertY = !1), + (this._invertVScale = !1), + (this._associatedChannel = -1), + (this._source = i.Unknown), + (this._buffer = null), + (this._bufferView = null), + (this._bufferViewArray = null), + (this._bufferViewArrayArray = null), + (this._size = 0), + (this._extension = ""), + (this._files = null), + (this._workingCanvas = null), + (this._workingContext = null), + (this._framebuffer = null), + (this._depthStencilBuffer = null), + (this._MSAAFramebuffer = null), + (this._MSAARenderBuffer = null), + (this._attachments = null), + (this._cachedCoordinatesMode = null), + (this._cachedWrapU = null), + (this._cachedWrapV = null), + (this._cachedWrapR = null), + (this._cachedAnisotropicFilteringLevel = null), + (this._isDisabled = !1), + (this._compression = null), + (this._generateStencilBuffer = !1), + (this._generateDepthBuffer = !1), + (this._comparisonFunction = 0), + (this._sphericalPolynomial = null), + (this._lodGenerationScale = 0), + (this._lodGenerationOffset = 0), + (this._colorTextureArray = null), + (this._depthStencilTextureArray = null), + (this._lodTextureHigh = null), + (this._lodTextureMid = null), + (this._lodTextureLow = null), + (this._isRGBD = !1), + (this._linearSpecularLOD = !1), + (this._irradianceTexture = null), + (this._webGLTexture = null), + (this._references = 1), + (this._engine = e), + (this._source = t), + n || (this._webGLTexture = e._createTexture()); + } + return ( + (e.prototype.getEngine = function () { + return this._engine; + }), + Object.defineProperty(e.prototype, "source", { + get: function () { + return this._source; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.incrementReferences = function () { + this._references++; + }), + (e.prototype.updateSize = function (e, t, n) { + void 0 === n && (n = 1), (this.width = e), (this.height = t), (this.depth = n), (this.baseWidth = e), (this.baseHeight = t), (this.baseDepth = n), (this._size = e * t * n); + }), + (e.prototype._rebuild = function () { + var t, + n = this; + switch (((this.isReady = !1), (this._cachedCoordinatesMode = null), (this._cachedWrapU = null), (this._cachedWrapV = null), (this._cachedAnisotropicFilteringLevel = null), this.source)) { + case i.Temp: + return; + case i.Url: + return void (t = this._engine.createTexture( + this.url, + !this.generateMipMaps, + this.invertY, + null, + this.samplingMode, + function () { + t._swapAndDie(n), (n.isReady = !0); + }, + null, + this._buffer, + void 0, + this.format + )); + case i.Raw: + return ( + (t = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression))._swapAndDie(this), + void (this.isReady = !0) + ); + case i.Raw3D: + return ( + (t = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression))._swapAndDie( + this + ), + void (this.isReady = !0) + ); + case i.Raw2DArray: + return ( + (t = this._engine.createRawTexture2DArray( + this._bufferView, + this.baseWidth, + this.baseHeight, + this.baseDepth, + this.format, + this.generateMipMaps, + this.invertY, + this.samplingMode, + this._compression + ))._swapAndDie(this), + void (this.isReady = !0) + ); + case i.Dynamic: + return ( + (t = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode))._swapAndDie(this), + void this._engine.updateDynamicTexture(this, this._engine.getRenderingCanvas(), this.invertY, void 0, void 0, !0) + ); + case i.RenderTarget: + var r = new o.a(); + if ( + ((r.generateDepthBuffer = this._generateDepthBuffer), + (r.generateMipMaps = this.generateMipMaps), + (r.generateStencilBuffer = this._generateStencilBuffer), + (r.samplingMode = this.samplingMode), + (r.type = this.type), + this.isCube) + ) + t = this._engine.createRenderTargetCubeTexture(this.width, r); + else { + var a = { width: this.width, height: this.height, layers: this.is2DArray ? this.depth : void 0 }; + t = this._engine.createRenderTargetTexture(a, r); + } + return t._swapAndDie(this), void (this.isReady = !0); + case i.Depth: + var s = { bilinearFiltering: 2 !== this.samplingMode, comparisonFunction: this._comparisonFunction, generateStencil: this._generateStencilBuffer, isCube: this.isCube }, + c = { width: this.width, height: this.height, layers: this.is2DArray ? this.depth : void 0 }; + return (t = this._engine.createDepthStencilTexture(c, s))._swapAndDie(this), void (this.isReady = !0); + case i.Cube: + return void (t = this._engine.createCubeTexture( + this.url, + null, + this._files, + !this.generateMipMaps, + function () { + t._swapAndDie(n), (n.isReady = !0); + }, + null, + this.format, + this._extension + )); + case i.CubeRaw: + return ( + (t = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression))._swapAndDie(this), + void (this.isReady = !0) + ); + case i.CubeRawRGBD: + return ( + (t = this._engine.createRawCubeTexture(null, this.width, this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression)), + void e._UpdateRGBDAsync(t, this._bufferViewArrayArray, this._sphericalPolynomial, this._lodGenerationScale, this._lodGenerationOffset).then(function () { + t._swapAndDie(n), (n.isReady = !0); + }) + ); + case i.CubePrefiltered: + return void ((t = this._engine.createPrefilteredCubeTexture( + this.url, + null, + this._lodGenerationScale, + this._lodGenerationOffset, + function (e) { + e && e._swapAndDie(n), (n.isReady = !0); + }, + null, + this.format, + this._extension + ))._sphericalPolynomial = this._sphericalPolynomial); + } + }), + (e.prototype._swapAndDie = function (e) { + (e._webGLTexture = this._webGLTexture), + (e._isRGBD = this._isRGBD), + this._framebuffer && (e._framebuffer = this._framebuffer), + this._depthStencilBuffer && (e._depthStencilBuffer = this._depthStencilBuffer), + (e._depthStencilTexture = this._depthStencilTexture), + this._lodTextureHigh && (e._lodTextureHigh && e._lodTextureHigh.dispose(), (e._lodTextureHigh = this._lodTextureHigh)), + this._lodTextureMid && (e._lodTextureMid && e._lodTextureMid.dispose(), (e._lodTextureMid = this._lodTextureMid)), + this._lodTextureLow && (e._lodTextureLow && e._lodTextureLow.dispose(), (e._lodTextureLow = this._lodTextureLow)), + this._irradianceTexture && (e._irradianceTexture && e._irradianceTexture.dispose(), (e._irradianceTexture = this._irradianceTexture)); + var t, + n = this._engine.getLoadedTexturesCache(); + -1 !== (t = n.indexOf(this)) && n.splice(t, 1), -1 === (t = n.indexOf(e)) && n.push(e); + }), + (e.prototype.dispose = function () { + this._webGLTexture && (this._references--, 0 === this._references && (this._engine._releaseTexture(this), (this._webGLTexture = null))); + }), + (e._UpdateRGBDAsync = function (e, t, n, i, r) { + throw a.a.WarnImport("environmentTextureTools"); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return T; + }), + n.d(t, "a", function () { + return S; + }); + var i = n(2), + r = n(3), + o = n(47), + a = n(18), + s = n(1), + c = n(5), + l = n(4), + u = n(50), + h = n(41), + d = n(46), + p = n(11), + f = n(8), + m = n(13), + g = n(17), + b = n(7), + _ = + "uniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\nuniform vec3 vEmissiveColor;\nuniform float visibility;\n\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform vec2 vTangentSpaceParams;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\nuniform mat4 view;\n#endif\n#ifdef REFRACTION\nuniform vec4 vRefractionInfos;\n#ifndef REFRACTIONMAP_3D\nuniform mat4 refractionMatrix;\n#endif\n#ifdef REFRACTIONFRESNEL\nuniform vec4 refractionLeftColor;\nuniform vec4 refractionRightColor;\n#endif\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;\n#endif\n#ifdef DIFFUSEFRESNEL\nuniform vec4 diffuseLeftColor;\nuniform vec4 diffuseRightColor;\n#endif\n#ifdef OPACITYFRESNEL\nuniform vec4 opacityParts;\n#endif\n#ifdef EMISSIVEFRESNEL\nuniform vec4 emissiveLeftColor;\nuniform vec4 emissiveRightColor;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\n#if defined(REFLECTIONMAP_PLANAR) || defined(REFLECTIONMAP_CUBIC) || defined(REFLECTIONMAP_PROJECTION) || defined(REFLECTIONMAP_EQUIRECTANGULAR) || defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_SKYBOX)\nuniform mat4 reflectionMatrix;\n#endif\n#ifndef REFLECTIONMAP_SKYBOX\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\n#endif\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 reflectionLeftColor;\nuniform vec4 reflectionRightColor;\n#endif\n#endif"; + b.a.IncludesShadersStore.defaultFragmentDeclaration = _; + var v = + "layout(std140,column_major) uniform;\nuniform Material\n{\nvec4 diffuseLeftColor;\nvec4 diffuseRightColor;\nvec4 opacityParts;\nvec4 reflectionLeftColor;\nvec4 reflectionRightColor;\nvec4 refractionLeftColor;\nvec4 refractionRightColor;\nvec4 emissiveLeftColor;\nvec4 emissiveRightColor;\nvec2 vDiffuseInfos;\nvec2 vAmbientInfos;\nvec2 vOpacityInfos;\nvec2 vReflectionInfos;\nvec3 vReflectionPosition;\nvec3 vReflectionSize;\nvec2 vEmissiveInfos;\nvec2 vLightmapInfos;\nvec2 vSpecularInfos;\nvec3 vBumpInfos;\nmat4 diffuseMatrix;\nmat4 ambientMatrix;\nmat4 opacityMatrix;\nmat4 reflectionMatrix;\nmat4 emissiveMatrix;\nmat4 lightmapMatrix;\nmat4 specularMatrix;\nmat4 bumpMatrix;\nvec2 vTangentSpaceParams;\nfloat pointSize;\nmat4 refractionMatrix;\nvec4 vRefractionInfos;\nvec4 vSpecularColor;\nvec3 vEmissiveColor;\nfloat visibility;\nvec4 vDiffuseColor;\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};\n"; + b.a.IncludesShadersStore.defaultUboDeclaration = v; + n(59), n(60), n(61), n(105), n(99), n(223), n(171), n(140), n(141), n(172), n(86), n(142), n(87), n(82), n(173), n(114), n(100), n(174), n(90); + var y = + "#include<__decl__defaultFragment>\n#if defined(BUMP) || !defined(NORMAL)\n#extension GL_OES_standard_derivatives : enable\n#endif\n#define CUSTOM_FRAGMENT_BEGIN\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#define RECIPROCAL_PI2 0.15915494\nuniform vec3 vEyePosition;\nuniform vec3 vAmbientColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n\n#ifdef DIFFUSE\n#if DIFFUSEDIRECTUV == 1\n#define vDiffuseUV vMainUV1\n#elif DIFFUSEDIRECTUV == 2\n#define vDiffuseUV vMainUV2\n#else\nvarying vec2 vDiffuseUV;\n#endif\nuniform sampler2D diffuseSampler;\n#endif\n#ifdef AMBIENT\n#if AMBIENTDIRECTUV == 1\n#define vAmbientUV vMainUV1\n#elif AMBIENTDIRECTUV == 2\n#define vAmbientUV vMainUV2\n#else\nvarying vec2 vAmbientUV;\n#endif\nuniform sampler2D ambientSampler;\n#endif\n#ifdef OPACITY\n#if OPACITYDIRECTUV == 1\n#define vOpacityUV vMainUV1\n#elif OPACITYDIRECTUV == 2\n#define vOpacityUV vMainUV2\n#else\nvarying vec2 vOpacityUV;\n#endif\nuniform sampler2D opacitySampler;\n#endif\n#ifdef EMISSIVE\n#if EMISSIVEDIRECTUV == 1\n#define vEmissiveUV vMainUV1\n#elif EMISSIVEDIRECTUV == 2\n#define vEmissiveUV vMainUV2\n#else\nvarying vec2 vEmissiveUV;\n#endif\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef LIGHTMAP\n#if LIGHTMAPDIRECTUV == 1\n#define vLightmapUV vMainUV1\n#elif LIGHTMAPDIRECTUV == 2\n#define vLightmapUV vMainUV2\n#else\nvarying vec2 vLightmapUV;\n#endif\nuniform sampler2D lightmapSampler;\n#endif\n#ifdef REFRACTION\n#ifdef REFRACTIONMAP_3D\nuniform samplerCube refractionCubeSampler;\n#else\nuniform sampler2D refraction2DSampler;\n#endif\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\n#if SPECULARDIRECTUV == 1\n#define vSpecularUV vMainUV1\n#elif SPECULARDIRECTUV == 2\n#define vSpecularUV vMainUV2\n#else\nvarying vec2 vSpecularUV;\n#endif\nuniform sampler2D specularSampler;\n#endif\n#ifdef ALPHATEST\nuniform float alphaCutOff;\n#endif\n\n#include\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\nuniform samplerCube reflectionCubeSampler;\n#else\nuniform sampler2D reflection2DSampler;\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include\n#endif\n#include\n#include\n#include\n#include\n#include\n#include\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW)));\n#endif\n#include\n#ifdef TWOSIDEDLIGHTING\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset);\n#ifdef ALPHATEST\nif (baseColor.a\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE\n\nvec3 baseAmbientColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nbaseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\n\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#ifdef SPECULAR\nvec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset);\nspecularColor=specularMapColor.rgb;\n#ifdef GLOSSINESS\nglossiness=glossiness*specularMapColor.a;\n#endif\n#endif\n#else\nfloat glossiness=0.;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\nfloat shadow=1.;\n#ifdef LIGHTMAP\nvec3 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset).rgb*vLightmapInfos.y;\n#endif\n#include[0..maxSimultaneousLights]\n\nvec3 refractionColor=vec3(0.,0.,0.);\n#ifdef REFRACTION\nvec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y));\n#ifdef REFRACTIONMAP_3D\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;\nif (dot(refractionVector,viewDirectionW)<1.0) {\nrefractionColor=textureCube(refractionCubeSampler,refractionVector).rgb;\n}\n#else\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;\nrefractionCoords.y=1.0-refractionCoords.y;\nrefractionColor=texture2D(refraction2DSampler,refractionCoords).rgb;\n#endif\n#ifdef IS_REFRACTION_LINEAR\nrefractionColor=toGammaSpace(refractionColor);\n#endif\nrefractionColor*=vRefractionInfos.x;\n#endif\n\nvec3 reflectionColor=vec3(0.,0.,0.);\n#ifdef REFLECTION\nvec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#ifdef REFLECTIONMAP_3D\n#ifdef ROUGHNESS\nfloat bias=vReflectionInfos.y;\n#ifdef SPECULARTERM\n#ifdef SPECULAR\n#ifdef GLOSSINESS\nbias*=(1.0-specularMapColor.a);\n#endif\n#endif\n#endif\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias).rgb;\n#else\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW).rgb;\n#endif\n#else\nvec2 coords=vReflectionUVW.xy;\n#ifdef REFLECTIONMAP_PROJECTION\ncoords/=vReflectionUVW.z;\n#endif\ncoords.y=1.0-coords.y;\nreflectionColor=texture2D(reflection2DSampler,coords).rgb;\n#endif\n#ifdef IS_REFLECTION_LINEAR\nreflectionColor=toGammaSpace(reflectionColor);\n#endif\nreflectionColor*=vReflectionInfos.x;\n#ifdef REFLECTIONFRESNEL\nfloat reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a);\n#ifdef REFLECTIONFRESNELFROMSPECULAR\n#ifdef SPECULARTERM\nreflectionColor*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#else\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#else\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#endif\n#endif\n#ifdef REFRACTIONFRESNEL\nfloat refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a);\nrefractionColor*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb;\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#ifdef OPACITYRGB\nopacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11);\nalpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y;\n#else\nalpha*=opacityMap.a*vOpacityInfos.y;\n#endif\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef OPACITYFRESNEL\nfloat opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w);\nalpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y;\n#endif\n\nvec3 emissiveColor=vEmissiveColor;\n#ifdef EMISSIVE\nemissiveColor+=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb*vEmissiveInfos.y;\n#endif\n#ifdef EMISSIVEFRESNEL\nfloat emissiveFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,emissiveRightColor.a,emissiveLeftColor.a);\nemissiveColor*=emissiveLeftColor.rgb*(1.0-emissiveFresnelTerm)+emissiveFresnelTerm*emissiveRightColor.rgb;\n#endif\n\n#ifdef DIFFUSEFRESNEL\nfloat diffuseFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,diffuseRightColor.a,diffuseLeftColor.a);\ndiffuseBase*=diffuseLeftColor.rgb*(1.0-diffuseFresnelTerm)+diffuseFresnelTerm*diffuseRightColor.rgb;\n#endif\n\n#ifdef EMISSIVEASILLUMINATION\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#else\n#ifdef LINKEMISSIVEWITHDIFFUSE\nvec3 finalDiffuse=clamp((diffuseBase+emissiveColor)*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#else\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+emissiveColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#endif\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#ifdef SPECULAROVERALPHA\nalpha=clamp(alpha+dot(finalSpecular,vec3(0.3,0.59,0.11)),0.,1.);\n#endif\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#ifdef REFLECTIONOVERALPHA\nalpha=clamp(alpha+dot(reflectionColor,vec3(0.3,0.59,0.11)),0.,1.);\n#endif\n\n#ifdef EMISSIVEASILLUMINATION\nvec4 color=vec4(clamp(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+emissiveColor+refractionColor,0.0,1.0),alpha);\n#else\nvec4 color=vec4(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+refractionColor,alpha);\n#endif\n\n#ifdef LIGHTMAP\n#ifndef LIGHTMAPEXCLUDED\n#ifdef USELIGHTMAPASSHADOWMAP\ncolor.rgb*=lightmapColor;\n#else\ncolor.rgb+=lightmapColor;\n#endif\n#endif\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FOG\ncolor.rgb=max(color.rgb,0.);\n#include\n#include\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\ncolor.rgb=toLinearSpace(color.rgb);\n#else\n#ifdef IMAGEPROCESSING\ncolor.rgb=toLinearSpace(color.rgb);\ncolor=applyImageProcessing(color);\n#endif\n#endif\ncolor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\n\ncolor.rgb*=color.a;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\ngl_FragColor=color;\n}\n"; + b.a.ShadersStore.defaultPixelShader = y; + var C = + "\nuniform mat4 viewProjection;\nuniform mat4 view;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;\nuniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\nuniform mat4 lightmapMatrix;\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;\nuniform mat4 specularMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform mat4 bumpMatrix;\n#endif\n#ifdef REFLECTION\nuniform mat4 reflectionMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n"; + b.a.IncludesShadersStore.defaultVertexDeclaration = C; + n(70), n(71), n(224), n(88), n(91), n(131), n(132), n(143), n(72), n(73), n(210), n(83), n(93), n(101); + b.a.IncludesShadersStore.pointCloudVertex = "#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif"; + n(175); + var P = + "#include<__decl__defaultVertex>\n\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n\n#include\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nvarying vec2 vDiffuseUV;\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nvarying vec2 vAmbientUV;\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nvarying vec2 vOpacityUV;\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nvarying vec2 vEmissiveUV;\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nvarying vec2 vLightmapUV;\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\nvarying vec2 vSpecularUV;\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nvarying vec2 vBumpUV;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*worldPos;\n} else {\ngl_Position=viewProjectionR*worldPos;\n}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nif (vAmbientInfos.x == 0.)\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nif (vEmissiveInfos.x == 0.)\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nif (vLightmapInfos.x == 0.)\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\nif (vSpecularInfos.x == 0.)\n{\nvSpecularUV=vec2(specularMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nif (vBumpInfos.x == 0.)\n{\nvBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#include\n#include\n#include\n#include[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\n\nvColor=color;\n#endif\n#include\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}\n"; + b.a.ShadersStore.defaultVertexShader = P; + var x = n(43), + T = (function (e) { + function t() { + var t = e.call(this) || this; + return ( + (t.MAINUV1 = !1), + (t.MAINUV2 = !1), + (t.DIFFUSE = !1), + (t.DIFFUSEDIRECTUV = 0), + (t.AMBIENT = !1), + (t.AMBIENTDIRECTUV = 0), + (t.OPACITY = !1), + (t.OPACITYDIRECTUV = 0), + (t.OPACITYRGB = !1), + (t.REFLECTION = !1), + (t.EMISSIVE = !1), + (t.EMISSIVEDIRECTUV = 0), + (t.SPECULAR = !1), + (t.SPECULARDIRECTUV = 0), + (t.BUMP = !1), + (t.BUMPDIRECTUV = 0), + (t.PARALLAX = !1), + (t.PARALLAXOCCLUSION = !1), + (t.SPECULAROVERALPHA = !1), + (t.CLIPPLANE = !1), + (t.CLIPPLANE2 = !1), + (t.CLIPPLANE3 = !1), + (t.CLIPPLANE4 = !1), + (t.CLIPPLANE5 = !1), + (t.CLIPPLANE6 = !1), + (t.ALPHATEST = !1), + (t.DEPTHPREPASS = !1), + (t.ALPHAFROMDIFFUSE = !1), + (t.POINTSIZE = !1), + (t.FOG = !1), + (t.SPECULARTERM = !1), + (t.DIFFUSEFRESNEL = !1), + (t.OPACITYFRESNEL = !1), + (t.REFLECTIONFRESNEL = !1), + (t.REFRACTIONFRESNEL = !1), + (t.EMISSIVEFRESNEL = !1), + (t.FRESNEL = !1), + (t.NORMAL = !1), + (t.UV1 = !1), + (t.UV2 = !1), + (t.VERTEXCOLOR = !1), + (t.VERTEXALPHA = !1), + (t.NUM_BONE_INFLUENCERS = 0), + (t.BonesPerMesh = 0), + (t.BONETEXTURE = !1), + (t.INSTANCES = !1), + (t.GLOSSINESS = !1), + (t.ROUGHNESS = !1), + (t.EMISSIVEASILLUMINATION = !1), + (t.LINKEMISSIVEWITHDIFFUSE = !1), + (t.REFLECTIONFRESNELFROMSPECULAR = !1), + (t.LIGHTMAP = !1), + (t.LIGHTMAPDIRECTUV = 0), + (t.OBJECTSPACE_NORMALMAP = !1), + (t.USELIGHTMAPASSHADOWMAP = !1), + (t.REFLECTIONMAP_3D = !1), + (t.REFLECTIONMAP_SPHERICAL = !1), + (t.REFLECTIONMAP_PLANAR = !1), + (t.REFLECTIONMAP_CUBIC = !1), + (t.USE_LOCAL_REFLECTIONMAP_CUBIC = !1), + (t.REFLECTIONMAP_PROJECTION = !1), + (t.REFLECTIONMAP_SKYBOX = !1), + (t.REFLECTIONMAP_EXPLICIT = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + (t.INVERTCUBICMAP = !1), + (t.LOGARITHMICDEPTH = !1), + (t.REFRACTION = !1), + (t.REFRACTIONMAP_3D = !1), + (t.REFLECTIONOVERALPHA = !1), + (t.TWOSIDEDLIGHTING = !1), + (t.SHADOWFLOAT = !1), + (t.MORPHTARGETS = !1), + (t.MORPHTARGETS_NORMAL = !1), + (t.MORPHTARGETS_TANGENT = !1), + (t.MORPHTARGETS_UV = !1), + (t.NUM_MORPH_INFLUENCERS = 0), + (t.NONUNIFORMSCALING = !1), + (t.PREMULTIPLYALPHA = !1), + (t.IMAGEPROCESSING = !1), + (t.VIGNETTE = !1), + (t.VIGNETTEBLENDMODEMULTIPLY = !1), + (t.VIGNETTEBLENDMODEOPAQUE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = !1), + (t.SAMPLER3DBGRMAP = !1), + (t.IMAGEPROCESSINGPOSTPROCESS = !1), + (t.MULTIVIEW = !1), + (t.IS_REFLECTION_LINEAR = !1), + (t.IS_REFRACTION_LINEAR = !1), + (t.EXPOSURE = !1), + t.rebuild(), + t + ); + } + return ( + Object(i.d)(t, e), + (t.prototype.setReflectionMode = function (e) { + for ( + var t = 0, + n = [ + "REFLECTIONMAP_CUBIC", + "REFLECTIONMAP_EXPLICIT", + "REFLECTIONMAP_PLANAR", + "REFLECTIONMAP_PROJECTION", + "REFLECTIONMAP_PROJECTION", + "REFLECTIONMAP_SKYBOX", + "REFLECTIONMAP_SPHERICAL", + "REFLECTIONMAP_EQUIRECTANGULAR", + "REFLECTIONMAP_EQUIRECTANGULAR_FIXED", + "REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED", + ]; + t < n.length; + t++ + ) { + var i = n[t]; + this[i] = i === e; + } + }), + t + ); + })(h.a), + S = (function (e) { + function t(n, i) { + var r = e.call(this, n, i) || this; + return ( + (r._diffuseTexture = null), + (r._ambientTexture = null), + (r._opacityTexture = null), + (r._reflectionTexture = null), + (r._emissiveTexture = null), + (r._specularTexture = null), + (r._bumpTexture = null), + (r._lightmapTexture = null), + (r._refractionTexture = null), + (r.ambientColor = new c.a(0, 0, 0)), + (r.diffuseColor = new c.a(1, 1, 1)), + (r.specularColor = new c.a(1, 1, 1)), + (r.emissiveColor = new c.a(0, 0, 0)), + (r.specularPower = 64), + (r._useAlphaFromDiffuseTexture = !1), + (r._useEmissiveAsIllumination = !1), + (r._linkEmissiveWithDiffuse = !1), + (r._useSpecularOverAlpha = !1), + (r._useReflectionOverAlpha = !1), + (r._disableLighting = !1), + (r._useObjectSpaceNormalMap = !1), + (r._useParallax = !1), + (r._useParallaxOcclusion = !1), + (r.parallaxScaleBias = 0.05), + (r._roughness = 0), + (r.indexOfRefraction = 0.98), + (r.invertRefractionY = !0), + (r.alphaCutOff = 0.4), + (r._useLightmapAsShadowmap = !1), + (r._useReflectionFresnelFromSpecular = !1), + (r._useGlossinessFromSpecularMapAlpha = !1), + (r._maxSimultaneousLights = 4), + (r._invertNormalMapX = !1), + (r._invertNormalMapY = !1), + (r._twoSidedLighting = !1), + (r._renderTargets = new o.a(16)), + (r._worldViewProjectionMatrix = s.a.Zero()), + (r._globalAmbientColor = new c.a(0, 0, 0)), + (r._rebuildInParallel = !1), + r._attachImageProcessingConfiguration(null), + (r.getRenderTargetTextures = function () { + return ( + r._renderTargets.reset(), + t.ReflectionTextureEnabled && r._reflectionTexture && r._reflectionTexture.isRenderTarget && r._renderTargets.push(r._reflectionTexture), + t.RefractionTextureEnabled && r._refractionTexture && r._refractionTexture.isRenderTarget && r._renderTargets.push(r._refractionTexture), + r._renderTargets + ); + }), + r + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + this._attachImageProcessingConfiguration(e), this._markAllSubMeshesAsTexturesDirty(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._attachImageProcessingConfiguration = function (e) { + var t = this; + e !== this._imageProcessingConfiguration && + (this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + (this._imageProcessingConfiguration = e || this.getScene().imageProcessingConfiguration), + this._imageProcessingConfiguration && + (this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(function () { + t._markAllSubMeshesAsImageProcessingDirty(); + }))); + }), + Object.defineProperty(t.prototype, "cameraColorCurvesEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorCurvesEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurvesEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorGradingEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraToneMappingEnabled", { + get: function () { + return this._imageProcessingConfiguration.toneMappingEnabled; + }, + set: function (e) { + this._imageProcessingConfiguration.toneMappingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraExposure", { + get: function () { + return this._imageProcessingConfiguration.exposure; + }, + set: function (e) { + this._imageProcessingConfiguration.exposure = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraContrast", { + get: function () { + return this._imageProcessingConfiguration.contrast; + }, + set: function (e) { + this._imageProcessingConfiguration.contrast = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingTexture", { + get: function () { + return this._imageProcessingConfiguration.colorGradingTexture; + }, + set: function (e) { + this._imageProcessingConfiguration.colorGradingTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorCurves", { + get: function () { + return this._imageProcessingConfiguration.colorCurves; + }, + set: function (e) { + this._imageProcessingConfiguration.colorCurves = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasRenderTargetTextures", { + get: function () { + return !!(t.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) || !!(t.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "StandardMaterial"; + }), + Object.defineProperty(t.prototype, "useLogarithmicDepth", { + get: function () { + return this._useLogarithmicDepth; + }, + set: function (e) { + (this._useLogarithmicDepth = e && this.getScene().getEngine().getCaps().fragmentDepthSupported), this._markAllSubMeshesAsMiscDirty(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.needAlphaBlending = function () { + return this.alpha < 1 || null != this._opacityTexture || this._shouldUseAlphaFromDiffuseTexture() || (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled); + }), + (t.prototype.needAlphaTesting = function () { + return null != this._diffuseTexture && this._diffuseTexture.hasAlpha; + }), + (t.prototype._shouldUseAlphaFromDiffuseTexture = function () { + return null != this._diffuseTexture && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture; + }), + (t.prototype.getAlphaTestTexture = function () { + return this._diffuseTexture; + }), + (t.prototype.isReadyForSubMesh = function (e, n, i) { + if ((void 0 === i && (i = !1), n.effect && this.isFrozen && n.effect._wasPreviouslyReady)) return !0; + n._materialDefines || (n._materialDefines = new T()); + var r = this.getScene(), + o = n._materialDefines; + if (!this.checkReadyOnEveryCall && n.effect && o._renderId === r.getRenderId()) return !0; + var a = r.getEngine(); + if (((o._needNormals = p.a.PrepareDefinesForLights(r, e, o, !0, this._maxSimultaneousLights, this._disableLighting)), p.a.PrepareDefinesForMultiview(r, o), o._areTexturesDirty)) { + if (((o._needUVs = !1), (o.MAINUV1 = !1), (o.MAINUV2 = !1), r.texturesEnabled)) { + if (this._diffuseTexture && t.DiffuseTextureEnabled) { + if (!this._diffuseTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._diffuseTexture, o, "DIFFUSE"); + } else o.DIFFUSE = !1; + if (this._ambientTexture && t.AmbientTextureEnabled) { + if (!this._ambientTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._ambientTexture, o, "AMBIENT"); + } else o.AMBIENT = !1; + if (this._opacityTexture && t.OpacityTextureEnabled) { + if (!this._opacityTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._opacityTexture, o, "OPACITY"), (o.OPACITYRGB = this._opacityTexture.getAlphaFromRGB); + } else o.OPACITY = !1; + if (this._reflectionTexture && t.ReflectionTextureEnabled) { + if (!this._reflectionTexture.isReadyOrNotBlocking()) return !1; + switch ( + ((o._needNormals = !0), + (o.REFLECTION = !0), + (o.ROUGHNESS = this._roughness > 0), + (o.REFLECTIONOVERALPHA = this._useReflectionOverAlpha), + (o.INVERTCUBICMAP = this._reflectionTexture.coordinatesMode === f.a.INVCUBIC_MODE), + (o.REFLECTIONMAP_3D = this._reflectionTexture.isCube), + this._reflectionTexture.coordinatesMode) + ) { + case f.a.EXPLICIT_MODE: + o.setReflectionMode("REFLECTIONMAP_EXPLICIT"); + break; + case f.a.PLANAR_MODE: + o.setReflectionMode("REFLECTIONMAP_PLANAR"); + break; + case f.a.PROJECTION_MODE: + o.setReflectionMode("REFLECTIONMAP_PROJECTION"); + break; + case f.a.SKYBOX_MODE: + o.setReflectionMode("REFLECTIONMAP_SKYBOX"); + break; + case f.a.SPHERICAL_MODE: + o.setReflectionMode("REFLECTIONMAP_SPHERICAL"); + break; + case f.a.EQUIRECTANGULAR_MODE: + o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR"); + break; + case f.a.FIXED_EQUIRECTANGULAR_MODE: + o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED"); + break; + case f.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE: + o.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"); + break; + case f.a.CUBIC_MODE: + case f.a.INVCUBIC_MODE: + default: + o.setReflectionMode("REFLECTIONMAP_CUBIC"); + } + o.USE_LOCAL_REFLECTIONMAP_CUBIC = !!this._reflectionTexture.boundingBoxSize; + } else o.REFLECTION = !1; + if (this._emissiveTexture && t.EmissiveTextureEnabled) { + if (!this._emissiveTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._emissiveTexture, o, "EMISSIVE"); + } else o.EMISSIVE = !1; + if (this._lightmapTexture && t.LightmapTextureEnabled) { + if (!this._lightmapTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._lightmapTexture, o, "LIGHTMAP"), (o.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap); + } else o.LIGHTMAP = !1; + if (this._specularTexture && t.SpecularTextureEnabled) { + if (!this._specularTexture.isReadyOrNotBlocking()) return !1; + p.a.PrepareDefinesForMergedUV(this._specularTexture, o, "SPECULAR"), (o.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha); + } else o.SPECULAR = !1; + if (r.getEngine().getCaps().standardDerivatives && this._bumpTexture && t.BumpTextureEnabled) { + if (!this._bumpTexture.isReady()) return !1; + p.a.PrepareDefinesForMergedUV(this._bumpTexture, o, "BUMP"), + (o.PARALLAX = this._useParallax), + (o.PARALLAXOCCLUSION = this._useParallaxOcclusion), + (o.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap); + } else o.BUMP = !1; + if (this._refractionTexture && t.RefractionTextureEnabled) { + if (!this._refractionTexture.isReadyOrNotBlocking()) return !1; + (o._needUVs = !0), (o.REFRACTION = !0), (o.REFRACTIONMAP_3D = this._refractionTexture.isCube); + } else o.REFRACTION = !1; + o.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting; + } else (o.DIFFUSE = !1), (o.AMBIENT = !1), (o.OPACITY = !1), (o.REFLECTION = !1), (o.EMISSIVE = !1), (o.LIGHTMAP = !1), (o.BUMP = !1), (o.REFRACTION = !1); + (o.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture()), + (o.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination), + (o.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse), + (o.SPECULAROVERALPHA = this._useSpecularOverAlpha), + (o.PREMULTIPLYALPHA = 7 === this.alphaMode || 8 === this.alphaMode); + } + if (o._areImageProcessingDirty && this._imageProcessingConfiguration) { + if (!this._imageProcessingConfiguration.isReady()) return !1; + this._imageProcessingConfiguration.prepareDefines(o), + (o.IS_REFLECTION_LINEAR = null != this.reflectionTexture && !this.reflectionTexture.gammaSpace), + (o.IS_REFRACTION_LINEAR = null != this.refractionTexture && !this.refractionTexture.gammaSpace); + } + if ( + (o._areFresnelDirty && + (t.FresnelEnabled + ? (this._diffuseFresnelParameters || this._opacityFresnelParameters || this._emissiveFresnelParameters || this._refractionFresnelParameters || this._reflectionFresnelParameters) && + ((o.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled), + (o.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled), + (o.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled), + (o.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular), + (o.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled), + (o.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled), + (o._needNormals = !0), + (o.FRESNEL = !0)) + : (o.FRESNEL = !1)), + p.a.PrepareDefinesForMisc(e, r, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(e), o), + p.a.PrepareDefinesForAttributes(e, o, !0, !0, !0), + p.a.PrepareDefinesForFrameBoundValues(r, a, o, i), + o.isDirty) + ) { + var s = o._areLightsDisposed; + o.markAsProcessed(); + var c = new x.a(); + o.REFLECTION && c.addFallback(0, "REFLECTION"), + o.SPECULAR && c.addFallback(0, "SPECULAR"), + o.BUMP && c.addFallback(0, "BUMP"), + o.PARALLAX && c.addFallback(1, "PARALLAX"), + o.PARALLAXOCCLUSION && c.addFallback(0, "PARALLAXOCCLUSION"), + o.SPECULAROVERALPHA && c.addFallback(0, "SPECULAROVERALPHA"), + o.FOG && c.addFallback(1, "FOG"), + o.POINTSIZE && c.addFallback(0, "POINTSIZE"), + o.LOGARITHMICDEPTH && c.addFallback(0, "LOGARITHMICDEPTH"), + p.a.HandleFallbacksForShadows(o, c, this._maxSimultaneousLights), + o.SPECULARTERM && c.addFallback(0, "SPECULARTERM"), + o.DIFFUSEFRESNEL && c.addFallback(1, "DIFFUSEFRESNEL"), + o.OPACITYFRESNEL && c.addFallback(2, "OPACITYFRESNEL"), + o.REFLECTIONFRESNEL && c.addFallback(3, "REFLECTIONFRESNEL"), + o.EMISSIVEFRESNEL && c.addFallback(4, "EMISSIVEFRESNEL"), + o.FRESNEL && c.addFallback(4, "FRESNEL"), + o.MULTIVIEW && c.addFallback(0, "MULTIVIEW"); + var h = [l.b.PositionKind]; + o.NORMAL && h.push(l.b.NormalKind), + o.UV1 && h.push(l.b.UVKind), + o.UV2 && h.push(l.b.UV2Kind), + o.VERTEXCOLOR && h.push(l.b.ColorKind), + p.a.PrepareAttributesForBones(h, e, o, c), + p.a.PrepareAttributesForInstances(h, o), + p.a.PrepareAttributesForMorphTargets(h, e, o); + var d = "default", + m = [ + "world", + "view", + "viewProjection", + "vEyePosition", + "vLightsType", + "vAmbientColor", + "vDiffuseColor", + "vSpecularColor", + "vEmissiveColor", + "visibility", + "vFogInfos", + "vFogColor", + "pointSize", + "vDiffuseInfos", + "vAmbientInfos", + "vOpacityInfos", + "vReflectionInfos", + "vEmissiveInfos", + "vSpecularInfos", + "vBumpInfos", + "vLightmapInfos", + "vRefractionInfos", + "mBones", + "vClipPlane", + "vClipPlane2", + "vClipPlane3", + "vClipPlane4", + "vClipPlane5", + "vClipPlane6", + "diffuseMatrix", + "ambientMatrix", + "opacityMatrix", + "reflectionMatrix", + "emissiveMatrix", + "specularMatrix", + "bumpMatrix", + "normalMatrix", + "lightmapMatrix", + "refractionMatrix", + "diffuseLeftColor", + "diffuseRightColor", + "opacityParts", + "reflectionLeftColor", + "reflectionRightColor", + "emissiveLeftColor", + "emissiveRightColor", + "refractionLeftColor", + "refractionRightColor", + "vReflectionPosition", + "vReflectionSize", + "logarithmicDepthConstant", + "vTangentSpaceParams", + "alphaCutOff", + "boneTextureWidth", + ], + g = [ + "diffuseSampler", + "ambientSampler", + "opacitySampler", + "reflectionCubeSampler", + "reflection2DSampler", + "emissiveSampler", + "specularSampler", + "bumpSampler", + "lightmapSampler", + "refractionCubeSampler", + "refraction2DSampler", + "boneSampler", + ], + b = ["Material", "Scene"]; + u.a && (u.a.PrepareUniforms(m, o), u.a.PrepareSamplers(g, o)), + p.a.PrepareUniformsAndSamplersList({ uniformsNames: m, uniformBuffersNames: b, samplers: g, defines: o, maxSimultaneousLights: this._maxSimultaneousLights }), + this.customShaderNameResolve && (d = this.customShaderNameResolve(d, m, b, g, o)); + var _ = o.toString(), + v = n.effect, + y = r + .getEngine() + .createEffect( + d, + { + attributes: h, + uniformsNames: m, + uniformBuffersNames: b, + samplers: g, + defines: _, + fallbacks: c, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: o.NUM_MORPH_INFLUENCERS }, + }, + a + ); + if (y) + if (this.allowShaderHotSwapping && v && !y.isReady()) { + if (((y = v), (this._rebuildInParallel = !0), o.markAsUnprocessed(), s)) return (o._areLightsDisposed = !0), !1; + } else (this._rebuildInParallel = !1), r.resetCachedMaterial(), n.setEffect(y, o), this.buildUniformLayout(); + } + return !(!n.effect || !n.effect.isReady()) && ((o._renderId = r.getRenderId()), (n.effect._wasPreviouslyReady = !0), !0); + }), + (t.prototype.buildUniformLayout = function () { + var e = this._uniformBuffer; + e.addUniform("diffuseLeftColor", 4), + e.addUniform("diffuseRightColor", 4), + e.addUniform("opacityParts", 4), + e.addUniform("reflectionLeftColor", 4), + e.addUniform("reflectionRightColor", 4), + e.addUniform("refractionLeftColor", 4), + e.addUniform("refractionRightColor", 4), + e.addUniform("emissiveLeftColor", 4), + e.addUniform("emissiveRightColor", 4), + e.addUniform("vDiffuseInfos", 2), + e.addUniform("vAmbientInfos", 2), + e.addUniform("vOpacityInfos", 2), + e.addUniform("vReflectionInfos", 2), + e.addUniform("vReflectionPosition", 3), + e.addUniform("vReflectionSize", 3), + e.addUniform("vEmissiveInfos", 2), + e.addUniform("vLightmapInfos", 2), + e.addUniform("vSpecularInfos", 2), + e.addUniform("vBumpInfos", 3), + e.addUniform("diffuseMatrix", 16), + e.addUniform("ambientMatrix", 16), + e.addUniform("opacityMatrix", 16), + e.addUniform("reflectionMatrix", 16), + e.addUniform("emissiveMatrix", 16), + e.addUniform("lightmapMatrix", 16), + e.addUniform("specularMatrix", 16), + e.addUniform("bumpMatrix", 16), + e.addUniform("vTangentSpaceParams", 2), + e.addUniform("pointSize", 1), + e.addUniform("refractionMatrix", 16), + e.addUniform("vRefractionInfos", 4), + e.addUniform("vSpecularColor", 4), + e.addUniform("vEmissiveColor", 3), + e.addUniform("visibility", 1), + e.addUniform("vDiffuseColor", 4), + e.create(); + }), + (t.prototype.unbind = function () { + if (this._activeEffect) { + var t = !1; + this._reflectionTexture && this._reflectionTexture.isRenderTarget && (this._activeEffect.setTexture("reflection2DSampler", null), (t = !0)), + this._refractionTexture && this._refractionTexture.isRenderTarget && (this._activeEffect.setTexture("refraction2DSampler", null), (t = !0)), + t && this._markAllSubMeshesAsTexturesDirty(); + } + e.prototype.unbind.call(this); + }), + (t.prototype.bindForSubMesh = function (e, n, i) { + var r = this.getScene(), + o = i._materialDefines; + if (o) { + var s = i.effect; + if (s) { + (this._activeEffect = s), o.INSTANCES || this.bindOnlyWorldMatrix(e), o.OBJECTSPACE_NORMALMAP && (e.toNormalMatrix(this._normalMatrix), this.bindOnlyNormalMatrix(this._normalMatrix)); + var l = this._mustRebind(r, s, n.visibility); + p.a.BindBonesParameters(n, s); + var u = this._uniformBuffer; + if (l) { + if ((u.bindToEffect(s, "Material"), this.bindViewProjection(s), !u.useUbo || !this.isFrozen || !u.isSync)) { + if ( + (t.FresnelEnabled && + o.FRESNEL && + (this.diffuseFresnelParameters && + this.diffuseFresnelParameters.isEnabled && + (u.updateColor4("diffuseLeftColor", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power), + u.updateColor4("diffuseRightColor", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias)), + this.opacityFresnelParameters && + this.opacityFresnelParameters.isEnabled && + u.updateColor4( + "opacityParts", + new c.a(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias), + this.opacityFresnelParameters.power + ), + this.reflectionFresnelParameters && + this.reflectionFresnelParameters.isEnabled && + (u.updateColor4("reflectionLeftColor", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power), + u.updateColor4("reflectionRightColor", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias)), + this.refractionFresnelParameters && + this.refractionFresnelParameters.isEnabled && + (u.updateColor4("refractionLeftColor", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power), + u.updateColor4("refractionRightColor", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias)), + this.emissiveFresnelParameters && + this.emissiveFresnelParameters.isEnabled && + (u.updateColor4("emissiveLeftColor", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power), + u.updateColor4("emissiveRightColor", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias))), + r.texturesEnabled) + ) { + if ( + (this._diffuseTexture && + t.DiffuseTextureEnabled && + (u.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level), + p.a.BindTextureMatrix(this._diffuseTexture, u, "diffuse"), + this._diffuseTexture.hasAlpha && s.setFloat("alphaCutOff", this.alphaCutOff)), + this._ambientTexture && + t.AmbientTextureEnabled && + (u.updateFloat2("vAmbientInfos", this._ambientTexture.coordinatesIndex, this._ambientTexture.level), p.a.BindTextureMatrix(this._ambientTexture, u, "ambient")), + this._opacityTexture && + t.OpacityTextureEnabled && + (u.updateFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level), p.a.BindTextureMatrix(this._opacityTexture, u, "opacity")), + this._reflectionTexture && + t.ReflectionTextureEnabled && + (u.updateFloat2("vReflectionInfos", this._reflectionTexture.level, this.roughness), + u.updateMatrix("reflectionMatrix", this._reflectionTexture.getReflectionTextureMatrix()), + this._reflectionTexture.boundingBoxSize)) + ) { + var h = this._reflectionTexture; + u.updateVector3("vReflectionPosition", h.boundingBoxPosition), u.updateVector3("vReflectionSize", h.boundingBoxSize); + } + if ( + (this._emissiveTexture && + t.EmissiveTextureEnabled && + (u.updateFloat2("vEmissiveInfos", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level), p.a.BindTextureMatrix(this._emissiveTexture, u, "emissive")), + this._lightmapTexture && + t.LightmapTextureEnabled && + (u.updateFloat2("vLightmapInfos", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level), p.a.BindTextureMatrix(this._lightmapTexture, u, "lightmap")), + this._specularTexture && + t.SpecularTextureEnabled && + (u.updateFloat2("vSpecularInfos", this._specularTexture.coordinatesIndex, this._specularTexture.level), p.a.BindTextureMatrix(this._specularTexture, u, "specular")), + this._bumpTexture && + r.getEngine().getCaps().standardDerivatives && + t.BumpTextureEnabled && + (u.updateFloat3("vBumpInfos", this._bumpTexture.coordinatesIndex, 1 / this._bumpTexture.level, this.parallaxScaleBias), + p.a.BindTextureMatrix(this._bumpTexture, u, "bump"), + r._mirroredCameraPosition + ? u.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1 : -1, this._invertNormalMapY ? 1 : -1) + : u.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? -1 : 1, this._invertNormalMapY ? -1 : 1)), + this._refractionTexture && t.RefractionTextureEnabled) + ) { + var d = 1; + this._refractionTexture.isCube || + (u.updateMatrix("refractionMatrix", this._refractionTexture.getReflectionTextureMatrix()), this._refractionTexture.depth && (d = this._refractionTexture.depth)), + u.updateFloat4("vRefractionInfos", this._refractionTexture.level, this.indexOfRefraction, d, this.invertRefractionY ? -1 : 1); + } + } + this.pointsCloud && u.updateFloat("pointSize", this.pointSize), + o.SPECULARTERM && u.updateColor4("vSpecularColor", this.specularColor, this.specularPower), + u.updateColor3("vEmissiveColor", t.EmissiveTextureEnabled ? this.emissiveColor : c.a.BlackReadOnly), + u.updateFloat("visibility", n.visibility), + u.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha); + } + if ( + r.texturesEnabled && + (this._diffuseTexture && t.DiffuseTextureEnabled && s.setTexture("diffuseSampler", this._diffuseTexture), + this._ambientTexture && t.AmbientTextureEnabled && s.setTexture("ambientSampler", this._ambientTexture), + this._opacityTexture && t.OpacityTextureEnabled && s.setTexture("opacitySampler", this._opacityTexture), + this._reflectionTexture && + t.ReflectionTextureEnabled && + (this._reflectionTexture.isCube ? s.setTexture("reflectionCubeSampler", this._reflectionTexture) : s.setTexture("reflection2DSampler", this._reflectionTexture)), + this._emissiveTexture && t.EmissiveTextureEnabled && s.setTexture("emissiveSampler", this._emissiveTexture), + this._lightmapTexture && t.LightmapTextureEnabled && s.setTexture("lightmapSampler", this._lightmapTexture), + this._specularTexture && t.SpecularTextureEnabled && s.setTexture("specularSampler", this._specularTexture), + this._bumpTexture && r.getEngine().getCaps().standardDerivatives && t.BumpTextureEnabled && s.setTexture("bumpSampler", this._bumpTexture), + this._refractionTexture && t.RefractionTextureEnabled) + ) { + d = 1; + this._refractionTexture.isCube ? s.setTexture("refractionCubeSampler", this._refractionTexture) : s.setTexture("refraction2DSampler", this._refractionTexture); + } + p.a.BindClipPlane(s, r), r.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor), p.a.BindEyePosition(s, r), s.setColor3("vAmbientColor", this._globalAmbientColor); + } + (!l && this.isFrozen) || + (r.lightsEnabled && !this._disableLighting && p.a.BindLights(r, n, s, o, this._maxSimultaneousLights, this._rebuildInParallel), + ((r.fogEnabled && n.applyFog && r.fogMode !== a.a.FOGMODE_NONE) || this._reflectionTexture || this._refractionTexture) && this.bindView(s), + p.a.BindFogParameters(r, n, s), + o.NUM_MORPH_INFLUENCERS && p.a.BindMorphTargetParameters(n, s), + this.useLogarithmicDepth && p.a.BindLogDepth(o, s, r), + this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess && this._imageProcessingConfiguration.bind(this._activeEffect)), + u.update(), + this._afterBind(n, this._activeEffect); + } + } + }), + (t.prototype.getAnimatables = function () { + var e = []; + return ( + this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0 && e.push(this._diffuseTexture), + this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0 && e.push(this._ambientTexture), + this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0 && e.push(this._opacityTexture), + this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0 && e.push(this._reflectionTexture), + this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0 && e.push(this._emissiveTexture), + this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0 && e.push(this._specularTexture), + this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0 && e.push(this._bumpTexture), + this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0 && e.push(this._lightmapTexture), + this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0 && e.push(this._refractionTexture), + e + ); + }), + (t.prototype.getActiveTextures = function () { + var t = e.prototype.getActiveTextures.call(this); + return ( + this._diffuseTexture && t.push(this._diffuseTexture), + this._ambientTexture && t.push(this._ambientTexture), + this._opacityTexture && t.push(this._opacityTexture), + this._reflectionTexture && t.push(this._reflectionTexture), + this._emissiveTexture && t.push(this._emissiveTexture), + this._specularTexture && t.push(this._specularTexture), + this._bumpTexture && t.push(this._bumpTexture), + this._lightmapTexture && t.push(this._lightmapTexture), + this._refractionTexture && t.push(this._refractionTexture), + t + ); + }), + (t.prototype.hasTexture = function (t) { + return ( + !!e.prototype.hasTexture.call(this, t) || + this._diffuseTexture === t || + this._ambientTexture === t || + this._opacityTexture === t || + this._reflectionTexture === t || + this._emissiveTexture === t || + this._specularTexture === t || + this._bumpTexture === t || + this._lightmapTexture === t || + this._refractionTexture === t + ); + }), + (t.prototype.dispose = function (t, n) { + n && + (this._diffuseTexture && this._diffuseTexture.dispose(), + this._ambientTexture && this._ambientTexture.dispose(), + this._opacityTexture && this._opacityTexture.dispose(), + this._reflectionTexture && this._reflectionTexture.dispose(), + this._emissiveTexture && this._emissiveTexture.dispose(), + this._specularTexture && this._specularTexture.dispose(), + this._bumpTexture && this._bumpTexture.dispose(), + this._lightmapTexture && this._lightmapTexture.dispose(), + this._refractionTexture && this._refractionTexture.dispose()), + this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + e.prototype.dispose.call(this, t, n); + }), + (t.prototype.clone = function (e) { + var n = this, + i = r.a.Clone(function () { + return new t(e, n.getScene()); + }, this); + return (i.name = e), (i.id = e), i; + }), + (t.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (t.Parse = function (e, n, i) { + return r.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + }), + Object.defineProperty(t, "DiffuseTextureEnabled", { + get: function () { + return g.a.DiffuseTextureEnabled; + }, + set: function (e) { + g.a.DiffuseTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "AmbientTextureEnabled", { + get: function () { + return g.a.AmbientTextureEnabled; + }, + set: function (e) { + g.a.AmbientTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "OpacityTextureEnabled", { + get: function () { + return g.a.OpacityTextureEnabled; + }, + set: function (e) { + g.a.OpacityTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "ReflectionTextureEnabled", { + get: function () { + return g.a.ReflectionTextureEnabled; + }, + set: function (e) { + g.a.ReflectionTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "EmissiveTextureEnabled", { + get: function () { + return g.a.EmissiveTextureEnabled; + }, + set: function (e) { + g.a.EmissiveTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "SpecularTextureEnabled", { + get: function () { + return g.a.SpecularTextureEnabled; + }, + set: function (e) { + g.a.SpecularTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "BumpTextureEnabled", { + get: function () { + return g.a.BumpTextureEnabled; + }, + set: function (e) { + g.a.BumpTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "LightmapTextureEnabled", { + get: function () { + return g.a.LightmapTextureEnabled; + }, + set: function (e) { + g.a.LightmapTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "RefractionTextureEnabled", { + get: function () { + return g.a.RefractionTextureEnabled; + }, + set: function (e) { + g.a.RefractionTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "ColorGradingTextureEnabled", { + get: function () { + return g.a.ColorGradingTextureEnabled; + }, + set: function (e) { + g.a.ColorGradingTextureEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "FresnelEnabled", { + get: function () { + return g.a.FresnelEnabled; + }, + set: function (e) { + g.a.FresnelEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object(i.c)([Object(r.m)("diffuseTexture")], t.prototype, "_diffuseTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "diffuseTexture", void 0), + Object(i.c)([Object(r.m)("ambientTexture")], t.prototype, "_ambientTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "ambientTexture", void 0), + Object(i.c)([Object(r.m)("opacityTexture")], t.prototype, "_opacityTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "opacityTexture", void 0), + Object(i.c)([Object(r.m)("reflectionTexture")], t.prototype, "_reflectionTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionTexture", void 0), + Object(i.c)([Object(r.m)("emissiveTexture")], t.prototype, "_emissiveTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveTexture", void 0), + Object(i.c)([Object(r.m)("specularTexture")], t.prototype, "_specularTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "specularTexture", void 0), + Object(i.c)([Object(r.m)("bumpTexture")], t.prototype, "_bumpTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "bumpTexture", void 0), + Object(i.c)([Object(r.m)("lightmapTexture")], t.prototype, "_lightmapTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "lightmapTexture", void 0), + Object(i.c)([Object(r.m)("refractionTexture")], t.prototype, "_refractionTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "refractionTexture", void 0), + Object(i.c)([Object(r.e)("ambient")], t.prototype, "ambientColor", void 0), + Object(i.c)([Object(r.e)("diffuse")], t.prototype, "diffuseColor", void 0), + Object(i.c)([Object(r.e)("specular")], t.prototype, "specularColor", void 0), + Object(i.c)([Object(r.e)("emissive")], t.prototype, "emissiveColor", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "specularPower", void 0), + Object(i.c)([Object(r.c)("useAlphaFromDiffuseTexture")], t.prototype, "_useAlphaFromDiffuseTexture", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useAlphaFromDiffuseTexture", void 0), + Object(i.c)([Object(r.c)("useEmissiveAsIllumination")], t.prototype, "_useEmissiveAsIllumination", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useEmissiveAsIllumination", void 0), + Object(i.c)([Object(r.c)("linkEmissiveWithDiffuse")], t.prototype, "_linkEmissiveWithDiffuse", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "linkEmissiveWithDiffuse", void 0), + Object(i.c)([Object(r.c)("useSpecularOverAlpha")], t.prototype, "_useSpecularOverAlpha", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useSpecularOverAlpha", void 0), + Object(i.c)([Object(r.c)("useReflectionOverAlpha")], t.prototype, "_useReflectionOverAlpha", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useReflectionOverAlpha", void 0), + Object(i.c)([Object(r.c)("disableLighting")], t.prototype, "_disableLighting", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "disableLighting", void 0), + Object(i.c)([Object(r.c)("useObjectSpaceNormalMap")], t.prototype, "_useObjectSpaceNormalMap", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useObjectSpaceNormalMap", void 0), + Object(i.c)([Object(r.c)("useParallax")], t.prototype, "_useParallax", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useParallax", void 0), + Object(i.c)([Object(r.c)("useParallaxOcclusion")], t.prototype, "_useParallaxOcclusion", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useParallaxOcclusion", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "parallaxScaleBias", void 0), + Object(i.c)([Object(r.c)("roughness")], t.prototype, "_roughness", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "roughness", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "indexOfRefraction", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "invertRefractionY", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "alphaCutOff", void 0), + Object(i.c)([Object(r.c)("useLightmapAsShadowmap")], t.prototype, "_useLightmapAsShadowmap", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useLightmapAsShadowmap", void 0), + Object(i.c)([Object(r.h)("diffuseFresnelParameters")], t.prototype, "_diffuseFresnelParameters", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelDirty")], t.prototype, "diffuseFresnelParameters", void 0), + Object(i.c)([Object(r.h)("opacityFresnelParameters")], t.prototype, "_opacityFresnelParameters", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelAndMiscDirty")], t.prototype, "opacityFresnelParameters", void 0), + Object(i.c)([Object(r.h)("reflectionFresnelParameters")], t.prototype, "_reflectionFresnelParameters", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelDirty")], t.prototype, "reflectionFresnelParameters", void 0), + Object(i.c)([Object(r.h)("refractionFresnelParameters")], t.prototype, "_refractionFresnelParameters", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelDirty")], t.prototype, "refractionFresnelParameters", void 0), + Object(i.c)([Object(r.h)("emissiveFresnelParameters")], t.prototype, "_emissiveFresnelParameters", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelDirty")], t.prototype, "emissiveFresnelParameters", void 0), + Object(i.c)([Object(r.c)("useReflectionFresnelFromSpecular")], t.prototype, "_useReflectionFresnelFromSpecular", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsFresnelDirty")], t.prototype, "useReflectionFresnelFromSpecular", void 0), + Object(i.c)([Object(r.c)("useGlossinessFromSpecularMapAlpha")], t.prototype, "_useGlossinessFromSpecularMapAlpha", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useGlossinessFromSpecularMapAlpha", void 0), + Object(i.c)([Object(r.c)("maxSimultaneousLights")], t.prototype, "_maxSimultaneousLights", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "maxSimultaneousLights", void 0), + Object(i.c)([Object(r.c)("invertNormalMapX")], t.prototype, "_invertNormalMapX", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapX", void 0), + Object(i.c)([Object(r.c)("invertNormalMapY")], t.prototype, "_invertNormalMapY", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapY", void 0), + Object(i.c)([Object(r.c)("twoSidedLighting")], t.prototype, "_twoSidedLighting", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "twoSidedLighting", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "useLogarithmicDepth", null), + t + ); + })(d.a); + (m.a.RegisteredTypes["BABYLON.StandardMaterial"] = S), + (a.a.DefaultMaterialFactory = function (e) { + return new S("default material", e); + }); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return i; + }), + n.d(t, "c", function () { + return r; + }), + n.d(t, "a", function () { + return o; + }); + var i = 1 / 2.2, + r = 2.2, + o = 0.001; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(1), + o = n(3), + a = n(6), + s = n(25), + c = n(22), + l = (function () { + function e(e, t) { + void 0 === t && (t = null), + (this.state = ""), + (this.metadata = null), + (this.reservedDataStore = null), + (this._doNotSerialize = !1), + (this._isDisposed = !1), + (this.animations = new Array()), + (this._ranges = {}), + (this.onReady = null), + (this._isEnabled = !0), + (this._isParentEnabled = !0), + (this._isReady = !0), + (this._currentRenderId = -1), + (this._parentUpdateId = -1), + (this._childUpdateId = -1), + (this._waitingParentId = null), + (this._cache = {}), + (this._parentNode = null), + (this._children = null), + (this._worldMatrix = r.a.Identity()), + (this._worldMatrixDeterminant = 0), + (this._worldMatrixDeterminantIsDirty = !0), + (this._sceneRootNodesIndex = -1), + (this._animationPropertiesOverride = null), + (this._isNode = !0), + (this.onDisposeObservable = new a.c()), + (this._onDisposeObserver = null), + (this._behaviors = new Array()), + (this.name = e), + (this.id = e), + (this._scene = t || s.a.LastCreatedScene), + (this.uniqueId = this._scene.getUniqueId()), + this._initCache(); + } + return ( + (e.AddNodeConstructor = function (e, t) { + this._NodeConstructors[e] = t; + }), + (e.Construct = function (e, t, n, i) { + var r = this._NodeConstructors[e]; + return r ? r(t, n, i) : null; + }), + Object.defineProperty(e.prototype, "doNotSerialize", { + get: function () { + return !!this._doNotSerialize || (!!this._parentNode && this._parentNode.doNotSerialize); + }, + set: function (e) { + this._doNotSerialize = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isDisposed = function () { + return this._isDisposed; + }), + Object.defineProperty(e.prototype, "parent", { + get: function () { + return this._parentNode; + }, + set: function (e) { + if (this._parentNode !== e) { + var t = this._parentNode; + if (this._parentNode && void 0 !== this._parentNode._children && null !== this._parentNode._children) { + var n = this._parentNode._children.indexOf(this); + -1 !== n && this._parentNode._children.splice(n, 1), e || this._isDisposed || this._addToSceneRootNodes(); + } + (this._parentNode = e), + this._parentNode && + ((void 0 !== this._parentNode._children && null !== this._parentNode._children) || (this._parentNode._children = new Array()), + this._parentNode._children.push(this), + t || this._removeFromSceneRootNodes()), + this._syncParentEnabledState(); + } + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._addToSceneRootNodes = function () { + -1 === this._sceneRootNodesIndex && ((this._sceneRootNodesIndex = this._scene.rootNodes.length), this._scene.rootNodes.push(this)); + }), + (e.prototype._removeFromSceneRootNodes = function () { + if (-1 !== this._sceneRootNodesIndex) { + var e = this._scene.rootNodes, + t = e.length - 1; + (e[this._sceneRootNodesIndex] = e[t]), (e[this._sceneRootNodesIndex]._sceneRootNodesIndex = this._sceneRootNodesIndex), this._scene.rootNodes.pop(), (this._sceneRootNodesIndex = -1); + } + }), + Object.defineProperty(e.prototype, "animationPropertiesOverride", { + get: function () { + return this._animationPropertiesOverride ? this._animationPropertiesOverride : this._scene.animationPropertiesOverride; + }, + set: function (e) { + this._animationPropertiesOverride = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "Node"; + }), + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.getEngine = function () { + return this._scene.getEngine(); + }), + (e.prototype.addBehavior = function (e, t) { + var n = this; + return ( + void 0 === t && (t = !1), + -1 !== this._behaviors.indexOf(e) || + (e.init(), + this._scene.isLoading && !t + ? this._scene.onDataLoadedObservable.addOnce(function () { + e.attach(n); + }) + : e.attach(this), + this._behaviors.push(e)), + this + ); + }), + (e.prototype.removeBehavior = function (e) { + var t = this._behaviors.indexOf(e); + return -1 === t || (this._behaviors[t].detach(), this._behaviors.splice(t, 1)), this; + }), + Object.defineProperty(e.prototype, "behaviors", { + get: function () { + return this._behaviors; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getBehaviorByName = function (e) { + for (var t = 0, n = this._behaviors; t < n.length; t++) { + var i = n[t]; + if (i.name === e) return i; + } + return null; + }), + (e.prototype.getWorldMatrix = function () { + return this._currentRenderId !== this._scene.getRenderId() && this.computeWorldMatrix(), this._worldMatrix; + }), + (e.prototype._getWorldMatrixDeterminant = function () { + return this._worldMatrixDeterminantIsDirty && ((this._worldMatrixDeterminantIsDirty = !1), (this._worldMatrixDeterminant = this._worldMatrix.determinant())), this._worldMatrixDeterminant; + }), + Object.defineProperty(e.prototype, "worldMatrixFromCache", { + get: function () { + return this._worldMatrix; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._initCache = function () { + (this._cache = {}), (this._cache.parent = void 0); + }), + (e.prototype.updateCache = function (e) { + (!e && this.isSynchronized()) || ((this._cache.parent = this.parent), this._updateCache()); + }), + (e.prototype._getActionManagerForTrigger = function (e, t) { + return void 0 === t && (t = !0), this.parent ? this.parent._getActionManagerForTrigger(e, !1) : null; + }), + (e.prototype._updateCache = function (e) {}), + (e.prototype._isSynchronized = function () { + return !0; + }), + (e.prototype._markSyncedWithParent = function () { + this._parentNode && (this._parentUpdateId = this._parentNode._childUpdateId); + }), + (e.prototype.isSynchronizedWithParent = function () { + return !this._parentNode || (this._parentUpdateId === this._parentNode._childUpdateId && this._parentNode.isSynchronized()); + }), + (e.prototype.isSynchronized = function () { + return this._cache.parent != this._parentNode ? ((this._cache.parent = this._parentNode), !1) : !(this._parentNode && !this.isSynchronizedWithParent()) && this._isSynchronized(); + }), + (e.prototype.isReady = function (e) { + return void 0 === e && (e = !1), this._isReady; + }), + (e.prototype.isEnabled = function (e) { + return void 0 === e && (e = !0), !1 === e ? this._isEnabled : !!this._isEnabled && this._isParentEnabled; + }), + (e.prototype._syncParentEnabledState = function () { + (this._isParentEnabled = !this._parentNode || this._parentNode.isEnabled()), + this._children && + this._children.forEach(function (e) { + e._syncParentEnabledState(); + }); + }), + (e.prototype.setEnabled = function (e) { + (this._isEnabled = e), this._syncParentEnabledState(); + }), + (e.prototype.isDescendantOf = function (e) { + return !!this.parent && (this.parent === e || this.parent.isDescendantOf(e)); + }), + (e.prototype._getDescendants = function (e, t, n) { + if ((void 0 === t && (t = !1), this._children)) + for (var i = 0; i < this._children.length; i++) { + var r = this._children[i]; + (n && !n(r)) || e.push(r), t || r._getDescendants(e, !1, n); + } + }), + (e.prototype.getDescendants = function (e, t) { + var n = new Array(); + return this._getDescendants(n, e, t), n; + }), + (e.prototype.getChildMeshes = function (e, t) { + var n = []; + return ( + this._getDescendants(n, e, function (e) { + return (!t || t(e)) && void 0 !== e.cullingStrategy; + }), + n + ); + }), + (e.prototype.getChildren = function (e, t) { + return void 0 === t && (t = !0), this.getDescendants(t, e); + }), + (e.prototype._setReady = function (e) { + e !== this._isReady && (e ? (this.onReady && this.onReady(this), (this._isReady = !0)) : (this._isReady = !1)); + }), + (e.prototype.getAnimationByName = function (e) { + for (var t = 0; t < this.animations.length; t++) { + var n = this.animations[t]; + if (n.name === e) return n; + } + return null; + }), + (e.prototype.createAnimationRange = function (t, n, i) { + if (!this._ranges[t]) { + this._ranges[t] = e._AnimationRangeFactory(t, n, i); + for (var r = 0, o = this.animations.length; r < o; r++) this.animations[r] && this.animations[r].createRange(t, n, i); + } + }), + (e.prototype.deleteAnimationRange = function (e, t) { + void 0 === t && (t = !0); + for (var n = 0, i = this.animations.length; n < i; n++) this.animations[n] && this.animations[n].deleteRange(e, t); + this._ranges[e] = null; + }), + (e.prototype.getAnimationRange = function (e) { + return this._ranges[e]; + }), + (e.prototype.getAnimationRanges = function () { + var e, + t = []; + for (e in this._ranges) t.push(this._ranges[e]); + return t; + }), + (e.prototype.beginAnimation = function (e, t, n, i) { + var r = this.getAnimationRange(e); + return r ? this._scene.beginAnimation(this, r.from, r.to, t, n, i) : null; + }), + (e.prototype.serializeAnimationRanges = function () { + var e = []; + for (var t in this._ranges) { + var n = this._ranges[t]; + if (n) { + var i = {}; + (i.name = t), (i.from = n.from), (i.to = n.to), e.push(i); + } + } + return e; + }), + (e.prototype.computeWorldMatrix = function (e) { + return this._worldMatrix || (this._worldMatrix = r.a.Identity()), this._worldMatrix; + }), + (e.prototype.dispose = function (e, t) { + if ((void 0 === t && (t = !1), (this._isDisposed = !0), !e)) + for (var n = 0, i = this.getDescendants(!0); n < i.length; n++) { + i[n].dispose(e, t); + } + this.parent ? (this.parent = null) : this._removeFromSceneRootNodes(), this.onDisposeObservable.notifyObservers(this), this.onDisposeObservable.clear(); + for (var r = 0, o = this._behaviors; r < o.length; r++) { + o[r].detach(); + } + this._behaviors = []; + }), + (e.ParseAnimationRanges = function (e, t, n) { + if (t.ranges) + for (var i = 0; i < t.ranges.length; i++) { + var r = t.ranges[i]; + e.createAnimationRange(r.name, r.from, r.to); + } + }), + (e.prototype.getHierarchyBoundingVectors = function (e, t) { + var n, i; + void 0 === e && (e = !0), void 0 === t && (t = null), this.getScene().incrementRenderId(), this.computeWorldMatrix(!0); + if (this.getBoundingInfo && this.subMeshes) { + var o = this.getBoundingInfo(); + (n = o.boundingBox.minimumWorld.clone()), (i = o.boundingBox.maximumWorld.clone()); + } else (n = new r.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), (i = new r.e(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE)); + if (e) + for (var a = 0, s = this.getDescendants(!1); a < s.length; a++) { + var c = s[a]; + if ((c.computeWorldMatrix(!0), (!t || t(c)) && c.getBoundingInfo && 0 !== c.getTotalVertices())) { + var l = c.getBoundingInfo().boundingBox, + u = l.minimumWorld, + h = l.maximumWorld; + r.e.CheckExtends(u, n, i), r.e.CheckExtends(h, n, i); + } + } + return { min: n, max: i }; + }), + (e._AnimationRangeFactory = function (e, t, n) { + throw c.a.WarnImport("AnimationRange"); + }), + (e._NodeConstructors = {}), + Object(i.c)([Object(o.c)()], e.prototype, "name", void 0), + Object(i.c)([Object(o.c)()], e.prototype, "id", void 0), + Object(i.c)([Object(o.c)()], e.prototype, "uniqueId", void 0), + Object(i.c)([Object(o.c)()], e.prototype, "state", void 0), + Object(i.c)([Object(o.c)()], e.prototype, "metadata", void 0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.uiState = void 0); + const r = n(222), + o = n(29), + a = n(139), + s = n(48), + c = n(40); + class l { + constructor() { + (this.titlePanelVisible = !1), + (this.optionPanelVisible = !1), + (this.hudPanelVisible = !1), + (this.deathPanelVisible = !1), + (this.deathPanelHidden = !1), + (this.tutorialPanelVisible = !1), + (this.debugPanelVisible = !1), + (this.challengesPanelVisible = !1), + (this.abilitiesPanelVisible = !1), + (this.statsPanelVisible = !1), + (this.settingsPanelVisible = !1), + (this.flyCameraSkipPanelVisible = !1), + (this.resumeCountDown = 0), + (this.loadingBarPercent = 0), + (this.loadingPanelVisible = !1), + (this.customDialogVisible = !1), + (this.customDialogTitle = ""), + (this.customDialogMessage = ""), + (this.chestAnimPanelVisible = !1), + (this.chestAnimOpenVisible = !1), + (this.adsShownCount = 0), + (this.showContinuePlayButton = !0), + (this.showRewardedAdButton = !0), + (this.isPlayingAd = !1), + (this.toastDistanceToShow = 250), + (this.showDistanceCoveredToast = !1), + (this.hudToastMessage = ""), + (this.isDebugCameraEnabled = !1), + (this.deathDebugInfo = ""); + } + } + t.uiState = (function () { + const e = new l(); + (e.loadingPanelVisible = !0), (e.flyCameraSkipPanelVisible = !0); + let t = !1; + const n = r.writable(e), + { subscribe: u, update: h } = n, + d = () => { + 0 == t && + ((t = !0), + o.EventHandler.instance.fireEvent(o.EventID.OnResetCurrentGameData), + s.GameConfig.HAS_AD_BLOCKER + ? (o.EventHandler.instance.fireEvent(o.EventID.OnPlayGame, !1), m(!1), (t = !1)) + : b(() => { + c.GameController.instance.checkGameAfterAd({ eventId: o.EventID.OnPlayGame, args: !1 }), m(!1), (t = !1); + })); + }, + p = (e, t) => { + const n = new l(); + return (n.titlePanelVisible = e), (n.tutorialPanelVisible = t.tutorialPanelVisible), n; + }, + f = (e = "", t = "") => { + h((n) => ((n.customDialogTitle = e), (n.customDialogMessage = t), (n.customDialogVisible = !n.customDialogVisible), n)); + }, + m = (e) => { + h((t) => { + const n = p(!1, t); + return ( + (n.tutorialPanelVisible = t.tutorialPanelVisible), + e && ((n.adsShownCount = t.adsShownCount), (n.showContinuePlayButton = t.showContinuePlayButton), (n.toastDistanceToShow = t.toastDistanceToShow), (n.showDistanceCoveredToast = t.showDistanceCoveredToast)), + Object.assign(Object.assign({}, n), { hudPanelVisible: !0 }) + ); + }); + }, + g = (e) => { + s.GameConfig.IS_AD_PLAYING = e; + }, + b = (e) => { + g(!0), + o.EventHandler.instance.fireEvent(o.EventID.MuteAll), + o.EventHandler.instance.fireEvent(o.EventID.OnStopInputs), + o.EventHandler.instance.fireEvent(o.EventID.UnmuteAll), o.EventHandler.instance.fireEvent(o.EventID.OnStartInputs), g(!1), null != e && e(); + }, + _ = (e, t) => { + g(!0), + o.EventHandler.instance.fireEvent(o.EventID.MuteAll), + o.EventHandler.instance.fireEvent(o.EventID.OnStopInputs), + n ? null != e && e() : null != t && t(), o.EventHandler.instance.fireEvent(o.EventID.UnmuteAll), o.EventHandler.instance.fireEvent(o.EventID.OnStartInputs), g(!1); + }; + return ( + (() => { + o.EventHandler.instance.addListener(o.EventID.OnPlayerDeath, () => { + h((e) => { + const t = !!e.showContinuePlayButton && e.adsShownCount < 4; + return Object.assign(Object.assign({}, e), { deathPanelVisible: !0, hudPanelVisible: !1, showContinuePlayButton: t }); + }) + }), + o.EventHandler.instance.addListener(o.EventID.OnCameraFlyEnd, () => { + h((e) => Object.assign(Object.assign({}, e), { titlePanelVisible: !0, flyCameraSkipPanelVisible: !1 })); + }), + o.EventHandler.instance.addListener(o.EventID.OnTutorialStart, () => { + h((e) => Object.assign(Object.assign({}, e), { tutorialPanelVisible: !0 })); + }), + o.EventHandler.instance.addListener(o.EventID.OnTutorialComplete, () => { + h((e) => Object.assign(Object.assign({}, e), { tutorialPanelVisible: !1 })); + }), + o.EventHandler.instance.addListener(o.EventID.OnPlayGame, () => { + m(!1); + }), + o.EventHandler.instance.addListener(o.EventID.OnPauseGame, (e) => { + "tutorialPause" != e && h((e) => Object.assign(Object.assign({}, e), { hudPanelVisible: !1, optionPanelVisible: !0 })); + }), + o.EventHandler.instance.addListener(o.EventID.OnResumeGame, () => { + m(!0); + }), + o.EventHandler.instance.addListener(o.EventID.OnResumeCounterChange, (e) => { + h((t) => Object.assign(Object.assign({}, t), { resumeCountDown: e })); + }), + o.EventHandler.instance.addListener(o.EventID.OnLoadingUpdate, (e) => { + h((t) => ((t.loadingBarPercent = e), t)); + }), + o.EventHandler.instance.addListener(o.EventID.OnGameLoaded, () => { + h((e) => ((e.loadingPanelVisible = !1), e)); + }), + o.EventHandler.instance.addListener(o.EventID.NotEnoughCoins, () => { + f("NOT ENOUGH COINS!!", "COMPLETE DAILY CHALLENGES\nAND GO ON RUN\nTO EARN MORE COINS."); + }), + o.EventHandler.instance.addListener(o.EventID.OnEnablingChestUI, () => { + h((e) => ((e.chestAnimPanelVisible = !0), (e.deathPanelHidden = !0), e)); + }), + o.EventHandler.instance.addListener(o.EventID.OnDisablingChestUI, () => { + h((e) => ((e.chestAnimPanelVisible = !1), (e.deathPanelHidden = !1), (e.chestAnimOpenVisible = !1), e)); + }), + o.EventHandler.instance.addListener(o.EventID.OnChestReward, () => { + h((e) => ((e.chestAnimOpenVisible = !0), e)); + }), + o.EventHandler.instance.addListener(o.EventID.OnShowDistanceToast, (e) => + i(this, void 0, void 0, function* () { + o.EventHandler.instance.fireEvent(o.EventID.PlaySFX, a.SoundID.Wooosh), + h((t) => ((t.showDistanceCoveredToast = !0), (t.toastDistanceToShow = e), t)), + setTimeout(() => { + h((e) => ((e.showDistanceCoveredToast = !1), (e.toastDistanceToShow = 250), e)); + }, 5e3); + }) + ), + o.EventHandler.instance.addListener(o.EventID.OnHudToastMessage, (e) => + i(this, void 0, void 0, function* () { + h((t) => ((t.hudToastMessage = e), t)), + setTimeout(() => { + h((e) => ((e.hudToastMessage = ""), e)); + }, 5e3); + }) + ), + o.EventHandler.instance.addListener(o.EventID.OnDebugCameraStateChange, (e) => { + h((t) => ((t.isDebugCameraEnabled = e), t)); + }), + o.EventHandler.instance.addListener(o.EventID.PlayerDeathDebugInfo, (e) => { + h((t) => ((t.deathDebugInfo = e), t)); + }); + })(), + { + subscribe: u, + buttonClickSound: () => { + o.EventHandler.instance.fireEvent(o.EventID.PlaySFX, a.SoundID.ButtonClick); + }, + startGamePlay: d, + pauseGamePlay: () => o.EventHandler.instance.fireEvent(o.EventID.OnPauseGame), + resumeGamePlay: () => o.EventHandler.instance.fireEvent(o.EventID.OnResumeGame, !0), + continueGamePlay: () => { + 0 == t && + ((t = !0), + s.GameConfig.HAS_AD_BLOCKER + ? (o.EventHandler.instance.fireEvent(o.EventID.OnContinueGame, !1), m(!1), (t = !1)) + : (_( + () => { + c.GameController.instance.checkGameAfterAd({ eventId: o.EventID.OnContinueGame }), m(!0), (t = !1); + }, + () => { + h((e) => ((e.showContinuePlayButton = !1), e)), (t = !1); + } + ), + h((e) => ((e.adsShownCount += 1), e)))); + }, + restartGamePlay: () => { + (c.GameController.instance.isRestarting = !0), o.EventHandler.instance.fireEvent(o.EventID.OnResetGame), d(), (c.GameController.instance.isRestarting = !1); + }, + goHome: (e = !1) => { + e && o.EventHandler.instance.fireEvent(o.EventID.OnResetGame), h((e) => p(!0, e)), o.EventHandler.instance.fireEvent(o.EventID.OnResetCurrentGameData); + }, + toggleDebugPanel: () => { + h((e) => { + const t = p(e.debugPanelVisible, e); + return Object.assign(Object.assign({}, t), { debugPanelVisible: !e.debugPanelVisible }); + }); + }, + toggleChallengesPanel: () => { + h((e) => { + const t = p(e.challengesPanelVisible, e); + return Object.assign(Object.assign({}, t), { challengesPanelVisible: !e.challengesPanelVisible }); + }); + }, + toggleAbilitiesPanel: () => { + h((e) => { + const t = p(e.abilitiesPanelVisible, e); + return Object.assign(Object.assign({}, t), { abilitiesPanelVisible: !e.abilitiesPanelVisible }); + }); + }, + toggleStatsPanel: () => { + h((e) => { + const t = p(e.statsPanelVisible, e); + return Object.assign(Object.assign({}, t), { statsPanelVisible: !e.statsPanelVisible }); + }); + }, + toggleSettingsPanel: () => { + h((e) => { + const t = p(e.settingsPanelVisible, e); + return Object.assign(Object.assign({}, t), { settingsPanelVisible: !e.settingsPanelVisible }); + }); + }, + toggleCustomDialog: f, + playRewardedAd: (e) => { + s.GameConfig.HAS_AD_BLOCKER + ? (h((e) => ((e.showRewardedAdButton = !1), e)), null != e && e()) + : _( + () => { + o.EventHandler.instance.fireEvent(o.EventID.OnRewardCoins, s.GameConfig.COIN_REWARDS_FROM_AD), null != e && e(); + }, + () => { + h((e) => ((e.showRewardedAdButton = !1), e)), null != e && e(); + } + ); + }, + } + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "c", function () { + return d; + }), + n.d(t, "b", function () { + return i; + }), + n.d(t, "a", function () { + return p; + }); + var i, + r = n(12), + o = n(6), + a = n(118), + s = n(18), + c = n(14), + l = n(25), + u = n(10), + h = n(103), + d = (function () { + function e(e, t, n) { + (this.lengthComputable = e), (this.loaded = t), (this.total = n); + } + return ( + (e.FromProgressEvent = function (t) { + return new e(t.lengthComputable, t.loaded, t.total); + }), + e + ); + })(); + !(function (e) { + (e[(e.Clean = 0)] = "Clean"), (e[(e.Stop = 1)] = "Stop"), (e[(e.Sync = 2)] = "Sync"), (e[(e.NoSync = 3)] = "NoSync"); + })(i || (i = {})); + var p = (function () { + function e() {} + return ( + Object.defineProperty(e, "ForceFullSceneLoadingForIncremental", { + get: function () { + return h.a.ForceFullSceneLoadingForIncremental; + }, + set: function (e) { + h.a.ForceFullSceneLoadingForIncremental = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ShowLoadingScreen", { + get: function () { + return h.a.ShowLoadingScreen; + }, + set: function (e) { + h.a.ShowLoadingScreen = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "loggingLevel", { + get: function () { + return h.a.loggingLevel; + }, + set: function (e) { + h.a.loggingLevel = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "CleanBoneMatrixWeights", { + get: function () { + return h.a.CleanBoneMatrixWeights; + }, + set: function (e) { + h.a.CleanBoneMatrixWeights = e; + }, + enumerable: !0, + configurable: !0, + }), + (e._getDefaultPlugin = function () { + return e._registeredPlugins[".babylon"]; + }), + (e._getPluginForExtension = function (t) { + var n = e._registeredPlugins[t]; + return ( + n || + (u.a.Warn("Unable to find a plugin to load " + t + " files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: http://doc.babylonjs.com/how_to/load_from_any_file_type"), + e._getDefaultPlugin()) + ); + }), + (e._getPluginForDirectLoad = function (t) { + for (var n in e._registeredPlugins) { + var i = e._registeredPlugins[n].plugin; + if (i.canDirectLoad && i.canDirectLoad(t)) return e._registeredPlugins[n]; + } + return e._getDefaultPlugin(); + }), + (e._getPluginForFilename = function (t) { + var n = t.indexOf("?"); + -1 !== n && (t = t.substring(0, n)); + var i = t.lastIndexOf("."), + r = t.substring(i, t.length).toLowerCase(); + return e._getPluginForExtension(r); + }), + (e._getDirectLoad = function (e) { + return "data:" === e.substr(0, 5) ? e.substr(5) : null; + }), + (e._loadData = function (t, n, i, r, o, s, l) { + var u, + h = e._getDirectLoad(t.name), + p = l ? e._getPluginForExtension(l) : h ? e._getPluginForDirectLoad(t.name) : e._getPluginForFilename(t.name); + if (!(u = p.plugin.createPlugin ? p.plugin.createPlugin() : p.plugin)) + throw "The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before."; + if ((e.OnPluginActivatedObservable.notifyObservers(u), h)) return i(u, u.directLoad ? u.directLoad(n, h) : h), u; + var f = p.isBinary, + m = function (e, t) { + n.isDisposed ? o("Scene has been disposed") : i(u, e, t); + }, + g = null, + b = !1, + _ = u.onDisposeObservable; + _ && + _.add(function () { + (b = !0), g && (g.abort(), (g = null)), s(); + }); + var v = r + ? function (e) { + r(d.FromProgressEvent(e)); + } + : void 0, + y = function () { + if (!b) { + var e = function (e, t) { + m(e, t ? t.responseURL : void 0); + }, + i = function (e) { + o(e.message, e); + }; + g = u.requestFile ? u.requestFile(n, t.url, e, v, f, i) : n._requestFile(t.url, e, v, !0, f, i); + } + }, + C = t.file || a.a.FilesToLoad[t.name.toLowerCase()]; + if (-1 === t.rootUrl.indexOf("file:") || (-1 !== t.rootUrl.indexOf("file:") && !C)) { + var P = n.getEngine(), + x = P.enableOfflineSupport; + if (x) { + for (var T = !1, S = 0, O = n.disableOfflineSupportExceptionRules; S < O.length; S++) { + if (O[S].test(t.url)) { + T = !0; + break; + } + } + x = !T; + } + x && c.a.OfflineProviderFactory ? (n.offlineProvider = c.a.OfflineProviderFactory(t.url, y, P.disableManifestCheck)) : y(); + } else if (C) { + var E = function (e) { + o(e.message, e); + }; + g = u.readFile ? u.readFile(n, C, m, v, f, E) : n._readFile(C, m, v, f, E); + } else o("Unable to find file named " + t.name); + return u; + }), + (e._getFileInfo = function (e, t) { + var n, + i, + o = null; + if (t) + if (t.name) { + var a = t; + (n = e + a.name), (i = a.name), (o = a); + } else { + var s = t; + if ("/" === s.substr(0, 1)) return r.b.Error("Wrong sceneFilename parameter"), null; + (n = e + s), (i = s); + } + else (n = e), (i = r.b.GetFilename(e)), (e = r.b.GetFolderPath(e)); + return { url: n, rootUrl: e, name: i, file: o }; + }), + (e.GetPluginForExtension = function (t) { + return e._getPluginForExtension(t).plugin; + }), + (e.IsPluginForExtensionAvailable = function (t) { + return !!e._registeredPlugins[t]; + }), + (e.RegisterPlugin = function (t) { + if ("string" == typeof t.extensions) { + var n = t.extensions; + e._registeredPlugins[n.toLowerCase()] = { plugin: t, isBinary: !1 }; + } else { + var i = t.extensions; + Object.keys(i).forEach(function (n) { + e._registeredPlugins[n.toLowerCase()] = { plugin: t, isBinary: i[n].isBinary }; + }); + } + }), + (e.ImportMesh = function (t, n, i, r, o, a, s, c) { + if ((void 0 === i && (i = ""), void 0 === r && (r = l.a.LastCreatedScene), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === s && (s = null), void 0 === c && (c = null), !r)) + return u.a.Error("No scene available to import mesh to"), null; + var h = e._getFileInfo(n, i); + if (!h) return null; + var d = {}; + r._addPendingData(d); + var p = function () { + r._removePendingData(d); + }, + f = function (e, t) { + var n = "Unable to import meshes from " + h.url + ": " + e; + s ? s(r, n, t) : u.a.Error(n), p(); + }, + m = a + ? function (e) { + try { + a(e); + } catch (e) { + f("Error in onProgress callback: " + e, e); + } + } + : void 0, + g = function (e, t, n, i) { + if ((r.importedMeshesFiles.push(h.url), o)) + try { + o(e, t, n, i); + } catch (e) { + f("Error in onSuccess callback: " + e, e); + } + r._removePendingData(d); + }; + return e._loadData( + h, + r, + function (e, n, i) { + if ((e.rewriteRootURL && (h.rootUrl = e.rewriteRootURL(h.rootUrl, i)), e.importMesh)) { + var o = e, + a = new Array(), + s = new Array(), + c = new Array(); + if (!o.importMesh(t, r, n, h.rootUrl, a, s, c, f)) return; + (r.loadingPluginName = e.name), g(a, s, c, []); + } else { + e.importMeshAsync(t, r, n, h.rootUrl, m, h.name) + .then(function (t) { + (r.loadingPluginName = e.name), g(t.meshes, t.particleSystems, t.skeletons, t.animationGroups); + }) + .catch(function (e) { + f(e.message, e); + }); + } + }, + m, + f, + p, + c + ); + }), + (e.ImportMeshAsync = function (t, n, i, r, o, a) { + return ( + void 0 === i && (i = ""), + void 0 === r && (r = l.a.LastCreatedScene), + void 0 === o && (o = null), + void 0 === a && (a = null), + new Promise(function (s, c) { + e.ImportMesh( + t, + n, + i, + r, + function (e, t, n, i) { + s({ meshes: e, particleSystems: t, skeletons: n, animationGroups: i }); + }, + o, + function (e, t, n) { + c(n || new Error(t)); + }, + a + ); + }) + ); + }), + (e.Load = function (t, n, i, o, a, c, u) { + return ( + void 0 === n && (n = ""), + void 0 === i && (i = l.a.LastCreatedEngine), + void 0 === o && (o = null), + void 0 === a && (a = null), + void 0 === c && (c = null), + void 0 === u && (u = null), + i ? e.Append(t, n, new s.a(i), o, a, c, u) : (r.b.Error("No engine available"), null) + ); + }), + (e.LoadAsync = function (t, n, i, r, o) { + return ( + void 0 === n && (n = ""), + void 0 === i && (i = l.a.LastCreatedEngine), + void 0 === r && (r = null), + void 0 === o && (o = null), + new Promise(function (a, s) { + e.Load( + t, + n, + i, + function (e) { + a(e); + }, + r, + function (e, t, n) { + s(n || new Error(t)); + }, + o + ); + }) + ); + }), + (e.Append = function (t, n, i, r, o, a, s) { + if ((void 0 === n && (n = ""), void 0 === i && (i = l.a.LastCreatedScene), void 0 === r && (r = null), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === s && (s = null), !i)) + return u.a.Error("No scene available to append to"), null; + var c = e._getFileInfo(t, n); + if (!c) return null; + e.ShowLoadingScreen && i.getEngine().displayLoadingUI(); + var h = {}; + i._addPendingData(h); + var d = function () { + i._removePendingData(h), i.getEngine().hideLoadingUI(); + }, + p = function (e, t) { + var n = "Unable to load from " + c.url + (e ? ": " + e : ""); + a ? a(i, n, t) : u.a.Error(n), d(); + }, + f = o + ? function (e) { + try { + o(e); + } catch (e) { + p("Error in onProgress callback", e); + } + } + : void 0, + m = function () { + if (r) + try { + r(i); + } catch (e) { + p("Error in onSuccess callback", e); + } + i._removePendingData(h); + }; + return e._loadData( + c, + i, + function (t, n) { + if (t.load) { + if (!t.load(i, n, c.rootUrl, p)) return; + (i.loadingPluginName = t.name), m(); + } else { + t.loadAsync(i, n, c.rootUrl, f, c.name) + .then(function () { + (i.loadingPluginName = t.name), m(); + }) + .catch(function (e) { + p(e.message, e); + }); + } + e.ShowLoadingScreen && + i.executeWhenReady(function () { + i.getEngine().hideLoadingUI(); + }); + }, + f, + p, + d, + s + ); + }), + (e.AppendAsync = function (t, n, i, r, o) { + return ( + void 0 === n && (n = ""), + void 0 === i && (i = l.a.LastCreatedScene), + void 0 === r && (r = null), + void 0 === o && (o = null), + new Promise(function (a, s) { + e.Append( + t, + n, + i, + function (e) { + a(e); + }, + r, + function (e, t, n) { + s(n || new Error(t)); + }, + o + ); + }) + ); + }), + (e.LoadAssetContainer = function (t, n, i, r, o, a, s) { + if ((void 0 === n && (n = ""), void 0 === i && (i = l.a.LastCreatedScene), void 0 === r && (r = null), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === s && (s = null), !i)) + return u.a.Error("No scene available to load asset container to"), null; + var c = e._getFileInfo(t, n); + if (!c) return null; + var h = {}; + i._addPendingData(h); + var d = function () { + i._removePendingData(h); + }, + p = function (e, t) { + var n = "Unable to load assets from " + c.url + (e ? ": " + e : ""); + t && t.message && (n += " (" + t.message + ")"), a ? a(i, n, t) : u.a.Error(n), d(); + }, + f = o + ? function (e) { + try { + o(e); + } catch (e) { + p("Error in onProgress callback", e); + } + } + : void 0, + m = function (e) { + if (r) + try { + r(e); + } catch (e) { + p("Error in onSuccess callback", e); + } + i._removePendingData(h); + }; + return e._loadData( + c, + i, + function (t, n) { + if (t.loadAssetContainer) { + var r = t.loadAssetContainer(i, n, c.rootUrl, p); + if (!r) return; + (i.loadingPluginName = t.name), m(r); + } else if (t.loadAssetContainerAsync) { + t.loadAssetContainerAsync(i, n, c.rootUrl, f, c.name) + .then(function (e) { + (i.loadingPluginName = t.name), m(e); + }) + .catch(function (e) { + p(e.message, e); + }); + } else p("LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method."); + e.ShowLoadingScreen && + i.executeWhenReady(function () { + i.getEngine().hideLoadingUI(); + }); + }, + f, + p, + d, + s + ); + }), + (e.LoadAssetContainerAsync = function (t, n, i, r, o) { + return ( + void 0 === n && (n = ""), + void 0 === i && (i = l.a.LastCreatedScene), + void 0 === r && (r = null), + void 0 === o && (o = null), + new Promise(function (a, s) { + e.LoadAssetContainer( + t, + n, + i, + function (e) { + a(e); + }, + r, + function (e, t, n) { + s(n || new Error(t)); + }, + o + ); + }) + ); + }), + (e.ImportAnimations = function (e, t, n, r, o, a, s, c, h) { + if ( + (void 0 === t && (t = ""), + void 0 === n && (n = l.a.LastCreatedScene), + void 0 === r && (r = !0), + void 0 === o && (o = i.Clean), + void 0 === a && (a = null), + void 0 === s && (s = null), + void 0 === c && (c = null), + void 0 === h && (h = null), + n) + ) { + if (r) { + for (var d = 0, p = n.animatables; d < p.length; d++) { + p[d].reset(); + } + n.stopAllAnimations(), + n.animationGroups.slice().forEach(function (e) { + e.dispose(); + }), + n.getNodes().forEach(function (e) { + e.animations && (e.animations = []); + }); + } else + switch (o) { + case i.Clean: + n.animationGroups.slice().forEach(function (e) { + e.dispose(); + }); + break; + case i.Stop: + n.animationGroups.forEach(function (e) { + e.stop(); + }); + break; + case i.Sync: + n.animationGroups.forEach(function (e) { + e.reset(), e.restart(); + }); + break; + case i.NoSync: + break; + default: + return void u.a.Error("Unknown animation group loading mode value '" + o + "'"); + } + var f = n.animatables.length; + this.LoadAssetContainer( + e, + t, + n, + function (e) { + e.mergeAnimationsTo(n, n.animatables.slice(f), a), e.dispose(), n.onAnimationFileImportedObservable.notifyObservers(n), s && s(n); + }, + c, + h + ); + } else u.a.Error("No scene available to load animations to"); + }), + (e.ImportAnimationsAsync = function (t, n, r, o, a, s, c, u, h) { + return ( + void 0 === n && (n = ""), + void 0 === r && (r = l.a.LastCreatedScene), + void 0 === o && (o = !0), + void 0 === a && (a = i.Clean), + void 0 === s && (s = null), + void 0 === c && (c = null), + void 0 === u && (u = null), + void 0 === h && (h = null), + new Promise(function (i, c) { + e.ImportAnimations( + t, + n, + r, + o, + a, + s, + function (e) { + i(e); + }, + u, + function (e, t, n) { + c(n || new Error(t)); + } + ); + }) + ); + }), + (e.NO_LOGGING = 0), + (e.MINIMAL_LOGGING = 1), + (e.SUMMARY_LOGGING = 2), + (e.DETAILED_LOGGING = 3), + (e.OnPluginActivatedObservable = new o.c()), + (e._registeredPlugins = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return _; + }); + var i = n(25), + r = n(7), + o = n(22), + a = n(6), + s = n(182), + c = n(183), + l = n(184), + u = n(32), + h = n(10), + d = n(56), + p = n(157), + f = n(126), + m = n(185), + g = n(112), + b = function () {}, + _ = (function () { + function e(t, n, i, r) { + var o = this; + void 0 === r && (r = !1), + (this.forcePOTTextures = !1), + (this.isFullscreen = !1), + (this.cullBackFaces = !0), + (this.renderEvenInBackground = !0), + (this.preventCacheWipeBetweenFrames = !1), + (this.validateShaderPrograms = !1), + (this.useReverseDepthBuffer = !1), + (this.disableUniformBuffers = !1), + (this._uniformBuffers = new Array()), + (this._webGLVersion = 1), + (this._windowIsBackground = !1), + (this._highPrecisionShadersAllowed = !0), + (this._badOS = !1), + (this._badDesktopOS = !1), + (this._renderingQueueLaunched = !1), + (this._activeRenderLoops = new Array()), + (this.onContextLostObservable = new a.c()), + (this.onContextRestoredObservable = new a.c()), + (this._contextWasLost = !1), + (this._doNotHandleContextLost = !1), + (this.disableVertexArrayObjects = !1), + (this._colorWrite = !0), + (this._colorWriteChanged = !0), + (this._depthCullingState = new s.a()), + (this._stencilState = new c.a()), + (this._alphaState = new l.a()), + (this._alphaMode = 1), + (this._alphaEquation = 0), + (this._internalTexturesCache = new Array()), + (this._activeChannel = 0), + (this._currentTextureChannel = -1), + (this._boundTexturesCache = {}), + (this._compiledEffects = {}), + (this._vertexAttribArraysEnabled = []), + (this._uintIndicesCurrentlySet = !1), + (this._currentBoundBuffer = new Array()), + (this._currentFramebuffer = null), + (this._currentBufferPointers = new Array()), + (this._currentInstanceLocations = new Array()), + (this._currentInstanceBuffers = new Array()), + (this._vaoRecordInProgress = !1), + (this._mustWipeVertexAttributes = !1), + (this._nextFreeTextureSlots = new Array()), + (this._maxSimultaneousTextures = 0), + (this._activeRequests = new Array()), + (this._texturesSupported = new Array()), + (this.premultipliedAlpha = !0), + (this.onBeforeTextureInitObservable = new a.c()), + (this._viewportCached = { x: 0, y: 0, z: 0, w: 0 }), + (this._unpackFlipYCached = null), + (this.enableUnpackFlipYCached = !0), + (this._getDepthStencilBuffer = function (e, t, n, i, r, a) { + var s = o._gl, + c = s.createRenderbuffer(); + return ( + s.bindRenderbuffer(s.RENDERBUFFER, c), + n > 1 && s.renderbufferStorageMultisample ? s.renderbufferStorageMultisample(s.RENDERBUFFER, n, r, e, t) : s.renderbufferStorage(s.RENDERBUFFER, i, e, t), + s.framebufferRenderbuffer(s.FRAMEBUFFER, a, s.RENDERBUFFER, c), + s.bindRenderbuffer(s.RENDERBUFFER, null), + c + ); + }), + (this._boundUniforms = {}); + var u = null; + if (t) { + if (((i = i || {}), t.getContext)) { + if ( + ((u = t), + (this._renderingCanvas = u), + null != n && (i.antialias = n), + void 0 === i.deterministicLockstep && (i.deterministicLockstep = !1), + void 0 === i.lockstepMaxSteps && (i.lockstepMaxSteps = 4), + void 0 === i.timeStep && (i.timeStep = 1 / 60), + void 0 === i.preserveDrawingBuffer && (i.preserveDrawingBuffer = !1), + void 0 === i.audioEngine && (i.audioEngine = !0), + void 0 === i.stencil && (i.stencil = !0), + !1 === i.premultipliedAlpha && (this.premultipliedAlpha = !1), + (this._doNotHandleContextLost = !!i.doNotHandleContextLost), + navigator && navigator.userAgent) + ) + for (var f = navigator.userAgent, m = 0, g = e.ExceptionList; m < g.length; m++) { + var _ = g[m], + v = _.key, + y = _.targets; + if (new RegExp(v).test(f)) { + if (_.capture && _.captureConstraint) { + var C = _.capture, + P = _.captureConstraint, + x = new RegExp(C).exec(f); + if (x && x.length > 0) if (parseInt(x[x.length - 1]) >= P) continue; + } + for (var T = 0, S = y; T < S.length; T++) { + switch (S[T]) { + case "uniformBuffer": + this.disableUniformBuffers = !0; + break; + case "vao": + this.disableVertexArrayObjects = !0; + } + } + } + } + if ( + (this._doNotHandleContextLost || + ((this._onContextLost = function (e) { + e.preventDefault(), (o._contextWasLost = !0), h.a.Warn("WebGL context lost."), o.onContextLostObservable.notifyObservers(o); + }), + (this._onContextRestored = function () { + setTimeout(function () { + o._initGLContext(), + o._rebuildEffects(), + o._rebuildInternalTextures(), + o._rebuildBuffers(), + o.wipeCaches(!0), + h.a.Warn("WebGL context successfully restored."), + o.onContextRestoredObservable.notifyObservers(o), + (o._contextWasLost = !1); + }, 0); + }), + u.addEventListener("webglcontextlost", this._onContextLost, !1), + u.addEventListener("webglcontextrestored", this._onContextRestored, !1), + (i.powerPreference = "high-performance")), + !i.disableWebGL2Support) + ) + try { + (this._gl = u.getContext("webgl2", i) || u.getContext("experimental-webgl2", i)), this._gl && ((this._webGLVersion = 2), this._gl.deleteQuery || (this._webGLVersion = 1)); + } catch (e) {} + if (!this._gl) { + if (!u) throw new Error("The provided canvas is null or undefined."); + try { + this._gl = u.getContext("webgl", i) || u.getContext("experimental-webgl", i); + } catch (e) { + throw new Error("WebGL not supported"); + } + } + if (!this._gl) throw new Error("WebGL not supported"); + } else { + (this._gl = t), (this._renderingCanvas = this._gl.canvas), this._gl.renderbufferStorageMultisample && (this._webGLVersion = 2); + var O = this._gl.getContextAttributes(); + O && (i.stencil = O.stencil); + } + this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE), void 0 !== i.useHighPrecisionFloats && (this._highPrecisionShadersAllowed = i.useHighPrecisionFloats); + var E = (d.a.IsWindowObjectExist() && window.devicePixelRatio) || 1, + M = i.limitDeviceRatio || E; + (this._hardwareScalingLevel = r ? 1 / Math.min(M, E) : 1), this.resize(), (this._isStencilEnable = !!i.stencil), this._initGLContext(); + for (var A = 0; A < this._caps.maxVertexAttribs; A++) this._currentBufferPointers[A] = new b(); + this.webGLVersion > 1 && (this._shaderProcessor = new p.a()), + (this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent)), + (this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), + (this._creationOptions = i); + } + } + return ( + Object.defineProperty(e, "NpmPackage", { + get: function () { + return "babylonjs@4.1.0"; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "Version", { + get: function () { + return "4.1.0"; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "description", { + get: function () { + var e = "WebGL" + this.webGLVersion; + return this._caps.parallelShaderCompile && (e += " - Parallel shader compilation"), e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ShadersRepository", { + get: function () { + return r.a.ShadersRepository; + }, + set: function (e) { + r.a.ShadersRepository = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "supportsUniformBuffers", { + get: function () { + return this.webGLVersion > 1 && !this.disableUniformBuffers; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "_shouldUseHighPrecisionShader", { + get: function () { + return !(!this._caps.highPrecisionShaderSupported || !this._highPrecisionShadersAllowed); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "needPOTTextures", { + get: function () { + return this._webGLVersion < 2 || this.forcePOTTextures; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "doNotHandleContextLost", { + get: function () { + return this._doNotHandleContextLost; + }, + set: function (e) { + this._doNotHandleContextLost = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "_supportsHardwareTextureRescaling", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "framebufferDimensionsObject", { + set: function (e) { + this._framebufferDimensionsObject = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "texturesSupported", { + get: function () { + return this._texturesSupported; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "textureFormatInUse", { + get: function () { + return this._textureFormatInUse; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "currentViewport", { + get: function () { + return this._cachedViewport; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "emptyTexture", { + get: function () { + return this._emptyTexture || (this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, 5, !1, !1, 1)), this._emptyTexture; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "emptyTexture3D", { + get: function () { + return this._emptyTexture3D || (this._emptyTexture3D = this.createRawTexture3D(new Uint8Array(4), 1, 1, 1, 5, !1, !1, 1)), this._emptyTexture3D; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "emptyTexture2DArray", { + get: function () { + return this._emptyTexture2DArray || (this._emptyTexture2DArray = this.createRawTexture2DArray(new Uint8Array(4), 1, 1, 1, 5, !1, !1, 1)), this._emptyTexture2DArray; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "emptyCubeTexture", { + get: function () { + if (!this._emptyCubeTexture) { + var e = new Uint8Array(4), + t = [e, e, e, e, e, e]; + this._emptyCubeTexture = this.createRawCubeTexture(t, 1, 5, 0, !1, !1, 1); + } + return this._emptyCubeTexture; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._rebuildInternalTextures = function () { + for (var e = 0, t = this._internalTexturesCache.slice(); e < t.length; e++) { + t[e]._rebuild(); + } + }), + (e.prototype._rebuildEffects = function () { + for (var e in this._compiledEffects) { + this._compiledEffects[e]._prepareEffect(); + } + r.a.ResetCache(); + }), + (e.prototype.areAllEffectsReady = function () { + for (var e in this._compiledEffects) { + if (!this._compiledEffects[e].isReady()) return !1; + } + return !0; + }), + (e.prototype._rebuildBuffers = function () { + for (var e = 0, t = this._uniformBuffers; e < t.length; e++) { + t[e]._rebuild(); + } + }), + (e.prototype._initGLContext = function () { + (this._caps = { + maxTexturesImageUnits: this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS), + maxCombinedTexturesImageUnits: this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS), + maxVertexTextureImageUnits: this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS), + maxTextureSize: this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE), + maxSamples: this._webGLVersion > 1 ? this._gl.getParameter(this._gl.MAX_SAMPLES) : 1, + maxCubemapTextureSize: this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE), + maxRenderTextureSize: this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE), + maxVertexAttribs: this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS), + maxVaryingVectors: this._gl.getParameter(this._gl.MAX_VARYING_VECTORS), + maxFragmentUniformVectors: this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS), + maxVertexUniformVectors: this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS), + parallelShaderCompile: this._gl.getExtension("KHR_parallel_shader_compile"), + standardDerivatives: this._webGLVersion > 1 || null !== this._gl.getExtension("OES_standard_derivatives"), + maxAnisotropy: 1, + astc: this._gl.getExtension("WEBGL_compressed_texture_astc") || this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"), + s3tc: this._gl.getExtension("WEBGL_compressed_texture_s3tc") || this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"), + pvrtc: this._gl.getExtension("WEBGL_compressed_texture_pvrtc") || this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"), + etc1: this._gl.getExtension("WEBGL_compressed_texture_etc1") || this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"), + etc2: this._gl.getExtension("WEBGL_compressed_texture_etc") || this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc") || this._gl.getExtension("WEBGL_compressed_texture_es3_0"), + textureAnisotropicFilterExtension: + this._gl.getExtension("EXT_texture_filter_anisotropic") || this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"), + uintIndices: this._webGLVersion > 1 || null !== this._gl.getExtension("OES_element_index_uint"), + fragmentDepthSupported: this._webGLVersion > 1 || null !== this._gl.getExtension("EXT_frag_depth"), + highPrecisionShaderSupported: !1, + timerQuery: this._gl.getExtension("EXT_disjoint_timer_query_webgl2") || this._gl.getExtension("EXT_disjoint_timer_query"), + canUseTimestampForTimerQuery: !1, + drawBuffersExtension: !1, + maxMSAASamples: 1, + colorBufferFloat: this._webGLVersion > 1 && this._gl.getExtension("EXT_color_buffer_float"), + textureFloat: !!(this._webGLVersion > 1 || this._gl.getExtension("OES_texture_float")), + textureHalfFloat: !!(this._webGLVersion > 1 || this._gl.getExtension("OES_texture_half_float")), + textureHalfFloatRender: !1, + textureFloatLinearFiltering: !1, + textureFloatRender: !1, + textureHalfFloatLinearFiltering: !1, + vertexArrayObject: !1, + instancedArrays: !1, + textureLOD: !!(this._webGLVersion > 1 || this._gl.getExtension("EXT_shader_texture_lod")), + blendMinMax: !1, + multiview: this._gl.getExtension("OVR_multiview2"), + oculusMultiview: this._gl.getExtension("OCULUS_multiview"), + depthTextureExtension: !1, + }), + (this._glVersion = this._gl.getParameter(this._gl.VERSION)); + var e = this._gl.getExtension("WEBGL_debug_renderer_info"); + if ( + (null != e && ((this._glRenderer = this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL)), (this._glVendor = this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL))), + this._glVendor || (this._glVendor = "Unknown vendor"), + this._glRenderer || (this._glRenderer = "Unknown renderer"), + (this._gl.HALF_FLOAT_OES = 36193), + 34842 !== this._gl.RGBA16F && (this._gl.RGBA16F = 34842), + 34836 !== this._gl.RGBA32F && (this._gl.RGBA32F = 34836), + 35056 !== this._gl.DEPTH24_STENCIL8 && (this._gl.DEPTH24_STENCIL8 = 35056), + this._caps.timerQuery && + (1 === this._webGLVersion && (this._gl.getQuery = this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)), + (this._caps.canUseTimestampForTimerQuery = this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT, this._caps.timerQuery.QUERY_COUNTER_BITS_EXT) > 0)), + (this._caps.maxAnisotropy = this._caps.textureAnisotropicFilterExtension ? this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0), + (this._caps.textureFloatLinearFiltering = !(!this._caps.textureFloat || !this._gl.getExtension("OES_texture_float_linear"))), + (this._caps.textureFloatRender = !(!this._caps.textureFloat || !this._canRenderToFloatFramebuffer())), + (this._caps.textureHalfFloatLinearFiltering = !!(this._webGLVersion > 1 || (this._caps.textureHalfFloat && this._gl.getExtension("OES_texture_half_float_linear")))), + this._webGLVersion > 1 && (this._gl.HALF_FLOAT_OES = 5131), + (this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer()), + this._webGLVersion > 1) + ) + (this._caps.drawBuffersExtension = !0), (this._caps.maxMSAASamples = this._gl.getParameter(this._gl.MAX_SAMPLES)); + else { + var t = this._gl.getExtension("WEBGL_draw_buffers"); + if (null !== t) { + (this._caps.drawBuffersExtension = !0), (this._gl.drawBuffers = t.drawBuffersWEBGL.bind(t)), (this._gl.DRAW_FRAMEBUFFER = this._gl.FRAMEBUFFER); + for (var n = 0; n < 16; n++) this._gl["COLOR_ATTACHMENT" + n + "_WEBGL"] = t["COLOR_ATTACHMENT" + n + "_WEBGL"]; + } + } + if (this._webGLVersion > 1) this._caps.depthTextureExtension = !0; + else { + var i = this._gl.getExtension("WEBGL_depth_texture"); + null != i && ((this._caps.depthTextureExtension = !0), (this._gl.UNSIGNED_INT_24_8 = i.UNSIGNED_INT_24_8_WEBGL)); + } + if (this.disableVertexArrayObjects) this._caps.vertexArrayObject = !1; + else if (this._webGLVersion > 1) this._caps.vertexArrayObject = !0; + else { + var r = this._gl.getExtension("OES_vertex_array_object"); + null != r && + ((this._caps.vertexArrayObject = !0), + (this._gl.createVertexArray = r.createVertexArrayOES.bind(r)), + (this._gl.bindVertexArray = r.bindVertexArrayOES.bind(r)), + (this._gl.deleteVertexArray = r.deleteVertexArrayOES.bind(r))); + } + if (this._webGLVersion > 1) this._caps.instancedArrays = !0; + else { + var o = this._gl.getExtension("ANGLE_instanced_arrays"); + null != o + ? ((this._caps.instancedArrays = !0), + (this._gl.drawArraysInstanced = o.drawArraysInstancedANGLE.bind(o)), + (this._gl.drawElementsInstanced = o.drawElementsInstancedANGLE.bind(o)), + (this._gl.vertexAttribDivisor = o.vertexAttribDivisorANGLE.bind(o))) + : (this._caps.instancedArrays = !1); + } + if ( + (this._caps.astc && this.texturesSupported.push("-astc.ktx"), + this._caps.s3tc && this.texturesSupported.push("-dxt.ktx"), + this._caps.pvrtc && this.texturesSupported.push("-pvrtc.ktx"), + this._caps.etc2 && this.texturesSupported.push("-etc2.ktx"), + this._caps.etc1 && this.texturesSupported.push("-etc1.ktx"), + this._gl.getShaderPrecisionFormat) + ) { + var a = this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER, this._gl.HIGH_FLOAT), + s = this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER, this._gl.HIGH_FLOAT); + a && s && (this._caps.highPrecisionShaderSupported = 0 !== a.precision && 0 !== s.precision); + } + if (this._webGLVersion > 1) this._caps.blendMinMax = !0; + else { + var c = this._gl.getExtension("EXT_blend_minmax"); + null != c && ((this._caps.blendMinMax = !0), (this._gl.MAX = c.MAX_EXT), (this._gl.MIN = c.MIN_EXT)); + } + (this._depthCullingState.depthTest = !0), (this._depthCullingState.depthFunc = this._gl.LEQUAL), (this._depthCullingState.depthMask = !0), (this._maxSimultaneousTextures = this._caps.maxCombinedTexturesImageUnits); + for (var l = 0; l < this._maxSimultaneousTextures; l++) this._nextFreeTextureSlots.push(l); + }), + Object.defineProperty(e.prototype, "webGLVersion", { + get: function () { + return this._webGLVersion; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "ThinEngine"; + }), + Object.defineProperty(e.prototype, "isStencilEnable", { + get: function () { + return this._isStencilEnable; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._prepareWorkingCanvas = function () { + if (!this._workingCanvas) { + this._workingCanvas = g.a.CreateCanvas(1, 1); + var e = this._workingCanvas.getContext("2d"); + e && (this._workingContext = e); + } + }), + (e.prototype.resetTextureCache = function () { + for (var e in this._boundTexturesCache) this._boundTexturesCache.hasOwnProperty(e) && (this._boundTexturesCache[e] = null); + this._currentTextureChannel = -1; + }), + (e.prototype.getGlInfo = function () { + return { vendor: this._glVendor, renderer: this._glRenderer, version: this._glVersion }; + }), + (e.prototype.setHardwareScalingLevel = function (e) { + (this._hardwareScalingLevel = e), this.resize(); + }), + (e.prototype.getHardwareScalingLevel = function () { + return this._hardwareScalingLevel; + }), + (e.prototype.getLoadedTexturesCache = function () { + return this._internalTexturesCache; + }), + (e.prototype.getCaps = function () { + return this._caps; + }), + (e.prototype.stopRenderLoop = function (e) { + if (e) { + var t = this._activeRenderLoops.indexOf(e); + t >= 0 && this._activeRenderLoops.splice(t, 1); + } else this._activeRenderLoops = []; + }), + (e.prototype._renderLoop = function () { + if (!this._contextWasLost) { + var e = !0; + if ((!this.renderEvenInBackground && this._windowIsBackground && (e = !1), e)) { + this.beginFrame(); + for (var t = 0; t < this._activeRenderLoops.length; t++) { + (0, this._activeRenderLoops[t])(); + } + this.endFrame(); + } + } + this._activeRenderLoops.length > 0 ? (this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow())) : (this._renderingQueueLaunched = !1); + }), + (e.prototype.getRenderingCanvas = function () { + return this._renderingCanvas; + }), + (e.prototype.getHostWindow = function () { + return d.a.IsWindowObjectExist() ? (this._renderingCanvas && this._renderingCanvas.ownerDocument && this._renderingCanvas.ownerDocument.defaultView ? this._renderingCanvas.ownerDocument.defaultView : window) : null; + }), + (e.prototype.getRenderWidth = function (e) { + return ( + void 0 === e && (e = !1), !e && this._currentRenderTarget ? this._currentRenderTarget.width : this._framebufferDimensionsObject ? this._framebufferDimensionsObject.framebufferWidth : this._gl.drawingBufferWidth + ); + }), + (e.prototype.getRenderHeight = function (e) { + return ( + void 0 === e && (e = !1), + !e && this._currentRenderTarget ? this._currentRenderTarget.height : this._framebufferDimensionsObject ? this._framebufferDimensionsObject.framebufferHeight : this._gl.drawingBufferHeight + ); + }), + (e.prototype._queueNewFrame = function (t, n) { + return e.QueueNewFrame(t, n); + }), + (e.prototype.runRenderLoop = function (e) { + -1 === this._activeRenderLoops.indexOf(e) && + (this._activeRenderLoops.push(e), + this._renderingQueueLaunched || + ((this._renderingQueueLaunched = !0), (this._boundRenderFunction = this._renderLoop.bind(this)), (this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow())))); + }), + (e.prototype.clear = function (e, t, n, i) { + void 0 === i && (i = !1), this.applyStates(); + var r = 0; + t && e && (this._gl.clearColor(e.r, e.g, e.b, void 0 !== e.a ? e.a : 1), (r |= this._gl.COLOR_BUFFER_BIT)), + n && (this.useReverseDepthBuffer ? ((this._depthCullingState.depthFunc = this._gl.GREATER), this._gl.clearDepth(0)) : this._gl.clearDepth(1), (r |= this._gl.DEPTH_BUFFER_BIT)), + i && (this._gl.clearStencil(0), (r |= this._gl.STENCIL_BUFFER_BIT)), + this._gl.clear(r); + }), + (e.prototype._viewport = function (e, t, n, i) { + (e === this._viewportCached.x && t === this._viewportCached.y && n === this._viewportCached.z && i === this._viewportCached.w) || + ((this._viewportCached.x = e), (this._viewportCached.y = t), (this._viewportCached.z = n), (this._viewportCached.w = i), this._gl.viewport(e, t, n, i)); + }), + (e.prototype.setViewport = function (e, t, n) { + var i = t || this.getRenderWidth(), + r = n || this.getRenderHeight(), + o = e.x || 0, + a = e.y || 0; + (this._cachedViewport = e), this._viewport(o * i, a * r, i * e.width, r * e.height); + }), + (e.prototype.beginFrame = function () {}), + (e.prototype.endFrame = function () { + this._badOS && this.flushFramebuffer(); + }), + (e.prototype.resize = function () { + var e, t; + d.a.IsWindowObjectExist() + ? ((e = this._renderingCanvas ? this._renderingCanvas.clientWidth : window.innerWidth), (t = this._renderingCanvas ? this._renderingCanvas.clientHeight : window.innerHeight)) + : ((e = this._renderingCanvas ? this._renderingCanvas.width : 100), (t = this._renderingCanvas ? this._renderingCanvas.height : 100)), + this.setSize(e / this._hardwareScalingLevel, t / this._hardwareScalingLevel); + }), + (e.prototype.setSize = function (e, t) { + this._renderingCanvas && ((e |= 0), (t |= 0), (this._renderingCanvas.width === e && this._renderingCanvas.height === t) || ((this._renderingCanvas.width = e), (this._renderingCanvas.height = t))); + }), + (e.prototype.bindFramebuffer = function (e, t, n, i, r, o, a) { + void 0 === t && (t = 0), + void 0 === o && (o = 0), + void 0 === a && (a = 0), + this._currentRenderTarget && this.unBindFramebuffer(this._currentRenderTarget), + (this._currentRenderTarget = e), + this._bindUnboundFramebuffer(e._MSAAFramebuffer ? e._MSAAFramebuffer : e._framebuffer); + var s = this._gl; + e.is2DArray + ? s.framebufferTextureLayer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0, e._webGLTexture, o, a) + : e.isCube && s.framebufferTexture2D(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + t, e._webGLTexture, o); + var c = e._depthStencilTexture; + if (c) { + var l = c._generateStencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT; + e.is2DArray + ? s.framebufferTextureLayer(s.FRAMEBUFFER, l, c._webGLTexture, o, a) + : e.isCube + ? s.framebufferTexture2D(s.FRAMEBUFFER, l, s.TEXTURE_CUBE_MAP_POSITIVE_X + t, c._webGLTexture, o) + : s.framebufferTexture2D(s.FRAMEBUFFER, l, s.TEXTURE_2D, c._webGLTexture, o); + } + this._cachedViewport && !r ? this.setViewport(this._cachedViewport, n, i) : (n || ((n = e.width), o && (n /= Math.pow(2, o))), i || ((i = e.height), o && (i /= Math.pow(2, o))), this._viewport(0, 0, n, i)), + this.wipeCaches(); + }), + (e.prototype._bindUnboundFramebuffer = function (e) { + this._currentFramebuffer !== e && (this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, e), (this._currentFramebuffer = e)); + }), + (e.prototype.unBindFramebuffer = function (e, t, n) { + void 0 === t && (t = !1), (this._currentRenderTarget = null); + var i = this._gl; + e._MSAAFramebuffer && + (i.bindFramebuffer(i.READ_FRAMEBUFFER, e._MSAAFramebuffer), + i.bindFramebuffer(i.DRAW_FRAMEBUFFER, e._framebuffer), + i.blitFramebuffer(0, 0, e.width, e.height, 0, 0, e.width, e.height, i.COLOR_BUFFER_BIT, i.NEAREST)), + !e.generateMipMaps || t || e.isCube || (this._bindTextureDirectly(i.TEXTURE_2D, e, !0), i.generateMipmap(i.TEXTURE_2D), this._bindTextureDirectly(i.TEXTURE_2D, null)), + n && (e._MSAAFramebuffer && this._bindUnboundFramebuffer(e._framebuffer), n()), + this._bindUnboundFramebuffer(null); + }), + (e.prototype.flushFramebuffer = function () { + this._gl.flush(); + }), + (e.prototype.restoreDefaultFramebuffer = function () { + this._currentRenderTarget ? this.unBindFramebuffer(this._currentRenderTarget) : this._bindUnboundFramebuffer(null), this._cachedViewport && this.setViewport(this._cachedViewport), this.wipeCaches(); + }), + (e.prototype._resetVertexBufferBinding = function () { + this.bindArrayBuffer(null), (this._cachedVertexBuffers = null); + }), + (e.prototype.createVertexBuffer = function (e) { + return this._createVertexBuffer(e, this._gl.STATIC_DRAW); + }), + (e.prototype._createVertexBuffer = function (e, t) { + var n = this._gl.createBuffer(); + if (!n) throw new Error("Unable to create vertex buffer"); + var i = new f.a(n); + return ( + this.bindArrayBuffer(i), + e instanceof Array ? this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(e), this._gl.STATIC_DRAW) : this._gl.bufferData(this._gl.ARRAY_BUFFER, e, this._gl.STATIC_DRAW), + this._resetVertexBufferBinding(), + (i.references = 1), + i + ); + }), + (e.prototype.createDynamicVertexBuffer = function (e) { + return this._createVertexBuffer(e, this._gl.DYNAMIC_DRAW); + }), + (e.prototype._resetIndexBufferBinding = function () { + this.bindIndexBuffer(null), (this._cachedIndexBuffer = null); + }), + (e.prototype.createIndexBuffer = function (e, t) { + var n = this._gl.createBuffer(), + i = new f.a(n); + if (!n) throw new Error("Unable to create index buffer"); + this.bindIndexBuffer(i); + var r = this._normalizeIndexData(e); + return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, r, t ? this._gl.DYNAMIC_DRAW : this._gl.STATIC_DRAW), this._resetIndexBufferBinding(), (i.references = 1), (i.is32Bits = 4 === r.BYTES_PER_ELEMENT), i; + }), + (e.prototype._normalizeIndexData = function (e) { + if (e instanceof Uint16Array) return e; + if (this._caps.uintIndices) { + if (e instanceof Uint32Array) return e; + for (var t = 0; t < e.length; t++) if (e[t] >= 65535) return new Uint32Array(e); + return new Uint16Array(e); + } + return new Uint16Array(e); + }), + (e.prototype.bindArrayBuffer = function (e) { + this._vaoRecordInProgress || this._unbindVertexArrayObject(), this.bindBuffer(e, this._gl.ARRAY_BUFFER); + }), + (e.prototype.bindUniformBlock = function (e, t, n) { + var i = e.program, + r = this._gl.getUniformBlockIndex(i, t); + this._gl.uniformBlockBinding(i, r, n); + }), + (e.prototype.bindIndexBuffer = function (e) { + this._vaoRecordInProgress || this._unbindVertexArrayObject(), this.bindBuffer(e, this._gl.ELEMENT_ARRAY_BUFFER); + }), + (e.prototype.bindBuffer = function (e, t) { + (this._vaoRecordInProgress || this._currentBoundBuffer[t] !== e) && (this._gl.bindBuffer(t, e ? e.underlyingResource : null), (this._currentBoundBuffer[t] = e)); + }), + (e.prototype.updateArrayBuffer = function (e) { + this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, e); + }), + (e.prototype._vertexAttribPointer = function (e, t, n, i, r, o, a) { + var s = this._currentBufferPointers[t], + c = !1; + s.active + ? (s.buffer !== e && ((s.buffer = e), (c = !0)), + s.size !== n && ((s.size = n), (c = !0)), + s.type !== i && ((s.type = i), (c = !0)), + s.normalized !== r && ((s.normalized = r), (c = !0)), + s.stride !== o && ((s.stride = o), (c = !0)), + s.offset !== a && ((s.offset = a), (c = !0))) + : ((c = !0), (s.active = !0), (s.index = t), (s.size = n), (s.type = i), (s.normalized = r), (s.stride = o), (s.offset = a), (s.buffer = e)), + (c || this._vaoRecordInProgress) && (this.bindArrayBuffer(e), this._gl.vertexAttribPointer(t, n, i, r, o, a)); + }), + (e.prototype._bindIndexBufferWithCache = function (e) { + null != e && this._cachedIndexBuffer !== e && ((this._cachedIndexBuffer = e), this.bindIndexBuffer(e), (this._uintIndicesCurrentlySet = e.is32Bits)); + }), + (e.prototype._bindVertexBuffersAttributes = function (e, t) { + var n = t.getAttributesNames(); + this._vaoRecordInProgress || this._unbindVertexArrayObject(), this.unbindAllAttributes(); + for (var i = 0; i < n.length; i++) { + var r = t.getAttributeLocation(i); + if (r >= 0) { + var o = e[n[i]]; + if (!o) continue; + this._gl.enableVertexAttribArray(r), this._vaoRecordInProgress || (this._vertexAttribArraysEnabled[r] = !0); + var a = o.getBuffer(); + a && + (this._vertexAttribPointer(a, r, o.getSize(), o.type, o.normalized, o.byteStride, o.byteOffset), + o.getIsInstanced() && (this._gl.vertexAttribDivisor(r, o.getInstanceDivisor()), this._vaoRecordInProgress || (this._currentInstanceLocations.push(r), this._currentInstanceBuffers.push(a)))); + } + } + }), + (e.prototype.recordVertexArrayObject = function (e, t, n) { + var i = this._gl.createVertexArray(); + return ( + (this._vaoRecordInProgress = !0), + this._gl.bindVertexArray(i), + (this._mustWipeVertexAttributes = !0), + this._bindVertexBuffersAttributes(e, n), + this.bindIndexBuffer(t), + (this._vaoRecordInProgress = !1), + this._gl.bindVertexArray(null), + i + ); + }), + (e.prototype.bindVertexArrayObject = function (e, t) { + this._cachedVertexArrayObject !== e && + ((this._cachedVertexArrayObject = e), + this._gl.bindVertexArray(e), + (this._cachedVertexBuffers = null), + (this._cachedIndexBuffer = null), + (this._uintIndicesCurrentlySet = null != t && t.is32Bits), + (this._mustWipeVertexAttributes = !0)); + }), + (e.prototype.bindBuffersDirectly = function (e, t, n, i, r) { + if (this._cachedVertexBuffers !== e || this._cachedEffectForVertexBuffers !== r) { + (this._cachedVertexBuffers = e), (this._cachedEffectForVertexBuffers = r); + var o = r.getAttributesCount(); + this._unbindVertexArrayObject(), this.unbindAllAttributes(); + for (var a = 0, s = 0; s < o; s++) + if (s < n.length) { + var c = r.getAttributeLocation(s); + c >= 0 && (this._gl.enableVertexAttribArray(c), (this._vertexAttribArraysEnabled[c] = !0), this._vertexAttribPointer(e, c, n[s], this._gl.FLOAT, !1, i, a)), (a += 4 * n[s]); + } + } + this._bindIndexBufferWithCache(t); + }), + (e.prototype._unbindVertexArrayObject = function () { + this._cachedVertexArrayObject && ((this._cachedVertexArrayObject = null), this._gl.bindVertexArray(null)); + }), + (e.prototype.bindBuffers = function (e, t, n) { + (this._cachedVertexBuffers === e && this._cachedEffectForVertexBuffers === n) || ((this._cachedVertexBuffers = e), (this._cachedEffectForVertexBuffers = n), this._bindVertexBuffersAttributes(e, n)), + this._bindIndexBufferWithCache(t); + }), + (e.prototype.unbindInstanceAttributes = function () { + for (var e, t = 0, n = this._currentInstanceLocations.length; t < n; t++) { + var i = this._currentInstanceBuffers[t]; + e != i && i.references && ((e = i), this.bindArrayBuffer(i)); + var r = this._currentInstanceLocations[t]; + this._gl.vertexAttribDivisor(r, 0); + } + (this._currentInstanceBuffers.length = 0), (this._currentInstanceLocations.length = 0); + }), + (e.prototype.releaseVertexArrayObject = function (e) { + this._gl.deleteVertexArray(e); + }), + (e.prototype._releaseBuffer = function (e) { + return e.references--, 0 === e.references && (this._deleteBuffer(e), !0); + }), + (e.prototype._deleteBuffer = function (e) { + this._gl.deleteBuffer(e.underlyingResource); + }), + (e.prototype.updateAndBindInstancesBuffer = function (e, t, n) { + if ((this.bindArrayBuffer(e), t && this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, t), void 0 !== n[0].index)) this.bindInstancesBuffer(e, n, !0); + else + for (var i = 0; i < 4; i++) { + var r = n[i]; + this._vertexAttribArraysEnabled[r] || (this._gl.enableVertexAttribArray(r), (this._vertexAttribArraysEnabled[r] = !0)), + this._vertexAttribPointer(e, r, 4, this._gl.FLOAT, !1, 64, 16 * i), + this._gl.vertexAttribDivisor(r, 1), + this._currentInstanceLocations.push(r), + this._currentInstanceBuffers.push(e); + } + }), + (e.prototype.bindInstancesBuffer = function (e, t, n) { + void 0 === n && (n = !0), this.bindArrayBuffer(e); + var i = 0; + if (n) + for (var r = 0; r < t.length; r++) { + i += 4 * (o = t[r]).attributeSize; + } + for (r = 0; r < t.length; r++) { + var o; + void 0 === (o = t[r]).index && (o.index = this._currentEffect.getAttributeLocationByName(o.attributeName)), + this._vertexAttribArraysEnabled[o.index] || (this._gl.enableVertexAttribArray(o.index), (this._vertexAttribArraysEnabled[o.index] = !0)), + this._vertexAttribPointer(e, o.index, o.attributeSize, o.attributeType || this._gl.FLOAT, o.normalized || !1, i, o.offset), + this._gl.vertexAttribDivisor(o.index, void 0 === o.divisor ? 1 : o.divisor), + this._currentInstanceLocations.push(o.index), + this._currentInstanceBuffers.push(e); + } + }), + (e.prototype.disableInstanceAttributeByName = function (e) { + if (this._currentEffect) { + var t = this._currentEffect.getAttributeLocationByName(e); + this.disableInstanceAttribute(t); + } + }), + (e.prototype.disableInstanceAttribute = function (e) { + for (var t, n = !1; -1 !== (t = this._currentInstanceLocations.indexOf(e)); ) + this._currentInstanceLocations.splice(t, 1), this._currentInstanceBuffers.splice(t, 1), (n = !0), (t = this._currentInstanceLocations.indexOf(e)); + n && (this._gl.vertexAttribDivisor(e, 0), this.disableAttributeByIndex(e)); + }), + (e.prototype.disableAttributeByIndex = function (e) { + this._gl.disableVertexAttribArray(e), (this._vertexAttribArraysEnabled[e] = !1), (this._currentBufferPointers[e].active = !1); + }), + (e.prototype.draw = function (e, t, n, i) { + this.drawElementsType(e ? 0 : 1, t, n, i); + }), + (e.prototype.drawPointClouds = function (e, t, n) { + this.drawArraysType(2, e, t, n); + }), + (e.prototype.drawUnIndexed = function (e, t, n, i) { + this.drawArraysType(e ? 0 : 1, t, n, i); + }), + (e.prototype.drawElementsType = function (e, t, n, i) { + this.applyStates(), this._reportDrawCall(); + var r = this._drawMode(e), + o = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT, + a = this._uintIndicesCurrentlySet ? 4 : 2; + i ? this._gl.drawElementsInstanced(r, n, o, t * a, i) : this._gl.drawElements(r, n, o, t * a); + }), + (e.prototype.drawArraysType = function (e, t, n, i) { + this.applyStates(), this._reportDrawCall(); + var r = this._drawMode(e); + i ? this._gl.drawArraysInstanced(r, t, n, i) : this._gl.drawArrays(r, t, n); + }), + (e.prototype._drawMode = function (e) { + switch (e) { + case 0: + return this._gl.TRIANGLES; + case 2: + return this._gl.POINTS; + case 1: + return this._gl.LINES; + case 3: + return this._gl.POINTS; + case 4: + return this._gl.LINES; + case 5: + return this._gl.LINE_LOOP; + case 6: + return this._gl.LINE_STRIP; + case 7: + return this._gl.TRIANGLE_STRIP; + case 8: + return this._gl.TRIANGLE_FAN; + default: + return this._gl.TRIANGLES; + } + }), + (e.prototype._reportDrawCall = function () {}), + (e.prototype._releaseEffect = function (e) { + this._compiledEffects[e._key] && (delete this._compiledEffects[e._key], this._deletePipelineContext(e.getPipelineContext())); + }), + (e.prototype._deletePipelineContext = function (e) { + var t = e; + t && t.program && ((t.program.__SPECTOR_rebuildProgram = null), this._gl.deleteProgram(t.program)); + }), + (e.prototype.createEffect = function (e, t, n, i, o, a, s, c, l) { + var u = (e.vertexElement || e.vertex || e) + "+" + (e.fragmentElement || e.fragment || e) + "@" + (o || t.defines); + if (this._compiledEffects[u]) { + var h = this._compiledEffects[u]; + return s && h.isReady() && s(h), h; + } + var d = new r.a(e, t, n, i, this, o, a, s, c, l); + return (d._key = u), (this._compiledEffects[u] = d), d; + }), + (e._ConcatenateShader = function (e, t, n) { + return void 0 === n && (n = ""), n + (t ? t + "\n" : "") + e; + }), + (e.prototype._compileShader = function (t, n, i, r) { + return this._compileRawShader(e._ConcatenateShader(t, i, r), n); + }), + (e.prototype._compileRawShader = function (e, t) { + var n = this._gl, + i = n.createShader("vertex" === t ? n.VERTEX_SHADER : n.FRAGMENT_SHADER); + if (!i) throw new Error("Something went wrong while compile the shader."); + return n.shaderSource(i, e), n.compileShader(i), i; + }), + (e.prototype.createRawShaderProgram = function (e, t, n, i, r) { + void 0 === r && (r = null), (i = i || this._gl); + var o = this._compileRawShader(t, "vertex"), + a = this._compileRawShader(n, "fragment"); + return this._createShaderProgram(e, o, a, i, r); + }), + (e.prototype.createShaderProgram = function (e, t, n, i, r, o) { + void 0 === o && (o = null), (r = r || this._gl); + var a = this._webGLVersion > 1 ? "#version 300 es\n#define WEBGL2 \n" : "", + s = this._compileShader(t, "vertex", i, a), + c = this._compileShader(n, "fragment", i, a); + return this._createShaderProgram(e, s, c, r, o); + }), + (e.prototype.createPipelineContext = function () { + var e = new m.a(); + return (e.engine = this), this._caps.parallelShaderCompile && (e.isParallelCompiled = !0), e; + }), + (e.prototype._createShaderProgram = function (e, t, n, i, r) { + void 0 === r && (r = null); + var o = i.createProgram(); + if (((e.program = o), !o)) throw new Error("Unable to create program"); + return i.attachShader(o, t), i.attachShader(o, n), i.linkProgram(o), (e.context = i), (e.vertexShader = t), (e.fragmentShader = n), e.isParallelCompiled || this._finalizePipelineContext(e), o; + }), + (e.prototype._finalizePipelineContext = function (e) { + var t = e.context, + n = e.vertexShader, + i = e.fragmentShader, + r = e.program; + if (!t.getProgramParameter(r, t.LINK_STATUS)) { + var o, a; + if (!this._gl.getShaderParameter(n, this._gl.COMPILE_STATUS)) if ((o = this._gl.getShaderInfoLog(n))) throw ((e.vertexCompilationError = o), new Error("VERTEX SHADER " + o)); + if (!this._gl.getShaderParameter(i, this._gl.COMPILE_STATUS)) if ((o = this._gl.getShaderInfoLog(i))) throw ((e.fragmentCompilationError = o), new Error("FRAGMENT SHADER " + o)); + if ((a = t.getProgramInfoLog(r))) throw ((e.programLinkError = a), new Error(a)); + } + if (this.validateShaderPrograms && (t.validateProgram(r), !t.getProgramParameter(r, t.VALIDATE_STATUS) && (a = t.getProgramInfoLog(r)))) throw ((e.programValidationError = a), new Error(a)); + t.deleteShader(n), t.deleteShader(i), (e.vertexShader = void 0), (e.fragmentShader = void 0), e.onCompiled && (e.onCompiled(), (e.onCompiled = void 0)); + }), + (e.prototype._preparePipelineContext = function (e, t, n, i, r, o, a) { + var s = e; + (s.program = i ? this.createRawShaderProgram(s, t, n, void 0, a) : this.createShaderProgram(s, t, n, o, void 0, a)), (s.program.__SPECTOR_rebuildProgram = r); + }), + (e.prototype._isRenderingStateCompiled = function (e) { + var t = e; + return !!this._gl.getProgramParameter(t.program, this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR) && (this._finalizePipelineContext(t), !0); + }), + (e.prototype._executeWhenRenderingStateIsCompiled = function (e, t) { + var n = e; + if (n.isParallelCompiled) { + var i = n.onCompiled; + n.onCompiled = i + ? function () { + i(), t(); + } + : t; + } else t(); + }), + (e.prototype.getUniforms = function (e, t) { + for (var n = new Array(), i = e, r = 0; r < t.length; r++) n.push(this._gl.getUniformLocation(i.program, t[r])); + return n; + }), + (e.prototype.getAttributes = function (e, t) { + for (var n = [], i = e, r = 0; r < t.length; r++) + try { + n.push(this._gl.getAttribLocation(i.program, t[r])); + } catch (e) { + n.push(-1); + } + return n; + }), + (e.prototype.enableEffect = function (e) { + e && e !== this._currentEffect && (this.bindSamplers(e), (this._currentEffect = e), e.onBind && e.onBind(e), e._onBindObservable && e._onBindObservable.notifyObservers(e)); + }), + (e.prototype.setInt = function (e, t) { + e && this._gl.uniform1i(e, t); + }), + (e.prototype.setIntArray = function (e, t) { + e && this._gl.uniform1iv(e, t); + }), + (e.prototype.setIntArray2 = function (e, t) { + e && t.length % 2 == 0 && this._gl.uniform2iv(e, t); + }), + (e.prototype.setIntArray3 = function (e, t) { + e && t.length % 3 == 0 && this._gl.uniform3iv(e, t); + }), + (e.prototype.setIntArray4 = function (e, t) { + e && t.length % 4 == 0 && this._gl.uniform4iv(e, t); + }), + (e.prototype.setArray = function (e, t) { + e && this._gl.uniform1fv(e, t); + }), + (e.prototype.setArray2 = function (e, t) { + e && t.length % 2 == 0 && this._gl.uniform2fv(e, t); + }), + (e.prototype.setArray3 = function (e, t) { + e && t.length % 3 == 0 && this._gl.uniform3fv(e, t); + }), + (e.prototype.setArray4 = function (e, t) { + e && t.length % 4 == 0 && this._gl.uniform4fv(e, t); + }), + (e.prototype.setMatrices = function (e, t) { + e && this._gl.uniformMatrix4fv(e, !1, t); + }), + (e.prototype.setMatrix3x3 = function (e, t) { + e && this._gl.uniformMatrix3fv(e, !1, t); + }), + (e.prototype.setMatrix2x2 = function (e, t) { + e && this._gl.uniformMatrix2fv(e, !1, t); + }), + (e.prototype.setFloat = function (e, t) { + e && this._gl.uniform1f(e, t); + }), + (e.prototype.setFloat2 = function (e, t, n) { + e && this._gl.uniform2f(e, t, n); + }), + (e.prototype.setFloat3 = function (e, t, n, i) { + e && this._gl.uniform3f(e, t, n, i); + }), + (e.prototype.setFloat4 = function (e, t, n, i, r) { + e && this._gl.uniform4f(e, t, n, i, r); + }), + (e.prototype.applyStates = function () { + if ((this._depthCullingState.apply(this._gl), this._stencilState.apply(this._gl), this._alphaState.apply(this._gl), this._colorWriteChanged)) { + this._colorWriteChanged = !1; + var e = this._colorWrite; + this._gl.colorMask(e, e, e, e); + } + }), + (e.prototype.setColorWrite = function (e) { + e !== this._colorWrite && ((this._colorWriteChanged = !0), (this._colorWrite = e)); + }), + (e.prototype.getColorWrite = function () { + return this._colorWrite; + }), + Object.defineProperty(e.prototype, "depthCullingState", { + get: function () { + return this._depthCullingState; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "alphaState", { + get: function () { + return this._alphaState; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilState", { + get: function () { + return this._stencilState; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.clearInternalTexturesCache = function () { + this._internalTexturesCache = []; + }), + (e.prototype.wipeCaches = function (e) { + (this.preventCacheWipeBetweenFrames && !e) || + ((this._currentEffect = null), + (this._viewportCached.x = 0), + (this._viewportCached.y = 0), + (this._viewportCached.z = 0), + (this._viewportCached.w = 0), + this._unbindVertexArrayObject(), + e && + ((this._currentProgram = null), + this.resetTextureCache(), + this._stencilState.reset(), + this._depthCullingState.reset(), + (this._depthCullingState.depthFunc = this._gl.LEQUAL), + this._alphaState.reset(), + (this._alphaMode = 1), + (this._alphaEquation = 0), + (this._colorWrite = !0), + (this._colorWriteChanged = !0), + (this._unpackFlipYCached = null), + this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._gl.NONE), + this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0), + (this._mustWipeVertexAttributes = !0), + this.unbindAllAttributes()), + this._resetVertexBufferBinding(), + (this._cachedIndexBuffer = null), + (this._cachedEffectForVertexBuffers = null), + this.bindIndexBuffer(null)); + }), + (e.prototype._getSamplingParameters = function (e, t) { + var n = this._gl, + i = n.NEAREST, + r = n.NEAREST; + switch (e) { + case 11: + (i = n.LINEAR), (r = t ? n.LINEAR_MIPMAP_NEAREST : n.LINEAR); + break; + case 3: + (i = n.LINEAR), (r = t ? n.LINEAR_MIPMAP_LINEAR : n.LINEAR); + break; + case 8: + (i = n.NEAREST), (r = t ? n.NEAREST_MIPMAP_LINEAR : n.NEAREST); + break; + case 4: + (i = n.NEAREST), (r = t ? n.NEAREST_MIPMAP_NEAREST : n.NEAREST); + break; + case 5: + (i = n.NEAREST), (r = t ? n.LINEAR_MIPMAP_NEAREST : n.LINEAR); + break; + case 6: + (i = n.NEAREST), (r = t ? n.LINEAR_MIPMAP_LINEAR : n.LINEAR); + break; + case 7: + (i = n.NEAREST), (r = n.LINEAR); + break; + case 1: + (i = n.NEAREST), (r = n.NEAREST); + break; + case 9: + (i = n.LINEAR), (r = t ? n.NEAREST_MIPMAP_NEAREST : n.NEAREST); + break; + case 10: + (i = n.LINEAR), (r = t ? n.NEAREST_MIPMAP_LINEAR : n.NEAREST); + break; + case 2: + (i = n.LINEAR), (r = n.LINEAR); + break; + case 12: + (i = n.LINEAR), (r = n.NEAREST); + } + return { min: r, mag: i }; + }), + (e.prototype._createTexture = function () { + var e = this._gl.createTexture(); + if (!e) throw new Error("Unable to create texture"); + return e; + }), + (e.prototype.createTexture = function (t, n, r, o, a, s, c, l, h, d, p, f) { + var m = this; + void 0 === a && (a = 3), void 0 === s && (s = null), void 0 === c && (c = null), void 0 === l && (l = null), void 0 === h && (h = null), void 0 === d && (d = null), void 0 === p && (p = null); + for ( + var g = String(t), + b = "data:" === g.substr(0, 5), + _ = "blob:" === g.substr(0, 5), + v = b && -1 !== g.indexOf(";base64,"), + y = h || new u.a(this, u.b.Url), + C = g.lastIndexOf("."), + P = p || (C > -1 ? g.substring(C).toLowerCase() : ""), + x = null, + T = 0, + S = e._TextureLoaders; + T < S.length; + T++ + ) { + var O = S[T]; + if (O.canLoad(P)) { + x = O; + break; + } + } + o && o._addPendingData(y), (y.url = g), (y.generateMipMaps = !n), (y.samplingMode = a), (y.invertY = r), this._doNotHandleContextLost || (y._buffer = l); + var E = null; + s && !h && (E = y.onLoadedObservable.add(s)), h || this._internalTexturesCache.push(y); + var M = function (e, t) { + o && o._removePendingData(y), E && y.onLoadedObservable.remove(E), i.a.UseFallbackTexture ? m.createTexture(i.a.FallbackTexture, n, y.invertY, o, a, null, c, l, y) : c && c(e || "Unknown error", t); + }; + if (x) { + var A = function (e) { + x.loadData(e, y, function (e, t, n, i, r, s) { + s + ? M("TextureLoader failed to load data") + : m._prepareWebGLTexture( + y, + o, + e, + t, + y.invertY, + !n, + i, + function () { + return r(), !1; + }, + a + ); + }); + }; + l + ? l instanceof ArrayBuffer + ? A(new Uint8Array(l)) + : ArrayBuffer.isView(l) + ? A(l) + : c && c("Unable to load: only ArrayBuffer or ArrayBufferView is supported", null) + : this._loadFile( + g, + function (e) { + return A(new Uint8Array(e)); + }, + void 0, + o ? o.offlineProvider : void 0, + !0, + function (e, t) { + M("Unable to load " + (e && e.responseURL, t)); + } + ); + } else { + var I = function (e) { + _ && !m._doNotHandleContextLost && (y._buffer = e), + m._prepareWebGLTexture( + y, + o, + e.width, + e.height, + y.invertY, + n, + !1, + function (t, n, i) { + var r = m._gl, + a = e.width === t && e.height === n, + s = d ? m._getInternalFormat(d) : ".jpg" === P ? r.RGB : r.RGBA; + if (a) return r.texImage2D(r.TEXTURE_2D, 0, s, s, r.UNSIGNED_BYTE, e), !1; + var c = m._caps.maxTextureSize; + if (e.width > c || e.height > c || !m._supportsHardwareTextureRescaling) + return ( + m._prepareWorkingCanvas(), + !(!m._workingCanvas || !m._workingContext) && + ((m._workingCanvas.width = t), + (m._workingCanvas.height = n), + m._workingContext.drawImage(e, 0, 0, e.width, e.height, 0, 0, t, n), + r.texImage2D(r.TEXTURE_2D, 0, s, s, r.UNSIGNED_BYTE, m._workingCanvas), + (y.width = t), + (y.height = n), + !1) + ); + var l = new u.a(m, u.b.Temp); + return ( + m._bindTextureDirectly(r.TEXTURE_2D, l, !0), + r.texImage2D(r.TEXTURE_2D, 0, s, s, r.UNSIGNED_BYTE, e), + m._rescaleTexture(l, y, o, s, function () { + m._releaseTexture(l), m._bindTextureDirectly(r.TEXTURE_2D, y, !0), i(); + }), + !0 + ); + }, + a + ); + }; + !b || v + ? l && (l.decoding || l.close) + ? I(l) + : e._FileToolsLoadImage(g, I, M, o ? o.offlineProvider : null, f) + : "string" == typeof l || l instanceof ArrayBuffer || ArrayBuffer.isView(l) || l instanceof Blob + ? e._FileToolsLoadImage(l, I, M, o ? o.offlineProvider : null, f) + : l && I(l); + } + return y; + }), + (e._FileToolsLoadImage = function (e, t, n, i, r) { + throw o.a.WarnImport("FileTools"); + }), + (e.prototype._rescaleTexture = function (e, t, n, i, r) {}), + (e.prototype.createRawTexture = function (e, t, n, i, r, a, s, c, l) { + throw (void 0 === c && (c = null), void 0 === l && (l = 0), o.a.WarnImport("Engine.RawTexture")); + }), + (e.prototype.createRawCubeTexture = function (e, t, n, i, r, a, s, c) { + throw (void 0 === c && (c = null), o.a.WarnImport("Engine.RawTexture")); + }), + (e.prototype.createRawTexture3D = function (e, t, n, i, r, a, s, c, l, u) { + throw (void 0 === l && (l = null), void 0 === u && (u = 0), o.a.WarnImport("Engine.RawTexture")); + }), + (e.prototype.createRawTexture2DArray = function (e, t, n, i, r, a, s, c, l, u) { + throw (void 0 === l && (l = null), void 0 === u && (u = 0), o.a.WarnImport("Engine.RawTexture")); + }), + (e.prototype._unpackFlipY = function (e) { + this._unpackFlipYCached !== e && (this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, e ? 1 : 0), this.enableUnpackFlipYCached && (this._unpackFlipYCached = e)); + }), + (e.prototype._getUnpackAlignement = function () { + return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT); + }), + (e.prototype._getTextureTarget = function (e) { + return e.isCube ? this._gl.TEXTURE_CUBE_MAP : e.is3D ? this._gl.TEXTURE_3D : e.is2DArray || e.isMultiview ? this._gl.TEXTURE_2D_ARRAY : this._gl.TEXTURE_2D; + }), + (e.prototype.updateTextureSamplingMode = function (e, t, n) { + void 0 === n && (n = !1); + var i = this._getTextureTarget(t), + r = this._getSamplingParameters(e, t.generateMipMaps || n); + this._setTextureParameterInteger(i, this._gl.TEXTURE_MAG_FILTER, r.mag, t), + this._setTextureParameterInteger(i, this._gl.TEXTURE_MIN_FILTER, r.min), + n && ((t.generateMipMaps = !0), this._gl.generateMipmap(i)), + this._bindTextureDirectly(i, null), + (t.samplingMode = e); + }), + (e.prototype.updateTextureWrappingMode = function (e, t, n, i) { + void 0 === n && (n = null), void 0 === i && (i = null); + var r = this._getTextureTarget(e); + null !== t && (this._setTextureParameterInteger(r, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(t), e), (e._cachedWrapU = t)), + null !== n && (this._setTextureParameterInteger(r, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(n), e), (e._cachedWrapV = n)), + (e.is2DArray || e.is3D) && null !== i && (this._setTextureParameterInteger(r, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(i), e), (e._cachedWrapR = i)), + this._bindTextureDirectly(r, null); + }), + (e.prototype._setupDepthStencilTexture = function (e, t, n, i, r) { + var o = t.width || t, + a = t.height || t, + s = t.layers || 0; + (e.baseWidth = o), + (e.baseHeight = a), + (e.width = o), + (e.height = a), + (e.is2DArray = s > 0), + (e.depth = s), + (e.isReady = !0), + (e.samples = 1), + (e.generateMipMaps = !1), + (e._generateDepthBuffer = !0), + (e._generateStencilBuffer = n), + (e.samplingMode = i ? 2 : 1), + (e.type = 0), + (e._comparisonFunction = r); + var c = this._gl, + l = this._getTextureTarget(e), + u = this._getSamplingParameters(e.samplingMode, !1); + c.texParameteri(l, c.TEXTURE_MAG_FILTER, u.mag), + c.texParameteri(l, c.TEXTURE_MIN_FILTER, u.min), + c.texParameteri(l, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), + c.texParameteri(l, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), + 0 === r + ? (c.texParameteri(l, c.TEXTURE_COMPARE_FUNC, 515), c.texParameteri(l, c.TEXTURE_COMPARE_MODE, c.NONE)) + : (c.texParameteri(l, c.TEXTURE_COMPARE_FUNC, r), c.texParameteri(l, c.TEXTURE_COMPARE_MODE, c.COMPARE_REF_TO_TEXTURE)); + }), + (e.prototype._uploadCompressedDataToTextureDirectly = function (e, t, n, i, r, o, a) { + void 0 === o && (o = 0), void 0 === a && (a = 0); + var s = this._gl, + c = s.TEXTURE_2D; + e.isCube && (c = s.TEXTURE_CUBE_MAP_POSITIVE_X + o), this._gl.compressedTexImage2D(c, a, t, n, i, 0, r); + }), + (e.prototype._uploadDataToTextureDirectly = function (e, t, n, i, r, o) { + void 0 === n && (n = 0), void 0 === i && (i = 0), void 0 === o && (o = !1); + var a = this._gl, + s = this._getWebGLTextureType(e.type), + c = this._getInternalFormat(e.format), + l = void 0 === r ? this._getRGBABufferInternalSizedFormat(e.type, e.format) : this._getInternalFormat(r); + this._unpackFlipY(e.invertY); + var u = a.TEXTURE_2D; + e.isCube && (u = a.TEXTURE_CUBE_MAP_POSITIVE_X + n); + var h = Math.round(Math.log(e.width) * Math.LOG2E), + d = Math.round(Math.log(e.height) * Math.LOG2E), + p = o ? e.width : Math.pow(2, Math.max(h - i, 0)), + f = o ? e.height : Math.pow(2, Math.max(d - i, 0)); + a.texImage2D(u, i, l, p, f, 0, c, s, t); + }), + (e.prototype.updateTextureData = function (e, t, n, i, r, o, a, s) { + void 0 === a && (a = 0), void 0 === s && (s = 0); + var c = this._gl, + l = this._getWebGLTextureType(e.type), + u = this._getInternalFormat(e.format); + this._unpackFlipY(e.invertY); + var h = c.TEXTURE_2D; + e.isCube && (h = c.TEXTURE_CUBE_MAP_POSITIVE_X + a), c.texSubImage2D(h, s, n, i, r, o, u, l, t); + }), + (e.prototype._uploadArrayBufferViewToTexture = function (e, t, n, i) { + void 0 === n && (n = 0), void 0 === i && (i = 0); + var r = this._gl, + o = e.isCube ? r.TEXTURE_CUBE_MAP : r.TEXTURE_2D; + this._bindTextureDirectly(o, e, !0), this._uploadDataToTextureDirectly(e, t, n, i), this._bindTextureDirectly(o, null, !0); + }), + (e.prototype._prepareWebGLTextureContinuation = function (e, t, n, i, r) { + var o = this._gl; + if (o) { + var a = this._getSamplingParameters(r, !n); + o.texParameteri(o.TEXTURE_2D, o.TEXTURE_MAG_FILTER, a.mag), + o.texParameteri(o.TEXTURE_2D, o.TEXTURE_MIN_FILTER, a.min), + n || i || o.generateMipmap(o.TEXTURE_2D), + this._bindTextureDirectly(o.TEXTURE_2D, null), + t && t._removePendingData(e), + e.onLoadedObservable.notifyObservers(e), + e.onLoadedObservable.clear(); + } + }), + (e.prototype._prepareWebGLTexture = function (t, n, i, r, o, a, s, c, l) { + var u = this; + void 0 === l && (l = 3); + var h = this.getCaps().maxTextureSize, + d = Math.min(h, this.needPOTTextures ? e.GetExponentOfTwo(i, h) : i), + p = Math.min(h, this.needPOTTextures ? e.GetExponentOfTwo(r, h) : r), + f = this._gl; + f && + (t._webGLTexture + ? (this._bindTextureDirectly(f.TEXTURE_2D, t, !0), + this._unpackFlipY(void 0 === o || !!o), + (t.baseWidth = i), + (t.baseHeight = r), + (t.width = d), + (t.height = p), + (t.isReady = !0), + c(d, p, function () { + u._prepareWebGLTextureContinuation(t, n, a, s, l); + }) || this._prepareWebGLTextureContinuation(t, n, a, s, l)) + : n && n._removePendingData(t)); + }), + (e.prototype._setupFramebufferDepthAttachments = function (e, t, n, i, r) { + void 0 === r && (r = 1); + var o = this._gl; + if (e && t) return this._getDepthStencilBuffer(n, i, r, o.DEPTH_STENCIL, o.DEPTH24_STENCIL8, o.DEPTH_STENCIL_ATTACHMENT); + if (t) { + var a = o.DEPTH_COMPONENT16; + return this._webGLVersion > 1 && (a = o.DEPTH_COMPONENT32F), this._getDepthStencilBuffer(n, i, r, a, a, o.DEPTH_ATTACHMENT); + } + return e ? this._getDepthStencilBuffer(n, i, r, o.STENCIL_INDEX8, o.STENCIL_INDEX8, o.STENCIL_ATTACHMENT) : null; + }), + (e.prototype._releaseFramebufferObjects = function (e) { + var t = this._gl; + e._framebuffer && (t.deleteFramebuffer(e._framebuffer), (e._framebuffer = null)), + e._depthStencilBuffer && (t.deleteRenderbuffer(e._depthStencilBuffer), (e._depthStencilBuffer = null)), + e._MSAAFramebuffer && (t.deleteFramebuffer(e._MSAAFramebuffer), (e._MSAAFramebuffer = null)), + e._MSAARenderBuffer && (t.deleteRenderbuffer(e._MSAARenderBuffer), (e._MSAARenderBuffer = null)); + }), + (e.prototype._releaseTexture = function (e) { + this._releaseFramebufferObjects(e), this._deleteTexture(e._webGLTexture), this.unbindAllTextures(); + var t = this._internalTexturesCache.indexOf(e); + -1 !== t && this._internalTexturesCache.splice(t, 1), + e._lodTextureHigh && e._lodTextureHigh.dispose(), + e._lodTextureMid && e._lodTextureMid.dispose(), + e._lodTextureLow && e._lodTextureLow.dispose(), + e._irradianceTexture && e._irradianceTexture.dispose(); + }), + (e.prototype._deleteTexture = function (e) { + this._gl.deleteTexture(e); + }), + (e.prototype._setProgram = function (e) { + this._currentProgram !== e && (this._gl.useProgram(e), (this._currentProgram = e)); + }), + (e.prototype.bindSamplers = function (e) { + var t = e.getPipelineContext(); + this._setProgram(t.program); + for (var n = e.getSamplers(), i = 0; i < n.length; i++) { + var r = e.getUniform(n[i]); + r && (this._boundUniforms[i] = r); + } + this._currentEffect = null; + }), + (e.prototype._activateCurrentTexture = function () { + this._currentTextureChannel !== this._activeChannel && (this._gl.activeTexture(this._gl.TEXTURE0 + this._activeChannel), (this._currentTextureChannel = this._activeChannel)); + }), + (e.prototype._bindTextureDirectly = function (e, t, n, i) { + void 0 === n && (n = !1), void 0 === i && (i = !1); + var r = !1, + o = t && t._associatedChannel > -1; + return ( + n && o && (this._activeChannel = t._associatedChannel), + this._boundTexturesCache[this._activeChannel] !== t || i + ? (this._activateCurrentTexture(), + t && t.isMultiview ? this._gl.bindTexture(e, t ? t._colorTextureArray : null) : this._gl.bindTexture(e, t ? t._webGLTexture : null), + (this._boundTexturesCache[this._activeChannel] = t), + t && (t._associatedChannel = this._activeChannel)) + : n && ((r = !0), this._activateCurrentTexture()), + o && !n && this._bindSamplerUniformToChannel(t._associatedChannel, this._activeChannel), + r + ); + }), + (e.prototype._bindTexture = function (e, t) { + void 0 !== e && (t && (t._associatedChannel = e), (this._activeChannel = e), this._bindTextureDirectly(this._gl.TEXTURE_2D, t)); + }), + (e.prototype.unbindAllTextures = function () { + for (var e = 0; e < this._maxSimultaneousTextures; e++) + (this._activeChannel = e), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null), + this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null), + this.webGLVersion > 1 && (this._bindTextureDirectly(this._gl.TEXTURE_3D, null), this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, null)); + }), + (e.prototype.setTexture = function (e, t, n) { + void 0 !== e && (t && (this._boundUniforms[e] = t), this._setTexture(e, n)); + }), + (e.prototype._bindSamplerUniformToChannel = function (e, t) { + var n = this._boundUniforms[e]; + n && n._currentState !== t && (this._gl.uniform1i(n, t), (n._currentState = t)); + }), + (e.prototype._getTextureWrapMode = function (e) { + switch (e) { + case 1: + return this._gl.REPEAT; + case 0: + return this._gl.CLAMP_TO_EDGE; + case 2: + return this._gl.MIRRORED_REPEAT; + } + return this._gl.REPEAT; + }), + (e.prototype._setTexture = function (e, t, n, i) { + if ((void 0 === n && (n = !1), void 0 === i && (i = !1), !t)) + return ( + null != this._boundTexturesCache[e] && + ((this._activeChannel = e), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null), + this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null), + this.webGLVersion > 1 && (this._bindTextureDirectly(this._gl.TEXTURE_3D, null), this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY, null))), + !1 + ); + if (t.video) (this._activeChannel = e), t.update(); + else if (4 === t.delayLoadState) return t.delayLoad(), !1; + var r; + (r = i ? t.depthStencilTexture : t.isReady() ? t.getInternalTexture() : t.isCube ? this.emptyCubeTexture : t.is3D ? this.emptyTexture3D : t.is2DArray ? this.emptyTexture2DArray : this.emptyTexture), + !n && r && (r._associatedChannel = e); + var o = !0; + this._boundTexturesCache[e] === r && (n || this._bindSamplerUniformToChannel(r._associatedChannel, e), (o = !1)), (this._activeChannel = e); + var a = this._getTextureTarget(r); + if ((o && this._bindTextureDirectly(a, r, n), r && !r.isMultiview)) { + if (r.isCube && r._cachedCoordinatesMode !== t.coordinatesMode) { + r._cachedCoordinatesMode = t.coordinatesMode; + var s = 3 !== t.coordinatesMode && 5 !== t.coordinatesMode ? 1 : 0; + (t.wrapU = s), (t.wrapV = s); + } + r._cachedWrapU !== t.wrapU && ((r._cachedWrapU = t.wrapU), this._setTextureParameterInteger(a, this._gl.TEXTURE_WRAP_S, this._getTextureWrapMode(t.wrapU), r)), + r._cachedWrapV !== t.wrapV && ((r._cachedWrapV = t.wrapV), this._setTextureParameterInteger(a, this._gl.TEXTURE_WRAP_T, this._getTextureWrapMode(t.wrapV), r)), + r.is3D && r._cachedWrapR !== t.wrapR && ((r._cachedWrapR = t.wrapR), this._setTextureParameterInteger(a, this._gl.TEXTURE_WRAP_R, this._getTextureWrapMode(t.wrapR), r)), + this._setAnisotropicLevel(a, r, t.anisotropicFilteringLevel); + } + return !0; + }), + (e.prototype.setTextureArray = function (e, t, n) { + if (void 0 !== e && t) { + (this._textureUnits && this._textureUnits.length === n.length) || (this._textureUnits = new Int32Array(n.length)); + for (var i = 0; i < n.length; i++) { + var r = n[i].getInternalTexture(); + r ? ((this._textureUnits[i] = e + i), (r._associatedChannel = e + i)) : (this._textureUnits[i] = -1); + } + this._gl.uniform1iv(t, this._textureUnits); + for (var o = 0; o < n.length; o++) this._setTexture(this._textureUnits[o], n[o], !0); + } + }), + (e.prototype._setAnisotropicLevel = function (e, t, n) { + var i = this._caps.textureAnisotropicFilterExtension; + 11 !== t.samplingMode && 3 !== t.samplingMode && 2 !== t.samplingMode && (n = 1), + i && t._cachedAnisotropicFilteringLevel !== n && (this._setTextureParameterFloat(e, i.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(n, this._caps.maxAnisotropy), t), (t._cachedAnisotropicFilteringLevel = n)); + }), + (e.prototype._setTextureParameterFloat = function (e, t, n, i) { + this._bindTextureDirectly(e, i, !0, !0), this._gl.texParameterf(e, t, n); + }), + (e.prototype._setTextureParameterInteger = function (e, t, n, i) { + i && this._bindTextureDirectly(e, i, !0, !0), this._gl.texParameteri(e, t, n); + }), + (e.prototype.unbindAllAttributes = function () { + if (this._mustWipeVertexAttributes) { + this._mustWipeVertexAttributes = !1; + for (var e = 0; e < this._caps.maxVertexAttribs; e++) this.disableAttributeByIndex(e); + } else { + e = 0; + for (var t = this._vertexAttribArraysEnabled.length; e < t; e++) e >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[e] || this.disableAttributeByIndex(e); + } + }), + (e.prototype.releaseEffects = function () { + for (var e in this._compiledEffects) { + var t = this._compiledEffects[e].getPipelineContext(); + this._deletePipelineContext(t); + } + this._compiledEffects = {}; + }), + (e.prototype.dispose = function () { + this.stopRenderLoop(), + this.onBeforeTextureInitObservable && this.onBeforeTextureInitObservable.clear(), + this._emptyTexture && (this._releaseTexture(this._emptyTexture), (this._emptyTexture = null)), + this._emptyCubeTexture && (this._releaseTexture(this._emptyCubeTexture), (this._emptyCubeTexture = null)), + this.releaseEffects(), + this.unbindAllAttributes(), + (this._boundUniforms = []), + d.a.IsWindowObjectExist() && + this._renderingCanvas && + (this._doNotHandleContextLost || + (this._renderingCanvas.removeEventListener("webglcontextlost", this._onContextLost), this._renderingCanvas.removeEventListener("webglcontextrestored", this._onContextRestored))), + (this._workingCanvas = null), + (this._workingContext = null), + (this._currentBufferPointers = []), + (this._renderingCanvas = null), + (this._currentProgram = null), + (this._boundRenderFunction = null), + r.a.ResetCache(); + for (var e = 0, t = this._activeRequests; e < t.length; e++) { + t[e].abort(); + } + }), + (e.prototype.attachContextLostEvent = function (e) { + this._renderingCanvas && this._renderingCanvas.addEventListener("webglcontextlost", e, !1); + }), + (e.prototype.attachContextRestoredEvent = function (e) { + this._renderingCanvas && this._renderingCanvas.addEventListener("webglcontextrestored", e, !1); + }), + (e.prototype.getError = function () { + return this._gl.getError(); + }), + (e.prototype._canRenderToFloatFramebuffer = function () { + return this._webGLVersion > 1 ? this._caps.colorBufferFloat : this._canRenderToFramebuffer(1); + }), + (e.prototype._canRenderToHalfFloatFramebuffer = function () { + return this._webGLVersion > 1 ? this._caps.colorBufferFloat : this._canRenderToFramebuffer(2); + }), + (e.prototype._canRenderToFramebuffer = function (e) { + for (var t = this._gl; t.getError() !== t.NO_ERROR; ); + var n = !0, + i = t.createTexture(); + t.bindTexture(t.TEXTURE_2D, i), + t.texImage2D(t.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(e), 1, 1, 0, t.RGBA, this._getWebGLTextureType(e), null), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.NEAREST), + t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.NEAREST); + var r = t.createFramebuffer(); + t.bindFramebuffer(t.FRAMEBUFFER, r), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, i, 0); + var o = t.checkFramebufferStatus(t.FRAMEBUFFER); + if (((n = (n = n && o === t.FRAMEBUFFER_COMPLETE) && t.getError() === t.NO_ERROR) && (t.clear(t.COLOR_BUFFER_BIT), (n = n && t.getError() === t.NO_ERROR)), n)) { + t.bindFramebuffer(t.FRAMEBUFFER, null); + var a = t.RGBA, + s = t.UNSIGNED_BYTE, + c = new Uint8Array(4); + t.readPixels(0, 0, 1, 1, a, s, c), (n = n && t.getError() === t.NO_ERROR); + } + for (t.deleteTexture(i), t.deleteFramebuffer(r), t.bindFramebuffer(t.FRAMEBUFFER, null); !n && t.getError() !== t.NO_ERROR; ); + return n; + }), + (e.prototype._getWebGLTextureType = function (e) { + if (1 === this._webGLVersion) { + switch (e) { + case 1: + return this._gl.FLOAT; + case 2: + return this._gl.HALF_FLOAT_OES; + case 0: + return this._gl.UNSIGNED_BYTE; + case 8: + return this._gl.UNSIGNED_SHORT_4_4_4_4; + case 9: + return this._gl.UNSIGNED_SHORT_5_5_5_1; + case 10: + return this._gl.UNSIGNED_SHORT_5_6_5; + } + return this._gl.UNSIGNED_BYTE; + } + switch (e) { + case 3: + return this._gl.BYTE; + case 0: + return this._gl.UNSIGNED_BYTE; + case 4: + return this._gl.SHORT; + case 5: + return this._gl.UNSIGNED_SHORT; + case 6: + return this._gl.INT; + case 7: + return this._gl.UNSIGNED_INT; + case 1: + return this._gl.FLOAT; + case 2: + return this._gl.HALF_FLOAT; + case 8: + return this._gl.UNSIGNED_SHORT_4_4_4_4; + case 9: + return this._gl.UNSIGNED_SHORT_5_5_5_1; + case 10: + return this._gl.UNSIGNED_SHORT_5_6_5; + case 11: + return this._gl.UNSIGNED_INT_2_10_10_10_REV; + case 12: + return this._gl.UNSIGNED_INT_24_8; + case 13: + return this._gl.UNSIGNED_INT_10F_11F_11F_REV; + case 14: + return this._gl.UNSIGNED_INT_5_9_9_9_REV; + case 15: + return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV; + } + return this._gl.UNSIGNED_BYTE; + }), + (e.prototype._getInternalFormat = function (e) { + var t = this._gl.RGBA; + switch (e) { + case 0: + t = this._gl.ALPHA; + break; + case 1: + t = this._gl.LUMINANCE; + break; + case 2: + t = this._gl.LUMINANCE_ALPHA; + break; + case 6: + t = this._gl.RED; + break; + case 7: + t = this._gl.RG; + break; + case 4: + t = this._gl.RGB; + break; + case 5: + t = this._gl.RGBA; + } + if (this._webGLVersion > 1) + switch (e) { + case 8: + t = this._gl.RED_INTEGER; + break; + case 9: + t = this._gl.RG_INTEGER; + break; + case 10: + t = this._gl.RGB_INTEGER; + break; + case 11: + t = this._gl.RGBA_INTEGER; + } + return t; + }), + (e.prototype._getRGBABufferInternalSizedFormat = function (e, t) { + if (1 === this._webGLVersion) { + if (void 0 !== t) + switch (t) { + case 0: + return this._gl.ALPHA; + case 1: + return this._gl.LUMINANCE; + case 2: + return this._gl.LUMINANCE_ALPHA; + case 4: + return this._gl.RGB; + } + return this._gl.RGBA; + } + switch (e) { + case 3: + switch (t) { + case 6: + return this._gl.R8_SNORM; + case 7: + return this._gl.RG8_SNORM; + case 4: + return this._gl.RGB8_SNORM; + case 8: + return this._gl.R8I; + case 9: + return this._gl.RG8I; + case 10: + return this._gl.RGB8I; + case 11: + return this._gl.RGBA8I; + default: + return this._gl.RGBA8_SNORM; + } + case 0: + switch (t) { + case 6: + return this._gl.R8; + case 7: + return this._gl.RG8; + case 4: + return this._gl.RGB8; + case 5: + return this._gl.RGBA8; + case 8: + return this._gl.R8UI; + case 9: + return this._gl.RG8UI; + case 10: + return this._gl.RGB8UI; + case 11: + return this._gl.RGBA8UI; + case 0: + return this._gl.ALPHA; + case 1: + return this._gl.LUMINANCE; + case 2: + return this._gl.LUMINANCE_ALPHA; + default: + return this._gl.RGBA8; + } + case 4: + switch (t) { + case 8: + return this._gl.R16I; + case 9: + return this._gl.RG16I; + case 10: + return this._gl.RGB16I; + case 11: + default: + return this._gl.RGBA16I; + } + case 5: + switch (t) { + case 8: + return this._gl.R16UI; + case 9: + return this._gl.RG16UI; + case 10: + return this._gl.RGB16UI; + case 11: + default: + return this._gl.RGBA16UI; + } + case 6: + switch (t) { + case 8: + return this._gl.R32I; + case 9: + return this._gl.RG32I; + case 10: + return this._gl.RGB32I; + case 11: + default: + return this._gl.RGBA32I; + } + case 7: + switch (t) { + case 8: + return this._gl.R32UI; + case 9: + return this._gl.RG32UI; + case 10: + return this._gl.RGB32UI; + case 11: + default: + return this._gl.RGBA32UI; + } + case 1: + switch (t) { + case 6: + return this._gl.R32F; + case 7: + return this._gl.RG32F; + case 4: + return this._gl.RGB32F; + case 5: + default: + return this._gl.RGBA32F; + } + case 2: + switch (t) { + case 6: + return this._gl.R16F; + case 7: + return this._gl.RG16F; + case 4: + return this._gl.RGB16F; + case 5: + default: + return this._gl.RGBA16F; + } + case 10: + return this._gl.RGB565; + case 13: + return this._gl.R11F_G11F_B10F; + case 14: + return this._gl.RGB9_E5; + case 8: + return this._gl.RGBA4; + case 9: + return this._gl.RGB5_A1; + case 11: + switch (t) { + case 5: + return this._gl.RGB10_A2; + case 11: + return this._gl.RGB10_A2UI; + default: + return this._gl.RGB10_A2; + } + } + return this._gl.RGBA8; + }), + (e.prototype._getRGBAMultiSampleBufferFormat = function (e) { + return 1 === e ? this._gl.RGBA32F : 2 === e ? this._gl.RGBA16F : this._gl.RGBA8; + }), + (e.prototype._loadFile = function (t, n, i, r, o, a) { + var s = this, + c = e._FileToolsLoadFile(t, n, i, r, o, a); + return ( + this._activeRequests.push(c), + c.onCompleteObservable.add(function (e) { + s._activeRequests.splice(s._activeRequests.indexOf(e), 1); + }), + c + ); + }), + (e._FileToolsLoadFile = function (e, t, n, i, r, a) { + throw o.a.WarnImport("FileTools"); + }), + (e.prototype.readPixels = function (e, t, n, i, r) { + void 0 === r && (r = !0); + var o = r ? 4 : 3, + a = r ? this._gl.RGBA : this._gl.RGB, + s = new Uint8Array(i * n * o); + return this._gl.readPixels(e, t, n, i, a, this._gl.UNSIGNED_BYTE, s), s; + }), + (e.isSupported = function () { + if (null === this._isSupported) + try { + var e = g.a.CreateCanvas(1, 1), + t = e.getContext("webgl") || e.getContext("experimental-webgl"); + this._isSupported = null != t && !!window.WebGLRenderingContext; + } catch (e) { + this._isSupported = !1; + } + return this._isSupported; + }), + (e.CeilingPOT = function (e) { + return e--, (e |= e >> 1), (e |= e >> 2), (e |= e >> 4), (e |= e >> 8), (e |= e >> 16), ++e; + }), + (e.FloorPOT = function (e) { + return (e |= e >> 1), (e |= e >> 2), (e |= e >> 4), (e |= e >> 8), (e |= e >> 16) - (e >> 1); + }), + (e.NearestPOT = function (t) { + var n = e.CeilingPOT(t), + i = e.FloorPOT(t); + return n - t > t - i ? i : n; + }), + (e.GetExponentOfTwo = function (t, n, i) { + var r; + switch ((void 0 === i && (i = 2), i)) { + case 1: + r = e.FloorPOT(t); + break; + case 2: + r = e.NearestPOT(t); + break; + case 3: + default: + r = e.CeilingPOT(t); + } + return Math.min(r, n); + }), + (e.QueueNewFrame = function (e, t) { + return d.a.IsWindowObjectExist() + ? (t || (t = window), + t.requestAnimationFrame + ? t.requestAnimationFrame(e) + : t.msRequestAnimationFrame + ? t.msRequestAnimationFrame(e) + : t.webkitRequestAnimationFrame + ? t.webkitRequestAnimationFrame(e) + : t.mozRequestAnimationFrame + ? t.mozRequestAnimationFrame(e) + : t.oRequestAnimationFrame + ? t.oRequestAnimationFrame(e) + : window.setTimeout(e, 16)) + : "undefined" != typeof requestAnimationFrame + ? requestAnimationFrame(e) + : setTimeout(e, 16); + }), + (e.prototype.getHostDocument = function () { + return this._renderingCanvas && this._renderingCanvas.ownerDocument ? this._renderingCanvas.ownerDocument : document; + }), + (e.ExceptionList = [ + { key: "Chrome/63.0", capture: "63\\.0\\.3239\\.(\\d+)", captureConstraint: 108, targets: ["uniformBuffer"] }, + { key: "Firefox/58", capture: null, captureConstraint: null, targets: ["uniformBuffer"] }, + { key: "Firefox/59", capture: null, captureConstraint: null, targets: ["uniformBuffer"] }, + { key: "Chrome/72.+?Mobile", capture: null, captureConstraint: null, targets: ["vao"] }, + { key: "Chrome/73.+?Mobile", capture: null, captureConstraint: null, targets: ["vao"] }, + { key: "Chrome/74.+?Mobile", capture: null, captureConstraint: null, targets: ["vao"] }, + { key: "Mac OS.+Chrome/71", capture: null, captureConstraint: null, targets: ["vao"] }, + { key: "Mac OS.+Chrome/72", capture: null, captureConstraint: null, targets: ["vao"] }, + ]), + (e._TextureLoaders = []), + (e.CollisionsEpsilon = 0.001), + (e._isSupported = null), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(6), + a = n(1), + s = n(35), + c = n(23), + l = (function (e) { + function t(n, i, r) { + void 0 === i && (i = null), void 0 === r && (r = !0); + var s = e.call(this, n, i) || this; + return ( + (s._forward = new a.e(0, 0, 1)), + (s._forwardInverted = new a.e(0, 0, -1)), + (s._up = new a.e(0, 1, 0)), + (s._right = new a.e(1, 0, 0)), + (s._rightInverted = new a.e(-1, 0, 0)), + (s._position = a.e.Zero()), + (s._rotation = a.e.Zero()), + (s._rotationQuaternion = null), + (s._scaling = a.e.One()), + (s._isDirty = !1), + (s._transformToBoneReferal = null), + (s._isAbsoluteSynced = !1), + (s._billboardMode = t.BILLBOARDMODE_NONE), + (s._preserveParentRotationForBillboard = !1), + (s.scalingDeterminant = 1), + (s._infiniteDistance = !1), + (s.ignoreNonUniformScaling = !1), + (s.reIntegrateRotationIntoRotationQuaternion = !1), + (s._poseMatrix = null), + (s._localMatrix = a.a.Zero()), + (s._usePivotMatrix = !1), + (s._absolutePosition = a.e.Zero()), + (s._absoluteScaling = a.e.Zero()), + (s._absoluteRotationQuaternion = a.b.Identity()), + (s._pivotMatrix = a.a.Identity()), + (s._postMultiplyPivotMatrix = !1), + (s._isWorldMatrixFrozen = !1), + (s._indexInSceneTransformNodesArray = -1), + (s.onAfterWorldMatrixUpdateObservable = new o.c()), + (s._nonUniformScaling = !1), + r && s.getScene().addTransformNode(s), + s + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "billboardMode", { + get: function () { + return this._billboardMode; + }, + set: function (e) { + this._billboardMode !== e && (this._billboardMode = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "preserveParentRotationForBillboard", { + get: function () { + return this._preserveParentRotationForBillboard; + }, + set: function (e) { + e !== this._preserveParentRotationForBillboard && (this._preserveParentRotationForBillboard = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "infiniteDistance", { + get: function () { + return this._infiniteDistance; + }, + set: function (e) { + this._infiniteDistance !== e && (this._infiniteDistance = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "TransformNode"; + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._position; + }, + set: function (e) { + (this._position = e), (this._isDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotation", { + get: function () { + return this._rotation; + }, + set: function (e) { + (this._rotation = e), (this._rotationQuaternion = null), (this._isDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "scaling", { + get: function () { + return this._scaling; + }, + set: function (e) { + (this._scaling = e), (this._isDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotationQuaternion", { + get: function () { + return this._rotationQuaternion; + }, + set: function (e) { + (this._rotationQuaternion = e), e && this._rotation.setAll(0), (this._isDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "forward", { + get: function () { + return a.e.Normalize(a.e.TransformNormal(this.getScene().useRightHandedSystem ? this._forwardInverted : this._forward, this.getWorldMatrix())); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "up", { + get: function () { + return a.e.Normalize(a.e.TransformNormal(this._up, this.getWorldMatrix())); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return a.e.Normalize(a.e.TransformNormal(this.getScene().useRightHandedSystem ? this._rightInverted : this._right, this.getWorldMatrix())); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.updatePoseMatrix = function (e) { + return this._poseMatrix ? (this._poseMatrix.copyFrom(e), this) : ((this._poseMatrix = e.clone()), this); + }), + (t.prototype.getPoseMatrix = function () { + return this._poseMatrix || (this._poseMatrix = a.a.Identity()), this._poseMatrix; + }), + (t.prototype._isSynchronized = function () { + var e = this._cache; + if (this.billboardMode !== e.billboardMode || this.billboardMode !== t.BILLBOARDMODE_NONE) return !1; + if (e.pivotMatrixUpdated) return !1; + if (this.infiniteDistance) return !1; + if (!e.position.equals(this._position)) return !1; + if (this._rotationQuaternion) { + if (!e.rotationQuaternion.equals(this._rotationQuaternion)) return !1; + } else if (!e.rotation.equals(this._rotation)) return !1; + return !!e.scaling.equals(this._scaling); + }), + (t.prototype._initCache = function () { + e.prototype._initCache.call(this); + var t = this._cache; + (t.localMatrixUpdated = !1), (t.position = a.e.Zero()), (t.scaling = a.e.Zero()), (t.rotation = a.e.Zero()), (t.rotationQuaternion = new a.b(0, 0, 0, 0)), (t.billboardMode = -1), (t.infiniteDistance = !1); + }), + (t.prototype.markAsDirty = function (e) { + return (this._currentRenderId = Number.MAX_VALUE), (this._isDirty = !0), this; + }), + Object.defineProperty(t.prototype, "absolutePosition", { + get: function () { + return this._absolutePosition; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "absoluteScaling", { + get: function () { + return this._syncAbsoluteScalingAndRotation(), this._absoluteScaling; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "absoluteRotationQuaternion", { + get: function () { + return this._syncAbsoluteScalingAndRotation(), this._absoluteRotationQuaternion; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setPreTransformMatrix = function (e) { + return this.setPivotMatrix(e, !1); + }), + (t.prototype.setPivotMatrix = function (e, t) { + return ( + void 0 === t && (t = !0), + this._pivotMatrix.copyFrom(e), + (this._usePivotMatrix = !this._pivotMatrix.isIdentity()), + (this._cache.pivotMatrixUpdated = !0), + (this._postMultiplyPivotMatrix = t), + this._postMultiplyPivotMatrix && (this._pivotMatrixInverse ? this._pivotMatrix.invertToRef(this._pivotMatrixInverse) : (this._pivotMatrixInverse = a.a.Invert(this._pivotMatrix))), + this + ); + }), + (t.prototype.getPivotMatrix = function () { + return this._pivotMatrix; + }), + (t.prototype.instantiateHierarchy = function (e, t, n) { + void 0 === e && (e = null); + var i = this.clone("Clone of " + (this.name || this.id), e || this.parent, !0); + i && n && n(this, i); + for (var r = 0, o = this.getChildTransformNodes(!0); r < o.length; r++) { + o[r].instantiateHierarchy(i, t, n); + } + return i; + }), + (t.prototype.freezeWorldMatrix = function (e) { + return void 0 === e && (e = null), e ? (this._worldMatrix = e) : ((this._isWorldMatrixFrozen = !1), this.computeWorldMatrix(!0)), (this._isDirty = !1), (this._isWorldMatrixFrozen = !0), this; + }), + (t.prototype.unfreezeWorldMatrix = function () { + return (this._isWorldMatrixFrozen = !1), this.computeWorldMatrix(!0), this; + }), + Object.defineProperty(t.prototype, "isWorldMatrixFrozen", { + get: function () { + return this._isWorldMatrixFrozen; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getAbsolutePosition = function () { + return this.computeWorldMatrix(), this._absolutePosition; + }), + (t.prototype.setAbsolutePosition = function (e) { + if (!e) return this; + var t, n, i; + if (void 0 === e.x) { + if (arguments.length < 3) return this; + (t = arguments[0]), (n = arguments[1]), (i = arguments[2]); + } else (t = e.x), (n = e.y), (i = e.z); + if (this.parent) { + var r = a.c.Matrix[0]; + this.parent.getWorldMatrix().invertToRef(r), a.e.TransformCoordinatesFromFloatsToRef(t, n, i, r, this.position); + } else (this.position.x = t), (this.position.y = n), (this.position.z = i); + return this; + }), + (t.prototype.setPositionWithLocalVector = function (e) { + return this.computeWorldMatrix(), (this.position = a.e.TransformNormal(e, this._localMatrix)), this; + }), + (t.prototype.getPositionExpressedInLocalSpace = function () { + this.computeWorldMatrix(); + var e = a.c.Matrix[0]; + return this._localMatrix.invertToRef(e), a.e.TransformNormal(this.position, e); + }), + (t.prototype.locallyTranslate = function (e) { + return this.computeWorldMatrix(!0), (this.position = a.e.TransformCoordinates(e, this._localMatrix)), this; + }), + (t.prototype.lookAt = function (e, n, i, r, o) { + void 0 === n && (n = 0), void 0 === i && (i = 0), void 0 === r && (r = 0), void 0 === o && (o = c.b.LOCAL); + var s = t._lookAtVectorCache, + l = o === c.b.LOCAL ? this.position : this.getAbsolutePosition(); + if ((e.subtractToRef(l, s), this.setDirection(s, n, i, r), o === c.b.WORLD && this.parent)) + if (this.rotationQuaternion) { + var u = a.c.Matrix[0]; + this.rotationQuaternion.toRotationMatrix(u); + var h = a.c.Matrix[1]; + this.parent.getWorldMatrix().getRotationMatrixToRef(h), h.invert(), u.multiplyToRef(h, u), this.rotationQuaternion.fromRotationMatrix(u); + } else { + var d = a.c.Quaternion[0]; + a.b.FromEulerVectorToRef(this.rotation, d); + u = a.c.Matrix[0]; + d.toRotationMatrix(u); + h = a.c.Matrix[1]; + this.parent.getWorldMatrix().getRotationMatrixToRef(h), h.invert(), u.multiplyToRef(h, u), d.fromRotationMatrix(u), d.toEulerAnglesToRef(this.rotation); + } + return this; + }), + (t.prototype.getDirection = function (e) { + var t = a.e.Zero(); + return this.getDirectionToRef(e, t), t; + }), + (t.prototype.getDirectionToRef = function (e, t) { + return a.e.TransformNormalToRef(e, this.getWorldMatrix(), t), this; + }), + (t.prototype.setDirection = function (e, t, n, i) { + void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 0); + var r = -Math.atan2(e.z, e.x) + Math.PI / 2, + o = Math.sqrt(e.x * e.x + e.z * e.z), + s = -Math.atan2(e.y, o); + return this.rotationQuaternion ? a.b.RotationYawPitchRollToRef(r + t, s + n, i, this.rotationQuaternion) : ((this.rotation.x = s + n), (this.rotation.y = r + t), (this.rotation.z = i)), this; + }), + (t.prototype.setPivotPoint = function (e, t) { + void 0 === t && (t = c.b.LOCAL), 0 == this.getScene().getRenderId() && this.computeWorldMatrix(!0); + var n = this.getWorldMatrix(); + if (t == c.b.WORLD) { + var i = a.c.Matrix[0]; + n.invertToRef(i), (e = a.e.TransformCoordinates(e, i)); + } + return this.setPivotMatrix(a.a.Translation(-e.x, -e.y, -e.z), !0); + }), + (t.prototype.getPivotPoint = function () { + var e = a.e.Zero(); + return this.getPivotPointToRef(e), e; + }), + (t.prototype.getPivotPointToRef = function (e) { + return (e.x = -this._pivotMatrix.m[12]), (e.y = -this._pivotMatrix.m[13]), (e.z = -this._pivotMatrix.m[14]), this; + }), + (t.prototype.getAbsolutePivotPoint = function () { + var e = a.e.Zero(); + return this.getAbsolutePivotPointToRef(e), e; + }), + (t.prototype.getAbsolutePivotPointToRef = function (e) { + return (e.x = this._pivotMatrix.m[12]), (e.y = this._pivotMatrix.m[13]), (e.z = this._pivotMatrix.m[14]), this.getPivotPointToRef(e), a.e.TransformCoordinatesToRef(e, this.getWorldMatrix(), e), this; + }), + (t.prototype.setParent = function (e) { + if (!e && !this.parent) return this; + var t = a.c.Quaternion[0], + n = a.c.Vector3[0], + i = a.c.Vector3[1]; + if (e) { + var r = a.c.Matrix[0], + o = a.c.Matrix[1]; + this.computeWorldMatrix(!0), e.computeWorldMatrix(!0), e.getWorldMatrix().invertToRef(o), this.getWorldMatrix().multiplyToRef(o, r), r.decompose(i, t, n); + } else this.computeWorldMatrix(!0), this.getWorldMatrix().decompose(i, t, n); + return this.rotationQuaternion ? this.rotationQuaternion.copyFrom(t) : t.toEulerAnglesToRef(this.rotation), this.scaling.copyFrom(i), this.position.copyFrom(n), (this.parent = e), this; + }), + Object.defineProperty(t.prototype, "nonUniformScaling", { + get: function () { + return this._nonUniformScaling; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._updateNonUniformScalingState = function (e) { + return this._nonUniformScaling !== e && ((this._nonUniformScaling = e), !0); + }), + (t.prototype.attachToBone = function (e, t) { + return (this._transformToBoneReferal = t), (this.parent = e), e.getWorldMatrix().determinant() < 0 && (this.scalingDeterminant *= -1), this; + }), + (t.prototype.detachFromBone = function () { + return this.parent ? (this.parent.getWorldMatrix().determinant() < 0 && (this.scalingDeterminant *= -1), (this._transformToBoneReferal = null), (this.parent = null), this) : this; + }), + (t.prototype.rotate = function (e, n, i) { + var r; + if ((e.normalize(), this.rotationQuaternion || ((this.rotationQuaternion = this.rotation.toQuaternion()), this.rotation.setAll(0)), i && i !== c.b.LOCAL)) { + if (this.parent) { + var o = a.c.Matrix[0]; + this.parent.getWorldMatrix().invertToRef(o), (e = a.e.TransformNormal(e, o)); + } + (r = a.b.RotationAxisToRef(e, n, t._rotationAxisCache)).multiplyToRef(this.rotationQuaternion, this.rotationQuaternion); + } else (r = a.b.RotationAxisToRef(e, n, t._rotationAxisCache)), this.rotationQuaternion.multiplyToRef(r, this.rotationQuaternion); + return this; + }), + (t.prototype.rotateAround = function (e, t, n) { + t.normalize(), this.rotationQuaternion || ((this.rotationQuaternion = a.b.RotationYawPitchRoll(this.rotation.y, this.rotation.x, this.rotation.z)), this.rotation.setAll(0)); + var i = a.c.Vector3[0], + r = a.c.Vector3[1], + o = a.c.Vector3[2], + s = a.c.Quaternion[0], + c = a.c.Matrix[0], + l = a.c.Matrix[1], + u = a.c.Matrix[2], + h = a.c.Matrix[3]; + return ( + e.subtractToRef(this.position, i), + a.a.TranslationToRef(i.x, i.y, i.z, c), + a.a.TranslationToRef(-i.x, -i.y, -i.z, l), + a.a.RotationAxisToRef(t, n, u), + l.multiplyToRef(u, h), + h.multiplyToRef(c, h), + h.decompose(r, s, o), + this.position.addInPlace(o), + s.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion), + this + ); + }), + (t.prototype.translate = function (e, t, n) { + var i = e.scale(t); + if (n && n !== c.b.LOCAL) this.setAbsolutePosition(this.getAbsolutePosition().add(i)); + else { + var r = this.getPositionExpressedInLocalSpace().add(i); + this.setPositionWithLocalVector(r); + } + return this; + }), + (t.prototype.addRotation = function (e, t, n) { + var i; + this.rotationQuaternion ? (i = this.rotationQuaternion) : ((i = a.c.Quaternion[1]), a.b.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, i)); + var r = a.c.Quaternion[0]; + return a.b.RotationYawPitchRollToRef(t, e, n, r), i.multiplyInPlace(r), this.rotationQuaternion || i.toEulerAnglesToRef(this.rotation), this; + }), + (t.prototype._getEffectiveParent = function () { + return this.parent; + }), + (t.prototype.computeWorldMatrix = function (e) { + if (this._isWorldMatrixFrozen && !this._isDirty) return this._worldMatrix; + var n = this.getScene().getRenderId(); + if (!this._isDirty && !e && this.isSynchronized()) return (this._currentRenderId = n), this._worldMatrix; + var i = this.getScene().activeCamera, + r = 0 != (this._billboardMode & t.BILLBOARDMODE_USE_POSITION), + o = this._billboardMode !== t.BILLBOARDMODE_NONE && !this.preserveParentRotationForBillboard; + o && + i && + r && + (this.lookAt(i.position), + (this.billboardMode & t.BILLBOARDMODE_X) !== t.BILLBOARDMODE_X && (this.rotation.x = 0), + (this.billboardMode & t.BILLBOARDMODE_Y) !== t.BILLBOARDMODE_Y && (this.rotation.y = 0), + (this.billboardMode & t.BILLBOARDMODE_Z) !== t.BILLBOARDMODE_Z && (this.rotation.z = 0)), + this._updateCache(); + var s = this._cache; + (s.pivotMatrixUpdated = !1), (s.billboardMode = this.billboardMode), (s.infiniteDistance = this.infiniteDistance), (this._currentRenderId = n), this._childUpdateId++, (this._isDirty = !1); + var c = this._getEffectiveParent(), + l = s.scaling, + u = s.position; + if (this._infiniteDistance) + if (!this.parent && i) { + var h = i.getWorldMatrix(), + d = new a.e(h.m[12], h.m[13], h.m[14]); + u.copyFromFloats(this._position.x + d.x, this._position.y + d.y, this._position.z + d.z); + } else u.copyFrom(this._position); + else u.copyFrom(this._position); + l.copyFromFloats(this._scaling.x * this.scalingDeterminant, this._scaling.y * this.scalingDeterminant, this._scaling.z * this.scalingDeterminant); + var p = s.rotationQuaternion; + if (this._rotationQuaternion) { + if (this.reIntegrateRotationIntoRotationQuaternion) + this.rotation.lengthSquared() && (this._rotationQuaternion.multiplyInPlace(a.b.RotationYawPitchRoll(this._rotation.y, this._rotation.x, this._rotation.z)), this._rotation.copyFromFloats(0, 0, 0)); + p.copyFrom(this._rotationQuaternion); + } else a.b.RotationYawPitchRollToRef(this._rotation.y, this._rotation.x, this._rotation.z, p), s.rotation.copyFrom(this._rotation); + if (this._usePivotMatrix) { + var f = a.c.Matrix[1]; + a.a.ScalingToRef(l.x, l.y, l.z, f); + var m = a.c.Matrix[0]; + p.toRotationMatrix(m), + this._pivotMatrix.multiplyToRef(f, a.c.Matrix[4]), + a.c.Matrix[4].multiplyToRef(m, this._localMatrix), + this._postMultiplyPivotMatrix && this._localMatrix.multiplyToRef(this._pivotMatrixInverse, this._localMatrix), + this._localMatrix.addTranslationFromFloats(u.x, u.y, u.z); + } else a.a.ComposeToRef(l, p, u, this._localMatrix); + if (c && c.getWorldMatrix) { + if ((e && c.computeWorldMatrix(), o)) { + this._transformToBoneReferal ? c.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), a.c.Matrix[7]) : a.c.Matrix[7].copyFrom(c.getWorldMatrix()); + var g = a.c.Vector3[5], + b = a.c.Vector3[6]; + a.c.Matrix[7].decompose(b, void 0, g), a.a.ScalingToRef(b.x, b.y, b.z, a.c.Matrix[7]), a.c.Matrix[7].setTranslation(g), this._localMatrix.multiplyToRef(a.c.Matrix[7], this._worldMatrix); + } else + this._transformToBoneReferal + ? (this._localMatrix.multiplyToRef(c.getWorldMatrix(), a.c.Matrix[6]), a.c.Matrix[6].multiplyToRef(this._transformToBoneReferal.getWorldMatrix(), this._worldMatrix)) + : this._localMatrix.multiplyToRef(c.getWorldMatrix(), this._worldMatrix); + this._markSyncedWithParent(); + } else this._worldMatrix.copyFrom(this._localMatrix); + if (o && i && this.billboardMode && !r) { + var _ = a.c.Vector3[0]; + if ( + (this._worldMatrix.getTranslationToRef(_), + a.c.Matrix[1].copyFrom(i.getViewMatrix()), + a.c.Matrix[1].setTranslationFromFloats(0, 0, 0), + a.c.Matrix[1].invertToRef(a.c.Matrix[0]), + (this.billboardMode & t.BILLBOARDMODE_ALL) !== t.BILLBOARDMODE_ALL) + ) { + a.c.Matrix[0].decompose(void 0, a.c.Quaternion[0], void 0); + var v = a.c.Vector3[1]; + a.c.Quaternion[0].toEulerAnglesToRef(v), + (this.billboardMode & t.BILLBOARDMODE_X) !== t.BILLBOARDMODE_X && (v.x = 0), + (this.billboardMode & t.BILLBOARDMODE_Y) !== t.BILLBOARDMODE_Y && (v.y = 0), + (this.billboardMode & t.BILLBOARDMODE_Z) !== t.BILLBOARDMODE_Z && (v.z = 0), + a.a.RotationYawPitchRollToRef(v.y, v.x, v.z, a.c.Matrix[0]); + } + this._worldMatrix.setTranslationFromFloats(0, 0, 0), this._worldMatrix.multiplyToRef(a.c.Matrix[0], this._worldMatrix), this._worldMatrix.setTranslation(a.c.Vector3[0]); + } + return ( + this.ignoreNonUniformScaling + ? this._updateNonUniformScalingState(!1) + : this._scaling.isNonUniform + ? this._updateNonUniformScalingState(!0) + : c && c._nonUniformScaling + ? this._updateNonUniformScalingState(c._nonUniformScaling) + : this._updateNonUniformScalingState(!1), + this._afterComputeWorldMatrix(), + this._absolutePosition.copyFromFloats(this._worldMatrix.m[12], this._worldMatrix.m[13], this._worldMatrix.m[14]), + (this._isAbsoluteSynced = !1), + this.onAfterWorldMatrixUpdateObservable.notifyObservers(this), + this._poseMatrix || (this._poseMatrix = a.a.Invert(this._worldMatrix)), + (this._worldMatrixDeterminantIsDirty = !0), + this._worldMatrix + ); + }), + (t.prototype.resetLocalMatrix = function (e) { + if ((void 0 === e && (e = !0), this.computeWorldMatrix(), e)) + for (var t = this.getChildren(), n = 0; n < t.length; ++n) { + var i = t[n]; + if (i) { + i.computeWorldMatrix(); + var r = a.c.Matrix[0]; + i._localMatrix.multiplyToRef(this._localMatrix, r); + var o = a.c.Quaternion[0]; + r.decompose(i.scaling, o, i.position), i.rotationQuaternion ? (i.rotationQuaternion = o) : o.toEulerAnglesToRef(i.rotation); + } + } + this.scaling.copyFromFloats(1, 1, 1), + this.position.copyFromFloats(0, 0, 0), + this.rotation.copyFromFloats(0, 0, 0), + this.rotationQuaternion && (this.rotationQuaternion = a.b.Identity()), + (this._worldMatrix = a.a.Identity()); + }), + (t.prototype._afterComputeWorldMatrix = function () {}), + (t.prototype.registerAfterWorldMatrixUpdate = function (e) { + return this.onAfterWorldMatrixUpdateObservable.add(e), this; + }), + (t.prototype.unregisterAfterWorldMatrixUpdate = function (e) { + return this.onAfterWorldMatrixUpdateObservable.removeCallback(e), this; + }), + (t.prototype.getPositionInCameraSpace = function (e) { + return void 0 === e && (e = null), e || (e = this.getScene().activeCamera), a.e.TransformCoordinates(this.absolutePosition, e.getViewMatrix()); + }), + (t.prototype.getDistanceToCamera = function (e) { + return void 0 === e && (e = null), e || (e = this.getScene().activeCamera), this.absolutePosition.subtract(e.globalPosition).length(); + }), + (t.prototype.clone = function (e, n, i) { + var o = this, + a = r.a.Clone(function () { + return new t(e, o.getScene()); + }, this); + if (((a.name = e), (a.id = e), n && (a.parent = n), !i)) + for (var s = this.getDescendants(!0), c = 0; c < s.length; c++) { + var l = s[c]; + l.clone && l.clone(e + "." + l.name, a); + } + return a; + }), + (t.prototype.serialize = function (e) { + var t = r.a.Serialize(this, e); + return ( + (t.type = this.getClassName()), this.parent && (t.parentId = this.parent.id), (t.localMatrix = this.getPivotMatrix().asArray()), (t.isEnabled = this.isEnabled()), this.parent && (t.parentId = this.parent.id), t + ); + }), + (t.Parse = function (e, n, i) { + var o = r.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + return ( + e.localMatrix ? o.setPreTransformMatrix(a.a.FromArray(e.localMatrix)) : e.pivotMatrix && o.setPivotMatrix(a.a.FromArray(e.pivotMatrix)), + o.setEnabled(e.isEnabled), + e.parentId && (o._waitingParentId = e.parentId), + o + ); + }), + (t.prototype.getChildTransformNodes = function (e, n) { + var i = []; + return ( + this._getDescendants(i, e, function (e) { + return (!n || n(e)) && e instanceof t; + }), + i + ); + }), + (t.prototype.dispose = function (t, n) { + if ((void 0 === n && (n = !1), this.getScene().stopAnimation(this), this.getScene().removeTransformNode(this), this.onAfterWorldMatrixUpdateObservable.clear(), t)) + for (var i = 0, r = this.getChildTransformNodes(!0); i < r.length; i++) { + var o = r[i]; + (o.parent = null), o.computeWorldMatrix(!0); + } + e.prototype.dispose.call(this, t, n); + }), + (t.prototype.normalizeToUnitCube = function (e, t, n) { + void 0 === e && (e = !0), void 0 === t && (t = !1); + var i = null, + r = null; + t && (this.rotationQuaternion ? ((r = this.rotationQuaternion.clone()), this.rotationQuaternion.copyFromFloats(0, 0, 0, 1)) : this.rotation && ((i = this.rotation.clone()), this.rotation.copyFromFloats(0, 0, 0))); + var o = this.getHierarchyBoundingVectors(e, n), + a = o.max.subtract(o.min), + s = Math.max(a.x, a.y, a.z); + if (0 === s) return this; + var c = 1 / s; + return this.scaling.scaleInPlace(c), t && (this.rotationQuaternion && r ? this.rotationQuaternion.copyFrom(r) : this.rotation && i && this.rotation.copyFrom(i)), this; + }), + (t.prototype._syncAbsoluteScalingAndRotation = function () { + this._isAbsoluteSynced || (this._worldMatrix.decompose(this._absoluteScaling, this._absoluteRotationQuaternion), (this._isAbsoluteSynced = !0)); + }), + (t.BILLBOARDMODE_NONE = 0), + (t.BILLBOARDMODE_X = 1), + (t.BILLBOARDMODE_Y = 2), + (t.BILLBOARDMODE_Z = 4), + (t.BILLBOARDMODE_ALL = 7), + (t.BILLBOARDMODE_USE_POSITION = 128), + (t._lookAtVectorCache = new a.e(0, 0, 0)), + (t._rotationAxisCache = new a.b()), + Object(i.c)([Object(r.o)("position")], t.prototype, "_position", void 0), + Object(i.c)([Object(r.o)("rotation")], t.prototype, "_rotation", void 0), + Object(i.c)([Object(r.l)("rotationQuaternion")], t.prototype, "_rotationQuaternion", void 0), + Object(i.c)([Object(r.o)("scaling")], t.prototype, "_scaling", void 0), + Object(i.c)([Object(r.c)("billboardMode")], t.prototype, "_billboardMode", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "scalingDeterminant", void 0), + Object(i.c)([Object(r.c)("infiniteDistance")], t.prototype, "_infiniteDistance", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "ignoreNonUniformScaling", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "reIntegrateRotationIntoRotationQuaternion", void 0), + t + ); + })(s.a); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameController = t.ETR2RenderingGroup = void 0); + const r = n(248), + o = n(271), + a = n(272), + s = n(273), + c = n(139), + l = n(277), + u = n(29), + h = n(278), + d = n(280), + p = n(281), + f = n(283), + m = n(284), + g = n(285), + b = n(52), + _ = n(286), + v = n(237), + y = n(288), + C = n(289), + P = n(48), + x = n(19); + var T; + !(function (e) { + (e[(e.SKYBOX = 0)] = "SKYBOX"), (e[(e.TRACK_PIECES = 1)] = "TRACK_PIECES"), (e[(e.CHARACTER = 1)] = "CHARACTER"), (e[(e.PICK_UPS = 1)] = "PICK_UPS"), (e[(e.PARTICLES = 2)] = "PARTICLES"), (e[(e.UI = 3)] = "UI"); + })((T = t.ETR2RenderingGroup || (t.ETR2RenderingGroup = {}))); + class S { + constructor() { + (this._isStarted = !1), (this._isPaused = !0), (this._afterAdEvent = void 0), (this._isCheckingFocus = !1), (this._timeIntervalResume = void 0), (this.isRestarting = !1); + } + static get instance() { + return null == this._instance && (this._instance = new S()), this._instance; + } + initialize(e, t) { + (this._canvas = e), + (this._scene = t), + (this._controllers = new Array()), + this._scene.freezeMaterials(), + (this._scene.blockMaterialDirtyMechanism = !0), + (this._scene.autoClear = !1), + (this._scene.autoClearDepthAndStencil = !0), + this._scene.setRenderingAutoClearDepthStencil(T.PARTICLES, !1), + (this._gameState = b.gameState.getStateFromStore()), + b.gameState.subscribe((e) => { + this._gameState = e; + }), + (this._inputController = new a.GameInputContoller(this._scene)), + this._controllers.push(this._inputController), + (this._soundController = new c.SoundController(this._scene)), + this._controllers.push(this._soundController), + (this._particleController = new p.ParticleController(this._scene)), + this._controllers.push(this._particleController), + (this._skyboxController = new l.SkyboxController(this._scene)), + this._controllers.push(this._skyboxController), + (this._characterController = new r.CharacterController(this._scene)), + this._controllers.push(this._characterController), + (this._monkeyController = new o.MonkeyController(this._scene)), + this._controllers.push(this._monkeyController), + (this._coinsController = new h.CoinsController(this._scene)), + this._controllers.push(this._coinsController), + (this._bonusController = new f.BonusController(this._scene)), + this._controllers.push(this._bonusController), + (this._cameraController = new d.CameraController(this._scene)), + this._controllers.push(this._cameraController), + (this._powerupController = new m.PowerupController(this._scene)), + this._controllers.push(this._powerupController), + (this._characterFXController = new _.CharacterFXController(this._scene)), + this._controllers.push(this._characterFXController), + (this._shadersController = new v.ShadersController(this._scene)), + this._controllers.push(this._shadersController), + (this._tutorialController = new g.TutorialController(this._scene)), + this._controllers.push(this._tutorialController), + (this._dailyChallengesController = new y.DailyChallengesController(this._scene)), + this._controllers.push(this._dailyChallengesController), + (this._chestController = new C.ChestController(this._scene)), + this._controllers.push(this._chestController), + (this._trackController = new s.TrackController(this._scene)), + this._controllers.push(this._trackController), + this._initialize(), + this._scene.registerBeforeRender(() => { + this._preUpdate(); + }), + this._scene.registerAfterRender(() => { + this._postUpdate(); + }), + this._initializeEvents(); + } + _initializeEvents() { + u.EventHandler.instance.addListener(u.EventID.OnContinueGame, () => { + S.instance.powerup.reset(), S.instance.sound.reset(), this.character.setToResurrectionState(), this._monkeyController.goIdle(), u.EventHandler.instance.fireEvent(u.EventID.OnResumeGame, !0); + }), + u.EventHandler.instance.addListener(u.EventID.OnEndGame, () => { + this._isStarted = !1; + }), + u.EventHandler.instance.addListener(u.EventID.OnResetGame, this._reset.bind(this)), + u.EventHandler.instance.addListener(u.EventID.OnPauseGame, this._pause.bind(this)), + u.EventHandler.instance.addListener(u.EventID.OnResumeGame, (e) => { + e ? this._resumeWithGrace() : this._resume(); + }), + u.EventHandler.instance.addListener(u.EventID.OnPlayerDeath, () => { + this._isPaused = !0; + }), + u.EventHandler.instance.addListener(u.EventID.OnPlayGame, () => { + (this._isStarted = !0), (this._isPaused = !1); + }), + u.EventHandler.instance.addListener(u.EventID.OnKeyPress, (e) => { + "Escape" == e && 0 == this._isPaused && u.EventHandler.instance.fireEvent(u.EventID.OnPauseGame); + }), + this._attachDocEvents(); + } + _attachDocEvents() { + window.addEventListener( + "blur", + () => { + this._checkGameFocus(x.WebUtils.isIOS); + }, + { passive: !1 } + ), + document.addEventListener( + "blur", + () => { + this._checkGameFocus(); + }, + { passive: !1 } + ); + let e = "visibilitychange", + t = document; + null != t.webkitHidden ? (e = "webkitvisibilitychange") : null != t.mozHidden ? (e = "mozvisibilitychange") : null != t.msHidden && (e = "msvisibilitychange"), + document.addEventListener( + e, + () => { + (t = document), ("hidden" == document.visibilityState || t.webkitHidden || t.mozHidden || t.msHidden) && this._checkGameFocus(); + }, + { passive: !1 } + ); + } + checkGameAfterAd(e) { + this._afterAdEvent = e; + } + _checkGameFocus(e = !1) { + return i(this, void 0, void 0, function* () { + if (this._isCheckingFocus) return; + this._isCheckingFocus = !0; + const t = document.hasFocus(); + null != this._afterAdEvent && t + ? (u.EventHandler.instance.fireEvent(this._afterAdEvent.eventId, this._afterAdEvent.args), (this._afterAdEvent = void 0)) + : !this.isGameRunning || (t && !e) + ? this.isGameRunning && document.activeElement != this._canvas && this._canvas.focus() + : ((this._isPaused = !0), u.EventHandler.instance.fireEvent(u.EventID.OnPauseGame)), + 0 == P.GameConfig.IS_AD_PLAYING && (document.hasFocus() ? u.EventHandler.instance.fireEvent(u.EventID.UnmuteAll) : u.EventHandler.instance.fireEvent(u.EventID.MuteAll)), + (this._isCheckingFocus = !1); + }); + } + _initialize() { + this._controllers.forEach((e) => { + e.initialize(); + }); + } + _preUpdate() { + this._checkGameFocus(), + this._controllers.forEach((e) => { + e.preUpdate(); + }); + } + _postUpdate() { + this._controllers.forEach((e) => { + e.postUpdate(); + }); + } + _pause() { + null != this._timeIntervalResume && (clearInterval(this._timeIntervalResume), (this._timeIntervalResume = null)), + (this._isPaused = !0), + this._controllers.forEach((e) => { + e.pause(); + }); + } + _resume() { + (this._isPaused = !1), + this._controllers.forEach((e) => { + e.resume(); + }); + } + _resumeWithGrace() { + let e = 3; + u.EventHandler.instance.fireEvent(u.EventID.OnResumeCounterChange, e), + (this._timeIntervalResume = setInterval(() => { + e--, u.EventHandler.instance.fireEvent(u.EventID.OnResumeCounterChange, e), e <= 0 && (clearInterval(this._timeIntervalResume), (this._timeIntervalResume = void 0), this._resume()); + }, 1e3)); + } + _reset() { + (this._isStarted = !1), + (this._isPaused = !0), + this._controllers.forEach((e) => { + e.reset(); + }); + } + get isGameStarted() { + return this._isStarted; + } + get isGameRunning() { + return this._isStarted && !this._isPaused; + } + get input() { + return this._inputController; + } + get track() { + return this._trackController; + } + get coins() { + return this._coinsController; + } + get bonus() { + return this._bonusController; + } + get character() { + return this._characterController; + } + get camera() { + return this._cameraController; + } + get sound() { + return this._soundController; + } + get particle() { + return this._particleController; + } + get skybox() { + return this._skyboxController; + } + get tutorial() { + return this._tutorialController; + } + get powerup() { + return this._powerupController; + } + get shader() { + return this._shadersController; + } + get dailyChallenges() { + return this._dailyChallengesController; + } + get gameState() { + return this._gameState; + } + } + t.GameController = S; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._isDirty = !0), + (this._areLightsDirty = !0), + (this._areLightsDisposed = !1), + (this._areAttributesDirty = !0), + (this._areTexturesDirty = !0), + (this._areFresnelDirty = !0), + (this._areMiscDirty = !0), + (this._areImageProcessingDirty = !0), + (this._normals = !1), + (this._uvs = !1), + (this._needNormals = !1), + (this._needUVs = !1); + } + return ( + Object.defineProperty(e.prototype, "isDirty", { + get: function () { + return this._isDirty; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.markAsProcessed = function () { + (this._isDirty = !1), + (this._areAttributesDirty = !1), + (this._areTexturesDirty = !1), + (this._areFresnelDirty = !1), + (this._areLightsDirty = !1), + (this._areLightsDisposed = !1), + (this._areMiscDirty = !1), + (this._areImageProcessingDirty = !1); + }), + (e.prototype.markAsUnprocessed = function () { + this._isDirty = !0; + }), + (e.prototype.markAllAsDirty = function () { + (this._areTexturesDirty = !0), (this._areAttributesDirty = !0), (this._areLightsDirty = !0), (this._areFresnelDirty = !0), (this._areMiscDirty = !0), (this._areImageProcessingDirty = !0), (this._isDirty = !0); + }), + (e.prototype.markAsImageProcessingDirty = function () { + (this._areImageProcessingDirty = !0), (this._isDirty = !0); + }), + (e.prototype.markAsLightDirty = function (e) { + void 0 === e && (e = !1), (this._areLightsDirty = !0), (this._areLightsDisposed = this._areLightsDisposed || e), (this._isDirty = !0); + }), + (e.prototype.markAsAttributesDirty = function () { + (this._areAttributesDirty = !0), (this._isDirty = !0); + }), + (e.prototype.markAsTexturesDirty = function () { + (this._areTexturesDirty = !0), (this._isDirty = !0); + }), + (e.prototype.markAsFresnelDirty = function () { + (this._areFresnelDirty = !0), (this._isDirty = !0); + }), + (e.prototype.markAsMiscDirty = function () { + (this._areMiscDirty = !0), (this._isDirty = !0); + }), + (e.prototype.rebuild = function () { + this._keys && delete this._keys, (this._keys = []); + for (var e = 0, t = Object.keys(this); e < t.length; e++) { + var n = t[e]; + "_" !== n[0] && this._keys.push(n); + } + }), + (e.prototype.isEqual = function (e) { + if (this._keys.length !== e._keys.length) return !1; + for (var t = 0; t < this._keys.length; t++) { + var n = this._keys[t]; + if (this[n] !== e[n]) return !1; + } + return !0; + }), + (e.prototype.cloneTo = function (e) { + this._keys.length !== e._keys.length && (e._keys = this._keys.slice(0)); + for (var t = 0; t < this._keys.length; t++) { + var n = this._keys[t]; + e[n] = this[n]; + } + }), + (e.prototype.reset = function () { + for (var e = 0; e < this._keys.length; e++) { + var t = this._keys[e]; + switch (typeof this[t]) { + case "number": + this[t] = 0; + break; + case "string": + this[t] = ""; + break; + default: + this[t] = !1; + } + } + }), + (e.prototype.toString = function () { + for (var e = "", t = 0; t < this._keys.length; t++) { + var n = this._keys[t], + i = this[n]; + switch (typeof i) { + case "number": + case "string": + e += "#define " + n + " " + i + "\n"; + break; + default: + i && (e += "#define " + n + "\n"); + } + } + return e; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }), + n.d(t, "b", function () { + return s; + }); + var i = n(10), + r = n(3), + o = n(26), + a = {}, + s = (function () { + function e(e) { + (this.attached = {}), (this.camera = e), (this.checkInputs = function () {}); + } + return ( + (e.prototype.add = function (e) { + var t = e.getSimpleName(); + this.attached[t] + ? i.a.Warn("camera input of type " + t + " already exists on camera") + : ((this.attached[t] = e), (e.camera = this.camera), e.checkInputs && (this.checkInputs = this._addCheckInputs(e.checkInputs.bind(e))), this.attachedElement && e.attachControl(this.attachedElement)); + }), + (e.prototype.remove = function (e) { + for (var t in this.attached) { + var n = this.attached[t]; + n === e && (n.detachControl(this.attachedElement), (n.camera = null), delete this.attached[t], this.rebuildInputCheck()); + } + }), + (e.prototype.removeByType = function (e) { + for (var t in this.attached) { + var n = this.attached[t]; + n.getClassName() === e && (n.detachControl(this.attachedElement), (n.camera = null), delete this.attached[t], this.rebuildInputCheck()); + } + }), + (e.prototype._addCheckInputs = function (e) { + var t = this.checkInputs; + return function () { + t(), e(); + }; + }), + (e.prototype.attachInput = function (e) { + this.attachedElement && e.attachControl(this.attachedElement, this.noPreventDefault); + }), + (e.prototype.attachElement = function (e, t) { + if ((void 0 === t && (t = !1), !this.attachedElement)) + for (var n in ((t = !o.a.ForceAttachControlToAlwaysPreventDefault && t), (this.attachedElement = e), (this.noPreventDefault = t), this.attached)) this.attached[n].attachControl(e, t); + }), + (e.prototype.detachElement = function (e, t) { + if ((void 0 === t && (t = !1), this.attachedElement === e)) { + for (var n in this.attached) this.attached[n].detachControl(e), t && (this.attached[n].camera = null); + this.attachedElement = null; + } + }), + (e.prototype.rebuildInputCheck = function () { + for (var e in ((this.checkInputs = function () {}), this.attached)) { + var t = this.attached[e]; + t.checkInputs && (this.checkInputs = this._addCheckInputs(t.checkInputs.bind(t))); + } + }), + (e.prototype.clear = function () { + this.attachedElement && this.detachElement(this.attachedElement, !0), (this.attached = {}), (this.attachedElement = null), (this.checkInputs = function () {}); + }), + (e.prototype.serialize = function (e) { + var t = {}; + for (var n in this.attached) { + var i = this.attached[n], + o = r.a.Serialize(i); + t[i.getClassName()] = o; + } + e.inputsmgr = t; + }), + (e.prototype.parse = function (e) { + var t = e.inputsmgr; + if (t) + for (var n in (this.clear(), t)) { + if ((s = a[n])) { + var i = t[n], + o = r.a.Parse( + function () { + return new s(); + }, + i, + null + ); + this.add(o); + } + } + else + for (var n in this.attached) { + var s; + if ((s = a[this.attached[n].getClassName()])) { + o = r.a.Parse( + function () { + return new s(); + }, + e, + null + ); + this.remove(this.attached[n]), this.add(o); + } + } + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._defines = {}), (this._currentRank = 32), (this._maxRank = -1), (this._mesh = null); + } + return ( + (e.prototype.unBindMesh = function () { + this._mesh = null; + }), + (e.prototype.addFallback = function (e, t) { + this._defines[e] || (e < this._currentRank && (this._currentRank = e), e > this._maxRank && (this._maxRank = e), (this._defines[e] = new Array())), this._defines[e].push(t); + }), + (e.prototype.addCPUSkinningFallback = function (e, t) { + (this._mesh = t), e < this._currentRank && (this._currentRank = e), e > this._maxRank && (this._maxRank = e); + }), + Object.defineProperty(e.prototype, "hasMoreFallbacks", { + get: function () { + return this._currentRank <= this._maxRank; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.reduce = function (e, t) { + if (this._mesh && this._mesh.computeBonesUsingShaders && this._mesh.numBoneInfluencers > 0) { + (this._mesh.computeBonesUsingShaders = !1), (e = e.replace("#define NUM_BONE_INFLUENCERS " + this._mesh.numBoneInfluencers, "#define NUM_BONE_INFLUENCERS 0")), (t._bonesComputationForcedToCPU = !0); + for (var n = this._mesh.getScene(), i = 0; i < n.meshes.length; i++) { + var r = n.meshes[i]; + if (r.material) { + if (r.computeBonesUsingShaders && 0 !== r.numBoneInfluencers) + if (r.material.getEffect() === t) r.computeBonesUsingShaders = !1; + else if (r.subMeshes) + for (var o = 0, a = r.subMeshes; o < a.length; o++) { + if (a[o].effect === t) { + r.computeBonesUsingShaders = !1; + break; + } + } + } else !this._mesh.material && r.computeBonesUsingShaders && r.numBoneInfluencers > 0 && (r.computeBonesUsingShaders = !1); + } + } else { + var s = this._defines[this._currentRank]; + if (s) for (i = 0; i < s.length; i++) e = e.replace("#define " + s[i], ""); + this._currentRank++; + } + return e; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return h; + }); + var i = n(2), + r = n(6), + o = n(12), + a = n(1), + s = n(8), + c = n(135), + l = n(136), + u = (n(166), n(209), n(14)), + h = (function (e) { + function t(t, n, i, o, c, u, h, d, p, f, m, g, b) { + void 0 === c && (c = !0), + void 0 === u && (u = 0), + void 0 === h && (h = !1), + void 0 === d && (d = s.a.TRILINEAR_SAMPLINGMODE), + void 0 === p && (p = !0), + void 0 === f && (f = !1), + void 0 === m && (m = !1), + void 0 === g && (g = 5), + void 0 === b && (b = !1); + var _ = e.call(this, null, i, !o) || this; + return ( + (_.isCube = h), + (_.renderParticles = !0), + (_.renderSprites = !1), + (_.coordinatesMode = s.a.PROJECTION_MODE), + (_.ignoreCameraViewport = !1), + (_.onBeforeBindObservable = new r.c()), + (_.onAfterUnbindObservable = new r.c()), + (_.onBeforeRenderObservable = new r.c()), + (_.onAfterRenderObservable = new r.c()), + (_.onClearObservable = new r.c()), + (_.onResizeObservable = new r.c()), + (_._currentRefreshId = -1), + (_._refreshRate = 1), + (_._samples = 1), + (_.boundingBoxPosition = a.e.Zero()), + (i = _.getScene()) + ? ((_.renderList = new Array()), + (_._engine = i.getEngine()), + (_.name = t), + (_.isRenderTarget = !0), + (_._initialSizeParameter = n), + _._processSizeParameter(n), + (_._resizeObserver = _.getScene() + .getEngine() + .onResizeObservable.add(function () {})), + (_._generateMipMaps = !!o), + (_._doNotChangeAspectRatio = c), + (_._renderingManager = new l.b(i)), + (_._renderingManager._useSceneAutoClearSetup = !0), + m || + ((_._renderTargetOptions = { generateMipMaps: o, type: u, format: g, samplingMode: d, generateDepthBuffer: p, generateStencilBuffer: f }), + d === s.a.NEAREST_SAMPLINGMODE && ((_.wrapU = s.a.CLAMP_ADDRESSMODE), (_.wrapV = s.a.CLAMP_ADDRESSMODE)), + b || + (h + ? ((_._texture = i.getEngine().createRenderTargetCubeTexture(_.getRenderSize(), _._renderTargetOptions)), (_.coordinatesMode = s.a.INVCUBIC_MODE), (_._textureMatrix = a.a.Identity())) + : (_._texture = i.getEngine().createRenderTargetTexture(_._size, _._renderTargetOptions)))), + _) + : _ + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "renderList", { + get: function () { + return this._renderList; + }, + set: function (e) { + (this._renderList = e), this._renderList && this._hookArray(this._renderList); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._hookArray = function (e) { + var t = this, + n = e.push; + e.push = function () { + for (var i = [], r = 0; r < arguments.length; r++) i[r] = arguments[r]; + var o = 0 === e.length, + a = n.apply(e, i); + return ( + o && + t.getScene().meshes.forEach(function (e) { + e._markSubMeshesAsLightDirty(); + }), + a + ); + }; + var i = e.splice; + e.splice = function (n, r) { + var o = i.apply(e, [n, r]); + return ( + 0 === e.length && + t.getScene().meshes.forEach(function (e) { + e._markSubMeshesAsLightDirty(); + }), + o + ); + }; + }), + Object.defineProperty(t.prototype, "onAfterUnbind", { + set: function (e) { + this._onAfterUnbindObserver && this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver), (this._onAfterUnbindObserver = this.onAfterUnbindObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onBeforeRender", { + set: function (e) { + this._onBeforeRenderObserver && this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver), (this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onAfterRender", { + set: function (e) { + this._onAfterRenderObserver && this.onAfterRenderObservable.remove(this._onAfterRenderObserver), (this._onAfterRenderObserver = this.onAfterRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onClear", { + set: function (e) { + this._onClearObserver && this.onClearObservable.remove(this._onClearObserver), (this._onClearObserver = this.onClearObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "renderTargetOptions", { + get: function () { + return this._renderTargetOptions; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._onRatioRescale = function () { + this._sizeRatio && this.resize(this._initialSizeParameter); + }), + Object.defineProperty(t.prototype, "boundingBoxSize", { + get: function () { + return this._boundingBoxSize; + }, + set: function (e) { + if (!this._boundingBoxSize || !this._boundingBoxSize.equals(e)) { + this._boundingBoxSize = e; + var t = this.getScene(); + t && t.markAllMaterialsAsDirty(1); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "depthStencilTexture", { + get: function () { + var e; + return (null === (e = this.getInternalTexture()) || void 0 === e ? void 0 : e._depthStencilTexture) || null; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.createDepthStencilTexture = function (e, t, n) { + void 0 === e && (e = 0), void 0 === t && (t = !0), void 0 === n && (n = !1); + var i = this.getInternalTexture(); + if (this.getScene() && i) { + var r = this.getScene().getEngine(); + i._depthStencilTexture = r.createDepthStencilTexture(this._size, { bilinearFiltering: t, comparisonFunction: e, generateStencil: n, isCube: this.isCube }); + } + }), + (t.prototype._processSizeParameter = function (e) { + e.ratio + ? ((this._sizeRatio = e.ratio), + (this._size = { + width: this._bestReflectionRenderTargetDimension(this._engine.getRenderWidth(), this._sizeRatio), + height: this._bestReflectionRenderTargetDimension(this._engine.getRenderHeight(), this._sizeRatio), + })) + : (this._size = e); + }), + Object.defineProperty(t.prototype, "samples", { + get: function () { + return this._samples; + }, + set: function (e) { + if (this._samples !== e) { + var t = this.getScene(); + t && (this._samples = t.getEngine().updateRenderTargetTextureSampleCount(this._texture, e)); + } + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.resetRefreshCounter = function () { + this._currentRefreshId = -1; + }), + Object.defineProperty(t.prototype, "refreshRate", { + get: function () { + return this._refreshRate; + }, + set: function (e) { + (this._refreshRate = e), this.resetRefreshCounter(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.addPostProcess = function (e) { + if (!this._postProcessManager) { + var t = this.getScene(); + if (!t) return; + (this._postProcessManager = new c.a(t)), (this._postProcesses = new Array()); + } + this._postProcesses.push(e), (this._postProcesses[0].autoClear = !1); + }), + (t.prototype.clearPostProcesses = function (e) { + if ((void 0 === e && (e = !1), this._postProcesses)) { + if (e) + for (var t = 0, n = this._postProcesses; t < n.length; t++) { + n[t].dispose(); + } + this._postProcesses = []; + } + }), + (t.prototype.removePostProcess = function (e) { + if (this._postProcesses) { + var t = this._postProcesses.indexOf(e); + -1 !== t && (this._postProcesses.splice(t, 1), this._postProcesses.length > 0 && (this._postProcesses[0].autoClear = !1)); + } + }), + (t.prototype._shouldRender = function () { + return -1 === this._currentRefreshId || this.refreshRate === this._currentRefreshId ? ((this._currentRefreshId = 1), !0) : (this._currentRefreshId++, !1); + }), + (t.prototype.getRenderSize = function () { + return this.getRenderWidth(); + }), + (t.prototype.getRenderWidth = function () { + return this._size.width ? this._size.width : this._size; + }), + (t.prototype.getRenderHeight = function () { + return this._size.width ? this._size.height : this._size; + }), + (t.prototype.getRenderLayers = function () { + var e = this._size.layers; + return e || 0; + }), + Object.defineProperty(t.prototype, "canRescale", { + get: function () { + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.scale = function (e) { + var t = Math.max(1, this.getRenderSize() * e); + this.resize(t); + }), + (t.prototype.getReflectionTextureMatrix = function () { + return this.isCube ? this._textureMatrix : e.prototype.getReflectionTextureMatrix.call(this); + }), + (t.prototype.resize = function (e) { + var t = this.isCube; + this.releaseInternalTexture(); + var n = this.getScene(); + n && + (this._processSizeParameter(e), + (this._texture = t ? n.getEngine().createRenderTargetCubeTexture(this.getRenderSize(), this._renderTargetOptions) : n.getEngine().createRenderTargetTexture(this._size, this._renderTargetOptions)), + this.onResizeObservable.hasObservers() && this.onResizeObservable.notifyObservers(this)); + }), + (t.prototype.render = function (e, t) { + if ((void 0 === e && (e = !1), void 0 === t && (t = !1), (s = this.getScene()))) { + var n, + i = s.getEngine(); + if ((void 0 !== this.useCameraPostProcesses && (e = this.useCameraPostProcesses), this._waitingRenderList)) { + this.renderList = []; + for (var r = 0; r < this._waitingRenderList.length; r++) { + var o = this._waitingRenderList[r], + a = s.getMeshByID(o); + a && this.renderList.push(a); + } + delete this._waitingRenderList; + } + if (this.renderListPredicate) { + var s; + if ((this.renderList ? (this.renderList.length = 0) : (this.renderList = []), !(s = this.getScene()))) return; + var c = s.meshes; + for (r = 0; r < c.length; r++) { + var l = c[r]; + this.renderListPredicate(l) && this.renderList.push(l); + } + } + if ( + (this.onBeforeBindObservable.notifyObservers(this), + this.activeCamera + ? ((n = this.activeCamera), + i.setViewport(this.activeCamera.viewport, this.getRenderWidth(), this.getRenderHeight()), + this.activeCamera !== s.activeCamera && s.setTransformMatrix(this.activeCamera.getViewMatrix(), this.activeCamera.getProjectionMatrix(!0))) + : (n = s.activeCamera) && i.setViewport(n.viewport, this.getRenderWidth(), this.getRenderHeight()), + (this._defaultRenderListPrepared = !1), + this.is2DArray) + ) + for (var u = 0; u < this.getRenderLayers(); u++) this.renderToTarget(0, e, t, u, n), s.incrementRenderId(), s.resetCachedMaterial(); + else if (this.isCube) for (var h = 0; h < 6; h++) this.renderToTarget(h, e, t, void 0, n), s.incrementRenderId(), s.resetCachedMaterial(); + else this.renderToTarget(0, e, t, void 0, n); + this.onAfterUnbindObservable.notifyObservers(this), + s.activeCamera && + ((s.getEngine().scenes.length > 1 || (this.activeCamera && this.activeCamera !== s.activeCamera)) && s.setTransformMatrix(s.activeCamera.getViewMatrix(), s.activeCamera.getProjectionMatrix(!0)), + i.setViewport(s.activeCamera.viewport)), + s.resetCachedMaterial(); + } + }), + (t.prototype._bestReflectionRenderTargetDimension = function (e, t) { + var n = e * t, + i = u.a.NearestPOT(n + 16384 / (128 + n)); + return Math.min(u.a.FloorPOT(e), i); + }), + (t.prototype._prepareRenderingManager = function (e, t, n, i) { + var r = this.getScene(); + if (r) { + this._renderingManager.reset(); + for (var o = r.getRenderId(), a = 0; a < t; a++) { + var s = e[a]; + if (s) { + if (!s.isReady(0 === this.refreshRate)) { + this.resetRefreshCounter(); + continue; + } + s._preActivateForIntermediateRendering(o); + var c = void 0; + if (((c = !(!i || !n) && 0 == (s.layerMask & n.layerMask)), s.isEnabled() && s.isVisible && s.subMeshes && !c && s._activate(o, !0) && s.subMeshes.length)) { + s.isAnInstance ? (s = s.sourceMesh) : (s._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = !1), (s._internalAbstractMeshDataInfo._isActiveIntermediate = !0); + for (var l = 0; l < s.subMeshes.length; l++) { + var u = s.subMeshes[l]; + this._renderingManager.dispatch(u, s); + } + } + } + } + for (var h = 0; h < r.particleSystems.length; h++) { + var d = r.particleSystems[h], + p = d.emitter; + d.isStarted() && p && p.position && p.isEnabled() && e.indexOf(p) >= 0 && this._renderingManager.dispatchParticles(d); + } + } + }), + (t.prototype._bindFrameBuffer = function (e, t) { + void 0 === e && (e = 0), void 0 === t && (t = 0); + var n = this.getScene(); + if (n) { + var i = n.getEngine(); + this._texture && i.bindFramebuffer(this._texture, this.isCube ? e : void 0, void 0, void 0, this.ignoreCameraViewport, 0, t); + } + }), + (t.prototype.unbindFrameBuffer = function (e, t) { + var n = this; + this._texture && + e.unBindFramebuffer(this._texture, this.isCube, function () { + n.onAfterRenderObservable.notifyObservers(t); + }); + }), + (t.prototype.renderToTarget = function (e, t, n, i, r) { + void 0 === i && (i = 0), void 0 === r && (r = null); + var a = this.getScene(); + if (a) { + var s = a.getEngine(); + if (this._texture) { + this._postProcessManager ? this._postProcessManager._prepareFrame(this._texture, this._postProcesses) : (t && a.postProcessManager._prepareFrame(this._texture)) || this._bindFrameBuffer(e, i), + this.is2DArray ? this.onBeforeRenderObservable.notifyObservers(i) : this.onBeforeRenderObservable.notifyObservers(e); + var c = null, + l = this.renderList ? this.renderList : a.getActiveMeshes().data, + u = this.renderList ? this.renderList.length : a.getActiveMeshes().length; + this.getCustomRenderList && (c = this.getCustomRenderList(this.is2DArray ? i : e, l, u)), + c ? this._prepareRenderingManager(c, c.length, r, !1) : (this._defaultRenderListPrepared || (this._prepareRenderingManager(l, u, r, !this.renderList), (this._defaultRenderListPrepared = !0)), (c = l)), + this.onClearObservable.hasObservers() ? this.onClearObservable.notifyObservers(s) : s.clear(this.clearColor || a.clearColor, !0, !0, !0), + this._doNotChangeAspectRatio || a.updateTransformMatrix(!0); + for (var h = 0, d = a._beforeRenderTargetDrawStage; h < d.length; h++) { + d[h].action(this); + } + this._renderingManager.render(this.customRenderFunction, c, this.renderParticles, this.renderSprites); + for (var p = 0, f = a._afterRenderTargetDrawStage; p < f.length; p++) { + f[p].action(this); + } + this._postProcessManager ? this._postProcessManager._finalizeFrame(!1, this._texture, e, this._postProcesses, this.ignoreCameraViewport) : t && a.postProcessManager._finalizeFrame(!1, this._texture, e), + this._doNotChangeAspectRatio || a.updateTransformMatrix(!0), + n && o.b.DumpFramebuffer(this.getRenderWidth(), this.getRenderHeight(), s), + this.isCube && 5 !== e ? this.onAfterRenderObservable.notifyObservers(e) : (this.isCube && 5 === e && s.generateMipMapsForCubemap(this._texture), this.unbindFrameBuffer(s, e)); + } + } + }), + (t.prototype.setRenderingOrder = function (e, t, n, i) { + void 0 === t && (t = null), void 0 === n && (n = null), void 0 === i && (i = null), this._renderingManager.setRenderingOrder(e, t, n, i); + }), + (t.prototype.setRenderingAutoClearDepthStencil = function (e, t) { + this._renderingManager.setRenderingAutoClearDepthStencil(e, t), (this._renderingManager._useSceneAutoClearSetup = !1); + }), + (t.prototype.clone = function () { + var e = this.getSize(), + n = new t( + this.name, + e, + this.getScene(), + this._renderTargetOptions.generateMipMaps, + this._doNotChangeAspectRatio, + this._renderTargetOptions.type, + this.isCube, + this._renderTargetOptions.samplingMode, + this._renderTargetOptions.generateDepthBuffer, + this._renderTargetOptions.generateStencilBuffer + ); + return (n.hasAlpha = this.hasAlpha), (n.level = this.level), (n.coordinatesMode = this.coordinatesMode), this.renderList && (n.renderList = this.renderList.slice(0)), n; + }), + (t.prototype.serialize = function () { + if (!this.name) return null; + var t = e.prototype.serialize.call(this); + if (((t.renderTargetSize = this.getRenderSize()), (t.renderList = []), this.renderList)) for (var n = 0; n < this.renderList.length; n++) t.renderList.push(this.renderList[n].id); + return t; + }), + (t.prototype.disposeFramebufferObjects = function () { + var e = this.getInternalTexture(), + t = this.getScene(); + e && t && t.getEngine()._releaseFramebufferObjects(e); + }), + (t.prototype.dispose = function () { + this.onResizeObservable.clear(), + this.onClearObservable.clear(), + this.onAfterRenderObservable.clear(), + this.onAfterUnbindObservable.clear(), + this.onBeforeBindObservable.clear(), + this.onBeforeRenderObservable.clear(), + this._postProcessManager && (this._postProcessManager.dispose(), (this._postProcessManager = null)), + this.clearPostProcesses(!0), + this._resizeObserver && (this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver), (this._resizeObserver = null)), + (this.renderList = null); + var t = this.getScene(); + if (t) { + var n = t.customRenderTargets.indexOf(this); + n >= 0 && t.customRenderTargets.splice(n, 1); + for (var i = 0, r = t.cameras; i < r.length; i++) { + var o = r[i]; + (n = o.customRenderTargets.indexOf(this)) >= 0 && o.customRenderTargets.splice(n, 1); + } + this.depthStencilTexture && this.getScene().getEngine()._releaseTexture(this.depthStencilTexture), e.prototype.dispose.call(this); + } + }), + (t.prototype._rebuild = function () { + this.refreshRate === t.REFRESHRATE_RENDER_ONCE && (this.refreshRate = t.REFRESHRATE_RENDER_ONCE), this._postProcessManager && this._postProcessManager._rebuild(); + }), + (t.prototype.freeRenderingGroups = function () { + this._renderingManager && this._renderingManager.freeRenderingGroups(); + }), + (t.prototype.getViewCount = function () { + return 1; + }), + (t.REFRESHRATE_RENDER_ONCE = 0), + (t.REFRESHRATE_RENDER_ONEVERYFRAME = 1), + (t.REFRESHRATE_RENDER_ONEVERYTWOFRAMES = 2), + t + ); + })(s.a); + s.a._CreateRenderTargetTexture = function (e, t, n, i) { + return new h(e, t, n, i); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(179), + r = (function () { + function e() {} + return ( + (e.EnableFor = function (t) { + (t._tags = t._tags || {}), + (t.hasTags = function () { + return e.HasTags(t); + }), + (t.addTags = function (n) { + return e.AddTagsTo(t, n); + }), + (t.removeTags = function (n) { + return e.RemoveTagsFrom(t, n); + }), + (t.matchesTagsQuery = function (n) { + return e.MatchesQuery(t, n); + }); + }), + (e.DisableFor = function (e) { + delete e._tags, delete e.hasTags, delete e.addTags, delete e.removeTags, delete e.matchesTagsQuery; + }), + (e.HasTags = function (e) { + if (!e._tags) return !1; + var t = e._tags; + for (var n in t) if (t.hasOwnProperty(n)) return !0; + return !1; + }), + (e.GetTags = function (e, t) { + if ((void 0 === t && (t = !0), !e._tags)) return null; + if (t) { + var n = []; + for (var i in e._tags) e._tags.hasOwnProperty(i) && !0 === e._tags[i] && n.push(i); + return n.join(" "); + } + return e._tags; + }), + (e.AddTagsTo = function (t, n) { + n && + "string" == typeof n && + n.split(" ").forEach(function (n, i, r) { + e._AddTagTo(t, n); + }); + }), + (e._AddTagTo = function (t, n) { + "" !== (n = n.trim()) && "true" !== n && "false" !== n && (n.match(/[\s]/) || n.match(/^([!]|([|]|[&]){2})/) || (e.EnableFor(t), (t._tags[n] = !0))); + }), + (e.RemoveTagsFrom = function (t, n) { + if (e.HasTags(t)) { + var i = n.split(" "); + for (var r in i) e._RemoveTagFrom(t, i[r]); + } + }), + (e._RemoveTagFrom = function (e, t) { + delete e._tags[t]; + }), + (e.MatchesQuery = function (t, n) { + return ( + void 0 === n || + ("" === n + ? e.HasTags(t) + : i.a.Eval(n, function (n) { + return e.HasTags(t) && t._tags[n]; + })) + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(2), + r = n(1), + o = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i._normalMatrix = new r.a()), (i.allowShaderHotSwapping = !0), (i._storeEffectOnSubMeshes = !0), i; + } + return ( + Object(i.d)(t, e), + (t.prototype.getEffect = function () { + return this._activeEffect; + }), + (t.prototype.isReady = function (e, t) { + return !!e && (!e.subMeshes || 0 === e.subMeshes.length || this.isReadyForSubMesh(e, e.subMeshes[0], t)); + }), + (t.prototype.bindOnlyWorldMatrix = function (e) { + this._activeEffect.setMatrix("world", e); + }), + (t.prototype.bindOnlyNormalMatrix = function (e) { + this._activeEffect.setMatrix("normalMatrix", e); + }), + (t.prototype.bind = function (e, t) { + t && this.bindForSubMesh(e, t, t.subMeshes[0]); + }), + (t.prototype._afterBind = function (t, n) { + void 0 === n && (n = null), e.prototype._afterBind.call(this, t), (this.getScene()._cachedEffect = n); + }), + (t.prototype._mustRebind = function (e, t, n) { + return void 0 === n && (n = 1), e.isCachedMaterialInvalid(this, t, n); + }), + t + ); + })(n(28).a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }); + var i = n(2), + r = (function () { + function e(t) { + (this.length = 0), (this.data = new Array(t)), (this._id = e._GlobalId++); + } + return ( + (e.prototype.push = function (e) { + (this.data[this.length++] = e), this.length > this.data.length && (this.data.length *= 2); + }), + (e.prototype.forEach = function (e) { + for (var t = 0; t < this.length; t++) e(this.data[t]); + }), + (e.prototype.sort = function (e) { + this.data.sort(e); + }), + (e.prototype.reset = function () { + this.length = 0; + }), + (e.prototype.dispose = function () { + this.reset(), this.data && ((this.data.length = 0), (this.data = [])); + }), + (e.prototype.concat = function (e) { + if (0 !== e.length) { + this.length + e.length > this.data.length && (this.data.length = 2 * (this.length + e.length)); + for (var t = 0; t < e.length; t++) this.data[this.length++] = (e.data || e)[t]; + } + }), + (e.prototype.indexOf = function (e) { + var t = this.data.indexOf(e); + return t >= this.length ? -1 : t; + }), + (e.prototype.contains = function (e) { + return -1 !== this.indexOf(e); + }), + (e._GlobalId = 0), + e + ); + })(), + o = (function (e) { + function t() { + var t = (null !== e && e.apply(this, arguments)) || this; + return (t._duplicateId = 0), t; + } + return ( + Object(i.d)(t, e), + (t.prototype.push = function (t) { + e.prototype.push.call(this, t), t.__smartArrayFlags || (t.__smartArrayFlags = {}), (t.__smartArrayFlags[this._id] = this._duplicateId); + }), + (t.prototype.pushNoDuplicate = function (e) { + return (!e.__smartArrayFlags || e.__smartArrayFlags[this._id] !== this._duplicateId) && (this.push(e), !0); + }), + (t.prototype.reset = function () { + e.prototype.reset.call(this), this._duplicateId++; + }), + (t.prototype.concatWithNoDuplicate = function (e) { + if (0 !== e.length) { + this.length + e.length > this.data.length && (this.data.length = 2 * (this.length + e.length)); + for (var t = 0; t < e.length; t++) { + var n = (e.data || e)[t]; + this.pushNoDuplicate(n); + } + } + }), + t + ); + })(r); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameConfig = void 0); + class i { + static get showDebugInfo() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("FPS INFO"); + } + static get isGodMode() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("GOD MODE"); + } + static get showColliders() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("COLLIDERS"); + } + static get showPlayerCollider() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("PLAYER COLLIDER"); + } + static get showPathPoints() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("PATH POINTS"); + } + static get canSwitchCamera() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("SECOND CAMERA"); + } + static get canShowInspector() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("INSPECTOR"); + } + static get showDeathInfo() { + return !!i.IS_DEBUG && i.DEBUG_FEATURES.includes("DEATH INFO"); + } + } + (t.GameConfig = i), + (i.DEFAULT_ZONES = ["Base", "Forest", "Narrows", "WaterSlide", "MineCart"]), + (i.DEFAULT_REGION = "Machu"), + (i.IS_PROD = !1), + (i.IS_DEBUG = !1), + (i.IS_RELEASE = !0), + (i.BUILD_VERSION = "1.0.0"), + (i.DEBUG_SELECTED_ZONES = [...i.DEFAULT_ZONES]), + (i.DEBUG_MIN_DISTANCE_BETWEEN_BASE_ZONE_CHANGE = 80), + (i.MAX_START_PIECES = 10), + (i.HAS_AD_BLOCKER = !1), + (i.COIN_REWARDS_FROM_AD = 100), + (i.IS_AD_PLAYING = !1), + (i.DEBUG_FEATURES = i.IS_DEBUG ? ["FPS INFO", "SECOND CAMERA", "INSPECTOR", "DEATH INFO"] : []), + (i.ALL_DEBUG_FEATURES = ["FPS INFO", "GOD MODE", "PATH POINTS", "SECOND CAMERA", "INSPECTOR", "COLLIDERS", "PLAYER COLLIDER", "DEATH INFO"]); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(158), + a = n(5), + s = n(95), + c = n(13), + l = (function (e) { + function t(n, i) { + var r = e.call(this, n, i) || this; + return ( + (r.directIntensity = 1), + (r.emissiveIntensity = 1), + (r.environmentIntensity = 1), + (r.specularIntensity = 1), + (r.disableBumpMap = !1), + (r.ambientTextureStrength = 1), + (r.ambientTextureImpactOnAnalyticalLights = t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS), + (r.metallicF0Factor = 0.5), + (r.useMetallicF0FactorFromMetallicTexture = !1), + (r.ambientColor = new a.a(0, 0, 0)), + (r.albedoColor = new a.a(1, 1, 1)), + (r.reflectivityColor = new a.a(1, 1, 1)), + (r.reflectionColor = new a.a(1, 1, 1)), + (r.emissiveColor = new a.a(0, 0, 0)), + (r.microSurface = 1), + (r.useLightmapAsShadowmap = !1), + (r.useAlphaFromAlbedoTexture = !1), + (r.forceAlphaTest = !1), + (r.alphaCutOff = 0.4), + (r.useSpecularOverAlpha = !0), + (r.useMicroSurfaceFromReflectivityMapAlpha = !1), + (r.useRoughnessFromMetallicTextureAlpha = !0), + (r.useRoughnessFromMetallicTextureGreen = !1), + (r.useMetallnessFromMetallicTextureBlue = !1), + (r.useAmbientOcclusionFromMetallicTextureRed = !1), + (r.useAmbientInGrayScale = !1), + (r.useAutoMicroSurfaceFromReflectivityMap = !1), + (r.useRadianceOverAlpha = !0), + (r.useObjectSpaceNormalMap = !1), + (r.useParallax = !1), + (r.useParallaxOcclusion = !1), + (r.parallaxScaleBias = 0.05), + (r.disableLighting = !1), + (r.forceIrradianceInFragment = !1), + (r.maxSimultaneousLights = 4), + (r.invertNormalMapX = !1), + (r.invertNormalMapY = !1), + (r.twoSidedLighting = !1), + (r.useAlphaFresnel = !1), + (r.useLinearAlphaFresnel = !1), + (r.environmentBRDFTexture = null), + (r.forceNormalForward = !1), + (r.enableSpecularAntiAliasing = !1), + (r.useHorizonOcclusion = !0), + (r.useRadianceOcclusion = !0), + (r.unlit = !1), + (r._environmentBRDFTexture = o.a.GetEnvironmentBRDFTexture(i)), + r + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "refractionTexture", { + get: function () { + return this.subSurface.refractionTexture; + }, + set: function (e) { + (this.subSurface.refractionTexture = e), e ? (this.subSurface.isRefractionEnabled = !0) : this.subSurface.linkRefractionWithTransparency || (this.subSurface.isRefractionEnabled = !1); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "indexOfRefraction", { + get: function () { + return 1 / this.subSurface.indexOfRefraction; + }, + set: function (e) { + this.subSurface.indexOfRefraction = 1 / e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "invertRefractionY", { + get: function () { + return this.subSurface.invertRefractionY; + }, + set: function (e) { + this.subSurface.invertRefractionY = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "linkRefractionWithTransparency", { + get: function () { + return this.subSurface.linkRefractionWithTransparency; + }, + set: function (e) { + (this.subSurface.linkRefractionWithTransparency = e), e && (this.subSurface.isRefractionEnabled = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "usePhysicalLightFalloff", { + get: function () { + return this._lightFalloff === s.a.LIGHTFALLOFF_PHYSICAL; + }, + set: function (e) { + e !== this.usePhysicalLightFalloff && (this._markAllSubMeshesAsTexturesDirty(), (this._lightFalloff = e ? s.a.LIGHTFALLOFF_PHYSICAL : s.a.LIGHTFALLOFF_STANDARD)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useGLTFLightFalloff", { + get: function () { + return this._lightFalloff === s.a.LIGHTFALLOFF_GLTF; + }, + set: function (e) { + e !== this.useGLTFLightFalloff && (this._markAllSubMeshesAsTexturesDirty(), (this._lightFalloff = e ? s.a.LIGHTFALLOFF_GLTF : s.a.LIGHTFALLOFF_STANDARD)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + this._attachImageProcessingConfiguration(e), this._markAllSubMeshesAsTexturesDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorCurvesEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorCurvesEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurvesEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorGradingEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraToneMappingEnabled", { + get: function () { + return this._imageProcessingConfiguration.toneMappingEnabled; + }, + set: function (e) { + this._imageProcessingConfiguration.toneMappingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraExposure", { + get: function () { + return this._imageProcessingConfiguration.exposure; + }, + set: function (e) { + this._imageProcessingConfiguration.exposure = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraContrast", { + get: function () { + return this._imageProcessingConfiguration.contrast; + }, + set: function (e) { + this._imageProcessingConfiguration.contrast = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingTexture", { + get: function () { + return this._imageProcessingConfiguration.colorGradingTexture; + }, + set: function (e) { + this._imageProcessingConfiguration.colorGradingTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorCurves", { + get: function () { + return this._imageProcessingConfiguration.colorCurves; + }, + set: function (e) { + this._imageProcessingConfiguration.colorCurves = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "PBRMaterial"; + }), + (t.prototype.clone = function (e) { + var n = this, + i = r.a.Clone(function () { + return new t(e, n.getScene()); + }, this); + return (i.id = e), (i.name = e), this.clearCoat.copyTo(i.clearCoat), this.anisotropy.copyTo(i.anisotropy), this.brdf.copyTo(i.brdf), this.sheen.copyTo(i.sheen), this.subSurface.copyTo(i.subSurface), i; + }), + (t.prototype.serialize = function () { + var e = r.a.Serialize(this); + return ( + (e.customType = "BABYLON.PBRMaterial"), + (e.clearCoat = this.clearCoat.serialize()), + (e.anisotropy = this.anisotropy.serialize()), + (e.brdf = this.brdf.serialize()), + (e.sheen = this.sheen.serialize()), + (e.subSurface = this.subSurface.serialize()), + e + ); + }), + (t.Parse = function (e, n, i) { + var o = r.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + return ( + e.clearCoat && o.clearCoat.parse(e.clearCoat, n, i), + e.anisotropy && o.anisotropy.parse(e.anisotropy, n, i), + e.brdf && o.brdf.parse(e.brdf, n, i), + e.sheen && o.sheen.parse(e.sheen, n, i), + e.subSurface && o.subSurface.parse(e.subSurface, n, i), + o + ); + }), + (t.PBRMATERIAL_OPAQUE = s.a.PBRMATERIAL_OPAQUE), + (t.PBRMATERIAL_ALPHATEST = s.a.PBRMATERIAL_ALPHATEST), + (t.PBRMATERIAL_ALPHABLEND = s.a.PBRMATERIAL_ALPHABLEND), + (t.PBRMATERIAL_ALPHATESTANDBLEND = s.a.PBRMATERIAL_ALPHATESTANDBLEND), + (t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS = s.a.DEFAULT_AO_ON_ANALYTICAL_LIGHTS), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "directIntensity", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveIntensity", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "environmentIntensity", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "specularIntensity", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "disableBumpMap", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "albedoTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "ambientTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "ambientTextureStrength", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "ambientTextureImpactOnAnalyticalLights", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "opacityTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectivityTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "metallicTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "metallic", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "roughness", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "metallicF0Factor", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useMetallicF0FactorFromMetallicTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "microSurfaceTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "bumpTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", null)], t.prototype, "lightmapTexture", void 0), + Object(i.c)([Object(r.e)("ambient"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "ambientColor", void 0), + Object(i.c)([Object(r.e)("albedo"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "albedoColor", void 0), + Object(i.c)([Object(r.e)("reflectivity"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectivityColor", void 0), + Object(i.c)([Object(r.e)("reflection"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionColor", void 0), + Object(i.c)([Object(r.e)("emissive"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveColor", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "microSurface", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useLightmapAsShadowmap", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "useAlphaFromAlbedoTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "forceAlphaTest", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")], t.prototype, "alphaCutOff", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useSpecularOverAlpha", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useMicroSurfaceFromReflectivityMapAlpha", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useRoughnessFromMetallicTextureAlpha", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useRoughnessFromMetallicTextureGreen", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useMetallnessFromMetallicTextureBlue", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useAmbientOcclusionFromMetallicTextureRed", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useAmbientInGrayScale", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useAutoMicroSurfaceFromReflectivityMap", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "usePhysicalLightFalloff", null), + Object(i.c)([Object(r.c)()], t.prototype, "useGLTFLightFalloff", null), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useRadianceOverAlpha", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useObjectSpaceNormalMap", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useParallax", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useParallaxOcclusion", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "parallaxScaleBias", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "disableLighting", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "forceIrradianceInFragment", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "maxSimultaneousLights", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapX", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapY", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "twoSidedLighting", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useAlphaFresnel", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useLinearAlphaFresnel", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "environmentBRDFTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "forceNormalForward", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "enableSpecularAntiAliasing", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useHorizonOcclusion", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useRadianceOcclusion", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsMiscDirty")], t.prototype, "unlit", void 0), + t + ); + })(s.a); + c.a.RegisteredTypes["BABYLON.PBRMaterial"] = l; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return u; + }), + n.d(t, "a", function () { + return h; + }); + var i = n(2), + r = n(3), + o = n(6), + a = n(12), + s = n(5), + c = n(41), + l = n(162), + u = (function (e) { + function t() { + var t = e.call(this) || this; + return ( + (t.IMAGEPROCESSING = !1), + (t.VIGNETTE = !1), + (t.VIGNETTEBLENDMODEMULTIPLY = !1), + (t.VIGNETTEBLENDMODEOPAQUE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = !1), + (t.SAMPLER3DBGRMAP = !1), + (t.IMAGEPROCESSINGPOSTPROCESS = !1), + (t.EXPOSURE = !1), + t.rebuild(), + t + ); + } + return Object(i.d)(t, e), t; + })(c.a), + h = (function () { + function e() { + (this.colorCurves = new l.a()), + (this._colorCurvesEnabled = !1), + (this._colorGradingEnabled = !1), + (this._colorGradingWithGreenDepth = !0), + (this._colorGradingBGR = !0), + (this._exposure = 1), + (this._toneMappingEnabled = !1), + (this._toneMappingType = e.TONEMAPPING_STANDARD), + (this._contrast = 1), + (this.vignetteStretch = 0), + (this.vignetteCentreX = 0), + (this.vignetteCentreY = 0), + (this.vignetteWeight = 1.5), + (this.vignetteColor = new s.b(0, 0, 0, 0)), + (this.vignetteCameraFov = 0.5), + (this._vignetteBlendMode = e.VIGNETTEMODE_MULTIPLY), + (this._vignetteEnabled = !1), + (this._applyByPostProcess = !1), + (this._isEnabled = !0), + (this.onUpdateParameters = new o.c()); + } + return ( + Object.defineProperty(e.prototype, "colorCurvesEnabled", { + get: function () { + return this._colorCurvesEnabled; + }, + set: function (e) { + this._colorCurvesEnabled !== e && ((this._colorCurvesEnabled = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "colorGradingTexture", { + get: function () { + return this._colorGradingTexture; + }, + set: function (e) { + this._colorGradingTexture !== e && ((this._colorGradingTexture = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "colorGradingEnabled", { + get: function () { + return this._colorGradingEnabled; + }, + set: function (e) { + this._colorGradingEnabled !== e && ((this._colorGradingEnabled = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "colorGradingWithGreenDepth", { + get: function () { + return this._colorGradingWithGreenDepth; + }, + set: function (e) { + this._colorGradingWithGreenDepth !== e && ((this._colorGradingWithGreenDepth = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "colorGradingBGR", { + get: function () { + return this._colorGradingBGR; + }, + set: function (e) { + this._colorGradingBGR !== e && ((this._colorGradingBGR = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "exposure", { + get: function () { + return this._exposure; + }, + set: function (e) { + this._exposure !== e && ((this._exposure = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "toneMappingEnabled", { + get: function () { + return this._toneMappingEnabled; + }, + set: function (e) { + this._toneMappingEnabled !== e && ((this._toneMappingEnabled = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "toneMappingType", { + get: function () { + return this._toneMappingType; + }, + set: function (e) { + this._toneMappingType !== e && ((this._toneMappingType = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "contrast", { + get: function () { + return this._contrast; + }, + set: function (e) { + this._contrast !== e && ((this._contrast = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "vignetteBlendMode", { + get: function () { + return this._vignetteBlendMode; + }, + set: function (e) { + this._vignetteBlendMode !== e && ((this._vignetteBlendMode = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "vignetteEnabled", { + get: function () { + return this._vignetteEnabled; + }, + set: function (e) { + this._vignetteEnabled !== e && ((this._vignetteEnabled = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "applyByPostProcess", { + get: function () { + return this._applyByPostProcess; + }, + set: function (e) { + this._applyByPostProcess !== e && ((this._applyByPostProcess = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + this._isEnabled !== e && ((this._isEnabled = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._updateParameters = function () { + this.onUpdateParameters.notifyObservers(this); + }), + (e.prototype.getClassName = function () { + return "ImageProcessingConfiguration"; + }), + (e.PrepareUniforms = function (e, t) { + t.EXPOSURE && e.push("exposureLinear"), + t.CONTRAST && e.push("contrast"), + t.COLORGRADING && e.push("colorTransformSettings"), + t.VIGNETTE && (e.push("vInverseScreenSize"), e.push("vignetteSettings1"), e.push("vignetteSettings2")), + t.COLORCURVES && l.a.PrepareUniforms(e); + }), + (e.PrepareSamplers = function (e, t) { + t.COLORGRADING && e.push("txColorTransform"); + }), + (e.prototype.prepareDefines = function (t, n) { + if ((void 0 === n && (n = !1), n !== this.applyByPostProcess || !this._isEnabled)) + return ( + (t.VIGNETTE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.EXPOSURE = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.IMAGEPROCESSING = !1), + void (t.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled) + ); + switch ( + ((t.VIGNETTE = this.vignetteEnabled), + (t.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === e._VIGNETTEMODE_MULTIPLY), + (t.VIGNETTEBLENDMODEOPAQUE = !t.VIGNETTEBLENDMODEMULTIPLY), + (t.TONEMAPPING = this.toneMappingEnabled), + this._toneMappingType) + ) { + case e.TONEMAPPING_ACES: + t.TONEMAPPING_ACES = !0; + break; + default: + t.TONEMAPPING_ACES = !1; + } + (t.CONTRAST = 1 !== this.contrast), + (t.EXPOSURE = 1 !== this.exposure), + (t.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves), + (t.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture), + t.COLORGRADING ? (t.COLORGRADING3D = this.colorGradingTexture.is3D) : (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth), + (t.SAMPLER3DBGRMAP = this.colorGradingBGR), + (t.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess), + (t.IMAGEPROCESSING = t.VIGNETTE || t.TONEMAPPING || t.CONTRAST || t.EXPOSURE || t.COLORCURVES || t.COLORGRADING); + }), + (e.prototype.isReady = function () { + return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady(); + }), + (e.prototype.bind = function (e, t) { + if ((this._colorCurvesEnabled && this.colorCurves && l.a.Bind(this.colorCurves, e), this._vignetteEnabled)) { + var n = 1 / e.getEngine().getRenderWidth(), + i = 1 / e.getEngine().getRenderHeight(); + e.setFloat2("vInverseScreenSize", n, i); + var r = null != t ? t : i / n, + o = Math.tan(0.5 * this.vignetteCameraFov), + s = o * r, + c = Math.sqrt(s * o); + (s = a.b.Mix(s, c, this.vignetteStretch)), (o = a.b.Mix(o, c, this.vignetteStretch)), e.setFloat4("vignetteSettings1", s, o, -s * this.vignetteCentreX, -o * this.vignetteCentreY); + var u = -2 * this.vignetteWeight; + e.setFloat4("vignetteSettings2", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, u); + } + if ((e.setFloat("exposureLinear", this.exposure), e.setFloat("contrast", this.contrast), this.colorGradingTexture)) { + e.setTexture("txColorTransform", this.colorGradingTexture); + var h = this.colorGradingTexture.getSize().height; + e.setFloat4("colorTransformSettings", (h - 1) / h, 0.5 / h, h, this.colorGradingTexture.level); + } + }), + (e.prototype.clone = function () { + return r.a.Clone(function () { + return new e(); + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.Parse = function (t) { + return r.a.Parse( + function () { + return new e(); + }, + t, + null, + null + ); + }), + Object.defineProperty(e, "VIGNETTEMODE_MULTIPLY", { + get: function () { + return this._VIGNETTEMODE_MULTIPLY; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "VIGNETTEMODE_OPAQUE", { + get: function () { + return this._VIGNETTEMODE_OPAQUE; + }, + enumerable: !0, + configurable: !0, + }), + (e.TONEMAPPING_STANDARD = 0), + (e.TONEMAPPING_ACES = 1), + (e._VIGNETTEMODE_MULTIPLY = 0), + (e._VIGNETTEMODE_OPAQUE = 1), + Object(i.c)([Object(r.g)()], e.prototype, "colorCurves", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_colorCurvesEnabled", void 0), + Object(i.c)([Object(r.m)("colorGradingTexture")], e.prototype, "_colorGradingTexture", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_colorGradingEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_colorGradingWithGreenDepth", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_colorGradingBGR", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_exposure", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_toneMappingEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_toneMappingType", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_contrast", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "vignetteStretch", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "vignetteCentreX", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "vignetteCentreY", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "vignetteWeight", void 0), + Object(i.c)([Object(r.f)()], e.prototype, "vignetteColor", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "vignetteCameraFov", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_vignetteBlendMode", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_vignetteEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_applyByPostProcess", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_isEnabled", void 0), + e + ); + })(); + r.a._ImageProcessingConfigurationParser = h.Parse; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(53), + r = function (e, t) { + return e ? (e.getClassName && "Mesh" === e.getClassName() ? null : e.getClassName && "SubMesh" === e.getClassName() ? e.clone(t) : e.clone ? e.clone() : null) : null; + }, + o = (function () { + function e() {} + return ( + (e.DeepCopy = function (e, t, n, o) { + for (var a in e) + if (("_" !== a[0] || (o && -1 !== o.indexOf(a))) && !(i.a.EndsWith(a, "Observable") || (n && -1 !== n.indexOf(a)))) { + var s = e[a], + c = typeof s; + if ("function" !== c) + try { + if ("object" === c) + if (s instanceof Array) { + if (((t[a] = []), s.length > 0)) + if ("object" == typeof s[0]) + for (var l = 0; l < s.length; l++) { + var u = r(s[l], t); + -1 === t[a].indexOf(u) && t[a].push(u); + } + else t[a] = s.slice(0); + } else t[a] = r(s, t); + else t[a] = s; + } catch (e) {} + } + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.gameState = t.GameState = t.AbilityUpgradesData = t.DailyChallengeData = t.FlagsData = t.StatsData = t.CurrentDayData = t.CurrentRunData = t.STORAGE_GAME_STATE_KEY = t.POWERUP_FILL_MIN = t.POWERUP_FILL_MAX = void 0); + const i = n(222), + r = n(29), + o = n(233), + a = n(139), + s = n(156), + c = n(269), + l = n(234), + u = n(40), + h = n(48); + (t.POWERUP_FILL_MAX = 360), (t.POWERUP_FILL_MIN = 110), (t.STORAGE_GAME_STATE_KEY = "TR2_GAME_STATE"); + class d { + constructor() { + (this.score = 0), + (this.distance = 0), + (this.coins = 0), + (this.currentMeterStreak = 0), + (this.powerupFillValue = t.POWERUP_FILL_MAX), + (this.powerupFillGlow = ""), + (this.powerupFillBlink = ""), + (this.deathMessage = ""), + (this.deathImagePosition = "0% 0%"), + (this.nextDistanceToastThreshold = 250), + (this.highScoreToastMessageDone = !1), + (this.stumbleThisRun = 0), + (this.resurrectsThisRun = 0), + (this.powermeterUsedThisRun = 0), + (this.powerupsCollectedThisRun = 0), + (this.waterslideSurvivedThisRun = 0), + (this.minecartSurvivedThisRun = 0), + (this.coinsCollectedInWaterSlide = 0), + (this.coinsCollectedInMineCart = 0), + (this.distanceCoveredInMineCart = 0), + (this.distanceCoveredInWaterSlide = 0); + } + } + t.CurrentRunData = d; + class p { + constructor() { + (this.score = 0), + (this.distance = 0), + (this.coins = 0), + (this.stumbleToday = 0), + (this.resurrectsToday = 0), + (this.powerMeterUsedToday = 0), + (this.powerupsCollectedToday = 0), + (this.waterSlideSurvivedToday = 0), + (this.minecartSurviveToday = 0), + (this.coinsCollectedInWaterSlide = 0), + (this.coinsCollectedInMineCart = 0), + (this.distanceCoveredInMineCart = 0), + (this.distanceCoveredInWaterSlide = 0), + (this.runs = 0); + } + } + t.CurrentDayData = p; + class f { + constructor() { + (this.highestScore = 0), (this.hsNoSaveMe = 0), (this.longestRun = 0), (this.mostCoins = 0), (this.totalGames = 0), (this.totalDistance = 0), (this.totalCoins = 0), (this.bestDailyStreak = 0); + } + } + t.StatsData = f; + class m { + constructor() { + (this.powerupUplocked = !1), (this.tutorialPhaseState = "phase1"), (this.tutorialZonesDone = []), (this.musicVolume = 50), (this.soundVolume = 50); + } + } + t.FlagsData = m; + class g { + constructor() { + (this.currentChallengeID = -1), (this.currentDayStreak = 0), (this.isChallengeCompleted = !1), (this.pastChallengeID = new Map()); + } + } + t.DailyChallengeData = g; + class b { + constructor() { + (this.abilitiesLevels = new Array()), this.abilitiesLevels.push(0), this.abilitiesLevels.push(0), this.abilitiesLevels.push(0); + } + } + t.AbilityUpgradesData = b; + class _ { + constructor() { + (this.currentRunData = new d()), + (this.currentDayData = new p()), + (this.currentDayDataFinal = new p()), + (this.statsData = new f()), + (this.flagsData = new m()), + (this.dailyChallengeData = new g()), + (this.abilitiesData = new b()); + } + } + (t.GameState = _), + (t.gameState = (function () { + const e = o.AbiltiesUpgradeModel.fromJson(n(235)), + v = l.DailyChallenges.fromJson(n(236)), + y = n(270), + C = (() => { + const e = c.LocalStore.getItem(t.STORAGE_GAME_STATE_KEY); + if (e) { + const t = JSON.parse(e); + return Object.assign(Object.assign({}, t), { + currentRunData: new d(), + currentDayDataFinal: Object.assign(Object.assign({}, new p()), t.currentDayDataFinal), + currentDayData: Object.assign(Object.assign({}, new p()), t.currentDayDataFinal), + statsData: Object.assign(Object.assign({}, new f()), t.statsData), + flagsData: Object.assign(Object.assign({}, new m()), t.flagsData), + dailyChallengeData: Object.assign(Object.assign(Object.assign({}, new g()), t.dailyChallengeData), { pastChallengeID: c.parseToMap(t.dailyChallengeData.pastChallengeID) }), + abilitiesData: Object.assign(Object.assign({}, new b()), t.abilitiesData), + }); + } + return new _(); + })(), + P = i.writable(C), + { subscribe: x, update: T } = P, + S = () => { + T((e) => { + const n = Object.assign(Object.assign({}, e), { + currentRunData: {}, + currentDayData: {}, + dailyChallengeData: Object.assign(Object.assign({}, e.dailyChallengeData), { pastChallengeID: c.parseFromMap(e.dailyChallengeData.pastChallengeID) }), + }); + return c.LocalStore.setItem(t.STORAGE_GAME_STATE_KEY, JSON.stringify(n)), e; + }); + }; + return ( + r.EventHandler.instance.addListener(r.EventID.OnTutorialStart, () => { + T((e) => ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MAX), (e.currentRunData.powerupFillGlow = ""), (e.currentRunData.powerupFillBlink = ""), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnMeterReset, () => { + T((e) => ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MAX), (e.currentRunData.powerupFillGlow = ""), (e.currentRunData.powerupFillBlink = ""), (e.currentRunData.currentMeterStreak = 0), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnTutorialComplete, () => { + T( + (e) => ( + (e.currentRunData.powerupFillValue = t.POWERUP_FILL_MAX - e.currentRunData.currentMeterStreak * (t.POWERUP_FILL_MAX / 200)), + e.currentRunData.powerupFillValue <= t.POWERUP_FILL_MIN && + ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MIN), r.EventHandler.instance.fireEvent(r.EventID.OnMeterFull), (e.currentRunData.powerupFillGlow = "fill-glow")), + e + ) + ); + }), + r.EventHandler.instance.addListener(r.EventID.OnResetCurrentGameData, () => { + T((e) => Object.assign(Object.assign({}, e), { currentRunData: new d(), currentDayData: Object.assign(Object.assign({}, new p()), e.currentDayDataFinal) })); + }), + r.EventHandler.instance.addListener(r.EventID.OnMeterFull, () => { + T((e) => ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MIN), (e.currentRunData.powerupFillGlow = "fill-glow"), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnPowerupCooldown, () => { + u.GameController.instance.powerup.isTriggeredManually && + T((e) => ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MIN), (e.currentRunData.powerupFillGlow = "fill-glow"), (e.currentRunData.powerupFillBlink = "fill-blink"), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnPowerupComplete, (e) => { + u.GameController.instance.powerup.isTriggeredManually && + e == u.GameController.instance.powerup.meterPowerUpType && + T((e) => ((e.currentRunData.powerupFillValue = t.POWERUP_FILL_MAX), (e.currentRunData.powerupFillGlow = ""), (e.currentRunData.powerupFillBlink = ""), (e.currentRunData.currentMeterStreak = 0), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnUnlockPowerup, () => { + T((e) => ((e.flagsData.powerupUplocked = !0), (e.flagsData.tutorialPhaseState = "phase2"), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnChangeTutorialState, (e) => { + T((t) => { + const n = t.flagsData.tutorialZonesDone; + return null == e.zoneDone || n.includes(e.zoneDone) || n.push(e.zoneDone), (t.flagsData.tutorialPhaseState = e.tutorialPhaseState), (t.flagsData.tutorialZonesDone = n), t; + }); + }), + r.EventHandler.instance.addListener(r.EventID.OnPersistGameState, () => { + S(); + }), + r.EventHandler.instance.addListener(r.EventID.OnPlayerDeath, () => { + u.GameController.instance.tutorial.isEnabled; + }), + r.EventHandler.instance.addListener(r.EventID.OnEndGame, () => { + u.GameController.instance.tutorial.isEnabled || + (T( + (e) => ( + (e.currentDayDataFinal = Object.assign(Object.assign({}, new p()), e.currentDayData)), + (e.currentDayDataFinal.runs += 1), + (e.statsData.totalGames += 1), + (e.statsData.totalDistance = Math.floor(e.statsData.totalDistance + e.currentRunData.distance)), + (e.statsData.totalCoins = Math.floor(e.statsData.totalCoins + e.currentRunData.coins)), + e.currentRunData.score > e.statsData.highestScore && (e.statsData.highestScore = Math.floor(e.currentRunData.score)), + e.currentRunData.distance > e.statsData.longestRun && (e.statsData.longestRun = Math.floor(e.currentRunData.distance)), + e.currentRunData.coins > e.statsData.mostCoins && (e.statsData.mostCoins = Math.floor(e.currentRunData.coins)), + e.currentRunData.resurrectsThisRun <= 0 && e.currentRunData.score > e.statsData.hsNoSaveMe && (e.statsData.hsNoSaveMe = Math.floor(e.currentRunData.score)), + e + ) + ), + r.EventHandler.instance.fireEvent(r.EventID.OnCheckDailyChallenge), + S()); + }), + r.EventHandler.instance.addListener(r.EventID.OnDailyChallengeDataUpdate, (e) => { + T((t) => ((t.dailyChallengeData = e), t.dailyChallengeData.currentDayStreak > t.statsData.bestDailyStreak && (t.statsData.bestDailyStreak = t.dailyChallengeData.currentDayStreak), t)), S(); + }), + r.EventHandler.instance.addListener(r.EventID.OnResetDayStatData, (e = !1) => { + T((t) => ((t.currentDayData = new p()), e && (t.currentDayDataFinal = new p()), t)), S(); + }), + r.EventHandler.instance.addListener(r.EventID.OnStumble, () => { + T((e) => ((e.currentDayData.stumbleToday += 1), (e.currentRunData.stumbleThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnPowerupCollect, () => { + T((e) => ((e.currentDayData.powerupsCollectedToday += 1), (e.currentRunData.powerupsCollectedThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnRessurect, () => { + T((e) => ((e.currentDayData.resurrectsToday += 1), (e.currentRunData.resurrectsThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnMineCartSurvived, () => { + T((e) => ((e.currentDayData.minecartSurviveToday += 1), (e.currentRunData.minecartSurvivedThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnWaterSlideSurvived, () => { + T((e) => ((e.currentDayData.waterSlideSurvivedToday += 1), (e.currentRunData.waterslideSurvivedThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.OnPowerMeterUsed, () => { + T((e) => ((e.currentDayData.powerMeterUsedToday += 1), (e.currentRunData.powermeterUsedThisRun += 1), e)); + }), + r.EventHandler.instance.addListener(r.EventID.PlayerDeathTypeUpdate, (e) => { + T((t) => ((t.currentRunData.deathMessage = e.message), (t.currentRunData.deathImagePosition = e.position), t)); + }), + r.EventHandler.instance.addListener(r.EventID.OnChestReward, (e) => { + T((t) => ((t.currentDayData.coins += e), (t.currentRunData.coins += e), (t.statsData.totalCoins += e), t)), S(); + }), + r.EventHandler.instance.addListener(r.EventID.OnRewardCoins, (e) => { + T((t) => ((t.statsData.totalCoins += e), t)), S(); + }), + h.GameConfig.IS_DEBUG && + r.EventHandler.instance.addListener(r.EventID.OnDebugCoinsUpdated, (e) => { + T((t) => ((t.statsData.totalCoins = e), t)); + }), + { + getStateFromStore: () => i.get(P), + subscribe: x, + upgradeAbility: (t) => { + T((n) => { + const i = e; + let o = n.abilitiesData.abilitiesLevels[t]; + const s = i.data[t].rule, + c = s[o].amount; + if (n.statsData.totalCoins < c) return r.EventHandler.instance.fireEvent(r.EventID.NotEnoughCoins), n; + n.statsData.totalCoins -= c; + const l = s[o].reward, + u = { _id: t, _reward: l }; + return r.EventHandler.instance.fireEvent(r.EventID.OnAbilityUpgraded, u), r.EventHandler.instance.fireEvent(r.EventID.PlaySFX, a.SoundID.CashRegister), (n.abilitiesData.abilitiesLevels[t] = ++o), n; + }), + S(); + }, + changeVolumeState: (e = "", t = 100) => { + T( + (n) => ( + "music" == e + ? ((n.flagsData.musicVolume = t), r.EventHandler.instance.fireEvent(r.EventID.MusicVolumeChange, t)) + : "sound" == e && ((n.flagsData.soundVolume = t), r.EventHandler.instance.fireEvent(r.EventID.SoundVolumeChange, t)), + n + ) + ), + S(); + }, + abilitiesConfig: e, + dailyChallengesConfig: v, + creditsConfig: y, + updateCoins: (e) => { + T((n) => { + (n.currentRunData.coins = n.currentRunData.coins + 1), (n.currentDayData.coins = n.currentDayData.coins + 1), (n.currentRunData.score = 10 * (n.currentRunData.coins + n.currentRunData.distance)); + const i = n.currentRunData.score; + n.currentRunData.score = 10 * (n.currentRunData.coins + n.currentRunData.distance); + const o = n.currentRunData.score - i; + return ( + (n.currentDayData.score += o), + n.currentRunData.powerupFillValue > t.POWERUP_FILL_MIN && + ((n.currentRunData.currentMeterStreak += 1), + (n.currentRunData.powerupFillValue = t.POWERUP_FILL_MAX - n.currentRunData.currentMeterStreak * (t.POWERUP_FILL_MAX / 200)), + n.currentRunData.powerupFillValue <= t.POWERUP_FILL_MIN && + ((n.currentRunData.powerupFillValue = t.POWERUP_FILL_MIN), r.EventHandler.instance.fireEvent(r.EventID.OnMeterFull), (n.currentRunData.powerupFillGlow = "fill-glow"))), + e == s.MovementState.CartRiding + ? ((n.currentRunData.coinsCollectedInMineCart += 1), (n.currentDayData.coinsCollectedInMineCart += 1)) + : e == s.MovementState.WaterSliding && ((n.currentRunData.coinsCollectedInWaterSlide += 1), (n.currentDayData.coinsCollectedInWaterSlide += 1)), + n + ); + }); + }, + updateDistance: (e, t) => { + T((n) => { + n.currentRunData.distance = n.currentRunData.distance + t; + const i = n.currentRunData.score; + if (((n.currentRunData.score = 10 * (n.currentRunData.coins + n.currentRunData.distance)), !u.GameController.instance.tutorial.isEnabled)) { + n.currentDayData.distance = n.currentDayData.distance + t; + const r = n.currentRunData.score - i; + (n.currentDayData.score += r), + e == s.MovementState.CartRiding + ? ((n.currentRunData.distanceCoveredInMineCart += t), (n.currentDayData.distanceCoveredInMineCart += t)) + : e == s.MovementState.WaterSliding && ((n.currentRunData.distanceCoveredInWaterSlide += t), (n.currentDayData.distanceCoveredInWaterSlide += t)); + } + return ( + n.currentRunData.distance > n.currentRunData.nextDistanceToastThreshold && + (r.EventHandler.instance.fireEvent(r.EventID.OnShowDistanceToast, n.currentRunData.nextDistanceToastThreshold), + (n.currentRunData.nextDistanceToastThreshold += 250 == n.currentRunData.nextDistanceToastThreshold ? 250 : 500)), + n.statsData.highestScore > 100 && + n.currentRunData.score > n.statsData.highestScore && + !n.currentRunData.highScoreToastMessageDone && + ((n.currentRunData.highScoreToastMessageDone = !0), + r.EventHandler.instance.fireEvent(r.EventID.OnHudToastMessage, "High Score!"), + r.EventHandler.instance.fireEvent(r.EventID.PlaySFX, a.SoundID.Woohoo)), + n + ); + }); + }, + forceUpdateDistance: (e) => { + T((t) => ((t.currentRunData.distance = e), (t.currentRunData.score = 10 * (t.currentRunData.coins + t.currentRunData.distance)), t)); + }, + } + ); + })()); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.EndsWith = function (e, t) { + return -1 !== e.indexOf(t, e.length - t.length); + }), + (e.StartsWith = function (e, t) { + return 0 === e.indexOf(t); + }), + (e.Decode = function (e) { + if ("undefined" != typeof TextDecoder) return new TextDecoder().decode(e); + for (var t = "", n = 0; n < e.byteLength; n++) t += String.fromCharCode(e[n]); + return t; + }), + (e.EncodeArrayBufferToBase64 = function (e) { + for ( + var t, n, i, r, o, a, s, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", l = "", u = 0, h = ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e); + u < h.length; + + ) + (r = (t = h[u++]) >> 2), + (o = ((3 & t) << 4) | ((n = u < h.length ? h[u++] : Number.NaN) >> 4)), + (a = ((15 & n) << 2) | ((i = u < h.length ? h[u++] : Number.NaN) >> 6)), + (s = 63 & i), + isNaN(n) ? (a = s = 64) : isNaN(i) && (s = 64), + (l += c.charAt(r) + c.charAt(o) + c.charAt(a) + c.charAt(s)); + return l; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this.rootNodes = new Array()), + (this.cameras = new Array()), + (this.lights = new Array()), + (this.meshes = new Array()), + (this.skeletons = new Array()), + (this.particleSystems = new Array()), + (this.animations = []), + (this.animationGroups = new Array()), + (this.multiMaterials = new Array()), + (this.materials = new Array()), + (this.morphTargetManagers = new Array()), + (this.geometries = new Array()), + (this.transformNodes = new Array()), + (this.actionManagers = new Array()), + (this.textures = new Array()), + (this.environmentTexture = null); + } + return ( + (e.AddParser = function (e, t) { + this._BabylonFileParsers[e] = t; + }), + (e.GetParser = function (e) { + return this._BabylonFileParsers[e] ? this._BabylonFileParsers[e] : null; + }), + (e.AddIndividualParser = function (e, t) { + this._IndividualBabylonFileParsers[e] = t; + }), + (e.GetIndividualParser = function (e) { + return this._IndividualBabylonFileParsers[e] ? this._IndividualBabylonFileParsers[e] : null; + }), + (e.Parse = function (e, t, n, i) { + for (var r in this._BabylonFileParsers) this._BabylonFileParsers.hasOwnProperty(r) && this._BabylonFileParsers[r](e, t, n, i); + }), + (e.prototype.getNodes = function () { + var e = new Array(); + return ( + (e = (e = (e = (e = e.concat(this.meshes)).concat(this.lights)).concat(this.cameras)).concat(this.transformNodes)), + this.skeletons.forEach(function (t) { + return (e = e.concat(t.bones)); + }), + e + ); + }), + (e._BabylonFileParsers = {}), + (e._IndividualBabylonFileParsers = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(18), + r = n(6), + o = n(20), + a = n(25), + s = n(96), + c = n(1), + l = n(5), + u = (function () { + function e(e, t) { + var n = this; + void 0 === t && (t = !0), + (this.originalScene = e), + (this._pointerCaptures = {}), + (this._lastPointerEvents = {}), + (this._sharedGizmoLight = null), + (this._renderCamera = null), + (this.pickUtilitySceneFirst = !0), + (this.shouldRender = !0), + (this.onlyCheckPointerDownEvents = !0), + (this.processAllEvents = !1), + (this.onPointerOutObservable = new r.c()), + (this.utilityLayerScene = new i.a(e.getEngine(), { virtual: !0 })), + (this.utilityLayerScene.useRightHandedSystem = e.useRightHandedSystem), + (this.utilityLayerScene._allowPostProcessClearColor = !1), + this.utilityLayerScene.detachControl(), + t && + ((this._originalPointerObserver = e.onPrePointerObservable.add(function (t, i) { + if (n.utilityLayerScene.activeCamera && (n.processAllEvents || t.type === o.a.POINTERMOVE || t.type === o.a.POINTERUP || t.type === o.a.POINTERDOWN)) { + (n.utilityLayerScene.pointerX = e.pointerX), (n.utilityLayerScene.pointerY = e.pointerY); + var r = t.event; + if (e.isPointerCaptured(r.pointerId)) n._pointerCaptures[r.pointerId] = !1; + else { + var a = t.ray ? n.utilityLayerScene.pickWithRay(t.ray) : n.utilityLayerScene.pick(e.pointerX, e.pointerY); + if ((!t.ray && a && (t.ray = a.ray), n.utilityLayerScene.onPrePointerObservable.notifyObservers(t), n.onlyCheckPointerDownEvents && t.type != o.a.POINTERDOWN)) + return ( + t.skipOnPointerObservable || n.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(t.type, t.event, a)), + void (t.type === o.a.POINTERUP && n._pointerCaptures[r.pointerId] && (n._pointerCaptures[r.pointerId] = !1)) + ); + if (n.utilityLayerScene.autoClearDepthAndStencil || n.pickUtilitySceneFirst) + a && a.hit && (t.skipOnPointerObservable || n.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(t.type, t.event, a)), (t.skipOnPointerObservable = !0)); + else { + var s = t.ray ? e.pickWithRay(t.ray) : e.pick(e.pointerX, e.pointerY), + c = t.event; + s && + a && + (0 === a.distance && s.pickedMesh + ? n.mainSceneTrackerPredicate && n.mainSceneTrackerPredicate(s.pickedMesh) + ? (n._notifyObservers(t, s, c), (t.skipOnPointerObservable = !0)) + : t.type === o.a.POINTERDOWN + ? (n._pointerCaptures[c.pointerId] = !0) + : n._lastPointerEvents[c.pointerId] && (n.onPointerOutObservable.notifyObservers(c.pointerId), delete n._lastPointerEvents[c.pointerId]) + : !n._pointerCaptures[c.pointerId] && (a.distance < s.distance || 0 === s.distance) + ? (n._notifyObservers(t, a, c), t.skipOnPointerObservable || (t.skipOnPointerObservable = a.distance > 0)) + : !n._pointerCaptures[c.pointerId] && + a.distance > s.distance && + (n.mainSceneTrackerPredicate && n.mainSceneTrackerPredicate(s.pickedMesh) + ? (n._notifyObservers(t, s, c), (t.skipOnPointerObservable = !0)) + : n._lastPointerEvents[c.pointerId] && (n.onPointerOutObservable.notifyObservers(c.pointerId), delete n._lastPointerEvents[c.pointerId])), + t.type === o.a.POINTERUP && n._pointerCaptures[c.pointerId] && (n._pointerCaptures[c.pointerId] = !1)); + } + } + } + })), + this._originalPointerObserver && e.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)), + (this.utilityLayerScene.autoClear = !1), + (this._afterRenderObserver = this.originalScene.onAfterCameraRenderObservable.add(function (e) { + n.shouldRender && e == n.getRenderCamera() && n.render(); + })), + (this._sceneDisposeObserver = this.originalScene.onDisposeObservable.add(function () { + n.dispose(); + })), + this._updateCamera(); + } + return ( + (e.prototype.getRenderCamera = function (e) { + if (this._renderCamera) return this._renderCamera; + var t = void 0; + return (t = this.originalScene.activeCameras.length > 1 ? this.originalScene.activeCameras[this.originalScene.activeCameras.length - 1] : this.originalScene.activeCamera), e && t && t.isRigCamera ? t.rigParent : t; + }), + (e.prototype.setRenderCamera = function (e) { + this._renderCamera = e; + }), + (e.prototype._getSharedGizmoLight = function () { + return ( + this._sharedGizmoLight || + ((this._sharedGizmoLight = new s.a("shared gizmo light", new c.e(0, 1, 0), this.utilityLayerScene)), (this._sharedGizmoLight.intensity = 2), (this._sharedGizmoLight.groundColor = l.a.Gray())), + this._sharedGizmoLight + ); + }), + Object.defineProperty(e, "DefaultUtilityLayer", { + get: function () { + return ( + null == e._DefaultUtilityLayer && + ((e._DefaultUtilityLayer = new e(a.a.LastCreatedScene)), + e._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(function () { + e._DefaultUtilityLayer = null; + })), + e._DefaultUtilityLayer + ); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "DefaultKeepDepthUtilityLayer", { + get: function () { + return ( + null == e._DefaultKeepDepthUtilityLayer && + ((e._DefaultKeepDepthUtilityLayer = new e(a.a.LastCreatedScene)), + (e._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil = !1), + e._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(function () { + e._DefaultKeepDepthUtilityLayer = null; + })), + e._DefaultKeepDepthUtilityLayer + ); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._notifyObservers = function (e, t, n) { + e.skipOnPointerObservable || (this.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(e.type, e.event, t)), (this._lastPointerEvents[n.pointerId] = !0)); + }), + (e.prototype.render = function () { + if ((this._updateCamera(), this.utilityLayerScene.activeCamera)) { + var e = this.utilityLayerScene.activeCamera.getScene(), + t = this.utilityLayerScene.activeCamera; + (t._scene = this.utilityLayerScene), + t.leftCamera && (t.leftCamera._scene = this.utilityLayerScene), + t.rightCamera && (t.rightCamera._scene = this.utilityLayerScene), + this.utilityLayerScene.render(!1), + (t._scene = e), + t.leftCamera && (t.leftCamera._scene = e), + t.rightCamera && (t.rightCamera._scene = e); + } + }), + (e.prototype.dispose = function () { + this.onPointerOutObservable.clear(), + this._afterRenderObserver && this.originalScene.onAfterCameraRenderObservable.remove(this._afterRenderObserver), + this._sceneDisposeObserver && this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver), + this._originalPointerObserver && this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver), + this.utilityLayerScene.dispose(); + }), + (e.prototype._updateCamera = function () { + (this.utilityLayerScene.cameraToUseForPointers = this.getRenderCamera()), (this.utilityLayerScene.activeCamera = this.getRenderCamera()); + }), + (e._DefaultUtilityLayer = null), + (e._DefaultKeepDepthUtilityLayer = null), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.IsWindowObjectExist = function () { + return "undefined" != typeof window; + }), + (e.IsNavigatorAvailable = function () { + return "undefined" != typeof navigator; + }), + (e.GetDOMTextContent = function (e) { + for (var t = "", n = e.firstChild; n; ) 3 === n.nodeType && (t += n.textContent), (n = n.nextSibling); + return t; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(5), + s = n(35), + c = n(124), + l = n(13), + u = (function (e) { + function t(n, i) { + var r = e.call(this, n, i) || this; + return ( + (r.diffuse = new a.a(1, 1, 1)), + (r.specular = new a.a(1, 1, 1)), + (r.falloffType = t.FALLOFF_DEFAULT), + (r.intensity = 1), + (r._range = Number.MAX_VALUE), + (r._inverseSquaredRange = 0), + (r._photometricScale = 1), + (r._intensityMode = t.INTENSITYMODE_AUTOMATIC), + (r._radius = 1e-5), + (r.renderPriority = 0), + (r._shadowEnabled = !0), + (r._excludeWithLayerMask = 0), + (r._includeOnlyWithLayerMask = 0), + (r._lightmapMode = 0), + (r._excludedMeshesIds = new Array()), + (r._includedOnlyMeshesIds = new Array()), + (r._isLight = !0), + r.getScene().addLight(r), + (r._uniformBuffer = new c.a(r.getScene().getEngine())), + r._buildUniformLayout(), + (r.includedOnlyMeshes = new Array()), + (r.excludedMeshes = new Array()), + r._resyncMeshes(), + r + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "range", { + get: function () { + return this._range; + }, + set: function (e) { + (this._range = e), (this._inverseSquaredRange = 1 / (this.range * this.range)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "intensityMode", { + get: function () { + return this._intensityMode; + }, + set: function (e) { + (this._intensityMode = e), this._computePhotometricScale(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "radius", { + get: function () { + return this._radius; + }, + set: function (e) { + (this._radius = e), this._computePhotometricScale(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowEnabled", { + get: function () { + return this._shadowEnabled; + }, + set: function (e) { + this._shadowEnabled !== e && ((this._shadowEnabled = e), this._markMeshesAsLightDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "includedOnlyMeshes", { + get: function () { + return this._includedOnlyMeshes; + }, + set: function (e) { + (this._includedOnlyMeshes = e), this._hookArrayForIncludedOnly(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "excludedMeshes", { + get: function () { + return this._excludedMeshes; + }, + set: function (e) { + (this._excludedMeshes = e), this._hookArrayForExcluded(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "excludeWithLayerMask", { + get: function () { + return this._excludeWithLayerMask; + }, + set: function (e) { + (this._excludeWithLayerMask = e), this._resyncMeshes(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "includeOnlyWithLayerMask", { + get: function () { + return this._includeOnlyWithLayerMask; + }, + set: function (e) { + (this._includeOnlyWithLayerMask = e), this._resyncMeshes(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "lightmapMode", { + get: function () { + return this._lightmapMode; + }, + set: function (e) { + this._lightmapMode !== e && ((this._lightmapMode = e), this._markMeshesAsLightDirty()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.transferTexturesToEffect = function (e, t) { + return this; + }), + (t.prototype._bindLight = function (e, t, n, i, r) { + void 0 === r && (r = !1); + var o = e.toString(), + s = !1; + if (!r || !this._uniformBuffer._alreadyBound) { + if ((this._uniformBuffer.bindToEffect(n, "Light" + o), this._renderId !== t.getRenderId() || !this._uniformBuffer.useUbo)) { + this._renderId = t.getRenderId(); + var c = this.getScaledIntensity(); + this.transferToEffect(n, o), + this.diffuse.scaleToRef(c, a.c.Color3[0]), + this._uniformBuffer.updateColor4("vLightDiffuse", a.c.Color3[0], this.range, o), + i && (this.specular.scaleToRef(c, a.c.Color3[1]), this._uniformBuffer.updateColor4("vLightSpecular", a.c.Color3[1], this.radius, o)), + (s = !0); + } + if ((this.transferTexturesToEffect(n, o), t.shadowsEnabled && this.shadowEnabled)) { + var l = this.getShadowGenerator(); + l && (l.bindShadowLight(o, n), (s = !0)); + } + s && this._uniformBuffer.update(); + } + }), + (t.prototype.getClassName = function () { + return "Light"; + }), + (t.prototype.toString = function (e) { + var t = "Name: " + this.name; + if (((t += ", type: " + ["Point", "Directional", "Spot", "Hemispheric"][this.getTypeID()]), this.animations)) for (var n = 0; n < this.animations.length; n++) t += ", animation[0]: " + this.animations[n].toString(e); + return t; + }), + (t.prototype._syncParentEnabledState = function () { + e.prototype._syncParentEnabledState.call(this), this.isDisposed() || this._resyncMeshes(); + }), + (t.prototype.setEnabled = function (t) { + e.prototype.setEnabled.call(this, t), this._resyncMeshes(); + }), + (t.prototype.getShadowGenerator = function () { + return this._shadowGenerator; + }), + (t.prototype.getAbsolutePosition = function () { + return o.e.Zero(); + }), + (t.prototype.canAffectMesh = function (e) { + return ( + !e || + (!(this.includedOnlyMeshes && this.includedOnlyMeshes.length > 0 && -1 === this.includedOnlyMeshes.indexOf(e)) && + !(this.excludedMeshes && this.excludedMeshes.length > 0 && -1 !== this.excludedMeshes.indexOf(e)) && + (0 === this.includeOnlyWithLayerMask || 0 != (this.includeOnlyWithLayerMask & e.layerMask)) && + !(0 !== this.excludeWithLayerMask && this.excludeWithLayerMask & e.layerMask)) + ); + }), + (t.CompareLightsPriority = function (e, t) { + return e.shadowEnabled !== t.shadowEnabled ? (t.shadowEnabled ? 1 : 0) - (e.shadowEnabled ? 1 : 0) : t.renderPriority - e.renderPriority; + }), + (t.prototype.dispose = function (t, n) { + void 0 === n && (n = !1), this._shadowGenerator && (this._shadowGenerator.dispose(), (this._shadowGenerator = null)), this.getScene().stopAnimation(this); + for (var i = 0, r = this.getScene().meshes; i < r.length; i++) { + r[i]._removeLightSource(this, !0); + } + this._uniformBuffer.dispose(), this.getScene().removeLight(this), e.prototype.dispose.call(this, t, n); + }), + (t.prototype.getTypeID = function () { + return 0; + }), + (t.prototype.getScaledIntensity = function () { + return this._photometricScale * this.intensity; + }), + (t.prototype.clone = function (e) { + var n = t.GetConstructorFromName(this.getTypeID(), e, this.getScene()); + return n ? r.a.Clone(n, this) : null; + }), + (t.prototype.serialize = function () { + var e = r.a.Serialize(this); + return ( + (e.type = this.getTypeID()), + this.parent && (e.parentId = this.parent.id), + this.excludedMeshes.length > 0 && + ((e.excludedMeshesIds = []), + this.excludedMeshes.forEach(function (t) { + e.excludedMeshesIds.push(t.id); + })), + this.includedOnlyMeshes.length > 0 && + ((e.includedOnlyMeshesIds = []), + this.includedOnlyMeshes.forEach(function (t) { + e.includedOnlyMeshesIds.push(t.id); + })), + r.a.AppendSerializedAnimations(this, e), + (e.ranges = this.serializeAnimationRanges()), + e + ); + }), + (t.GetConstructorFromName = function (e, t, n) { + var i = s.a.Construct("Light_Type_" + e, t, n); + return i || null; + }), + (t.Parse = function (e, n) { + var i = t.GetConstructorFromName(e.type, e.name, n); + if (!i) return null; + var o = r.a.Parse(i, e, n); + if ( + (e.excludedMeshesIds && (o._excludedMeshesIds = e.excludedMeshesIds), + e.includedOnlyMeshesIds && (o._includedOnlyMeshesIds = e.includedOnlyMeshesIds), + e.parentId && (o._waitingParentId = e.parentId), + void 0 !== e.falloffType && (o.falloffType = e.falloffType), + void 0 !== e.lightmapMode && (o.lightmapMode = e.lightmapMode), + e.animations) + ) { + for (var a = 0; a < e.animations.length; a++) { + var c = e.animations[a], + u = l.a.GetClass("BABYLON.Animation"); + u && o.animations.push(u.Parse(c)); + } + s.a.ParseAnimationRanges(o, e, n); + } + return e.autoAnimate && n.beginAnimation(o, e.autoAnimateFrom, e.autoAnimateTo, e.autoAnimateLoop, e.autoAnimateSpeed || 1), o; + }), + (t.prototype._hookArrayForExcluded = function (e) { + var t = this, + n = e.push; + e.push = function () { + for (var i = [], r = 0; r < arguments.length; r++) i[r] = arguments[r]; + for (var o = n.apply(e, i), a = 0, s = i; a < s.length; a++) { + var c = s[a]; + c._resyncLightSource(t); + } + return o; + }; + var i = e.splice; + e.splice = function (n, r) { + for (var o = i.apply(e, [n, r]), a = 0, s = o; a < s.length; a++) { + s[a]._resyncLightSource(t); + } + return o; + }; + for (var r = 0, o = e; r < o.length; r++) { + o[r]._resyncLightSource(this); + } + }), + (t.prototype._hookArrayForIncludedOnly = function (e) { + var t = this, + n = e.push; + e.push = function () { + for (var i = [], r = 0; r < arguments.length; r++) i[r] = arguments[r]; + var o = n.apply(e, i); + return t._resyncMeshes(), o; + }; + var i = e.splice; + (e.splice = function (n, r) { + var o = i.apply(e, [n, r]); + return t._resyncMeshes(), o; + }), + this._resyncMeshes(); + }), + (t.prototype._resyncMeshes = function () { + for (var e = 0, t = this.getScene().meshes; e < t.length; e++) { + t[e]._resyncLightSource(this); + } + }), + (t.prototype._markMeshesAsLightDirty = function () { + for (var e = 0, t = this.getScene().meshes; e < t.length; e++) { + var n = t[e]; + -1 !== n.lightSources.indexOf(this) && n._markSubMeshesAsLightDirty(); + } + }), + (t.prototype._computePhotometricScale = function () { + (this._photometricScale = this._getPhotometricScale()), this.getScene().resetCachedMaterial(); + }), + (t.prototype._getPhotometricScale = function () { + var e = 0, + n = this.getTypeID(), + i = this.intensityMode; + switch ((i === t.INTENSITYMODE_AUTOMATIC && (i = n === t.LIGHTTYPEID_DIRECTIONALLIGHT ? t.INTENSITYMODE_ILLUMINANCE : t.INTENSITYMODE_LUMINOUSINTENSITY), n)) { + case t.LIGHTTYPEID_POINTLIGHT: + case t.LIGHTTYPEID_SPOTLIGHT: + switch (i) { + case t.INTENSITYMODE_LUMINOUSPOWER: + e = 1 / (4 * Math.PI); + break; + case t.INTENSITYMODE_LUMINOUSINTENSITY: + e = 1; + break; + case t.INTENSITYMODE_LUMINANCE: + e = this.radius * this.radius; + } + break; + case t.LIGHTTYPEID_DIRECTIONALLIGHT: + switch (i) { + case t.INTENSITYMODE_ILLUMINANCE: + e = 1; + break; + case t.INTENSITYMODE_LUMINANCE: + var r = this.radius; + (r = Math.max(r, 0.001)), (e = 2 * Math.PI * (1 - Math.cos(r))); + } + break; + case t.LIGHTTYPEID_HEMISPHERICLIGHT: + e = 1; + } + return e; + }), + (t.prototype._reorderLightsInScene = function () { + var e = this.getScene(); + 0 != this._renderPriority && (e.requireLightSorting = !0), this.getScene().sortLightsByPriority(); + }), + (t.FALLOFF_DEFAULT = 0), + (t.FALLOFF_PHYSICAL = 1), + (t.FALLOFF_GLTF = 2), + (t.FALLOFF_STANDARD = 3), + (t.LIGHTMAP_DEFAULT = 0), + (t.LIGHTMAP_SPECULAR = 1), + (t.LIGHTMAP_SHADOWSONLY = 2), + (t.INTENSITYMODE_AUTOMATIC = 0), + (t.INTENSITYMODE_LUMINOUSPOWER = 1), + (t.INTENSITYMODE_LUMINOUSINTENSITY = 2), + (t.INTENSITYMODE_ILLUMINANCE = 3), + (t.INTENSITYMODE_LUMINANCE = 4), + (t.LIGHTTYPEID_POINTLIGHT = 0), + (t.LIGHTTYPEID_DIRECTIONALLIGHT = 1), + (t.LIGHTTYPEID_SPOTLIGHT = 2), + (t.LIGHTTYPEID_HEMISPHERICLIGHT = 3), + Object(i.c)([Object(r.e)()], t.prototype, "diffuse", void 0), + Object(i.c)([Object(r.e)()], t.prototype, "specular", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "falloffType", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "intensity", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "range", null), + Object(i.c)([Object(r.c)()], t.prototype, "intensityMode", null), + Object(i.c)([Object(r.c)()], t.prototype, "radius", null), + Object(i.c)([Object(r.c)()], t.prototype, "_renderPriority", void 0), + Object(i.c)([Object(r.b)("_reorderLightsInScene")], t.prototype, "renderPriority", void 0), + Object(i.c)([Object(r.c)("shadowEnabled")], t.prototype, "_shadowEnabled", void 0), + Object(i.c)([Object(r.c)("excludeWithLayerMask")], t.prototype, "_excludeWithLayerMask", void 0), + Object(i.c)([Object(r.c)("includeOnlyWithLayerMask")], t.prototype, "_includeOnlyWithLayerMask", void 0), + Object(i.c)([Object(r.c)("lightmapMode")], t.prototype, "_lightmapMode", void 0), + t + ); + })(s.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.BuildArray = function (e, t) { + for (var n = [], i = 0; i < e; ++i) n.push(t()); + return n; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "helperFunctions", + r = + "const float PI=3.1415926535897932384626433832795;\nconst float LinearEncodePowerApprox=2.2;\nconst float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;\nconst vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);\nconst float Epsilon=0.0000001;\n#define saturate(x) clamp(x,0.0,1.0)\n#define absEps(x) abs(x)+Epsilon\n#define maxEps(x) max(x,Epsilon)\n#define saturateEps(x) clamp(x,Epsilon,1.0)\nmat3 transposeMat3(mat3 inMatrix) {\nvec3 i0=inMatrix[0];\nvec3 i1=inMatrix[1];\nvec3 i2=inMatrix[2];\nmat3 outMatrix=mat3(\nvec3(i0.x,i1.x,i2.x),\nvec3(i0.y,i1.y,i2.y),\nvec3(i0.z,i1.z,i2.z)\n);\nreturn outMatrix;\n}\n\nmat3 inverseMat3(mat3 inMatrix) {\nfloat a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];\nfloat a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];\nfloat a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];\nfloat b01=a22*a11-a12*a21;\nfloat b11=-a22*a10+a12*a20;\nfloat b21=a21*a10-a11*a20;\nfloat det=a00*b01+a01*b11+a02*b21;\nreturn mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),\nb11,(a22*a00-a02*a20),(-a12*a00+a02*a10),\nb21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;\n}\nvec3 toLinearSpace(vec3 color)\n{\nreturn pow(color,vec3(LinearEncodePowerApprox));\n}\nvec3 toGammaSpace(vec3 color)\n{\nreturn pow(color,vec3(GammaEncodePowerApprox));\n}\nfloat toGammaSpace(float color)\n{\nreturn pow(color,GammaEncodePowerApprox);\n}\nfloat square(float value)\n{\nreturn value*value;\n}\nfloat pow5(float value) {\nfloat sq=value*value;\nreturn sq*sq*value;\n}\nfloat getLuminance(vec3 color)\n{\nreturn clamp(dot(color,LuminanceEncodeApprox),0.,1.);\n}\n\nfloat getRand(vec2 seed) {\nreturn fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);\n}\nfloat dither(vec2 seed,float varianceAmount) {\nfloat rand=getRand(seed);\nfloat dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand);\nreturn dither;\n}\n\nconst float rgbdMaxRange=255.0;\nvec4 toRGBD(vec3 color) {\nfloat maxRGB=maxEps(max(color.r,max(color.g,color.b)));\nfloat D=max(rgbdMaxRange/maxRGB,1.);\nD=clamp(floor(D)/255.0,0.,1.);\n\nvec3 rgb=color.rgb*D;\n\nrgb=toGammaSpace(rgb);\nreturn vec4(rgb,D);\n}\nvec3 fromRGBD(vec4 rgbd) {\n\nrgbd.rgb=toLinearSpace(rgbd.rgb);\n\nreturn rgbd.rgb/rgbd.a;\n}\n"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "lightFragmentDeclaration", + r = + "#ifdef LIGHT{X}\nuniform vec4 vLightData{X};\nuniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float cascadeBlendFactor{X};\nvarying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\nuniform highp sampler2DArray depthSampler{X};\nuniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);\nvec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};\nuniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};\nuniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "lightUboDeclaration", + r = + "#ifdef LIGHT{X}\nuniform Light{X}\n{\nvec4 vLightData;\nvec4 vLightDiffuse;\nvec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;\nvec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;\nvec2 depthValues;\n} light{X};\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float cascadeBlendFactor{X};\nvarying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];\nvarying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\nuniform highp sampler2DArray depthSampler{X};\nuniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];\nuniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowSampler{X};\n#else\nuniform highp sampler2DArray shadowSampler{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);\nvec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "AbstractScene", function () { + return i.a; + }), + n.d(t, "AbstractActionManager", function () { + return r.a; + }), + n.d(t, "Action", function () { + return l; + }), + n.d(t, "ActionEvent", function () { + return u.a; + }), + n.d(t, "ActionManager", function () { + return A; + }), + n.d(t, "Condition", function () { + return d; + }), + n.d(t, "ValueCondition", function () { + return p; + }), + n.d(t, "PredicateCondition", function () { + return f; + }), + n.d(t, "StateCondition", function () { + return m; + }), + n.d(t, "SwitchBooleanAction", function () { + return b; + }), + n.d(t, "SetStateAction", function () { + return _; + }), + n.d(t, "SetValueAction", function () { + return v; + }), + n.d(t, "IncrementValueAction", function () { + return y; + }), + n.d(t, "PlayAnimationAction", function () { + return C; + }), + n.d(t, "StopAnimationAction", function () { + return P; + }), + n.d(t, "DoNothingAction", function () { + return x; + }), + n.d(t, "CombineAction", function () { + return T; + }), + n.d(t, "ExecuteCodeAction", function () { + return S; + }), + n.d(t, "SetParentAction", function () { + return O; + }), + n.d(t, "PlaySoundAction", function () { + return I; + }), + n.d(t, "StopSoundAction", function () { + return D; + }), + n.d(t, "InterpolateValueAction", function () { + return w; + }), + n.d(t, "Animatable", function () { + return F.a; + }), + n.d(t, "_IAnimationState", function () { + return R.b; + }), + n.d(t, "Animation", function () { + return R.a; + }), + n.d(t, "TargetedAnimation", function () { + return N.b; + }), + n.d(t, "AnimationGroup", function () { + return N.a; + }), + n.d(t, "AnimationPropertiesOverride", function () { + return k; + }), + n.d(t, "EasingFunction", function () { + return X; + }), + n.d(t, "CircleEase", function () { + return Y; + }), + n.d(t, "BackEase", function () { + return K; + }), + n.d(t, "BounceEase", function () { + return Z; + }), + n.d(t, "CubicEase", function () { + return q; + }), + n.d(t, "ElasticEase", function () { + return Q; + }), + n.d(t, "ExponentialEase", function () { + return J; + }), + n.d(t, "PowerEase", function () { + return $; + }), + n.d(t, "QuadraticEase", function () { + return ee; + }), + n.d(t, "QuarticEase", function () { + return te; + }), + n.d(t, "QuinticEase", function () { + return ne; + }), + n.d(t, "SineEase", function () { + return ie; + }), + n.d(t, "BezierCurveEase", function () { + return re; + }), + n.d(t, "RuntimeAnimation", function () { + return oe.a; + }), + n.d(t, "AnimationEvent", function () { + return ae.a; + }), + n.d(t, "AnimationKeyInterpolation", function () { + return se.a; + }), + n.d(t, "AnimationRange", function () { + return ce.a; + }), + n.d(t, "KeepAssets", function () { + return le.c; + }), + n.d(t, "InstantiatedEntries", function () { + return le.b; + }), + n.d(t, "AssetContainer", function () { + return le.a; + }), + n.d(t, "Analyser", function () { + return he; + }), + n.d(t, "AudioEngine", function () { + return de; + }), + n.d(t, "AudioSceneComponent", function () { + return _e; + }), + n.d(t, "Sound", function () { + return pe.a; + }), + n.d(t, "SoundTrack", function () { + return fe; + }), + n.d(t, "WeightedSound", function () { + return ve.a; + }), + n.d(t, "AutoRotationBehavior", function () { + return Ce; + }), + n.d(t, "BouncingBehavior", function () { + return Pe; + }), + n.d(t, "FramingBehavior", function () { + return xe; + }), + n.d(t, "AttachToBoxBehavior", function () { + return Se; + }), + n.d(t, "FadeInOutBehavior", function () { + return Oe.a; + }), + n.d(t, "MultiPointerScaleBehavior", function () { + return Ne; + }), + n.d(t, "PointerDragBehavior", function () { + return Fe; + }), + n.d(t, "SixDofDragBehavior", function () { + return ze; + }), + n.d(t, "Bone", function () { + return je.a; + }), + n.d(t, "BoneIKController", function () { + return Ve; + }), + n.d(t, "BoneLookController", function () { + return Ge; + }), + n.d(t, "Skeleton", function () { + return Ue.a; + }), + n.d(t, "ArcRotateCameraGamepadInput", function () { + return Ze; + }), + n.d(t, "ArcRotateCameraKeyboardMoveInput", function () { + return Qe; + }), + n.d(t, "ArcRotateCameraMouseWheelInput", function () { + return Je; + }), + n.d(t, "ArcRotateCameraPointersInput", function () { + return tt; + }), + n.d(t, "ArcRotateCameraVRDeviceOrientationInput", function () { + return it; + }), + n.d(t, "FlyCameraKeyboardInput", function () { + return rt; + }), + n.d(t, "FlyCameraMouseInput", function () { + return ot; + }), + n.d(t, "FollowCameraKeyboardMoveInput", function () { + return at; + }), + n.d(t, "FollowCameraMouseWheelInput", function () { + return st; + }), + n.d(t, "FollowCameraPointersInput", function () { + return ct; + }), + n.d(t, "FreeCameraDeviceOrientationInput", function () { + return ut; + }), + n.d(t, "FreeCameraGamepadInput", function () { + return ht; + }), + n.d(t, "FreeCameraKeyboardMoveInput", function () { + return pt.a; + }), + n.d(t, "FreeCameraMouseInput", function () { + return ft.a; + }), + n.d(t, "FreeCameraTouchInput", function () { + return mt.a; + }), + n.d(t, "FreeCameraVirtualJoystickInput", function () { + return _t; + }), + n.d(t, "CameraInputTypes", function () { + return We.a; + }), + n.d(t, "CameraInputsManager", function () { + return We.b; + }), + n.d(t, "Camera", function () { + return De.a; + }), + n.d(t, "TargetCamera", function () { + return vt.a; + }), + n.d(t, "FreeCamera", function () { + return yt.a; + }), + n.d(t, "FreeCameraInputsManager", function () { + return lt.a; + }), + n.d(t, "TouchCamera", function () { + return Pt; + }), + n.d(t, "ArcRotateCamera", function () { + return xt; + }), + n.d(t, "ArcRotateCameraInputsManager", function () { + return nt; + }), + n.d(t, "DeviceOrientationCamera", function () { + return Tt; + }), + n.d(t, "FlyCamera", function () { + return Ot; + }), + n.d(t, "FlyCameraInputsManager", function () { + return St; + }), + n.d(t, "FollowCamera", function () { + return At; + }), + n.d(t, "ArcFollowCamera", function () { + return It; + }), + n.d(t, "FollowCameraInputsManager", function () { + return Et; + }), + n.d(t, "GamepadCamera", function () { + return Ut; + }), + n.d(t, "AnaglyphArcRotateCamera", function () { + return Zt; + }), + n.d(t, "AnaglyphFreeCamera", function () { + return qt; + }), + n.d(t, "AnaglyphGamepadCamera", function () { + return Qt; + }), + n.d(t, "AnaglyphUniversalCamera", function () { + return Jt; + }), + n.d(t, "StereoscopicArcRotateCamera", function () { + return nn; + }), + n.d(t, "StereoscopicFreeCamera", function () { + return rn; + }), + n.d(t, "StereoscopicGamepadCamera", function () { + return on; + }), + n.d(t, "StereoscopicUniversalCamera", function () { + return an; + }), + n.d(t, "UniversalCamera", function () { + return Gt; + }), + n.d(t, "VirtualJoysticksCamera", function () { + return sn; + }), + n.d(t, "VRCameraMetrics", function () { + return cn; + }), + n.d(t, "VRDeviceOrientationArcRotateCamera", function () { + return yn; + }), + n.d(t, "VRDeviceOrientationFreeCamera", function () { + return Cn; + }), + n.d(t, "VRDeviceOrientationGamepadCamera", function () { + return Pn; + }), + n.d(t, "OnAfterEnteringVRObservableEvent", function () { + return Yn; + }), + n.d(t, "VRExperienceHelper", function () { + return Kn; + }), + n.d(t, "WebVRFreeCamera", function () { + return Sn; + }), + n.d(t, "Collider", function () { + return Qn; + }), + n.d(t, "DefaultCollisionCoordinator", function () { + return Jn; + }), + n.d(t, "PickingInfo", function () { + return Ae.a; + }), + n.d(t, "IntersectionInfo", function () { + return Ie.a; + }), + n.d(t, "_MeshCollisionData", function () { + return $n.a; + }), + n.d(t, "BoundingBox", function () { + return ei.a; + }), + n.d(t, "BoundingInfo", function () { + return ti.a; + }), + n.d(t, "BoundingSphere", function () { + return ni.a; + }), + n.d(t, "Octree", function () { + return oi; + }), + n.d(t, "OctreeBlock", function () { + return ri; + }), + n.d(t, "OctreeSceneComponent", function () { + return ai; + }), + n.d(t, "Ray", function () { + return Re; + }), + n.d(t, "AxesViewer", function () { + return hi; + }), + n.d(t, "BoneAxesViewer", function () { + return di; + }), + n.d(t, "DebugLayerTab", function () { + return pi.DebugLayerTab; + }), + n.d(t, "DebugLayer", function () { + return pi.DebugLayer; + }), + n.d(t, "PhysicsViewer", function () { + return Pi; + }), + n.d(t, "RayHelper", function () { + return Si; + }), + n.d(t, "SkeletonViewer", function () { + return Oi; + }), + n.d(t, "Constants", function () { + return Ei.a; + }), + n.d(t, "ThinEngine", function () { + return Mi.a; + }), + n.d(t, "Engine", function () { + return ue.a; + }), + n.d(t, "EngineStore", function () { + return E.a; + }), + n.d(t, "NullEngineOptions", function () { + return Ai.b; + }), + n.d(t, "NullEngine", function () { + return Ai.a; + }), + n.d(t, "_OcclusionDataStorage", function () { + return Di; + }), + n.d(t, "_forceTransformFeedbackToBundle", function () { + return Ri; + }), + n.d(t, "EngineView", function () { + return wi; + }), + n.d(t, "WebGLPipelineContext", function () { + return Ni.a; + }), + n.d(t, "WebGL2ShaderProcessor", function () { + return ki.a; + }), + n.d(t, "NativeEngine", function () { + return Qi; + }), + n.d(t, "KeyboardEventTypes", function () { + return qe.a; + }), + n.d(t, "KeyboardInfo", function () { + return qe.b; + }), + n.d(t, "KeyboardInfoPre", function () { + return qe.c; + }), + n.d(t, "PointerEventTypes", function () { + return ye.a; + }), + n.d(t, "PointerInfoBase", function () { + return ye.c; + }), + n.d(t, "PointerInfoPre", function () { + return ye.d; + }), + n.d(t, "PointerInfo", function () { + return ye.b; + }), + n.d(t, "ClipboardEventTypes", function () { + return Ji.a; + }), + n.d(t, "ClipboardInfo", function () { + return Ji.b; + }), + n.d(t, "DaydreamController", function () { + return er; + }), + n.d(t, "GearVRController", function () { + return tr; + }), + n.d(t, "GenericController", function () { + return nr; + }), + n.d(t, "OculusTouchController", function () { + return ir; + }), + n.d(t, "PoseEnabledControllerType", function () { + return Mt; + }), + n.d(t, "PoseEnabledControllerHelper", function () { + return Lt; + }), + n.d(t, "PoseEnabledController", function () { + return Ft; + }), + n.d(t, "ViveController", function () { + return rr; + }), + n.d(t, "WebVRController", function () { + return On; + }), + n.d(t, "WindowsMotionController", function () { + return ar; + }), + n.d(t, "XRWindowsMotionController", function () { + return sr; + }), + n.d(t, "StickValues", function () { + return Xe; + }), + n.d(t, "Gamepad", function () { + return Ye; + }), + n.d(t, "GenericPad", function () { + return Ke; + }), + n.d(t, "GamepadManager", function () { + return Bt; + }), + n.d(t, "GamepadSystemSceneComponent", function () { + return Vt; + }), + n.d(t, "Xbox360Button", function () { + return Rt; + }), + n.d(t, "Xbox360Dpad", function () { + return wt; + }), + n.d(t, "Xbox360Pad", function () { + return zt; + }), + n.d(t, "DualShockButton", function () { + return Nt; + }), + n.d(t, "DualShockDpad", function () { + return kt; + }), + n.d(t, "DualShockPad", function () { + return jt; + }), + n.d(t, "AxisDragGizmo", function () { + return ui; + }), + n.d(t, "AxisScaleGizmo", function () { + return cr; + }), + n.d(t, "BoundingBoxGizmo", function () { + return lr; + }), + n.d(t, "Gizmo", function () { + return li; + }), + n.d(t, "GizmoManager", function () { + return gr; + }), + n.d(t, "PlaneRotationGizmo", function () { + return ur; + }), + n.d(t, "PositionGizmo", function () { + return pr; + }), + n.d(t, "RotationGizmo", function () { + return hr; + }), + n.d(t, "ScaleGizmo", function () { + return mr; + }), + n.d(t, "LightGizmo", function () { + return yr; + }), + n.d(t, "PlaneDragGizmo", function () { + return dr; + }), + n.d(t, "EnvironmentHelper", function () { + return Gr; + }), + n.d(t, "PhotoDome", function () { + return Ur; + }), + n.d(t, "_forceSceneHelpersToBundle", function () { + return Eo; + }), + n.d(t, "VideoDome", function () { + return Do; + }), + n.d(t, "EngineInstrumentation", function () { + return wo; + }), + n.d(t, "SceneInstrumentation", function () { + return Lo; + }), + n.d(t, "_TimeToken", function () { + return Ii; + }), + n.d(t, "EffectLayer", function () { + return jo; + }), + n.d(t, "EffectLayerSceneComponent", function () { + return Bo; + }), + n.d(t, "GlowLayer", function () { + return Uo; + }), + n.d(t, "HighlightLayer", function () { + return Xo; + }), + n.d(t, "Layer", function () { + return Yo.a; + }), + n.d(t, "LayerSceneComponent", function () { + return Ko.a; + }), + n.d(t, "LensFlare", function () { + return Zo; + }), + n.d(t, "LensFlareSystem", function () { + return Jo; + }), + n.d(t, "LensFlareSystemSceneComponent", function () { + return $o; + }), + n.d(t, "Light", function () { + return ea.a; + }), + n.d(t, "ShadowLight", function () { + return ta.a; + }), + n.d(t, "ShadowGenerator", function () { + return aa; + }), + n.d(t, "CascadedShadowGenerator", function () { + return va; + }), + n.d(t, "ShadowGeneratorSceneComponent", function () { + return ya; + }), + n.d(t, "DirectionalLight", function () { + return br.a; + }), + n.d(t, "HemisphericLight", function () { + return xn.a; + }), + n.d(t, "PointLight", function () { + return Ca.a; + }), + n.d(t, "SpotLight", function () { + return vr.a; + }), + n.d(t, "DefaultLoadingScreen", function () { + return Pa; + }), + n.d(t, "_BabylonLoaderRegistered", function () { + return ka; + }), + n.d(t, "BabylonFileLoaderConfiguration", function () { + return za; + }), + n.d(t, "SceneLoaderProgressEvent", function () { + return $i.c; + }), + n.d(t, "SceneLoaderAnimationGroupLoadingMode", function () { + return $i.b; + }), + n.d(t, "SceneLoader", function () { + return $i.a; + }), + n.d(t, "SceneLoaderFlags", function () { + return Ha.a; + }), + n.d(t, "BackgroundMaterial", function () { + return Vr; + }), + n.d(t, "ColorCurves", function () { + return Wa.a; + }), + n.d(t, "EffectFallbacks", function () { + return jr.a; + }), + n.d(t, "Effect", function () { + return Xt.a; + }), + n.d(t, "FresnelParameters", function () { + return Xa; + }), + n.d(t, "ImageProcessingConfigurationDefines", function () { + return En.b; + }), + n.d(t, "ImageProcessingConfiguration", function () { + return En.a; + }), + n.d(t, "Material", function () { + return Fo.a; + }), + n.d(t, "MaterialDefines", function () { + return Dr.a; + }), + n.d(t, "MaterialHelper", function () { + return Ir.a; + }), + n.d(t, "MultiMaterial", function () { + return Ta.a; + }), + n.d(t, "PBRMaterialDefines", function () { + return Ya.b; + }), + n.d(t, "PBRBaseMaterial", function () { + return Ya.a; + }), + n.d(t, "PBRBaseSimpleMaterial", function () { + return Ka.a; + }), + n.d(t, "PBRMaterial", function () { + return Hr.a; + }), + n.d(t, "PBRMetallicRoughnessMaterial", function () { + return Za.a; + }), + n.d(t, "PBRSpecularGlossinessMaterial", function () { + return qa; + }), + n.d(t, "PushMaterial", function () { + return Rr.a; + }), + n.d(t, "ShaderMaterial", function () { + return Qa.a; + }), + n.d(t, "StandardMaterialDefines", function () { + return Mn.b; + }), + n.d(t, "StandardMaterial", function () { + return Mn.a; + }), + n.d(t, "BaseTexture", function () { + return Cr.a; + }), + n.d(t, "ColorGradingTexture", function () { + return Ja; + }), + n.d(t, "CubeTexture", function () { + return Ar.a; + }), + n.d(t, "DynamicTexture", function () { + return An.a; + }), + n.d(t, "EquiRectangularCubeTexture", function () { + return $a; + }), + n.d(t, "HDRCubeTexture", function () { + return Ea; + }), + n.d(t, "InternalTextureSource", function () { + return pn.b; + }), + n.d(t, "InternalTexture", function () { + return pn.a; + }), + n.d(t, "_DDSTextureLoader", function () { + return eo; + }), + n.d(t, "_ENVTextureLoader", function () { + return to; + }), + n.d(t, "_KTXTextureLoader", function () { + return ro; + }), + n.d(t, "_TGATextureLoader", function () { + return ts; + }), + n.d(t, "_BasisTextureLoader", function () { + return as; + }), + n.d(t, "MirrorTexture", function () { + return Mr; + }), + n.d(t, "MultiRenderTarget", function () { + return ss; + }), + n.d(t, "CustomProceduralTexture", function () { + return us; + }), + n.d(t, "NoiseProceduralTexture", function () { + return ds; + }), + n.d(t, "ProceduralTexture", function () { + return cs.a; + }), + n.d(t, "ProceduralTextureSceneComponent", function () { + return vs.a; + }), + n.d(t, "RawCubeTexture", function () { + return ys.a; + }), + n.d(t, "RawTexture", function () { + return Cs.a; + }), + n.d(t, "RawTexture3D", function () { + return Ps; + }), + n.d(t, "RawTexture2DArray", function () { + return xs; + }), + n.d(t, "RefractionTexture", function () { + return Ts; + }), + n.d(t, "RenderTargetTexture", function () { + return mn.a; + }), + n.d(t, "Texture", function () { + return ln.a; + }), + n.d(t, "VideoTexture", function () { + return Mo; + }), + n.d(t, "HtmlElementTexture", function () { + return Ss; + }), + n.d(t, "TexturePacker", function () { + return Es; + }), + n.d(t, "TexturePackerFrame", function () { + return Os; + }), + n.d(t, "UniformBuffer", function () { + return fn.a; + }), + n.d(t, "MaterialFlags", function () { + return wr.a; + }), + n.d(t, "NodeMaterialBlockTargets", function () { + return ps; + }), + n.d(t, "NodeMaterialBlockConnectionPointTypes", function () { + return fs; + }), + n.d(t, "NodeMaterialBlockConnectionPointMode", function () { + return ms; + }), + n.d(t, "NodeMaterialSystemValues", function () { + return gs; + }), + n.d(t, "NodeMaterialConnectionPointCompatibilityStates", function () { + return bs; + }), + n.d(t, "NodeMaterialConnectionPointDirection", function () { + return _s; + }), + n.d(t, "NodeMaterialConnectionPoint", function () { + return Ms; + }), + n.d(t, "NodeMaterialBlock", function () { + return Is; + }), + n.d(t, "NodeMaterialDefines", function () { + return zs; + }), + n.d(t, "NodeMaterial", function () { + return js; + }), + n.d(t, "VertexOutputBlock", function () { + return Ls; + }), + n.d(t, "BonesBlock", function () { + return Bs; + }), + n.d(t, "InstancesBlock", function () { + return Vs; + }), + n.d(t, "MorphTargetsBlock", function () { + return Gs; + }), + n.d(t, "LightInformationBlock", function () { + return Us; + }), + n.d(t, "FragmentOutputBlock", function () { + return Ns; + }), + n.d(t, "ImageProcessingBlock", function () { + return Hs; + }), + n.d(t, "PerturbNormalBlock", function () { + return Ws; + }), + n.d(t, "DiscardBlock", function () { + return Xs; + }), + n.d(t, "FrontFacingBlock", function () { + return Ys; + }), + n.d(t, "DerivativeBlock", function () { + return Ks; + }), + n.d(t, "FogBlock", function () { + return Zs; + }), + n.d(t, "LightBlock", function () { + return qs; + }), + n.d(t, "TextureBlock", function () { + return Qs; + }), + n.d(t, "ReflectionTextureBlock", function () { + return Js; + }), + n.d(t, "InputBlock", function () { + return ks; + }), + n.d(t, "AnimatedInputBlockTypes", function () { + return Fs; + }), + n.d(t, "MultiplyBlock", function () { + return $s; + }), + n.d(t, "AddBlock", function () { + return ec; + }), + n.d(t, "ScaleBlock", function () { + return tc; + }), + n.d(t, "ClampBlock", function () { + return nc; + }), + n.d(t, "CrossBlock", function () { + return ic; + }), + n.d(t, "DotBlock", function () { + return rc; + }), + n.d(t, "TransformBlock", function () { + return ws; + }), + n.d(t, "RemapBlock", function () { + return oc; + }), + n.d(t, "NormalizeBlock", function () { + return sc; + }), + n.d(t, "TrigonometryBlockOperations", function () { + return ac; + }), + n.d(t, "TrigonometryBlock", function () { + return cc; + }), + n.d(t, "ColorMergerBlock", function () { + return lc; + }), + n.d(t, "VectorMergerBlock", function () { + return uc; + }), + n.d(t, "ColorSplitterBlock", function () { + return hc; + }), + n.d(t, "VectorSplitterBlock", function () { + return dc; + }), + n.d(t, "LerpBlock", function () { + return pc; + }), + n.d(t, "DivideBlock", function () { + return fc; + }), + n.d(t, "SubtractBlock", function () { + return mc; + }), + n.d(t, "StepBlock", function () { + return gc; + }), + n.d(t, "OneMinusBlock", function () { + return bc; + }), + n.d(t, "ViewDirectionBlock", function () { + return _c; + }), + n.d(t, "FresnelBlock", function () { + return vc; + }), + n.d(t, "MaxBlock", function () { + return yc; + }), + n.d(t, "MinBlock", function () { + return Cc; + }), + n.d(t, "DistanceBlock", function () { + return Pc; + }), + n.d(t, "LengthBlock", function () { + return xc; + }), + n.d(t, "NegateBlock", function () { + return Tc; + }), + n.d(t, "PowBlock", function () { + return Sc; + }), + n.d(t, "RandomNumberBlock", function () { + return Oc; + }), + n.d(t, "ArcTan2Block", function () { + return Ec; + }), + n.d(t, "SmoothStepBlock", function () { + return Mc; + }), + n.d(t, "ReciprocalBlock", function () { + return Ac; + }), + n.d(t, "ReplaceColorBlock", function () { + return Ic; + }), + n.d(t, "PosterizeBlock", function () { + return Rc; + }), + n.d(t, "WaveBlockKind", function () { + return Dc; + }), + n.d(t, "WaveBlock", function () { + return wc; + }), + n.d(t, "GradientBlockColorStep", function () { + return Lc; + }), + n.d(t, "GradientBlock", function () { + return Fc; + }), + n.d(t, "NLerpBlock", function () { + return Nc; + }), + n.d(t, "WorleyNoise3DBlock", function () { + return kc; + }), + n.d(t, "SimplexPerlin3DBlock", function () { + return zc; + }), + n.d(t, "NormalBlendBlock", function () { + return jc; + }), + n.d(t, "Rotate2dBlock", function () { + return Bc; + }), + n.d(t, "ReflectBlock", function () { + return Vc; + }), + n.d(t, "RefractBlock", function () { + return Gc; + }), + n.d(t, "DesaturateBlock", function () { + return Uc; + }), + n.d(t, "NodeMaterialOptimizer", function () { + return Hc; + }), + n.d(t, "EffectRenderer", function () { + return Wc; + }), + n.d(t, "EffectWrapper", function () { + return Xc; + }), + n.d(t, "Scalar", function () { + return z.a; + }), + n.d(t, "Space", function () { + return Be.b; + }), + n.d(t, "Axis", function () { + return Be.a; + }), + n.d(t, "Color3", function () { + return s.a; + }), + n.d(t, "Color4", function () { + return s.b; + }), + n.d(t, "TmpColors", function () { + return s.c; + }), + n.d(t, "ToGammaSpace", function () { + return j.b; + }), + n.d(t, "ToLinearSpace", function () { + return j.c; + }), + n.d(t, "Epsilon", function () { + return j.a; + }), + n.d(t, "Frustum", function () { + return bn.a; + }), + n.d(t, "Orientation", function () { + return L; + }), + n.d(t, "BezierCurve", function () { + return B; + }), + n.d(t, "Angle", function () { + return V; + }), + n.d(t, "Arc2", function () { + return G; + }), + n.d(t, "Path2", function () { + return U; + }), + n.d(t, "Path3D", function () { + return H; + }), + n.d(t, "Curve3", function () { + return W; + }), + n.d(t, "Plane", function () { + return Zn.a; + }), + n.d(t, "Size", function () { + return Tn.a; + }), + n.d(t, "Vector2", function () { + return a.d; + }), + n.d(t, "Vector3", function () { + return a.e; + }), + n.d(t, "Vector4", function () { + return a.f; + }), + n.d(t, "Quaternion", function () { + return a.b; + }), + n.d(t, "Matrix", function () { + return a.a; + }), + n.d(t, "TmpVectors", function () { + return a.c; + }), + n.d(t, "PositionNormalVertex", function () { + return Ao; + }), + n.d(t, "PositionNormalTextureVertex", function () { + return Io; + }), + n.d(t, "Viewport", function () { + return vn.a; + }), + n.d(t, "SphericalHarmonics", function () { + return Wr.a; + }), + n.d(t, "SphericalPolynomial", function () { + return Wr.b; + }), + n.d(t, "AbstractMesh", function () { + return ke.a; + }), + n.d(t, "Buffer", function () { + return wn.a; + }), + n.d(t, "VertexBuffer", function () { + return wn.b; + }), + n.d(t, "DracoCompression", function () { + return Yc.a; + }), + n.d(t, "CSG", function () { + return el; + }), + n.d(t, "Geometry", function () { + return xa.a; + }), + n.d(t, "GroundMesh", function () { + return Ln; + }), + n.d(t, "TrailMesh", function () { + return tl; + }), + n.d(t, "InstancedMesh", function () { + return nl.a; + }), + n.d(t, "LinesMesh", function () { + return xi.b; + }), + n.d(t, "InstancedLinesMesh", function () { + return xi.a; + }), + n.d(t, "_CreationDataStorage", function () { + return Ee.b; + }), + n.d(t, "_InstancesBatch", function () { + return Ee.c; + }), + n.d(t, "Mesh", function () { + return Ee.a; + }), + n.d(t, "VertexData", function () { + return Rn.a; + }), + n.d(t, "MeshBuilder", function () { + return bl; + }), + n.d(t, "SimplificationSettings", function () { + return _l; + }), + n.d(t, "SimplificationQueue", function () { + return vl; + }), + n.d(t, "SimplificationType", function () { + return ml; + }), + n.d(t, "SimplicationQueueSceneComponent", function () { + return Sl; + }), + n.d(t, "Polygon", function () { + return cl; + }), + n.d(t, "PolygonMeshBuilder", function () { + return ll; + }), + n.d(t, "BaseSubMesh", function () { + return Kc.a; + }), + n.d(t, "SubMesh", function () { + return Kc.b; + }), + n.d(t, "MeshLODLevel", function () { + return Ol.a; + }), + n.d(t, "TransformNode", function () { + return si.a; + }), + n.d(t, "BoxBuilder", function () { + return fi.a; + }), + n.d(t, "TiledBoxBuilder", function () { + return rl; + }), + n.d(t, "DiscBuilder", function () { + return il; + }), + n.d(t, "RibbonBuilder", function () { + return wa; + }), + n.d(t, "SphereBuilder", function () { + return mi; + }), + n.d(t, "HemisphereBuilder", function () { + return _r; + }), + n.d(t, "CylinderBuilder", function () { + return jn; + }), + n.d(t, "TorusBuilder", function () { + return kn; + }), + n.d(t, "TorusKnotBuilder", function () { + return ol; + }), + n.d(t, "LinesBuilder", function () { + return Ti; + }), + n.d(t, "PolygonBuilder", function () { + return ul; + }), + n.d(t, "ShapeBuilder", function () { + return La; + }), + n.d(t, "LatheBuilder", function () { + return hl; + }), + n.d(t, "PlaneBuilder", function () { + return Le.a; + }), + n.d(t, "TiledPlaneBuilder", function () { + return dl; + }), + n.d(t, "GroundBuilder", function () { + return Nn; + }), + n.d(t, "TubeBuilder", function () { + return pl; + }), + n.d(t, "PolyhedronBuilder", function () { + return fr; + }), + n.d(t, "IcoSphereBuilder", function () { + return fl; + }), + n.d(t, "DecalBuilder", function () { + return gl; + }), + n.d(t, "DataBuffer", function () { + return zi.a; + }), + n.d(t, "WebGLDataBuffer", function () { + return El.a; + }), + n.d(t, "MorphTarget", function () { + return Ml.a; + }), + n.d(t, "MorphTargetManager", function () { + return Ma.a; + }), + n.d(t, "RecastJSPlugin", function () { + return Al; + }), + n.d(t, "RecastJSCrowd", function () { + return Il; + }), + n.d(t, "Node", function () { + return Ct.a; + }), + n.d(t, "Database", function () { + return Rl; + }), + n.d(t, "BaseParticleSystem", function () { + return Ul; + }), + n.d(t, "BoxParticleEmitter", function () { + return wl; + }), + n.d(t, "ConeParticleEmitter", function () { + return Ll; + }), + n.d(t, "CylinderParticleEmitter", function () { + return Fl; + }), + n.d(t, "CylinderDirectedParticleEmitter", function () { + return Nl; + }), + n.d(t, "HemisphericParticleEmitter", function () { + return kl; + }), + n.d(t, "PointParticleEmitter", function () { + return zl; + }), + n.d(t, "SphereParticleEmitter", function () { + return jl; + }), + n.d(t, "SphereDirectedParticleEmitter", function () { + return Bl; + }), + n.d(t, "CustomParticleEmitter", function () { + return Vl; + }), + n.d(t, "MeshParticleEmitter", function () { + return Gl; + }), + n.d(t, "GPUParticleSystem", function () { + return ru; + }), + n.d(t, "Particle", function () { + return Kl; + }), + n.d(t, "ParticleHelper", function () { + return au; + }), + n.d(t, "ParticleSystem", function () { + return Jl; + }), + n.d(t, "_IDoNeedToBeInTheBuild", function () { + return cu; + }), + n.d(t, "ParticleSystemSet", function () { + return ou; + }), + n.d(t, "SolidParticle", function () { + return lu; + }), + n.d(t, "ModelShape", function () { + return uu; + }), + n.d(t, "DepthSortedParticle", function () { + return hu; + }), + n.d(t, "SolidParticleSystem", function () { + return du; + }), + n.d(t, "CloudPoint", function () { + return pu; + }), + n.d(t, "PointsGroup", function () { + return fu; + }), + n.d(t, "PointColor", function () { + return su; + }), + n.d(t, "PointsCloudSystem", function () { + return mu; + }), + n.d(t, "SubEmitterType", function () { + return Dl; + }), + n.d(t, "SubEmitter", function () { + return Zl; + }), + n.d(t, "PhysicsEngine", function () { + return Aa; + }), + n.d(t, "PhysicsEngineSceneComponent", function () { + return _u; + }), + n.d(t, "PhysicsHelper", function () { + return vu; + }), + n.d(t, "PhysicsRadialExplosionEventOptions", function () { + return Tu; + }), + n.d(t, "PhysicsUpdraftEventOptions", function () { + return Su; + }), + n.d(t, "PhysicsVortexEventOptions", function () { + return Ou; + }), + n.d(t, "PhysicsRadialImpulseFalloff", function () { + return gu; + }), + n.d(t, "PhysicsUpdraftMode", function () { + return bu; + }), + n.d(t, "PhysicsImpostor", function () { + return Ci; + }), + n.d(t, "PhysicsJoint", function () { + return gi; + }), + n.d(t, "DistanceJoint", function () { + return bi; + }), + n.d(t, "MotorEnabledJoint", function () { + return _i; + }), + n.d(t, "HingeJoint", function () { + return vi; + }), + n.d(t, "Hinge2Joint", function () { + return yi; + }), + n.d(t, "CannonJSPlugin", function () { + return Da; + }), + n.d(t, "AmmoJSPlugin", function () { + return Fa; + }), + n.d(t, "OimoJSPlugin", function () { + return Ra; + }), + n.d(t, "AnaglyphPostProcess", function () { + return Kt; + }), + n.d(t, "BlackAndWhitePostProcess", function () { + return Mu; + }), + n.d(t, "BloomEffect", function () { + return Lu; + }), + n.d(t, "BloomMergePostProcess", function () { + return wu; + }), + n.d(t, "BlurPostProcess", function () { + return Er; + }), + n.d(t, "ChromaticAberrationPostProcess", function () { + return Nu; + }), + n.d(t, "CircleOfConfusionPostProcess", function () { + return zu; + }), + n.d(t, "ColorCorrectionPostProcess", function () { + return Bu; + }), + n.d(t, "ConvolutionPostProcess", function () { + return Gu; + }), + n.d(t, "DepthOfFieldBlurPostProcess", function () { + return Uu; + }), + n.d(t, "DepthOfFieldEffectBlurLevel", function () { + return Wu; + }), + n.d(t, "DepthOfFieldEffect", function () { + return Ku; + }), + n.d(t, "DepthOfFieldMergePostProcessOptions", function () { + return Xu; + }), + n.d(t, "DepthOfFieldMergePostProcess", function () { + return Yu; + }), + n.d(t, "DisplayPassPostProcess", function () { + return qu; + }), + n.d(t, "ExtractHighlightsPostProcess", function () { + return Du; + }), + n.d(t, "FilterPostProcess", function () { + return Ju; + }), + n.d(t, "FxaaPostProcess", function () { + return th; + }), + n.d(t, "GrainPostProcess", function () { + return ih; + }), + n.d(t, "HighlightsPostProcess", function () { + return oh; + }), + n.d(t, "ImageProcessingPostProcess", function () { + return Dn; + }), + n.d(t, "MotionBlurPostProcess", function () { + return hh; + }), + n.d(t, "PassPostProcess", function () { + return Ht.b; + }), + n.d(t, "PassCubePostProcess", function () { + return Ht.a; + }), + n.d(t, "PostProcess", function () { + return Wt.a; + }), + n.d(t, "PostProcessManager", function () { + return ua.a; + }), + n.d(t, "RefractionPostProcess", function () { + return ph; + }), + n.d(t, "DefaultRenderingPipeline", function () { + return vh; + }), + n.d(t, "LensRenderingPipeline", function () { + return Ph; + }), + n.d(t, "SSAO2RenderingPipeline", function () { + return Sh; + }), + n.d(t, "SSAORenderingPipeline", function () { + return Eh; + }), + n.d(t, "StandardRenderingPipeline", function () { + return Dh; + }), + n.d(t, "PostProcessRenderEffect", function () { + return Au; + }), + n.d(t, "PostProcessRenderPipeline", function () { + return gh; + }), + n.d(t, "PostProcessRenderPipelineManager", function () { + return bh; + }), + n.d(t, "PostProcessRenderPipelineManagerSceneComponent", function () { + return _h; + }), + n.d(t, "SharpenPostProcess", function () { + return mh; + }), + n.d(t, "StereoscopicInterlacePostProcessI", function () { + return en; + }), + n.d(t, "StereoscopicInterlacePostProcess", function () { + return tn; + }), + n.d(t, "TonemappingOperator", function () { + return wh; + }), + n.d(t, "TonemapPostProcess", function () { + return Lh; + }), + n.d(t, "VolumetricLightScatteringPostProcess", function () { + return zh; + }), + n.d(t, "VRDistortionCorrectionPostProcess", function () { + return hn; + }), + n.d(t, "VRMultiviewToSingleviewPostProcess", function () { + return _n; + }), + n.d(t, "ScreenSpaceReflectionPostProcess", function () { + return Ah; + }), + n.d(t, "ReflectionProbe", function () { + return Na; + }), + n.d(t, "BoundingBoxRenderer", function () { + return jh; + }), + n.d(t, "DepthRenderer", function () { + return la; + }), + n.d(t, "DepthRendererSceneComponent", function () { + return Bh; + }), + n.d(t, "EdgesRenderer", function () { + return Uh; + }), + n.d(t, "LineEdgesRenderer", function () { + return Hh; + }), + n.d(t, "GeometryBufferRenderer", function () { + return ch; + }), + n.d(t, "GeometryBufferRendererSceneComponent", function () { + return lh; + }), + n.d(t, "OutlineRenderer", function () { + return Yh; + }), + n.d(t, "RenderingGroup", function () { + return Kh.a; + }), + n.d(t, "RenderingGroupInfo", function () { + return oa.a; + }), + n.d(t, "RenderingManager", function () { + return oa.b; + }), + n.d(t, "UtilityLayerRenderer", function () { + return ci.a; + }), + n.d(t, "Scene", function () { + return ge.a; + }), + n.d(t, "SceneComponentConstants", function () { + return me.a; + }), + n.d(t, "Stage", function () { + return me.b; + }), + n.d(t, "Sprite", function () { + return Zh; + }), + n.d(t, "SpriteManager", function () { + return $h; + }), + n.d(t, "SpriteMap", function () { + return id; + }), + n.d(t, "SpritePackedManager", function () { + return rd; + }), + n.d(t, "SpriteSceneComponent", function () { + return qh; + }), + n.d(t, "AlphaState", function () { + return od.a; + }), + n.d(t, "DepthCullingState", function () { + return ad.a; + }), + n.d(t, "StencilState", function () { + return sd.a; + }), + n.d(t, "AndOrNotEvaluator", function () { + return cd.a; + }), + n.d(t, "AssetTaskState", function () { + return nd; + }), + n.d(t, "AbstractAssetTask", function () { + return ud; + }), + n.d(t, "AssetsProgressEvent", function () { + return hd; + }), + n.d(t, "MeshAssetTask", function () { + return dd; + }), + n.d(t, "TextFileAssetTask", function () { + return pd; + }), + n.d(t, "BinaryFileAssetTask", function () { + return fd; + }), + n.d(t, "ImageAssetTask", function () { + return md; + }), + n.d(t, "TextureAssetTask", function () { + return gd; + }), + n.d(t, "CubeTextureAssetTask", function () { + return bd; + }), + n.d(t, "HDRCubeTextureAssetTask", function () { + return _d; + }), + n.d(t, "EquiRectangularCubeTextureAssetTask", function () { + return vd; + }), + n.d(t, "AssetsManager", function () { + return yd; + }), + n.d(t, "BasisTranscodeConfiguration", function () { + return is; + }), + n.d(t, "BasisTools", function () { + return rs; + }), + n.d(t, "DDSTools", function () { + return Jr; + }), + n.d(t, "expandToProperty", function () { + return He.b; + }), + n.d(t, "serialize", function () { + return He.c; + }), + n.d(t, "serializeAsTexture", function () { + return He.m; + }), + n.d(t, "serializeAsColor3", function () { + return He.e; + }), + n.d(t, "serializeAsFresnelParameters", function () { + return He.h; + }), + n.d(t, "serializeAsVector2", function () { + return He.n; + }), + n.d(t, "serializeAsVector3", function () { + return He.o; + }), + n.d(t, "serializeAsMeshReference", function () { + return He.k; + }), + n.d(t, "serializeAsColorCurves", function () { + return He.g; + }), + n.d(t, "serializeAsColor4", function () { + return He.f; + }), + n.d(t, "serializeAsImageProcessingConfiguration", function () { + return He.i; + }), + n.d(t, "serializeAsQuaternion", function () { + return He.l; + }), + n.d(t, "serializeAsMatrix", function () { + return He.j; + }), + n.d(t, "serializeAsCameraReference", function () { + return He.d; + }), + n.d(t, "SerializationHelper", function () { + return He.a; + }), + n.d(t, "Deferred", function () { + return Cd.a; + }), + n.d(t, "EnvironmentTextureTools", function () { + return ji.a; + }), + n.d(t, "MeshExploder", function () { + return Pd; + }), + n.d(t, "FilesInput", function () { + return Td; + }), + n.d(t, "CubeMapToSphericalPolynomialTools", function () { + return Xr.a; + }), + n.d(t, "HDRTools", function () { + return Oa; + }), + n.d(t, "PanoramaToCubeMapTools", function () { + return Sa; + }), + n.d(t, "KhronosTextureContainer", function () { + return no; + }), + n.d(t, "EventState", function () { + return o.a; + }), + n.d(t, "Observer", function () { + return o.d; + }), + n.d(t, "MultiObserver", function () { + return o.b; + }), + n.d(t, "Observable", function () { + return o.c; + }), + n.d(t, "PerformanceMonitor", function () { + return Sd.a; + }), + n.d(t, "RollingAverage", function () { + return Sd.b; + }), + n.d(t, "PromisePolyfill", function () { + return Od.a; + }), + n.d(t, "SceneOptimization", function () { + return Ed; + }), + n.d(t, "TextureOptimization", function () { + return Md; + }), + n.d(t, "HardwareScalingOptimization", function () { + return Ad; + }), + n.d(t, "ShadowsOptimization", function () { + return Id; + }), + n.d(t, "PostProcessesOptimization", function () { + return Dd; + }), + n.d(t, "LensFlaresOptimization", function () { + return Rd; + }), + n.d(t, "CustomOptimization", function () { + return wd; + }), + n.d(t, "ParticlesOptimization", function () { + return Ld; + }), + n.d(t, "RenderTargetsOptimization", function () { + return Fd; + }), + n.d(t, "MergeMeshesOptimization", function () { + return Nd; + }), + n.d(t, "SceneOptimizerOptions", function () { + return kd; + }), + n.d(t, "SceneOptimizer", function () { + return zd; + }), + n.d(t, "SceneSerializer", function () { + return Gd; + }), + n.d(t, "SmartArray", function () { + return ii.a; + }), + n.d(t, "SmartArrayNoDuplicate", function () { + return ii.b; + }), + n.d(t, "StringDictionary", function () { + return gt.a; + }), + n.d(t, "Tags", function () { + return Ud.a; + }), + n.d(t, "TextureTools", function () { + return Hd.a; + }), + n.d(t, "TGATools", function () { + return es; + }), + n.d(t, "Tools", function () { + return $e.b; + }), + n.d(t, "className", function () { + return $e.c; + }), + n.d(t, "AsyncLoop", function () { + return $e.a; + }), + n.d(t, "VideoRecorder", function () { + return Wd; + }), + n.d(t, "JoystickAxis", function () { + return dt; + }), + n.d(t, "VirtualJoystick", function () { + return bt; + }), + n.d(t, "WorkerPool", function () { + return Xd.a; + }), + n.d(t, "Logger", function () { + return g.a; + }), + n.d(t, "_TypeStore", function () { + return c.a; + }), + n.d(t, "FilesInputStore", function () { + return xd.a; + }), + n.d(t, "DeepCopier", function () { + return M.a; + }), + n.d(t, "PivotTools", function () { + return we; + }), + n.d(t, "PrecisionDate", function () { + return be.a; + }), + n.d(t, "ScreenshotTools", function () { + return Yd; + }), + n.d(t, "WebRequest", function () { + return ls.a; + }), + n.d(t, "InspectableType", function () { + return ld; + }), + n.d(t, "BRDFTextureTools", function () { + return Kd.a; + }), + n.d(t, "RGBDTextureTools", function () { + return Zd.a; + }), + n.d(t, "ColorGradient", function () { + return Hl; + }), + n.d(t, "Color3Gradient", function () { + return Wl; + }), + n.d(t, "FactorGradient", function () { + return Xl; + }), + n.d(t, "GradientHelper", function () { + return Yl; + }), + n.d(t, "PerfCounter", function () { + return Ro.a; + }), + n.d(t, "RetryStrategy", function () { + return qd.a; + }), + n.d(t, "CanvasGenerator", function () { + return Fn.a; + }), + n.d(t, "LoadFileError", function () { + return Qd.b; + }), + n.d(t, "RequestFileError", function () { + return Qd.d; + }), + n.d(t, "ReadFileError", function () { + return Qd.c; + }), + n.d(t, "FileTools", function () { + return Qd.a; + }), + n.d(t, "StringTools", function () { + return $r.a; + }), + n.d(t, "DataReader", function () { + return Jd.a; + }), + n.d(t, "MinMaxReducer", function () { + return da; + }), + n.d(t, "DepthReducer", function () { + return pa; + }), + n.d(t, "WebXRCamera", function () { + return oo; + }), + n.d(t, "WebXREnterExitUIButton", function () { + return Co; + }), + n.d(t, "WebXREnterExitUIOptions", function () { + return Po; + }), + n.d(t, "WebXREnterExitUI", function () { + return xo; + }), + n.d(t, "WebXRExperienceHelper", function () { + return co; + }), + n.d(t, "WebXRInput", function () { + return _o; + }), + n.d(t, "WebXRInputSource", function () { + return bo; + }), + n.d(t, "WebXRManagedOutputCanvasOptions", function () { + return Bn; + }), + n.d(t, "WebXRManagedOutputCanvas", function () { + return Vn; + }), + n.d(t, "WebXRState", function () { + return zn; + }), + n.d(t, "WebXRSessionManager", function () { + return Gn; + }), + n.d(t, "WebXRDefaultExperienceOptions", function () { + return So; + }), + n.d(t, "WebXRDefaultExperience", function () { + return Oo; + }), + n.d(t, "WebXRFeatureName", function () { + return ao; + }), + n.d(t, "WebXRFeaturesManager", function () { + return so; + }), + n.d(t, "WebXRHitTestLegacy", function () { + return $d; + }), + n.d(t, "WebXRAnchorSystem", function () { + return tp; + }), + n.d(t, "WebXRPlaneDetector", function () { + return ip; + }), + n.d(t, "WebXRBackgroundRemover", function () { + return rp; + }), + n.d(t, "WebXRMotionControllerTeleportation", function () { + return To; + }), + n.d(t, "WebXRControllerPointerSelection", function () { + return yo; + }), + n.d(t, "IWebXRControllerPhysicsOptions", function () { + return op; + }), + n.d(t, "WebXRControllerPhysics", function () { + return ap; + }), + n.d(t, "WebXRAbstractMotionController", function () { + return uo; + }), + n.d(t, "WebXRControllerComponent", function () { + return lo; + }), + n.d(t, "WebXRGenericTriggerMotionController", function () { + return ho; + }), + n.d(t, "WebXRMicrosoftMixedRealityController", function () { + return sp; + }), + n.d(t, "WebXRMotionControllerManager", function () { + return mo; + }), + n.d(t, "WebXROculusTouchMotionController", function () { + return lp; + }), + n.d(t, "WebXRHTCViveMotionController", function () { + return hp; + }), + n.d(t, "WebXRProfiledMotionController", function () { + return fo; + }); + var i = n(54), + r = n(130), + o = n(6), + a = n(1), + s = n(5), + c = n(13), + l = (function () { + function e(e, t) { + (this.triggerOptions = e), + (this.onBeforeExecuteObservable = new o.c()), + e.parameter ? ((this.trigger = e.trigger), (this._triggerParameter = e.parameter)) : e.trigger ? (this.trigger = e.trigger) : (this.trigger = e), + (this._nextActiveAction = this), + (this._condition = t); + } + return ( + (e.prototype._prepare = function () {}), + (e.prototype.getTriggerParameter = function () { + return this._triggerParameter; + }), + (e.prototype._executeCurrent = function (e) { + if (this._nextActiveAction._condition) { + var t = this._nextActiveAction._condition, + n = this._actionManager.getScene().getRenderId(); + if (t._evaluationId === n) { + if (!t._currentResult) return; + } else { + if (((t._evaluationId = n), !t.isValid())) return void (t._currentResult = !1); + t._currentResult = !0; + } + } + this.onBeforeExecuteObservable.notifyObservers(this), this._nextActiveAction.execute(e), this.skipToNextActiveAction(); + }), + (e.prototype.execute = function (e) {}), + (e.prototype.skipToNextActiveAction = function () { + this._nextActiveAction._child + ? (this._nextActiveAction._child._actionManager || (this._nextActiveAction._child._actionManager = this._actionManager), (this._nextActiveAction = this._nextActiveAction._child)) + : (this._nextActiveAction = this); + }), + (e.prototype.then = function (e) { + return (this._child = e), (e._actionManager = this._actionManager), e._prepare(), e; + }), + (e.prototype._getProperty = function (e) { + return this._actionManager._getProperty(e); + }), + (e.prototype._getEffectiveTarget = function (e, t) { + return this._actionManager._getEffectiveTarget(e, t); + }), + (e.prototype.serialize = function (e) {}), + (e.prototype._serialize = function (e, t) { + var n = { type: 1, children: [], name: e.name, properties: e.properties || [] }; + if ((this._child && this._child.serialize(n), this._condition)) { + var i = this._condition.serialize(); + return i.children.push(n), t && t.children.push(i), i; + } + return t && t.children.push(n), n; + }), + (e._SerializeValueAsString = function (e) { + return "number" == typeof e + ? e.toString() + : "boolean" == typeof e + ? e + ? "true" + : "false" + : e instanceof a.d + ? e.x + ", " + e.y + : e instanceof a.e + ? e.x + ", " + e.y + ", " + e.z + : e instanceof s.a + ? e.r + ", " + e.g + ", " + e.b + : e instanceof s.b + ? e.r + ", " + e.g + ", " + e.b + ", " + e.a + : e; + }), + (e._GetTargetProperty = function (e) { + return { name: "target", targetType: e._isMesh ? "MeshProperties" : e._isLight ? "LightProperties" : e._isCamera ? "CameraProperties" : "SceneProperties", value: e._isScene ? "Scene" : e.name }; + }), + e + ); + })(); + c.a.RegisteredTypes["BABYLON.Action"] = l; + var u = n(64), + h = n(2), + d = (function () { + function e(e) { + this._actionManager = e; + } + return ( + (e.prototype.isValid = function () { + return !0; + }), + (e.prototype._getProperty = function (e) { + return this._actionManager._getProperty(e); + }), + (e.prototype._getEffectiveTarget = function (e, t) { + return this._actionManager._getEffectiveTarget(e, t); + }), + (e.prototype.serialize = function () {}), + (e.prototype._serialize = function (e) { + return { type: 2, children: [], name: e.name, properties: e.properties }; + }), + e + ); + })(), + p = (function (e) { + function t(n, i, r, o, a) { + void 0 === a && (a = t.IsEqual); + var s = e.call(this, n) || this; + return (s.propertyPath = r), (s.value = o), (s.operator = a), (s._target = i), (s._effectiveTarget = s._getEffectiveTarget(i, s.propertyPath)), (s._property = s._getProperty(s.propertyPath)), s; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t, "IsEqual", { + get: function () { + return t._IsEqual; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "IsDifferent", { + get: function () { + return t._IsDifferent; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "IsGreater", { + get: function () { + return t._IsGreater; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t, "IsLesser", { + get: function () { + return t._IsLesser; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.isValid = function () { + switch (this.operator) { + case t.IsGreater: + return this._effectiveTarget[this._property] > this.value; + case t.IsLesser: + return this._effectiveTarget[this._property] < this.value; + case t.IsEqual: + case t.IsDifferent: + var e; + return (e = this.value.equals ? this.value.equals(this._effectiveTarget[this._property]) : this.value === this._effectiveTarget[this._property]), this.operator === t.IsEqual ? e : !e; + } + return !1; + }), + (t.prototype.serialize = function () { + return this._serialize({ + name: "ValueCondition", + properties: [ + l._GetTargetProperty(this._target), + { name: "propertyPath", value: this.propertyPath }, + { name: "value", value: l._SerializeValueAsString(this.value) }, + { name: "operator", value: t.GetOperatorName(this.operator) }, + ], + }); + }), + (t.GetOperatorName = function (e) { + switch (e) { + case t._IsEqual: + return "IsEqual"; + case t._IsDifferent: + return "IsDifferent"; + case t._IsGreater: + return "IsGreater"; + case t._IsLesser: + return "IsLesser"; + default: + return ""; + } + }), + (t._IsEqual = 0), + (t._IsDifferent = 1), + (t._IsGreater = 2), + (t._IsLesser = 3), + t + ); + })(d), + f = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return (i.predicate = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.isValid = function () { + return this.predicate(); + }), + t + ); + })(d), + m = (function (e) { + function t(t, n, i) { + var r = e.call(this, t) || this; + return (r.value = i), (r._target = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.isValid = function () { + return this._target.state === this.value; + }), + (t.prototype.serialize = function () { + return this._serialize({ name: "StateCondition", properties: [l._GetTargetProperty(this._target), { name: "value", value: this.value }] }); + }), + t + ); + })(d); + (c.a.RegisteredTypes["BABYLON.ValueCondition"] = p), (c.a.RegisteredTypes["BABYLON.PredicateCondition"] = f), (c.a.RegisteredTypes["BABYLON.StateCondition"] = m); + var g = n(10), + b = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, r) || this; + return (o.propertyPath = i), (o._target = o._effectiveTarget = n), o; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () { + (this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath)), (this._property = this._getProperty(this.propertyPath)); + }), + (t.prototype.execute = function () { + this._effectiveTarget[this._property] = !this._effectiveTarget[this._property]; + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "SwitchBooleanAction", properties: [l._GetTargetProperty(this._target), { name: "propertyPath", value: this.propertyPath }] }, t); + }), + t + ); + })(l), + _ = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, r) || this; + return (o.value = i), (o._target = n), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.execute = function () { + this._target.state = this.value; + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "SetStateAction", properties: [l._GetTargetProperty(this._target), { name: "value", value: this.value }] }, t); + }), + t + ); + })(l), + v = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t, o) || this; + return (a.propertyPath = i), (a.value = r), (a._target = a._effectiveTarget = n), a; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () { + (this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath)), (this._property = this._getProperty(this.propertyPath)); + }), + (t.prototype.execute = function () { + (this._effectiveTarget[this._property] = this.value), this._target.markAsDirty && this._target.markAsDirty(this._property); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call( + this, + { name: "SetValueAction", properties: [l._GetTargetProperty(this._target), { name: "propertyPath", value: this.propertyPath }, { name: "value", value: l._SerializeValueAsString(this.value) }] }, + t + ); + }), + t + ); + })(l), + y = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t, o) || this; + return (a.propertyPath = i), (a.value = r), (a._target = a._effectiveTarget = n), a; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () { + (this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath)), + (this._property = this._getProperty(this.propertyPath)), + "number" != typeof this._effectiveTarget[this._property] && g.a.Warn("Warning: IncrementValueAction can only be used with number values"); + }), + (t.prototype.execute = function () { + (this._effectiveTarget[this._property] += this.value), this._target.markAsDirty && this._target.markAsDirty(this._property); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call( + this, + { name: "IncrementValueAction", properties: [l._GetTargetProperty(this._target), { name: "propertyPath", value: this.propertyPath }, { name: "value", value: l._SerializeValueAsString(this.value) }] }, + t + ); + }), + t + ); + })(l), + C = (function (e) { + function t(t, n, i, r, o, a) { + var s = e.call(this, t, a) || this; + return (s.from = i), (s.to = r), (s.loop = o), (s._target = n), s; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () {}), + (t.prototype.execute = function () { + this._actionManager.getScene().beginAnimation(this._target, this.from, this.to, this.loop); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call( + this, + { + name: "PlayAnimationAction", + properties: [l._GetTargetProperty(this._target), { name: "from", value: String(this.from) }, { name: "to", value: String(this.to) }, { name: "loop", value: l._SerializeValueAsString(this.loop) || !1 }], + }, + t + ); + }), + t + ); + })(l), + P = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r._target = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () {}), + (t.prototype.execute = function () { + this._actionManager.getScene().stopAnimation(this._target); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "StopAnimationAction", properties: [l._GetTargetProperty(this._target)] }, t); + }), + t + ); + })(l), + x = (function (e) { + function t(t, n) { + return void 0 === t && (t = 0), e.call(this, t, n) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.execute = function () {}), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "DoNothingAction", properties: [] }, t); + }), + t + ); + })(l), + T = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r.children = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () { + for (var e = 0; e < this.children.length; e++) (this.children[e]._actionManager = this._actionManager), this.children[e]._prepare(); + }), + (t.prototype.execute = function (e) { + for (var t = 0; t < this.children.length; t++) this.children[t].execute(e); + }), + (t.prototype.serialize = function (t) { + for (var n = e.prototype._serialize.call(this, { name: "CombineAction", properties: [], combine: [] }, t), i = 0; i < this.children.length; i++) n.combine.push(this.children[i].serialize(null)); + return n; + }), + t + ); + })(l), + S = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r.func = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.execute = function (e) { + this.func(e); + }), + t + ); + })(l), + O = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, r) || this; + return (o._target = n), (o._parent = i), o; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () {}), + (t.prototype.execute = function () { + if (this._target.parent !== this._parent) { + var e = this._parent.getWorldMatrix().clone(); + e.invert(), (this._target.position = a.e.TransformCoordinates(this._target.position, e)), (this._target.parent = this._parent); + } + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "SetParentAction", properties: [l._GetTargetProperty(this._target), l._GetTargetProperty(this._parent)] }, t); + }), + t + ); + })(l); + (c.a.RegisteredTypes["BABYLON.SetParentAction"] = O), + (c.a.RegisteredTypes["BABYLON.ExecuteCodeAction"] = S), + (c.a.RegisteredTypes["BABYLON.DoNothingAction"] = x), + (c.a.RegisteredTypes["BABYLON.StopAnimationAction"] = P), + (c.a.RegisteredTypes["BABYLON.PlayAnimationAction"] = C), + (c.a.RegisteredTypes["BABYLON.IncrementValueAction"] = y), + (c.a.RegisteredTypes["BABYLON.SetValueAction"] = v), + (c.a.RegisteredTypes["BABYLON.SetStateAction"] = _), + (c.a.RegisteredTypes["BABYLON.SetParentAction"] = O); + var E = n(25), + M = n(51), + A = (function (e) { + function t(t) { + var n = e.call(this) || this; + return (n._scene = t || E.a.LastCreatedScene), t.actionManagers.push(n), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.dispose = function () { + for (var e = this._scene.actionManagers.indexOf(this), n = 0; n < this.actions.length; n++) { + var i = this.actions[n]; + t.Triggers[i.trigger]--, 0 === t.Triggers[i.trigger] && delete t.Triggers[i.trigger]; + } + e > -1 && this._scene.actionManagers.splice(e, 1); + }), + (t.prototype.getScene = function () { + return this._scene; + }), + (t.prototype.hasSpecificTriggers = function (e) { + for (var t = 0; t < this.actions.length; t++) { + var n = this.actions[t]; + if (e.indexOf(n.trigger) > -1) return !0; + } + return !1; + }), + (t.prototype.hasSpecificTriggers2 = function (e, t) { + for (var n = 0; n < this.actions.length; n++) { + var i = this.actions[n]; + if (e == i.trigger || t == i.trigger) return !0; + } + return !1; + }), + (t.prototype.hasSpecificTrigger = function (e, t) { + for (var n = 0; n < this.actions.length; n++) { + var i = this.actions[n]; + if (i.trigger === e) { + if (!t) return !0; + if (t(i.getTriggerParameter())) return !0; + } + } + return !1; + }), + Object.defineProperty(t.prototype, "hasPointerTriggers", { + get: function () { + for (var e = 0; e < this.actions.length; e++) { + var n = this.actions[e]; + if (n.trigger >= t.OnPickTrigger && n.trigger <= t.OnPointerOutTrigger) return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasPickTriggers", { + get: function () { + for (var e = 0; e < this.actions.length; e++) { + var n = this.actions[e]; + if (n.trigger >= t.OnPickTrigger && n.trigger <= t.OnPickUpTrigger) return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.registerAction = function (e) { + return e.trigger === t.OnEveryFrameTrigger && this.getScene().actionManager !== this + ? (g.a.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"), null) + : (this.actions.push(e), t.Triggers[e.trigger] ? t.Triggers[e.trigger]++ : (t.Triggers[e.trigger] = 1), (e._actionManager = this), e._prepare(), e); + }), + (t.prototype.unregisterAction = function (e) { + var n = this.actions.indexOf(e); + return -1 !== n && (this.actions.splice(n, 1), (t.Triggers[e.trigger] -= 1), 0 === t.Triggers[e.trigger] && delete t.Triggers[e.trigger], delete e._actionManager, !0); + }), + (t.prototype.processTrigger = function (e, n) { + for (var i = 0; i < this.actions.length; i++) { + var r = this.actions[i]; + if (r.trigger === e) { + if (n && (e === t.OnKeyUpTrigger || e === t.OnKeyDownTrigger)) { + var o = r.getTriggerParameter(); + if (o && o !== n.sourceEvent.keyCode) { + if (!o.toLowerCase) continue; + var a = o.toLowerCase(); + if (a !== n.sourceEvent.key) { + var s = n.sourceEvent.charCode ? n.sourceEvent.charCode : n.sourceEvent.keyCode; + if (String.fromCharCode(s).toLowerCase() !== a) continue; + } + } + } + r._executeCurrent(n); + } + } + }), + (t.prototype._getEffectiveTarget = function (e, t) { + for (var n = t.split("."), i = 0; i < n.length - 1; i++) e = e[n[i]]; + return e; + }), + (t.prototype._getProperty = function (e) { + var t = e.split("."); + return t[t.length - 1]; + }), + (t.prototype.serialize = function (e) { + for (var n = { children: new Array(), name: e, type: 3, properties: new Array() }, i = 0; i < this.actions.length; i++) { + var r = { type: 0, children: new Array(), name: t.GetTriggerName(this.actions[i].trigger), properties: new Array() }, + o = this.actions[i].triggerOptions; + if (o && "number" != typeof o) + if (o.parameter instanceof Node) r.properties.push(l._GetTargetProperty(o.parameter)); + else { + var a = {}; + M.a.DeepCopy(o.parameter, a, ["mesh"]), o.parameter && o.parameter.mesh && (a._meshId = o.parameter.mesh.id), r.properties.push({ name: "parameter", targetType: null, value: a }); + } + this.actions[i].serialize(r), n.children.push(r); + } + return n; + }), + (t.Parse = function (e, n, i) { + var r = new t(i); + null === n ? (i.actionManager = r) : (n.actionManager = r); + for ( + var o = function (e, t, n, i) { + if (null === i) { + var r = parseFloat(t); + return "true" === t || "false" === t ? "true" === t : isNaN(r) ? t : r; + } + for (var o = i.split("."), c = t.split(","), l = 0; l < o.length; l++) n = n[o[l]]; + if ("boolean" == typeof n) return "true" === c[0]; + if ("string" == typeof n) return c[0]; + var u = new Array(); + for (l = 0; l < c.length; l++) u.push(parseFloat(c[l])); + return n instanceof a.e ? a.e.FromArray(u) : n instanceof a.f ? a.f.FromArray(u) : n instanceof s.a ? s.a.FromArray(u) : n instanceof s.b ? s.b.FromArray(u) : parseFloat(c[0]); + }, + l = function (e, n, a, s, u) { + if ((void 0 === u && (u = null), !e.detached)) { + var h = new Array(), + f = null, + m = null, + g = e.combine && e.combine.length > 0; + if ((2 === e.type ? h.push(r) : h.push(n), g)) { + for (var b = new Array(), _ = 0; _ < e.combine.length; _++) l(e.combine[_], t.NothingTrigger, a, s, b); + h.push(b); + } else + for (var v = 0; v < e.properties.length; v++) { + var y = e.properties[v].value, + C = e.properties[v].name, + P = e.properties[v].targetType; + "target" === C + ? (y = f = null !== P && "SceneProperties" === P ? i : i.getNodeByName(y)) + : "parent" === C + ? (y = i.getNodeByName(y)) + : "sound" === C + ? i.getSoundByName && (y = i.getSoundByName(y)) + : "propertyPath" !== C + ? (y = 2 === e.type && "operator" === C ? p[y] : o(0, y, f, "value" === C ? m : null)) + : (m = y), + h.push(y); + } + if ((null === u ? h.push(a) : h.push(null), "InterpolateValueAction" === e.name)) { + var T = h[h.length - 2]; + (h[h.length - 1] = T), (h[h.length - 2] = a); + } + var S = (function (e, t) { + var n = c.a.GetClass("BABYLON." + e); + if (n) { + var i = Object.create(n.prototype); + return i.constructor.apply(i, t), i; + } + })(e.name, h); + if (S instanceof d && null !== a) { + var O = new x(n, a); + s ? s.then(O) : r.registerAction(O), (s = O); + } + null === u ? (S instanceof d ? ((a = S), (S = s)) : ((a = null), s ? s.then(S) : r.registerAction(S))) : u.push(S); + for (v = 0; v < e.children.length; v++) l(e.children[v], n, a, S, null); + } + }, + u = 0; + u < e.children.length; + u++ + ) { + var h, + f = e.children[u]; + if (f.properties.length > 0) { + var m = f.properties[0].value, + g = null === f.properties[0].targetType ? m : i.getMeshByName(m); + g._meshId && (g.mesh = i.getMeshByID(g._meshId)), (h = { trigger: t[f.name], parameter: g }); + } else h = t[f.name]; + for (var b = 0; b < f.children.length; b++) f.detached || l(f.children[b], h, null, null); + } + }), + (t.GetTriggerName = function (e) { + switch (e) { + case 0: + return "NothingTrigger"; + case 1: + return "OnPickTrigger"; + case 2: + return "OnLeftPickTrigger"; + case 3: + return "OnRightPickTrigger"; + case 4: + return "OnCenterPickTrigger"; + case 5: + return "OnPickDownTrigger"; + case 6: + return "OnPickUpTrigger"; + case 7: + return "OnLongPressTrigger"; + case 8: + return "OnPointerOverTrigger"; + case 9: + return "OnPointerOutTrigger"; + case 10: + return "OnEveryFrameTrigger"; + case 11: + return "OnIntersectionEnterTrigger"; + case 12: + return "OnIntersectionExitTrigger"; + case 13: + return "OnKeyDownTrigger"; + case 14: + return "OnKeyUpTrigger"; + case 15: + return "OnPickOutTrigger"; + default: + return ""; + } + }), + (t.NothingTrigger = 0), + (t.OnPickTrigger = 1), + (t.OnLeftPickTrigger = 2), + (t.OnRightPickTrigger = 3), + (t.OnCenterPickTrigger = 4), + (t.OnPickDownTrigger = 5), + (t.OnDoublePickTrigger = 6), + (t.OnPickUpTrigger = 7), + (t.OnPickOutTrigger = 16), + (t.OnLongPressTrigger = 8), + (t.OnPointerOverTrigger = 9), + (t.OnPointerOutTrigger = 10), + (t.OnEveryFrameTrigger = 11), + (t.OnIntersectionEnterTrigger = 12), + (t.OnIntersectionExitTrigger = 13), + (t.OnKeyDownTrigger = 14), + (t.OnKeyUpTrigger = 15), + t + ); + })(r.a), + I = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r._sound = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () {}), + (t.prototype.execute = function () { + void 0 !== this._sound && this._sound.play(); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "PlaySoundAction", properties: [{ name: "sound", value: this._sound.name }] }, t); + }), + t + ); + })(l), + D = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r._sound = n), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () {}), + (t.prototype.execute = function () { + void 0 !== this._sound && this._sound.stop(); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call(this, { name: "StopSoundAction", properties: [{ name: "sound", value: this._sound.name }] }, t); + }), + t + ); + })(l); + (c.a.RegisteredTypes["BABYLON.PlaySoundAction"] = D), (c.a.RegisteredTypes["BABYLON.StopSoundAction"] = D); + var R = n(27), + w = (function (e) { + function t(t, n, i, r, a, s, c, l) { + void 0 === a && (a = 1e3); + var u = e.call(this, t, s) || this; + return ( + (u.duration = 1e3), + (u.onInterpolationDoneObservable = new o.c()), + (u.propertyPath = i), + (u.value = r), + (u.duration = a), + (u.stopOtherAnimations = c), + (u.onInterpolationDone = l), + (u._target = u._effectiveTarget = n), + u + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._prepare = function () { + (this._effectiveTarget = this._getEffectiveTarget(this._effectiveTarget, this.propertyPath)), (this._property = this._getProperty(this.propertyPath)); + }), + (t.prototype.execute = function () { + var e, + t = this, + n = this._actionManager.getScene(), + i = [ + { frame: 0, value: this._effectiveTarget[this._property] }, + { frame: 100, value: this.value }, + ]; + if ("number" == typeof this.value) e = R.a.ANIMATIONTYPE_FLOAT; + else if (this.value instanceof s.a) e = R.a.ANIMATIONTYPE_COLOR3; + else if (this.value instanceof a.e) e = R.a.ANIMATIONTYPE_VECTOR3; + else if (this.value instanceof a.a) e = R.a.ANIMATIONTYPE_MATRIX; + else { + if (!(this.value instanceof a.b)) return void g.a.Warn("InterpolateValueAction: Unsupported type (" + typeof this.value + ")"); + e = R.a.ANIMATIONTYPE_QUATERNION; + } + var r = new R.a("InterpolateValueAction", this._property, (1e3 / this.duration) * 100, e, R.a.ANIMATIONLOOPMODE_CONSTANT); + r.setKeys(i), this.stopOtherAnimations && n.stopAnimation(this._effectiveTarget); + n.beginDirectAnimation(this._effectiveTarget, [r], 0, 100, !1, 1, function () { + t.onInterpolationDoneObservable.notifyObservers(t), t.onInterpolationDone && t.onInterpolationDone(); + }); + }), + (t.prototype.serialize = function (t) { + return e.prototype._serialize.call( + this, + { + name: "InterpolateValueAction", + properties: [ + l._GetTargetProperty(this._target), + { name: "propertyPath", value: this.propertyPath }, + { name: "value", value: l._SerializeValueAsString(this.value) }, + { name: "duration", value: l._SerializeValueAsString(this.duration) }, + { name: "stopOtherAnimations", value: l._SerializeValueAsString(this.stopOtherAnimations) || !1 }, + ], + }, + t + ); + }), + t + ); + })(l); + c.a.RegisteredTypes["BABYLON.InterpolateValueAction"] = w; + var L, + F = n(165), + N = n(144), + k = function () { + (this.enableBlending = !1), (this.blendingSpeed = 0.01), (this.loopMode = R.a.ANIMATIONLOOPMODE_CYCLE); + }, + z = n(15), + j = n(34); + !(function (e) { + (e[(e.CW = 0)] = "CW"), (e[(e.CCW = 1)] = "CCW"); + })(L || (L = {})); + var B = (function () { + function e() {} + return ( + (e.Interpolate = function (e, t, n, i, r) { + for (var o = 1 - 3 * i + 3 * t, a = 3 * i - 6 * t, s = 3 * t, c = e, l = 0; l < 5; l++) { + var u = c * c; + (c -= (o * (u * c) + a * u + s * c - e) * (1 / (3 * o * u + 2 * a * c + s))), (c = Math.min(1, Math.max(0, c))); + } + return 3 * Math.pow(1 - c, 2) * c * n + 3 * (1 - c) * Math.pow(c, 2) * r + Math.pow(c, 3); + }), + e + ); + })(), + V = (function () { + function e(e) { + (this._radians = e), this._radians < 0 && (this._radians += 2 * Math.PI); + } + return ( + (e.prototype.degrees = function () { + return (180 * this._radians) / Math.PI; + }), + (e.prototype.radians = function () { + return this._radians; + }), + (e.BetweenTwoPoints = function (t, n) { + var i = n.subtract(t); + return new e(Math.atan2(i.y, i.x)); + }), + (e.FromRadians = function (t) { + return new e(t); + }), + (e.FromDegrees = function (t) { + return new e((t * Math.PI) / 180); + }), + e + ); + })(), + G = function (e, t, n) { + (this.startPoint = e), (this.midPoint = t), (this.endPoint = n); + var i = Math.pow(t.x, 2) + Math.pow(t.y, 2), + r = (Math.pow(e.x, 2) + Math.pow(e.y, 2) - i) / 2, + o = (i - Math.pow(n.x, 2) - Math.pow(n.y, 2)) / 2, + s = (e.x - t.x) * (t.y - n.y) - (t.x - n.x) * (e.y - t.y); + (this.centerPoint = new a.d((r * (t.y - n.y) - o * (e.y - t.y)) / s, ((e.x - t.x) * o - (t.x - n.x) * r) / s)), + (this.radius = this.centerPoint.subtract(this.startPoint).length()), + (this.startAngle = V.BetweenTwoPoints(this.centerPoint, this.startPoint)); + var c = this.startAngle.degrees(), + l = V.BetweenTwoPoints(this.centerPoint, this.midPoint).degrees(), + u = V.BetweenTwoPoints(this.centerPoint, this.endPoint).degrees(); + l - c > 180 && (l -= 360), + l - c < -180 && (l += 360), + u - l > 180 && (u -= 360), + u - l < -180 && (u += 360), + (this.orientation = l - c < 0 ? L.CW : L.CCW), + (this.angle = V.FromDegrees(this.orientation === L.CW ? c - u : u - c)); + }, + U = (function () { + function e(e, t) { + (this._points = new Array()), (this._length = 0), (this.closed = !1), this._points.push(new a.d(e, t)); + } + return ( + (e.prototype.addLineTo = function (e, t) { + if (this.closed) return this; + var n = new a.d(e, t), + i = this._points[this._points.length - 1]; + return this._points.push(n), (this._length += n.subtract(i).length()), this; + }), + (e.prototype.addArcTo = function (e, t, n, i, r) { + if ((void 0 === r && (r = 36), this.closed)) return this; + var o = this._points[this._points.length - 1], + s = new a.d(e, t), + c = new a.d(n, i), + l = new G(o, s, c), + u = l.angle.radians() / r; + l.orientation === L.CW && (u *= -1); + for (var h = l.startAngle.radians() + u, d = 0; d < r; d++) { + var p = Math.cos(h) * l.radius + l.centerPoint.x, + f = Math.sin(h) * l.radius + l.centerPoint.y; + this.addLineTo(p, f), (h += u); + } + return this; + }), + (e.prototype.close = function () { + return (this.closed = !0), this; + }), + (e.prototype.length = function () { + var e = this._length; + if (this.closed) { + var t = this._points[this._points.length - 1]; + e += this._points[0].subtract(t).length(); + } + return e; + }), + (e.prototype.getPoints = function () { + return this._points; + }), + (e.prototype.getPointAtLengthPosition = function (e) { + if (e < 0 || e > 1) return a.d.Zero(); + for (var t = e * this.length(), n = 0, i = 0; i < this._points.length; i++) { + var r = (i + 1) % this._points.length, + o = this._points[i], + s = this._points[r].subtract(o), + c = s.length() + n; + if (t >= n && t <= c) { + var l = s.normalize(), + u = t - n; + return new a.d(o.x + l.x * u, o.y + l.y * u); + } + n = c; + } + return a.d.Zero(); + }), + (e.StartingAt = function (t, n) { + return new e(t, n); + }), + e + ); + })(), + H = (function () { + function e(e, t, n, i) { + void 0 === t && (t = null), + void 0 === i && (i = !1), + (this.path = e), + (this._curve = new Array()), + (this._distances = new Array()), + (this._tangents = new Array()), + (this._normals = new Array()), + (this._binormals = new Array()), + (this._pointAtData = { id: 0, point: a.e.Zero(), previousPointArrayIndex: 0, position: 0, subPosition: 0, interpolateReady: !1, interpolationMatrix: a.a.Identity() }); + for (var r = 0; r < e.length; r++) this._curve[r] = e[r].clone(); + (this._raw = n || !1), (this._alignTangentsWithPath = i), this._compute(t, i); + } + return ( + (e.prototype.getCurve = function () { + return this._curve; + }), + (e.prototype.getPoints = function () { + return this._curve; + }), + (e.prototype.length = function () { + return this._distances[this._distances.length - 1]; + }), + (e.prototype.getTangents = function () { + return this._tangents; + }), + (e.prototype.getNormals = function () { + return this._normals; + }), + (e.prototype.getBinormals = function () { + return this._binormals; + }), + (e.prototype.getDistances = function () { + return this._distances; + }), + (e.prototype.getPointAt = function (e) { + return this._updatePointAtData(e).point; + }), + (e.prototype.getTangentAt = function (e, t) { + return void 0 === t && (t = !1), this._updatePointAtData(e, t), t ? a.e.TransformCoordinates(a.e.Forward(), this._pointAtData.interpolationMatrix) : this._tangents[this._pointAtData.previousPointArrayIndex]; + }), + (e.prototype.getNormalAt = function (e, t) { + return void 0 === t && (t = !1), this._updatePointAtData(e, t), t ? a.e.TransformCoordinates(a.e.Right(), this._pointAtData.interpolationMatrix) : this._normals[this._pointAtData.previousPointArrayIndex]; + }), + (e.prototype.getBinormalAt = function (e, t) { + return void 0 === t && (t = !1), this._updatePointAtData(e, t), t ? a.e.TransformCoordinates(a.e.UpReadOnly, this._pointAtData.interpolationMatrix) : this._binormals[this._pointAtData.previousPointArrayIndex]; + }), + (e.prototype.getDistanceAt = function (e) { + return this.length() * e; + }), + (e.prototype.getPreviousPointIndexAt = function (e) { + return this._updatePointAtData(e), this._pointAtData.previousPointArrayIndex; + }), + (e.prototype.getSubPositionAt = function (e) { + return this._updatePointAtData(e), this._pointAtData.subPosition; + }), + (e.prototype.getClosestPositionTo = function (e) { + for (var t = Number.MAX_VALUE, n = 0, i = 0; i < this._curve.length - 1; i++) { + var r = this._curve[i + 0], + o = this._curve[i + 1].subtract(r).normalize(), + s = this._distances[i + 1] - this._distances[i + 0], + c = Math.min((Math.max(a.e.Dot(o, e.subtract(r).normalize()), 0) * a.e.Distance(r, e)) / s, 1), + l = a.e.Distance(r.add(o.scale(c * s)), e); + l < t && ((t = l), (n = (this._distances[i + 0] + s * c) / this.length())); + } + return n; + }), + (e.prototype.slice = function (t, n) { + if ((void 0 === t && (t = 0), void 0 === n && (n = 1), t < 0 && (t = 1 - ((-1 * t) % 1)), n < 0 && (n = 1 - ((-1 * n) % 1)), t > n)) { + var i = t; + (t = n), (n = i); + } + var r = this.getCurve(), + o = this.getPointAt(t), + a = this.getPreviousPointIndexAt(t), + s = this.getPointAt(n), + c = this.getPreviousPointIndexAt(n) + 1, + l = []; + return 0 !== t && (a++, l.push(o)), l.push.apply(l, r.slice(a, c)), (1 === n && 1 !== t) || l.push(s), new e(l, this.getNormalAt(t), this._raw, this._alignTangentsWithPath); + }), + (e.prototype.update = function (e, t, n) { + void 0 === t && (t = null), void 0 === n && (n = !1); + for (var i = 0; i < e.length; i++) (this._curve[i].x = e[i].x), (this._curve[i].y = e[i].y), (this._curve[i].z = e[i].z); + return this._compute(t, n), this; + }), + (e.prototype._compute = function (e, t) { + void 0 === t && (t = !1); + var n = this._curve.length; + (this._tangents[0] = this._getFirstNonNullVector(0)), + this._raw || this._tangents[0].normalize(), + (this._tangents[n - 1] = this._curve[n - 1].subtract(this._curve[n - 2])), + this._raw || this._tangents[n - 1].normalize(); + var i, + r, + o, + s, + c, + l = this._tangents[0], + u = this._normalVector(l, e); + (this._normals[0] = u), this._raw || this._normals[0].normalize(), (this._binormals[0] = a.e.Cross(l, this._normals[0])), this._raw || this._binormals[0].normalize(), (this._distances[0] = 0); + for (var h = 1; h < n; h++) + (i = this._getLastNonNullVector(h)), + h < n - 1 && ((r = this._getFirstNonNullVector(h)), (this._tangents[h] = t ? r : i.add(r)), this._tangents[h].normalize()), + (this._distances[h] = this._distances[h - 1] + i.length()), + (o = this._tangents[h]), + (c = this._binormals[h - 1]), + (this._normals[h] = a.e.Cross(c, o)), + this._raw || (0 === this._normals[h].length() ? ((s = this._normals[h - 1]), (this._normals[h] = s.clone())) : this._normals[h].normalize()), + (this._binormals[h] = a.e.Cross(o, this._normals[h])), + this._raw || this._binormals[h].normalize(); + this._pointAtData.id = NaN; + }), + (e.prototype._getFirstNonNullVector = function (e) { + for (var t = 1, n = this._curve[e + t].subtract(this._curve[e]); 0 === n.length() && e + t + 1 < this._curve.length; ) t++, (n = this._curve[e + t].subtract(this._curve[e])); + return n; + }), + (e.prototype._getLastNonNullVector = function (e) { + for (var t = 1, n = this._curve[e].subtract(this._curve[e - t]); 0 === n.length() && e > t + 1; ) t++, (n = this._curve[e].subtract(this._curve[e - t])); + return n; + }), + (e.prototype._normalVector = function (e, t) { + var n, + i, + r = e.length(); + (0 === r && (r = 1), null == t) + ? ((i = z.a.WithinEpsilon(Math.abs(e.y) / r, 1, j.a) + ? z.a.WithinEpsilon(Math.abs(e.x) / r, 1, j.a) + ? z.a.WithinEpsilon(Math.abs(e.z) / r, 1, j.a) + ? a.e.Zero() + : new a.e(0, 0, 1) + : new a.e(1, 0, 0) + : new a.e(0, -1, 0)), + (n = a.e.Cross(e, i))) + : ((n = a.e.Cross(e, t)), a.e.CrossToRef(n, e, n)); + return n.normalize(), n; + }), + (e.prototype._updatePointAtData = function (e, t) { + if ((void 0 === t && (t = !1), this._pointAtData.id === e)) return this._pointAtData.interpolateReady || this._updateInterpolationMatrix(), this._pointAtData; + this._pointAtData.id = e; + var n = this.getPoints(); + if (e <= 0) return this._setPointAtData(0, 0, n[0], 0, t); + if (e >= 1) return this._setPointAtData(1, 1, n[n.length - 1], n.length - 1, t); + for (var i, r = n[0], o = 0, s = e * this.length(), c = 1; c < n.length; c++) { + i = n[c]; + var l = a.e.Distance(r, i); + if ((o += l) === s) return this._setPointAtData(e, 1, i, c, t); + if (o > s) { + var u = (o - s) / l, + h = r.subtract(i), + d = i.add(h.scaleInPlace(u)); + return this._setPointAtData(e, 1 - u, d, c - 1, t); + } + r = i; + } + return this._pointAtData; + }), + (e.prototype._setPointAtData = function (e, t, n, i, r) { + return ( + (this._pointAtData.point = n), + (this._pointAtData.position = e), + (this._pointAtData.subPosition = t), + (this._pointAtData.previousPointArrayIndex = i), + (this._pointAtData.interpolateReady = r), + r && this._updateInterpolationMatrix(), + this._pointAtData + ); + }), + (e.prototype._updateInterpolationMatrix = function () { + this._pointAtData.interpolationMatrix = a.a.Identity(); + var e = this._pointAtData.previousPointArrayIndex; + if (e !== this._tangents.length - 1) { + var t = e + 1, + n = this._tangents[e].clone(), + i = this._normals[e].clone(), + r = this._binormals[e].clone(), + o = this._tangents[t].clone(), + s = this._normals[t].clone(), + c = this._binormals[t].clone(), + l = a.b.RotationQuaternionFromAxis(i, r, n), + u = a.b.RotationQuaternionFromAxis(s, c, o); + a.b.Slerp(l, u, this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix); + } + }), + e + ); + })(), + W = (function () { + function e(e) { + (this._length = 0), (this._points = e), (this._length = this._computeLength(e)); + } + return ( + (e.CreateQuadraticBezier = function (t, n, i, r) { + r = r > 2 ? r : 3; + for ( + var o = new Array(), + s = function (e, t, n, i) { + return (1 - e) * (1 - e) * t + 2 * e * (1 - e) * n + e * e * i; + }, + c = 0; + c <= r; + c++ + ) + o.push(new a.e(s(c / r, t.x, n.x, i.x), s(c / r, t.y, n.y, i.y), s(c / r, t.z, n.z, i.z))); + return new e(o); + }), + (e.CreateCubicBezier = function (t, n, i, r, o) { + o = o > 3 ? o : 4; + for ( + var s = new Array(), + c = function (e, t, n, i, r) { + return (1 - e) * (1 - e) * (1 - e) * t + 3 * e * (1 - e) * (1 - e) * n + 3 * e * e * (1 - e) * i + e * e * e * r; + }, + l = 0; + l <= o; + l++ + ) + s.push(new a.e(c(l / o, t.x, n.x, i.x, r.x), c(l / o, t.y, n.y, i.y, r.y), c(l / o, t.z, n.z, i.z, r.z))); + return new e(s); + }), + (e.CreateHermiteSpline = function (t, n, i, r, o) { + for (var s = new Array(), c = 1 / o, l = 0; l <= o; l++) s.push(a.e.Hermite(t, n, i, r, l * c)); + return new e(s); + }), + (e.CreateCatmullRomSpline = function (t, n, i) { + var r = new Array(), + o = 1 / n, + s = 0; + if (i) { + for (var c = t.length, l = 0; l < c; l++) { + s = 0; + for (var u = 0; u < n; u++) r.push(a.e.CatmullRom(t[l % c], t[(l + 1) % c], t[(l + 2) % c], t[(l + 3) % c], s)), (s += o); + } + r.push(r[0]); + } else { + var h = new Array(); + h.push(t[0].clone()), Array.prototype.push.apply(h, t), h.push(t[t.length - 1].clone()); + for (l = 0; l < h.length - 3; l++) { + s = 0; + for (u = 0; u < n; u++) r.push(a.e.CatmullRom(h[l], h[l + 1], h[l + 2], h[l + 3], s)), (s += o); + } + l--, r.push(a.e.CatmullRom(h[l], h[l + 1], h[l + 2], h[l + 3], s)); + } + return new e(r); + }), + (e.prototype.getPoints = function () { + return this._points; + }), + (e.prototype.length = function () { + return this._length; + }), + (e.prototype.continue = function (t) { + for (var n = this._points[this._points.length - 1], i = this._points.slice(), r = t.getPoints(), o = 1; o < r.length; o++) i.push(r[o].subtract(r[0]).add(n)); + return new e(i); + }), + (e.prototype._computeLength = function (e) { + for (var t = 0, n = 1; n < e.length; n++) t += e[n].subtract(e[n - 1]).length(); + return t; + }), + e + ); + })(), + X = (function () { + function e() { + this._easingMode = e.EASINGMODE_EASEIN; + } + return ( + (e.prototype.setEasingMode = function (e) { + var t = Math.min(Math.max(e, 0), 2); + this._easingMode = t; + }), + (e.prototype.getEasingMode = function () { + return this._easingMode; + }), + (e.prototype.easeInCore = function (e) { + throw new Error("You must implement this method"); + }), + (e.prototype.ease = function (t) { + switch (this._easingMode) { + case e.EASINGMODE_EASEIN: + return this.easeInCore(t); + case e.EASINGMODE_EASEOUT: + return 1 - this.easeInCore(1 - t); + } + return t >= 0.5 ? 0.5 * (1 - this.easeInCore(2 * (1 - t))) + 0.5 : 0.5 * this.easeInCore(2 * t); + }), + (e.EASINGMODE_EASEIN = 0), + (e.EASINGMODE_EASEOUT = 1), + (e.EASINGMODE_EASEINOUT = 2), + e + ); + })(), + Y = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return (e = Math.max(0, Math.min(1, e))), 1 - Math.sqrt(1 - e * e); + }), + t + ); + })(X), + K = (function (e) { + function t(t) { + void 0 === t && (t = 1); + var n = e.call(this) || this; + return (n.amplitude = t), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + var t = Math.max(0, this.amplitude); + return Math.pow(e, 3) - e * t * Math.sin(3.141592653589793 * e); + }), + t + ); + })(X), + Z = (function (e) { + function t(t, n) { + void 0 === t && (t = 3), void 0 === n && (n = 2); + var i = e.call(this) || this; + return (i.bounces = t), (i.bounciness = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + var t = Math.max(0, this.bounces), + n = this.bounciness; + n <= 1 && (n = 1.001); + var i = Math.pow(n, t), + r = 1 - n, + o = (1 - i) / r + 0.5 * i, + a = e * o, + s = Math.log(-a * (1 - n) + 1) / Math.log(n), + c = Math.floor(s), + l = c + 1, + u = (1 - Math.pow(n, c)) / (r * o), + h = 0.5 * (u + (1 - Math.pow(n, l)) / (r * o)), + d = e - h, + p = h - u; + return (-Math.pow(1 / n, t - c) / (p * p)) * (d - p) * (d + p); + }), + t + ); + })(X), + q = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return e * e * e; + }), + t + ); + })(X), + Q = (function (e) { + function t(t, n) { + void 0 === t && (t = 3), void 0 === n && (n = 3); + var i = e.call(this) || this; + return (i.oscillations = t), (i.springiness = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + var t = Math.max(0, this.oscillations), + n = Math.max(0, this.springiness); + return (0 == n ? e : (Math.exp(n * e) - 1) / (Math.exp(n) - 1)) * Math.sin((6.283185307179586 * t + 1.5707963267948966) * e); + }), + t + ); + })(X), + J = (function (e) { + function t(t) { + void 0 === t && (t = 2); + var n = e.call(this) || this; + return (n.exponent = t), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return this.exponent <= 0 ? e : (Math.exp(this.exponent * e) - 1) / (Math.exp(this.exponent) - 1); + }), + t + ); + })(X), + $ = (function (e) { + function t(t) { + void 0 === t && (t = 2); + var n = e.call(this) || this; + return (n.power = t), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + var t = Math.max(0, this.power); + return Math.pow(e, t); + }), + t + ); + })(X), + ee = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return e * e; + }), + t + ); + })(X), + te = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return e * e * e * e; + }), + t + ); + })(X), + ne = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return e * e * e * e * e; + }), + t + ); + })(X), + ie = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return 1 - Math.sin(1.5707963267948966 * (1 - e)); + }), + t + ); + })(X), + re = (function (e) { + function t(t, n, i, r) { + void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 1), void 0 === r && (r = 1); + var o = e.call(this) || this; + return (o.x1 = t), (o.y1 = n), (o.x2 = i), (o.y2 = r), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.easeInCore = function (e) { + return B.Interpolate(e, this.x1, this.y1, this.x2, this.y2); + }), + t + ); + })(X), + oe = n(180), + ae = n(190), + se = n(134), + ce = n(146), + le = n(119), + ue = n(14), + he = (function () { + function e(e) { + (this.SMOOTHING = 0.75), + (this.FFT_SIZE = 512), + (this.BARGRAPHAMPLITUDE = 256), + (this.DEBUGCANVASPOS = { x: 20, y: 20 }), + (this.DEBUGCANVASSIZE = { width: 320, height: 200 }), + (this._scene = e), + (this._audioEngine = ue.a.audioEngine), + this._audioEngine.canUseWebAudio && + this._audioEngine.audioContext && + ((this._webAudioAnalyser = this._audioEngine.audioContext.createAnalyser()), + (this._webAudioAnalyser.minDecibels = -140), + (this._webAudioAnalyser.maxDecibels = 0), + (this._byteFreqs = new Uint8Array(this._webAudioAnalyser.frequencyBinCount)), + (this._byteTime = new Uint8Array(this._webAudioAnalyser.frequencyBinCount)), + (this._floatFreqs = new Float32Array(this._webAudioAnalyser.frequencyBinCount))); + } + return ( + (e.prototype.getFrequencyBinCount = function () { + return this._audioEngine.canUseWebAudio ? this._webAudioAnalyser.frequencyBinCount : 0; + }), + (e.prototype.getByteFrequencyData = function () { + return ( + this._audioEngine.canUseWebAudio && + ((this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING), (this._webAudioAnalyser.fftSize = this.FFT_SIZE), this._webAudioAnalyser.getByteFrequencyData(this._byteFreqs)), + this._byteFreqs + ); + }), + (e.prototype.getByteTimeDomainData = function () { + return ( + this._audioEngine.canUseWebAudio && + ((this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING), (this._webAudioAnalyser.fftSize = this.FFT_SIZE), this._webAudioAnalyser.getByteTimeDomainData(this._byteTime)), + this._byteTime + ); + }), + (e.prototype.getFloatFrequencyData = function () { + return ( + this._audioEngine.canUseWebAudio && + ((this._webAudioAnalyser.smoothingTimeConstant = this.SMOOTHING), (this._webAudioAnalyser.fftSize = this.FFT_SIZE), this._webAudioAnalyser.getFloatFrequencyData(this._floatFreqs)), + this._floatFreqs + ); + }), + (e.prototype.drawDebugCanvas = function () { + var e = this; + if ( + this._audioEngine.canUseWebAudio && + (this._debugCanvas || + ((this._debugCanvas = document.createElement("canvas")), + (this._debugCanvas.width = this.DEBUGCANVASSIZE.width), + (this._debugCanvas.height = this.DEBUGCANVASSIZE.height), + (this._debugCanvas.style.position = "absolute"), + (this._debugCanvas.style.top = this.DEBUGCANVASPOS.y + "px"), + (this._debugCanvas.style.left = this.DEBUGCANVASPOS.x + "px"), + (this._debugCanvasContext = this._debugCanvas.getContext("2d")), + document.body.appendChild(this._debugCanvas), + (this._registerFunc = function () { + e.drawDebugCanvas(); + }), + this._scene.registerBeforeRender(this._registerFunc)), + this._registerFunc && this._debugCanvasContext) + ) { + var t = this.getByteFrequencyData(); + (this._debugCanvasContext.fillStyle = "rgb(0, 0, 0)"), this._debugCanvasContext.fillRect(0, 0, this.DEBUGCANVASSIZE.width, this.DEBUGCANVASSIZE.height); + for (var n = 0; n < this.getFrequencyBinCount(); n++) { + var i = t[n] / this.BARGRAPHAMPLITUDE, + r = this.DEBUGCANVASSIZE.height * i, + o = this.DEBUGCANVASSIZE.height - r - 1, + a = this.DEBUGCANVASSIZE.width / this.getFrequencyBinCount(), + s = (n / this.getFrequencyBinCount()) * 360; + (this._debugCanvasContext.fillStyle = "hsl(" + s + ", 100%, 50%)"), this._debugCanvasContext.fillRect(n * a, o, a, r); + } + } + }), + (e.prototype.stopDebugCanvas = function () { + this._debugCanvas && + (this._registerFunc && (this._scene.unregisterBeforeRender(this._registerFunc), (this._registerFunc = null)), + document.body.removeChild(this._debugCanvas), + (this._debugCanvas = null), + (this._debugCanvasContext = null)); + }), + (e.prototype.connectAudioNodes = function (e, t) { + this._audioEngine.canUseWebAudio && (e.connect(this._webAudioAnalyser), this._webAudioAnalyser.connect(t)); + }), + (e.prototype.dispose = function () { + this._audioEngine.canUseWebAudio && this._webAudioAnalyser.disconnect(); + }), + e + ); + })(); + ue.a.AudioEngineFactory = function (e) { + return new de(e); + }; + var de = (function () { + function e(e) { + var t = this; + void 0 === e && (e = null), + (this._audioContext = null), + (this._audioContextInitialized = !1), + (this._muteButton = null), + (this.canUseWebAudio = !1), + (this.WarnedWebAudioUnsupported = !1), + (this.isMP3supported = !1), + (this.isOGGsupported = !1), + (this.unlocked = !0), + (this.useCustomUnlockedButton = !1), + (this.onAudioUnlockedObservable = new o.c()), + (this.onAudioLockedObservable = new o.c()), + (this._tryToRun = !1), + (this._onResize = function () { + t._moveButtonToTopLeft(); + }), + (void 0 === window.AudioContext && void 0 === window.webkitAudioContext) || ((window.AudioContext = window.AudioContext || window.webkitAudioContext), (this.canUseWebAudio = !0)); + var n = document.createElement("audio"); + this._hostElement = e; + try { + n && n.canPlayType && n.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/, "") && (this.isMP3supported = !0); + } catch (e) {} + try { + n && n.canPlayType && n.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, "") && (this.isOGGsupported = !0); + } catch (e) {} + } + return ( + Object.defineProperty(e.prototype, "audioContext", { + get: function () { + return this._audioContextInitialized ? this.unlocked || this._muteButton || this._displayMuteButton() : this._initializeAudioContext(), this._audioContext; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.lock = function () { + this._triggerSuspendedState(); + }), + (e.prototype.unlock = function () { + this._triggerRunningState(); + }), + (e.prototype._resumeAudioContext = function () { + var e; + return this._audioContext.resume && (e = this._audioContext.resume()), e || Promise.resolve(); + }), + (e.prototype._initializeAudioContext = function () { + try { + this.canUseWebAudio && + ((this._audioContext = new AudioContext()), + (this.masterGain = this._audioContext.createGain()), + (this.masterGain.gain.value = 1), + this.masterGain.connect(this._audioContext.destination), + (this._audioContextInitialized = !0), + "running" === this._audioContext.state && this._triggerRunningState()); + } catch (e) { + (this.canUseWebAudio = !1), g.a.Error("Web Audio: " + e.message); + } + }), + (e.prototype._triggerRunningState = function () { + var e = this; + this._tryToRun || + ((this._tryToRun = !0), + this._resumeAudioContext() + .then(function () { + (e._tryToRun = !1), e._muteButton && e._hideMuteButton(); + }) + .catch(function () { + (e._tryToRun = !1), (e.unlocked = !1); + }), + (this.unlocked = !0), + this.onAudioUnlockedObservable.notifyObservers(this)); + }), + (e.prototype._triggerSuspendedState = function () { + (this.unlocked = !1), this.onAudioLockedObservable.notifyObservers(this), this._displayMuteButton(); + }), + (e.prototype._displayMuteButton = function () { + var e = this; + if (!this.useCustomUnlockedButton && !this._muteButton) { + (this._muteButton = document.createElement("BUTTON")), (this._muteButton.className = "babylonUnmuteIcon"), (this._muteButton.id = "babylonUnmuteIconBtn"), (this._muteButton.title = "Unmute"); + var t = + ".babylonUnmuteIcon { position: absolute; left: 20px; top: 20px; height: 40px; width: 60px; background-color: rgba(51,51,51,0.7); background-image: url(" + + (window.SVGSVGElement + ? "data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2239%22%20height%3D%2232%22%20viewBox%3D%220%200%2039%2032%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M9.625%2018.938l-0.031%200.016h-4.953q-0.016%200-0.031-0.016v-12.453q0-0.016%200.031-0.016h4.953q0.031%200%200.031%200.016v12.453zM12.125%207.688l8.719-8.703v27.453l-8.719-8.719-0.016-0.047v-9.938zM23.359%207.875l1.406-1.406%204.219%204.203%204.203-4.203%201.422%201.406-4.219%204.219%204.219%204.203-1.484%201.359-4.141-4.156-4.219%204.219-1.406-1.422%204.219-4.203z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E" + : "https://cdn.babylonjs.com/Assets/audio.png") + + "); background-size: 80%; background-repeat:no-repeat; background-position: center; background-position-y: 4px; border: none; outline: none; transition: transform 0.125s ease-out; cursor: pointer; z-index: 9999; } .babylonUnmuteIcon:hover { transform: scale(1.05) } .babylonUnmuteIcon:active { background-color: rgba(51,51,51,1) }", + n = document.createElement("style"); + n.appendChild(document.createTextNode(t)), + document.getElementsByTagName("head")[0].appendChild(n), + document.body.appendChild(this._muteButton), + this._moveButtonToTopLeft(), + this._muteButton.addEventListener( + "touchend", + function () { + e._triggerRunningState(); + }, + !0 + ), + this._muteButton.addEventListener( + "click", + function () { + e._triggerRunningState(); + }, + !0 + ), + window.addEventListener("resize", this._onResize); + } + }), + (e.prototype._moveButtonToTopLeft = function () { + this._hostElement && this._muteButton && ((this._muteButton.style.top = this._hostElement.offsetTop + 20 + "px"), (this._muteButton.style.left = this._hostElement.offsetLeft + 20 + "px")); + }), + (e.prototype._hideMuteButton = function () { + this._muteButton && (document.body.removeChild(this._muteButton), (this._muteButton = null)); + }), + (e.prototype.dispose = function () { + this.canUseWebAudio && + this._audioContextInitialized && + (this._connectedAnalyser && + this._audioContext && + (this._connectedAnalyser.stopDebugCanvas(), this._connectedAnalyser.dispose(), this.masterGain.disconnect(), this.masterGain.connect(this._audioContext.destination), (this._connectedAnalyser = null)), + (this.masterGain.gain.value = 1)), + (this.WarnedWebAudioUnsupported = !1), + this._hideMuteButton(), + window.removeEventListener("resize", this._onResize), + this.onAudioUnlockedObservable.clear(), + this.onAudioLockedObservable.clear(); + }), + (e.prototype.getGlobalVolume = function () { + return this.canUseWebAudio && this._audioContextInitialized ? this.masterGain.gain.value : -1; + }), + (e.prototype.setGlobalVolume = function (e) { + this.canUseWebAudio && this._audioContextInitialized && (this.masterGain.gain.value = e); + }), + (e.prototype.connectToAnalyser = function (e) { + this._connectedAnalyser && this._connectedAnalyser.stopDebugCanvas(), + this.canUseWebAudio && + this._audioContextInitialized && + this._audioContext && + ((this._connectedAnalyser = e), this.masterGain.disconnect(), this._connectedAnalyser.connectAudioNodes(this.masterGain, this._audioContext.destination)); + }), + e + ); + })(), + pe = n(137), + fe = (function () { + function e(e, t) { + void 0 === t && (t = {}), + (this.id = -1), + (this._isInitialized = !1), + (this._scene = e), + (this.soundCollection = new Array()), + (this._options = t), + !this._options.mainTrack && this._scene.soundTracks && (this._scene.soundTracks.push(this), (this.id = this._scene.soundTracks.length - 1)); + } + return ( + (e.prototype._initializeSoundTrackAudioGraph = function () { + ue.a.audioEngine.canUseWebAudio && + ue.a.audioEngine.audioContext && + ((this._outputAudioNode = ue.a.audioEngine.audioContext.createGain()), + this._outputAudioNode.connect(ue.a.audioEngine.masterGain), + this._options && this._options.volume && (this._outputAudioNode.gain.value = this._options.volume), + (this._isInitialized = !0)); + }), + (e.prototype.dispose = function () { + if (ue.a.audioEngine && ue.a.audioEngine.canUseWebAudio) { + for (this._connectedAnalyser && this._connectedAnalyser.stopDebugCanvas(); this.soundCollection.length; ) this.soundCollection[0].dispose(); + this._outputAudioNode && this._outputAudioNode.disconnect(), (this._outputAudioNode = null); + } + }), + (e.prototype.AddSound = function (e) { + this._isInitialized || this._initializeSoundTrackAudioGraph(), + ue.a.audioEngine.canUseWebAudio && this._outputAudioNode && e.connectToSoundTrackAudioNode(this._outputAudioNode), + e.soundTrackId && (-1 === e.soundTrackId ? this._scene.mainSoundTrack.RemoveSound(e) : this._scene.soundTracks && this._scene.soundTracks[e.soundTrackId].RemoveSound(e)), + this.soundCollection.push(e), + (e.soundTrackId = this.id); + }), + (e.prototype.RemoveSound = function (e) { + var t = this.soundCollection.indexOf(e); + -1 !== t && this.soundCollection.splice(t, 1); + }), + (e.prototype.setVolume = function (e) { + ue.a.audioEngine.canUseWebAudio && this._outputAudioNode && (this._outputAudioNode.gain.value = e); + }), + (e.prototype.switchPanningModelToHRTF = function () { + if (ue.a.audioEngine.canUseWebAudio) for (var e = 0; e < this.soundCollection.length; e++) this.soundCollection[e].switchPanningModelToHRTF(); + }), + (e.prototype.switchPanningModelToEqualPower = function () { + if (ue.a.audioEngine.canUseWebAudio) for (var e = 0; e < this.soundCollection.length; e++) this.soundCollection[e].switchPanningModelToEqualPower(); + }), + (e.prototype.connectToAnalyser = function (e) { + this._connectedAnalyser && this._connectedAnalyser.stopDebugCanvas(), + (this._connectedAnalyser = e), + ue.a.audioEngine.canUseWebAudio && this._outputAudioNode && (this._outputAudioNode.disconnect(), this._connectedAnalyser.connectAudioNodes(this._outputAudioNode, ue.a.audioEngine.masterGain)); + }), + e + ); + })(), + me = n(21), + ge = n(18), + be = n(76); + i.a.AddParser(me.a.NAME_AUDIO, function (e, t, n, i) { + var r, + o = []; + if (((n.sounds = n.sounds || []), void 0 !== e.sounds && null !== e.sounds)) + for (var a = 0, s = e.sounds.length; a < s; a++) { + var c = e.sounds[a]; + ue.a.audioEngine.canUseWebAudio + ? (c.url || (c.url = c.name), o[c.url] ? n.sounds.push(pe.a.Parse(c, t, i, o[c.url])) : ((r = pe.a.Parse(c, t, i)), (o[c.url] = r), n.sounds.push(r))) + : n.sounds.push(new pe.a(c.name, null, t)); + } + o = []; + }), + Object.defineProperty(ge.a.prototype, "mainSoundTrack", { + get: function () { + var e = this._getComponent(me.a.NAME_AUDIO); + return e || ((e = new _e(this)), this._addComponent(e)), this._mainSoundTrack || (this._mainSoundTrack = new fe(this, { mainTrack: !0 })), this._mainSoundTrack; + }, + enumerable: !0, + configurable: !0, + }), + (ge.a.prototype.getSoundByName = function (e) { + var t; + for (t = 0; t < this.mainSoundTrack.soundCollection.length; t++) if (this.mainSoundTrack.soundCollection[t].name === e) return this.mainSoundTrack.soundCollection[t]; + if (this.soundTracks) + for (var n = 0; n < this.soundTracks.length; n++) for (t = 0; t < this.soundTracks[n].soundCollection.length; t++) if (this.soundTracks[n].soundCollection[t].name === e) return this.soundTracks[n].soundCollection[t]; + return null; + }), + Object.defineProperty(ge.a.prototype, "audioEnabled", { + get: function () { + var e = this._getComponent(me.a.NAME_AUDIO); + return e || ((e = new _e(this)), this._addComponent(e)), e.audioEnabled; + }, + set: function (e) { + var t = this._getComponent(me.a.NAME_AUDIO); + t || ((t = new _e(this)), this._addComponent(t)), e ? t.enableAudio() : t.disableAudio(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ge.a.prototype, "headphone", { + get: function () { + var e = this._getComponent(me.a.NAME_AUDIO); + return e || ((e = new _e(this)), this._addComponent(e)), e.headphone; + }, + set: function (e) { + var t = this._getComponent(me.a.NAME_AUDIO); + t || ((t = new _e(this)), this._addComponent(t)), e ? t.switchAudioModeForHeadphones() : t.switchAudioModeForNormalSpeakers(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ge.a.prototype, "audioListenerPositionProvider", { + get: function () { + var e = this._getComponent(me.a.NAME_AUDIO); + return e || ((e = new _e(this)), this._addComponent(e)), e.audioListenerPositionProvider; + }, + set: function (e) { + var t = this._getComponent(me.a.NAME_AUDIO); + if ((t || ((t = new _e(this)), this._addComponent(t)), "function" != typeof e)) throw new Error("The value passed to [Scene.audioListenerPositionProvider] must be a function that returns a Vector3"); + t.audioListenerPositionProvider = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ge.a.prototype, "audioPositioningRefreshRate", { + get: function () { + var e = this._getComponent(me.a.NAME_AUDIO); + return e || ((e = new _e(this)), this._addComponent(e)), e.audioPositioningRefreshRate; + }, + set: function (e) { + var t = this._getComponent(me.a.NAME_AUDIO); + t || ((t = new _e(this)), this._addComponent(t)), (t.audioPositioningRefreshRate = e); + }, + enumerable: !0, + configurable: !0, + }); + var _e = (function () { + function e(e) { + (this.name = me.a.NAME_AUDIO), + (this._audioEnabled = !0), + (this._headphone = !1), + (this.audioPositioningRefreshRate = 500), + (this._audioListenerPositionProvider = null), + (this._cachedCameraDirection = new a.e()), + (this._cachedCameraPosition = new a.e()), + (this._lastCheck = 0), + (this.scene = e), + (e.soundTracks = new Array()), + (e.sounds = new Array()); + } + return ( + Object.defineProperty(e.prototype, "audioEnabled", { + get: function () { + return this._audioEnabled; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "headphone", { + get: function () { + return this._headphone; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "audioListenerPositionProvider", { + get: function () { + return this._audioListenerPositionProvider; + }, + set: function (e) { + this._audioListenerPositionProvider = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.register = function () { + this.scene._afterRenderStage.registerStep(me.a.STEP_AFTERRENDER_AUDIO, this, this._afterRender); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.serialize = function (e) { + if (((e.sounds = []), this.scene.soundTracks)) + for (var t = 0; t < this.scene.soundTracks.length; t++) for (var n = this.scene.soundTracks[t], i = 0; i < n.soundCollection.length; i++) e.sounds.push(n.soundCollection[i].serialize()); + }), + (e.prototype.addFromContainer = function (e) { + var t = this; + e.sounds && + e.sounds.forEach(function (e) { + e.play(), (e.autoplay = !0), t.scene.mainSoundTrack.AddSound(e); + }); + }), + (e.prototype.removeFromContainer = function (e, t) { + var n = this; + void 0 === t && (t = !1), + e.sounds && + e.sounds.forEach(function (e) { + e.stop(), (e.autoplay = !1), n.scene.mainSoundTrack.RemoveSound(e), t && e.dispose(); + }); + }), + (e.prototype.dispose = function () { + var e = this.scene; + if ((e._mainSoundTrack && e.mainSoundTrack.dispose(), e.soundTracks)) for (var t = 0; t < e.soundTracks.length; t++) e.soundTracks[t].dispose(); + }), + (e.prototype.disableAudio = function () { + var e, + t = this.scene; + for (this._audioEnabled = !1, ue.a.audioEngine && ue.a.audioEngine.audioContext && ue.a.audioEngine.audioContext.suspend(), e = 0; e < t.mainSoundTrack.soundCollection.length; e++) + t.mainSoundTrack.soundCollection[e].pause(); + if (t.soundTracks) for (e = 0; e < t.soundTracks.length; e++) for (var n = 0; n < t.soundTracks[e].soundCollection.length; n++) t.soundTracks[e].soundCollection[n].pause(); + }), + (e.prototype.enableAudio = function () { + var e, + t = this.scene; + for (this._audioEnabled = !0, ue.a.audioEngine && ue.a.audioEngine.audioContext && ue.a.audioEngine.audioContext.resume(), e = 0; e < t.mainSoundTrack.soundCollection.length; e++) + t.mainSoundTrack.soundCollection[e].isPaused && t.mainSoundTrack.soundCollection[e].play(); + if (t.soundTracks) for (e = 0; e < t.soundTracks.length; e++) for (var n = 0; n < t.soundTracks[e].soundCollection.length; n++) t.soundTracks[e].soundCollection[n].isPaused && t.soundTracks[e].soundCollection[n].play(); + }), + (e.prototype.switchAudioModeForHeadphones = function () { + var e = this.scene; + if (((this._headphone = !0), e.mainSoundTrack.switchPanningModelToHRTF(), e.soundTracks)) for (var t = 0; t < e.soundTracks.length; t++) e.soundTracks[t].switchPanningModelToHRTF(); + }), + (e.prototype.switchAudioModeForNormalSpeakers = function () { + var e = this.scene; + if (((this._headphone = !1), e.mainSoundTrack.switchPanningModelToEqualPower(), e.soundTracks)) for (var t = 0; t < e.soundTracks.length; t++) e.soundTracks[t].switchPanningModelToEqualPower(); + }), + (e.prototype._afterRender = function () { + var e = be.a.Now; + if (!(this._lastCheck && e - this._lastCheck < this.audioPositioningRefreshRate)) { + this._lastCheck = e; + var t = this.scene; + if (this._audioEnabled && t._mainSoundTrack && t.soundTracks && (0 !== t._mainSoundTrack.soundCollection.length || 1 !== t.soundTracks.length)) { + var n = ue.a.audioEngine; + if (n.audioContext) { + if (this._audioListenerPositionProvider) { + var i = this._audioListenerPositionProvider(); + (i.x = i.x || 0), (i.y = i.y || 0), (i.z = i.z || 0), n.audioContext.listener.setPosition(i.x, i.y, i.z); + } else { + var r; + if ((r = t.activeCameras.length > 0 ? t.activeCameras[0] : t.activeCamera)) { + this._cachedCameraPosition.equals(r.globalPosition) || + (this._cachedCameraPosition.copyFrom(r.globalPosition), n.audioContext.listener.setPosition(r.globalPosition.x, r.globalPosition.y, r.globalPosition.z)), + r.rigCameras && r.rigCameras.length > 0 && (r = r.rigCameras[0]); + var o = a.a.Invert(r.getViewMatrix()), + s = a.e.TransformNormal(new a.e(0, 0, -1), o); + s.normalize(), + isNaN(s.x) || isNaN(s.y) || isNaN(s.z) || this._cachedCameraDirection.equals(s) || (this._cachedCameraDirection.copyFrom(s), n.audioContext.listener.setOrientation(s.x, s.y, s.z, 0, 1, 0)); + } else n.audioContext.listener.setPosition(0, 0, 0); + } + var c; + for (c = 0; c < t.mainSoundTrack.soundCollection.length; c++) { + var l = t.mainSoundTrack.soundCollection[c]; + l.useCustomAttenuation && l.updateDistanceFromListener(); + } + if (t.soundTracks) + for (c = 0; c < t.soundTracks.length; c++) + for (var u = 0; u < t.soundTracks[c].soundCollection.length; u++) (l = t.soundTracks[c].soundCollection[u]).useCustomAttenuation && l.updateDistanceFromListener(); + } + } + } + }), + e + ); + })(); + pe.a._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_AUDIO); + t || ((t = new _e(e)), e._addComponent(t)); + }; + var ve = n(192), + ye = n(20), + Ce = (function () { + function e() { + (this._zoomStopsAnimation = !1), + (this._idleRotationSpeed = 0.05), + (this._idleRotationWaitTime = 2e3), + (this._idleRotationSpinupTime = 2e3), + (this._isPointerDown = !1), + (this._lastFrameTime = null), + (this._lastInteractionTime = -1 / 0), + (this._cameraRotationSpeed = 0), + (this._lastFrameRadius = 0); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "AutoRotation"; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "zoomStopsAnimation", { + get: function () { + return this._zoomStopsAnimation; + }, + set: function (e) { + this._zoomStopsAnimation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "idleRotationSpeed", { + get: function () { + return this._idleRotationSpeed; + }, + set: function (e) { + this._idleRotationSpeed = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "idleRotationWaitTime", { + get: function () { + return this._idleRotationWaitTime; + }, + set: function (e) { + this._idleRotationWaitTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "idleRotationSpinupTime", { + get: function () { + return this._idleRotationSpinupTime; + }, + set: function (e) { + this._idleRotationSpinupTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rotationInProgress", { + get: function () { + return Math.abs(this._cameraRotationSpeed) > 0; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype.attach = function (e) { + var t = this; + this._attachedCamera = e; + var n = this._attachedCamera.getScene(); + (this._onPrePointerObservableObserver = n.onPrePointerObservable.add(function (e) { + e.type !== ye.a.POINTERDOWN ? e.type === ye.a.POINTERUP && (t._isPointerDown = !1) : (t._isPointerDown = !0); + })), + (this._onAfterCheckInputsObserver = e.onAfterCheckInputsObservable.add(function () { + var e = be.a.Now, + n = 0; + null != t._lastFrameTime && (n = e - t._lastFrameTime), (t._lastFrameTime = e), t._applyUserInteraction(); + var i = e - t._lastInteractionTime - t._idleRotationWaitTime, + r = Math.max(Math.min(i / t._idleRotationSpinupTime, 1), 0); + (t._cameraRotationSpeed = t._idleRotationSpeed * r), t._attachedCamera && (t._attachedCamera.alpha -= t._cameraRotationSpeed * (n / 1e3)); + })); + }), + (e.prototype.detach = function () { + if (this._attachedCamera) { + var e = this._attachedCamera.getScene(); + this._onPrePointerObservableObserver && e.onPrePointerObservable.remove(this._onPrePointerObservableObserver), + this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver), + (this._attachedCamera = null); + } + }), + (e.prototype._userIsZooming = function () { + return !!this._attachedCamera && 0 !== this._attachedCamera.inertialRadiusOffset; + }), + (e.prototype._shouldAnimationStopForInteraction = function () { + if (!this._attachedCamera) return !1; + var e = !1; + return ( + this._lastFrameRadius === this._attachedCamera.radius && 0 !== this._attachedCamera.inertialRadiusOffset && (e = !0), + (this._lastFrameRadius = this._attachedCamera.radius), + this._zoomStopsAnimation ? e : this._userIsZooming() + ); + }), + (e.prototype._applyUserInteraction = function () { + this._userIsMoving() && !this._shouldAnimationStopForInteraction() && (this._lastInteractionTime = be.a.Now); + }), + (e.prototype._userIsMoving = function () { + return ( + !!this._attachedCamera && + (0 !== this._attachedCamera.inertialAlphaOffset || + 0 !== this._attachedCamera.inertialBetaOffset || + 0 !== this._attachedCamera.inertialRadiusOffset || + 0 !== this._attachedCamera.inertialPanningX || + 0 !== this._attachedCamera.inertialPanningY || + this._isPointerDown) + ); + }), + e + ); + })(), + Pe = (function () { + function e() { + (this.transitionDuration = 450), + (this.lowerRadiusTransitionRange = 2), + (this.upperRadiusTransitionRange = -2), + (this._autoTransitionRange = !1), + (this._radiusIsAnimating = !1), + (this._radiusBounceTransition = null), + (this._animatables = new Array()); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "Bouncing"; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "autoTransitionRange", { + get: function () { + return this._autoTransitionRange; + }, + set: function (e) { + var t = this; + if (this._autoTransitionRange !== e) { + this._autoTransitionRange = e; + var n = this._attachedCamera; + n && + (e + ? (this._onMeshTargetChangedObserver = n.onMeshTargetChangedObservable.add(function (e) { + if (e) { + e.computeWorldMatrix(!0); + var n = e.getBoundingInfo().diagonalLength; + (t.lowerRadiusTransitionRange = 0.05 * n), (t.upperRadiusTransitionRange = 0.05 * n); + } + })) + : this._onMeshTargetChangedObserver && n.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver)); + } + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype.attach = function (e) { + var t = this; + (this._attachedCamera = e), + (this._onAfterCheckInputsObserver = e.onAfterCheckInputsObservable.add(function () { + t._attachedCamera && + (t._isRadiusAtLimit(t._attachedCamera.lowerRadiusLimit) && t._applyBoundRadiusAnimation(t.lowerRadiusTransitionRange), + t._isRadiusAtLimit(t._attachedCamera.upperRadiusLimit) && t._applyBoundRadiusAnimation(t.upperRadiusTransitionRange)); + })); + }), + (e.prototype.detach = function () { + this._attachedCamera && + (this._onAfterCheckInputsObserver && this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver), + this._onMeshTargetChangedObserver && this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver), + (this._attachedCamera = null)); + }), + (e.prototype._isRadiusAtLimit = function (e) { + return !!this._attachedCamera && this._attachedCamera.radius === e && !this._radiusIsAnimating; + }), + (e.prototype._applyBoundRadiusAnimation = function (t) { + var n = this; + if (this._attachedCamera) { + this._radiusBounceTransition || (e.EasingFunction.setEasingMode(e.EasingMode), (this._radiusBounceTransition = R.a.CreateAnimation("radius", R.a.ANIMATIONTYPE_FLOAT, 60, e.EasingFunction))), + (this._cachedWheelPrecision = this._attachedCamera.wheelPrecision), + (this._attachedCamera.wheelPrecision = 1 / 0), + (this._attachedCamera.inertialRadiusOffset = 0), + this.stopAllAnimations(), + (this._radiusIsAnimating = !0); + var i = R.a.TransitionTo("radius", this._attachedCamera.radius + t, this._attachedCamera, this._attachedCamera.getScene(), 60, this._radiusBounceTransition, this.transitionDuration, function () { + return n._clearAnimationLocks(); + }); + i && this._animatables.push(i); + } + }), + (e.prototype._clearAnimationLocks = function () { + (this._radiusIsAnimating = !1), this._attachedCamera && (this._attachedCamera.wheelPrecision = this._cachedWheelPrecision); + }), + (e.prototype.stopAllAnimations = function () { + for (this._attachedCamera && (this._attachedCamera.animations = []); this._animatables.length; ) (this._animatables[0].onAnimationEnd = null), this._animatables[0].stop(), this._animatables.shift(); + }), + (e.EasingFunction = new K(0.3)), + (e.EasingMode = X.EASINGMODE_EASEOUT), + e + ); + })(), + xe = (function () { + function e() { + (this._mode = e.FitFrustumSidesMode), + (this._radiusScale = 1), + (this._positionScale = 0.5), + (this._defaultElevation = 0.3), + (this._elevationReturnTime = 1500), + (this._elevationReturnWaitTime = 1e3), + (this._zoomStopsAnimation = !1), + (this._framingTime = 1500), + (this.autoCorrectCameraLimitsAndSensibility = !0), + (this._isPointerDown = !1), + (this._lastInteractionTime = -1 / 0), + (this._animatables = new Array()), + (this._betaIsAnimating = !1); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "Framing"; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "mode", { + get: function () { + return this._mode; + }, + set: function (e) { + this._mode = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "radiusScale", { + get: function () { + return this._radiusScale; + }, + set: function (e) { + this._radiusScale = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "positionScale", { + get: function () { + return this._positionScale; + }, + set: function (e) { + this._positionScale = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "defaultElevation", { + get: function () { + return this._defaultElevation; + }, + set: function (e) { + this._defaultElevation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "elevationReturnTime", { + get: function () { + return this._elevationReturnTime; + }, + set: function (e) { + this._elevationReturnTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "elevationReturnWaitTime", { + get: function () { + return this._elevationReturnWaitTime; + }, + set: function (e) { + this._elevationReturnWaitTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "zoomStopsAnimation", { + get: function () { + return this._zoomStopsAnimation; + }, + set: function (e) { + this._zoomStopsAnimation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "framingTime", { + get: function () { + return this._framingTime; + }, + set: function (e) { + this._framingTime = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype.attach = function (t) { + var n = this; + this._attachedCamera = t; + var i = this._attachedCamera.getScene(); + e.EasingFunction.setEasingMode(e.EasingMode), + (this._onPrePointerObservableObserver = i.onPrePointerObservable.add(function (e) { + e.type !== ye.a.POINTERDOWN ? e.type === ye.a.POINTERUP && (n._isPointerDown = !1) : (n._isPointerDown = !0); + })), + (this._onMeshTargetChangedObserver = t.onMeshTargetChangedObservable.add(function (e) { + e && n.zoomOnMesh(e); + })), + (this._onAfterCheckInputsObserver = t.onAfterCheckInputsObservable.add(function () { + n._applyUserInteraction(), n._maintainCameraAboveGround(); + })); + }), + (e.prototype.detach = function () { + if (this._attachedCamera) { + var e = this._attachedCamera.getScene(); + this._onPrePointerObservableObserver && e.onPrePointerObservable.remove(this._onPrePointerObservableObserver), + this._onAfterCheckInputsObserver && this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver), + this._onMeshTargetChangedObserver && this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver), + (this._attachedCamera = null); + } + }), + (e.prototype.zoomOnMesh = function (e, t, n) { + void 0 === t && (t = !1), void 0 === n && (n = null), e.computeWorldMatrix(!0); + var i = e.getBoundingInfo().boundingBox; + this.zoomOnBoundingInfo(i.minimumWorld, i.maximumWorld, t, n); + }), + (e.prototype.zoomOnMeshHierarchy = function (e, t, n) { + void 0 === t && (t = !1), void 0 === n && (n = null), e.computeWorldMatrix(!0); + var i = e.getHierarchyBoundingVectors(!0); + this.zoomOnBoundingInfo(i.min, i.max, t, n); + }), + (e.prototype.zoomOnMeshesHierarchy = function (e, t, n) { + void 0 === t && (t = !1), void 0 === n && (n = null); + for (var i = new a.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), r = new a.e(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE), o = 0; o < e.length; o++) { + var s = e[o].getHierarchyBoundingVectors(!0); + a.e.CheckExtends(s.min, i, r), a.e.CheckExtends(s.max, i, r); + } + this.zoomOnBoundingInfo(i, r, t, n); + }), + (e.prototype.zoomOnBoundingInfo = function (t, n, i, r) { + var o, + s = this; + if ((void 0 === i && (i = !1), void 0 === r && (r = null), this._attachedCamera)) { + var c = t.y, + l = c + (n.y - c) * this._positionScale, + u = n.subtract(t).scale(0.5); + if (i) o = new a.e(0, l, 0); + else { + var h = t.add(u); + o = new a.e(h.x, l, h.z); + } + this._vectorTransition || (this._vectorTransition = R.a.CreateAnimation("target", R.a.ANIMATIONTYPE_VECTOR3, 60, e.EasingFunction)), (this._betaIsAnimating = !0); + var d = R.a.TransitionTo("target", o, this._attachedCamera, this._attachedCamera.getScene(), 60, this._vectorTransition, this._framingTime); + d && this._animatables.push(d); + var p = 0; + if (this._mode === e.FitFrustumSidesMode) { + var f = this._calculateLowerRadiusFromModelBoundingSphere(t, n); + this.autoCorrectCameraLimitsAndSensibility && (this._attachedCamera.lowerRadiusLimit = u.length() + this._attachedCamera.minZ), (p = f); + } else + this._mode === e.IgnoreBoundsSizeMode && + ((p = this._calculateLowerRadiusFromModelBoundingSphere(t, n)), + this.autoCorrectCameraLimitsAndSensibility && null === this._attachedCamera.lowerRadiusLimit && (this._attachedCamera.lowerRadiusLimit = this._attachedCamera.minZ)); + if (this.autoCorrectCameraLimitsAndSensibility) { + var m = n.subtract(t).length(); + (this._attachedCamera.panningSensibility = 5e3 / m), (this._attachedCamera.wheelPrecision = 100 / p); + } + this._radiusTransition || (this._radiusTransition = R.a.CreateAnimation("radius", R.a.ANIMATIONTYPE_FLOAT, 60, e.EasingFunction)), + (d = R.a.TransitionTo("radius", p, this._attachedCamera, this._attachedCamera.getScene(), 60, this._radiusTransition, this._framingTime, function () { + s.stopAllAnimations(), r && r(), s._attachedCamera && s._attachedCamera.useInputToRestoreState && s._attachedCamera.storeState(); + })) && this._animatables.push(d); + } + }), + (e.prototype._calculateLowerRadiusFromModelBoundingSphere = function (t, n) { + var i = n.subtract(t).length(), + r = this._getFrustumSlope(), + o = 0.5 * i * this._radiusScale, + a = o * Math.sqrt(1 + 1 / (r.x * r.x)), + s = o * Math.sqrt(1 + 1 / (r.y * r.y)), + c = Math.max(a, s), + l = this._attachedCamera; + return l ? (l.lowerRadiusLimit && this._mode === e.IgnoreBoundsSizeMode && (c = c < l.lowerRadiusLimit ? l.lowerRadiusLimit : c), l.upperRadiusLimit && (c = c > l.upperRadiusLimit ? l.upperRadiusLimit : c), c) : 0; + }), + (e.prototype._maintainCameraAboveGround = function () { + var t = this; + if (!(this._elevationReturnTime < 0)) { + var n = be.a.Now - this._lastInteractionTime, + i = 0.5 * Math.PI - this._defaultElevation, + r = 0.5 * Math.PI; + if (this._attachedCamera && !this._betaIsAnimating && this._attachedCamera.beta > r && n >= this._elevationReturnWaitTime) { + (this._betaIsAnimating = !0), this.stopAllAnimations(), this._betaTransition || (this._betaTransition = R.a.CreateAnimation("beta", R.a.ANIMATIONTYPE_FLOAT, 60, e.EasingFunction)); + var o = R.a.TransitionTo("beta", i, this._attachedCamera, this._attachedCamera.getScene(), 60, this._betaTransition, this._elevationReturnTime, function () { + t._clearAnimationLocks(), t.stopAllAnimations(); + }); + o && this._animatables.push(o); + } + } + }), + (e.prototype._getFrustumSlope = function () { + var e = this._attachedCamera; + if (!e) return a.d.Zero(); + var t = e.getScene().getEngine().getAspectRatio(e), + n = Math.tan(e.fov / 2), + i = n * t; + return new a.d(i, n); + }), + (e.prototype._clearAnimationLocks = function () { + this._betaIsAnimating = !1; + }), + (e.prototype._applyUserInteraction = function () { + this.isUserIsMoving && ((this._lastInteractionTime = be.a.Now), this.stopAllAnimations(), this._clearAnimationLocks()); + }), + (e.prototype.stopAllAnimations = function () { + for (this._attachedCamera && (this._attachedCamera.animations = []); this._animatables.length; ) + this._animatables[0] && ((this._animatables[0].onAnimationEnd = null), this._animatables[0].stop()), this._animatables.shift(); + }), + Object.defineProperty(e.prototype, "isUserIsMoving", { + get: function () { + return ( + !!this._attachedCamera && + (0 !== this._attachedCamera.inertialAlphaOffset || + 0 !== this._attachedCamera.inertialBetaOffset || + 0 !== this._attachedCamera.inertialRadiusOffset || + 0 !== this._attachedCamera.inertialPanningX || + 0 !== this._attachedCamera.inertialPanningY || + this._isPointerDown) + ); + }, + enumerable: !0, + configurable: !0, + }), + (e.EasingFunction = new J()), + (e.EasingMode = X.EASINGMODE_EASEINOUT), + (e.IgnoreBoundsSizeMode = 0), + (e.FitFrustumSidesMode = 1), + e + ); + })(), + Te = function (e, t, n, i) { + void 0 === t && (t = new a.e()), void 0 === n && (n = 0), void 0 === i && (i = !1), (this.direction = e), (this.rotatedDirection = t), (this.diff = n), (this.ignore = i); + }, + Se = (function () { + function e(e) { + (this.ui = e), + (this.name = "AttachToBoxBehavior"), + (this.distanceAwayFromFace = 0.15), + (this.distanceAwayFromBottomOfFace = 0.15), + (this._faceVectors = [new Te(a.e.Up()), new Te(a.e.Down()), new Te(a.e.Left()), new Te(a.e.Right()), new Te(a.e.Forward()), new Te(a.e.Forward().scaleInPlace(-1))]), + (this._tmpMatrix = new a.a()), + (this._tmpVector = new a.e()), + (this._zeroVector = a.e.Zero()), + (this._lookAtTmpMatrix = new a.a()); + } + return ( + (e.prototype.init = function () {}), + (e.prototype._closestFace = function (e) { + var t = this; + return ( + this._faceVectors.forEach(function (n) { + t._target.rotationQuaternion || (t._target.rotationQuaternion = a.b.RotationYawPitchRoll(t._target.rotation.y, t._target.rotation.x, t._target.rotation.z)), + t._target.rotationQuaternion.toRotationMatrix(t._tmpMatrix), + a.e.TransformCoordinatesToRef(n.direction, t._tmpMatrix, n.rotatedDirection), + (n.diff = a.e.GetAngleBetweenVectors(n.rotatedDirection, e, a.e.Cross(n.rotatedDirection, e))); + }), + this._faceVectors.reduce(function (e, t) { + return e.ignore ? t : t.ignore || e.diff < t.diff ? e : t; + }, this._faceVectors[0]) + ); + }), + (e.prototype._lookAtToRef = function (e, t, n) { + void 0 === t && (t = new a.e(0, 1, 0)), a.a.LookAtLHToRef(this._zeroVector, e, t, this._lookAtTmpMatrix), this._lookAtTmpMatrix.invert(), a.b.FromRotationMatrixToRef(this._lookAtTmpMatrix, n); + }), + (e.prototype.attach = function (e) { + var t = this; + (this._target = e), + (this._scene = this._target.getScene()), + (this._onRenderObserver = this._scene.onBeforeRenderObservable.add(function () { + if (t._scene.activeCamera) { + var n = t._scene.activeCamera.position; + t._scene.activeCamera.devicePosition && (n = t._scene.activeCamera.devicePosition); + var i = t._closestFace(n.subtract(e.position)); + t._scene.activeCamera.leftCamera + ? t._scene.activeCamera.leftCamera.computeWorldMatrix().getRotationMatrixToRef(t._tmpMatrix) + : t._scene.activeCamera.computeWorldMatrix().getRotationMatrixToRef(t._tmpMatrix), + a.e.TransformCoordinatesToRef(a.e.Up(), t._tmpMatrix, t._tmpVector), + t._faceVectors.forEach(function (e) { + i.direction.x && e.direction.x && (e.ignore = !0), i.direction.y && e.direction.y && (e.ignore = !0), i.direction.z && e.direction.z && (e.ignore = !0); + }); + var r = t._closestFace(t._tmpVector); + t._faceVectors.forEach(function (e) { + e.ignore = !1; + }), + t.ui.position.copyFrom(e.position), + i.direction.x && (i.rotatedDirection.scaleToRef(e.scaling.x / 2 + t.distanceAwayFromFace, t._tmpVector), t.ui.position.addInPlace(t._tmpVector)), + i.direction.y && (i.rotatedDirection.scaleToRef(e.scaling.y / 2 + t.distanceAwayFromFace, t._tmpVector), t.ui.position.addInPlace(t._tmpVector)), + i.direction.z && (i.rotatedDirection.scaleToRef(e.scaling.z / 2 + t.distanceAwayFromFace, t._tmpVector), t.ui.position.addInPlace(t._tmpVector)), + t.ui.rotationQuaternion || (t.ui.rotationQuaternion = a.b.RotationYawPitchRoll(t.ui.rotation.y, t.ui.rotation.x, t.ui.rotation.z)), + i.rotatedDirection.scaleToRef(-1, t._tmpVector), + t._lookAtToRef(t._tmpVector, r.rotatedDirection, t.ui.rotationQuaternion), + r.direction.x && t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace - e.scaling.x / 2, t._tmpVector), + r.direction.y && t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace - e.scaling.y / 2, t._tmpVector), + r.direction.z && t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace - e.scaling.z / 2, t._tmpVector), + t.ui.position.addInPlace(t._tmpVector); + } + })); + }), + (e.prototype.detach = function () { + this._scene.onBeforeRenderObservable.remove(this._onRenderObserver); + }), + e + ); + })(), + Oe = n(193), + Ee = n(9), + Me = n(58), + Ae = n(81), + Ie = n(153), + De = n(26), + Re = (function () { + function e(e, t, n) { + void 0 === n && (n = Number.MAX_VALUE), (this.origin = e), (this.direction = t), (this.length = n); + } + return ( + (e.prototype.intersectsBoxMinMax = function (t, n, i) { + void 0 === i && (i = 0); + var r, + o, + a, + s, + c = e.TmpVector3[0].copyFromFloats(t.x - i, t.y - i, t.z - i), + l = e.TmpVector3[1].copyFromFloats(n.x + i, n.y + i, n.z + i), + u = 0, + h = Number.MAX_VALUE; + if (Math.abs(this.direction.x) < 1e-7) { + if (this.origin.x < c.x || this.origin.x > l.x) return !1; + } else if (((r = 1 / this.direction.x), (o = (c.x - this.origin.x) * r), (a = (l.x - this.origin.x) * r) === -1 / 0 && (a = 1 / 0), o > a && ((s = o), (o = a), (a = s)), (u = Math.max(o, u)) > (h = Math.min(a, h)))) + return !1; + if (Math.abs(this.direction.y) < 1e-7) { + if (this.origin.y < c.y || this.origin.y > l.y) return !1; + } else if (((r = 1 / this.direction.y), (o = (c.y - this.origin.y) * r), (a = (l.y - this.origin.y) * r) === -1 / 0 && (a = 1 / 0), o > a && ((s = o), (o = a), (a = s)), (u = Math.max(o, u)) > (h = Math.min(a, h)))) + return !1; + if (Math.abs(this.direction.z) < 1e-7) { + if (this.origin.z < c.z || this.origin.z > l.z) return !1; + } else if (((r = 1 / this.direction.z), (o = (c.z - this.origin.z) * r), (a = (l.z - this.origin.z) * r) === -1 / 0 && (a = 1 / 0), o > a && ((s = o), (o = a), (a = s)), (u = Math.max(o, u)) > (h = Math.min(a, h)))) + return !1; + return !0; + }), + (e.prototype.intersectsBox = function (e, t) { + return void 0 === t && (t = 0), this.intersectsBoxMinMax(e.minimum, e.maximum, t); + }), + (e.prototype.intersectsSphere = function (e, t) { + void 0 === t && (t = 0); + var n = e.center.x - this.origin.x, + i = e.center.y - this.origin.y, + r = e.center.z - this.origin.z, + o = n * n + i * i + r * r, + a = e.radius + t, + s = a * a; + if (o <= s) return !0; + var c = n * this.direction.x + i * this.direction.y + r * this.direction.z; + return !(c < 0) && o - c * c <= s; + }), + (e.prototype.intersectsTriangle = function (t, n, i) { + var r = e.TmpVector3[0], + o = e.TmpVector3[1], + s = e.TmpVector3[2], + c = e.TmpVector3[3], + l = e.TmpVector3[4]; + n.subtractToRef(t, r), i.subtractToRef(t, o), a.e.CrossToRef(this.direction, o, s); + var u = a.e.Dot(r, s); + if (0 === u) return null; + var h = 1 / u; + this.origin.subtractToRef(t, c); + var d = a.e.Dot(c, s) * h; + if (d < 0 || d > 1) return null; + a.e.CrossToRef(c, r, l); + var p = a.e.Dot(this.direction, l) * h; + if (p < 0 || d + p > 1) return null; + var f = a.e.Dot(o, l) * h; + return f > this.length ? null : new Ie.a(1 - d - p, d, f); + }), + (e.prototype.intersectsPlane = function (e) { + var t, + n = a.e.Dot(e.normal, this.direction); + if (Math.abs(n) < 9.99999997475243e-7) return null; + var i = a.e.Dot(e.normal, this.origin); + return (t = (-e.d - i) / n) < 0 ? (t < -9.99999997475243e-7 ? null : 0) : t; + }), + (e.prototype.intersectsAxis = function (e, t) { + switch ((void 0 === t && (t = 0), e)) { + case "y": + return (n = (this.origin.y - t) / this.direction.y) > 0 ? null : new a.e(this.origin.x + this.direction.x * -n, t, this.origin.z + this.direction.z * -n); + case "x": + return (n = (this.origin.x - t) / this.direction.x) > 0 ? null : new a.e(t, this.origin.y + this.direction.y * -n, this.origin.z + this.direction.z * -n); + case "z": + var n; + return (n = (this.origin.z - t) / this.direction.z) > 0 ? null : new a.e(this.origin.x + this.direction.x * -n, this.origin.y + this.direction.y * -n, t); + default: + return null; + } + }), + (e.prototype.intersectsMesh = function (t, n) { + var i = a.c.Matrix[0]; + return t.getWorldMatrix().invertToRef(i), this._tmpRay ? e.TransformToRef(this, i, this._tmpRay) : (this._tmpRay = e.Transform(this, i)), t.intersects(this._tmpRay, n); + }), + (e.prototype.intersectsMeshes = function (e, t, n) { + n ? (n.length = 0) : (n = []); + for (var i = 0; i < e.length; i++) { + var r = this.intersectsMesh(e[i], t); + r.hit && n.push(r); + } + return n.sort(this._comparePickingInfo), n; + }), + (e.prototype._comparePickingInfo = function (e, t) { + return e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : 0; + }), + (e.prototype.intersectionSegment = function (t, n, i) { + var r = this.origin, + o = a.c.Vector3[0], + s = a.c.Vector3[1], + c = a.c.Vector3[2], + l = a.c.Vector3[3]; + n.subtractToRef(t, o), this.direction.scaleToRef(e.rayl, c), r.addToRef(c, s), t.subtractToRef(r, l); + var u, + h, + d, + p, + f = a.e.Dot(o, o), + m = a.e.Dot(o, c), + g = a.e.Dot(c, c), + b = a.e.Dot(o, l), + _ = a.e.Dot(c, l), + v = f * g - m * m, + y = v, + C = v; + v < e.smallnum ? ((h = 0), (y = 1), (p = _), (C = g)) : ((p = f * _ - m * b), (h = m * _ - g * b) < 0 ? ((h = 0), (p = _), (C = g)) : h > y && ((h = y), (p = _ + m), (C = g))), + p < 0 ? ((p = 0), -b < 0 ? (h = 0) : -b > f ? (h = y) : ((h = -b), (y = f))) : p > C && ((p = C), -b + m < 0 ? (h = 0) : -b + m > f ? (h = y) : ((h = -b + m), (y = f))), + (u = Math.abs(h) < e.smallnum ? 0 : h / y), + (d = Math.abs(p) < e.smallnum ? 0 : p / C); + var P = a.c.Vector3[4]; + c.scaleToRef(d, P); + var x = a.c.Vector3[5]; + o.scaleToRef(u, x), x.addInPlace(l); + var T = a.c.Vector3[6]; + return x.subtractToRef(P, T), d > 0 && d <= this.length && T.lengthSquared() < i * i ? x.length() : -1; + }), + (e.prototype.update = function (e, t, n, i, r, o, a) { + return this.unprojectRayToRef(e, t, n, i, r, o, a), this; + }), + (e.Zero = function () { + return new e(a.e.Zero(), a.e.Zero()); + }), + (e.CreateNew = function (t, n, i, r, o, a, s) { + return e.Zero().update(t, n, i, r, o, a, s); + }), + (e.CreateNewFromTo = function (t, n, i) { + void 0 === i && (i = a.a.IdentityReadOnly); + var r = n.subtract(t), + o = Math.sqrt(r.x * r.x + r.y * r.y + r.z * r.z); + return r.normalize(), e.Transform(new e(t, r, o), i); + }), + (e.Transform = function (t, n) { + var i = new e(new a.e(0, 0, 0), new a.e(0, 0, 0)); + return e.TransformToRef(t, n, i), i; + }), + (e.TransformToRef = function (e, t, n) { + a.e.TransformCoordinatesToRef(e.origin, t, n.origin), a.e.TransformNormalToRef(e.direction, t, n.direction), (n.length = e.length); + var i = n.direction, + r = i.length(); + if (0 !== r && 1 !== r) { + var o = 1 / r; + (i.x *= o), (i.y *= o), (i.z *= o), (n.length *= r); + } + }), + (e.prototype.unprojectRayToRef = function (e, t, n, i, r, o, s) { + var c = a.c.Matrix[0]; + r.multiplyToRef(o, c), c.multiplyToRef(s, c), c.invert(); + var l = a.c.Vector3[0]; + (l.x = (e / n) * 2 - 1), (l.y = -((t / i) * 2 - 1)), (l.z = -1); + var u = a.c.Vector3[1].copyFromFloats(l.x, l.y, 1), + h = a.c.Vector3[2], + d = a.c.Vector3[3]; + a.e._UnprojectFromInvertedMatrixToRef(l, c, h), a.e._UnprojectFromInvertedMatrixToRef(u, c, d), this.origin.copyFrom(h), d.subtractToRef(h, this.direction), this.direction.normalize(); + }), + (e.TmpVector3 = Me.a.BuildArray(6, a.e.Zero)), + (e.smallnum = 1e-8), + (e.rayl = 1e9), + e + ); + })(); + (ge.a.prototype.createPickingRay = function (e, t, n, i, r) { + void 0 === r && (r = !1); + var o = Re.Zero(); + return this.createPickingRayToRef(e, t, n, o, i, r), o; + }), + (ge.a.prototype.createPickingRayToRef = function (e, t, n, i, r, o) { + void 0 === o && (o = !1); + var s = this.getEngine(); + if (!r) { + if (!this.activeCamera) return this; + r = this.activeCamera; + } + var c = r.viewport.toGlobal(s.getRenderWidth(), s.getRenderHeight()); + return ( + (e = e / s.getHardwareScalingLevel() - c.x), + (t = t / s.getHardwareScalingLevel() - (s.getRenderHeight() - c.y - c.height)), + i.update(e, t, c.width, c.height, n || a.a.IdentityReadOnly, o ? a.a.IdentityReadOnly : r.getViewMatrix(), r.getProjectionMatrix()), + this + ); + }), + (ge.a.prototype.createPickingRayInCameraSpace = function (e, t, n) { + var i = Re.Zero(); + return this.createPickingRayInCameraSpaceToRef(e, t, i, n), i; + }), + (ge.a.prototype.createPickingRayInCameraSpaceToRef = function (e, t, n, i) { + if (!Ae.a) return this; + var r = this.getEngine(); + if (!i) { + if (!this.activeCamera) throw new Error("Active camera not set"); + i = this.activeCamera; + } + var o = i.viewport.toGlobal(r.getRenderWidth(), r.getRenderHeight()), + s = a.a.Identity(); + return (e = e / r.getHardwareScalingLevel() - o.x), (t = t / r.getHardwareScalingLevel() - (r.getRenderHeight() - o.y - o.height)), n.update(e, t, o.width, o.height, s, s, i.getProjectionMatrix()), this; + }), + (ge.a.prototype._internalPick = function (e, t, n, i) { + if (!Ae.a) return null; + for (var r = null, o = 0; o < this.meshes.length; o++) { + var a = this.meshes[o]; + if (t) { + if (!t(a)) continue; + } else if (!a.isEnabled() || !a.isVisible || !a.isPickable) continue; + var s = e(a.getWorldMatrix()), + c = a.intersects(s, n, i); + if (c && c.hit && (n || null == r || !(c.distance >= r.distance)) && ((r = c), n)) break; + } + return r || new Ae.a(); + }), + (ge.a.prototype._internalMultiPick = function (e, t, n) { + if (!Ae.a) return null; + for (var i = new Array(), r = 0; r < this.meshes.length; r++) { + var o = this.meshes[r]; + if (t) { + if (!t(o)) continue; + } else if (!o.isEnabled() || !o.isVisible || !o.isPickable) continue; + var a = e(o.getWorldMatrix()), + s = o.intersects(a, !1, n); + s && s.hit && i.push(s); + } + return i; + }), + (ge.a.prototype.pick = function (e, t, n, i, r, o) { + var s = this; + if (!Ae.a) return null; + var c = this._internalPick( + function (n) { + return s._tempPickingRay || (s._tempPickingRay = Re.Zero()), s.createPickingRayToRef(e, t, n, s._tempPickingRay, r || null), s._tempPickingRay; + }, + n, + i, + o + ); + return c && (c.ray = this.createPickingRay(e, t, a.a.Identity(), r || null)), c; + }), + (ge.a.prototype.pickWithRay = function (e, t, n, i) { + var r = this, + o = this._internalPick( + function (t) { + return ( + r._pickWithRayInverseMatrix || (r._pickWithRayInverseMatrix = a.a.Identity()), + t.invertToRef(r._pickWithRayInverseMatrix), + r._cachedRayForTransform || (r._cachedRayForTransform = Re.Zero()), + Re.TransformToRef(e, r._pickWithRayInverseMatrix, r._cachedRayForTransform), + r._cachedRayForTransform + ); + }, + t, + n, + i + ); + return o && (o.ray = e), o; + }), + (ge.a.prototype.multiPick = function (e, t, n, i, r) { + var o = this; + return this._internalMultiPick( + function (n) { + return o.createPickingRay(e, t, n, i || null); + }, + n, + r + ); + }), + (ge.a.prototype.multiPickWithRay = function (e, t, n) { + var i = this; + return this._internalMultiPick( + function (t) { + return ( + i._pickWithRayInverseMatrix || (i._pickWithRayInverseMatrix = a.a.Identity()), + t.invertToRef(i._pickWithRayInverseMatrix), + i._cachedRayForTransform || (i._cachedRayForTransform = Re.Zero()), + Re.TransformToRef(e, i._pickWithRayInverseMatrix, i._cachedRayForTransform), + i._cachedRayForTransform + ); + }, + t, + n + ); + }), + (De.a.prototype.getForwardRay = function (e, t, n) { + void 0 === e && (e = 100), t || (t = this.getWorldMatrix()), n || (n = this.position); + var i = this._scene.useRightHandedSystem ? new a.e(0, 0, -1) : new a.e(0, 0, 1), + r = a.e.TransformNormal(i, t), + o = a.e.Normalize(r); + return new Re(n, o, e); + }); + var we = (function () { + function e() {} + return ( + (e._RemoveAndStorePivotPoint = function (t) { + t && + 0 === e._PivotCached && + (t.getPivotPointToRef(e._OldPivotPoint), + e._OldPivotPoint.equalsToFloats(0, 0, 0) || + (t.setPivotMatrix(a.a.IdentityReadOnly), + e._OldPivotPoint.subtractToRef(t.getPivotPoint(), e._PivotTranslation), + e._PivotTmpVector.copyFromFloats(1, 1, 1), + e._PivotTmpVector.subtractInPlace(t.scaling), + e._PivotTmpVector.multiplyInPlace(e._PivotTranslation), + t.position.addInPlace(e._PivotTmpVector))), + e._PivotCached++; + }), + (e._RestorePivotPoint = function (t) { + t && + !e._OldPivotPoint.equalsToFloats(0, 0, 0) && + 1 === e._PivotCached && + (t.setPivotPoint(e._OldPivotPoint), + e._PivotTmpVector.copyFromFloats(1, 1, 1), + e._PivotTmpVector.subtractInPlace(t.scaling), + e._PivotTmpVector.multiplyInPlace(e._PivotTranslation), + t.position.subtractInPlace(e._PivotTmpVector)), + this._PivotCached--; + }), + (e._PivotCached = 0), + (e._OldPivotPoint = new a.e()), + (e._PivotTranslation = new a.e()), + (e._PivotTmpVector = new a.e()), + e + ); + })(), + Le = n(111), + Fe = (function () { + function e(e) { + (this._useAlternatePickedPointAboveMaxDragAngleDragSpeed = -1.1), + (this.maxDragAngle = 0), + (this._useAlternatePickedPointAboveMaxDragAngle = !1), + (this.currentDraggingPointerID = -1), + (this.dragging = !1), + (this.dragDeltaRatio = 0.2), + (this.updateDragPlane = !0), + (this._debugMode = !1), + (this._moving = !1), + (this.onDragObservable = new o.c()), + (this.onDragStartObservable = new o.c()), + (this.onDragEndObservable = new o.c()), + (this.moveAttached = !0), + (this.enabled = !0), + (this.startAndReleaseDragOnPointerEvents = !0), + (this.detachCameraControls = !0), + (this.useObjectOrientationForDragging = !0), + (this.validateDrag = function (e) { + return !0; + }), + (this._tmpVector = new a.e(0, 0, 0)), + (this._alternatePickedPoint = new a.e(0, 0, 0)), + (this._worldDragAxis = new a.e(0, 0, 0)), + (this._targetPosition = new a.e(0, 0, 0)), + (this._attachedElement = null), + (this._startDragRay = new Re(new a.e(), new a.e())), + (this._lastPointerRay = {}), + (this._dragDelta = new a.e()), + (this._pointA = new a.e(0, 0, 0)), + (this._pointB = new a.e(0, 0, 0)), + (this._pointC = new a.e(0, 0, 0)), + (this._lineA = new a.e(0, 0, 0)), + (this._lineB = new a.e(0, 0, 0)), + (this._localAxis = new a.e(0, 0, 0)), + (this._lookAt = new a.e(0, 0, 0)), + (this._options = e || {}); + var t = 0; + if ((this._options.dragAxis && t++, this._options.dragPlaneNormal && t++, t > 1)) throw "Multiple drag modes specified in dragBehavior options. Only one expected"; + } + return ( + Object.defineProperty(e.prototype, "options", { + get: function () { + return this._options; + }, + set: function (e) { + this._options = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "name", { + get: function () { + return "PointerDrag"; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype.attach = function (t, n) { + var i = this; + (this._scene = t.getScene()), + (this.attachedNode = t), + e._planeScene || + (this._debugMode + ? (e._planeScene = this._scene) + : ((e._planeScene = new ge.a(this._scene.getEngine(), { virtual: !0 })), + e._planeScene.detachControl(), + this._scene.onDisposeObservable.addOnce(function () { + e._planeScene.dispose(), (e._planeScene = null); + }))), + (this._dragPlane = Ee.a.CreatePlane("pointerDragPlane", this._debugMode ? 1 : 1e4, e._planeScene, !1, Ee.a.DOUBLESIDE)), + (this.lastDragPosition = new a.e(0, 0, 0)); + var r = + n || + function (e) { + return i.attachedNode == e || e.isDescendantOf(i.attachedNode); + }; + (this._pointerObserver = this._scene.onPointerObservable.add(function (t, n) { + if (i.enabled) + if (t.type == ye.a.POINTERDOWN) + i.startAndReleaseDragOnPointerEvents && + !i.dragging && + t.pickInfo && + t.pickInfo.hit && + t.pickInfo.pickedMesh && + t.pickInfo.pickedPoint && + t.pickInfo.ray && + r(t.pickInfo.pickedMesh) && + i._startDrag(t.event.pointerId, t.pickInfo.ray, t.pickInfo.pickedPoint); + else if (t.type == ye.a.POINTERUP) i.startAndReleaseDragOnPointerEvents && i.currentDraggingPointerID == t.event.pointerId && i.releaseDrag(); + else if (t.type == ye.a.POINTERMOVE) { + var o = t.event.pointerId; + i.currentDraggingPointerID === e._AnyMouseID && + o !== e._AnyMouseID && + "mouse" == t.event.pointerType && + (i._lastPointerRay[i.currentDraggingPointerID] && ((i._lastPointerRay[o] = i._lastPointerRay[i.currentDraggingPointerID]), delete i._lastPointerRay[i.currentDraggingPointerID]), + (i.currentDraggingPointerID = o)), + i._lastPointerRay[o] || (i._lastPointerRay[o] = new Re(new a.e(), new a.e())), + t.pickInfo && + t.pickInfo.ray && + (i._lastPointerRay[o].origin.copyFrom(t.pickInfo.ray.origin), + i._lastPointerRay[o].direction.copyFrom(t.pickInfo.ray.direction), + i.currentDraggingPointerID == o && i.dragging && i._moveDrag(t.pickInfo.ray)); + } + })), + (this._beforeRenderObserver = this._scene.onBeforeRenderObservable.add(function () { + i._moving && + i.moveAttached && + (we._RemoveAndStorePivotPoint(i.attachedNode), + i._targetPosition.subtractToRef(i.attachedNode.absolutePosition, i._tmpVector), + i._tmpVector.scaleInPlace(i.dragDeltaRatio), + i.attachedNode.getAbsolutePosition().addToRef(i._tmpVector, i._tmpVector), + i.validateDrag(i._tmpVector) && i.attachedNode.setAbsolutePosition(i._tmpVector), + we._RestorePivotPoint(i.attachedNode)); + })); + }), + (e.prototype.releaseDrag = function () { + this.dragging && (this.onDragEndObservable.notifyObservers({ dragPlanePoint: this.lastDragPosition, pointerId: this.currentDraggingPointerID }), (this.dragging = !1)), + (this.currentDraggingPointerID = -1), + (this._moving = !1), + this.detachCameraControls && + this._attachedElement && + this._scene.activeCamera && + !this._scene.activeCamera.leftCamera && + this._scene.activeCamera.attachControl(this._attachedElement, !this._scene.activeCamera.inputs || this._scene.activeCamera.inputs.noPreventDefault); + }), + (e.prototype.startDrag = function (t, n, i) { + void 0 === t && (t = e._AnyMouseID), this._startDrag(t, n, i); + var r = this._lastPointerRay[t]; + t === e._AnyMouseID && (r = this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]), r && this._moveDrag(r); + }), + (e.prototype._startDrag = function (e, t, n) { + if (this._scene.activeCamera && !this.dragging && this.attachedNode) { + we._RemoveAndStorePivotPoint(this.attachedNode), + t + ? (this._startDragRay.direction.copyFrom(t.direction), this._startDragRay.origin.copyFrom(t.origin)) + : (this._startDragRay.origin.copyFrom(this._scene.activeCamera.position), + this.attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector), + this._tmpVector.subtractToRef(this._scene.activeCamera.position, this._startDragRay.direction)), + this._updateDragPlanePosition(this._startDragRay, n || this._tmpVector); + var i = this._pickWithRayOnDragPlane(this._startDragRay); + i && + ((this.dragging = !0), + (this.currentDraggingPointerID = e), + this.lastDragPosition.copyFrom(i), + this.onDragStartObservable.notifyObservers({ dragPlanePoint: i, pointerId: this.currentDraggingPointerID }), + this._targetPosition.copyFrom(this.attachedNode.absolutePosition), + this.detachCameraControls && + this._scene.activeCamera && + this._scene.activeCamera.inputs && + !this._scene.activeCamera.leftCamera && + (this._scene.activeCamera.inputs.attachedElement + ? ((this._attachedElement = this._scene.activeCamera.inputs.attachedElement), this._scene.activeCamera.detachControl(this._scene.activeCamera.inputs.attachedElement)) + : (this._attachedElement = null))), + we._RestorePivotPoint(this.attachedNode); + } + }), + (e.prototype._moveDrag = function (e) { + this._moving = !0; + var t = this._pickWithRayOnDragPlane(e); + if (t) { + this.updateDragPlane && this._updateDragPlanePosition(e, t); + var n = 0; + this._options.dragAxis + ? (this.useObjectOrientationForDragging + ? a.e.TransformCoordinatesToRef(this._options.dragAxis, this.attachedNode.getWorldMatrix().getRotationMatrix(), this._worldDragAxis) + : this._worldDragAxis.copyFrom(this._options.dragAxis), + t.subtractToRef(this.lastDragPosition, this._tmpVector), + (n = a.e.Dot(this._tmpVector, this._worldDragAxis)), + this._worldDragAxis.scaleToRef(n, this._dragDelta)) + : ((n = this._dragDelta.length()), t.subtractToRef(this.lastDragPosition, this._dragDelta)), + this._targetPosition.addInPlace(this._dragDelta), + this.onDragObservable.notifyObservers({ dragDistance: n, delta: this._dragDelta, dragPlanePoint: t, dragPlaneNormal: this._dragPlane.forward, pointerId: this.currentDraggingPointerID }), + this.lastDragPosition.copyFrom(t); + } + }), + (e.prototype._pickWithRayOnDragPlane = function (t) { + var n = this; + if (!t) return null; + var i = Math.acos(a.e.Dot(this._dragPlane.forward, t.direction)); + if ((i > Math.PI / 2 && (i = Math.PI - i), this.maxDragAngle > 0 && i > this.maxDragAngle)) { + if (this._useAlternatePickedPointAboveMaxDragAngle) { + this._tmpVector.copyFrom(t.direction), + this.attachedNode.absolutePosition.subtractToRef(t.origin, this._alternatePickedPoint), + this._alternatePickedPoint.normalize(), + this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed * a.e.Dot(this._alternatePickedPoint, this._tmpVector)), + this._tmpVector.addInPlace(this._alternatePickedPoint); + var r = a.e.Dot(this._dragPlane.forward, this._tmpVector); + return ( + this._dragPlane.forward.scaleToRef(-r, this._alternatePickedPoint), + this._alternatePickedPoint.addInPlace(this._tmpVector), + this._alternatePickedPoint.addInPlace(this.attachedNode.absolutePosition), + this._alternatePickedPoint + ); + } + return null; + } + var o = e._planeScene.pickWithRay(t, function (e) { + return e == n._dragPlane; + }); + return o && o.hit && o.pickedMesh && o.pickedPoint ? o.pickedPoint : null; + }), + (e.prototype._updateDragPlanePosition = function (e, t) { + this._pointA.copyFrom(t), + this._options.dragAxis + ? (this.useObjectOrientationForDragging + ? a.e.TransformCoordinatesToRef(this._options.dragAxis, this.attachedNode.getWorldMatrix().getRotationMatrix(), this._localAxis) + : this._localAxis.copyFrom(this._options.dragAxis), + this._pointA.addToRef(this._localAxis, this._pointB), + e.origin.subtractToRef(this._pointA, this._pointC), + this._pointA.addToRef(this._pointC.normalize(), this._pointC), + this._pointB.subtractToRef(this._pointA, this._lineA), + this._pointC.subtractToRef(this._pointA, this._lineB), + a.e.CrossToRef(this._lineA, this._lineB, this._lookAt), + a.e.CrossToRef(this._lineA, this._lookAt, this._lookAt), + this._lookAt.normalize(), + this._dragPlane.position.copyFrom(this._pointA), + this._pointA.addToRef(this._lookAt, this._lookAt), + this._dragPlane.lookAt(this._lookAt)) + : this._options.dragPlaneNormal + ? (this.useObjectOrientationForDragging + ? a.e.TransformCoordinatesToRef(this._options.dragPlaneNormal, this.attachedNode.getWorldMatrix().getRotationMatrix(), this._localAxis) + : this._localAxis.copyFrom(this._options.dragPlaneNormal), + this._dragPlane.position.copyFrom(this._pointA), + this._pointA.addToRef(this._localAxis, this._lookAt), + this._dragPlane.lookAt(this._lookAt)) + : (this._dragPlane.position.copyFrom(this._pointA), this._dragPlane.lookAt(e.origin)), + this._dragPlane.position.copyFrom(this.attachedNode.absolutePosition), + this._dragPlane.computeWorldMatrix(!0); + }), + (e.prototype.detach = function () { + this._pointerObserver && this._scene.onPointerObservable.remove(this._pointerObserver), this._beforeRenderObserver && this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver), this.releaseDrag(); + }), + (e._AnyMouseID = -2), + e + ); + })(), + Ne = (function () { + function e() { + (this._startDistance = 0), + (this._initialScale = new a.e(0, 0, 0)), + (this._targetScale = new a.e(0, 0, 0)), + (this._sceneRenderObserver = null), + (this._dragBehaviorA = new Fe({})), + (this._dragBehaviorA.moveAttached = !1), + (this._dragBehaviorB = new Fe({})), + (this._dragBehaviorB.moveAttached = !1); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "MultiPointerScale"; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype._getCurrentDistance = function () { + return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length(); + }), + (e.prototype.attach = function (e) { + var t = this; + (this._ownerNode = e), + this._dragBehaviorA.onDragStartObservable.add(function (n) { + t._dragBehaviorA.dragging && + t._dragBehaviorB.dragging && + (t._dragBehaviorA.currentDraggingPointerID == t._dragBehaviorB.currentDraggingPointerID + ? t._dragBehaviorA.releaseDrag() + : (t._initialScale.copyFrom(e.scaling), (t._startDistance = t._getCurrentDistance()))); + }), + this._dragBehaviorB.onDragStartObservable.add(function (n) { + t._dragBehaviorA.dragging && + t._dragBehaviorB.dragging && + (t._dragBehaviorA.currentDraggingPointerID == t._dragBehaviorB.currentDraggingPointerID + ? t._dragBehaviorB.releaseDrag() + : (t._initialScale.copyFrom(e.scaling), (t._startDistance = t._getCurrentDistance()))); + }), + [this._dragBehaviorA, this._dragBehaviorB].forEach(function (e) { + e.onDragObservable.add(function () { + if (t._dragBehaviorA.dragging && t._dragBehaviorB.dragging) { + var e = t._getCurrentDistance() / t._startDistance; + t._initialScale.scaleToRef(e, t._targetScale); + } + }); + }), + e.addBehavior(this._dragBehaviorA), + e.addBehavior(this._dragBehaviorB), + (this._sceneRenderObserver = e.getScene().onBeforeRenderObservable.add(function () { + if (t._dragBehaviorA.dragging && t._dragBehaviorB.dragging) { + var n = t._targetScale.subtract(e.scaling).scaleInPlace(0.1); + n.length() > 0.01 && e.scaling.addInPlace(n); + } + })); + }), + (e.prototype.detach = function () { + var e = this; + this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver), + [this._dragBehaviorA, this._dragBehaviorB].forEach(function (t) { + t.onDragStartObservable.clear(), t.onDragObservable.clear(), e._ownerNode.removeBehavior(t); + }); + }), + e + ); + })(), + ke = n(31), + ze = (function () { + function e() { + (this._sceneRenderObserver = null), + (this._targetPosition = new a.e(0, 0, 0)), + (this._moving = !1), + (this._startingOrientation = new a.b()), + (this.zDragFactor = 3), + (this.rotateDraggedObject = !0), + (this.dragging = !1), + (this.dragDeltaRatio = 0.2), + (this.currentDraggingPointerID = -1), + (this.detachCameraControls = !0), + (this.onDragStartObservable = new o.c()), + (this.onDragEndObservable = new o.c()); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "SixDofDrag"; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + Object.defineProperty(e.prototype, "_pointerCamera", { + get: function () { + return this._scene.cameraToUseForPointers ? this._scene.cameraToUseForPointers : this._scene.activeCamera; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attach = function (t) { + var n = this; + (this._ownerNode = t), (this._scene = this._ownerNode.getScene()), e._virtualScene || ((e._virtualScene = new ge.a(this._scene.getEngine())), e._virtualScene.detachControl(), this._scene.getEngine().scenes.pop()); + var i = null, + r = new a.e(0, 0, 0); + (this._virtualOriginMesh = new ke.a("", e._virtualScene)), + (this._virtualOriginMesh.rotationQuaternion = new a.b()), + (this._virtualDragMesh = new ke.a("", e._virtualScene)), + (this._virtualDragMesh.rotationQuaternion = new a.b()); + var o = null; + this._pointerObserver = this._scene.onPointerObservable.add(function (e, t) { + if (e.type == ye.a.POINTERDOWN) { + if (!n.dragging && e.pickInfo && e.pickInfo.hit && e.pickInfo.pickedMesh && e.pickInfo.ray && ((h = e.pickInfo.pickedMesh), n._ownerNode == h || h.isDescendantOf(n._ownerNode))) { + n._pointerCamera && n._pointerCamera.cameraRigMode == De.a.RIG_MODE_NONE && e.pickInfo.ray.origin.copyFrom(n._pointerCamera.globalPosition), + (i = n._ownerNode), + we._RemoveAndStorePivotPoint(i), + r.copyFrom(e.pickInfo.ray.origin), + n._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin), + n._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.add(e.pickInfo.ray.direction)), + n._virtualOriginMesh.removeChild(n._virtualDragMesh), + i.computeWorldMatrix(), + n._virtualDragMesh.position.copyFrom(i.absolutePosition), + i.rotationQuaternion || (i.rotationQuaternion = a.b.RotationYawPitchRoll(i.rotation.y, i.rotation.x, i.rotation.z)); + var s = i.parent; + i.setParent(null), + n._virtualDragMesh.rotationQuaternion.copyFrom(i.rotationQuaternion), + i.setParent(s), + n._virtualOriginMesh.addChild(n._virtualDragMesh), + n._targetPosition.copyFrom(n._virtualDragMesh.absolutePosition), + (n.dragging = !0), + (n.currentDraggingPointerID = e.event.pointerId), + n.detachCameraControls && + n._pointerCamera && + !n._pointerCamera.leftCamera && + (n._pointerCamera.inputs.attachedElement ? ((o = n._pointerCamera.inputs.attachedElement), n._pointerCamera.detachControl(n._pointerCamera.inputs.attachedElement)) : (o = null)), + we._RestorePivotPoint(i), + n.onDragStartObservable.notifyObservers({}); + } + } else if (e.type == ye.a.POINTERUP) + n.currentDraggingPointerID == e.event.pointerId && + ((n.dragging = !1), + (n._moving = !1), + (n.currentDraggingPointerID = -1), + (i = null), + n._virtualOriginMesh.removeChild(n._virtualDragMesh), + n.detachCameraControls && o && n._pointerCamera && !n._pointerCamera.leftCamera && n._pointerCamera.attachControl(o, !0), + n.onDragEndObservable.notifyObservers({})); + else if (e.type == ye.a.POINTERMOVE && n.currentDraggingPointerID == e.event.pointerId && n.dragging && e.pickInfo && e.pickInfo.ray && i) { + var c = n.zDragFactor; + n._pointerCamera && n._pointerCamera.cameraRigMode == De.a.RIG_MODE_NONE && (e.pickInfo.ray.origin.copyFrom(n._pointerCamera.globalPosition), (c = 0)); + var l = e.pickInfo.ray.origin.subtract(r); + r.copyFrom(e.pickInfo.ray.origin); + var u = -a.e.Dot(l, e.pickInfo.ray.direction); + n._virtualOriginMesh.addChild(n._virtualDragMesh), + (n._virtualDragMesh.position.z -= n._virtualDragMesh.position.z < 1 ? u * n.zDragFactor : u * c * n._virtualDragMesh.position.z), + n._virtualDragMesh.position.z < 0 && (n._virtualDragMesh.position.z = 0), + n._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin), + n._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.add(e.pickInfo.ray.direction)), + n._virtualOriginMesh.removeChild(n._virtualDragMesh), + n._targetPosition.copyFrom(n._virtualDragMesh.absolutePosition), + i.parent && a.e.TransformCoordinatesToRef(n._targetPosition, a.a.Invert(i.parent.getWorldMatrix()), n._targetPosition), + n._moving || n._startingOrientation.copyFrom(n._virtualDragMesh.rotationQuaternion), + (n._moving = !0); + } + var h; + }); + var s = new a.b(); + this._sceneRenderObserver = t.getScene().onBeforeRenderObservable.add(function () { + if (n.dragging && n._moving && i) { + if ((we._RemoveAndStorePivotPoint(i), i.position.addInPlace(n._targetPosition.subtract(i.position).scale(n.dragDeltaRatio)), n.rotateDraggedObject)) { + s.copyFrom(n._startingOrientation), + (s.x = -s.x), + (s.y = -s.y), + (s.z = -s.z), + n._virtualDragMesh.rotationQuaternion.multiplyToRef(s, s), + a.b.RotationYawPitchRollToRef(s.toEulerAngles("xyz").y, 0, 0, s), + s.multiplyToRef(n._startingOrientation, s); + var e = i.parent; + (!e || (e.scaling && !e.scaling.isNonUniformWithinEpsilon(0.001))) && (i.setParent(null), a.b.SlerpToRef(i.rotationQuaternion, s, n.dragDeltaRatio, i.rotationQuaternion), i.setParent(e)); + } + we._RestorePivotPoint(i); + } + }); + }), + (e.prototype.detach = function () { + this._scene && this._scene.onPointerObservable.remove(this._pointerObserver), + this._ownerNode && this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver), + this._virtualOriginMesh && this._virtualOriginMesh.dispose(), + this._virtualDragMesh && this._virtualDragMesh.dispose(), + this.onDragEndObservable.clear(), + this.onDragStartObservable.clear(); + }), + e + ); + })(), + je = n(110), + Be = n(23), + Ve = (function () { + function e(e, t, n) { + if ( + ((this.targetPosition = a.e.Zero()), + (this.poleTargetPosition = a.e.Zero()), + (this.poleTargetLocalOffset = a.e.Zero()), + (this.poleAngle = 0), + (this.slerpAmount = 1), + (this._bone1Quat = a.b.Identity()), + (this._bone1Mat = a.a.Identity()), + (this._bone2Ang = Math.PI), + (this._maxAngle = Math.PI), + (this._rightHandedSystem = !1), + (this._bendAxis = a.e.Right()), + (this._slerping = !1), + (this._adjustRoll = 0), + (this._bone2 = t), + (this._bone1 = t.getParent()), + this._bone1) + ) { + this.mesh = e; + var i = t.getPosition(); + if ( + (t.getAbsoluteTransform().determinant() > 0 && + ((this._rightHandedSystem = !0), (this._bendAxis.x = 0), (this._bendAxis.y = 0), (this._bendAxis.z = -1), i.x > i.y && i.x > i.z && ((this._adjustRoll = 0.5 * Math.PI), (this._bendAxis.z = 1))), + this._bone1.length) + ) { + var r = this._bone1.getScale(), + o = this._bone2.getScale(); + (this._bone1Length = this._bone1.length * r.y * this.mesh.scaling.y), (this._bone2Length = this._bone2.length * o.y * this.mesh.scaling.y); + } else if (this._bone1.children[0]) { + e.computeWorldMatrix(!0); + var s = this._bone2.children[0].getAbsolutePosition(e), + c = this._bone2.getAbsolutePosition(e), + l = this._bone1.getAbsolutePosition(e); + (this._bone1Length = a.e.Distance(s, c)), (this._bone2Length = a.e.Distance(c, l)); + } + this._bone1.getRotationMatrixToRef(Be.b.WORLD, e, this._bone1Mat), + (this.maxAngle = Math.PI), + n && + (n.targetMesh && ((this.targetMesh = n.targetMesh), this.targetMesh.computeWorldMatrix(!0)), + n.poleTargetMesh + ? ((this.poleTargetMesh = n.poleTargetMesh), this.poleTargetMesh.computeWorldMatrix(!0)) + : n.poleTargetBone + ? (this.poleTargetBone = n.poleTargetBone) + : this._bone1.getParent() && (this.poleTargetBone = this._bone1.getParent()), + n.poleTargetLocalOffset && this.poleTargetLocalOffset.copyFrom(n.poleTargetLocalOffset), + n.poleAngle && (this.poleAngle = n.poleAngle), + n.bendAxis && this._bendAxis.copyFrom(n.bendAxis), + n.maxAngle && (this.maxAngle = n.maxAngle), + n.slerpAmount && (this.slerpAmount = n.slerpAmount)); + } + } + return ( + Object.defineProperty(e.prototype, "maxAngle", { + get: function () { + return this._maxAngle; + }, + set: function (e) { + this._setMaxAngle(e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._setMaxAngle = function (e) { + e < 0 && (e = 0), (e > Math.PI || null == e) && (e = Math.PI), (this._maxAngle = e); + var t = this._bone1Length, + n = this._bone2Length; + this._maxReach = Math.sqrt(t * t + n * n - 2 * t * n * Math.cos(e)); + }), + (e.prototype.update = function () { + var t = this._bone1; + if (t) { + var n = this.targetPosition, + i = this.poleTargetPosition, + r = e._tmpMats[0], + o = e._tmpMats[1]; + this.targetMesh && n.copyFrom(this.targetMesh.getAbsolutePosition()), + this.poleTargetBone + ? this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset, this.mesh, i) + : this.poleTargetMesh && a.e.TransformCoordinatesToRef(this.poleTargetLocalOffset, this.poleTargetMesh.getWorldMatrix(), i); + var s = e._tmpVecs[0], + c = e._tmpVecs[1], + l = e._tmpVecs[2], + u = e._tmpVecs[3], + h = e._tmpVecs[4], + d = e._tmpQuat; + t.getAbsolutePositionToRef(this.mesh, s), + i.subtractToRef(s, h), + 0 == h.x && 0 == h.y && 0 == h.z ? (h.y = 1) : h.normalize(), + n.subtractToRef(s, u), + u.normalize(), + a.e.CrossToRef(u, h, c), + c.normalize(), + a.e.CrossToRef(u, c, l), + l.normalize(), + a.a.FromXYZAxesToRef(l, u, c, r); + var p = this._bone1Length, + f = this._bone2Length, + m = a.e.Distance(s, n); + this._maxReach > 0 && (m = Math.min(this._maxReach, m)); + var g = (f * f + m * m - p * p) / (2 * f * m), + b = (m * m + p * p - f * f) / (2 * m * p); + g > 1 && (g = 1), b > 1 && (b = 1), g < -1 && (g = -1), b < -1 && (b = -1); + var _ = Math.acos(g), + v = Math.acos(b), + y = -_ - v; + if (this._rightHandedSystem) a.a.RotationYawPitchRollToRef(0, 0, this._adjustRoll, o), o.multiplyToRef(r, r), a.a.RotationAxisToRef(this._bendAxis, v, o), o.multiplyToRef(r, r); + else { + var C = e._tmpVecs[5]; + C.copyFrom(this._bendAxis), (C.x *= -1), a.a.RotationAxisToRef(C, -v, o), o.multiplyToRef(r, r); + } + this.poleAngle && (a.a.RotationAxisToRef(u, this.poleAngle, o), r.multiplyToRef(o, r)), + this._bone1 && + (this.slerpAmount < 1 + ? (this._slerping || a.b.FromRotationMatrixToRef(this._bone1Mat, this._bone1Quat), + a.b.FromRotationMatrixToRef(r, d), + a.b.SlerpToRef(this._bone1Quat, d, this.slerpAmount, this._bone1Quat), + (y = this._bone2Ang * (1 - this.slerpAmount) + y * this.slerpAmount), + this._bone1.setRotationQuaternion(this._bone1Quat, Be.b.WORLD, this.mesh), + (this._slerping = !0)) + : (this._bone1.setRotationMatrix(r, Be.b.WORLD, this.mesh), this._bone1Mat.copyFrom(r), (this._slerping = !1))), + this._bone2.setAxisAngle(this._bendAxis, y, Be.b.LOCAL), + (this._bone2Ang = y); + } + }), + (e._tmpVecs = [a.e.Zero(), a.e.Zero(), a.e.Zero(), a.e.Zero(), a.e.Zero(), a.e.Zero()]), + (e._tmpQuat = a.b.Identity()), + (e._tmpMats = [a.a.Identity(), a.a.Identity()]), + e + ); + })(), + Ge = (function () { + function e(e, t, n, i) { + if ( + ((this.upAxis = a.e.Up()), + (this.upAxisSpace = Be.b.LOCAL), + (this.adjustYaw = 0), + (this.adjustPitch = 0), + (this.adjustRoll = 0), + (this.slerpAmount = 1), + (this._boneQuat = a.b.Identity()), + (this._slerping = !1), + (this._firstFrameSkipped = !1), + (this._fowardAxis = a.e.Forward()), + (this.mesh = e), + (this.bone = t), + (this.target = n), + i && + (i.adjustYaw && (this.adjustYaw = i.adjustYaw), + i.adjustPitch && (this.adjustPitch = i.adjustPitch), + i.adjustRoll && (this.adjustRoll = i.adjustRoll), + null != i.maxYaw ? (this.maxYaw = i.maxYaw) : (this.maxYaw = Math.PI), + null != i.minYaw ? (this.minYaw = i.minYaw) : (this.minYaw = -Math.PI), + null != i.maxPitch ? (this.maxPitch = i.maxPitch) : (this.maxPitch = Math.PI), + null != i.minPitch ? (this.minPitch = i.minPitch) : (this.minPitch = -Math.PI), + null != i.slerpAmount && (this.slerpAmount = i.slerpAmount), + null != i.upAxis && (this.upAxis = i.upAxis), + null != i.upAxisSpace && (this.upAxisSpace = i.upAxisSpace), + null != i.yawAxis || null != i.pitchAxis)) + ) { + var r = Be.a.Y, + o = Be.a.X; + null != i.yawAxis && (r = i.yawAxis.clone()).normalize(), null != i.pitchAxis && (o = i.pitchAxis.clone()).normalize(); + var s = a.e.Cross(o, r); + (this._transformYawPitch = a.a.Identity()), a.a.FromXYZAxesToRef(o, r, s, this._transformYawPitch), (this._transformYawPitchInv = this._transformYawPitch.clone()), this._transformYawPitch.invert(); + } + t.getParent() || this.upAxisSpace != Be.b.BONE || (this.upAxisSpace = Be.b.LOCAL); + } + return ( + Object.defineProperty(e.prototype, "minYaw", { + get: function () { + return this._minYaw; + }, + set: function (e) { + (this._minYaw = e), + (this._minYawSin = Math.sin(e)), + (this._minYawCos = Math.cos(e)), + null != this._maxYaw && ((this._midYawConstraint = 0.5 * this._getAngleDiff(this._minYaw, this._maxYaw) + this._minYaw), (this._yawRange = this._maxYaw - this._minYaw)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "maxYaw", { + get: function () { + return this._maxYaw; + }, + set: function (e) { + (this._maxYaw = e), + (this._maxYawSin = Math.sin(e)), + (this._maxYawCos = Math.cos(e)), + null != this._minYaw && ((this._midYawConstraint = 0.5 * this._getAngleDiff(this._minYaw, this._maxYaw) + this._minYaw), (this._yawRange = this._maxYaw - this._minYaw)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "minPitch", { + get: function () { + return this._minPitch; + }, + set: function (e) { + (this._minPitch = e), (this._minPitchTan = Math.tan(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "maxPitch", { + get: function () { + return this._maxPitch; + }, + set: function (e) { + (this._maxPitch = e), (this._maxPitchTan = Math.tan(e)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.update = function () { + if (this.slerpAmount < 1 && !this._firstFrameSkipped) this._firstFrameSkipped = !0; + else { + var t = this.bone, + n = e._tmpVecs[0]; + t.getAbsolutePositionToRef(this.mesh, n); + var i = this.target, + r = e._tmpMats[0], + o = e._tmpMats[1], + s = this.mesh, + c = t.getParent(), + l = e._tmpVecs[1]; + l.copyFrom(this.upAxis), + this.upAxisSpace == Be.b.BONE && c + ? (this._transformYawPitch && a.e.TransformCoordinatesToRef(l, this._transformYawPitchInv, l), c.getDirectionToRef(l, this.mesh, l)) + : this.upAxisSpace == Be.b.LOCAL && (s.getDirectionToRef(l, l), (1 == s.scaling.x && 1 == s.scaling.y && 1 == s.scaling.z) || l.normalize()); + var u = !1, + h = !1; + if (((this._maxYaw == Math.PI && this._minYaw == -Math.PI) || (u = !0), (this._maxPitch == Math.PI && this._minPitch == -Math.PI) || (h = !0), u || h)) { + var d = e._tmpMats[2], + p = e._tmpMats[3]; + if (this.upAxisSpace == Be.b.BONE && 1 == l.y && c) c.getRotationMatrixToRef(Be.b.WORLD, this.mesh, d); + else if (this.upAxisSpace != Be.b.LOCAL || 1 != l.y || c) { + (m = e._tmpVecs[2]).copyFrom(this._fowardAxis), + this._transformYawPitch && a.e.TransformCoordinatesToRef(m, this._transformYawPitchInv, m), + c ? c.getDirectionToRef(m, this.mesh, m) : s.getDirectionToRef(m, m); + var f = a.e.Cross(l, m); + f.normalize(); + var m = a.e.Cross(f, l); + a.a.FromXYZAxesToRef(f, l, m, d); + } else d.copyFrom(s.getWorldMatrix()); + d.invertToRef(p); + var g = null; + if (h) { + var b = e._tmpVecs[3]; + i.subtractToRef(n, b), a.e.TransformCoordinatesToRef(b, p, b), (g = Math.sqrt(b.x * b.x + b.z * b.z)); + var _ = Math.atan2(b.y, g), + v = _; + _ > this._maxPitch ? ((b.y = this._maxPitchTan * g), (v = this._maxPitch)) : _ < this._minPitch && ((b.y = this._minPitchTan * g), (v = this._minPitch)), + _ != v && (a.e.TransformCoordinatesToRef(b, d, b), b.addInPlace(n), (i = b)); + } + if (u) { + b = e._tmpVecs[4]; + i.subtractToRef(n, b), a.e.TransformCoordinatesToRef(b, p, b); + var y = Math.atan2(b.x, b.z), + C = y; + if ( + ((y > this._maxYaw || y < this._minYaw) && + (null == g && (g = Math.sqrt(b.x * b.x + b.z * b.z)), + this._yawRange > Math.PI + ? this._isAngleBetween(y, this._maxYaw, this._midYawConstraint) + ? ((b.z = this._maxYawCos * g), (b.x = this._maxYawSin * g), (C = this._maxYaw)) + : this._isAngleBetween(y, this._midYawConstraint, this._minYaw) && ((b.z = this._minYawCos * g), (b.x = this._minYawSin * g), (C = this._minYaw)) + : y > this._maxYaw + ? ((b.z = this._maxYawCos * g), (b.x = this._maxYawSin * g), (C = this._maxYaw)) + : y < this._minYaw && ((b.z = this._minYawCos * g), (b.x = this._minYawSin * g), (C = this._minYaw))), + this._slerping && this._yawRange > Math.PI) + ) { + var P = e._tmpVecs[8]; + P.copyFrom(Be.a.Z), this._transformYawPitch && a.e.TransformCoordinatesToRef(P, this._transformYawPitchInv, P); + var x = e._tmpMats[4]; + this._boneQuat.toRotationMatrix(x), this.mesh.getWorldMatrix().multiplyToRef(x, x), a.e.TransformCoordinatesToRef(P, x, P), a.e.TransformCoordinatesToRef(P, p, P); + var T = Math.atan2(P.x, P.z); + if (this._getAngleBetween(T, y) > this._getAngleBetween(T, this._midYawConstraint)) { + null == g && (g = Math.sqrt(b.x * b.x + b.z * b.z)); + var S = this._getAngleBetween(T, this._maxYaw); + this._getAngleBetween(T, this._minYaw) < S + ? ((C = T + 0.75 * Math.PI), (b.z = Math.cos(C) * g), (b.x = Math.sin(C) * g)) + : ((C = T - 0.75 * Math.PI), (b.z = Math.cos(C) * g), (b.x = Math.sin(C) * g)); + } + } + y != C && (a.e.TransformCoordinatesToRef(b, d, b), b.addInPlace(n), (i = b)); + } + } + var O = e._tmpVecs[5], + E = e._tmpVecs[6], + M = e._tmpVecs[7], + A = e._tmpQuat; + i.subtractToRef(n, O), + O.normalize(), + a.e.CrossToRef(l, O, E), + E.normalize(), + a.e.CrossToRef(O, E, M), + M.normalize(), + a.a.FromXYZAxesToRef(E, M, O, r), + (0 === E.x && 0 === E.y && 0 === E.z) || + (0 === M.x && 0 === M.y && 0 === M.z) || + (0 === O.x && 0 === O.y && 0 === O.z) || + ((this.adjustYaw || this.adjustPitch || this.adjustRoll) && (a.a.RotationYawPitchRollToRef(this.adjustYaw, this.adjustPitch, this.adjustRoll, o), o.multiplyToRef(r, r)), + this.slerpAmount < 1 + ? (this._slerping || this.bone.getRotationQuaternionToRef(Be.b.WORLD, this.mesh, this._boneQuat), + this._transformYawPitch && this._transformYawPitch.multiplyToRef(r, r), + a.b.FromRotationMatrixToRef(r, A), + a.b.SlerpToRef(this._boneQuat, A, this.slerpAmount, this._boneQuat), + this.bone.setRotationQuaternion(this._boneQuat, Be.b.WORLD, this.mesh), + (this._slerping = !0)) + : (this._transformYawPitch && this._transformYawPitch.multiplyToRef(r, r), this.bone.setRotationMatrix(r, Be.b.WORLD, this.mesh), (this._slerping = !1))); + } + }), + (e.prototype._getAngleDiff = function (e, t) { + var n = t - e; + return (n %= 2 * Math.PI) > Math.PI ? (n -= 2 * Math.PI) : n < -Math.PI && (n += 2 * Math.PI), n; + }), + (e.prototype._getAngleBetween = function (e, t) { + var n = 0; + return (n = (e = (e %= 2 * Math.PI) < 0 ? e + 2 * Math.PI : e) < (t = (t %= 2 * Math.PI) < 0 ? t + 2 * Math.PI : t) ? t - e : e - t) > Math.PI && (n = 2 * Math.PI - n), n; + }), + (e.prototype._isAngleBetween = function (e, t, n) { + if (((e = (e %= 2 * Math.PI) < 0 ? e + 2 * Math.PI : e), (t = (t %= 2 * Math.PI) < 0 ? t + 2 * Math.PI : t) < (n = (n %= 2 * Math.PI) < 0 ? n + 2 * Math.PI : n))) { + if (e > t && e < n) return !0; + } else if (e > n && e < t) return !0; + return !1; + }), + (e._tmpVecs = Me.a.BuildArray(10, a.e.Zero)), + (e._tmpQuat = a.b.Identity()), + (e._tmpMats = Me.a.BuildArray(5, a.a.Identity)), + e + ); + })(), + Ue = n(129), + He = n(3), + We = n(42), + Xe = function (e, t) { + (this.x = e), (this.y = t); + }, + Ye = (function () { + function e(t, n, i, r, o, a, s) { + void 0 === r && (r = 0), + void 0 === o && (o = 1), + void 0 === a && (a = 2), + void 0 === s && (s = 3), + (this.id = t), + (this.index = n), + (this.browserGamepad = i), + (this._leftStick = { x: 0, y: 0 }), + (this._rightStick = { x: 0, y: 0 }), + (this._isConnected = !0), + (this._invertLeftStickY = !1), + (this.type = e.GAMEPAD), + (this._leftStickAxisX = r), + (this._leftStickAxisY = o), + (this._rightStickAxisX = a), + (this._rightStickAxisY = s), + this.browserGamepad.axes.length >= 2 && (this._leftStick = { x: this.browserGamepad.axes[this._leftStickAxisX], y: this.browserGamepad.axes[this._leftStickAxisY] }), + this.browserGamepad.axes.length >= 4 && (this._rightStick = { x: this.browserGamepad.axes[this._rightStickAxisX], y: this.browserGamepad.axes[this._rightStickAxisY] }); + } + return ( + Object.defineProperty(e.prototype, "isConnected", { + get: function () { + return this._isConnected; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.onleftstickchanged = function (e) { + this._onleftstickchanged = e; + }), + (e.prototype.onrightstickchanged = function (e) { + this._onrightstickchanged = e; + }), + Object.defineProperty(e.prototype, "leftStick", { + get: function () { + return this._leftStick; + }, + set: function (e) { + !this._onleftstickchanged || (this._leftStick.x === e.x && this._leftStick.y === e.y) || this._onleftstickchanged(e), (this._leftStick = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rightStick", { + get: function () { + return this._rightStick; + }, + set: function (e) { + !this._onrightstickchanged || (this._rightStick.x === e.x && this._rightStick.y === e.y) || this._onrightstickchanged(e), (this._rightStick = e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.update = function () { + this._leftStick && ((this.leftStick = { x: this.browserGamepad.axes[this._leftStickAxisX], y: this.browserGamepad.axes[this._leftStickAxisY] }), this._invertLeftStickY && (this.leftStick.y *= -1)), + this._rightStick && (this.rightStick = { x: this.browserGamepad.axes[this._rightStickAxisX], y: this.browserGamepad.axes[this._rightStickAxisY] }); + }), + (e.prototype.dispose = function () {}), + (e.GAMEPAD = 0), + (e.GENERIC = 1), + (e.XBOX = 2), + (e.POSE_ENABLED = 3), + (e.DUALSHOCK = 4), + e + ); + })(), + Ke = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + return (r.onButtonDownObservable = new o.c()), (r.onButtonUpObservable = new o.c()), (r.type = Ye.GENERIC), (r._buttons = new Array(i.buttons.length)), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.onbuttondown = function (e) { + this._onbuttondown = e; + }), + (t.prototype.onbuttonup = function (e) { + this._onbuttonup = e; + }), + (t.prototype._setButtonValue = function (e, t, n) { + return ( + e !== t && + (1 === e && (this._onbuttondown && this._onbuttondown(n), this.onButtonDownObservable.notifyObservers(n)), 0 === e && (this._onbuttonup && this._onbuttonup(n), this.onButtonUpObservable.notifyObservers(n))), + e + ); + }), + (t.prototype.update = function () { + e.prototype.update.call(this); + for (var t = 0; t < this._buttons.length; t++) this._buttons[t] = this._setButtonValue(this.browserGamepad.buttons[t].value, this._buttons[t], t); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onButtonDownObservable.clear(), this.onButtonUpObservable.clear(); + }), + t + ); + })(Ye), + Ze = (function () { + function e() { + (this.gamepadRotationSensibility = 80), (this.gamepadMoveSensibility = 40), (this._yAxisScale = 1); + } + return ( + Object.defineProperty(e.prototype, "invertYAxis", { + get: function () { + return 1 !== this._yAxisScale; + }, + set: function (e) { + this._yAxisScale = e ? -1 : 1; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attachControl = function (e, t) { + var n = this, + i = this.camera.getScene().gamepadManager; + (this._onGamepadConnectedObserver = i.onGamepadConnectedObservable.add(function (e) { + e.type !== Ye.POSE_ENABLED && ((n.gamepad && e.type !== Ye.XBOX) || (n.gamepad = e)); + })), + (this._onGamepadDisconnectedObserver = i.onGamepadDisconnectedObservable.add(function (e) { + n.gamepad === e && (n.gamepad = null); + })), + (this.gamepad = i.getGamepadByType(Ye.XBOX)); + }), + (e.prototype.detachControl = function (e) { + this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver), + this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver), + (this.gamepad = null); + }), + (e.prototype.checkInputs = function () { + if (this.gamepad) { + var e = this.camera, + t = this.gamepad.rightStick; + if (t) { + if (0 != t.x) { + var n = t.x / this.gamepadRotationSensibility; + 0 != n && Math.abs(n) > 0.005 && (e.inertialAlphaOffset += n); + } + if (0 != t.y) { + var i = (t.y / this.gamepadRotationSensibility) * this._yAxisScale; + 0 != i && Math.abs(i) > 0.005 && (e.inertialBetaOffset += i); + } + } + var r = this.gamepad.leftStick; + if (r && 0 != r.y) { + var o = r.y / this.gamepadMoveSensibility; + 0 != o && Math.abs(o) > 0.005 && (this.camera.inertialRadiusOffset -= o); + } + } + }), + (e.prototype.getClassName = function () { + return "ArcRotateCameraGamepadInput"; + }), + (e.prototype.getSimpleName = function () { + return "gamepad"; + }), + Object(h.c)([Object(He.c)()], e.prototype, "gamepadRotationSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "gamepadMoveSensibility", void 0), + e + ); + })(); + We.a.ArcRotateCameraGamepadInput = Ze; + var qe = n(89), + Qe = (function () { + function e() { + (this.keysUp = [38]), + (this.keysDown = [40]), + (this.keysLeft = [37]), + (this.keysRight = [39]), + (this.keysReset = [220]), + (this.panningSensibility = 50), + (this.zoomingSensibility = 25), + (this.useAltToZoom = !0), + (this.angularSpeed = 0.01), + (this._keys = new Array()); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + this._onCanvasBlurObserver || + ((this._scene = this.camera.getScene()), + (this._engine = this._scene.getEngine()), + (this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(function () { + n._keys = []; + })), + (this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (e) { + var i, + r = e.event; + r.metaKey || + (e.type === qe.a.KEYDOWN + ? ((n._ctrlPressed = r.ctrlKey), + (n._altPressed = r.altKey), + (-1 !== n.keysUp.indexOf(r.keyCode) || + -1 !== n.keysDown.indexOf(r.keyCode) || + -1 !== n.keysLeft.indexOf(r.keyCode) || + -1 !== n.keysRight.indexOf(r.keyCode) || + -1 !== n.keysReset.indexOf(r.keyCode)) && + (-1 === (i = n._keys.indexOf(r.keyCode)) && n._keys.push(r.keyCode), r.preventDefault && (t || r.preventDefault()))) + : (-1 === n.keysUp.indexOf(r.keyCode) && + -1 === n.keysDown.indexOf(r.keyCode) && + -1 === n.keysLeft.indexOf(r.keyCode) && + -1 === n.keysRight.indexOf(r.keyCode) && + -1 === n.keysReset.indexOf(r.keyCode)) || + ((i = n._keys.indexOf(r.keyCode)) >= 0 && n._keys.splice(i, 1), r.preventDefault && (t || r.preventDefault()))); + }))); + }), + (e.prototype.detachControl = function (e) { + this._scene && + (this._onKeyboardObserver && this._scene.onKeyboardObservable.remove(this._onKeyboardObserver), + this._onCanvasBlurObserver && this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver), + (this._onKeyboardObserver = null), + (this._onCanvasBlurObserver = null)), + (this._keys = []); + }), + (e.prototype.checkInputs = function () { + if (this._onKeyboardObserver) + for (var e = this.camera, t = 0; t < this._keys.length; t++) { + var n = this._keys[t]; + -1 !== this.keysLeft.indexOf(n) + ? this._ctrlPressed && this.camera._useCtrlForPanning + ? (e.inertialPanningX -= 1 / this.panningSensibility) + : (e.inertialAlphaOffset -= this.angularSpeed) + : -1 !== this.keysUp.indexOf(n) + ? this._ctrlPressed && this.camera._useCtrlForPanning + ? (e.inertialPanningY += 1 / this.panningSensibility) + : this._altPressed && this.useAltToZoom + ? (e.inertialRadiusOffset += 1 / this.zoomingSensibility) + : (e.inertialBetaOffset -= this.angularSpeed) + : -1 !== this.keysRight.indexOf(n) + ? this._ctrlPressed && this.camera._useCtrlForPanning + ? (e.inertialPanningX += 1 / this.panningSensibility) + : (e.inertialAlphaOffset += this.angularSpeed) + : -1 !== this.keysDown.indexOf(n) + ? this._ctrlPressed && this.camera._useCtrlForPanning + ? (e.inertialPanningY -= 1 / this.panningSensibility) + : this._altPressed && this.useAltToZoom + ? (e.inertialRadiusOffset -= 1 / this.zoomingSensibility) + : (e.inertialBetaOffset += this.angularSpeed) + : -1 !== this.keysReset.indexOf(n) && e.useInputToRestoreState && e.restoreState(); + } + }), + (e.prototype.getClassName = function () { + return "ArcRotateCameraKeyboardMoveInput"; + }), + (e.prototype.getSimpleName = function () { + return "keyboard"; + }), + Object(h.c)([Object(He.c)()], e.prototype, "keysUp", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysDown", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysLeft", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRight", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysReset", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "panningSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "zoomingSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "useAltToZoom", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "angularSpeed", void 0), + e + ); + })(); + We.a.ArcRotateCameraKeyboardMoveInput = Qe; + var Je = (function () { + function e() { + (this.wheelPrecision = 3), (this.wheelDeltaPercentage = 0); + } + return ( + (e.prototype.computeDeltaFromMouseWheelLegacyEvent = function (e, t) { + var n = 0.01 * e * this.wheelDeltaPercentage * t; + return e > 0 ? n / (1 + this.wheelDeltaPercentage) : n * (1 + this.wheelDeltaPercentage); + }), + (e.prototype.attachControl = function (e, t) { + var n = this; + (this._wheel = function (e, i) { + if (e.type === ye.a.POINTERWHEEL) { + var r = e.event, + o = 0, + a = r, + s = 0; + if (((s = a.wheelDelta ? a.wheelDelta : 60 * -(r.deltaY || r.detail)), n.wheelDeltaPercentage)) { + if ((o = n.computeDeltaFromMouseWheelLegacyEvent(s, n.camera.radius)) > 0) { + for (var c = n.camera.radius, l = n.camera.inertialRadiusOffset + o, u = 0; u < 20 && Math.abs(l) > 0.001; u++) (c -= l), (l *= n.camera.inertia); + (c = z.a.Clamp(c, 0, Number.MAX_VALUE)), (o = n.computeDeltaFromMouseWheelLegacyEvent(s, c)); + } + } else o = s / (40 * n.wheelPrecision); + o && (n.camera.inertialRadiusOffset += o), r.preventDefault && (t || r.preventDefault()); + } + }), + (this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, ye.a.POINTERWHEEL)); + }), + (e.prototype.detachControl = function (e) { + this._observer && e && (this.camera.getScene().onPointerObservable.remove(this._observer), (this._observer = null), (this._wheel = null)); + }), + (e.prototype.getClassName = function () { + return "ArcRotateCameraMouseWheelInput"; + }), + (e.prototype.getSimpleName = function () { + return "mousewheel"; + }), + Object(h.c)([Object(He.c)()], e.prototype, "wheelPrecision", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "wheelDeltaPercentage", void 0), + e + ); + })(); + We.a.ArcRotateCameraMouseWheelInput = Je; + var $e = n(12), + et = (function () { + function e() { + this.buttons = [0, 1, 2]; + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this, + i = this.camera.getEngine(), + r = 0, + o = null; + (this.pointA = null), + (this.pointB = null), + (this._altKey = !1), + (this._ctrlKey = !1), + (this._metaKey = !1), + (this._shiftKey = !1), + (this._buttonsPressed = 0), + (this._pointerInput = function (a, s) { + var c = a.event, + l = "touch" === c.pointerType; + if (!i.isInVRExclusivePointerMode && (a.type === ye.a.POINTERMOVE || -1 !== n.buttons.indexOf(c.button))) { + var u = c.srcElement || c.target; + if (((n._altKey = c.altKey), (n._ctrlKey = c.ctrlKey), (n._metaKey = c.metaKey), (n._shiftKey = c.shiftKey), (n._buttonsPressed = c.buttons), i.isPointerLock)) { + var h = c.movementX || c.mozMovementX || c.webkitMovementX || c.msMovementX || 0, + d = c.movementY || c.mozMovementY || c.webkitMovementY || c.msMovementY || 0; + n.onTouch(null, h, d), (n.pointA = null), (n.pointB = null); + } else if (a.type === ye.a.POINTERDOWN && u) { + try { + u.setPointerCapture(c.pointerId); + } catch (e) {} + null === n.pointA + ? (n.pointA = { x: c.clientX, y: c.clientY, pointerId: c.pointerId, type: c.pointerType }) + : null === n.pointB && (n.pointB = { x: c.clientX, y: c.clientY, pointerId: c.pointerId, type: c.pointerType }), + n.onButtonDown(c), + t || (c.preventDefault(), e.focus()); + } else if (a.type === ye.a.POINTERDOUBLETAP) n.onDoubleTap(c.pointerType); + else if (a.type === ye.a.POINTERUP && u) { + try { + u.releasePointerCapture(c.pointerId); + } catch (e) {} + l || (n.pointB = null), + i._badOS + ? (n.pointA = n.pointB = null) + : n.pointB && n.pointA && n.pointA.pointerId == c.pointerId + ? ((n.pointA = n.pointB), (n.pointB = null)) + : n.pointA && n.pointB && n.pointB.pointerId == c.pointerId + ? (n.pointB = null) + : (n.pointA = n.pointB = null), + (0 !== r || o) && (n.onMultiTouch(n.pointA, n.pointB, r, 0, o, null), (r = 0), (o = null)), + n.onButtonUp(c), + t || c.preventDefault(); + } else if (a.type === ye.a.POINTERMOVE) + if ((t || c.preventDefault(), n.pointA && null === n.pointB)) { + (h = c.clientX - n.pointA.x), (d = c.clientY - n.pointA.y); + n.onTouch(n.pointA, h, d), (n.pointA.x = c.clientX), (n.pointA.y = c.clientY); + } else if (n.pointA && n.pointB) { + var p = n.pointA.pointerId === c.pointerId ? n.pointA : n.pointB; + (p.x = c.clientX), (p.y = c.clientY); + var f = n.pointA.x - n.pointB.x, + m = n.pointA.y - n.pointB.y, + g = f * f + m * m, + b = { x: (n.pointA.x + n.pointB.x) / 2, y: (n.pointA.y + n.pointB.y) / 2, pointerId: c.pointerId, type: a.type }; + n.onMultiTouch(n.pointA, n.pointB, r, g, o, b), (o = b), (r = g); + } + } + }), + (this._observer = this.camera.getScene().onPointerObservable.add(this._pointerInput, ye.a.POINTERDOWN | ye.a.POINTERUP | ye.a.POINTERMOVE)), + (this._onLostFocus = function () { + (n.pointA = n.pointB = null), (r = 0), (o = null), n.onLostFocus(); + }), + e.addEventListener("contextmenu", this.onContextMenu.bind(this), !1); + var a = this.camera.getScene().getEngine().getHostWindow(); + a && $e.b.RegisterTopRootEvents(a, [{ name: "blur", handler: this._onLostFocus }]); + }), + (e.prototype.detachControl = function (e) { + if (this._onLostFocus) { + var t = this.camera.getScene().getEngine().getHostWindow(); + t && $e.b.UnregisterTopRootEvents(t, [{ name: "blur", handler: this._onLostFocus }]); + } + e && + this._observer && + (this.camera.getScene().onPointerObservable.remove(this._observer), (this._observer = null), this.onContextMenu && e.removeEventListener("contextmenu", this.onContextMenu), (this._onLostFocus = null)), + (this._altKey = !1), + (this._ctrlKey = !1), + (this._metaKey = !1), + (this._shiftKey = !1), + (this._buttonsPressed = 0); + }), + (e.prototype.getClassName = function () { + return "BaseCameraPointersInput"; + }), + (e.prototype.getSimpleName = function () { + return "pointers"; + }), + (e.prototype.onDoubleTap = function (e) {}), + (e.prototype.onTouch = function (e, t, n) {}), + (e.prototype.onMultiTouch = function (e, t, n, i, r, o) {}), + (e.prototype.onContextMenu = function (e) { + e.preventDefault(); + }), + (e.prototype.onButtonDown = function (e) {}), + (e.prototype.onButtonUp = function (e) {}), + (e.prototype.onLostFocus = function () {}), + Object(h.c)([Object(He.c)()], e.prototype, "buttons", void 0), + e + ); + })(), + tt = (function (e) { + function t() { + var t = (null !== e && e.apply(this, arguments)) || this; + return ( + (t.buttons = [0, 1, 2]), + (t.angularSensibilityX = 1e3), + (t.angularSensibilityY = 1e3), + (t.pinchPrecision = 12), + (t.pinchDeltaPercentage = 0), + (t.useNaturalPinchZoom = !1), + (t.panningSensibility = 1e3), + (t.multiTouchPanning = !0), + (t.multiTouchPanAndZoom = !0), + (t.pinchInwards = !0), + (t._isPanClick = !1), + (t._twoFingerActivityCount = 0), + (t._isPinching = !1), + t + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ArcRotateCameraPointersInput"; + }), + (t.prototype.onTouch = function (e, t, n) { + 0 !== this.panningSensibility && ((this._ctrlKey && this.camera._useCtrlForPanning) || this._isPanClick) + ? ((this.camera.inertialPanningX += -t / this.panningSensibility), (this.camera.inertialPanningY += n / this.panningSensibility)) + : ((this.camera.inertialAlphaOffset -= t / this.angularSensibilityX), (this.camera.inertialBetaOffset -= n / this.angularSensibilityY)); + }), + (t.prototype.onDoubleTap = function (e) { + this.camera.useInputToRestoreState && this.camera.restoreState(); + }), + (t.prototype.onMultiTouch = function (e, t, n, i, r, o) { + if (!((0 === n && null === r) || (0 === i && null === o))) { + var a = this.pinchInwards ? 1 : -1; + if (this.multiTouchPanAndZoom) { + if ( + (this.useNaturalPinchZoom + ? (this.camera.radius = (this.camera.radius * Math.sqrt(n)) / Math.sqrt(i)) + : this.pinchDeltaPercentage + ? (this.camera.inertialRadiusOffset += 0.001 * (i - n) * this.camera.radius * this.pinchDeltaPercentage) + : (this.camera.inertialRadiusOffset += (i - n) / ((this.pinchPrecision * a * (this.angularSensibilityX + this.angularSensibilityY)) / 2)), + 0 !== this.panningSensibility && r && o) + ) { + var s = o.x - r.x, + c = o.y - r.y; + (this.camera.inertialPanningX += -s / this.panningSensibility), (this.camera.inertialPanningY += c / this.panningSensibility); + } + } else { + this._twoFingerActivityCount++; + var l = Math.sqrt(n), + u = Math.sqrt(i); + if (this._isPinching || (this._twoFingerActivityCount < 20 && Math.abs(u - l) > this.camera.pinchToPanMaxDistance)) + this.pinchDeltaPercentage + ? (this.camera.inertialRadiusOffset += 0.001 * (i - n) * this.camera.radius * this.pinchDeltaPercentage) + : (this.camera.inertialRadiusOffset += (i - n) / ((this.pinchPrecision * a * (this.angularSensibilityX + this.angularSensibilityY)) / 2)), + (this._isPinching = !0); + else if (0 !== this.panningSensibility && this.multiTouchPanning && o && r) { + (s = o.x - r.x), (c = o.y - r.y); + (this.camera.inertialPanningX += -s / this.panningSensibility), (this.camera.inertialPanningY += c / this.panningSensibility); + } + } + } + }), + (t.prototype.onButtonDown = function (e) { + this._isPanClick = e.button === this.camera._panningMouseButton; + }), + (t.prototype.onButtonUp = function (e) { + (this._twoFingerActivityCount = 0), (this._isPinching = !1); + }), + (t.prototype.onLostFocus = function () { + (this._isPanClick = !1), (this._twoFingerActivityCount = 0), (this._isPinching = !1); + }), + Object(h.c)([Object(He.c)()], t.prototype, "buttons", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "angularSensibilityX", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "angularSensibilityY", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "pinchPrecision", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "pinchDeltaPercentage", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "useNaturalPinchZoom", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "panningSensibility", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "multiTouchPanning", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "multiTouchPanAndZoom", void 0), + t + ); + })(et); + We.a.ArcRotateCameraPointersInput = tt; + var nt = (function (e) { + function t(t) { + return e.call(this, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.addMouseWheel = function () { + return this.add(new Je()), this; + }), + (t.prototype.addPointers = function () { + return this.add(new tt()), this; + }), + (t.prototype.addKeyboard = function () { + return this.add(new Qe()), this; + }), + t + ); + })(We.b); + nt.prototype.addVRDeviceOrientation = function () { + return this.add(new it()), this; + }; + var it = (function () { + function e() { + (this.alphaCorrection = 1), (this.gammaCorrection = 1), (this._alpha = 0), (this._gamma = 0), (this._dirty = !1), (this._deviceOrientationHandler = this._onOrientationEvent.bind(this)); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + this.camera.attachControl(e, t); + var i = this.camera.getScene().getEngine().getHostWindow(); + i && + ("undefined" != typeof DeviceOrientationEvent && "function" == typeof DeviceOrientationEvent.requestPermission + ? DeviceOrientationEvent.requestPermission() + .then(function (e) { + "granted" === e ? i.addEventListener("deviceorientation", n._deviceOrientationHandler) : $e.b.Warn("Permission not granted."); + }) + .catch(function (e) { + $e.b.Error(e); + }) + : i.addEventListener("deviceorientation", this._deviceOrientationHandler)); + }), + (e.prototype._onOrientationEvent = function (e) { + null !== e.alpha && (this._alpha = (0 | +e.alpha) * this.alphaCorrection), null !== e.gamma && (this._gamma = (0 | +e.gamma) * this.gammaCorrection), (this._dirty = !0); + }), + (e.prototype.checkInputs = function () { + this._dirty && ((this._dirty = !1), this._gamma < 0 && (this._gamma = 180 + this._gamma), (this.camera.alpha = (((-this._alpha / 180) * Math.PI) % Math.PI) * 2), (this.camera.beta = (this._gamma / 180) * Math.PI)); + }), + (e.prototype.detachControl = function (e) { + window.removeEventListener("deviceorientation", this._deviceOrientationHandler); + }), + (e.prototype.getClassName = function () { + return "ArcRotateCameraVRDeviceOrientationInput"; + }), + (e.prototype.getSimpleName = function () { + return "VRDeviceOrientation"; + }), + e + ); + })(); + We.a.ArcRotateCameraVRDeviceOrientationInput = it; + var rt = (function () { + function e() { + (this.keysForward = [87]), (this.keysBackward = [83]), (this.keysUp = [69]), (this.keysDown = [81]), (this.keysRight = [68]), (this.keysLeft = [65]), (this._keys = new Array()); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + this._onCanvasBlurObserver || + ((this._scene = this.camera.getScene()), + (this._engine = this._scene.getEngine()), + (this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(function () { + n._keys = []; + })), + (this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (e) { + var i, + r = e.event; + e.type === qe.a.KEYDOWN + ? (-1 === n.keysForward.indexOf(r.keyCode) && + -1 === n.keysBackward.indexOf(r.keyCode) && + -1 === n.keysUp.indexOf(r.keyCode) && + -1 === n.keysDown.indexOf(r.keyCode) && + -1 === n.keysLeft.indexOf(r.keyCode) && + -1 === n.keysRight.indexOf(r.keyCode)) || + (-1 === (i = n._keys.indexOf(r.keyCode)) && n._keys.push(r.keyCode), t || r.preventDefault()) + : (-1 === n.keysForward.indexOf(r.keyCode) && + -1 === n.keysBackward.indexOf(r.keyCode) && + -1 === n.keysUp.indexOf(r.keyCode) && + -1 === n.keysDown.indexOf(r.keyCode) && + -1 === n.keysLeft.indexOf(r.keyCode) && + -1 === n.keysRight.indexOf(r.keyCode)) || + ((i = n._keys.indexOf(r.keyCode)) >= 0 && n._keys.splice(i, 1), t || r.preventDefault()); + }))); + }), + (e.prototype.detachControl = function (e) { + this._scene && + (this._onKeyboardObserver && this._scene.onKeyboardObservable.remove(this._onKeyboardObserver), + this._onCanvasBlurObserver && this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver), + (this._onKeyboardObserver = null), + (this._onCanvasBlurObserver = null)), + (this._keys = []); + }), + (e.prototype.getClassName = function () { + return "FlyCameraKeyboardInput"; + }), + (e.prototype._onLostFocus = function (e) { + this._keys = []; + }), + (e.prototype.getSimpleName = function () { + return "keyboard"; + }), + (e.prototype.checkInputs = function () { + if (this._onKeyboardObserver) + for (var e = this.camera, t = 0; t < this._keys.length; t++) { + var n = this._keys[t], + i = e._computeLocalCameraSpeed(); + -1 !== this.keysForward.indexOf(n) + ? e._localDirection.copyFromFloats(0, 0, i) + : -1 !== this.keysBackward.indexOf(n) + ? e._localDirection.copyFromFloats(0, 0, -i) + : -1 !== this.keysUp.indexOf(n) + ? e._localDirection.copyFromFloats(0, i, 0) + : -1 !== this.keysDown.indexOf(n) + ? e._localDirection.copyFromFloats(0, -i, 0) + : -1 !== this.keysRight.indexOf(n) + ? e._localDirection.copyFromFloats(i, 0, 0) + : -1 !== this.keysLeft.indexOf(n) && e._localDirection.copyFromFloats(-i, 0, 0), + e.getScene().useRightHandedSystem && (e._localDirection.z *= -1), + e.getViewMatrix().invertToRef(e._cameraTransformMatrix), + a.e.TransformNormalToRef(e._localDirection, e._cameraTransformMatrix, e._transformedDirection), + e.cameraDirection.addInPlace(e._transformedDirection); + } + }), + Object(h.c)([Object(He.c)()], e.prototype, "keysForward", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysBackward", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysUp", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysDown", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRight", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysLeft", void 0), + e + ); + })(); + We.a.FlyCameraKeyboardInput = rt; + var ot = (function () { + function e(e) { + void 0 === e && (e = !0), + (this.buttons = [0, 1, 2]), + (this.buttonsYaw = [-1, 0, 1]), + (this.buttonsPitch = [-1, 0, 1]), + (this.buttonsRoll = [2]), + (this.activeButton = -1), + (this.angularSensibility = 1e3), + (this.previousPosition = null); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + (this.element = e), + (this.noPreventDefault = t), + (this._observer = this.camera.getScene().onPointerObservable.add(function (e, t) { + n._pointerInput(e, t); + }, ye.a.POINTERDOWN | ye.a.POINTERUP | ye.a.POINTERMOVE)), + (this._rollObserver = this.camera.getScene().onBeforeRenderObservable.add(function () { + n.camera.rollCorrect && n.camera.restoreRoll(n.camera.rollCorrect); + })), + (this._mousemoveCallback = function (e) { + n._onMouseMove(e); + }), + e.addEventListener("mousemove", this._mousemoveCallback, !1); + }), + (e.prototype.detachControl = function (e) { + this._observer && + e && + (this.camera.getScene().onPointerObservable.remove(this._observer), + this.camera.getScene().onBeforeRenderObservable.remove(this._rollObserver), + this._mousemoveCallback && e.removeEventListener("mousemove", this._mousemoveCallback), + (this._observer = null), + (this._rollObserver = null), + (this.previousPosition = null), + (this.noPreventDefault = void 0)); + }), + (e.prototype.getClassName = function () { + return "FlyCameraMouseInput"; + }), + (e.prototype.getSimpleName = function () { + return "mouse"; + }), + (e.prototype._pointerInput = function (e, t) { + var n = e.event, + i = this.camera.getEngine(); + if (!i.isInVRExclusivePointerMode && (this.touchEnabled || "touch" !== n.pointerType) && (e.type === ye.a.POINTERMOVE || -1 !== this.buttons.indexOf(n.button))) { + var r = n.srcElement || n.target; + if (e.type === ye.a.POINTERDOWN && r) { + try { + r.setPointerCapture(n.pointerId); + } catch (n) {} + (this.previousPosition = { x: n.clientX, y: n.clientY }), (this.activeButton = n.button), this.noPreventDefault || (n.preventDefault(), this.element.focus()); + } else if (e.type === ye.a.POINTERUP && r) { + try { + r.releasePointerCapture(n.pointerId); + } catch (n) {} + (this.activeButton = -1), (this.previousPosition = null), this.noPreventDefault || n.preventDefault(); + } else if (e.type === ye.a.POINTERMOVE) { + if (!this.previousPosition || i.isPointerLock) return; + var o = n.clientX - this.previousPosition.x, + a = n.clientY - this.previousPosition.y; + this.rotateCamera(o, a), (this.previousPosition = { x: n.clientX, y: n.clientY }), this.noPreventDefault || n.preventDefault(); + } + } + }), + (e.prototype._onMouseMove = function (e) { + var t = this.camera.getEngine(); + if (t.isPointerLock && !t.isInVRExclusivePointerMode) { + var n = e.movementX || e.mozMovementX || e.webkitMovementX || e.msMovementX || 0, + i = e.movementY || e.mozMovementY || e.webkitMovementY || e.msMovementY || 0; + this.rotateCamera(n, i), (this.previousPosition = null), this.noPreventDefault || e.preventDefault(); + } + }), + (e.prototype.rotateCamera = function (e, t) { + var n = this, + i = this.camera; + this.camera.getScene().useRightHandedSystem && (e *= -1), i.parent && i.parent._getWorldMatrixDeterminant() < 0 && (e *= -1); + var r, + o = e / this.angularSensibility, + s = t / this.angularSensibility, + c = a.b.RotationYawPitchRoll(i.rotation.y, i.rotation.x, i.rotation.z); + if ( + (this.buttonsPitch.some(function (e) { + return e === n.activeButton; + }) && ((r = a.b.RotationAxis(Be.a.X, s)), c.multiplyInPlace(r)), + this.buttonsYaw.some(function (e) { + return e === n.activeButton; + })) + ) { + (r = a.b.RotationAxis(Be.a.Y, o)), c.multiplyInPlace(r); + var l = i.bankedTurnLimit + i._trackRoll; + if (i.bankedTurn && -l < i.rotation.z && i.rotation.z < l) { + var u = i.bankedTurnMultiplier * -o; + (r = a.b.RotationAxis(Be.a.Z, u)), c.multiplyInPlace(r); + } + } + this.buttonsRoll.some(function (e) { + return e === n.activeButton; + }) && ((r = a.b.RotationAxis(Be.a.Z, -o)), (i._trackRoll -= o), c.multiplyInPlace(r)), + c.toEulerAnglesToRef(i.rotation); + }), + Object(h.c)([Object(He.c)()], e.prototype, "buttons", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "angularSensibility", void 0), + e + ); + })(); + We.a.FlyCameraMouseInput = ot; + var at = (function () { + function e() { + (this.keysHeightOffsetIncr = [38]), + (this.keysHeightOffsetDecr = [40]), + (this.keysHeightOffsetModifierAlt = !1), + (this.keysHeightOffsetModifierCtrl = !1), + (this.keysHeightOffsetModifierShift = !1), + (this.keysRotationOffsetIncr = [37]), + (this.keysRotationOffsetDecr = [39]), + (this.keysRotationOffsetModifierAlt = !1), + (this.keysRotationOffsetModifierCtrl = !1), + (this.keysRotationOffsetModifierShift = !1), + (this.keysRadiusIncr = [40]), + (this.keysRadiusDecr = [38]), + (this.keysRadiusModifierAlt = !0), + (this.keysRadiusModifierCtrl = !1), + (this.keysRadiusModifierShift = !1), + (this.heightSensibility = 1), + (this.rotationSensibility = 1), + (this.radiusSensibility = 1), + (this._keys = new Array()); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + this._onCanvasBlurObserver || + ((this._scene = this.camera.getScene()), + (this._engine = this._scene.getEngine()), + (this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(function () { + n._keys = []; + })), + (this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (e) { + var i, + r = e.event; + r.metaKey || + (e.type === qe.a.KEYDOWN + ? ((n._ctrlPressed = r.ctrlKey), + (n._altPressed = r.altKey), + (n._shiftPressed = r.shiftKey), + (-1 !== n.keysHeightOffsetIncr.indexOf(r.keyCode) || + -1 !== n.keysHeightOffsetDecr.indexOf(r.keyCode) || + -1 !== n.keysRotationOffsetIncr.indexOf(r.keyCode) || + -1 !== n.keysRotationOffsetDecr.indexOf(r.keyCode) || + -1 !== n.keysRadiusIncr.indexOf(r.keyCode) || + -1 !== n.keysRadiusDecr.indexOf(r.keyCode)) && + (-1 === (i = n._keys.indexOf(r.keyCode)) && n._keys.push(r.keyCode), r.preventDefault && (t || r.preventDefault()))) + : (-1 === n.keysHeightOffsetIncr.indexOf(r.keyCode) && + -1 === n.keysHeightOffsetDecr.indexOf(r.keyCode) && + -1 === n.keysRotationOffsetIncr.indexOf(r.keyCode) && + -1 === n.keysRotationOffsetDecr.indexOf(r.keyCode) && + -1 === n.keysRadiusIncr.indexOf(r.keyCode) && + -1 === n.keysRadiusDecr.indexOf(r.keyCode)) || + ((i = n._keys.indexOf(r.keyCode)) >= 0 && n._keys.splice(i, 1), r.preventDefault && (t || r.preventDefault()))); + }))); + }), + (e.prototype.detachControl = function (e) { + this._scene && + (this._onKeyboardObserver && this._scene.onKeyboardObservable.remove(this._onKeyboardObserver), + this._onCanvasBlurObserver && this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver), + (this._onKeyboardObserver = null), + (this._onCanvasBlurObserver = null)), + (this._keys = []); + }), + (e.prototype.checkInputs = function () { + var e = this; + this._onKeyboardObserver && + this._keys.forEach(function (t) { + -1 !== e.keysHeightOffsetIncr.indexOf(t) && e._modifierHeightOffset() + ? (e.camera.heightOffset += e.heightSensibility) + : -1 !== e.keysHeightOffsetDecr.indexOf(t) && e._modifierHeightOffset() + ? (e.camera.heightOffset -= e.heightSensibility) + : -1 !== e.keysRotationOffsetIncr.indexOf(t) && e._modifierRotationOffset() + ? ((e.camera.rotationOffset += e.rotationSensibility), (e.camera.rotationOffset %= 360)) + : -1 !== e.keysRotationOffsetDecr.indexOf(t) && e._modifierRotationOffset() + ? ((e.camera.rotationOffset -= e.rotationSensibility), (e.camera.rotationOffset %= 360)) + : -1 !== e.keysRadiusIncr.indexOf(t) && e._modifierRadius() + ? (e.camera.radius += e.radiusSensibility) + : -1 !== e.keysRadiusDecr.indexOf(t) && e._modifierRadius() && (e.camera.radius -= e.radiusSensibility); + }); + }), + (e.prototype.getClassName = function () { + return "FollowCameraKeyboardMoveInput"; + }), + (e.prototype.getSimpleName = function () { + return "keyboard"; + }), + (e.prototype._modifierHeightOffset = function () { + return this.keysHeightOffsetModifierAlt === this._altPressed && this.keysHeightOffsetModifierCtrl === this._ctrlPressed && this.keysHeightOffsetModifierShift === this._shiftPressed; + }), + (e.prototype._modifierRotationOffset = function () { + return this.keysRotationOffsetModifierAlt === this._altPressed && this.keysRotationOffsetModifierCtrl === this._ctrlPressed && this.keysRotationOffsetModifierShift === this._shiftPressed; + }), + (e.prototype._modifierRadius = function () { + return this.keysRadiusModifierAlt === this._altPressed && this.keysRadiusModifierCtrl === this._ctrlPressed && this.keysRadiusModifierShift === this._shiftPressed; + }), + Object(h.c)([Object(He.c)()], e.prototype, "keysHeightOffsetIncr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysHeightOffsetDecr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysHeightOffsetModifierAlt", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysHeightOffsetModifierCtrl", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysHeightOffsetModifierShift", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRotationOffsetIncr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRotationOffsetDecr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRotationOffsetModifierAlt", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRotationOffsetModifierCtrl", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRotationOffsetModifierShift", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRadiusIncr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRadiusDecr", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRadiusModifierAlt", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRadiusModifierCtrl", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "keysRadiusModifierShift", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "heightSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "rotationSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "radiusSensibility", void 0), + e + ); + })(); + We.a.FollowCameraKeyboardMoveInput = at; + var st = (function () { + function e() { + (this.axisControlRadius = !0), (this.axisControlHeight = !1), (this.axisControlRotation = !1), (this.wheelPrecision = 3), (this.wheelDeltaPercentage = 0); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + (this._wheel = function (e, i) { + if (e.type === ye.a.POINTERWHEEL) { + var r = e.event, + o = 0, + a = Math.max(-1, Math.min(1, r.deltaY || r.wheelDelta || -r.detail)); + n.wheelDeltaPercentage + ? n.axisControlRadius + ? (o = 0.01 * a * n.wheelDeltaPercentage * n.camera.radius) + : n.axisControlHeight + ? (o = 0.01 * a * n.wheelDeltaPercentage * n.camera.heightOffset) + : n.axisControlRotation && (o = 0.01 * a * n.wheelDeltaPercentage * n.camera.rotationOffset) + : (o = a * n.wheelPrecision), + o && (n.axisControlRadius ? (n.camera.radius += o) : n.axisControlHeight ? (n.camera.heightOffset -= o) : n.axisControlRotation && (n.camera.rotationOffset -= o)), + r.preventDefault && (t || r.preventDefault()); + } + }), + (this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, ye.a.POINTERWHEEL)); + }), + (e.prototype.detachControl = function (e) { + this._observer && e && (this.camera.getScene().onPointerObservable.remove(this._observer), (this._observer = null), (this._wheel = null)); + }), + (e.prototype.getClassName = function () { + return "ArcRotateCameraMouseWheelInput"; + }), + (e.prototype.getSimpleName = function () { + return "mousewheel"; + }), + Object(h.c)([Object(He.c)()], e.prototype, "axisControlRadius", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "axisControlHeight", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "axisControlRotation", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "wheelPrecision", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "wheelDeltaPercentage", void 0), + e + ); + })(); + We.a.FollowCameraMouseWheelInput = st; + var ct = (function (e) { + function t() { + var t = (null !== e && e.apply(this, arguments)) || this; + return ( + (t.angularSensibilityX = 1), + (t.angularSensibilityY = 1), + (t.pinchPrecision = 1e4), + (t.pinchDeltaPercentage = 0), + (t.axisXControlRadius = !1), + (t.axisXControlHeight = !1), + (t.axisXControlRotation = !0), + (t.axisYControlRadius = !1), + (t.axisYControlHeight = !0), + (t.axisYControlRotation = !1), + (t.axisPinchControlRadius = !0), + (t.axisPinchControlHeight = !1), + (t.axisPinchControlRotation = !1), + (t.warningEnable = !0), + (t._warningCounter = 0), + t + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "FollowCameraPointersInput"; + }), + (t.prototype.onTouch = function (e, t, n) { + this._warning(), + this.axisXControlRotation ? (this.camera.rotationOffset += t / this.angularSensibilityX) : this.axisYControlRotation && (this.camera.rotationOffset += n / this.angularSensibilityX), + this.axisXControlHeight ? (this.camera.heightOffset += t / this.angularSensibilityY) : this.axisYControlHeight && (this.camera.heightOffset += n / this.angularSensibilityY), + this.axisXControlRadius ? (this.camera.radius -= t / this.angularSensibilityY) : this.axisYControlRadius && (this.camera.radius -= n / this.angularSensibilityY); + }), + (t.prototype.onMultiTouch = function (e, t, n, i, r, o) { + if (!((0 === n && null === r) || (0 === i && null === o))) { + var a = (i - n) / ((this.pinchPrecision * (this.angularSensibilityX + this.angularSensibilityY)) / 2); + this.pinchDeltaPercentage + ? ((a *= 0.01 * this.pinchDeltaPercentage), + this.axisPinchControlRotation && (this.camera.rotationOffset += a * this.camera.rotationOffset), + this.axisPinchControlHeight && (this.camera.heightOffset += a * this.camera.heightOffset), + this.axisPinchControlRadius && (this.camera.radius -= a * this.camera.radius)) + : (this.axisPinchControlRotation && (this.camera.rotationOffset += a), this.axisPinchControlHeight && (this.camera.heightOffset += a), this.axisPinchControlRadius && (this.camera.radius -= a)); + } + }), + (t.prototype._warning = function () { + if (this.warningEnable && this._warningCounter++ % 100 == 0); + }), + Object(h.c)([Object(He.c)()], t.prototype, "angularSensibilityX", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "angularSensibilityY", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "pinchPrecision", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "pinchDeltaPercentage", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisXControlRadius", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisXControlHeight", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisXControlRotation", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisYControlRadius", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisYControlHeight", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisYControlRotation", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisPinchControlRadius", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisPinchControlHeight", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "axisPinchControlRotation", void 0), + t + ); + })(et); + We.a.FollowCameraPointersInput = ct; + var lt = n(120); + lt.a.prototype.addDeviceOrientation = function () { + return this._deviceOrientationInput || ((this._deviceOrientationInput = new ut()), this.add(this._deviceOrientationInput)), this; + }; + var ut = (function () { + function e() { + var e = this; + (this._screenOrientationAngle = 0), + (this._screenQuaternion = new a.b()), + (this._alpha = 0), + (this._beta = 0), + (this._gamma = 0), + (this._onDeviceOrientationChangedObservable = new o.c()), + (this._orientationChanged = function () { + (e._screenOrientationAngle = void 0 !== window.orientation ? +window.orientation : window.screen.orientation && window.screen.orientation.angle ? window.screen.orientation.angle : 0), + (e._screenOrientationAngle = -$e.b.ToRadians(e._screenOrientationAngle / 2)), + e._screenQuaternion.copyFromFloats(0, Math.sin(e._screenOrientationAngle), 0, Math.cos(e._screenOrientationAngle)); + }), + (this._deviceOrientation = function (t) { + (e._alpha = null !== t.alpha ? t.alpha : 0), (e._beta = null !== t.beta ? t.beta : 0), (e._gamma = null !== t.gamma ? t.gamma : 0), null !== t.alpha && e._onDeviceOrientationChangedObservable.notifyObservers(); + }), + (this._constantTranform = new a.b(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5))), + this._orientationChanged(); + } + return ( + (e.WaitForOrientationChangeAsync = function (e) { + return new Promise(function (t, n) { + var i = !1, + r = function () { + window.removeEventListener("deviceorientation", r), (i = !0), t(); + }; + e && + setTimeout(function () { + i || (window.removeEventListener("deviceorientation", r), n("WaitForOrientationChangeAsync timed out")); + }, e), + "undefined" != typeof DeviceOrientationEvent && "function" == typeof DeviceOrientationEvent.requestPermission + ? DeviceOrientationEvent.requestPermission() + .then(function (e) { + "granted" == e ? window.addEventListener("deviceorientation", r) : $e.b.Warn("Permission not granted."); + }) + .catch(function (e) { + $e.b.Error(e); + }) + : window.addEventListener("deviceorientation", r); + }); + }), + Object.defineProperty(e.prototype, "camera", { + get: function () { + return this._camera; + }, + set: function (e) { + var t = this; + (this._camera = e), + null == this._camera || this._camera.rotationQuaternion || (this._camera.rotationQuaternion = new a.b()), + this._camera && + this._camera.onDisposeObservable.add(function () { + t._onDeviceOrientationChangedObservable.clear(); + }); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attachControl = function (e, t) { + var n = this, + i = this.camera.getScene().getEngine().getHostWindow(); + if (i) { + var r = function () { + i.addEventListener("orientationchange", n._orientationChanged), i.addEventListener("deviceorientation", n._deviceOrientation), n._orientationChanged(); + }; + "undefined" != typeof DeviceOrientationEvent && "function" == typeof DeviceOrientationEvent.requestPermission + ? DeviceOrientationEvent.requestPermission() + .then(function (e) { + "granted" === e ? r() : $e.b.Warn("Permission not granted."); + }) + .catch(function (e) { + $e.b.Error(e); + }) + : r(); + } + }), + (e.prototype.detachControl = function (e) { + window.removeEventListener("orientationchange", this._orientationChanged), window.removeEventListener("deviceorientation", this._deviceOrientation), (this._alpha = 0); + }), + (e.prototype.checkInputs = function () { + this._alpha && + (a.b.RotationYawPitchRollToRef($e.b.ToRadians(this._alpha), $e.b.ToRadians(this._beta), -$e.b.ToRadians(this._gamma), this.camera.rotationQuaternion), + this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion), + this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform), + (this._camera.rotationQuaternion.z *= -1), + (this._camera.rotationQuaternion.w *= -1)); + }), + (e.prototype.getClassName = function () { + return "FreeCameraDeviceOrientationInput"; + }), + (e.prototype.getSimpleName = function () { + return "deviceOrientation"; + }), + e + ); + })(); + We.a.FreeCameraDeviceOrientationInput = ut; + var ht = (function () { + function e() { + (this.gamepadAngularSensibility = 200), + (this.gamepadMoveSensibility = 40), + (this._yAxisScale = 1), + (this._cameraTransform = a.a.Identity()), + (this._deltaTransform = a.e.Zero()), + (this._vector3 = a.e.Zero()), + (this._vector2 = a.d.Zero()); + } + return ( + Object.defineProperty(e.prototype, "invertYAxis", { + get: function () { + return 1 !== this._yAxisScale; + }, + set: function (e) { + this._yAxisScale = e ? -1 : 1; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attachControl = function (e, t) { + var n = this, + i = this.camera.getScene().gamepadManager; + (this._onGamepadConnectedObserver = i.onGamepadConnectedObservable.add(function (e) { + e.type !== Ye.POSE_ENABLED && ((n.gamepad && e.type !== Ye.XBOX) || (n.gamepad = e)); + })), + (this._onGamepadDisconnectedObserver = i.onGamepadDisconnectedObservable.add(function (e) { + n.gamepad === e && (n.gamepad = null); + })), + (this.gamepad = i.getGamepadByType(Ye.XBOX)); + }), + (e.prototype.detachControl = function (e) { + this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver), + this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver), + (this.gamepad = null); + }), + (e.prototype.checkInputs = function () { + if (this.gamepad && this.gamepad.leftStick) { + var e = this.camera, + t = this.gamepad.leftStick, + n = t.x / this.gamepadMoveSensibility, + i = t.y / this.gamepadMoveSensibility; + (t.x = Math.abs(n) > 0.005 ? 0 + n : 0), (t.y = Math.abs(i) > 0.005 ? 0 + i : 0); + var r = this.gamepad.rightStick; + if (r) { + var o = r.x / this.gamepadAngularSensibility, + s = (r.y / this.gamepadAngularSensibility) * this._yAxisScale; + (r.x = Math.abs(o) > 0.001 ? 0 + o : 0), (r.y = Math.abs(s) > 0.001 ? 0 + s : 0); + } else r = { x: 0, y: 0 }; + e.rotationQuaternion ? e.rotationQuaternion.toRotationMatrix(this._cameraTransform) : a.a.RotationYawPitchRollToRef(e.rotation.y, e.rotation.x, 0, this._cameraTransform); + var c = 50 * e._computeLocalCameraSpeed(); + this._vector3.copyFromFloats(t.x * c, 0, -t.y * c), + a.e.TransformCoordinatesToRef(this._vector3, this._cameraTransform, this._deltaTransform), + e.cameraDirection.addInPlace(this._deltaTransform), + this._vector2.copyFromFloats(r.y, r.x), + e.cameraRotation.addInPlace(this._vector2); + } + }), + (e.prototype.getClassName = function () { + return "FreeCameraGamepadInput"; + }), + (e.prototype.getSimpleName = function () { + return "gamepad"; + }), + Object(h.c)([Object(He.c)()], e.prototype, "gamepadAngularSensibility", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "gamepadMoveSensibility", void 0), + e + ); + })(); + We.a.FreeCameraGamepadInput = ht; + var dt, + pt = n(194), + ft = n(195), + mt = n(196), + gt = n(151); + !(function (e) { + (e[(e.X = 0)] = "X"), (e[(e.Y = 1)] = "Y"), (e[(e.Z = 2)] = "Z"); + })(dt || (dt = {})); + var bt = (function () { + function e(t) { + var n = this; + if ( + ((this._leftJoystick = !!t), + e._globalJoystickIndex++, + (this._axisTargetedByLeftAndRight = dt.X), + (this._axisTargetedByUpAndDown = dt.Y), + (this.reverseLeftRight = !1), + (this.reverseUpDown = !1), + (this._touches = new gt.a()), + (this.deltaPosition = a.e.Zero()), + (this._joystickSensibility = 25), + (this._inversedSensibility = 1 / (this._joystickSensibility / 1e3)), + (this._onResize = function (t) { + (e.vjCanvasWidth = window.innerWidth), (e.vjCanvasHeight = window.innerHeight), e.Canvas && ((e.Canvas.width = e.vjCanvasWidth), (e.Canvas.height = e.vjCanvasHeight)), (e.halfWidth = e.vjCanvasWidth / 2); + }), + !e.Canvas) + ) { + window.addEventListener("resize", this._onResize, !1), + (e.Canvas = document.createElement("canvas")), + (e.vjCanvasWidth = window.innerWidth), + (e.vjCanvasHeight = window.innerHeight), + (e.Canvas.width = window.innerWidth), + (e.Canvas.height = window.innerHeight), + (e.Canvas.style.width = "100%"), + (e.Canvas.style.height = "100%"), + (e.Canvas.style.position = "absolute"), + (e.Canvas.style.backgroundColor = "transparent"), + (e.Canvas.style.top = "0px"), + (e.Canvas.style.left = "0px"), + (e.Canvas.style.zIndex = "5"), + (e.Canvas.style.msTouchAction = "none"), + e.Canvas.setAttribute("touch-action", "none"); + var i = e.Canvas.getContext("2d"); + if (!i) throw new Error("Unable to create canvas for virtual joystick"); + (e.vjCanvasContext = i), (e.vjCanvasContext.strokeStyle = "#ffffff"), (e.vjCanvasContext.lineWidth = 2), document.body.appendChild(e.Canvas); + } + (e.halfWidth = e.Canvas.width / 2), + (this.pressed = !1), + (this._joystickColor = "cyan"), + (this._joystickPointerID = -1), + (this._joystickPointerPos = new a.d(0, 0)), + (this._joystickPreviousPointerPos = new a.d(0, 0)), + (this._joystickPointerStartPos = new a.d(0, 0)), + (this._deltaJoystickVector = new a.d(0, 0)), + (this._onPointerDownHandlerRef = function (e) { + n._onPointerDown(e); + }), + (this._onPointerMoveHandlerRef = function (e) { + n._onPointerMove(e); + }), + (this._onPointerUpHandlerRef = function (e) { + n._onPointerUp(e); + }), + e.Canvas.addEventListener("pointerdown", this._onPointerDownHandlerRef, !1), + e.Canvas.addEventListener("pointermove", this._onPointerMoveHandlerRef, !1), + e.Canvas.addEventListener("pointerup", this._onPointerUpHandlerRef, !1), + e.Canvas.addEventListener("pointerout", this._onPointerUpHandlerRef, !1), + e.Canvas.addEventListener( + "contextmenu", + function (e) { + e.preventDefault(); + }, + !1 + ), + requestAnimationFrame(function () { + n._drawVirtualJoystick(); + }); + } + return ( + (e.prototype.setJoystickSensibility = function (e) { + (this._joystickSensibility = e), (this._inversedSensibility = 1 / (this._joystickSensibility / 1e3)); + }), + (e.prototype._onPointerDown = function (t) { + t.preventDefault(), + (!0 === this._leftJoystick ? t.clientX < e.halfWidth : t.clientX > e.halfWidth) && this._joystickPointerID < 0 + ? ((this._joystickPointerID = t.pointerId), + (this._joystickPointerStartPos.x = t.clientX), + (this._joystickPointerStartPos.y = t.clientY), + (this._joystickPointerPos = this._joystickPointerStartPos.clone()), + (this._joystickPreviousPointerPos = this._joystickPointerStartPos.clone()), + (this._deltaJoystickVector.x = 0), + (this._deltaJoystickVector.y = 0), + (this.pressed = !0), + this._touches.add(t.pointerId.toString(), t)) + : e._globalJoystickIndex < 2 && this._action && (this._action(), this._touches.add(t.pointerId.toString(), { x: t.clientX, y: t.clientY, prevX: t.clientX, prevY: t.clientY })); + }), + (e.prototype._onPointerMove = function (e) { + if (this._joystickPointerID == e.pointerId) { + (this._joystickPointerPos.x = e.clientX), + (this._joystickPointerPos.y = e.clientY), + (this._deltaJoystickVector = this._joystickPointerPos.clone()), + (this._deltaJoystickVector = this._deltaJoystickVector.subtract(this._joystickPointerStartPos)); + var t = ((this.reverseLeftRight ? -1 : 1) * this._deltaJoystickVector.x) / this._inversedSensibility; + switch (this._axisTargetedByLeftAndRight) { + case dt.X: + this.deltaPosition.x = Math.min(1, Math.max(-1, t)); + break; + case dt.Y: + this.deltaPosition.y = Math.min(1, Math.max(-1, t)); + break; + case dt.Z: + this.deltaPosition.z = Math.min(1, Math.max(-1, t)); + } + var n = ((this.reverseUpDown ? 1 : -1) * this._deltaJoystickVector.y) / this._inversedSensibility; + switch (this._axisTargetedByUpAndDown) { + case dt.X: + this.deltaPosition.x = Math.min(1, Math.max(-1, n)); + break; + case dt.Y: + this.deltaPosition.y = Math.min(1, Math.max(-1, n)); + break; + case dt.Z: + this.deltaPosition.z = Math.min(1, Math.max(-1, n)); + } + } else { + var i = this._touches.get(e.pointerId.toString()); + i && ((i.x = e.clientX), (i.y = e.clientY)); + } + }), + (e.prototype._onPointerUp = function (t) { + if (this._joystickPointerID == t.pointerId) + e.vjCanvasContext.clearRect(this._joystickPointerStartPos.x - 64, this._joystickPointerStartPos.y - 64, 128, 128), + e.vjCanvasContext.clearRect(this._joystickPreviousPointerPos.x - 42, this._joystickPreviousPointerPos.y - 42, 84, 84), + (this._joystickPointerID = -1), + (this.pressed = !1); + else { + var n = this._touches.get(t.pointerId.toString()); + n && e.vjCanvasContext.clearRect(n.prevX - 44, n.prevY - 44, 88, 88); + } + (this._deltaJoystickVector.x = 0), (this._deltaJoystickVector.y = 0), this._touches.remove(t.pointerId.toString()); + }), + (e.prototype.setJoystickColor = function (e) { + this._joystickColor = e; + }), + (e.prototype.setActionOnTouch = function (e) { + this._action = e; + }), + (e.prototype.setAxisForLeftRight = function (e) { + switch (e) { + case dt.X: + case dt.Y: + case dt.Z: + this._axisTargetedByLeftAndRight = e; + break; + default: + this._axisTargetedByLeftAndRight = dt.X; + } + }), + (e.prototype.setAxisForUpDown = function (e) { + switch (e) { + case dt.X: + case dt.Y: + case dt.Z: + this._axisTargetedByUpAndDown = e; + break; + default: + this._axisTargetedByUpAndDown = dt.Y; + } + }), + (e.prototype._drawVirtualJoystick = function () { + var t = this; + this.pressed && + this._touches.forEach(function (n, i) { + i.pointerId === t._joystickPointerID + ? (e.vjCanvasContext.clearRect(t._joystickPointerStartPos.x - 64, t._joystickPointerStartPos.y - 64, 128, 128), + e.vjCanvasContext.clearRect(t._joystickPreviousPointerPos.x - 42, t._joystickPreviousPointerPos.y - 42, 84, 84), + e.vjCanvasContext.beginPath(), + (e.vjCanvasContext.lineWidth = 6), + (e.vjCanvasContext.strokeStyle = t._joystickColor), + e.vjCanvasContext.arc(t._joystickPointerStartPos.x, t._joystickPointerStartPos.y, 40, 0, 2 * Math.PI, !0), + e.vjCanvasContext.stroke(), + e.vjCanvasContext.closePath(), + e.vjCanvasContext.beginPath(), + (e.vjCanvasContext.strokeStyle = t._joystickColor), + (e.vjCanvasContext.lineWidth = 2), + e.vjCanvasContext.arc(t._joystickPointerStartPos.x, t._joystickPointerStartPos.y, 60, 0, 2 * Math.PI, !0), + e.vjCanvasContext.stroke(), + e.vjCanvasContext.closePath(), + e.vjCanvasContext.beginPath(), + (e.vjCanvasContext.strokeStyle = t._joystickColor), + e.vjCanvasContext.arc(t._joystickPointerPos.x, t._joystickPointerPos.y, 40, 0, 2 * Math.PI, !0), + e.vjCanvasContext.stroke(), + e.vjCanvasContext.closePath(), + (t._joystickPreviousPointerPos = t._joystickPointerPos.clone())) + : (e.vjCanvasContext.clearRect(i.prevX - 44, i.prevY - 44, 88, 88), + e.vjCanvasContext.beginPath(), + (e.vjCanvasContext.fillStyle = "white"), + e.vjCanvasContext.beginPath(), + (e.vjCanvasContext.strokeStyle = "red"), + (e.vjCanvasContext.lineWidth = 6), + e.vjCanvasContext.arc(i.x, i.y, 40, 0, 2 * Math.PI, !0), + e.vjCanvasContext.stroke(), + e.vjCanvasContext.closePath(), + (i.prevX = i.x), + (i.prevY = i.y)); + }), + requestAnimationFrame(function () { + t._drawVirtualJoystick(); + }); + }), + (e.prototype.releaseCanvas = function () { + e.Canvas && + (e.Canvas.removeEventListener("pointerdown", this._onPointerDownHandlerRef), + e.Canvas.removeEventListener("pointermove", this._onPointerMoveHandlerRef), + e.Canvas.removeEventListener("pointerup", this._onPointerUpHandlerRef), + e.Canvas.removeEventListener("pointerout", this._onPointerUpHandlerRef), + window.removeEventListener("resize", this._onResize), + document.body.removeChild(e.Canvas), + (e.Canvas = null)); + }), + (e._globalJoystickIndex = 0), + e + ); + })(); + lt.a.prototype.addVirtualJoystick = function () { + return this.add(new _t()), this; + }; + var _t = (function () { + function e() {} + return ( + (e.prototype.getLeftJoystick = function () { + return this._leftjoystick; + }), + (e.prototype.getRightJoystick = function () { + return this._rightjoystick; + }), + (e.prototype.checkInputs = function () { + if (this._leftjoystick) { + var e = this.camera, + t = 50 * e._computeLocalCameraSpeed(), + n = a.a.RotationYawPitchRoll(e.rotation.y, e.rotation.x, 0), + i = a.e.TransformCoordinates(new a.e(this._leftjoystick.deltaPosition.x * t, this._leftjoystick.deltaPosition.y * t, this._leftjoystick.deltaPosition.z * t), n); + (e.cameraDirection = e.cameraDirection.add(i)), + (e.cameraRotation = e.cameraRotation.addVector3(this._rightjoystick.deltaPosition)), + this._leftjoystick.pressed || (this._leftjoystick.deltaPosition = this._leftjoystick.deltaPosition.scale(0.9)), + this._rightjoystick.pressed || (this._rightjoystick.deltaPosition = this._rightjoystick.deltaPosition.scale(0.9)); + } + }), + (e.prototype.attachControl = function (e, t) { + (this._leftjoystick = new bt(!0)), + this._leftjoystick.setAxisForUpDown(dt.Z), + this._leftjoystick.setAxisForLeftRight(dt.X), + this._leftjoystick.setJoystickSensibility(0.15), + (this._rightjoystick = new bt(!1)), + this._rightjoystick.setAxisForUpDown(dt.X), + this._rightjoystick.setAxisForLeftRight(dt.Y), + (this._rightjoystick.reverseUpDown = !0), + this._rightjoystick.setJoystickSensibility(0.05), + this._rightjoystick.setJoystickColor("yellow"); + }), + (e.prototype.detachControl = function (e) { + this._leftjoystick.releaseCanvas(), this._rightjoystick.releaseCanvas(); + }), + (e.prototype.getClassName = function () { + return "FreeCameraVirtualJoystickInput"; + }), + (e.prototype.getSimpleName = function () { + return "virtualJoystick"; + }), + e + ); + })(); + We.a.FreeCameraVirtualJoystickInput = _t; + var vt = n(102), + yt = n(67), + Ct = n(35); + Ct.a.AddNodeConstructor("TouchCamera", function (e, t) { + return function () { + return new Pt(e, a.e.Zero(), t); + }; + }); + var Pt = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + return r.inputs.addTouch(), r._setupInputs(), r; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "touchAngularSensibility", { + get: function () { + var e = this.inputs.attached.touch; + return e ? e.touchAngularSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.touch; + t && (t.touchAngularSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "touchMoveSensibility", { + get: function () { + var e = this.inputs.attached.touch; + return e ? e.touchMoveSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.touch; + t && (t.touchMoveSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "TouchCamera"; + }), + (t.prototype._setupInputs = function () { + var e = this.inputs.attached.mouse; + e && (e.touchEnabled = !1); + }), + t + ); + })(yt.a); + Ct.a.AddNodeConstructor("ArcRotateCamera", function (e, t) { + return function () { + return new xt(e, 0, 0, 1, a.e.Zero(), t); + }; + }); + var xt = (function (e) { + function t(t, n, i, r, s, c, l) { + void 0 === l && (l = !0); + var u = e.call(this, t, a.e.Zero(), c, l) || this; + return ( + (u._upVector = a.e.Up()), + (u.inertialAlphaOffset = 0), + (u.inertialBetaOffset = 0), + (u.inertialRadiusOffset = 0), + (u.lowerAlphaLimit = null), + (u.upperAlphaLimit = null), + (u.lowerBetaLimit = 0.01), + (u.upperBetaLimit = Math.PI - 0.01), + (u.lowerRadiusLimit = null), + (u.upperRadiusLimit = null), + (u.inertialPanningX = 0), + (u.inertialPanningY = 0), + (u.pinchToPanMaxDistance = 20), + (u.panningDistanceLimit = null), + (u.panningOriginTarget = a.e.Zero()), + (u.panningInertia = 0.9), + (u.zoomOnFactor = 1), + (u.targetScreenOffset = a.d.Zero()), + (u.allowUpsideDown = !0), + (u.useInputToRestoreState = !0), + (u._viewMatrix = new a.a()), + (u.panningAxis = new a.e(1, 1, 0)), + (u.onMeshTargetChangedObservable = new o.c()), + (u.checkCollisions = !1), + (u.collisionRadius = new a.e(0.5, 0.5, 0.5)), + (u._previousPosition = a.e.Zero()), + (u._collisionVelocity = a.e.Zero()), + (u._newPosition = a.e.Zero()), + (u._computationVector = a.e.Zero()), + (u._onCollisionPositionChange = function (e, t, n) { + void 0 === n && (n = null), n ? (u.setPosition(t), u.onCollide && u.onCollide(n)) : u._previousPosition.copyFrom(u._position); + var i = Math.cos(u.alpha), + r = Math.sin(u.alpha), + o = Math.cos(u.beta), + a = Math.sin(u.beta); + 0 === a && (a = 1e-4); + var s = u._getTargetPosition(); + u._computationVector.copyFromFloats(u.radius * i * a, u.radius * o, u.radius * r * a), s.addToRef(u._computationVector, u._newPosition), u._position.copyFrom(u._newPosition); + var c = u.upVector; + u.allowUpsideDown && u.beta < 0 && (c = (c = c.clone()).negate()), + u._computeViewMatrix(u._position, s, c), + u._viewMatrix.addAtIndex(12, u.targetScreenOffset.x), + u._viewMatrix.addAtIndex(13, u.targetScreenOffset.y), + (u._collisionTriggered = !1); + }), + (u._target = a.e.Zero()), + s && u.setTarget(s), + (u.alpha = n), + (u.beta = i), + (u.radius = r), + u.getViewMatrix(), + (u.inputs = new nt(u)), + u.inputs.addKeyboard().addMouseWheel().addPointers(), + u + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "target", { + get: function () { + return this._target; + }, + set: function (e) { + this.setTarget(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._position; + }, + set: function (e) { + this.setPosition(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "upVector", { + get: function () { + return this._upVector; + }, + set: function (e) { + this._upToYMatrix || ((this._YToUpMatrix = new a.a()), (this._upToYMatrix = new a.a()), (this._upVector = a.e.Zero())), e.normalize(), this._upVector.copyFrom(e), this.setMatUp(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setMatUp = function () { + a.a.RotationAlignToRef(a.e.UpReadOnly, this._upVector, this._YToUpMatrix), a.a.RotationAlignToRef(this._upVector, a.e.UpReadOnly, this._upToYMatrix); + }), + Object.defineProperty(t.prototype, "angularSensibilityX", { + get: function () { + var e = this.inputs.attached.pointers; + return e ? e.angularSensibilityX : 0; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.angularSensibilityX = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "angularSensibilityY", { + get: function () { + var e = this.inputs.attached.pointers; + return e ? e.angularSensibilityY : 0; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.angularSensibilityY = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "pinchPrecision", { + get: function () { + var e = this.inputs.attached.pointers; + return e ? e.pinchPrecision : 0; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.pinchPrecision = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "pinchDeltaPercentage", { + get: function () { + var e = this.inputs.attached.pointers; + return e ? e.pinchDeltaPercentage : 0; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.pinchDeltaPercentage = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useNaturalPinchZoom", { + get: function () { + var e = this.inputs.attached.pointers; + return !!e && e.useNaturalPinchZoom; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.useNaturalPinchZoom = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "panningSensibility", { + get: function () { + var e = this.inputs.attached.pointers; + return e ? e.panningSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.pointers; + t && (t.panningSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysUp", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysUp : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysUp = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysDown", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysDown : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysDown = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysLeft", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysLeft : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysLeft = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysRight", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysRight : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysRight = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "wheelPrecision", { + get: function () { + var e = this.inputs.attached.mousewheel; + return e ? e.wheelPrecision : 0; + }, + set: function (e) { + var t = this.inputs.attached.mousewheel; + t && (t.wheelPrecision = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "wheelDeltaPercentage", { + get: function () { + var e = this.inputs.attached.mousewheel; + return e ? e.wheelDeltaPercentage : 0; + }, + set: function (e) { + var t = this.inputs.attached.mousewheel; + t && (t.wheelDeltaPercentage = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bouncingBehavior", { + get: function () { + return this._bouncingBehavior; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useBouncingBehavior", { + get: function () { + return null != this._bouncingBehavior; + }, + set: function (e) { + e !== this.useBouncingBehavior && + (e ? ((this._bouncingBehavior = new Pe()), this.addBehavior(this._bouncingBehavior)) : this._bouncingBehavior && (this.removeBehavior(this._bouncingBehavior), (this._bouncingBehavior = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "framingBehavior", { + get: function () { + return this._framingBehavior; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useFramingBehavior", { + get: function () { + return null != this._framingBehavior; + }, + set: function (e) { + e !== this.useFramingBehavior && + (e ? ((this._framingBehavior = new xe()), this.addBehavior(this._framingBehavior)) : this._framingBehavior && (this.removeBehavior(this._framingBehavior), (this._framingBehavior = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "autoRotationBehavior", { + get: function () { + return this._autoRotationBehavior; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useAutoRotationBehavior", { + get: function () { + return null != this._autoRotationBehavior; + }, + set: function (e) { + e !== this.useAutoRotationBehavior && + (e + ? ((this._autoRotationBehavior = new Ce()), this.addBehavior(this._autoRotationBehavior)) + : this._autoRotationBehavior && (this.removeBehavior(this._autoRotationBehavior), (this._autoRotationBehavior = null))); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._initCache = function () { + e.prototype._initCache.call(this), + (this._cache._target = new a.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), + (this._cache.alpha = void 0), + (this._cache.beta = void 0), + (this._cache.radius = void 0), + (this._cache.targetScreenOffset = a.d.Zero()); + }), + (t.prototype._updateCache = function (t) { + t || e.prototype._updateCache.call(this), + this._cache._target.copyFrom(this._getTargetPosition()), + (this._cache.alpha = this.alpha), + (this._cache.beta = this.beta), + (this._cache.radius = this.radius), + this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset); + }), + (t.prototype._getTargetPosition = function () { + if (this._targetHost && this._targetHost.getAbsolutePosition) { + var e = this._targetHost.absolutePosition; + this._targetBoundingCenter ? e.addToRef(this._targetBoundingCenter, this._target) : this._target.copyFrom(e); + } + var t = this._getLockedTargetPosition(); + return t || this._target; + }), + (t.prototype.storeState = function () { + return ( + (this._storedAlpha = this.alpha), + (this._storedBeta = this.beta), + (this._storedRadius = this.radius), + (this._storedTarget = this._getTargetPosition().clone()), + (this._storedTargetScreenOffset = this.targetScreenOffset.clone()), + e.prototype.storeState.call(this) + ); + }), + (t.prototype._restoreStateValues = function () { + return ( + !!e.prototype._restoreStateValues.call(this) && + (this.setTarget(this._storedTarget.clone()), + (this.alpha = this._storedAlpha), + (this.beta = this._storedBeta), + (this.radius = this._storedRadius), + (this.targetScreenOffset = this._storedTargetScreenOffset.clone()), + (this.inertialAlphaOffset = 0), + (this.inertialBetaOffset = 0), + (this.inertialRadiusOffset = 0), + (this.inertialPanningX = 0), + (this.inertialPanningY = 0), + !0) + ); + }), + (t.prototype._isSynchronizedViewMatrix = function () { + return ( + !!e.prototype._isSynchronizedViewMatrix.call(this) && + this._cache._target.equals(this._getTargetPosition()) && + this._cache.alpha === this.alpha && + this._cache.beta === this.beta && + this._cache.radius === this.radius && + this._cache.targetScreenOffset.equals(this.targetScreenOffset) + ); + }), + (t.prototype.attachControl = function (e, t, n, i) { + var r = this; + void 0 === n && (n = !0), + void 0 === i && (i = 2), + (this._useCtrlForPanning = n), + (this._panningMouseButton = i), + this.inputs.attachElement(e, t), + (this._reset = function () { + (r.inertialAlphaOffset = 0), (r.inertialBetaOffset = 0), (r.inertialRadiusOffset = 0), (r.inertialPanningX = 0), (r.inertialPanningY = 0); + }); + }), + (t.prototype.detachControl = function (e) { + this.inputs.detachElement(e), this._reset && this._reset(); + }), + (t.prototype._checkInputs = function () { + if (!this._collisionTriggered) { + if ((this.inputs.checkInputs(), 0 !== this.inertialAlphaOffset || 0 !== this.inertialBetaOffset || 0 !== this.inertialRadiusOffset)) { + var t = this.inertialAlphaOffset; + this.beta <= 0 && (t *= -1), + this.getScene().useRightHandedSystem && (t *= -1), + this.parent && this.parent._getWorldMatrixDeterminant() < 0 && (t *= -1), + (this.alpha += t), + (this.beta += this.inertialBetaOffset), + (this.radius -= this.inertialRadiusOffset), + (this.inertialAlphaOffset *= this.inertia), + (this.inertialBetaOffset *= this.inertia), + (this.inertialRadiusOffset *= this.inertia), + Math.abs(this.inertialAlphaOffset) < j.a && (this.inertialAlphaOffset = 0), + Math.abs(this.inertialBetaOffset) < j.a && (this.inertialBetaOffset = 0), + Math.abs(this.inertialRadiusOffset) < this.speed * j.a && (this.inertialRadiusOffset = 0); + } + if (0 !== this.inertialPanningX || 0 !== this.inertialPanningY) { + if ( + (this._localDirection || ((this._localDirection = a.e.Zero()), (this._transformedDirection = a.e.Zero())), + this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY), + this._localDirection.multiplyInPlace(this.panningAxis), + this._viewMatrix.invertToRef(this._cameraTransformMatrix), + a.e.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection), + this.panningAxis.y || (this._transformedDirection.y = 0), + !this._targetHost) + ) + if (this.panningDistanceLimit) + this._transformedDirection.addInPlace(this._target), + a.e.DistanceSquared(this._transformedDirection, this.panningOriginTarget) <= this.panningDistanceLimit * this.panningDistanceLimit && this._target.copyFrom(this._transformedDirection); + else this._target.addInPlace(this._transformedDirection); + (this.inertialPanningX *= this.panningInertia), + (this.inertialPanningY *= this.panningInertia), + Math.abs(this.inertialPanningX) < this.speed * j.a && (this.inertialPanningX = 0), + Math.abs(this.inertialPanningY) < this.speed * j.a && (this.inertialPanningY = 0); + } + this._checkLimits(), e.prototype._checkInputs.call(this); + } + }), + (t.prototype._checkLimits = function () { + null === this.lowerBetaLimit || void 0 === this.lowerBetaLimit + ? this.allowUpsideDown && this.beta > Math.PI && (this.beta = this.beta - 2 * Math.PI) + : this.beta < this.lowerBetaLimit && (this.beta = this.lowerBetaLimit), + null === this.upperBetaLimit || void 0 === this.upperBetaLimit + ? this.allowUpsideDown && this.beta < -Math.PI && (this.beta = this.beta + 2 * Math.PI) + : this.beta > this.upperBetaLimit && (this.beta = this.upperBetaLimit), + null !== this.lowerAlphaLimit && this.alpha < this.lowerAlphaLimit && (this.alpha = this.lowerAlphaLimit), + null !== this.upperAlphaLimit && this.alpha > this.upperAlphaLimit && (this.alpha = this.upperAlphaLimit), + null !== this.lowerRadiusLimit && this.radius < this.lowerRadiusLimit && ((this.radius = this.lowerRadiusLimit), (this.inertialRadiusOffset = 0)), + null !== this.upperRadiusLimit && this.radius > this.upperRadiusLimit && ((this.radius = this.upperRadiusLimit), (this.inertialRadiusOffset = 0)); + }), + (t.prototype.rebuildAnglesAndRadius = function () { + this._position.subtractToRef(this._getTargetPosition(), this._computationVector), + (0 === this._upVector.x && 1 === this._upVector.y && 0 === this._upVector.z) || a.e.TransformCoordinatesToRef(this._computationVector, this._upToYMatrix, this._computationVector), + (this.radius = this._computationVector.length()), + 0 === this.radius && (this.radius = 1e-4), + 0 === this._computationVector.x && 0 === this._computationVector.z + ? (this.alpha = Math.PI / 2) + : (this.alpha = Math.acos(this._computationVector.x / Math.sqrt(Math.pow(this._computationVector.x, 2) + Math.pow(this._computationVector.z, 2)))), + this._computationVector.z < 0 && (this.alpha = 2 * Math.PI - this.alpha), + (this.beta = Math.acos(this._computationVector.y / this.radius)), + this._checkLimits(); + }), + (t.prototype.setPosition = function (e) { + this._position.equals(e) || (this._position.copyFrom(e), this.rebuildAnglesAndRadius()); + }), + (t.prototype.setTarget = function (e, t, n) { + if ((void 0 === t && (t = !1), void 0 === n && (n = !1), e.getBoundingInfo)) + (this._targetBoundingCenter = t ? e.getBoundingInfo().boundingBox.centerWorld.clone() : null), + e.computeWorldMatrix(), + (this._targetHost = e), + (this._target = this._getTargetPosition()), + this.onMeshTargetChangedObservable.notifyObservers(this._targetHost); + else { + var i = e, + r = this._getTargetPosition(); + if (r && !n && r.equals(i)) return; + (this._targetHost = null), (this._target = i), (this._targetBoundingCenter = null), this.onMeshTargetChangedObservable.notifyObservers(null); + } + this.rebuildAnglesAndRadius(); + }), + (t.prototype._getViewMatrix = function () { + var e = Math.cos(this.alpha), + t = Math.sin(this.alpha), + n = Math.cos(this.beta), + i = Math.sin(this.beta); + 0 === i && (i = 1e-4); + var r = this._getTargetPosition(); + if ( + (this._computationVector.copyFromFloats(this.radius * e * i, this.radius * n, this.radius * t * i), + (0 === this._upVector.x && 1 === this._upVector.y && 0 === this._upVector.z) || a.e.TransformCoordinatesToRef(this._computationVector, this._YToUpMatrix, this._computationVector), + r.addToRef(this._computationVector, this._newPosition), + this.getScene().collisionsEnabled && this.checkCollisions) + ) { + var o = this.getScene().collisionCoordinator; + this._collider || (this._collider = o.createCollider()), + (this._collider._radius = this.collisionRadius), + this._newPosition.subtractToRef(this._position, this._collisionVelocity), + (this._collisionTriggered = !0), + o.getNewPosition(this._position, this._collisionVelocity, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId); + } else { + this._position.copyFrom(this._newPosition); + var s = this.upVector; + this.allowUpsideDown && i < 0 && (s = s.negate()), + this._computeViewMatrix(this._position, r, s), + this._viewMatrix.addAtIndex(12, this.targetScreenOffset.x), + this._viewMatrix.addAtIndex(13, this.targetScreenOffset.y); + } + return (this._currentTarget = r), this._viewMatrix; + }), + (t.prototype.zoomOn = function (e, t) { + void 0 === t && (t = !1), (e = e || this.getScene().meshes); + var n = Ee.a.MinMax(e), + i = a.e.Distance(n.min, n.max); + (this.radius = i * this.zoomOnFactor), this.focusOn({ min: n.min, max: n.max, distance: i }, t); + }), + (t.prototype.focusOn = function (e, t) { + var n, i; + if ((void 0 === t && (t = !1), void 0 === e.min)) { + var r = e || this.getScene().meshes; + (n = Ee.a.MinMax(r)), (i = a.e.Distance(n.min, n.max)); + } else { + (n = e), (i = e.distance); + } + (this._target = Ee.a.Center(n)), t || (this.maxZ = 2 * i); + }), + (t.prototype.createRigCamera = function (e, n) { + var i = 0; + switch (this.cameraRigMode) { + case De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH: + case De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: + case De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER: + case De.a.RIG_MODE_STEREOSCOPIC_INTERLACED: + case De.a.RIG_MODE_VR: + i = this._cameraRigParams.stereoHalfAngle * (0 === n ? 1 : -1); + break; + case De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: + i = this._cameraRigParams.stereoHalfAngle * (0 === n ? -1 : 1); + } + var r = new t(e, this.alpha + i, this.beta, this.radius, this._target, this.getScene()); + return (r._cameraRigParams = {}), (r.isRigCamera = !0), (r.rigParent = this), r; + }), + (t.prototype._updateRigCameras = function () { + var t = this._rigCameras[0], + n = this._rigCameras[1]; + switch (((t.beta = n.beta = this.beta), this.cameraRigMode)) { + case De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH: + case De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: + case De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER: + case De.a.RIG_MODE_STEREOSCOPIC_INTERLACED: + case De.a.RIG_MODE_VR: + (t.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle), (n.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle); + break; + case De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: + (t.alpha = this.alpha + this._cameraRigParams.stereoHalfAngle), (n.alpha = this.alpha - this._cameraRigParams.stereoHalfAngle); + } + e.prototype._updateRigCameras.call(this); + }), + (t.prototype.dispose = function () { + this.inputs.clear(), e.prototype.dispose.call(this); + }), + (t.prototype.getClassName = function () { + return "ArcRotateCamera"; + }), + Object(h.c)([Object(He.c)()], t.prototype, "alpha", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "beta", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "radius", void 0), + Object(h.c)([Object(He.o)("target")], t.prototype, "_target", void 0), + Object(h.c)([Object(He.o)("upVector")], t.prototype, "_upVector", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "inertialAlphaOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "inertialBetaOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "inertialRadiusOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerAlphaLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperAlphaLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerBetaLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperBetaLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerRadiusLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperRadiusLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "inertialPanningX", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "inertialPanningY", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "pinchToPanMaxDistance", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "panningDistanceLimit", void 0), + Object(h.c)([Object(He.o)()], t.prototype, "panningOriginTarget", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "panningInertia", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "zoomOnFactor", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "targetScreenOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "allowUpsideDown", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "useInputToRestoreState", void 0), + t + ); + })(vt.a); + Ct.a.AddNodeConstructor("DeviceOrientationCamera", function (e, t) { + return function () { + return new Tt(e, a.e.Zero(), t); + }; + }); + var Tt = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + return ( + (r._tmpDragQuaternion = new a.b()), + (r._disablePointerInputWhenUsingDeviceOrientation = !0), + (r._dragFactor = 0), + (r._quaternionCache = new a.b()), + r.inputs.addDeviceOrientation(), + r.inputs._deviceOrientationInput && + r.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce(function () { + r._disablePointerInputWhenUsingDeviceOrientation && + r.inputs._mouseInput && + ((r.inputs._mouseInput._allowCameraRotation = !1), + r.inputs._mouseInput.onPointerMovedObservable.add(function (e) { + 0 != r._dragFactor && + (r._initialQuaternion || (r._initialQuaternion = new a.b()), + a.b.FromEulerAnglesToRef(0, e.offsetX * r._dragFactor, 0, r._tmpDragQuaternion), + r._initialQuaternion.multiplyToRef(r._tmpDragQuaternion, r._initialQuaternion)); + })); + }), + r + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "disablePointerInputWhenUsingDeviceOrientation", { + get: function () { + return this._disablePointerInputWhenUsingDeviceOrientation; + }, + set: function (e) { + this._disablePointerInputWhenUsingDeviceOrientation = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.enableHorizontalDragging = function (e) { + void 0 === e && (e = 1 / 300), (this._dragFactor = e); + }), + (t.prototype.getClassName = function () { + return "DeviceOrientationCamera"; + }), + (t.prototype._checkInputs = function () { + e.prototype._checkInputs.call(this), this._quaternionCache.copyFrom(this.rotationQuaternion), this._initialQuaternion && this._initialQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion); + }), + (t.prototype.resetToCurrentRotation = function (e) { + var t = this; + void 0 === e && (e = Be.a.Y), + this.rotationQuaternion && + (this._initialQuaternion || (this._initialQuaternion = new a.b()), + this._initialQuaternion.copyFrom(this._quaternionCache || this.rotationQuaternion), + ["x", "y", "z"].forEach(function (n) { + e[n] ? (t._initialQuaternion[n] *= -1) : (t._initialQuaternion[n] = 0); + }), + this._initialQuaternion.normalize(), + this._initialQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion)); + }), + t + ); + })(yt.a), + St = (function (e) { + function t(t) { + return e.call(this, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.addKeyboard = function () { + return this.add(new rt()), this; + }), + (t.prototype.addMouse = function (e) { + return void 0 === e && (e = !0), this.add(new ot(e)), this; + }), + t + ); + })(We.b), + Ot = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = !0); + var o = e.call(this, t, n, i, r) || this; + return ( + (o.ellipsoid = new a.e(1, 1, 1)), + (o.ellipsoidOffset = new a.e(0, 0, 0)), + (o.checkCollisions = !1), + (o.applyGravity = !1), + (o.cameraDirection = a.e.Zero()), + (o._trackRoll = 0), + (o.rollCorrect = 100), + (o.bankedTurn = !1), + (o.bankedTurnLimit = Math.PI / 2), + (o.bankedTurnMultiplier = 1), + (o._needMoveForGravity = !1), + (o._oldPosition = a.e.Zero()), + (o._diffPosition = a.e.Zero()), + (o._newPosition = a.e.Zero()), + (o._collisionMask = -1), + (o._onCollisionPositionChange = function (e, t, n) { + void 0 === n && (n = null); + var i; + (i = t), + o._newPosition.copyFrom(i), + o._newPosition.subtractToRef(o._oldPosition, o._diffPosition), + o._diffPosition.length() > ue.a.CollisionsEpsilon && (o.position.addInPlace(o._diffPosition), o.onCollide && n && o.onCollide(n)); + }), + (o.inputs = new St(o)), + o.inputs.addKeyboard().addMouse(), + o + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "angularSensibility", { + get: function () { + var e = this.inputs.attached.mouse; + return e ? e.angularSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.mouse; + t && (t.angularSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysForward", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysForward : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysForward = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysBackward", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysBackward : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysBackward = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysUp", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysUp : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysUp = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysDown", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysDown : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysDown = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysLeft", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysLeft : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysLeft = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysRight", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysRight : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysRight = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.attachControl = function (e, t) { + this.inputs.attachElement(e, t); + }), + (t.prototype.detachControl = function (e) { + this.inputs.detachElement(e), (this.cameraDirection = new a.e(0, 0, 0)); + }), + Object.defineProperty(t.prototype, "collisionMask", { + get: function () { + return this._collisionMask; + }, + set: function (e) { + this._collisionMask = isNaN(e) ? -1 : e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._collideWithWorld = function (e) { + (this.parent ? a.e.TransformCoordinates(this.position, this.parent.getWorldMatrix()) : this.position).subtractFromFloatsToRef(0, this.ellipsoid.y, 0, this._oldPosition), + this._oldPosition.addInPlace(this.ellipsoidOffset); + var t = this.getScene().collisionCoordinator; + this._collider || (this._collider = t.createCollider()), (this._collider._radius = this.ellipsoid), (this._collider.collisionMask = this._collisionMask); + var n = e; + this.applyGravity && (n = e.add(this.getScene().gravity)), t.getNewPosition(this._oldPosition, n, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId); + }), + (t.prototype._checkInputs = function () { + this._localDirection || ((this._localDirection = a.e.Zero()), (this._transformedDirection = a.e.Zero())), this.inputs.checkInputs(), e.prototype._checkInputs.call(this); + }), + (t.prototype._decideIfNeedsToMove = function () { + return this._needMoveForGravity || Math.abs(this.cameraDirection.x) > 0 || Math.abs(this.cameraDirection.y) > 0 || Math.abs(this.cameraDirection.z) > 0; + }), + (t.prototype._updatePosition = function () { + this.checkCollisions && this.getScene().collisionsEnabled ? this._collideWithWorld(this.cameraDirection) : e.prototype._updatePosition.call(this); + }), + (t.prototype.restoreRoll = function (e) { + var t = this._trackRoll, + n = t - this.rotation.z; + Math.abs(n) >= 0.001 && ((this.rotation.z += n / e), Math.abs(t - this.rotation.z) <= 0.001 && (this.rotation.z = t)); + }), + (t.prototype.dispose = function () { + this.inputs.clear(), e.prototype.dispose.call(this); + }), + (t.prototype.getClassName = function () { + return "FlyCamera"; + }), + Object(h.c)([Object(He.o)()], t.prototype, "ellipsoid", void 0), + Object(h.c)([Object(He.o)()], t.prototype, "ellipsoidOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "checkCollisions", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "applyGravity", void 0), + t + ); + })(vt.a), + Et = (function (e) { + function t(t) { + return e.call(this, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.addKeyboard = function () { + return this.add(new at()), this; + }), + (t.prototype.addMouseWheel = function () { + return this.add(new st()), this; + }), + (t.prototype.addPointers = function () { + return this.add(new ct()), this; + }), + (t.prototype.addVRDeviceOrientation = function () { + return this; + }), + t + ); + })(We.b); + Ct.a.AddNodeConstructor("FollowCamera", function (e, t) { + return function () { + return new At(e, a.e.Zero(), t); + }; + }), + Ct.a.AddNodeConstructor("ArcFollowCamera", function (e, t) { + return function () { + return new It(e, 0, 0, 1, null, t); + }; + }); + var Mt, + At = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = null); + var o = e.call(this, t, n, i) || this; + return ( + (o.radius = 12), + (o.lowerRadiusLimit = null), + (o.upperRadiusLimit = null), + (o.rotationOffset = 0), + (o.lowerRotationOffsetLimit = null), + (o.upperRotationOffsetLimit = null), + (o.heightOffset = 4), + (o.lowerHeightOffsetLimit = null), + (o.upperHeightOffsetLimit = null), + (o.cameraAcceleration = 0.05), + (o.maxCameraSpeed = 20), + (o.lockedTarget = r), + (o.inputs = new Et(o)), + o.inputs.addKeyboard().addMouseWheel().addPointers(), + o + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._follow = function (e) { + if (e) { + var t; + if (e.rotationQuaternion) { + var n = new a.a(); + e.rotationQuaternion.toRotationMatrix(n), (t = Math.atan2(n.m[8], n.m[10])); + } else t = e.rotation.y; + var i = $e.b.ToRadians(this.rotationOffset) + t, + r = e.getAbsolutePosition(), + o = r.x + Math.sin(i) * this.radius, + s = r.z + Math.cos(i) * this.radius, + c = o - this.position.x, + l = r.y + this.heightOffset - this.position.y, + u = s - this.position.z, + h = c * this.cameraAcceleration * 2, + d = l * this.cameraAcceleration, + p = u * this.cameraAcceleration * 2; + (h > this.maxCameraSpeed || h < -this.maxCameraSpeed) && (h = h < 1 ? -this.maxCameraSpeed : this.maxCameraSpeed), + (d > this.maxCameraSpeed || d < -this.maxCameraSpeed) && (d = d < 1 ? -this.maxCameraSpeed : this.maxCameraSpeed), + (p > this.maxCameraSpeed || p < -this.maxCameraSpeed) && (p = p < 1 ? -this.maxCameraSpeed : this.maxCameraSpeed), + (this.position = new a.e(this.position.x + h, this.position.y + d, this.position.z + p)), + this.setTarget(r); + } + }), + (t.prototype.attachControl = function (e, t) { + this.inputs.attachElement(e, t), (this._reset = function () {}); + }), + (t.prototype.detachControl = function (e) { + this.inputs.detachElement(e), this._reset && this._reset(); + }), + (t.prototype._checkInputs = function () { + this.inputs.checkInputs(), this._checkLimits(), e.prototype._checkInputs.call(this), this.lockedTarget && this._follow(this.lockedTarget); + }), + (t.prototype._checkLimits = function () { + null !== this.lowerRadiusLimit && this.radius < this.lowerRadiusLimit && (this.radius = this.lowerRadiusLimit), + null !== this.upperRadiusLimit && this.radius > this.upperRadiusLimit && (this.radius = this.upperRadiusLimit), + null !== this.lowerHeightOffsetLimit && this.heightOffset < this.lowerHeightOffsetLimit && (this.heightOffset = this.lowerHeightOffsetLimit), + null !== this.upperHeightOffsetLimit && this.heightOffset > this.upperHeightOffsetLimit && (this.heightOffset = this.upperHeightOffsetLimit), + null !== this.lowerRotationOffsetLimit && this.rotationOffset < this.lowerRotationOffsetLimit && (this.rotationOffset = this.lowerRotationOffsetLimit), + null !== this.upperRotationOffsetLimit && this.rotationOffset > this.upperRotationOffsetLimit && (this.rotationOffset = this.upperRotationOffsetLimit); + }), + (t.prototype.getClassName = function () { + return "FollowCamera"; + }), + Object(h.c)([Object(He.c)()], t.prototype, "radius", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerRadiusLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperRadiusLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "rotationOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerRotationOffsetLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperRotationOffsetLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "heightOffset", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lowerHeightOffsetLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "upperHeightOffsetLimit", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "cameraAcceleration", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "maxCameraSpeed", void 0), + Object(h.c)([Object(He.k)("lockedTargetId")], t.prototype, "lockedTarget", void 0), + t + ); + })(vt.a), + It = (function (e) { + function t(t, n, i, r, o, s) { + var c = e.call(this, t, a.e.Zero(), s) || this; + return (c.alpha = n), (c.beta = i), (c.radius = r), (c.target = o), (c._cartesianCoordinates = a.e.Zero()), c._follow(), c; + } + return ( + Object(h.d)(t, e), + (t.prototype._follow = function () { + if (this.target) { + (this._cartesianCoordinates.x = this.radius * Math.cos(this.alpha) * Math.cos(this.beta)), + (this._cartesianCoordinates.y = this.radius * Math.sin(this.beta)), + (this._cartesianCoordinates.z = this.radius * Math.sin(this.alpha) * Math.cos(this.beta)); + var e = this.target.getAbsolutePosition(); + (this.position = e.add(this._cartesianCoordinates)), this.setTarget(e); + } + }), + (t.prototype._checkInputs = function () { + e.prototype._checkInputs.call(this), this._follow(); + }), + (t.prototype.getClassName = function () { + return "ArcFollowCamera"; + }), + t + ); + })(vt.a), + Dt = n(56); + !(function (e) { + (e[(e.VIVE = 0)] = "VIVE"), (e[(e.OCULUS = 1)] = "OCULUS"), (e[(e.WINDOWS = 2)] = "WINDOWS"), (e[(e.GEAR_VR = 3)] = "GEAR_VR"), (e[(e.DAYDREAM = 4)] = "DAYDREAM"), (e[(e.GENERIC = 5)] = "GENERIC"); + })(Mt || (Mt = {})); + var Rt, + wt, + Lt = (function () { + function e() {} + return ( + (e.InitiateController = function (e) { + for (var t = 0, n = this._ControllerFactories; t < n.length; t++) { + var i = n[t]; + if (i.canCreate(e)) return i.create(e); + } + if (this._DefaultControllerFactory) return this._DefaultControllerFactory(e); + throw "The type of gamepad you are trying to load needs to be imported first or is not supported."; + }), + (e._ControllerFactories = []), + (e._DefaultControllerFactory = null), + e + ); + })(), + Ft = (function (e) { + function t(t) { + var n = e.call(this, t.id, t.index, t) || this; + return ( + (n.isXR = !1), + (n._deviceRoomPosition = a.e.Zero()), + (n._deviceRoomRotationQuaternion = new a.b()), + (n.devicePosition = a.e.Zero()), + (n.deviceRotationQuaternion = new a.b()), + (n.deviceScaleFactor = 1), + (n._trackPosition = !0), + (n._maxRotationDistFromHeadset = Math.PI / 5), + (n._draggedRoomRotation = 0), + (n._leftHandSystemQuaternion = new a.b()), + (n._deviceToWorld = a.a.Identity()), + (n._pointingPoseNode = null), + (n._workingMatrix = a.a.Identity()), + (n._meshAttachedObservable = new o.c()), + (n.type = Ye.POSE_ENABLED), + (n.controllerType = Mt.GENERIC), + (n.position = a.e.Zero()), + (n.rotationQuaternion = new a.b()), + (n._calculatedPosition = a.e.Zero()), + (n._calculatedRotation = new a.b()), + a.b.RotationYawPitchRollToRef(Math.PI, 0, 0, n._leftHandSystemQuaternion), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._disableTrackPosition = function (e) { + this._trackPosition && (this._calculatedPosition.copyFrom(e), (this._trackPosition = !1)); + }), + (t.prototype.update = function () { + e.prototype.update.call(this), this._updatePoseAndMesh(); + }), + (t.prototype._updatePoseAndMesh = function () { + if (!this.isXR) { + var e = this.browserGamepad.pose; + if ((this.updateFromDevice(e), !this._trackPosition && E.a.LastCreatedScene && E.a.LastCreatedScene.activeCamera && E.a.LastCreatedScene.activeCamera.devicePosition)) + if (((t = E.a.LastCreatedScene.activeCamera)._computeDevicePosition(), this._deviceToWorld.setTranslation(t.devicePosition), t.deviceRotationQuaternion)) { + var t; + (t = t)._deviceRoomRotationQuaternion.toEulerAnglesToRef(a.c.Vector3[0]); + var n = Math.atan2(Math.sin(a.c.Vector3[0].y - this._draggedRoomRotation), Math.cos(a.c.Vector3[0].y - this._draggedRoomRotation)); + if (Math.abs(n) > this._maxRotationDistFromHeadset) { + var i = n - (n < 0 ? -this._maxRotationDistFromHeadset : this._maxRotationDistFromHeadset); + this._draggedRoomRotation += i; + var r = Math.sin(-i), + o = Math.cos(-i); + (this._calculatedPosition.x = this._calculatedPosition.x * o - this._calculatedPosition.z * r), (this._calculatedPosition.z = this._calculatedPosition.x * r + this._calculatedPosition.z * o); + } + } + a.e.TransformCoordinatesToRef(this._calculatedPosition, this._deviceToWorld, this.devicePosition), + this._deviceToWorld.getRotationMatrixToRef(this._workingMatrix), + a.b.FromRotationMatrixToRef(this._workingMatrix, this.deviceRotationQuaternion), + this.deviceRotationQuaternion.multiplyInPlace(this._calculatedRotation), + this._mesh && (this._mesh.position.copyFrom(this.devicePosition), this._mesh.rotationQuaternion && this._mesh.rotationQuaternion.copyFrom(this.deviceRotationQuaternion)); + } + }), + (t.prototype.updateFromDevice = function (e) { + if (!this.isXR && e) { + (this.rawPose = e), + e.position && + (this._deviceRoomPosition.copyFromFloats(e.position[0], e.position[1], -e.position[2]), + this._mesh && this._mesh.getScene().useRightHandedSystem && (this._deviceRoomPosition.z *= -1), + this._trackPosition && this._deviceRoomPosition.scaleToRef(this.deviceScaleFactor, this._calculatedPosition), + this._calculatedPosition.addInPlace(this.position)); + var t = this.rawPose; + e.orientation && + t.orientation && + 4 === t.orientation.length && + (this._deviceRoomRotationQuaternion.copyFromFloats(t.orientation[0], t.orientation[1], -t.orientation[2], -t.orientation[3]), + this._mesh && + (this._mesh.getScene().useRightHandedSystem + ? ((this._deviceRoomRotationQuaternion.z *= -1), (this._deviceRoomRotationQuaternion.w *= -1)) + : this._deviceRoomRotationQuaternion.multiplyToRef(this._leftHandSystemQuaternion, this._deviceRoomRotationQuaternion)), + this._deviceRoomRotationQuaternion.multiplyToRef(this.rotationQuaternion, this._calculatedRotation)); + } + }), + (t.prototype.attachToMesh = function (e) { + if ( + (this._mesh && (this._mesh.parent = null), + (this._mesh = e), + this._poseControlledCamera && (this._mesh.parent = this._poseControlledCamera), + this._mesh.rotationQuaternion || (this._mesh.rotationQuaternion = new a.b()), + !this.isXR && (this._updatePoseAndMesh(), this._pointingPoseNode)) + ) { + for (var t = [], n = this._pointingPoseNode; n.parent; ) t.push(n.parent), (n = n.parent); + t.reverse().forEach(function (e) { + e.computeWorldMatrix(!0); + }); + } + this._meshAttachedObservable.notifyObservers(e); + }), + (t.prototype.attachToPoseControlledCamera = function (e) { + (this._poseControlledCamera = e), this._mesh && (this._mesh.parent = this._poseControlledCamera); + }), + (t.prototype.dispose = function () { + this._mesh && this._mesh.dispose(), (this._mesh = null), e.prototype.dispose.call(this); + }), + Object.defineProperty(t.prototype, "mesh", { + get: function () { + return this._mesh; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getForwardRay = function (e) { + if ((void 0 === e && (e = 100), !this.mesh)) return new Re(a.e.Zero(), new a.e(0, 0, 1), e); + var t = this._pointingPoseNode ? this._pointingPoseNode.getWorldMatrix() : this.mesh.getWorldMatrix(), + n = t.getTranslation(), + i = new a.e(0, 0, -1), + r = a.e.TransformNormal(i, t), + o = a.e.Normalize(r); + return new Re(n, o, e); + }), + (t.POINTING_POSE = "POINTING_POSE"), + t + ); + })(Ye); + !(function (e) { + (e[(e.A = 0)] = "A"), + (e[(e.B = 1)] = "B"), + (e[(e.X = 2)] = "X"), + (e[(e.Y = 3)] = "Y"), + (e[(e.LB = 4)] = "LB"), + (e[(e.RB = 5)] = "RB"), + (e[(e.Back = 8)] = "Back"), + (e[(e.Start = 9)] = "Start"), + (e[(e.LeftStick = 10)] = "LeftStick"), + (e[(e.RightStick = 11)] = "RightStick"); + })(Rt || (Rt = {})), + (function (e) { + (e[(e.Up = 12)] = "Up"), (e[(e.Down = 13)] = "Down"), (e[(e.Left = 14)] = "Left"), (e[(e.Right = 15)] = "Right"); + })(wt || (wt = {})); + var Nt, + kt, + zt = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = !1); + var a = e.call(this, t, n, i, 0, 1, 2, 3) || this; + return ( + (a._leftTrigger = 0), + (a._rightTrigger = 0), + (a.onButtonDownObservable = new o.c()), + (a.onButtonUpObservable = new o.c()), + (a.onPadDownObservable = new o.c()), + (a.onPadUpObservable = new o.c()), + (a._buttonA = 0), + (a._buttonB = 0), + (a._buttonX = 0), + (a._buttonY = 0), + (a._buttonBack = 0), + (a._buttonStart = 0), + (a._buttonLB = 0), + (a._buttonRB = 0), + (a._buttonLeftStick = 0), + (a._buttonRightStick = 0), + (a._dPadUp = 0), + (a._dPadDown = 0), + (a._dPadLeft = 0), + (a._dPadRight = 0), + (a._isXboxOnePad = !1), + (a.type = Ye.XBOX), + (a._isXboxOnePad = r), + a + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.onlefttriggerchanged = function (e) { + this._onlefttriggerchanged = e; + }), + (t.prototype.onrighttriggerchanged = function (e) { + this._onrighttriggerchanged = e; + }), + Object.defineProperty(t.prototype, "leftTrigger", { + get: function () { + return this._leftTrigger; + }, + set: function (e) { + this._onlefttriggerchanged && this._leftTrigger !== e && this._onlefttriggerchanged(e), (this._leftTrigger = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rightTrigger", { + get: function () { + return this._rightTrigger; + }, + set: function (e) { + this._onrighttriggerchanged && this._rightTrigger !== e && this._onrighttriggerchanged(e), (this._rightTrigger = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.onbuttondown = function (e) { + this._onbuttondown = e; + }), + (t.prototype.onbuttonup = function (e) { + this._onbuttonup = e; + }), + (t.prototype.ondpaddown = function (e) { + this._ondpaddown = e; + }), + (t.prototype.ondpadup = function (e) { + this._ondpadup = e; + }), + (t.prototype._setButtonValue = function (e, t, n) { + return ( + e !== t && + (1 === e && (this._onbuttondown && this._onbuttondown(n), this.onButtonDownObservable.notifyObservers(n)), 0 === e && (this._onbuttonup && this._onbuttonup(n), this.onButtonUpObservable.notifyObservers(n))), + e + ); + }), + (t.prototype._setDPadValue = function (e, t, n) { + return e !== t && (1 === e && (this._ondpaddown && this._ondpaddown(n), this.onPadDownObservable.notifyObservers(n)), 0 === e && (this._ondpadup && this._ondpadup(n), this.onPadUpObservable.notifyObservers(n))), e; + }), + Object.defineProperty(t.prototype, "buttonA", { + get: function () { + return this._buttonA; + }, + set: function (e) { + this._buttonA = this._setButtonValue(e, this._buttonA, Rt.A); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonB", { + get: function () { + return this._buttonB; + }, + set: function (e) { + this._buttonB = this._setButtonValue(e, this._buttonB, Rt.B); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonX", { + get: function () { + return this._buttonX; + }, + set: function (e) { + this._buttonX = this._setButtonValue(e, this._buttonX, Rt.X); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonY", { + get: function () { + return this._buttonY; + }, + set: function (e) { + this._buttonY = this._setButtonValue(e, this._buttonY, Rt.Y); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonStart", { + get: function () { + return this._buttonStart; + }, + set: function (e) { + this._buttonStart = this._setButtonValue(e, this._buttonStart, Rt.Start); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonBack", { + get: function () { + return this._buttonBack; + }, + set: function (e) { + this._buttonBack = this._setButtonValue(e, this._buttonBack, Rt.Back); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonLB", { + get: function () { + return this._buttonLB; + }, + set: function (e) { + this._buttonLB = this._setButtonValue(e, this._buttonLB, Rt.LB); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonRB", { + get: function () { + return this._buttonRB; + }, + set: function (e) { + this._buttonRB = this._setButtonValue(e, this._buttonRB, Rt.RB); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonLeftStick", { + get: function () { + return this._buttonLeftStick; + }, + set: function (e) { + this._buttonLeftStick = this._setButtonValue(e, this._buttonLeftStick, Rt.LeftStick); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonRightStick", { + get: function () { + return this._buttonRightStick; + }, + set: function (e) { + this._buttonRightStick = this._setButtonValue(e, this._buttonRightStick, Rt.RightStick); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadUp", { + get: function () { + return this._dPadUp; + }, + set: function (e) { + this._dPadUp = this._setDPadValue(e, this._dPadUp, wt.Up); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadDown", { + get: function () { + return this._dPadDown; + }, + set: function (e) { + this._dPadDown = this._setDPadValue(e, this._dPadDown, wt.Down); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadLeft", { + get: function () { + return this._dPadLeft; + }, + set: function (e) { + this._dPadLeft = this._setDPadValue(e, this._dPadLeft, wt.Left); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadRight", { + get: function () { + return this._dPadRight; + }, + set: function (e) { + this._dPadRight = this._setDPadValue(e, this._dPadRight, wt.Right); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.update = function () { + e.prototype.update.call(this), + this._isXboxOnePad, + (this.buttonA = this.browserGamepad.buttons[0].value), + (this.buttonB = this.browserGamepad.buttons[1].value), + (this.buttonX = this.browserGamepad.buttons[2].value), + (this.buttonY = this.browserGamepad.buttons[3].value), + (this.buttonLB = this.browserGamepad.buttons[4].value), + (this.buttonRB = this.browserGamepad.buttons[5].value), + (this.leftTrigger = this.browserGamepad.buttons[6].value), + (this.rightTrigger = this.browserGamepad.buttons[7].value), + (this.buttonBack = this.browserGamepad.buttons[8].value), + (this.buttonStart = this.browserGamepad.buttons[9].value), + (this.buttonLeftStick = this.browserGamepad.buttons[10].value), + (this.buttonRightStick = this.browserGamepad.buttons[11].value), + (this.dPadUp = this.browserGamepad.buttons[12].value), + (this.dPadDown = this.browserGamepad.buttons[13].value), + (this.dPadLeft = this.browserGamepad.buttons[14].value), + (this.dPadRight = this.browserGamepad.buttons[15].value); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onButtonDownObservable.clear(), this.onButtonUpObservable.clear(), this.onPadDownObservable.clear(), this.onPadUpObservable.clear(); + }), + t + ); + })(Ye); + !(function (e) { + (e[(e.Cross = 0)] = "Cross"), + (e[(e.Circle = 1)] = "Circle"), + (e[(e.Square = 2)] = "Square"), + (e[(e.Triangle = 3)] = "Triangle"), + (e[(e.L1 = 4)] = "L1"), + (e[(e.R1 = 5)] = "R1"), + (e[(e.Share = 8)] = "Share"), + (e[(e.Options = 9)] = "Options"), + (e[(e.LeftStick = 10)] = "LeftStick"), + (e[(e.RightStick = 11)] = "RightStick"); + })(Nt || (Nt = {})), + (function (e) { + (e[(e.Up = 12)] = "Up"), (e[(e.Down = 13)] = "Down"), (e[(e.Left = 14)] = "Left"), (e[(e.Right = 15)] = "Right"); + })(kt || (kt = {})); + var jt = (function (e) { + function t(t, n, i) { + var r = e.call(this, t.replace("STANDARD GAMEPAD", "SONY PLAYSTATION DUALSHOCK"), n, i, 0, 1, 2, 3) || this; + return ( + (r._leftTrigger = 0), + (r._rightTrigger = 0), + (r.onButtonDownObservable = new o.c()), + (r.onButtonUpObservable = new o.c()), + (r.onPadDownObservable = new o.c()), + (r.onPadUpObservable = new o.c()), + (r._buttonCross = 0), + (r._buttonCircle = 0), + (r._buttonSquare = 0), + (r._buttonTriangle = 0), + (r._buttonShare = 0), + (r._buttonOptions = 0), + (r._buttonL1 = 0), + (r._buttonR1 = 0), + (r._buttonLeftStick = 0), + (r._buttonRightStick = 0), + (r._dPadUp = 0), + (r._dPadDown = 0), + (r._dPadLeft = 0), + (r._dPadRight = 0), + (r.type = Ye.DUALSHOCK), + r + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.onlefttriggerchanged = function (e) { + this._onlefttriggerchanged = e; + }), + (t.prototype.onrighttriggerchanged = function (e) { + this._onrighttriggerchanged = e; + }), + Object.defineProperty(t.prototype, "leftTrigger", { + get: function () { + return this._leftTrigger; + }, + set: function (e) { + this._onlefttriggerchanged && this._leftTrigger !== e && this._onlefttriggerchanged(e), (this._leftTrigger = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rightTrigger", { + get: function () { + return this._rightTrigger; + }, + set: function (e) { + this._onrighttriggerchanged && this._rightTrigger !== e && this._onrighttriggerchanged(e), (this._rightTrigger = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.onbuttondown = function (e) { + this._onbuttondown = e; + }), + (t.prototype.onbuttonup = function (e) { + this._onbuttonup = e; + }), + (t.prototype.ondpaddown = function (e) { + this._ondpaddown = e; + }), + (t.prototype.ondpadup = function (e) { + this._ondpadup = e; + }), + (t.prototype._setButtonValue = function (e, t, n) { + return ( + e !== t && + (1 === e && (this._onbuttondown && this._onbuttondown(n), this.onButtonDownObservable.notifyObservers(n)), 0 === e && (this._onbuttonup && this._onbuttonup(n), this.onButtonUpObservable.notifyObservers(n))), + e + ); + }), + (t.prototype._setDPadValue = function (e, t, n) { + return e !== t && (1 === e && (this._ondpaddown && this._ondpaddown(n), this.onPadDownObservable.notifyObservers(n)), 0 === e && (this._ondpadup && this._ondpadup(n), this.onPadUpObservable.notifyObservers(n))), e; + }), + Object.defineProperty(t.prototype, "buttonCross", { + get: function () { + return this._buttonCross; + }, + set: function (e) { + this._buttonCross = this._setButtonValue(e, this._buttonCross, Nt.Cross); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonCircle", { + get: function () { + return this._buttonCircle; + }, + set: function (e) { + this._buttonCircle = this._setButtonValue(e, this._buttonCircle, Nt.Circle); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonSquare", { + get: function () { + return this._buttonSquare; + }, + set: function (e) { + this._buttonSquare = this._setButtonValue(e, this._buttonSquare, Nt.Square); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonTriangle", { + get: function () { + return this._buttonTriangle; + }, + set: function (e) { + this._buttonTriangle = this._setButtonValue(e, this._buttonTriangle, Nt.Triangle); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonOptions", { + get: function () { + return this._buttonOptions; + }, + set: function (e) { + this._buttonOptions = this._setButtonValue(e, this._buttonOptions, Nt.Options); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonShare", { + get: function () { + return this._buttonShare; + }, + set: function (e) { + this._buttonShare = this._setButtonValue(e, this._buttonShare, Nt.Share); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonL1", { + get: function () { + return this._buttonL1; + }, + set: function (e) { + this._buttonL1 = this._setButtonValue(e, this._buttonL1, Nt.L1); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonR1", { + get: function () { + return this._buttonR1; + }, + set: function (e) { + this._buttonR1 = this._setButtonValue(e, this._buttonR1, Nt.R1); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonLeftStick", { + get: function () { + return this._buttonLeftStick; + }, + set: function (e) { + this._buttonLeftStick = this._setButtonValue(e, this._buttonLeftStick, Nt.LeftStick); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "buttonRightStick", { + get: function () { + return this._buttonRightStick; + }, + set: function (e) { + this._buttonRightStick = this._setButtonValue(e, this._buttonRightStick, Nt.RightStick); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadUp", { + get: function () { + return this._dPadUp; + }, + set: function (e) { + this._dPadUp = this._setDPadValue(e, this._dPadUp, kt.Up); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadDown", { + get: function () { + return this._dPadDown; + }, + set: function (e) { + this._dPadDown = this._setDPadValue(e, this._dPadDown, kt.Down); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadLeft", { + get: function () { + return this._dPadLeft; + }, + set: function (e) { + this._dPadLeft = this._setDPadValue(e, this._dPadLeft, kt.Left); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dPadRight", { + get: function () { + return this._dPadRight; + }, + set: function (e) { + this._dPadRight = this._setDPadValue(e, this._dPadRight, kt.Right); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.update = function () { + e.prototype.update.call(this), + (this.buttonCross = this.browserGamepad.buttons[0].value), + (this.buttonCircle = this.browserGamepad.buttons[1].value), + (this.buttonSquare = this.browserGamepad.buttons[2].value), + (this.buttonTriangle = this.browserGamepad.buttons[3].value), + (this.buttonL1 = this.browserGamepad.buttons[4].value), + (this.buttonR1 = this.browserGamepad.buttons[5].value), + (this.leftTrigger = this.browserGamepad.buttons[6].value), + (this.rightTrigger = this.browserGamepad.buttons[7].value), + (this.buttonShare = this.browserGamepad.buttons[8].value), + (this.buttonOptions = this.browserGamepad.buttons[9].value), + (this.buttonLeftStick = this.browserGamepad.buttons[10].value), + (this.buttonRightStick = this.browserGamepad.buttons[11].value), + (this.dPadUp = this.browserGamepad.buttons[12].value), + (this.dPadDown = this.browserGamepad.buttons[13].value), + (this.dPadLeft = this.browserGamepad.buttons[14].value), + (this.dPadRight = this.browserGamepad.buttons[15].value); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onButtonDownObservable.clear(), this.onButtonUpObservable.clear(), this.onPadDownObservable.clear(), this.onPadUpObservable.clear(); + }), + t + ); + })(Ye), + Bt = (function () { + function e(e) { + var t = this; + if ( + ((this._scene = e), + (this._babylonGamepads = []), + (this._oneGamepadConnected = !1), + (this._isMonitoring = !1), + (this.onGamepadDisconnectedObservable = new o.c()), + Dt.a.IsWindowObjectExist() + ? ((this._gamepadEventSupported = "GamepadEvent" in window), (this._gamepadSupport = navigator.getGamepads || navigator.webkitGetGamepads || navigator.msGetGamepads || navigator.webkitGamepads)) + : (this._gamepadEventSupported = !1), + (this.onGamepadConnectedObservable = new o.c(function (e) { + for (var n in t._babylonGamepads) { + var i = t._babylonGamepads[n]; + i && i._isConnected && t.onGamepadConnectedObservable.notifyObserver(e, i); + } + })), + (this._onGamepadConnectedEvent = function (e) { + var n, + i = e.gamepad; + (i.index in t._babylonGamepads && t._babylonGamepads[i.index].isConnected) || + (t._babylonGamepads[i.index] ? (((n = t._babylonGamepads[i.index]).browserGamepad = i), (n._isConnected = !0)) : (n = t._addNewGamepad(i)), + t.onGamepadConnectedObservable.notifyObservers(n), + t._startMonitoringGamepads()); + }), + (this._onGamepadDisconnectedEvent = function (e) { + var n = e.gamepad; + for (var i in t._babylonGamepads) + if (t._babylonGamepads[i].index === n.index) { + var r = t._babylonGamepads[i]; + (r._isConnected = !1), t.onGamepadDisconnectedObservable.notifyObservers(r), r.dispose && r.dispose(); + break; + } + }), + this._gamepadSupport) + ) + if ((this._updateGamepadObjects(), this._babylonGamepads.length && this._startMonitoringGamepads(), this._gamepadEventSupported)) { + var n = this._scene ? this._scene.getEngine().getHostWindow() : window; + n && (n.addEventListener("gamepadconnected", this._onGamepadConnectedEvent, !1), n.addEventListener("gamepaddisconnected", this._onGamepadDisconnectedEvent, !1)); + } else this._startMonitoringGamepads(); + } + return ( + Object.defineProperty(e.prototype, "gamepads", { + get: function () { + return this._babylonGamepads; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getGamepadByType = function (e) { + void 0 === e && (e = Ye.XBOX); + for (var t = 0, n = this._babylonGamepads; t < n.length; t++) { + var i = n[t]; + if (i && i.type === e) return i; + } + return null; + }), + (e.prototype.dispose = function () { + this._gamepadEventSupported && + (this._onGamepadConnectedEvent && window.removeEventListener("gamepadconnected", this._onGamepadConnectedEvent), + this._onGamepadDisconnectedEvent && window.removeEventListener("gamepaddisconnected", this._onGamepadDisconnectedEvent), + (this._onGamepadConnectedEvent = null), + (this._onGamepadDisconnectedEvent = null)), + this._babylonGamepads.forEach(function (e) { + e.dispose(); + }), + this.onGamepadConnectedObservable.clear(), + this.onGamepadDisconnectedObservable.clear(), + (this._oneGamepadConnected = !1), + this._stopMonitoringGamepads(), + (this._babylonGamepads = []); + }), + (e.prototype._addNewGamepad = function (e) { + var t; + this._oneGamepadConnected || (this._oneGamepadConnected = !0); + var n = -1 !== e.id.search("054c"), + i = -1 !== e.id.search("Xbox One"); + return ( + (t = i || -1 !== e.id.search("Xbox 360") || -1 !== e.id.search("xinput") ? new zt(e.id, e.index, e, i) : n ? new jt(e.id, e.index, e) : e.pose ? Lt.InitiateController(e) : new Ke(e.id, e.index, e)), + (this._babylonGamepads[t.index] = t), + t + ); + }), + (e.prototype._startMonitoringGamepads = function () { + this._isMonitoring || ((this._isMonitoring = !0), this._scene || this._checkGamepadsStatus()); + }), + (e.prototype._stopMonitoringGamepads = function () { + this._isMonitoring = !1; + }), + (e.prototype._checkGamepadsStatus = function () { + var e = this; + for (var t in (this._updateGamepadObjects(), this._babylonGamepads)) { + var n = this._babylonGamepads[t]; + n && n.isConnected && n.update(); + } + this._isMonitoring && + !this._scene && + ue.a.QueueNewFrame(function () { + e._checkGamepadsStatus(); + }); + }), + (e.prototype._updateGamepadObjects = function () { + for (var e = navigator.getGamepads ? navigator.getGamepads() : navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : [], t = 0; t < e.length; t++) { + var n = e[t]; + if (n) + if (this._babylonGamepads[n.index]) + (this._babylonGamepads[t].browserGamepad = n), + this._babylonGamepads[t].isConnected || ((this._babylonGamepads[t]._isConnected = !0), this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[t])); + else { + var i = this._addNewGamepad(n); + this.onGamepadConnectedObservable.notifyObservers(i); + } + } + }), + e + ); + })(); + Object.defineProperty(ge.a.prototype, "gamepadManager", { + get: function () { + if (!this._gamepadManager) { + this._gamepadManager = new Bt(this); + var e = this._getComponent(me.a.NAME_GAMEPAD); + e || ((e = new Vt(this)), this._addComponent(e)); + } + return this._gamepadManager; + }, + enumerable: !0, + configurable: !0, + }), + (lt.a.prototype.addGamepad = function () { + return this.add(new ht()), this; + }), + (nt.prototype.addGamepad = function () { + return this.add(new Ze()), this; + }); + var Vt = (function () { + function e(e) { + (this.name = me.a.NAME_GAMEPAD), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._beforeCameraUpdateStage.registerStep(me.a.STEP_BEFORECAMERAUPDATE_GAMEPAD, this, this._beforeCameraUpdate); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () { + var e = this.scene._gamepadManager; + e && (e.dispose(), (this.scene._gamepadManager = null)); + }), + (e.prototype._beforeCameraUpdate = function () { + var e = this.scene._gamepadManager; + e && e._isMonitoring && e._checkGamepadsStatus(); + }), + e + ); + })(); + Ct.a.AddNodeConstructor("FreeCamera", function (e, t) { + return function () { + return new Gt(e, a.e.Zero(), t); + }; + }); + var Gt = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + return r.inputs.addGamepad(), r; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "gamepadAngularSensibility", { + get: function () { + var e = this.inputs.attached.gamepad; + return e ? e.gamepadAngularSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.gamepad; + t && (t.gamepadAngularSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "gamepadMoveSensibility", { + get: function () { + var e = this.inputs.attached.gamepad; + return e ? e.gamepadMoveSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.gamepad; + t && (t.gamepadMoveSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "UniversalCamera"; + }), + t + ); + })(Pt); + (De.a._createDefaultParsedCamera = function (e, t) { + return new Gt(e, a.e.Zero(), t); + }), + Ct.a.AddNodeConstructor("GamepadCamera", function (e, t) { + return function () { + return new Ut(e, a.e.Zero(), t); + }; + }); + var Ut = (function (e) { + function t(t, n, i) { + return e.call(this, t, n, i) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "GamepadCamera"; + }), + t + ); + })(Gt), + Ht = n(107), + Wt = n(24), + Xt = n(7), + Yt = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D leftSampler;\nvoid main(void)\n{\nvec4 leftFrag=texture2D(leftSampler,vUV);\nleftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0);\nvec4 rightFrag=texture2D(textureSampler,vUV);\nrightFrag=vec4(rightFrag.r,1.0,1.0,1.0);\ngl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0);\n}"; + Xt.a.ShadersStore.anaglyphPixelShader = Yt; + var Kt = (function (e) { + function t(t, n, i, r, o, a) { + var s = e.call(this, t, "anaglyph", null, ["leftSampler"], n, i[1], r, o, a) || this; + return ( + (s._passedProcess = i[0]._rigPostProcess), + s.onApplyObservable.add(function (e) { + e.setTextureFromPostProcess("leftSampler", s._passedProcess); + }), + s + ); + } + return Object(h.d)(t, e), t; + })(Wt.a); + (De.a._setStereoscopicAnaglyphRigMode = function (e) { + (e._rigCameras[0]._rigPostProcess = new Ht.b(e.name + "_passthru", 1, e._rigCameras[0])), (e._rigCameras[1]._rigPostProcess = new Kt(e.name + "_anaglyph", 1, e._rigCameras)); + }), + Ct.a.AddNodeConstructor("AnaglyphArcRotateCamera", function (e, t, n) { + return function () { + return new Zt(e, 0, 0, 1, a.e.Zero(), n.interaxial_distance, t); + }; + }); + var Zt = (function (e) { + function t(t, n, i, r, o, a, s) { + var c = e.call(this, t, n, i, r, o, s) || this; + return (c.interaxialDistance = a), c.setCameraRigMode(De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: a }), c; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "AnaglyphArcRotateCamera"; + }), + t + ); + })(xt); + Ct.a.AddNodeConstructor("AnaglyphFreeCamera", function (e, t, n) { + return function () { + return new qt(e, a.e.Zero(), n.interaxial_distance, t); + }; + }); + var qt = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, n, r) || this; + return (o.interaxialDistance = i), o.setCameraRigMode(De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: i }), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "AnaglyphFreeCamera"; + }), + t + ); + })(yt.a); + Ct.a.AddNodeConstructor("AnaglyphGamepadCamera", function (e, t, n) { + return function () { + return new Qt(e, a.e.Zero(), n.interaxial_distance, t); + }; + }); + var Qt = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, n, r) || this; + return (o.interaxialDistance = i), o.setCameraRigMode(De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: i }), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "AnaglyphGamepadCamera"; + }), + t + ); + })(Ut); + Ct.a.AddNodeConstructor("AnaglyphUniversalCamera", function (e, t, n) { + return function () { + return new Jt(e, a.e.Zero(), n.interaxial_distance, t); + }; + }); + var Jt = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, n, r) || this; + return (o.interaxialDistance = i), o.setCameraRigMode(De.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH, { interaxialDistance: i }), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "AnaglyphUniversalCamera"; + }), + t + ); + })(Gt), + $t = + "const vec3 TWO=vec3(2.0,2.0,2.0);\nvarying vec2 vUV;\nuniform sampler2D camASampler;\nuniform sampler2D textureSampler;\nuniform vec2 stepSize;\nvoid main(void)\n{\nbool useCamA;\nbool useCamB;\nvec2 texCoord1;\nvec2 texCoord2;\nvec3 frag1;\nvec3 frag2;\n#ifdef IS_STEREOSCOPIC_HORIZ\nuseCamB=vUV.x>0.5;\nuseCamA=!useCamB;\ntexCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y);\ntexCoord2=vec2(texCoord1.x+stepSize.x,vUV.y);\n#else\n#ifdef IS_STEREOSCOPIC_INTERLACED\nfloat rowNum=floor(vUV.y/stepSize.y);\nuseCamA=mod(rowNum,2.0) == 1.0;\nuseCamB=mod(rowNum,2.0) == 0.0;\ntexCoord1=vec2(vUV.x,vUV.y);\ntexCoord2=vec2(vUV.x,vUV.y);\n#else\nuseCamB=vUV.y>0.5;\nuseCamA=!useCamB;\ntexCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0);\ntexCoord2=vec2(vUV.x,texCoord1.y+stepSize.y);\n#endif\n#endif\n\nif (useCamB){\nfrag1=texture2D(textureSampler,texCoord1).rgb;\nfrag2=texture2D(textureSampler,texCoord2).rgb;\n}else if (useCamA){\nfrag1=texture2D(camASampler ,texCoord1).rgb;\nfrag2=texture2D(camASampler ,texCoord2).rgb;\n}else {\ndiscard;\n}\ngl_FragColor=vec4((frag1+frag2)/TWO,1.0);\n}\n"; + Xt.a.ShadersStore.stereoscopicInterlacePixelShader = $t; + var en = (function (e) { + function t(t, n, i, r, o, s, c) { + var l = e.call(this, t, "stereoscopicInterlace", ["stepSize"], ["camASampler"], 1, n[1], o, s, c, r ? "#define IS_STEREOSCOPIC_INTERLACED 1" : i ? "#define IS_STEREOSCOPIC_HORIZ 1" : void 0) || this; + return ( + (l._passedProcess = n[0]._rigPostProcess), + (l._stepSize = new a.d(1 / l.width, 1 / l.height)), + l.onSizeChangedObservable.add(function () { + l._stepSize = new a.d(1 / l.width, 1 / l.height); + }), + l.onApplyObservable.add(function (e) { + e.setTextureFromPostProcess("camASampler", l._passedProcess), e.setFloat2("stepSize", l._stepSize.x, l._stepSize.y); + }), + l + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + tn = (function (e) { + function t(t, n, i, r, o, s) { + var c = e.call(this, t, "stereoscopicInterlace", ["stepSize"], ["camASampler"], 1, n[1], r, o, s, i ? "#define IS_STEREOSCOPIC_HORIZ 1" : void 0) || this; + return ( + (c._passedProcess = n[0]._rigPostProcess), + (c._stepSize = new a.d(1 / c.width, 1 / c.height)), + c.onSizeChangedObservable.add(function () { + c._stepSize = new a.d(1 / c.width, 1 / c.height); + }), + c.onApplyObservable.add(function (e) { + e.setTextureFromPostProcess("camASampler", c._passedProcess), e.setFloat2("stepSize", c._stepSize.x, c._stepSize.y); + }), + c + ); + } + return Object(h.d)(t, e), t; + })(Wt.a); + (De.a._setStereoscopicRigMode = function (e) { + var t = e.cameraRigMode === De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL || e.cameraRigMode === De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED, + n = e.cameraRigMode === De.a.RIG_MODE_STEREOSCOPIC_INTERLACED; + (e._rigCameras[0]._rigPostProcess = new Ht.b(e.name + "_passthru", 1, e._rigCameras[0])), (e._rigCameras[1]._rigPostProcess = new en(e.name + "_stereoInterlace", e._rigCameras, t, n)); + }), + Ct.a.AddNodeConstructor("StereoscopicArcRotateCamera", function (e, t, n) { + return function () { + return new nn(e, 0, 0, 1, a.e.Zero(), n.interaxial_distance, n.isStereoscopicSideBySide, t); + }; + }); + var nn = (function (e) { + function t(t, n, i, r, o, a, s, c) { + var l = e.call(this, t, n, i, r, o, c) || this; + return (l.interaxialDistance = a), (l.isStereoscopicSideBySide = s), l.setCameraRigMode(s ? De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: a }), l; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "StereoscopicArcRotateCamera"; + }), + t + ); + })(xt); + Ct.a.AddNodeConstructor("StereoscopicFreeCamera", function (e, t, n) { + return function () { + return new rn(e, a.e.Zero(), n.interaxial_distance, n.isStereoscopicSideBySide, t); + }; + }); + var rn = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t, n, o) || this; + return (a.interaxialDistance = i), (a.isStereoscopicSideBySide = r), a.setCameraRigMode(r ? De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: i }), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "StereoscopicFreeCamera"; + }), + t + ); + })(yt.a); + Ct.a.AddNodeConstructor("StereoscopicGamepadCamera", function (e, t, n) { + return function () { + return new on(e, a.e.Zero(), n.interaxial_distance, n.isStereoscopicSideBySide, t); + }; + }); + var on = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t, n, o) || this; + return (a.interaxialDistance = i), (a.isStereoscopicSideBySide = r), a.setCameraRigMode(r ? De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: i }), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "StereoscopicGamepadCamera"; + }), + t + ); + })(Ut); + Ct.a.AddNodeConstructor("StereoscopicFreeCamera", function (e, t, n) { + return function () { + return new an(e, a.e.Zero(), n.interaxial_distance, n.isStereoscopicSideBySide, t); + }; + }); + var an = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t, n, o) || this; + return (a.interaxialDistance = i), (a.isStereoscopicSideBySide = r), a.setCameraRigMode(r ? De.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL : De.a.RIG_MODE_STEREOSCOPIC_OVERUNDER, { interaxialDistance: i }), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "StereoscopicUniversalCamera"; + }), + t + ); + })(Gt); + Ct.a.AddNodeConstructor("VirtualJoysticksCamera", function (e, t) { + return function () { + return new sn(e, a.e.Zero(), t); + }; + }); + var sn = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + return r.inputs.addVirtualJoystick(), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VirtualJoysticksCamera"; + }), + t + ); + })(yt.a), + cn = (function () { + function e() { + (this.compensateDistortion = !0), (this.multiviewEnabled = !1); + } + return ( + Object.defineProperty(e.prototype, "aspectRatio", { + get: function () { + return this.hResolution / (2 * this.vResolution); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "aspectRatioFov", { + get: function () { + return 2 * Math.atan((this.postProcessScaleFactor * this.vScreenSize) / (2 * this.eyeToScreenDistance)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "leftHMatrix", { + get: function () { + var e = (4 * (this.hScreenSize / 4 - this.lensSeparationDistance / 2)) / this.hScreenSize; + return a.a.Translation(e, 0, 0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rightHMatrix", { + get: function () { + var e = (4 * (this.hScreenSize / 4 - this.lensSeparationDistance / 2)) / this.hScreenSize; + return a.a.Translation(-e, 0, 0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "leftPreViewMatrix", { + get: function () { + return a.a.Translation(0.5 * this.interpupillaryDistance, 0, 0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rightPreViewMatrix", { + get: function () { + return a.a.Translation(-0.5 * this.interpupillaryDistance, 0, 0); + }, + enumerable: !0, + configurable: !0, + }), + (e.GetDefault = function () { + var t = new e(); + return ( + (t.hResolution = 1280), + (t.vResolution = 800), + (t.hScreenSize = 0.149759993), + (t.vScreenSize = 0.0935999975), + (t.vScreenCenter = 0.0467999987), + (t.eyeToScreenDistance = 0.0410000011), + (t.lensSeparationDistance = 0.063500002), + (t.interpupillaryDistance = 0.064000003), + (t.distortionK = [1, 0.219999999, 0.239999995, 0]), + (t.chromaAbCorrection = [0.995999992, -0.00400000019, 1.01400006, 0]), + (t.postProcessScaleFactor = 1.714605507808412), + (t.lensCenterOffset = 0.151976421), + t + ); + }), + e + ); + })(), + ln = n(8), + un = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 LensCenter;\nuniform vec2 Scale;\nuniform vec2 ScaleIn;\nuniform vec4 HmdWarpParam;\nvec2 HmdWarp(vec2 in01) {\nvec2 theta=(in01-LensCenter)*ScaleIn;\nfloat rSq=theta.x*theta.x+theta.y*theta.y;\nvec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq);\nreturn LensCenter+Scale*rvector;\n}\nvoid main(void)\n{\nvec2 tc=HmdWarp(vUV);\nif (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0)\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\nelse{\ngl_FragColor=texture2D(textureSampler,tc);\n}\n}"; + Xt.a.ShadersStore.vrDistortionCorrectionPixelShader = un; + var hn = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, "vrDistortionCorrection", ["LensCenter", "Scale", "ScaleIn", "HmdWarpParam"], null, r.postProcessScaleFactor, n, ln.a.BILINEAR_SAMPLINGMODE) || this; + return ( + (o._isRightEye = i), + (o._distortionFactors = r.distortionK), + (o._postProcessScaleFactor = r.postProcessScaleFactor), + (o._lensCenterOffset = r.lensCenterOffset), + (o.adaptScaleToCurrentViewport = !0), + o.onSizeChangedObservable.add(function () { + (o._scaleIn = new a.d(2, 2 / o.aspectRatio)), + (o._scaleFactor = new a.d((1 / o._postProcessScaleFactor) * 0.5, (1 / o._postProcessScaleFactor) * 0.5 * o.aspectRatio)), + (o._lensCenter = new a.d(o._isRightEye ? 0.5 - 0.5 * o._lensCenterOffset : 0.5 + 0.5 * o._lensCenterOffset, 0.5)); + }), + o.onApplyObservable.add(function (e) { + e.setFloat2("LensCenter", o._lensCenter.x, o._lensCenter.y), + e.setFloat2("Scale", o._scaleFactor.x, o._scaleFactor.y), + e.setFloat2("ScaleIn", o._scaleIn.x, o._scaleIn.y), + e.setFloat4("HmdWarpParam", o._distortionFactors[0], o._distortionFactors[1], o._distortionFactors[2], o._distortionFactors[3]); + }), + o + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + dn = "precision mediump sampler2DArray;\nvarying vec2 vUV;\nuniform sampler2DArray multiviewSampler;\nuniform int imageIndex;\nvoid main(void)\n{\ngl_FragColor=texture(multiviewSampler,vec3(vUV,imageIndex));\n}"; + Xt.a.ShadersStore.vrMultiviewToSingleviewPixelShader = dn; + var pn = n(32), + fn = n(124), + mn = n(44), + gn = (function (e) { + function t(t, n) { + void 0 === n && (n = 512); + var i = e.call(this, "multiview rtt", n, t, !1, !0, pn.b.Unknown, !1, void 0, !1, !1, !0, void 0, !0) || this, + r = t.getEngine().createMultiviewRenderTargetTexture(i.getRenderWidth(), i.getRenderHeight()); + return (r.isMultiview = !0), (r.format = 5), (i._texture = r), (i.samples = i._engine.getCaps().maxSamples || i.samples), i; + } + return ( + Object(h.d)(t, e), + (t.prototype._bindFrameBuffer = function (e) { + void 0 === e && (e = 0), this._texture && this.getScene().getEngine().bindMultiviewFramebuffer(this._texture); + }), + (t.prototype.getViewCount = function () { + return 2; + }), + t + ); + })(mn.a), + bn = n(128); + (ue.a.prototype.createMultiviewRenderTargetTexture = function (e, t) { + var n = this._gl; + if (!this.getCaps().multiview) throw "Multiview is not supported"; + var i = new pn.a(this, pn.b.Unknown, !0); + return ( + (i.width = e), + (i.height = t), + (i._framebuffer = n.createFramebuffer()), + (i._colorTextureArray = n.createTexture()), + n.bindTexture(n.TEXTURE_2D_ARRAY, i._colorTextureArray), + n.texStorage3D(n.TEXTURE_2D_ARRAY, 1, n.RGBA8, e, t, 2), + (i._depthStencilTextureArray = n.createTexture()), + n.bindTexture(n.TEXTURE_2D_ARRAY, i._depthStencilTextureArray), + n.texStorage3D(n.TEXTURE_2D_ARRAY, 1, n.DEPTH32F_STENCIL8, e, t, 2), + (i.isReady = !0), + i + ); + }), + (ue.a.prototype.bindMultiviewFramebuffer = function (e) { + var t = this._gl, + n = this.getCaps().oculusMultiview || this.getCaps().multiview; + if ((this.bindFramebuffer(e, void 0, void 0, void 0, !0), t.bindFramebuffer(t.DRAW_FRAMEBUFFER, e._framebuffer), !e._colorTextureArray || !e._depthStencilTextureArray)) throw "Invalid multiview frame buffer"; + this.getCaps().oculusMultiview + ? (n.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER, t.COLOR_ATTACHMENT0, e._colorTextureArray, 0, e.samples, 0, 2), + n.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, e._depthStencilTextureArray, 0, e.samples, 0, 2)) + : (n.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER, t.COLOR_ATTACHMENT0, e._colorTextureArray, 0, 0, 2), + n.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, e._depthStencilTextureArray, 0, 0, 2)); + }), + (De.a.prototype._useMultiviewToSingleView = !1), + (De.a.prototype._multiviewTexture = null), + (De.a.prototype._resizeOrCreateMultiviewTexture = function (e, t) { + this._multiviewTexture + ? (this._multiviewTexture.getRenderWidth() == e && this._multiviewTexture.getRenderHeight() == t) || (this._multiviewTexture.dispose(), (this._multiviewTexture = new gn(this.getScene(), { width: e, height: t }))) + : (this._multiviewTexture = new gn(this.getScene(), { width: e, height: t })); + }), + (ge.a.prototype._transformMatrixR = a.a.Zero()), + (ge.a.prototype._multiviewSceneUbo = null), + (ge.a.prototype._createMultiviewUbo = function () { + (this._multiviewSceneUbo = new fn.a(this.getEngine(), void 0, !0)), + this._multiviewSceneUbo.addUniform("viewProjection", 16), + this._multiviewSceneUbo.addUniform("viewProjectionR", 16), + this._multiviewSceneUbo.addUniform("view", 16); + }), + (ge.a.prototype._updateMultiviewUbo = function (e, t) { + e && t && e.multiplyToRef(t, this._transformMatrixR), + e && t && (e.multiplyToRef(t, a.c.Matrix[0]), bn.a.GetRightPlaneToRef(a.c.Matrix[0], this._frustumPlanes[3])), + this._multiviewSceneUbo && + (this._multiviewSceneUbo.updateMatrix("viewProjection", this.getTransformMatrix()), + this._multiviewSceneUbo.updateMatrix("viewProjectionR", this._transformMatrixR), + this._multiviewSceneUbo.updateMatrix("view", this._viewMatrix), + this._multiviewSceneUbo.update()); + }), + (ge.a.prototype._renderMultiviewToSingleView = function (e) { + e._resizeOrCreateMultiviewTexture( + e._rigPostProcess && e._rigPostProcess && e._rigPostProcess.width > 0 ? e._rigPostProcess.width : this.getEngine().getRenderWidth(!0), + e._rigPostProcess && e._rigPostProcess && e._rigPostProcess.height > 0 ? e._rigPostProcess.height : this.getEngine().getRenderHeight(!0) + ), + this._multiviewSceneUbo || this._createMultiviewUbo(), + (e.outputRenderTarget = e._multiviewTexture), + this._renderForCamera(e), + (e.outputRenderTarget = null); + for (var t = 0; t < e._rigCameras.length; t++) { + var n = this.getEngine(); + (this._activeCamera = e._rigCameras[t]), + n.setViewport(this._activeCamera.viewport), + this.postProcessManager && (this.postProcessManager._prepareFrame(), this.postProcessManager._finalizeFrame(this._activeCamera.isIntermediate)); + } + }); + var _n = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, "vrMultiviewToSingleview", ["imageIndex"], ["multiviewSampler"], i, n, ln.a.BILINEAR_SAMPLINGMODE) || this; + return ( + r.onSizeChangedObservable.add(function () {}), + r.onApplyObservable.add(function (e) { + n._scene.activeCamera && n._scene.activeCamera.isLeftCamera ? e.setInt("imageIndex", 0) : e.setInt("imageIndex", 1), e.setTexture("multiviewSampler", n._multiviewTexture); + }), + r + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + vn = n(77); + (De.a._setVRRigMode = function (e, t) { + var n = t.vrCameraMetrics || cn.GetDefault(); + (e._rigCameras[0]._cameraRigParams.vrMetrics = n), + (e._rigCameras[0].viewport = new vn.a(0, 0, 0.5, 1)), + (e._rigCameras[0]._cameraRigParams.vrWorkMatrix = new a.a()), + (e._rigCameras[0]._cameraRigParams.vrHMatrix = n.leftHMatrix), + (e._rigCameras[0]._cameraRigParams.vrPreViewMatrix = n.leftPreViewMatrix), + (e._rigCameras[0].getProjectionMatrix = e._rigCameras[0]._getVRProjectionMatrix), + (e._rigCameras[1]._cameraRigParams.vrMetrics = n), + (e._rigCameras[1].viewport = new vn.a(0.5, 0, 0.5, 1)), + (e._rigCameras[1]._cameraRigParams.vrWorkMatrix = new a.a()), + (e._rigCameras[1]._cameraRigParams.vrHMatrix = n.rightHMatrix), + (e._rigCameras[1]._cameraRigParams.vrPreViewMatrix = n.rightPreViewMatrix), + (e._rigCameras[1].getProjectionMatrix = e._rigCameras[1]._getVRProjectionMatrix), + n.multiviewEnabled && + (e.getScene().getEngine().getCaps().multiview + ? ((e._useMultiviewToSingleView = !0), (e._rigPostProcess = new _n("VRMultiviewToSingleview", e, n.postProcessScaleFactor))) + : (g.a.Warn("Multiview is not supported, falling back to standard rendering"), (n.multiviewEnabled = !1))), + n.compensateDistortion && + ((e._rigCameras[0]._rigPostProcess = new hn("VR_Distort_Compensation_Left", e._rigCameras[0], !1, n)), (e._rigCameras[1]._rigPostProcess = new hn("VR_Distort_Compensation_Right", e._rigCameras[1], !0, n))); + }), + Ct.a.AddNodeConstructor("VRDeviceOrientationFreeCamera", function (e, t) { + return function () { + return new yn(e, 0, 0, 1, a.e.Zero(), t); + }; + }); + var yn = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === s && (s = !0), void 0 === c && (c = cn.GetDefault()); + var l = e.call(this, t, n, i, r, o, a) || this; + return (c.compensateDistortion = s), l.setCameraRigMode(De.a.RIG_MODE_VR, { vrCameraMetrics: c }), l.inputs.addVRDeviceOrientation(), l; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VRDeviceOrientationArcRotateCamera"; + }), + t + ); + })(xt); + Ct.a.AddNodeConstructor("VRDeviceOrientationFreeCamera", function (e, t) { + return function () { + return new Cn(e, a.e.Zero(), t); + }; + }); + var Cn = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = !0), void 0 === o && (o = cn.GetDefault()); + var a = e.call(this, t, n, i) || this; + return (o.compensateDistortion = r), a.setCameraRigMode(De.a.RIG_MODE_VR, { vrCameraMetrics: o }), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VRDeviceOrientationFreeCamera"; + }), + t + ); + })(Tt); + Ct.a.AddNodeConstructor("VRDeviceOrientationGamepadCamera", function (e, t) { + return function () { + return new Pn(e, a.e.Zero(), t); + }; + }); + var Pn = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = !0), void 0 === o && (o = cn.GetDefault()); + var a = e.call(this, t, n, i, r, o) || this; + return a.inputs.addGamepad(), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VRDeviceOrientationGamepadCamera"; + }), + t + ); + })(Cn), + xn = n(96); + De.a._setWebVRRigMode = function (e, t) { + if (t.vrDisplay) { + var n = t.vrDisplay.getEyeParameters("left"), + i = t.vrDisplay.getEyeParameters("right"); + (e._rigCameras[0].viewport = new vn.a(0, 0, 0.5, 1)), + e._rigCameras[0].setCameraRigParameter("left", !0), + e._rigCameras[0].setCameraRigParameter("specs", t.specs), + e._rigCameras[0].setCameraRigParameter("eyeParameters", n), + e._rigCameras[0].setCameraRigParameter("frameData", t.frameData), + e._rigCameras[0].setCameraRigParameter("parentCamera", t.parentCamera), + (e._rigCameras[0]._cameraRigParams.vrWorkMatrix = new a.a()), + (e._rigCameras[0].getProjectionMatrix = e._getWebVRProjectionMatrix), + (e._rigCameras[0].parent = e), + (e._rigCameras[0]._getViewMatrix = e._getWebVRViewMatrix), + (e._rigCameras[1].viewport = new vn.a(0.5, 0, 0.5, 1)), + e._rigCameras[1].setCameraRigParameter("eyeParameters", i), + e._rigCameras[1].setCameraRigParameter("specs", t.specs), + e._rigCameras[1].setCameraRigParameter("frameData", t.frameData), + e._rigCameras[1].setCameraRigParameter("parentCamera", t.parentCamera), + (e._rigCameras[1]._cameraRigParams.vrWorkMatrix = new a.a()), + (e._rigCameras[1].getProjectionMatrix = e._getWebVRProjectionMatrix), + (e._rigCameras[1].parent = e), + (e._rigCameras[1]._getViewMatrix = e._getWebVRViewMatrix); + } + }; + var Tn = n(109); + Object.defineProperty(ue.a.prototype, "isInVRExclusivePointerMode", { + get: function () { + return this._vrExclusivePointerMode; + }, + enumerable: !0, + configurable: !0, + }), + (ue.a.prototype._prepareVRComponent = function () { + (this._vrSupported = !1), (this._vrExclusivePointerMode = !1), (this.onVRDisplayChangedObservable = new o.c()), (this.onVRRequestPresentComplete = new o.c()), (this.onVRRequestPresentStart = new o.c()); + }), + (ue.a.prototype.isVRDevicePresent = function () { + return !!this._vrDisplay; + }), + (ue.a.prototype.getVRDevice = function () { + return this._vrDisplay; + }), + (ue.a.prototype.initWebVR = function () { + return this.initWebVRAsync(), this.onVRDisplayChangedObservable; + }), + (ue.a.prototype.initWebVRAsync = function () { + var e = this, + t = function () { + var t = { vrDisplay: e._vrDisplay, vrSupported: e._vrSupported }; + e.onVRDisplayChangedObservable.notifyObservers(t), + (e._webVRInitPromise = new Promise(function (e) { + e(t); + })); + }; + if (!this._onVrDisplayConnect) { + (this._onVrDisplayConnect = function (n) { + (e._vrDisplay = n.display), t(); + }), + (this._onVrDisplayDisconnect = function () { + e._vrDisplay.cancelAnimationFrame(e._frameHandler), (e._vrDisplay = void 0), (e._frameHandler = ue.a.QueueNewFrame(e._boundRenderFunction)), t(); + }), + (this._onVrDisplayPresentChange = function () { + e._vrExclusivePointerMode = e._vrDisplay && e._vrDisplay.isPresenting; + }); + var n = this.getHostWindow(); + n && + (n.addEventListener("vrdisplayconnect", this._onVrDisplayConnect), + n.addEventListener("vrdisplaydisconnect", this._onVrDisplayDisconnect), + n.addEventListener("vrdisplaypresentchange", this._onVrDisplayPresentChange)); + } + return (this._webVRInitPromise = this._webVRInitPromise || this._getVRDisplaysAsync()), this._webVRInitPromise.then(t), this._webVRInitPromise; + }), + (ue.a.prototype._getVRDisplaysAsync = function () { + var e = this; + return new Promise(function (t) { + navigator.getVRDisplays + ? navigator.getVRDisplays().then(function (n) { + (e._vrSupported = !0), (e._vrDisplay = n[0]), t({ vrDisplay: e._vrDisplay, vrSupported: e._vrSupported }); + }) + : ((e._vrDisplay = void 0), (e._vrSupported = !1), t({ vrDisplay: e._vrDisplay, vrSupported: e._vrSupported })); + }); + }), + (ue.a.prototype.enableVR = function (e) { + var t = this; + if (this._vrDisplay && !this._vrDisplay.isPresenting) { + this.onVRRequestPresentStart.notifyObservers(this); + var n = { + highRefreshRate: !!this.vrPresentationAttributes && this.vrPresentationAttributes.highRefreshRate, + foveationLevel: this.vrPresentationAttributes ? this.vrPresentationAttributes.foveationLevel : 1, + multiview: (this.getCaps().multiview || this.getCaps().oculusMultiview) && e.useMultiview, + }; + this._vrDisplay + .requestPresent([Object(h.a)({ source: this.getRenderingCanvas(), attributes: n }, n)]) + .then(function () { + t.onVRRequestPresentComplete.notifyObservers(!0), t._onVRFullScreenTriggered(); + }) + .catch(function () { + t.onVRRequestPresentComplete.notifyObservers(!1); + }); + } + }), + (ue.a.prototype._onVRFullScreenTriggered = function () { + if (this._vrDisplay && this._vrDisplay.isPresenting) { + (this._oldSize = new Tn.a(this.getRenderWidth(), this.getRenderHeight())), (this._oldHardwareScaleFactor = this.getHardwareScalingLevel()); + var e = this._vrDisplay.getEyeParameters("left"); + this.setHardwareScalingLevel(1), this.setSize(2 * e.renderWidth, e.renderHeight); + } else this.setHardwareScalingLevel(this._oldHardwareScaleFactor), this.setSize(this._oldSize.width, this._oldSize.height); + }), + (ue.a.prototype.disableVR = function () { + var e = this; + this._vrDisplay && + this._vrDisplay.isPresenting && + this._vrDisplay + .exitPresent() + .then(function () { + return e._onVRFullScreenTriggered(); + }) + .catch(function () { + return e._onVRFullScreenTriggered(); + }), + Dt.a.IsWindowObjectExist() && + (window.removeEventListener("vrdisplaypointerrestricted", this._onVRDisplayPointerRestricted), + window.removeEventListener("vrdisplaypointerunrestricted", this._onVRDisplayPointerUnrestricted), + this._onVrDisplayConnect && + (window.removeEventListener("vrdisplayconnect", this._onVrDisplayConnect), + this._onVrDisplayDisconnect && window.removeEventListener("vrdisplaydisconnect", this._onVrDisplayDisconnect), + this._onVrDisplayPresentChange && window.removeEventListener("vrdisplaypresentchange", this._onVrDisplayPresentChange), + (this._onVrDisplayConnect = null), + (this._onVrDisplayDisconnect = null))); + }), + (ue.a.prototype._connectVREvents = function (e, t) { + var n = this; + if ( + ((this._onVRDisplayPointerRestricted = function () { + e && e.requestPointerLock(); + }), + (this._onVRDisplayPointerUnrestricted = function () { + if (t) t.exitPointerLock && t.exitPointerLock(); + else { + var e = n.getHostWindow(); + e.document && e.document.exitPointerLock && e.document.exitPointerLock(); + } + }), + Dt.a.IsWindowObjectExist()) + ) { + var i = this.getHostWindow(); + i.addEventListener("vrdisplaypointerrestricted", this._onVRDisplayPointerRestricted, !1), i.addEventListener("vrdisplaypointerunrestricted", this._onVRDisplayPointerUnrestricted, !1); + } + }), + (ue.a.prototype._submitVRFrame = function () { + if (this._vrDisplay && this._vrDisplay.isPresenting) + try { + this._vrDisplay.submitFrame(); + } catch (e) { + $e.b.Warn("webVR submitFrame has had an unexpected failure: " + e); + } + }), + (ue.a.prototype.isVRPresenting = function () { + return this._vrDisplay && this._vrDisplay.isPresenting; + }), + (ue.a.prototype._requestVRFrame = function () { + this._frameHandler = ue.a.QueueNewFrame(this._boundRenderFunction, this._vrDisplay); + }), + Ct.a.AddNodeConstructor("WebVRFreeCamera", function (e, t) { + return function () { + return new Sn(e, a.e.Zero(), t); + }; + }), + Ct.a.AddNodeConstructor("WebVRGamepadCamera", function (e, t) { + return function () { + return new Sn(e, a.e.Zero(), t); + }; + }); + var Sn = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = {}); + var s = e.call(this, t, n, i) || this; + (s.webVROptions = r), + (s._vrDevice = null), + (s.rawPose = null), + (s._specsVersion = "1.1"), + (s._attached = !1), + (s._descendants = []), + (s._deviceRoomPosition = a.e.Zero()), + (s._deviceRoomRotationQuaternion = a.b.Identity()), + (s._standingMatrix = null), + (s.devicePosition = a.e.Zero()), + (s.deviceRotationQuaternion = a.b.Identity()), + (s.deviceScaleFactor = 1), + (s._deviceToWorld = a.a.Identity()), + (s._worldToDevice = a.a.Identity()), + (s.controllers = []), + (s.onControllersAttachedObservable = new o.c()), + (s.onControllerMeshLoadedObservable = new o.c()), + (s.onPoseUpdatedFromDeviceObservable = new o.c()), + (s._poseSet = !1), + (s.rigParenting = !0), + (s._defaultHeight = void 0), + (s._htmlElementAttached = null), + (s._detachIfAttached = function () { + var e = s.getEngine().getVRDevice(); + e && !e.isPresenting && s._htmlElementAttached && s.detachControl(s._htmlElementAttached); + }), + (s._workingVector = a.e.Zero()), + (s._oneVector = a.e.One()), + (s._workingMatrix = a.a.Identity()), + (s._tmpMatrix = new a.a()), + (s._cache.position = a.e.Zero()), + r.defaultHeight && ((s._defaultHeight = r.defaultHeight), (s.position.y = s._defaultHeight)), + (s.minZ = 0.1), + 5 === arguments.length && (s.webVROptions = arguments[4]), + null == s.webVROptions.trackPosition && (s.webVROptions.trackPosition = !0), + null == s.webVROptions.controllerMeshes && (s.webVROptions.controllerMeshes = !0), + null == s.webVROptions.defaultLightingOnControllers && (s.webVROptions.defaultLightingOnControllers = !0), + (s.rotationQuaternion = new a.b()), + s.webVROptions && s.webVROptions.positionScale && (s.deviceScaleFactor = s.webVROptions.positionScale); + var c = s.getEngine(); + return ( + (s._onVREnabled = function (e) { + e && s.initControllers(); + }), + c.onVRRequestPresentComplete.add(s._onVREnabled), + c.initWebVR().add(function (e) { + e.vrDisplay && + s._vrDevice !== e.vrDisplay && + ((s._vrDevice = e.vrDisplay), + s.setCameraRigMode(De.a.RIG_MODE_WEBVR, { parentCamera: s, vrDisplay: s._vrDevice, frameData: s._frameData, specs: s._specsVersion }), + s._attached && s.getEngine().enableVR(s.webVROptions)); + }), + "undefined" != typeof VRFrameData && (s._frameData = new VRFrameData()), + r.useMultiview && + (s.getScene().getEngine().getCaps().multiview + ? ((s._useMultiviewToSingleView = !0), (s._rigPostProcess = new _n("VRMultiviewToSingleview", s, 1))) + : (g.a.Warn("Multiview is not supported, falling back to standard rendering"), (s._useMultiviewToSingleView = !1))), + i.onBeforeCameraRenderObservable.add(function (e) { + e.parent === s && + s.rigParenting && + ((s._descendants = s.getDescendants(!0, function (e) { + var t = s.controllers.some(function (t) { + return t._mesh === e; + }), + n = -1 !== s._rigCameras.indexOf(e); + return !t && !n; + })), + s._descendants.forEach(function (t) { + t.parent = e; + })); + }), + i.onAfterCameraRenderObservable.add(function (e) { + e.parent === s && + s.rigParenting && + s._descendants.forEach(function (e) { + e.parent = s; + }); + }), + s + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.deviceDistanceToRoomGround = function () { + return this._standingMatrix ? (this._standingMatrix.getTranslationToRef(this._workingVector), this._deviceRoomPosition.y + this._workingVector.y) : this._defaultHeight || 0; + }), + (t.prototype.useStandingMatrix = function (e) { + var t = this; + void 0 === e && (e = function (e) {}), + this.getEngine() + .initWebVRAsync() + .then(function (n) { + n.vrDisplay && n.vrDisplay.stageParameters && n.vrDisplay.stageParameters.sittingToStandingTransform && t.webVROptions.trackPosition + ? ((t._standingMatrix = new a.a()), + a.a.FromFloat32ArrayToRefScaled(n.vrDisplay.stageParameters.sittingToStandingTransform, 0, 1, t._standingMatrix), + t.getScene().useRightHandedSystem || (t._standingMatrix && t._standingMatrix.toggleModelMatrixHandInPlace()), + e(!0)) + : e(!1); + }); + }), + (t.prototype.useStandingMatrixAsync = function () { + var e = this; + return new Promise(function (t) { + e.useStandingMatrix(function (e) { + t(e); + }); + }); + }), + (t.prototype.dispose = function () { + this._detachIfAttached(), + this.getEngine().onVRRequestPresentComplete.removeCallback(this._onVREnabled), + this._updateCacheWhenTrackingDisabledObserver && this._scene.onBeforeRenderObservable.remove(this._updateCacheWhenTrackingDisabledObserver), + e.prototype.dispose.call(this); + }), + (t.prototype.getControllerByName = function (e) { + for (var t = 0, n = this.controllers; t < n.length; t++) { + var i = n[t]; + if (i.hand === e) return i; + } + return null; + }), + Object.defineProperty(t.prototype, "leftController", { + get: function () { + return this._leftController || (this._leftController = this.getControllerByName("left")), this._leftController; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rightController", { + get: function () { + return this._rightController || (this._rightController = this.getControllerByName("right")), this._rightController; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getForwardRay = function (t) { + return void 0 === t && (t = 100), this.leftCamera ? e.prototype.getForwardRay.call(this, t, this.leftCamera.getWorldMatrix(), this.leftCamera.globalPosition) : e.prototype.getForwardRay.call(this, t); + }), + (t.prototype._checkInputs = function () { + this._vrDevice && this._vrDevice.isPresenting && (this._vrDevice.getFrameData(this._frameData), this.updateFromDevice(this._frameData.pose)), e.prototype._checkInputs.call(this); + }), + (t.prototype.updateFromDevice = function (e) { + e && + e.orientation && + 4 === e.orientation.length && + ((this.rawPose = e), + this._deviceRoomRotationQuaternion.copyFromFloats(e.orientation[0], e.orientation[1], -e.orientation[2], -e.orientation[3]), + this.getScene().useRightHandedSystem && ((this._deviceRoomRotationQuaternion.z *= -1), (this._deviceRoomRotationQuaternion.w *= -1)), + this.webVROptions.trackPosition && + this.rawPose.position && + (this._deviceRoomPosition.copyFromFloats(this.rawPose.position[0], this.rawPose.position[1], -this.rawPose.position[2]), this.getScene().useRightHandedSystem && (this._deviceRoomPosition.z *= -1)), + (this._poseSet = !0)); + }), + (t.prototype.attachControl = function (t, n) { + e.prototype.attachControl.call(this, t, n), + (this._attached = !0), + (this._htmlElementAttached = t), + (n = !De.a.ForceAttachControlToAlwaysPreventDefault && n), + this._vrDevice && this.getEngine().enableVR(this.webVROptions); + var i = this._scene.getEngine().getHostWindow(); + i && i.addEventListener("vrdisplaypresentchange", this._detachIfAttached); + }), + (t.prototype.detachControl = function (t) { + this.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver), + this.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver), + e.prototype.detachControl.call(this, t), + (this._attached = !1), + this.getEngine().disableVR(), + window.removeEventListener("vrdisplaypresentchange", this._detachIfAttached); + }), + (t.prototype.getClassName = function () { + return "WebVRFreeCamera"; + }), + (t.prototype.resetToCurrentRotation = function () { + this._vrDevice.resetPose(); + }), + (t.prototype._updateRigCameras = function () { + var e = this._rigCameras[0], + t = this._rigCameras[1]; + e.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion), + t.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion), + e.position.copyFrom(this._deviceRoomPosition), + t.position.copyFrom(this._deviceRoomPosition); + }), + (t.prototype._correctPositionIfNotTrackPosition = function (e, t) { + void 0 === t && (t = !1), + this.rawPose && + this.rawPose.position && + !this.webVROptions.trackPosition && + (a.a.TranslationToRef(this.rawPose.position[0], this.rawPose.position[1], -this.rawPose.position[2], this._tmpMatrix), t || this._tmpMatrix.invert(), this._tmpMatrix.multiplyToRef(e, e)); + }), + (t.prototype._updateCache = function (t) { + var n = this; + (this.rotationQuaternion.equals(this._cache.rotationQuaternion) && this.position.equals(this._cache.position)) || + (this.updateCacheCalled || ((this.updateCacheCalled = !0), this.update()), + this.rotationQuaternion.toRotationMatrix(this._workingMatrix), + a.e.TransformCoordinatesToRef(this._deviceRoomPosition, this._workingMatrix, this._workingVector), + this.devicePosition.subtractToRef(this._workingVector, this._workingVector), + a.a.ComposeToRef(this._oneVector, this.rotationQuaternion, this._workingVector, this._deviceToWorld), + this._deviceToWorld.getTranslationToRef(this._workingVector), + this._workingVector.addInPlace(this.position), + this._workingVector.subtractInPlace(this._cache.position), + this._deviceToWorld.setTranslation(this._workingVector), + this._deviceToWorld.invertToRef(this._worldToDevice), + this.controllers.forEach(function (e) { + e._deviceToWorld.copyFrom(n._deviceToWorld), n._correctPositionIfNotTrackPosition(e._deviceToWorld), e.update(); + })), + t || e.prototype._updateCache.call(this), + (this.updateCacheCalled = !1); + }), + (t.prototype._computeDevicePosition = function () { + a.e.TransformCoordinatesToRef(this._deviceRoomPosition, this._deviceToWorld, this.devicePosition); + }), + (t.prototype.update = function () { + this._computeDevicePosition(), + a.a.FromQuaternionToRef(this._deviceRoomRotationQuaternion, this._workingMatrix), + this._workingMatrix.multiplyToRef(this._deviceToWorld, this._workingMatrix), + a.b.FromRotationMatrixToRef(this._workingMatrix, this.deviceRotationQuaternion), + this._poseSet && this.onPoseUpdatedFromDeviceObservable.notifyObservers(null), + e.prototype.update.call(this); + }), + (t.prototype._getViewMatrix = function () { + return a.a.Identity(); + }), + (t.prototype._getWebVRViewMatrix = function () { + var e = this._cameraRigParams.parentCamera; + e._updateCache(); + var t = this._cameraRigParams.left ? this._cameraRigParams.frameData.leftViewMatrix : this._cameraRigParams.frameData.rightViewMatrix; + return ( + a.a.FromArrayToRef(t, 0, this._webvrViewMatrix), + this.getScene().useRightHandedSystem || this._webvrViewMatrix.toggleModelMatrixHandInPlace(), + this._webvrViewMatrix.getRotationMatrixToRef(this._cameraRotationMatrix), + a.e.TransformCoordinatesToRef(this._referencePoint, this._cameraRotationMatrix, this._transformedReferencePoint), + this.position.addToRef(this._transformedReferencePoint, this._currentTarget), + 1 !== e.deviceScaleFactor && + (this._webvrViewMatrix.invert(), + e.deviceScaleFactor && + (this._webvrViewMatrix.multiplyAtIndex(12, e.deviceScaleFactor), this._webvrViewMatrix.multiplyAtIndex(13, e.deviceScaleFactor), this._webvrViewMatrix.multiplyAtIndex(14, e.deviceScaleFactor)), + this._webvrViewMatrix.invert()), + e._correctPositionIfNotTrackPosition(this._webvrViewMatrix, !0), + e._worldToDevice.multiplyToRef(this._webvrViewMatrix, this._webvrViewMatrix), + (this._workingMatrix = this._workingMatrix || a.a.Identity()), + this._webvrViewMatrix.invertToRef(this._workingMatrix), + this._workingMatrix.multiplyToRef(e.getWorldMatrix(), this._workingMatrix), + this._workingMatrix.getTranslationToRef(this._globalPosition), + this._markSyncedWithParent(), + this._webvrViewMatrix + ); + }), + (t.prototype._getWebVRProjectionMatrix = function () { + var e = this.parent; + (e._vrDevice.depthNear = e.minZ), (e._vrDevice.depthFar = e.maxZ); + var t = this._cameraRigParams.left ? this._cameraRigParams.frameData.leftProjectionMatrix : this._cameraRigParams.frameData.rightProjectionMatrix; + return a.a.FromArrayToRef(t, 0, this._projectionMatrix), this.getScene().useRightHandedSystem || this._projectionMatrix.toggleProjectionMatrixHandInPlace(), this._projectionMatrix; + }), + (t.prototype.initControllers = function () { + var e = this; + this.controllers = []; + var t = this.getScene().gamepadManager; + (this._onGamepadDisconnectedObserver = t.onGamepadDisconnectedObservable.add(function (t) { + if (t.type === Ye.POSE_ENABLED) { + var n = t; + n.defaultModel && n.defaultModel.setEnabled(!1), "right" === n.hand && (e._rightController = null), "left" === n.hand && (e._leftController = null); + var i = e.controllers.indexOf(n); + -1 !== i && e.controllers.splice(i, 1); + } + })), + (this._onGamepadConnectedObserver = t.onGamepadConnectedObservable.add(function (t) { + if (t.type === Ye.POSE_ENABLED) { + var n = t; + if ( + (e.webVROptions.trackPosition || + (n._disableTrackPosition(new a.e("left" == n.hand ? -0.15 : 0.15, -0.5, 0.25)), + e._updateCacheWhenTrackingDisabledObserver || + (e._updateCacheWhenTrackingDisabledObserver = e._scene.onBeforeRenderObservable.add(function () { + e._updateCache(); + }))), + (n.deviceScaleFactor = e.deviceScaleFactor), + n._deviceToWorld.copyFrom(e._deviceToWorld), + e._correctPositionIfNotTrackPosition(n._deviceToWorld), + e.webVROptions.controllerMeshes && + (n.defaultModel + ? n.defaultModel.setEnabled(!0) + : n.initControllerMesh(e.getScene(), function (t) { + if ((t.scaling.scaleInPlace(e.deviceScaleFactor), e.onControllerMeshLoadedObservable.notifyObservers(n), e.webVROptions.defaultLightingOnControllers)) { + e._lightOnControllers || (e._lightOnControllers = new xn.a("vrControllersLight", new a.e(0, 1, 0), e.getScene())); + var i = function (e, t) { + var n = e.getChildren(); + n && + 0 !== n.length && + n.forEach(function (e) { + t.includedOnlyMeshes.push(e), i(e, t); + }); + }; + e._lightOnControllers.includedOnlyMeshes.push(t), i(t, e._lightOnControllers); + } + })), + n.attachToPoseControlledCamera(e), + -1 === e.controllers.indexOf(n)) + ) { + e.controllers.push(n); + for (var i = !1, r = 0; r < e.controllers.length; r++) e.controllers[r].controllerType === Mt.VIVE && (i ? (e.controllers[r].hand = "right") : ((i = !0), (e.controllers[r].hand = "left"))); + e.controllers.length >= 2 && e.onControllersAttachedObservable.notifyObservers(e.controllers); + } + } + })); + }), + t + ); + })(yt.a), + On = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return ( + (n.onTriggerStateChangedObservable = new o.c()), + (n.onMainButtonStateChangedObservable = new o.c()), + (n.onSecondaryButtonStateChangedObservable = new o.c()), + (n.onPadStateChangedObservable = new o.c()), + (n.onPadValuesChangedObservable = new o.c()), + (n.pad = { x: 0, y: 0 }), + (n._changes = { pressChanged: !1, touchChanged: !1, valueChanged: !1, changed: !1 }), + (n._buttons = new Array(t.buttons.length)), + (n.hand = t.hand), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.onButtonStateChange = function (e) { + this._onButtonStateChange = e; + }), + Object.defineProperty(t.prototype, "defaultModel", { + get: function () { + return this._defaultModel; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.update = function () { + e.prototype.update.call(this); + for (var t = 0; t < this._buttons.length; t++) this._setButtonValue(this.browserGamepad.buttons[t], this._buttons[t], t); + (this.leftStick.x === this.pad.x && this.leftStick.y === this.pad.y) || ((this.pad.x = this.leftStick.x), (this.pad.y = this.leftStick.y), this.onPadValuesChangedObservable.notifyObservers(this.pad)); + }), + (t.prototype._setButtonValue = function (e, t, n) { + e || (e = { pressed: !1, touched: !1, value: 0 }), + t + ? (this._checkChanges(e, t), + this._changes.changed && (this._onButtonStateChange && this._onButtonStateChange(this.index, n, e), this._handleButtonChange(n, e, this._changes)), + (this._buttons[n].pressed = e.pressed), + (this._buttons[n].touched = e.touched), + (this._buttons[n].value = e.value < 1e-8 ? 0 : e.value)) + : (this._buttons[n] = { pressed: e.pressed, touched: e.touched, value: e.value }); + }), + (t.prototype._checkChanges = function (e, t) { + return ( + (this._changes.pressChanged = e.pressed !== t.pressed), + (this._changes.touchChanged = e.touched !== t.touched), + (this._changes.valueChanged = e.value !== t.value), + (this._changes.changed = this._changes.pressChanged || this._changes.touchChanged || this._changes.valueChanged), + this._changes + ); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), + (this._defaultModel = null), + this.onTriggerStateChangedObservable.clear(), + this.onMainButtonStateChangedObservable.clear(), + this.onSecondaryButtonStateChangedObservable.clear(), + this.onPadStateChangedObservable.clear(), + this.onPadValuesChangedObservable.clear(); + }), + t + ); + })(Ft), + En = n(50), + Mn = n(33), + An = n(75), + In = + (n(140), + n(59), + n(141), + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include\n#include\n#include\nvoid main(void)\n{\nvec4 result=texture2D(textureSampler,vUV);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\n\nresult.rgb=toLinearSpace(result.rgb);\n#endif\nresult=applyImageProcessing(result);\n#else\n\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\ngl_FragColor=result;\n}"); + Xt.a.ShadersStore.imageProcessingPixelShader = In; + n(208); + var Dn = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === i && (i = null), void 0 === s && (s = 0); + var l = e.call(this, t, "imageProcessing", [], [], n, i, r, o, a, null, s, "postprocess", null, !0) || this; + return ( + (l._fromLinearSpace = !0), + (l._defines = { + IMAGEPROCESSING: !1, + VIGNETTE: !1, + VIGNETTEBLENDMODEMULTIPLY: !1, + VIGNETTEBLENDMODEOPAQUE: !1, + TONEMAPPING: !1, + TONEMAPPING_ACES: !1, + CONTRAST: !1, + COLORCURVES: !1, + COLORGRADING: !1, + COLORGRADING3D: !1, + FROMLINEARSPACE: !1, + SAMPLER3DGREENDEPTH: !1, + SAMPLER3DBGRMAP: !1, + IMAGEPROCESSINGPOSTPROCESS: !1, + EXPOSURE: !1, + }), + c ? ((c.applyByPostProcess = !0), l._attachImageProcessingConfiguration(c, !0), (l.fromLinearSpace = !1)) : (l._attachImageProcessingConfiguration(null, !0), (l.imageProcessingConfiguration.applyByPostProcess = !0)), + (l.onApply = function (e) { + l.imageProcessingConfiguration.bind(e, l.aspectRatio); + }), + l + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + (e.applyByPostProcess = !0), this._attachImageProcessingConfiguration(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._attachImageProcessingConfiguration = function (e, t) { + var n = this; + if ((void 0 === t && (t = !1), e !== this._imageProcessingConfiguration)) { + if ((this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), e)) this._imageProcessingConfiguration = e; + else { + var i = null, + r = this.getEngine(), + o = this.getCamera(); + if (o) i = o.getScene(); + else if (r && r.scenes) { + var a = r.scenes; + i = a[a.length - 1]; + } else i = E.a.LastCreatedScene; + this._imageProcessingConfiguration = i.imageProcessingConfiguration; + } + this._imageProcessingConfiguration && + (this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(function () { + n._updateParameters(); + })), + t || this._updateParameters(); + } + }), + Object.defineProperty(t.prototype, "colorCurves", { + get: function () { + return this.imageProcessingConfiguration.colorCurves; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurves = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "colorCurvesEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorCurvesEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurvesEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "colorGradingTexture", { + get: function () { + return this.imageProcessingConfiguration.colorGradingTexture; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "colorGradingEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorGradingEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "exposure", { + get: function () { + return this.imageProcessingConfiguration.exposure; + }, + set: function (e) { + this.imageProcessingConfiguration.exposure = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "toneMappingEnabled", { + get: function () { + return this._imageProcessingConfiguration.toneMappingEnabled; + }, + set: function (e) { + this._imageProcessingConfiguration.toneMappingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "toneMappingType", { + get: function () { + return this._imageProcessingConfiguration.toneMappingType; + }, + set: function (e) { + this._imageProcessingConfiguration.toneMappingType = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "contrast", { + get: function () { + return this.imageProcessingConfiguration.contrast; + }, + set: function (e) { + this.imageProcessingConfiguration.contrast = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteStretch", { + get: function () { + return this.imageProcessingConfiguration.vignetteStretch; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteStretch = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteCentreX", { + get: function () { + return this.imageProcessingConfiguration.vignetteCentreX; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteCentreX = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteCentreY", { + get: function () { + return this.imageProcessingConfiguration.vignetteCentreY; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteCentreY = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteWeight", { + get: function () { + return this.imageProcessingConfiguration.vignetteWeight; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteWeight = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteColor", { + get: function () { + return this.imageProcessingConfiguration.vignetteColor; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteColor = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteCameraFov", { + get: function () { + return this.imageProcessingConfiguration.vignetteCameraFov; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteCameraFov = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteBlendMode", { + get: function () { + return this.imageProcessingConfiguration.vignetteBlendMode; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteBlendMode = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "vignetteEnabled", { + get: function () { + return this.imageProcessingConfiguration.vignetteEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.vignetteEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fromLinearSpace", { + get: function () { + return this._fromLinearSpace; + }, + set: function (e) { + this._fromLinearSpace !== e && ((this._fromLinearSpace = e), this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "ImageProcessingPostProcess"; + }), + (t.prototype._updateParameters = function () { + (this._defines.FROMLINEARSPACE = this._fromLinearSpace), this.imageProcessingConfiguration.prepareDefines(this._defines, !0); + var e = ""; + for (var t in this._defines) this._defines[t] && (e += "#define " + t + ";\r\n"); + var n = ["textureSampler"], + i = ["scale"]; + En.a && (En.a.PrepareSamplers(n, this._defines), En.a.PrepareUniforms(i, this._defines)), this.updateEffect(e, i, n); + }), + (t.prototype.dispose = function (t) { + e.prototype.dispose.call(this, t), + this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + this._imageProcessingConfiguration && (this.imageProcessingConfiguration.applyByPostProcess = !1); + }), + Object(h.c)([Object(He.c)()], t.prototype, "_fromLinearSpace", void 0), + t + ); + })(Wt.a), + Rn = n(16), + wn = n(4); + Ee.a._GroundMeshParser = function (e, t) { + return Ln.Parse(e, t); + }; + var Ln = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i.generateOctree = !1), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "GroundMesh"; + }), + Object.defineProperty(t.prototype, "subdivisions", { + get: function () { + return Math.min(this._subdivisionsX, this._subdivisionsY); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "subdivisionsX", { + get: function () { + return this._subdivisionsX; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "subdivisionsY", { + get: function () { + return this._subdivisionsY; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.optimize = function (e, t) { + void 0 === t && (t = 32), (this._subdivisionsX = e), (this._subdivisionsY = e), this.subdivide(e); + this.createOrUpdateSubmeshesOctree && this.createOrUpdateSubmeshesOctree(t); + }), + (t.prototype.getHeightAtCoordinates = function (e, t) { + var n = this.getWorldMatrix(), + i = a.c.Matrix[5]; + n.invertToRef(i); + var r = a.c.Vector3[8]; + if ((a.e.TransformCoordinatesFromFloatsToRef(e, 0, t, i, r), (e = r.x), (t = r.z), e < this._minX || e > this._maxX || t < this._minZ || t > this._maxZ)) return this.position.y; + (this._heightQuads && 0 != this._heightQuads.length) || (this._initHeightQuads(), this._computeHeightQuads()); + var o = this._getFacetAt(e, t), + s = -(o.x * e + o.z * t + o.w) / o.y; + return a.e.TransformCoordinatesFromFloatsToRef(0, s, 0, n, r), r.y; + }), + (t.prototype.getNormalAtCoordinates = function (e, t) { + var n = new a.e(0, 1, 0); + return this.getNormalAtCoordinatesToRef(e, t, n), n; + }), + (t.prototype.getNormalAtCoordinatesToRef = function (e, t, n) { + var i = this.getWorldMatrix(), + r = a.c.Matrix[5]; + i.invertToRef(r); + var o = a.c.Vector3[8]; + if ((a.e.TransformCoordinatesFromFloatsToRef(e, 0, t, r, o), (e = o.x), (t = o.z), e < this._minX || e > this._maxX || t < this._minZ || t > this._maxZ)) return this; + (this._heightQuads && 0 != this._heightQuads.length) || (this._initHeightQuads(), this._computeHeightQuads()); + var s = this._getFacetAt(e, t); + return a.e.TransformNormalFromFloatsToRef(s.x, s.y, s.z, i, n), this; + }), + (t.prototype.updateCoordinateHeights = function () { + return (this._heightQuads && 0 != this._heightQuads.length) || this._initHeightQuads(), this._computeHeightQuads(), this; + }), + (t.prototype._getFacetAt = function (e, t) { + var n = Math.floor(((e + this._maxX) * this._subdivisionsX) / this._width), + i = Math.floor((-(t + this._maxZ) * this._subdivisionsY) / this._height + this._subdivisionsY), + r = this._heightQuads[i * this._subdivisionsX + n]; + return t < r.slope.x * e + r.slope.y ? r.facet1 : r.facet2; + }), + (t.prototype._initHeightQuads = function () { + var e = this._subdivisionsX, + t = this._subdivisionsY; + this._heightQuads = new Array(); + for (var n = 0; n < t; n++) + for (var i = 0; i < e; i++) { + var r = { slope: a.d.Zero(), facet1: new a.f(0, 0, 0, 0), facet2: new a.f(0, 0, 0, 0) }; + this._heightQuads[n * e + i] = r; + } + return this; + }), + (t.prototype._computeHeightQuads = function () { + var e = this.getVerticesData(wn.b.PositionKind); + if (!e) return this; + for ( + var t = a.c.Vector3[3], + n = a.c.Vector3[2], + i = a.c.Vector3[1], + r = a.c.Vector3[0], + o = a.c.Vector3[4], + s = a.c.Vector3[5], + c = a.c.Vector3[6], + l = a.c.Vector3[7], + u = a.c.Vector3[8], + h = 0, + d = 0, + p = 0, + f = 0, + m = 0, + g = 0, + b = 0, + _ = this._subdivisionsX, + v = this._subdivisionsY, + y = 0; + y < v; + y++ + ) + for (var C = 0; C < _; C++) { + (h = 3 * C), + (d = y * (_ + 1) * 3), + (p = (y + 1) * (_ + 1) * 3), + (t.x = e[d + h]), + (t.y = e[d + h + 1]), + (t.z = e[d + h + 2]), + (n.x = e[d + h + 3]), + (n.y = e[d + h + 4]), + (n.z = e[d + h + 5]), + (i.x = e[p + h]), + (i.y = e[p + h + 1]), + (i.z = e[p + h + 2]), + (r.x = e[p + h + 3]), + (r.y = e[p + h + 4]), + (r.z = e[p + h + 5]), + (f = (r.z - t.z) / (r.x - t.x)), + (m = t.z - f * t.x), + n.subtractToRef(t, o), + i.subtractToRef(t, s), + r.subtractToRef(t, c), + a.e.CrossToRef(c, s, l), + a.e.CrossToRef(o, c, u), + l.normalize(), + u.normalize(), + (g = -(l.x * t.x + l.y * t.y + l.z * t.z)), + (b = -(u.x * n.x + u.y * n.y + u.z * n.z)); + var P = this._heightQuads[y * _ + C]; + P.slope.copyFromFloats(f, m), P.facet1.copyFromFloats(l.x, l.y, l.z, g), P.facet2.copyFromFloats(u.x, u.y, u.z, b); + } + return this; + }), + (t.prototype.serialize = function (t) { + e.prototype.serialize.call(this, t), + (t.subdivisionsX = this._subdivisionsX), + (t.subdivisionsY = this._subdivisionsY), + (t.minX = this._minX), + (t.maxX = this._maxX), + (t.minZ = this._minZ), + (t.maxZ = this._maxZ), + (t.width = this._width), + (t.height = this._height); + }), + (t.Parse = function (e, n) { + var i = new t(e.name, n); + return ( + (i._subdivisionsX = e.subdivisionsX || 1), + (i._subdivisionsY = e.subdivisionsY || 1), + (i._minX = e.minX), + (i._maxX = e.maxX), + (i._minZ = e.minZ), + (i._maxZ = e.maxZ), + (i._width = e.width), + (i._height = e.height), + i + ); + }), + t + ); + })(Ee.a), + Fn = n(112); + (Rn.a.CreateGround = function (e) { + var t, + n, + i = [], + r = [], + o = [], + s = [], + c = e.width || 1, + l = e.height || 1, + u = e.subdivisionsX || e.subdivisions || 1, + h = e.subdivisionsY || e.subdivisions || 1; + for (t = 0; t <= h; t++) + for (n = 0; n <= u; n++) { + var d = new a.e((n * c) / u - c / 2, 0, ((h - t) * l) / h - l / 2), + p = new a.e(0, 1, 0); + r.push(d.x, d.y, d.z), o.push(p.x, p.y, p.z), s.push(n / u, 1 - t / h); + } + for (t = 0; t < h; t++) for (n = 0; n < u; n++) i.push(n + 1 + (t + 1) * (u + 1)), i.push(n + 1 + t * (u + 1)), i.push(n + t * (u + 1)), i.push(n + (t + 1) * (u + 1)), i.push(n + 1 + (t + 1) * (u + 1)), i.push(n + t * (u + 1)); + var f = new Rn.a(); + return (f.indices = i), (f.positions = r), (f.normals = o), (f.uvs = s), f; + }), + (Rn.a.CreateTiledGround = function (e) { + var t, + n, + i, + r, + o = void 0 !== e.xmin && null !== e.xmin ? e.xmin : -1, + s = void 0 !== e.zmin && null !== e.zmin ? e.zmin : -1, + c = void 0 !== e.xmax && null !== e.xmax ? e.xmax : 1, + l = void 0 !== e.zmax && null !== e.zmax ? e.zmax : 1, + u = e.subdivisions || { w: 1, h: 1 }, + h = e.precision || { w: 1, h: 1 }, + d = new Array(), + p = new Array(), + f = new Array(), + m = new Array(); + (u.h = u.h < 1 ? 1 : u.h), (u.w = u.w < 1 ? 1 : u.w), (h.w = h.w < 1 ? 1 : h.w), (h.h = h.h < 1 ? 1 : h.h); + var g = (c - o) / u.w, + b = (l - s) / u.h; + function _(e, i, r, o) { + var s = p.length / 3, + c = h.w + 1; + for (t = 0; t < h.h; t++) + for (n = 0; n < h.w; n++) { + var l = [s + n + t * c, s + (n + 1) + t * c, s + (n + 1) + (t + 1) * c, s + n + (t + 1) * c]; + d.push(l[1]), d.push(l[2]), d.push(l[3]), d.push(l[0]), d.push(l[1]), d.push(l[3]); + } + var u = a.e.Zero(), + g = new a.e(0, 1, 0); + for (t = 0; t <= h.h; t++) for (u.z = (t * (o - i)) / h.h + i, n = 0; n <= h.w; n++) (u.x = (n * (r - e)) / h.w + e), (u.y = 0), p.push(u.x, u.y, u.z), f.push(g.x, g.y, g.z), m.push(n / h.w, t / h.h); + } + for (i = 0; i < u.h; i++) for (r = 0; r < u.w; r++) _(o + r * g, s + i * b, o + (r + 1) * g, s + (i + 1) * b); + var v = new Rn.a(); + return (v.indices = d), (v.positions = p), (v.normals = f), (v.uvs = m), v; + }), + (Rn.a.CreateGroundFromHeightMap = function (e) { + var t, + n, + i = [], + r = [], + o = [], + c = [], + l = e.colorFilter || new s.a(0.3, 0.59, 0.11), + u = e.alphaFilter || 0, + h = !1; + if (e.minHeight > e.maxHeight) { + h = !0; + var d = e.maxHeight; + (e.maxHeight = e.minHeight), (e.minHeight = d); + } + for (t = 0; t <= e.subdivisions; t++) + for (n = 0; n <= e.subdivisions; n++) { + var p = new a.e((n * e.width) / e.subdivisions - e.width / 2, 0, ((e.subdivisions - t) * e.height) / e.subdivisions - e.height / 2), + f = 4 * (((((p.x + e.width / 2) / e.width) * (e.bufferWidth - 1)) | 0) + (((1 - (p.z + e.height / 2) / e.height) * (e.bufferHeight - 1)) | 0) * e.bufferWidth), + m = e.buffer[f] / 255, + g = e.buffer[f + 1] / 255, + b = e.buffer[f + 2] / 255, + _ = e.buffer[f + 3] / 255; + h && ((m = 1 - m), (g = 1 - g), (b = 1 - b)); + var v = m * l.r + g * l.g + b * l.b; + (p.y = _ >= u ? e.minHeight + (e.maxHeight - e.minHeight) * v : e.minHeight - j.a), r.push(p.x, p.y, p.z), o.push(0, 0, 0), c.push(n / e.subdivisions, 1 - t / e.subdivisions); + } + for (t = 0; t < e.subdivisions; t++) + for (n = 0; n < e.subdivisions; n++) { + var y = n + 1 + (t + 1) * (e.subdivisions + 1), + C = n + 1 + t * (e.subdivisions + 1), + P = n + t * (e.subdivisions + 1), + x = n + (t + 1) * (e.subdivisions + 1), + T = r[3 * y + 1] >= e.minHeight, + S = r[3 * C + 1] >= e.minHeight, + O = r[3 * P + 1] >= e.minHeight; + T && S && O && (i.push(y), i.push(C), i.push(P)), r[3 * x + 1] >= e.minHeight && T && O && (i.push(x), i.push(y), i.push(P)); + } + Rn.a.ComputeNormals(r, i, o); + var E = new Rn.a(); + return (E.indices = i), (E.positions = r), (E.normals = o), (E.uvs = c), E; + }), + (Ee.a.CreateGround = function (e, t, n, i, r, o) { + var a = { width: t, height: n, subdivisions: i, updatable: o }; + return Nn.CreateGround(e, a, r); + }), + (Ee.a.CreateTiledGround = function (e, t, n, i, r, o, a, s, c) { + var l = { xmin: t, zmin: n, xmax: i, zmax: r, subdivisions: o, precision: a, updatable: c }; + return Nn.CreateTiledGround(e, l, s); + }), + (Ee.a.CreateGroundFromHeightMap = function (e, t, n, i, r, o, a, s, c, l, u) { + var h = { width: n, height: i, subdivisions: r, minHeight: o, maxHeight: a, updatable: c, onReady: l, alphaFilter: u }; + return Nn.CreateGroundFromHeightMap(e, t, h, s); + }); + var Nn = (function () { + function e() {} + return ( + (e.CreateGround = function (e, t, n) { + var i = new Ln(e, n); + return ( + i._setReady(!1), + (i._subdivisionsX = t.subdivisionsX || t.subdivisions || 1), + (i._subdivisionsY = t.subdivisionsY || t.subdivisions || 1), + (i._width = t.width || 1), + (i._height = t.height || 1), + (i._maxX = i._width / 2), + (i._maxZ = i._height / 2), + (i._minX = -i._maxX), + (i._minZ = -i._maxZ), + Rn.a.CreateGround(t).applyToMesh(i, t.updatable), + i._setReady(!0), + i + ); + }), + (e.CreateTiledGround = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return Rn.a.CreateTiledGround(t).applyToMesh(i, t.updatable), i; + }), + (e.CreateGroundFromHeightMap = function (e, t, n, i) { + void 0 === i && (i = null); + var r = n.width || 10, + o = n.height || 10, + a = n.subdivisions || 1, + c = n.minHeight || 0, + l = n.maxHeight || 1, + u = n.colorFilter || new s.a(0.3, 0.59, 0.11), + h = n.alphaFilter || 0, + d = n.updatable, + p = n.onReady; + i = i || E.a.LastCreatedScene; + var f = new Ln(e, i); + (f._subdivisionsX = a), (f._subdivisionsY = a), (f._width = r), (f._height = o), (f._maxX = f._width / 2), (f._maxZ = f._height / 2), (f._minX = -f._maxX), (f._minZ = -f._maxZ), f._setReady(!1); + return ( + $e.b.LoadImage( + t, + function (e) { + var t = e.width, + n = e.height, + s = Fn.a.CreateCanvas(t, n).getContext("2d"); + if (!s) throw new Error("Unable to get 2d context for CreateGroundFromHeightMap"); + if (!i.isDisposed) { + s.drawImage(e, 0, 0); + var m = s.getImageData(0, 0, t, n).data; + Rn.a.CreateGroundFromHeightMap({ width: r, height: o, subdivisions: a, minHeight: c, maxHeight: l, colorFilter: u, buffer: m, bufferWidth: t, bufferHeight: n, alphaFilter: h }).applyToMesh(f, d), + p && p(f), + f._setReady(!0); + } + }, + function () {}, + i.offlineProvider + ), + f + ); + }), + e + ); + })(); + (Rn.a.CreateTorus = function (e) { + for (var t = [], n = [], i = [], r = [], o = e.diameter || 1, s = e.thickness || 0.5, c = e.tessellation || 16, l = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, u = c + 1, h = 0; h <= c; h++) + for (var d = h / c, p = (h * Math.PI * 2) / c - Math.PI / 2, f = a.a.Translation(o / 2, 0, 0).multiply(a.a.RotationY(p)), m = 0; m <= c; m++) { + var g = 1 - m / c, + b = (m * Math.PI * 2) / c + Math.PI, + _ = Math.cos(b), + v = Math.sin(b), + y = new a.e(_, v, 0), + C = y.scale(s / 2), + P = new a.d(d, g); + (C = a.e.TransformCoordinates(C, f)), (y = a.e.TransformNormal(y, f)), n.push(C.x, C.y, C.z), i.push(y.x, y.y, y.z), r.push(P.x, P.y); + var x = (h + 1) % u, + T = (m + 1) % u; + t.push(h * u + m), t.push(h * u + T), t.push(x * u + m), t.push(h * u + T), t.push(x * u + T), t.push(x * u + m); + } + Rn.a._ComputeSides(l, n, t, i, r, e.frontUVs, e.backUVs); + var S = new Rn.a(); + return (S.indices = t), (S.positions = n), (S.normals = i), (S.uvs = r), S; + }), + (Ee.a.CreateTorus = function (e, t, n, i, r, o, a) { + var s = { diameter: t, thickness: n, tessellation: i, sideOrientation: a, updatable: o }; + return kn.CreateTorus(e, s, r); + }); + var kn = (function () { + function e() {} + return ( + (e.CreateTorus = function (e, t, n) { + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateTorus(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + (Rn.a.CreateCylinder = function (e) { + var t = e.height || 2, + n = 0 === e.diameterTop ? 0 : e.diameterTop || e.diameter || 1, + i = 0 === e.diameterBottom ? 0 : e.diameterBottom || e.diameter || 1; + (n = n || 1e-5), (i = i || 1e-5); + var r, + o = e.tessellation || 24, + c = e.subdivisions || 1, + l = !!e.hasRings, + u = !!e.enclose, + h = 0 === e.cap ? 0 : e.cap || Ee.a.CAP_ALL, + d = e.arc && (e.arc <= 0 || e.arc > 1) ? 1 : e.arc || 1, + p = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + f = e.faceUV || new Array(3), + m = e.faceColors, + g = 2 + (1 + (1 !== d && u ? 2 : 0)) * (l ? c : 1); + for (r = 0; r < g; r++) m && void 0 === m[r] && (m[r] = new s.b(1, 1, 1, 1)); + for (r = 0; r < g; r++) f && void 0 === f[r] && (f[r] = new a.f(0, 0, 1, 1)); + var b, + _, + v, + y, + C, + P, + x = new Array(), + T = new Array(), + S = new Array(), + O = new Array(), + E = new Array(), + M = (2 * Math.PI * d) / o, + A = (i - n) / 2 / t, + I = a.e.Zero(), + D = a.e.Zero(), + R = a.e.Zero(), + w = a.e.Zero(), + L = a.e.Zero(), + F = Be.a.Y, + N = 1, + k = 1, + z = 0, + j = 0; + for (y = 0; y <= c; y++) + for (v = ((_ = y / c) * (n - i) + i) / 2, N = l && 0 !== y && y !== c ? 2 : 1, P = 0; P < N; P++) { + for (l && (k += P), u && (k += 2 * P), C = 0; C <= o; C++) + (b = C * M), + (I.x = Math.cos(-b) * v), + (I.y = -t / 2 + _ * t), + (I.z = Math.sin(-b) * v), + 0 === n && y === c + ? ((D.x = S[S.length - 3 * (o + 1)]), (D.y = S[S.length - 3 * (o + 1) + 1]), (D.z = S[S.length - 3 * (o + 1) + 2])) + : ((D.x = I.x), (D.z = I.z), (D.y = Math.sqrt(D.x * D.x + D.z * D.z) * A), D.normalize()), + 0 === C && (R.copyFrom(I), w.copyFrom(D)), + T.push(I.x, I.y, I.z), + S.push(D.x, D.y, D.z), + (j = l ? (z !== k ? f[k].y : f[k].w) : f[k].y + (f[k].w - f[k].y) * _), + O.push(f[k].x + ((f[k].z - f[k].x) * C) / o, j), + m && E.push(m[k].r, m[k].g, m[k].b, m[k].a); + 1 !== d && + u && + (T.push(I.x, I.y, I.z), + T.push(0, I.y, 0), + T.push(0, I.y, 0), + T.push(R.x, R.y, R.z), + a.e.CrossToRef(F, D, L), + L.normalize(), + S.push(L.x, L.y, L.z, L.x, L.y, L.z), + a.e.CrossToRef(w, F, L), + L.normalize(), + S.push(L.x, L.y, L.z, L.x, L.y, L.z), + (j = l ? (z !== k ? f[k + 1].y : f[k + 1].w) : f[k + 1].y + (f[k + 1].w - f[k + 1].y) * _), + O.push(f[k + 1].x, j), + O.push(f[k + 1].z, j), + (j = l ? (z !== k ? f[k + 2].y : f[k + 2].w) : f[k + 2].y + (f[k + 2].w - f[k + 2].y) * _), + O.push(f[k + 2].x, j), + O.push(f[k + 2].z, j), + m && + (E.push(m[k + 1].r, m[k + 1].g, m[k + 1].b, m[k + 1].a), + E.push(m[k + 1].r, m[k + 1].g, m[k + 1].b, m[k + 1].a), + E.push(m[k + 2].r, m[k + 2].g, m[k + 2].b, m[k + 2].a), + E.push(m[k + 2].r, m[k + 2].g, m[k + 2].b, m[k + 2].a))), + z !== k && (z = k); + } + var B = 1 !== d && u ? o + 4 : o; + for (y = 0, k = 0; k < c; k++) { + var V = 0, + G = 0, + U = 0, + H = 0; + for (C = 0; C < o; C++) (V = y * (B + 1) + C), (G = (y + 1) * (B + 1) + C), (U = y * (B + 1) + (C + 1)), (H = (y + 1) * (B + 1) + (C + 1)), x.push(V, G, U), x.push(H, U, G); + 1 !== d && u && (x.push(V + 2, G + 2, U + 2), x.push(H + 2, U + 2, G + 2), x.push(V + 4, G + 4, U + 4), x.push(H + 4, U + 4, G + 4)), (y = l ? y + 2 : y + 1); + } + var W = function (e) { + var r = e ? n / 2 : i / 2; + if (0 !== r) { + var s, + c, + l, + u = e ? f[g - 1] : f[0], + h = null; + m && (h = e ? m[g - 1] : m[0]); + var p = T.length / 3, + b = e ? t / 2 : -t / 2, + _ = new a.e(0, b, 0); + T.push(_.x, _.y, _.z), S.push(0, e ? 1 : -1, 0), O.push(u.x + 0.5 * (u.z - u.x), u.y + 0.5 * (u.w - u.y)), h && E.push(h.r, h.g, h.b, h.a); + var v = new a.d(0.5, 0.5); + for (l = 0; l <= o; l++) { + s = (2 * Math.PI * l * d) / o; + var y = Math.cos(-s), + C = Math.sin(-s); + c = new a.e(y * r, b, C * r); + var P = new a.d(y * v.x + 0.5, C * v.y + 0.5); + T.push(c.x, c.y, c.z), S.push(0, e ? 1 : -1, 0), O.push(u.x + (u.z - u.x) * P.x, u.y + (u.w - u.y) * P.y), h && E.push(h.r, h.g, h.b, h.a); + } + for (l = 0; l < o; l++) e ? (x.push(p), x.push(p + (l + 2)), x.push(p + (l + 1))) : (x.push(p), x.push(p + (l + 1)), x.push(p + (l + 2))); + } + }; + (h !== Ee.a.CAP_START && h !== Ee.a.CAP_ALL) || W(!1), (h !== Ee.a.CAP_END && h !== Ee.a.CAP_ALL) || W(!0), Rn.a._ComputeSides(p, T, x, S, O, e.frontUVs, e.backUVs); + var X = new Rn.a(); + return (X.indices = x), (X.positions = T), (X.normals = S), (X.uvs = O), m && (X.colors = E), X; + }), + (Ee.a.CreateCylinder = function (e, t, n, i, r, o, a, s, c) { + (void 0 !== a && a instanceof ge.a) || (void 0 !== a && ((c = s || Ee.a.DEFAULTSIDE), (s = a)), (a = o), (o = 1)); + var l = { height: t, diameterTop: n, diameterBottom: i, tessellation: r, subdivisions: o, sideOrientation: c, updatable: s }; + return jn.CreateCylinder(e, l, a); + }); + var zn, + jn = (function () { + function e() {} + return ( + (e.CreateCylinder = function (e, t, n) { + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateCylinder(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(), + Bn = (function () { + function e() {} + return ( + (e.GetDefaults = function () { + var t = new e(); + return ( + (t.canvasOptions = { antialias: !0, depth: !0, stencil: !1, alpha: !0, multiview: !1, framebufferScaleFactor: 1 }), + (t.newCanvasCssStyle = "position:absolute; bottom:0px;right:0px;z-index:10;width:90%;height:100%;background-color: #000000;"), + t + ); + }), + e + ); + })(), + Vn = (function () { + function e(e, t) { + var n = this; + if ((void 0 === t && (t = Bn.GetDefaults()), (this._options = t), (this._canvas = null), (this.xrLayer = null), (this._engine = e.scene.getEngine()), t.canvasElement)) this._setManagedOutputCanvas(t.canvasElement); + else { + var i = document.createElement("canvas"); + (i.style.cssText = this._options.newCanvasCssStyle || "position:absolute; bottom:0px;right:0px;"), this._setManagedOutputCanvas(i); + } + e.onXRSessionInit.add(function () { + n._addCanvas(); + }), + e.onXRSessionEnded.add(function () { + n._removeCanvas(); + }); + } + return ( + (e.prototype.dispose = function () { + this._removeCanvas(), this._setManagedOutputCanvas(null); + }), + (e.prototype.initializeXRLayerAsync = function (e) { + var t = this, + n = function () { + return new XRWebGLLayer(e, t.canvasContext, t._options.canvasOptions); + }; + return this.canvasContext.makeXRCompatible + ? this.canvasContext.makeXRCompatible().then(function () { + return (t.xrLayer = n()), t.xrLayer; + }) + : ((this.xrLayer = n()), Promise.resolve(this.xrLayer)); + }), + (e.prototype._addCanvas = function () { + this._canvas && this._canvas !== this._engine.getRenderingCanvas() && document.body.appendChild(this._canvas); + }), + (e.prototype._removeCanvas = function () { + this._canvas && document.body.contains(this._canvas) && this._canvas !== this._engine.getRenderingCanvas() && document.body.removeChild(this._canvas); + }), + (e.prototype._setManagedOutputCanvas = function (e) { + this._removeCanvas(), + e + ? ((this._canvas = e), (this.canvasContext = this._canvas.getContext("webgl2")), this.canvasContext || (this.canvasContext = this._canvas.getContext("webgl"))) + : ((this._canvas = null), (this.canvasContext = null)); + }), + e + ); + })(), + Gn = (function () { + function e(e) { + (this.scene = e), + (this._sessionEnded = !1), + (this.baseLayer = null), + (this.currentTimestamp = -1), + (this.defaultHeightCompensation = 1.7), + (this.onXRFrameObservable = new o.c()), + (this.onXRReferenceSpaceChanged = new o.c()), + (this.onXRSessionEnded = new o.c()), + (this.onXRSessionInit = new o.c()); + } + return ( + Object.defineProperty(e.prototype, "referenceSpace", { + get: function () { + return this._referenceSpace; + }, + set: function (e) { + (this._referenceSpace = e), this.onXRReferenceSpaceChanged.notifyObservers(this._referenceSpace); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this._sessionEnded || this.exitXRAsync(), this.onXRFrameObservable.clear(), this.onXRSessionEnded.clear(), this.onXRReferenceSpaceChanged.clear(), this.onXRSessionInit.clear(); + }), + (e.prototype.exitXRAsync = function () { + return this.session && !this._sessionEnded + ? this.session.end().catch(function (e) { + g.a.Warn("could not end XR session. It has ended already."); + }) + : Promise.resolve(); + }), + (e.prototype.getRenderTargetTextureForEye = function (e) { + return this._rttProvider.getRenderTargetForEye(e); + }), + (e.prototype.getWebXRRenderTarget = function (e) { + var t = this.scene.getEngine(); + return this._xrNavigator.xr.native ? this._xrNavigator.xr.getWebXRRenderTarget(t) : (((e = e || {}).canvasElement = t.getRenderingCanvas() || void 0), new Vn(this, e)); + }), + (e.prototype.initializeAsync = function () { + return (this._xrNavigator = navigator), this._xrNavigator.xr ? Promise.resolve() : Promise.reject("WebXR not available"); + }), + (e.prototype.initializeSessionAsync = function (e, t) { + var n = this; + return ( + void 0 === e && (e = "immersive-vr"), + void 0 === t && (t = {}), + this._xrNavigator.xr.requestSession(e, t).then(function (e) { + return ( + (n.session = e), + n.onXRSessionInit.notifyObservers(e), + (n._sessionEnded = !1), + n.session.addEventListener( + "end", + function () { + var e = n.scene.getEngine(); + (n._sessionEnded = !0), + (n._rttProvider = null), + (e.framebufferDimensionsObject = null), + e.restoreDefaultFramebuffer(), + (e.customAnimationFrameRequester = null), + n.onXRSessionEnded.notifyObservers(null), + e._renderLoop(); + }, + { once: !0 } + ), + n.session + ); + }) + ); + }), + (e.prototype.isSessionSupportedAsync = function (t) { + return e.IsSessionSupportedAsync(t); + }), + (e.prototype.resetReferenceSpace = function () { + this.referenceSpace = this.baseReferenceSpace; + }), + (e.prototype.runXRRenderLoop = function () { + var e = this, + t = this.scene.getEngine(); + if ( + ((t.customAnimationFrameRequester = { + requestAnimationFrame: this.session.requestAnimationFrame.bind(this.session), + renderFunction: function (n, i) { + e._sessionEnded || + ((e.currentFrame = i), + (e.currentTimestamp = n), + i && (e.onXRFrameObservable.notifyObservers(i), (t.framebufferDimensionsObject = e.baseLayer), t._renderLoop(), (t.framebufferDimensionsObject = null))); + }, + }), + this._xrNavigator.xr.native) + ) + this._rttProvider = this._xrNavigator.xr.getNativeRenderTargetProvider(this.session, this._createRenderTargetTexture.bind(this)); + else { + var n = this._createRenderTargetTexture(this.baseLayer.framebufferWidth, this.baseLayer.framebufferHeight, this.baseLayer.framebuffer); + (this._rttProvider = { + getRenderTargetForEye: function () { + return n; + }, + }), + (t.framebufferDimensionsObject = this.baseLayer); + } + window.cancelAnimationFrame && window.cancelAnimationFrame(t._frameHandler), t._renderLoop(); + }), + (e.prototype.setReferenceSpaceTypeAsync = function (e) { + var t = this; + return ( + void 0 === e && (e = "local-floor"), + this.session + .requestReferenceSpace(e) + .then( + function (e) { + return e; + }, + function (e) { + return ( + g.a.Error("XR.requestReferenceSpace failed for the following reason: "), + g.a.Error(e), + g.a.Log('Defaulting to universally-supported "viewer" reference space type.'), + t.session.requestReferenceSpace("viewer").then( + function (e) { + var n = new XRRigidTransform({ x: 0, y: -t.defaultHeightCompensation, z: 0 }); + return e.getOffsetReferenceSpace(n); + }, + function (e) { + throw (g.a.Error(e), 'XR initialization failed: required "viewer" reference space type not supported.'); + } + ) + ); + } + ) + .then(function (e) { + return ( + (t.referenceSpace = t.baseReferenceSpace = e), + t.session.requestReferenceSpace("viewer").then(function (e) { + t.viewerReferenceSpace = e; + }), + t.referenceSpace + ); + }) + ); + }), + (e.prototype.updateRenderStateAsync = function (e) { + return e.baseLayer && (this.baseLayer = e.baseLayer), this.session.updateRenderState(e); + }), + (e.IsSessionSupportedAsync = function (e) { + if (!navigator.xr) return Promise.resolve(!1); + var t = navigator.xr.isSessionSupported || navigator.xr.supportsSession; + return t + ? t + .call(navigator.xr, e) + .then(function (e) { + var t = void 0 === e || e; + return Promise.resolve(t); + }) + .catch(function (e) { + return g.a.Warn(e), Promise.resolve(!1); + }) + : Promise.resolve(!1); + }), + (e.prototype._createRenderTargetTexture = function (e, t, n) { + void 0 === n && (n = null); + var i = new pn.a(this.scene.getEngine(), pn.b.Unknown, !0); + (i.width = e), (i.height = t), (i._framebuffer = n); + var r = new mn.a("XR renderTargetTexture", { width: e, height: t }, this.scene, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, !0); + return (r._texture = i), r; + }), + e + ); + })(); + !(function (e) { + (e[(e.ENTERING_XR = 0)] = "ENTERING_XR"), (e[(e.EXITING_XR = 1)] = "EXITING_XR"), (e[(e.IN_XR = 2)] = "IN_XR"), (e[(e.NOT_IN_XR = 3)] = "NOT_IN_XR"); + })(zn || (zn = {})); + var Un, + Hn = (function () { + function e(t, n) { + if ( + (void 0 === n && (n = null), + (this.scene = t), + (this._pointerDownOnMeshAsked = !1), + (this._isActionableMesh = !1), + (this._teleportationRequestInitiated = !1), + (this._teleportationBackRequestInitiated = !1), + (this._rotationRightAsked = !1), + (this._rotationLeftAsked = !1), + (this._dpadPressed = !0), + (this._activePointer = !1), + (this._id = e._idCounter++), + n) + ) + this._gazeTracker = n.clone("gazeTracker"); + else { + (this._gazeTracker = Ee.a.CreateTorus("gazeTracker", 0.0035, 0.0025, 20, t, !1)), this._gazeTracker.bakeCurrentTransformIntoVertices(), (this._gazeTracker.isPickable = !1), (this._gazeTracker.isVisible = !1); + var i = new Mn.a("targetMat", t); + (i.specularColor = s.a.Black()), (i.emissiveColor = new s.a(0.7, 0.7, 0.7)), (i.backFaceCulling = !1), (this._gazeTracker.material = i); + } + } + return ( + (e.prototype._getForwardRay = function (e) { + return new Re(a.e.Zero(), new a.e(0, 0, e)); + }), + (e.prototype._selectionPointerDown = function () { + (this._pointerDownOnMeshAsked = !0), this._currentHit && this.scene.simulatePointerDown(this._currentHit, { pointerId: this._id }); + }), + (e.prototype._selectionPointerUp = function () { + this._currentHit && this.scene.simulatePointerUp(this._currentHit, { pointerId: this._id }), (this._pointerDownOnMeshAsked = !1); + }), + (e.prototype._activatePointer = function () { + this._activePointer = !0; + }), + (e.prototype._deactivatePointer = function () { + this._activePointer = !1; + }), + (e.prototype._updatePointerDistance = function (e) { + void 0 === e && (e = 100); + }), + (e.prototype.dispose = function () { + (this._interactionsEnabled = !1), (this._teleportationEnabled = !1), this._gazeTracker && this._gazeTracker.dispose(); + }), + (e._idCounter = 0), + e + ); + })(), + Wn = (function (e) { + function t(t, n, i) { + var r = e.call(this, n, i) || this; + (r.webVRController = t), (r._laserPointer = Ee.a.CreateCylinder("laserPointer", 1, 0.004, 2e-4, 20, 1, n, !1)); + var o = new Mn.a("laserPointerMat", n); + if ( + ((o.emissiveColor = new s.a(0.7, 0.7, 0.7)), + (o.alpha = 0.6), + (r._laserPointer.material = o), + (r._laserPointer.rotation.x = Math.PI / 2), + (r._laserPointer.position.z = -0.5), + (r._laserPointer.isVisible = !1), + (r._laserPointer.isPickable = !1), + !t.mesh) + ) { + var a = new Ee.a("preloadControllerMesh", n), + c = new Ee.a(Ft.POINTING_POSE, n); + (c.rotation.x = -0.7), a.addChild(c), t.attachToMesh(a); + } + return ( + r._setLaserPointerParent(t.mesh), + (r._meshAttachedObserver = t._meshAttachedObservable.add(function (e) { + r._setLaserPointerParent(e); + })), + r + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._getForwardRay = function (e) { + return this.webVRController.getForwardRay(e); + }), + (t.prototype._activatePointer = function () { + e.prototype._activatePointer.call(this), (this._laserPointer.isVisible = !0); + }), + (t.prototype._deactivatePointer = function () { + e.prototype._deactivatePointer.call(this), (this._laserPointer.isVisible = !1); + }), + (t.prototype._setLaserPointerColor = function (e) { + this._laserPointer.material.emissiveColor = e; + }), + (t.prototype._setLaserPointerLightingDisabled = function (e) { + this._laserPointer.material.disableLighting = e; + }), + (t.prototype._setLaserPointerParent = function (e) { + var t = function (e) { + (e.isPickable = !1), + e.getChildMeshes().forEach(function (e) { + t(e); + }); + }; + t(e); + var n = e.getChildren(void 0, !1), + i = e; + this.webVRController._pointingPoseNode = null; + for (var r = 0; r < n.length; r++) + if (n[r].name && n[r].name.indexOf(Ft.POINTING_POSE) >= 0) { + (i = n[r]), (this.webVRController._pointingPoseNode = i); + break; + } + this._laserPointer.parent = i; + }), + (t.prototype._updatePointerDistance = function (e) { + void 0 === e && (e = 100), (this._laserPointer.scaling.y = e), (this._laserPointer.position.z = -e / 2); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this._laserPointer.dispose(), this._meshAttachedObserver && this.webVRController._meshAttachedObservable.remove(this._meshAttachedObserver); + }), + t + ); + })(Hn), + Xn = (function (e) { + function t(t, n) { + var i = e.call(this, n) || this; + return (i.getCamera = t), i; + } + return ( + Object(h.d)(t, e), + (t.prototype._getForwardRay = function (e) { + var t = this.getCamera(); + return t ? t.getForwardRay(e) : new Re(a.e.Zero(), a.e.Forward()); + }), + t + ); + })(Hn), + Yn = function () {}, + Kn = (function () { + function e(t, n) { + var i = this; + if ( + (void 0 === n && (n = {}), + (this.webVROptions = n), + (this._webVRsupported = !1), + (this._webVRready = !1), + (this._webVRrequesting = !1), + (this._webVRpresenting = !1), + (this._fullscreenVRpresenting = !1), + (this.enableGazeEvenWhenNoPointerLock = !1), + (this.exitVROnDoubleTap = !0), + (this.onEnteringVRObservable = new o.c()), + (this.onAfterEnteringVRObservable = new o.c()), + (this.onExitingVRObservable = new o.c()), + (this.onControllerMeshLoadedObservable = new o.c()), + (this._useCustomVRButton = !1), + (this._teleportationRequested = !1), + (this._teleportActive = !1), + (this._floorMeshesCollection = []), + (this._teleportationMode = e.TELEPORTATIONMODE_CONSTANTTIME), + (this._teleportationTime = 122), + (this._teleportationSpeed = 20), + (this._rotationAllowed = !0), + (this._teleportBackwardsVector = new a.e(0, -1, -1)), + (this._isDefaultTeleportationTarget = !0), + (this._teleportationFillColor = "#444444"), + (this._teleportationBorderColor = "#FFFFFF"), + (this._rotationAngle = 0), + (this._haloCenter = new a.e(0, 0, 0)), + (this._padSensibilityUp = 0.65), + (this._padSensibilityDown = 0.35), + (this._leftController = null), + (this._rightController = null), + (this._gazeColor = new s.a(0.7, 0.7, 0.7)), + (this._laserColor = new s.a(0.7, 0.7, 0.7)), + (this._pickedLaserColor = new s.a(0.2, 0.2, 1)), + (this._pickedGazeColor = new s.a(0, 0, 1)), + (this.onNewMeshSelected = new o.c()), + (this.onMeshSelectedWithController = new o.c()), + (this.onNewMeshPicked = new o.c()), + (this.onBeforeCameraTeleport = new o.c()), + (this.onAfterCameraTeleport = new o.c()), + (this.onSelectedMeshUnselected = new o.c()), + (this.teleportationEnabled = !0), + (this._teleportationInitialized = !1), + (this._interactionsEnabled = !1), + (this._interactionsRequested = !1), + (this._displayGaze = !0), + (this._displayLaserPointer = !0), + (this.updateGazeTrackerScale = !0), + (this.updateGazeTrackerColor = !0), + (this.updateControllerLaserColor = !0), + (this.requestPointerLockOnFullScreen = !0), + (this.xrTestDone = !1), + (this._onResize = function () { + i.moveButtonToBottomRight(), i._fullscreenVRpresenting && i._webVRready && i.exitVR(); + }), + (this._onFullscreenChange = function () { + var e = document; + void 0 !== e.fullscreen + ? (i._fullscreenVRpresenting = document.fullscreen) + : void 0 !== e.mozFullScreen + ? (i._fullscreenVRpresenting = e.mozFullScreen) + : void 0 !== e.webkitIsFullScreen + ? (i._fullscreenVRpresenting = e.webkitIsFullScreen) + : void 0 !== e.msIsFullScreen + ? (i._fullscreenVRpresenting = e.msIsFullScreen) + : void 0 !== document.msFullscreenElement && (i._fullscreenVRpresenting = document.msFullscreenElement), + !i._fullscreenVRpresenting && + i._inputElement && + (i.exitVR(), + !i._useCustomVRButton && + i._btnVR && + ((i._btnVR.style.top = i._inputElement.offsetTop + i._inputElement.offsetHeight - 70 + "px"), + (i._btnVR.style.left = i._inputElement.offsetLeft + i._inputElement.offsetWidth - 100 + "px"), + i.updateButtonVisibility())); + }), + (this._cachedAngularSensibility = { angularSensibilityX: null, angularSensibilityY: null, angularSensibility: null }), + (this.beforeRender = function () { + i._leftController && i._leftController._activePointer && i._castRayAndSelectObject(i._leftController), + i._rightController && i._rightController._activePointer && i._castRayAndSelectObject(i._rightController), + i._noControllerIsActive && (i._scene.getEngine().isPointerLock || i.enableGazeEvenWhenNoPointerLock) ? i._castRayAndSelectObject(i._cameraGazer) : (i._cameraGazer._gazeTracker.isVisible = !1); + }), + (this._onNewGamepadConnected = function (e) { + if (e.type !== Ye.POSE_ENABLED) + e.leftStick && + e.onleftstickchanged(function (e) { + i._teleportationInitialized && + i.teleportationEnabled && + ((!i._leftController && !i._rightController) || (i._leftController && !i._leftController._activePointer && i._rightController && !i._rightController._activePointer)) && + (i._checkTeleportWithRay(e, i._cameraGazer), i._checkTeleportBackwards(e, i._cameraGazer)); + }), + e.rightStick && + e.onrightstickchanged(function (e) { + i._teleportationInitialized && i._checkRotate(e, i._cameraGazer); + }), + e.type === Ye.XBOX && + (e.onbuttondown(function (e) { + i._interactionsEnabled && e === Rt.A && i._cameraGazer._selectionPointerDown(); + }), + e.onbuttonup(function (e) { + i._interactionsEnabled && e === Rt.A && i._cameraGazer._selectionPointerUp(); + })); + else { + var t = e, + n = new Wn(t, i._scene, i._cameraGazer._gazeTracker); + "right" === t.hand || (i._leftController && i._leftController.webVRController != t) ? (i._rightController = n) : (i._leftController = n), i._tryEnableInteractionOnController(n); + } + }), + (this._tryEnableInteractionOnController = function (e) { + i._interactionsRequested && !e._interactionsEnabled && i._enableInteractionOnController(e), i._teleportationRequested && !e._teleportationEnabled && i._enableTeleportationOnController(e); + }), + (this._onNewGamepadDisconnected = function (e) { + e instanceof On && + ("left" === e.hand && null != i._leftController && (i._leftController.dispose(), (i._leftController = null)), + "right" === e.hand && null != i._rightController && (i._rightController.dispose(), (i._rightController = null))); + }), + (this._workingVector = a.e.Zero()), + (this._workingQuaternion = a.b.Identity()), + (this._workingMatrix = a.a.Identity()), + (this._scene = t), + (this._inputElement = t.getEngine().getInputElement()), + "getVRDisplays" in navigator || (n.useXR = !0), + void 0 === n.createFallbackVRDeviceOrientationFreeCamera && (n.createFallbackVRDeviceOrientationFreeCamera = !0), + void 0 === n.createDeviceOrientationCamera && (n.createDeviceOrientationCamera = !0), + void 0 === n.laserToggle && (n.laserToggle = !0), + void 0 === n.defaultHeight && (n.defaultHeight = 1.7), + n.useCustomVRButton && ((this._useCustomVRButton = !0), n.customVRButton && (this._btnVR = n.customVRButton)), + n.rayLength && (this._rayLength = n.rayLength), + (this._defaultHeight = n.defaultHeight), + n.positionScale && ((this._rayLength *= n.positionScale), (this._defaultHeight *= n.positionScale)), + (this._hasEnteredVR = !1), + this._scene.activeCamera ? (this._position = this._scene.activeCamera.position.clone()) : (this._position = new a.e(0, this._defaultHeight, 0)), + n.createDeviceOrientationCamera || !this._scene.activeCamera) + ) { + if ( + ((this._deviceOrientationCamera = new Tt("deviceOrientationVRHelper", this._position.clone(), t)), + this._scene.activeCamera && + ((this._deviceOrientationCamera.minZ = this._scene.activeCamera.minZ), + (this._deviceOrientationCamera.maxZ = this._scene.activeCamera.maxZ), + this._scene.activeCamera instanceof vt.a && this._scene.activeCamera.rotation)) + ) { + var r = this._scene.activeCamera; + r.rotationQuaternion + ? this._deviceOrientationCamera.rotationQuaternion.copyFrom(r.rotationQuaternion) + : this._deviceOrientationCamera.rotationQuaternion.copyFrom(a.b.RotationYawPitchRoll(r.rotation.y, r.rotation.x, r.rotation.z)), + (this._deviceOrientationCamera.rotation = r.rotation.clone()); + } + (this._scene.activeCamera = this._deviceOrientationCamera), this._inputElement && this._scene.activeCamera.attachControl(this._inputElement); + } else this._existingCamera = this._scene.activeCamera; + this.webVROptions.useXR && navigator.xr + ? Gn.IsSessionSupportedAsync("immersive-vr").then(function (e) { + e + ? (g.a.Log("Using WebXR. It is recommended to use the WebXRDefaultExperience directly"), + t.createDefaultXRExperienceAsync({ floorMeshes: n.floorMeshes || [] }).then(function (e) { + (i.xr = e), + (i.xrTestDone = !0), + (i._cameraGazer = new Xn(function () { + return i.xr.baseExperience.camera; + }, t)), + i.xr.baseExperience.onStateChangedObservable.add(function (e) { + switch (e) { + case zn.ENTERING_XR: + i.onEnteringVRObservable.notifyObservers(i), i._interactionsEnabled || i.xr.pointerSelection.detach(), (i.xr.pointerSelection.displayLaserPointer = i._displayLaserPointer); + break; + case zn.EXITING_XR: + i.onExitingVRObservable.notifyObservers(i), i._scene.getEngine().resize(); + break; + case zn.IN_XR: + i._hasEnteredVR = !0; + break; + case zn.NOT_IN_XR: + i._hasEnteredVR = !1; + } + }); + })) + : i.completeVRInit(t, n); + }) + : this.completeVRInit(t, n); + } + return ( + Object.defineProperty(e.prototype, "onEnteringVR", { + get: function () { + return this.onEnteringVRObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onExitingVR", { + get: function () { + return this.onExitingVRObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onControllerMeshLoaded", { + get: function () { + return this.onControllerMeshLoadedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "teleportationTarget", { + get: function () { + return this._teleportationTarget; + }, + set: function (e) { + e && ((e.name = "teleportationTarget"), (this._isDefaultTeleportationTarget = !1), (this._teleportationTarget = e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "gazeTrackerMesh", { + get: function () { + return this._cameraGazer._gazeTracker; + }, + set: function (e) { + e && + (this._cameraGazer._gazeTracker && this._cameraGazer._gazeTracker.dispose(), + this._leftController && this._leftController._gazeTracker && this._leftController._gazeTracker.dispose(), + this._rightController && this._rightController._gazeTracker && this._rightController._gazeTracker.dispose(), + (this._cameraGazer._gazeTracker = e), + this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(), + (this._cameraGazer._gazeTracker.isPickable = !1), + (this._cameraGazer._gazeTracker.isVisible = !1), + (this._cameraGazer._gazeTracker.name = "gazeTracker"), + this._leftController && (this._leftController._gazeTracker = this._cameraGazer._gazeTracker.clone("gazeTracker")), + this._rightController && (this._rightController._gazeTracker = this._cameraGazer._gazeTracker.clone("gazeTracker"))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "leftControllerGazeTrackerMesh", { + get: function () { + return this._leftController ? this._leftController._gazeTracker : null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rightControllerGazeTrackerMesh", { + get: function () { + return this._rightController ? this._rightController._gazeTracker : null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "displayGaze", { + get: function () { + return this._displayGaze; + }, + set: function (e) { + (this._displayGaze = e), + e || + ((this._cameraGazer._gazeTracker.isVisible = !1), this._leftController && (this._leftController._gazeTracker.isVisible = !1), this._rightController && (this._rightController._gazeTracker.isVisible = !1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "displayLaserPointer", { + get: function () { + return this._displayLaserPointer; + }, + set: function (e) { + (this._displayLaserPointer = e), + e + ? (this._rightController && this._rightController._activatePointer(), this._leftController && this._leftController._activatePointer()) + : (this._rightController && (this._rightController._deactivatePointer(), (this._rightController._gazeTracker.isVisible = !1)), + this._leftController && (this._leftController._deactivatePointer(), (this._leftController._gazeTracker.isVisible = !1))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "deviceOrientationCamera", { + get: function () { + return this._deviceOrientationCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "currentVRCamera", { + get: function () { + return this._webVRready ? this._webVRCamera : this._scene.activeCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "webVRCamera", { + get: function () { + return this._webVRCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "vrDeviceOrientationCamera", { + get: function () { + return this._vrDeviceOrientationCamera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "vrButton", { + get: function () { + return this._btnVR; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "_teleportationRequestInitiated", { + get: function () { + return ( + this._cameraGazer._teleportationRequestInitiated || + (null !== this._leftController && this._leftController._teleportationRequestInitiated) || + (null !== this._rightController && this._rightController._teleportationRequestInitiated) + ); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.completeVRInit = function (e, t) { + var n = this; + if ( + ((this.xrTestDone = !0), + t.createFallbackVRDeviceOrientationFreeCamera && + (t.useMultiview && (t.vrDeviceOrientationCameraMetrics || (t.vrDeviceOrientationCameraMetrics = cn.GetDefault()), (t.vrDeviceOrientationCameraMetrics.multiviewEnabled = !0)), + (this._vrDeviceOrientationCamera = new Cn("VRDeviceOrientationVRHelper", this._position, this._scene, !0, t.vrDeviceOrientationCameraMetrics)), + (this._vrDeviceOrientationCamera.angularSensibility = Number.MAX_VALUE)), + (this._webVRCamera = new Sn("WebVRHelper", this._position, this._scene, t)), + this._webVRCamera.useStandingMatrix(), + (this._cameraGazer = new Xn(function () { + return n.currentVRCamera; + }, e)), + !this._useCustomVRButton) + ) { + (this._btnVR = document.createElement("BUTTON")), (this._btnVR.className = "babylonVRicon"), (this._btnVR.id = "babylonVRiconbtn"), (this._btnVR.title = "Click to switch to VR"); + var i = + ".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url(" + + (window.SVGSVGElement + ? "data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A" + : "https://cdn.babylonjs.com/Assets/vrButton.png") + + "); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }"; + i += ".babylonVRicon.vrdisplaypresenting { display: none; }"; + var r = document.createElement("style"); + r.appendChild(document.createTextNode(i)), document.getElementsByTagName("head")[0].appendChild(r), this.moveButtonToBottomRight(); + } + this._btnVR && + this._btnVR.addEventListener("click", function () { + n.isInVRMode ? n._scene.getEngine().disableVR() : n.enterVR(); + }); + var o = this._scene.getEngine().getHostWindow(); + o && + (o.addEventListener("resize", this._onResize), + document.addEventListener("fullscreenchange", this._onFullscreenChange, !1), + document.addEventListener("mozfullscreenchange", this._onFullscreenChange, !1), + document.addEventListener("webkitfullscreenchange", this._onFullscreenChange, !1), + document.addEventListener("msfullscreenchange", this._onFullscreenChange, !1), + (document.onmsfullscreenchange = this._onFullscreenChange), + t.createFallbackVRDeviceOrientationFreeCamera + ? this.displayVRButton() + : this._scene.getEngine().onVRDisplayChangedObservable.add(function (e) { + e.vrDisplay && n.displayVRButton(); + }), + (this._onKeyDown = function (e) { + 27 === e.keyCode && n.isInVRMode && n.exitVR(); + }), + document.addEventListener("keydown", this._onKeyDown), + this._scene.onPrePointerObservable.add( + function () { + n._hasEnteredVR && n.exitVROnDoubleTap && (n.exitVR(), n._fullscreenVRpresenting && n._scene.getEngine().exitFullscreen()); + }, + ye.a.POINTERDOUBLETAP, + !1 + ), + (this._onVRDisplayChanged = function (e) { + return n.onVRDisplayChanged(e); + }), + (this._onVrDisplayPresentChange = function () { + return n.onVrDisplayPresentChange(); + }), + (this._onVRRequestPresentStart = function () { + (n._webVRrequesting = !0), n.updateButtonVisibility(); + }), + (this._onVRRequestPresentComplete = function () { + (n._webVRrequesting = !1), n.updateButtonVisibility(); + }), + e.getEngine().onVRDisplayChangedObservable.add(this._onVRDisplayChanged), + e.getEngine().onVRRequestPresentStart.add(this._onVRRequestPresentStart), + e.getEngine().onVRRequestPresentComplete.add(this._onVRRequestPresentComplete), + o.addEventListener("vrdisplaypresentchange", this._onVrDisplayPresentChange), + e.onDisposeObservable.add(function () { + n.dispose(); + }), + this._webVRCamera.onControllerMeshLoadedObservable.add(function (e) { + return n._onDefaultMeshLoaded(e); + }), + this._scene.gamepadManager.onGamepadConnectedObservable.add(this._onNewGamepadConnected), + this._scene.gamepadManager.onGamepadDisconnectedObservable.add(this._onNewGamepadDisconnected), + this.updateButtonVisibility(), + (this._circleEase = new Y()), + this._circleEase.setEasingMode(X.EASINGMODE_EASEINOUT), + (this._teleportationEasing = this._circleEase), + e.onPointerObservable.add(function (t) { + n._interactionsEnabled && + e.activeCamera === n.vrDeviceOrientationCamera && + "mouse" === t.event.pointerType && + (t.type === ye.a.POINTERDOWN ? n._cameraGazer._selectionPointerDown() : t.type === ye.a.POINTERUP && n._cameraGazer._selectionPointerUp()); + }), + this.webVROptions.floorMeshes && this.enableTeleportation({ floorMeshes: this.webVROptions.floorMeshes })); + }), + (e.prototype._onDefaultMeshLoaded = function (e) { + this._leftController && this._leftController.webVRController == e && e.mesh && this._leftController._setLaserPointerParent(e.mesh), + this._rightController && this._rightController.webVRController == e && e.mesh && this._rightController._setLaserPointerParent(e.mesh); + try { + this.onControllerMeshLoadedObservable.notifyObservers(e); + } catch (e) { + g.a.Warn("Error in your custom logic onControllerMeshLoaded: " + e); + } + }), + Object.defineProperty(e.prototype, "isInVRMode", { + get: function () { + return (this.xr && this.webVROptions.useXR && this.xr.baseExperience.state === zn.IN_XR) || this._webVRpresenting || this._fullscreenVRpresenting; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.onVrDisplayPresentChange = function () { + var e = this._scene.getEngine().getVRDevice(); + if (e) { + var t = this._webVRpresenting; + (this._webVRpresenting = e.isPresenting), t && !this._webVRpresenting && this.exitVR(); + } else g.a.Warn("Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?"); + this.updateButtonVisibility(); + }), + (e.prototype.onVRDisplayChanged = function (e) { + (this._webVRsupported = e.vrSupported), (this._webVRready = !!e.vrDisplay), (this._webVRpresenting = e.vrDisplay && e.vrDisplay.isPresenting), this.updateButtonVisibility(); + }), + (e.prototype.moveButtonToBottomRight = function () { + if (this._inputElement && !this._useCustomVRButton && this._btnVR) { + var e = this._inputElement.getBoundingClientRect(); + (this._btnVR.style.top = e.top + e.height - 70 + "px"), (this._btnVR.style.left = e.left + e.width - 100 + "px"); + } + }), + (e.prototype.displayVRButton = function () { + this._useCustomVRButton || this._btnVRDisplayed || !this._btnVR || (document.body.appendChild(this._btnVR), (this._btnVRDisplayed = !0)); + }), + (e.prototype.updateButtonVisibility = function () { + this._btnVR && + !this._useCustomVRButton && + ((this._btnVR.className = "babylonVRicon"), + this.isInVRMode + ? (this._btnVR.className += " vrdisplaypresenting") + : (this._webVRready && (this._btnVR.className += " vrdisplayready"), + this._webVRsupported && (this._btnVR.className += " vrdisplaysupported"), + this._webVRrequesting && (this._btnVR.className += " vrdisplayrequesting"))); + }), + (e.prototype.enterVR = function () { + var e = this; + if (this.xr) this.xr.baseExperience.enterXRAsync("immersive-vr", "local-floor", this.xr.renderTarget); + else { + if (this.onEnteringVRObservable) + try { + this.onEnteringVRObservable.notifyObservers(this); + } catch (e) { + g.a.Warn("Error in your custom logic onEnteringVR: " + e); + } + if (this._scene.activeCamera) { + if ( + ((this._position = this._scene.activeCamera.position.clone()), + this.vrDeviceOrientationCamera && + ((this.vrDeviceOrientationCamera.rotation = a.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles()), + (this.vrDeviceOrientationCamera.angularSensibility = 2e3)), + this.webVRCamera) + ) { + var t = this.webVRCamera.deviceRotationQuaternion.toEulerAngles().y, + n = a.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles().y - t, + i = this.webVRCamera.rotationQuaternion.toEulerAngles().y; + this.webVRCamera.rotationQuaternion = a.b.FromEulerAngles(0, i + n, 0); + } + (this._existingCamera = this._scene.activeCamera), + this._existingCamera.angularSensibilityX && + ((this._cachedAngularSensibility.angularSensibilityX = this._existingCamera.angularSensibilityX), (this._existingCamera.angularSensibilityX = Number.MAX_VALUE)), + this._existingCamera.angularSensibilityY && + ((this._cachedAngularSensibility.angularSensibilityY = this._existingCamera.angularSensibilityY), (this._existingCamera.angularSensibilityY = Number.MAX_VALUE)), + this._existingCamera.angularSensibility && ((this._cachedAngularSensibility.angularSensibility = this._existingCamera.angularSensibility), (this._existingCamera.angularSensibility = Number.MAX_VALUE)); + } + this._webVRrequesting || + (this._webVRready + ? this._webVRpresenting || + (this._scene.getEngine().onVRRequestPresentComplete.addOnce(function (t) { + e.onAfterEnteringVRObservable.notifyObservers({ success: t }); + }), + (this._webVRCamera.position = this._position), + (this._scene.activeCamera = this._webVRCamera)) + : this._vrDeviceOrientationCamera && + ((this._vrDeviceOrientationCamera.position = this._position), + this._scene.activeCamera && (this._vrDeviceOrientationCamera.minZ = this._scene.activeCamera.minZ), + (this._scene.activeCamera = this._vrDeviceOrientationCamera), + this._scene.getEngine().enterFullscreen(this.requestPointerLockOnFullScreen), + this.updateButtonVisibility(), + this._vrDeviceOrientationCamera.onViewMatrixChangedObservable.addOnce(function () { + e.onAfterEnteringVRObservable.notifyObservers({ success: !0 }); + })), + this._scene.activeCamera && this._inputElement && this._scene.activeCamera.attachControl(this._inputElement), + this._interactionsEnabled && this._scene.registerBeforeRender(this.beforeRender), + this._displayLaserPointer && + [this._leftController, this._rightController].forEach(function (e) { + e && e._activatePointer(); + }), + (this._hasEnteredVR = !0)); + } + }), + (e.prototype.exitVR = function () { + if (this.xr) this.xr.baseExperience.exitXRAsync(); + else if (this._hasEnteredVR) { + if (this.onExitingVRObservable) + try { + this.onExitingVRObservable.notifyObservers(this); + } catch (e) { + g.a.Warn("Error in your custom logic onExitingVR: " + e); + } + this._webVRpresenting && this._scene.getEngine().disableVR(), + this._scene.activeCamera && (this._position = this._scene.activeCamera.position.clone()), + this.vrDeviceOrientationCamera && (this.vrDeviceOrientationCamera.angularSensibility = Number.MAX_VALUE), + this._deviceOrientationCamera + ? ((this._deviceOrientationCamera.position = this._position), + (this._scene.activeCamera = this._deviceOrientationCamera), + this._cachedAngularSensibility.angularSensibilityX && + ((this._deviceOrientationCamera.angularSensibilityX = this._cachedAngularSensibility.angularSensibilityX), (this._cachedAngularSensibility.angularSensibilityX = null)), + this._cachedAngularSensibility.angularSensibilityY && + ((this._deviceOrientationCamera.angularSensibilityY = this._cachedAngularSensibility.angularSensibilityY), (this._cachedAngularSensibility.angularSensibilityY = null)), + this._cachedAngularSensibility.angularSensibility && + ((this._deviceOrientationCamera.angularSensibility = this._cachedAngularSensibility.angularSensibility), (this._cachedAngularSensibility.angularSensibility = null))) + : this._existingCamera && + ((this._existingCamera.position = this._position), + (this._scene.activeCamera = this._existingCamera), + this._inputElement && this._scene.activeCamera.attachControl(this._inputElement), + this._cachedAngularSensibility.angularSensibilityX && + ((this._existingCamera.angularSensibilityX = this._cachedAngularSensibility.angularSensibilityX), (this._cachedAngularSensibility.angularSensibilityX = null)), + this._cachedAngularSensibility.angularSensibilityY && + ((this._existingCamera.angularSensibilityY = this._cachedAngularSensibility.angularSensibilityY), (this._cachedAngularSensibility.angularSensibilityY = null)), + this._cachedAngularSensibility.angularSensibility && + ((this._existingCamera.angularSensibility = this._cachedAngularSensibility.angularSensibility), (this._cachedAngularSensibility.angularSensibility = null))), + this.updateButtonVisibility(), + this._interactionsEnabled && + (this._scene.unregisterBeforeRender(this.beforeRender), + (this._cameraGazer._gazeTracker.isVisible = !1), + this._leftController && (this._leftController._gazeTracker.isVisible = !1), + this._rightController && (this._rightController._gazeTracker.isVisible = !1)), + this._scene.getEngine().resize(), + [this._leftController, this._rightController].forEach(function (e) { + e && e._deactivatePointer(); + }), + (this._hasEnteredVR = !1); + var e = this._scene.getEngine(); + e._onVrDisplayPresentChange && e._onVrDisplayPresentChange(); + } + }), + Object.defineProperty(e.prototype, "position", { + get: function () { + return this._position; + }, + set: function (e) { + (this._position = e), this._scene.activeCamera && (this._scene.activeCamera.position = e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.enableInteractions = function () { + var e = this; + if (!this._interactionsEnabled) { + if (((this._interactionsRequested = !0), this.xr)) return void (this.xr.baseExperience.state === zn.IN_XR && this.xr.pointerSelection.attach()); + this._leftController && this._enableInteractionOnController(this._leftController), + this._rightController && this._enableInteractionOnController(this._rightController), + (this.raySelectionPredicate = function (t) { + return t.isVisible && (t.isPickable || t.name === e._floorMeshName); + }), + (this.meshSelectionPredicate = function () { + return !0; + }), + (this._raySelectionPredicate = function (t) { + return ( + !!(e._isTeleportationFloor(t) || (-1 === t.name.indexOf("gazeTracker") && -1 === t.name.indexOf("teleportationTarget") && -1 === t.name.indexOf("torusTeleportation"))) && e.raySelectionPredicate(t) + ); + }), + (this._interactionsEnabled = !0); + } + }), + Object.defineProperty(e.prototype, "_noControllerIsActive", { + get: function () { + return !((this._leftController && this._leftController._activePointer) || (this._rightController && this._rightController._activePointer)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._isTeleportationFloor = function (e) { + for (var t = 0; t < this._floorMeshesCollection.length; t++) if (this._floorMeshesCollection[t].id === e.id) return !0; + return !(!this._floorMeshName || e.name !== this._floorMeshName); + }), + (e.prototype.addFloorMesh = function (e) { + this._floorMeshesCollection && (this._floorMeshesCollection.indexOf(e) > -1 || this._floorMeshesCollection.push(e)); + }), + (e.prototype.removeFloorMesh = function (e) { + if (this._floorMeshesCollection) { + var t = this._floorMeshesCollection.indexOf(e); + -1 !== t && this._floorMeshesCollection.splice(t, 1); + } + }), + (e.prototype.enableTeleportation = function (e) { + var t = this; + if ((void 0 === e && (e = {}), !this._teleportationInitialized)) { + if (((this._teleportationRequested = !0), this.enableInteractions(), this.webVROptions.useXR && (e.floorMeshes || e.floorMeshName))) { + var n = e.floorMeshes || []; + if (!n.length) { + var i = this._scene.getMeshByName(e.floorMeshName); + i && n.push(i); + } + if (this.xr) + return ( + n.forEach(function (e) { + t.xr.teleportation.addFloorMesh(e); + }), + void (this.xr.teleportation.attached || this.xr.teleportation.attach()) + ); + if (!this.xrTestDone) { + var r = function () { + t.xrTestDone && (t._scene.unregisterBeforeRender(r), t.xr ? t.xr.teleportation.attached || t.xr.teleportation.attach() : t.enableTeleportation(e)); + }; + return void this._scene.registerBeforeRender(r); + } + } + e.floorMeshName && (this._floorMeshName = e.floorMeshName), + e.floorMeshes && (this._floorMeshesCollection = e.floorMeshes), + e.teleportationMode && (this._teleportationMode = e.teleportationMode), + e.teleportationTime && e.teleportationTime > 0 && (this._teleportationTime = e.teleportationTime), + e.teleportationSpeed && e.teleportationSpeed > 0 && (this._teleportationSpeed = e.teleportationSpeed), + void 0 !== e.easingFunction && (this._teleportationEasing = e.easingFunction), + null != this._leftController && this._enableTeleportationOnController(this._leftController), + null != this._rightController && this._enableTeleportationOnController(this._rightController); + var o = new En.a(); + (o.vignetteColor = new s.b(0, 0, 0, 0)), + (o.vignetteEnabled = !0), + (this._postProcessMove = new Dn("postProcessMove", 1, this._webVRCamera, void 0, void 0, void 0, void 0, o)), + this._webVRCamera.detachPostProcess(this._postProcessMove), + (this._teleportationInitialized = !0), + this._isDefaultTeleportationTarget && (this._createTeleportationCircles(), this._teleportationTarget.scaling.scaleInPlace(this._webVRCamera.deviceScaleFactor)); + } + }), + (e.prototype._enableInteractionOnController = function (e) { + var t = this; + e.webVRController.mesh && + ((e._interactionsEnabled = !0), + this.isInVRMode && this._displayLaserPointer && e._activatePointer(), + this.webVROptions.laserToggle && + e.webVRController.onMainButtonStateChangedObservable.add(function (n) { + t._displayLaserPointer && 1 === n.value && (e._activePointer ? e._deactivatePointer() : e._activatePointer(), t.displayGaze && (e._gazeTracker.isVisible = e._activePointer)); + }), + e.webVRController.onTriggerStateChangedObservable.add(function (n) { + var i = e; + t._noControllerIsActive && (i = t._cameraGazer), i._pointerDownOnMeshAsked ? n.value < t._padSensibilityDown && i._selectionPointerUp() : n.value > t._padSensibilityUp && i._selectionPointerDown(); + })); + }), + (e.prototype._checkTeleportWithRay = function (e, t) { + (this._teleportationRequestInitiated && !t._teleportationRequestInitiated) || + (t._teleportationRequestInitiated + ? Math.sqrt(e.y * e.y + e.x * e.x) < this._padSensibilityDown && (this._teleportActive && this.teleportCamera(this._haloCenter), (t._teleportationRequestInitiated = !1)) + : e.y < -this._padSensibilityUp && t._dpadPressed && (t._activatePointer(), (t._teleportationRequestInitiated = !0))); + }), + (e.prototype._checkRotate = function (e, t) { + t._teleportationRequestInitiated || + (t._rotationLeftAsked + ? e.x > -this._padSensibilityDown && (t._rotationLeftAsked = !1) + : e.x < -this._padSensibilityUp && t._dpadPressed && ((t._rotationLeftAsked = !0), this._rotationAllowed && this._rotateCamera(!1)), + t._rotationRightAsked + ? e.x < this._padSensibilityDown && (t._rotationRightAsked = !1) + : e.x > this._padSensibilityUp && t._dpadPressed && ((t._rotationRightAsked = !0), this._rotationAllowed && this._rotateCamera(!0))); + }), + (e.prototype._checkTeleportBackwards = function (e, t) { + if (!t._teleportationRequestInitiated) + if (e.y > this._padSensibilityUp && t._dpadPressed) { + if (!t._teleportationBackRequestInitiated) { + if (!this.currentVRCamera) return; + var n = a.b.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()), + i = this.currentVRCamera.position; + this.currentVRCamera.devicePosition && this.currentVRCamera.deviceRotationQuaternion && ((n = this.currentVRCamera.deviceRotationQuaternion), (i = this.currentVRCamera.devicePosition)), + n.toEulerAnglesToRef(this._workingVector), + (this._workingVector.z = 0), + (this._workingVector.x = 0), + a.b.RotationYawPitchRollToRef(this._workingVector.y, this._workingVector.x, this._workingVector.z, this._workingQuaternion), + this._workingQuaternion.toRotationMatrix(this._workingMatrix), + a.e.TransformCoordinatesToRef(this._teleportBackwardsVector, this._workingMatrix, this._workingVector); + var r = new Re(i, this._workingVector), + o = this._scene.pickWithRay(r, this._raySelectionPredicate); + o && o.pickedPoint && o.pickedMesh && this._isTeleportationFloor(o.pickedMesh) && o.distance < 5 && this.teleportCamera(o.pickedPoint), (t._teleportationBackRequestInitiated = !0); + } + } else t._teleportationBackRequestInitiated = !1; + }), + (e.prototype._enableTeleportationOnController = function (e) { + var t = this; + e.webVRController.mesh && + (e._interactionsEnabled || this._enableInteractionOnController(e), + (e._interactionsEnabled = !0), + (e._teleportationEnabled = !0), + e.webVRController.controllerType === Mt.VIVE && + ((e._dpadPressed = !1), + e.webVRController.onPadStateChangedObservable.add(function (t) { + (e._dpadPressed = t.pressed), e._dpadPressed || ((e._rotationLeftAsked = !1), (e._rotationRightAsked = !1), (e._teleportationBackRequestInitiated = !1)); + })), + e.webVRController.onPadValuesChangedObservable.add(function (n) { + t.teleportationEnabled && (t._checkTeleportBackwards(n, e), t._checkTeleportWithRay(n, e)), t._checkRotate(n, e); + })); + }), + (e.prototype._createTeleportationCircles = function () { + (this._teleportationTarget = Ee.a.CreateGround("teleportationTarget", 2, 2, 2, this._scene)), (this._teleportationTarget.isPickable = !1); + var e = new An.a("DynamicTexture", 512, this._scene, !0); + e.hasAlpha = !0; + var t = e.getContext(); + t.beginPath(), + t.arc(256, 256, 200, 0, 2 * Math.PI, !1), + (t.fillStyle = this._teleportationFillColor), + t.fill(), + (t.lineWidth = 10), + (t.strokeStyle = this._teleportationBorderColor), + t.stroke(), + t.closePath(), + e.update(); + var n = new Mn.a("TextPlaneMaterial", this._scene); + (n.diffuseTexture = e), (this._teleportationTarget.material = n); + var i = Ee.a.CreateTorus("torusTeleportation", 0.75, 0.1, 25, this._scene, !1); + (i.isPickable = !1), (i.parent = this._teleportationTarget); + var r = new R.a("animationInnerCircle", "position.y", 30, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CYCLE), + o = []; + o.push({ frame: 0, value: 0 }), o.push({ frame: 30, value: 0.4 }), o.push({ frame: 60, value: 0 }), r.setKeys(o); + var a = new ie(); + a.setEasingMode(X.EASINGMODE_EASEINOUT), r.setEasingFunction(a), (i.animations = []), i.animations.push(r), this._scene.beginAnimation(i, 0, 60, !0), this._hideTeleportationTarget(); + }), + (e.prototype._displayTeleportationTarget = function () { + (this._teleportActive = !0), this._teleportationInitialized && ((this._teleportationTarget.isVisible = !0), this._isDefaultTeleportationTarget && (this._teleportationTarget.getChildren()[0].isVisible = !0)); + }), + (e.prototype._hideTeleportationTarget = function () { + (this._teleportActive = !1), this._teleportationInitialized && ((this._teleportationTarget.isVisible = !1), this._isDefaultTeleportationTarget && (this._teleportationTarget.getChildren()[0].isVisible = !1)); + }), + (e.prototype._rotateCamera = function (e) { + var t = this; + if (this.currentVRCamera instanceof yt.a) { + e ? this._rotationAngle++ : this._rotationAngle--, (this.currentVRCamera.animations = []); + var n = a.b.FromRotationMatrix(a.a.RotationY((Math.PI / 4) * this._rotationAngle)), + i = new R.a("animationRotation", "rotationQuaternion", 90, R.a.ANIMATIONTYPE_QUATERNION, R.a.ANIMATIONLOOPMODE_CONSTANT), + r = []; + r.push({ frame: 0, value: this.currentVRCamera.rotationQuaternion }), + r.push({ frame: 6, value: n }), + i.setKeys(r), + i.setEasingFunction(this._circleEase), + this.currentVRCamera.animations.push(i), + (this._postProcessMove.animations = []); + var o = new R.a("animationPP", "vignetteWeight", 90, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CONSTANT), + s = []; + s.push({ frame: 0, value: 0 }), s.push({ frame: 3, value: 4 }), s.push({ frame: 6, value: 0 }), o.setKeys(s), o.setEasingFunction(this._circleEase), this._postProcessMove.animations.push(o); + var c = new R.a("animationPP2", "vignetteStretch", 90, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CONSTANT), + l = []; + l.push({ frame: 0, value: 0 }), + l.push({ frame: 3, value: 10 }), + l.push({ frame: 6, value: 0 }), + c.setKeys(l), + c.setEasingFunction(this._circleEase), + this._postProcessMove.animations.push(c), + (this._postProcessMove.imageProcessingConfiguration.vignetteWeight = 0), + (this._postProcessMove.imageProcessingConfiguration.vignetteStretch = 0), + (this._postProcessMove.samples = 4), + this._webVRCamera.attachPostProcess(this._postProcessMove), + this._scene.beginAnimation(this._postProcessMove, 0, 6, !1, 1, function () { + t._webVRCamera.detachPostProcess(t._postProcessMove); + }), + this._scene.beginAnimation(this.currentVRCamera, 0, 6, !1, 1); + } + }), + (e.prototype._moveTeleportationSelectorTo = function (e, t, n) { + if (e.pickedPoint) { + t._teleportationRequestInitiated && (this._displayTeleportationTarget(), this._haloCenter.copyFrom(e.pickedPoint), this._teleportationTarget.position.copyFrom(e.pickedPoint)); + var i = this._convertNormalToDirectionOfRay(e.getNormal(!0, !1), n); + if (i) { + var r = a.e.Cross(Be.a.Y, i), + o = a.e.Cross(i, r); + a.e.RotationFromAxisToRef(o, i, r, this._teleportationTarget.rotation); + } + this._teleportationTarget.position.y += 0.1; + } + }), + (e.prototype.teleportCamera = function (t) { + var n = this; + if (this.currentVRCamera instanceof yt.a) { + this.webVRCamera.leftCamera + ? (this._workingVector.copyFrom(this.webVRCamera.leftCamera.globalPosition), this._workingVector.subtractInPlace(this.webVRCamera.position), t.subtractToRef(this._workingVector, this._workingVector)) + : this._workingVector.copyFrom(t), + this.isInVRMode ? (this._workingVector.y += this.webVRCamera.deviceDistanceToRoomGround() * this._webVRCamera.deviceScaleFactor) : (this._workingVector.y += this._defaultHeight), + this.onBeforeCameraTeleport.notifyObservers(this._workingVector); + var i, r; + if (this._teleportationMode == e.TELEPORTATIONMODE_CONSTANTSPEED) { + r = 90; + var o = a.e.Distance(this.currentVRCamera.position, this._workingVector); + i = this._teleportationSpeed / o; + } else (r = Math.round((90 * this._teleportationTime) / 1e3)), (i = 1); + this.currentVRCamera.animations = []; + var s = new R.a("animationCameraTeleportation", "position", 90, R.a.ANIMATIONTYPE_VECTOR3, R.a.ANIMATIONLOOPMODE_CONSTANT), + c = [ + { frame: 0, value: this.currentVRCamera.position }, + { frame: r, value: this._workingVector }, + ]; + s.setKeys(c), s.setEasingFunction(this._teleportationEasing), this.currentVRCamera.animations.push(s), (this._postProcessMove.animations = []); + var l = Math.round(r / 2), + u = new R.a("animationPP", "vignetteWeight", 90, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CONSTANT), + h = []; + h.push({ frame: 0, value: 0 }), h.push({ frame: l, value: 8 }), h.push({ frame: r, value: 0 }), u.setKeys(h), this._postProcessMove.animations.push(u); + var d = new R.a("animationPP2", "vignetteStretch", 90, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CONSTANT), + p = []; + p.push({ frame: 0, value: 0 }), + p.push({ frame: l, value: 10 }), + p.push({ frame: r, value: 0 }), + d.setKeys(p), + this._postProcessMove.animations.push(d), + (this._postProcessMove.imageProcessingConfiguration.vignetteWeight = 0), + (this._postProcessMove.imageProcessingConfiguration.vignetteStretch = 0), + this._webVRCamera.attachPostProcess(this._postProcessMove), + this._scene.beginAnimation(this._postProcessMove, 0, r, !1, i, function () { + n._webVRCamera.detachPostProcess(n._postProcessMove); + }), + this._scene.beginAnimation(this.currentVRCamera, 0, r, !1, i, function () { + n.onAfterCameraTeleport.notifyObservers(n._workingVector); + }), + this._hideTeleportationTarget(); + } + }), + (e.prototype._convertNormalToDirectionOfRay = function (e, t) { + e && Math.acos(a.e.Dot(e, t.direction)) < Math.PI / 2 && e.scaleInPlace(-1); + return e; + }), + (e.prototype._castRayAndSelectObject = function (e) { + if (this.currentVRCamera instanceof yt.a) { + var t = e._getForwardRay(this._rayLength), + n = this._scene.pickWithRay(t, this._raySelectionPredicate); + if ((n && (e._laserPointer && (n.originMesh = e._laserPointer.parent), this._scene.simulatePointerMove(n, { pointerId: e._id })), (e._currentHit = n), n && n.pickedPoint)) { + if (this._displayGaze) { + var i = 1; + (e._gazeTracker.isVisible = !0), + e._isActionableMesh && (i = 3), + this.updateGazeTrackerScale && ((e._gazeTracker.scaling.x = n.distance * i), (e._gazeTracker.scaling.y = n.distance * i), (e._gazeTracker.scaling.z = n.distance * i)); + var r = this._convertNormalToDirectionOfRay(n.getNormal(), t); + if (r) { + var o = a.e.Cross(Be.a.Y, r), + s = a.e.Cross(r, o); + a.e.RotationFromAxisToRef(s, r, o, e._gazeTracker.rotation); + } + e._gazeTracker.position.copyFrom(n.pickedPoint), + e._gazeTracker.position.x < 0 ? (e._gazeTracker.position.x += 0.002) : (e._gazeTracker.position.x -= 0.002), + e._gazeTracker.position.y < 0 ? (e._gazeTracker.position.y += 0.002) : (e._gazeTracker.position.y -= 0.002), + e._gazeTracker.position.z < 0 ? (e._gazeTracker.position.z += 0.002) : (e._gazeTracker.position.z -= 0.002); + } + e._updatePointerDistance(n.distance); + } else e._updatePointerDistance(), (e._gazeTracker.isVisible = !1); + if (n && n.pickedMesh) { + if (this._teleportationInitialized && this._isTeleportationFloor(n.pickedMesh) && n.pickedPoint) + return ( + e._currentMeshSelected && !this._isTeleportationFloor(e._currentMeshSelected) && this._notifySelectedMeshUnselected(e._currentMeshSelected), + (e._currentMeshSelected = null), + void (e._teleportationRequestInitiated && this._moveTeleportationSelectorTo(n, e, t)) + ); + if (n.pickedMesh !== e._currentMeshSelected) + if (this.meshSelectionPredicate(n.pickedMesh)) { + this.onNewMeshPicked.notifyObservers(n), + (e._currentMeshSelected = n.pickedMesh), + n.pickedMesh.isPickable && n.pickedMesh.actionManager + ? (this.changeGazeColor(this._pickedGazeColor), this.changeLaserColor(this._pickedLaserColor), (e._isActionableMesh = !0)) + : (this.changeGazeColor(this._gazeColor), this.changeLaserColor(this._laserColor), (e._isActionableMesh = !1)); + try { + this.onNewMeshSelected.notifyObservers(n.pickedMesh); + var c = e; + c.webVRController && this.onMeshSelectedWithController.notifyObservers({ mesh: n.pickedMesh, controller: c.webVRController }); + } catch (e) { + g.a.Warn("Error while raising onNewMeshSelected or onMeshSelectedWithController: " + e); + } + } else this._notifySelectedMeshUnselected(e._currentMeshSelected), (e._currentMeshSelected = null), this.changeGazeColor(this._gazeColor), this.changeLaserColor(this._laserColor); + } else this._notifySelectedMeshUnselected(e._currentMeshSelected), (e._currentMeshSelected = null), this.changeGazeColor(this._gazeColor), this.changeLaserColor(this._laserColor); + } + }), + (e.prototype._notifySelectedMeshUnselected = function (e) { + e && this.onSelectedMeshUnselected.notifyObservers(e); + }), + (e.prototype.setLaserColor = function (e, t) { + void 0 === t && (t = this._pickedLaserColor), (this._laserColor = e), (this._pickedLaserColor = t); + }), + (e.prototype.setLaserLightingState = function (e) { + void 0 === e && (e = !0), this._leftController && this._leftController._setLaserPointerLightingDisabled(!e), this._rightController && this._rightController._setLaserPointerLightingDisabled(!e); + }), + (e.prototype.setGazeColor = function (e, t) { + void 0 === t && (t = this._pickedGazeColor), (this._gazeColor = e), (this._pickedGazeColor = t); + }), + (e.prototype.changeLaserColor = function (e) { + this.updateControllerLaserColor && (this._leftController && this._leftController._setLaserPointerColor(e), this._rightController && this._rightController._setLaserPointerColor(e)); + }), + (e.prototype.changeGazeColor = function (e) { + this.updateGazeTrackerColor && + this._cameraGazer._gazeTracker.material && + ((this._cameraGazer._gazeTracker.material.emissiveColor = e), + this._leftController && (this._leftController._gazeTracker.material.emissiveColor = e), + this._rightController && (this._rightController._gazeTracker.material.emissiveColor = e)); + }), + (e.prototype.dispose = function () { + this.isInVRMode && this.exitVR(), + this._postProcessMove && this._postProcessMove.dispose(), + this._webVRCamera && this._webVRCamera.dispose(), + this._vrDeviceOrientationCamera && this._vrDeviceOrientationCamera.dispose(), + !this._useCustomVRButton && this._btnVR && this._btnVR.parentNode && document.body.removeChild(this._btnVR), + this._deviceOrientationCamera && this._scene.activeCamera != this._deviceOrientationCamera && this._deviceOrientationCamera.dispose(), + this._cameraGazer && this._cameraGazer.dispose(), + this._leftController && this._leftController.dispose(), + this._rightController && this._rightController.dispose(), + this._teleportationTarget && this._teleportationTarget.dispose(), + this.xr && this.xr.dispose(), + (this._floorMeshesCollection = []), + document.removeEventListener("keydown", this._onKeyDown), + window.removeEventListener("vrdisplaypresentchange", this._onVrDisplayPresentChange), + window.removeEventListener("resize", this._onResize), + document.removeEventListener("fullscreenchange", this._onFullscreenChange), + document.removeEventListener("mozfullscreenchange", this._onFullscreenChange), + document.removeEventListener("webkitfullscreenchange", this._onFullscreenChange), + document.removeEventListener("msfullscreenchange", this._onFullscreenChange), + (document.onmsfullscreenchange = null), + this._scene.getEngine().onVRDisplayChangedObservable.removeCallback(this._onVRDisplayChanged), + this._scene.getEngine().onVRRequestPresentStart.removeCallback(this._onVRRequestPresentStart), + this._scene.getEngine().onVRRequestPresentComplete.removeCallback(this._onVRRequestPresentComplete), + window.removeEventListener("vrdisplaypresentchange", this._onVrDisplayPresentChange), + this._scene.gamepadManager.onGamepadConnectedObservable.removeCallback(this._onNewGamepadConnected), + this._scene.gamepadManager.onGamepadDisconnectedObservable.removeCallback(this._onNewGamepadDisconnected), + this._scene.unregisterBeforeRender(this.beforeRender); + }), + (e.prototype.getClassName = function () { + return "VRExperienceHelper"; + }), + (e.TELEPORTATIONMODE_CONSTANTTIME = 0), + (e.TELEPORTATIONMODE_CONSTANTSPEED = 1), + e + ); + })(), + Zn = n(85), + qn = + ((Un = { root: 0, found: !1 }), + function (e, t, n, i) { + (Un.root = 0), (Un.found = !1); + var r = t * t - 4 * e * n; + if (r < 0) return Un; + var o = Math.sqrt(r), + a = (-t - o) / (2 * e), + s = (-t + o) / (2 * e); + if (a > s) { + var c = s; + (s = a), (a = c); + } + return a > 0 && a < i ? ((Un.root = a), (Un.found = !0), Un) : s > 0 && s < i ? ((Un.root = s), (Un.found = !0), Un) : Un; + }), + Qn = (function () { + function e() { + (this._collisionPoint = a.e.Zero()), + (this._planeIntersectionPoint = a.e.Zero()), + (this._tempVector = a.e.Zero()), + (this._tempVector2 = a.e.Zero()), + (this._tempVector3 = a.e.Zero()), + (this._tempVector4 = a.e.Zero()), + (this._edge = a.e.Zero()), + (this._baseToVertex = a.e.Zero()), + (this._destinationPoint = a.e.Zero()), + (this._slidePlaneNormal = a.e.Zero()), + (this._displacementVector = a.e.Zero()), + (this._radius = a.e.One()), + (this._retry = 0), + (this._basePointWorld = a.e.Zero()), + (this._velocityWorld = a.e.Zero()), + (this._normalizedVelocity = a.e.Zero()), + (this._collisionMask = -1); + } + return ( + Object.defineProperty(e.prototype, "collisionMask", { + get: function () { + return this._collisionMask; + }, + set: function (e) { + this._collisionMask = isNaN(e) ? -1 : e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "slidePlaneNormal", { + get: function () { + return this._slidePlaneNormal; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._initialize = function (e, t, n) { + (this._velocity = t), + a.e.NormalizeToRef(t, this._normalizedVelocity), + (this._basePoint = e), + e.multiplyToRef(this._radius, this._basePointWorld), + t.multiplyToRef(this._radius, this._velocityWorld), + (this._velocityWorldLength = this._velocityWorld.length()), + (this._epsilon = n), + (this.collisionFound = !1); + }), + (e.prototype._checkPointInTriangle = function (e, t, n, i, r) { + t.subtractToRef(e, this._tempVector), n.subtractToRef(e, this._tempVector2), a.e.CrossToRef(this._tempVector, this._tempVector2, this._tempVector4); + var o = a.e.Dot(this._tempVector4, r); + return ( + !(o < 0) && + (i.subtractToRef(e, this._tempVector3), + a.e.CrossToRef(this._tempVector2, this._tempVector3, this._tempVector4), + !((o = a.e.Dot(this._tempVector4, r)) < 0) && (a.e.CrossToRef(this._tempVector3, this._tempVector, this._tempVector4), (o = a.e.Dot(this._tempVector4, r)) >= 0)) + ); + }), + (e.prototype._canDoCollision = function (e, t, n, i) { + var r = a.e.Distance(this._basePointWorld, e), + o = Math.max(this._radius.x, this._radius.y, this._radius.z); + return ( + !(r > this._velocityWorldLength + o + t) && + !!(function (e, t, n, i) { + return !(e.x > n.x + i) && !(n.x - i > t.x) && !(e.y > n.y + i) && !(n.y - i > t.y) && !(e.z > n.z + i) && !(n.z - i > t.z); + })(n, i, this._basePointWorld, this._velocityWorldLength + o) + ); + }), + (e.prototype._testTriangle = function (e, t, n, i, r, o, s) { + var c, + l = !1; + t || (t = []), t[e] || ((t[e] = new Zn.a(0, 0, 0, 0)), t[e].copyFromPoints(n, i, r)); + var u = t[e]; + if (o || u.isFrontFacingTo(this._normalizedVelocity, 0)) { + var h = u.signedDistanceTo(this._basePoint), + d = a.e.Dot(u.normal, this._velocity); + if (0 == d) { + if (Math.abs(h) >= 1) return; + (l = !0), (c = 0); + } else { + var p = (1 - h) / d; + if ((c = (-1 - h) / d) > p) { + var f = p; + (p = c), (c = f); + } + if (c > 1 || p < 0) return; + c < 0 && (c = 0), c > 1 && (c = 1); + } + this._collisionPoint.copyFromFloats(0, 0, 0); + var m = !1, + g = 1; + if ( + (l || + (this._basePoint.subtractToRef(u.normal, this._planeIntersectionPoint), + this._velocity.scaleToRef(c, this._tempVector), + this._planeIntersectionPoint.addInPlace(this._tempVector), + this._checkPointInTriangle(this._planeIntersectionPoint, n, i, r, u.normal) && ((m = !0), (g = c), this._collisionPoint.copyFrom(this._planeIntersectionPoint))), + !m) + ) { + var b = this._velocity.lengthSquared(), + _ = b; + this._basePoint.subtractToRef(n, this._tempVector); + var v = 2 * a.e.Dot(this._velocity, this._tempVector), + y = this._tempVector.lengthSquared() - 1, + C = qn(_, v, y, g); + C.found && ((g = C.root), (m = !0), this._collisionPoint.copyFrom(n)), + this._basePoint.subtractToRef(i, this._tempVector), + (v = 2 * a.e.Dot(this._velocity, this._tempVector)), + (y = this._tempVector.lengthSquared() - 1), + (C = qn(_, v, y, g)).found && ((g = C.root), (m = !0), this._collisionPoint.copyFrom(i)), + this._basePoint.subtractToRef(r, this._tempVector), + (v = 2 * a.e.Dot(this._velocity, this._tempVector)), + (y = this._tempVector.lengthSquared() - 1), + (C = qn(_, v, y, g)).found && ((g = C.root), (m = !0), this._collisionPoint.copyFrom(r)), + i.subtractToRef(n, this._edge), + n.subtractToRef(this._basePoint, this._baseToVertex); + var P = this._edge.lengthSquared(), + x = a.e.Dot(this._edge, this._velocity), + T = a.e.Dot(this._edge, this._baseToVertex); + if (((_ = P * -b + x * x), (v = P * (2 * a.e.Dot(this._velocity, this._baseToVertex)) - 2 * x * T), (y = P * (1 - this._baseToVertex.lengthSquared()) + T * T), (C = qn(_, v, y, g)).found)) { + var S = (x * C.root - T) / P; + S >= 0 && S <= 1 && ((g = C.root), (m = !0), this._edge.scaleInPlace(S), n.addToRef(this._edge, this._collisionPoint)); + } + r.subtractToRef(i, this._edge), + i.subtractToRef(this._basePoint, this._baseToVertex), + (P = this._edge.lengthSquared()), + (x = a.e.Dot(this._edge, this._velocity)), + (T = a.e.Dot(this._edge, this._baseToVertex)), + (_ = P * -b + x * x), + (v = P * (2 * a.e.Dot(this._velocity, this._baseToVertex)) - 2 * x * T), + (y = P * (1 - this._baseToVertex.lengthSquared()) + T * T), + (C = qn(_, v, y, g)).found && (S = (x * C.root - T) / P) >= 0 && S <= 1 && ((g = C.root), (m = !0), this._edge.scaleInPlace(S), i.addToRef(this._edge, this._collisionPoint)), + n.subtractToRef(r, this._edge), + r.subtractToRef(this._basePoint, this._baseToVertex), + (P = this._edge.lengthSquared()), + (x = a.e.Dot(this._edge, this._velocity)), + (T = a.e.Dot(this._edge, this._baseToVertex)), + (_ = P * -b + x * x), + (v = P * (2 * a.e.Dot(this._velocity, this._baseToVertex)) - 2 * x * T), + (y = P * (1 - this._baseToVertex.lengthSquared()) + T * T), + (C = qn(_, v, y, g)).found && (S = (x * C.root - T) / P) >= 0 && S <= 1 && ((g = C.root), (m = !0), this._edge.scaleInPlace(S), r.addToRef(this._edge, this._collisionPoint)); + } + if (m) { + var O = g * this._velocity.length(); + (!this.collisionFound || O < this._nearestDistance) && + (this.intersectionPoint ? this.intersectionPoint.copyFrom(this._collisionPoint) : (this.intersectionPoint = this._collisionPoint.clone()), + (this._nearestDistance = O), + (this.collisionFound = !0), + (this.collidedMesh = s)); + } + } + }), + (e.prototype._collide = function (e, t, n, i, r, o, a, s) { + for (var c = i; c < r; c += 3) { + var l = t[n[c] - o], + u = t[n[c + 1] - o], + h = t[n[c + 2] - o]; + this._testTriangle(c, e, h, u, l, a, s); + } + }), + (e.prototype._getResponse = function (e, t) { + e.addToRef(t, this._destinationPoint), + t.scaleInPlace(this._nearestDistance / t.length()), + this._basePoint.addToRef(t, e), + e.subtractToRef(this.intersectionPoint, this._slidePlaneNormal), + this._slidePlaneNormal.normalize(), + this._slidePlaneNormal.scaleToRef(this._epsilon, this._displacementVector), + e.addInPlace(this._displacementVector), + this.intersectionPoint.addInPlace(this._displacementVector), + this._slidePlaneNormal.scaleInPlace(Zn.a.SignedDistanceToPlaneFromPositionAndNormal(this.intersectionPoint, this._slidePlaneNormal, this._destinationPoint)), + this._destinationPoint.subtractInPlace(this._slidePlaneNormal), + this._destinationPoint.subtractToRef(this.intersectionPoint, t); + }), + e + ); + })(), + Jn = (function () { + function e() { + (this._scaledPosition = a.e.Zero()), (this._scaledVelocity = a.e.Zero()), (this._finalPosition = a.e.Zero()); + } + return ( + (e.prototype.getNewPosition = function (e, t, n, i, r, o, a) { + e.divideToRef(n._radius, this._scaledPosition), + t.divideToRef(n._radius, this._scaledVelocity), + (n.collidedMesh = null), + (n._retry = 0), + (n._initialVelocity = this._scaledVelocity), + (n._initialPosition = this._scaledPosition), + this._collideWithWorld(this._scaledPosition, this._scaledVelocity, n, i, this._finalPosition, r), + this._finalPosition.multiplyInPlace(n._radius), + o(a, this._finalPosition, n.collidedMesh); + }), + (e.prototype.createCollider = function () { + return new Qn(); + }), + (e.prototype.init = function (e) { + this._scene = e; + }), + (e.prototype._collideWithWorld = function (e, t, n, i, r, o) { + void 0 === o && (o = null); + var a = 10 * ue.a.CollisionsEpsilon; + if (n._retry >= i) r.copyFrom(e); + else { + var s = o ? o.collisionMask : n.collisionMask; + n._initialize(e, t, a); + for (var c = 0; c < this._scene.meshes.length; c++) { + var l = this._scene.meshes[c]; + l.isEnabled() && l.checkCollisions && l.subMeshes && l !== o && 0 != (s & l.collisionGroup) && l._checkCollision(n); + } + n.collisionFound ? ((0 === t.x && 0 === t.y && 0 === t.z) || n._getResponse(e, t), t.length() <= a ? r.copyFrom(e) : (n._retry++, this._collideWithWorld(e, t, n, i, r, o))) : e.addToRef(t, r); + } + }), + e + ); + })(); + ge.a.CollisionCoordinatorFactory = function () { + return new Jn(); + }; + var $n = n(188), + ei = n(148), + ti = n(63), + ni = n(152), + ii = n(47), + ri = (function () { + function e(e, t, n, i, r, o) { + (this.entries = new Array()), + (this._boundingVectors = new Array()), + (this._capacity = n), + (this._depth = i), + (this._maxDepth = r), + (this._creationFunc = o), + (this._minPoint = e), + (this._maxPoint = t), + this._boundingVectors.push(e.clone()), + this._boundingVectors.push(t.clone()), + this._boundingVectors.push(e.clone()), + (this._boundingVectors[2].x = t.x), + this._boundingVectors.push(e.clone()), + (this._boundingVectors[3].y = t.y), + this._boundingVectors.push(e.clone()), + (this._boundingVectors[4].z = t.z), + this._boundingVectors.push(t.clone()), + (this._boundingVectors[5].z = e.z), + this._boundingVectors.push(t.clone()), + (this._boundingVectors[6].x = e.x), + this._boundingVectors.push(t.clone()), + (this._boundingVectors[7].y = e.y); + } + return ( + Object.defineProperty(e.prototype, "capacity", { + get: function () { + return this._capacity; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "minPoint", { + get: function () { + return this._minPoint; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "maxPoint", { + get: function () { + return this._maxPoint; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addEntry = function (e) { + if (this.blocks) + for (var t = 0; t < this.blocks.length; t++) { + this.blocks[t].addEntry(e); + } + else this._creationFunc(e, this), this.entries.length > this.capacity && this._depth < this._maxDepth && this.createInnerBlocks(); + }), + (e.prototype.removeEntry = function (e) { + if (this.blocks) + for (var t = 0; t < this.blocks.length; t++) { + this.blocks[t].removeEntry(e); + } + else { + var n = this.entries.indexOf(e); + n > -1 && this.entries.splice(n, 1); + } + }), + (e.prototype.addEntries = function (e) { + for (var t = 0; t < e.length; t++) { + var n = e[t]; + this.addEntry(n); + } + }), + (e.prototype.select = function (e, t, n) { + if (ei.a.IsInFrustum(this._boundingVectors, e)) { + if (this.blocks) { + for (var i = 0; i < this.blocks.length; i++) { + this.blocks[i].select(e, t, n); + } + return; + } + n ? t.concat(this.entries) : t.concatWithNoDuplicate(this.entries); + } + }), + (e.prototype.intersects = function (e, t, n, i) { + if (ei.a.IntersectsSphere(this._minPoint, this._maxPoint, e, t)) { + if (this.blocks) { + for (var r = 0; r < this.blocks.length; r++) { + this.blocks[r].intersects(e, t, n, i); + } + return; + } + i ? n.concat(this.entries) : n.concatWithNoDuplicate(this.entries); + } + }), + (e.prototype.intersectsRay = function (e, t) { + if (e.intersectsBoxMinMax(this._minPoint, this._maxPoint)) { + if (this.blocks) { + for (var n = 0; n < this.blocks.length; n++) { + this.blocks[n].intersectsRay(e, t); + } + return; + } + t.concatWithNoDuplicate(this.entries); + } + }), + (e.prototype.createInnerBlocks = function () { + e._CreateBlocks(this._minPoint, this._maxPoint, this.entries, this._capacity, this._depth, this._maxDepth, this, this._creationFunc); + }), + (e._CreateBlocks = function (t, n, i, r, o, s, c, l) { + c.blocks = new Array(); + for (var u = new a.e((n.x - t.x) / 2, (n.y - t.y) / 2, (n.z - t.z) / 2), h = 0; h < 2; h++) + for (var d = 0; d < 2; d++) + for (var p = 0; p < 2; p++) { + var f = new e(t.add(u.multiplyByFloats(h, d, p)), t.add(u.multiplyByFloats(h + 1, d + 1, p + 1)), r, o + 1, s, l); + f.addEntries(i), c.blocks.push(f); + } + }), + e + ); + })(), + oi = (function () { + function e(e, t, n) { + void 0 === n && (n = 2), (this.maxDepth = n), (this.dynamicContent = new Array()), (this._maxBlockCapacity = t || 64), (this._selectionContent = new ii.b(1024)), (this._creationFunc = e); + } + return ( + (e.prototype.update = function (e, t, n) { + ri._CreateBlocks(e, t, n, this._maxBlockCapacity, 0, this.maxDepth, this, this._creationFunc); + }), + (e.prototype.addMesh = function (e) { + for (var t = 0; t < this.blocks.length; t++) { + this.blocks[t].addEntry(e); + } + }), + (e.prototype.removeMesh = function (e) { + for (var t = 0; t < this.blocks.length; t++) { + this.blocks[t].removeEntry(e); + } + }), + (e.prototype.select = function (e, t) { + this._selectionContent.reset(); + for (var n = 0; n < this.blocks.length; n++) { + this.blocks[n].select(e, this._selectionContent, t); + } + return t ? this._selectionContent.concat(this.dynamicContent) : this._selectionContent.concatWithNoDuplicate(this.dynamicContent), this._selectionContent; + }), + (e.prototype.intersects = function (e, t, n) { + this._selectionContent.reset(); + for (var i = 0; i < this.blocks.length; i++) { + this.blocks[i].intersects(e, t, this._selectionContent, n); + } + return n ? this._selectionContent.concat(this.dynamicContent) : this._selectionContent.concatWithNoDuplicate(this.dynamicContent), this._selectionContent; + }), + (e.prototype.intersectsRay = function (e) { + this._selectionContent.reset(); + for (var t = 0; t < this.blocks.length; t++) { + this.blocks[t].intersectsRay(e, this._selectionContent); + } + return this._selectionContent.concatWithNoDuplicate(this.dynamicContent), this._selectionContent; + }), + (e.CreationFuncForMeshes = function (e, t) { + var n = e.getBoundingInfo(); + !e.isBlocked && n.boundingBox.intersectsMinMax(t.minPoint, t.maxPoint) && t.entries.push(e); + }), + (e.CreationFuncForSubMeshes = function (e, t) { + e.getBoundingInfo().boundingBox.intersectsMinMax(t.minPoint, t.maxPoint) && t.entries.push(e); + }), + e + ); + })(); + (ge.a.prototype.createOrUpdateSelectionOctree = function (e, t) { + void 0 === e && (e = 64), void 0 === t && (t = 2); + var n = this._getComponent(me.a.NAME_OCTREE); + n || ((n = new ai(this)), this._addComponent(n)), this._selectionOctree || (this._selectionOctree = new oi(oi.CreationFuncForMeshes, e, t)); + var i = this.getWorldExtends(); + return this._selectionOctree.update(i.min, i.max, this.meshes), this._selectionOctree; + }), + Object.defineProperty(ge.a.prototype, "selectionOctree", { + get: function () { + return this._selectionOctree; + }, + enumerable: !0, + configurable: !0, + }), + (ke.a.prototype.createOrUpdateSubmeshesOctree = function (e, t) { + void 0 === e && (e = 64), void 0 === t && (t = 2); + var n = this.getScene(), + i = n._getComponent(me.a.NAME_OCTREE); + i || ((i = new ai(n)), n._addComponent(i)), this._submeshesOctree || (this._submeshesOctree = new oi(oi.CreationFuncForSubMeshes, e, t)), this.computeWorldMatrix(!0); + var r = this.getBoundingInfo().boundingBox; + return this._submeshesOctree.update(r.minimumWorld, r.maximumWorld, this.subMeshes), this._submeshesOctree; + }); + var ai = (function () { + function e(e) { + (this.name = me.a.NAME_OCTREE), + (this.checksIsEnabled = !0), + (this._tempRay = new Re(a.e.Zero(), new a.e(1, 1, 1))), + (this.scene = e), + (this.scene.getActiveMeshCandidates = this.getActiveMeshCandidates.bind(this)), + (this.scene.getActiveSubMeshCandidates = this.getActiveSubMeshCandidates.bind(this)), + (this.scene.getCollidingSubMeshCandidates = this.getCollidingSubMeshCandidates.bind(this)), + (this.scene.getIntersectingSubMeshCandidates = this.getIntersectingSubMeshCandidates.bind(this)); + } + return ( + (e.prototype.register = function () { + var e = this; + this.scene.onMeshRemovedObservable.add(function (t) { + var n = e.scene.selectionOctree; + if (null != n) { + var i = n.dynamicContent.indexOf(t); + -1 !== i && n.dynamicContent.splice(i, 1); + } + }), + this.scene.onMeshImportedObservable.add(function (t) { + var n = e.scene.selectionOctree; + null != n && n.addMesh(t); + }); + }), + (e.prototype.getActiveMeshCandidates = function () { + return this.scene._selectionOctree ? this.scene._selectionOctree.select(this.scene.frustumPlanes) : this.scene._getDefaultMeshCandidates(); + }), + (e.prototype.getActiveSubMeshCandidates = function (e) { + return e._submeshesOctree && e.useOctreeForRenderingSelection ? e._submeshesOctree.select(this.scene.frustumPlanes) : this.scene._getDefaultSubMeshCandidates(e); + }), + (e.prototype.getIntersectingSubMeshCandidates = function (e, t) { + return e._submeshesOctree && e.useOctreeForPicking ? (Re.TransformToRef(t, e.getWorldMatrix(), this._tempRay), e._submeshesOctree.intersectsRay(this._tempRay)) : this.scene._getDefaultSubMeshCandidates(e); + }), + (e.prototype.getCollidingSubMeshCandidates = function (e, t) { + if (e._submeshesOctree && e.useOctreeForCollisions) { + var n = t._velocityWorldLength + Math.max(t._radius.x, t._radius.y, t._radius.z); + return e._submeshesOctree.intersects(t._basePointWorld, n); + } + return this.scene._getDefaultSubMeshCandidates(e); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () {}), + e + ); + })(), + si = n(39), + ci = n(55), + li = (function () { + function e(e) { + var t = this; + void 0 === e && (e = ci.a.DefaultUtilityLayer), + (this.gizmoLayer = e), + (this._attachedMesh = null), + (this.scaleRatio = 1), + (this._customMeshSet = !1), + (this.updateGizmoRotationToMatchAttachedMesh = !0), + (this.updateGizmoPositionToMatchAttachedMesh = !0), + (this.updateScale = !0), + (this._interactionsEnabled = !0), + (this._tempVector = new a.e()), + (this._rootMesh = new Ee.a("gizmoRootNode", e.utilityLayerScene)), + (this._rootMesh.rotationQuaternion = a.b.Identity()), + (this._beforeRenderObserver = this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function () { + t._update(); + })); + } + return ( + Object.defineProperty(e.prototype, "attachedMesh", { + get: function () { + return this._attachedMesh; + }, + set: function (e) { + (this._attachedMesh = e), this._rootMesh.setEnabled(!!e), this._attachedMeshChanged(e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setCustomMesh = function (e) { + if (e.getScene() != this.gizmoLayer.utilityLayerScene) throw "When setting a custom mesh on a gizmo, the custom meshes scene must be the same as the gizmos (eg. gizmo.gizmoLayer.utilityLayerScene)"; + this._rootMesh.getChildMeshes().forEach(function (e) { + e.dispose(); + }), + (e.parent = this._rootMesh), + (this._customMeshSet = !0); + }), + (e.prototype._attachedMeshChanged = function (e) {}), + (e.prototype._update = function () { + if (this.attachedMesh) { + var e = this.attachedMesh._effectiveMesh || this.attachedMesh; + if ( + (this.updateGizmoPositionToMatchAttachedMesh && this._rootMesh.position.copyFrom(e.absolutePosition), + this.updateGizmoRotationToMatchAttachedMesh ? e.getWorldMatrix().decompose(void 0, this._rootMesh.rotationQuaternion) : this._rootMesh.rotationQuaternion.set(0, 0, 0, 1), + this.updateScale) + ) { + var t = this.gizmoLayer.utilityLayerScene.activeCamera, + n = t.globalPosition; + t.devicePosition && (n = t.devicePosition), this._rootMesh.position.subtractToRef(n, this._tempVector); + var i = this._tempVector.length() * this.scaleRatio; + this._rootMesh.scaling.set(i, i, i), e._getWorldMatrixDeterminant() < 0 && (this._rootMesh.scaling.y *= -1); + } else this._rootMesh.scaling.setAll(this.scaleRatio); + } + }), + (e.prototype.dispose = function () { + this._rootMesh.dispose(), this._beforeRenderObserver && this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.remove(this._beforeRenderObserver); + }), + e + ); + })(), + ui = (function (e) { + function t(n, i, r, c) { + void 0 === i && (i = s.a.Gray()), void 0 === r && (r = ci.a.DefaultUtilityLayer), void 0 === c && (c = null); + var l = e.call(this, r) || this; + (l._pointerObserver = null), + (l.snapDistance = 0), + (l.onSnapObservable = new o.c()), + (l._isEnabled = !0), + (l._parent = null), + (l._parent = c), + (l._coloredMaterial = new Mn.a("", r.utilityLayerScene)), + (l._coloredMaterial.diffuseColor = i), + (l._coloredMaterial.specularColor = i.subtract(new s.a(0.1, 0.1, 0.1))), + (l._hoverMaterial = new Mn.a("", r.utilityLayerScene)), + (l._hoverMaterial.diffuseColor = i.add(new s.a(0.3, 0.3, 0.3))), + (l._arrow = t._CreateArrow(r.utilityLayerScene, l._coloredMaterial)), + l._arrow.lookAt(l._rootMesh.position.add(n)), + l._arrow.scaling.scaleInPlace(1 / 3), + (l._arrow.parent = l._rootMesh); + var u = 0, + h = new a.e(), + d = { snapDistance: 0 }; + (l.dragBehavior = new Fe({ dragAxis: n })), (l.dragBehavior.moveAttached = !1), l._rootMesh.addBehavior(l.dragBehavior); + var p = new a.e(), + f = new a.a(); + l.dragBehavior.onDragObservable.add(function (e) { + if (l.attachedMesh) + if ( + (l.attachedMesh.parent ? (l.attachedMesh.parent.computeWorldMatrix().invertToRef(f), f.setTranslationFromFloats(0, 0, 0), a.e.TransformCoordinatesToRef(e.delta, f, p)) : p.copyFrom(e.delta), + 0 == l.snapDistance) + ) + l.attachedMesh.position.addInPlace(p); + else if (((u += e.dragDistance), Math.abs(u) > l.snapDistance)) { + var t = Math.floor(Math.abs(u) / l.snapDistance); + (u %= l.snapDistance), p.normalizeToRef(h), h.scaleInPlace(l.snapDistance * t), l.attachedMesh.position.addInPlace(h), (d.snapDistance = l.snapDistance * t), l.onSnapObservable.notifyObservers(d); + } + }), + (l._pointerObserver = r.utilityLayerScene.onPointerObservable.add(function (e) { + if (!l._customMeshSet) { + var t = e.pickInfo && -1 != l._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh) ? l._hoverMaterial : l._coloredMaterial; + l._rootMesh.getChildMeshes().forEach(function (e) { + (e.material = t), e.color && (e.color = t.diffuseColor); + }); + } + })); + var m = r._getSharedGizmoLight(); + return (m.includedOnlyMeshes = m.includedOnlyMeshes.concat(l._rootMesh.getChildMeshes(!1))), l; + } + return ( + Object(h.d)(t, e), + (t._CreateArrow = function (e, t) { + var n = new si.a("arrow", e), + i = jn.CreateCylinder("cylinder", { diameterTop: 0, height: 0.075, diameterBottom: 0.0375, tessellation: 96 }, e), + r = jn.CreateCylinder("cylinder", { diameterTop: 0.005, height: 0.275, diameterBottom: 0.005, tessellation: 96 }, e); + return (r.material = t), (i.parent = n), (r.parent = n), (i.material = t), (i.rotation.x = Math.PI / 2), (i.position.z += 0.3), (r.position.z += 0.1375), (r.rotation.x = Math.PI / 2), n; + }), + (t._CreateArrowInstance = function (e, t) { + for (var n = new si.a("arrow", e), i = 0, r = t.getChildMeshes(); i < r.length; i++) { + var o = r[i]; + o.createInstance(o.name).parent = n; + } + return n; + }), + (t.prototype._attachedMeshChanged = function (e) { + this.dragBehavior && (this.dragBehavior.enabled = !!e); + }), + Object.defineProperty(t.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + (this._isEnabled = e), e ? this._parent && (this.attachedMesh = this._parent.attachedMesh) : (this.attachedMesh = null); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + this.onSnapObservable.clear(), + this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver), + this.dragBehavior.detach(), + this._arrow && this._arrow.dispose(), + [this._coloredMaterial, this._hoverMaterial].forEach(function (e) { + e && e.dispose(); + }), + e.prototype.dispose.call(this); + }), + t + ); + })(li), + hi = (function () { + function e(t, n, i, r, o, c) { + if ((void 0 === n && (n = 1), void 0 === i && (i = 2), (this._scaleLinesFactor = 4), (this._instanced = !1), (this.scaleLines = 1), (this.scaleLines = n), !r)) { + var l = new Mn.a("", t); + (l.disableLighting = !0), (l.emissiveColor = s.a.Red().scale(0.5)), (r = ui._CreateArrow(t, l)); + } + if (!o) { + var u = new Mn.a("", t); + (u.disableLighting = !0), (u.emissiveColor = s.a.Green().scale(0.5)), (o = ui._CreateArrow(t, u)); + } + if (!c) { + var h = new Mn.a("", t); + (h.disableLighting = !0), (h.emissiveColor = s.a.Blue().scale(0.5)), (c = ui._CreateArrow(t, h)); + } + (this._xAxis = r), + this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor), + (this._yAxis = o), + this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor), + (this._zAxis = c), + this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor), + null != i && (e._SetRenderingGroupId(this._xAxis, i), e._SetRenderingGroupId(this._yAxis, i), e._SetRenderingGroupId(this._zAxis, i)), + (this.scene = t), + this.update(new a.e(), a.e.Right(), a.e.Up(), a.e.Forward()); + } + return ( + Object.defineProperty(e.prototype, "xAxis", { + get: function () { + return this._xAxis; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "yAxis", { + get: function () { + return this._yAxis; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "zAxis", { + get: function () { + return this._zAxis; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.update = function (e, t, n, i) { + this._xAxis.position.copyFrom(e), + this._xAxis.setDirection(t), + this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor), + this._yAxis.position.copyFrom(e), + this._yAxis.setDirection(n), + this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor), + this._zAxis.position.copyFrom(e), + this._zAxis.setDirection(i), + this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor); + }), + (e.prototype.createInstance = function () { + var t = ui._CreateArrowInstance(this.scene, this._xAxis), + n = ui._CreateArrowInstance(this.scene, this._yAxis), + i = ui._CreateArrowInstance(this.scene, this._zAxis), + r = new e(this.scene, this.scaleLines, null, t, n, i); + return (r._instanced = !0), r; + }), + (e.prototype.dispose = function () { + this._xAxis && (this._xAxis.dispose(!1, !this._instanced), delete this._xAxis), + this._yAxis && (this._yAxis.dispose(!1, !this._instanced), delete this._yAxis), + this._zAxis && (this._zAxis.dispose(!1, !this._instanced), delete this._zAxis), + delete this.scene; + }), + (e._SetRenderingGroupId = function (e, t) { + e.getChildMeshes().forEach(function (e) { + e.renderingGroupId = t; + }); + }), + e + ); + })(), + di = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = 1); + var o = e.call(this, t, r) || this; + return (o.pos = a.e.Zero()), (o.xaxis = a.e.Zero()), (o.yaxis = a.e.Zero()), (o.zaxis = a.e.Zero()), (o.mesh = i), (o.bone = n), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.update = function () { + if (this.mesh && this.bone) { + var t = this.bone; + t._markAsDirtyAndCompose(), + t.getAbsolutePositionToRef(this.mesh, this.pos), + t.getDirectionToRef(Be.a.X, this.mesh, this.xaxis), + t.getDirectionToRef(Be.a.Y, this.mesh, this.yaxis), + t.getDirectionToRef(Be.a.Z, this.mesh, this.zaxis), + e.prototype.update.call(this, this.pos, this.xaxis, this.yaxis, this.zaxis); + } + }), + (t.prototype.dispose = function () { + this.mesh && ((this.mesh = null), (this.bone = null), e.prototype.dispose.call(this)); + }), + t + ); + })(hi), + pi = n(211), + fi = n(84); + (Rn.a.CreateSphere = function (e) { + for ( + var t = e.segments || 32, + n = e.diameterX || e.diameter || 1, + i = e.diameterY || e.diameter || 1, + r = e.diameterZ || e.diameter || 1, + o = e.arc && (e.arc <= 0 || e.arc > 1) ? 1 : e.arc || 1, + s = e.slice && e.slice <= 0 ? 1 : e.slice || 1, + c = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + l = new a.e(n / 2, i / 2, r / 2), + u = 2 + t, + h = 2 * u, + d = [], + p = [], + f = [], + m = [], + g = 0; + g <= u; + g++ + ) { + for (var b = g / u, _ = b * Math.PI * s, v = 0; v <= h; v++) { + var y = v / h, + C = y * Math.PI * 2 * o, + P = a.a.RotationZ(-_), + x = a.a.RotationY(C), + T = a.e.TransformCoordinates(a.e.Up(), P), + S = a.e.TransformCoordinates(T, x), + O = S.multiply(l), + E = S.divide(l).normalize(); + p.push(O.x, O.y, O.z), f.push(E.x, E.y, E.z), m.push(y, b); + } + if (g > 0) for (var M = p.length / 3, A = M - 2 * (h + 1); A + h + 2 < M; A++) d.push(A), d.push(A + 1), d.push(A + h + 1), d.push(A + h + 1), d.push(A + 1), d.push(A + h + 2); + } + Rn.a._ComputeSides(c, p, d, f, m, e.frontUVs, e.backUVs); + var I = new Rn.a(); + return (I.indices = d), (I.positions = p), (I.normals = f), (I.uvs = m), I; + }), + (Ee.a.CreateSphere = function (e, t, n, i, r, o) { + var a = { segments: t, diameterX: n, diameterY: n, diameterZ: n, sideOrientation: o, updatable: r }; + return mi.CreateSphere(e, a, i); + }); + var mi = (function () { + function e() {} + return ( + (e.CreateSphere = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateSphere(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(), + gi = (function () { + function e(e, t) { + (this.type = e), (this.jointData = t), (t.nativeParams = t.nativeParams || {}); + } + return ( + Object.defineProperty(e.prototype, "physicsJoint", { + get: function () { + return this._physicsJoint; + }, + set: function (e) { + this._physicsJoint, (this._physicsJoint = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "physicsPlugin", { + set: function (e) { + this._physicsPlugin = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.executeNativeFunction = function (e) { + e(this._physicsPlugin.world, this._physicsJoint); + }), + (e.DistanceJoint = 0), + (e.HingeJoint = 1), + (e.BallAndSocketJoint = 2), + (e.WheelJoint = 3), + (e.SliderJoint = 4), + (e.PrismaticJoint = 5), + (e.UniversalJoint = 6), + (e.Hinge2Joint = e.WheelJoint), + (e.PointToPointJoint = 8), + (e.SpringJoint = 9), + (e.LockJoint = 10), + e + ); + })(), + bi = (function (e) { + function t(t) { + return e.call(this, gi.DistanceJoint, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.updateDistance = function (e, t) { + this._physicsPlugin.updateDistanceJoint(this, e, t); + }), + t + ); + })(gi), + _i = (function (e) { + function t(t, n) { + return e.call(this, t, n) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.setMotor = function (e, t) { + this._physicsPlugin.setMotor(this, e || 0, t); + }), + (t.prototype.setLimit = function (e, t) { + this._physicsPlugin.setLimit(this, e, t); + }), + t + ); + })(gi), + vi = (function (e) { + function t(t) { + return e.call(this, gi.HingeJoint, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.setMotor = function (e, t) { + this._physicsPlugin.setMotor(this, e || 0, t); + }), + (t.prototype.setLimit = function (e, t) { + this._physicsPlugin.setLimit(this, e, t); + }), + t + ); + })(_i), + yi = (function (e) { + function t(t) { + return e.call(this, gi.Hinge2Joint, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.setMotor = function (e, t, n) { + void 0 === n && (n = 0), this._physicsPlugin.setMotor(this, e || 0, t, n); + }), + (t.prototype.setLimit = function (e, t, n) { + void 0 === n && (n = 0), this._physicsPlugin.setLimit(this, e, t, n); + }), + t + ); + })(_i); + Ee.a._PhysicsImpostorParser = function (e, t, n) { + return new Ci(t, n.physicsImpostor, { mass: n.physicsMass, friction: n.physicsFriction, restitution: n.physicsRestitution }, e); + }; + var Ci = (function () { + function e(e, t, n, i) { + var r = this; + void 0 === n && (n = { mass: 0 }), + (this.object = e), + (this.type = t), + (this._options = n), + (this._scene = i), + (this._pluginData = {}), + (this._bodyUpdateRequired = !1), + (this._onBeforePhysicsStepCallbacks = new Array()), + (this._onAfterPhysicsStepCallbacks = new Array()), + (this._onPhysicsCollideCallbacks = []), + (this._deltaPosition = a.e.Zero()), + (this._isDisposed = !1), + (this.soft = !1), + (this.segments = 0), + (this._tmpQuat = new a.b()), + (this._tmpQuat2 = new a.b()), + (this.beforeStep = function () { + r._physicsEngine && + (r.object.translate(r._deltaPosition, -1), + r._deltaRotationConjugated && r.object.rotationQuaternion && r.object.rotationQuaternion.multiplyToRef(r._deltaRotationConjugated, r.object.rotationQuaternion), + r.object.computeWorldMatrix(!1), + r.object.parent && r.object.rotationQuaternion ? (r.getParentsRotation(), r._tmpQuat.multiplyToRef(r.object.rotationQuaternion, r._tmpQuat)) : r._tmpQuat.copyFrom(r.object.rotationQuaternion || new a.b()), + r._options.disableBidirectionalTransformation || (r.object.rotationQuaternion && r._physicsEngine.getPhysicsPlugin().setPhysicsBodyTransformation(r, r.object.getAbsolutePosition(), r._tmpQuat)), + r._onBeforePhysicsStepCallbacks.forEach(function (e) { + e(r); + })); + }), + (this.afterStep = function () { + r._physicsEngine && + (r._onAfterPhysicsStepCallbacks.forEach(function (e) { + e(r); + }), + r._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(r), + r.object.parent && r.object.rotationQuaternion && (r.getParentsRotation(), r._tmpQuat.conjugateInPlace(), r._tmpQuat.multiplyToRef(r.object.rotationQuaternion, r.object.rotationQuaternion)), + r.object.setAbsolutePosition(r.object.position), + r._deltaRotation && r.object.rotationQuaternion && r.object.rotationQuaternion.multiplyToRef(r._deltaRotation, r.object.rotationQuaternion), + r.object.translate(r._deltaPosition, 1)); + }), + (this.onCollideEvent = null), + (this.onCollide = function (e) { + if ((r._onPhysicsCollideCallbacks.length || r.onCollideEvent) && r._physicsEngine) { + var t = r._physicsEngine.getImpostorWithPhysicsBody(e.body); + t && + (r.onCollideEvent && r.onCollideEvent(r, t), + r._onPhysicsCollideCallbacks + .filter(function (e) { + return -1 !== e.otherImpostors.indexOf(t); + }) + .forEach(function (e) { + e.callback(r, t); + })); + } + }), + this.object + ? (this.object.parent && 0 !== n.mass && g.a.Warn("A physics impostor has been created for an object which has a parent. Babylon physics currently works in local space so unexpected issues may occur."), + !this._scene && e.getScene && (this._scene = e.getScene()), + this._scene && + (this.type > 100 && (this.soft = !0), + (this._physicsEngine = this._scene.getPhysicsEngine()), + this._physicsEngine + ? (this.object.rotationQuaternion || + (this.object.rotation + ? (this.object.rotationQuaternion = a.b.RotationYawPitchRoll(this.object.rotation.y, this.object.rotation.x, this.object.rotation.z)) + : (this.object.rotationQuaternion = new a.b())), + (this._options.mass = void 0 === n.mass ? 0 : n.mass), + (this._options.friction = void 0 === n.friction ? 0.2 : n.friction), + (this._options.restitution = void 0 === n.restitution ? 0.2 : n.restitution), + this.soft && + ((this._options.mass = this._options.mass > 0 ? this._options.mass : 1), + (this._options.pressure = void 0 === n.pressure ? 200 : n.pressure), + (this._options.stiffness = void 0 === n.stiffness ? 1 : n.stiffness), + (this._options.velocityIterations = void 0 === n.velocityIterations ? 20 : n.velocityIterations), + (this._options.positionIterations = void 0 === n.positionIterations ? 20 : n.positionIterations), + (this._options.fixedPoints = void 0 === n.fixedPoints ? 0 : n.fixedPoints), + (this._options.margin = void 0 === n.margin ? 0 : n.margin), + (this._options.damping = void 0 === n.damping ? 0 : n.damping), + (this._options.path = void 0 === n.path ? null : n.path), + (this._options.shape = void 0 === n.shape ? null : n.shape)), + (this._joints = []), + !this.object.parent || this._options.ignoreParent ? this._init() : this.object.parent.physicsImpostor && g.a.Warn("You must affect impostors to children before affecting impostor to parent.")) + : g.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))) + : g.a.Error("No object was provided. A physics object is obligatory"); + } + return ( + Object.defineProperty(e.prototype, "isDisposed", { + get: function () { + return this._isDisposed; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "mass", { + get: function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getBodyMass(this) : 0; + }, + set: function (e) { + this.setMass(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "friction", { + get: function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getBodyFriction(this) : 0; + }, + set: function (e) { + this._physicsEngine && this._physicsEngine.getPhysicsPlugin().setBodyFriction(this, e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "restitution", { + get: function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this) : 0; + }, + set: function (e) { + this._physicsEngine && this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this, e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "pressure", { + get: function () { + if (!this._physicsEngine) return 0; + var e = this._physicsEngine.getPhysicsPlugin(); + return e.setBodyPressure ? e.getBodyPressure(this) : 0; + }, + set: function (e) { + if (this._physicsEngine) { + var t = this._physicsEngine.getPhysicsPlugin(); + t.setBodyPressure && t.setBodyPressure(this, e); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stiffness", { + get: function () { + if (!this._physicsEngine) return 0; + var e = this._physicsEngine.getPhysicsPlugin(); + return e.getBodyStiffness ? e.getBodyStiffness(this) : 0; + }, + set: function (e) { + if (this._physicsEngine) { + var t = this._physicsEngine.getPhysicsPlugin(); + t.setBodyStiffness && t.setBodyStiffness(this, e); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "velocityIterations", { + get: function () { + if (!this._physicsEngine) return 0; + var e = this._physicsEngine.getPhysicsPlugin(); + return e.getBodyVelocityIterations ? e.getBodyVelocityIterations(this) : 0; + }, + set: function (e) { + if (this._physicsEngine) { + var t = this._physicsEngine.getPhysicsPlugin(); + t.setBodyVelocityIterations && t.setBodyVelocityIterations(this, e); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "positionIterations", { + get: function () { + if (!this._physicsEngine) return 0; + var e = this._physicsEngine.getPhysicsPlugin(); + return e.getBodyPositionIterations ? e.getBodyPositionIterations(this) : 0; + }, + set: function (e) { + if (this._physicsEngine) { + var t = this._physicsEngine.getPhysicsPlugin(); + t.setBodyPositionIterations && t.setBodyPositionIterations(this, e); + } + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._init = function () { + this._physicsEngine && + (this._physicsEngine.removeImpostor(this), + (this.physicsBody = null), + (this._parent = this._parent || this._getPhysicsParent()), + this._isDisposed || (this.parent && !this._options.ignoreParent) || this._physicsEngine.addImpostor(this)); + }), + (e.prototype._getPhysicsParent = function () { + return this.object.parent instanceof ke.a ? this.object.parent.physicsImpostor : null; + }), + (e.prototype.isBodyInitRequired = function () { + return this._bodyUpdateRequired || (!this._physicsBody && !this._parent); + }), + (e.prototype.setScalingUpdated = function () { + this.forceUpdate(); + }), + (e.prototype.forceUpdate = function () { + this._init(), this.parent && !this._options.ignoreParent && this.parent.forceUpdate(); + }), + Object.defineProperty(e.prototype, "physicsBody", { + get: function () { + return this._parent && !this._options.ignoreParent ? this._parent.physicsBody : this._physicsBody; + }, + set: function (e) { + this._physicsBody && this._physicsEngine && this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this), (this._physicsBody = e), this.resetUpdateFlags(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "parent", { + get: function () { + return !this._options.ignoreParent && this._parent ? this._parent : null; + }, + set: function (e) { + this._parent = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.resetUpdateFlags = function () { + this._bodyUpdateRequired = !1; + }), + (e.prototype.getObjectExtendSize = function () { + if (this.object.getBoundingInfo) { + var t = this.object.rotationQuaternion; + (this.object.rotationQuaternion = e.IDENTITY_QUATERNION), this.object.computeWorldMatrix && this.object.computeWorldMatrix(!0); + var n = this.object.getBoundingInfo().boundingBox.extendSizeWorld.scale(2); + return (this.object.rotationQuaternion = t), this.object.computeWorldMatrix && this.object.computeWorldMatrix(!0), n; + } + return e.DEFAULT_OBJECT_SIZE; + }), + (e.prototype.getObjectCenter = function () { + return this.object.getBoundingInfo ? this.object.getBoundingInfo().boundingBox.centerWorld : this.object.position; + }), + (e.prototype.getParam = function (e) { + return this._options[e]; + }), + (e.prototype.setParam = function (e, t) { + (this._options[e] = t), (this._bodyUpdateRequired = !0); + }), + (e.prototype.setMass = function (e) { + this.getParam("mass") !== e && this.setParam("mass", e), this._physicsEngine && this._physicsEngine.getPhysicsPlugin().setBodyMass(this, e); + }), + (e.prototype.getLinearVelocity = function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this) : a.e.Zero(); + }), + (e.prototype.setLinearVelocity = function (e) { + this._physicsEngine && this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this, e); + }), + (e.prototype.getAngularVelocity = function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this) : a.e.Zero(); + }), + (e.prototype.setAngularVelocity = function (e) { + this._physicsEngine && this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this, e); + }), + (e.prototype.executeNativeFunction = function (e) { + this._physicsEngine && e(this._physicsEngine.getPhysicsPlugin().world, this.physicsBody); + }), + (e.prototype.registerBeforePhysicsStep = function (e) { + this._onBeforePhysicsStepCallbacks.push(e); + }), + (e.prototype.unregisterBeforePhysicsStep = function (e) { + var t = this._onBeforePhysicsStepCallbacks.indexOf(e); + t > -1 ? this._onBeforePhysicsStepCallbacks.splice(t, 1) : g.a.Warn("Function to remove was not found"); + }), + (e.prototype.registerAfterPhysicsStep = function (e) { + this._onAfterPhysicsStepCallbacks.push(e); + }), + (e.prototype.unregisterAfterPhysicsStep = function (e) { + var t = this._onAfterPhysicsStepCallbacks.indexOf(e); + t > -1 ? this._onAfterPhysicsStepCallbacks.splice(t, 1) : g.a.Warn("Function to remove was not found"); + }), + (e.prototype.registerOnPhysicsCollide = function (e, t) { + var n = e instanceof Array ? e : [e]; + this._onPhysicsCollideCallbacks.push({ callback: t, otherImpostors: n }); + }), + (e.prototype.unregisterOnPhysicsCollide = function (e, t) { + var n = e instanceof Array ? e : [e], + i = -1; + this._onPhysicsCollideCallbacks.some(function (e, r) { + if (e.callback === t && e.otherImpostors.length === n.length) { + var o = e.otherImpostors.every(function (e) { + return n.indexOf(e) > -1; + }); + return o && (i = r), o; + } + return !1; + }) + ? this._onPhysicsCollideCallbacks.splice(i, 1) + : g.a.Warn("Function to remove was not found"); + }), + (e.prototype.getParentsRotation = function () { + var e = this.object.parent; + for (this._tmpQuat.copyFromFloats(0, 0, 0, 1); e; ) + e.rotationQuaternion ? this._tmpQuat2.copyFrom(e.rotationQuaternion) : a.b.RotationYawPitchRollToRef(e.rotation.y, e.rotation.x, e.rotation.z, this._tmpQuat2), + this._tmpQuat.multiplyToRef(this._tmpQuat2, this._tmpQuat), + (e = e.parent); + return this._tmpQuat; + }), + (e.prototype.applyForce = function (e, t) { + return this._physicsEngine && this._physicsEngine.getPhysicsPlugin().applyForce(this, e, t), this; + }), + (e.prototype.applyImpulse = function (e, t) { + return this._physicsEngine && this._physicsEngine.getPhysicsPlugin().applyImpulse(this, e, t), this; + }), + (e.prototype.createJoint = function (e, t, n) { + var i = new gi(t, n); + return this.addJoint(e, i), this; + }), + (e.prototype.addJoint = function (e, t) { + return this._joints.push({ otherImpostor: e, joint: t }), this._physicsEngine && this._physicsEngine.addJoint(this, e, t), this; + }), + (e.prototype.addAnchor = function (e, t, n, i, r) { + if (!this._physicsEngine) return this; + var o = this._physicsEngine.getPhysicsPlugin(); + return o.appendAnchor ? (this._physicsEngine && o.appendAnchor(this, e, t, n, i, r), this) : this; + }), + (e.prototype.addHook = function (e, t, n, i) { + if (!this._physicsEngine) return this; + var r = this._physicsEngine.getPhysicsPlugin(); + return r.appendAnchor ? (this._physicsEngine && r.appendHook(this, e, t, n, i), this) : this; + }), + (e.prototype.sleep = function () { + return this._physicsEngine && this._physicsEngine.getPhysicsPlugin().sleepBody(this), this; + }), + (e.prototype.wakeUp = function () { + return this._physicsEngine && this._physicsEngine.getPhysicsPlugin().wakeUpBody(this), this; + }), + (e.prototype.clone = function (t) { + return t ? new e(t, this.type, this._options, this._scene) : null; + }), + (e.prototype.dispose = function () { + var e = this; + this._physicsEngine && + (this._joints.forEach(function (t) { + e._physicsEngine && e._physicsEngine.removeJoint(e, t.otherImpostor, t.joint); + }), + this._physicsEngine.removeImpostor(this), + this.parent && this.parent.forceUpdate(), + (this._isDisposed = !0)); + }), + (e.prototype.setDeltaPosition = function (e) { + this._deltaPosition.copyFrom(e); + }), + (e.prototype.setDeltaRotation = function (e) { + this._deltaRotation || (this._deltaRotation = new a.b()), this._deltaRotation.copyFrom(e), (this._deltaRotationConjugated = this._deltaRotation.conjugate()); + }), + (e.prototype.getBoxSizeToRef = function (e) { + return this._physicsEngine && this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this, e), this; + }), + (e.prototype.getRadius = function () { + return this._physicsEngine ? this._physicsEngine.getPhysicsPlugin().getRadius(this) : 0; + }), + (e.prototype.syncBoneWithImpostor = function (t, n, i, r, o) { + var a = e._tmpVecs[0], + s = this.object; + if (s.rotationQuaternion) + if (o) { + var c = e._tmpQuat; + s.rotationQuaternion.multiplyToRef(o, c), t.setRotationQuaternion(c, Be.b.WORLD, n); + } else t.setRotationQuaternion(s.rotationQuaternion, Be.b.WORLD, n); + (a.x = 0), + (a.y = 0), + (a.z = 0), + i && ((a.x = i.x), (a.y = i.y), (a.z = i.z), t.getDirectionToRef(a, n, a), null == r && (r = i.length()), (a.x *= r), (a.y *= r), (a.z *= r)), + t.getParent() ? (a.addInPlace(s.getAbsolutePosition()), t.setAbsolutePosition(a, n)) : (n.setAbsolutePosition(s.getAbsolutePosition()), (n.position.x -= a.x), (n.position.y -= a.y), (n.position.z -= a.z)); + }), + (e.prototype.syncImpostorWithBone = function (t, n, i, r, o, a) { + var s = this.object; + if (s.rotationQuaternion) + if (o) { + var c = e._tmpQuat; + t.getRotationQuaternionToRef(Be.b.WORLD, n, c), c.multiplyToRef(o, s.rotationQuaternion); + } else t.getRotationQuaternionToRef(Be.b.WORLD, n, s.rotationQuaternion); + var l = e._tmpVecs[0], + u = e._tmpVecs[1]; + a || (((a = e._tmpVecs[2]).x = 0), (a.y = 1), (a.z = 0)), + t.getDirectionToRef(a, n, u), + t.getAbsolutePositionToRef(n, l), + null == r && i && (r = i.length()), + null != r && ((l.x += u.x * r), (l.y += u.y * r), (l.z += u.z * r)), + s.setAbsolutePosition(l); + }), + (e.DEFAULT_OBJECT_SIZE = new a.e(1, 1, 1)), + (e.IDENTITY_QUATERNION = a.b.Identity()), + (e._tmpVecs = Me.a.BuildArray(3, a.e.Zero)), + (e._tmpQuat = a.b.Identity()), + (e.NoImpostor = 0), + (e.SphereImpostor = 1), + (e.BoxImpostor = 2), + (e.PlaneImpostor = 3), + (e.MeshImpostor = 4), + (e.CapsuleImpostor = 6), + (e.CylinderImpostor = 7), + (e.ParticleImpostor = 8), + (e.HeightmapImpostor = 9), + (e.ConvexHullImpostor = 10), + (e.CustomImpostor = 100), + (e.RopeImpostor = 101), + (e.ClothImpostor = 102), + (e.SoftbodyImpostor = 103), + e + ); + })(), + Pi = (function () { + function e(e) { + (this._impostors = []), (this._meshes = []), (this._numMeshes = 0), (this._debugMeshMeshes = new Array()), (this._scene = e || E.a.LastCreatedScene); + var t = this._scene.getPhysicsEngine(); + t && (this._physicsEnginePlugin = t.getPhysicsPlugin()), + (this._utilityLayer = new ci.a(this._scene, !1)), + (this._utilityLayer.pickUtilitySceneFirst = !1), + (this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil = !0); + } + return ( + (e.prototype._updateDebugMeshes = function () { + for (var e = this._physicsEnginePlugin, t = 0; t < this._numMeshes; t++) { + var n = this._impostors[t]; + if (n) + if (n.isDisposed) this.hideImpostor(this._impostors[t--]); + else { + if (n.type === Ci.MeshImpostor) continue; + var i = this._meshes[t]; + i && e && e.syncMeshWithImpostor(i, n); + } + } + }), + (e.prototype.showImpostor = function (e, t) { + if (!this._scene) return null; + for (var n = 0; n < this._numMeshes; n++) if (this._impostors[n] == e) return null; + var i = this._getDebugMesh(e, t); + return ( + i && + ((this._impostors[this._numMeshes] = e), + (this._meshes[this._numMeshes] = i), + 0 === this._numMeshes && ((this._renderFunction = this._updateDebugMeshes.bind(this)), this._scene.registerBeforeRender(this._renderFunction)), + this._numMeshes++), + i + ); + }), + (e.prototype.hideImpostor = function (e) { + if (e && this._scene && this._utilityLayer) { + for (var t = !1, n = this._utilityLayer.utilityLayerScene, i = 0; i < this._numMeshes; i++) + if (this._impostors[i] == e) { + var r = this._meshes[i]; + if (!r) continue; + n.removeMesh(r), r.dispose(); + var o = this._debugMeshMeshes.indexOf(r); + o > -1 && this._debugMeshMeshes.splice(o, 1), + this._numMeshes--, + this._numMeshes > 0 + ? ((this._meshes[i] = this._meshes[this._numMeshes]), (this._impostors[i] = this._impostors[this._numMeshes]), (this._meshes[this._numMeshes] = null), (this._impostors[this._numMeshes] = null)) + : ((this._meshes[0] = null), (this._impostors[0] = null)), + (t = !0); + break; + } + t && 0 === this._numMeshes && this._scene.unregisterBeforeRender(this._renderFunction); + } + }), + (e.prototype._getDebugMaterial = function (e) { + return ( + this._debugMaterial || ((this._debugMaterial = new Mn.a("", e)), (this._debugMaterial.wireframe = !0), (this._debugMaterial.emissiveColor = s.a.White()), (this._debugMaterial.disableLighting = !0)), + this._debugMaterial + ); + }), + (e.prototype._getDebugBoxMesh = function (e) { + return ( + this._debugBoxMesh || + ((this._debugBoxMesh = fi.a.CreateBox("physicsBodyBoxViewMesh", { size: 1 }, e)), + (this._debugBoxMesh.rotationQuaternion = a.b.Identity()), + (this._debugBoxMesh.material = this._getDebugMaterial(e)), + this._debugBoxMesh.setEnabled(!1)), + this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance") + ); + }), + (e.prototype._getDebugSphereMesh = function (e) { + return ( + this._debugSphereMesh || + ((this._debugSphereMesh = mi.CreateSphere("physicsBodySphereViewMesh", { diameter: 1 }, e)), + (this._debugSphereMesh.rotationQuaternion = a.b.Identity()), + (this._debugSphereMesh.material = this._getDebugMaterial(e)), + this._debugSphereMesh.setEnabled(!1)), + this._debugSphereMesh.createInstance("physicsBodyBoxViewInstance") + ); + }), + (e.prototype._getDebugCylinderMesh = function (e) { + return ( + this._debugCylinderMesh || + ((this._debugCylinderMesh = jn.CreateCylinder("physicsBodyCylinderViewMesh", { diameterTop: 1, diameterBottom: 1, height: 1 }, e)), + (this._debugCylinderMesh.rotationQuaternion = a.b.Identity()), + (this._debugCylinderMesh.material = this._getDebugMaterial(e)), + this._debugCylinderMesh.setEnabled(!1)), + this._debugCylinderMesh.createInstance("physicsBodyBoxViewInstance") + ); + }), + (e.prototype._getDebugMeshMesh = function (e, t) { + var n = new Ee.a(e.name, t, null, e); + return (n.position = a.e.Zero()), n.setParent(e), (n.material = this._getDebugMaterial(t)), this._debugMeshMeshes.push(n), n; + }), + (e.prototype._getDebugMesh = function (e, t) { + var n = this; + if (!this._utilityLayer) return null; + if (t && t.parent && t.parent.physicsImpostor) return null; + var i = null, + r = this._utilityLayer.utilityLayerScene; + switch (e.type) { + case Ci.BoxImpostor: + (i = this._getDebugBoxMesh(r)), e.getBoxSizeToRef(i.scaling); + break; + case Ci.SphereImpostor: + i = this._getDebugSphereMesh(r); + var o = e.getRadius(); + (i.scaling.x = 2 * o), (i.scaling.y = 2 * o), (i.scaling.z = 2 * o); + break; + case Ci.MeshImpostor: + t && (i = this._getDebugMeshMesh(t, r)); + break; + case Ci.NoImpostor: + if (t) + t.getChildMeshes() + .filter(function (e) { + return e.physicsImpostor ? 1 : 0; + }) + .forEach(function (e) { + n._getDebugBoxMesh(r).parent = e; + }); + break; + case Ci.CylinderImpostor: + i = this._getDebugCylinderMesh(r); + var a = e.object.getBoundingInfo(); + (i.scaling.x = a.boundingBox.maximum.x - a.boundingBox.minimum.x), (i.scaling.y = a.boundingBox.maximum.y - a.boundingBox.minimum.y), (i.scaling.z = a.boundingBox.maximum.z - a.boundingBox.minimum.z); + } + return i; + }), + (e.prototype.dispose = function () { + for (var e = this._numMeshes, t = 0; t < e; t++) this.hideImpostor(this._impostors[0]); + this._debugBoxMesh && this._debugBoxMesh.dispose(), + this._debugSphereMesh && this._debugSphereMesh.dispose(), + this._debugCylinderMesh && this._debugCylinderMesh.dispose(), + this._debugMaterial && this._debugMaterial.dispose(), + (this._impostors.length = 0), + (this._scene = null), + (this._physicsEnginePlugin = null), + this._utilityLayer && (this._utilityLayer.dispose(), (this._utilityLayer = null)); + }), + e + ); + })(), + xi = n(116); + (Rn.a.CreateLineSystem = function (e) { + for (var t = [], n = [], i = e.lines, r = e.colors, o = [], a = 0, s = 0; s < i.length; s++) + for (var c = i[s], l = 0; l < c.length; l++) { + if ((n.push(c[l].x, c[l].y, c[l].z), r)) { + var u = r[s]; + o.push(u[l].r, u[l].g, u[l].b, u[l].a); + } + l > 0 && (t.push(a - 1), t.push(a)), a++; + } + var h = new Rn.a(); + return (h.indices = t), (h.positions = n), r && (h.colors = o), h; + }), + (Rn.a.CreateDashedLines = function (e) { + var t, + n, + i = e.dashSize || 3, + r = e.gapSize || 1, + o = e.dashNb || 200, + s = e.points, + c = new Array(), + l = new Array(), + u = a.e.Zero(), + h = 0, + d = 0, + p = 0, + f = 0, + m = 0; + for (m = 0; m < s.length - 1; m++) s[m + 1].subtractToRef(s[m], u), (h += u.length()); + for (n = (i * (t = h / o)) / (i + r), m = 0; m < s.length - 1; m++) { + s[m + 1].subtractToRef(s[m], u), (d = Math.floor(u.length() / t)), u.normalize(); + for (var g = 0; g < d; g++) (p = t * g), c.push(s[m].x + p * u.x, s[m].y + p * u.y, s[m].z + p * u.z), c.push(s[m].x + (p + n) * u.x, s[m].y + (p + n) * u.y, s[m].z + (p + n) * u.z), l.push(f, f + 1), (f += 2); + } + var b = new Rn.a(); + return (b.positions = c), (b.indices = l), b; + }), + (Ee.a.CreateLines = function (e, t, n, i, r) { + void 0 === n && (n = null), void 0 === i && (i = !1), void 0 === r && (r = null); + var o = { points: t, updatable: i, instance: r }; + return Ti.CreateLines(e, o, n); + }), + (Ee.a.CreateDashedLines = function (e, t, n, i, r, o, a, s) { + void 0 === o && (o = null); + var c = { points: t, dashSize: n, gapSize: i, dashNb: r, updatable: a, instance: s }; + return Ti.CreateDashedLines(e, c, o); + }); + var Ti = (function () { + function e() {} + return ( + (e.CreateLineSystem = function (e, t, n) { + var i = t.instance, + r = t.lines, + o = t.colors; + if (i) { + var a, + s, + c = i.getVerticesData(wn.b.PositionKind); + o && (a = i.getVerticesData(wn.b.ColorKind)); + for (var l = 0, u = 0, h = 0; h < r.length; h++) + for (var d = r[h], p = 0; p < d.length; p++) + (c[l] = d[p].x), (c[l + 1] = d[p].y), (c[l + 2] = d[p].z), o && a && ((s = o[h]), (a[u] = s[p].r), (a[u + 1] = s[p].g), (a[u + 2] = s[p].b), (a[u + 3] = s[p].a), (u += 4)), (l += 3); + return i.updateVerticesData(wn.b.PositionKind, c, !1, !1), o && a && i.updateVerticesData(wn.b.ColorKind, a, !1, !1), i; + } + var f = !!o, + m = new xi.b(e, n, null, void 0, void 0, f, t.useVertexAlpha); + return Rn.a.CreateLineSystem(t).applyToMesh(m, t.updatable), m; + }), + (e.CreateLines = function (t, n, i) { + void 0 === i && (i = null); + var r = n.colors ? [n.colors] : null; + return e.CreateLineSystem(t, { lines: [n.points], updatable: n.updatable, instance: n.instance, colors: r, useVertexAlpha: n.useVertexAlpha }, i); + }), + (e.CreateDashedLines = function (e, t, n) { + void 0 === n && (n = null); + var i = t.points, + r = t.instance, + o = t.gapSize || 1, + s = t.dashSize || 3; + if (r) { + return ( + r.updateMeshPositions(function (e) { + var t, + n, + o = a.e.Zero(), + s = e.length / 6, + c = 0, + l = 0, + u = 0, + h = 0, + d = 0, + p = 0; + for (d = 0; d < i.length - 1; d++) i[d + 1].subtractToRef(i[d], o), (c += o.length()); + t = c / s; + var f = r._creationDataStorage.dashSize; + for (n = (f * t) / (f + r._creationDataStorage.gapSize), d = 0; d < i.length - 1; d++) + for (i[d + 1].subtractToRef(i[d], o), l = Math.floor(o.length() / t), o.normalize(), p = 0; p < l && h < e.length; ) + (u = t * p), + (e[h] = i[d].x + u * o.x), + (e[h + 1] = i[d].y + u * o.y), + (e[h + 2] = i[d].z + u * o.z), + (e[h + 3] = i[d].x + (u + n) * o.x), + (e[h + 4] = i[d].y + (u + n) * o.y), + (e[h + 5] = i[d].z + (u + n) * o.z), + (h += 6), + p++; + for (; h < e.length; ) (e[h] = i[d].x), (e[h + 1] = i[d].y), (e[h + 2] = i[d].z), (h += 3); + }, !1), + r + ); + } + var c = new xi.b(e, n, null, void 0, void 0, void 0, t.useVertexAlpha); + return Rn.a.CreateDashedLines(t).applyToMesh(c, t.updatable), (c._creationDataStorage = new Ee.b()), (c._creationDataStorage.dashSize = s), (c._creationDataStorage.gapSize = o), c; + }), + e + ); + })(), + Si = (function () { + function e(e) { + this.ray = e; + } + return ( + (e.CreateAndShow = function (t, n, i) { + var r = new e(t); + return r.show(n, i), r; + }), + (e.prototype.show = function (e, t) { + if (!this._renderFunction && this.ray) { + var n = this.ray; + (this._renderFunction = this._render.bind(this)), + (this._scene = e), + (this._renderPoints = [n.origin, n.origin.add(n.direction.scale(n.length))]), + (this._renderLine = Ee.a.CreateLines("ray", this._renderPoints, e, !0)), + this._renderFunction && this._scene.registerBeforeRender(this._renderFunction); + } + t && this._renderLine && this._renderLine.color.copyFrom(t); + }), + (e.prototype.hide = function () { + this._renderFunction && + this._scene && + (this._scene.unregisterBeforeRender(this._renderFunction), + (this._scene = null), + (this._renderFunction = null), + this._renderLine && (this._renderLine.dispose(), (this._renderLine = null)), + (this._renderPoints = [])); + }), + (e.prototype._render = function () { + var e = this.ray; + if (e) { + var t = this._renderPoints[1], + n = Math.min(e.length, 1e6); + t.copyFrom(e.direction), t.scaleInPlace(n), t.addInPlace(e.origin), Ee.a.CreateLines("ray", this._renderPoints, this._scene, !0, this._renderLine); + } + }), + (e.prototype.attachToMesh = function (e, t, n, i) { + this._attachedToMesh = e; + var r = this.ray; + r && + (r.direction || (r.direction = a.e.Zero()), + r.origin || (r.origin = a.e.Zero()), + i && (r.length = i), + n || (n = a.e.Zero()), + t || (t = new a.e(0, 0, -1)), + this._meshSpaceDirection ? (this._meshSpaceDirection.copyFrom(t), this._meshSpaceOrigin.copyFrom(n)) : ((this._meshSpaceDirection = t.clone()), (this._meshSpaceOrigin = n.clone())), + this._updateToMeshFunction || ((this._updateToMeshFunction = this._updateToMesh.bind(this)), this._attachedToMesh.getScene().registerBeforeRender(this._updateToMeshFunction)), + this._updateToMesh()); + }), + (e.prototype.detachFromMesh = function () { + this._attachedToMesh && (this._updateToMeshFunction && this._attachedToMesh.getScene().unregisterBeforeRender(this._updateToMeshFunction), (this._attachedToMesh = null), (this._updateToMeshFunction = null)); + }), + (e.prototype._updateToMesh = function () { + var e = this.ray; + this._attachedToMesh && + e && + (this._attachedToMesh._isDisposed + ? this.detachFromMesh() + : (this._attachedToMesh.getDirectionToRef(this._meshSpaceDirection, e.direction), a.e.TransformCoordinatesToRef(this._meshSpaceOrigin, this._attachedToMesh.getWorldMatrix(), e.origin))); + }), + (e.prototype.dispose = function () { + this.hide(), this.detachFromMesh(), (this.ray = null); + }), + e + ); + })(), + Oi = (function () { + function e(e, t, n, i, r) { + void 0 === i && (i = !0), + void 0 === r && (r = 1), + (this.skeleton = e), + (this.mesh = t), + (this.autoUpdateBonesMatrices = i), + (this.renderingGroupId = r), + (this.color = s.a.White()), + (this._debugLines = new Array()), + (this._isEnabled = !1), + (this._scene = n), + (this._utilityLayer = new ci.a(this._scene, !1)), + (this._utilityLayer.pickUtilitySceneFirst = !1), + (this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil = !0), + this.update(), + (this._renderFunction = this.update.bind(this)); + } + return ( + Object.defineProperty(e.prototype, "debugMesh", { + get: function () { + return this._debugMesh; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + this._isEnabled !== e && ((this._isEnabled = e), e ? this._scene.registerBeforeRender(this._renderFunction) : this._scene.unregisterBeforeRender(this._renderFunction)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._getBonePosition = function (e, t, n, i, r, o) { + void 0 === i && (i = 0), void 0 === r && (r = 0), void 0 === o && (o = 0); + var s = a.c.Matrix[0], + c = t.getParent(); + if ((s.copyFrom(t.getLocalMatrix()), 0 !== i || 0 !== r || 0 !== o)) { + var l = a.c.Matrix[1]; + a.a.IdentityToRef(l), l.setTranslationFromFloats(i, r, o), l.multiplyToRef(s, s); + } + c && s.multiplyToRef(c.getAbsoluteTransform(), s), s.multiplyToRef(n, s), (e.x = s.m[12]), (e.y = s.m[13]), (e.z = s.m[14]); + }), + (e.prototype._getLinesForBonesWithLength = function (e, t) { + for (var n = e.length, i = this.mesh._effectiveMesh.position, r = 0; r < n; r++) { + var o = e[r], + s = this._debugLines[r]; + s || ((s = [a.e.Zero(), a.e.Zero()]), (this._debugLines[r] = s)), this._getBonePosition(s[0], o, t), this._getBonePosition(s[1], o, t, 0, o.length, 0), s[0].subtractInPlace(i), s[1].subtractInPlace(i); + } + }), + (e.prototype._getLinesForBonesNoLength = function (e, t) { + for (var n = e.length, i = 0, r = this.mesh._effectiveMesh, o = r.position, s = n - 1; s >= 0; s--) { + var c = e[s], + l = c.getParent(); + if (l) { + var u = this._debugLines[i]; + u || ((u = [a.e.Zero(), a.e.Zero()]), (this._debugLines[i] = u)), c.getAbsolutePositionToRef(r, u[0]), l.getAbsolutePositionToRef(r, u[1]), u[0].subtractInPlace(o), u[1].subtractInPlace(o), i++; + } + } + }), + (e.prototype.update = function () { + if (this._utilityLayer) { + this.autoUpdateBonesMatrices && this.skeleton.computeAbsoluteTransforms(); + var e = this.mesh._effectiveMesh; + void 0 === this.skeleton.bones[0].length ? this._getLinesForBonesNoLength(this.skeleton.bones, e.getWorldMatrix()) : this._getLinesForBonesWithLength(this.skeleton.bones, e.getWorldMatrix()); + var t = this._utilityLayer.utilityLayerScene; + this._debugMesh + ? Ti.CreateLineSystem("", { lines: this._debugLines, updatable: !0, instance: this._debugMesh }, t) + : ((this._debugMesh = Ti.CreateLineSystem("", { lines: this._debugLines, updatable: !0, instance: null }, t)), (this._debugMesh.renderingGroupId = this.renderingGroupId)), + this._debugMesh.position.copyFrom(this.mesh.position), + (this._debugMesh.color = this.color); + } + }), + (e.prototype.dispose = function () { + (this.isEnabled = !1), this._debugMesh && ((this.isEnabled = !1), this._debugMesh.dispose(), (this._debugMesh = null)), this._utilityLayer && (this._utilityLayer.dispose(), (this._utilityLayer = null)); + }), + e + ); + })(), + Ei = n(80), + Mi = n(38), + Ai = n(228), + Ii = function () { + this._timeElapsedQueryEnded = !1; + }, + Di = function () { + (this.occlusionInternalRetryCounter = 0), + (this.isOcclusionQueryInProgress = !1), + (this.isOccluded = !1), + (this.occlusionRetryCount = -1), + (this.occlusionType = ke.a.OCCLUSION_TYPE_NONE), + (this.occlusionQueryAlgorithmType = ke.a.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE); + }; + (ue.a.prototype.createQuery = function () { + return this._gl.createQuery(); + }), + (ue.a.prototype.deleteQuery = function (e) { + return this._gl.deleteQuery(e), this; + }), + (ue.a.prototype.isQueryResultAvailable = function (e) { + return this._gl.getQueryParameter(e, this._gl.QUERY_RESULT_AVAILABLE); + }), + (ue.a.prototype.getQueryResult = function (e) { + return this._gl.getQueryParameter(e, this._gl.QUERY_RESULT); + }), + (ue.a.prototype.beginOcclusionQuery = function (e, t) { + var n = this._getGlAlgorithmType(e); + return this._gl.beginQuery(n, t), this; + }), + (ue.a.prototype.endOcclusionQuery = function (e) { + var t = this._getGlAlgorithmType(e); + return this._gl.endQuery(t), this; + }), + (ue.a.prototype._createTimeQuery = function () { + var e = this.getCaps().timerQuery; + return e.createQueryEXT ? e.createQueryEXT() : this.createQuery(); + }), + (ue.a.prototype._deleteTimeQuery = function (e) { + var t = this.getCaps().timerQuery; + t.deleteQueryEXT ? t.deleteQueryEXT(e) : this.deleteQuery(e); + }), + (ue.a.prototype._getTimeQueryResult = function (e) { + var t = this.getCaps().timerQuery; + return t.getQueryObjectEXT ? t.getQueryObjectEXT(e, t.QUERY_RESULT_EXT) : this.getQueryResult(e); + }), + (ue.a.prototype._getTimeQueryAvailability = function (e) { + var t = this.getCaps().timerQuery; + return t.getQueryObjectEXT ? t.getQueryObjectEXT(e, t.QUERY_RESULT_AVAILABLE_EXT) : this.isQueryResultAvailable(e); + }), + (ue.a.prototype.startTimeQuery = function () { + var e = this.getCaps(), + t = e.timerQuery; + if (!t) return null; + var n = new Ii(); + if ((this._gl.getParameter(t.GPU_DISJOINT_EXT), e.canUseTimestampForTimerQuery)) (n._startTimeQuery = this._createTimeQuery()), t.queryCounterEXT(n._startTimeQuery, t.TIMESTAMP_EXT); + else { + if (this._currentNonTimestampToken) return this._currentNonTimestampToken; + (n._timeElapsedQuery = this._createTimeQuery()), + t.beginQueryEXT ? t.beginQueryEXT(t.TIME_ELAPSED_EXT, n._timeElapsedQuery) : this._gl.beginQuery(t.TIME_ELAPSED_EXT, n._timeElapsedQuery), + (this._currentNonTimestampToken = n); + } + return n; + }), + (ue.a.prototype.endTimeQuery = function (e) { + var t = this.getCaps(), + n = t.timerQuery; + if (!n || !e) return -1; + if (t.canUseTimestampForTimerQuery) { + if (!e._startTimeQuery) return -1; + e._endTimeQuery || ((e._endTimeQuery = this._createTimeQuery()), n.queryCounterEXT(e._endTimeQuery, n.TIMESTAMP_EXT)); + } else if (!e._timeElapsedQueryEnded) { + if (!e._timeElapsedQuery) return -1; + n.endQueryEXT ? n.endQueryEXT(n.TIME_ELAPSED_EXT) : this._gl.endQuery(n.TIME_ELAPSED_EXT), (e._timeElapsedQueryEnded = !0); + } + var i = this._gl.getParameter(n.GPU_DISJOINT_EXT), + r = !1; + if ((e._endTimeQuery ? (r = this._getTimeQueryAvailability(e._endTimeQuery)) : e._timeElapsedQuery && (r = this._getTimeQueryAvailability(e._timeElapsedQuery)), r && !i)) { + var o = 0; + if (t.canUseTimestampForTimerQuery) { + if (!e._startTimeQuery || !e._endTimeQuery) return -1; + var a = this._getTimeQueryResult(e._startTimeQuery); + (o = this._getTimeQueryResult(e._endTimeQuery) - a), this._deleteTimeQuery(e._startTimeQuery), this._deleteTimeQuery(e._endTimeQuery), (e._startTimeQuery = null), (e._endTimeQuery = null); + } else { + if (!e._timeElapsedQuery) return -1; + (o = this._getTimeQueryResult(e._timeElapsedQuery)), this._deleteTimeQuery(e._timeElapsedQuery), (e._timeElapsedQuery = null), (e._timeElapsedQueryEnded = !1), (this._currentNonTimestampToken = null); + } + return o; + } + return -1; + }), + (ue.a.prototype._getGlAlgorithmType = function (e) { + return e === ke.a.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE ? this._gl.ANY_SAMPLES_PASSED_CONSERVATIVE : this._gl.ANY_SAMPLES_PASSED; + }), + Object.defineProperty(ke.a.prototype, "isOcclusionQueryInProgress", { + get: function () { + return this._occlusionDataStorage.isOcclusionQueryInProgress; + }, + set: function (e) { + this._occlusionDataStorage.isOcclusionQueryInProgress = e; + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ke.a.prototype, "_occlusionDataStorage", { + get: function () { + return this.__occlusionDataStorage || (this.__occlusionDataStorage = new Di()), this.__occlusionDataStorage; + }, + enumerable: !1, + configurable: !0, + }), + Object.defineProperty(ke.a.prototype, "isOccluded", { + get: function () { + return this._occlusionDataStorage.isOccluded; + }, + set: function (e) { + this._occlusionDataStorage.isOccluded = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ke.a.prototype, "occlusionQueryAlgorithmType", { + get: function () { + return this._occlusionDataStorage.occlusionQueryAlgorithmType; + }, + set: function (e) { + this._occlusionDataStorage.occlusionQueryAlgorithmType = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ke.a.prototype, "occlusionType", { + get: function () { + return this._occlusionDataStorage.occlusionType; + }, + set: function (e) { + this._occlusionDataStorage.occlusionType = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(ke.a.prototype, "occlusionRetryCount", { + get: function () { + return this._occlusionDataStorage.occlusionRetryCount; + }, + set: function (e) { + this._occlusionDataStorage.occlusionRetryCount = e; + }, + enumerable: !0, + configurable: !0, + }), + (ke.a.prototype._checkOcclusionQuery = function () { + var e = this._occlusionDataStorage; + if (e.occlusionType === ke.a.OCCLUSION_TYPE_NONE) return (e.isOccluded = !1), !1; + var t = this.getEngine(); + if (t.webGLVersion < 2) return (e.isOccluded = !1), !1; + if (!t.isQueryResultAvailable) return (e.isOccluded = !1), !1; + if (this.isOcclusionQueryInProgress && this._occlusionQuery) + if (t.isQueryResultAvailable(this._occlusionQuery)) { + var n = t.getQueryResult(this._occlusionQuery); + (e.isOcclusionQueryInProgress = !1), (e.occlusionInternalRetryCounter = 0), (e.isOccluded = 1 !== n); + } else { + if ((e.occlusionInternalRetryCounter++, !(-1 !== e.occlusionRetryCount && e.occlusionInternalRetryCounter > e.occlusionRetryCount))) return !1; + (e.isOcclusionQueryInProgress = !1), (e.occlusionInternalRetryCounter = 0), (e.isOccluded = e.occlusionType !== ke.a.OCCLUSION_TYPE_OPTIMISTIC && e.isOccluded); + } + var i = this.getScene(); + if (i.getBoundingBoxRenderer) { + var r = i.getBoundingBoxRenderer(); + this._occlusionQuery || (this._occlusionQuery = t.createQuery()), + t.beginOcclusionQuery(e.occlusionQueryAlgorithmType, this._occlusionQuery), + r.renderOcclusionBoundingBox(this), + t.endOcclusionQuery(e.occlusionQueryAlgorithmType), + (this._occlusionDataStorage.isOcclusionQueryInProgress = !0); + } + return e.isOccluded; + }); + var Ri = !0; + (ue.a.prototype.createTransformFeedback = function () { + return this._gl.createTransformFeedback(); + }), + (ue.a.prototype.deleteTransformFeedback = function (e) { + this._gl.deleteTransformFeedback(e); + }), + (ue.a.prototype.bindTransformFeedback = function (e) { + this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK, e); + }), + (ue.a.prototype.beginTransformFeedback = function (e) { + void 0 === e && (e = !0), this._gl.beginTransformFeedback(e ? this._gl.POINTS : this._gl.TRIANGLES); + }), + (ue.a.prototype.endTransformFeedback = function () { + this._gl.endTransformFeedback(); + }), + (ue.a.prototype.setTranformFeedbackVaryings = function (e, t) { + this._gl.transformFeedbackVaryings(e, t, this._gl.INTERLEAVED_ATTRIBS); + }), + (ue.a.prototype.bindTransformFeedbackBuffer = function (e) { + this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER, 0, e ? e.underlyingResource : null); + }); + var wi = function () {}; + (ue.a.prototype.getInputElement = function () { + return this.inputElement || this.getRenderingCanvas(); + }), + (ue.a.prototype.registerView = function (e, t) { + var n = this; + this.views || (this.views = []); + for (var i = 0, r = this.views; i < r.length; i++) { + var o = r[i]; + if (o.target === e) return o; + } + var a = this.getRenderingCanvas(); + a && ((e.width = a.width), (e.height = a.height)); + var s = { target: e, camera: t }; + return ( + this.views.push(s), + t && + t.onDisposeObservable.add(function () { + n.unRegisterView(e); + }), + s + ); + }), + (ue.a.prototype.unRegisterView = function (e) { + if (!this.views) return this; + for (var t = 0, n = this.views; t < n.length; t++) { + var i = n[t]; + if (i.target === e) { + var r = this.views.indexOf(i); + -1 !== r && this.views.splice(r, 1); + break; + } + } + return this; + }), + (ue.a.prototype._renderViews = function () { + if (!this.views) return !1; + var e = this.getRenderingCanvas(); + if (!e) return !1; + for (var t = 0, n = this.views; t < n.length; t++) { + var i = n[t], + r = i.target, + o = r.getContext("2d"); + if (o) { + var a = i.camera, + s = null, + c = null; + if (a) { + if ((c = a.getScene()).activeCameras.length) continue; + (this.activeView = i), (s = c.activeCamera), (c.activeCamera = a); + } + (r.width = r.clientWidth), (r.height = r.clientHeight), (e.width = r.clientWidth), (e.height = r.clientHeight), this._renderFrame(), o.drawImage(e, 0, 0), s && c && (c.activeCamera = s); + } + } + return (this.activeView = null), !0; + }); + var Li, + Fi, + Ni = n(185), + ki = n(157), + zi = n(127), + ji = n(117), + Bi = n(147), + Vi = + (((Li = {})[wn.b.PositionKind] = 0), + (Li[wn.b.NormalKind] = 1), + (Li[wn.b.TangentKind] = 2), + (Li[wn.b.UVKind] = 10), + (Li[wn.b.UV2Kind] = 11), + (Li[wn.b.UV3Kind] = 12), + (Li[wn.b.UV4Kind] = 13), + (Li[wn.b.ColorKind] = 4), + (Li[wn.b.MatricesIndicesKind] = 8), + (Li[wn.b.MatricesWeightsKind] = 9), + Li), + Gi = + (((Fi = {})[wn.b.PositionKind] = "a_position"), + (Fi[wn.b.NormalKind] = "a_normal"), + (Fi[wn.b.TangentKind] = "a_tangent"), + (Fi[wn.b.UVKind] = "a_texcoord0"), + (Fi[wn.b.UV2Kind] = "a_texcoord1"), + (Fi[wn.b.UV3Kind] = "a_texcoord2"), + (Fi[wn.b.UV4Kind] = "a_texcoord3"), + (Fi[wn.b.ColorKind] = "a_color0"), + (Fi[wn.b.MatricesIndicesKind] = "a_indices"), + (Fi[wn.b.MatricesWeightsKind] = "a_weight"), + Fi), + Ui = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.lineProcessor = function (e) { + for (var t = 0, n = this._replacements; t < n.length; t++) { + var i = n[t]; + e = e.replace(i.searchValue, i.replaceValue); + } + return e; + }), + (t.prototype.attributeProcessor = function (t) { + var n = t.match(/attribute\s+[^\s]+\s+([^\s]+)\s*(?:\[.+\])?\s*;/)[1], + i = Vi[n]; + if (void 0 === i && (i = this._genericAttributeLocation++) > 17) throw new Error("Exceeded maximum custom attributes"); + var r = Gi[n]; + if (void 0 === r) throw new Error("Can't find bgfx name mapping"); + return (t = t.replace(n, r)), this._replacements.push({ searchValue: new RegExp("\\b" + n + "\\b", "g"), replaceValue: "" + r }), "layout(location=" + i + ") " + e.prototype.attributeProcessor.call(this, t); + }), + (t.prototype.varyingProcessor = function (t, n) { + var i; + return n ? (i = this._varyingLocationMap[t]) : ((i = this._varyingLocationCount++), (this._varyingLocationMap[t] = i)), "layout(location=" + i + ") " + e.prototype.varyingProcessor.call(this, t, n); + }), + (t.prototype.uniformProcessor = function (e) { + var t = e.match(/uniform\s+([^\s]+)\s+([^\s]+)\s*(?:\[.+\])?\s*;/), + n = t[1], + i = t[2]; + switch (n) { + case "sampler2D": + case "samplerCube": + var r = n.substr(7), + o = this._textureCount++; + return ( + this._replacements.push({ searchValue: new RegExp("\\b" + i + "\\b"), replaceValue: "sampler" + r + "(" + i + "Texture, " + i + ")" }), + "layout(binding=" + o + ") uniform texture" + r + " " + i + "Texture;\nlayout(binding=" + o + ") uniform sampler " + i + ";" + ); + case "float": + this._replacements.push({ searchValue: new RegExp("\\b" + i + "\\b"), replaceValue: i + ".x" }), (e = "uniform vec4 " + i + ";"); + break; + case "vec2": + this._replacements.push({ searchValue: new RegExp("\\b" + i + "\\b"), replaceValue: i + ".xy" }), (e = "uniform vec4 " + i + ";"); + break; + case "vec3": + this._replacements.push({ searchValue: new RegExp("\\b" + i + "\\b"), replaceValue: i + ".xyz" }), (e = "uniform vec4 " + i + ";"); + } + return this._uniforms.push(e), 1 === this._uniforms.length ? "" : ""; + }), + (t.prototype.preProcessor = function (e, t, n) { + return (this._genericAttributeLocation = 10), n || ((this._varyingLocationCount = 0), (this._varyingLocationMap = {})), (this._replacements = []), (this._textureCount = 0), (this._uniforms = []), e; + }), + (t.prototype.postProcessor = function (t, n, i) { + return (t = (t = (t = e.prototype.postProcessor.call(this, t, n, i)).replace("", "layout(binding=0) uniform Frame {\n" + this._uniforms.join("\n") + "\n};")).replace( + "out vec4 glFragColor", + "layout(location=0) out vec4 glFragColor" + )); + }), + t + ); + })(ki.a), + Hi = (function () { + function e() { + (this.isAsync = !1), (this.isReady = !1); + } + return ( + (e.prototype._handlesSpectorRebuildCallback = function (e) { + throw new Error("Not implemented"); + }), + e + ); + })(), + Wi = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return Object(h.d)(t, e), t; + })(zi.a), + Xi = (function () { + function e() {} + return ( + (e.POINT = 0), + (e.MINPOINT_MAGPOINT_MIPPOINT = e.POINT), + (e.BILINEAR = 1), + (e.MINLINEAR_MAGLINEAR_MIPPOINT = e.BILINEAR), + (e.TRILINEAR = 2), + (e.MINLINEAR_MAGLINEAR_MIPLINEAR = e.TRILINEAR), + (e.ANISOTROPIC = 3), + (e.POINT_COMPARE = 4), + (e.TRILINEAR_COMPARE = 5), + (e.MINBILINEAR_MAGPOINT = 6), + (e.MINLINEAR_MAGPOINT_MIPLINEAR = e.MINBILINEAR_MAGPOINT), + (e.MINPOINT_MAGPOINT_MIPLINEAR = 7), + (e.MINPOINT_MAGLINEAR_MIPPOINT = 8), + (e.MINPOINT_MAGLINEAR_MIPLINEAR = 9), + (e.MINLINEAR_MAGPOINT_MIPPOINT = 10), + e + ); + })(), + Yi = (function () { + function e() {} + return (e.CLEAR_COLOR = 1), (e.CLEAR_DEPTH = 2), (e.CLEAR_STENCIL = 4), e; + })(), + Ki = (function () { + function e() {} + return (e.WRAP = 0), (e.MIRROR = 1), (e.CLAMP = 2), (e.BORDER = 3), (e.MIRROR_ONCE = 4), e; + })(), + Zi = (function () { + function e() {} + return (e.RGBA8 = 0), (e.RGBA32F = 1), e; + })(), + qi = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getInternalTexture = function () { + return this; + }), + (t.prototype.getViewCount = function () { + return 1; + }), + t + ); + })(pn.a), + Qi = (function (e) { + function t() { + var t = e.call(this, null) || this; + return ( + (t._native = new _native.Engine()), + (t.INVALID_HANDLE = 65535), + (t._webGLVersion = 2), + (t.disableUniformBuffers = !0), + (t._caps = { + maxTexturesImageUnits: 16, + maxVertexTextureImageUnits: 16, + maxCombinedTexturesImageUnits: 32, + maxTextureSize: 512, + maxCubemapTextureSize: 512, + maxRenderTextureSize: 512, + maxVertexAttribs: 16, + maxVaryingVectors: 16, + maxFragmentUniformVectors: 16, + maxVertexUniformVectors: 16, + standardDerivatives: !0, + astc: null, + pvrtc: null, + etc1: null, + etc2: null, + maxAnisotropy: 16, + uintIndices: !1, + fragmentDepthSupported: !1, + highPrecisionShaderSupported: !0, + colorBufferFloat: !1, + textureFloat: !1, + textureFloatLinearFiltering: !1, + textureFloatRender: !1, + textureHalfFloat: !1, + textureHalfFloatLinearFiltering: !1, + textureHalfFloatRender: !1, + textureLOD: !0, + drawBuffersExtension: !1, + depthTextureExtension: !1, + vertexArrayObject: !0, + instancedArrays: !1, + canUseTimestampForTimerQuery: !1, + blendMinMax: !1, + maxMSAASamples: 1, + }), + $e.b.Log("Babylon Native (v" + ue.a.Version + ") launched"), + "undefined" == typeof URL && (window.URL = { createObjectURL: function () {}, revokeObjectURL: function () {} }), + "undefined" == typeof Blob && (window.Blob = function () {}), + (t._shaderProcessor = new Ui()), + t + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getHardwareScalingLevel = function () { + return 1; + }), + (t.prototype._queueNewFrame = function (e, t) { + return t.requestAnimationFrame ? t.requestAnimationFrame(e) : this._native.requestAnimationFrame(e), 0; + }), + (t.prototype._bindUnboundFramebuffer = function (e) { + this._currentFramebuffer !== e && (this._currentFramebuffer && this._native.unbindFramebuffer(this._currentFramebuffer), e && this._native.bindFramebuffer(e), (this._currentFramebuffer = e)); + }), + (t.prototype.getHostDocument = function () { + return null; + }), + (t.prototype.clear = function (e, t, n, i) { + void 0 === i && (i = !1); + var r = 0; + t && e && (this._native.clearColor(e.r, e.g, e.b, void 0 !== e.a ? e.a : 1), (r |= Yi.CLEAR_COLOR)), + n && (this._native.clearDepth(1), (r |= Yi.CLEAR_DEPTH)), + i && (this._native.clearStencil(0), (r |= Yi.CLEAR_STENCIL)), + this._native.clear(r); + }), + (t.prototype.createIndexBuffer = function (e) { + var t = this._normalizeIndexData(e), + n = new Wi(); + if (((n.references = 1), (n.is32Bits = 4 === t.BYTES_PER_ELEMENT), (n.nativeIndexBuffer = this._native.createIndexBuffer(t)), n.nativeVertexBuffer === this.INVALID_HANDLE)) + throw new Error("Could not create a native index buffer."); + return n; + }), + (t.prototype.createVertexBuffer = function (e) { + var t = new Wi(); + if (((t.references = 1), (t.nativeVertexBuffer = this._native.createVertexBuffer(ArrayBuffer.isView(e) ? e : new Float32Array(e))), t.nativeVertexBuffer === this.INVALID_HANDLE)) + throw new Error("Could not create a native vertex buffer."); + return t; + }), + (t.prototype.recordVertexArrayObject = function (e, t, n) { + var i = this._native.createVertexArray(); + t && this._native.recordIndexBuffer(i, t.nativeIndexBuffer); + for (var r = n.getAttributesNames(), o = 0; o < r.length; o++) { + var a = n.getAttributeLocation(o); + if (a >= 0) { + var s = e[r[o]]; + if (s) { + var c = s.getBuffer(); + c && this._native.recordVertexBuffer(i, c.nativeVertexBuffer, a, s.byteOffset, s.byteStride, s.getSize(), s.type, s.normalized); + } + } + } + return i; + }), + (t.prototype.bindVertexArrayObject = function (e) { + this._native.bindVertexArray(e); + }), + (t.prototype.releaseVertexArrayObject = function (e) { + this._native.deleteVertexArray(e); + }), + (t.prototype.getAttributes = function (e, t) { + var n = e; + return this._native.getAttributes(n.nativeProgram, t); + }), + (t.prototype.drawElementsType = function (e, t, n, i) { + this._drawCalls.addCount(1, !1), this._native.drawIndexed(e, t, n); + }), + (t.prototype.drawArraysType = function (e, t, n, i) { + this._drawCalls.addCount(1, !1), this._native.draw(e, t, n); + }), + (t.prototype.createPipelineContext = function () { + return new Hi(); + }), + (t.prototype._preparePipelineContext = function (e, t, n, i, r, o, a) { + var s = e; + s.nativeProgram = i ? this.createRawShaderProgram(e, t, n, void 0, a) : this.createShaderProgram(e, t, n, o, void 0, a); + }), + (t.prototype._isRenderingStateCompiled = function (e) { + return !0; + }), + (t.prototype._executeWhenRenderingStateIsCompiled = function (e, t) { + t(); + }), + (t.prototype.createRawShaderProgram = function (e, t, n, i, r) { + throw (void 0 === r && (r = null), new Error("Not Supported")); + }), + (t.prototype.createShaderProgram = function (e, t, n, i, r, o) { + void 0 === o && (o = null), this.onBeforeShaderCompilationObservable.notifyObservers(this); + var a = this._native.createProgram(Mi.a._ConcatenateShader(t, i), Mi.a._ConcatenateShader(n, i)); + return this.onAfterShaderCompilationObservable.notifyObservers(this), a; + }), + (t.prototype._setProgram = function (e) { + this._currentProgram !== e && (this._native.setProgram(e), (this._currentProgram = e)); + }), + (t.prototype._releaseEffect = function (e) {}), + (t.prototype._deletePipelineContext = function (e) {}), + (t.prototype.getUniforms = function (e, t) { + var n = e; + return this._native.getUniforms(n.nativeProgram, t); + }), + (t.prototype.bindUniformBlock = function (e, t, n) { + throw new Error("Not Implemented"); + }), + (t.prototype.bindSamplers = function (e) { + var t = e.getPipelineContext(); + this._setProgram(t.nativeProgram); + for (var n = e.getSamplers(), i = 0; i < n.length; i++) { + var r = e.getUniform(n[i]); + r && (this._boundUniforms[i] = r); + } + this._currentEffect = null; + }), + (t.prototype.setMatrix = function (e, t) { + e && this._native.setMatrix(e, t.toArray()); + }), + (t.prototype.getRenderWidth = function (e) { + return void 0 === e && (e = !1), !e && this._currentRenderTarget ? this._currentRenderTarget.width : this._native.getRenderWidth(); + }), + (t.prototype.getRenderHeight = function (e) { + return void 0 === e && (e = !1), !e && this._currentRenderTarget ? this._currentRenderTarget.height : this._native.getRenderHeight(); + }), + (t.prototype.setViewport = function (e, t, n) { + (this._cachedViewport = e), this._native.setViewPort(e.x, e.y, e.width, e.height); + }), + (t.prototype.setState = function (e, t, n, i) { + void 0 === t && (t = 0), void 0 === i && (i = !1), this._native.setState(e, t, i); + }), + (t.prototype.setZOffset = function (e) { + this._native.setZOffset(e); + }), + (t.prototype.getZOffset = function () { + return this._native.getZOffset(); + }), + (t.prototype.setDepthBuffer = function (e) { + this._native.setDepthTest(e); + }), + (t.prototype.getDepthWrite = function () { + return this._native.getDepthWrite(); + }), + (t.prototype.setDepthWrite = function (e) { + this._native.setDepthWrite(e); + }), + (t.prototype.setColorWrite = function (e) { + this._native.setColorWrite(e), (this._colorWrite = e); + }), + (t.prototype.getColorWrite = function () { + return this._colorWrite; + }), + (t.prototype.setAlphaConstants = function (e, t, n, i) { + throw new Error("Setting alpha blend constant color not yet implemented."); + }), + (t.prototype.setAlphaMode = function (e, t) { + void 0 === t && (t = !1), this._alphaMode !== e && (this._native.setBlendMode(e), t || this.setDepthWrite(0 === e), (this._alphaMode = e)); + }), + (t.prototype.getAlphaMode = function () { + return this._alphaMode; + }), + (t.prototype.setInt = function (e, t) { + e && this._native.setInt(e, t); + }), + (t.prototype.setIntArray = function (e, t) { + e && this._native.setIntArray(e, t); + }), + (t.prototype.setIntArray2 = function (e, t) { + e && this._native.setIntArray2(e, t); + }), + (t.prototype.setIntArray3 = function (e, t) { + e && this._native.setIntArray3(e, t); + }), + (t.prototype.setIntArray4 = function (e, t) { + e && this._native.setIntArray4(e, t); + }), + (t.prototype.setFloatArray = function (e, t) { + e && this._native.setFloatArray(e, t); + }), + (t.prototype.setFloatArray2 = function (e, t) { + e && this._native.setFloatArray2(e, t); + }), + (t.prototype.setFloatArray3 = function (e, t) { + e && this._native.setFloatArray3(e, t); + }), + (t.prototype.setFloatArray4 = function (e, t) { + e && this._native.setFloatArray4(e, t); + }), + (t.prototype.setArray = function (e, t) { + e && this._native.setFloatArray(e, t); + }), + (t.prototype.setArray2 = function (e, t) { + e && this._native.setFloatArray2(e, t); + }), + (t.prototype.setArray3 = function (e, t) { + e && this._native.setFloatArray3(e, t); + }), + (t.prototype.setArray4 = function (e, t) { + e && this._native.setFloatArray4(e, t); + }), + (t.prototype.setMatrices = function (e, t) { + e && this._native.setMatrices(e, t); + }), + (t.prototype.setMatrix3x3 = function (e, t) { + e && this._native.setMatrix3x3(e, t); + }), + (t.prototype.setMatrix2x2 = function (e, t) { + e && this._native.setMatrix2x2(e, t); + }), + (t.prototype.setFloat = function (e, t) { + e && this._native.setFloat(e, t); + }), + (t.prototype.setFloat2 = function (e, t, n) { + e && this._native.setFloat2(e, t, n); + }), + (t.prototype.setFloat3 = function (e, t, n, i) { + e && this._native.setFloat3(e, t, n, i); + }), + (t.prototype.setFloat4 = function (e, t, n, i, r) { + e && this._native.setFloat4(e, t, n, i, r); + }), + (t.prototype.setColor3 = function (e, t) { + e && this._native.setFloat3(e, t.r, t.g, t.b); + }), + (t.prototype.setColor4 = function (e, t, n) { + e && this._native.setFloat4(e, t.r, t.g, t.b, n); + }), + (t.prototype.wipeCaches = function (e) { + this.preventCacheWipeBetweenFrames || + (this.resetTextureCache(), + (this._currentEffect = null), + e && ((this._currentProgram = null), this._stencilState.reset(), this._depthCullingState.reset(), this._alphaState.reset()), + (this._cachedVertexBuffers = null), + (this._cachedIndexBuffer = null), + (this._cachedEffectForVertexBuffers = null)); + }), + (t.prototype._createTexture = function () { + return this._native.createTexture(); + }), + (t.prototype._deleteTexture = function (e) { + this._native.deleteTexture(e); + }), + (t.prototype.createTexture = function (e, t, n, i, r, o, a, s, c, l, u, h) { + var d = this; + void 0 === r && (r = 3), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === s && (s = null), void 0 === c && (c = null), void 0 === l && (l = null), void 0 === u && (u = null); + for ( + var p = String(e), + f = "data:" === p.substr(0, 5), + m = "blob:" === p.substr(0, 5), + g = c || new pn.a(this, pn.b.Url), + b = p.lastIndexOf("."), + _ = u || (b > -1 ? p.substring(b).toLowerCase() : ""), + v = null, + y = 0, + C = ue.a._TextureLoaders; + y < C.length; + y++ + ) { + var P = C[y]; + if (P.canLoad(_)) { + v = P; + break; + } + } + i && i._addPendingData(g), (g.url = p), (g.generateMipMaps = !t), (g.samplingMode = r), (g.invertY = n), this.doNotHandleContextLost || (g._buffer = s); + var x = null; + o && !c && (x = g.onLoadedObservable.add(o)), c || this._internalTexturesCache.push(g); + if (v) throw new Error("Loading textures from IInternalTextureLoader not yet implemented."); + var T = function (e, o) { + if ("string" == typeof e) throw new Error("Loading textures from string data not yet implemented."); + m && !d.doNotHandleContextLost && (g._buffer = e); + var a = g._webGLTexture; + if (a) { + if (!d._native.loadTexture(a, e, !t, n)) throw new Error("Could not load a native texture."); + (g.baseWidth = d._native.getTextureWidth(a)), (g.baseHeight = d._native.getTextureHeight(a)), (g.width = g.baseWidth), (g.height = g.baseHeight), (g.isReady = !0); + var s = d._getSamplingFilter(r); + d._native.setTextureSampling(a, s), i && i._removePendingData(g), g.onLoadedObservable.notifyObservers(g), g.onLoadedObservable.clear(); + } else i && i._removePendingData(g); + }; + if (s instanceof ArrayBuffer) T(s); + else if (ArrayBuffer.isView(s)) T(s.buffer); + else { + if (s instanceof Blob) throw new Error("Loading texture from Blob not yet implemented."); + if (f) T($e.b.DecodeBase64(s)); + else { + $e.b.LoadFile(p, T, void 0, void 0, !0, function (e, o) { + !(function (e, o) { + i && i._removePendingData(g), x && g.onLoadedObservable.remove(x), $e.b.UseFallbackTexture && d.createTexture($e.b.fallbackTexture, t, n, i, r, null, a, s, g), a && a(e || "Unknown error", o); + })("Failed to retrieve " + p + ".", o); + }); + } + } + return g; + }), + (t.prototype.createCubeTexture = function (e, t, n, i, r, o, a, s, c, l, u, h) { + var d = this; + void 0 === r && (r = null), void 0 === o && (o = null), void 0 === s && (s = null), void 0 === c && (c = !1), void 0 === l && (l = 0), void 0 === u && (u = 0), void 0 === h && (h = null); + var p = h || new pn.a(this, pn.b.Cube); + (p.isCube = !0), (p.url = e), (p.generateMipMaps = !i), (p._lodGenerationScale = l), (p._lodGenerationOffset = u), this._doNotHandleContextLost || ((p._extension = s), (p._files = n)); + var f = e.lastIndexOf("."); + if (".env" === (s || (f > -1 ? e.substring(f).toLowerCase() : ""))) { + if (n && 6 === n.length) throw new Error("Multi-file loading not allowed on env files."); + this._loadFile( + e, + function (e) { + return (function (e) { + var t = ji.a.GetEnvInfo(e); + if (((p.width = t.width), (p.height = t.width), ji.a.UploadEnvSpherical(p, t), 1 !== t.version)) throw new Error('Unsupported babylon environment map version "' + t.version + '"'); + var n = t.specular; + if (!n) throw new Error("Nothing else parsed so far"); + p._lodGenerationScale = n.lodGenerationScale; + var i = ji.a.CreateImageDataArrayBufferViews(e, t); + if ( + ((p.format = 5), + (p.type = 0), + (p.generateMipMaps = !0), + p.getEngine().updateTextureSamplingMode(ln.a.TRILINEAR_SAMPLINGMODE, p), + (p._isRGBD = !0), + (p.invertY = !0), + !d._native.loadEnvTexture(p._webGLTexture, i)) + ) + throw new Error("Could not load a native cube texture."); + (p.isReady = !0), r && r(); + })(new Uint8Array(e)); + }, + void 0, + void 0, + !0, + function (e, t) { + o && e && o(e.status + " " + e.statusText, t); + } + ); + } else { + if (!n || 6 !== n.length) throw new Error("Cannot load cubemap because 6 files were not defined"); + var m = [n[0], n[3], n[1], n[4], n[2], n[5]]; + Promise.all( + m.map(function (e) { + return $e.b.LoadFileAsync(e).then(function (e) { + return new Uint8Array(e); + }); + }) + ) + .then(function (e) { + d._native.loadCubeTexture(p._webGLTexture, e, !i); + }) + .then( + function () { + (p.isReady = !0), r && r(); + }, + function (e) { + o && o("Failed to load cubemap: " + e.message, e); + } + ); + } + return this._internalTexturesCache.push(p), p; + }), + (t.prototype._getSamplingFilter = function (e) { + switch (e) { + case 2: + return Xi.MINLINEAR_MAGLINEAR_MIPPOINT; + case 3: + return Xi.MINLINEAR_MAGLINEAR_MIPLINEAR; + case 1: + return Xi.MINPOINT_MAGPOINT_MIPLINEAR; + case 4: + return Xi.MINPOINT_MAGPOINT_MIPPOINT; + case 5: + return Xi.MINLINEAR_MAGPOINT_MIPPOINT; + case 6: + case 7: + return Xi.MINLINEAR_MAGPOINT_MIPLINEAR; + case 1: + return Xi.MINPOINT_MAGPOINT_MIPPOINT; + case 9: + return Xi.MINPOINT_MAGLINEAR_MIPPOINT; + case 10: + return Xi.MINPOINT_MAGLINEAR_MIPLINEAR; + case 2: + return Xi.MINLINEAR_MAGLINEAR_MIPLINEAR; + case 12: + return Xi.MINPOINT_MAGLINEAR_MIPLINEAR; + default: + throw new Error("Unexpected sampling mode: " + e + "."); + } + }), + (t._GetNativeTextureFormat = function (e, t) { + if (5 == e && 0 == t) return Zi.RGBA8; + if (5 == e && 1 == t) return Zi.RGBA32F; + throw new Error("Unexpected texture format or type: format " + e + ", type " + t + "."); + }), + (t.prototype.createRenderTargetTexture = function (e, n) { + var i = new Bi.a(); + void 0 !== n && "object" == typeof n + ? ((i.generateMipMaps = n.generateMipMaps), + (i.generateDepthBuffer = void 0 === n.generateDepthBuffer || n.generateDepthBuffer), + (i.generateStencilBuffer = i.generateDepthBuffer && n.generateStencilBuffer), + (i.type = void 0 === n.type ? 0 : n.type), + (i.samplingMode = void 0 === n.samplingMode ? 3 : n.samplingMode), + (i.format = void 0 === n.format ? 5 : n.format)) + : ((i.generateMipMaps = n), (i.generateDepthBuffer = !0), (i.generateStencilBuffer = !1), (i.type = 0), (i.samplingMode = 3), (i.format = 5)), + ((1 !== i.type || this._caps.textureFloatLinearFiltering) && (2 !== i.type || this._caps.textureHalfFloatLinearFiltering)) || (i.samplingMode = 1); + var r = new qi(this, pn.b.RenderTarget), + o = e.width || e, + a = e.height || e; + 1 !== i.type || this._caps.textureFloat || ((i.type = 0), g.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")); + var s = this._native.createFramebuffer(r._webGLTexture, o, a, t._GetNativeTextureFormat(i.format, i.type), i.samplingMode, !!i.generateStencilBuffer, i.generateDepthBuffer, !!i.generateMipMaps); + return ( + (r._framebuffer = s), + (r.baseWidth = o), + (r.baseHeight = a), + (r.width = o), + (r.height = a), + (r.isReady = !0), + (r.samples = 1), + (r.generateMipMaps = !!i.generateMipMaps), + (r.samplingMode = i.samplingMode), + (r.type = i.type), + (r.format = i.format), + (r._generateDepthBuffer = i.generateDepthBuffer), + (r._generateStencilBuffer = !!i.generateStencilBuffer), + this._internalTexturesCache.push(r), + r + ); + }), + (t.prototype.updateTextureSamplingMode = function (e, t) { + if (t._webGLTexture) { + var n = this._getSamplingFilter(e); + this._native.setTextureSampling(t._webGLTexture, n); + } + t.samplingMode = e; + }), + (t.prototype.bindFramebuffer = function (e, t, n, i, r) { + if (t) throw new Error("Cuboid frame buffers are not yet supported in NativeEngine."); + if (n || i) throw new Error("Required width/height for frame buffers not yet supported in NativeEngine."); + if (r) throw new Error("forceFullscreenViewport for frame buffers not yet supported in NativeEngine."); + this._bindUnboundFramebuffer(e._framebuffer); + }), + (t.prototype.unBindFramebuffer = function (e, t, n) { + void 0 === t && (t = !1), t && g.a.Warn("Disabling mipmap generation not yet supported in NativeEngine. Ignoring."), n && n(), this._bindUnboundFramebuffer(null); + }), + (t.prototype.createDynamicVertexBuffer = function (e) { + throw new Error("createDynamicVertexBuffer not yet implemented."); + }), + (t.prototype.updateDynamicIndexBuffer = function (e, t, n) { + throw (void 0 === n && (n = 0), new Error("updateDynamicIndexBuffer not yet implemented.")); + }), + (t.prototype.updateDynamicVertexBuffer = function (e, t, n, i) { + throw new Error("updateDynamicVertexBuffer not yet implemented."); + }), + (t.prototype._setTexture = function (e, t, n, i) { + void 0 === n && (n = !1), void 0 === i && (i = !1); + var r, + o = this._boundUniforms[e]; + if (!o) return !1; + if (!t) return null != this._boundTexturesCache[e] && ((this._activeChannel = e), this._native.setTexture(o, null)), !1; + if (t.video) (this._activeChannel = e), t.update(); + else if (4 === t.delayLoadState) return t.delayLoad(), !1; + return ( + (r = i ? t.depthStencilTexture : t.isReady() ? t.getInternalTexture() : t.isCube ? this.emptyCubeTexture : t.is3D ? this.emptyTexture3D : t.is2DArray ? this.emptyTexture2DArray : this.emptyTexture), + (this._activeChannel = e), + !(!r || !r._webGLTexture) && + (this._native.setTextureWrapMode(r._webGLTexture, this._getAddressMode(t.wrapU), this._getAddressMode(t.wrapV), this._getAddressMode(t.wrapR)), + this._updateAnisotropicLevel(t), + this._native.setTexture(o, r._webGLTexture), + !0) + ); + }), + (t.prototype._updateAnisotropicLevel = function (e) { + var t = e.getInternalTexture(), + n = e.anisotropicFilteringLevel; + t && t._webGLTexture && t._cachedAnisotropicFilteringLevel !== n && (this._native.setTextureAnisotropicLevel(t._webGLTexture, n), (t._cachedAnisotropicFilteringLevel = n)); + }), + (t.prototype._getAddressMode = function (e) { + switch (e) { + case 1: + return Ki.WRAP; + case 0: + return Ki.CLAMP; + case 2: + return Ki.MIRROR; + default: + throw new Error("Unexpected wrap mode: " + e + "."); + } + }), + (t.prototype._bindTexture = function (e, t) { + throw new Error("_bindTexture not implemented."); + }), + (t.prototype._deleteBuffer = function (e) { + e.nativeIndexBuffer && (this._native.deleteIndexBuffer(e.nativeIndexBuffer), delete e.nativeIndexBuffer), e.nativeVertexBuffer && (this._native.deleteVertexBuffer(e.nativeVertexBuffer), delete e.nativeVertexBuffer); + }), + (t.prototype.releaseEffects = function () {}), + (t.prototype._uploadCompressedDataToTextureDirectly = function (e, t, n, i, r, o, a) { + throw (void 0 === o && (o = 0), void 0 === a && (a = 0), new Error("_uploadCompressedDataToTextureDirectly not implemented.")); + }), + (t.prototype._uploadDataToTextureDirectly = function (e, t, n, i) { + throw (void 0 === n && (n = 0), void 0 === i && (i = 0), new Error("_uploadDataToTextureDirectly not implemented.")); + }), + (t.prototype._uploadArrayBufferViewToTexture = function (e, t, n, i) { + throw (void 0 === n && (n = 0), void 0 === i && (i = 0), new Error("_uploadArrayBufferViewToTexture not implemented.")); + }), + (t.prototype._uploadImageToTexture = function (e, t, n, i) { + throw (void 0 === n && (n = 0), void 0 === i && (i = 0), new Error("_uploadArrayBufferViewToTexture not implemented.")); + }), + t + ); + })(ue.a), + Ji = n(113), + $i = n(37), + er = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return (n.controllerType = Mt.DAYDREAM), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.initControllerMesh = function (e, n) { + var i = this; + $i.a.ImportMesh("", t.MODEL_BASE_URL, t.MODEL_FILENAME, e, function (e) { + (i._defaultModel = e[1]), i.attachToMesh(i._defaultModel), n && n(i._defaultModel); + }); + }), + (t.prototype._handleButtonChange = function (e, t, n) { + if (0 === e) { + var i = this.onTriggerStateChangedObservable; + i && i.notifyObservers(t); + } else g.a.Warn("Unrecognized Daydream button index: " + e); + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/generic/"), + (t.MODEL_FILENAME = "generic.babylon"), + (t.GAMEPAD_ID_PREFIX = "Daydream"), + t + ); + })(On); + Lt._ControllerFactories.push({ + canCreate: function (e) { + return 0 === e.id.indexOf(er.GAMEPAD_ID_PREFIX); + }, + create: function (e) { + return new er(e); + }, + }); + var tr = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return ( + (n._buttonIndexToObservableNameMap = ["onPadStateChangedObservable", "onTriggerStateChangedObservable"]), + (n.controllerType = Mt.GEAR_VR), + (n._calculatedPosition = new a.e("left" == n.hand ? -0.15 : 0.15, -0.5, 0.25)), + n._disableTrackPosition(n._calculatedPosition), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.initControllerMesh = function (e, n) { + var i = this; + $i.a.ImportMesh("", t.MODEL_BASE_URL, t.MODEL_FILENAME, e, function (t) { + var r = new Ee.a("", e); + (t[1].parent = r), (t[1].position.z = -0.15), (i._defaultModel = r), i.attachToMesh(i._defaultModel), n && n(i._defaultModel); + }); + }), + (t.prototype._handleButtonChange = function (e, t, n) { + if (e < this._buttonIndexToObservableNameMap.length) { + var i = this[this._buttonIndexToObservableNameMap[e]]; + i && i.notifyObservers(t); + } + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/generic/"), + (t.MODEL_FILENAME = "generic.babylon"), + (t.GAMEPAD_ID_PREFIX = "Gear VR"), + t + ); + })(On); + Lt._ControllerFactories.push({ + canCreate: function (e) { + return 0 === e.id.indexOf(tr.GAMEPAD_ID_PREFIX) || -1 !== e.id.indexOf("Oculus Go") || -1 !== e.id.indexOf("Vive Focus"); + }, + create: function (e) { + return new tr(e); + }, + }); + var nr = (function (e) { + function t(t) { + return e.call(this, t) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.initControllerMesh = function (e, n) { + var i = this; + $i.a.ImportMesh("", t.MODEL_BASE_URL, t.MODEL_FILENAME, e, function (e) { + (i._defaultModel = e[1]), i.attachToMesh(i._defaultModel), n && n(i._defaultModel); + }); + }), + (t.prototype._handleButtonChange = function (e, t, n) {}), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/generic/"), + (t.MODEL_FILENAME = "generic.babylon"), + t + ); + })(On); + Lt._DefaultControllerFactory = function (e) { + return new nr(e); + }; + var ir = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return (n.onSecondaryTriggerStateChangedObservable = new o.c()), (n.onThumbRestChangedObservable = new o.c()), (n.controllerType = Mt.OCULUS), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.initControllerMesh = function (e, n) { + var i, + r = this; + (i = "left" === this.hand ? t.MODEL_LEFT_FILENAME : t.MODEL_RIGHT_FILENAME), + $i.a.ImportMesh("", t._IsQuest ? t.QUEST_MODEL_BASE_URL : t.MODEL_BASE_URL, i, e, function (e) { + (r._defaultModel = t._IsQuest ? e[0] : e[1]), r.attachToMesh(r._defaultModel), n && n(r._defaultModel); + }); + }), + Object.defineProperty(t.prototype, "onAButtonStateChangedObservable", { + get: function () { + if ("right" === this.hand) return this.onMainButtonStateChangedObservable; + throw new Error("No A button on left hand"); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onBButtonStateChangedObservable", { + get: function () { + if ("right" === this.hand) return this.onSecondaryButtonStateChangedObservable; + throw new Error("No B button on left hand"); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onXButtonStateChangedObservable", { + get: function () { + if ("left" === this.hand) return this.onMainButtonStateChangedObservable; + throw new Error("No X button on right hand"); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onYButtonStateChangedObservable", { + get: function () { + if ("left" === this.hand) return this.onSecondaryButtonStateChangedObservable; + throw new Error("No Y button on right hand"); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._handleButtonChange = function (e, n, i) { + var r = n, + o = "right" === this.hand ? -1 : 1; + switch (e) { + case 0: + return void this.onPadStateChangedObservable.notifyObservers(r); + case 1: + return ( + !t._IsQuest && + this._defaultModel && + ((this._defaultModel.getChildren()[3].rotation.x = 0.2 * -r.value), + (this._defaultModel.getChildren()[3].position.y = 0.005 * -r.value), + (this._defaultModel.getChildren()[3].position.z = 0.005 * -r.value)), + void this.onTriggerStateChangedObservable.notifyObservers(r) + ); + case 2: + return !t._IsQuest && this._defaultModel && (this._defaultModel.getChildren()[4].position.x = o * r.value * 0.0035), void this.onSecondaryTriggerStateChangedObservable.notifyObservers(r); + case 3: + return ( + !t._IsQuest && this._defaultModel && (r.pressed ? (this._defaultModel.getChildren()[1].position.y = -0.001) : (this._defaultModel.getChildren()[1].position.y = 0)), + void this.onMainButtonStateChangedObservable.notifyObservers(r) + ); + case 4: + return ( + !t._IsQuest && this._defaultModel && (r.pressed ? (this._defaultModel.getChildren()[2].position.y = -0.001) : (this._defaultModel.getChildren()[2].position.y = 0)), + void this.onSecondaryButtonStateChangedObservable.notifyObservers(r) + ); + case 5: + return void this.onThumbRestChangedObservable.notifyObservers(r); + } + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/oculus/"), + (t.MODEL_LEFT_FILENAME = "left.babylon"), + (t.MODEL_RIGHT_FILENAME = "right.babylon"), + (t.QUEST_MODEL_BASE_URL = "https://controllers.babylonjs.com/oculusQuest/"), + (t._IsQuest = !1), + t + ); + })(On); + Lt._ControllerFactories.push({ + canCreate: function (e) { + return ue.a.LastCreatedEngine && ue.a.LastCreatedEngine._vrDisplay && "Oculus Quest" === ue.a.LastCreatedEngine._vrDisplay.displayName && (ir._IsQuest = !0), -1 !== e.id.indexOf("Oculus Touch"); + }, + create: function (e) { + return new ir(e); + }, + }); + var rr = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return (n.controllerType = Mt.VIVE), (n._invertLeftStickY = !0), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.initControllerMesh = function (e, n) { + var i = this; + $i.a.ImportMesh("", t.MODEL_BASE_URL, t.MODEL_FILENAME, e, function (e) { + (i._defaultModel = e[1]), i.attachToMesh(i._defaultModel), n && n(i._defaultModel); + }); + }), + Object.defineProperty(t.prototype, "onLeftButtonStateChangedObservable", { + get: function () { + return this.onMainButtonStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onRightButtonStateChangedObservable", { + get: function () { + return this.onMainButtonStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onMenuButtonStateChangedObservable", { + get: function () { + return this.onSecondaryButtonStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._handleButtonChange = function (e, t, n) { + var i = t; + switch (e) { + case 0: + return void this.onPadStateChangedObservable.notifyObservers(i); + case 1: + return this._defaultModel && (this._defaultModel.getChildren()[6].rotation.x = 0.15 * -i.value), void this.onTriggerStateChangedObservable.notifyObservers(i); + case 2: + return void this.onMainButtonStateChangedObservable.notifyObservers(i); + case 3: + return ( + this._defaultModel && (i.pressed ? (this._defaultModel.getChildren()[2].position.y = -0.001) : (this._defaultModel.getChildren()[2].position.y = 0)), + void this.onSecondaryButtonStateChangedObservable.notifyObservers(i) + ); + } + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/vive/"), + (t.MODEL_FILENAME = "wand.babylon"), + t + ); + })(On); + Lt._ControllerFactories.push({ + canCreate: function (e) { + return -1 !== e.id.toLowerCase().indexOf("openvr"); + }, + create: function (e) { + return new rr(e); + }, + }); + var or = function () { + (this.buttonMeshes = {}), (this.axisMeshes = {}); + }, + ar = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return ( + (n._mapping = { + buttons: ["thumbstick", "trigger", "grip", "menu", "trackpad"], + buttonMeshNames: { trigger: "SELECT", menu: "MENU", grip: "GRASP", thumbstick: "THUMBSTICK_PRESS", trackpad: "TOUCHPAD_PRESS" }, + buttonObservableNames: { + trigger: "onTriggerStateChangedObservable", + menu: "onSecondaryButtonStateChangedObservable", + grip: "onMainButtonStateChangedObservable", + thumbstick: "onPadStateChangedObservable", + trackpad: "onTrackpadChangedObservable", + }, + axisMeshNames: ["THUMBSTICK_X", "THUMBSTICK_Y", "TOUCHPAD_TOUCH_X", "TOUCHPAD_TOUCH_Y"], + pointingPoseMeshName: Ft.POINTING_POSE, + }), + (n.onTrackpadChangedObservable = new o.c()), + (n.onTrackpadValuesChangedObservable = new o.c()), + (n.trackpad = { x: 0, y: 0 }), + (n.controllerType = Mt.WINDOWS), + (n._loadedMeshInfo = null), + n + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "onTriggerButtonStateChangedObservable", { + get: function () { + return this.onTriggerStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onMenuButtonStateChangedObservable", { + get: function () { + return this.onSecondaryButtonStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onGripButtonStateChangedObservable", { + get: function () { + return this.onMainButtonStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onThumbstickButtonStateChangedObservable", { + get: function () { + return this.onPadStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onTouchpadButtonStateChangedObservable", { + get: function () { + return this.onTrackpadChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "onTouchpadValuesChangedObservable", { + get: function () { + return this.onTrackpadValuesChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._updateTrackpad = function () { + !this.browserGamepad.axes || + (this.browserGamepad.axes[2] == this.trackpad.x && this.browserGamepad.axes[3] == this.trackpad.y) || + ((this.trackpad.x = this.browserGamepad.axes[this._mapping.axisMeshNames.indexOf("TOUCHPAD_TOUCH_X")]), + (this.trackpad.y = this.browserGamepad.axes[this._mapping.axisMeshNames.indexOf("TOUCHPAD_TOUCH_Y")]), + this.onTrackpadValuesChangedObservable.notifyObservers(this.trackpad)); + }), + (t.prototype.update = function () { + if ((e.prototype.update.call(this), this.browserGamepad.axes && (this._updateTrackpad(), this._loadedMeshInfo))) + for (var t = 0; t < this._mapping.axisMeshNames.length; t++) this._lerpAxisTransform(t, this.browserGamepad.axes[t]); + }), + (t.prototype._handleButtonChange = function (e, t, n) { + var i = this._mapping.buttons[e]; + if (i) { + this._updateTrackpad(); + var r = this[this._mapping.buttonObservableNames[i]]; + r && r.notifyObservers(t), this._lerpButtonTransform(i, t.value); + } + }), + (t.prototype._lerpButtonTransform = function (e, t) { + if (this._loadedMeshInfo) { + var n = this._loadedMeshInfo.buttonMeshes[e]; + n && + n.unpressed.rotationQuaternion && + n.pressed.rotationQuaternion && + n.value.rotationQuaternion && + (a.b.SlerpToRef(n.unpressed.rotationQuaternion, n.pressed.rotationQuaternion, t, n.value.rotationQuaternion), a.e.LerpToRef(n.unpressed.position, n.pressed.position, t, n.value.position)); + } + }), + (t.prototype._lerpAxisTransform = function (e, t) { + if (this._loadedMeshInfo) { + var n = this._loadedMeshInfo.axisMeshes[e]; + if (n && n.min.rotationQuaternion && n.max.rotationQuaternion && n.value.rotationQuaternion) { + var i = 0.5 * t + 0.5; + a.b.SlerpToRef(n.min.rotationQuaternion, n.max.rotationQuaternion, i, n.value.rotationQuaternion), a.e.LerpToRef(n.min.position, n.max.position, i, n.value.position); + } + } + }), + (t.prototype.initControllerMesh = function (e, n, i) { + var r, + o, + a = this; + if ((void 0 === i && (i = !1), $i.a.IsPluginForExtensionAvailable(".glb"))) { + var s = "default"; + if (this.id && !i) { + var c = this.id.match(t.GAMEPAD_ID_PATTERN); + s = (c && c[0]) || s; + } + (o = "left" === this.hand ? t.MODEL_LEFT_FILENAME : t.MODEL_RIGHT_FILENAME), (r = t.MODEL_BASE_URL + s + "/"); + } else g.a.Warn("You need to reference GLTF loader to load Windows Motion Controllers model. Falling back to generic models"), (r = nr.MODEL_BASE_URL), (o = nr.MODEL_FILENAME); + $i.a.ImportMesh( + "", + r, + o, + e, + function (t) { + (a._loadedMeshInfo = a.processModel(e, t)), a._loadedMeshInfo && ((a._defaultModel = a._loadedMeshInfo.rootNode), a.attachToMesh(a._defaultModel), n && n(a._defaultModel)); + }, + null, + function (e, t) { + g.a.Log(t), g.a.Warn("Failed to retrieve controller model from the remote server: " + r + o), i || a.initControllerMesh(e, n, !0); + } + ); + }), + (t.prototype.processModel = function (e, t) { + for (var n = null, i = new Ee.a(this.id + " " + this.hand, e), r = null, o = 0; o < t.length; o++) { + var a = t[o]; + if (!a.parent) { + (a.isPickable = !1), (r = a); + break; + } + } + return r ? (r.setParent(i), (n = this.createMeshInfo(i))) : g.a.Warn("Could not find root node in model file."), n; + }), + (t.prototype.createMeshInfo = function (e) { + var t, + n = new or(); + for (n.rootNode = e, n.buttonMeshes = {}, n.axisMeshes = {}, t = 0; t < this._mapping.buttons.length; t++) { + var i = this._mapping.buttonMeshNames[this._mapping.buttons[t]]; + if (i) { + var r = l(e, i); + if (r) { + var o = { index: t, value: u(r, "VALUE"), pressed: u(r, "PRESSED"), unpressed: u(r, "UNPRESSED") }; + o.value && o.pressed && o.unpressed + ? (n.buttonMeshes[this._mapping.buttons[t]] = o) + : g.a.Warn("Missing button submesh under mesh with name: " + i + "(VALUE: " + !!o.value + ", PRESSED: " + !!o.pressed + ", UNPRESSED:" + !!o.unpressed + ")"); + } else g.a.Warn("Missing button mesh with name: " + i); + } else g.a.Log("Skipping unknown button at index: " + t + " with mapped name: " + this._mapping.buttons[t]); + } + for (t = 0; t < this._mapping.axisMeshNames.length; t++) { + var a = this._mapping.axisMeshNames[t]; + if (a) { + var s = l(e, a); + if (s) { + var c = { index: t, value: u(s, "VALUE"), min: u(s, "MIN"), max: u(s, "MAX") }; + c.value && c.min && c.max ? (n.axisMeshes[t] = c) : g.a.Warn("Missing axis submesh under mesh with name: " + a + "(VALUE: " + !!c.value + ", MIN: " + !!c.min + ", MAX:" + !!c.max + ")"); + } else g.a.Warn("Missing axis mesh with name: " + a); + } else g.a.Log("Skipping unknown axis at index: " + t); + } + return ( + (n.pointingPoseNode = l(e, this._mapping.pointingPoseMeshName)), + n.pointingPoseNode ? (this._pointingPoseNode = n.pointingPoseNode) : g.a.Warn("Missing pointing pose mesh with name: " + this._mapping.pointingPoseMeshName), + n + ); + function l(e, t) { + return e.getChildren(function (e) { + return e.name === t; + }, !1)[0]; + } + function u(e, t) { + return e.getChildren(function (e) { + return e.name == t; + }, !0)[0]; + } + }), + (t.prototype.getForwardRay = function (t) { + if ((void 0 === t && (t = 100), !this._loadedMeshInfo || !this._loadedMeshInfo.pointingPoseNode)) return e.prototype.getForwardRay.call(this, t); + var n = this._loadedMeshInfo.pointingPoseNode.getWorldMatrix(), + i = n.getTranslation(), + r = new a.e(0, 0, -1), + o = a.e.TransformNormal(r, n), + s = a.e.Normalize(o); + return new Re(i, s, t); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onTrackpadChangedObservable.clear(), this.onTrackpadValuesChangedObservable.clear(); + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/microsoft/"), + (t.MODEL_LEFT_FILENAME = "left.glb"), + (t.MODEL_RIGHT_FILENAME = "right.glb"), + (t.GAMEPAD_ID_PREFIX = "Spatial Controller (Spatial Interaction Source) "), + (t.GAMEPAD_ID_PATTERN = /([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/), + t + ); + })(On), + sr = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return ( + (n._mapping = { + buttons: ["trigger", "grip", "trackpad", "thumbstick", "menu"], + buttonMeshNames: { trigger: "SELECT", menu: "MENU", grip: "GRASP", thumbstick: "THUMBSTICK_PRESS", trackpad: "TOUCHPAD_PRESS" }, + buttonObservableNames: { + trigger: "onTriggerStateChangedObservable", + menu: "onSecondaryButtonStateChangedObservable", + grip: "onMainButtonStateChangedObservable", + thumbstick: "onThumbstickStateChangedObservable", + trackpad: "onTrackpadChangedObservable", + }, + axisMeshNames: ["TOUCHPAD_TOUCH_X", "TOUCHPAD_TOUCH_Y", "THUMBSTICK_X", "THUMBSTICK_Y"], + pointingPoseMeshName: Ft.POINTING_POSE, + }), + (n.thumbstickValues = { x: 0, y: 0 }), + (n.onThumbstickStateChangedObservable = new o.c()), + (n.onThumbstickValuesChangedObservable = new o.c()), + (n.onTrackpadChangedObservable = n.onPadStateChangedObservable), + (n.onTrackpadValuesChangedObservable = n.onPadValuesChangedObservable), + n + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "onThumbstickButtonStateChangedObservable", { + get: function () { + return this.onThumbstickStateChangedObservable; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._updateTrackpad = function () { + !this.browserGamepad.axes || + (this.browserGamepad.axes[2] == this.thumbstickValues.x && this.browserGamepad.axes[3] == this.thumbstickValues.y) || + ((this.trackpad.x = this.browserGamepad.axes[2]), (this.trackpad.y = this.browserGamepad.axes[3]), this.onThumbstickValuesChangedObservable.notifyObservers(this.trackpad)); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onThumbstickStateChangedObservable.clear(), this.onThumbstickValuesChangedObservable.clear(); + }), + t + ); + })(ar); + Lt._ControllerFactories.push({ + canCreate: function (e) { + return 0 === e.id.indexOf(ar.GAMEPAD_ID_PREFIX); + }, + create: function (e) { + return new ar(e); + }, + }); + var cr = (function (e) { + function t(t, n, i, r) { + void 0 === n && (n = s.a.Gray()), void 0 === i && (i = ci.a.DefaultUtilityLayer), void 0 === r && (r = null); + var c = e.call(this, i) || this; + (c._pointerObserver = null), + (c.snapDistance = 0), + (c.onSnapObservable = new o.c()), + (c.uniformScaling = !1), + (c.sensitivity = 1), + (c._isEnabled = !0), + (c._parent = null), + (c._parent = r), + (c._coloredMaterial = new Mn.a("", i.utilityLayerScene)), + (c._coloredMaterial.diffuseColor = n), + (c._coloredMaterial.specularColor = n.subtract(new s.a(0.1, 0.1, 0.1))), + (c._hoverMaterial = new Mn.a("", i.utilityLayerScene)), + (c._hoverMaterial.diffuseColor = n.add(new s.a(0.3, 0.3, 0.3))), + (c._arrow = new ke.a("", i.utilityLayerScene)); + var l = fi.a.CreateBox("yPosMesh", { size: 0.4 }, i.utilityLayerScene), + u = jn.CreateCylinder("cylinder", { diameterTop: 0.005, height: 0.275, diameterBottom: 0.005, tessellation: 96 }, i.utilityLayerScene); + (u.material = c._coloredMaterial), + c._arrow.addChild(l), + c._arrow.addChild(u), + l.scaling.scaleInPlace(0.1), + (l.material = c._coloredMaterial), + (l.rotation.x = Math.PI / 2), + (l.position.z += 0.3), + (u.position.z += 0.1375), + (u.rotation.x = Math.PI / 2), + c._arrow.lookAt(c._rootMesh.position.add(t)), + c._rootMesh.addChild(c._arrow), + c._arrow.scaling.scaleInPlace(1 / 3), + (c.dragBehavior = new Fe({ dragAxis: t })), + (c.dragBehavior.moveAttached = !1), + c._rootMesh.addBehavior(c.dragBehavior); + var h = 0, + d = new a.e(), + p = { snapDistance: 0 }; + c.dragBehavior.onDragObservable.add(function (e) { + if (c.attachedMesh) { + var n = c.sensitivity * e.dragDistance * ((3 * c.scaleRatio) / c._rootMesh.scaling.length()), + i = !1, + r = 0; + c.uniformScaling ? (c.attachedMesh.scaling.normalizeToRef(d), d.y < 0 && d.scaleInPlace(-1)) : d.copyFrom(t), + 0 == c.snapDistance + ? d.scaleToRef(n, d) + : ((h += n), Math.abs(h) > c.snapDistance ? ((r = Math.floor(Math.abs(h) / c.snapDistance)), h < 0 && (r *= -1), (h %= c.snapDistance), d.scaleToRef(c.snapDistance * r, d), (i = !0)) : d.scaleInPlace(0)), + c.attachedMesh.scaling.addInPlace(d), + i && ((p.snapDistance = c.snapDistance * r), c.onSnapObservable.notifyObservers(p)); + } + }), + (c._pointerObserver = i.utilityLayerScene.onPointerObservable.add(function (e) { + if (!c._customMeshSet) { + var t = e.pickInfo && -1 != c._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh) ? c._hoverMaterial : c._coloredMaterial; + c._rootMesh.getChildMeshes().forEach(function (e) { + (e.material = t), e.color && (e.color = t.diffuseColor); + }); + } + })); + var f = i._getSharedGizmoLight(); + return (f.includedOnlyMeshes = f.includedOnlyMeshes.concat(c._rootMesh.getChildMeshes())), c; + } + return ( + Object(h.d)(t, e), + (t.prototype._attachedMeshChanged = function (e) { + this.dragBehavior && (this.dragBehavior.enabled = !!e); + }), + Object.defineProperty(t.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + (this._isEnabled = e), e ? this._parent && (this.attachedMesh = this._parent.attachedMesh) : (this.attachedMesh = null); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + this.onSnapObservable.clear(), + this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver), + this.dragBehavior.detach(), + this._arrow && this._arrow.dispose(), + [this._coloredMaterial, this._hoverMaterial].forEach(function (e) { + e && e.dispose(); + }), + e.prototype.dispose.call(this); + }), + (t.prototype.setCustomMesh = function (t, n) { + var i = this; + void 0 === n && (n = !1), + e.prototype.setCustomMesh.call(this, t), + n && + (this._rootMesh.getChildMeshes().forEach(function (e) { + (e.material = i._coloredMaterial), e.color && (e.color = i._coloredMaterial.diffuseColor); + }), + (this._customMeshSet = !1)); + }), + t + ); + })(li), + lr = (function (e) { + function t(t, n) { + void 0 === t && (t = s.a.Gray()), void 0 === n && (n = ci.a.DefaultKeepDepthUtilityLayer); + var i = e.call(this, n) || this; + (i._boundingDimensions = new a.e(1, 1, 1)), + (i._renderObserver = null), + (i._pointerObserver = null), + (i._scaleDragSpeed = 0.2), + (i._tmpQuaternion = new a.b()), + (i._tmpVector = new a.e(0, 0, 0)), + (i._tmpRotationMatrix = new a.a()), + (i.ignoreChildren = !1), + (i.includeChildPredicate = null), + (i.rotationSphereSize = 0.1), + (i.scaleBoxSize = 0.1), + (i.fixedDragMeshScreenSize = !1), + (i.fixedDragMeshScreenSizeDistanceFactor = 10), + (i.onDragStartObservable = new o.c()), + (i.onScaleBoxDragObservable = new o.c()), + (i.onScaleBoxDragEndObservable = new o.c()), + (i.onRotationSphereDragObservable = new o.c()), + (i.onRotationSphereDragEndObservable = new o.c()), + (i.scalePivot = null), + (i._existingMeshScale = new a.e()), + (i._dragMesh = null), + (i.pointerDragBehavior = new Fe()), + (i.updateScale = !1), + (i._anchorMesh = new ke.a("anchor", n.utilityLayerScene)), + (i.coloredMaterial = new Mn.a("", n.utilityLayerScene)), + (i.coloredMaterial.disableLighting = !0), + (i.hoverColoredMaterial = new Mn.a("", n.utilityLayerScene)), + (i.hoverColoredMaterial.disableLighting = !0), + (i._lineBoundingBox = new ke.a("", n.utilityLayerScene)), + (i._lineBoundingBox.rotationQuaternion = new a.b()); + var r = []; + r.push(Ti.CreateLines("lines", { points: [new a.e(0, 0, 0), new a.e(i._boundingDimensions.x, 0, 0)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, 0, 0), new a.e(0, i._boundingDimensions.y, 0)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, 0, 0), new a.e(0, 0, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(i._boundingDimensions.x, 0, 0), new a.e(i._boundingDimensions.x, i._boundingDimensions.y, 0)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(i._boundingDimensions.x, 0, 0), new a.e(i._boundingDimensions.x, 0, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, i._boundingDimensions.y, 0), new a.e(i._boundingDimensions.x, i._boundingDimensions.y, 0)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, i._boundingDimensions.y, 0), new a.e(0, i._boundingDimensions.y, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, 0, i._boundingDimensions.z), new a.e(i._boundingDimensions.x, 0, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(0, 0, i._boundingDimensions.z), new a.e(0, i._boundingDimensions.y, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(i._boundingDimensions.x, i._boundingDimensions.y, i._boundingDimensions.z), new a.e(0, i._boundingDimensions.y, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(i._boundingDimensions.x, i._boundingDimensions.y, i._boundingDimensions.z), new a.e(i._boundingDimensions.x, 0, i._boundingDimensions.z)] }, n.utilityLayerScene)), + r.push(Ti.CreateLines("lines", { points: [new a.e(i._boundingDimensions.x, i._boundingDimensions.y, i._boundingDimensions.z), new a.e(i._boundingDimensions.x, i._boundingDimensions.y, 0)] }, n.utilityLayerScene)), + r.forEach(function (e) { + (e.color = t), e.position.addInPlace(new a.e(-i._boundingDimensions.x / 2, -i._boundingDimensions.y / 2, -i._boundingDimensions.z / 2)), (e.isPickable = !1), i._lineBoundingBox.addChild(e); + }), + i._rootMesh.addChild(i._lineBoundingBox), + i.setColor(t), + (i._rotateSpheresParent = new ke.a("", n.utilityLayerScene)), + (i._rotateSpheresParent.rotationQuaternion = new a.b()); + for ( + var c = function (e) { + var t = mi.CreateSphere("", { diameter: 1 }, n.utilityLayerScene); + (t.rotationQuaternion = new a.b()), (t.material = l.coloredMaterial), ((p = new Fe({})).moveAttached = !1), (p.updateDragPlane = !1), t.addBehavior(p); + var r = new a.e(1, 0, 0), + o = 0; + p.onDragStartObservable.add(function () { + r.copyFrom(t.forward), (o = 0); + }), + p.onDragObservable.add(function (t) { + if ((i.onRotationSphereDragObservable.notifyObservers({}), i.attachedMesh)) { + var n = i.attachedMesh.parent; + if (n && n.scaling && n.scaling.isNonUniformWithinEpsilon(0.001)) return void g.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling"); + we._RemoveAndStorePivotPoint(i.attachedMesh); + var s = r, + c = t.dragPlaneNormal.scale(a.e.Dot(t.dragPlaneNormal, s)), + l = s.subtract(c).normalizeToNew(), + u = a.e.Dot(l, t.delta) < 0 ? Math.abs(t.delta.length()) : -Math.abs(t.delta.length()); + (u = (u / i._boundingDimensions.length()) * i._anchorMesh.scaling.length()), + i.attachedMesh.rotationQuaternion || (i.attachedMesh.rotationQuaternion = a.b.RotationYawPitchRoll(i.attachedMesh.rotation.y, i.attachedMesh.rotation.x, i.attachedMesh.rotation.z)), + i._anchorMesh.rotationQuaternion || (i._anchorMesh.rotationQuaternion = a.b.RotationYawPitchRoll(i._anchorMesh.rotation.y, i._anchorMesh.rotation.x, i._anchorMesh.rotation.z)), + (o += u), + Math.abs(o) <= 2 * Math.PI && + (e >= 8 + ? a.b.RotationYawPitchRollToRef(0, 0, u, i._tmpQuaternion) + : e >= 4 + ? a.b.RotationYawPitchRollToRef(u, 0, 0, i._tmpQuaternion) + : a.b.RotationYawPitchRollToRef(0, u, 0, i._tmpQuaternion), + i._anchorMesh.addChild(i.attachedMesh), + i._anchorMesh.rotationQuaternion.multiplyToRef(i._tmpQuaternion, i._anchorMesh.rotationQuaternion), + i._anchorMesh.removeChild(i.attachedMesh), + i.attachedMesh.setParent(n)), + i.updateBoundingBox(), + we._RestorePivotPoint(i.attachedMesh); + } + i._updateDummy(); + }), + p.onDragStartObservable.add(function () { + i.onDragStartObservable.notifyObservers({}), i._selectNode(t); + }), + p.onDragEndObservable.add(function () { + i.onRotationSphereDragEndObservable.notifyObservers({}), i._selectNode(null), i._updateDummy(); + }), + l._rotateSpheresParent.addChild(t); + }, + l = this, + u = 0; + u < 12; + u++ + ) + c(u); + i._rootMesh.addChild(i._rotateSpheresParent), (i._scaleBoxesParent = new ke.a("", n.utilityLayerScene)), (i._scaleBoxesParent.rotationQuaternion = new a.b()); + for (var h = 0; h < 2; h++) + for (var d = 0; d < 2; d++) + for ( + var p, + f = function () { + var e = fi.a.CreateBox("", { size: 1 }, n.utilityLayerScene); + e.material = m.coloredMaterial; + var t = new a.e(0 == h ? -1 : 1, 0 == d ? -1 : 1, 0 == b ? -1 : 1); + ((p = new Fe({ dragAxis: t })).moveAttached = !1), + e.addBehavior(p), + p.onDragObservable.add(function (t) { + if ((i.onScaleBoxDragObservable.notifyObservers({}), i.attachedMesh)) { + var n = i.attachedMesh.parent; + if (n && n.scaling && n.scaling.isNonUniformWithinEpsilon(0.001)) return void g.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling"); + we._RemoveAndStorePivotPoint(i.attachedMesh); + var r = (t.dragDistance / i._boundingDimensions.length()) * i._anchorMesh.scaling.length(), + o = new a.e(r, r, r); + o.scaleInPlace(i._scaleDragSpeed), + i.updateBoundingBox(), + i.scalePivot + ? (i.attachedMesh.getWorldMatrix().getRotationMatrixToRef(i._tmpRotationMatrix), + i._boundingDimensions.scaleToRef(0.5, i._tmpVector), + a.e.TransformCoordinatesToRef(i._tmpVector, i._tmpRotationMatrix, i._tmpVector), + i._anchorMesh.position.subtractInPlace(i._tmpVector), + i._boundingDimensions.multiplyToRef(i.scalePivot, i._tmpVector), + a.e.TransformCoordinatesToRef(i._tmpVector, i._tmpRotationMatrix, i._tmpVector), + i._anchorMesh.position.addInPlace(i._tmpVector)) + : (e.absolutePosition.subtractToRef(i._anchorMesh.position, i._tmpVector), i._anchorMesh.position.subtractInPlace(i._tmpVector)), + i._anchorMesh.addChild(i.attachedMesh), + i._anchorMesh.scaling.addInPlace(o), + (i._anchorMesh.scaling.x < 0 || i._anchorMesh.scaling.y < 0 || i._anchorMesh.scaling.z < 0) && i._anchorMesh.scaling.subtractInPlace(o), + i._anchorMesh.removeChild(i.attachedMesh), + i.attachedMesh.setParent(n), + we._RestorePivotPoint(i.attachedMesh); + } + i._updateDummy(); + }), + p.onDragStartObservable.add(function () { + i.onDragStartObservable.notifyObservers({}), i._selectNode(e); + }), + p.onDragEndObservable.add(function () { + i.onScaleBoxDragEndObservable.notifyObservers({}), i._selectNode(null), i._updateDummy(); + }), + m._scaleBoxesParent.addChild(e); + }, + m = this, + b = 0; + b < 2; + b++ + ) + f(); + i._rootMesh.addChild(i._scaleBoxesParent); + var _ = new Array(); + return ( + (i._pointerObserver = n.utilityLayerScene.onPointerObservable.add(function (e) { + _[e.event.pointerId] + ? e.pickInfo && e.pickInfo.pickedMesh != _[e.event.pointerId] && ((_[e.event.pointerId].material = i.coloredMaterial), delete _[e.event.pointerId]) + : i._rotateSpheresParent + .getChildMeshes() + .concat(i._scaleBoxesParent.getChildMeshes()) + .forEach(function (t) { + e.pickInfo && e.pickInfo.pickedMesh == t && ((_[e.event.pointerId] = t), (t.material = i.hoverColoredMaterial)); + }); + })), + (i._renderObserver = i.gizmoLayer.originalScene.onBeforeRenderObservable.add(function () { + i.attachedMesh && !i._existingMeshScale.equals(i.attachedMesh.scaling) ? i.updateBoundingBox() : i.fixedDragMeshScreenSize && (i._updateRotationSpheres(), i._updateScaleBoxes()), + i._dragMesh && + i.attachedMesh && + i.pointerDragBehavior.dragging && + (i._lineBoundingBox.position.rotateByQuaternionToRef(i._rootMesh.rotationQuaternion, i._tmpVector), i.attachedMesh.setAbsolutePosition(i._dragMesh.position.add(i._tmpVector.scale(-1)))); + })), + i.updateBoundingBox(), + i + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.setColor = function (e) { + (this.coloredMaterial.emissiveColor = e), + (this.hoverColoredMaterial.emissiveColor = e.clone().add(new s.a(0.3, 0.3, 0.3))), + this._lineBoundingBox.getChildren().forEach(function (t) { + t.color && (t.color = e); + }); + }), + (t.prototype._attachedMeshChanged = function (e) { + var t = this; + if (e) { + we._RemoveAndStorePivotPoint(e); + var n = e.parent; + this._anchorMesh.addChild(e), + this._anchorMesh.removeChild(e), + e.setParent(n), + we._RestorePivotPoint(e), + this.updateBoundingBox(), + e.getChildMeshes(!1).forEach(function (e) { + e.markAsDirty("scaling"); + }), + this.gizmoLayer.utilityLayerScene.onAfterRenderObservable.addOnce(function () { + t._updateDummy(); + }); + } + }), + (t.prototype._selectNode = function (e) { + this._rotateSpheresParent + .getChildMeshes() + .concat(this._scaleBoxesParent.getChildMeshes()) + .forEach(function (t) { + t.isVisible = !e || t == e; + }); + }), + (t.prototype.updateBoundingBox = function () { + if (this.attachedMesh) { + we._RemoveAndStorePivotPoint(this.attachedMesh); + var e = this.attachedMesh.parent; + this.attachedMesh.setParent(null); + var t = null; + this.attachedMesh.skeleton && ((t = this.attachedMesh.skeleton.overrideMesh), (this.attachedMesh.skeleton.overrideMesh = null)), + this._update(), + this.attachedMesh.rotationQuaternion || (this.attachedMesh.rotationQuaternion = a.b.RotationYawPitchRoll(this.attachedMesh.rotation.y, this.attachedMesh.rotation.x, this.attachedMesh.rotation.z)), + this._anchorMesh.rotationQuaternion || (this._anchorMesh.rotationQuaternion = a.b.RotationYawPitchRoll(this._anchorMesh.rotation.y, this._anchorMesh.rotation.x, this._anchorMesh.rotation.z)), + this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion), + this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion), + this._tmpVector.copyFrom(this.attachedMesh.position), + this.attachedMesh.rotationQuaternion.set(0, 0, 0, 1), + this.attachedMesh.position.set(0, 0, 0); + var n = this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren, this.includeChildPredicate); + n.max.subtractToRef(n.min, this._boundingDimensions), + this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions), + this._lineBoundingBox.position.set((n.max.x + n.min.x) / 2, (n.max.y + n.min.y) / 2, (n.max.z + n.min.z) / 2), + this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position), + this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position), + this._lineBoundingBox.computeWorldMatrix(), + this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition), + this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion), + this.attachedMesh.position.copyFrom(this._tmpVector), + this.attachedMesh.setParent(e), + this.attachedMesh.skeleton && (this.attachedMesh.skeleton.overrideMesh = t); + } + this._updateRotationSpheres(), this._updateScaleBoxes(), this.attachedMesh && (this._existingMeshScale.copyFrom(this.attachedMesh.scaling), we._RestorePivotPoint(this.attachedMesh)); + }), + (t.prototype._updateRotationSpheres = function () { + for (var e = this._rotateSpheresParent.getChildMeshes(), t = 0; t < 3; t++) + for (var n = 0; n < 2; n++) + for (var i = 0; i < 2; i++) { + var r = 4 * t + 2 * n + i; + if ( + (0 == t && + (e[r].position.set(this._boundingDimensions.x / 2, this._boundingDimensions.y * n, this._boundingDimensions.z * i), + e[r].position.addInPlace(new a.e(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2)), + e[r].lookAt(a.e.Cross(e[r].position.normalizeToNew(), a.e.Right()).normalizeToNew().add(e[r].position))), + 1 == t && + (e[r].position.set(this._boundingDimensions.x * n, this._boundingDimensions.y / 2, this._boundingDimensions.z * i), + e[r].position.addInPlace(new a.e(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2)), + e[r].lookAt(a.e.Cross(e[r].position.normalizeToNew(), a.e.Up()).normalizeToNew().add(e[r].position))), + 2 == t && + (e[r].position.set(this._boundingDimensions.x * n, this._boundingDimensions.y * i, this._boundingDimensions.z / 2), + e[r].position.addInPlace(new a.e(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2)), + e[r].lookAt(a.e.Cross(e[r].position.normalizeToNew(), a.e.Forward()).normalizeToNew().add(e[r].position))), + this.fixedDragMeshScreenSize && this.gizmoLayer.utilityLayerScene.activeCamera) + ) { + e[r].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector); + var o = (this.rotationSphereSize * this._tmpVector.length()) / this.fixedDragMeshScreenSizeDistanceFactor; + e[r].scaling.set(o, o, o); + } else e[r].scaling.set(this.rotationSphereSize, this.rotationSphereSize, this.rotationSphereSize); + } + }), + (t.prototype._updateScaleBoxes = function () { + for (var e = this._scaleBoxesParent.getChildMeshes(), t = 0; t < 2; t++) + for (var n = 0; n < 2; n++) + for (var i = 0; i < 2; i++) { + var r = 4 * t + 2 * n + i; + if (e[r]) + if ( + (e[r].position.set(this._boundingDimensions.x * t, this._boundingDimensions.y * n, this._boundingDimensions.z * i), + e[r].position.addInPlace(new a.e(-this._boundingDimensions.x / 2, -this._boundingDimensions.y / 2, -this._boundingDimensions.z / 2)), + this.fixedDragMeshScreenSize && this.gizmoLayer.utilityLayerScene.activeCamera) + ) { + e[r].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position, this._tmpVector); + var o = (this.scaleBoxSize * this._tmpVector.length()) / this.fixedDragMeshScreenSizeDistanceFactor; + e[r].scaling.set(o, o, o); + } else e[r].scaling.set(this.scaleBoxSize, this.scaleBoxSize, this.scaleBoxSize); + } + }), + (t.prototype.setEnabledRotationAxis = function (e) { + this._rotateSpheresParent.getChildMeshes().forEach(function (t, n) { + n < 4 ? t.setEnabled(-1 != e.indexOf("x")) : n < 8 ? t.setEnabled(-1 != e.indexOf("y")) : t.setEnabled(-1 != e.indexOf("z")); + }); + }), + (t.prototype.setEnabledScaling = function (e) { + this._scaleBoxesParent.getChildMeshes().forEach(function (t, n) { + t.setEnabled(e); + }); + }), + (t.prototype._updateDummy = function () { + this._dragMesh && + (this._dragMesh.position.copyFrom(this._lineBoundingBox.getAbsolutePosition()), + this._dragMesh.scaling.copyFrom(this._lineBoundingBox.scaling), + this._dragMesh.rotationQuaternion.copyFrom(this._rootMesh.rotationQuaternion)); + }), + (t.prototype.enableDragBehavior = function () { + (this._dragMesh = Ee.a.CreateBox("dummy", 1, this.gizmoLayer.utilityLayerScene)), + (this._dragMesh.visibility = 0), + (this._dragMesh.rotationQuaternion = new a.b()), + (this.pointerDragBehavior.useObjectOrientationForDragging = !1), + this._dragMesh.addBehavior(this.pointerDragBehavior); + }), + (t.prototype.dispose = function () { + this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver), + this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver), + this._lineBoundingBox.dispose(), + this._rotateSpheresParent.dispose(), + this._scaleBoxesParent.dispose(), + this._dragMesh && this._dragMesh.dispose(), + e.prototype.dispose.call(this); + }), + (t.MakeNotPickableAndWrapInBoundingBox = function (e) { + var t = function (e) { + (e.isPickable = !1), + e.getChildMeshes().forEach(function (e) { + t(e); + }); + }; + t(e), e.rotationQuaternion || (e.rotationQuaternion = a.b.RotationYawPitchRoll(e.rotation.y, e.rotation.x, e.rotation.z)); + var n = e.position.clone(), + i = e.rotationQuaternion.clone(); + e.rotationQuaternion.set(0, 0, 0, 1), e.position.set(0, 0, 0); + var r = fi.a.CreateBox("box", { size: 1 }, e.getScene()), + o = e.getHierarchyBoundingVectors(); + return ( + o.max.subtractToRef(o.min, r.scaling), + 0 === r.scaling.y && (r.scaling.y = j.a), + 0 === r.scaling.x && (r.scaling.x = j.a), + 0 === r.scaling.z && (r.scaling.z = j.a), + r.position.set((o.max.x + o.min.x) / 2, (o.max.y + o.min.y) / 2, (o.max.z + o.min.z) / 2), + e.addChild(r), + e.rotationQuaternion.copyFrom(i), + e.position.copyFrom(n), + e.removeChild(r), + r.addChild(e), + (r.visibility = 0), + r + ); + }), + (t.prototype.setCustomMesh = function (e) { + g.a.Error("Custom meshes are not supported on this gizmo"); + }), + t + ); + })(li), + ur = (function (e) { + function t(t, n, i, r, c, l) { + void 0 === n && (n = s.a.Gray()), void 0 === i && (i = ci.a.DefaultUtilityLayer), void 0 === r && (r = 32), void 0 === c && (c = null), void 0 === l && (l = !1); + var u = e.call(this, i) || this; + (u._pointerObserver = null), (u.snapDistance = 0), (u.onSnapObservable = new o.c()), (u._isEnabled = !0), (u._parent = null), (u._parent = c); + var h = new Mn.a("", i.utilityLayerScene); + (h.diffuseColor = n), (h.specularColor = n.subtract(new s.a(0.1, 0.1, 0.1))); + var d = new Mn.a("", i.utilityLayerScene); + d.diffuseColor = n.add(new s.a(0.3, 0.3, 0.3)); + var p = new ke.a("", i.utilityLayerScene), + f = Ee.a.CreateTorus("", 0.6, 0.03, r, i.utilityLayerScene); + f.visibility = 0; + var m = Ee.a.CreateTorus("", 0.6, 0.005, r, i.utilityLayerScene); + (m.material = h), + (m.rotation.x = Math.PI / 2), + (f.rotation.x = Math.PI / 2), + p.addChild(m), + p.addChild(f), + p.lookAt(u._rootMesh.position.add(t)), + u._rootMesh.addChild(p), + p.scaling.scaleInPlace(1 / 3), + (u.dragBehavior = new Fe({ dragPlaneNormal: t })), + (u.dragBehavior.moveAttached = !1), + (u.dragBehavior.maxDragAngle = (9 * Math.PI) / 20), + (u.dragBehavior._useAlternatePickedPointAboveMaxDragAngle = !0), + u._rootMesh.addBehavior(u.dragBehavior); + var g = new a.e(); + u.dragBehavior.onDragStartObservable.add(function (e) { + u.attachedMesh && g.copyFrom(e.dragPlanePoint); + }); + var b = new a.a(), + _ = new a.e(), + v = new a.e(), + y = { snapDistance: 0 }, + C = 0, + P = new a.a(), + x = new a.e(), + T = new a.b(); + u.dragBehavior.onDragObservable.add(function (e) { + if (u.attachedMesh) { + (u.attachedMesh.rotationQuaternion && !l) || (u.attachedMesh.rotationQuaternion = a.b.RotationYawPitchRoll(u.attachedMesh.rotation.y, u.attachedMesh.rotation.x, u.attachedMesh.rotation.z)); + var n = u.attachedMesh.parent; + n && u.attachedMesh.setParent(null); + var r = e.dragPlanePoint.subtract(u.attachedMesh.absolutePosition).normalize(), + o = g.subtract(u.attachedMesh.absolutePosition).normalize(), + s = a.e.Cross(r, o), + c = a.e.Dot(r, o), + h = Math.atan2(s.length(), c); + if ((_.copyFrom(t), v.copyFrom(t), u.updateGizmoRotationToMatchAttachedMesh && (u.attachedMesh.rotationQuaternion.toRotationMatrix(b), (v = a.e.TransformCoordinates(_, b))), i.utilityLayerScene.activeCamera)) { + var d = i.utilityLayerScene.activeCamera.position.subtract(u.attachedMesh.position); + a.e.Dot(d, v) > 0 && (_.scaleInPlace(-1), v.scaleInPlace(-1)); + } + a.e.Dot(v, s) > 0 && (h = -h); + var p = !1; + if (0 != u.snapDistance) + if (((C += h), Math.abs(C) > u.snapDistance)) { + var f = Math.floor(Math.abs(C) / u.snapDistance); + C < 0 && (f *= -1), (C %= u.snapDistance), (h = u.snapDistance * f), (p = !0); + } else h = 0; + P.reset(), u.attachedMesh.parent && (u.attachedMesh.parent.computeWorldMatrix().invertToRef(P), P.getRotationMatrixToRef(P), a.e.TransformCoordinatesToRef(_, P, _)); + var m = Math.sin(h / 2); + T.set(_.x * m, _.y * m, _.z * m, Math.cos(h / 2)), + P.determinant() > 0 && (T.toEulerAnglesToRef(x), a.b.RotationYawPitchRollToRef(x.y, -x.x, -x.z, T)), + u.updateGizmoRotationToMatchAttachedMesh + ? u.attachedMesh.rotationQuaternion.multiplyToRef(T, u.attachedMesh.rotationQuaternion) + : T.multiplyToRef(u.attachedMesh.rotationQuaternion, u.attachedMesh.rotationQuaternion), + l && (u.attachedMesh.rotationQuaternion.toEulerAnglesToRef(x), (u.attachedMesh.rotationQuaternion = null), u.attachedMesh.rotation.copyFrom(x)), + g.copyFrom(e.dragPlanePoint), + p && ((y.snapDistance = h), u.onSnapObservable.notifyObservers(y)), + n && u.attachedMesh.setParent(n); + } + }), + (u._pointerObserver = i.utilityLayerScene.onPointerObservable.add(function (e) { + if (!u._customMeshSet) { + var t = e.pickInfo && -1 != u._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh) ? d : h; + u._rootMesh.getChildMeshes().forEach(function (e) { + (e.material = t), e.color && (e.color = t.diffuseColor); + }); + } + })); + var S = i._getSharedGizmoLight(); + return (S.includedOnlyMeshes = S.includedOnlyMeshes.concat(u._rootMesh.getChildMeshes(!1))), u; + } + return ( + Object(h.d)(t, e), + (t.prototype._attachedMeshChanged = function (e) { + this.dragBehavior && (this.dragBehavior.enabled = !!e); + }), + Object.defineProperty(t.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + (this._isEnabled = e), e ? this._parent && (this.attachedMesh = this._parent.attachedMesh) : (this.attachedMesh = null); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + this.onSnapObservable.clear(), this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver), this.dragBehavior.detach(), e.prototype.dispose.call(this); + }), + t + ); + })(li), + hr = (function (e) { + function t(t, n, i) { + void 0 === t && (t = ci.a.DefaultUtilityLayer), void 0 === n && (n = 32), void 0 === i && (i = !1); + var r = e.call(this, t) || this; + return ( + (r.onDragStartObservable = new o.c()), + (r.onDragEndObservable = new o.c()), + (r.xGizmo = new ur(new a.e(1, 0, 0), s.a.Red().scale(0.5), t, n, r, i)), + (r.yGizmo = new ur(new a.e(0, 1, 0), s.a.Green().scale(0.5), t, n, r, i)), + (r.zGizmo = new ur(new a.e(0, 0, 1), s.a.Blue().scale(0.5), t, n, r, i)), + [r.xGizmo, r.yGizmo, r.zGizmo].forEach(function (e) { + e.dragBehavior.onDragStartObservable.add(function () { + r.onDragStartObservable.notifyObservers({}); + }), + e.dragBehavior.onDragEndObservable.add(function () { + r.onDragEndObservable.notifyObservers({}); + }); + }), + (r.attachedMesh = null), + r + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "attachedMesh", { + get: function () { + return this._meshAttached; + }, + set: function (e) { + (this._meshAttached = e), + [this.xGizmo, this.yGizmo, this.zGizmo].forEach(function (t) { + t.isEnabled ? (t.attachedMesh = e) : (t.attachedMesh = null); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "updateGizmoRotationToMatchAttachedMesh", { + get: function () { + return this.xGizmo.updateGizmoRotationToMatchAttachedMesh; + }, + set: function (e) { + this.xGizmo && ((this.xGizmo.updateGizmoRotationToMatchAttachedMesh = e), (this.yGizmo.updateGizmoRotationToMatchAttachedMesh = e), (this.zGizmo.updateGizmoRotationToMatchAttachedMesh = e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "snapDistance", { + get: function () { + return this.xGizmo.snapDistance; + }, + set: function (e) { + this.xGizmo && ((this.xGizmo.snapDistance = e), (this.yGizmo.snapDistance = e), (this.zGizmo.snapDistance = e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "scaleRatio", { + get: function () { + return this.xGizmo.scaleRatio; + }, + set: function (e) { + this.xGizmo && ((this.xGizmo.scaleRatio = e), (this.yGizmo.scaleRatio = e), (this.zGizmo.scaleRatio = e)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + this.xGizmo.dispose(), this.yGizmo.dispose(), this.zGizmo.dispose(), this.onDragStartObservable.clear(), this.onDragEndObservable.clear(); + }), + (t.prototype.setCustomMesh = function (e) { + g.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)"); + }), + t + ); + })(li), + dr = (function (e) { + function t(n, i, r, c) { + void 0 === i && (i = s.a.Gray()), void 0 === r && (r = ci.a.DefaultUtilityLayer), void 0 === c && (c = null); + var l = e.call(this, r) || this; + (l._pointerObserver = null), + (l.snapDistance = 0), + (l.onSnapObservable = new o.c()), + (l._isEnabled = !1), + (l._parent = null), + (l._parent = c), + (l._coloredMaterial = new Mn.a("", r.utilityLayerScene)), + (l._coloredMaterial.diffuseColor = i), + (l._coloredMaterial.specularColor = i.subtract(new s.a(0.1, 0.1, 0.1))), + (l._hoverMaterial = new Mn.a("", r.utilityLayerScene)), + (l._hoverMaterial.diffuseColor = i.add(new s.a(0.3, 0.3, 0.3))), + (l._plane = t._CreatePlane(r.utilityLayerScene, l._coloredMaterial)), + l._plane.lookAt(l._rootMesh.position.add(n)), + l._plane.scaling.scaleInPlace(1 / 3), + (l._plane.parent = l._rootMesh); + var u = 0, + h = new a.e(), + d = { snapDistance: 0 }; + (l.dragBehavior = new Fe({ dragPlaneNormal: n })), (l.dragBehavior.moveAttached = !1), l._rootMesh.addBehavior(l.dragBehavior); + var p = new a.e(), + f = new a.a(); + l.dragBehavior.onDragObservable.add(function (e) { + if (l.attachedMesh) + if ( + (l.attachedMesh.parent ? (l.attachedMesh.parent.computeWorldMatrix().invertToRef(f), f.setTranslationFromFloats(0, 0, 0), a.e.TransformCoordinatesToRef(e.delta, f, p)) : p.copyFrom(e.delta), + 0 == l.snapDistance) + ) + l.attachedMesh.position.addInPlace(p); + else if (((u += e.dragDistance), Math.abs(u) > l.snapDistance)) { + var t = Math.floor(Math.abs(u) / l.snapDistance); + (u %= l.snapDistance), p.normalizeToRef(h), h.scaleInPlace(l.snapDistance * t), l.attachedMesh.position.addInPlace(h), (d.snapDistance = l.snapDistance * t), l.onSnapObservable.notifyObservers(d); + } + }), + (l._pointerObserver = r.utilityLayerScene.onPointerObservable.add(function (e) { + if (!l._customMeshSet) { + var t = e.pickInfo && -1 != l._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh) ? l._hoverMaterial : l._coloredMaterial; + l._rootMesh.getChildMeshes().forEach(function (e) { + e.material = t; + }); + } + })); + var m = r._getSharedGizmoLight(); + return (m.includedOnlyMeshes = m.includedOnlyMeshes.concat(l._rootMesh.getChildMeshes(!1))), l; + } + return ( + Object(h.d)(t, e), + (t._CreatePlane = function (e, t) { + var n = new si.a("plane", e), + i = Le.a.CreatePlane("dragPlane", { width: 0.1375, height: 0.1375, sideOrientation: 2 }, e); + return (i.material = t), (i.parent = n), (i.material = t), n; + }), + (t._CreateArrowInstance = function (e, t) { + for (var n = new si.a("arrow", e), i = 0, r = t.getChildMeshes(); i < r.length; i++) { + var o = r[i]; + o.createInstance(o.name).parent = n; + } + return n; + }), + (t.prototype._attachedMeshChanged = function (e) { + this.dragBehavior && (this.dragBehavior.enabled = !!e); + }), + Object.defineProperty(t.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + (this._isEnabled = e), e ? this._parent && (this.attachedMesh = this._parent.attachedMesh) : (this.attachedMesh = null); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + this.onSnapObservable.clear(), + this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver), + this.dragBehavior.detach(), + e.prototype.dispose.call(this), + this._plane && this._plane.dispose(), + [this._coloredMaterial, this._hoverMaterial].forEach(function (e) { + e && e.dispose(); + }); + }), + t + ); + })(li), + pr = (function (e) { + function t(t) { + void 0 === t && (t = ci.a.DefaultUtilityLayer); + var n = e.call(this, t) || this; + return ( + (n._meshAttached = null), + (n.onDragStartObservable = new o.c()), + (n.onDragEndObservable = new o.c()), + (n._planarGizmoEnabled = !1), + (n.xGizmo = new ui(new a.e(1, 0, 0), s.a.Red().scale(0.5), t, n)), + (n.yGizmo = new ui(new a.e(0, 1, 0), s.a.Green().scale(0.5), t, n)), + (n.zGizmo = new ui(new a.e(0, 0, 1), s.a.Blue().scale(0.5), t, n)), + (n.xPlaneGizmo = new dr(new a.e(1, 0, 0), s.a.Red().scale(0.5), n.gizmoLayer, n)), + (n.yPlaneGizmo = new dr(new a.e(0, 1, 0), s.a.Green().scale(0.5), n.gizmoLayer, n)), + (n.zPlaneGizmo = new dr(new a.e(0, 0, 1), s.a.Blue().scale(0.5), n.gizmoLayer, n)), + [n.xGizmo, n.yGizmo, n.zGizmo, n.xPlaneGizmo, n.yPlaneGizmo, n.zPlaneGizmo].forEach(function (e) { + e.dragBehavior.onDragStartObservable.add(function () { + n.onDragStartObservable.notifyObservers({}); + }), + e.dragBehavior.onDragEndObservable.add(function () { + n.onDragEndObservable.notifyObservers({}); + }); + }), + (n.attachedMesh = null), + n + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "attachedMesh", { + get: function () { + return this._meshAttached; + }, + set: function (e) { + (this._meshAttached = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (t) { + t.isEnabled ? (t.attachedMesh = e) : (t.attachedMesh = null); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "planarGizmoEnabled", { + get: function () { + return this._planarGizmoEnabled; + }, + set: function (e) { + var t = this; + (this._planarGizmoEnabled = e), + [this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (n) { + n && ((n.isEnabled = e), e && (n.attachedMesh = t.attachedMesh)); + }, this); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "updateGizmoRotationToMatchAttachedMesh", { + get: function () { + return this._updateGizmoRotationToMatchAttachedMesh; + }, + set: function (e) { + (this._updateGizmoRotationToMatchAttachedMesh = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (t) { + t && (t.updateGizmoRotationToMatchAttachedMesh = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "snapDistance", { + get: function () { + return this._snapDistance; + }, + set: function (e) { + (this._snapDistance = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (t) { + t && (t.snapDistance = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "scaleRatio", { + get: function () { + return this._scaleRatio; + }, + set: function (e) { + (this._scaleRatio = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (t) { + t && (t.scaleRatio = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + [this.xGizmo, this.yGizmo, this.zGizmo, this.xPlaneGizmo, this.yPlaneGizmo, this.zPlaneGizmo].forEach(function (e) { + e && e.dispose(); + }), + this.onDragStartObservable.clear(), + this.onDragEndObservable.clear(); + }), + (t.prototype.setCustomMesh = function (e) { + g.a.Error( + "Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo,gizmo.xPlaneGizmo, gizmo.yPlaneGizmo, gizmo.zPlaneGizmo)" + ); + }), + t + ); + })(li); + (Rn.a.CreatePolyhedron = function (e) { + var t = []; + (t[0] = { + vertex: [ + [0, 0, 1.732051], + [1.632993, 0, -0.5773503], + [-0.8164966, 1.414214, -0.5773503], + [-0.8164966, -1.414214, -0.5773503], + ], + face: [ + [0, 1, 2], + [0, 2, 3], + [0, 3, 1], + [1, 3, 2], + ], + }), + (t[1] = { + vertex: [ + [0, 0, 1.414214], + [1.414214, 0, 0], + [0, 1.414214, 0], + [-1.414214, 0, 0], + [0, -1.414214, 0], + [0, 0, -1.414214], + ], + face: [ + [0, 1, 2], + [0, 2, 3], + [0, 3, 4], + [0, 4, 1], + [1, 4, 5], + [1, 5, 2], + [2, 5, 3], + [3, 5, 4], + ], + }), + (t[2] = { + vertex: [ + [0, 0, 1.070466], + [0.7136442, 0, 0.7978784], + [-0.3568221, 0.618034, 0.7978784], + [-0.3568221, -0.618034, 0.7978784], + [0.7978784, 0.618034, 0.3568221], + [0.7978784, -0.618034, 0.3568221], + [-0.9341724, 0.381966, 0.3568221], + [0.1362939, 1, 0.3568221], + [0.1362939, -1, 0.3568221], + [-0.9341724, -0.381966, 0.3568221], + [0.9341724, 0.381966, -0.3568221], + [0.9341724, -0.381966, -0.3568221], + [-0.7978784, 0.618034, -0.3568221], + [-0.1362939, 1, -0.3568221], + [-0.1362939, -1, -0.3568221], + [-0.7978784, -0.618034, -0.3568221], + [0.3568221, 0.618034, -0.7978784], + [0.3568221, -0.618034, -0.7978784], + [-0.7136442, 0, -0.7978784], + [0, 0, -1.070466], + ], + face: [ + [0, 1, 4, 7, 2], + [0, 2, 6, 9, 3], + [0, 3, 8, 5, 1], + [1, 5, 11, 10, 4], + [2, 7, 13, 12, 6], + [3, 9, 15, 14, 8], + [4, 10, 16, 13, 7], + [5, 8, 14, 17, 11], + [6, 12, 18, 15, 9], + [10, 11, 17, 19, 16], + [12, 13, 16, 19, 18], + [14, 15, 18, 19, 17], + ], + }), + (t[3] = { + vertex: [ + [0, 0, 1.175571], + [1.051462, 0, 0.5257311], + [0.3249197, 1, 0.5257311], + [-0.8506508, 0.618034, 0.5257311], + [-0.8506508, -0.618034, 0.5257311], + [0.3249197, -1, 0.5257311], + [0.8506508, 0.618034, -0.5257311], + [0.8506508, -0.618034, -0.5257311], + [-0.3249197, 1, -0.5257311], + [-1.051462, 0, -0.5257311], + [-0.3249197, -1, -0.5257311], + [0, 0, -1.175571], + ], + face: [ + [0, 1, 2], + [0, 2, 3], + [0, 3, 4], + [0, 4, 5], + [0, 5, 1], + [1, 5, 7], + [1, 7, 6], + [1, 6, 2], + [2, 6, 8], + [2, 8, 3], + [3, 8, 9], + [3, 9, 4], + [4, 9, 10], + [4, 10, 5], + [5, 10, 7], + [6, 7, 11], + [6, 11, 8], + [7, 10, 11], + [8, 11, 9], + [9, 11, 10], + ], + }), + (t[4] = { + vertex: [ + [0, 0, 1.070722], + [0.7148135, 0, 0.7971752], + [-0.104682, 0.7071068, 0.7971752], + [-0.6841528, 0.2071068, 0.7971752], + [-0.104682, -0.7071068, 0.7971752], + [0.6101315, 0.7071068, 0.5236279], + [1.04156, 0.2071068, 0.1367736], + [0.6101315, -0.7071068, 0.5236279], + [-0.3574067, 1, 0.1367736], + [-0.7888348, -0.5, 0.5236279], + [-0.9368776, 0.5, 0.1367736], + [-0.3574067, -1, 0.1367736], + [0.3574067, 1, -0.1367736], + [0.9368776, -0.5, -0.1367736], + [0.7888348, 0.5, -0.5236279], + [0.3574067, -1, -0.1367736], + [-0.6101315, 0.7071068, -0.5236279], + [-1.04156, -0.2071068, -0.1367736], + [-0.6101315, -0.7071068, -0.5236279], + [0.104682, 0.7071068, -0.7971752], + [0.6841528, -0.2071068, -0.7971752], + [0.104682, -0.7071068, -0.7971752], + [-0.7148135, 0, -0.7971752], + [0, 0, -1.070722], + ], + face: [ + [0, 2, 3], + [1, 6, 5], + [4, 9, 11], + [7, 15, 13], + [8, 16, 10], + [12, 14, 19], + [17, 22, 18], + [20, 21, 23], + [0, 1, 5, 2], + [0, 3, 9, 4], + [0, 4, 7, 1], + [1, 7, 13, 6], + [2, 5, 12, 8], + [2, 8, 10, 3], + [3, 10, 17, 9], + [4, 11, 15, 7], + [5, 6, 14, 12], + [6, 13, 20, 14], + [8, 12, 19, 16], + [9, 17, 18, 11], + [10, 16, 22, 17], + [11, 18, 21, 15], + [13, 15, 21, 20], + [14, 20, 23, 19], + [16, 19, 23, 22], + [18, 22, 23, 21], + ], + }), + (t[5] = { + vertex: [ + [0, 0, 1.322876], + [1.309307, 0, 0.1889822], + [-0.9819805, 0.8660254, 0.1889822], + [0.1636634, -1.299038, 0.1889822], + [0.3273268, 0.8660254, -0.9449112], + [-0.8183171, -0.4330127, -0.9449112], + ], + face: [ + [0, 3, 1], + [2, 4, 5], + [0, 1, 4, 2], + [0, 2, 5, 3], + [1, 3, 5, 4], + ], + }), + (t[6] = { + vertex: [ + [0, 0, 1.159953], + [1.013464, 0, 0.5642542], + [-0.3501431, 0.9510565, 0.5642542], + [-0.7715208, -0.6571639, 0.5642542], + [0.6633206, 0.9510565, -0.03144481], + [0.8682979, -0.6571639, -0.3996071], + [-1.121664, 0.2938926, -0.03144481], + [-0.2348831, -1.063314, -0.3996071], + [0.5181548, 0.2938926, -0.9953061], + [-0.5850262, -0.112257, -0.9953061], + ], + face: [ + [0, 1, 4, 2], + [0, 2, 6, 3], + [1, 5, 8, 4], + [3, 6, 9, 7], + [5, 7, 9, 8], + [0, 3, 7, 5, 1], + [2, 4, 8, 9, 6], + ], + }), + (t[7] = { + vertex: [ + [0, 0, 1.118034], + [0.8944272, 0, 0.6708204], + [-0.2236068, 0.8660254, 0.6708204], + [-0.7826238, -0.4330127, 0.6708204], + [0.6708204, 0.8660254, 0.2236068], + [1.006231, -0.4330127, -0.2236068], + [-1.006231, 0.4330127, 0.2236068], + [-0.6708204, -0.8660254, -0.2236068], + [0.7826238, 0.4330127, -0.6708204], + [0.2236068, -0.8660254, -0.6708204], + [-0.8944272, 0, -0.6708204], + [0, 0, -1.118034], + ], + face: [ + [0, 1, 4, 2], + [0, 2, 6, 3], + [1, 5, 8, 4], + [3, 6, 10, 7], + [5, 9, 11, 8], + [7, 10, 11, 9], + [0, 3, 7, 9, 5, 1], + [2, 4, 8, 11, 10, 6], + ], + }), + (t[8] = { + vertex: [ + [-0.729665, 0.670121, 0.319155], + [-0.655235, -0.29213, -0.754096], + [-0.093922, -0.607123, 0.537818], + [0.702196, 0.595691, 0.485187], + [0.776626, -0.36656, -0.588064], + ], + face: [ + [1, 4, 2], + [0, 1, 2], + [3, 0, 2], + [4, 3, 2], + [4, 1, 0, 3], + ], + }), + (t[9] = { + vertex: [ + [-0.868849, -0.100041, 0.61257], + [-0.329458, 0.976099, 0.28078], + [-0.26629, -0.013796, -0.477654], + [-0.13392, -1.034115, 0.229829], + [0.738834, 0.707117, -0.307018], + [0.859683, -0.535264, -0.338508], + ], + face: [ + [3, 0, 2], + [5, 3, 2], + [4, 5, 2], + [1, 4, 2], + [0, 1, 2], + [0, 3, 5, 4, 1], + ], + }), + (t[10] = { + vertex: [ + [-0.610389, 0.243975, 0.531213], + [-0.187812, -0.48795, -0.664016], + [-0.187812, 0.9759, -0.664016], + [0.187812, -0.9759, 0.664016], + [0.798201, 0.243975, 0.132803], + ], + face: [ + [1, 3, 0], + [3, 4, 0], + [3, 1, 4], + [0, 2, 1], + [0, 4, 2], + [2, 4, 1], + ], + }), + (t[11] = { + vertex: [ + [-1.028778, 0.392027, -0.048786], + [-0.640503, -0.646161, 0.621837], + [-0.125162, -0.395663, -0.540059], + [0.004683, 0.888447, -0.651988], + [0.125161, 0.395663, 0.540059], + [0.632925, -0.791376, 0.433102], + [1.031672, 0.157063, -0.354165], + ], + face: [ + [3, 2, 0], + [2, 1, 0], + [2, 5, 1], + [0, 4, 3], + [0, 1, 4], + [4, 1, 5], + [2, 3, 6], + [3, 4, 6], + [5, 2, 6], + [4, 5, 6], + ], + }), + (t[12] = { + vertex: [ + [-0.669867, 0.334933, -0.529576], + [-0.669867, 0.334933, 0.529577], + [-0.4043, 1.212901, 0], + [-0.334933, -0.669867, -0.529576], + [-0.334933, -0.669867, 0.529577], + [0.334933, 0.669867, -0.529576], + [0.334933, 0.669867, 0.529577], + [0.4043, -1.212901, 0], + [0.669867, -0.334933, -0.529576], + [0.669867, -0.334933, 0.529577], + ], + face: [ + [8, 9, 7], + [6, 5, 2], + [3, 8, 7], + [5, 0, 2], + [4, 3, 7], + [0, 1, 2], + [9, 4, 7], + [1, 6, 2], + [9, 8, 5, 6], + [8, 3, 0, 5], + [3, 4, 1, 0], + [4, 9, 6, 1], + ], + }), + (t[13] = { + vertex: [ + [-0.931836, 0.219976, -0.264632], + [-0.636706, 0.318353, 0.692816], + [-0.613483, -0.735083, -0.264632], + [-0.326545, 0.979634, 0], + [-0.318353, -0.636706, 0.692816], + [-0.159176, 0.477529, -0.856368], + [0.159176, -0.477529, -0.856368], + [0.318353, 0.636706, 0.692816], + [0.326545, -0.979634, 0], + [0.613482, 0.735082, -0.264632], + [0.636706, -0.318353, 0.692816], + [0.931835, -0.219977, -0.264632], + ], + face: [ + [11, 10, 8], + [7, 9, 3], + [6, 11, 8], + [9, 5, 3], + [2, 6, 8], + [5, 0, 3], + [4, 2, 8], + [0, 1, 3], + [10, 4, 8], + [1, 7, 3], + [10, 11, 9, 7], + [11, 6, 5, 9], + [6, 2, 0, 5], + [2, 4, 1, 0], + [4, 10, 7, 1], + ], + }), + (t[14] = { + vertex: [ + [-0.93465, 0.300459, -0.271185], + [-0.838689, -0.260219, -0.516017], + [-0.711319, 0.717591, 0.128359], + [-0.710334, -0.156922, 0.080946], + [-0.599799, 0.556003, -0.725148], + [-0.503838, -0.004675, -0.969981], + [-0.487004, 0.26021, 0.48049], + [-0.460089, -0.750282, -0.512622], + [-0.376468, 0.973135, -0.325605], + [-0.331735, -0.646985, 0.084342], + [-0.254001, 0.831847, 0.530001], + [-0.125239, -0.494738, -0.966586], + [0.029622, 0.027949, 0.730817], + [0.056536, -0.982543, -0.262295], + [0.08085, 1.087391, 0.076037], + [0.125583, -0.532729, 0.485984], + [0.262625, 0.599586, 0.780328], + [0.391387, -0.726999, -0.716259], + [0.513854, -0.868287, 0.139347], + [0.597475, 0.85513, 0.326364], + [0.641224, 0.109523, 0.783723], + [0.737185, -0.451155, 0.538891], + [0.848705, -0.612742, -0.314616], + [0.976075, 0.365067, 0.32976], + [1.072036, -0.19561, 0.084927], + ], + face: [ + [15, 18, 21], + [12, 20, 16], + [6, 10, 2], + [3, 0, 1], + [9, 7, 13], + [2, 8, 4, 0], + [0, 4, 5, 1], + [1, 5, 11, 7], + [7, 11, 17, 13], + [13, 17, 22, 18], + [18, 22, 24, 21], + [21, 24, 23, 20], + [20, 23, 19, 16], + [16, 19, 14, 10], + [10, 14, 8, 2], + [15, 9, 13, 18], + [12, 15, 21, 20], + [6, 12, 16, 10], + [3, 6, 2, 0], + [9, 3, 1, 7], + [9, 15, 12, 6, 3], + [22, 17, 11, 5, 4, 8, 14, 19, 23, 24], + ], + }); + var n, + i, + r, + o, + c, + l, + u = e.type && (e.type < 0 || e.type >= t.length) ? 0 : e.type || 0, + h = e.size, + d = e.sizeX || h || 1, + p = e.sizeY || h || 1, + f = e.sizeZ || h || 1, + m = e.custom || t[u], + g = m.face.length, + b = e.faceUV || new Array(g), + _ = e.faceColors, + v = void 0 === e.flat || e.flat, + y = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + C = new Array(), + P = new Array(), + x = new Array(), + T = new Array(), + S = new Array(), + O = 0, + E = 0, + M = new Array(), + A = 0, + I = 0; + if (v) for (I = 0; I < g; I++) _ && void 0 === _[I] && (_[I] = new s.b(1, 1, 1, 1)), b && void 0 === b[I] && (b[I] = new a.f(0, 0, 1, 1)); + if (v) + for (I = 0; I < g; I++) { + var D = m.face[I].length; + for (r = (2 * Math.PI) / D, o = 0.5 * Math.tan(r / 2), c = 0.5, A = 0; A < D; A++) + C.push(m.vertex[m.face[I][A]][0] * d, m.vertex[m.face[I][A]][1] * p, m.vertex[m.face[I][A]][2] * f), + M.push(O), + O++, + (n = b[I].x + (b[I].z - b[I].x) * (0.5 + o)), + (i = b[I].y + (b[I].w - b[I].y) * (c - 0.5)), + T.push(n, i), + (l = o * Math.cos(r) - c * Math.sin(r)), + (c = o * Math.sin(r) + c * Math.cos(r)), + (o = l), + _ && S.push(_[I].r, _[I].g, _[I].b, _[I].a); + for (A = 0; A < D - 2; A++) P.push(M[0 + E], M[A + 2 + E], M[A + 1 + E]); + E += D; + } + else { + for (A = 0; A < m.vertex.length; A++) C.push(m.vertex[A][0] * d, m.vertex[A][1] * p, m.vertex[A][2] * f), T.push(0, 0); + for (I = 0; I < g; I++) for (A = 0; A < m.face[I].length - 2; A++) P.push(m.face[I][0], m.face[I][A + 2], m.face[I][A + 1]); + } + Rn.a.ComputeNormals(C, P, x), Rn.a._ComputeSides(y, C, P, x, T, e.frontUVs, e.backUVs); + var R = new Rn.a(); + return (R.positions = C), (R.indices = P), (R.normals = x), (R.uvs = T), _ && v && (R.colors = S), R; + }), + (Ee.a.CreatePolyhedron = function (e, t, n) { + return fr.CreatePolyhedron(e, t, n); + }); + var fr = (function () { + function e() {} + return ( + (e.CreatePolyhedron = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreatePolyhedron(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(), + mr = (function (e) { + function t(t) { + void 0 === t && (t = ci.a.DefaultUtilityLayer); + var n = e.call(this, t) || this; + (n._meshAttached = null), + (n._sensitivity = 1), + (n.onDragStartObservable = new o.c()), + (n.onDragEndObservable = new o.c()), + (n.xGizmo = new cr(new a.e(1, 0, 0), s.a.Red().scale(0.5), t, n)), + (n.yGizmo = new cr(new a.e(0, 1, 0), s.a.Green().scale(0.5), t, n)), + (n.zGizmo = new cr(new a.e(0, 0, 1), s.a.Blue().scale(0.5), t, n)), + (n.uniformScaleGizmo = new cr(new a.e(0, 1, 0), s.a.Yellow().scale(0.5), t, n)), + (n.uniformScaleGizmo.updateGizmoRotationToMatchAttachedMesh = !1), + (n.uniformScaleGizmo.uniformScaling = !0), + (n._uniformScalingMesh = fr.CreatePolyhedron("", { type: 1 }, n.uniformScaleGizmo.gizmoLayer.utilityLayerScene)), + n._uniformScalingMesh.scaling.scaleInPlace(0.02), + (n._uniformScalingMesh.visibility = 0), + (n._octahedron = fr.CreatePolyhedron("", { type: 1 }, n.uniformScaleGizmo.gizmoLayer.utilityLayerScene)), + n._octahedron.scaling.scaleInPlace(0.007), + n._uniformScalingMesh.addChild(n._octahedron), + n.uniformScaleGizmo.setCustomMesh(n._uniformScalingMesh, !0); + var i = t._getSharedGizmoLight(); + return ( + (i.includedOnlyMeshes = i.includedOnlyMeshes.concat(n._octahedron)), + [n.xGizmo, n.yGizmo, n.zGizmo, n.uniformScaleGizmo].forEach(function (e) { + e.dragBehavior.onDragStartObservable.add(function () { + n.onDragStartObservable.notifyObservers({}); + }), + e.dragBehavior.onDragEndObservable.add(function () { + n.onDragEndObservable.notifyObservers({}); + }); + }), + (n.attachedMesh = null), + n + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "attachedMesh", { + get: function () { + return this._meshAttached; + }, + set: function (e) { + (this._meshAttached = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (t) { + t.isEnabled ? (t.attachedMesh = e) : (t.attachedMesh = null); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "updateGizmoRotationToMatchAttachedMesh", { + get: function () { + return this._updateGizmoRotationToMatchAttachedMesh; + }, + set: function (e) { + e + ? ((this._updateGizmoRotationToMatchAttachedMesh = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (t) { + t && (t.updateGizmoRotationToMatchAttachedMesh = e); + })) + : g.a.Warn("Setting updateGizmoRotationToMatchAttachedMesh = false on scaling gizmo is not supported."); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "snapDistance", { + get: function () { + return this._snapDistance; + }, + set: function (e) { + (this._snapDistance = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (t) { + t && (t.snapDistance = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "scaleRatio", { + get: function () { + return this._scaleRatio; + }, + set: function (e) { + (this._scaleRatio = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (t) { + t && (t.scaleRatio = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "sensitivity", { + get: function () { + return this._sensitivity; + }, + set: function (e) { + (this._sensitivity = e), + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (t) { + t && (t.sensitivity = e); + }); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function () { + [this.xGizmo, this.yGizmo, this.zGizmo, this.uniformScaleGizmo].forEach(function (e) { + e && e.dispose(); + }), + this.onDragStartObservable.clear(), + this.onDragEndObservable.clear(), + [this._uniformScalingMesh, this._octahedron].forEach(function (e) { + e && e.dispose(); + }); + }), + t + ); + })(li), + gr = (function () { + function e(e) { + var t = this; + (this.scene = e), + (this.clearGizmoOnEmptyPointerEvent = !1), + (this.onAttachedToMeshObservable = new o.c()), + (this._gizmosEnabled = { positionGizmo: !1, rotationGizmo: !1, scaleGizmo: !1, boundingBoxGizmo: !1 }), + (this._pointerObserver = null), + (this._attachedMesh = null), + (this._boundingBoxColor = s.a.FromHexString("#0984e3")), + (this.boundingBoxDragBehavior = new ze()), + (this.attachableMeshes = null), + (this.usePointerToAttachGizmos = !0), + (this._defaultKeepDepthUtilityLayer = new ci.a(e)), + (this._defaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil = !1), + (this._defaultUtilityLayer = new ci.a(e)), + (this.gizmos = { positionGizmo: null, rotationGizmo: null, scaleGizmo: null, boundingBoxGizmo: null }), + (this._pointerObserver = e.onPointerObservable.add(function (e) { + if (t.usePointerToAttachGizmos && e.type == ye.a.POINTERDOWN) + if (e.pickInfo && e.pickInfo.pickedMesh) { + var n = e.pickInfo.pickedMesh; + if (null == t.attachableMeshes) for (; n && null != n.parent; ) n = n.parent; + else { + var i = !1; + t.attachableMeshes.forEach(function (e) { + n && (n == e || n.isDescendantOf(e)) && ((n = e), (i = !0)); + }), + i || (n = null); + } + n instanceof ke.a ? t._attachedMesh != n && t.attachToMesh(n) : t.clearGizmoOnEmptyPointerEvent && t.attachToMesh(null); + } else t.clearGizmoOnEmptyPointerEvent && t.attachToMesh(null); + })); + } + return ( + Object.defineProperty(e.prototype, "keepDepthUtilityLayer", { + get: function () { + return this._defaultKeepDepthUtilityLayer; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "utilityLayer", { + get: function () { + return this._defaultUtilityLayer; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attachToMesh = function (e) { + for (var t in (this._attachedMesh && this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior), (this._attachedMesh = e), this.gizmos)) { + var n = this.gizmos[t]; + n && this._gizmosEnabled[t] && (n.attachedMesh = e); + } + this.boundingBoxGizmoEnabled && this._attachedMesh && this._attachedMesh.addBehavior(this.boundingBoxDragBehavior), this.onAttachedToMeshObservable.notifyObservers(e); + }), + Object.defineProperty(e.prototype, "positionGizmoEnabled", { + get: function () { + return this._gizmosEnabled.positionGizmo; + }, + set: function (e) { + e + ? (this.gizmos.positionGizmo || (this.gizmos.positionGizmo = new pr(this._defaultUtilityLayer)), (this.gizmos.positionGizmo.attachedMesh = this._attachedMesh)) + : this.gizmos.positionGizmo && (this.gizmos.positionGizmo.attachedMesh = null), + (this._gizmosEnabled.positionGizmo = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rotationGizmoEnabled", { + get: function () { + return this._gizmosEnabled.rotationGizmo; + }, + set: function (e) { + e + ? (this.gizmos.rotationGizmo || (this.gizmos.rotationGizmo = new hr(this._defaultUtilityLayer)), (this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh)) + : this.gizmos.rotationGizmo && (this.gizmos.rotationGizmo.attachedMesh = null), + (this._gizmosEnabled.rotationGizmo = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "scaleGizmoEnabled", { + get: function () { + return this._gizmosEnabled.scaleGizmo; + }, + set: function (e) { + e + ? ((this.gizmos.scaleGizmo = this.gizmos.scaleGizmo || new mr(this._defaultUtilityLayer)), (this.gizmos.scaleGizmo.attachedMesh = this._attachedMesh)) + : this.gizmos.scaleGizmo && (this.gizmos.scaleGizmo.attachedMesh = null), + (this._gizmosEnabled.scaleGizmo = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "boundingBoxGizmoEnabled", { + get: function () { + return this._gizmosEnabled.boundingBoxGizmo; + }, + set: function (e) { + e + ? ((this.gizmos.boundingBoxGizmo = this.gizmos.boundingBoxGizmo || new lr(this._boundingBoxColor, this._defaultKeepDepthUtilityLayer)), + (this.gizmos.boundingBoxGizmo.attachedMesh = this._attachedMesh), + this._attachedMesh && (this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior), this._attachedMesh.addBehavior(this.boundingBoxDragBehavior))) + : this.gizmos.boundingBoxGizmo && (this._attachedMesh && this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior), (this.gizmos.boundingBoxGizmo.attachedMesh = null)), + (this._gizmosEnabled.boundingBoxGizmo = e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + for (var e in (this.scene.onPointerObservable.remove(this._pointerObserver), this.gizmos)) { + var t = this.gizmos[e]; + t && t.dispose(); + } + this._defaultKeepDepthUtilityLayer.dispose(), this._defaultUtilityLayer.dispose(), this.boundingBoxDragBehavior.detach(), this.onAttachedToMeshObservable.clear(); + }), + e + ); + })(), + br = n(115); + Ee.a.CreateHemisphere = function (e, t, n, i) { + var r = { segments: t, diameter: n }; + return _r.CreateHemisphere(e, r, i); + }; + var _r = (function () { + function e() {} + return ( + (e.CreateHemisphere = function (e, t, n) { + t.diameter || (t.diameter = 1), t.segments || (t.segments = 16); + var i = mi.CreateSphere("", { slice: 0.5, diameter: t.diameter, segments: t.segments }, n), + r = Ee.a.CreateDisc("", t.diameter / 2, 3 * t.segments + (4 - t.segments), n); + (r.rotation.x = -Math.PI / 2), (r.parent = i); + var o = Ee.a.MergeMeshes([r, i], !0); + return (o.name = e), o; + }), + e + ); + })(), + vr = n(122), + yr = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return ( + (n._cachedPosition = new a.e()), + (n._cachedForward = new a.e(0, 0, 1)), + (n._light = null), + (n.attachedMesh = new ke.a("", n.gizmoLayer.utilityLayerScene)), + (n._attachedMeshParent = new si.a("parent", n.gizmoLayer.originalScene)), + (n.attachedMesh.parent = n._attachedMeshParent), + (n._material = new Mn.a("light", n.gizmoLayer.originalScene)), + (n._material.diffuseColor = new s.a(0.5, 0.5, 0.5)), + (n._material.specularColor = new s.a(0.1, 0.1, 0.1)), + n + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "light", { + get: function () { + return this._light; + }, + set: function (e) { + var n = this; + if (((this._light = e), e)) { + this._lightMesh && this._lightMesh.dispose(), + e instanceof xn.a + ? (this._lightMesh = t._CreateHemisphericLightMesh(this.gizmoLayer.utilityLayerScene)) + : e instanceof br.a + ? (this._lightMesh = t._CreateDirectionalLightMesh(this.gizmoLayer.utilityLayerScene)) + : e instanceof vr.a + ? (this._lightMesh = t._CreateSpotLightMesh(this.gizmoLayer.utilityLayerScene)) + : (this._lightMesh = t._CreatePointLightMesh(this.gizmoLayer.utilityLayerScene)), + this._lightMesh.getChildMeshes(!1).forEach(function (e) { + e.material = n._material; + }), + (this._lightMesh.parent = this._rootMesh); + var i = this.gizmoLayer._getSharedGizmoLight(); + (i.includedOnlyMeshes = i.includedOnlyMeshes.concat(this._lightMesh.getChildMeshes(!1))), + (this._lightMesh.rotationQuaternion = new a.b()), + this.attachedMesh.reservedDataStore || (this.attachedMesh.reservedDataStore = {}), + (this.attachedMesh.reservedDataStore.lightGizmo = this), + e.parent && this._attachedMeshParent.freezeWorldMatrix(e.parent.getWorldMatrix()), + e.position && (this.attachedMesh.position.copyFrom(e.position), this.attachedMesh.computeWorldMatrix(!0), this._cachedPosition.copyFrom(this.attachedMesh.position)), + e.direction && (this.attachedMesh.setDirection(e.direction), this.attachedMesh.computeWorldMatrix(!0), this._cachedForward.copyFrom(this.attachedMesh.forward)), + this._update(); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "material", { + get: function () { + return this._material; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._update = function () { + e.prototype._update.call(this), + this._light && + (this._light.parent && this._attachedMeshParent.freezeWorldMatrix(this._light.parent.getWorldMatrix()), + this._light.position && + (this.attachedMesh.position.equals(this._cachedPosition) + ? (this.attachedMesh.position.copyFrom(this._light.position), this.attachedMesh.computeWorldMatrix(!0), this._cachedPosition.copyFrom(this.attachedMesh.position)) + : (this._light.position.copyFrom(this.attachedMesh.position), this._cachedPosition.copyFrom(this.attachedMesh.position))), + this._light.direction && + (a.e.DistanceSquared(this.attachedMesh.forward, this._cachedForward) > 1e-4 + ? (this._light.direction.copyFrom(this.attachedMesh.forward), this._cachedForward.copyFrom(this.attachedMesh.forward)) + : a.e.DistanceSquared(this.attachedMesh.forward, this._light.direction) > 1e-4 && + (this.attachedMesh.setDirection(this._light.direction), this.attachedMesh.computeWorldMatrix(!0), this._cachedForward.copyFrom(this.attachedMesh.forward))), + this._light.isEnabled() ? this._material.diffuseColor.set(this._light.diffuse.r / 3, this._light.diffuse.g / 3, this._light.diffuse.b / 3) : this._material.diffuseColor.set(0, 0, 0)); + }), + (t.prototype.dispose = function () { + this._material.dispose(), e.prototype.dispose.call(this), this._attachedMeshParent.dispose(); + }), + (t._CreateHemisphericLightMesh = function (e) { + var n = new Ee.a("hemisphereLight", e), + i = _r.CreateHemisphere(n.name, { segments: 10, diameter: 1 }, e); + (i.position.z = -0.15), (i.rotation.x = Math.PI / 2), (i.parent = n); + var r = this._CreateLightLines(3, e); + return (r.parent = n), r.position.z, n.scaling.scaleInPlace(t._Scale), (n.rotation.x = Math.PI / 2), n; + }), + (t._CreatePointLightMesh = function (e) { + var n = new Ee.a("pointLight", e), + i = mi.CreateSphere(n.name, { segments: 10, diameter: 1 }, e); + return (i.rotation.x = Math.PI / 2), (i.parent = n), (this._CreateLightLines(5, e).parent = n), n.scaling.scaleInPlace(t._Scale), (n.rotation.x = Math.PI / 2), n; + }), + (t._CreateSpotLightMesh = function (e) { + var n = new Ee.a("spotLight", e); + mi.CreateSphere(n.name, { segments: 10, diameter: 1 }, e).parent = n; + var i = _r.CreateHemisphere(n.name, { segments: 10, diameter: 2 }, e); + return (i.parent = n), (i.rotation.x = -Math.PI / 2), (this._CreateLightLines(2, e).parent = n), n.scaling.scaleInPlace(t._Scale), (n.rotation.x = Math.PI / 2), n; + }), + (t._CreateDirectionalLightMesh = function (e) { + var n = new Ee.a("directionalLight", e), + i = new Ee.a(n.name, e); + (i.parent = n), (mi.CreateSphere(n.name, { diameter: 1.2, segments: 10 }, e).parent = i); + var r = Ee.a.CreateCylinder(n.name, 6, 0.3, 0.3, 6, 1, e); + (r.parent = i), ((o = r.clone(n.name)).scaling.y = 0.5), (o.position.x += 1.25), ((a = r.clone(n.name)).scaling.y = 0.5), (a.position.x += -1.25); + var o, + a, + s = Ee.a.CreateCylinder(n.name, 1, 0, 0.6, 6, 1, e); + return ( + (s.position.y += 3), + (s.parent = i), + ((o = s.clone(n.name)).position.y = 1.5), + (o.position.x += 1.25), + ((a = s.clone(n.name)).position.y = 1.5), + (a.position.x += -1.25), + i.scaling.scaleInPlace(t._Scale), + (i.rotation.z = Math.PI / 2), + (i.rotation.y = Math.PI / 2), + n + ); + }), + (t._Scale = 0.007), + (t._CreateLightLines = function (e, t) { + var n = new Ee.a("root", t); + n.rotation.x = Math.PI / 2; + var i = new Ee.a("linePivot", t); + i.parent = n; + var r = Ee.a.CreateCylinder("line", 2, 0.2, 0.3, 6, 1, t); + if (((r.position.y = r.scaling.y / 2 + 1.2), (r.parent = i), e < 2)) return i; + for (var o = 0; o < 4; o++) { + ((a = i.clone("lineParentClone")).rotation.z = Math.PI / 4), + (a.rotation.y = Math.PI / 2 + (Math.PI / 2) * o), + (a.getChildMeshes()[0].scaling.y = 0.5), + (a.getChildMeshes()[0].scaling.x = a.getChildMeshes()[0].scaling.z = 0.8), + (a.getChildMeshes()[0].position.y = a.getChildMeshes()[0].scaling.y / 2 + 1.2); + } + if (e < 3) return n; + for (o = 0; o < 4; o++) { + ((a = i.clone("linePivotClone")).rotation.z = Math.PI / 2), (a.rotation.y = (Math.PI / 2) * o); + } + if (e < 4) return n; + for (o = 0; o < 4; o++) { + var a; + ((a = i.clone("linePivotClone")).rotation.z = Math.PI + Math.PI / 4), + (a.rotation.y = Math.PI / 2 + (Math.PI / 2) * o), + (a.getChildMeshes()[0].scaling.y = 0.5), + (a.getChildMeshes()[0].scaling.x = a.getChildMeshes()[0].scaling.z = 0.8), + (a.getChildMeshes()[0].position.y = a.getChildMeshes()[0].scaling.y / 2 + 1.2); + } + return e < 5 || ((a = i.clone("linePivotClone")).rotation.z = Math.PI), n; + }), + t + ); + })(li), + Cr = n(68); + Xt.a.IncludesShadersStore.kernelBlurVaryingDeclaration = "varying vec2 sampleCoord{X};"; + var Pr = + "vec4 pack(float depth)\n{\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\nvec4 res=fract(depth*bit_shift);\nres-=res.xxyz*bit_mask;\nreturn res;\n}\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\nreturn dot(color,bit_shift);\n}"; + Xt.a.IncludesShadersStore.packingFunctions = Pr; + var xr = + "#ifdef DOF\nfactor=sampleCoC(sampleCoord{X});\ncomputedWeight=KERNEL_WEIGHT{X}*factor;\nsumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;\n#endif"; + Xt.a.IncludesShadersStore.kernelBlurFragment = xr; + var Tr = + "#ifdef DOF\nfactor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});\ncomputedWeight=KERNEL_DEP_WEIGHT{X}*factor;\nsumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;\n#endif"; + Xt.a.IncludesShadersStore.kernelBlurFragment2 = Tr; + var Sr = + "\nuniform sampler2D textureSampler;\nuniform vec2 delta;\n\nvarying vec2 sampleCenter;\n#ifdef DOF\nuniform sampler2D circleOfConfusionSampler;\nuniform vec2 cameraMinMaxZ;\nfloat sampleDistance(const in vec2 offset) {\nfloat depth=texture2D(circleOfConfusionSampler,offset).g;\nreturn cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth;\n}\nfloat sampleCoC(const in vec2 offset) {\nfloat coc=texture2D(circleOfConfusionSampler,offset).r;\nreturn coc;\n}\n#endif\n#include[0..varyingCount]\n#ifdef PACKEDFLOAT\n#include\n#endif\nvoid main(void)\n{\nfloat computedWeight=0.0;\n#ifdef PACKEDFLOAT\nfloat blend=0.;\n#else\nvec4 blend=vec4(0.);\n#endif\n#ifdef DOF\nfloat sumOfWeights=CENTER_WEIGHT;\nfloat factor=0.0;\n\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;\n#else\nblend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;\n#endif\n#endif\n#include[0..varyingCount]\n#include[0..depCount]\n#ifdef PACKEDFLOAT\ngl_FragColor=pack(blend);\n#else\ngl_FragColor=blend;\n#endif\n#ifdef DOF\ngl_FragColor/=sumOfWeights;\n#endif\n}"; + Xt.a.ShadersStore.kernelBlurPixelShader = Sr; + Xt.a.IncludesShadersStore.kernelBlurVertex = "sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};"; + var Or = + "\nattribute vec2 position;\n\nuniform vec2 delta;\n\nvarying vec2 sampleCenter;\n#include[0..varyingCount]\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nsampleCenter=(position*madd+madd);\n#include[0..varyingCount]\ngl_Position=vec4(position,0.0,1.0);\n}"; + Xt.a.ShadersStore.kernelBlurVertexShader = Or; + var Er = (function (e) { + function t(t, n, i, r, o, a, s, c, l, u, h) { + void 0 === a && (a = ln.a.BILINEAR_SAMPLINGMODE), void 0 === l && (l = 0), void 0 === u && (u = ""), void 0 === h && (h = !1); + var d = e.call(this, t, "kernelBlur", ["delta", "direction", "cameraMinMaxZ"], ["circleOfConfusionSampler"], r, o, a, s, c, null, l, "kernelBlur", { varyingCount: 0, depCount: 0 }, !0) || this; + return ( + (d.direction = n), + (d.blockCompilation = h), + (d._packedFloat = !1), + (d._staticDefines = ""), + (d._staticDefines = u), + d.onApplyObservable.add(function (e) { + d._outputTexture + ? e.setFloat2("delta", (1 / d._outputTexture.width) * d.direction.x, (1 / d._outputTexture.height) * d.direction.y) + : e.setFloat2("delta", (1 / d.width) * d.direction.x, (1 / d.height) * d.direction.y); + }), + (d.kernel = i), + d + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "kernel", { + get: function () { + return this._idealKernel; + }, + set: function (e) { + this._idealKernel !== e && ((e = Math.max(e, 1)), (this._idealKernel = e), (this._kernel = this._nearestBestKernel(e)), this.blockCompilation || this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "packedFloat", { + get: function () { + return this._packedFloat; + }, + set: function (e) { + this._packedFloat !== e && ((this._packedFloat = e), this.blockCompilation || this._updateParameters()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.updateEffect = function (e, t, n, i, r, o) { + void 0 === e && (e = null), void 0 === t && (t = null), void 0 === n && (n = null), this._updateParameters(r, o); + }), + (t.prototype._updateParameters = function (t, n) { + for (var i = this._kernel, r = (i - 1) / 2, o = [], a = [], s = 0, c = 0; c < i; c++) { + var l = c / (i - 1), + u = this._gaussianWeight(2 * l - 1); + (o[c] = c - r), (a[c] = u), (s += u); + } + for (c = 0; c < a.length; c++) a[c] /= s; + var h = [], + d = [], + p = []; + for (c = 0; c <= r; c += 2) { + var f = Math.min(c + 1, Math.floor(r)); + if (c === f) p.push({ o: o[c], w: a[c] }); + else { + var m = f === r, + g = a[c] + a[f] * (m ? 0.5 : 1), + b = o[c] + 1 / (1 + a[c] / a[f]); + 0 === b ? (p.push({ o: o[c], w: a[c] }), p.push({ o: o[c + 1], w: a[c + 1] })) : (p.push({ o: b, w: g }), p.push({ o: -b, w: g })); + } + } + for (c = 0; c < p.length; c++) (d[c] = p[c].o), (h[c] = p[c].w); + (o = d), (a = h); + var _ = this.getEngine().getCaps().maxVaryingVectors, + v = Math.max(_, 0) - 1, + y = Math.min(o.length, v), + C = ""; + (C += this._staticDefines), -1 != this._staticDefines.indexOf("DOF") && ((C += "#define CENTER_WEIGHT " + this._glslFloat(a[y - 1]) + "\r\n"), y--); + for (c = 0; c < y; c++) (C += "#define KERNEL_OFFSET" + c + " " + this._glslFloat(o[c]) + "\r\n"), (C += "#define KERNEL_WEIGHT" + c + " " + this._glslFloat(a[c]) + "\r\n"); + var P = 0; + for (c = v; c < o.length; c++) (C += "#define KERNEL_DEP_OFFSET" + P + " " + this._glslFloat(o[c]) + "\r\n"), (C += "#define KERNEL_DEP_WEIGHT" + P + " " + this._glslFloat(a[c]) + "\r\n"), P++; + this.packedFloat && (C += "#define PACKEDFLOAT 1"), (this.blockCompilation = !1), e.prototype.updateEffect.call(this, C, null, null, { varyingCount: y, depCount: P }, t, n); + }), + (t.prototype._nearestBestKernel = function (e) { + for (var t = Math.round(e), n = 0, i = [t, t - 1, t + 1, t - 2, t + 2]; n < i.length; n++) { + var r = i[n]; + if (r % 2 != 0 && Math.floor(r / 2) % 2 == 0 && r > 0) return Math.max(r, 3); + } + return Math.max(t, 3); + }), + (t.prototype._gaussianWeight = function (e) { + var t = (-e * e) / ((1 / 3) * 2 * (1 / 3)); + return (1 / (Math.sqrt(2 * Math.PI) * (1 / 3))) * Math.exp(t); + }), + (t.prototype._glslFloat = function (e, t) { + return void 0 === t && (t = 8), e.toFixed(t).replace(/0+$/, ""); + }), + t + ); + })(Wt.a), + Mr = (function (e) { + function t(t, n, i, r, o, s, c) { + void 0 === o && (o = 0), void 0 === s && (s = ln.a.BILINEAR_SAMPLINGMODE), void 0 === c && (c = !0); + var l = e.call(this, t, n, i, r, !0, o, !1, s, c) || this; + return ( + (l.scene = i), + (l.mirrorPlane = new Zn.a(0, 1, 0, 1)), + (l._transformMatrix = a.a.Zero()), + (l._mirrorMatrix = a.a.Zero()), + (l._adaptiveBlurKernel = 0), + (l._blurKernelX = 0), + (l._blurKernelY = 0), + (l._blurRatio = 1), + (l.ignoreCameraViewport = !0), + l._updateGammaSpace(), + (l._imageProcessingConfigChangeObserver = i.imageProcessingConfiguration.onUpdateParameters.add(function () { + l._updateGammaSpace; + })), + l.onBeforeRenderObservable.add(function () { + a.a.ReflectionToRef(l.mirrorPlane, l._mirrorMatrix), + (l._savedViewMatrix = i.getViewMatrix()), + l._mirrorMatrix.multiplyToRef(l._savedViewMatrix, l._transformMatrix), + i.setTransformMatrix(l._transformMatrix, i.getProjectionMatrix()), + (i.clipPlane = l.mirrorPlane), + (i.getEngine().cullBackFaces = !1), + (i._mirroredCameraPosition = a.e.TransformCoordinates(i.activeCamera.globalPosition, l._mirrorMatrix)); + }), + l.onAfterRenderObservable.add(function () { + i.setTransformMatrix(l._savedViewMatrix, i.getProjectionMatrix()), (i.getEngine().cullBackFaces = !0), (i._mirroredCameraPosition = null), (i.clipPlane = null); + }), + l + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "blurRatio", { + get: function () { + return this._blurRatio; + }, + set: function (e) { + this._blurRatio !== e && ((this._blurRatio = e), this._preparePostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "adaptiveBlurKernel", { + set: function (e) { + (this._adaptiveBlurKernel = e), this._autoComputeBlurKernel(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "blurKernel", { + set: function (e) { + (this.blurKernelX = e), (this.blurKernelY = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "blurKernelX", { + get: function () { + return this._blurKernelX; + }, + set: function (e) { + this._blurKernelX !== e && ((this._blurKernelX = e), this._preparePostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "blurKernelY", { + get: function () { + return this._blurKernelY; + }, + set: function (e) { + this._blurKernelY !== e && ((this._blurKernelY = e), this._preparePostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._autoComputeBlurKernel = function () { + var e = this.getScene().getEngine(), + t = this.getRenderWidth() / e.getRenderWidth(), + n = this.getRenderHeight() / e.getRenderHeight(); + (this.blurKernelX = this._adaptiveBlurKernel * t), (this.blurKernelY = this._adaptiveBlurKernel * n); + }), + (t.prototype._onRatioRescale = function () { + this._sizeRatio && (this.resize(this._initialSizeParameter), this._adaptiveBlurKernel || this._preparePostProcesses()), this._adaptiveBlurKernel && this._autoComputeBlurKernel(); + }), + (t.prototype._updateGammaSpace = function () { + this.gammaSpace = !this.scene.imageProcessingConfiguration.isEnabled || !this.scene.imageProcessingConfiguration.applyByPostProcess; + }), + (t.prototype._preparePostProcesses = function () { + if ((this.clearPostProcesses(!0), this._blurKernelX && this._blurKernelY)) { + var e = this.getScene().getEngine(), + t = e.getCaps().textureFloatRender ? 1 : 2; + (this._blurX = new Er("horizontal blur", new a.d(1, 0), this._blurKernelX, this._blurRatio, null, ln.a.BILINEAR_SAMPLINGMODE, e, !1, t)), + (this._blurX.autoClear = !1), + 1 === this._blurRatio && this.samples < 2 && this._texture ? (this._blurX.inputTexture = this._texture) : (this._blurX.alwaysForcePOT = !0), + (this._blurY = new Er("vertical blur", new a.d(0, 1), this._blurKernelY, this._blurRatio, null, ln.a.BILINEAR_SAMPLINGMODE, e, !1, t)), + (this._blurY.autoClear = !1), + (this._blurY.alwaysForcePOT = 1 !== this._blurRatio), + this.addPostProcess(this._blurX), + this.addPostProcess(this._blurY); + } else this._blurY && (this.removePostProcess(this._blurY), this._blurY.dispose(), (this._blurY = null)), this._blurX && (this.removePostProcess(this._blurX), this._blurX.dispose(), (this._blurX = null)); + }), + (t.prototype.clone = function () { + var e = this.getScene(); + if (!e) return this; + var n = this.getSize(), + i = new t(this.name, n.width, e, this._renderTargetOptions.generateMipMaps, this._renderTargetOptions.type, this._renderTargetOptions.samplingMode, this._renderTargetOptions.generateDepthBuffer); + return (i.hasAlpha = this.hasAlpha), (i.level = this.level), (i.mirrorPlane = this.mirrorPlane.clone()), this.renderList && (i.renderList = this.renderList.slice(0)), i; + }), + (t.prototype.serialize = function () { + if (!this.name) return null; + var t = e.prototype.serialize.call(this); + return (t.mirrorPlane = this.mirrorPlane.asArray()), t; + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver); + }), + t + ); + })(mn.a); + ln.a._CreateMirror = function (e, t, n, i) { + return new Mr(e, t, n, i); + }; + var Ar = n(98), + Ir = n(11), + Dr = n(41), + Rr = n(46), + wr = n(17), + Lr = + " uniform vec4 vPrimaryColor;\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nuniform vec4 vPrimaryColorShadow;\n#endif\nuniform float shadowLevel;\nuniform float alpha;\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\n#endif\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\nuniform vec3 vBackgroundCenter;\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 vReflectionControl;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\nuniform mat4 view;\n#endif"; + Xt.a.IncludesShadersStore.backgroundFragmentDeclaration = Lr; + var Fr = + "layout(std140,column_major) uniform;\nuniform Material\n{\nuniform vec4 vPrimaryColor;\nuniform vec4 vPrimaryColorShadow;\nuniform vec2 vDiffuseInfos;\nuniform vec2 vReflectionInfos;\nuniform mat4 diffuseMatrix;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float fFovMultiplier;\nuniform float pointSize;\nuniform float shadowLevel;\nuniform float alpha;\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\nuniform vec3 vBackgroundCenter;\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 vReflectionControl;\n#endif\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};"; + Xt.a.IncludesShadersStore.backgroundUboDeclaration = Fr; + n(171), n(60), n(61), n(105), n(99), n(86), n(87), n(82), n(100), n(90); + var Nr = + "#ifdef TEXTURELODSUPPORT\n#extension GL_EXT_shader_texture_lod : enable\n#endif\nprecision highp float;\n#include<__decl__backgroundFragment>\n#define RECIPROCAL_PI2 0.15915494\n\nuniform vec3 vEyePosition;\n\nvarying vec3 vPositionW;\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef DIFFUSE\n#if DIFFUSEDIRECTUV == 1\n#define vDiffuseUV vMainUV1\n#elif DIFFUSEDIRECTUV == 2\n#define vDiffuseUV vMainUV2\n#else\nvarying vec2 vDiffuseUV;\n#endif\nuniform sampler2D diffuseSampler;\n#endif\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include\n#endif\n\n#ifndef FROMLINEARSPACE\n#define FROMLINEARSPACE;\n#endif\n\n#ifndef SHADOWONLY\n#define SHADOWONLY;\n#endif\n#include\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include\n#include\n#include\n\n#include\n#ifdef REFLECTIONFRESNEL\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\nvec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{\n\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));\n}\n#endif\nvoid main(void) {\n#include\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(0.0,1.0,0.0);\n#endif\n\nfloat shadow=1.;\nfloat globalShadow=0.;\nfloat shadowLightCount=0.;\n#include[0..maxSimultaneousLights]\n#ifdef SHADOWINUSE\nglobalShadow/=shadowLightCount;\n#else\nglobalShadow=1.0;\n#endif\n\nvec4 reflectionColor=vec4(1.,1.,1.,1.);\n#ifdef REFLECTION\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\n\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords=reflectionVector;\n#else\nvec2 reflectionCoords=reflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nreflectionCoords/=reflectionVector.z;\n#endif\nreflectionCoords.y=1.0-reflectionCoords.y;\n#endif\n#ifdef REFLECTIONBLUR\nfloat reflectionLOD=vReflectionInfos.y;\n#ifdef TEXTURELODSUPPORT\n\nreflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\nreflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD);\n#else\nfloat lodReflectionNormalized=saturate(reflectionLOD);\nfloat lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;\nvec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);\nif(lodReflectionNormalizedDoubled<1.0){\nreflectionColor=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nreflectionSpecularMid,\nlodReflectionNormalizedDoubled\n);\n} else {\nreflectionColor=mix(\nreflectionSpecularMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodReflectionNormalizedDoubled-1.0\n);\n}\n#endif\n#else\nvec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords);\nreflectionColor=reflectionSample;\n#endif\n#ifdef RGBDREFLECTION\nreflectionColor.rgb=fromRGBD(reflectionColor);\n#endif\n#ifdef GAMMAREFLECTION\nreflectionColor.rgb=toLinearSpace(reflectionColor.rgb);\n#endif\n#ifdef REFLECTIONBGR\nreflectionColor.rgb=reflectionColor.bgr;\n#endif\n\nreflectionColor.rgb*=vReflectionInfos.x;\n#endif\n\nvec3 diffuseColor=vec3(1.,1.,1.);\nfloat finalAlpha=alpha;\n#ifdef DIFFUSE\nvec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef GAMMADIFFUSE\ndiffuseMap.rgb=toLinearSpace(diffuseMap.rgb);\n#endif\n\ndiffuseMap.rgb*=vDiffuseInfos.y;\n#ifdef DIFFUSEHASALPHA\nfinalAlpha*=diffuseMap.a;\n#endif\ndiffuseColor=diffuseMap.rgb;\n#endif\n\n#ifdef REFLECTIONFRESNEL\nvec3 colorBase=diffuseColor;\n#else\nvec3 colorBase=reflectionColor.rgb*diffuseColor;\n#endif\ncolorBase=max(colorBase,0.0);\n\n#ifdef USERGBCOLOR\nvec3 finalColor=colorBase;\n#else\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nvec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase);\n#else\nvec3 mainColor=vPrimaryColor.rgb;\n#endif\nvec3 finalColor=colorBase*mainColor;\n#endif\n\n#ifdef REFLECTIONFRESNEL\nvec3 reflectionAmount=vReflectionControl.xxx;\nvec3 reflectionReflectance0=vReflectionControl.yyy;\nvec3 reflectionReflectance90=vReflectionControl.zzz;\nfloat VdotN=dot(normalize(vEyePosition),normalW);\nvec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(saturate(VdotN),reflectionReflectance0,reflectionReflectance90,1.0);\nreflectionAmount*=planarReflectionFresnel;\n#ifdef REFLECTIONFALLOFF\nfloat reflectionDistanceFalloff=1.0-saturate(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w);\nreflectionDistanceFalloff*=reflectionDistanceFalloff;\nreflectionAmount*=reflectionDistanceFalloff;\n#endif\nfinalColor=mix(finalColor,reflectionColor.rgb,saturate(reflectionAmount));\n#endif\n#ifdef OPACITYFRESNEL\nfloat viewAngleToFloor=dot(normalW,normalize(vEyePosition-vBackgroundCenter));\n\nconst float startAngle=0.1;\nfloat fadeFactor=saturate(viewAngleToFloor/startAngle);\nfinalAlpha*=fadeFactor*fadeFactor;\n#endif\n\n#ifdef SHADOWINUSE\nfinalColor=mix(finalColor*shadowLevel,finalColor,globalShadow);\n#endif\n\nvec4 color=vec4(finalColor,finalAlpha);\n#include\n#ifdef IMAGEPROCESSINGPOSTPROCESS\n\n\ncolor.rgb=clamp(color.rgb,0.,30.0);\n#else\n\ncolor=applyImageProcessing(color);\n#endif\n#ifdef PREMULTIPLYALPHA\n\ncolor.rgb*=color.a;\n#endif\n#ifdef NOISE\ncolor.rgb+=dither(vPositionW.xy,0.5);\ncolor=max(color,0.0);\n#endif\ngl_FragColor=color;\n}\n"; + Xt.a.ShadersStore.backgroundPixelShader = Nr; + var kr = + "uniform mat4 view;\nuniform mat4 viewProjection;\nuniform float shadowLevel;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float fFovMultiplier;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif"; + Xt.a.IncludesShadersStore.backgroundVertexDeclaration = kr; + n(70), n(71), n(88), n(91), n(72), n(73), n(83), n(93), n(101); + var zr = + "precision highp float;\n#include<__decl__backgroundVertex>\n#include\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include\n\n#include\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nvarying vec2 vDiffuseUV;\n#endif\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\nvoid main(void) {\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=position;\n#endif\n#include\n#include\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n} else {\ngl_Position=viewProjectionR*finalWorld*vec4(position,1.0);\n}\n#else\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normal);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));\nvec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));\nif (fFovMultiplier<=1.0) {\nvDirectionW=normalize(segment);\n} else {\nvDirectionW=normalize(vDirectionW+(vDirectionW-segment));\n}\n#endif\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n"; + Xt.a.ShadersStore.backgroundVertexShader = zr; + var jr = n(43), + Br = (function (e) { + function t() { + var t = e.call(this) || this; + return ( + (t.DIFFUSE = !1), + (t.DIFFUSEDIRECTUV = 0), + (t.GAMMADIFFUSE = !1), + (t.DIFFUSEHASALPHA = !1), + (t.OPACITYFRESNEL = !1), + (t.REFLECTIONBLUR = !1), + (t.REFLECTIONFRESNEL = !1), + (t.REFLECTIONFALLOFF = !1), + (t.TEXTURELODSUPPORT = !1), + (t.PREMULTIPLYALPHA = !1), + (t.USERGBCOLOR = !1), + (t.USEHIGHLIGHTANDSHADOWCOLORS = !1), + (t.NOISE = !1), + (t.REFLECTIONBGR = !1), + (t.IMAGEPROCESSING = !1), + (t.VIGNETTE = !1), + (t.VIGNETTEBLENDMODEMULTIPLY = !1), + (t.VIGNETTEBLENDMODEOPAQUE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = !1), + (t.SAMPLER3DBGRMAP = !1), + (t.IMAGEPROCESSINGPOSTPROCESS = !1), + (t.EXPOSURE = !1), + (t.MULTIVIEW = !1), + (t.REFLECTION = !1), + (t.REFLECTIONMAP_3D = !1), + (t.REFLECTIONMAP_SPHERICAL = !1), + (t.REFLECTIONMAP_PLANAR = !1), + (t.REFLECTIONMAP_CUBIC = !1), + (t.REFLECTIONMAP_PROJECTION = !1), + (t.REFLECTIONMAP_SKYBOX = !1), + (t.REFLECTIONMAP_EXPLICIT = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + (t.INVERTCUBICMAP = !1), + (t.REFLECTIONMAP_OPPOSITEZ = !1), + (t.LODINREFLECTIONALPHA = !1), + (t.GAMMAREFLECTION = !1), + (t.RGBDREFLECTION = !1), + (t.EQUIRECTANGULAR_RELFECTION_FOV = !1), + (t.MAINUV1 = !1), + (t.MAINUV2 = !1), + (t.UV1 = !1), + (t.UV2 = !1), + (t.CLIPPLANE = !1), + (t.CLIPPLANE2 = !1), + (t.CLIPPLANE3 = !1), + (t.CLIPPLANE4 = !1), + (t.CLIPPLANE5 = !1), + (t.CLIPPLANE6 = !1), + (t.POINTSIZE = !1), + (t.FOG = !1), + (t.NORMAL = !1), + (t.NUM_BONE_INFLUENCERS = 0), + (t.BonesPerMesh = 0), + (t.INSTANCES = !1), + (t.SHADOWFLOAT = !1), + t.rebuild(), + t + ); + } + return Object(h.d)(t, e), t; + })(Dr.a), + Vr = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return ( + (i.primaryColor = s.a.White()), + (i._primaryColorShadowLevel = 0), + (i._primaryColorHighlightLevel = 0), + (i.reflectionTexture = null), + (i.reflectionBlur = 0), + (i.diffuseTexture = null), + (i._shadowLights = null), + (i.shadowLights = null), + (i.shadowLevel = 0), + (i.sceneCenter = a.e.Zero()), + (i.opacityFresnel = !0), + (i.reflectionFresnel = !1), + (i.reflectionFalloffDistance = 0), + (i.reflectionAmount = 1), + (i.reflectionReflectance0 = 0.05), + (i.reflectionReflectance90 = 0.5), + (i.useRGBColor = !0), + (i.enableNoise = !1), + (i._fovMultiplier = 1), + (i.useEquirectangularFOV = !1), + (i._maxSimultaneousLights = 4), + (i.maxSimultaneousLights = 4), + (i._imageProcessingObserver = null), + (i.switchToBGR = !1), + (i._renderTargets = new ii.a(16)), + (i._reflectionControls = a.f.Zero()), + (i._white = s.a.White()), + (i._primaryShadowColor = s.a.Black()), + (i._primaryHighlightColor = s.a.Black()), + i._attachImageProcessingConfiguration(null), + (i.getRenderTargetTextures = function () { + return ( + i._renderTargets.reset(), + i._diffuseTexture && i._diffuseTexture.isRenderTarget && i._renderTargets.push(i._diffuseTexture), + i._reflectionTexture && i._reflectionTexture.isRenderTarget && i._renderTargets.push(i._reflectionTexture), + i._renderTargets + ); + }), + i + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "_perceptualColor", { + get: function () { + return this.__perceptualColor; + }, + set: function (e) { + (this.__perceptualColor = e), this._computePrimaryColorFromPerceptualColor(), this._markAllSubMeshesAsLightsDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "primaryColorShadowLevel", { + get: function () { + return this._primaryColorShadowLevel; + }, + set: function (e) { + (this._primaryColorShadowLevel = e), this._computePrimaryColors(), this._markAllSubMeshesAsLightsDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "primaryColorHighlightLevel", { + get: function () { + return this._primaryColorHighlightLevel; + }, + set: function (e) { + (this._primaryColorHighlightLevel = e), this._computePrimaryColors(), this._markAllSubMeshesAsLightsDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "reflectionStandardFresnelWeight", { + set: function (e) { + var n = e; + n < 0.5 + ? ((n *= 2), (this.reflectionReflectance0 = t.StandardReflectance0 * n), (this.reflectionReflectance90 = t.StandardReflectance90 * n)) + : ((n = 2 * n - 1), (this.reflectionReflectance0 = t.StandardReflectance0 + (1 - t.StandardReflectance0) * n), (this.reflectionReflectance90 = t.StandardReflectance90 + (1 - t.StandardReflectance90) * n)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fovMultiplier", { + get: function () { + return this._fovMultiplier; + }, + set: function (e) { + isNaN(e) && (e = 1), (this._fovMultiplier = Math.max(0, Math.min(2, e))); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._attachImageProcessingConfiguration = function (e) { + var t = this; + e !== this._imageProcessingConfiguration && + (this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + (this._imageProcessingConfiguration = e || this.getScene().imageProcessingConfiguration), + this._imageProcessingConfiguration && + (this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(function () { + t._computePrimaryColorFromPerceptualColor(), t._markAllSubMeshesAsImageProcessingDirty(); + }))); + }), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + this._attachImageProcessingConfiguration(e), this._markAllSubMeshesAsTexturesDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorCurvesEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorCurvesEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurvesEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingEnabled", { + get: function () { + return this.imageProcessingConfiguration.colorGradingEnabled; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraToneMappingEnabled", { + get: function () { + return this._imageProcessingConfiguration.toneMappingEnabled; + }, + set: function (e) { + this._imageProcessingConfiguration.toneMappingEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraExposure", { + get: function () { + return this._imageProcessingConfiguration.exposure; + }, + set: function (e) { + this._imageProcessingConfiguration.exposure = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraContrast", { + get: function () { + return this._imageProcessingConfiguration.contrast; + }, + set: function (e) { + this._imageProcessingConfiguration.contrast = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorGradingTexture", { + get: function () { + return this._imageProcessingConfiguration.colorGradingTexture; + }, + set: function (e) { + this.imageProcessingConfiguration.colorGradingTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraColorCurves", { + get: function () { + return this.imageProcessingConfiguration.colorCurves; + }, + set: function (e) { + this.imageProcessingConfiguration.colorCurves = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hasRenderTargetTextures", { + get: function () { + return !(!this._diffuseTexture || !this._diffuseTexture.isRenderTarget) || !(!this._reflectionTexture || !this._reflectionTexture.isRenderTarget); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.needAlphaTesting = function () { + return !0; + }), + (t.prototype.needAlphaBlending = function () { + return this.alpha < 0 || (null != this._diffuseTexture && this._diffuseTexture.hasAlpha); + }), + (t.prototype.isReadyForSubMesh = function (e, t, n) { + var i = this; + if ((void 0 === n && (n = !1), t.effect && this.isFrozen && t.effect._wasPreviouslyReady)) return !0; + t._materialDefines || (t._materialDefines = new Br()); + var r = this.getScene(), + o = t._materialDefines; + if (!this.checkReadyOnEveryCall && t.effect && o._renderId === r.getRenderId()) return !0; + var a = r.getEngine(); + if ((Ir.a.PrepareDefinesForLights(r, e, o, !1, this._maxSimultaneousLights), (o._needNormals = !0), Ir.a.PrepareDefinesForMultiview(r, o), o._areTexturesDirty)) { + if (((o._needUVs = !1), r.texturesEnabled)) { + if ((r.getEngine().getCaps().textureLOD && (o.TEXTURELODSUPPORT = !0), this._diffuseTexture && wr.a.DiffuseTextureEnabled)) { + if (!this._diffuseTexture.isReadyOrNotBlocking()) return !1; + Ir.a.PrepareDefinesForMergedUV(this._diffuseTexture, o, "DIFFUSE"), + (o.DIFFUSEHASALPHA = this._diffuseTexture.hasAlpha), + (o.GAMMADIFFUSE = this._diffuseTexture.gammaSpace), + (o.OPACITYFRESNEL = this._opacityFresnel); + } else (o.DIFFUSE = !1), (o.DIFFUSEHASALPHA = !1), (o.GAMMADIFFUSE = !1), (o.OPACITYFRESNEL = !1); + var s = this._reflectionTexture; + if (s && wr.a.ReflectionTextureEnabled) { + if (!s.isReadyOrNotBlocking()) return !1; + switch ( + ((o.REFLECTION = !0), + (o.GAMMAREFLECTION = s.gammaSpace), + (o.RGBDREFLECTION = s.isRGBD), + (o.REFLECTIONBLUR = this._reflectionBlur > 0), + (o.REFLECTIONMAP_OPPOSITEZ = this.getScene().useRightHandedSystem ? !s.invertZ : s.invertZ), + (o.LODINREFLECTIONALPHA = s.lodLevelInAlpha), + (o.EQUIRECTANGULAR_RELFECTION_FOV = this.useEquirectangularFOV), + (o.REFLECTIONBGR = this.switchToBGR), + s.coordinatesMode === ln.a.INVCUBIC_MODE && (o.INVERTCUBICMAP = !0), + (o.REFLECTIONMAP_3D = s.isCube), + s.coordinatesMode) + ) { + case ln.a.EXPLICIT_MODE: + o.REFLECTIONMAP_EXPLICIT = !0; + break; + case ln.a.PLANAR_MODE: + o.REFLECTIONMAP_PLANAR = !0; + break; + case ln.a.PROJECTION_MODE: + o.REFLECTIONMAP_PROJECTION = !0; + break; + case ln.a.SKYBOX_MODE: + o.REFLECTIONMAP_SKYBOX = !0; + break; + case ln.a.SPHERICAL_MODE: + o.REFLECTIONMAP_SPHERICAL = !0; + break; + case ln.a.EQUIRECTANGULAR_MODE: + o.REFLECTIONMAP_EQUIRECTANGULAR = !0; + break; + case ln.a.FIXED_EQUIRECTANGULAR_MODE: + o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !0; + break; + case ln.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE: + o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !0; + break; + case ln.a.CUBIC_MODE: + case ln.a.INVCUBIC_MODE: + default: + o.REFLECTIONMAP_CUBIC = !0; + } + this.reflectionFresnel + ? ((o.REFLECTIONFRESNEL = !0), + (o.REFLECTIONFALLOFF = this.reflectionFalloffDistance > 0), + (this._reflectionControls.x = this.reflectionAmount), + (this._reflectionControls.y = this.reflectionReflectance0), + (this._reflectionControls.z = this.reflectionReflectance90), + (this._reflectionControls.w = 1 / this.reflectionFalloffDistance)) + : ((o.REFLECTIONFRESNEL = !1), (o.REFLECTIONFALLOFF = !1)); + } else + (o.REFLECTION = !1), + (o.REFLECTIONFRESNEL = !1), + (o.REFLECTIONFALLOFF = !1), + (o.REFLECTIONBLUR = !1), + (o.REFLECTIONMAP_3D = !1), + (o.REFLECTIONMAP_SPHERICAL = !1), + (o.REFLECTIONMAP_PLANAR = !1), + (o.REFLECTIONMAP_CUBIC = !1), + (o.REFLECTIONMAP_PROJECTION = !1), + (o.REFLECTIONMAP_SKYBOX = !1), + (o.REFLECTIONMAP_EXPLICIT = !1), + (o.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + (o.INVERTCUBICMAP = !1), + (o.REFLECTIONMAP_OPPOSITEZ = !1), + (o.LODINREFLECTIONALPHA = !1), + (o.GAMMAREFLECTION = !1), + (o.RGBDREFLECTION = !1); + } + (o.PREMULTIPLYALPHA = 7 === this.alphaMode || 8 === this.alphaMode), (o.USERGBCOLOR = this._useRGBColor), (o.NOISE = this._enableNoise); + } + if ( + (o._areLightsDirty && (o.USEHIGHLIGHTANDSHADOWCOLORS = !this._useRGBColor && (0 !== this._primaryColorShadowLevel || 0 !== this._primaryColorHighlightLevel)), + o._areImageProcessingDirty && this._imageProcessingConfiguration) + ) { + if (!this._imageProcessingConfiguration.isReady()) return !1; + this._imageProcessingConfiguration.prepareDefines(o); + } + if ( + (Ir.a.PrepareDefinesForMisc(e, r, !1, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(e), o), + Ir.a.PrepareDefinesForFrameBoundValues(r, a, o, n), + Ir.a.PrepareDefinesForAttributes(e, o, !1, !0, !1) && + e && + (r.getEngine().getCaps().standardDerivatives || e.isVerticesDataPresent(wn.b.NormalKind) || (e.createNormals(!0), g.a.Warn("BackgroundMaterial: Normals have been created for the mesh: " + e.name))), + o.isDirty) + ) { + o.markAsProcessed(), r.resetCachedMaterial(); + var c = new jr.a(); + o.FOG && c.addFallback(0, "FOG"), o.POINTSIZE && c.addFallback(1, "POINTSIZE"), o.MULTIVIEW && c.addFallback(0, "MULTIVIEW"), Ir.a.HandleFallbacksForShadows(o, c, this._maxSimultaneousLights); + var l = [wn.b.PositionKind]; + o.NORMAL && l.push(wn.b.NormalKind), o.UV1 && l.push(wn.b.UVKind), o.UV2 && l.push(wn.b.UV2Kind), Ir.a.PrepareAttributesForBones(l, e, o, c), Ir.a.PrepareAttributesForInstances(l, o); + var u = [ + "world", + "view", + "viewProjection", + "vEyePosition", + "vLightsType", + "vFogInfos", + "vFogColor", + "pointSize", + "vClipPlane", + "vClipPlane2", + "vClipPlane3", + "vClipPlane4", + "vClipPlane5", + "vClipPlane6", + "mBones", + "vPrimaryColor", + "vPrimaryColorShadow", + "vReflectionInfos", + "reflectionMatrix", + "vReflectionMicrosurfaceInfos", + "fFovMultiplier", + "shadowLevel", + "alpha", + "vBackgroundCenter", + "vReflectionControl", + "vDiffuseInfos", + "diffuseMatrix", + ], + h = ["diffuseSampler", "reflectionSampler", "reflectionSamplerLow", "reflectionSamplerHigh"], + d = ["Material", "Scene"]; + En.a && (En.a.PrepareUniforms(u, o), En.a.PrepareSamplers(h, o)), + Ir.a.PrepareUniformsAndSamplersList({ uniformsNames: u, uniformBuffersNames: d, samplers: h, defines: o, maxSimultaneousLights: this._maxSimultaneousLights }); + var p = o.toString(); + t.setEffect( + r.getEngine().createEffect( + "background", + { + attributes: l, + uniformsNames: u, + uniformBuffersNames: d, + samplers: h, + defines: p, + fallbacks: c, + onCompiled: function (e) { + i.onCompiled && i.onCompiled(e), i.bindSceneUniformBuffer(e, r.getSceneUniformBuffer()); + }, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights }, + }, + a + ), + o + ), + this.buildUniformLayout(); + } + return !(!t.effect || !t.effect.isReady()) && ((o._renderId = r.getRenderId()), (t.effect._wasPreviouslyReady = !0), !0); + }), + (t.prototype._computePrimaryColorFromPerceptualColor = function () { + this.__perceptualColor && + (this._primaryColor.copyFrom(this.__perceptualColor), + this._primaryColor.toLinearSpaceToRef(this._primaryColor), + this._imageProcessingConfiguration && this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor), + this._computePrimaryColors()); + }), + (t.prototype._computePrimaryColors = function () { + (0 === this._primaryColorShadowLevel && 0 === this._primaryColorHighlightLevel) || + (this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor), + this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor), + this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor), + this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor), + this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor)); + }), + (t.prototype.buildUniformLayout = function () { + this._uniformBuffer.addUniform("vPrimaryColor", 4), + this._uniformBuffer.addUniform("vPrimaryColorShadow", 4), + this._uniformBuffer.addUniform("vDiffuseInfos", 2), + this._uniformBuffer.addUniform("vReflectionInfos", 2), + this._uniformBuffer.addUniform("diffuseMatrix", 16), + this._uniformBuffer.addUniform("reflectionMatrix", 16), + this._uniformBuffer.addUniform("vReflectionMicrosurfaceInfos", 3), + this._uniformBuffer.addUniform("fFovMultiplier", 1), + this._uniformBuffer.addUniform("pointSize", 1), + this._uniformBuffer.addUniform("shadowLevel", 1), + this._uniformBuffer.addUniform("alpha", 1), + this._uniformBuffer.addUniform("vBackgroundCenter", 3), + this._uniformBuffer.addUniform("vReflectionControl", 4), + this._uniformBuffer.create(); + }), + (t.prototype.unbind = function () { + this._diffuseTexture && this._diffuseTexture.isRenderTarget && this._uniformBuffer.setTexture("diffuseSampler", null), + this._reflectionTexture && this._reflectionTexture.isRenderTarget && this._uniformBuffer.setTexture("reflectionSampler", null), + e.prototype.unbind.call(this); + }), + (t.prototype.bindOnlyWorldMatrix = function (e) { + this._activeEffect.setMatrix("world", e); + }), + (t.prototype.bindForSubMesh = function (e, t, n) { + var i = this.getScene(), + r = n._materialDefines; + if (r) { + var o = n.effect; + if (o) { + (this._activeEffect = o), this.bindOnlyWorldMatrix(e), Ir.a.BindBonesParameters(t, this._activeEffect); + var a = this._mustRebind(i, o, t.visibility); + if (a) { + this._uniformBuffer.bindToEffect(o, "Material"), this.bindViewProjection(o); + var s = this._reflectionTexture; + (this._uniformBuffer.useUbo && this.isFrozen && this._uniformBuffer.isSync) || + (i.texturesEnabled && + (this._diffuseTexture && + wr.a.DiffuseTextureEnabled && + (this._uniformBuffer.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level), + Ir.a.BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, "diffuse")), + s && + wr.a.ReflectionTextureEnabled && + (this._uniformBuffer.updateMatrix("reflectionMatrix", s.getReflectionTextureMatrix()), + this._uniformBuffer.updateFloat2("vReflectionInfos", s.level, this._reflectionBlur), + this._uniformBuffer.updateFloat3("vReflectionMicrosurfaceInfos", s.getSize().width, s.lodGenerationScale, s.lodGenerationOffset))), + this.shadowLevel > 0 && this._uniformBuffer.updateFloat("shadowLevel", this.shadowLevel), + this._uniformBuffer.updateFloat("alpha", this.alpha), + this.pointsCloud && this._uniformBuffer.updateFloat("pointSize", this.pointSize), + r.USEHIGHLIGHTANDSHADOWCOLORS + ? (this._uniformBuffer.updateColor4("vPrimaryColor", this._primaryHighlightColor, 1), this._uniformBuffer.updateColor4("vPrimaryColorShadow", this._primaryShadowColor, 1)) + : this._uniformBuffer.updateColor4("vPrimaryColor", this._primaryColor, 1)), + this._uniformBuffer.updateFloat("fFovMultiplier", this._fovMultiplier), + i.texturesEnabled && + (this._diffuseTexture && wr.a.DiffuseTextureEnabled && this._uniformBuffer.setTexture("diffuseSampler", this._diffuseTexture), + s && + wr.a.ReflectionTextureEnabled && + (r.REFLECTIONBLUR && r.TEXTURELODSUPPORT + ? this._uniformBuffer.setTexture("reflectionSampler", s) + : r.REFLECTIONBLUR + ? (this._uniformBuffer.setTexture("reflectionSampler", s._lodTextureMid || s), + this._uniformBuffer.setTexture("reflectionSamplerLow", s._lodTextureLow || s), + this._uniformBuffer.setTexture("reflectionSamplerHigh", s._lodTextureHigh || s)) + : this._uniformBuffer.setTexture("reflectionSampler", s), + r.REFLECTIONFRESNEL && + (this._uniformBuffer.updateFloat3("vBackgroundCenter", this.sceneCenter.x, this.sceneCenter.y, this.sceneCenter.z), + this._uniformBuffer.updateFloat4("vReflectionControl", this._reflectionControls.x, this._reflectionControls.y, this._reflectionControls.z, this._reflectionControls.w)))), + Ir.a.BindClipPlane(this._activeEffect, i), + Ir.a.BindEyePosition(o, i); + } + (!a && this.isFrozen) || + (i.lightsEnabled && Ir.a.BindLights(i, t, this._activeEffect, r, this._maxSimultaneousLights, !1), + this.bindView(o), + Ir.a.BindFogParameters(i, t, this._activeEffect, !0), + this._imageProcessingConfiguration && this._imageProcessingConfiguration.bind(this._activeEffect)), + this._uniformBuffer.update(), + this._afterBind(t, this._activeEffect); + } + } + }), + (t.prototype.hasTexture = function (t) { + return !!e.prototype.hasTexture.call(this, t) || this._reflectionTexture === t || this._diffuseTexture === t; + }), + (t.prototype.dispose = function (t, n) { + void 0 === t && (t = !1), + void 0 === n && (n = !1), + n && (this.diffuseTexture && this.diffuseTexture.dispose(), this.reflectionTexture && this.reflectionTexture.dispose()), + this._renderTargets.dispose(), + this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + e.prototype.dispose.call(this, t); + }), + (t.prototype.clone = function (e) { + var n = this; + return He.a.Clone(function () { + return new t(e, n.getScene()); + }, this); + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + return (e.customType = "BABYLON.BackgroundMaterial"), e; + }), + (t.prototype.getClassName = function () { + return "BackgroundMaterial"; + }), + (t.Parse = function (e, n, i) { + return He.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + }), + (t.StandardReflectance0 = 0.05), + (t.StandardReflectance90 = 0.5), + Object(h.c)([Object(He.e)()], t.prototype, "_primaryColor", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "primaryColor", void 0), + Object(h.c)([Object(He.e)()], t.prototype, "__perceptualColor", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_primaryColorShadowLevel", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_primaryColorHighlightLevel", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "primaryColorHighlightLevel", null), + Object(h.c)([Object(He.m)()], t.prototype, "_reflectionTexture", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionTexture", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionBlur", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionBlur", void 0), + Object(h.c)([Object(He.m)()], t.prototype, "_diffuseTexture", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "diffuseTexture", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "shadowLights", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_shadowLevel", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "shadowLevel", void 0), + Object(h.c)([Object(He.o)()], t.prototype, "_sceneCenter", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "sceneCenter", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_opacityFresnel", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "opacityFresnel", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionFresnel", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionFresnel", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionFalloffDistance", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionFalloffDistance", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionAmount", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionAmount", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionReflectance0", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionReflectance0", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_reflectionReflectance90", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "reflectionReflectance90", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_useRGBColor", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useRGBColor", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_enableNoise", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "enableNoise", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_maxSimultaneousLights", void 0), + Object(h.c)([Object(He.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "maxSimultaneousLights", void 0), + Object(h.c)([Object(He.i)()], t.prototype, "_imageProcessingConfiguration", void 0), + t + ); + })(Rr.a); + c.a.RegisteredTypes["BABYLON.BackgroundMaterial"] = Vr; + var Gr = (function () { + function e(t, n) { + var i = this; + (this._errorHandler = function (e, t) { + i.onErrorObservable.notifyObservers({ message: e, exception: t }); + }), + (this._options = Object(h.a)(Object(h.a)({}, e._getDefaultOptions()), t)), + (this._scene = n), + (this.onErrorObservable = new o.c()), + this._setupBackground(), + this._setupImageProcessing(); + } + return ( + (e._getDefaultOptions = function () { + return { + createGround: !0, + groundSize: 15, + groundTexture: this._groundTextureCDNUrl, + groundColor: new s.a(0.2, 0.2, 0.3).toLinearSpace().scale(3), + groundOpacity: 0.9, + enableGroundShadow: !0, + groundShadowLevel: 0.5, + enableGroundMirror: !1, + groundMirrorSizeRatio: 0.3, + groundMirrorBlurKernel: 64, + groundMirrorAmount: 1, + groundMirrorFresnelWeight: 1, + groundMirrorFallOffDistance: 0, + groundMirrorTextureType: 0, + groundYBias: 1e-5, + createSkybox: !0, + skyboxSize: 20, + skyboxTexture: this._skyboxTextureCDNUrl, + skyboxColor: new s.a(0.2, 0.2, 0.3).toLinearSpace().scale(3), + backgroundYRotation: 0, + sizeAuto: !0, + rootPosition: a.e.Zero(), + setupImageProcessing: !0, + environmentTexture: this._environmentTextureCDNUrl, + cameraExposure: 0.8, + cameraContrast: 1.2, + toneMappingEnabled: !0, + }; + }), + Object.defineProperty(e.prototype, "rootMesh", { + get: function () { + return this._rootMesh; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "skybox", { + get: function () { + return this._skybox; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "skyboxTexture", { + get: function () { + return this._skyboxTexture; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "skyboxMaterial", { + get: function () { + return this._skyboxMaterial; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "ground", { + get: function () { + return this._ground; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "groundTexture", { + get: function () { + return this._groundTexture; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "groundMirror", { + get: function () { + return this._groundMirror; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "groundMirrorRenderList", { + get: function () { + return this._groundMirror ? this._groundMirror.renderList : null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "groundMaterial", { + get: function () { + return this._groundMaterial; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.updateOptions = function (e) { + var t = Object(h.a)(Object(h.a)({}, this._options), e); + this._ground && !t.createGround && (this._ground.dispose(), (this._ground = null)), + this._groundMaterial && !t.createGround && (this._groundMaterial.dispose(), (this._groundMaterial = null)), + this._groundTexture && this._options.groundTexture != t.groundTexture && (this._groundTexture.dispose(), (this._groundTexture = null)), + this._skybox && !t.createSkybox && (this._skybox.dispose(), (this._skybox = null)), + this._skyboxMaterial && !t.createSkybox && (this._skyboxMaterial.dispose(), (this._skyboxMaterial = null)), + this._skyboxTexture && this._options.skyboxTexture != t.skyboxTexture && (this._skyboxTexture.dispose(), (this._skyboxTexture = null)), + this._groundMirror && !t.enableGroundMirror && (this._groundMirror.dispose(), (this._groundMirror = null)), + this._scene.environmentTexture && this._options.environmentTexture != t.environmentTexture && this._scene.environmentTexture.dispose(), + (this._options = t), + this._setupBackground(), + this._setupImageProcessing(); + }), + (e.prototype.setMainColor = function (e) { + this.groundMaterial && (this.groundMaterial.primaryColor = e), this.skyboxMaterial && (this.skyboxMaterial.primaryColor = e), this.groundMirror && (this.groundMirror.clearColor = new s.b(e.r, e.g, e.b, 1)); + }), + (e.prototype._setupImageProcessing = function () { + this._options.setupImageProcessing && + ((this._scene.imageProcessingConfiguration.contrast = this._options.cameraContrast), + (this._scene.imageProcessingConfiguration.exposure = this._options.cameraExposure), + (this._scene.imageProcessingConfiguration.toneMappingEnabled = this._options.toneMappingEnabled), + this._setupEnvironmentTexture()); + }), + (e.prototype._setupEnvironmentTexture = function () { + if (!this._scene.environmentTexture) + if (this._options.environmentTexture instanceof Cr.a) this._scene.environmentTexture = this._options.environmentTexture; + else { + var e = Ar.a.CreateFromPrefilteredData(this._options.environmentTexture, this._scene); + this._scene.environmentTexture = e; + } + }), + (e.prototype._setupBackground = function () { + this._rootMesh || (this._rootMesh = new Ee.a("BackgroundHelper", this._scene)), (this._rootMesh.rotation.y = this._options.backgroundYRotation); + var e = this._getSceneSize(); + this._options.createGround && + (this._setupGround(e), this._setupGroundMaterial(), this._setupGroundDiffuseTexture(), this._options.enableGroundMirror && this._setupGroundMirrorTexture(e), this._setupMirrorInGroundMaterial()), + this._options.createSkybox && (this._setupSkybox(e), this._setupSkyboxMaterial(), this._setupSkyboxReflectionTexture()), + (this._rootMesh.position.x = e.rootPosition.x), + (this._rootMesh.position.z = e.rootPosition.z), + (this._rootMesh.position.y = e.rootPosition.y); + }), + (e.prototype._getSceneSize = function () { + var e = this, + t = this._options.groundSize, + n = this._options.skyboxSize, + i = this._options.rootPosition; + if (!this._scene.meshes || 1 === this._scene.meshes.length) return { groundSize: t, skyboxSize: n, rootPosition: i }; + var r = this._scene.getWorldExtends(function (t) { + return t !== e._ground && t !== e._rootMesh && t !== e._skybox; + }), + o = r.max.subtract(r.min); + if (this._options.sizeAuto) { + this._scene.activeCamera instanceof xt && this._scene.activeCamera.upperRadiusLimit && (n = t = 2 * this._scene.activeCamera.upperRadiusLimit); + var a = o.length(); + a > t && (n = t = 2 * a), (t *= 1.1), (n *= 1.5), ((i = r.min.add(o.scale(0.5))).y = r.min.y - this._options.groundYBias); + } + return { groundSize: t, skyboxSize: n, rootPosition: i }; + }), + (e.prototype._setupGround = function (e) { + var t = this; + (this._ground && !this._ground.isDisposed()) || + ((this._ground = Ee.a.CreatePlane("BackgroundPlane", e.groundSize, this._scene)), + (this._ground.rotation.x = Math.PI / 2), + (this._ground.parent = this._rootMesh), + this._ground.onDisposeObservable.add(function () { + t._ground = null; + })), + (this._ground.receiveShadows = this._options.enableGroundShadow); + }), + (e.prototype._setupGroundMaterial = function () { + this._groundMaterial || (this._groundMaterial = new Vr("BackgroundPlaneMaterial", this._scene)), + (this._groundMaterial.alpha = this._options.groundOpacity), + (this._groundMaterial.alphaMode = 8), + (this._groundMaterial.shadowLevel = this._options.groundShadowLevel), + (this._groundMaterial.primaryColor = this._options.groundColor), + (this._groundMaterial.useRGBColor = !1), + (this._groundMaterial.enableNoise = !0), + this._ground && (this._ground.material = this._groundMaterial); + }), + (e.prototype._setupGroundDiffuseTexture = function () { + if (this._groundMaterial && !this._groundTexture) + if (this._options.groundTexture instanceof Cr.a) this._groundMaterial.diffuseTexture = this._options.groundTexture; + else { + var e = new ln.a(this._options.groundTexture, this._scene, void 0, void 0, void 0, void 0, this._errorHandler); + (e.gammaSpace = !1), (e.hasAlpha = !0), (this._groundMaterial.diffuseTexture = e); + } + }), + (e.prototype._setupGroundMirrorTexture = function (e) { + var t = ln.a.CLAMP_ADDRESSMODE; + if ( + !this._groundMirror && + ((this._groundMirror = new Mr("BackgroundPlaneMirrorTexture", { ratio: this._options.groundMirrorSizeRatio }, this._scene, !1, this._options.groundMirrorTextureType, ln.a.BILINEAR_SAMPLINGMODE, !0)), + (this._groundMirror.mirrorPlane = new Zn.a(0, -1, 0, e.rootPosition.y)), + (this._groundMirror.anisotropicFilteringLevel = 1), + (this._groundMirror.wrapU = t), + (this._groundMirror.wrapV = t), + (this._groundMirror.gammaSpace = !1), + this._groundMirror.renderList) + ) + for (var n = 0; n < this._scene.meshes.length; n++) { + var i = this._scene.meshes[n]; + i !== this._ground && i !== this._skybox && i !== this._rootMesh && this._groundMirror.renderList.push(i); + } + (this._groundMirror.clearColor = new s.b(this._options.groundColor.r, this._options.groundColor.g, this._options.groundColor.b, 1)), (this._groundMirror.adaptiveBlurKernel = this._options.groundMirrorBlurKernel); + }), + (e.prototype._setupMirrorInGroundMaterial = function () { + this._groundMaterial && + ((this._groundMaterial.reflectionTexture = this._groundMirror), + (this._groundMaterial.reflectionFresnel = !0), + (this._groundMaterial.reflectionAmount = this._options.groundMirrorAmount), + (this._groundMaterial.reflectionStandardFresnelWeight = this._options.groundMirrorFresnelWeight), + (this._groundMaterial.reflectionFalloffDistance = this._options.groundMirrorFallOffDistance)); + }), + (e.prototype._setupSkybox = function (e) { + var t = this; + (this._skybox && !this._skybox.isDisposed()) || + ((this._skybox = Ee.a.CreateBox("BackgroundSkybox", e.skyboxSize, this._scene, void 0, Ee.a.BACKSIDE)), + this._skybox.onDisposeObservable.add(function () { + t._skybox = null; + })), + (this._skybox.parent = this._rootMesh); + }), + (e.prototype._setupSkyboxMaterial = function () { + this._skybox && + (this._skyboxMaterial || (this._skyboxMaterial = new Vr("BackgroundSkyboxMaterial", this._scene)), + (this._skyboxMaterial.useRGBColor = !1), + (this._skyboxMaterial.primaryColor = this._options.skyboxColor), + (this._skyboxMaterial.enableNoise = !0), + (this._skybox.material = this._skyboxMaterial)); + }), + (e.prototype._setupSkyboxReflectionTexture = function () { + this._skyboxMaterial && + (this._skyboxTexture || + (this._options.skyboxTexture instanceof Cr.a + ? (this._skyboxMaterial.reflectionTexture = this._options.skyboxTexture) + : ((this._skyboxTexture = new Ar.a(this._options.skyboxTexture, this._scene, void 0, void 0, void 0, void 0, this._errorHandler)), + (this._skyboxTexture.coordinatesMode = ln.a.SKYBOX_MODE), + (this._skyboxTexture.gammaSpace = !1), + (this._skyboxMaterial.reflectionTexture = this._skyboxTexture)))); + }), + (e.prototype.dispose = function () { + this._groundMaterial && this._groundMaterial.dispose(!0, !0), this._skyboxMaterial && this._skyboxMaterial.dispose(!0, !0), this._rootMesh.dispose(!1); + }), + (e._groundTextureCDNUrl = "https://assets.babylonjs.com/environments/backgroundGround.png"), + (e._skyboxTextureCDNUrl = "https://assets.babylonjs.com/environments/backgroundSkybox.dds"), + (e._environmentTextureCDNUrl = "https://assets.babylonjs.com/environments/environmentSpecular.env"), + e + ); + })(), + Ur = (function (e) { + function t(n, i, r, s, c) { + void 0 === c && (c = null); + var l = e.call(this, n, s) || this; + (l._useDirectMapping = !1), + (l.onLoadErrorObservable = new o.c()), + (l._imageMode = t.MODE_MONOSCOPIC), + (l._onBeforeCameraRenderObserver = null), + (n = n || "photoDome"), + (r.resolution = 0 | Math.abs(r.resolution) || 32), + (r.size = Math.abs(r.size) || (s.activeCamera ? 0.48 * s.activeCamera.maxZ : 1e3)), + void 0 === r.useDirectMapping ? (l._useDirectMapping = !0) : (l._useDirectMapping = r.useDirectMapping), + void 0 === r.faceForward && (r.faceForward = !0), + l._setReady(!1); + var u = (l._material = new Vr(n + "_material", s)); + if ( + ((l._mesh = Ee.a.CreateSphere(n + "_mesh", r.resolution, r.size, s, !1, Ee.a.BACKSIDE)), + (u.opacityFresnel = !1), + (u.useEquirectangularFOV = !0), + (u.fovMultiplier = 1), + (l.photoTexture = new ln.a(i, s, !0, !l._useDirectMapping, void 0, void 0, function (e, t) { + l.onLoadErrorObservable.notifyObservers(e || "Unknown error occured"), c && c(e, t); + })), + (l.photoTexture.anisotropicFilteringLevel = 1), + l.photoTexture.onLoadObservable.addOnce(function () { + l._setReady(!0); + }), + (l._mesh.material = u), + (l._mesh.parent = l), + r.faceForward && s.activeCamera) + ) { + var h = s.activeCamera, + d = a.e.Forward(), + p = a.e.TransformNormal(d, h.getViewMatrix()); + p.normalize(), (l.rotation.y = Math.acos(a.e.Dot(d, p))); + } + return l; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "photoTexture", { + get: function () { + return this._photoTexture; + }, + set: function (e) { + this._photoTexture !== e && + ((this._photoTexture = e), + this._useDirectMapping + ? ((this._photoTexture.wrapU = ln.a.CLAMP_ADDRESSMODE), (this._photoTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), (this._material.diffuseTexture = this._photoTexture)) + : ((this._photoTexture.coordinatesMode = ln.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE), (this._photoTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), (this._material.reflectionTexture = this._photoTexture))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "mesh", { + get: function () { + return this._mesh; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fovMultiplier", { + get: function () { + return this._material.fovMultiplier; + }, + set: function (e) { + this._material.fovMultiplier = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "imageMode", { + get: function () { + return this._imageMode; + }, + set: function (e) { + this._imageMode !== e && this._changeImageMode(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._changeImageMode = function (e) { + var n = this; + switch ( + (this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + (this._imageMode = e), + (this._photoTexture.uScale = 1), + (this._photoTexture.vScale = 1), + (this._photoTexture.uOffset = 0), + (this._photoTexture.vOffset = 0), + e) + ) { + case t.MODE_SIDEBYSIDE: + (this._photoTexture.uScale = 0.5), + (this._onBeforeCameraRenderObserver = this._scene.onBeforeCameraRenderObservable.add(function (e) { + n._photoTexture.uOffset = e.isRightCamera ? 0.5 : 0; + })); + break; + case t.MODE_TOPBOTTOM: + (this._photoTexture.vScale = 0.5), + (this._onBeforeCameraRenderObserver = this._scene.onBeforeCameraRenderObservable.add(function (e) { + n._photoTexture.vOffset = e.isRightCamera ? 0.5 : 0; + })); + } + }), + (t.prototype.dispose = function (t, n) { + void 0 === n && (n = !1), + this._photoTexture.dispose(), + this._mesh.dispose(), + this._material.dispose(), + this.onLoadErrorObservable.clear(), + this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + e.prototype.dispose.call(this, t, n); + }), + (t.MODE_MONOSCOPIC = 0), + (t.MODE_TOPBOTTOM = 1), + (t.MODE_SIDEBYSIDE = 2), + t + ); + })(si.a), + Hr = n(49), + Wr = n(108), + Xr = n(145); + n(230); + function Yr(e) { + return e.charCodeAt(0) + (e.charCodeAt(1) << 8) + (e.charCodeAt(2) << 16) + (e.charCodeAt(3) << 24); + } + var Kr = Yr("DXT1"), + Zr = Yr("DXT3"), + qr = Yr("DXT5"), + Qr = Yr("DX10"), + Jr = (function () { + function e() {} + return ( + (e.GetDDSInfo = function (e) { + var t = new Int32Array(e.buffer, e.byteOffset, 31), + n = new Int32Array(e.buffer, e.byteOffset, 35), + i = 1; + 131072 & t[2] && (i = Math.max(1, t[7])); + var r = t[21], + o = r === Qr ? n[32] : 0, + a = 0; + switch (r) { + case 113: + a = 2; + break; + case 116: + a = 1; + break; + case Qr: + if (10 === o) { + a = 2; + break; + } + if (2 === o) { + a = 1; + break; + } + } + return { + width: t[4], + height: t[3], + mipmapCount: i, + isFourCC: 4 == (4 & t[20]), + isRGB: 64 == (64 & t[20]), + isLuminance: 131072 == (131072 & t[20]), + isCube: 512 == (512 & t[28]), + isCompressed: r === Kr || r === Zr || r === qr, + dxgiFormat: o, + textureType: a, + }; + }), + (e._ToHalfFloat = function (t) { + e._FloatView || ((e._FloatView = new Float32Array(1)), (e._Int32View = new Int32Array(e._FloatView.buffer))), (e._FloatView[0] = t); + var n = e._Int32View[0], + i = (n >> 16) & 32768, + r = (n >> 12) & 2047, + o = (n >> 23) & 255; + return o < 103 ? i : o > 142 ? ((i |= 31744), (i |= (255 == o ? 0 : 1) && 8388607 & n)) : o < 113 ? (i |= ((r |= 2048) >> (114 - o)) + ((r >> (113 - o)) & 1)) : ((i |= ((o - 112) << 10) | (r >> 1)), (i += 1 & r)); + }), + (e._FromHalfFloat = function (e) { + var t = (32768 & e) >> 15, + n = (31744 & e) >> 10, + i = 1023 & e; + return 0 === n ? (t ? -1 : 1) * Math.pow(2, -14) * (i / Math.pow(2, 10)) : 31 == n ? (i ? NaN : (1 / 0) * (t ? -1 : 1)) : (t ? -1 : 1) * Math.pow(2, n - 15) * (1 + i / Math.pow(2, 10)); + }), + (e._GetHalfFloatAsFloatRGBAArrayBuffer = function (t, n, i, r, o, a) { + for (var s = new Float32Array(r), c = new Uint16Array(o, i), l = 0, u = 0; u < n; u++) + for (var h = 0; h < t; h++) { + var d = 4 * (h + u * t); + (s[l] = e._FromHalfFloat(c[d])), + (s[l + 1] = e._FromHalfFloat(c[d + 1])), + (s[l + 2] = e._FromHalfFloat(c[d + 2])), + e.StoreLODInAlphaChannel ? (s[l + 3] = a) : (s[l + 3] = e._FromHalfFloat(c[d + 3])), + (l += 4); + } + return s; + }), + (e._GetHalfFloatRGBAArrayBuffer = function (t, n, i, r, o, a) { + if (e.StoreLODInAlphaChannel) { + for (var s = new Uint16Array(r), c = new Uint16Array(o, i), l = 0, u = 0; u < n; u++) + for (var h = 0; h < t; h++) { + var d = 4 * (h + u * t); + (s[l] = c[d]), (s[l + 1] = c[d + 1]), (s[l + 2] = c[d + 2]), (s[l + 3] = e._ToHalfFloat(a)), (l += 4); + } + return s; + } + return new Uint16Array(o, i, r); + }), + (e._GetFloatRGBAArrayBuffer = function (t, n, i, r, o, a) { + if (e.StoreLODInAlphaChannel) { + for (var s = new Float32Array(r), c = new Float32Array(o, i), l = 0, u = 0; u < n; u++) + for (var h = 0; h < t; h++) { + var d = 4 * (h + u * t); + (s[l] = c[d]), (s[l + 1] = c[d + 1]), (s[l + 2] = c[d + 2]), (s[l + 3] = a), (l += 4); + } + return s; + } + return new Float32Array(o, i, r); + }), + (e._GetFloatAsUIntRGBAArrayBuffer = function (t, n, i, r, o, a) { + for (var s = new Uint8Array(r), c = new Float32Array(o, i), l = 0, u = 0; u < n; u++) + for (var h = 0; h < t; h++) { + var d = 4 * (h + u * t); + (s[l] = 255 * z.a.Clamp(c[d])), (s[l + 1] = 255 * z.a.Clamp(c[d + 1])), (s[l + 2] = 255 * z.a.Clamp(c[d + 2])), e.StoreLODInAlphaChannel ? (s[l + 3] = a) : (s[l + 3] = 255 * z.a.Clamp(c[d + 3])), (l += 4); + } + return s; + }), + (e._GetHalfFloatAsUIntRGBAArrayBuffer = function (t, n, i, r, o, a) { + for (var s = new Uint8Array(r), c = new Uint16Array(o, i), l = 0, u = 0; u < n; u++) + for (var h = 0; h < t; h++) { + var d = 4 * (h + u * t); + (s[l] = 255 * z.a.Clamp(e._FromHalfFloat(c[d]))), + (s[l + 1] = 255 * z.a.Clamp(e._FromHalfFloat(c[d + 1]))), + (s[l + 2] = 255 * z.a.Clamp(e._FromHalfFloat(c[d + 2]))), + e.StoreLODInAlphaChannel ? (s[l + 3] = a) : (s[l + 3] = 255 * z.a.Clamp(e._FromHalfFloat(c[d + 3]))), + (l += 4); + } + return s; + }), + (e._GetRGBAArrayBuffer = function (e, t, n, i, r, o, a, s, c) { + for (var l = new Uint8Array(i), u = new Uint8Array(r, n), h = 0, d = 0; d < t; d++) + for (var p = 0; p < e; p++) { + var f = 4 * (p + d * e); + (l[h] = u[f + o]), (l[h + 1] = u[f + a]), (l[h + 2] = u[f + s]), (l[h + 3] = u[f + c]), (h += 4); + } + return l; + }), + (e._ExtractLongWordOrder = function (t) { + return 0 === t || 255 === t || -16777216 === t ? 0 : 1 + e._ExtractLongWordOrder(t >> 8); + }), + (e._GetRGBArrayBuffer = function (e, t, n, i, r, o, a, s) { + for (var c = new Uint8Array(i), l = new Uint8Array(r, n), u = 0, h = 0; h < t; h++) + for (var d = 0; d < e; d++) { + var p = 3 * (d + h * e); + (c[u] = l[p + o]), (c[u + 1] = l[p + a]), (c[u + 2] = l[p + s]), (u += 3); + } + return c; + }), + (e._GetLuminanceArrayBuffer = function (e, t, n, i, r) { + for (var o = new Uint8Array(i), a = new Uint8Array(r, n), s = 0, c = 0; c < t; c++) + for (var l = 0; l < e; l++) { + var u = l + c * e; + (o[s] = a[u]), s++; + } + return o; + }), + (e.UploadDDSLevels = function (t, n, i, r, o, a, s, c) { + void 0 === s && (s = -1); + var l = null; + r.sphericalPolynomial && (l = new Array()); + var u, + h, + d, + p, + f, + m, + b = t.getCaps().s3tc, + _ = new Int32Array(i.buffer, i.byteOffset, 31), + v = 0, + y = 0, + C = 1; + if (542327876 === _[0]) + if (r.isFourCC || r.isRGB || r.isLuminance) + if (!r.isCompressed || b) { + var P = _[22]; + d = _[1] + 4; + var x = !1; + if (r.isFourCC) + switch (_[21]) { + case Kr: + (C = 8), (y = b.COMPRESSED_RGBA_S3TC_DXT1_EXT); + break; + case Zr: + (C = 16), (y = b.COMPRESSED_RGBA_S3TC_DXT3_EXT); + break; + case qr: + (C = 16), (y = b.COMPRESSED_RGBA_S3TC_DXT5_EXT); + break; + case 113: + case 116: + x = !0; + break; + case Qr: + d += 20; + var T = !1; + switch (r.dxgiFormat) { + case 10: + case 2: + (x = !0), (T = !0); + break; + case 88: + (r.isRGB = !0), (r.isFourCC = !1), (P = 32), (T = !0); + } + if (T) break; + default: + return; + } + var S = e._ExtractLongWordOrder(_[23]), + O = e._ExtractLongWordOrder(_[24]), + E = e._ExtractLongWordOrder(_[25]), + M = e._ExtractLongWordOrder(_[26]); + x && (y = t._getRGBABufferInternalSizedFormat(r.textureType)), (f = 1), 131072 & _[2] && !1 !== o && (f = Math.max(1, _[7])); + for (var A = c || 0; A < a; A++) { + for (u = _[4], h = _[3], m = 0; m < f; ++m) { + if (-1 === s || s === m) { + var I = -1 === s ? m : 0; + if (!r.isCompressed && r.isFourCC) { + (n.format = 5), (v = u * h * 4); + var D = null; + t._badOS || t._badDesktopOS || (!t.getCaps().textureHalfFloat && !t.getCaps().textureFloat) + ? (128 === P + ? ((D = e._GetFloatAsUIntRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I)), l && 0 == I && l.push(e._GetFloatRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I))) + : 64 === P && + ((D = e._GetHalfFloatAsUIntRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I)), + l && 0 == I && l.push(e._GetHalfFloatAsFloatRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I))), + (n.type = 0)) + : 128 === P + ? ((n.type = 1), (D = e._GetFloatRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I)), l && 0 == I && l.push(D)) + : 64 !== P || t.getCaps().textureHalfFloat + ? ((n.type = 2), (D = e._GetHalfFloatRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I)), l && 0 == I && l.push(e._GetHalfFloatAsFloatRGBAArrayBuffer(u, h, d, v, i.buffer, I))) + : ((n.type = 1), (D = e._GetHalfFloatAsFloatRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, I)), l && 0 == I && l.push(D)), + D && t._uploadDataToTextureDirectly(n, D, A, I); + } else if (r.isRGB) + (n.type = 0), + 24 === P + ? ((n.format = 4), (v = u * h * 3), (p = e._GetRGBArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, S, O, E)), t._uploadDataToTextureDirectly(n, p, A, I)) + : ((n.format = 5), (v = u * h * 4), (p = e._GetRGBAArrayBuffer(u, h, i.byteOffset + d, v, i.buffer, S, O, E, M)), t._uploadDataToTextureDirectly(n, p, A, I)); + else if (r.isLuminance) { + var R = t._getUnpackAlignement(), + w = u; + (v = Math.floor((u + R - 1) / R) * R * (h - 1) + w), + (p = e._GetLuminanceArrayBuffer(u, h, i.byteOffset + d, v, i.buffer)), + (n.format = 1), + (n.type = 0), + t._uploadDataToTextureDirectly(n, p, A, I); + } else + (v = (((Math.max(4, u) / 4) * Math.max(4, h)) / 4) * C), (p = new Uint8Array(i.buffer, i.byteOffset + d, v)), (n.type = 0), t._uploadCompressedDataToTextureDirectly(n, y, u, h, p, A, I); + } + (d += P ? u * h * (P / 8) : v), (u *= 0.5), (h *= 0.5), (u = Math.max(1, u)), (h = Math.max(1, h)); + } + if (void 0 !== c) break; + } + l && l.length > 0 + ? (r.sphericalPolynomial = Xr.a.ConvertCubeMapToSphericalPolynomial({ size: _[4], right: l[0], left: l[1], up: l[2], down: l[3], front: l[4], back: l[5], format: 5, type: 1, gammaSpace: !1 })) + : (r.sphericalPolynomial = void 0); + } else g.a.Error("Compressed textures are not supported on this platform."); + else g.a.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code"); + else g.a.Error("Invalid magic number in DDS header"); + }), + (e.StoreLODInAlphaChannel = !1), + e + ); + })(); + Mi.a.prototype.createPrefilteredCubeTexture = function (e, t, n, i, r, o, a, s, c) { + var l = this; + void 0 === r && (r = null), void 0 === o && (o = null), void 0 === s && (s = null), void 0 === c && (c = !0); + return this.createCubeTexture( + e, + t, + null, + !1, + function (e) { + if (e) { + var o = e.texture; + if ((c ? e.info.sphericalPolynomial && (o._sphericalPolynomial = e.info.sphericalPolynomial) : (o._sphericalPolynomial = new Wr.b()), (o._source = pn.b.CubePrefiltered), l.getCaps().textureLOD)) r && r(o); + else { + var a = l._gl, + s = e.width; + if (s) { + for (var u = [], h = 0; h < 3; h++) { + var d = 1 - h / 2, + p = i, + f = z.a.Log2(s) * n + i, + m = p + (f - p) * d, + b = Math.round(Math.min(Math.max(m, 0), f)), + _ = new pn.a(l, pn.b.Temp); + if ( + ((_.type = o.type), + (_.format = o.format), + (_.width = Math.pow(2, Math.max(z.a.Log2(s) - b, 0))), + (_.height = _.width), + (_.isCube = !0), + l._bindTextureDirectly(a.TEXTURE_CUBE_MAP, _, !0), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_MAG_FILTER, a.LINEAR), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_MIN_FILTER, a.LINEAR), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), + e.isDDS) + ) { + var v = e.info, + y = e.data; + l._unpackFlipY(v.isCompressed), Jr.UploadDDSLevels(l, _, y, v, !0, 6, b); + } else g.a.Warn("DDS is the only prefiltered cube map supported so far."); + l._bindTextureDirectly(a.TEXTURE_CUBE_MAP, null); + var C = new Cr.a(t); + (C.isCube = !0), (C._texture = _), (_.isReady = !0), u.push(C); + } + (o._lodTextureHigh = u[2]), (o._lodTextureMid = u[1]), (o._lodTextureLow = u[0]), r && r(o); + } + } + } else r && r(null); + }, + o, + a, + s, + c, + n, + i + ); + }; + var $r = n(53), + eo = (function () { + function e() { + this.supportCascades = !0; + } + return ( + (e.prototype.canLoad = function (e) { + return $r.a.EndsWith(e, ".dds"); + }), + (e.prototype.loadCubeData = function (e, t, n, i, r) { + var o, + a = t.getEngine(), + s = !1; + if (Array.isArray(e)) + for (var c = 0; c < e.length; c++) { + var l = e[c]; + (o = Jr.GetDDSInfo(l)), + (t.width = o.width), + (t.height = o.height), + (s = (o.isRGB || o.isLuminance || o.mipmapCount > 1) && t.generateMipMaps), + a._unpackFlipY(o.isCompressed), + Jr.UploadDDSLevels(a, t, l, o, s, 6, -1, c), + o.isFourCC || 1 !== o.mipmapCount || a.generateMipMapsForCubemap(t); + } + else { + var u = e; + (o = Jr.GetDDSInfo(u)), + (t.width = o.width), + (t.height = o.height), + n && (o.sphericalPolynomial = new Wr.b()), + (s = (o.isRGB || o.isLuminance || o.mipmapCount > 1) && t.generateMipMaps), + a._unpackFlipY(o.isCompressed), + Jr.UploadDDSLevels(a, t, u, o, s, 6), + o.isFourCC || 1 !== o.mipmapCount || a.generateMipMapsForCubemap(t, !1); + } + a._setCubeMapTextureParams(s), (t.isReady = !0), t.onLoadedObservable.notifyObservers(t), t.onLoadedObservable.clear(), i && i({ isDDS: !0, width: t.width, info: o, data: e, texture: t }); + }), + (e.prototype.loadData = function (e, t, n) { + var i = Jr.GetDDSInfo(e), + r = (i.isRGB || i.isLuminance || i.mipmapCount > 1) && t.generateMipMaps && i.width >> (i.mipmapCount - 1) == 1; + n(i.width, i.height, r, i.isFourCC, function () { + Jr.UploadDDSLevels(t.getEngine(), t, e, i, r, 1); + }); + }), + e + ); + })(); + ue.a._TextureLoaders.push(new eo()); + var to = (function () { + function e() { + this.supportCascades = !1; + } + return ( + (e.prototype.canLoad = function (e) { + return $r.a.EndsWith(e, ".env"); + }), + (e.prototype.loadCubeData = function (e, t, n, i, r) { + if (!Array.isArray(e)) { + var o = ji.a.GetEnvInfo(e); + o + ? ((t.width = o.width), + (t.height = o.width), + ji.a.UploadEnvSpherical(t, o), + ji.a.UploadEnvLevelsAsync(t, e, o).then(function () { + (t.isReady = !0), t.onLoadedObservable.notifyObservers(t), t.onLoadedObservable.clear(), i && i(); + })) + : r && r("Can not parse the environment file", null); + } + }), + (e.prototype.loadData = function (e, t, n) { + throw ".env not supported in 2d."; + }), + e + ); + })(); + ue.a._TextureLoaders.push(new to()); + var no = (function () { + function e(t, n, i, r) { + if (((this.data = t), (this.isInvalid = !1), !e.IsValid(t))) return (this.isInvalid = !0), void g.a.Error("texture missing KTX identifier"); + var o = Uint32Array.BYTES_PER_ELEMENT, + a = new DataView(this.data.buffer, this.data.byteOffset + 12, 13 * o), + s = 67305985 === a.getUint32(0, !0); + (this.glType = a.getUint32(1 * o, s)), + (this.glTypeSize = a.getUint32(2 * o, s)), + (this.glFormat = a.getUint32(3 * o, s)), + (this.glInternalFormat = a.getUint32(4 * o, s)), + (this.glBaseInternalFormat = a.getUint32(5 * o, s)), + (this.pixelWidth = a.getUint32(6 * o, s)), + (this.pixelHeight = a.getUint32(7 * o, s)), + (this.pixelDepth = a.getUint32(8 * o, s)), + (this.numberOfArrayElements = a.getUint32(9 * o, s)), + (this.numberOfFaces = a.getUint32(10 * o, s)), + (this.numberOfMipmapLevels = a.getUint32(11 * o, s)), + (this.bytesOfKeyValueData = a.getUint32(12 * o, s)), + 0 === this.glType + ? ((this.numberOfMipmapLevels = Math.max(1, this.numberOfMipmapLevels)), + 0 !== this.pixelHeight && 0 === this.pixelDepth + ? 0 === this.numberOfArrayElements + ? this.numberOfFaces === n + ? (this.loadType = e.COMPRESSED_2D) + : g.a.Error("number of faces expected" + n + ", but found " + this.numberOfFaces) + : g.a.Error("texture arrays not currently supported") + : g.a.Error("only 2D textures currently supported")) + : g.a.Error("only compressed formats currently supported"); + } + return ( + (e.prototype.uploadLevels = function (t, n) { + switch (this.loadType) { + case e.COMPRESSED_2D: + this._upload2DCompressedLevels(t, n); + break; + case e.TEX_2D: + case e.COMPRESSED_3D: + case e.TEX_3D: + } + }), + (e.prototype._upload2DCompressedLevels = function (t, n) { + for (var i = e.HEADER_LEN + this.bytesOfKeyValueData, r = this.pixelWidth, o = this.pixelHeight, a = n ? this.numberOfMipmapLevels : 1, s = 0; s < a; s++) { + var c = new Int32Array(this.data.buffer, this.data.byteOffset + i, 1)[0]; + i += 4; + for (var l = 0; l < this.numberOfFaces; l++) { + var u = new Uint8Array(this.data.buffer, this.data.byteOffset + i, c); + t.getEngine()._uploadCompressedDataToTextureDirectly(t, this.glInternalFormat, r, o, u, l, s), (i += c), (i += 3 - ((c + 3) % 4)); + } + (r = Math.max(1, 0.5 * r)), (o = Math.max(1, 0.5 * o)); + } + }), + (e.IsValid = function (e) { + if (e.byteLength >= 12) { + var t = new Uint8Array(e.buffer, e.byteOffset, 12); + if (171 === t[0] && 75 === t[1] && 84 === t[2] && 88 === t[3] && 32 === t[4] && 49 === t[5] && 49 === t[6] && 187 === t[7] && 13 === t[8] && 10 === t[9] && 26 === t[10] && 10 === t[11]) return !0; + } + return !1; + }), + (e.HEADER_LEN = 64), + (e.COMPRESSED_2D = 0), + (e.COMPRESSED_3D = 1), + (e.TEX_2D = 2), + (e.TEX_3D = 3), + e + ); + })(), + io = (function () { + function e(t) { + var n = this; + e._ModulePromise || + (e._ModulePromise = new Promise(function (i) { + LIBKTX().then(function (r) { + r.GL.makeContextCurrent(r.GL.registerContext(t._gl, { majorVersion: t._webGLVersion })), (e._TranscodeFormat = n._determineTranscodeFormat(r.TranscodeTarget, t.getCaps())), i({ module: r }); + }); + })); + } + return ( + (e.prototype.uploadAsync = function (t, n) { + return e._ModulePromise.then(function (i) { + var r = new i.module.ktxTexture(t); + try { + r.isBasisSupercompressed && r.transcodeBasis(e._TranscodeFormat, 0), (n.width = n.baseWidth = r.baseWidth), (n.height = n.baseHeight = r.baseHeight), (n.generateMipMaps = !1); + var o = r.glUpload(); + if (0 !== o.error) throw new Error("Failed to upload: " + o.error); + (n._webGLTexture = o.texture), (n.isReady = !0); + } finally { + r.delete(); + } + }); + }), + (e.prototype._determineTranscodeFormat = function (e, t) { + if (t.s3tc) return e.BC1_OR_3; + if (t.etc2) return e.ETC; + throw new Error("No compatible format available"); + }), + (e.IsValid = function (e) { + if (e.byteLength >= 12) { + var t = new Uint8Array(e.buffer, e.byteOffset, 12); + if (171 === t[0] && 75 === t[1] && 84 === t[2] && 88 === t[3] && 32 === t[4] && 50 === t[5] && 48 === t[6] && 187 === t[7] && 13 === t[8] && 10 === t[9] && 26 === t[10] && 10 === t[11]) return !0; + } + return !1; + }), + e + ); + })(), + ro = (function () { + function e() { + this.supportCascades = !1; + } + return ( + (e.prototype.canLoad = function (e) { + return $r.a.EndsWith(e, ".ktx") || $r.a.EndsWith(e, ".ktx2"); + }), + (e.prototype.loadCubeData = function (e, t, n, i, r) { + if (!Array.isArray(e)) { + t._invertVScale = !t.invertY; + var o = t.getEngine(), + a = new no(e, 6), + s = a.numberOfMipmapLevels > 1 && t.generateMipMaps; + o._unpackFlipY(!0), + a.uploadLevels(t, t.generateMipMaps), + (t.width = a.pixelWidth), + (t.height = a.pixelHeight), + o._setCubeMapTextureParams(s), + (t.isReady = !0), + t.onLoadedObservable.notifyObservers(t), + t.onLoadedObservable.clear(), + i && i(); + } + }), + (e.prototype.loadData = function (e, t, n) { + if (no.IsValid(e)) { + t._invertVScale = !t.invertY; + var i = new no(e, 1); + n( + i.pixelWidth, + i.pixelHeight, + t.generateMipMaps, + !0, + function () { + i.uploadLevels(t, t.generateMipMaps); + }, + i.isInvalid + ); + } else if (io.IsValid(e)) { + new io(t.getEngine()).uploadAsync(e, t).then( + function () { + n(t.width, t.height, !1, !0, function () {}, !1); + }, + function (e) { + g.a.Warn("Failed to load KTX2 texture data: " + e.message), n(0, 0, !1, !1, function () {}, !0); + } + ); + } else n(0, 0, !1, !1, function () {}, !0); + }), + e + ); + })(); + ue.a._TextureLoaders.unshift(new ro()); + var oo = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, a.e.Zero(), n) || this; + return ( + (r._xrSessionManager = i), + (r._firstFrame = !1), + (r._referenceQuaternion = a.b.Identity()), + (r._referencedPosition = new a.e()), + (r._xrInvPositionCache = new a.e()), + (r._xrInvQuaternionCache = a.b.Identity()), + (r.compensateOnFirstFrame = !0), + (r.minZ = 0.1), + (r.rotationQuaternion = new a.b()), + (r.cameraRigMode = De.a.RIG_MODE_CUSTOM), + (r.updateUpVectorFromRotation = !0), + r._updateNumberOfRigCameras(1), + r._xrSessionManager.onXRSessionInit.add(function () { + r._referencedPosition.copyFromFloats(0, 0, 0), r._referenceQuaternion.copyFromFloats(0, 0, 0, 1), (r._firstFrame = r.compensateOnFirstFrame); + }), + r._xrSessionManager.onXRFrameObservable.add( + function (e) { + r._firstFrame && r._updateFromXRSession(), r._updateReferenceSpace(), r._updateFromXRSession(); + }, + void 0, + !0 + ), + r + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "realWorldHeight", { + get: function () { + var e = this._xrSessionManager.currentFrame && this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.baseReferenceSpace); + return e && e.transform ? e.transform.position.y : 0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._updateForDualEyeDebugging = function () { + this._updateNumberOfRigCameras(2), + (this.rigCameras[0].viewport = new vn.a(0, 0, 0.5, 1)), + (this.rigCameras[0].outputRenderTarget = null), + (this.rigCameras[1].viewport = new vn.a(0.5, 0, 0.5, 1)), + (this.rigCameras[1].outputRenderTarget = null); + }), + (t.prototype.setTransformationFromNonVRCamera = function (e, t) { + (void 0 === e && (e = this.getScene().activeCamera), void 0 === t && (t = !0), e && e !== this) && + (e.computeWorldMatrix().decompose(void 0, this.rotationQuaternion, this.position), + (this.position.y = 0), + a.b.FromEulerAnglesToRef(0, this.rotationQuaternion.toEulerAngles().y, 0, this.rotationQuaternion), + (this._firstFrame = !0), + t && this._xrSessionManager.resetReferenceSpace()); + }), + (t.prototype.getClassName = function () { + return "WebXRCamera"; + }), + (t.prototype._updateFromXRSession = function () { + var e = this, + t = this._xrSessionManager.currentFrame && this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.referenceSpace); + t && + (t.transform && + (this._referencedPosition.copyFrom(t.transform.position), + this._referenceQuaternion.copyFrom(t.transform.orientation), + this._scene.useRightHandedSystem || ((this._referencedPosition.z *= -1), (this._referenceQuaternion.z *= -1), (this._referenceQuaternion.w *= -1)), + this._firstFrame + ? ((this._firstFrame = !1), (this.position.y += this._referencedPosition.y), this._referenceQuaternion.copyFromFloats(0, 0, 0, 1)) + : (this.rotationQuaternion.copyFrom(this._referenceQuaternion), this.position.copyFrom(this._referencedPosition))), + this.rigCameras.length !== t.views.length && this._updateNumberOfRigCameras(t.views.length), + t.views.forEach(function (t, n) { + var i = e.rigCameras[n]; + if ( + (i.isLeftCamera || i.isRightCamera || ("right" === t.eye ? (i._isRightCamera = !0) : "left" === t.eye && (i._isLeftCamera = !0)), + t.transform.position + ? (i.position.copyFrom(t.transform.position), + i.rotationQuaternion.copyFrom(t.transform.orientation), + e._scene.useRightHandedSystem || ((i.position.z *= -1), (i.rotationQuaternion.z *= -1), (i.rotationQuaternion.w *= -1))) + : (a.a.FromFloat32ArrayToRefScaled(t.transform.matrix, 0, 1, i._computedViewMatrix), e._scene.useRightHandedSystem || i._computedViewMatrix.toggleModelMatrixHandInPlace()), + a.a.FromFloat32ArrayToRefScaled(t.projectionMatrix, 0, 1, i._projectionMatrix), + e._scene.useRightHandedSystem || i._projectionMatrix.toggleProjectionMatrixHandInPlace(), + e._xrSessionManager.session.renderState.baseLayer) + ) { + var r = e._xrSessionManager.session.renderState.baseLayer.getViewport(t), + o = e._xrSessionManager.session.renderState.baseLayer.framebufferWidth, + s = e._xrSessionManager.session.renderState.baseLayer.framebufferHeight; + (i.viewport.width = r.width / o), (i.viewport.height = r.height / s), (i.viewport.x = r.x / o), (i.viewport.y = r.y / s); + } + i.outputRenderTarget = e._xrSessionManager.getRenderTargetTextureForEye(t.eye); + })); + }), + (t.prototype._updateNumberOfRigCameras = function (e) { + for (void 0 === e && (e = 1); this.rigCameras.length < e; ) { + var t = new vt.a("XR-RigCamera: " + this.rigCameras.length, a.e.Zero(), this.getScene()); + (t.minZ = 0.1), (t.rotationQuaternion = new a.b()), (t.updateUpVectorFromRotation = !0), (t.isRigCamera = !0), (t.rigParent = this), this.rigCameras.push(t); + } + for (; this.rigCameras.length > e; ) { + var n = this.rigCameras.pop(); + n && n.dispose(); + } + }), + (t.prototype._updateReferenceSpace = function () { + (this.position.equals(this._referencedPosition) && this.rotationQuaternion.equals(this._referenceQuaternion)) || + (this.position.subtractToRef(this._referencedPosition, this._referencedPosition), + this._referenceQuaternion.conjugateInPlace(), + this._referenceQuaternion.multiplyToRef(this.rotationQuaternion, this._referenceQuaternion), + this._updateReferenceSpaceOffset(this._referencedPosition, this._referenceQuaternion.normalize())); + }), + (t.prototype._updateReferenceSpaceOffset = function (e, t, n) { + if ((void 0 === n && (n = !1), this._xrSessionManager.referenceSpace && this._xrSessionManager.currentFrame)) { + this._xrInvPositionCache.copyFrom(e), + t ? this._xrInvQuaternionCache.copyFrom(t) : this._xrInvQuaternionCache.copyFromFloats(0, 0, 0, 1), + this._scene.useRightHandedSystem || ((this._xrInvPositionCache.z *= -1), (this._xrInvQuaternionCache.z *= -1), (this._xrInvQuaternionCache.w *= -1)), + this._xrInvPositionCache.negateInPlace(), + this._xrInvQuaternionCache.conjugateInPlace(), + this._xrInvPositionCache.rotateByQuaternionToRef(this._xrInvQuaternionCache, this._xrInvPositionCache), + n && (this._xrInvPositionCache.y = 0); + var i = new XRRigidTransform(Object(h.a)({}, this._xrInvPositionCache), Object(h.a)({}, this._xrInvQuaternionCache)), + r = this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(i), + o = this._xrSessionManager.currentFrame && this._xrSessionManager.currentFrame.getViewerPose(r); + if (o) { + var s = new a.e(); + s.copyFrom(o.transform.position), this._scene.useRightHandedSystem || (s.z *= -1), this.position.subtractToRef(s, s), this._scene.useRightHandedSystem || (s.z *= -1), s.negateInPlace(); + var c = new XRRigidTransform(Object(h.a)({}, s)); + this._xrSessionManager.referenceSpace = r.getOffsetReferenceSpace(c); + } + } + }), + t + ); + })(yt.a), + ao = (function () { + function e() {} + return ( + (e.ANCHOR_SYSTEM = "xr-anchor-system"), + (e.BACKGROUND_REMOVER = "xr-background-remover"), + (e.HIT_TEST = "xr-hit-test"), + (e.PHYSICS_CONTROLLERS = "xr-physics-controller"), + (e.PLANE_DETECTION = "xr-plane-detection"), + (e.POINTER_SELECTION = "xr-controller-pointer-selection"), + (e.TELEPORTATION = "xr-controller-teleportation"), + e + ); + })(), + so = (function () { + function e(e) { + var t = this; + (this._xrSessionManager = e), + (this._features = {}), + this._xrSessionManager.onXRSessionInit.add(function () { + t.getEnabledFeatures().forEach(function (e) { + var n = t._features[e]; + !n.enabled || n.featureImplementation.attached || n.featureImplementation.disableAutoAttach || t.attachFeature(e); + }); + }), + this._xrSessionManager.onXRSessionEnded.add(function () { + t.getEnabledFeatures().forEach(function (e) { + var n = t._features[e]; + n.enabled && n.featureImplementation.attached && t.detachFeature(e); + }); + }); + } + return ( + (e.AddWebXRFeature = function (e, t, n, i) { + void 0 === n && (n = 1), + void 0 === i && (i = !1), + (this._AvailableFeatures[e] = this._AvailableFeatures[e] || { latest: n }), + n > this._AvailableFeatures[e].latest && (this._AvailableFeatures[e].latest = n), + i && (this._AvailableFeatures[e].stable = n), + (this._AvailableFeatures[e][n] = t); + }), + (e.ConstructFeature = function (e, t, n, i) { + void 0 === t && (t = 1); + var r = this._AvailableFeatures[e][t]; + if (!r) throw new Error("feature not found"); + return r(n, i); + }), + (e.GetAvailableFeatures = function () { + return Object.keys(this._AvailableFeatures); + }), + (e.GetAvailableVersions = function (e) { + return Object.keys(this._AvailableFeatures[e]); + }), + (e.GetLatestVersionOfFeature = function (e) { + return (this._AvailableFeatures[e] && this._AvailableFeatures[e].latest) || -1; + }), + (e.GetStableVersionOfFeature = function (e) { + return (this._AvailableFeatures[e] && this._AvailableFeatures[e].stable) || -1; + }), + (e.prototype.attachFeature = function (e) { + var t = this._features[e]; + t && t.enabled && !t.featureImplementation.attached && t.featureImplementation.attach(); + }), + (e.prototype.detachFeature = function (e) { + var t = this._features[e]; + t && t.featureImplementation.attached && t.featureImplementation.detach(); + }), + (e.prototype.disableFeature = function (e) { + var t = "string" == typeof e ? e : e.Name, + n = this._features[t]; + return !(!n || !n.enabled) && ((n.enabled = !1), this.detachFeature(t), n.featureImplementation.dispose(), !0); + }), + (e.prototype.dispose = function () { + var e = this; + this.getEnabledFeatures().forEach(function (t) { + e.disableFeature(t), e._features[t].featureImplementation.dispose(); + }); + }), + (e.prototype.enableFeature = function (t, n, i, r) { + void 0 === n && (n = "latest"), void 0 === i && (i = {}), void 0 === r && (r = !0); + var o = "string" == typeof t ? t : t.Name, + a = 0; + if ("string" == typeof n) { + if (!n) throw new Error("Error in provided version - " + o + " (" + n + ")"); + if (-1 === (a = "stable" === n ? e.GetStableVersionOfFeature(o) : "latest" === n ? e.GetLatestVersionOfFeature(o) : +n) || isNaN(a)) throw new Error("feature not found - " + o + " (" + n + ")"); + } else a = n; + var s = this._features[o], + c = e.ConstructFeature(o, a, this._xrSessionManager, i); + if (!c) throw new Error("feature not found - " + o); + return ( + s && this.disableFeature(o), + (this._features[o] = { featureImplementation: c(), enabled: !0, version: a }), + r ? this._xrSessionManager.session && !s.featureImplementation.attached && this.attachFeature(o) : (this._features[o].featureImplementation.disableAutoAttach = !0), + this._features[o].featureImplementation + ); + }), + (e.prototype.getEnabledFeature = function (e) { + return this._features[e] && this._features[e].featureImplementation; + }), + (e.prototype.getEnabledFeatures = function () { + return Object.keys(this._features); + }), + (e._AvailableFeatures = {}), + e + ); + })(), + co = (function () { + function e(e) { + var t = this; + (this.scene = e), + (this._nonVRCamera = null), + (this._originalSceneAutoClear = !0), + (this._supported = !1), + (this.onInitialXRPoseSetObservable = new o.c()), + (this.onStateChangedObservable = new o.c()), + (this.state = zn.NOT_IN_XR), + (this.sessionManager = new Gn(e)), + (this.camera = new oo("", e, this.sessionManager)), + (this.featuresManager = new so(this.sessionManager)), + e.onDisposeObservable.add(function () { + t.exitXRAsync(); + }); + } + return ( + (e.CreateAsync = function (t) { + var n = new e(t); + return n.sessionManager + .initializeAsync() + .then(function () { + return (n._supported = !0), n; + }) + .catch(function (e) { + throw (n._setState(zn.NOT_IN_XR), n.dispose(), e); + }); + }), + (e.prototype.dispose = function () { + this.camera.dispose(), this.onStateChangedObservable.clear(), this.onInitialXRPoseSetObservable.clear(), this.sessionManager.dispose(), this._nonVRCamera && (this.scene.activeCamera = this._nonVRCamera); + }), + (e.prototype.enterXRAsync = function (e, t, n) { + var i = this; + if ((void 0 === n && (n = this.sessionManager.getWebXRRenderTarget()), !this._supported)) throw "WebXR not supported in this browser or environment"; + this._setState(zn.ENTERING_XR); + var r = { optionalFeatures: "viewer" !== t && "local" !== t ? [t] : [] }; + return ( + "immersive-ar" === e && "local" !== t && g.a.Warn("We recommend using 'local' reference space type when using 'immersive-ar' session mode"), + this.sessionManager + .isSessionSupportedAsync(e) + .then(function (t) { + if (!t) throw new Error('Session mode "' + e + '" not supported in browser'); + return i.sessionManager.initializeSessionAsync(e, r); + }) + .then(function () { + return i.sessionManager.setReferenceSpaceTypeAsync(t); + }) + .then(function () { + return n.initializeXRLayerAsync(i.sessionManager.session); + }) + .then(function () { + return i.sessionManager.updateRenderStateAsync({ depthFar: i.camera.maxZ, depthNear: i.camera.minZ, baseLayer: n.xrLayer }); + }) + .then(function () { + return ( + i.sessionManager.runXRRenderLoop(), + (i._originalSceneAutoClear = i.scene.autoClear), + (i._nonVRCamera = i.scene.activeCamera), + (i.scene.autoClear = !1), + (i.scene.activeCamera = i.camera), + "immersive-ar" !== e ? i._nonXRToXRCamera() : (i.camera.compensateOnFirstFrame = !1), + i.sessionManager.onXRSessionEnded.addOnce(function () { + i.camera.rigCameras.forEach(function (e) { + e.outputRenderTarget = null; + }), + (i.scene.autoClear = i._originalSceneAutoClear), + (i.scene.activeCamera = i._nonVRCamera), + "immersive-ar" !== e && i.camera.compensateOnFirstFrame && (i._nonVRCamera.setPosition ? i._nonVRCamera.setPosition(i.camera.position) : i._nonVRCamera.position.copyFrom(i.camera.position)), + i._setState(zn.NOT_IN_XR); + }), + i.sessionManager.onXRFrameObservable.addOnce(function () { + i._setState(zn.IN_XR); + }), + i.sessionManager + ); + }) + .catch(function (e) { + throw (i._setState(zn.NOT_IN_XR), e); + }) + ); + }), + (e.prototype.exitXRAsync = function () { + return this._setState(zn.EXITING_XR), this.sessionManager.exitXRAsync(); + }), + (e.prototype._nonXRToXRCamera = function () { + this.camera.setTransformationFromNonVRCamera(this._nonVRCamera), this.onInitialXRPoseSetObservable.notifyObservers(this.camera); + }), + (e.prototype._setState = function (e) { + this.state !== e && ((this.state = e), this.onStateChangedObservable.notifyObservers(this.state)); + }), + e + ); + })(), + lo = (function () { + function e(e, t, n, i) { + void 0 === n && (n = -1), + void 0 === i && (i = []), + (this.id = e), + (this.type = t), + (this._buttonIndex = n), + (this._axesIndices = i), + (this._axes = { x: 0, y: 0 }), + (this._changes = {}), + (this._currentValue = 0), + (this._hasChanges = !1), + (this._pressed = !1), + (this._touched = !1), + (this.onAxisValueChangedObservable = new o.c()), + (this.onButtonStateChangedObservable = new o.c()); + } + return ( + Object.defineProperty(e.prototype, "axes", { + get: function () { + return this._axes; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "changes", { + get: function () { + return this._changes; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasChanges", { + get: function () { + return this._hasChanges; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "pressed", { + get: function () { + return this._pressed; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "touched", { + get: function () { + return this._touched; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "value", { + get: function () { + return this._currentValue; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this.onAxisValueChangedObservable.clear(), this.onButtonStateChangedObservable.clear(); + }), + (e.prototype.isAxes = function () { + return 0 !== this._axesIndices.length; + }), + (e.prototype.isButton = function () { + return -1 !== this._buttonIndex; + }), + (e.prototype.update = function (e) { + var t = !1, + n = !1; + if (((this._hasChanges = !1), (this._changes = {}), this.isButton())) { + var i = e.buttons[this._buttonIndex]; + if (!i) return; + this._currentValue !== i.value && ((this.changes.value = { current: i.value, previous: this._currentValue }), (t = !0), (this._currentValue = i.value)), + this._touched !== i.touched && ((this.changes.touched = { current: i.touched, previous: this._touched }), (t = !0), (this._touched = i.touched)), + this._pressed !== i.pressed && ((this.changes.pressed = { current: i.pressed, previous: this._pressed }), (t = !0), (this._pressed = i.pressed)); + } + this.isAxes() && + (this._axes.x !== e.axes[this._axesIndices[0]] && + ((this.changes.axes = { current: { x: e.axes[this._axesIndices[0]], y: this._axes.y }, previous: { x: this._axes.x, y: this._axes.y } }), (this._axes.x = e.axes[this._axesIndices[0]]), (n = !0)), + this._axes.y !== e.axes[this._axesIndices[1]] && + (this.changes.axes + ? (this.changes.axes.current.y = e.axes[this._axesIndices[1]]) + : (this.changes.axes = { current: { x: this._axes.x, y: e.axes[this._axesIndices[1]] }, previous: { x: this._axes.x, y: this._axes.y } }), + (this._axes.y = e.axes[this._axesIndices[1]]), + (n = !0))), + t && ((this._hasChanges = !0), this.onButtonStateChangedObservable.notifyObservers(this)), + n && ((this._hasChanges = !0), this.onAxisValueChangedObservable.notifyObservers(this._axes)); + }), + (e.BUTTON_TYPE = "button"), + (e.SQUEEZE_TYPE = "squeeze"), + (e.THUMBSTICK_TYPE = "thumbstick"), + (e.TOUCHPAD_TYPE = "touchpad"), + (e.TRIGGER_TYPE = "trigger"), + e + ); + })(), + uo = (function () { + function e(e, t, n, i, r) { + var a = this; + void 0 === r && (r = !1), + (this.scene = e), + (this.layout = t), + (this.gamepadObject = n), + (this.handness = i), + (this._initComponent = function (e) { + if (e) { + var t = a.layout.components[e], + n = t.type, + i = t.gamepadIndices.button, + r = []; + void 0 !== t.gamepadIndices.xAxis && void 0 !== t.gamepadIndices.yAxis && r.push(t.gamepadIndices.xAxis, t.gamepadIndices.yAxis), (a.components[e] = new lo(e, n, i, r)); + } + }), + (this._modelReady = !1), + (this.components = {}), + (this.disableAnimation = !1), + (this.onModelLoadedObservable = new o.c()), + t.components && Object.keys(t.components).forEach(this._initComponent); + } + return ( + (e.prototype.dispose = function () { + var e = this; + this.getComponentIds().forEach(function (t) { + return e.getComponent(t).dispose(); + }), + this.rootMesh && this.rootMesh.dispose(); + }), + (e.prototype.getAllComponentsOfType = function (e) { + var t = this; + return this.getComponentIds() + .map(function (e) { + return t.components[e]; + }) + .filter(function (t) { + return t.type === e; + }); + }), + (e.prototype.getComponent = function (e) { + return this.components[e]; + }), + (e.prototype.getComponentIds = function () { + return Object.keys(this.components); + }), + (e.prototype.getComponentOfType = function (e) { + return this.getAllComponentsOfType(e)[0] || null; + }), + (e.prototype.getMainComponent = function () { + return this.getComponent(this.layout.selectComponentId); + }), + (e.prototype.loadModel = function () { + return Object(h.b)(this, void 0, void 0, function () { + var e, + t, + n = this; + return Object(h.e)(this, function (i) { + return ( + (e = !this._getModelLoadingConstraints()), + (t = this._getGenericFilenameAndPath()), + e ? g.a.Warn("Falling back to generic models") : (t = this._getFilenameAndPath()), + [ + 2, + new Promise(function (i, r) { + $i.a.ImportMesh( + "", + t.path, + t.filename, + n.scene, + function (t) { + e ? n._getGenericParentMesh(t) : n._setRootMesh(t), n._processLoadedModel(t), (n._modelReady = !0), n.onModelLoadedObservable.notifyObservers(n), i(!0); + }, + null, + function (e, i) { + g.a.Log(i), g.a.Warn("Failed to retrieve controller model of type " + n.profileId + " from the remote server: " + t.path + t.filename), r(i); + } + ); + }), + ] + ); + }); + }); + }), + (e.prototype.updateFromXRFrame = function (e) { + var t = this; + this.getComponentIds().forEach(function (e) { + return t.getComponent(e).update(t.gamepadObject); + }), + this.updateModel(e); + }), + (e.prototype._getChildByName = function (e, t) { + return e.getChildren(function (e) { + return e.name === t; + }, !1)[0]; + }), + (e.prototype._getImmediateChildByName = function (e, t) { + return e.getChildren(function (e) { + return e.name == t; + }, !0)[0]; + }), + (e.prototype._lerpTransform = function (e, t, n) { + if (e.minMesh && e.maxMesh && e.minMesh.rotationQuaternion && e.maxMesh.rotationQuaternion && e.valueMesh.rotationQuaternion) { + var i = n ? 0.5 * t + 0.5 : t; + a.b.SlerpToRef(e.minMesh.rotationQuaternion, e.maxMesh.rotationQuaternion, i, e.valueMesh.rotationQuaternion), a.e.LerpToRef(e.minMesh.position, e.maxMesh.position, i, e.valueMesh.position); + } + }), + (e.prototype.updateModel = function (e) { + this._modelReady && this._updateModel(e); + }), + (e.prototype._getGenericFilenameAndPath = function () { + return { filename: "generic.babylon", path: "https://controllers.babylonjs.com/generic/" }; + }), + (e.prototype._getGenericParentMesh = function (e) { + var t = this; + (this.rootMesh = new Ee.a(this.profileId + " " + this.handness, this.scene)), + e.forEach(function (e) { + e.parent || ((e.isPickable = !1), e.setParent(t.rootMesh)); + }), + (this.rootMesh.rotationQuaternion = a.b.FromEulerAngles(0, Math.PI, 0)); + }), + e + ); + })(), + ho = (function (e) { + function t(n, i, r) { + var o = e.call(this, n, po[r], i, r) || this; + return (o.profileId = t.ProfileId), o; + } + return ( + Object(h.d)(t, e), + (t.prototype._getFilenameAndPath = function () { + return { filename: "generic.babylon", path: "https://controllers.babylonjs.com/generic/" }; + }), + (t.prototype._getModelLoadingConstraints = function () { + return !0; + }), + (t.prototype._processLoadedModel = function (e) {}), + (t.prototype._setRootMesh = function (e) { + var t = this; + (this.rootMesh = new Ee.a(this.profileId + " " + this.handness, this.scene)), + e.forEach(function (e) { + (e.isPickable = !1), e.parent || e.setParent(t.rootMesh); + }), + (this.rootMesh.rotationQuaternion = a.b.FromEulerAngles(0, Math.PI, 0)); + }), + (t.prototype._updateModel = function () {}), + (t.ProfileId = "generic-trigger"), + t + ); + })(uo), + po = { + left: { + selectComponentId: "xr-standard-trigger", + components: { "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} } }, + gamepadMapping: "xr-standard", + rootNodeName: "generic-trigger-left", + assetPath: "left.glb", + }, + right: { + selectComponentId: "xr-standard-trigger", + components: { "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} } }, + gamepadMapping: "xr-standard", + rootNodeName: "generic-trigger-right", + assetPath: "right.glb", + }, + none: { + selectComponentId: "xr-standard-trigger", + components: { "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} } }, + gamepadMapping: "xr-standard", + rootNodeName: "generic-trigger-none", + assetPath: "none.glb", + }, + }, + fo = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t, i.layouts[n.handedness || "none"], n.gamepad, n.handedness) || this; + return (o._repositoryUrl = r), (o._buttonMeshMapping = {}), (o._touchDots = {}), (o.profileId = i.profileId), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.dispose = function () { + var t = this; + e.prototype.dispose.call(this), + Object.keys(this._touchDots).forEach(function (e) { + t._touchDots[e].dispose(); + }); + }), + (t.prototype._getFilenameAndPath = function () { + return { filename: this.layout.assetPath, path: this._repositoryUrl + "/profiles/" + this.profileId + "/" }; + }), + (t.prototype._getModelLoadingConstraints = function () { + var e = $i.a.IsPluginForExtensionAvailable(".glb"); + return e || g.a.Warn("glTF / glb loaded was not registered, using generic controller instead"), e; + }), + (t.prototype._processLoadedModel = function (e) { + var t = this; + this.getComponentIds().forEach(function (e) { + var n = t.layout.components[e]; + (t._buttonMeshMapping[e] = { mainMesh: t._getChildByName(t.rootMesh, n.rootNodeName), states: {} }), + Object.keys(n.visualResponses).forEach(function (i) { + var r = n.visualResponses[i]; + if ("transform" === r.valueNodeProperty) + t._buttonMeshMapping[e].states[i] = { + valueMesh: t._getChildByName(t.rootMesh, r.valueNodeName), + minMesh: t._getChildByName(t.rootMesh, r.minNodeName), + maxMesh: t._getChildByName(t.rootMesh, r.maxNodeName), + }; + else { + var o = n.type === lo.TOUCHPAD_TYPE && n.touchPointNodeName ? n.touchPointNodeName : r.valueNodeName; + if (((t._buttonMeshMapping[e].states[i] = { valueMesh: t._getChildByName(t.rootMesh, o) }), n.type === lo.TOUCHPAD_TYPE && !t._touchDots[i])) { + var a = mi.CreateSphere(i + "dot", { diameter: 0.0015, segments: 8 }, t.scene); + (a.material = new Mn.a(i + "mat", t.scene)), (a.material.diffuseColor = s.a.Red()), (a.parent = t._buttonMeshMapping[e].states[i].valueMesh), (a.isVisible = !1), (t._touchDots[i] = a); + } + } + }); + }); + }), + (t.prototype._setRootMesh = function (e) { + var t; + (this.rootMesh = new Ee.a(this.profileId + "-" + this.handness, this.scene)), (this.rootMesh.isPickable = !1); + for (var n = 0; n < e.length; n++) { + var i = e[n]; + (i.isPickable = !1), i.parent || (t = i); + } + t && t.setParent(this.rootMesh), this.rootMesh.rotate(Be.a.Y, Math.PI, Be.b.WORLD); + }), + (t.prototype._updateModel = function (e) { + var t = this; + this.disableAnimation || + this.getComponentIds().forEach(function (e) { + var n = t.getComponent(e); + if (n.hasChanges) { + var i = t._buttonMeshMapping[e], + r = t.layout.components[e]; + Object.keys(r.visualResponses).forEach(function (e) { + var o = r.visualResponses[e], + a = n.value; + "xAxis" === o.componentProperty ? (a = n.axes.x) : "yAxis" === o.componentProperty && (a = n.axes.y), + "transform" === o.valueNodeProperty + ? t._lerpTransform(i.states[e], a, "button" !== o.componentProperty) + : ((i.states[e].valueMesh.isVisible = n.touched || n.pressed), t._touchDots[e] && (t._touchDots[e].isVisible = n.touched || n.pressed)); + }); + } + }); + }), + t + ); + })(uo), + mo = (function () { + function e() {} + return ( + (e.ClearProfilesCache = function () { + delete this._ProfilesList, (this._ProfileLoadingPromises = {}); + }), + (e.DefaultFallbacks = function () { + this.RegisterFallbacksForProfileId("google-daydream", ["generic-touchpad"]), + this.RegisterFallbacksForProfileId("htc-vive-focus", ["generic-trigger-touchpad"]), + this.RegisterFallbacksForProfileId("htc-vive", ["generic-trigger-squeeze-touchpad"]), + this.RegisterFallbacksForProfileId("magicleap-one", ["generic-trigger-squeeze-touchpad"]), + this.RegisterFallbacksForProfileId("windows-mixed-reality", ["generic-trigger-squeeze-touchpad-thumbstick"]), + this.RegisterFallbacksForProfileId("microsoft-mixed-reality", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]), + this.RegisterFallbacksForProfileId("oculus-go", ["generic-trigger-touchpad"]), + this.RegisterFallbacksForProfileId("oculus-touch-v2", ["oculus-touch", "generic-trigger-squeeze-thumbstick"]), + this.RegisterFallbacksForProfileId("oculus-touch", ["generic-trigger-squeeze-thumbstick"]), + this.RegisterFallbacksForProfileId("samsung-gearvr", ["windows-mixed-reality", "generic-trigger-squeeze-touchpad-thumbstick"]), + this.RegisterFallbacksForProfileId("samsung-odyssey", ["generic-touchpad"]), + this.RegisterFallbacksForProfileId("valve-index", ["generic-trigger-squeeze-touchpad-thumbstick"]); + }), + (e.FindFallbackWithProfileId = function (e) { + var t = this._Fallbacks[e] || []; + return t.unshift(e), t; + }), + (e.GetMotionControllerWithXRInput = function (e, t, n) { + var i = this, + r = []; + if ((n && r.push(n), r.push.apply(r, e.profiles || []), r.length && !r[0] && r.pop(), e.gamepad && e.gamepad.id)) + switch (e.gamepad.id) { + case e.gamepad.id.match(/oculus touch/gi) ? e.gamepad.id : void 0: + r.push("oculus-touch-v2"); + } + var o = r.indexOf("windows-mixed-reality"); + if ((-1 !== o && r.splice(o, 0, "microsoft-mixed-reality"), r.length || r.push("generic-trigger"), this.UseOnlineRepository)) { + var a = this.PrioritizeOnlineRepository ? this._LoadProfileFromRepository : this._LoadProfilesFromAvailableControllers, + s = this.PrioritizeOnlineRepository ? this._LoadProfilesFromAvailableControllers : this._LoadProfileFromRepository; + return a.call(this, r, e, t).catch(function () { + return s.call(i, r, e, t); + }); + } + return this._LoadProfilesFromAvailableControllers(r, e, t); + }), + (e.RegisterController = function (e, t) { + this._AvailableControllers[e] = t; + }), + (e.RegisterFallbacksForProfileId = function (e, t) { + var n; + this._Fallbacks[e] ? (n = this._Fallbacks[e]).push.apply(n, t) : (this._Fallbacks[e] = t); + }), + (e.UpdateProfilesList = function () { + return ( + (this._ProfilesList = $e.b.LoadFileAsync(this.BaseRepositoryUrl + "/profiles/profilesList.json", !1).then(function (e) { + return JSON.parse(e.toString()); + })), + this._ProfilesList + ); + }), + (e._LoadProfileFromRepository = function (e, t, n) { + var i = this; + return Promise.resolve() + .then(function () { + return i._ProfilesList ? i._ProfilesList : i.UpdateProfilesList(); + }) + .then(function (t) { + for (var n = 0; n < e.length; ++n) if (e[n] && t[e[n]]) return e[n]; + throw new Error("neither controller " + e[0] + " nor all fallbacks were found in the repository,"); + }) + .then(function (e) { + return ( + i._ProfileLoadingPromises[e] || + (i._ProfileLoadingPromises[e] = $e.b.LoadFileAsync(i.BaseRepositoryUrl + "/profiles/" + e + "/profile.json", !1).then(function (e) { + return JSON.parse(e); + })), + i._ProfileLoadingPromises[e] + ); + }) + .then(function (e) { + return new fo(n, t, e, i.BaseRepositoryUrl); + }); + }), + (e._LoadProfilesFromAvailableControllers = function (e, t, n) { + for (var i = 0; i < e.length; ++i) + if (e[i]) + for (var r = this.FindFallbackWithProfileId(e[i]), o = 0; o < r.length; ++o) { + var a = this._AvailableControllers[r[o]]; + if (a) return Promise.resolve(a(t, n)); + } + throw new Error("no controller requested was found in the available controllers list"); + }), + (e._AvailableControllers = {}), + (e._Fallbacks = {}), + (e._ProfileLoadingPromises = {}), + (e.BaseRepositoryUrl = "https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist"), + (e.PrioritizeOnlineRepository = !0), + (e.UseOnlineRepository = !0), + e + ); + })(); + mo.RegisterController(ho.ProfileId, function (e, t) { + return new ho(t, e.gamepad, e.handedness); + }), + mo.DefaultFallbacks(); + var go = 0, + bo = (function () { + function e(e, t, n) { + var i = this; + void 0 === n && (n = {}), + (this._scene = e), + (this.inputSource = t), + (this._options = n), + (this._tmpQuaternion = new a.b()), + (this._tmpVector = new a.e()), + (this.onDisposeObservable = new o.c()), + (this.onMeshLoadedObservable = new o.c()), + (this.onMotionControllerInitObservable = new o.c()), + (this._uniqueId = "controller-" + go++ + "-" + t.targetRayMode + "-" + t.handedness), + (this.pointer = new ke.a(this._uniqueId + "-pointer", e)), + (this.pointer.rotationQuaternion = new a.b()), + this.inputSource.gripSpace && ((this.grip = new ke.a(this._uniqueId + "-grip", this._scene)), (this.grip.rotationQuaternion = new a.b())), + this.inputSource.gamepad && + mo.GetMotionControllerWithXRInput(t, e, this._options.forceControllerProfile).then(function (e) { + (i.motionController = e), + i.onMotionControllerInitObservable.notifyObservers(e), + i._options.doNotLoadControllerMesh || + i.motionController.loadModel().then(function (e) { + e && + (i.onMeshLoadedObservable.notifyObservers(i.motionController.rootMesh), + (i.motionController.rootMesh.parent = i.grip || i.pointer), + (i.motionController.disableAnimation = !!i._options.disableMotionControllerAnimation)); + }); + }); + } + return ( + Object.defineProperty(e.prototype, "uniqueId", { + get: function () { + return this._uniqueId; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this.grip && this.grip.dispose(), + this.motionController && this.motionController.dispose(), + this.pointer.dispose(), + this.onMotionControllerInitObservable.clear(), + this.onMeshLoadedObservable.clear(), + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(); + }), + (e.prototype.getWorldPointerRayToRef = function (e, t) { + void 0 === t && (t = !1); + var n = t && this.grip ? this.grip : this.pointer; + n.computeWorldMatrix().decompose(void 0, this._tmpQuaternion, void 0), + this._tmpVector.set(0, 0, 1), + this._tmpVector.rotateByQuaternionToRef(this._tmpQuaternion, this._tmpVector), + e.origin.copyFrom(n.absolutePosition), + e.direction.copyFrom(this._tmpVector), + (e.length = 1e3); + }), + (e.prototype.updateFromXRFrame = function (e, t) { + var n = e.getPose(this.inputSource.targetRaySpace, t); + if ( + (n && + (this.pointer.position.copyFrom(n.transform.position), + this.pointer.rotationQuaternion.copyFrom(n.transform.orientation), + this._scene.useRightHandedSystem || ((this.pointer.position.z *= -1), (this.pointer.rotationQuaternion.z *= -1), (this.pointer.rotationQuaternion.w *= -1))), + this.inputSource.gripSpace && this.grip) + ) { + var i = e.getPose(this.inputSource.gripSpace, t); + i && + (this.grip.position.copyFrom(i.transform.position), + this.grip.rotationQuaternion.copyFrom(i.transform.orientation), + this._scene.useRightHandedSystem || ((this.grip.position.z *= -1), (this.grip.rotationQuaternion.z *= -1), (this.grip.rotationQuaternion.w *= -1))); + } + this.motionController && this.motionController.updateFromXRFrame(e); + }), + e + ); + })(), + _o = (function () { + function e(e, t, n) { + var i = this; + void 0 === n && (n = {}), + (this.xrSessionManager = e), + (this.xrCamera = t), + (this.options = n), + (this.controllers = []), + (this.onControllerAddedObservable = new o.c()), + (this.onControllerRemovedObservable = new o.c()), + (this._onInputSourcesChange = function (e) { + i._addAndRemoveControllers(e.added, e.removed); + }), + (this._sessionEndedObserver = this.xrSessionManager.onXRSessionEnded.add(function () { + i._addAndRemoveControllers( + [], + i.controllers.map(function (e) { + return e.inputSource; + }) + ); + })), + (this._sessionInitObserver = this.xrSessionManager.onXRSessionInit.add(function (e) { + e.addEventListener("inputsourceschange", i._onInputSourcesChange); + })), + (this._frameObserver = this.xrSessionManager.onXRFrameObservable.add(function (e) { + i.controllers.forEach(function (t) { + t.updateFromXRFrame(e, i.xrSessionManager.referenceSpace); + }); + })), + this.options.customControllersRepositoryURL && (mo.BaseRepositoryUrl = this.options.customControllersRepositoryURL), + this.options.disableOnlineControllerRepository ? (mo.UseOnlineRepository = !1) : ((mo.UseOnlineRepository = !0), mo.UpdateProfilesList()); + } + return ( + (e.prototype._addAndRemoveControllers = function (e, t) { + for ( + var n = this, + i = this.controllers.map(function (e) { + return e.inputSource; + }), + r = 0, + o = e; + r < o.length; + r++ + ) { + var a = o[r]; + if (-1 === i.indexOf(a)) { + var s = new bo(this.xrSessionManager.scene, a, { + forceControllerProfile: this.options.forceInputProfile, + doNotLoadControllerMesh: this.options.doNotLoadControllerMeshes, + disableMotionControllerAnimation: this.options.disableControllerAnimation, + }); + this.controllers.push(s), this.onControllerAddedObservable.notifyObservers(s); + } + } + var c = [], + l = []; + this.controllers.forEach(function (e) { + -1 === t.indexOf(e.inputSource) ? c.push(e) : l.push(e); + }), + (this.controllers = c), + l.forEach(function (e) { + n.onControllerRemovedObservable.notifyObservers(e), e.dispose(); + }); + }), + (e.prototype.dispose = function () { + this.controllers.forEach(function (e) { + e.dispose(); + }), + this.xrSessionManager.onXRFrameObservable.remove(this._frameObserver), + this.xrSessionManager.onXRSessionInit.remove(this._sessionInitObserver), + this.xrSessionManager.onXRSessionEnded.remove(this._sessionEndedObserver), + this.onControllerAddedObservable.clear(), + this.onControllerRemovedObservable.clear(); + }), + e + ); + })(), + vo = (function () { + function e(e) { + (this._xrSessionManager = e), (this._attached = !1), (this._removeOnDetach = []), (this.disableAutoAttach = !1); + } + return ( + Object.defineProperty(e.prototype, "attached", { + get: function () { + return this._attached; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attach = function (e) { + var t = this; + if (e) this.attached && this.detach(); + else if (this.attached) return !1; + return ( + (this._attached = !0), + this._addNewAttachObserver(this._xrSessionManager.onXRFrameObservable, function (e) { + return t._onXRFrame(e); + }), + !0 + ); + }), + (e.prototype.detach = function () { + return this._attached + ? ((this._attached = !1), + this._removeOnDetach.forEach(function (e) { + e.observable.remove(e.observer); + }), + !0) + : ((this.disableAutoAttach = !0), !1); + }), + (e.prototype.dispose = function () { + this.detach(); + }), + (e.prototype._addNewAttachObserver = function (e, t) { + this._removeOnDetach.push({ observable: e, observer: e.add(t) }); + }), + e + ); + })(), + yo = (function (e) { + function t(n, i) { + var r = e.call(this, n) || this; + return ( + (r._options = i), + (r._attachController = function (e) { + if (!r._controllers[e.uniqueId]) { + var n = r._generateNewMeshPair(e), + i = n.laserPointer, + o = n.selectionMesh; + switch ( + ((r._controllers[e.uniqueId] = { xrController: e, laserPointer: i, selectionMesh: o, meshUnderPointer: null, pick: null, tmpRay: new Re(new a.e(), new a.e()), id: t._idCounter++ }), + e.inputSource.targetRayMode) + ) { + case "tracked-pointer": + return r._attachTrackedPointerRayMode(e); + case "gaze": + return r._attachGazeMode(e); + case "screen": + return r._attachScreenRayMode(e); + } + } + }), + (r._controllers = {}), + (r._tmpVectorForPickCompare = new a.e()), + (r.disablePointerLighting = !0), + (r.disableSelectionMeshLighting = !0), + (r.displayLaserPointer = !0), + (r.displaySelectionMesh = !0), + (r.laserPointerPickedColor = new s.a(0.9, 0.9, 0.9)), + (r.lasterPointerDefaultColor = new s.a(0.7, 0.7, 0.7)), + (r.selectionMeshDefaultColor = new s.a(0.8, 0.8, 0.8)), + (r.selectionMeshPickedColor = new s.a(0.3, 0.3, 1)), + (r._scene = r._xrSessionManager.scene), + r + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.attach = function () { + var t = this; + return ( + !!e.prototype.attach.call(this) && + (this._options.xrInput.controllers.forEach(this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable, this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable, function (e) { + t._detachController(e.uniqueId); + }), + !0) + ); + }), + (t.prototype.detach = function () { + var t = this; + return ( + !!e.prototype.detach.call(this) && + (Object.keys(this._controllers).forEach(function (e) { + t._detachController(e); + }), + !0) + ); + }), + (t.prototype.getMeshUnderPointer = function (e) { + return this._controllers[e] ? this._controllers[e].meshUnderPointer : null; + }), + (t.prototype.getXRControllerByPointerId = function (e) { + for (var t = Object.keys(this._controllers), n = 0; n < t.length; ++n) if (this._controllers[t[n]].id === e) return this._controllers[t[n]].xrController; + return null; + }), + (t.prototype._onXRFrame = function (e) { + var t = this; + Object.keys(this._controllers).forEach(function (e) { + var n = t._controllers[e]; + n.xrController.getWorldPointerRayToRef(n.tmpRay), (n.pick = t._scene.pickWithRay(n.tmpRay)); + var i = n.pick; + if (i && i.pickedPoint && i.hit) { + t._updatePointerDistance(n.laserPointer, i.distance), + n.selectionMesh.position.copyFrom(i.pickedPoint), + (n.selectionMesh.scaling.x = Math.sqrt(i.distance)), + (n.selectionMesh.scaling.y = Math.sqrt(i.distance)), + (n.selectionMesh.scaling.z = Math.sqrt(i.distance)); + var r = t._convertNormalToDirectionOfRay(i.getNormal(!0), n.tmpRay); + if ((n.selectionMesh.position.copyFrom(i.pickedPoint), r)) { + var o = a.e.Cross(Be.a.Y, r), + s = a.e.Cross(r, o); + a.e.RotationFromAxisToRef(s, r, o, n.selectionMesh.rotation), n.selectionMesh.position.addInPlace(r.scale(0.001)); + } + (n.selectionMesh.isVisible = t.displaySelectionMesh), (n.meshUnderPointer = i.pickedMesh); + } else (n.selectionMesh.isVisible = !1), (n.meshUnderPointer = null); + }); + }), + (t.prototype._attachGazeMode = function (e) { + var t = this, + n = this._controllers[e.uniqueId], + i = this._options.timeToSelect || 3e3, + r = this._options.useUtilityLayer ? this._options.customUtilityLayerScene || ci.a.DefaultUtilityLayer.utilityLayerScene : this._scene, + o = new Ae.a(), + a = kn.CreateTorus("selection", { diameter: 0.0525, thickness: 0.015, tessellation: 20 }, r); + (a.isVisible = !1), (a.isPickable = !1), (a.parent = n.selectionMesh); + var s = 0, + c = !1; + (n.onFrameObserver = this._xrSessionManager.onXRFrameObservable.add(function () { + if (n.pick) { + if (((a.isVisible = !1), n.pick.hit)) + if (t._pickingMoved(o, n.pick)) c && (t._options.disablePointerUpOnTouchOut || t._scene.simulatePointerUp(n.pick, { pointerId: n.id })), (c = !1), (s = 0); + else if ((s > i / 10 && (a.isVisible = !0), (s += t._scene.getEngine().getDeltaTime()) >= i)) + t._scene.simulatePointerDown(n.pick, { pointerId: n.id }), (c = !0), t._options.disablePointerUpOnTouchOut && t._scene.simulatePointerUp(n.pick, { pointerId: n.id }), (a.isVisible = !1); + else { + var e = 1 - s / i; + a.scaling.set(e, e, e); + } + else (c = !1), (s = 0); + t._scene.simulatePointerMove(n.pick, { pointerId: n.id }), (o = n.pick); + } + })), + void 0 !== this._options.renderingGroupId && (a.renderingGroupId = this._options.renderingGroupId), + e.onDisposeObservable.addOnce(function () { + n.pick && !t._options.disablePointerUpOnTouchOut && c && t._scene.simulatePointerUp(n.pick, { pointerId: n.id }), a.dispose(); + }); + }), + (t.prototype._attachScreenRayMode = function (e) { + var t = this, + n = this._controllers[e.uniqueId], + i = !1; + (n.onFrameObserver = this._xrSessionManager.onXRFrameObservable.add(function () { + !n.pick || + (t._options.disablePointerUpOnTouchOut && i) || + (i + ? t._scene.simulatePointerMove(n.pick, { pointerId: n.id }) + : (t._scene.simulatePointerDown(n.pick, { pointerId: n.id }), (i = !0), t._options.disablePointerUpOnTouchOut && t._scene.simulatePointerUp(n.pick, { pointerId: n.id }))); + })), + e.onDisposeObservable.addOnce(function () { + n.pick && i && !t._options.disablePointerUpOnTouchOut && t._scene.simulatePointerUp(n.pick, { pointerId: n.id }); + }); + }), + (t.prototype._attachTrackedPointerRayMode = function (e) { + var t = this; + e.onMotionControllerInitObservable.add(function (n) { + if (t._options.forceGazeMode) return t._attachGazeMode(e); + var i = t._controllers[e.uniqueId]; + t._options.overrideButtonId && (i.selectionComponent = n.getComponent(t._options.overrideButtonId)), + i.selectionComponent || (i.selectionComponent = n.getMainComponent()), + (i.onFrameObserver = t._xrSessionManager.onXRFrameObservable.add(function () { + i.selectionComponent && i.selectionComponent.pressed + ? ((i.selectionMesh.material.emissiveColor = t.selectionMeshPickedColor), (i.laserPointer.material.emissiveColor = t.laserPointerPickedColor)) + : ((i.selectionMesh.material.emissiveColor = t.selectionMeshDefaultColor), (i.laserPointer.material.emissiveColor = t.lasterPointerDefaultColor)), + (i.laserPointer.isVisible = t.displayLaserPointer), + (i.laserPointer.material.disableLighting = t.disablePointerLighting), + (i.selectionMesh.material.disableLighting = t.disableSelectionMeshLighting), + i.pick && t._scene.simulatePointerMove(i.pick, { pointerId: i.id }); + })), + (i.onButtonChangedObserver = i.selectionComponent.onButtonStateChangedObservable.add(function (e) { + if (e.changes.pressed) { + var n = e.changes.pressed.current; + i.pick && (n ? t._scene.simulatePointerDown(i.pick, { pointerId: i.id }) : t._scene.simulatePointerUp(i.pick, { pointerId: i.id })); + } + })); + }); + }), + (t.prototype._convertNormalToDirectionOfRay = function (e, t) { + e && Math.acos(a.e.Dot(e, t.direction)) < Math.PI / 2 && e.scaleInPlace(-1); + return e; + }), + (t.prototype._detachController = function (e) { + var t = this._controllers[e]; + t && + (t.selectionComponent && t.onButtonChangedObserver && t.selectionComponent.onButtonStateChangedObservable.remove(t.onButtonChangedObserver), + t.onFrameObserver && this._xrSessionManager.onXRFrameObservable.remove(t.onFrameObserver), + t.selectionMesh.dispose(), + t.laserPointer.dispose(), + delete this._controllers[e]); + }), + (t.prototype._generateNewMeshPair = function (e) { + var t = this._options.useUtilityLayer ? this._options.customUtilityLayerScene || ci.a.DefaultUtilityLayer.utilityLayerScene : this._scene, + n = jn.CreateCylinder("laserPointer", { height: 1, diameterTop: 2e-4, diameterBottom: 0.004, tessellation: 20, subdivisions: 1 }, t); + n.parent = e.pointer; + var i = new Mn.a("laserPointerMat", t); + (i.emissiveColor = this.lasterPointerDefaultColor), (i.alpha = 0.7), (n.material = i), (n.rotation.x = Math.PI / 2), this._updatePointerDistance(n, 1), (n.isPickable = !1); + var r = kn.CreateTorus("gazeTracker", { diameter: 0.0105, thickness: 0.0075, tessellation: 20 }, t); + r.bakeCurrentTransformIntoVertices(), (r.isPickable = !1), (r.isVisible = !1); + var o = new Mn.a("targetMat", t); + return ( + (o.specularColor = s.a.Black()), + (o.emissiveColor = this.selectionMeshDefaultColor), + (o.backFaceCulling = !1), + (r.material = o), + void 0 !== this._options.renderingGroupId && ((n.renderingGroupId = this._options.renderingGroupId), (r.renderingGroupId = this._options.renderingGroupId)), + { laserPointer: n, selectionMesh: r } + ); + }), + (t.prototype._pickingMoved = function (e, t) { + var n; + if (!e.hit || !t.hit) return !0; + if (!(e.pickedMesh && e.pickedPoint && t.pickedMesh && t.pickedPoint)) return !0; + if (e.pickedMesh !== t.pickedMesh) return !0; + null === (n = e.pickedPoint) || void 0 === n || n.subtractToRef(t.pickedPoint, this._tmpVectorForPickCompare), + this._tmpVectorForPickCompare.set(Math.abs(this._tmpVectorForPickCompare.x), Math.abs(this._tmpVectorForPickCompare.y), Math.abs(this._tmpVectorForPickCompare.z)); + var i = (0.01 * (this._options.gazeModePointerMovedFactor || 1)) / t.distance; + return this._tmpVectorForPickCompare.length() > i; + }), + (t.prototype._updatePointerDistance = function (e, t) { + void 0 === t && (t = 100), (e.scaling.y = t), (e.position.z = t / 2 + 0.05); + }), + (t._idCounter = 0), + (t.Name = ao.POINTER_SELECTION), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + yo.Name, + function (e, t) { + return function () { + return new yo(e, t); + }; + }, + yo.Version, + !0 + ); + var Co = (function () { + function e(e, t, n) { + (this.element = e), (this.sessionMode = t), (this.referenceSpaceType = n); + } + return (e.prototype.update = function (e) {}), e; + })(), + Po = function () {}, + xo = (function () { + function e(e, t) { + var n = this; + if ( + ((this.scene = e), + (this.options = t), + (this._activeButton = null), + (this._buttons = []), + (this.activeButtonChangedObservable = new o.c()), + (this._overlay = document.createElement("div")), + (this._overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;"), + t.customButtons) + ) + this._buttons = t.customButtons; + else { + var i = t.sessionMode || "immersive-vr", + r = t.referenceSpaceType || "local-floor", + a = + ".babylonVRicon { color: #868686; border-color: #868686; border-style: solid; margin-left: 10px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url(" + + (window.SVGSVGElement + ? "data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A" + : "https://cdn.babylonjs.com/Assets/vrButton.png") + + "); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }"; + a += '.babylonVRicon.vrdisplaypresenting { background-image: none;} .vrdisplaypresenting::after { content: "EXIT"} .xr-error::after { content: "ERROR"}'; + var s = document.createElement("style"); + s.appendChild(document.createTextNode(a)), document.getElementsByTagName("head")[0].appendChild(s); + var c = document.createElement("button"); + (c.className = "babylonVRicon"), + (c.title = i + " - " + r), + this._buttons.push(new Co(c, i, r)), + (this._buttons[this._buttons.length - 1].update = function (e) { + (this.element.style.display = null === e || e === this ? "" : "none"), (c.className = "babylonVRicon" + (e === this ? " vrdisplaypresenting" : "")); + }), + this._updateButtons(null); + } + var l = e.getEngine().getInputElement(); + l && + l.parentNode && + (l.parentNode.appendChild(this._overlay), + e.onDisposeObservable.addOnce(function () { + n.dispose(); + })); + } + return ( + (e.CreateAsync = function (t, n, i) { + var r = this, + o = new e(t, i), + a = o._buttons.map(function (e) { + return n.sessionManager.isSessionSupportedAsync(e.sessionMode); + }); + return ( + n.onStateChangedObservable.add(function (e) { + e == zn.NOT_IN_XR && o._updateButtons(null); + }), + Promise.all(a).then(function (e) { + return ( + e.forEach(function (e, t) { + e && + (o._overlay.appendChild(o._buttons[t].element), + (o._buttons[t].element.onclick = function () { + return Object(h.b)(r, void 0, void 0, function () { + var e, r; + return Object(h.e)(this, function (a) { + switch (a.label) { + case 0: + return n.state != zn.IN_XR ? [3, 2] : [4, n.exitXRAsync()]; + case 1: + return a.sent(), o._updateButtons(null), [3, 6]; + case 2: + if (n.state != zn.NOT_IN_XR) return [3, 6]; + if (!i.renderTarget) return [3, 6]; + a.label = 3; + case 3: + return a.trys.push([3, 5, , 6]), [4, n.enterXRAsync(o._buttons[t].sessionMode, o._buttons[t].referenceSpaceType, i.renderTarget)]; + case 4: + return a.sent(), o._updateButtons(o._buttons[t]), [3, 6]; + case 5: + return a.sent(), o._updateButtons(null), (e = o._buttons[t].element), (r = e.title), (e.title = "Error entering XR session : " + r), e.classList.add("xr-error"), [3, 6]; + case 6: + return [2]; + } + }); + }); + })); + }), + o + ); + }) + ); + }), + (e.prototype.dispose = function () { + var e = this.scene.getEngine().getInputElement(); + e && e.parentNode && e.parentNode.contains(this._overlay) && e.parentNode.removeChild(this._overlay), this.activeButtonChangedObservable.clear(); + }), + (e.prototype._updateButtons = function (e) { + var t = this; + (this._activeButton = e), + this._buttons.forEach(function (e) { + e.update(t._activeButton); + }), + this.activeButtonChangedObservable.notifyObservers(this._activeButton); + }), + e + ); + })(), + To = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return ( + (i._options = n), + (i._controllers = {}), + (i._snappedToPoint = !1), + (i._tmpRay = new Re(new a.e(), new a.e())), + (i._tmpVector = new a.e()), + (i.backwardsMovementEnabled = !0), + (i.backwardsTeleportationDistance = 0.7), + (i.parabolicCheckRadius = 5), + (i.parabolicRayEnabled = !0), + (i.rotationAngle = Math.PI / 8), + (i.rotationEnabled = !0), + (i._attachController = function (e) { + if (!i._controllers[e.uniqueId]) { + i._controllers[e.uniqueId] = { xrController: e, teleportationState: { forward: !1, backwards: !1, rotating: !1, currentRotation: 0, baseRotation: 0 } }; + var t = i._controllers[e.uniqueId]; + e.onMotionControllerInitObservable.addOnce(function () { + if (e.motionController) { + var n = e.motionController.getComponentOfType(lo.THUMBSTICK_TYPE) || e.motionController.getComponentOfType(lo.TOUCHPAD_TYPE); + if (!n || i._options.useMainComponentOnly) { + var r = e.motionController.getMainComponent(); + if (!r) return; + t.onButtonChangedObserver = r.onButtonStateChangedObservable.add(function () { + if (r.changes.pressed) + if (r.changes.pressed.current) { + (t.teleportationState.forward = !0), + (i._currentTeleportationControllerId = t.xrController.uniqueId), + (t.teleportationState.baseRotation = i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y), + (t.teleportationState.currentRotation = 0); + var n = i._options.timeToTeleport || 3e3, + o = 0, + a = i._xrSessionManager.onXRFrameObservable.add(function () { + r.pressed + ? ((o += i._xrSessionManager.scene.getEngine().getDeltaTime()) >= n && + i._currentTeleportationControllerId === t.xrController.uniqueId && + t.teleportationState.forward && + i._teleportForward(e.uniqueId), + o >= n && i._xrSessionManager.onXRFrameObservable.remove(a)) + : i._xrSessionManager.onXRFrameObservable.remove(a); + }); + } else (t.teleportationState.forward = !1), (i._currentTeleportationControllerId = ""); + }); + } else + (t.onButtonChangedObserver = n.onButtonStateChangedObservable.add(function () { + i._currentTeleportationControllerId === t.xrController.uniqueId && t.teleportationState.forward && !n.touched && i._teleportForward(e.uniqueId); + })), + (t.onAxisChangedObserver = n.onAxisValueChangedObservable.add(function (e) { + if ( + (e.y <= 0.7 && t.teleportationState.backwards && (t.teleportationState.backwards = !1), + e.y > 0.7 && !t.teleportationState.forward && i.backwardsMovementEnabled && !i.snapPointsOnly && !t.teleportationState.backwards) + ) { + (t.teleportationState.backwards = !0), + i._tmpVector.set(0, 0, i.backwardsTeleportationDistance), + i._tmpVector.rotateByQuaternionToRef(i._options.xrInput.xrCamera.rotationQuaternion, i._tmpVector), + i._tmpVector.addInPlace(i._options.xrInput.xrCamera.position), + i._options.xrInput.xrCamera.position.subtractToRef(i._tmpVector, i._tmpVector), + i._tmpRay.origin.copyFrom(i._tmpVector), + i._tmpRay.direction.set(0, -1, 0); + var n = i._xrSessionManager.scene.pickWithRay(i._tmpRay, function (e) { + return -1 !== i._floorMeshes.indexOf(e); + }); + n && n.pickedPoint && i._options.xrInput.xrCamera.position.addInPlace(n.pickedPoint); + } + if ( + (e.y < -0.7 && + !i._currentTeleportationControllerId && + !t.teleportationState.rotating && + ((t.teleportationState.forward = !0), + (i._currentTeleportationControllerId = t.xrController.uniqueId), + (t.teleportationState.baseRotation = i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y)), + e.x) + ) { + if (t.teleportationState.forward) + i._currentTeleportationControllerId === t.xrController.uniqueId && + (i.rotationEnabled + ? setTimeout(function () { + t.teleportationState.currentRotation = Math.atan2(e.x, -e.y); + }) + : (t.teleportationState.currentRotation = 0)); + else if (!t.teleportationState.rotating && Math.abs(e.x) > 0.7) { + t.teleportationState.rotating = !0; + var r = i.rotationAngle * (e.x > 0 ? 1 : -1); + i._options.xrInput.xrCamera.rotationQuaternion.multiplyInPlace(a.b.FromEulerAngles(0, r, 0)); + } + } else t.teleportationState.rotating = !1; + })); + } + }); + } + }), + i._options.teleportationTargetMesh || i._createDefaultTargetMesh(), + (i._floorMeshes = i._options.floorMeshes || []), + (i._snapToPositions = i._options.snapPositions || []), + i._setTargetMeshVisibility(!1), + i + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "snapPointsOnly", { + get: function () { + return !!this._options.snapPointsOnly; + }, + set: function (e) { + this._options.snapPointsOnly = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.addFloorMesh = function (e) { + this._floorMeshes.push(e); + }), + (t.prototype.addSnapPoint = function (e) { + this._snapToPositions.push(e); + }), + (t.prototype.attach = function () { + var t = this; + return ( + !!e.prototype.attach.call(this) && + (this._options.xrInput.controllers.forEach(this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable, this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable, function (e) { + t._detachController(e.uniqueId); + }), + !0) + ); + }), + (t.prototype.detach = function () { + var t = this; + return ( + !!e.prototype.detach.call(this) && + (Object.keys(this._controllers).forEach(function (e) { + t._detachController(e); + }), + this._setTargetMeshVisibility(!1), + !0) + ); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this._options.teleportationTargetMesh && this._options.teleportationTargetMesh.dispose(!1, !0); + }), + (t.prototype.removeFloorMesh = function (e) { + var t = this._floorMeshes.indexOf(e); + -1 !== t && this._floorMeshes.splice(t, 1); + }), + (t.prototype.removeFloorMeshByName = function (e) { + var t = this._xrSessionManager.scene.getMeshByName(e); + t && this.removeFloorMesh(t); + }), + (t.prototype.removeSnapPoint = function (e) { + var t = this._snapToPositions.indexOf(e); + if (-1 === t) + for (var n = 0; n < this._snapToPositions.length; ++n) + if (this._snapToPositions[n].equals(e)) { + t = n; + break; + } + return -1 !== t && (this._snapToPositions.splice(t, 1), !0); + }), + (t.prototype.setSelectionFeature = function (e) { + this._selectionFeature = e; + }), + (t.prototype._onXRFrame = function (e) { + var t = this, + n = this._xrSessionManager.currentFrame, + i = this._xrSessionManager.scene; + if (this.attach && n) { + var r = this._options.teleportationTargetMesh; + if (this._currentTeleportationControllerId) { + if (!r) return; + r.rotationQuaternion = r.rotationQuaternion || new a.b(); + var o = this._controllers[this._currentTeleportationControllerId]; + if (o.teleportationState.forward) { + a.b.RotationYawPitchRollToRef(o.teleportationState.currentRotation + o.teleportationState.baseRotation, 0, 0, r.rotationQuaternion); + var s = !1; + o.xrController.getWorldPointerRayToRef(this._tmpRay); + var c = i.pickWithRay(this._tmpRay, function (e) { + var n = t._floorMeshes.indexOf(e); + return -1 !== n && t._floorMeshes[n].absolutePosition.y < t._options.xrInput.xrCamera.position.y; + }); + if (c && c.pickedPoint) (s = !0), this._setTargetMeshPosition(c.pickedPoint), this._setTargetMeshVisibility(!0), this._showParabolicPath(c); + else if (this.parabolicRayEnabled) { + var l = o.xrController.pointer.rotationQuaternion.toEulerAngles().x, + u = Math.PI / 2 - Math.abs(l) + 1, + h = this.parabolicCheckRadius * u; + this._tmpRay.origin.addToRef(this._tmpRay.direction.scale(2 * h), this._tmpVector), + (this._tmpVector.y = this._tmpRay.origin.y), + this._tmpRay.origin.addInPlace(this._tmpRay.direction.scale(h)), + this._tmpVector.subtractToRef(this._tmpRay.origin, this._tmpRay.direction), + this._tmpRay.direction.normalize(); + var d = i.pickWithRay(this._tmpRay, function (e) { + return -1 !== t._floorMeshes.indexOf(e); + }); + d && d.pickedPoint && ((s = !0), this._setTargetMeshPosition(d.pickedPoint), this._setTargetMeshVisibility(!0), this._showParabolicPath(d)); + } + this._setTargetMeshVisibility(s); + } else this._setTargetMeshVisibility(!1); + } else this._setTargetMeshVisibility(!1); + } + }), + (t.prototype._createDefaultTargetMesh = function () { + this._options.defaultTargetMeshOptions = this._options.defaultTargetMeshOptions || {}; + var e = this._options.useUtilityLayer ? this._options.customUtilityLayerScene || ci.a.DefaultUtilityLayer.utilityLayerScene : this._xrSessionManager.scene, + t = Nn.CreateGround("teleportationTarget", { width: 2, height: 2, subdivisions: 2 }, e); + t.isPickable = !1; + var n = new An.a("teleportationPlaneDynamicTexture", 512, e, !0); + n.hasAlpha = !0; + var i = n.getContext(); + i.beginPath(), + i.arc(256, 256, 200, 0, 2 * Math.PI, !1), + (i.fillStyle = this._options.defaultTargetMeshOptions.teleportationFillColor || "#444444"), + i.fill(), + (i.lineWidth = 10), + (i.strokeStyle = this._options.defaultTargetMeshOptions.teleportationBorderColor || "#FFFFFF"), + i.stroke(), + i.closePath(), + n.update(); + var r = new Mn.a("teleportationPlaneMaterial", e); + (r.diffuseTexture = n), (t.material = r); + var o = kn.CreateTorus("torusTeleportation", { diameter: 0.75, thickness: 0.1, tessellation: 20 }, e); + if (((o.isPickable = !1), (o.parent = t), !this._options.defaultTargetMeshOptions.disableAnimation)) { + var a = new R.a("animationInnerCircle", "position.y", 30, R.a.ANIMATIONTYPE_FLOAT, R.a.ANIMATIONLOOPMODE_CYCLE), + c = []; + c.push({ frame: 0, value: 0 }), c.push({ frame: 30, value: 0.4 }), c.push({ frame: 60, value: 0 }), a.setKeys(c); + var l = new ie(); + l.setEasingMode(X.EASINGMODE_EASEINOUT), a.setEasingFunction(l), (o.animations = []), o.animations.push(a), e.beginAnimation(o, 0, 60, !0); + } + var u = jn.CreateCylinder("cone", { diameterTop: 0, tessellation: 4 }, e); + if (((u.isPickable = !1), u.scaling.set(0.5, 0.12, 0.2), u.rotate(Be.a.X, Math.PI / 2), (u.position.z = 0.6), (u.parent = o), this._options.defaultTargetMeshOptions.torusArrowMaterial)) + (o.material = this._options.defaultTargetMeshOptions.torusArrowMaterial), (u.material = this._options.defaultTargetMeshOptions.torusArrowMaterial); + else { + var h = new Mn.a("torusConsMat", e); + (h.disableLighting = !!this._options.defaultTargetMeshOptions.disableLighting), + h.disableLighting ? (h.emissiveColor = new s.a(0.3, 0.3, 1)) : (h.diffuseColor = new s.a(0.3, 0.3, 1)), + (h.alpha = 0.9), + (o.material = h), + (u.material = h), + (this._teleportationRingMaterial = h); + } + void 0 !== this._options.renderingGroupId && ((t.renderingGroupId = this._options.renderingGroupId), (o.renderingGroupId = this._options.renderingGroupId), (u.renderingGroupId = this._options.renderingGroupId)), + (this._options.teleportationTargetMesh = t); + }), + (t.prototype._detachController = function (e) { + var t = this._controllers[e]; + t && + (t.teleportationComponent && + (t.onAxisChangedObserver && t.teleportationComponent.onAxisValueChangedObservable.remove(t.onAxisChangedObserver), + t.onButtonChangedObserver && t.teleportationComponent.onButtonStateChangedObservable.remove(t.onButtonChangedObserver)), + delete this._controllers[e]); + }), + (t.prototype._findClosestSnapPointWithRadius = function (e, t) { + void 0 === t && (t = this._options.snapToPositionRadius || 0.8); + var n = null, + i = Number.MAX_VALUE; + if (this._snapToPositions.length) { + var r = t * t; + this._snapToPositions.forEach(function (t) { + var o = a.e.DistanceSquared(t, e); + o <= r && o < i && ((i = o), (n = t)); + }); + } + return n; + }), + (t.prototype._setTargetMeshPosition = function (e) { + if (this._options.teleportationTargetMesh) { + var t = this._findClosestSnapPointWithRadius(e); + (this._snappedToPoint = !!t), + this.snapPointsOnly && !this._snappedToPoint && this._teleportationRingMaterial + ? this._teleportationRingMaterial.diffuseColor.set(1, 0.3, 0.3) + : this.snapPointsOnly && this._snappedToPoint && this._teleportationRingMaterial && this._teleportationRingMaterial.diffuseColor.set(0.3, 0.3, 1), + this._options.teleportationTargetMesh.position.copyFrom(t || e), + (this._options.teleportationTargetMesh.position.y += 0.01); + } + }), + (t.prototype._setTargetMeshVisibility = function (e) { + this._options.teleportationTargetMesh && + this._options.teleportationTargetMesh.isVisible !== e && + ((this._options.teleportationTargetMesh.isVisible = e), + this._options.teleportationTargetMesh.getChildren(void 0, !1).forEach(function (t) { + t.isVisible = e; + }), + e ? this._selectionFeature && this._selectionFeature.detach() : (this._quadraticBezierCurve && this._quadraticBezierCurve.dispose(), this._selectionFeature && this._selectionFeature.attach())); + }), + (t.prototype._showParabolicPath = function (e) { + if (e.pickedPoint) { + var t = this._controllers[this._currentTeleportationControllerId], + n = W.CreateQuadraticBezier(t.xrController.pointer.absolutePosition, e.ray.origin, e.pickedPoint, 25); + this._quadraticBezierCurve && this._quadraticBezierCurve.dispose(), (this._quadraticBezierCurve = Ti.CreateLines("path line", { points: n.getPoints() })), (this._quadraticBezierCurve.isPickable = !1); + } + }), + (t.prototype._teleportForward = function (e) { + var t = this._controllers[e]; + if ( + ((t.teleportationState.forward = !1), + (this._currentTeleportationControllerId = ""), + (!this.snapPointsOnly || this._snappedToPoint) && this._options.teleportationTargetMesh && this._options.teleportationTargetMesh.isVisible) + ) { + var n = this._options.xrInput.xrCamera.realWorldHeight; + this._options.xrInput.xrCamera.position.copyFrom(this._options.teleportationTargetMesh.position), + (this._options.xrInput.xrCamera.position.y += n), + this._options.xrInput.xrCamera.rotationQuaternion.multiplyInPlace(a.b.FromEulerAngles(0, t.teleportationState.currentRotation, 0)); + } + }), + (t.Name = ao.TELEPORTATION), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + To.Name, + function (e, t) { + return function () { + return new To(e, t); + }; + }, + To.Version, + !0 + ); + var So = function () {}, + Oo = (function () { + function e() {} + return ( + (e.CreateAsync = function (t, n) { + void 0 === n && (n = {}); + var i = new e(); + return co + .CreateAsync(t) + .then(function (e) { + return ( + (i.baseExperience = e), + n.ignoreNativeCameraTransformation && (i.baseExperience.camera.compensateOnFirstFrame = !1), + (i.input = new _o(e.sessionManager, e.camera, n.inputOptions)), + (i.pointerSelection = i.baseExperience.featuresManager.enableFeature(yo.Name, n.useStablePlugins ? "stable" : "latest", { xrInput: i.input })), + n.disableTeleportation || + ((i.teleportation = i.baseExperience.featuresManager.enableFeature(To.Name, n.useStablePlugins ? "stable" : "latest", { floorMeshes: n.floorMeshes, xrInput: i.input })), + i.teleportation.setSelectionFeature(i.pointerSelection)), + (i.renderTarget = i.baseExperience.sessionManager.getWebXRRenderTarget(n.outputCanvasOptions)), + n.disableDefaultUI + ? void 0 + : (n.uiOptions && (n.uiOptions.renderTarget = n.uiOptions.renderTarget || i.renderTarget), + xo.CreateAsync(t, i.baseExperience, n.uiOptions || { renderTarget: i.renderTarget }).then(function (e) { + i.enterExitUI = e; + })) + ); + }) + .then(function () { + return i; + }) + .catch(function (e) { + return g.a.Error("Error initializing XR"), g.a.Error(e), i; + }); + }), + (e.prototype.dispose = function () { + this.baseExperience && this.baseExperience.dispose(), this.input && this.input.dispose(), this.enterExitUI && this.enterExitUI.dispose(), this.renderTarget && this.renderTarget.dispose(); + }), + e + ); + })(), + Eo = !0; + (ge.a.prototype.createDefaultLight = function (e) { + if ((void 0 === e && (e = !1), e && this.lights)) for (var t = 0; t < this.lights.length; t++) this.lights[t].dispose(); + 0 === this.lights.length && new xn.a("default light", a.e.Up(), this); + }), + (ge.a.prototype.createDefaultCamera = function (e, t, n) { + if ((void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1), t && this.activeCamera && (this.activeCamera.dispose(), (this.activeCamera = null)), !this.activeCamera)) { + var i, + r = this.getWorldExtends(), + o = r.max.subtract(r.min), + s = r.min.add(o.scale(0.5)), + c = 1.5 * o.length(); + if ((isFinite(c) || ((c = 1), s.copyFromFloats(0, 0, 0)), e)) { + var l = new xt("default camera", -Math.PI / 2, Math.PI / 2, c, s, this); + (l.lowerRadiusLimit = 0.01 * c), (l.wheelPrecision = 100 / c), (i = l); + } else { + var u = new yt.a("default camera", new a.e(s.x, s.y, -c), this); + u.setTarget(s), (i = u); + } + (i.minZ = 0.01 * c), (i.maxZ = 1e3 * c), (i.speed = 0.2 * c), (this.activeCamera = i); + var h = this.getEngine().getInputElement(); + n && h && i.attachControl(h); + } + }), + (ge.a.prototype.createDefaultCameraOrLight = function (e, t, n) { + void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1), this.createDefaultLight(t), this.createDefaultCamera(e, t, n); + }), + (ge.a.prototype.createDefaultSkybox = function (e, t, n, i, r) { + if ((void 0 === t && (t = !1), void 0 === n && (n = 1e3), void 0 === i && (i = 0), void 0 === r && (r = !0), !e)) return g.a.Warn("Can not create default skybox without environment texture."), null; + r && e && (this.environmentTexture = e); + var o = Ee.a.CreateBox("hdrSkyBox", n, this); + if (t) { + var a = new Hr.a("skyBox", this); + (a.backFaceCulling = !1), + (a.reflectionTexture = e.clone()), + a.reflectionTexture && (a.reflectionTexture.coordinatesMode = ln.a.SKYBOX_MODE), + (a.microSurface = 1 - i), + (a.disableLighting = !0), + (a.twoSidedLighting = !0), + (o.infiniteDistance = !0), + (o.material = a); + } else { + var s = new Mn.a("skyBox", this); + (s.backFaceCulling = !1), (s.reflectionTexture = e.clone()), s.reflectionTexture && (s.reflectionTexture.coordinatesMode = ln.a.SKYBOX_MODE), (s.disableLighting = !0), (o.infiniteDistance = !0), (o.material = s); + } + return (o.isPickable = !1), o; + }), + (ge.a.prototype.createDefaultEnvironment = function (e) { + return Gr ? new Gr(e, this) : null; + }), + (ge.a.prototype.createDefaultVRExperience = function (e) { + return void 0 === e && (e = {}), new Kn(this, e); + }), + (ge.a.prototype.createDefaultXRExperienceAsync = function (e) { + return Oo.CreateAsync(this, e).then(function (e) { + return e; + }); + }), + (Mi.a.prototype.updateVideoTexture = function (e, t, n) { + if (e && !e._isDisabled) { + var i = this._bindTextureDirectly(this._gl.TEXTURE_2D, e, !0); + this._unpackFlipY(!n); + try { + if ( + (void 0 === this._videoTextureSupported && + (this._gl.texImage2D(this._gl.TEXTURE_2D, 0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, t), 0 !== this._gl.getError() ? (this._videoTextureSupported = !1) : (this._videoTextureSupported = !0)), + this._videoTextureSupported) + ) + this._gl.texImage2D(this._gl.TEXTURE_2D, 0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, t); + else { + if (!e._workingCanvas) { + e._workingCanvas = Fn.a.CreateCanvas(e.width, e.height); + var r = e._workingCanvas.getContext("2d"); + if (!r) throw new Error("Unable to get 2d context"); + (e._workingContext = r), (e._workingCanvas.width = e.width), (e._workingCanvas.height = e.height); + } + e._workingContext.drawImage(t, 0, 0, t.videoWidth, t.videoHeight, 0, 0, e.width, e.height), this._gl.texImage2D(this._gl.TEXTURE_2D, 0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, e._workingCanvas); + } + e.generateMipMaps && this._gl.generateMipmap(this._gl.TEXTURE_2D), i || this._bindTextureDirectly(this._gl.TEXTURE_2D, null), (e.isReady = !0); + } catch (t) { + e._isDisabled = !0; + } + } + }); + var Mo = (function (e) { + function t(t, n, i, r, o, a, s) { + void 0 === r && (r = !1), void 0 === o && (o = !1), void 0 === a && (a = ln.a.TRILINEAR_SAMPLINGMODE), void 0 === s && (s = { autoPlay: !0, loop: !0, autoUpdateTexture: !0 }); + var c = e.call(this, null, i, !r, o) || this; + (c._onUserActionRequestedObservable = null), + (c._stillImageCaptured = !1), + (c._displayingPosterTexture = !1), + (c._frameId = -1), + (c._currentSrc = null), + (c._createInternalTexture = function () { + if (null != c._texture) { + if (!c._displayingPosterTexture) return; + c._texture.dispose(), (c._displayingPosterTexture = !1); + } + if ( + (!c._engine.needPOTTextures || ($e.b.IsExponentOfTwo(c.video.videoWidth) && $e.b.IsExponentOfTwo(c.video.videoHeight)) + ? ((c.wrapU = ln.a.WRAP_ADDRESSMODE), (c.wrapV = ln.a.WRAP_ADDRESSMODE)) + : ((c.wrapU = ln.a.CLAMP_ADDRESSMODE), (c.wrapV = ln.a.CLAMP_ADDRESSMODE), (c._generateMipMaps = !1)), + (c._texture = c._engine.createDynamicTexture(c.video.videoWidth, c.video.videoHeight, c._generateMipMaps, c.samplingMode)), + c.video.autoplay || c._settings.poster) + ) + (c._texture.isReady = !0), c._updateInternalTexture(), c.onLoadObservable.hasObservers() && c.onLoadObservable.notifyObservers(c); + else { + var e = c.video.onplaying, + t = !1, + n = c.video.muted; + (c.video.muted = !0), + (c.video.onplaying = function () { + (c.video.muted = n), (c.video.onplaying = e), (c._texture.isReady = !0), c._updateInternalTexture(), t || c.video.pause(), c.onLoadObservable.hasObservers() && c.onLoadObservable.notifyObservers(c); + }); + var i = c.video.play(); + i + ? i + .then(function () {}) + .catch(function () { + (t = !0), c._onUserActionRequestedObservable && c._onUserActionRequestedObservable.hasObservers() && c._onUserActionRequestedObservable.notifyObservers(c); + }) + : ((c.video.onplaying = e), (c._texture.isReady = !0), c._updateInternalTexture(), c.onLoadObservable.hasObservers() && c.onLoadObservable.notifyObservers(c)); + } + }), + (c.reset = function () { + null != c._texture && (c._displayingPosterTexture || (c._texture.dispose(), (c._texture = null))); + }), + (c._updateInternalTexture = function () { + if (null != c._texture && c._texture.isReady && !(c.video.readyState < c.video.HAVE_CURRENT_DATA || c._displayingPosterTexture)) { + var e = c.getScene().getFrameId(); + c._frameId !== e && ((c._frameId = e), c._engine.updateVideoTexture(c._texture, c.video, c._invertY)); + } + }), + (c._engine = c.getScene().getEngine()), + (c._generateMipMaps = r), + (c._initialSamplingMode = a), + (c.autoUpdateTexture = s.autoUpdateTexture), + (c._currentSrc = n), + (c.name = t || c._getName(n)), + (c.video = c._getVideo(n)), + (c._settings = s), + s.poster && (c.video.poster = s.poster), + void 0 !== s.autoPlay && (c.video.autoplay = s.autoPlay), + void 0 !== s.loop && (c.video.loop = s.loop), + c.video.setAttribute("playsinline", ""), + c.video.addEventListener("paused", c._updateInternalTexture), + c.video.addEventListener("seeked", c._updateInternalTexture), + c.video.addEventListener("emptied", c.reset), + (c._createInternalTextureOnEvent = s.poster && !s.autoPlay ? "play" : "canplay"), + c.video.addEventListener(c._createInternalTextureOnEvent, c._createInternalTexture); + var l = c.video.readyState >= c.video.HAVE_CURRENT_DATA; + return !s.poster || (s.autoPlay && l) ? l && c._createInternalTexture() : ((c._texture = c._engine.createTexture(s.poster, !1, !c.invertY, i)), (c._displayingPosterTexture = !0)), c; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "onUserActionRequestedObservable", { + get: function () { + return this._onUserActionRequestedObservable || (this._onUserActionRequestedObservable = new o.c()), this._onUserActionRequestedObservable; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._getName = function (e) { + return e instanceof HTMLVideoElement ? e.currentSrc : "object" == typeof e ? e.toString() : e; + }), + (t.prototype._getVideo = function (e) { + if (e instanceof HTMLVideoElement) return $e.b.SetCorsBehavior(e.currentSrc, e), e; + var t = document.createElement("video"); + return ( + "string" == typeof e + ? ($e.b.SetCorsBehavior(e, t), (t.src = e)) + : ($e.b.SetCorsBehavior(e[0], t), + e.forEach(function (e) { + var n = document.createElement("source"); + (n.src = e), t.appendChild(n); + })), + t + ); + }), + (t.prototype._rebuild = function () { + this.update(); + }), + (t.prototype.update = function () { + this.autoUpdateTexture && this.updateTexture(!0); + }), + (t.prototype.updateTexture = function (e) { + e && ((this.video.paused && this._stillImageCaptured) || ((this._stillImageCaptured = !0), this._updateInternalTexture())); + }), + (t.prototype.updateURL = function (e) { + (this.video.src = e), (this._currentSrc = e); + }), + (t.prototype.clone = function () { + return new t(this.name, this._currentSrc, this.getScene(), this._generateMipMaps, this.invertY, this.samplingMode, this._settings); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), + (this._currentSrc = null), + this._onUserActionRequestedObservable && (this._onUserActionRequestedObservable.clear(), (this._onUserActionRequestedObservable = null)), + this.video.removeEventListener(this._createInternalTextureOnEvent, this._createInternalTexture), + this.video.removeEventListener("paused", this._updateInternalTexture), + this.video.removeEventListener("seeked", this._updateInternalTexture), + this.video.removeEventListener("emptied", this.reset), + this.video.pause(); + }), + (t.CreateFromStreamAsync = function (e, n) { + var i = document.createElement("video"); + return ( + i.setAttribute("autoplay", ""), + i.setAttribute("muted", "true"), + i.setAttribute("playsinline", ""), + (i.muted = !0), + void 0 !== i.mozSrcObject + ? (i.mozSrcObject = n) + : "object" == typeof i.srcObject + ? (i.srcObject = n) + : ((window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL), (i.src = window.URL && window.URL.createObjectURL(n))), + new Promise(function (n) { + var r = function () { + n(new t("video", i, e, !0, !0)), i.removeEventListener("playing", r); + }; + i.addEventListener("playing", r), i.play(); + }) + ); + }), + (t.CreateFromWebCamAsync = function (e, t, n) { + var i, + r = this; + return ( + void 0 === n && (n = !1), + t && t.deviceId && (i = { exact: t.deviceId }), + navigator.mediaDevices + ? navigator.mediaDevices.getUserMedia({ video: t, audio: n }).then(function (t) { + return r.CreateFromStreamAsync(e, t); + }) + : ((navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia), + navigator.getUserMedia && + navigator.getUserMedia( + { video: { deviceId: i, width: { min: (t && t.minWidth) || 256, max: (t && t.maxWidth) || 640 }, height: { min: (t && t.minHeight) || 256, max: (t && t.maxHeight) || 480 } }, audio: n }, + function (t) { + return r.CreateFromStreamAsync(e, t); + }, + function (e) { + g.a.Error(e.name); + } + ), + Promise.reject("No support for userMedia on this device")) + ); + }), + (t.CreateFromWebCam = function (e, t, n, i) { + void 0 === i && (i = !1), + this.CreateFromWebCamAsync(e, n, i) + .then(function (e) { + t && t(e); + }) + .catch(function (e) { + g.a.Error(e.name); + }); + }), + t + ); + })(ln.a), + Ao = (function () { + function e(e, t) { + void 0 === e && (e = a.e.Zero()), void 0 === t && (t = a.e.Up()), (this.position = e), (this.normal = t); + } + return ( + (e.prototype.clone = function () { + return new e(this.position.clone(), this.normal.clone()); + }), + e + ); + })(), + Io = (function () { + function e(e, t, n) { + void 0 === e && (e = a.e.Zero()), void 0 === t && (t = a.e.Up()), void 0 === n && (n = a.d.Zero()), (this.position = e), (this.normal = t), (this.uv = n); + } + return ( + (e.prototype.clone = function () { + return new e(this.position.clone(), this.normal.clone(), this.uv.clone()); + }), + e + ); + })(), + Do = (function (e) { + function t(n, i, r, o) { + var s = e.call(this, n, o) || this; + (s._halfDome = !1), + (s._useDirectMapping = !1), + (s._videoMode = t.MODE_MONOSCOPIC), + (s._onBeforeCameraRenderObserver = null), + (o = s.getScene()), + (n = n || "videoDome"), + (r.resolution = 0 | Math.abs(r.resolution) || 32), + (r.clickToPlay = Boolean(r.clickToPlay)), + (r.autoPlay = void 0 === r.autoPlay || Boolean(r.autoPlay)), + (r.loop = void 0 === r.loop || Boolean(r.loop)), + (r.size = Math.abs(r.size) || (o.activeCamera ? 0.48 * o.activeCamera.maxZ : 1e3)), + void 0 === r.useDirectMapping ? (s._useDirectMapping = !0) : (s._useDirectMapping = r.useDirectMapping), + void 0 === r.faceForward && (r.faceForward = !0), + s._setReady(!1); + var c = { loop: r.loop, autoPlay: r.autoPlay, autoUpdateTexture: !0, poster: r.poster }, + l = (s._material = new Vr(n + "_material", o)), + u = (s._videoTexture = new Mo(n + "_texture", i, o, !1, s._useDirectMapping, ln.a.TRILINEAR_SAMPLINGMODE, c)); + if ( + ((s._mesh = Ee.a.CreateSphere(n + "_mesh", r.resolution, r.size, o, !1, Ee.a.BACKSIDE)), + (u.anisotropicFilteringLevel = 1), + u.onLoadObservable.addOnce(function () { + s._setReady(!0); + }), + (l.useEquirectangularFOV = !0), + (l.fovMultiplier = 1), + (l.opacityFresnel = !1), + s._useDirectMapping + ? ((u.wrapU = ln.a.CLAMP_ADDRESSMODE), (u.wrapV = ln.a.CLAMP_ADDRESSMODE), (l.diffuseTexture = u)) + : ((u.coordinatesMode = ln.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE), (u.wrapV = ln.a.CLAMP_ADDRESSMODE), (l.reflectionTexture = u)), + (s._mesh.material = l), + (s._mesh.parent = s), + (s._halfDomeMask = mi.CreateSphere("", { slice: 0.5, diameter: 0.99 * r.size, segments: r.resolution, sideOrientation: Ee.a.BACKSIDE }, o)), + s._halfDomeMask.rotate(Be.a.X, -Math.PI / 2), + (s._halfDomeMask.parent = s._mesh), + (s._halfDome = !!r.halfDomeMode), + s._halfDomeMask.setEnabled(s._halfDome), + r.clickToPlay && + (o.onPointerUp = function () { + s._videoTexture.video.play(); + }), + r.faceForward && o.activeCamera) + ) { + var h = o.activeCamera, + d = a.e.Forward(), + p = a.e.TransformNormal(d, h.getViewMatrix()); + p.normalize(), (s.rotation.y = Math.acos(a.e.Dot(d, p))); + } + return s; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "videoTexture", { + get: function () { + return this._videoTexture; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fovMultiplier", { + get: function () { + return this._material.fovMultiplier; + }, + set: function (e) { + this._material.fovMultiplier = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "videoMode", { + get: function () { + return this._videoMode; + }, + set: function (e) { + this._videoMode !== e && this._changeVideoMode(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "halfDome", { + get: function () { + return this._halfDome; + }, + set: function (e) { + (this._halfDome = e), this._halfDomeMask.setEnabled(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._changeVideoMode = function (e) { + var n = this; + switch ( + (this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + (this._videoMode = e), + (this._videoTexture.uScale = 1), + (this._videoTexture.vScale = 1), + (this._videoTexture.uOffset = 0), + (this._videoTexture.vOffset = 0), + e) + ) { + case t.MODE_SIDEBYSIDE: + this._videoTexture.uScale = this._halfDome ? 0.99999 : 0.5; + var i = this._halfDome ? 0 : 0.5, + r = this._halfDome ? 0.5 : 0; + this._onBeforeCameraRenderObserver = this._scene.onBeforeCameraRenderObservable.add(function (e) { + n._videoTexture.uOffset = e.isRightCamera ? i : r; + }); + break; + case t.MODE_TOPBOTTOM: + (this._videoTexture.vScale = this._halfDome ? 0.99999 : 0.5), + (this._onBeforeCameraRenderObserver = this._scene.onBeforeCameraRenderObservable.add(function (e) { + n._videoTexture.vOffset = e.isRightCamera ? 0.5 : 0; + })); + } + }), + (t.prototype.dispose = function (t, n) { + void 0 === n && (n = !1), + this._videoTexture.dispose(), + this._mesh.dispose(), + this._material.dispose(), + this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + e.prototype.dispose.call(this, t, n); + }), + (t.MODE_MONOSCOPIC = 0), + (t.MODE_TOPBOTTOM = 1), + (t.MODE_SIDEBYSIDE = 2), + t + ); + })(si.a), + Ro = n(69), + wo = (function () { + function e(e) { + (this.engine = e), + (this._captureGPUFrameTime = !1), + (this._gpuFrameTime = new Ro.a()), + (this._captureShaderCompilationTime = !1), + (this._shaderCompilationTime = new Ro.a()), + (this._onBeginFrameObserver = null), + (this._onEndFrameObserver = null), + (this._onBeforeShaderCompilationObserver = null), + (this._onAfterShaderCompilationObserver = null); + } + return ( + Object.defineProperty(e.prototype, "gpuFrameTimeCounter", { + get: function () { + return this._gpuFrameTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureGPUFrameTime", { + get: function () { + return this._captureGPUFrameTime; + }, + set: function (e) { + var t = this; + e !== this._captureGPUFrameTime && + ((this._captureGPUFrameTime = e), + e + ? ((this._onBeginFrameObserver = this.engine.onBeginFrameObservable.add(function () { + t._gpuFrameTimeToken || (t._gpuFrameTimeToken = t.engine.startTimeQuery()); + })), + (this._onEndFrameObserver = this.engine.onEndFrameObservable.add(function () { + if (t._gpuFrameTimeToken) { + var e = t.engine.endTimeQuery(t._gpuFrameTimeToken); + e > -1 && ((t._gpuFrameTimeToken = null), t._gpuFrameTime.fetchNewFrame(), t._gpuFrameTime.addCount(e, !0)); + } + }))) + : (this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver), + (this._onBeginFrameObserver = null), + this.engine.onEndFrameObservable.remove(this._onEndFrameObserver), + (this._onEndFrameObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "shaderCompilationTimeCounter", { + get: function () { + return this._shaderCompilationTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureShaderCompilationTime", { + get: function () { + return this._captureShaderCompilationTime; + }, + set: function (e) { + var t = this; + e !== this._captureShaderCompilationTime && + ((this._captureShaderCompilationTime = e), + e + ? ((this._onBeforeShaderCompilationObserver = this.engine.onBeforeShaderCompilationObservable.add(function () { + t._shaderCompilationTime.fetchNewFrame(), t._shaderCompilationTime.beginMonitoring(); + })), + (this._onAfterShaderCompilationObserver = this.engine.onAfterShaderCompilationObservable.add(function () { + t._shaderCompilationTime.endMonitoring(); + }))) + : (this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver), + (this._onBeforeShaderCompilationObserver = null), + this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver), + (this._onAfterShaderCompilationObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver), + (this._onBeginFrameObserver = null), + this.engine.onEndFrameObservable.remove(this._onEndFrameObserver), + (this._onEndFrameObserver = null), + this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver), + (this._onBeforeShaderCompilationObserver = null), + this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver), + (this._onAfterShaderCompilationObserver = null), + (this.engine = null); + }), + e + ); + })(), + Lo = (function () { + function e(e) { + var t = this; + (this.scene = e), + (this._captureActiveMeshesEvaluationTime = !1), + (this._activeMeshesEvaluationTime = new Ro.a()), + (this._captureRenderTargetsRenderTime = !1), + (this._renderTargetsRenderTime = new Ro.a()), + (this._captureFrameTime = !1), + (this._frameTime = new Ro.a()), + (this._captureRenderTime = !1), + (this._renderTime = new Ro.a()), + (this._captureInterFrameTime = !1), + (this._interFrameTime = new Ro.a()), + (this._captureParticlesRenderTime = !1), + (this._particlesRenderTime = new Ro.a()), + (this._captureSpritesRenderTime = !1), + (this._spritesRenderTime = new Ro.a()), + (this._capturePhysicsTime = !1), + (this._physicsTime = new Ro.a()), + (this._captureAnimationsTime = !1), + (this._animationsTime = new Ro.a()), + (this._captureCameraRenderTime = !1), + (this._cameraRenderTime = new Ro.a()), + (this._onBeforeActiveMeshesEvaluationObserver = null), + (this._onAfterActiveMeshesEvaluationObserver = null), + (this._onBeforeRenderTargetsRenderObserver = null), + (this._onAfterRenderTargetsRenderObserver = null), + (this._onAfterRenderObserver = null), + (this._onBeforeDrawPhaseObserver = null), + (this._onAfterDrawPhaseObserver = null), + (this._onBeforeAnimationsObserver = null), + (this._onBeforeParticlesRenderingObserver = null), + (this._onAfterParticlesRenderingObserver = null), + (this._onBeforeSpritesRenderingObserver = null), + (this._onAfterSpritesRenderingObserver = null), + (this._onBeforePhysicsObserver = null), + (this._onAfterPhysicsObserver = null), + (this._onAfterAnimationsObserver = null), + (this._onBeforeCameraRenderObserver = null), + (this._onAfterCameraRenderObserver = null), + (this._onBeforeAnimationsObserver = e.onBeforeAnimationsObservable.add(function () { + t._captureActiveMeshesEvaluationTime && t._activeMeshesEvaluationTime.fetchNewFrame(), + t._captureRenderTargetsRenderTime && t._renderTargetsRenderTime.fetchNewFrame(), + t._captureFrameTime && ($e.b.StartPerformanceCounter("Scene rendering"), t._frameTime.beginMonitoring()), + t._captureInterFrameTime && t._interFrameTime.endMonitoring(), + t._captureParticlesRenderTime && t._particlesRenderTime.fetchNewFrame(), + t._captureSpritesRenderTime && t._spritesRenderTime.fetchNewFrame(), + t._captureAnimationsTime && t._animationsTime.beginMonitoring(), + t.scene.getEngine()._drawCalls.fetchNewFrame(); + })), + (this._onAfterRenderObserver = e.onAfterRenderObservable.add(function () { + t._captureFrameTime && ($e.b.EndPerformanceCounter("Scene rendering"), t._frameTime.endMonitoring()), + t._captureRenderTime && t._renderTime.endMonitoring(!1), + t._captureInterFrameTime && t._interFrameTime.beginMonitoring(); + })); + } + return ( + Object.defineProperty(e.prototype, "activeMeshesEvaluationTimeCounter", { + get: function () { + return this._activeMeshesEvaluationTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureActiveMeshesEvaluationTime", { + get: function () { + return this._captureActiveMeshesEvaluationTime; + }, + set: function (e) { + var t = this; + e !== this._captureActiveMeshesEvaluationTime && + ((this._captureActiveMeshesEvaluationTime = e), + e + ? ((this._onBeforeActiveMeshesEvaluationObserver = this.scene.onBeforeActiveMeshesEvaluationObservable.add(function () { + $e.b.StartPerformanceCounter("Active meshes evaluation"), t._activeMeshesEvaluationTime.beginMonitoring(); + })), + (this._onAfterActiveMeshesEvaluationObserver = this.scene.onAfterActiveMeshesEvaluationObservable.add(function () { + $e.b.EndPerformanceCounter("Active meshes evaluation"), t._activeMeshesEvaluationTime.endMonitoring(); + }))) + : (this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver), + (this._onBeforeActiveMeshesEvaluationObserver = null), + this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver), + (this._onAfterActiveMeshesEvaluationObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "renderTargetsRenderTimeCounter", { + get: function () { + return this._renderTargetsRenderTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureRenderTargetsRenderTime", { + get: function () { + return this._captureRenderTargetsRenderTime; + }, + set: function (e) { + var t = this; + e !== this._captureRenderTargetsRenderTime && + ((this._captureRenderTargetsRenderTime = e), + e + ? ((this._onBeforeRenderTargetsRenderObserver = this.scene.onBeforeRenderTargetsRenderObservable.add(function () { + $e.b.StartPerformanceCounter("Render targets rendering"), t._renderTargetsRenderTime.beginMonitoring(); + })), + (this._onAfterRenderTargetsRenderObserver = this.scene.onAfterRenderTargetsRenderObservable.add(function () { + $e.b.EndPerformanceCounter("Render targets rendering"), t._renderTargetsRenderTime.endMonitoring(!1); + }))) + : (this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver), + (this._onBeforeRenderTargetsRenderObserver = null), + this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver), + (this._onAfterRenderTargetsRenderObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "particlesRenderTimeCounter", { + get: function () { + return this._particlesRenderTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureParticlesRenderTime", { + get: function () { + return this._captureParticlesRenderTime; + }, + set: function (e) { + var t = this; + e !== this._captureParticlesRenderTime && + ((this._captureParticlesRenderTime = e), + e + ? ((this._onBeforeParticlesRenderingObserver = this.scene.onBeforeParticlesRenderingObservable.add(function () { + $e.b.StartPerformanceCounter("Particles"), t._particlesRenderTime.beginMonitoring(); + })), + (this._onAfterParticlesRenderingObserver = this.scene.onAfterParticlesRenderingObservable.add(function () { + $e.b.EndPerformanceCounter("Particles"), t._particlesRenderTime.endMonitoring(!1); + }))) + : (this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver), + (this._onBeforeParticlesRenderingObserver = null), + this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver), + (this._onAfterParticlesRenderingObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "spritesRenderTimeCounter", { + get: function () { + return this._spritesRenderTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureSpritesRenderTime", { + get: function () { + return this._captureSpritesRenderTime; + }, + set: function (e) { + var t = this; + e !== this._captureSpritesRenderTime && + ((this._captureSpritesRenderTime = e), + this.scene.spriteManagers && + (e + ? ((this._onBeforeSpritesRenderingObserver = this.scene.onBeforeSpritesRenderingObservable.add(function () { + $e.b.StartPerformanceCounter("Sprites"), t._spritesRenderTime.beginMonitoring(); + })), + (this._onAfterSpritesRenderingObserver = this.scene.onAfterSpritesRenderingObservable.add(function () { + $e.b.EndPerformanceCounter("Sprites"), t._spritesRenderTime.endMonitoring(!1); + }))) + : (this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver), + (this._onBeforeSpritesRenderingObserver = null), + this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver), + (this._onAfterSpritesRenderingObserver = null)))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "physicsTimeCounter", { + get: function () { + return this._physicsTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "capturePhysicsTime", { + get: function () { + return this._capturePhysicsTime; + }, + set: function (e) { + var t = this; + e !== this._capturePhysicsTime && + this.scene.onBeforePhysicsObservable && + ((this._capturePhysicsTime = e), + e + ? ((this._onBeforePhysicsObserver = this.scene.onBeforePhysicsObservable.add(function () { + $e.b.StartPerformanceCounter("Physics"), t._physicsTime.beginMonitoring(); + })), + (this._onAfterPhysicsObserver = this.scene.onAfterPhysicsObservable.add(function () { + $e.b.EndPerformanceCounter("Physics"), t._physicsTime.endMonitoring(); + }))) + : (this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver), + (this._onBeforePhysicsObserver = null), + this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver), + (this._onAfterPhysicsObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "animationsTimeCounter", { + get: function () { + return this._animationsTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureAnimationsTime", { + get: function () { + return this._captureAnimationsTime; + }, + set: function (e) { + var t = this; + e !== this._captureAnimationsTime && + ((this._captureAnimationsTime = e), + e + ? (this._onAfterAnimationsObserver = this.scene.onAfterAnimationsObservable.add(function () { + t._animationsTime.endMonitoring(); + })) + : (this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver), (this._onAfterAnimationsObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "frameTimeCounter", { + get: function () { + return this._frameTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureFrameTime", { + get: function () { + return this._captureFrameTime; + }, + set: function (e) { + this._captureFrameTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "interFrameTimeCounter", { + get: function () { + return this._interFrameTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureInterFrameTime", { + get: function () { + return this._captureInterFrameTime; + }, + set: function (e) { + this._captureInterFrameTime = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "renderTimeCounter", { + get: function () { + return this._renderTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureRenderTime", { + get: function () { + return this._captureRenderTime; + }, + set: function (e) { + var t = this; + e !== this._captureRenderTime && + ((this._captureRenderTime = e), + e + ? ((this._onBeforeDrawPhaseObserver = this.scene.onBeforeDrawPhaseObservable.add(function () { + t._renderTime.beginMonitoring(), $e.b.StartPerformanceCounter("Main render"); + })), + (this._onAfterDrawPhaseObserver = this.scene.onAfterDrawPhaseObservable.add(function () { + t._renderTime.endMonitoring(!1), $e.b.EndPerformanceCounter("Main render"); + }))) + : (this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver), + (this._onBeforeDrawPhaseObserver = null), + this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver), + (this._onAfterDrawPhaseObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "cameraRenderTimeCounter", { + get: function () { + return this._cameraRenderTime; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "captureCameraRenderTime", { + get: function () { + return this._captureCameraRenderTime; + }, + set: function (e) { + var t = this; + e !== this._captureCameraRenderTime && + ((this._captureCameraRenderTime = e), + e + ? ((this._onBeforeCameraRenderObserver = this.scene.onBeforeCameraRenderObservable.add(function (e) { + t._cameraRenderTime.beginMonitoring(), $e.b.StartPerformanceCounter("Rendering camera " + e.name); + })), + (this._onAfterCameraRenderObserver = this.scene.onAfterCameraRenderObservable.add(function (e) { + t._cameraRenderTime.endMonitoring(!1), $e.b.EndPerformanceCounter("Rendering camera " + e.name); + }))) + : (this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + (this._onBeforeCameraRenderObserver = null), + this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver), + (this._onAfterCameraRenderObserver = null))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "drawCallsCounter", { + get: function () { + return this.scene.getEngine()._drawCalls; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver), + (this._onAfterRenderObserver = null), + this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver), + (this._onBeforeActiveMeshesEvaluationObserver = null), + this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver), + (this._onAfterActiveMeshesEvaluationObserver = null), + this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver), + (this._onBeforeRenderTargetsRenderObserver = null), + this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver), + (this._onAfterRenderTargetsRenderObserver = null), + this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver), + (this._onBeforeAnimationsObserver = null), + this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver), + (this._onBeforeParticlesRenderingObserver = null), + this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver), + (this._onAfterParticlesRenderingObserver = null), + this._onBeforeSpritesRenderingObserver && (this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver), (this._onBeforeSpritesRenderingObserver = null)), + this._onAfterSpritesRenderingObserver && (this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver), (this._onAfterSpritesRenderingObserver = null)), + this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver), + (this._onBeforeDrawPhaseObserver = null), + this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver), + (this._onAfterDrawPhaseObserver = null), + this._onBeforePhysicsObserver && (this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver), (this._onBeforePhysicsObserver = null)), + this._onAfterPhysicsObserver && (this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver), (this._onAfterPhysicsObserver = null)), + this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver), + (this._onAfterAnimationsObserver = null), + this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver), + (this._onBeforeCameraRenderObserver = null), + this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver), + (this._onAfterCameraRenderObserver = null), + (this.scene = null); + }), + e + ); + })(), + Fo = n(28), + No = + "#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;\nuniform sampler2D diffuseSampler;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;\nuniform sampler2D opacitySampler;\nuniform float opacityIntensity;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef VERTEXALPHA\nvarying vec4 vColor;\n#endif\nuniform vec4 glowColor;\nvoid main(void)\n{\nvec4 finalColor=glowColor;\n\n#ifdef DIFFUSE\nvec4 albedoTexture=texture2D(diffuseSampler,vUVDiffuse);\nfinalColor.a*=albedoTexture.a;\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vUVOpacity);\n#ifdef OPACITYRGB\nfinalColor.a*=getLuminance(opacityMap.rgb);\n#else\nfinalColor.a*=opacityMap.a;\n#endif\nfinalColor.a*=opacityIntensity;\n#endif\n#ifdef VERTEXALPHA\nfinalColor.a*=vColor.a;\n#endif\n#ifdef ALPHATEST\nif (finalColor.a\n#include\n#include[0..maxSimultaneousMorphTargets]\n\n#include\nuniform mat4 viewProjection;\nvarying vec4 vPosition;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;\nuniform mat4 diffuseMatrix;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;\nuniform mat4 opacityMatrix;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef VERTEXALPHA\nattribute vec4 color;\nvarying vec4 vColor;\n#endif\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\n#ifdef CUBEMAP\nvPosition=finalWorld*vec4(positionUpdated,1.0);\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#else\nvPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\ngl_Position=vPosition;\n#endif\n#ifdef DIFFUSE\n#ifdef DIFFUSEUV1\nvUVDiffuse=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef DIFFUSEUV2\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef OPACITY\n#ifdef OPACITYUV1\nvUVOpacity=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef OPACITYUV2\nvUVOpacity=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef EMISSIVE\n#ifdef EMISSIVEUV1\nvUVEmissive=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef EMISSIVEUV2\nvUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef VERTEXALPHA\nvColor=color;\n#endif\n}"; + Xt.a.ShadersStore.glowMapGenerationVertexShader = ko; + var zo = n(22), + jo = (function () { + function e(t, n) { + (this._vertexBuffers = {}), + (this._maxSize = 0), + (this._mainTextureDesiredSize = { width: 0, height: 0 }), + (this._shouldRender = !0), + (this._postProcesses = []), + (this._textures = []), + (this._emissiveTextureAndColor = { texture: null, color: new s.b() }), + (this.neutralColor = new s.b()), + (this.isEnabled = !0), + (this.onDisposeObservable = new o.c()), + (this.onBeforeRenderMainTextureObservable = new o.c()), + (this.onBeforeComposeObservable = new o.c()), + (this.onBeforeRenderMeshToEffect = new o.c()), + (this.onAfterRenderMeshToEffect = new o.c()), + (this.onAfterComposeObservable = new o.c()), + (this.onSizeChangedObservable = new o.c()), + (this.name = t), + (this._scene = n || E.a.LastCreatedScene), + e._SceneComponentInitialization(this._scene), + (this._engine = this._scene.getEngine()), + (this._maxSize = this._engine.getCaps().maxTextureSize), + this._scene.effectLayers.push(this), + this._generateIndexBuffer(), + this._generateVertexBuffer(); + } + return ( + Object.defineProperty(e.prototype, "camera", { + get: function () { + return this._effectLayerOptions.camera; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "renderingGroupId", { + get: function () { + return this._effectLayerOptions.renderingGroupId; + }, + set: function (e) { + this._effectLayerOptions.renderingGroupId = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._init = function (e) { + (this._effectLayerOptions = Object(h.a)({ mainTextureRatio: 0.5, alphaBlendingMode: 2, camera: null, renderingGroupId: -1 }, e)), + this._setMainTextureSize(), + this._createMainTexture(), + this._createTextureAndPostProcesses(), + (this._mergeEffect = this._createMergeEffect()); + }), + (e.prototype._generateIndexBuffer = function () { + var e = []; + e.push(0), e.push(1), e.push(2), e.push(0), e.push(2), e.push(3), (this._indexBuffer = this._engine.createIndexBuffer(e)); + }), + (e.prototype._generateVertexBuffer = function () { + var e = []; + e.push(1, 1), e.push(-1, 1), e.push(-1, -1), e.push(1, -1); + var t = new wn.b(this._engine, e, wn.b.PositionKind, !1, !1, 2); + this._vertexBuffers[wn.b.PositionKind] = t; + }), + (e.prototype._setMainTextureSize = function () { + this._effectLayerOptions.mainTextureFixedSize + ? ((this._mainTextureDesiredSize.width = this._effectLayerOptions.mainTextureFixedSize), (this._mainTextureDesiredSize.height = this._effectLayerOptions.mainTextureFixedSize)) + : ((this._mainTextureDesiredSize.width = this._engine.getRenderWidth() * this._effectLayerOptions.mainTextureRatio), + (this._mainTextureDesiredSize.height = this._engine.getRenderHeight() * this._effectLayerOptions.mainTextureRatio), + (this._mainTextureDesiredSize.width = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(this._mainTextureDesiredSize.width, this._maxSize) : this._mainTextureDesiredSize.width), + (this._mainTextureDesiredSize.height = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(this._mainTextureDesiredSize.height, this._maxSize) : this._mainTextureDesiredSize.height)), + (this._mainTextureDesiredSize.width = Math.floor(this._mainTextureDesiredSize.width)), + (this._mainTextureDesiredSize.height = Math.floor(this._mainTextureDesiredSize.height)); + }), + (e.prototype._createMainTexture = function () { + var e = this; + (this._mainTexture = new mn.a("HighlightLayerMainRTT", { width: this._mainTextureDesiredSize.width, height: this._mainTextureDesiredSize.height }, this._scene, !1, !0, 0)), + (this._mainTexture.activeCamera = this._effectLayerOptions.camera), + (this._mainTexture.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._mainTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._mainTexture.anisotropicFilteringLevel = 1), + this._mainTexture.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE), + (this._mainTexture.renderParticles = !1), + (this._mainTexture.renderList = null), + (this._mainTexture.ignoreCameraViewport = !0), + (this._mainTexture.customRenderFunction = function (t, n, i, r) { + var o; + e.onBeforeRenderMainTextureObservable.notifyObservers(e); + var a = e._scene.getEngine(); + if (r.length) { + for (a.setColorWrite(!1), o = 0; o < r.length; o++) e._renderSubMesh(r.data[o]); + a.setColorWrite(!0); + } + for (o = 0; o < t.length; o++) e._renderSubMesh(t.data[o]); + for (o = 0; o < n.length; o++) e._renderSubMesh(n.data[o]); + var s = a.getAlphaMode(); + for (o = 0; o < i.length; o++) e._renderSubMesh(i.data[o], !0); + a.setAlphaMode(s); + }), + this._mainTexture.onClearObservable.add(function (t) { + t.clear(e.neutralColor, !0, !0, !0); + }); + }), + (e.prototype._addCustomEffectDefines = function (e) {}), + (e.prototype._isReady = function (e, t, n) { + var i = e.getMaterial(); + if (!i) return !1; + if (!i.isReadyForSubMesh(e.getMesh(), e, t)) return !1; + var r = [], + o = [wn.b.PositionKind], + a = e.getMesh(), + s = !1, + c = !1; + if (i) { + var l = i.needAlphaTesting(), + u = i.getAlphaTestTexture(), + h = u && u.hasAlpha && (i.useAlphaFromDiffuseTexture || i._useAlphaFromAlbedoTexture); + u && + (l || h) && + (r.push("#define DIFFUSE"), + a.isVerticesDataPresent(wn.b.UV2Kind) && 1 === u.coordinatesIndex ? (r.push("#define DIFFUSEUV2"), (c = !0)) : a.isVerticesDataPresent(wn.b.UVKind) && (r.push("#define DIFFUSEUV1"), (s = !0)), + l && (r.push("#define ALPHATEST"), r.push("#define ALPHATESTVALUE 0.4"))); + var d = i.opacityTexture; + d && + (r.push("#define OPACITY"), + a.isVerticesDataPresent(wn.b.UV2Kind) && 1 === d.coordinatesIndex ? (r.push("#define OPACITYUV2"), (c = !0)) : a.isVerticesDataPresent(wn.b.UVKind) && (r.push("#define OPACITYUV1"), (s = !0))); + } + n && + (r.push("#define EMISSIVE"), + a.isVerticesDataPresent(wn.b.UV2Kind) && 1 === n.coordinatesIndex ? (r.push("#define EMISSIVEUV2"), (c = !0)) : a.isVerticesDataPresent(wn.b.UVKind) && (r.push("#define EMISSIVEUV1"), (s = !0))), + a.isVerticesDataPresent(wn.b.ColorKind) && a.hasVertexAlpha && (o.push(wn.b.ColorKind), r.push("#define VERTEXALPHA")), + s && (o.push(wn.b.UVKind), r.push("#define UV1")), + c && (o.push(wn.b.UV2Kind), r.push("#define UV2")); + var p = new jr.a(); + if (a.useBones && a.computeBonesUsingShaders) { + o.push(wn.b.MatricesIndicesKind), + o.push(wn.b.MatricesWeightsKind), + a.numBoneInfluencers > 4 && (o.push(wn.b.MatricesIndicesExtraKind), o.push(wn.b.MatricesWeightsExtraKind)), + r.push("#define NUM_BONE_INFLUENCERS " + a.numBoneInfluencers); + var f = a.skeleton; + f && f.isUsingTextureForMatrices ? r.push("#define BONETEXTURE") : r.push("#define BonesPerMesh " + (f ? f.bones.length + 1 : 0)), a.numBoneInfluencers > 0 && p.addCPUSkinningFallback(0, a); + } else r.push("#define NUM_BONE_INFLUENCERS 0"); + var m = a.morphTargetManager, + g = 0; + m && m.numInfluencers > 0 && (r.push("#define MORPHTARGETS"), (g = m.numInfluencers), r.push("#define NUM_MORPH_INFLUENCERS " + g), Ir.a.PrepareAttributesForMorphTargetsInfluencers(o, a, g)), + t && (r.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(o)), + this._addCustomEffectDefines(r); + var b = r.join("\n"); + return ( + this._cachedDefines !== b && + ((this._cachedDefines = b), + (this._effectLayerMapGenerationEffect = this._scene + .getEngine() + .createEffect( + "glowMapGeneration", + o, + ["world", "mBones", "viewProjection", "glowColor", "morphTargetInfluences", "boneTextureWidth", "diffuseMatrix", "emissiveMatrix", "opacityMatrix", "opacityIntensity"], + ["diffuseSampler", "emissiveSampler", "opacitySampler", "boneSampler"], + b, + p, + void 0, + void 0, + { maxSimultaneousMorphTargets: g } + ))), + this._effectLayerMapGenerationEffect.isReady() + ); + }), + (e.prototype.render = function () { + var e = this._mergeEffect; + if (e.isReady()) { + for (var t = 0; t < this._postProcesses.length; t++) if (!this._postProcesses[t].isReady()) return; + var n = this._scene.getEngine(); + this.onBeforeComposeObservable.notifyObservers(this), n.enableEffect(e), n.setState(!1), n.bindBuffers(this._vertexBuffers, this._indexBuffer, e); + var i = n.getAlphaMode(); + n.setAlphaMode(this._effectLayerOptions.alphaBlendingMode), this._internalRender(e), n.setAlphaMode(i), this.onAfterComposeObservable.notifyObservers(this); + var r = this._mainTexture.getSize(); + this._setMainTextureSize(), + (r.width === this._mainTextureDesiredSize.width && r.height === this._mainTextureDesiredSize.height) || + (this.onSizeChangedObservable.notifyObservers(this), this._disposeTextureAndPostProcesses(), this._createMainTexture(), this._createTextureAndPostProcesses()); + } + }), + (e.prototype.hasMesh = function (e) { + return -1 === this.renderingGroupId || e.renderingGroupId === this.renderingGroupId; + }), + (e.prototype.shouldRender = function () { + return this.isEnabled && this._shouldRender; + }), + (e.prototype._shouldRenderMesh = function (e) { + return !0; + }), + (e.prototype._canRenderMesh = function (e, t) { + return !t.needAlphaBlendingForMesh(e); + }), + (e.prototype._shouldRenderEmissiveTextureForMesh = function () { + return !0; + }), + (e.prototype._renderSubMesh = function (e, t) { + var n = this; + if ((void 0 === t && (t = !1), this.shouldRender())) { + var i = e.getMaterial(), + r = e.getRenderingMesh(), + o = this._scene, + a = o.getEngine(); + if (((r._internalAbstractMeshDataInfo._isActiveIntermediate = !1), i && this._canRenderMesh(r, i))) { + a.setState(i.backFaceCulling); + var s = r._getInstancesRenderList(e._id); + if (!s.mustReturn && this._shouldRenderMesh(r)) { + var c = s.hardwareInstancedRendering[e._id]; + if ((this._setEmissiveTextureAndColor(r, e, i), this.onBeforeRenderMeshToEffect.notifyObservers(r), this._useMeshMaterial(r))) r.render(e, c); + else if (this._isReady(e, c, this._emissiveTextureAndColor.texture)) { + a.enableEffect(this._effectLayerMapGenerationEffect), + r._bind(e, this._effectLayerMapGenerationEffect, Fo.a.TriangleFillMode), + this._effectLayerMapGenerationEffect.setMatrix("viewProjection", o.getTransformMatrix()), + this._effectLayerMapGenerationEffect.setFloat4( + "glowColor", + this._emissiveTextureAndColor.color.r, + this._emissiveTextureAndColor.color.g, + this._emissiveTextureAndColor.color.b, + this._emissiveTextureAndColor.color.a + ); + var l = i.needAlphaTesting(), + u = i.getAlphaTestTexture(), + h = u && u.hasAlpha && (i.useAlphaFromDiffuseTexture || i._useAlphaFromAlbedoTexture); + if (u && (l || h)) this._effectLayerMapGenerationEffect.setTexture("diffuseSampler", u), (d = u.getTextureMatrix()) && this._effectLayerMapGenerationEffect.setMatrix("diffuseMatrix", d); + var d, + p = i.opacityTexture; + if (p) + this._effectLayerMapGenerationEffect.setTexture("opacitySampler", p), + this._effectLayerMapGenerationEffect.setFloat("opacityIntensity", p.level), + (d = p.getTextureMatrix()) && this._effectLayerMapGenerationEffect.setMatrix("opacityMatrix", d); + if ( + (this._emissiveTextureAndColor.texture && + (this._effectLayerMapGenerationEffect.setTexture("emissiveSampler", this._emissiveTextureAndColor.texture), + this._effectLayerMapGenerationEffect.setMatrix("emissiveMatrix", this._emissiveTextureAndColor.texture.getTextureMatrix())), + r.useBones && r.computeBonesUsingShaders && r.skeleton) + ) { + var f = r.skeleton; + if (f.isUsingTextureForMatrices) { + var m = f.getTransformMatrixTexture(r); + if (!m) return; + this._effectLayerMapGenerationEffect.setTexture("boneSampler", m), this._effectLayerMapGenerationEffect.setFloat("boneTextureWidth", 4 * (f.bones.length + 1)); + } else this._effectLayerMapGenerationEffect.setMatrices("mBones", f.getTransformMatrices(r)); + } + Ir.a.BindMorphTargetParameters(r, this._effectLayerMapGenerationEffect), + t && a.setAlphaMode(i.alphaMode), + r._processRendering(e, this._effectLayerMapGenerationEffect, i.fillMode, s, c, function (e, t) { + return n._effectLayerMapGenerationEffect.setMatrix("world", t); + }); + } else this._mainTexture.resetRefreshCounter(); + this.onAfterRenderMeshToEffect.notifyObservers(r); + } + } + } + }), + (e.prototype._useMeshMaterial = function (e) { + return !1; + }), + (e.prototype._rebuild = function () { + var e = this._vertexBuffers[wn.b.PositionKind]; + e && e._rebuild(), this._generateIndexBuffer(); + }), + (e.prototype._disposeTextureAndPostProcesses = function () { + this._mainTexture.dispose(); + for (var e = 0; e < this._postProcesses.length; e++) this._postProcesses[e] && this._postProcesses[e].dispose(); + this._postProcesses = []; + for (e = 0; e < this._textures.length; e++) this._textures[e] && this._textures[e].dispose(); + this._textures = []; + }), + (e.prototype.dispose = function () { + var e = this._vertexBuffers[wn.b.PositionKind]; + e && (e.dispose(), (this._vertexBuffers[wn.b.PositionKind] = null)), + this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)), + this._disposeTextureAndPostProcesses(); + var t = this._scene.effectLayers.indexOf(this, 0); + t > -1 && this._scene.effectLayers.splice(t, 1), + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(), + this.onBeforeRenderMainTextureObservable.clear(), + this.onBeforeComposeObservable.clear(), + this.onBeforeRenderMeshToEffect.clear(), + this.onAfterRenderMeshToEffect.clear(), + this.onAfterComposeObservable.clear(), + this.onSizeChangedObservable.clear(); + }), + (e.prototype.getClassName = function () { + return "EffectLayer"; + }), + (e.Parse = function (e, t, n) { + return $e.b.Instantiate(e.customType).Parse(e, t, n); + }), + (e._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("EffectLayerSceneComponent"); + }), + Object(h.c)([Object(He.c)()], e.prototype, "name", void 0), + Object(h.c)([Object(He.f)()], e.prototype, "neutralColor", void 0), + Object(h.c)([Object(He.c)()], e.prototype, "isEnabled", void 0), + Object(h.c)([Object(He.d)()], e.prototype, "camera", null), + Object(h.c)([Object(He.c)()], e.prototype, "renderingGroupId", null), + e + ); + })(); + i.a.AddParser(me.a.NAME_EFFECTLAYER, function (e, t, n, i) { + if (e.effectLayers) { + n.effectLayers || (n.effectLayers = new Array()); + for (var r = 0; r < e.effectLayers.length; r++) { + var o = jo.Parse(e.effectLayers[r], t, i); + n.effectLayers.push(o); + } + } + }), + (i.a.prototype.removeEffectLayer = function (e) { + var t = this.effectLayers.indexOf(e); + return -1 !== t && this.effectLayers.splice(t, 1), t; + }), + (i.a.prototype.addEffectLayer = function (e) { + this.effectLayers.push(e); + }); + var Bo = (function () { + function e(e) { + (this.name = me.a.NAME_EFFECTLAYER), (this._renderEffects = !1), (this._needStencil = !1), (this._previousStencilState = !1), (this.scene = e), (this._engine = e.getEngine()), (e.effectLayers = new Array()); + } + return ( + (e.prototype.register = function () { + this.scene._isReadyForMeshStage.registerStep(me.a.STEP_ISREADYFORMESH_EFFECTLAYER, this, this._isReadyForMesh), + this.scene._cameraDrawRenderTargetStage.registerStep(me.a.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER, this, this._renderMainTexture), + this.scene._beforeCameraDrawStage.registerStep(me.a.STEP_BEFORECAMERADRAW_EFFECTLAYER, this, this._setStencil), + this.scene._afterRenderingGroupDrawStage.registerStep(me.a.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW, this, this._drawRenderingGroup), + this.scene._afterCameraDrawStage.registerStep(me.a.STEP_AFTERCAMERADRAW_EFFECTLAYER, this, this._setStencilBack), + this.scene._afterCameraDrawStage.registerStep(me.a.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW, this, this._drawCamera); + }), + (e.prototype.rebuild = function () { + for (var e = 0, t = this.scene.effectLayers; e < t.length; e++) { + t[e]._rebuild(); + } + }), + (e.prototype.serialize = function (e) { + e.effectLayers = []; + for (var t = 0, n = this.scene.effectLayers; t < n.length; t++) { + var i = n[t]; + i.serialize && e.effectLayers.push(i.serialize()); + } + }), + (e.prototype.addFromContainer = function (e) { + var t = this; + e.effectLayers && + e.effectLayers.forEach(function (e) { + t.scene.addEffectLayer(e); + }); + }), + (e.prototype.removeFromContainer = function (e, t) { + var n = this; + e.effectLayers && + e.effectLayers.forEach(function (e) { + n.scene.removeEffectLayer(e), t && e.dispose(); + }); + }), + (e.prototype.dispose = function () { + for (var e = this.scene.effectLayers; e.length; ) e[0].dispose(); + }), + (e.prototype._isReadyForMesh = function (e, t) { + for (var n = 0, i = this.scene.effectLayers; n < i.length; n++) { + var r = i[n]; + if (r.hasMesh(e)) + for (var o = 0, a = e.subMeshes; o < a.length; o++) { + var s = a[o]; + if (!r.isReady(s, t)) return !1; + } + } + return !0; + }), + (e.prototype._renderMainTexture = function (e) { + (this._renderEffects = !1), (this._needStencil = !1); + var t = !1, + n = this.scene.effectLayers; + if (n && n.length > 0) { + this._previousStencilState = this._engine.getStencilBuffer(); + for (var i = 0, r = n; i < r.length; i++) { + var o = r[i]; + if (o.shouldRender() && (!o.camera || (o.camera.cameraRigMode === De.a.RIG_MODE_NONE && e === o.camera) || (o.camera.cameraRigMode !== De.a.RIG_MODE_NONE && o.camera._rigCameras.indexOf(e) > -1))) { + (this._renderEffects = !0), (this._needStencil = this._needStencil || o.needStencil()); + var a = o._mainTexture; + a._shouldRender() && (this.scene.incrementRenderId(), a.render(!1, !1), (t = !0)); + } + } + this.scene.incrementRenderId(); + } + return t; + }), + (e.prototype._setStencil = function () { + this._needStencil && this._engine.setStencilBuffer(!0); + }), + (e.prototype._setStencilBack = function () { + this._needStencil && this._engine.setStencilBuffer(this._previousStencilState); + }), + (e.prototype._draw = function (e) { + if (this._renderEffects) { + this._engine.setDepthBuffer(!1); + for (var t = this.scene.effectLayers, n = 0; n < t.length; n++) { + var i = t[n]; + i.renderingGroupId === e && i.shouldRender() && i.render(); + } + this._engine.setDepthBuffer(!0); + } + }), + (e.prototype._drawCamera = function () { + this._renderEffects && this._draw(-1); + }), + (e.prototype._drawRenderingGroup = function (e) { + !this.scene._isInIntermediateRendering() && this._renderEffects && this._draw(e); + }), + e + ); + })(); + jo._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_EFFECTLAYER); + t || ((t = new Bo(e)), e._addComponent(t)); + }; + var Vo = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#ifdef EMISSIVE\nuniform sampler2D textureSampler2;\n#endif\n\nuniform float offset;\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\n#ifdef EMISSIVE\nbaseColor+=texture2D(textureSampler2,vUV);\nbaseColor*=offset;\n#else\nbaseColor.a=abs(offset-baseColor.a);\n#ifdef STROKE\nfloat alpha=smoothstep(.0,.1,baseColor.a);\nbaseColor.a=alpha;\nbaseColor.rgb=baseColor.rgb*alpha;\n#endif\n#endif\ngl_FragColor=baseColor;\n}"; + Xt.a.ShadersStore.glowMapMergePixelShader = Vo; + var Go = "\nattribute vec2 position;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=position*madd+madd;\ngl_Position=vec4(position,0.0,1.0);\n}"; + Xt.a.ShadersStore.glowMapMergeVertexShader = Go; + i.a.prototype.getGlowLayerByName = function (e) { + for (var t = 0; t < this.effectLayers.length; t++) if (this.effectLayers[t].name === e && this.effectLayers[t].getEffectName() === Uo.EffectName) return this.effectLayers[t]; + return null; + }; + var Uo = (function (e) { + function t(n, i, r) { + var o = e.call(this, n, i) || this; + return ( + (o._intensity = 1), + (o._includedOnlyMeshes = []), + (o._excludedMeshes = []), + (o._meshesUsingTheirOwnMaterials = []), + (o.neutralColor = new s.b(0, 0, 0, 1)), + (o._options = Object(h.a)({ mainTextureRatio: t.DefaultTextureRatio, blurKernelSize: 32, mainTextureFixedSize: void 0, camera: null, mainTextureSamples: 1, renderingGroupId: -1 }, r)), + o._init({ alphaBlendingMode: 1, camera: o._options.camera, mainTextureFixedSize: o._options.mainTextureFixedSize, mainTextureRatio: o._options.mainTextureRatio, renderingGroupId: o._options.renderingGroupId }), + o + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "blurKernelSize", { + get: function () { + return this._horizontalBlurPostprocess1.kernel; + }, + set: function (e) { + (this._horizontalBlurPostprocess1.kernel = e), (this._verticalBlurPostprocess1.kernel = e), (this._horizontalBlurPostprocess2.kernel = e), (this._verticalBlurPostprocess2.kernel = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "intensity", { + get: function () { + return this._intensity; + }, + set: function (e) { + this._intensity = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getEffectName = function () { + return t.EffectName; + }), + (t.prototype._createMergeEffect = function () { + return this._engine.createEffect("glowMapMerge", [wn.b.PositionKind], ["offset"], ["textureSampler", "textureSampler2"], "#define EMISSIVE \n"); + }), + (t.prototype._createTextureAndPostProcesses = function () { + var e = this, + t = this._mainTextureDesiredSize.width, + n = this._mainTextureDesiredSize.height; + (t = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(t, this._maxSize) : t), (n = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(n, this._maxSize) : n); + var i = 0; + (i = this._engine.getCaps().textureHalfFloatRender ? 2 : 0), + (this._blurTexture1 = new mn.a("GlowLayerBlurRTT", { width: t, height: n }, this._scene, !1, !0, i)), + (this._blurTexture1.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._blurTexture1.wrapV = ln.a.CLAMP_ADDRESSMODE), + this._blurTexture1.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE), + (this._blurTexture1.renderParticles = !1), + (this._blurTexture1.ignoreCameraViewport = !0); + var r = Math.floor(t / 2), + o = Math.floor(n / 2); + (this._blurTexture2 = new mn.a("GlowLayerBlurRTT2", { width: r, height: o }, this._scene, !1, !0, i)), + (this._blurTexture2.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._blurTexture2.wrapV = ln.a.CLAMP_ADDRESSMODE), + this._blurTexture2.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE), + (this._blurTexture2.renderParticles = !1), + (this._blurTexture2.ignoreCameraViewport = !0), + (this._textures = [this._blurTexture1, this._blurTexture2]), + (this._horizontalBlurPostprocess1 = new Er("GlowLayerHBP1", new a.d(1, 0), this._options.blurKernelSize / 2, { width: t, height: n }, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1, i)), + (this._horizontalBlurPostprocess1.width = t), + (this._horizontalBlurPostprocess1.height = n), + this._horizontalBlurPostprocess1.onApplyObservable.add(function (t) { + t.setTexture("textureSampler", e._mainTexture); + }), + (this._verticalBlurPostprocess1 = new Er("GlowLayerVBP1", new a.d(0, 1), this._options.blurKernelSize / 2, { width: t, height: n }, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1, i)), + (this._horizontalBlurPostprocess2 = new Er("GlowLayerHBP2", new a.d(1, 0), this._options.blurKernelSize / 2, { width: r, height: o }, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1, i)), + (this._horizontalBlurPostprocess2.width = r), + (this._horizontalBlurPostprocess2.height = o), + this._horizontalBlurPostprocess2.onApplyObservable.add(function (t) { + t.setTexture("textureSampler", e._blurTexture1); + }), + (this._verticalBlurPostprocess2 = new Er("GlowLayerVBP2", new a.d(0, 1), this._options.blurKernelSize / 2, { width: r, height: o }, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1, i)), + (this._postProcesses = [this._horizontalBlurPostprocess1, this._verticalBlurPostprocess1, this._horizontalBlurPostprocess2, this._verticalBlurPostprocess2]), + (this._postProcesses1 = [this._horizontalBlurPostprocess1, this._verticalBlurPostprocess1]), + (this._postProcesses2 = [this._horizontalBlurPostprocess2, this._verticalBlurPostprocess2]), + (this._mainTexture.samples = this._options.mainTextureSamples), + this._mainTexture.onAfterUnbindObservable.add(function () { + var t = e._blurTexture1.getInternalTexture(); + t && (e._scene.postProcessManager.directRender(e._postProcesses1, t, !0), (t = e._blurTexture2.getInternalTexture()) && e._scene.postProcessManager.directRender(e._postProcesses2, t, !0)); + }), + this._postProcesses.map(function (e) { + e.autoClear = !1; + }); + }), + (t.prototype.isReady = function (t, n) { + var i = t.getMaterial(), + r = t.getRenderingMesh(); + if (!i || !r) return !1; + var o = i.emissiveTexture; + return e.prototype._isReady.call(this, t, n, o); + }), + (t.prototype.needStencil = function () { + return !1; + }), + (t.prototype._canRenderMesh = function (e, t) { + return !0; + }), + (t.prototype._internalRender = function (e) { + e.setTexture("textureSampler", this._blurTexture1), e.setTexture("textureSampler2", this._blurTexture2), e.setFloat("offset", this._intensity); + var t = this._engine, + n = t.getStencilBuffer(); + t.setStencilBuffer(!1), t.drawElementsType(Fo.a.TriangleFillMode, 0, 6), t.setStencilBuffer(n); + }), + (t.prototype._setEmissiveTextureAndColor = function (e, t, n) { + var i = 1; + this.customEmissiveTextureSelector + ? (this._emissiveTextureAndColor.texture = this.customEmissiveTextureSelector(e, t, n)) + : n + ? ((this._emissiveTextureAndColor.texture = n.emissiveTexture), this._emissiveTextureAndColor.texture && (i = this._emissiveTextureAndColor.texture.level)) + : (this._emissiveTextureAndColor.texture = null), + this.customEmissiveColorSelector + ? this.customEmissiveColorSelector(e, t, n, this._emissiveTextureAndColor.color) + : n.emissiveColor + ? this._emissiveTextureAndColor.color.set(n.emissiveColor.r * i, n.emissiveColor.g * i, n.emissiveColor.b * i, n.alpha) + : this._emissiveTextureAndColor.color.set(this.neutralColor.r, this.neutralColor.g, this.neutralColor.b, this.neutralColor.a); + }), + (t.prototype._shouldRenderMesh = function (e) { + return this.hasMesh(e); + }), + (t.prototype._addCustomEffectDefines = function (e) { + e.push("#define GLOW"); + }), + (t.prototype.addExcludedMesh = function (e) { + -1 === this._excludedMeshes.indexOf(e.uniqueId) && this._excludedMeshes.push(e.uniqueId); + }), + (t.prototype.removeExcludedMesh = function (e) { + var t = this._excludedMeshes.indexOf(e.uniqueId); + -1 !== t && this._excludedMeshes.splice(t, 1); + }), + (t.prototype.addIncludedOnlyMesh = function (e) { + -1 === this._includedOnlyMeshes.indexOf(e.uniqueId) && this._includedOnlyMeshes.push(e.uniqueId); + }), + (t.prototype.removeIncludedOnlyMesh = function (e) { + var t = this._includedOnlyMeshes.indexOf(e.uniqueId); + -1 !== t && this._includedOnlyMeshes.splice(t, 1); + }), + (t.prototype.hasMesh = function (t) { + return !!e.prototype.hasMesh.call(this, t) && (this._includedOnlyMeshes.length ? -1 !== this._includedOnlyMeshes.indexOf(t.uniqueId) : !this._excludedMeshes.length || -1 === this._excludedMeshes.indexOf(t.uniqueId)); + }), + (t.prototype._useMeshMaterial = function (e) { + return 0 != this._meshesUsingTheirOwnMaterials.length && this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId) > -1; + }), + (t.prototype.referenceMeshToUseItsOwnMaterial = function (e) { + this._meshesUsingTheirOwnMaterials.push(e.uniqueId); + }), + (t.prototype.unReferenceMeshFromUsingItsOwnMaterial = function (e) { + for (var t = this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId); t > 0; ) this._meshesUsingTheirOwnMaterials.slice(t, t + 1), (t = this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId)); + }), + (t.prototype._disposeMesh = function (e) { + this.removeIncludedOnlyMesh(e), this.removeExcludedMesh(e); + }), + (t.prototype.getClassName = function () { + return "GlowLayer"; + }), + (t.prototype.serialize = function () { + var e, + t = He.a.Serialize(this); + if (((t.customType = "BABYLON.GlowLayer"), (t.includedMeshes = []), this._includedOnlyMeshes.length)) + for (e = 0; e < this._includedOnlyMeshes.length; e++) { + (n = this._scene.getMeshByUniqueID(this._includedOnlyMeshes[e])) && t.includedMeshes.push(n.id); + } + if (((t.excludedMeshes = []), this._excludedMeshes.length)) + for (e = 0; e < this._excludedMeshes.length; e++) { + var n; + (n = this._scene.getMeshByUniqueID(this._excludedMeshes[e])) && t.excludedMeshes.push(n.id); + } + return t; + }), + (t.Parse = function (e, n, i) { + var r, + o = He.a.Parse( + function () { + return new t(e.name, n, e.options); + }, + e, + n, + i + ); + for (r = 0; r < e.excludedMeshes.length; r++) { + (a = n.getMeshByID(e.excludedMeshes[r])) && o.addExcludedMesh(a); + } + for (r = 0; r < e.includedMeshes.length; r++) { + var a; + (a = n.getMeshByID(e.includedMeshes[r])) && o.addIncludedOnlyMesh(a); + } + return o; + }), + (t.EffectName = "GlowLayer"), + (t.DefaultBlurKernelSize = 32), + (t.DefaultTextureRatio = 0.5), + Object(h.c)([Object(He.c)()], t.prototype, "blurKernelSize", null), + Object(h.c)([Object(He.c)()], t.prototype, "intensity", null), + Object(h.c)([Object(He.c)("options")], t.prototype, "_options", void 0), + t + ); + })(jo); + c.a.RegisteredTypes["BABYLON.GlowLayer"] = Uo; + var Ho = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec2 screenSize;\nuniform vec2 direction;\nuniform float blurWidth;\n\nfloat getLuminance(vec3 color)\n{\nreturn dot(color,vec3(0.2126,0.7152,0.0722));\n}\nvoid main(void)\n{\nfloat weights[7];\nweights[0]=0.05;\nweights[1]=0.1;\nweights[2]=0.2;\nweights[3]=0.3;\nweights[4]=0.2;\nweights[5]=0.1;\nweights[6]=0.05;\nvec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);\nvec2 texelStep=texelSize*direction*blurWidth;\nvec2 start=vUV-3.0*texelStep;\nvec4 baseColor=vec4(0.,0.,0.,0.);\nvec2 texelOffset=vec2(0.,0.);\nfor (int i=0; i<7; i++)\n{\n\nvec4 texel=texture2D(textureSampler,start+texelOffset);\nbaseColor.a+=texel.a*weights[i];\n\nfloat luminance=getLuminance(baseColor.rgb);\nfloat luminanceTexel=getLuminance(texel.rgb);\nfloat choice=step(luminanceTexel,luminance);\nbaseColor.rgb=choice*baseColor.rgb+(1.0-choice)*texel.rgb;\ntexelOffset+=texelStep;\n}\ngl_FragColor=baseColor;\n}"; + Xt.a.ShadersStore.glowBlurPostProcessPixelShader = Ho; + i.a.prototype.getHighlightLayerByName = function (e) { + for (var t = 0; t < this.effectLayers.length; t++) if (this.effectLayers[t].name === e && this.effectLayers[t].getEffectName() === Xo.EffectName) return this.effectLayers[t]; + return null; + }; + var Wo = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === a && (a = ln.a.BILINEAR_SAMPLINGMODE); + var l = e.call(this, t, "glowBlurPostProcess", ["screenSize", "direction", "blurWidth"], null, r, o, a, s, c) || this; + return ( + (l.direction = n), + (l.kernel = i), + l.onApplyObservable.add(function (e) { + e.setFloat2("screenSize", l.width, l.height), e.setVector2("direction", l.direction), e.setFloat("blurWidth", l.kernel); + }), + l + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Xo = (function (e) { + function t(n, i, r) { + var a = e.call(this, n, i) || this; + return ( + (a.name = n), + (a.innerGlow = !0), + (a.outerGlow = !0), + (a.onBeforeBlurObservable = new o.c()), + (a.onAfterBlurObservable = new o.c()), + (a._instanceGlowingMeshStencilReference = t.GlowingMeshStencilReference++), + (a._meshes = {}), + (a._excludedMeshes = {}), + (a.neutralColor = t.NeutralColor), + a._engine.isStencilEnable || g.a.Warn("Rendering the Highlight Layer requires the stencil to be active on the canvas. var engine = new Engine(canvas, antialias, { stencil: true }"), + (a._options = Object(h.a)({ mainTextureRatio: 0.5, blurTextureSizeRatio: 0.5, blurHorizontalSize: 1, blurVerticalSize: 1, alphaBlendingMode: 2, camera: null, renderingGroupId: -1 }, r)), + a._init({ + alphaBlendingMode: a._options.alphaBlendingMode, + camera: a._options.camera, + mainTextureFixedSize: a._options.mainTextureFixedSize, + mainTextureRatio: a._options.mainTextureRatio, + renderingGroupId: a._options.renderingGroupId, + }), + (a._shouldRender = !1), + a + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "blurHorizontalSize", { + get: function () { + return this._horizontalBlurPostprocess.kernel; + }, + set: function (e) { + this._horizontalBlurPostprocess.kernel = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "blurVerticalSize", { + get: function () { + return this._verticalBlurPostprocess.kernel; + }, + set: function (e) { + this._verticalBlurPostprocess.kernel = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getEffectName = function () { + return t.EffectName; + }), + (t.prototype._createMergeEffect = function () { + return this._engine.createEffect("glowMapMerge", [wn.b.PositionKind], ["offset"], ["textureSampler"], this._options.isStroke ? "#define STROKE \n" : void 0); + }), + (t.prototype._createTextureAndPostProcesses = function () { + var e = this, + t = this._mainTextureDesiredSize.width * this._options.blurTextureSizeRatio, + n = this._mainTextureDesiredSize.height * this._options.blurTextureSizeRatio; + (t = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(t, this._maxSize) : t), (n = this._engine.needPOTTextures ? ue.a.GetExponentOfTwo(n, this._maxSize) : n); + var i = 0; + (i = this._engine.getCaps().textureHalfFloatRender ? 2 : 0), + (this._blurTexture = new mn.a("HighlightLayerBlurRTT", { width: t, height: n }, this._scene, !1, !0, i)), + (this._blurTexture.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._blurTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._blurTexture.anisotropicFilteringLevel = 16), + this._blurTexture.updateSamplingMode(ln.a.TRILINEAR_SAMPLINGMODE), + (this._blurTexture.renderParticles = !1), + (this._blurTexture.ignoreCameraViewport = !0), + (this._textures = [this._blurTexture]), + 2 === this._options.alphaBlendingMode + ? ((this._downSamplePostprocess = new Ht.b("HighlightLayerPPP", this._options.blurTextureSizeRatio, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine())), + this._downSamplePostprocess.onApplyObservable.add(function (t) { + t.setTexture("textureSampler", e._mainTexture); + }), + (this._horizontalBlurPostprocess = new Wo("HighlightLayerHBP", new a.d(1, 0), this._options.blurHorizontalSize, 1, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine())), + this._horizontalBlurPostprocess.onApplyObservable.add(function (e) { + e.setFloat2("screenSize", t, n); + }), + (this._verticalBlurPostprocess = new Wo("HighlightLayerVBP", new a.d(0, 1), this._options.blurVerticalSize, 1, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine())), + this._verticalBlurPostprocess.onApplyObservable.add(function (e) { + e.setFloat2("screenSize", t, n); + }), + (this._postProcesses = [this._downSamplePostprocess, this._horizontalBlurPostprocess, this._verticalBlurPostprocess])) + : ((this._horizontalBlurPostprocess = new Er( + "HighlightLayerHBP", + new a.d(1, 0), + this._options.blurHorizontalSize / 2, + { width: t, height: n }, + null, + ln.a.BILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1, + i + )), + (this._horizontalBlurPostprocess.width = t), + (this._horizontalBlurPostprocess.height = n), + this._horizontalBlurPostprocess.onApplyObservable.add(function (t) { + t.setTexture("textureSampler", e._mainTexture); + }), + (this._verticalBlurPostprocess = new Er("HighlightLayerVBP", new a.d(0, 1), this._options.blurVerticalSize / 2, { width: t, height: n }, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1, i)), + (this._postProcesses = [this._horizontalBlurPostprocess, this._verticalBlurPostprocess])), + this._mainTexture.onAfterUnbindObservable.add(function () { + e.onBeforeBlurObservable.notifyObservers(e); + var t = e._blurTexture.getInternalTexture(); + t && e._scene.postProcessManager.directRender(e._postProcesses, t, !0), e.onAfterBlurObservable.notifyObservers(e); + }), + this._postProcesses.map(function (e) { + e.autoClear = !1; + }); + }), + (t.prototype.needStencil = function () { + return !0; + }), + (t.prototype.isReady = function (t, n) { + var i = t.getMaterial(), + r = t.getRenderingMesh(); + if (!i || !r || !this._meshes) return !1; + var o = null, + a = this._meshes[r.uniqueId]; + return a && a.glowEmissiveOnly && i && (o = i.emissiveTexture), e.prototype._isReady.call(this, t, n, o); + }), + (t.prototype._internalRender = function (e) { + e.setTexture("textureSampler", this._blurTexture); + var t = this._engine; + t.cacheStencilState(), + t.setStencilOperationPass(7681), + t.setStencilOperationFail(7680), + t.setStencilOperationDepthFail(7680), + t.setStencilMask(0), + t.setStencilBuffer(!0), + t.setStencilFunctionReference(this._instanceGlowingMeshStencilReference), + this.outerGlow && (e.setFloat("offset", 0), t.setStencilFunction(517), t.drawElementsType(Fo.a.TriangleFillMode, 0, 6)), + this.innerGlow && (e.setFloat("offset", 1), t.setStencilFunction(514), t.drawElementsType(Fo.a.TriangleFillMode, 0, 6)), + t.restoreStencilState(); + }), + (t.prototype.shouldRender = function () { + return !!e.prototype.shouldRender.call(this) && !!this._meshes; + }), + (t.prototype._shouldRenderMesh = function (t) { + return (!this._excludedMeshes || !this._excludedMeshes[t.uniqueId]) && !!e.prototype.hasMesh.call(this, t); + }), + (t.prototype._setEmissiveTextureAndColor = function (e, t, n) { + var i = this._meshes[e.uniqueId]; + i ? this._emissiveTextureAndColor.color.set(i.color.r, i.color.g, i.color.b, 1) : this._emissiveTextureAndColor.color.set(this.neutralColor.r, this.neutralColor.g, this.neutralColor.b, this.neutralColor.a), + i && i.glowEmissiveOnly && n ? ((this._emissiveTextureAndColor.texture = n.emissiveTexture), this._emissiveTextureAndColor.color.set(1, 1, 1, 1)) : (this._emissiveTextureAndColor.texture = null); + }), + (t.prototype.addExcludedMesh = function (e) { + this._excludedMeshes && + (this._excludedMeshes[e.uniqueId] || + (this._excludedMeshes[e.uniqueId] = { + mesh: e, + beforeBind: e.onBeforeBindObservable.add(function (e) { + e.getEngine().setStencilBuffer(!1); + }), + afterRender: e.onAfterRenderObservable.add(function (e) { + e.getEngine().setStencilBuffer(!0); + }), + })); + }), + (t.prototype.removeExcludedMesh = function (e) { + if (this._excludedMeshes) { + var t = this._excludedMeshes[e.uniqueId]; + t && (t.beforeBind && e.onBeforeBindObservable.remove(t.beforeBind), t.afterRender && e.onAfterRenderObservable.remove(t.afterRender)), (this._excludedMeshes[e.uniqueId] = null); + } + }), + (t.prototype.hasMesh = function (t) { + return !!this._meshes && !!e.prototype.hasMesh.call(this, t) && void 0 !== this._meshes[t.uniqueId] && null !== this._meshes[t.uniqueId]; + }), + (t.prototype.addMesh = function (e, t, n) { + var i = this; + if ((void 0 === n && (n = !1), this._meshes)) { + var r = this._meshes[e.uniqueId]; + r + ? (r.color = t) + : ((this._meshes[e.uniqueId] = { + mesh: e, + color: t, + observerHighlight: e.onBeforeBindObservable.add(function (e) { + i.isEnabled && (i._excludedMeshes && i._excludedMeshes[e.uniqueId] ? i._defaultStencilReference(e) : e.getScene().getEngine().setStencilFunctionReference(i._instanceGlowingMeshStencilReference)); + }), + observerDefault: e.onAfterRenderObservable.add(function (e) { + i.isEnabled && i._defaultStencilReference(e); + }), + glowEmissiveOnly: n, + }), + e.onDisposeObservable.add(function () { + i._disposeMesh(e); + })), + (this._shouldRender = !0); + } + }), + (t.prototype.removeMesh = function (e) { + if (this._meshes) { + var t = this._meshes[e.uniqueId]; + for (var n in (t && (t.observerHighlight && e.onBeforeBindObservable.remove(t.observerHighlight), t.observerDefault && e.onAfterRenderObservable.remove(t.observerDefault), delete this._meshes[e.uniqueId]), + (this._shouldRender = !1), + this._meshes)) + if (this._meshes[n]) { + this._shouldRender = !0; + break; + } + } + }), + (t.prototype.removeAllMeshes = function () { + if (this._meshes) + for (var e in this._meshes) + if (this._meshes.hasOwnProperty(e)) { + var t = this._meshes[e]; + t && this.removeMesh(t.mesh); + } + }), + (t.prototype._defaultStencilReference = function (e) { + e.getScene().getEngine().setStencilFunctionReference(t.NormalMeshStencilReference); + }), + (t.prototype._disposeMesh = function (e) { + this.removeMesh(e), this.removeExcludedMesh(e); + }), + (t.prototype.dispose = function () { + if (this._meshes) { + for (var t in this._meshes) { + (n = this._meshes[t]) && n.mesh && (n.observerHighlight && n.mesh.onBeforeBindObservable.remove(n.observerHighlight), n.observerDefault && n.mesh.onAfterRenderObservable.remove(n.observerDefault)); + } + this._meshes = null; + } + if (this._excludedMeshes) { + for (var t in this._excludedMeshes) { + var n; + (n = this._excludedMeshes[t]) && (n.beforeBind && n.mesh.onBeforeBindObservable.remove(n.beforeBind), n.afterRender && n.mesh.onAfterRenderObservable.remove(n.afterRender)); + } + this._excludedMeshes = null; + } + e.prototype.dispose.call(this); + }), + (t.prototype.getClassName = function () { + return "HighlightLayer"; + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + if (((e.customType = "BABYLON.HighlightLayer"), (e.meshes = []), this._meshes)) + for (var t in this._meshes) { + var n = this._meshes[t]; + n && e.meshes.push({ glowEmissiveOnly: n.glowEmissiveOnly, color: n.color.asArray(), meshId: n.mesh.id }); + } + if (((e.excludedMeshes = []), this._excludedMeshes)) + for (var i in this._excludedMeshes) { + var r = this._excludedMeshes[i]; + r && e.excludedMeshes.push(r.mesh.id); + } + return e; + }), + (t.Parse = function (e, n, i) { + var r, + o = He.a.Parse( + function () { + return new t(e.name, n, e.options); + }, + e, + n, + i + ); + for (r = 0; r < e.excludedMeshes.length; r++) { + (a = n.getMeshByID(e.excludedMeshes[r])) && o.addExcludedMesh(a); + } + for (r = 0; r < e.meshes.length; r++) { + var a, + c = e.meshes[r]; + (a = n.getMeshByID(c.meshId)) && o.addMesh(a, s.a.FromArray(c.color), c.glowEmissiveOnly); + } + return o; + }), + (t.EffectName = "HighlightLayer"), + (t.NeutralColor = new s.b(0, 0, 0, 0)), + (t.GlowingMeshStencilReference = 2), + (t.NormalMeshStencilReference = 1), + Object(h.c)([Object(He.c)()], t.prototype, "innerGlow", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "outerGlow", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "blurHorizontalSize", null), + Object(h.c)([Object(He.c)()], t.prototype, "blurVerticalSize", null), + Object(h.c)([Object(He.c)("options")], t.prototype, "_options", void 0), + t + ); + })(jo); + c.a.RegisteredTypes["BABYLON.HighlightLayer"] = Xo; + var Yo = n(203), + Ko = n(198), + Zo = (function () { + function e(e, t, n, i, r) { + (this.size = e), (this.position = t), (this.alphaMode = 6), (this.color = n || new s.a(1, 1, 1)), (this.texture = i ? new ln.a(i, r.getScene(), !0) : null), (this._system = r), r.lensFlares.push(this); + } + return ( + (e.AddFlare = function (t, n, i, r, o) { + return new e(t, n, i, r, o); + }), + (e.prototype.dispose = function () { + this.texture && this.texture.dispose(); + var e = this._system.lensFlares.indexOf(this); + this._system.lensFlares.splice(e, 1); + }), + e + ); + })(), + qo = "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec4 color;\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\ngl_FragColor=baseColor*color;\n}"; + Xt.a.ShadersStore.lensFlarePixelShader = qo; + var Qo = "\nattribute vec2 position;\n\nuniform mat4 viewportMatrix;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=position*madd+madd;\ngl_Position=viewportMatrix*vec4(position,0.0,1.0);\n}"; + Xt.a.ShadersStore.lensFlareVertexShader = Qo; + var Jo = (function () { + function e(t, n, i) { + (this.name = t), + (this.lensFlares = new Array()), + (this.borderLimit = 300), + (this.viewportBorder = 0), + (this.layerMask = 268435455), + (this._vertexBuffers = {}), + (this._isEnabled = !0), + (this._scene = i || E.a.LastCreatedScene), + e._SceneComponentInitialization(this._scene), + (this._emitter = n), + (this.id = t), + i.lensFlareSystems.push(this), + (this.meshesSelectionPredicate = function (e) { + return i.activeCamera && e.material && e.isVisible && e.isEnabled() && e.isBlocker && 0 != (e.layerMask & i.activeCamera.layerMask); + }); + var r = i.getEngine(), + o = []; + o.push(1, 1), o.push(-1, 1), o.push(-1, -1), o.push(1, -1), (this._vertexBuffers[wn.b.PositionKind] = new wn.b(r, o, wn.b.PositionKind, !1, !1, 2)); + var a = []; + a.push(0), + a.push(1), + a.push(2), + a.push(0), + a.push(2), + a.push(3), + (this._indexBuffer = r.createIndexBuffer(a)), + (this._effect = r.createEffect("lensFlare", [wn.b.PositionKind], ["color", "viewportMatrix"], ["textureSampler"], "")); + } + return ( + Object.defineProperty(e.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + this._isEnabled = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.getEmitter = function () { + return this._emitter; + }), + (e.prototype.setEmitter = function (e) { + this._emitter = e; + }), + (e.prototype.getEmitterPosition = function () { + return this._emitter.getAbsolutePosition ? this._emitter.getAbsolutePosition() : this._emitter.position; + }), + (e.prototype.computeEffectivePosition = function (e) { + var t = this.getEmitterPosition(); + return ( + (t = a.e.Project(t, a.a.Identity(), this._scene.getTransformMatrix(), e)), + (this._positionX = t.x), + (this._positionY = t.y), + (t = a.e.TransformCoordinates(this.getEmitterPosition(), this._scene.getViewMatrix())), + this.viewportBorder > 0 && + ((e.x -= this.viewportBorder), + (e.y -= this.viewportBorder), + (e.width += 2 * this.viewportBorder), + (e.height += 2 * this.viewportBorder), + (t.x += this.viewportBorder), + (t.y += this.viewportBorder), + (this._positionX += this.viewportBorder), + (this._positionY += this.viewportBorder)), + t.z > 0 && (this._positionX > e.x && this._positionX < e.x + e.width && this._positionY > e.y && (this._positionY, e.y, e.height), !0) + ); + }), + (e.prototype._isVisible = function () { + if (!this._isEnabled || !this._scene.activeCamera) return !1; + var e = this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition), + t = e.length(); + e.normalize(); + var n = new Re(this._scene.activeCamera.globalPosition, e), + i = this._scene.pickWithRay(n, this.meshesSelectionPredicate, !0); + return !i || !i.hit || i.distance > t; + }), + (e.prototype.render = function () { + if (!this._effect.isReady() || !this._scene.activeCamera) return !1; + var e, + t, + n = this._scene.getEngine(), + i = this._scene.activeCamera.viewport.toGlobal(n.getRenderWidth(!0), n.getRenderHeight(!0)); + if (!this.computeEffectivePosition(i)) return !1; + if (!this._isVisible()) return !1; + var r = + (e = this._positionX < this.borderLimit + i.x ? this.borderLimit + i.x - this._positionX : this._positionX > i.x + i.width - this.borderLimit ? this._positionX - i.x - i.width + this.borderLimit : 0) > + (t = this._positionY < this.borderLimit + i.y ? this.borderLimit + i.y - this._positionY : this._positionY > i.y + i.height - this.borderLimit ? this._positionY - i.y - i.height + this.borderLimit : 0) + ? e + : t; + (r -= this.viewportBorder) > this.borderLimit && (r = this.borderLimit); + var o = 1 - z.a.Clamp(r / this.borderLimit, 0, 1); + if (o < 0) return !1; + o > 1 && (o = 1), + this.viewportBorder > 0 && + ((i.x += this.viewportBorder), + (i.y += this.viewportBorder), + (i.width -= 2 * this.viewportBorder), + (i.height -= 2 * this.viewportBorder), + (this._positionX -= this.viewportBorder), + (this._positionY -= this.viewportBorder)); + var s = i.x + i.width / 2, + c = i.y + i.height / 2, + l = s - this._positionX, + u = c - this._positionY; + n.enableEffect(this._effect), n.setState(!1), n.setDepthBuffer(!1), n.bindBuffers(this._vertexBuffers, this._indexBuffer, this._effect); + for (var h = 0; h < this.lensFlares.length; h++) { + var d = this.lensFlares[h]; + if (!d.texture || d.texture.isReady()) { + n.setAlphaMode(d.alphaMode); + var p = s - l * d.position, + f = c - u * d.position, + m = d.size, + g = d.size * n.getAspectRatio(this._scene.activeCamera, !0), + b = (p / (i.width + 2 * i.x)) * 2 - 1, + _ = 1 - (f / (i.height + 2 * i.y)) * 2, + v = a.a.FromValues(m / 2, 0, 0, 0, 0, g / 2, 0, 0, 0, 0, 1, 0, b, _, 0, 1); + this._effect.setMatrix("viewportMatrix", v), + this._effect.setTexture("textureSampler", d.texture), + this._effect.setFloat4("color", d.color.r * o, d.color.g * o, d.color.b * o, 1), + n.drawElementsType(Fo.a.TriangleFillMode, 0, 6); + } + } + return n.setDepthBuffer(!0), n.setAlphaMode(0), !0; + }), + (e.prototype.dispose = function () { + var e = this._vertexBuffers[wn.b.PositionKind]; + for (e && (e.dispose(), (this._vertexBuffers[wn.b.PositionKind] = null)), this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)); this.lensFlares.length; ) + this.lensFlares[0].dispose(); + var t = this._scene.lensFlareSystems.indexOf(this); + this._scene.lensFlareSystems.splice(t, 1); + }), + (e.Parse = function (t, n, i) { + var r = n.getLastEntryByID(t.emitterId), + o = t.name || "lensFlareSystem#" + t.emitterId, + a = new e(o, r, n); + (a.id = t.id || o), (a.borderLimit = t.borderLimit); + for (var c = 0; c < t.flares.length; c++) { + var l = t.flares[c]; + Zo.AddFlare(l.size, l.position, s.a.FromArray(l.color), l.textureName ? i + l.textureName : "", a); + } + return a; + }), + (e.prototype.serialize = function () { + var e = {}; + (e.id = this.id), (e.name = this.name), (e.emitterId = this.getEmitter().id), (e.borderLimit = this.borderLimit), (e.flares = []); + for (var t = 0; t < this.lensFlares.length; t++) { + var n = this.lensFlares[t]; + e.flares.push({ size: n.size, position: n.position, color: n.color.asArray(), textureName: $e.b.GetFilename(n.texture ? n.texture.name : "") }); + } + return e; + }), + (e._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("LensFlareSystemSceneComponent"); + }), + e + ); + })(); + i.a.AddParser(me.a.NAME_LENSFLARESYSTEM, function (e, t, n, i) { + if (void 0 !== e.lensFlareSystems && null !== e.lensFlareSystems) { + n.lensFlareSystems || (n.lensFlareSystems = new Array()); + for (var r = 0, o = e.lensFlareSystems.length; r < o; r++) { + var a = e.lensFlareSystems[r], + s = Jo.Parse(a, t, i); + n.lensFlareSystems.push(s); + } + } + }), + (i.a.prototype.getLensFlareSystemByName = function (e) { + for (var t = 0; t < this.lensFlareSystems.length; t++) if (this.lensFlareSystems[t].name === e) return this.lensFlareSystems[t]; + return null; + }), + (i.a.prototype.getLensFlareSystemByID = function (e) { + for (var t = 0; t < this.lensFlareSystems.length; t++) if (this.lensFlareSystems[t].id === e) return this.lensFlareSystems[t]; + return null; + }), + (i.a.prototype.removeLensFlareSystem = function (e) { + var t = this.lensFlareSystems.indexOf(e); + return -1 !== t && this.lensFlareSystems.splice(t, 1), t; + }), + (i.a.prototype.addLensFlareSystem = function (e) { + this.lensFlareSystems.push(e); + }); + var $o = (function () { + function e(e) { + (this.name = me.a.NAME_LENSFLARESYSTEM), (this.scene = e), (e.lensFlareSystems = new Array()); + } + return ( + (e.prototype.register = function () { + this.scene._afterCameraDrawStage.registerStep(me.a.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM, this, this._draw); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.addFromContainer = function (e) { + var t = this; + e.lensFlareSystems && + e.lensFlareSystems.forEach(function (e) { + t.scene.addLensFlareSystem(e); + }); + }), + (e.prototype.removeFromContainer = function (e, t) { + var n = this; + e.lensFlareSystems && + e.lensFlareSystems.forEach(function (e) { + n.scene.removeLensFlareSystem(e), t && e.dispose(); + }); + }), + (e.prototype.serialize = function (e) { + e.lensFlareSystems = []; + for (var t = 0, n = this.scene.lensFlareSystems; t < n.length; t++) { + var i = n[t]; + e.lensFlareSystems.push(i.serialize()); + } + }), + (e.prototype.dispose = function () { + for (var e = this.scene.lensFlareSystems; e.length; ) e[0].dispose(); + }), + (e.prototype._draw = function (e) { + if (this.scene.lensFlaresEnabled) { + var t = this.scene.lensFlareSystems; + $e.b.StartPerformanceCounter("Lens flares", t.length > 0); + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + 0 != (e.layerMask & r.layerMask) && r.render(); + } + $e.b.EndPerformanceCounter("Lens flares", t.length > 0); + } + }), + e + ); + })(); + Jo._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_LENSFLARESYSTEM); + t || ((t = new $o(e)), e._addComponent(t)); + }; + var ea = n(57), + ta = n(121), + na = + "#ifndef FLOAT\n#include\n#endif\nvarying float vDepthMetric;\n#ifdef USEDISTANCE\nuniform vec3 lightData;\nvarying vec3 vPositionW;\n#endif\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\nuniform vec3 biasAndScale;\nuniform vec2 depthValues;\n#ifdef DEPTHCLAMP\nvarying float z;\n#endif\n#include\nvoid main(void)\n{\n#include\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\nfloat depth=vDepthMetric;\n#ifdef DEPTHCLAMP\n#ifdef USEDISTANCE\ndepth=clamp(((length(vPositionW-lightData)+depthValues.x)/(depthValues.y))+biasAndScale.x,0.0,1.0);\n#else\ndepth=clamp(((z+depthValues.x)/(depthValues.y))+biasAndScale.x,0.0,1.0);\n#endif\ngl_FragDepth=depth;\n#elif defined(USEDISTANCE)\ndepth=(length(vPositionW-lightData)+depthValues.x)/(depthValues.y)+biasAndScale.x;\n#endif\n#ifdef ESM\ndepth=clamp(exp(-min(87.,biasAndScale.z*depth)),0.,1.);\n#endif\n#ifdef FLOAT\ngl_FragColor=vec4(depth,1.0,1.0,1.0);\n#else\ngl_FragColor=pack(depth);\n#endif\n}"; + Xt.a.ShadersStore.shadowMapPixelShader = na; + var ia = + "\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\nuniform vec3 lightData;\n#endif\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n\n#include\n#include\nuniform mat4 viewProjection;\nuniform vec3 biasAndScale;\nuniform vec2 depthValues;\nvarying float vDepthMetric;\n#ifdef USEDISTANCE\nvarying vec3 vPositionW;\n#endif\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#ifdef DEPTHCLAMP\nvarying float z;\n#endif\n#include\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvec3 worldNor=normalize(normalWorld*normal);\n#ifdef DIRECTIONINLIGHTDATA\nvec3 worldLightDir=normalize(-lightData.xyz);\n#else\nvec3 directionToLight=lightData.xyz-worldPos.xyz;\nvec3 worldLightDir=normalize(directionToLight);\n#endif\nfloat ndl=dot(worldNor,worldLightDir);\nfloat sinNL=sqrt(1.0-ndl*ndl);\nfloat normalBias=biasAndScale.y*sinNL;\nworldPos.xyz-=worldNor*normalBias;\n#endif\n#ifdef USEDISTANCE\nvPositionW=worldPos.xyz;\n#endif\n\ngl_Position=viewProjection*worldPos;\n#ifdef DEPTHTEXTURE\n\ngl_Position.z+=biasAndScale.x*gl_Position.w;\n#endif\n#ifdef DEPTHCLAMP\nz=gl_Position.z;\ngl_Position.z=0.0;\n#elif !defined(USEDISTANCE)\n\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y))+biasAndScale.x;\n#endif\n#ifdef ALPHATEST\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include\n}"; + Xt.a.ShadersStore.shadowMapVertexShader = ia; + var ra = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec2 screenSize;\nvoid main(void)\n{\nvec4 colorDepth=vec4(0.0);\nfor (int x=-OFFSET; x<=OFFSET; x++)\nfor (int y=-OFFSET; y<=OFFSET; y++)\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);\ngl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));\n}"; + Xt.a.ShadersStore.depthBoxBlurPixelShader = ra; + var oa = n(136), + aa = (function () { + function e(t, n, i) { + (this.onBeforeShadowMapRenderObservable = new o.c()), + (this.onAfterShadowMapRenderObservable = new o.c()), + (this.onBeforeShadowMapRenderMeshObservable = new o.c()), + (this.onAfterShadowMapRenderMeshObservable = new o.c()), + (this._bias = 5e-5), + (this._normalBias = 0), + (this._blurBoxOffset = 1), + (this._blurScale = 2), + (this._blurKernel = 1), + (this._useKernelBlur = !1), + (this._filter = e.FILTER_NONE), + (this._filteringQuality = e.QUALITY_HIGH), + (this._contactHardeningLightSizeUVRatio = 0.1), + (this._darkness = 0), + (this._transparencyShadow = !1), + (this.frustumEdgeFalloff = 0), + (this.forceBackFacesOnly = !1), + (this._lightDirection = a.e.Zero()), + (this._viewMatrix = a.a.Zero()), + (this._projectionMatrix = a.a.Zero()), + (this._transformMatrix = a.a.Zero()), + (this._cachedPosition = new a.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), + (this._cachedDirection = new a.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE)), + (this._currentFaceIndex = 0), + (this._currentFaceIndexCache = 0), + (this._defaultTextureMatrix = a.a.Identity()), + (this._mapSize = t), + (this._light = n), + (this._scene = n.getScene()), + (n._shadowGenerator = this), + e._SceneComponentInitialization(this._scene); + var r = this._scene.getEngine().getCaps(); + i + ? r.textureFloatRender && r.textureFloatLinearFiltering + ? (this._textureType = 1) + : r.textureHalfFloatRender && r.textureHalfFloatLinearFiltering + ? (this._textureType = 2) + : (this._textureType = 0) + : r.textureHalfFloatRender && r.textureHalfFloatLinearFiltering + ? (this._textureType = 2) + : r.textureFloatRender && r.textureFloatLinearFiltering + ? (this._textureType = 1) + : (this._textureType = 0), + this._initializeGenerator(), + this._applyFilterValues(); + } + return ( + Object.defineProperty(e.prototype, "bias", { + get: function () { + return this._bias; + }, + set: function (e) { + this._bias = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "normalBias", { + get: function () { + return this._normalBias; + }, + set: function (e) { + this._normalBias = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "blurBoxOffset", { + get: function () { + return this._blurBoxOffset; + }, + set: function (e) { + this._blurBoxOffset !== e && ((this._blurBoxOffset = e), this._disposeBlurPostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "blurScale", { + get: function () { + return this._blurScale; + }, + set: function (e) { + this._blurScale !== e && ((this._blurScale = e), this._disposeBlurPostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "blurKernel", { + get: function () { + return this._blurKernel; + }, + set: function (e) { + this._blurKernel !== e && ((this._blurKernel = e), this._disposeBlurPostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useKernelBlur", { + get: function () { + return this._useKernelBlur; + }, + set: function (e) { + this._useKernelBlur !== e && ((this._useKernelBlur = e), this._disposeBlurPostProcesses()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "depthScale", { + get: function () { + return void 0 !== this._depthScale ? this._depthScale : this._light.getDepthScale(); + }, + set: function (e) { + this._depthScale = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._validateFilter = function (e) { + return e; + }), + Object.defineProperty(e.prototype, "filter", { + get: function () { + return this._filter; + }, + set: function (t) { + if (((t = this._validateFilter(t)), this._light.needCube())) { + if (t === e.FILTER_BLUREXPONENTIALSHADOWMAP) return void (this.useExponentialShadowMap = !0); + if (t === e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP) return void (this.useCloseExponentialShadowMap = !0); + if (t === e.FILTER_PCF || t === e.FILTER_PCSS) return void (this.usePoissonSampling = !0); + } + (t !== e.FILTER_PCF && t !== e.FILTER_PCSS) || 1 !== this._scene.getEngine().webGLVersion + ? this._filter !== t && ((this._filter = t), this._disposeBlurPostProcesses(), this._applyFilterValues(), this._light._markMeshesAsLightDirty()) + : (this.usePoissonSampling = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "usePoissonSampling", { + get: function () { + return this.filter === e.FILTER_POISSONSAMPLING; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_POISSONSAMPLING); + (t || this.filter === e.FILTER_POISSONSAMPLING) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useExponentialShadowMap", { + get: function () { + return this.filter === e.FILTER_EXPONENTIALSHADOWMAP; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_EXPONENTIALSHADOWMAP); + (t || this.filter === e.FILTER_EXPONENTIALSHADOWMAP) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useBlurExponentialShadowMap", { + get: function () { + return this.filter === e.FILTER_BLUREXPONENTIALSHADOWMAP; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_BLUREXPONENTIALSHADOWMAP); + (t || this.filter === e.FILTER_BLUREXPONENTIALSHADOWMAP) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useCloseExponentialShadowMap", { + get: function () { + return this.filter === e.FILTER_CLOSEEXPONENTIALSHADOWMAP; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_CLOSEEXPONENTIALSHADOWMAP); + (t || this.filter === e.FILTER_CLOSEEXPONENTIALSHADOWMAP) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useBlurCloseExponentialShadowMap", { + get: function () { + return this.filter === e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP); + (t || this.filter === e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "usePercentageCloserFiltering", { + get: function () { + return this.filter === e.FILTER_PCF; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_PCF); + (t || this.filter === e.FILTER_PCF) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "filteringQuality", { + get: function () { + return this._filteringQuality; + }, + set: function (e) { + this._filteringQuality !== e && ((this._filteringQuality = e), this._disposeBlurPostProcesses(), this._applyFilterValues(), this._light._markMeshesAsLightDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useContactHardeningShadow", { + get: function () { + return this.filter === e.FILTER_PCSS; + }, + set: function (t) { + var n = this._validateFilter(e.FILTER_PCSS); + (t || this.filter === e.FILTER_PCSS) && (this.filter = t ? n : e.FILTER_NONE); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "contactHardeningLightSizeUVRatio", { + get: function () { + return this._contactHardeningLightSizeUVRatio; + }, + set: function (e) { + this._contactHardeningLightSizeUVRatio = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "darkness", { + get: function () { + return this._darkness; + }, + set: function (e) { + this.setDarkness(e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getDarkness = function () { + return this._darkness; + }), + (e.prototype.setDarkness = function (e) { + return (this._darkness = e >= 1 ? 1 : e <= 0 ? 0 : e), this; + }), + Object.defineProperty(e.prototype, "transparencyShadow", { + get: function () { + return this._transparencyShadow; + }, + set: function (e) { + this.setTransparencyShadow(e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setTransparencyShadow = function (e) { + return (this._transparencyShadow = e), this; + }), + (e.prototype.getShadowMap = function () { + return this._shadowMap; + }), + (e.prototype.getShadowMapForRendering = function () { + return this._shadowMap2 ? this._shadowMap2 : this._shadowMap; + }), + (e.prototype.getClassName = function () { + return e.CLASSNAME; + }), + (e.prototype.addShadowCaster = function (e, t) { + var n; + return ( + void 0 === t && (t = !0), + this._shadowMap ? (this._shadowMap.renderList || (this._shadowMap.renderList = []), this._shadowMap.renderList.push(e), t && (n = this._shadowMap.renderList).push.apply(n, e.getChildMeshes()), this) : this + ); + }), + (e.prototype.removeShadowCaster = function (e, t) { + if ((void 0 === t && (t = !0), !this._shadowMap || !this._shadowMap.renderList)) return this; + var n = this._shadowMap.renderList.indexOf(e); + if ((-1 !== n && this._shadowMap.renderList.splice(n, 1), t)) + for (var i = 0, r = e.getChildren(); i < r.length; i++) { + var o = r[i]; + this.removeShadowCaster(o); + } + return this; + }), + (e.prototype.getLight = function () { + return this._light; + }), + (e.prototype._initializeGenerator = function () { + this._light._markMeshesAsLightDirty(), this._initializeShadowMap(); + }), + (e.prototype._createTargetRenderTexture = function () { + this._scene.getEngine().webGLVersion > 1 + ? ((this._shadowMap = new mn.a(this._light.name + "_shadowMap", this._mapSize, this._scene, !1, !0, this._textureType, this._light.needCube(), void 0, !1, !1)), this._shadowMap.createDepthStencilTexture(513, !0)) + : (this._shadowMap = new mn.a(this._light.name + "_shadowMap", this._mapSize, this._scene, !1, !0, this._textureType, this._light.needCube())); + }), + (e.prototype._initializeShadowMap = function () { + var t = this; + if ((this._createTargetRenderTexture(), null !== this._shadowMap)) { + (this._shadowMap.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._shadowMap.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._shadowMap.anisotropicFilteringLevel = 1), + this._shadowMap.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE), + (this._shadowMap.renderParticles = !1), + (this._shadowMap.ignoreCameraViewport = !0), + this._storedUniqueId && (this._shadowMap.uniqueId = this._storedUniqueId), + (this._shadowMap.customRenderFunction = this._renderForShadowMap.bind(this)); + var n = this._scene.getEngine(); + this._shadowMap.onBeforeRenderObservable.add(function (i) { + (t._currentFaceIndex = i), t._filter === e.FILTER_PCF && n.setColorWrite(!1); + }), + this._shadowMap.onAfterUnbindObservable.add(function () { + if ((t._filter === e.FILTER_PCF && n.setColorWrite(!0), t.useBlurExponentialShadowMap || t.useBlurCloseExponentialShadowMap)) { + var i = t.getShadowMapForRendering(); + i && t._scene.postProcessManager.directRender(t._blurPostProcesses, i.getInternalTexture(), !0); + } + }); + var i = new s.b(0, 0, 0, 0), + r = new s.b(1, 1, 1, 1); + this._shadowMap.onClearObservable.add(function (n) { + t._filter === e.FILTER_PCF ? n.clear(r, !1, !0, !1) : t.useExponentialShadowMap || t.useBlurExponentialShadowMap ? n.clear(i, !0, !0, !1) : n.clear(r, !0, !0, !1); + }), + this._shadowMap.onResizeObservable.add(function (e) { + (t._storedUniqueId = t._shadowMap.uniqueId), (t._mapSize = e.getRenderSize()), t._light._markMeshesAsLightDirty(), t.recreateShadowMap(); + }); + for (var o = oa.b.MIN_RENDERINGGROUPS; o < oa.b.MAX_RENDERINGGROUPS; o++) this._shadowMap.setRenderingAutoClearDepthStencil(o, !1); + } + }), + (e.prototype._initializeBlurRTTAndPostProcesses = function () { + var e = this, + t = this._scene.getEngine(), + n = this._mapSize / this.blurScale; + (this.useKernelBlur && 1 === this.blurScale) || + ((this._shadowMap2 = new mn.a(this._light.name + "_shadowMap2", n, this._scene, !1, !0, this._textureType)), + (this._shadowMap2.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._shadowMap2.wrapV = ln.a.CLAMP_ADDRESSMODE), + this._shadowMap2.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE)), + this.useKernelBlur + ? ((this._kernelBlurXPostprocess = new Er(this._light.name + "KernelBlurX", new a.d(1, 0), this.blurKernel, 1, null, ln.a.BILINEAR_SAMPLINGMODE, t, !1, this._textureType)), + (this._kernelBlurXPostprocess.width = n), + (this._kernelBlurXPostprocess.height = n), + this._kernelBlurXPostprocess.onApplyObservable.add(function (t) { + t.setTexture("textureSampler", e._shadowMap); + }), + (this._kernelBlurYPostprocess = new Er(this._light.name + "KernelBlurY", new a.d(0, 1), this.blurKernel, 1, null, ln.a.BILINEAR_SAMPLINGMODE, t, !1, this._textureType)), + (this._kernelBlurXPostprocess.autoClear = !1), + (this._kernelBlurYPostprocess.autoClear = !1), + 0 === this._textureType && ((this._kernelBlurXPostprocess.packedFloat = !0), (this._kernelBlurYPostprocess.packedFloat = !0)), + (this._blurPostProcesses = [this._kernelBlurXPostprocess, this._kernelBlurYPostprocess])) + : ((this._boxBlurPostprocess = new Wt.a( + this._light.name + "DepthBoxBlur", + "depthBoxBlur", + ["screenSize", "boxOffset"], + [], + 1, + null, + ln.a.BILINEAR_SAMPLINGMODE, + t, + !1, + "#define OFFSET " + this._blurBoxOffset, + this._textureType + )), + this._boxBlurPostprocess.onApplyObservable.add(function (t) { + t.setFloat2("screenSize", n, n), t.setTexture("textureSampler", e._shadowMap); + }), + (this._boxBlurPostprocess.autoClear = !1), + (this._blurPostProcesses = [this._boxBlurPostprocess])); + }), + (e.prototype._renderForShadowMap = function (e, t, n, i) { + var r, + o = this._scene.getEngine(), + a = o.getColorWrite(); + if (i.length) { + for (o.setColorWrite(!1), r = 0; r < i.length; r++) this._renderSubMeshForShadowMap(i.data[r]); + o.setColorWrite(a); + } + for (r = 0; r < e.length; r++) this._renderSubMeshForShadowMap(e.data[r]); + for (r = 0; r < t.length; r++) this._renderSubMeshForShadowMap(t.data[r]); + if (this._transparencyShadow) for (r = 0; r < n.length; r++) this._renderSubMeshForShadowMap(n.data[r]); + }), + (e.prototype._bindCustomEffectForRenderSubMeshForShadowMap = function (e, t) {}), + (e.prototype._renderSubMeshForShadowMap = function (e) { + var t = this, + n = e.getRenderingMesh(), + i = this._scene, + r = i.getEngine(), + o = e.getMaterial(); + if (((n._internalAbstractMeshDataInfo._isActiveIntermediate = !1), o && 0 !== e.verticesCount)) { + r.setState(o.backFaceCulling); + var a = n._getInstancesRenderList(e._id); + if (!a.mustReturn) { + var s = r.getCaps().instancedArrays && null !== a.visibleInstances[e._id] && void 0 !== a.visibleInstances[e._id]; + if (this.isReady(e, s)) { + if ( + (r.enableEffect(this._effect), + n._bind(e, this._effect, o.fillMode), + this._effect.setFloat3("biasAndScale", this.bias, this.normalBias, this.depthScale), + this._effect.setMatrix("viewProjection", this.getTransformMatrix()), + this.getLight().getTypeID() === ea.a.LIGHTTYPEID_DIRECTIONALLIGHT ? this._effect.setVector3("lightData", this._cachedDirection) : this._effect.setVector3("lightData", this._cachedPosition), + i.activeCamera && this._effect.setFloat2("depthValues", this.getLight().getDepthMinZ(i.activeCamera), this.getLight().getDepthMinZ(i.activeCamera) + this.getLight().getDepthMaxZ(i.activeCamera)), + o && o.needAlphaTesting()) + ) { + var c = o.getAlphaTestTexture(); + c && (this._effect.setTexture("diffuseSampler", c), this._effect.setMatrix("diffuseMatrix", c.getTextureMatrix() || this._defaultTextureMatrix)); + } + if (n.useBones && n.computeBonesUsingShaders && n.skeleton) { + var l = n.skeleton; + if (l.isUsingTextureForMatrices) { + var u = l.getTransformMatrixTexture(n); + if (!u) return; + this._effect.setTexture("boneSampler", u), this._effect.setFloat("boneTextureWidth", 4 * (l.bones.length + 1)); + } else this._effect.setMatrices("mBones", l.getTransformMatrices(n)); + } + Ir.a.BindMorphTargetParameters(n, this._effect), + Ir.a.BindClipPlane(this._effect, i), + this._bindCustomEffectForRenderSubMeshForShadowMap(e, this._effect), + this.forceBackFacesOnly && r.setState(!0, 0, !1, !0), + this.onBeforeShadowMapRenderMeshObservable.notifyObservers(n), + this.onBeforeShadowMapRenderObservable.notifyObservers(this._effect), + n._processRendering(e, this._effect, o.fillMode, a, s, function (e, n) { + return t._effect.setMatrix("world", n); + }), + this.forceBackFacesOnly && r.setState(!0, 0, !1, !1), + this.onAfterShadowMapRenderObservable.notifyObservers(this._effect), + this.onAfterShadowMapRenderMeshObservable.notifyObservers(n); + } else this._shadowMap && this._shadowMap.resetRefreshCounter(); + } + } + }), + (e.prototype._applyFilterValues = function () { + this._shadowMap && (this.filter === e.FILTER_NONE || this.filter === e.FILTER_PCSS ? this._shadowMap.updateSamplingMode(ln.a.NEAREST_SAMPLINGMODE) : this._shadowMap.updateSamplingMode(ln.a.BILINEAR_SAMPLINGMODE)); + }), + (e.prototype.forceCompilation = function (e, t) { + var n = this, + i = Object(h.a)({ useInstances: !1 }, t), + r = this.getShadowMap(); + if (r) { + var o = r.renderList; + if (o) { + for (var a = new Array(), s = 0, c = o; s < c.length; s++) { + var l = c[s]; + a.push.apply(a, l.subMeshes); + } + if (0 !== a.length) { + var u = 0, + d = function () { + if (n._scene && n._scene.getEngine()) { + for (; n.isReady(a[u], i.useInstances); ) if (++u >= a.length) return void (e && e(n)); + setTimeout(d, 16); + } + }; + d(); + } else e && e(this); + } else e && e(this); + } else e && e(this); + }), + (e.prototype.forceCompilationAsync = function (e) { + var t = this; + return new Promise(function (n) { + t.forceCompilation(function () { + n(); + }, e); + }); + }), + (e.prototype._isReadyCustomDefines = function (e, t, n) {}), + (e.prototype.isReady = function (e, t) { + var n = []; + 0 !== this._textureType && n.push("#define FLOAT"), + this.useExponentialShadowMap || this.useBlurExponentialShadowMap ? n.push("#define ESM") : (this.usePercentageCloserFiltering || this.useContactHardeningShadow) && n.push("#define DEPTHTEXTURE"); + var i = [wn.b.PositionKind], + r = e.getMesh(), + o = e.getMaterial(); + if ( + (this.normalBias && + r.isVerticesDataPresent(wn.b.NormalKind) && + (i.push(wn.b.NormalKind), + n.push("#define NORMAL"), + r.nonUniformScaling && n.push("#define NONUNIFORMSCALING"), + this.getLight().getTypeID() === ea.a.LIGHTTYPEID_DIRECTIONALLIGHT && n.push("#define DIRECTIONINLIGHTDATA")), + o && o.needAlphaTesting()) + ) { + var a = o.getAlphaTestTexture(); + a && + (n.push("#define ALPHATEST"), + r.isVerticesDataPresent(wn.b.UVKind) && (i.push(wn.b.UVKind), n.push("#define UV1")), + r.isVerticesDataPresent(wn.b.UV2Kind) && 1 === a.coordinatesIndex && (i.push(wn.b.UV2Kind), n.push("#define UV2"))); + } + var s = new jr.a(); + if (r.useBones && r.computeBonesUsingShaders && r.skeleton) { + i.push(wn.b.MatricesIndicesKind), i.push(wn.b.MatricesWeightsKind), r.numBoneInfluencers > 4 && (i.push(wn.b.MatricesIndicesExtraKind), i.push(wn.b.MatricesWeightsExtraKind)); + var c = r.skeleton; + n.push("#define NUM_BONE_INFLUENCERS " + r.numBoneInfluencers), + r.numBoneInfluencers > 0 && s.addCPUSkinningFallback(0, r), + c.isUsingTextureForMatrices ? n.push("#define BONETEXTURE") : n.push("#define BonesPerMesh " + (c.bones.length + 1)); + } else n.push("#define NUM_BONE_INFLUENCERS 0"); + var l = r.morphTargetManager, + u = 0; + l && l.numInfluencers > 0 && (n.push("#define MORPHTARGETS"), (u = l.numInfluencers), n.push("#define NUM_MORPH_INFLUENCERS " + u), Ir.a.PrepareAttributesForMorphTargetsInfluencers(i, r, u)); + var h = this._scene; + if ( + (h.clipPlane && n.push("#define CLIPPLANE"), + h.clipPlane2 && n.push("#define CLIPPLANE2"), + h.clipPlane3 && n.push("#define CLIPPLANE3"), + h.clipPlane4 && n.push("#define CLIPPLANE4"), + h.clipPlane5 && n.push("#define CLIPPLANE5"), + h.clipPlane6 && n.push("#define CLIPPLANE6"), + t && (n.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(i)), + this.customShaderOptions && this.customShaderOptions.defines) + ) + for (var d = 0, p = this.customShaderOptions.defines; d < p.length; d++) { + var f = p[d]; + -1 === n.indexOf(f) && n.push(f); + } + this._light.needCube() && n.push("#define USEDISTANCE"), this._isReadyCustomDefines(n, e, t); + var m = n.join("\n"); + if (this._cachedDefines !== m) { + this._cachedDefines = m; + var g = "shadowMap", + b = [ + "world", + "mBones", + "viewProjection", + "diffuseMatrix", + "lightData", + "depthValues", + "biasAndScale", + "morphTargetInfluences", + "boneTextureWidth", + "vClipPlane", + "vClipPlane2", + "vClipPlane3", + "vClipPlane4", + "vClipPlane5", + "vClipPlane6", + ], + _ = ["diffuseSampler", "boneSampler"]; + if (this.customShaderOptions) { + if (((g = this.customShaderOptions.shaderName), this.customShaderOptions.attributes)) + for (var v = 0, y = this.customShaderOptions.attributes; v < y.length; v++) { + var C = y[v]; + -1 === i.indexOf(C) && i.push(C); + } + if (this.customShaderOptions.uniforms) + for (var P = 0, x = this.customShaderOptions.uniforms; P < x.length; P++) { + var T = x[P]; + -1 === b.indexOf(T) && b.push(T); + } + if (this.customShaderOptions.samplers) + for (var S = 0, O = this.customShaderOptions.samplers; S < O.length; S++) { + var E = O[S]; + -1 === _.indexOf(E) && _.push(E); + } + } + this._effect = this._scene.getEngine().createEffect(g, i, b, _, m, s, void 0, void 0, { maxSimultaneousMorphTargets: u }); + } + return ( + !!this._effect.isReady() && + ((this.useBlurExponentialShadowMap || this.useBlurCloseExponentialShadowMap) && ((this._blurPostProcesses && this._blurPostProcesses.length) || this._initializeBlurRTTAndPostProcesses()), + !(this._kernelBlurXPostprocess && !this._kernelBlurXPostprocess.isReady()) && + !(this._kernelBlurYPostprocess && !this._kernelBlurYPostprocess.isReady()) && + !(this._boxBlurPostprocess && !this._boxBlurPostprocess.isReady())) + ); + }), + (e.prototype.prepareDefines = function (t, n) { + var i = this._scene, + r = this._light; + i.shadowsEnabled && + r.shadowEnabled && + ((t["SHADOW" + n] = !0), + this.useContactHardeningShadow + ? ((t["SHADOWPCSS" + n] = !0), this._filteringQuality === e.QUALITY_LOW ? (t["SHADOWLOWQUALITY" + n] = !0) : this._filteringQuality === e.QUALITY_MEDIUM && (t["SHADOWMEDIUMQUALITY" + n] = !0)) + : this.usePercentageCloserFiltering + ? ((t["SHADOWPCF" + n] = !0), this._filteringQuality === e.QUALITY_LOW ? (t["SHADOWLOWQUALITY" + n] = !0) : this._filteringQuality === e.QUALITY_MEDIUM && (t["SHADOWMEDIUMQUALITY" + n] = !0)) + : this.usePoissonSampling + ? (t["SHADOWPOISSON" + n] = !0) + : this.useExponentialShadowMap || this.useBlurExponentialShadowMap + ? (t["SHADOWESM" + n] = !0) + : (this.useCloseExponentialShadowMap || this.useBlurCloseExponentialShadowMap) && (t["SHADOWCLOSEESM" + n] = !0), + r.needCube() && (t["SHADOWCUBE" + n] = !0)); + }), + (e.prototype.bindShadowLight = function (t, n) { + var i = this._light, + r = this._scene; + if (r.shadowsEnabled && i.shadowEnabled) { + var o = r.activeCamera; + if (o) { + var a = this.getShadowMap(); + a && + (i.needCube() || n.setMatrix("lightMatrix" + t, this.getTransformMatrix()), + this._filter === e.FILTER_PCF + ? (n.setDepthStencilTexture("shadowSampler" + t, this.getShadowMapForRendering()), + i._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), a.getSize().width, 1 / a.getSize().width, this.frustumEdgeFalloff, t)) + : this._filter === e.FILTER_PCSS + ? (n.setDepthStencilTexture("shadowSampler" + t, this.getShadowMapForRendering()), + n.setTexture("depthSampler" + t, this.getShadowMapForRendering()), + i._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), 1 / a.getSize().width, this._contactHardeningLightSizeUVRatio * a.getSize().width, this.frustumEdgeFalloff, t)) + : (n.setTexture("shadowSampler" + t, this.getShadowMapForRendering()), + i._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), this.blurScale / a.getSize().width, this.depthScale, this.frustumEdgeFalloff, t)), + i._uniformBuffer.updateFloat2("depthValues", this.getLight().getDepthMinZ(o), this.getLight().getDepthMinZ(o) + this.getLight().getDepthMaxZ(o), t)); + } + } + }), + (e.prototype.getTransformMatrix = function () { + var e = this._scene; + if (this._currentRenderID === e.getRenderId() && this._currentFaceIndexCache === this._currentFaceIndex) return this._transformMatrix; + (this._currentRenderID = e.getRenderId()), (this._currentFaceIndexCache = this._currentFaceIndex); + var t = this._light.position; + if ( + (this._light.computeTransformedInformation() && (t = this._light.transformedPosition), + a.e.NormalizeToRef(this._light.getShadowDirection(this._currentFaceIndex), this._lightDirection), + 1 === Math.abs(a.e.Dot(this._lightDirection, a.e.Up())) && (this._lightDirection.z = 1e-13), + this._light.needProjectionMatrixCompute() || !this._cachedPosition || !this._cachedDirection || !t.equals(this._cachedPosition) || !this._lightDirection.equals(this._cachedDirection)) + ) { + this._cachedPosition.copyFrom(t), this._cachedDirection.copyFrom(this._lightDirection), a.a.LookAtLHToRef(t, t.add(this._lightDirection), a.e.Up(), this._viewMatrix); + var n = this.getShadowMap(); + if (n) { + var i = n.renderList; + i && this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, i); + } + this._viewMatrix.multiplyToRef(this._projectionMatrix, this._transformMatrix); + } + return this._transformMatrix; + }), + (e.prototype.recreateShadowMap = function () { + var e = this._shadowMap; + if (e) { + var t = e.renderList; + this._disposeRTTandPostProcesses(), this._initializeGenerator(), (this.filter = this.filter), this._applyFilterValues(), (this._shadowMap.renderList = t); + } + }), + (e.prototype._disposeBlurPostProcesses = function () { + this._shadowMap2 && (this._shadowMap2.dispose(), (this._shadowMap2 = null)), + this._boxBlurPostprocess && (this._boxBlurPostprocess.dispose(), (this._boxBlurPostprocess = null)), + this._kernelBlurXPostprocess && (this._kernelBlurXPostprocess.dispose(), (this._kernelBlurXPostprocess = null)), + this._kernelBlurYPostprocess && (this._kernelBlurYPostprocess.dispose(), (this._kernelBlurYPostprocess = null)), + (this._blurPostProcesses = []); + }), + (e.prototype._disposeRTTandPostProcesses = function () { + this._shadowMap && (this._shadowMap.dispose(), (this._shadowMap = null)), this._disposeBlurPostProcesses(); + }), + (e.prototype.dispose = function () { + this._disposeRTTandPostProcesses(), + this._light && ((this._light._shadowGenerator = null), this._light._markMeshesAsLightDirty()), + this.onBeforeShadowMapRenderMeshObservable.clear(), + this.onBeforeShadowMapRenderObservable.clear(), + this.onAfterShadowMapRenderMeshObservable.clear(), + this.onAfterShadowMapRenderObservable.clear(); + }), + (e.prototype.serialize = function () { + var e = {}, + t = this.getShadowMap(); + if (!t) return e; + if ( + ((e.className = this.getClassName()), + (e.lightId = this._light.id), + (e.mapSize = t.getRenderSize()), + (e.forceBackFacesOnly = this.forceBackFacesOnly), + (e.darkness = this.getDarkness()), + (e.transparencyShadow = this._transparencyShadow), + (e.frustumEdgeFalloff = this.frustumEdgeFalloff), + (e.bias = this.bias), + (e.normalBias = this.normalBias), + (e.usePercentageCloserFiltering = this.usePercentageCloserFiltering), + (e.useContactHardeningShadow = this.useContactHardeningShadow), + (e.contactHardeningLightSizeUVRatio = this.contactHardeningLightSizeUVRatio), + (e.filteringQuality = this.filteringQuality), + (e.useExponentialShadowMap = this.useExponentialShadowMap), + (e.useBlurExponentialShadowMap = this.useBlurExponentialShadowMap), + (e.useCloseExponentialShadowMap = this.useBlurExponentialShadowMap), + (e.useBlurCloseExponentialShadowMap = this.useBlurExponentialShadowMap), + (e.usePoissonSampling = this.usePoissonSampling), + (e.depthScale = this.depthScale), + (e.blurBoxOffset = this.blurBoxOffset), + (e.blurKernel = this.blurKernel), + (e.blurScale = this.blurScale), + (e.useKernelBlur = this.useKernelBlur), + (e.renderList = []), + t.renderList) + ) + for (var n = 0; n < t.renderList.length; n++) { + var i = t.renderList[n]; + e.renderList.push(i.id); + } + return e; + }), + (e.Parse = function (t, n, i) { + for (var r = n.getLightByID(t.lightId), o = i ? i(t.mapSize, r) : new e(t.mapSize, r), a = o.getShadowMap(), s = 0; s < t.renderList.length; s++) { + n.getMeshesByID(t.renderList[s]).forEach(function (e) { + a && (a.renderList || (a.renderList = []), a.renderList.push(e)); + }); + } + return ( + (o.forceBackFacesOnly = !!t.forceBackFacesOnly), + void 0 !== t.darkness && o.setDarkness(t.darkness), + t.transparencyShadow && o.setTransparencyShadow(!0), + void 0 !== t.frustumEdgeFalloff && (o.frustumEdgeFalloff = t.frustumEdgeFalloff), + void 0 !== t.bias && (o.bias = t.bias), + void 0 !== t.normalBias && (o.normalBias = t.normalBias), + t.usePercentageCloserFiltering + ? (o.usePercentageCloserFiltering = !0) + : t.useContactHardeningShadow + ? (o.useContactHardeningShadow = !0) + : t.usePoissonSampling + ? (o.usePoissonSampling = !0) + : t.useExponentialShadowMap + ? (o.useExponentialShadowMap = !0) + : t.useBlurExponentialShadowMap + ? (o.useBlurExponentialShadowMap = !0) + : t.useCloseExponentialShadowMap + ? (o.useCloseExponentialShadowMap = !0) + : t.useBlurCloseExponentialShadowMap + ? (o.useBlurCloseExponentialShadowMap = !0) + : t.useVarianceShadowMap + ? (o.useExponentialShadowMap = !0) + : t.useBlurVarianceShadowMap && (o.useBlurExponentialShadowMap = !0), + void 0 !== t.contactHardeningLightSizeUVRatio && (o.contactHardeningLightSizeUVRatio = t.contactHardeningLightSizeUVRatio), + void 0 !== t.filteringQuality && (o.filteringQuality = t.filteringQuality), + t.depthScale && (o.depthScale = t.depthScale), + t.blurScale && (o.blurScale = t.blurScale), + t.blurBoxOffset && (o.blurBoxOffset = t.blurBoxOffset), + t.useKernelBlur && (o.useKernelBlur = t.useKernelBlur), + t.blurKernel && (o.blurKernel = t.blurKernel), + o + ); + }), + (e.CLASSNAME = "ShadowGenerator"), + (e.FILTER_NONE = 0), + (e.FILTER_EXPONENTIALSHADOWMAP = 1), + (e.FILTER_POISSONSAMPLING = 2), + (e.FILTER_BLUREXPONENTIALSHADOWMAP = 3), + (e.FILTER_CLOSEEXPONENTIALSHADOWMAP = 4), + (e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP = 5), + (e.FILTER_PCF = 6), + (e.FILTER_PCSS = 7), + (e.QUALITY_HIGH = 0), + (e.QUALITY_MEDIUM = 1), + (e.QUALITY_LOW = 2), + (e._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("ShadowGeneratorSceneComponent"); + }), + e + ); + })(), + sa = + "#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\nvarying float vDepthMetric;\n#ifdef PACKED\n#include\n#endif\nvoid main(void)\n{\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\n#ifdef NONLINEARDEPTH\n#ifdef PACKED\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(gl_FragCoord.z,0.0,0.0,0.0);\n#endif\n#else\n#ifdef PACKED\ngl_FragColor=pack(vDepthMetric);\n#else\ngl_FragColor=vec4(vDepthMetric,0.0,0.0,1.0);\n#endif\n#endif\n}"; + Xt.a.ShadersStore.depthPixelShader = sa; + var ca = + "\nattribute vec3 position;\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n\n#include\nuniform mat4 viewProjection;\nuniform vec2 depthValues;\n#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\nvarying float vDepthMetric;\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y));\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n}\n"; + Xt.a.ShadersStore.depthVertexShader = ca; + var la = (function () { + function e(t, n, i, r) { + var o = this; + void 0 === n && (n = 1), + void 0 === i && (i = null), + void 0 === r && (r = !1), + (this.enabled = !0), + (this.useOnlyInActiveCamera = !1), + (this._scene = t), + (this._storeNonLinearDepth = r), + (this.isPacked = 0 === n), + this.isPacked ? (this._clearColor = new s.b(1, 1, 1, 1)) : (this._clearColor = new s.b(1, 0, 0, 1)), + e._SceneComponentInitialization(this._scene), + (this._camera = i); + var a = t.getEngine(), + c = this.isPacked || 1 === a.webGLVersion ? 5 : 6; + (this._depthMap = new mn.a("depthMap", { width: a.getRenderWidth(), height: a.getRenderHeight() }, this._scene, !1, !0, n, !1, void 0, void 0, void 0, void 0, c)), + (this._depthMap.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._depthMap.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._depthMap.refreshRate = 1), + (this._depthMap.renderParticles = !1), + (this._depthMap.renderList = null), + (this._depthMap.activeCamera = this._camera), + (this._depthMap.ignoreCameraViewport = !0), + (this._depthMap.useCameraPostProcesses = !1), + this._depthMap.onClearObservable.add(function (e) { + e.clear(o._clearColor, !0, !0, !0); + }); + var l = function (e) { + var t = e.getRenderingMesh(), + n = o._scene, + i = n.getEngine(), + r = e.getMaterial(); + if (((t._internalAbstractMeshDataInfo._isActiveIntermediate = !1), r)) { + i.setState(r.backFaceCulling, 0, !1, n.useRightHandedSystem); + var a = t._getInstancesRenderList(e._id); + if (!a.mustReturn) { + var s = i.getCaps().instancedArrays && null !== a.visibleInstances[e._id], + c = o._camera || n.activeCamera; + if (o.isReady(e, s) && c) { + if ( + (i.enableEffect(o._effect), + t._bind(e, o._effect, r.fillMode), + o._effect.setMatrix("viewProjection", n.getTransformMatrix()), + o._effect.setFloat2("depthValues", c.minZ, c.minZ + c.maxZ), + r && r.needAlphaTesting()) + ) { + var l = r.getAlphaTestTexture(); + l && (o._effect.setTexture("diffuseSampler", l), o._effect.setMatrix("diffuseMatrix", l.getTextureMatrix())); + } + t.useBones && t.computeBonesUsingShaders && t.skeleton && o._effect.setMatrices("mBones", t.skeleton.getTransformMatrices(t)), + Ir.a.BindMorphTargetParameters(t, o._effect), + t._processRendering(e, o._effect, r.fillMode, a, s, function (e, t) { + return o._effect.setMatrix("world", t); + }); + } + } + } + }; + this._depthMap.customRenderFunction = function (e, t, n, i) { + var r; + if (i.length) { + for (a.setColorWrite(!1), r = 0; r < i.length; r++) l(i.data[r]); + a.setColorWrite(!0); + } + for (r = 0; r < e.length; r++) l(e.data[r]); + for (r = 0; r < t.length; r++) l(t.data[r]); + }; + } + return ( + (e.prototype.isReady = function (e, t) { + var n = e.getMaterial(); + if (n.disableDepthWrite) return !1; + var i = [], + r = [wn.b.PositionKind], + o = e.getMesh(); + n && + n.needAlphaTesting() && + n.getAlphaTestTexture() && + (i.push("#define ALPHATEST"), o.isVerticesDataPresent(wn.b.UVKind) && (r.push(wn.b.UVKind), i.push("#define UV1")), o.isVerticesDataPresent(wn.b.UV2Kind) && (r.push(wn.b.UV2Kind), i.push("#define UV2"))), + o.useBones && o.computeBonesUsingShaders + ? (r.push(wn.b.MatricesIndicesKind), + r.push(wn.b.MatricesWeightsKind), + o.numBoneInfluencers > 4 && (r.push(wn.b.MatricesIndicesExtraKind), r.push(wn.b.MatricesWeightsExtraKind)), + i.push("#define NUM_BONE_INFLUENCERS " + o.numBoneInfluencers), + i.push("#define BonesPerMesh " + (o.skeleton ? o.skeleton.bones.length + 1 : 0))) + : i.push("#define NUM_BONE_INFLUENCERS 0"); + var a = o.morphTargetManager, + s = 0; + a && a.numInfluencers > 0 && ((s = a.numInfluencers), i.push("#define MORPHTARGETS"), i.push("#define NUM_MORPH_INFLUENCERS " + s), Ir.a.PrepareAttributesForMorphTargetsInfluencers(r, o, s)), + t && (i.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(r)), + this._storeNonLinearDepth && i.push("#define NONLINEARDEPTH"), + this.isPacked && i.push("#define PACKED"); + var c = i.join("\n"); + return ( + this._cachedDefines !== c && + ((this._cachedDefines = c), + (this._effect = this._scene + .getEngine() + .createEffect("depth", r, ["world", "mBones", "viewProjection", "diffuseMatrix", "depthValues", "morphTargetInfluences"], ["diffuseSampler"], c, void 0, void 0, void 0, { + maxSimultaneousMorphTargets: s, + }))), + this._effect.isReady() + ); + }), + (e.prototype.getDepthMap = function () { + return this._depthMap; + }), + (e.prototype.dispose = function () { + this._depthMap.dispose(); + }), + (e._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("DepthRendererSceneComponent"); + }), + e + ); + })(), + ua = n(135), + ha = + "attribute vec2 vUV;\nuniform sampler2D textureSampler;\n#if defined(INITIAL)\nuniform sampler2D sourceTexture;\nuniform vec2 texSize;\nvoid main(void)\n{\nivec2 coord=ivec2(vUV*(texSize-1.0));\nfloat f1=texelFetch(sourceTexture,coord,0).r;\nfloat f2=texelFetch(sourceTexture,coord+ivec2(1,0),0).r;\nfloat f3=texelFetch(sourceTexture,coord+ivec2(1,1),0).r;\nfloat f4=texelFetch(sourceTexture,coord+ivec2(0,1),0).r;\nfloat minz=min(min(min(f1,f2),f3),f4);\n#ifdef DEPTH_REDUX\nfloat maxz=max(max(max(sign(1.0-f1)*f1,sign(1.0-f2)*f2),sign(1.0-f3)*f3),sign(1.0-f4)*f4);\n#else\nfloat maxz=max(max(max(f1,f2),f3),f4);\n#endif\nglFragColor=vec4(minz,maxz,0.,0.);\n}\n#elif defined(MAIN)\nuniform vec2 texSize;\nvoid main(void)\n{\nivec2 coord=ivec2(vUV*(texSize-1.0));\nvec2 f1=texelFetch(textureSampler,coord,0).rg;\nvec2 f2=texelFetch(textureSampler,coord+ivec2(1,0),0).rg;\nvec2 f3=texelFetch(textureSampler,coord+ivec2(1,1),0).rg;\nvec2 f4=texelFetch(textureSampler,coord+ivec2(0,1),0).rg;\nfloat minz=min(min(min(f1.x,f2.x),f3.x),f4.x);\nfloat maxz=max(max(max(f1.y,f2.y),f3.y),f4.y);\nglFragColor=vec4(minz,maxz,0.,0.);\n}\n#elif defined(ONEBEFORELAST)\nuniform ivec2 texSize;\nvoid main(void)\n{\nivec2 coord=ivec2(vUV*vec2(texSize-1));\nvec2 f1=texelFetch(textureSampler,coord % texSize,0).rg;\nvec2 f2=texelFetch(textureSampler,(coord+ivec2(1,0)) % texSize,0).rg;\nvec2 f3=texelFetch(textureSampler,(coord+ivec2(1,1)) % texSize,0).rg;\nvec2 f4=texelFetch(textureSampler,(coord+ivec2(0,1)) % texSize,0).rg;\nfloat minz=min(f1.x,f2.x);\nfloat maxz=max(f1.y,f2.y);\nglFragColor=vec4(minz,maxz,0.,0.);\n}\n#elif defined(LAST)\nvoid main(void)\n{\ndiscard;\nglFragColor=vec4(0.);\n}\n#endif\n"; + Xt.a.ShadersStore.minmaxReduxPixelShader = ha; + var da = (function () { + function e(e) { + (this.onAfterReductionPerformed = new o.c()), (this._forceFullscreenViewport = !0), (this._activated = !1), (this._camera = e), (this._postProcessManager = new ua.a(e.getScene())); + } + return ( + Object.defineProperty(e.prototype, "sourceTexture", { + get: function () { + return this._sourceTexture; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setSourceTexture = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = 2), void 0 === i && (i = !0), e !== this._sourceTexture)) { + this.dispose(!1), (this._sourceTexture = e), (this._reductionSteps = []), (this._forceFullscreenViewport = i); + var o = this._camera.getScene(), + a = new Wt.a("Initial reduction phase", "minmaxRedux", ["texSize"], ["sourceTexture"], 1, null, 1, o.getEngine(), !1, "#define INITIAL" + (t ? "\n#define DEPTH_REDUX" : ""), n, void 0, void 0, void 0, 7); + (a.autoClear = !1), (a.forceFullscreenViewport = i); + var s = this._sourceTexture.getRenderWidth(), + c = this._sourceTexture.getRenderHeight(); + (a.onApply = (function (e, t) { + return function (n) { + n.setTexture("sourceTexture", r._sourceTexture), n.setFloatArray2("texSize", new Float32Array([e, t])); + }; + })(s, c)), + this._reductionSteps.push(a); + for (var l = 1; s > 1 || c > 1; ) { + (s = Math.max(Math.round(s / 2), 1)), (c = Math.max(Math.round(c / 2), 1)); + var u = new Wt.a( + "Reduction phase " + l, + "minmaxRedux", + ["texSize"], + null, + { width: s, height: c }, + null, + 1, + o.getEngine(), + !1, + "#define " + (1 == s && 1 == c ? "LAST" : 1 == s || 1 == c ? "ONEBEFORELAST" : "MAIN"), + n, + void 0, + void 0, + void 0, + 7 + ); + if ( + ((u.autoClear = !1), + (u.forceFullscreenViewport = i), + (u.onApply = (function (e, t) { + return function (n) { + 1 == e || 1 == t ? n.setIntArray2("texSize", new Int32Array([e, t])) : n.setFloatArray2("texSize", new Float32Array([e, t])); + }; + })(s, c)), + this._reductionSteps.push(u), + l++, + 1 == s && 1 == c) + ) { + u.onAfterRenderObservable.add( + (function (e, t, n) { + var i = new Float32Array(4 * e * t), + a = { min: 0, max: 0 }; + return function () { + o.getEngine()._readTexturePixels(n.inputTexture, e, t, -1, 0, i), (a.min = i[0]), (a.max = i[1]), r.onAfterReductionPerformed.notifyObservers(a); + }; + })(s, c, u) + ); + } + } + } + }), + Object.defineProperty(e.prototype, "refreshRate", { + get: function () { + return this._sourceTexture ? this._sourceTexture.refreshRate : -1; + }, + set: function (e) { + this._sourceTexture && (this._sourceTexture.refreshRate = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "activated", { + get: function () { + return this._activated; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.activate = function () { + var e = this; + !this._onAfterUnbindObserver && + this._sourceTexture && + ((this._onAfterUnbindObserver = this._sourceTexture.onAfterUnbindObservable.add(function () { + e._reductionSteps[0].activate(e._camera), + e._postProcessManager.directRender(e._reductionSteps, e._reductionSteps[0].inputTexture, e._forceFullscreenViewport), + e._camera.getScene().getEngine().unBindFramebuffer(e._reductionSteps[0].inputTexture, !1); + })), + (this._activated = !0)); + }), + (e.prototype.deactivate = function () { + this._onAfterUnbindObserver && this._sourceTexture && (this._sourceTexture.onAfterUnbindObservable.remove(this._onAfterUnbindObserver), (this._onAfterUnbindObserver = null), (this._activated = !1)); + }), + (e.prototype.dispose = function (e) { + if ((void 0 === e && (e = !0), e && this.onAfterReductionPerformed.clear(), this.deactivate(), this._reductionSteps)) { + for (var t = 0; t < this._reductionSteps.length; ++t) this._reductionSteps[t].dispose(); + this._reductionSteps = null; + } + this._postProcessManager && e && this._postProcessManager.dispose(), (this._sourceTexture = null); + }), + e + ); + })(), + pa = (function (e) { + function t(t) { + return e.call(this, t) || this; + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "depthRenderer", { + get: function () { + return this._depthRenderer; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setDepthRenderer = function (t, n, i) { + void 0 === t && (t = null), void 0 === n && (n = 2), void 0 === i && (i = !0); + var r = this._camera.getScene(); + this._depthRenderer && (delete r._depthRenderer[this._depthRendererId], this._depthRenderer.dispose(), (this._depthRenderer = null)), + null === t && + (r._depthRenderer || (r._depthRenderer = {}), + ((t = this._depthRenderer = new la(r, n, this._camera, !1)).enabled = !1), + (this._depthRendererId = "minmax" + this._camera.id), + (r._depthRenderer[this._depthRendererId] = t)), + e.prototype.setSourceTexture.call(this, t.getDepthMap(), !0, n, i); + }), + (t.prototype.setSourceTexture = function (t, n, i, r) { + void 0 === i && (i = 2), void 0 === r && (r = !0), e.prototype.setSourceTexture.call(this, t, n, i, r); + }), + (t.prototype.activate = function () { + this._depthRenderer && (this._depthRenderer.enabled = !0), e.prototype.activate.call(this); + }), + (t.prototype.deactivate = function () { + e.prototype.deactivate.call(this), this._depthRenderer && (this._depthRenderer.enabled = !1); + }), + (t.prototype.dispose = function (t) { + var n; + void 0 === t && (t = !0), + e.prototype.dispose.call(this, t), + this._depthRenderer && t && (null === (n = this._depthRenderer.getDepthMap().getScene()) || void 0 === n || n._depthRenderer[this._depthRendererId], this._depthRenderer.dispose(), (this._depthRenderer = null)); + }), + t + ); + })(da), + fa = a.e.Up(), + ma = a.e.Zero(), + ga = new a.e(), + ba = new a.e(), + _a = new a.a(), + va = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, n, i) || this; + if (1 == r._scene.getEngine().webGLVersion) throw "CSM can only be used in WebGL2"; + return (r.usePercentageCloserFiltering = !0), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._validateFilter = function (e) { + return e === aa.FILTER_NONE || e === aa.FILTER_PCF || e === aa.FILTER_PCSS ? e : aa.FILTER_NONE; + }), + Object.defineProperty(t.prototype, "numCascades", { + get: function () { + return this._numCascades; + }, + set: function (e) { + (e = Math.min(Math.max(e, t.MIN_CASCADES_COUNT), t.MAX_CASCADES_COUNT)) !== this._numCascades && ((this._numCascades = e), this.recreateShadowMap()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "freezeShadowCastersBoundingInfo", { + get: function () { + return this._freezeShadowCastersBoundingInfo; + }, + set: function (e) { + this._freezeShadowCastersBoundingInfoObservable && e && (this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable), (this._freezeShadowCastersBoundingInfoObservable = null)), + this._freezeShadowCastersBoundingInfoObservable || e || (this._freezeShadowCastersBoundingInfoObservable = this._scene.onBeforeRenderObservable.add(this._computeShadowCastersBoundingInfo.bind(this))), + (this._freezeShadowCastersBoundingInfo = e), + e && this._computeShadowCastersBoundingInfo(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._computeShadowCastersBoundingInfo = function () { + if ( + (this._scbiMin.copyFromFloats(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), + this._scbiMax.copyFromFloats(Number.MIN_VALUE, Number.MIN_VALUE, Number.MIN_VALUE), + this._shadowMap && this._shadowMap.renderList) + ) { + for (var e = this._shadowMap.renderList, t = 0; t < e.length; t++) { + if ((r = e[t])) { + var n = r.getBoundingInfo().boundingBox; + this._scbiMin.minimizeInPlace(n.minimumWorld), this._scbiMax.maximizeInPlace(n.maximumWorld); + } + } + var i = this._scene.meshes; + for (t = 0; t < i.length; t++) { + var r; + if ((r = i[t]) && r.isVisible && r.isEnabled && r.receiveShadows) { + n = r.getBoundingInfo().boundingBox; + this._scbiMin.minimizeInPlace(n.minimumWorld), this._scbiMax.maximizeInPlace(n.maximumWorld); + } + } + } + this._shadowCastersBoundingInfo.reConstruct(this._scbiMin, this._scbiMax); + }), + Object.defineProperty(t.prototype, "shadowCastersBoundingInfo", { + get: function () { + return this._shadowCastersBoundingInfo; + }, + set: function (e) { + this._shadowCastersBoundingInfo = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setMinMaxDistance = function (e, t) { + (this._minDistance === e && this._maxDistance === t) || (e > t && ((e = 0), (t = 1)), e < 0 && (e = 0), t > 1 && (t = 1), (this._minDistance = e), (this._maxDistance = t), (this._breaksAreDirty = !0)); + }), + Object.defineProperty(t.prototype, "minDistance", { + get: function () { + return this._minDistance; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "maxDistance", { + get: function () { + return this._maxDistance; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return t.CLASSNAME; + }), + (t.prototype.getCascadeMinExtents = function (e) { + return e >= 0 && e < this._numCascades ? this._cascadeMinExtents[e] : null; + }), + (t.prototype.getCascadeMaxExtents = function (e) { + return e >= 0 && e < this._numCascades ? this._cascadeMaxExtents[e] : null; + }), + Object.defineProperty(t.prototype, "shadowMaxZ", { + get: function () { + return this._scene && this._scene.activeCamera ? this._shadowMaxZ : 0; + }, + set: function (e) { + this._scene && this._scene.activeCamera + ? this._shadowMaxZ === e || e < this._scene.activeCamera.minZ || e > this._scene.activeCamera.maxZ || ((this._shadowMaxZ = e), this._light._markMeshesAsLightDirty(), (this._breaksAreDirty = !0)) + : (this._shadowMaxZ = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "debug", { + get: function () { + return this._debug; + }, + set: function (e) { + (this._debug = e), this._light._markMeshesAsLightDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "depthClamp", { + get: function () { + return this._depthClamp; + }, + set: function (e) { + this._depthClamp = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cascadeBlendPercentage", { + get: function () { + return this._cascadeBlendPercentage; + }, + set: function (e) { + (this._cascadeBlendPercentage = e), this._light._markMeshesAsLightDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "lambda", { + get: function () { + return this._lambda; + }, + set: function (e) { + var t = Math.min(Math.max(e, 0), 1); + this._lambda != t && ((this._lambda = t), (this._breaksAreDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getCascadeViewMatrix = function (e) { + return e >= 0 && e < this._numCascades ? this._viewMatrices[e] : null; + }), + (t.prototype.getCascadeProjectionMatrix = function (e) { + return e >= 0 && e < this._numCascades ? this._projectionMatrices[e] : null; + }), + (t.prototype.getCascadeTransformMatrix = function (e) { + return e >= 0 && e < this._numCascades ? this._transformMatrices[e] : null; + }), + (t.prototype.setDepthRenderer = function (e) { + (this._depthRenderer = e), this._depthReducer && this._depthReducer.setDepthRenderer(this._depthRenderer); + }), + Object.defineProperty(t.prototype, "autoCalcDepthBounds", { + get: function () { + return this._autoCalcDepthBounds; + }, + set: function (e) { + var t = this, + n = this._scene.activeCamera; + if (n) { + if (((this._autoCalcDepthBounds = e), !e)) return this._depthReducer && this._depthReducer.deactivate(), void this.setMinMaxDistance(0, 1); + this._depthReducer || + ((this._depthReducer = new pa(n)), + this._depthReducer.onAfterReductionPerformed.add(function (e) { + var n = e.min, + i = e.max; + n >= i && ((n = 0), (i = 1)), (n == t._minDistance && i == t._maxDistance) || t.setMinMaxDistance(n, i); + }), + this._depthReducer.setDepthRenderer(this._depthRenderer)), + this._depthReducer.activate(); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "autoCalcDepthBoundsRefreshRate", { + get: function () { + var e, t, n; + return null != (n = null === (t = null === (e = this._depthReducer) || void 0 === e ? void 0 : e.depthRenderer) || void 0 === t ? void 0 : t.getDepthMap().refreshRate) ? n : -1; + }, + set: function (e) { + var t; + (null === (t = this._depthReducer) || void 0 === t ? void 0 : t.depthRenderer) && (this._depthReducer.depthRenderer.getDepthMap().refreshRate = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.splitFrustum = function () { + this._breaksAreDirty = !0; + }), + (t.prototype._splitFrustum = function () { + var e = this._scene.activeCamera; + if (e) { + for ( + var t = e.minZ, + n = e.maxZ, + i = n - t, + r = this._minDistance, + o = t + r * i, + a = t + (this._shadowMaxZ < n && this._shadowMaxZ >= t ? Math.min((this._shadowMaxZ - t) / (n - t), this._maxDistance) : this._maxDistance) * i, + s = a - o, + c = a / o, + l = 0; + l < this._cascades.length; + ++l + ) { + var u = (l + 1) / this._numCascades, + h = o * Math.pow(c, u), + d = o + s * u, + p = this._lambda * (h - d) + d; + (this._cascades[l].prevBreakDistance = 0 === l ? r : this._cascades[l - 1].breakDistance), + (this._cascades[l].breakDistance = (p - t) / i), + (this._viewSpaceFrustumsZ[l] = t + this._cascades[l].breakDistance * i), + (this._frustumLengths[l] = (this._cascades[l].breakDistance - this._cascades[l].prevBreakDistance) * i); + } + this._breaksAreDirty = !1; + } + }), + (t.prototype._computeMatrices = function () { + if (this._scene.activeCamera) { + a.e.NormalizeToRef(this._light.getShadowDirection(0), this._lightDirection), + 1 === Math.abs(a.e.Dot(this._lightDirection, a.e.Up())) && (this._lightDirection.z = 1e-13), + this._cachedDirection.copyFrom(this._lightDirection); + for (var e = 0; e < this._numCascades; ++e) { + this._computeFrustumInWorldSpace(e), + this._computeCascadeFrustum(e), + this._cascadeMaxExtents[e].subtractToRef(this._cascadeMinExtents[e], ga), + this._frustumCenter[e].addToRef(this._lightDirection.scale(this._cascadeMinExtents[e].z), this._shadowCameraPos[e]), + a.a.LookAtLHToRef(this._shadowCameraPos[e], this._frustumCenter[e], fa, this._viewMatrices[e]); + var t = 0, + n = ga.z, + i = this._shadowCastersBoundingInfo; + i.update(this._viewMatrices[e]), + (n = Math.min(n, i.boundingBox.maximumWorld.z)), + (t = this._depthClamp && this.filter !== aa.FILTER_PCSS ? Math.max(t, i.boundingBox.minimumWorld.z) : Math.min(t, i.boundingBox.minimumWorld.z)), + a.a.OrthoOffCenterLHToRef(this._cascadeMinExtents[e].x, this._cascadeMaxExtents[e].x, this._cascadeMinExtents[e].y, this._cascadeMaxExtents[e].y, t, n, this._projectionMatrices[e]), + (this._cascadeMinExtents[e].z = t), + (this._cascadeMaxExtents[e].z = n), + this._viewMatrices[e].multiplyToRef(this._projectionMatrices[e], this._transformMatrices[e]), + a.e.TransformCoordinatesToRef(ma, this._transformMatrices[e], ga), + ga.scaleInPlace(this._mapSize / 2), + ba.copyFromFloats(Math.round(ga.x), Math.round(ga.y), Math.round(ga.z)), + ba.subtractInPlace(ga).scaleInPlace(2 / this._mapSize), + a.a.TranslationToRef(ba.x, ba.y, 0, _a), + this._projectionMatrices[e].multiplyToRef(_a, this._projectionMatrices[e]), + this._viewMatrices[e].multiplyToRef(this._projectionMatrices[e], this._transformMatrices[e]), + this._transformMatrices[e].copyToArray(this._transformMatricesAsArray, 16 * e); + } + } + }), + (t.prototype._computeFrustumInWorldSpace = function (e) { + if (this._scene.activeCamera) { + var n = this._cascades[e].prevBreakDistance, + i = this._cascades[e].breakDistance; + this._scene.activeCamera.getViewMatrix(); + for (var r = a.a.Invert(this._scene.activeCamera.getTransformationMatrix()), o = 0; o < t.frustumCornersNDCSpace.length; ++o) + a.e.TransformCoordinatesToRef(t.frustumCornersNDCSpace[o], r, this._frustumCornersWorldSpace[e][o]); + for (o = 0; o < t.frustumCornersNDCSpace.length / 2; ++o) + ga.copyFrom(this._frustumCornersWorldSpace[e][o + 4]).subtractInPlace(this._frustumCornersWorldSpace[e][o]), + ba.copyFrom(ga).scaleInPlace(n), + ga.scaleInPlace(i), + ga.addInPlace(this._frustumCornersWorldSpace[e][o]), + this._frustumCornersWorldSpace[e][o + 4].copyFrom(ga), + this._frustumCornersWorldSpace[e][o].addInPlace(ba); + } + }), + (t.prototype._computeCascadeFrustum = function (e) { + if ( + (this._cascadeMinExtents[e].copyFromFloats(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), + this._cascadeMaxExtents[e].copyFromFloats(Number.MIN_VALUE, Number.MIN_VALUE, Number.MIN_VALUE), + this._frustumCenter[e].copyFromFloats(0, 0, 0), + this._scene.activeCamera) + ) { + for (var t = 0; t < this._frustumCornersWorldSpace[e].length; ++t) this._frustumCenter[e].addInPlace(this._frustumCornersWorldSpace[e][t]); + if ((this._frustumCenter[e].scaleInPlace(1 / this._frustumCornersWorldSpace[e].length), this.stabilizeCascades)) { + var n = 0; + for (t = 0; t < this._frustumCornersWorldSpace[e].length; ++t) { + var i = this._frustumCornersWorldSpace[e][t].subtractToRef(this._frustumCenter[e], ga).length(); + n = Math.max(n, i); + } + (n = Math.ceil(16 * n) / 16), this._cascadeMaxExtents[e].copyFromFloats(n, n, n), this._cascadeMinExtents[e].copyFromFloats(-n, -n, -n); + } else { + var r = this._frustumCenter[e]; + this._frustumCenter[e].addToRef(this._lightDirection, ga), a.a.LookAtLHToRef(r, ga, fa, _a); + for (t = 0; t < this._frustumCornersWorldSpace[e].length; ++t) + a.e.TransformCoordinatesToRef(this._frustumCornersWorldSpace[e][t], _a, ga), this._cascadeMinExtents[e].minimizeInPlace(ga), this._cascadeMaxExtents[e].maximizeInPlace(ga); + } + } + }), + (t.prototype._initializeGenerator = function () { + var n, i, r, o, s, c, l, u, h, d, p, f, m, g, b, _, v, y, C, P; + (this.penumbraDarkness = null != (n = this.penumbraDarkness) ? n : 1), + (this._numCascades = null != (i = this._numCascades) ? i : t.DEFAULT_CASCADES_COUNT), + (this.stabilizeCascades = null != (r = this.stabilizeCascades) && r), + (this._freezeShadowCastersBoundingInfoObservable = null != (o = this._freezeShadowCastersBoundingInfoObservable) ? o : null), + (this.freezeShadowCastersBoundingInfo = null != (s = this.freezeShadowCastersBoundingInfo) && s), + (this._scbiMin = null != (c = this._scbiMin) ? c : new a.e(0, 0, 0)), + (this._scbiMax = null != (l = this._scbiMax) ? l : new a.e(0, 0, 0)), + (this._shadowCastersBoundingInfo = null != (u = this._shadowCastersBoundingInfo) ? u : new ti.a(new a.e(0, 0, 0), new a.e(0, 0, 0))), + (this._breaksAreDirty = null == (h = this._breaksAreDirty) || h), + (this._minDistance = null != (d = this._minDistance) ? d : 0), + (this._maxDistance = null != (p = this._maxDistance) ? p : 1), + (this._currentLayer = null != (f = this._currentLayer) ? f : 0), + (this._shadowMaxZ = null != (b = null != (m = this._shadowMaxZ) ? m : null === (g = this._scene.activeCamera) || void 0 === g ? void 0 : g.maxZ) ? b : 1e4), + (this._debug = null != (_ = this._debug) && _), + (this._depthClamp = null == (v = this._depthClamp) || v), + (this._cascadeBlendPercentage = null != (y = this._cascadeBlendPercentage) ? y : 0.1), + (this._lambda = null != (C = this._lambda) ? C : 0.5), + (this._autoCalcDepthBounds = null != (P = this._autoCalcDepthBounds) && P), + e.prototype._initializeGenerator.call(this); + }), + (t.prototype._createTargetRenderTexture = function () { + var e = { width: this._mapSize, height: this._mapSize, layers: this.numCascades }; + (this._shadowMap = new mn.a(this._light.name + "_shadowMap", e, this._scene, !1, !0, this._textureType, !1, void 0, !1, !1, void 0)), this._shadowMap.createDepthStencilTexture(513, !0); + }), + (t.prototype._initializeShadowMap = function () { + var n = this; + if ((e.prototype._initializeShadowMap.call(this), null !== this._shadowMap)) { + (this._transformMatricesAsArray = new Float32Array(16 * this._numCascades)), + (this._viewSpaceFrustumsZ = new Array(this._numCascades)), + (this._frustumLengths = new Array(this._numCascades)), + (this._lightSizeUVCorrection = new Array(2 * this._numCascades)), + (this._depthCorrection = new Array(this._numCascades)), + (this._cascades = []), + (this._viewMatrices = []), + (this._projectionMatrices = []), + (this._transformMatrices = []), + (this._cascadeMinExtents = []), + (this._cascadeMaxExtents = []), + (this._frustumCenter = []), + (this._shadowCameraPos = []), + (this._frustumCornersWorldSpace = []); + for (var i = 0; i < this._numCascades; ++i) { + (this._cascades[i] = { prevBreakDistance: 0, breakDistance: 0 }), + (this._viewMatrices[i] = a.a.Zero()), + (this._projectionMatrices[i] = a.a.Zero()), + (this._transformMatrices[i] = a.a.Zero()), + (this._cascadeMinExtents[i] = new a.e()), + (this._cascadeMaxExtents[i] = new a.e()), + (this._frustumCenter[i] = new a.e()), + (this._shadowCameraPos[i] = new a.e()), + (this._frustumCornersWorldSpace[i] = new Array(t.frustumCornersNDCSpace.length)); + for (var r = 0; r < t.frustumCornersNDCSpace.length; ++r) this._frustumCornersWorldSpace[i][r] = new a.e(); + } + this._shadowMap.onBeforeRenderObservable.add(function (e) { + n._currentLayer = e; + }), + this._shadowMap.onBeforeBindObservable.add(function () { + n._breaksAreDirty && n._splitFrustum(), n._computeMatrices(); + }), + this._splitFrustum(); + } + }), + (t.prototype._bindCustomEffectForRenderSubMeshForShadowMap = function (e, t) { + t.setMatrix("viewProjection", this.getCascadeTransformMatrix(this._currentLayer)); + }), + (t.prototype._isReadyCustomDefines = function (e, t, n) { + this._depthClamp && this._filter !== aa.FILTER_PCSS && e.push("#define DEPTHCLAMP"); + }), + (t.prototype.prepareDefines = function (t, n) { + e.prototype.prepareDefines.call(this, t, n); + var i = this._scene, + r = this._light; + if (i.shadowsEnabled && r.shadowEnabled) { + (t["SHADOWCSM" + n] = !0), (t["SHADOWCSMDEBUG" + n] = this.debug), (t["SHADOWCSMNUM_CASCADES" + n] = this.numCascades), (t["SHADOWCSM_RIGHTHANDED" + n] = i.useRightHandedSystem); + var o = i.activeCamera; + o && this._shadowMaxZ < o.maxZ && (t["SHADOWCSMUSESHADOWMAXZ" + n] = !0), 0 === this.cascadeBlendPercentage && (t["SHADOWCSMNOBLEND" + n] = !0); + } + }), + (t.prototype.bindShadowLight = function (e, t) { + var n = this._light, + i = this._scene; + if (i.shadowsEnabled && n.shadowEnabled) { + var r = i.activeCamera; + if (r) { + var o = this.getShadowMap(); + if (o) { + var a = o.getSize().width; + if ( + (t.setMatrices("lightMatrix" + e, this._transformMatricesAsArray), + t.setArray("viewFrustumZ" + e, this._viewSpaceFrustumsZ), + t.setFloat("cascadeBlendFactor" + e, 0 === this.cascadeBlendPercentage ? 1e4 : 1 / this.cascadeBlendPercentage), + t.setArray("frustumLengths" + e, this._frustumLengths), + this._filter === aa.FILTER_PCF) + ) + t.setDepthStencilTexture("shadowSampler" + e, o), n._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), a, 1 / a, this.frustumEdgeFalloff, e); + else if (this._filter === aa.FILTER_PCSS) { + for (var s = 0; s < this._numCascades; ++s) + (this._lightSizeUVCorrection[2 * s + 0] = 0 === s ? 1 : (this._cascadeMaxExtents[0].x - this._cascadeMinExtents[0].x) / (this._cascadeMaxExtents[s].x - this._cascadeMinExtents[s].x)), + (this._lightSizeUVCorrection[2 * s + 1] = 0 === s ? 1 : (this._cascadeMaxExtents[0].y - this._cascadeMinExtents[0].y) / (this._cascadeMaxExtents[s].y - this._cascadeMinExtents[s].y)), + (this._depthCorrection[s] = 0 === s ? 1 : (this._cascadeMaxExtents[s].z - this._cascadeMinExtents[s].z) / (this._cascadeMaxExtents[0].z - this._cascadeMinExtents[0].z)); + t.setDepthStencilTexture("shadowSampler" + e, o), + t.setTexture("depthSampler" + e, o), + t.setArray2("lightSizeUVCorrection" + e, this._lightSizeUVCorrection), + t.setArray("depthCorrection" + e, this._depthCorrection), + t.setFloat("penumbraDarkness" + e, this.penumbraDarkness), + n._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), 1 / a, this._contactHardeningLightSizeUVRatio * a, this.frustumEdgeFalloff, e); + } else t.setTexture("shadowSampler" + e, o), n._uniformBuffer.updateFloat4("shadowsInfo", this.getDarkness(), a, 1 / a, this.frustumEdgeFalloff, e); + n._uniformBuffer.updateFloat2("depthValues", this.getLight().getDepthMinZ(r), this.getLight().getDepthMinZ(r) + this.getLight().getDepthMaxZ(r), e); + } + } + } + }), + (t.prototype.getTransformMatrix = function () { + return this.getCascadeTransformMatrix(0); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), + this._freezeShadowCastersBoundingInfoObservable && (this._scene.onBeforeRenderObservable.remove(this._freezeShadowCastersBoundingInfoObservable), (this._freezeShadowCastersBoundingInfoObservable = null)), + this._depthReducer && (this._depthReducer.dispose(), (this._depthReducer = null)); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this), + n = this.getShadowMap(); + if (!n) return t; + if ( + ((t.numCascades = this._numCascades), + (t.debug = this._debug), + (t.stabilizeCascades = this.stabilizeCascades), + (t.lambda = this._lambda), + (t.cascadeBlendPercentage = this.cascadeBlendPercentage), + (t.depthClamp = this._depthClamp), + (t.autoCalcDepthBounds = this.autoCalcDepthBounds), + (t.shadowMaxZ = this._shadowMaxZ), + (t.penumbraDarkness = this.penumbraDarkness), + (t.freezeShadowCastersBoundingInfo = this._freezeShadowCastersBoundingInfo), + (t.minDistance = this.minDistance), + (t.maxDistance = this.maxDistance), + (t.renderList = []), + n.renderList) + ) + for (var i = 0; i < n.renderList.length; i++) { + var r = n.renderList[i]; + t.renderList.push(r.id); + } + return t; + }), + (t.Parse = function (e, n) { + var i = aa.Parse(e, n, function (e, n) { + return new t(e, n); + }); + return ( + void 0 !== e.numCascades && (i.numCascades = e.numCascades), + void 0 !== e.debug && (i.debug = e.debug), + void 0 !== e.stabilizeCascades && (i.stabilizeCascades = e.stabilizeCascades), + void 0 !== e.lambda && (i.lambda = e.lambda), + void 0 !== e.cascadeBlendPercentage && (i.cascadeBlendPercentage = e.cascadeBlendPercentage), + void 0 !== e.depthClamp && (i.depthClamp = e.depthClamp), + void 0 !== e.autoCalcDepthBounds && (i.autoCalcDepthBounds = e.autoCalcDepthBounds), + void 0 !== e.shadowMaxZ && (i.shadowMaxZ = e.shadowMaxZ), + void 0 !== e.penumbraDarkness && (i.penumbraDarkness = e.penumbraDarkness), + void 0 !== e.freezeShadowCastersBoundingInfo && (i.freezeShadowCastersBoundingInfo = e.freezeShadowCastersBoundingInfo), + void 0 !== e.minDistance && void 0 !== e.maxDistance && i.setMinMaxDistance(e.minDistance, e.maxDistance), + i + ); + }), + (t.frustumCornersNDCSpace = [new a.e(-1, 1, -1), new a.e(1, 1, -1), new a.e(1, -1, -1), new a.e(-1, -1, -1), new a.e(-1, 1, 1), new a.e(1, 1, 1), new a.e(1, -1, 1), new a.e(-1, -1, 1)]), + (t.CLASSNAME = "CascadedShadowGenerator"), + (t.DEFAULT_CASCADES_COUNT = 4), + (t.MIN_CASCADES_COUNT = 2), + (t.MAX_CASCADES_COUNT = 4), + (t._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("ShadowGeneratorSceneComponent"); + }), + t + ); + })(aa); + i.a.AddParser(me.a.NAME_SHADOWGENERATOR, function (e, t) { + if (void 0 !== e.shadowGenerators && null !== e.shadowGenerators) + for (var n = 0, i = e.shadowGenerators.length; n < i; n++) { + var r = e.shadowGenerators[n]; + r.className === va.CLASSNAME ? va.Parse(r, t) : aa.Parse(r, t); + } + }); + var ya = (function () { + function e(e) { + (this.name = me.a.NAME_SHADOWGENERATOR), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._gatherRenderTargetsStage.registerStep(me.a.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR, this, this._gatherRenderTargets); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.serialize = function (e) { + e.shadowGenerators = []; + for (var t = 0, n = this.scene.lights; t < n.length; t++) { + var i = n[t].getShadowGenerator(); + i && e.shadowGenerators.push(i.serialize()); + } + }), + (e.prototype.addFromContainer = function (e) {}), + (e.prototype.removeFromContainer = function (e, t) {}), + (e.prototype.dispose = function () {}), + (e.prototype._gatherRenderTargets = function (e) { + var t = this.scene; + if (this.scene.shadowsEnabled) + for (var n = 0; n < t.lights.length; n++) { + var i = t.lights[n], + r = i.getShadowGenerator(); + if (i.isEnabled() && i.shadowEnabled && r) { + var o = r.getShadowMap(); + -1 !== t.textures.indexOf(o) && e.push(o); + } + } + }), + e + ); + })(); + aa._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_SHADOWGENERATOR); + t || ((t = new ya(e)), e._addComponent(t)); + }; + var Ca = n(123), + Pa = (function () { + function e(e, t, n) { + var i = this; + void 0 === t && (t = ""), + void 0 === n && (n = "black"), + (this._renderingCanvas = e), + (this._loadingText = t), + (this._loadingDivBackgroundColor = n), + (this._resizeLoadingUI = function () { + var e = i._renderingCanvas.getBoundingClientRect(), + t = window.getComputedStyle(i._renderingCanvas).position; + i._loadingDiv && + ((i._loadingDiv.style.position = "fixed" === t ? "fixed" : "absolute"), + (i._loadingDiv.style.left = e.left + "px"), + (i._loadingDiv.style.top = e.top + "px"), + (i._loadingDiv.style.width = e.width + "px"), + (i._loadingDiv.style.height = e.height + "px")); + }); + } + return ( + (e.prototype.displayLoadingUI = function () { + if (!this._loadingDiv) { + (this._loadingDiv = document.createElement("div")), + (this._loadingDiv.id = "babylonjsLoadingDiv"), + (this._loadingDiv.style.opacity = "0"), + (this._loadingDiv.style.transition = "opacity 1.5s ease"), + (this._loadingDiv.style.pointerEvents = "none"), + (this._loadingTextDiv = document.createElement("div")), + (this._loadingTextDiv.style.position = "absolute"), + (this._loadingTextDiv.style.left = "0"), + (this._loadingTextDiv.style.top = "50%"), + (this._loadingTextDiv.style.marginTop = "80px"), + (this._loadingTextDiv.style.width = "100%"), + (this._loadingTextDiv.style.height = "20px"), + (this._loadingTextDiv.style.fontFamily = "Arial"), + (this._loadingTextDiv.style.fontSize = "14px"), + (this._loadingTextDiv.style.color = "white"), + (this._loadingTextDiv.style.textAlign = "center"), + (this._loadingTextDiv.innerHTML = "Loading"), + this._loadingDiv.appendChild(this._loadingTextDiv), + (this._loadingTextDiv.innerHTML = this._loadingText); + var t = document.createElement("style"); + t.type = "text/css"; + (t.innerHTML = + "@-webkit-keyframes spin1 { 0% { -webkit-transform: rotate(0deg);}\n 100% { -webkit-transform: rotate(360deg);}\n } @keyframes spin1 { 0% { transform: rotate(0deg);}\n 100% { transform: rotate(360deg);}\n }"), + document.getElementsByTagName("head")[0].appendChild(t); + var n = !!window.SVGSVGElement, + i = new Image(); + e.DefaultLogoUrl + ? (i.src = e.DefaultLogoUrl) + : (i.src = n + ? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODAuMTcgMjA4LjA0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6I2UwNjg0Yjt9LmNscy0ze2ZpbGw6I2JiNDY0Yjt9LmNscy00e2ZpbGw6I2UwZGVkODt9LmNscy01e2ZpbGw6I2Q1ZDJjYTt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkJhYnlsb25Mb2dvPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iUGFnZV9FbGVtZW50cyIgZGF0YS1uYW1lPSJQYWdlIEVsZW1lbnRzIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik05MC4wOSwwLDAsNTJWMTU2bDkwLjA5LDUyLDkwLjA4LTUyVjUyWiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxODAuMTcgNTIuMDEgMTUxLjk3IDM1LjczIDEyNC44NSA1MS4zOSAxNTMuMDUgNjcuNjcgMTgwLjE3IDUyLjAxIi8+PHBvbHlnb24gY2xhc3M9ImNscy0yIiBwb2ludHM9IjI3LjEyIDY3LjY3IDExNy4yMSAxNS42NiA5MC4wOCAwIDAgNTIuMDEgMjcuMTIgNjcuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iNjEuODkgMTIwLjMgOTAuMDggMTM2LjU4IDExOC4yOCAxMjAuMyA5MC4wOCAxMDQuMDIgNjEuODkgMTIwLjMiLz48cG9seWdvbiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTUzLjA1IDY3LjY3IDE1My4wNSAxNDAuMzcgOTAuMDggMTc2LjcyIDI3LjEyIDE0MC4zNyAyNy4xMiA2Ny42NyAwIDUyLjAxIDAgMTU2LjAzIDkwLjA4IDIwOC4wNCAxODAuMTcgMTU2LjAzIDE4MC4xNyA1Mi4wMSAxNTMuMDUgNjcuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iOTAuMDggNzEuNDYgNjEuODkgODcuNzQgNjEuODkgMTIwLjMgOTAuMDggMTA0LjAyIDExOC4yOCAxMjAuMyAxMTguMjggODcuNzQgOTAuMDggNzEuNDYiLz48cG9seWdvbiBjbGFzcz0iY2xzLTQiIHBvaW50cz0iMTUzLjA1IDY3LjY3IDExOC4yOCA4Ny43NCAxMTguMjggMTIwLjMgOTAuMDggMTM2LjU4IDkwLjA4IDE3Ni43MiAxNTMuMDUgMTQwLjM3IDE1My4wNSA2Ny42NyIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIyNy4xMiA2Ny42NyA2MS44OSA4Ny43NCA2MS44OSAxMjAuMyA5MC4wOCAxMzYuNTggOTAuMDggMTc2LjcyIDI3LjEyIDE0MC4zNyAyNy4xMiA2Ny42NyIvPjwvZz48L2c+PC9zdmc+" + : "https://cdn.babylonjs.com/Assets/babylonLogo.png"), + (i.style.position = "absolute"), + (i.style.left = "40%"), + (i.style.top = "40%"), + (i.style.width = "20%"), + (i.style.height = "20%"); + var r = new Image(); + if ( + (e.DefaultSpinnerUrl + ? (r.src = e.DefaultSpinnerUrl) + : (r.src = n + ? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzOTIgMzkyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2UwNjg0Yjt9LmNscy0ye2ZpbGw6bm9uZTt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPlNwaW5uZXJJY29uPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU3Bpbm5lciI+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNDAuMjEsMTI2LjQzYzMuNy03LjMxLDcuNjctMTQuNDQsMTItMjEuMzJsMy4zNi01LjEsMy41Mi01YzEuMjMtMS42MywyLjQxLTMuMjksMy42NS00LjkxczIuNTMtMy4yMSwzLjgyLTQuNzlBMTg1LjIsMTg1LjIsMCwwLDEsODMuNCw2Ny40M2EyMDgsMjA4LDAsMCwxLDE5LTE1LjY2YzMuMzUtMi40MSw2Ljc0LTQuNzgsMTAuMjUtN3M3LjExLTQuMjgsMTAuNzUtNi4zMmM3LjI5LTQsMTQuNzMtOCwyMi41My0xMS40OSwzLjktMS43Miw3Ljg4LTMuMywxMi00LjY0YTEwNC4yMiwxMDQuMjIsMCwwLDEsMTIuNDQtMy4yMyw2Mi40NCw2Mi40NCwwLDAsMSwxMi43OC0xLjM5QTI1LjkyLDI1LjkyLDAsMCwxLDE5NiwyMS40NGE2LjU1LDYuNTUsMCwwLDEsMi4wNSw5LDYuNjYsNi42NiwwLDAsMS0xLjY0LDEuNzhsLS40MS4yOWEyMi4wNywyMi4wNywwLDAsMS01Ljc4LDMsMzAuNDIsMzAuNDIsMCwwLDEtNS42NywxLjYyLDM3LjgyLDM3LjgyLDAsMCwxLTUuNjkuNzFjLTEsMC0xLjkuMTgtMi44NS4yNmwtMi44NS4yNHEtNS43Mi41MS0xMS40OCwxLjFjLTMuODQuNC03LjcxLjgyLTExLjU4LDEuNGExMTIuMzQsMTEyLjM0LDAsMCwwLTIyLjk0LDUuNjFjLTMuNzIsMS4zNS03LjM0LDMtMTAuOTQsNC42NHMtNy4xNCwzLjUxLTEwLjYsNS41MUExNTEuNiwxNTEuNiwwLDAsMCw2OC41Niw4N0M2Ny4yMyw4OC40OCw2Niw5MCw2NC42NCw5MS41NnMtMi41MSwzLjE1LTMuNzUsNC43M2wtMy41NCw0LjljLTEuMTMsMS42Ni0yLjIzLDMuMzUtMy4zMyw1YTEyNywxMjcsMCwwLDAtMTAuOTMsMjEuNDksMS41OCwxLjU4LDAsMSwxLTMtMS4xNVM0MC4xOSwxMjYuNDcsNDAuMjEsMTI2LjQzWiIvPjxyZWN0IGNsYXNzPSJjbHMtMiIgd2lkdGg9IjM5MiIgaGVpZ2h0PSIzOTIiLz48L2c+PC9nPjwvc3ZnPg==" + : "https://cdn.babylonjs.com/Assets/loadingIcon.png"), + (r.style.position = "absolute"), + (r.style.left = "30%"), + (r.style.top = "30%"), + (r.style.width = "40%"), + (r.style.height = "40%"), + (r.style.animation = "spin1 0.75s infinite linear"), + (r.style.webkitAnimation = "spin1 0.75s infinite linear"), + (r.style.transformOrigin = "50% 50%"), + (r.style.webkitTransformOrigin = "50% 50%"), + !n) + ) { + var o = { w: 16, h: 18.5 }, + a = { w: 30, h: 30 }; + (i.style.width = o.w + "vh"), + (i.style.height = o.h + "vh"), + (i.style.left = "calc(50% - " + o.w / 2 + "vh)"), + (i.style.top = "calc(50% - " + o.h / 2 + "vh)"), + (r.style.width = a.w + "vh"), + (r.style.height = a.h + "vh"), + (r.style.left = "calc(50% - " + a.w / 2 + "vh)"), + (r.style.top = "calc(50% - " + a.h / 2 + "vh)"); + } + this._loadingDiv.appendChild(i), + this._loadingDiv.appendChild(r), + this._resizeLoadingUI(), + window.addEventListener("resize", this._resizeLoadingUI), + (this._loadingDiv.style.backgroundColor = this._loadingDivBackgroundColor), + document.body.appendChild(this._loadingDiv), + (this._loadingDiv.style.opacity = "1"); + } + }), + (e.prototype.hideLoadingUI = function () { + var e = this; + if (this._loadingDiv) { + (this._loadingDiv.style.opacity = "0"), + this._loadingDiv.addEventListener("transitionend", function () { + e._loadingDiv && (e._loadingDiv.parentElement && e._loadingDiv.parentElement.removeChild(e._loadingDiv), window.removeEventListener("resize", e._resizeLoadingUI), (e._loadingDiv = null)); + }); + } + }), + Object.defineProperty(e.prototype, "loadingUIText", { + get: function () { + return this._loadingText; + }, + set: function (e) { + (this._loadingText = e), this._loadingTextDiv && (this._loadingTextDiv.innerHTML = this._loadingText); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "loadingUIBackgroundColor", { + get: function () { + return this._loadingDivBackgroundColor; + }, + set: function (e) { + (this._loadingDivBackgroundColor = e), this._loadingDiv && (this._loadingDiv.style.backgroundColor = this._loadingDivBackgroundColor); + }, + enumerable: !0, + configurable: !0, + }), + (e.DefaultLogoUrl = ""), + (e.DefaultSpinnerUrl = ""), + e + ); + })(); + ue.a.DefaultLoadingScreenFactory = function (e) { + return new Pa(e); + }; + var xa = n(79), + Ta = n(94), + Sa = (function () { + function e() {} + return ( + (e.ConvertPanoramaToCubemap = function (e, t, n, i) { + if (!e) throw "ConvertPanoramaToCubemap: input cannot be null"; + if (e.length != t * n * 3) throw "ConvertPanoramaToCubemap: input size is wrong"; + return { + front: this.CreateCubemapTexture(i, this.FACE_FRONT, e, t, n), + back: this.CreateCubemapTexture(i, this.FACE_BACK, e, t, n), + left: this.CreateCubemapTexture(i, this.FACE_LEFT, e, t, n), + right: this.CreateCubemapTexture(i, this.FACE_RIGHT, e, t, n), + up: this.CreateCubemapTexture(i, this.FACE_UP, e, t, n), + down: this.CreateCubemapTexture(i, this.FACE_DOWN, e, t, n), + size: i, + type: 1, + format: 4, + gammaSpace: !1, + }; + }), + (e.CreateCubemapTexture = function (e, t, n, i, r) { + for (var o = new ArrayBuffer(e * e * 4 * 3), a = new Float32Array(o), s = t[1].subtract(t[0]).scale(1 / e), c = t[3].subtract(t[2]).scale(1 / e), l = 1 / e, u = 0, h = 0; h < e; h++) { + for (var d = t[0], p = t[2], f = 0; f < e; f++) { + var m = p.subtract(d).scale(u).add(d); + m.normalize(); + var g = this.CalcProjectionSpherical(m, n, i, r); + (a[h * e * 3 + 3 * f + 0] = g.r), (a[h * e * 3 + 3 * f + 1] = g.g), (a[h * e * 3 + 3 * f + 2] = g.b), (d = d.add(s)), (p = p.add(c)); + } + u += l; + } + return a; + }), + (e.CalcProjectionSpherical = function (e, t, n, i) { + for (var r = Math.atan2(e.z, e.x), o = Math.acos(e.y); r < -Math.PI; ) r += 2 * Math.PI; + for (; r > Math.PI; ) r -= 2 * Math.PI; + var a = r / Math.PI, + s = o / Math.PI; + a = 0.5 * a + 0.5; + var c = Math.round(a * n); + c < 0 ? (c = 0) : c >= n && (c = n - 1); + var l = Math.round(s * i); + l < 0 ? (l = 0) : l >= i && (l = i - 1); + var u = i - l - 1; + return { r: t[u * n * 3 + 3 * c + 0], g: t[u * n * 3 + 3 * c + 1], b: t[u * n * 3 + 3 * c + 2] }; + }), + (e.FACE_FRONT = [new a.e(-1, -1, -1), new a.e(1, -1, -1), new a.e(-1, 1, -1), new a.e(1, 1, -1)]), + (e.FACE_BACK = [new a.e(1, -1, 1), new a.e(-1, -1, 1), new a.e(1, 1, 1), new a.e(-1, 1, 1)]), + (e.FACE_RIGHT = [new a.e(1, -1, -1), new a.e(1, -1, 1), new a.e(1, 1, -1), new a.e(1, 1, 1)]), + (e.FACE_LEFT = [new a.e(-1, -1, 1), new a.e(-1, -1, -1), new a.e(-1, 1, 1), new a.e(-1, 1, -1)]), + (e.FACE_DOWN = [new a.e(-1, 1, -1), new a.e(1, 1, -1), new a.e(-1, 1, 1), new a.e(1, 1, 1)]), + (e.FACE_UP = [new a.e(-1, -1, 1), new a.e(1, -1, 1), new a.e(-1, -1, -1), new a.e(1, -1, -1)]), + e + ); + })(), + Oa = (function () { + function e() {} + return ( + (e.Ldexp = function (e, t) { + return t > 1023 ? e * Math.pow(2, 1023) * Math.pow(2, t - 1023) : t < -1074 ? e * Math.pow(2, -1074) * Math.pow(2, t + 1074) : e * Math.pow(2, t); + }), + (e.Rgbe2float = function (e, t, n, i, r, o) { + r > 0 ? ((r = this.Ldexp(1, r - 136)), (e[o + 0] = t * r), (e[o + 1] = n * r), (e[o + 2] = i * r)) : ((e[o + 0] = 0), (e[o + 1] = 0), (e[o + 2] = 0)); + }), + (e.readStringLine = function (e, t) { + for (var n = "", i = "", r = t; r < e.length - t && "\n" != (i = String.fromCharCode(e[r])); r++) n += i; + return n; + }), + (e.RGBE_ReadHeader = function (e) { + var t, + n, + i = this.readStringLine(e, 0); + if ("#" != i[0] || "?" != i[1]) throw "Bad HDR Format."; + var r = !1, + o = !1, + a = 0; + do { + (a += i.length + 1), "FORMAT=32-bit_rle_rgbe" == (i = this.readStringLine(e, a)) ? (o = !0) : 0 == i.length && (r = !0); + } while (!r); + if (!o) throw "HDR Bad header format, unsupported FORMAT"; + (a += i.length + 1), (i = this.readStringLine(e, a)); + var s = /^\-Y (.*) \+X (.*)$/g.exec(i); + if (!s || s.length < 3) throw "HDR Bad header format, no size"; + if (((n = parseInt(s[2])), (t = parseInt(s[1])), n < 8 || n > 32767)) throw "HDR Bad header format, unsupported size"; + return { height: t, width: n, dataPosition: (a += i.length + 1) }; + }), + (e.GetCubeMapTextureData = function (e, t) { + var n = new Uint8Array(e), + i = this.RGBE_ReadHeader(n), + r = this.RGBE_ReadPixels_RLE(n, i); + return Sa.ConvertPanoramaToCubemap(r, i.width, i.height, t); + }), + (e.RGBE_ReadPixels = function (e, t) { + return this.RGBE_ReadPixels_RLE(e, t); + }), + (e.RGBE_ReadPixels_RLE = function (e, t) { + for ( + var n, i, r, o, a, s = t.height, c = t.width, l = t.dataPosition, u = 0, h = 0, d = 0, p = new ArrayBuffer(4 * c), f = new Uint8Array(p), m = new ArrayBuffer(t.width * t.height * 4 * 3), g = new Float32Array(m); + s > 0; + + ) { + if (((n = e[l++]), (i = e[l++]), (r = e[l++]), (o = e[l++]), 2 != n || 2 != i || 128 & r)) throw "HDR Bad header format, not RLE"; + if (((r << 8) | o) != c) throw "HDR Bad header format, wrong scan line width"; + for (u = 0, d = 0; d < 4; d++) + for (h = (d + 1) * c; u < h; ) + if (((n = e[l++]), (i = e[l++]), n > 128)) { + if (0 == (a = n - 128) || a > h - u) throw "HDR Bad Format, bad scanline data (run)"; + for (; a-- > 0; ) f[u++] = i; + } else { + if (0 == (a = n) || a > h - u) throw "HDR Bad Format, bad scanline data (non-run)"; + if (((f[u++] = i), --a > 0)) for (var b = 0; b < a; b++) f[u++] = e[l++]; + } + for (d = 0; d < c; d++) (n = f[d]), (i = f[d + c]), (r = f[d + 2 * c]), (o = f[d + 3 * c]), this.Rgbe2float(g, n, i, r, o, (t.height - s) * c * 3 + 3 * d); + s--; + } + return g; + }), + e + ); + })(), + Ea = + (n(155), + n(213), + (function (e) { + function t(t, n, i, r, o, s, c, l, u) { + void 0 === r && (r = !1), void 0 === o && (o = !0), void 0 === s && (s = !1), void 0 === c && (c = !1), void 0 === l && (l = null), void 0 === u && (u = null); + var h = e.call(this, n) || this; + return ( + (h._generateHarmonics = !0), + (h._onLoad = null), + (h._onError = null), + (h.coordinatesMode = ln.a.CUBIC_MODE), + (h._isBlocking = !0), + (h._rotationY = 0), + (h.boundingBoxPosition = a.e.Zero()), + t + ? ((h.name = t), + (h.url = t), + (h.hasAlpha = !1), + (h.isCube = !0), + (h._textureMatrix = a.a.Identity()), + (h._onLoad = l), + (h._onError = u), + (h.gammaSpace = s), + (h._noMipmap = r), + (h._size = i), + (h._generateHarmonics = o), + (h._texture = h._getFromCache(t, h._noMipmap)), + h._texture + ? l && + (h._texture.isReady + ? $e.b.SetImmediate(function () { + return l(); + }) + : h._texture.onLoadedObservable.add(l)) + : n.useDelayedTextureLoading + ? (h.delayLoadState = 4) + : h.loadTexture(), + h) + : h + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "isBlocking", { + get: function () { + return this._isBlocking; + }, + set: function (e) { + this._isBlocking = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotationY", { + get: function () { + return this._rotationY; + }, + set: function (e) { + (this._rotationY = e), this.setReflectionTextureMatrix(a.a.RotationY(this._rotationY)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "boundingBoxSize", { + get: function () { + return this._boundingBoxSize; + }, + set: function (e) { + if (!this._boundingBoxSize || !this._boundingBoxSize.equals(e)) { + this._boundingBoxSize = e; + var t = this.getScene(); + t && t.markAllMaterialsAsDirty(1); + } + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "HDRCubeTexture"; + }), + (t.prototype.loadTexture = function () { + var e = this, + n = this.getScene(); + n && + (this._texture = n.getEngine().createRawCubeTextureFromUrl( + this.url, + n, + this._size, + 4, + n.getEngine().getCaps().textureFloat ? 1 : 0, + this._noMipmap, + function (n) { + (e.lodGenerationOffset = 0), (e.lodGenerationScale = 0.8); + var i = e.getScene(); + if (!i) return null; + var r = Oa.GetCubeMapTextureData(n, e._size); + if (e._generateHarmonics) { + var o = Xr.a.ConvertCubeMapToSphericalPolynomial(r); + e.sphericalPolynomial = o; + } + for (var a = [], s = null, c = 0; c < 6; c++) { + if (!i.getEngine().getCaps().textureFloat) { + var l = new ArrayBuffer(e._size * e._size * 3); + s = new Uint8Array(l); + } + var u = r[t._facesMapping[c]]; + if (e.gammaSpace || s) + for (var h = 0; h < e._size * e._size; h++) + if ((e.gammaSpace && ((u[3 * h + 0] = Math.pow(u[3 * h + 0], j.b)), (u[3 * h + 1] = Math.pow(u[3 * h + 1], j.b)), (u[3 * h + 2] = Math.pow(u[3 * h + 2], j.b))), s)) { + var d = Math.max(255 * u[3 * h + 0], 0), + p = Math.max(255 * u[3 * h + 1], 0), + f = Math.max(255 * u[3 * h + 2], 0), + m = Math.max(Math.max(d, p), f); + if (m > 255) { + var g = 255 / m; + (d *= g), (p *= g), (f *= g); + } + (s[3 * h + 0] = d), (s[3 * h + 1] = p), (s[3 * h + 2] = f); + } + s ? a.push(s) : a.push(u); + } + return a; + }, + null, + this._onLoad, + this._onError + )); + }), + (t.prototype.clone = function () { + var e = this.getScene(); + if (!e) return this; + var n = new t(this.url, e, this._size, this._noMipmap, this._generateHarmonics, this.gammaSpace); + return (n.level = this.level), (n.wrapU = this.wrapU), (n.wrapV = this.wrapV), (n.coordinatesIndex = this.coordinatesIndex), (n.coordinatesMode = this.coordinatesMode), n; + }), + (t.prototype.delayLoad = function () { + 4 === this.delayLoadState && ((this.delayLoadState = 1), (this._texture = this._getFromCache(this.url, this._noMipmap)), this._texture || this.loadTexture()); + }), + (t.prototype.getReflectionTextureMatrix = function () { + return this._textureMatrix; + }), + (t.prototype.setReflectionTextureMatrix = function (e) { + var t = this; + (this._textureMatrix = e), + e.updateFlag !== this._textureMatrix.updateFlag && + e.isIdentity() !== this._textureMatrix.isIdentity() && + this.getScene().markAllMaterialsAsDirty(1, function (e) { + return -1 !== e.getActiveTextures().indexOf(t); + }); + }), + (t.Parse = function (e, n, i) { + var r = null; + return ( + e.name && + !e.isRenderTarget && + (((r = new t(i + e.name, n, e.size, e.noMipmap, e.generateHarmonics, e.useInGammaSpace)).name = e.name), + (r.hasAlpha = e.hasAlpha), + (r.level = e.level), + (r.coordinatesMode = e.coordinatesMode), + (r.isBlocking = e.isBlocking)), + r && + (e.boundingBoxPosition && (r.boundingBoxPosition = a.e.FromArray(e.boundingBoxPosition)), + e.boundingBoxSize && (r.boundingBoxSize = a.e.FromArray(e.boundingBoxSize)), + e.rotationY && (r.rotationY = e.rotationY)), + r + ); + }), + (t.prototype.serialize = function () { + if (!this.name) return null; + var e = {}; + return ( + (e.name = this.name), + (e.hasAlpha = this.hasAlpha), + (e.isCube = !0), + (e.level = this.level), + (e.size = this._size), + (e.coordinatesMode = this.coordinatesMode), + (e.useInGammaSpace = this.gammaSpace), + (e.generateHarmonics = this._generateHarmonics), + (e.customType = "BABYLON.HDRCubeTexture"), + (e.noMipmap = this._noMipmap), + (e.isBlocking = this._isBlocking), + (e.rotationY = this._rotationY), + e + ); + }), + (t._facesMapping = ["right", "left", "up", "down", "front", "back"]), + t + ); + })(Cr.a)); + c.a.RegisteredTypes["BABYLON.HDRCubeTexture"] = Ea; + var Ma = n(154), + Aa = (function () { + function e(t, n) { + if ((void 0 === n && (n = e.DefaultPluginFactory()), (this._physicsPlugin = n), (this._impostors = []), (this._joints = []), (this._subTimeStep = 0), !this._physicsPlugin.isSupported())) + throw new Error("Physics Engine " + this._physicsPlugin.name + " cannot be found. Please make sure it is included."); + (t = t || new a.e(0, -9.807, 0)), this.setGravity(t), this.setTimeStep(); + } + return ( + (e.DefaultPluginFactory = function () { + throw zo.a.WarnImport("CannonJSPlugin"); + }), + (e.prototype.setGravity = function (e) { + (this.gravity = e), this._physicsPlugin.setGravity(this.gravity); + }), + (e.prototype.setTimeStep = function (e) { + void 0 === e && (e = 1 / 60), this._physicsPlugin.setTimeStep(e); + }), + (e.prototype.getTimeStep = function () { + return this._physicsPlugin.getTimeStep(); + }), + (e.prototype.setSubTimeStep = function (e) { + void 0 === e && (e = 0), (this._subTimeStep = e); + }), + (e.prototype.getSubTimeStep = function () { + return this._subTimeStep; + }), + (e.prototype.dispose = function () { + this._impostors.forEach(function (e) { + e.dispose(); + }), + this._physicsPlugin.dispose(); + }), + (e.prototype.getPhysicsPluginName = function () { + return this._physicsPlugin.name; + }), + (e.prototype.addImpostor = function (e) { + (e.uniqueId = this._impostors.push(e)), e.parent || this._physicsPlugin.generatePhysicsBody(e); + }), + (e.prototype.removeImpostor = function (e) { + var t = this._impostors.indexOf(e); + t > -1 && this._impostors.splice(t, 1).length && this.getPhysicsPlugin().removePhysicsBody(e); + }), + (e.prototype.addJoint = function (e, t, n) { + var i = { mainImpostor: e, connectedImpostor: t, joint: n }; + (n.physicsPlugin = this._physicsPlugin), this._joints.push(i), this._physicsPlugin.generateJoint(i); + }), + (e.prototype.removeJoint = function (e, t, n) { + var i = this._joints.filter(function (i) { + return i.connectedImpostor === t && i.joint === n && i.mainImpostor === e; + }); + i.length && this._physicsPlugin.removeJoint(i[0]); + }), + (e.prototype._step = function (e) { + var t = this; + this._impostors.forEach(function (e) { + e.isBodyInitRequired() && t._physicsPlugin.generatePhysicsBody(e); + }), + e > 0.1 ? (e = 0.1) : e <= 0 && (e = 1 / 60), + this._physicsPlugin.executeStep(e, this._impostors); + }), + (e.prototype.getPhysicsPlugin = function () { + return this._physicsPlugin; + }), + (e.prototype.getImpostors = function () { + return this._impostors; + }), + (e.prototype.getImpostorForPhysicsObject = function (e) { + for (var t = 0; t < this._impostors.length; ++t) if (this._impostors[t].object === e) return this._impostors[t]; + return null; + }), + (e.prototype.getImpostorWithPhysicsBody = function (e) { + for (var t = 0; t < this._impostors.length; ++t) if (this._impostors[t].physicsBody === e) return this._impostors[t]; + return null; + }), + (e.prototype.raycast = function (e, t) { + return this._physicsPlugin.raycast(e, t); + }), + (e.Epsilon = 0.001), + e + ); + })(), + Ia = (function () { + function e() { + (this._hasHit = !1), (this._hitDistance = 0), (this._hitNormalWorld = a.e.Zero()), (this._hitPointWorld = a.e.Zero()), (this._rayFromWorld = a.e.Zero()), (this._rayToWorld = a.e.Zero()); + } + return ( + Object.defineProperty(e.prototype, "hasHit", { + get: function () { + return this._hasHit; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hitDistance", { + get: function () { + return this._hitDistance; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hitNormalWorld", { + get: function () { + return this._hitNormalWorld; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hitPointWorld", { + get: function () { + return this._hitPointWorld; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rayFromWorld", { + get: function () { + return this._rayFromWorld; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rayToWorld", { + get: function () { + return this._rayToWorld; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setHitData = function (e, t) { + (this._hasHit = !0), (this._hitNormalWorld = new a.e(e.x, e.y, e.z)), (this._hitPointWorld = new a.e(t.x, t.y, t.z)); + }), + (e.prototype.setHitDistance = function (e) { + this._hitDistance = e; + }), + (e.prototype.calculateHitDistance = function () { + this._hitDistance = a.e.Distance(this._rayFromWorld, this._hitPointWorld); + }), + (e.prototype.reset = function (e, t) { + void 0 === e && (e = a.e.Zero()), + void 0 === t && (t = a.e.Zero()), + (this._rayFromWorld = e), + (this._rayToWorld = t), + (this._hasHit = !1), + (this._hitDistance = 0), + (this._hitNormalWorld = a.e.Zero()), + (this._hitPointWorld = a.e.Zero()); + }), + e + ); + })(), + Da = (function () { + function e(e, t, n) { + void 0 === e && (e = !0), + void 0 === t && (t = 10), + void 0 === n && (n = CANNON), + (this._useDeltaForWorldStep = e), + (this.name = "CannonJSPlugin"), + (this._physicsMaterials = new Array()), + (this._fixedTimeStep = 1 / 60), + (this._physicsBodysToRemoveAfterStep = new Array()), + (this._minus90X = new a.b(-0.7071067811865475, 0, 0, 0.7071067811865475)), + (this._plus90X = new a.b(0.7071067811865475, 0, 0, 0.7071067811865475)), + (this._tmpPosition = a.e.Zero()), + (this._tmpDeltaPosition = a.e.Zero()), + (this._tmpUnityRotation = new a.b()), + (this.BJSCANNON = n), + this.isSupported() + ? (this._extendNamespace(), + (this.world = new this.BJSCANNON.World()), + (this.world.broadphase = new this.BJSCANNON.NaiveBroadphase()), + (this.world.solver.iterations = t), + (this._cannonRaycastResult = new this.BJSCANNON.RaycastResult()), + (this._raycastResult = new Ia())) + : g.a.Error("CannonJS is not available. Please make sure you included the js file."); + } + return ( + (e.prototype.setGravity = function (e) { + this.world.gravity.copy(e); + }), + (e.prototype.setTimeStep = function (e) { + this._fixedTimeStep = e; + }), + (e.prototype.getTimeStep = function () { + return this._fixedTimeStep; + }), + (e.prototype.executeStep = function (e) { + this.world.step(this._fixedTimeStep, this._useDeltaForWorldStep ? e : 0, 3), this._removeMarkedPhysicsBodiesFromWorld(); + }), + (e.prototype._removeMarkedPhysicsBodiesFromWorld = function () { + var e = this; + this._physicsBodysToRemoveAfterStep.length > 0 && + (this._physicsBodysToRemoveAfterStep.forEach(function (t) { + e.world.remove(t); + }), + (this._physicsBodysToRemoveAfterStep = [])); + }), + (e.prototype.applyImpulse = function (e, t, n) { + var i = new this.BJSCANNON.Vec3(n.x, n.y, n.z), + r = new this.BJSCANNON.Vec3(t.x, t.y, t.z); + e.physicsBody.applyImpulse(r, i); + }), + (e.prototype.applyForce = function (e, t, n) { + var i = new this.BJSCANNON.Vec3(n.x, n.y, n.z), + r = new this.BJSCANNON.Vec3(t.x, t.y, t.z); + e.physicsBody.applyForce(r, i); + }), + (e.prototype.generatePhysicsBody = function (e) { + if ((this._removeMarkedPhysicsBodiesFromWorld(), e.parent)) e.physicsBody && (this.removePhysicsBody(e), e.forceUpdate()); + else { + if (e.isBodyInitRequired()) { + var t = this._createShape(e), + n = e.physicsBody; + n && this.removePhysicsBody(e); + var i = this._addMaterial("mat-" + e.uniqueId, e.getParam("friction"), e.getParam("restitution")), + r = { mass: e.getParam("mass"), material: i }, + o = e.getParam("nativeOptions"); + for (var a in o) o.hasOwnProperty(a) && (r[a] = o[a]); + (e.physicsBody = new this.BJSCANNON.Body(r)), + e.physicsBody.addEventListener("collide", e.onCollide), + this.world.addEventListener("preStep", e.beforeStep), + this.world.addEventListener("postStep", e.afterStep), + e.physicsBody.addShape(t), + this.world.add(e.physicsBody), + n && + ["force", "torque", "velocity", "angularVelocity"].forEach(function (t) { + e.physicsBody[t].copy(n[t]); + }), + this._processChildMeshes(e); + } + this._updatePhysicsBodyTransformation(e); + } + }), + (e.prototype._processChildMeshes = function (e) { + var t = this, + n = e.object.getChildMeshes ? e.object.getChildMeshes(!0) : [], + i = e.object.rotationQuaternion; + if (n.length) { + var r = function (n, o) { + if (i && o.rotationQuaternion) { + var s = o.getPhysicsImpostor(); + if (s) + if (s.parent !== e) { + var c = o.position.clone(), + l = o.rotationQuaternion.multiply(a.b.Inverse(i)); + s.physicsBody && (t.removePhysicsBody(s), (s.physicsBody = null)), + (s.parent = e), + s.resetUpdateFlags(), + e.physicsBody.addShape(t._createShape(s), new t.BJSCANNON.Vec3(c.x, c.y, c.z), new t.BJSCANNON.Quaternion(l.x, l.y, l.z, l.w)), + (e.physicsBody.mass += s.getParam("mass")); + } + i.multiplyInPlace(o.rotationQuaternion), + o + .getChildMeshes(!0) + .filter(function (e) { + return !!e.physicsImpostor; + }) + .forEach(r.bind(t, o.getAbsolutePosition())); + } + }; + n.filter(function (e) { + return !!e.physicsImpostor; + }).forEach(r.bind(this, e.object.getAbsolutePosition())); + } + }), + (e.prototype.removePhysicsBody = function (e) { + e.physicsBody.removeEventListener("collide", e.onCollide), + this.world.removeEventListener("preStep", e.beforeStep), + this.world.removeEventListener("postStep", e.afterStep), + -1 === this._physicsBodysToRemoveAfterStep.indexOf(e.physicsBody) && this._physicsBodysToRemoveAfterStep.push(e.physicsBody); + }), + (e.prototype.generateJoint = function (e) { + var t = e.mainImpostor.physicsBody, + n = e.connectedImpostor.physicsBody; + if (t && n) { + var i, + r = e.joint.jointData, + o = { + pivotA: r.mainPivot ? new this.BJSCANNON.Vec3().copy(r.mainPivot) : null, + pivotB: r.connectedPivot ? new this.BJSCANNON.Vec3().copy(r.connectedPivot) : null, + axisA: r.mainAxis ? new this.BJSCANNON.Vec3().copy(r.mainAxis) : null, + axisB: r.connectedAxis ? new this.BJSCANNON.Vec3().copy(r.connectedAxis) : null, + maxForce: r.nativeParams.maxForce, + collideConnected: !!r.collision, + }; + switch (e.joint.type) { + case gi.HingeJoint: + case gi.Hinge2Joint: + i = new this.BJSCANNON.HingeConstraint(t, n, o); + break; + case gi.DistanceJoint: + i = new this.BJSCANNON.DistanceConstraint(t, n, r.maxDistance || 2); + break; + case gi.SpringJoint: + var a = r; + i = new this.BJSCANNON.Spring(t, n, { restLength: a.length, stiffness: a.stiffness, damping: a.damping, localAnchorA: o.pivotA, localAnchorB: o.pivotB }); + break; + case gi.LockJoint: + i = new this.BJSCANNON.LockConstraint(t, n, o); + break; + case gi.PointToPointJoint: + case gi.BallAndSocketJoint: + default: + i = new this.BJSCANNON.PointToPointConstraint(t, o.pivotA, n, o.pivotB, o.maxForce); + } + (i.collideConnected = !!r.collision), + (e.joint.physicsJoint = i), + e.joint.type !== gi.SpringJoint + ? this.world.addConstraint(i) + : ((e.joint.jointData.forceApplicationCallback = + e.joint.jointData.forceApplicationCallback || + function () { + i.applyForce(); + }), + e.mainImpostor.registerAfterPhysicsStep(e.joint.jointData.forceApplicationCallback)); + } + }), + (e.prototype.removeJoint = function (e) { + e.joint.type !== gi.SpringJoint ? this.world.removeConstraint(e.joint.physicsJoint) : e.mainImpostor.unregisterAfterPhysicsStep(e.joint.jointData.forceApplicationCallback); + }), + (e.prototype._addMaterial = function (e, t, n) { + var i, r; + for (i = 0; i < this._physicsMaterials.length; i++) if ((r = this._physicsMaterials[i]).friction === t && r.restitution === n) return r; + var o = new this.BJSCANNON.Material(e); + return (o.friction = t), (o.restitution = n), this._physicsMaterials.push(o), o; + }), + (e.prototype._checkWithEpsilon = function (e) { + return e < Aa.Epsilon ? Aa.Epsilon : e; + }), + (e.prototype._createShape = function (e) { + var t, + n = e.object, + i = e.getObjectExtendSize(); + switch (e.type) { + case Ci.SphereImpostor: + var r = i.x, + o = i.y, + s = i.z; + t = new this.BJSCANNON.Sphere(Math.max(this._checkWithEpsilon(r), this._checkWithEpsilon(o), this._checkWithEpsilon(s)) / 2); + break; + case Ci.CylinderImpostor: + var c = e.getParam("nativeOptions"); + c || (c = {}); + var l = void 0 !== c.radiusTop ? c.radiusTop : this._checkWithEpsilon(i.x) / 2, + u = void 0 !== c.radiusBottom ? c.radiusBottom : this._checkWithEpsilon(i.x) / 2, + h = void 0 !== c.height ? c.height : this._checkWithEpsilon(i.y), + d = void 0 !== c.numSegments ? c.numSegments : 16; + t = new this.BJSCANNON.Cylinder(l, u, h, d); + var p = new this.BJSCANNON.Quaternion(); + p.setFromAxisAngle(new this.BJSCANNON.Vec3(1, 0, 0), -Math.PI / 2); + var f = new this.BJSCANNON.Vec3(0, 0, 0); + t.transformAllPoints(f, p); + break; + case Ci.BoxImpostor: + var m = i.scale(0.5); + t = new this.BJSCANNON.Box(new this.BJSCANNON.Vec3(this._checkWithEpsilon(m.x), this._checkWithEpsilon(m.y), this._checkWithEpsilon(m.z))); + break; + case Ci.PlaneImpostor: + g.a.Warn("Attention, PlaneImposter might not behave as you expect. Consider using BoxImposter instead"), (t = new this.BJSCANNON.Plane()); + break; + case Ci.MeshImpostor: + var b = n.getVerticesData ? n.getVerticesData(wn.b.PositionKind) : [], + _ = n.getIndices ? n.getIndices() : []; + if (!b) return; + var v = n.position.clone(), + y = n.rotation && n.rotation.clone(), + C = n.rotationQuaternion && n.rotationQuaternion.clone(); + n.position.copyFromFloats(0, 0, 0), + n.rotation && n.rotation.copyFromFloats(0, 0, 0), + n.rotationQuaternion && n.rotationQuaternion.copyFrom(e.getParentsRotation()), + n.rotationQuaternion && n.parent && n.rotationQuaternion.conjugateInPlace(); + var P, + x = n.computeWorldMatrix(!0), + T = new Array(); + for (P = 0; P < b.length; P += 3) a.e.TransformCoordinates(a.e.FromArray(b, P), x).toArray(T, P); + g.a.Warn("MeshImpostor only collides against spheres."), + (t = new this.BJSCANNON.Trimesh(T, _)), + n.position.copyFrom(v), + y && n.rotation && n.rotation.copyFrom(y), + C && n.rotationQuaternion && n.rotationQuaternion.copyFrom(C); + break; + case Ci.HeightmapImpostor: + var S = n.position.clone(), + O = n.rotation && n.rotation.clone(), + E = n.rotationQuaternion && n.rotationQuaternion.clone(); + n.position.copyFromFloats(0, 0, 0), + n.rotation && n.rotation.copyFromFloats(0, 0, 0), + n.rotationQuaternion && n.rotationQuaternion.copyFrom(e.getParentsRotation()), + n.rotationQuaternion && n.parent && n.rotationQuaternion.conjugateInPlace(), + n.rotationQuaternion && n.rotationQuaternion.multiplyInPlace(this._minus90X), + (t = this._createHeightmap(n)), + n.position.copyFrom(S), + O && n.rotation && n.rotation.copyFrom(O), + E && n.rotationQuaternion && n.rotationQuaternion.copyFrom(E), + n.computeWorldMatrix(!0); + break; + case Ci.ParticleImpostor: + t = new this.BJSCANNON.Particle(); + break; + case Ci.NoImpostor: + t = new this.BJSCANNON.Box(new this.BJSCANNON.Vec3(0, 0, 0)); + } + return t; + }), + (e.prototype._createHeightmap = function (e, t) { + var n, + i = e.getVerticesData(wn.b.PositionKind), + r = e.computeWorldMatrix(!0), + o = new Array(); + for (n = 0; n < i.length; n += 3) a.e.TransformCoordinates(a.e.FromArray(i, n), r).toArray(o, n); + i = o; + for ( + var s = new Array(), + c = t || ~~(Math.sqrt(i.length / 3) - 1), + l = e.getBoundingInfo(), + u = Math.min(l.boundingBox.extendSizeWorld.x, l.boundingBox.extendSizeWorld.y), + h = l.boundingBox.extendSizeWorld.z, + d = (2 * u) / c, + p = 0; + p < i.length; + p += 3 + ) { + var f = Math.round(i[p + 0] / d + c / 2), + m = Math.round(-1 * (i[p + 1] / d - c / 2)), + g = -i[p + 2] + h; + s[f] || (s[f] = []), s[f][m] || (s[f][m] = g), (s[f][m] = Math.max(g, s[f][m])); + } + for (f = 0; f <= c; ++f) { + if (!s[f]) { + for (var b = 1; !s[(f + b) % c]; ) b++; + s[f] = s[(f + b) % c].slice(); + } + for (m = 0; m <= c; ++m) + if (!s[f][m]) { + var _; + for (b = 1; void 0 === _; ) _ = s[f][(m + b++) % c]; + s[f][m] = _; + } + } + var v = new this.BJSCANNON.Heightfield(s, { elementSize: d }); + return (v.minY = h), v; + }), + (e.prototype._updatePhysicsBodyTransformation = function (e) { + var t = e.object; + if ((t.computeWorldMatrix && t.computeWorldMatrix(!0), t.getBoundingInfo())) { + var n = e.getObjectCenter(); + this._tmpDeltaPosition.copyFrom(t.getAbsolutePivotPoint().subtract(n)), this._tmpDeltaPosition.divideInPlace(e.object.scaling), this._tmpPosition.copyFrom(n); + var i = t.rotationQuaternion; + if (i) { + if (((e.type !== Ci.PlaneImpostor && e.type !== Ci.HeightmapImpostor) || ((i = i.multiply(this._minus90X)), e.setDeltaRotation(this._plus90X)), e.type === Ci.HeightmapImpostor)) { + var r = t, + o = r.getBoundingInfo(), + s = r.rotationQuaternion; + (r.rotationQuaternion = this._tmpUnityRotation), r.computeWorldMatrix(!0); + var c = n.clone(), + l = r.getPivotMatrix(); + l = l ? l.clone() : a.a.Identity(); + var u = a.a.Translation(o.boundingBox.extendSizeWorld.x, 0, -o.boundingBox.extendSizeWorld.z); + r.setPreTransformMatrix(u), r.computeWorldMatrix(!0); + var h = o.boundingBox.centerWorld.subtract(n).subtract(r.position).negate(); + this._tmpPosition.copyFromFloats(h.x, h.y - o.boundingBox.extendSizeWorld.y, h.z), + this._tmpDeltaPosition.copyFrom(o.boundingBox.centerWorld.subtract(c)), + (this._tmpDeltaPosition.y += o.boundingBox.extendSizeWorld.y), + (r.rotationQuaternion = s), + r.setPreTransformMatrix(l), + r.computeWorldMatrix(!0); + } else e.type === Ci.MeshImpostor && this._tmpDeltaPosition.copyFromFloats(0, 0, 0); + e.setDeltaPosition(this._tmpDeltaPosition), e.physicsBody.position.copy(this._tmpPosition), e.physicsBody.quaternion.copy(i); + } + } + }), + (e.prototype.setTransformationFromPhysicsBody = function (e) { + e.object.position.copyFrom(e.physicsBody.position), e.object.rotationQuaternion && e.object.rotationQuaternion.copyFrom(e.physicsBody.quaternion); + }), + (e.prototype.setPhysicsBodyTransformation = function (e, t, n) { + e.physicsBody.position.copy(t), e.physicsBody.quaternion.copy(n); + }), + (e.prototype.isSupported = function () { + return void 0 !== this.BJSCANNON; + }), + (e.prototype.setLinearVelocity = function (e, t) { + e.physicsBody.velocity.copy(t); + }), + (e.prototype.setAngularVelocity = function (e, t) { + e.physicsBody.angularVelocity.copy(t); + }), + (e.prototype.getLinearVelocity = function (e) { + var t = e.physicsBody.velocity; + return t ? new a.e(t.x, t.y, t.z) : null; + }), + (e.prototype.getAngularVelocity = function (e) { + var t = e.physicsBody.angularVelocity; + return t ? new a.e(t.x, t.y, t.z) : null; + }), + (e.prototype.setBodyMass = function (e, t) { + (e.physicsBody.mass = t), e.physicsBody.updateMassProperties(); + }), + (e.prototype.getBodyMass = function (e) { + return e.physicsBody.mass; + }), + (e.prototype.getBodyFriction = function (e) { + return e.physicsBody.material.friction; + }), + (e.prototype.setBodyFriction = function (e, t) { + e.physicsBody.material.friction = t; + }), + (e.prototype.getBodyRestitution = function (e) { + return e.physicsBody.material.restitution; + }), + (e.prototype.setBodyRestitution = function (e, t) { + e.physicsBody.material.restitution = t; + }), + (e.prototype.sleepBody = function (e) { + e.physicsBody.sleep(); + }), + (e.prototype.wakeUpBody = function (e) { + e.physicsBody.wakeUp(); + }), + (e.prototype.updateDistanceJoint = function (e, t) { + e.physicsJoint.distance = t; + }), + (e.prototype.setMotor = function (e, t, n, i) { + i || (e.physicsJoint.enableMotor(), e.physicsJoint.setMotorSpeed(t), n && this.setLimit(e, n)); + }), + (e.prototype.setLimit = function (e, t, n) { + (e.physicsJoint.motorEquation.maxForce = t), (e.physicsJoint.motorEquation.minForce = void 0 === n ? -t : n); + }), + (e.prototype.syncMeshWithImpostor = function (e, t) { + var n = t.physicsBody; + (e.position.x = n.position.x), + (e.position.y = n.position.y), + (e.position.z = n.position.z), + e.rotationQuaternion && ((e.rotationQuaternion.x = n.quaternion.x), (e.rotationQuaternion.y = n.quaternion.y), (e.rotationQuaternion.z = n.quaternion.z), (e.rotationQuaternion.w = n.quaternion.w)); + }), + (e.prototype.getRadius = function (e) { + return e.physicsBody.shapes[0].boundingSphereRadius; + }), + (e.prototype.getBoxSizeToRef = function (e, t) { + var n = e.physicsBody.shapes[0]; + (t.x = 2 * n.halfExtents.x), (t.y = 2 * n.halfExtents.y), (t.z = 2 * n.halfExtents.z); + }), + (e.prototype.dispose = function () {}), + (e.prototype._extendNamespace = function () { + var e = new this.BJSCANNON.Vec3(), + t = this.BJSCANNON; + this.BJSCANNON.World.prototype.step = function (n, i, r) { + if (((r = r || 10), 0 === (i = i || 0))) this.internalStep(n), (this.time += n); + else { + var o = Math.floor((this.time + i) / n) - Math.floor(this.time / n); + o = Math.min(o, r) || 1; + for (var a = performance.now(), s = 0; s !== o && (this.internalStep(n), !(performance.now() - a > 1e3 * n)); s++); + this.time += i; + for (var c = (this.time % n) / n, l = e, u = this.bodies, h = 0; h !== u.length; h++) { + var d = u[h]; + d.type !== t.Body.STATIC && d.sleepState !== t.Body.SLEEPING + ? (d.position.vsub(d.previousPosition, l), l.scale(c, l), d.position.vadd(l, d.interpolatedPosition)) + : (d.interpolatedPosition.copy(d.position), d.interpolatedQuaternion.copy(d.quaternion)); + } + } + }; + }), + (e.prototype.raycast = function (e, t) { + return ( + this._cannonRaycastResult.reset(), + this.world.raycastClosest(e, t, {}, this._cannonRaycastResult), + this._raycastResult.reset(e, t), + this._cannonRaycastResult.hasHit && + (this._raycastResult.setHitData( + { x: this._cannonRaycastResult.hitNormalWorld.x, y: this._cannonRaycastResult.hitNormalWorld.y, z: this._cannonRaycastResult.hitNormalWorld.z }, + { x: this._cannonRaycastResult.hitPointWorld.x, y: this._cannonRaycastResult.hitPointWorld.y, z: this._cannonRaycastResult.hitPointWorld.z } + ), + this._raycastResult.setHitDistance(this._cannonRaycastResult.distance)), + this._raycastResult + ); + }), + e + ); + })(); + Aa.DefaultPluginFactory = function () { + return new Da(); + }; + var Ra = (function () { + function e(e, t) { + void 0 === t && (t = OIMO), + (this.name = "OimoJSPlugin"), + (this._tmpImpostorsArray = []), + (this._tmpPositionVector = a.e.Zero()), + (this.BJSOIMO = t), + (this.world = new this.BJSOIMO.World({ iterations: e })), + this.world.clear(), + (this._raycastResult = new Ia()); + } + return ( + (e.prototype.setGravity = function (e) { + this.world.gravity.copy(e); + }), + (e.prototype.setTimeStep = function (e) { + this.world.timeStep = e; + }), + (e.prototype.getTimeStep = function () { + return this.world.timeStep; + }), + (e.prototype.executeStep = function (e, t) { + var n = this; + t.forEach(function (e) { + e.beforeStep(); + }), + this.world.step(), + t.forEach(function (e) { + e.afterStep(), (n._tmpImpostorsArray[e.uniqueId] = e); + }); + for (var i = this.world.contacts; null !== i; ) + if (!i.touching || i.body1.sleeping || i.body2.sleeping) { + var r = this._tmpImpostorsArray[+i.body1.name], + o = this._tmpImpostorsArray[+i.body2.name]; + r && o ? (r.onCollide({ body: o.physicsBody }), o.onCollide({ body: r.physicsBody }), (i = i.next)) : (i = i.next); + } else i = i.next; + }), + (e.prototype.applyImpulse = function (e, t, n) { + var i = e.physicsBody.mass; + e.physicsBody.applyImpulse(n.scale(this.world.invScale), t.scale(this.world.invScale * i)); + }), + (e.prototype.applyForce = function (e, t, n) { + g.a.Warn("Oimo doesn't support applying force. Using impule instead."), this.applyImpulse(e, t, n); + }), + (e.prototype.generatePhysicsBody = function (e) { + var t = this; + if (e.parent) e.physicsBody && (this.removePhysicsBody(e), e.forceUpdate()); + else { + if (e.isBodyInitRequired()) { + var n = { + name: e.uniqueId, + config: [e.getParam("mass") || 0.001, e.getParam("friction"), e.getParam("restitution")], + size: [], + type: [], + pos: [], + posShape: [], + rot: [], + rotShape: [], + move: 0 !== e.getParam("mass"), + density: e.getParam("mass"), + friction: e.getParam("friction"), + restitution: e.getParam("restitution"), + world: this.world, + }, + i = [e]; + (s = e.object).getChildMeshes && + s.getChildMeshes().forEach(function (e) { + e.physicsImpostor && i.push(e.physicsImpostor); + }); + var r = function (e) { + return Math.max(e, Aa.Epsilon); + }, + o = new a.b(); + i.forEach(function (i) { + if (i.object.rotationQuaternion) { + var a = i.object.rotationQuaternion; + (o = a.clone()), i.object.rotationQuaternion.set(0, 0, 0, 1), i.object.computeWorldMatrix(!0); + var s = a.toEulerAngles(), + c = i.getObjectExtendSize(); + if (i === e) { + var l = e.getObjectCenter(); + e.object.getAbsolutePivotPoint().subtractToRef(l, t._tmpPositionVector), + t._tmpPositionVector.divideInPlace(e.object.scaling), + n.pos.push(l.x), + n.pos.push(l.y), + n.pos.push(l.z), + n.posShape.push(0, 0, 0), + n.rotShape.push(0, 0, 0); + } else { + var u = i.object.position.clone(); + n.posShape.push(u.x), n.posShape.push(u.y), n.posShape.push(u.z), n.rotShape.push(57.29577951308232 * s.x), n.rotShape.push(57.29577951308232 * s.y), n.rotShape.push(57.29577951308232 * s.z); + } + switch ((i.object.rotationQuaternion.copyFrom(o), i.type)) { + case Ci.ParticleImpostor: + g.a.Warn("No Particle support in OIMO.js. using SphereImpostor instead"); + case Ci.SphereImpostor: + var h = c.x, + d = c.y, + p = c.z, + f = Math.max(r(h), r(d), r(p)) / 2; + n.type.push("sphere"), n.size.push(f), n.size.push(f), n.size.push(f); + break; + case Ci.CylinderImpostor: + var m = r(c.x) / 2, + b = r(c.y); + n.type.push("cylinder"), n.size.push(m), n.size.push(b), n.size.push(b); + break; + case Ci.PlaneImpostor: + case Ci.BoxImpostor: + default: + (m = r(c.x)), (b = r(c.y)); + var _ = r(c.z); + n.type.push("box"), n.size.push(m), n.size.push(b), n.size.push(_); + } + i.object.rotationQuaternion = a; + } + }), + (e.physicsBody = this.world.add(n)), + e.physicsBody.resetQuaternion(o), + e.physicsBody.updatePosition(0); + } else this._tmpPositionVector.copyFromFloats(0, 0, 0); + var s; + e.setDeltaPosition(this._tmpPositionVector); + } + }), + (e.prototype.removePhysicsBody = function (e) { + this.world.removeRigidBody(e.physicsBody); + }), + (e.prototype.generateJoint = function (e) { + var t = e.mainImpostor.physicsBody, + n = e.connectedImpostor.physicsBody; + if (t && n) { + var i, + r = e.joint.jointData, + o = r.nativeParams || {}, + a = { + body1: t, + body2: n, + axe1: o.axe1 || (r.mainAxis ? r.mainAxis.asArray() : null), + axe2: o.axe2 || (r.connectedAxis ? r.connectedAxis.asArray() : null), + pos1: o.pos1 || (r.mainPivot ? r.mainPivot.asArray() : null), + pos2: o.pos2 || (r.connectedPivot ? r.connectedPivot.asArray() : null), + min: o.min, + max: o.max, + collision: o.collision || r.collision, + spring: o.spring, + world: this.world, + }; + switch (e.joint.type) { + case gi.BallAndSocketJoint: + i = "jointBall"; + break; + case gi.SpringJoint: + g.a.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead"); + var s = r; + (a.min = s.length || a.min), (a.max = Math.max(a.min, a.max)); + case gi.DistanceJoint: + (i = "jointDistance"), (a.max = r.maxDistance); + break; + case gi.PrismaticJoint: + i = "jointPrisme"; + break; + case gi.SliderJoint: + i = "jointSlide"; + break; + case gi.WheelJoint: + i = "jointWheel"; + break; + case gi.HingeJoint: + default: + i = "jointHinge"; + } + (a.type = i), (e.joint.physicsJoint = this.world.add(a)); + } + }), + (e.prototype.removeJoint = function (e) { + try { + this.world.removeJoint(e.joint.physicsJoint); + } catch (e) { + g.a.Warn(e); + } + }), + (e.prototype.isSupported = function () { + return void 0 !== this.BJSOIMO; + }), + (e.prototype.setTransformationFromPhysicsBody = function (e) { + if (!e.physicsBody.sleeping) { + if (e.physicsBody.shapes.next) { + for (var t = e.physicsBody.shapes; t.next; ) t = t.next; + e.object.position.copyFrom(t.position); + } else e.object.position.copyFrom(e.physicsBody.getPosition()); + e.object.rotationQuaternion && e.object.rotationQuaternion.copyFrom(e.physicsBody.getQuaternion()); + } + }), + (e.prototype.setPhysicsBodyTransformation = function (e, t, n) { + var i = e.physicsBody; + e.physicsBody.shapes.next || (i.position.copy(t), i.orientation.copy(n), i.syncShapes(), i.awake()); + }), + (e.prototype.setLinearVelocity = function (e, t) { + e.physicsBody.linearVelocity.copy(t); + }), + (e.prototype.setAngularVelocity = function (e, t) { + e.physicsBody.angularVelocity.copy(t); + }), + (e.prototype.getLinearVelocity = function (e) { + var t = e.physicsBody.linearVelocity; + return t ? new a.e(t.x, t.y, t.z) : null; + }), + (e.prototype.getAngularVelocity = function (e) { + var t = e.physicsBody.angularVelocity; + return t ? new a.e(t.x, t.y, t.z) : null; + }), + (e.prototype.setBodyMass = function (e, t) { + var n = 0 === t; + (e.physicsBody.shapes.density = n ? 1 : t), e.physicsBody.setupMass(n ? 2 : 1); + }), + (e.prototype.getBodyMass = function (e) { + return e.physicsBody.shapes.density; + }), + (e.prototype.getBodyFriction = function (e) { + return e.physicsBody.shapes.friction; + }), + (e.prototype.setBodyFriction = function (e, t) { + e.physicsBody.shapes.friction = t; + }), + (e.prototype.getBodyRestitution = function (e) { + return e.physicsBody.shapes.restitution; + }), + (e.prototype.setBodyRestitution = function (e, t) { + e.physicsBody.shapes.restitution = t; + }), + (e.prototype.sleepBody = function (e) { + e.physicsBody.sleep(); + }), + (e.prototype.wakeUpBody = function (e) { + e.physicsBody.awake(); + }), + (e.prototype.updateDistanceJoint = function (e, t, n) { + (e.physicsJoint.limitMotor.upperLimit = t), void 0 !== n && (e.physicsJoint.limitMotor.lowerLimit = n); + }), + (e.prototype.setMotor = function (e, t, n, i) { + void 0 !== n ? g.a.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter") : (n = 1e6), (t *= -1); + var r = i ? e.physicsJoint.rotationalLimitMotor2 : e.physicsJoint.rotationalLimitMotor1 || e.physicsJoint.rotationalLimitMotor || e.physicsJoint.limitMotor; + r && r.setMotor(t, n); + }), + (e.prototype.setLimit = function (e, t, n, i) { + var r = i ? e.physicsJoint.rotationalLimitMotor2 : e.physicsJoint.rotationalLimitMotor1 || e.physicsJoint.rotationalLimitMotor || e.physicsJoint.limitMotor; + r && r.setLimit(t, void 0 === n ? -t : n); + }), + (e.prototype.syncMeshWithImpostor = function (e, t) { + var n = t.physicsBody; + (e.position.x = n.position.x), + (e.position.y = n.position.y), + (e.position.z = n.position.z), + e.rotationQuaternion && ((e.rotationQuaternion.x = n.orientation.x), (e.rotationQuaternion.y = n.orientation.y), (e.rotationQuaternion.z = n.orientation.z), (e.rotationQuaternion.w = n.orientation.s)); + }), + (e.prototype.getRadius = function (e) { + return e.physicsBody.shapes.radius; + }), + (e.prototype.getBoxSizeToRef = function (e, t) { + var n = e.physicsBody.shapes; + (t.x = 2 * n.halfWidth), (t.y = 2 * n.halfHeight), (t.z = 2 * n.halfDepth); + }), + (e.prototype.dispose = function () { + this.world.clear(); + }), + (e.prototype.raycast = function (e, t) { + return g.a.Warn("raycast is not currently supported by the Oimo physics plugin"), this._raycastResult.reset(e, t), this._raycastResult; + }), + e + ); + })(); + (Rn.a.CreateRibbon = function (e) { + var t = e.pathArray, + n = e.closeArray || !1, + i = e.closePath || !1, + r = e.invertUV || !1, + o = Math.floor(t[0].length / 2), + a = e.offset || o; + a = a > o ? o : Math.floor(a); + var s, + c, + l, + u, + h = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + d = e.uvs, + p = e.colors, + f = [], + m = [], + g = [], + b = [], + _ = [], + v = [], + y = [], + C = [], + P = [], + x = []; + if (t.length < 2) { + var T = [], + S = []; + for (l = 0; l < t[0].length - a; l++) T.push(t[0][l]), S.push(t[0][l + a]); + t = [T, S]; + } + var O, + E, + M, + A, + I, + D = 0, + R = i ? 1 : 0; + for (s = t[0].length, c = 0; c < t.length; c++) { + for (y[c] = 0, _[c] = [0], s = s < (E = (O = t[c]).length) ? s : E, u = 0; u < E; ) f.push(O[u].x, O[u].y, O[u].z), u > 0 && ((M = O[u].subtract(O[u - 1]).length() + y[c]), _[c].push(M), (y[c] = M)), u++; + i && (u--, f.push(O[0].x, O[0].y, O[0].z), (M = O[u].subtract(O[0]).length() + y[c]), _[c].push(M), (y[c] = M)), (P[c] = E + R), (x[c] = D), (D += E + R); + } + var w, + L, + F = null, + N = null; + for (l = 0; l < s + R; l++) { + for (C[l] = 0, v[l] = [0], c = 0; c < t.length - 1; c++) (A = t[c]), (I = t[c + 1]), l === s ? ((F = A[0]), (N = I[0])) : ((F = A[l]), (N = I[l])), (M = N.subtract(F).length() + C[l]), v[l].push(M), (C[l] = M); + n && N && F && ((A = t[c]), (I = t[0]), l === s && (N = I[0]), (M = N.subtract(F).length() + C[l]), (C[l] = M)); + } + if (d) for (c = 0; c < d.length; c++) b.push(d[c].x, d[c].y); + else for (c = 0; c < t.length; c++) for (l = 0; l < s + R; l++) (w = 0 != y[c] ? _[c][l] / y[c] : 0), (L = 0 != C[l] ? v[l][c] / C[l] : 0), r ? b.push(L, w) : b.push(w, L); + for (var k = 0, z = P[(c = 0)] - 1, j = P[c + 1] - 1, B = z < j ? z : j, V = x[1] - x[0], G = n ? P.length : P.length - 1; k <= B && c < G; ) + m.push(k, k + V, k + 1), + m.push(k + V + 1, k + 1, k + V), + (k += 1) === B && (++c === P.length - 1 ? ((V = x[0] - x[c]), (z = P[c] - 1), (j = P[0] - 1)) : ((V = x[c + 1] - x[c]), (z = P[c] - 1), (j = P[c + 1] - 1)), (k = x[c]), (B = z < j ? z + k : j + k)); + if ((Rn.a.ComputeNormals(f, m, g), i)) { + var U = 0, + H = 0; + for (c = 0; c < t.length; c++) + (U = 3 * x[c]), + (H = c + 1 < t.length ? 3 * (x[c + 1] - 1) : g.length - 3), + (g[U] = 0.5 * (g[U] + g[H])), + (g[U + 1] = 0.5 * (g[U + 1] + g[H + 1])), + (g[U + 2] = 0.5 * (g[U + 2] + g[H + 2])), + (g[H] = g[U]), + (g[H + 1] = g[U + 1]), + (g[H + 2] = g[U + 2]); + } + Rn.a._ComputeSides(h, f, m, g, b, e.frontUVs, e.backUVs); + var W = null; + if (p) { + W = new Float32Array(4 * p.length); + for (var X = 0; X < p.length; X++) (W[4 * X] = p[X].r), (W[4 * X + 1] = p[X].g), (W[4 * X + 2] = p[X].b), (W[4 * X + 3] = p[X].a); + } + var Y = new Rn.a(), + K = new Float32Array(f), + Z = new Float32Array(g), + q = new Float32Array(b); + return (Y.indices = m), (Y.positions = K), (Y.normals = Z), (Y.uvs = q), W && Y.set(W, wn.b.ColorKind), i && (Y._idx = x), Y; + }), + (Ee.a.CreateRibbon = function (e, t, n, i, r, o, a, s, c) { + return void 0 === n && (n = !1), void 0 === a && (a = !1), wa.CreateRibbon(e, { pathArray: t, closeArray: n, closePath: i, offset: r, updatable: a, sideOrientation: s, instance: c }, o); + }); + var wa = (function () { + function e() {} + return ( + (e.CreateRibbon = function (e, t, n) { + void 0 === n && (n = null); + var i = t.pathArray, + r = t.closeArray, + o = t.closePath, + s = Ee.a._GetDefaultSideOrientation(t.sideOrientation), + c = t.instance, + l = t.updatable; + if (c) { + var u = a.c.Vector3[0].setAll(Number.MAX_VALUE), + h = a.c.Vector3[1].setAll(-Number.MAX_VALUE), + d = c.getVerticesData(wn.b.PositionKind); + if ( + ((function (e) { + for (var t = i[0].length, n = c, r = 0, o = n._originalBuilderSideOrientation === Ee.a.DOUBLESIDE ? 2 : 1, a = 1; a <= o; ++a) + for (var s = 0; s < i.length; ++s) { + var l = i[s], + d = l.length; + t = t < d ? t : d; + for (var p = 0; p < t; ++p) { + var f = l[p]; + (e[r] = f.x), (e[r + 1] = f.y), (e[r + 2] = f.z), u.minimizeInPlaceFromFloats(f.x, f.y, f.z), h.maximizeInPlaceFromFloats(f.x, f.y, f.z), (r += 3); + } + if (n._creationDataStorage && n._creationDataStorage.closePath) { + f = l[0]; + (e[r] = f.x), (e[r + 1] = f.y), (e[r + 2] = f.z), (r += 3); + } + } + })(d), + c._boundingInfo ? c._boundingInfo.reConstruct(u, h, c._worldMatrix) : (c._boundingInfo = new ti.a(u, h, c._worldMatrix)), + c.updateVerticesData(wn.b.PositionKind, d, !1, !1), + t.colors) + ) { + for (var p = c.getVerticesData(wn.b.ColorKind), f = 0, m = 0; f < t.colors.length; f++, m += 4) { + var g = t.colors[f]; + (p[m] = g.r), (p[m + 1] = g.g), (p[m + 2] = g.b), (p[m + 3] = g.a); + } + c.updateVerticesData(wn.b.ColorKind, p, !1, !1); + } + if (t.uvs) { + for (var b = c.getVerticesData(wn.b.UVKind), _ = 0; _ < t.uvs.length; _++) (b[2 * _] = t.uvs[_].x), (b[2 * _ + 1] = t.uvs[_].y); + c.updateVerticesData(wn.b.UVKind, b, !1, !1); + } + if (!c.areNormalsFrozen || c.isFacetDataEnabled) { + var v = c.getIndices(), + y = c.getVerticesData(wn.b.NormalKind), + C = c.isFacetDataEnabled ? c.getFacetDataParameters() : null; + if ((Rn.a.ComputeNormals(d, v, y, C), c._creationDataStorage && c._creationDataStorage.closePath)) + for (var P = 0, x = 0, T = 0; T < i.length; T++) + (P = 3 * c._creationDataStorage.idx[T]), + (x = T + 1 < i.length ? 3 * (c._creationDataStorage.idx[T + 1] - 1) : y.length - 3), + (y[P] = 0.5 * (y[P] + y[x])), + (y[P + 1] = 0.5 * (y[P + 1] + y[x + 1])), + (y[P + 2] = 0.5 * (y[P + 2] + y[x + 2])), + (y[x] = y[P]), + (y[x + 1] = y[P + 1]), + (y[x + 2] = y[P + 2]); + c.areNormalsFrozen || c.updateVerticesData(wn.b.NormalKind, y, !1, !1); + } + return c; + } + var S = new Ee.a(e, n); + (S._originalBuilderSideOrientation = s), (S._creationDataStorage = new Ee.b()); + var O = Rn.a.CreateRibbon(t); + return o && (S._creationDataStorage.idx = O._idx), (S._creationDataStorage.closePath = o), (S._creationDataStorage.closeArray = r), O.applyToMesh(S, l), S; + }), + e + ); + })(); + (Ee.a.ExtrudeShape = function (e, t, n, i, r, o, a, s, c, l) { + void 0 === a && (a = null); + var u = { shape: t, path: n, scale: i, rotation: r, cap: 0 === o ? 0 : o || Ee.a.NO_CAP, sideOrientation: c, instance: l, updatable: s }; + return La.ExtrudeShape(e, u, a); + }), + (Ee.a.ExtrudeShapeCustom = function (e, t, n, i, r, o, a, s, c, l, u, h) { + var d = { shape: t, path: n, scaleFunction: i, rotationFunction: r, ribbonCloseArray: o, ribbonClosePath: a, cap: 0 === s ? 0 : s || Ee.a.NO_CAP, sideOrientation: u, instance: h, updatable: l }; + return La.ExtrudeShapeCustom(e, d, c); + }); + var La = (function () { + function e() {} + return ( + (e.ExtrudeShape = function (t, n, i) { + void 0 === i && (i = null); + var r = n.path, + o = n.shape, + a = n.scale || 1, + s = n.rotation || 0, + c = 0 === n.cap ? 0 : n.cap || Ee.a.NO_CAP, + l = n.updatable, + u = Ee.a._GetDefaultSideOrientation(n.sideOrientation), + h = n.instance || null, + d = n.invertUV || !1; + return e._ExtrudeShapeGeneric(t, o, r, a, s, null, null, !1, !1, c, !1, i, !!l, u, h, d, n.frontUVs || null, n.backUVs || null); + }), + (e.ExtrudeShapeCustom = function (t, n, i) { + void 0 === i && (i = null); + var r = n.path, + o = n.shape, + a = + n.scaleFunction || + function () { + return 1; + }, + s = + n.rotationFunction || + function () { + return 0; + }, + c = n.ribbonCloseArray || !1, + l = n.ribbonClosePath || !1, + u = 0 === n.cap ? 0 : n.cap || Ee.a.NO_CAP, + h = n.updatable, + d = Ee.a._GetDefaultSideOrientation(n.sideOrientation), + p = n.instance, + f = n.invertUV || !1; + return e._ExtrudeShapeGeneric(t, o, r, null, null, a, s, c, l, u, !0, i, !!h, d, p || null, f, n.frontUVs || null, n.backUVs || null); + }), + (e._ExtrudeShapeGeneric = function (e, t, n, i, r, o, s, c, l, u, h, d, p, f, m, g, b, _) { + var v, + y, + C = function (e, t, n, i, r, o, s, c, l, u) { + for ( + var h = n.getTangents(), + d = n.getNormals(), + p = n.getBinormals(), + f = n.getDistances(), + m = 0, + g = + u && c + ? c + : function () { + return null !== o ? o : 0; + }, + b = + u && s + ? s + : function () { + return null !== r ? r : 1; + }, + _ = l === Ee.a.NO_CAP || l === Ee.a.CAP_END ? 0 : 2, + v = a.c.Matrix[0], + y = 0; + y < t.length; + y++ + ) { + for (var C = new Array(), P = g(y, f[y]), x = b(y, f[y]), T = 0; T < e.length; T++) { + a.a.RotationAxisToRef(h[y], m, v); + var S = h[y].scale(e[T].z).add(d[y].scale(e[T].x)).add(p[y].scale(e[T].y)), + O = C[T] ? C[T] : a.e.Zero(); + a.e.TransformCoordinatesToRef(S, v, O), O.scaleInPlace(x).addInPlace(t[y]), (C[T] = O); + } + (i[_] = C), (m += P), _++; + } + var E = function (e) { + var t, + n = Array(), + i = a.e.Zero(); + for (t = 0; t < e.length; t++) i.addInPlace(e[t]); + for (i.scaleInPlace(1 / e.length), t = 0; t < e.length; t++) n.push(i); + return n; + }; + switch (l) { + case Ee.a.NO_CAP: + break; + case Ee.a.CAP_START: + (i[0] = E(i[2])), (i[1] = i[2]); + break; + case Ee.a.CAP_END: + (i[_] = i[_ - 1]), (i[_ + 1] = E(i[_ - 1])); + break; + case Ee.a.CAP_ALL: + (i[0] = E(i[2])), (i[1] = i[2]), (i[_] = i[_ - 1]), (i[_ + 1] = E(i[_ - 1])); + } + return i; + }; + if (m) { + var P = m._creationDataStorage; + return (v = P.path3D.update(n)), (y = C(t, n, P.path3D, P.pathArray, i, r, o, s, P.cap, h)), (m = Ee.a.CreateRibbon("", y, !1, !1, 0, d || void 0, !1, 0, m)); + } + y = C(t, n, (v = new H(n)), new Array(), i, r, o, s, (u = u < 0 || u > 3 ? 0 : u), h); + var x = wa.CreateRibbon(e, { pathArray: y, closeArray: c, closePath: l, updatable: p, sideOrientation: f, invertUV: g, frontUVs: b || void 0, backUVs: _ || void 0 }, d); + return (x._creationDataStorage.pathArray = y), (x._creationDataStorage.path3D = v), (x._creationDataStorage.cap = u), x; + }), + e + ); + })(), + Fa = (function () { + function e(e, t, n) { + var i = this; + void 0 === e && (e = !0), + void 0 === t && (t = Ammo), + void 0 === n && (n = null), + (this._useDeltaForWorldStep = e), + (this.bjsAMMO = {}), + (this.name = "AmmoJSPlugin"), + (this._timeStep = 1 / 60), + (this._fixedTimeStep = 1 / 60), + (this._maxSteps = 5), + (this._tmpQuaternion = new a.b()), + (this._tmpContactCallbackResult = !1), + (this._tmpVector = new a.e()), + (this._tmpMatrix = new a.a()), + "function" == typeof t ? t(this.bjsAMMO) : (this.bjsAMMO = t), + this.isSupported() + ? ((this._collisionConfiguration = new this.bjsAMMO.btSoftBodyRigidBodyCollisionConfiguration()), + (this._dispatcher = new this.bjsAMMO.btCollisionDispatcher(this._collisionConfiguration)), + (this._overlappingPairCache = n || new this.bjsAMMO.btDbvtBroadphase()), + (this._solver = new this.bjsAMMO.btSequentialImpulseConstraintSolver()), + (this._softBodySolver = new this.bjsAMMO.btDefaultSoftBodySolver()), + (this.world = new this.bjsAMMO.btSoftRigidDynamicsWorld(this._dispatcher, this._overlappingPairCache, this._solver, this._collisionConfiguration, this._softBodySolver)), + (this._tmpAmmoConcreteContactResultCallback = new this.bjsAMMO.ConcreteContactResultCallback()), + (this._tmpAmmoConcreteContactResultCallback.addSingleResult = function () { + i._tmpContactCallbackResult = !0; + }), + (this._raycastResult = new Ia()), + (this._tmpAmmoTransform = new this.bjsAMMO.btTransform()), + this._tmpAmmoTransform.setIdentity(), + (this._tmpAmmoQuaternion = new this.bjsAMMO.btQuaternion(0, 0, 0, 1)), + (this._tmpAmmoVectorA = new this.bjsAMMO.btVector3(0, 0, 0)), + (this._tmpAmmoVectorB = new this.bjsAMMO.btVector3(0, 0, 0)), + (this._tmpAmmoVectorC = new this.bjsAMMO.btVector3(0, 0, 0)), + (this._tmpAmmoVectorD = new this.bjsAMMO.btVector3(0, 0, 0))) + : g.a.Error("AmmoJS is not available. Please make sure you included the js file."); + } + return ( + (e.prototype.setGravity = function (e) { + this._tmpAmmoVectorA.setValue(e.x, e.y, e.z), this.world.setGravity(this._tmpAmmoVectorA), this.world.getWorldInfo().set_m_gravity(this._tmpAmmoVectorA); + }), + (e.prototype.setTimeStep = function (e) { + this._timeStep = e; + }), + (e.prototype.setFixedTimeStep = function (e) { + this._fixedTimeStep = e; + }), + (e.prototype.setMaxSteps = function (e) { + this._maxSteps = e; + }), + (e.prototype.getTimeStep = function () { + return this._timeStep; + }), + (e.prototype._isImpostorInContact = function (e) { + return (this._tmpContactCallbackResult = !1), this.world.contactTest(e.physicsBody, this._tmpAmmoConcreteContactResultCallback), this._tmpContactCallbackResult; + }), + (e.prototype._isImpostorPairInContact = function (e, t) { + return (this._tmpContactCallbackResult = !1), this.world.contactPairTest(e.physicsBody, t.physicsBody, this._tmpAmmoConcreteContactResultCallback), this._tmpContactCallbackResult; + }), + (e.prototype._stepSimulation = function (e, t, n) { + if ((void 0 === e && (e = 1 / 60), void 0 === t && (t = 10), void 0 === n && (n = 1 / 60), 0 == t)) this.world.stepSimulation(e, 0); + else for (; t > 0 && e > 0; ) e - n < n ? (this.world.stepSimulation(e, 0), (e = 0)) : ((e -= n), this.world.stepSimulation(n, 0)), t--; + }), + (e.prototype.executeStep = function (e, t) { + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + r.soft || r.beforeStep(); + } + this._stepSimulation(this._useDeltaForWorldStep ? e : this._timeStep, this._maxSteps, this._fixedTimeStep); + for (var o = 0, a = t; o < a.length; o++) { + var s = a[o]; + if ((s.soft ? this._afterSoftStep(s) : s.afterStep(), s._onPhysicsCollideCallbacks.length > 0 && this._isImpostorInContact(s))) + for (var c = 0, l = s._onPhysicsCollideCallbacks; c < l.length; c++) + for (var u = 0, h = l[c].otherImpostors; u < h.length; u++) { + var d = h[u]; + (s.physicsBody.isActive() || d.physicsBody.isActive()) && this._isImpostorPairInContact(s, d) && (s.onCollide({ body: d.physicsBody }), d.onCollide({ body: s.physicsBody })); + } + } + }), + (e.prototype._afterSoftStep = function (e) { + e.type === Ci.RopeImpostor ? this._ropeStep(e) : this._softbodyOrClothStep(e); + }), + (e.prototype._ropeStep = function (e) { + for (var t, n, i, r, o = e.physicsBody.get_m_nodes(), s = o.size(), c = new Array(), l = 0; l < s; l++) (n = (t = o.at(l).get_m_x()).x()), (i = t.y()), (r = t.z()), c.push(new a.e(n, i, r)); + var u = e.object, + h = e.getParam("shape"); + e._isFromLine ? (e.object = Ti.CreateLines("lines", { points: c, instance: u })) : (e.object = La.ExtrudeShape("ext", { shape: h, path: c, instance: u })); + }), + (e.prototype._softbodyOrClothStep = function (e) { + var t = e.type === Ci.ClothImpostor ? 1 : -1, + n = e.object, + i = n.getVerticesData(wn.b.PositionKind); + i || (i = []); + var r = n.getVerticesData(wn.b.NormalKind); + r || (r = []); + for (var o, a, s, c, l, u, h, d, p = i.length / 3, f = e.physicsBody.get_m_nodes(), m = 0; m < p; m++) { + var g; + (s = (a = (o = f.at(m)).get_m_x()).x()), + (c = a.y()), + (l = a.z() * t), + (u = (g = o.get_m_n()).x()), + (h = g.y()), + (d = g.z() * t), + (i[3 * m] = s), + (i[3 * m + 1] = c), + (i[3 * m + 2] = l), + (r[3 * m] = u), + (r[3 * m + 1] = h), + (r[3 * m + 2] = d); + } + var b = new Rn.a(); + (b.positions = i), (b.normals = r), (b.uvs = n.getVerticesData(wn.b.UVKind)), (b.colors = n.getVerticesData(wn.b.ColorKind)), n && n.getIndices && (b.indices = n.getIndices()), b.applyToMesh(n); + }), + (e.prototype.applyImpulse = function (e, t, n) { + if (e.soft) g.a.Warn("Cannot be applied to a soft body"); + else { + e.physicsBody.activate(); + var i = this._tmpAmmoVectorA, + r = this._tmpAmmoVectorB; + e.object && e.object.getWorldMatrix && (e.object.getWorldMatrix().invertToRef(this._tmpMatrix), a.e.TransformCoordinatesToRef(n, this._tmpMatrix, this._tmpVector), (n = this._tmpVector)), + i.setValue(n.x, n.y, n.z), + r.setValue(t.x, t.y, t.z), + e.physicsBody.applyImpulse(r, i); + } + }), + (e.prototype.applyForce = function (e, t, n) { + if (e.soft) g.a.Warn("Cannot be applied to a soft body"); + else { + e.physicsBody.activate(); + var i = this._tmpAmmoVectorA, + r = this._tmpAmmoVectorB; + e.object && e.object.getWorldMatrix && (e.object.getWorldMatrix().invertToRef(this._tmpMatrix), a.e.TransformCoordinatesToRef(n, this._tmpMatrix, this._tmpVector), (n = this._tmpVector)), + i.setValue(n.x, n.y, n.z), + r.setValue(t.x, t.y, t.z), + e.physicsBody.applyForce(r, i); + } + }), + (e.prototype.generatePhysicsBody = function (t) { + if (((t._pluginData.toDispose = []), t.parent)) t.physicsBody && (this.removePhysicsBody(t), t.forceUpdate()); + else if (t.isBodyInitRequired()) { + var n = this._createShape(t), + i = t.getParam("mass"); + if (((t._pluginData.mass = i), t.soft)) + n.get_m_cfg().set_collisions(17), + n.get_m_cfg().set_kDP(t.getParam("damping")), + this.bjsAMMO.castObject(n, this.bjsAMMO.btCollisionObject).getCollisionShape().setMargin(t.getParam("margin")), + n.setActivationState(e.DISABLE_DEACTIVATION_FLAG), + this.world.addSoftBody(n, 1, -1), + (t.physicsBody = n), + t._pluginData.toDispose.push(n), + this.setBodyPressure(t, 0), + t.type === Ci.SoftbodyImpostor && this.setBodyPressure(t, t.getParam("pressure")), + this.setBodyStiffness(t, t.getParam("stiffness")), + this.setBodyVelocityIterations(t, t.getParam("velocityIterations")), + this.setBodyPositionIterations(t, t.getParam("positionIterations")); + else { + var r = new this.bjsAMMO.btVector3(0, 0, 0), + o = new this.bjsAMMO.btTransform(); + o.setIdentity(), + 0 !== i && n.calculateLocalInertia(i, r), + this._tmpAmmoVectorA.setValue(t.object.position.x, t.object.position.y, t.object.position.z), + this._tmpAmmoQuaternion.setValue(t.object.rotationQuaternion.x, t.object.rotationQuaternion.y, t.object.rotationQuaternion.z, t.object.rotationQuaternion.w), + o.setOrigin(this._tmpAmmoVectorA), + o.setRotation(this._tmpAmmoQuaternion); + var a = new this.bjsAMMO.btDefaultMotionState(o), + s = new this.bjsAMMO.btRigidBodyConstructionInfo(i, a, n, r), + c = new this.bjsAMMO.btRigidBody(s); + 0 === i && (c.setCollisionFlags(c.getCollisionFlags() | e.KINEMATIC_FLAG), c.setActivationState(e.DISABLE_DEACTIVATION_FLAG)), + t.type != Ci.NoImpostor || n.getChildShape || c.setCollisionFlags(c.getCollisionFlags() | e.DISABLE_COLLISION_FLAG), + this.world.addRigidBody(c), + (t.physicsBody = c), + (t._pluginData.toDispose = t._pluginData.toDispose.concat([c, s, a, o, r, n])); + } + this.setBodyRestitution(t, t.getParam("restitution")), this.setBodyFriction(t, t.getParam("friction")); + } + }), + (e.prototype.removePhysicsBody = function (e) { + var t = this; + this.world && + (e.soft ? this.world.removeSoftBody(e.physicsBody) : this.world.removeRigidBody(e.physicsBody), + e._pluginData && + (e._pluginData.toDispose.forEach(function (e) { + t.bjsAMMO.destroy(e); + }), + (e._pluginData.toDispose = []))); + }), + (e.prototype.generateJoint = function (e) { + var t = e.mainImpostor.physicsBody, + n = e.connectedImpostor.physicsBody; + if (t && n) { + var i, + r = e.joint.jointData; + switch ((r.mainPivot || (r.mainPivot = new a.e(0, 0, 0)), r.connectedPivot || (r.connectedPivot = new a.e(0, 0, 0)), e.joint.type)) { + case gi.DistanceJoint: + var o = r.maxDistance; + o && ((r.mainPivot = new a.e(0, -o / 2, 0)), (r.connectedPivot = new a.e(0, o / 2, 0))), + (i = new this.bjsAMMO.btPoint2PointConstraint( + t, + n, + new this.bjsAMMO.btVector3(r.mainPivot.x, r.mainPivot.y, r.mainPivot.z), + new this.bjsAMMO.btVector3(r.connectedPivot.x, r.connectedPivot.y, r.connectedPivot.z) + )); + break; + case gi.HingeJoint: + r.mainAxis || (r.mainAxis = new a.e(0, 0, 0)), r.connectedAxis || (r.connectedAxis = new a.e(0, 0, 0)); + var s = new this.bjsAMMO.btVector3(r.mainAxis.x, r.mainAxis.y, r.mainAxis.z), + c = new this.bjsAMMO.btVector3(r.connectedAxis.x, r.connectedAxis.y, r.connectedAxis.z); + i = new this.bjsAMMO.btHingeConstraint( + t, + n, + new this.bjsAMMO.btVector3(r.mainPivot.x, r.mainPivot.y, r.mainPivot.z), + new this.bjsAMMO.btVector3(r.connectedPivot.x, r.connectedPivot.y, r.connectedPivot.z), + s, + c + ); + break; + case gi.BallAndSocketJoint: + i = new this.bjsAMMO.btPoint2PointConstraint( + t, + n, + new this.bjsAMMO.btVector3(r.mainPivot.x, r.mainPivot.y, r.mainPivot.z), + new this.bjsAMMO.btVector3(r.connectedPivot.x, r.connectedPivot.y, r.connectedPivot.z) + ); + break; + default: + g.a.Warn("JointType not currently supported by the Ammo plugin, falling back to PhysicsJoint.BallAndSocketJoint"), + (i = new this.bjsAMMO.btPoint2PointConstraint( + t, + n, + new this.bjsAMMO.btVector3(r.mainPivot.x, r.mainPivot.y, r.mainPivot.z), + new this.bjsAMMO.btVector3(r.connectedPivot.x, r.connectedPivot.y, r.connectedPivot.z) + )); + } + this.world.addConstraint(i, !e.joint.jointData.collision), (e.joint.physicsJoint = i); + } + }), + (e.prototype.removeJoint = function (e) { + this.world && this.world.removeConstraint(e.joint.physicsJoint); + }), + (e.prototype._addMeshVerts = function (e, t, n) { + var i = this, + r = 0; + if (n && n.getIndices && n.getWorldMatrix && n.getChildMeshes) { + var o = n.getIndices(); + o || (o = []); + var s = n.getVerticesData(wn.b.PositionKind); + s || (s = []), n.computeWorldMatrix(!1); + for (var c = o.length / 3, l = 0; l < c; l++) { + for (var u = [], h = 0; h < 3; h++) { + var d, + p = new a.e(s[3 * o[3 * l + h] + 0], s[3 * o[3 * l + h] + 1], s[3 * o[3 * l + h] + 2]); + a.a.ScalingToRef(n.scaling.x, n.scaling.y, n.scaling.z, this._tmpMatrix), + (p = a.e.TransformCoordinates(p, this._tmpMatrix)), + (d = 0 == h ? this._tmpAmmoVectorA : 1 == h ? this._tmpAmmoVectorB : this._tmpAmmoVectorC).setValue(p.x, p.y, p.z), + u.push(d); + } + e.addTriangle(u[0], u[1], u[2]), r++; + } + n.getChildMeshes().forEach(function (n) { + r += i._addMeshVerts(e, t, n); + }); + } + return r; + }), + (e.prototype._softVertexData = function (e) { + var t = e.object; + if (t && t.getIndices && t.getWorldMatrix && t.getChildMeshes) { + var n = t.getIndices(); + n || (n = []); + var i = t.getVerticesData(wn.b.PositionKind); + i || (i = []); + var r = t.getVerticesData(wn.b.NormalKind); + r || (r = []), t.computeWorldMatrix(!1); + for (var o = [], s = [], c = 0; c < i.length; c += 3) { + var l = new a.e(i[c], i[c + 1], i[c + 2]), + u = new a.e(r[c], r[c + 1], r[c + 2]); + (l = a.e.TransformCoordinates(l, t.getWorldMatrix())), (u = a.e.TransformNormal(u, t.getWorldMatrix())), o.push(l.x, l.y, l.z), s.push(u.x, u.y, u.z); + } + var h = new Rn.a(); + return ( + (h.positions = o), + (h.normals = s), + (h.uvs = t.getVerticesData(wn.b.UVKind)), + (h.colors = t.getVerticesData(wn.b.ColorKind)), + t && t.getIndices && (h.indices = t.getIndices()), + h.applyToMesh(t), + (t.position = a.e.Zero()), + (t.rotationQuaternion = null), + (t.rotation = a.e.Zero()), + t.computeWorldMatrix(!0), + h + ); + } + return Rn.a.ExtractFromMesh(t); + }), + (e.prototype._createSoftbody = function (e) { + var t = e.object; + if (t && t.getIndices) { + var n = t.getIndices(); + n || (n = []); + var i = this._softVertexData(e), + r = i.positions, + o = i.normals; + if (null === r || null === o) return new this.bjsAMMO.btCompoundShape(); + for (var s = [], c = [], l = 0; l < r.length; l += 3) { + var u = new a.e(r[l], r[l + 1], r[l + 2]), + h = new a.e(o[l], o[l + 1], o[l + 2]); + s.push(u.x, u.y, -u.z), c.push(h.x, h.y, -h.z); + } + var d = new this.bjsAMMO.btSoftBodyHelpers().CreateFromTriMesh(this.world.getWorldInfo(), s, t.getIndices(), n.length / 3, !0), + p = r.length / 3, + f = d.get_m_nodes(); + for (l = 0; l < p; l++) { + var m; + (m = f.at(l).get_m_n()).setX(c[3 * l]), m.setY(c[3 * l + 1]), m.setZ(c[3 * l + 2]); + } + return d; + } + }), + (e.prototype._createCloth = function (e) { + var t = e.object; + if (t && t.getIndices) { + var n = t.getIndices(); + n || (n = []); + var i = this._softVertexData(e), + r = i.positions, + o = i.normals; + if (null === r || null === o) return new this.bjsAMMO.btCompoundShape(); + var a = r.length, + s = Math.sqrt(a / 3); + e.segments = s; + var c = s - 1; + return ( + this._tmpAmmoVectorA.setValue(r[0], r[1], r[2]), + this._tmpAmmoVectorB.setValue(r[3 * c], r[3 * c + 1], r[3 * c + 2]), + this._tmpAmmoVectorD.setValue(r[a - 3], r[a - 2], r[a - 1]), + this._tmpAmmoVectorC.setValue(r[a - 3 - 3 * c], r[a - 2 - 3 * c], r[a - 1 - 3 * c]), + new this.bjsAMMO.btSoftBodyHelpers().CreatePatch(this.world.getWorldInfo(), this._tmpAmmoVectorA, this._tmpAmmoVectorB, this._tmpAmmoVectorC, this._tmpAmmoVectorD, s, s, e.getParam("fixedPoints"), !0) + ); + } + }), + (e.prototype._createRope = function (e) { + var t, + n, + i = this._softVertexData(e), + r = i.positions, + o = i.normals; + if (null === r || null === o) return new this.bjsAMMO.btCompoundShape(); + i.applyToMesh(e.object, !0), (e._isFromLine = !0); + if ( + 0 === + o + .map(function (e) { + return e * e; + }) + .reduce(function (e, t) { + return e + t; + }) + ) + (n = (t = r.length) / 3 - 1), this._tmpAmmoVectorA.setValue(r[0], r[1], r[2]), this._tmpAmmoVectorB.setValue(r[t - 3], r[t - 2], r[t - 1]); + else { + e._isFromLine = !1; + var a = e.getParam("path"); + if (null === e.getParam("shape")) return g.a.Warn("No shape available for extruded mesh"), new this.bjsAMMO.btCompoundShape(); + if (r.length % (3 * a.length) != 0) return g.a.Warn("Path does not match extrusion"), new this.bjsAMMO.btCompoundShape(); + (n = (t = a.length) - 1), this._tmpAmmoVectorA.setValue(a[0].x, a[0].y, a[0].z), this._tmpAmmoVectorB.setValue(a[t - 1].x, a[t - 1].y, a[t - 1].z); + } + e.segments = n; + var s = e.getParam("fixedPoints"); + s = s > 3 ? 3 : s; + var c = new this.bjsAMMO.btSoftBodyHelpers().CreateRope(this.world.getWorldInfo(), this._tmpAmmoVectorA, this._tmpAmmoVectorB, n - 1, s); + return c.get_m_cfg().set_collisions(17), c; + }), + (e.prototype._createCustom = function (e) { + var t = null; + return this.onCreateCustomShape && (t = this.onCreateCustomShape(e)), null == t && (t = new this.bjsAMMO.btCompoundShape()), t; + }), + (e.prototype._addHullVerts = function (e, t, n) { + var i = this, + r = 0; + if (n && n.getIndices && n.getWorldMatrix && n.getChildMeshes) { + var o = n.getIndices(); + o || (o = []); + var s = n.getVerticesData(wn.b.PositionKind); + s || (s = []), n.computeWorldMatrix(!1); + for (var c = o.length / 3, l = 0; l < c; l++) { + for (var u = [], h = 0; h < 3; h++) { + var d, + p = new a.e(s[3 * o[3 * l + h] + 0], s[3 * o[3 * l + h] + 1], s[3 * o[3 * l + h] + 2]); + a.a.ScalingToRef(n.scaling.x, n.scaling.y, n.scaling.z, this._tmpMatrix), + (p = a.e.TransformCoordinates(p, this._tmpMatrix)), + (d = 0 == h ? this._tmpAmmoVectorA : 1 == h ? this._tmpAmmoVectorB : this._tmpAmmoVectorC).setValue(p.x, p.y, p.z), + u.push(d); + } + e.addPoint(u[0], !0), e.addPoint(u[1], !0), e.addPoint(u[2], !0), r++; + } + n.getChildMeshes().forEach(function (n) { + r += i._addHullVerts(e, t, n); + }); + } + return r; + }), + (e.prototype._createShape = function (e, t) { + var n = this; + void 0 === t && (t = !1); + var i, + r = e.object, + o = e.getObjectExtendSize(); + if (!t) { + var s = e.object.getChildMeshes ? e.object.getChildMeshes(!0) : []; + i = new this.bjsAMMO.btCompoundShape(); + var c = 0; + if ( + (s.forEach(function (e) { + var t = e.getPhysicsImpostor(); + if (t) { + if (t.type == Ci.MeshImpostor) throw "A child MeshImpostor is not supported. Only primitive impostors are supported as children (eg. box or sphere)"; + var r = n._createShape(t), + o = e.parent.getWorldMatrix().clone(), + s = new a.e(); + o.decompose(s), + n._tmpAmmoTransform.getOrigin().setValue(e.position.x * s.x, e.position.y * s.y, e.position.z * s.z), + n._tmpAmmoQuaternion.setValue(e.rotationQuaternion.x, e.rotationQuaternion.y, e.rotationQuaternion.z, e.rotationQuaternion.w), + n._tmpAmmoTransform.setRotation(n._tmpAmmoQuaternion), + i.addChildShape(n._tmpAmmoTransform, r), + t.dispose(), + c++; + } + }), + c > 0) + ) { + if (e.type != Ci.NoImpostor) { + var l = this._createShape(e, !0); + l && + (this._tmpAmmoTransform.getOrigin().setValue(0, 0, 0), + this._tmpAmmoQuaternion.setValue(0, 0, 0, 1), + this._tmpAmmoTransform.setRotation(this._tmpAmmoQuaternion), + i.addChildShape(this._tmpAmmoTransform, l)); + } + return i; + } + this.bjsAMMO.destroy(i), (i = null); + } + switch (e.type) { + case Ci.SphereImpostor: + if (z.a.WithinEpsilon(o.x, o.y, 1e-4) && z.a.WithinEpsilon(o.x, o.z, 1e-4)) i = new this.bjsAMMO.btSphereShape(o.x / 2); + else { + var u = [new this.bjsAMMO.btVector3(0, 0, 0)]; + (i = new this.bjsAMMO.btMultiSphereShape(u, [1], 1)).setLocalScaling(new this.bjsAMMO.btVector3(o.x / 2, o.y / 2, o.z / 2)); + } + break; + case Ci.CapsuleImpostor: + i = new this.bjsAMMO.btCapsuleShape(o.x / 2, o.y / 2); + break; + case Ci.CylinderImpostor: + this._tmpAmmoVectorA.setValue(o.x / 2, o.y / 2, o.z / 2), (i = new this.bjsAMMO.btCylinderShape(this._tmpAmmoVectorA)); + break; + case Ci.PlaneImpostor: + case Ci.BoxImpostor: + this._tmpAmmoVectorA.setValue(o.x / 2, o.y / 2, o.z / 2), (i = new this.bjsAMMO.btBoxShape(this._tmpAmmoVectorA)); + break; + case Ci.MeshImpostor: + if (0 == e.getParam("mass")) { + var h = new this.bjsAMMO.btTriangleMesh(); + e._pluginData.toDispose.push(h); + var d = this._addMeshVerts(h, r, r); + i = 0 == d ? new this.bjsAMMO.btCompoundShape() : new this.bjsAMMO.btBvhTriangleMeshShape(h); + break; + } + case Ci.ConvexHullImpostor: + var p = new this.bjsAMMO.btConvexHullShape(); + 0 == (d = this._addHullVerts(p, r, r)) ? (e._pluginData.toDispose.push(p), (i = new this.bjsAMMO.btCompoundShape())) : (i = p); + break; + case Ci.NoImpostor: + i = new this.bjsAMMO.btSphereShape(o.x / 2); + break; + case Ci.CustomImpostor: + i = this._createCustom(e); + break; + case Ci.SoftbodyImpostor: + i = this._createSoftbody(e); + break; + case Ci.ClothImpostor: + i = this._createCloth(e); + break; + case Ci.RopeImpostor: + i = this._createRope(e); + break; + default: + g.a.Warn("The impostor type is not currently supported by the ammo plugin."); + } + return i; + }), + (e.prototype.setTransformationFromPhysicsBody = function (e) { + e.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform), + e.object.position.set(this._tmpAmmoTransform.getOrigin().x(), this._tmpAmmoTransform.getOrigin().y(), this._tmpAmmoTransform.getOrigin().z()), + e.object.rotationQuaternion + ? e.object.rotationQuaternion.set(this._tmpAmmoTransform.getRotation().x(), this._tmpAmmoTransform.getRotation().y(), this._tmpAmmoTransform.getRotation().z(), this._tmpAmmoTransform.getRotation().w()) + : e.object.rotation && + (this._tmpQuaternion.set(this._tmpAmmoTransform.getRotation().x(), this._tmpAmmoTransform.getRotation().y(), this._tmpAmmoTransform.getRotation().z(), this._tmpAmmoTransform.getRotation().w()), + this._tmpQuaternion.toEulerAnglesToRef(e.object.rotation)); + }), + (e.prototype.setPhysicsBodyTransformation = function (e, t, n) { + var i = e.physicsBody.getWorldTransform(); + if (i.getOrigin().x() != t.x || i.getOrigin().y() != t.y || i.getOrigin().z() != t.z || i.getRotation().x() != n.x || i.getRotation().y() != n.y || i.getRotation().z() != n.z || i.getRotation().w() != n.w) + if ( + (this._tmpAmmoVectorA.setValue(t.x, t.y, t.z), + i.setOrigin(this._tmpAmmoVectorA), + this._tmpAmmoQuaternion.setValue(n.x, n.y, n.z, n.w), + i.setRotation(this._tmpAmmoQuaternion), + e.physicsBody.setWorldTransform(i), + 0 == e.mass) + ) { + var r = e.physicsBody.getMotionState(); + r && r.setWorldTransform(i); + } else e.physicsBody.activate(); + }), + (e.prototype.isSupported = function () { + return void 0 !== this.bjsAMMO; + }), + (e.prototype.setLinearVelocity = function (e, t) { + this._tmpAmmoVectorA.setValue(t.x, t.y, t.z), e.soft ? e.physicsBody.linearVelocity(this._tmpAmmoVectorA) : e.physicsBody.setLinearVelocity(this._tmpAmmoVectorA); + }), + (e.prototype.setAngularVelocity = function (e, t) { + this._tmpAmmoVectorA.setValue(t.x, t.y, t.z), e.soft ? e.physicsBody.angularVelocity(this._tmpAmmoVectorA) : e.physicsBody.setAngularVelocity(this._tmpAmmoVectorA); + }), + (e.prototype.getLinearVelocity = function (e) { + if (e.soft) var t = e.physicsBody.linearVelocity(); + else t = e.physicsBody.getLinearVelocity(); + if (!t) return null; + var n = new a.e(t.x(), t.y(), t.z()); + return this.bjsAMMO.destroy(t), n; + }), + (e.prototype.getAngularVelocity = function (e) { + if (e.soft) var t = e.physicsBody.angularVelocity(); + else t = e.physicsBody.getAngularVelocity(); + if (!t) return null; + var n = new a.e(t.x(), t.y(), t.z()); + return this.bjsAMMO.destroy(t), n; + }), + (e.prototype.setBodyMass = function (e, t) { + e.soft ? e.physicsBody.setTotalMass(t, !1) : e.physicsBody.setMassProps(t), (e._pluginData.mass = t); + }), + (e.prototype.getBodyMass = function (e) { + return e._pluginData.mass || 0; + }), + (e.prototype.getBodyFriction = function (e) { + return e._pluginData.friction || 0; + }), + (e.prototype.setBodyFriction = function (e, t) { + e.soft ? e.physicsBody.get_m_cfg().set_kDF(t) : e.physicsBody.setFriction(t), (e._pluginData.friction = t); + }), + (e.prototype.getBodyRestitution = function (e) { + return e._pluginData.restitution || 0; + }), + (e.prototype.setBodyRestitution = function (e, t) { + e.physicsBody.setRestitution(t), (e._pluginData.restitution = t); + }), + (e.prototype.getBodyPressure = function (e) { + return e.soft ? e._pluginData.pressure || 0 : (g.a.Warn("Pressure is not a property of a rigid body"), 0); + }), + (e.prototype.setBodyPressure = function (e, t) { + e.soft + ? e.type === Ci.SoftbodyImpostor + ? (e.physicsBody.get_m_cfg().set_kPR(t), (e._pluginData.pressure = t)) + : (e.physicsBody.get_m_cfg().set_kPR(0), (e._pluginData.pressure = 0)) + : g.a.Warn("Pressure can only be applied to a softbody"); + }), + (e.prototype.getBodyStiffness = function (e) { + return e.soft ? e._pluginData.stiffness || 0 : (g.a.Warn("Stiffness is not a property of a rigid body"), 0); + }), + (e.prototype.setBodyStiffness = function (e, t) { + e.soft ? ((t = (t = t < 0 ? 0 : t) > 1 ? 1 : t), e.physicsBody.get_m_materials().at(0).set_m_kLST(t), (e._pluginData.stiffness = t)) : g.a.Warn("Stiffness cannot be applied to a rigid body"); + }), + (e.prototype.getBodyVelocityIterations = function (e) { + return e.soft ? e._pluginData.velocityIterations || 0 : (g.a.Warn("Velocity iterations is not a property of a rigid body"), 0); + }), + (e.prototype.setBodyVelocityIterations = function (e, t) { + e.soft ? ((t = t < 0 ? 0 : t), e.physicsBody.get_m_cfg().set_viterations(t), (e._pluginData.velocityIterations = t)) : g.a.Warn("Velocity iterations cannot be applied to a rigid body"); + }), + (e.prototype.getBodyPositionIterations = function (e) { + return e.soft ? e._pluginData.positionIterations || 0 : (g.a.Warn("Position iterations is not a property of a rigid body"), 0); + }), + (e.prototype.setBodyPositionIterations = function (e, t) { + e.soft ? ((t = t < 0 ? 0 : t), e.physicsBody.get_m_cfg().set_piterations(t), (e._pluginData.positionIterations = t)) : g.a.Warn("Position iterations cannot be applied to a rigid body"); + }), + (e.prototype.appendAnchor = function (e, t, n, i, r, o) { + void 0 === r && (r = 1), void 0 === o && (o = !1); + var a = e.segments, + s = Math.round((a - 1) * n) + a * (a - 1 - Math.round((a - 1) * i)); + e.physicsBody.appendAnchor(s, t.physicsBody, o, r); + }), + (e.prototype.appendHook = function (e, t, n, i, r) { + void 0 === i && (i = 1), void 0 === r && (r = !1); + var o = Math.round(e.segments * n); + e.physicsBody.appendAnchor(o, t.physicsBody, r, i); + }), + (e.prototype.sleepBody = function (e) { + g.a.Warn("sleepBody is not currently supported by the Ammo physics plugin"); + }), + (e.prototype.wakeUpBody = function (e) { + e.physicsBody.activate(); + }), + (e.prototype.updateDistanceJoint = function (e, t, n) { + g.a.Warn("updateDistanceJoint is not currently supported by the Ammo physics plugin"); + }), + (e.prototype.setMotor = function (e, t, n, i) { + e.physicsJoint.enableAngularMotor(!0, t, n); + }), + (e.prototype.setLimit = function (e, t, n) { + g.a.Warn("setLimit is not currently supported by the Ammo physics plugin"); + }), + (e.prototype.syncMeshWithImpostor = function (e, t) { + t.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform), + (e.position.x = this._tmpAmmoTransform.getOrigin().x()), + (e.position.y = this._tmpAmmoTransform.getOrigin().y()), + (e.position.z = this._tmpAmmoTransform.getOrigin().z()), + e.rotationQuaternion && + ((e.rotationQuaternion.x = this._tmpAmmoTransform.getRotation().x()), + (e.rotationQuaternion.y = this._tmpAmmoTransform.getRotation().y()), + (e.rotationQuaternion.z = this._tmpAmmoTransform.getRotation().z()), + (e.rotationQuaternion.w = this._tmpAmmoTransform.getRotation().w())); + }), + (e.prototype.getRadius = function (e) { + return e.getObjectExtendSize().x / 2; + }), + (e.prototype.getBoxSizeToRef = function (e, t) { + var n = e.getObjectExtendSize(); + (t.x = n.x), (t.y = n.y), (t.z = n.z); + }), + (e.prototype.dispose = function () { + this.bjsAMMO.destroy(this.world), + this.bjsAMMO.destroy(this._solver), + this.bjsAMMO.destroy(this._overlappingPairCache), + this.bjsAMMO.destroy(this._dispatcher), + this.bjsAMMO.destroy(this._collisionConfiguration), + this.bjsAMMO.destroy(this._tmpAmmoVectorA), + this.bjsAMMO.destroy(this._tmpAmmoVectorB), + this.bjsAMMO.destroy(this._tmpAmmoVectorC), + this.bjsAMMO.destroy(this._tmpAmmoTransform), + this.bjsAMMO.destroy(this._tmpAmmoQuaternion), + this.bjsAMMO.destroy(this._tmpAmmoConcreteContactResultCallback), + (this.world = null); + }), + (e.prototype.raycast = function (e, t) { + (this._tmpAmmoVectorRCA = new this.bjsAMMO.btVector3(e.x, e.y, e.z)), (this._tmpAmmoVectorRCB = new this.bjsAMMO.btVector3(t.x, t.y, t.z)); + var n = new this.bjsAMMO.ClosestRayResultCallback(this._tmpAmmoVectorRCA, this._tmpAmmoVectorRCB); + return ( + this.world.rayTest(this._tmpAmmoVectorRCA, this._tmpAmmoVectorRCB, n), + this._raycastResult.reset(e, t), + n.hasHit() && + (this._raycastResult.setHitData( + { x: n.get_m_hitNormalWorld().x(), y: n.get_m_hitNormalWorld().y(), z: n.get_m_hitNormalWorld().z() }, + { x: n.get_m_hitPointWorld().x(), y: n.get_m_hitPointWorld().y(), z: n.get_m_hitPointWorld().z() } + ), + this._raycastResult.calculateHitDistance()), + this.bjsAMMO.destroy(n), + this.bjsAMMO.destroy(this._tmpAmmoVectorRCA), + this.bjsAMMO.destroy(this._tmpAmmoVectorRCB), + this._raycastResult + ); + }), + (e.DISABLE_COLLISION_FLAG = 4), + (e.KINEMATIC_FLAG = 2), + (e.DISABLE_DEACTIVATION_FLAG = 4), + e + ); + })(); + (i.a.prototype.removeReflectionProbe = function (e) { + if (!this.reflectionProbes) return -1; + var t = this.reflectionProbes.indexOf(e); + return -1 !== t && this.reflectionProbes.splice(t, 1), t; + }), + (i.a.prototype.addReflectionProbe = function (e) { + this.reflectionProbes || (this.reflectionProbes = []), this.reflectionProbes.push(e); + }); + var Na = (function () { + function e(e, t, n, i, r) { + var o = this; + void 0 === i && (i = !0), + void 0 === r && (r = !1), + (this.name = e), + (this._viewMatrix = a.a.Identity()), + (this._target = a.e.Zero()), + (this._add = a.e.Zero()), + (this._invertYAxis = !1), + (this.position = a.e.Zero()), + (this._scene = n), + this._scene.reflectionProbes || (this._scene.reflectionProbes = new Array()), + this._scene.reflectionProbes.push(this), + (this._renderTargetTexture = new mn.a(e, t, n, i, !0, r ? 1 : 0, !0)), + this._renderTargetTexture.onBeforeRenderObservable.add(function (e) { + switch (e) { + case 0: + o._add.copyFromFloats(1, 0, 0); + break; + case 1: + o._add.copyFromFloats(-1, 0, 0); + break; + case 2: + o._add.copyFromFloats(0, o._invertYAxis ? 1 : -1, 0); + break; + case 3: + o._add.copyFromFloats(0, o._invertYAxis ? -1 : 1, 0); + break; + case 4: + o._add.copyFromFloats(0, 0, 1); + break; + case 5: + o._add.copyFromFloats(0, 0, -1); + } + o._attachedMesh && o.position.copyFrom(o._attachedMesh.getAbsolutePosition()), + o.position.addToRef(o._add, o._target), + a.a.LookAtLHToRef(o.position, o._target, a.e.Up(), o._viewMatrix), + n.activeCamera && ((o._projectionMatrix = a.a.PerspectiveFovLH(Math.PI / 2, 1, n.activeCamera.minZ, n.activeCamera.maxZ)), n.setTransformMatrix(o._viewMatrix, o._projectionMatrix)), + (n._forcedViewPosition = o.position); + }), + this._renderTargetTexture.onAfterUnbindObservable.add(function () { + (n._forcedViewPosition = null), n.updateTransformMatrix(!0); + }); + } + return ( + Object.defineProperty(e.prototype, "samples", { + get: function () { + return this._renderTargetTexture.samples; + }, + set: function (e) { + this._renderTargetTexture.samples = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "refreshRate", { + get: function () { + return this._renderTargetTexture.refreshRate; + }, + set: function (e) { + this._renderTargetTexture.refreshRate = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + Object.defineProperty(e.prototype, "cubeTexture", { + get: function () { + return this._renderTargetTexture; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "renderList", { + get: function () { + return this._renderTargetTexture.renderList; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.attachToMesh = function (e) { + this._attachedMesh = e; + }), + (e.prototype.setRenderingAutoClearDepthStencil = function (e, t) { + this._renderTargetTexture.setRenderingAutoClearDepthStencil(e, t); + }), + (e.prototype.dispose = function () { + var e = this._scene.reflectionProbes.indexOf(this); + -1 !== e && this._scene.reflectionProbes.splice(e, 1), this._renderTargetTexture && (this._renderTargetTexture.dispose(), (this._renderTargetTexture = null)); + }), + (e.prototype.toString = function (e) { + var t = "Name: " + this.name; + return e && ((t += ", position: " + this.position.toString()), this._attachedMesh && (t += ", attached mesh: " + this._attachedMesh.name)), t; + }), + (e.prototype.getClassName = function () { + return "ReflectionProbe"; + }), + (e.prototype.serialize = function () { + var e = He.a.Serialize(this, this._renderTargetTexture.serialize()); + return (e.isReflectionProbe = !0), e; + }), + (e.Parse = function (t, n, i) { + var r = null; + if (n.reflectionProbes) + for (var o = 0; o < n.reflectionProbes.length; o++) { + var a = n.reflectionProbes[o]; + if (a.name === t.name) { + r = a; + break; + } + } + return ( + ((r = He.a.Parse( + function () { + return r || new e(t.name, t.renderTargetSize, n, t._generateMipMaps); + }, + t, + n, + i + )).cubeTexture._waitingRenderList = t.renderList), + t._attachedMesh && r.attachToMesh(n.getMeshByID(t._attachedMesh)), + r + ); + }), + Object(h.c)([Object(He.k)()], e.prototype, "_attachedMesh", void 0), + Object(h.c)([Object(He.o)()], e.prototype, "position", void 0), + e + ); + })(), + ka = !0, + za = (function () { + function e() {} + return (e.LoaderInjectedPhysicsEngine = void 0), e; + })(), + ja = function (e, t, n, i) { + for (var r = 0, o = t.materials.length; r < o; r++) { + var a = t.materials[r]; + if (a.id === e) return Fo.a.Parse(a, n, i); + } + return null; + }, + Ba = function (e, t, n) { + for (var i in t) if (e.name === t[i]) return n.push(e.id), !0; + return !(!e.parentId || -1 === n.indexOf(e.parentId)) && (n.push(e.id), !0); + }, + Va = function (e, t) { + return e + " of " + (t ? t.file + " from " + t.name + " version: " + t.version + ", exporter version: " + t.exporter_version : "unknown"); + }, + Ga = function (e, t) { + var n = t; + if (t._waitingData.lods) { + if (t._waitingData.lods.ids && t._waitingData.lods.ids.length > 0) { + var i = t._waitingData.lods.ids, + r = n.isEnabled(!1); + if (t._waitingData.lods.distances) { + var o = t._waitingData.lods.distances; + if (o.length >= i.length) { + var a = o.length > i.length ? o[o.length - 1] : 0; + n.setEnabled(!1); + for (var s = 0; s < i.length; s++) { + var c = i[s], + l = e.getMeshByID(c); + null != l && n.addLODLevel(o[s], l); + } + a > 0 && n.addLODLevel(a, null), !0 === r && n.setEnabled(!0); + } else $e.b.Warn("Invalid level of detail distances for " + t.name); + } + } + t._waitingData.lods = null; + } + }, + Ua = function (e, t, n, r, o) { + void 0 === o && (o = !1); + var a = new le.a(e), + s = "importScene has failed JSON parse"; + try { + var l = JSON.parse(t); + s = ""; + var u, + h, + d = $i.a.loggingLevel === $i.a.DETAILED_LOGGING; + if (void 0 !== l.environmentTexture && null !== l.environmentTexture) { + var p = void 0 === l.isPBR || l.isPBR; + if (l.environmentTextureType && "BABYLON.HDRCubeTexture" === l.environmentTextureType) { + var f = l.environmentTextureSize ? l.environmentTextureSize : 128, + m = new Ea((l.environmentTexture.match(/https?:\/\//g) ? "" : n) + l.environmentTexture, e, f, !0, !p); + l.environmentTextureRotationY && (m.rotationY = l.environmentTextureRotationY), (e.environmentTexture = m); + } else if ($r.a.EndsWith(l.environmentTexture, ".env")) { + var b = new Ar.a((l.environmentTexture.match(/https?:\/\//g) ? "" : n) + l.environmentTexture, e); + l.environmentTextureRotationY && (b.rotationY = l.environmentTextureRotationY), (e.environmentTexture = b); + } else { + var _ = Ar.a.CreateFromPrefilteredData((l.environmentTexture.match(/https?:\/\//g) ? "" : n) + l.environmentTexture, e); + l.environmentTextureRotationY && (_.rotationY = l.environmentTextureRotationY), (e.environmentTexture = _); + } + if (!0 === l.createDefaultSkybox) { + var v = void 0 !== e.activeCamera && null !== e.activeCamera ? (e.activeCamera.maxZ - e.activeCamera.minZ) / 2 : 1e3, + y = l.skyboxBlurLevel || 0; + e.createDefaultSkybox(e.environmentTexture, p, v, y); + } + a.environmentTexture = e.environmentTexture; + } + if ((void 0 !== l.environmentIntensity && null !== l.environmentIntensity && (e.environmentIntensity = l.environmentIntensity), void 0 !== l.lights && null !== l.lights)) + for (u = 0, h = l.lights.length; u < h; u++) { + var C = l.lights[u], + P = ea.a.Parse(C, e); + P && (a.lights.push(P), (s += 0 === u ? "\n\tLights:" : ""), (s += "\n\t\t" + P.toString(d))); + } + if (void 0 !== l.reflectionProbes && null !== l.reflectionProbes) + for (u = 0, h = l.reflectionProbes.length; u < h; u++) { + var x = l.reflectionProbes[u], + T = Na.Parse(x, e, n); + T && (a.reflectionProbes.push(T), (s += 0 === u ? "\n\tReflection Probes:" : ""), (s += "\n\t\t" + T.toString(d))); + } + if (void 0 !== l.animations && null !== l.animations) + for (u = 0, h = l.animations.length; u < h; u++) { + var S = l.animations[u], + O = c.a.GetClass("BABYLON.Animation"); + if (O) { + var E = O.Parse(S); + e.animations.push(E), a.animations.push(E), (s += 0 === u ? "\n\tAnimations:" : ""), (s += "\n\t\t" + E.toString(d)); + } + } + if (void 0 !== l.materials && null !== l.materials) + for (u = 0, h = l.materials.length; u < h; u++) { + var M = l.materials[u], + I = Fo.a.Parse(M, e, n); + if (I) + a.materials.push(I), + (s += 0 === u ? "\n\tMaterials:" : ""), + (s += "\n\t\t" + I.toString(d)), + I.getActiveTextures().forEach(function (e) { + -1 == a.textures.indexOf(e) && a.textures.push(e); + }); + } + if (void 0 !== l.multiMaterials && null !== l.multiMaterials) + for (u = 0, h = l.multiMaterials.length; u < h; u++) { + var D = l.multiMaterials[u], + R = Ta.a.ParseMultiMaterial(D, e); + a.multiMaterials.push(R), + (s += 0 === u ? "\n\tMultiMaterials:" : ""), + (s += "\n\t\t" + R.toString(d)), + R.getActiveTextures().forEach(function (e) { + -1 == a.textures.indexOf(e) && a.textures.push(e); + }); + } + if (void 0 !== l.morphTargetManagers && null !== l.morphTargetManagers) + for (var w = 0, L = l.morphTargetManagers; w < L.length; w++) { + var F = L[w]; + a.morphTargetManagers.push(Ma.a.Parse(F, e)); + } + if (void 0 !== l.skeletons && null !== l.skeletons) + for (u = 0, h = l.skeletons.length; u < h; u++) { + var k = l.skeletons[u], + z = Ue.a.Parse(k, e); + a.skeletons.push(z), (s += 0 === u ? "\n\tSkeletons:" : ""), (s += "\n\t\t" + z.toString(d)); + } + var j = l.geometries; + if (null != j) { + var B = new Array(), + V = j.vertexData; + if (null != V) + for (u = 0, h = V.length; u < h; u++) { + var G = V[u]; + B.push(xa.a.Parse(G, e, n)); + } + B.forEach(function (e) { + e && a.geometries.push(e); + }); + } + if (void 0 !== l.transformNodes && null !== l.transformNodes) + for (u = 0, h = l.transformNodes.length; u < h; u++) { + var U = l.transformNodes[u], + H = si.a.Parse(U, e, n); + a.transformNodes.push(H); + } + if (void 0 !== l.meshes && null !== l.meshes) + for (u = 0, h = l.meshes.length; u < h; u++) { + var W = l.meshes[u], + X = Ee.a.Parse(W, e, n); + a.meshes.push(X), (s += 0 === u ? "\n\tMeshes:" : ""), (s += "\n\t\t" + X.toString(d)); + } + if (void 0 !== l.cameras && null !== l.cameras) + for (u = 0, h = l.cameras.length; u < h; u++) { + var Y = l.cameras[u], + K = De.a.Parse(Y, e); + a.cameras.push(K), (s += 0 === u ? "\n\tCameras:" : ""), (s += "\n\t\t" + K.toString(d)); + } + if (void 0 !== l.animationGroups && null !== l.animationGroups) + for (u = 0, h = l.animationGroups.length; u < h; u++) { + var Z = l.animationGroups[u], + q = N.a.Parse(Z, e); + a.animationGroups.push(q), (s += 0 === u ? "\n\tAnimationGroups:" : ""), (s += "\n\t\t" + q.toString(d)); + } + for (u = 0, h = e.cameras.length; u < h; u++) { + (K = e.cameras[u])._waitingParentId && ((K.parent = e.getLastEntryByID(K._waitingParentId)), (K._waitingParentId = null)); + } + for (u = 0, h = e.lights.length; u < h; u++) { + var Q = e.lights[u]; + Q && Q._waitingParentId && ((Q.parent = e.getLastEntryByID(Q._waitingParentId)), (Q._waitingParentId = null)); + } + for (u = 0, h = e.transformNodes.length; u < h; u++) { + var J = e.transformNodes[u]; + J._waitingParentId && ((J.parent = e.getLastEntryByID(J._waitingParentId)), (J._waitingParentId = null)); + } + for (u = 0, h = e.meshes.length; u < h; u++) { + (X = e.meshes[u])._waitingParentId && ((X.parent = e.getLastEntryByID(X._waitingParentId)), (X._waitingParentId = null)), X._waitingData.lods && Ga(e, X); + } + for (u = 0, h = e.skeletons.length; u < h; u++) { + (z = e.skeletons[u])._hasWaitingData && + (null != z.bones && + z.bones.forEach(function (t) { + if (t._waitingTransformNodeId) { + var n = e.getLastEntryByID(t._waitingTransformNodeId); + n && t.linkTransformNode(n), (t._waitingTransformNodeId = null); + } + }), + (z._hasWaitingData = null)); + } + for (u = 0, h = e.meshes.length; u < h; u++) { + var $ = e.meshes[u]; + $._waitingData.freezeWorldMatrix ? ($.freezeWorldMatrix(), ($._waitingData.freezeWorldMatrix = null)) : $.computeWorldMatrix(!0); + } + for (u = 0, h = e.lights.length; u < h; u++) { + var ee = e.lights[u]; + if (ee._excludedMeshesIds.length > 0) { + for (var te = 0; te < ee._excludedMeshesIds.length; te++) { + var ne = e.getMeshByID(ee._excludedMeshesIds[te]); + ne && ee.excludedMeshes.push(ne); + } + ee._excludedMeshesIds = []; + } + if (ee._includedOnlyMeshesIds.length > 0) { + for (var ie = 0; ie < ee._includedOnlyMeshesIds.length; ie++) { + var re = e.getMeshByID(ee._includedOnlyMeshesIds[ie]); + re && ee.includedOnlyMeshes.push(re); + } + ee._includedOnlyMeshesIds = []; + } + } + for (i.a.Parse(l, e, a, n), u = 0, h = e.meshes.length; u < h; u++) { + (X = e.meshes[u])._waitingData.actions && (A.Parse(X._waitingData.actions, X, e), (X._waitingData.actions = null)); + } + void 0 !== l.actions && null !== l.actions && A.Parse(l.actions, null, e); + } catch (e) { + var oe = Va("loadAssets", l ? l.producer : "Unknown") + s; + if (!r) throw (g.a.Log(oe), e); + r(oe, e); + } finally { + o || a.removeAllFromScene(), null !== s && $i.a.loggingLevel !== $i.a.NO_LOGGING && g.a.Log(Va("loadAssets", l ? l.producer : "Unknown") + ($i.a.loggingLevel !== $i.a.MINIMAL_LOGGING ? s : "")); + } + return a; + }; + $i.a.RegisterPlugin({ + name: "babylon.js", + extensions: ".babylon", + canDirectLoad: function (e) { + return -1 !== e.indexOf("babylon"); + }, + importMesh: function (e, t, n, r, o, a, s, c) { + var l = "importMesh has failed JSON parse"; + try { + var u = JSON.parse(n); + l = ""; + var h = $i.a.loggingLevel === $i.a.DETAILED_LOGGING; + e ? Array.isArray(e) || (e = [e]) : (e = null); + var d = new Array(); + if (void 0 !== u.meshes && null !== u.meshes) { + var p, + f, + m, + b = [], + _ = []; + for (p = 0, f = u.meshes.length; p < f; p++) { + var v = u.meshes[p]; + if (null === e || Ba(v, e, d)) { + if ((null !== e && delete e[e.indexOf(v.name)], void 0 !== v.geometryId && null !== v.geometryId && void 0 !== u.geometries && null !== u.geometries)) { + var y = !1; + ["boxes", "spheres", "cylinders", "toruses", "grounds", "planes", "torusKnots", "vertexData"].forEach(function (e) { + !0 !== y && + u.geometries[e] && + Array.isArray(u.geometries[e]) && + u.geometries[e].forEach(function (n) { + if (n.id === v.geometryId) { + switch (e) { + case "vertexData": + xa.a.Parse(n, t, r); + } + y = !0; + } + }); + }), + !1 === y && g.a.Warn("Geometry not found for mesh " + v.id); + } + if (v.materialId) { + var C = -1 !== _.indexOf(v.materialId); + if (!1 === C && void 0 !== u.multiMaterials && null !== u.multiMaterials) + for (var P = 0, x = u.multiMaterials.length; P < x; P++) { + var T = u.multiMaterials[P]; + if (T.id === v.materialId) { + for (var S = 0, O = T.materials.length; S < O; S++) { + var E, + M = T.materials[S]; + _.push(M), (E = ja(M, u, t, r)) && (l += "\n\tMaterial " + E.toString(h)); + } + _.push(T.id); + var A = Ta.a.ParseMultiMaterial(T, t); + A && ((C = !0), (l += "\n\tMulti-Material " + A.toString(h))); + break; + } + } + if (!1 === C) _.push(v.materialId), (E = ja(v.materialId, u, t, r)) ? (l += "\n\tMaterial " + E.toString(h)) : g.a.Warn("Material not found for mesh " + v.id); + } + if (v.skeletonId > -1 && void 0 !== u.skeletons && null !== u.skeletons) + if (!1 === b.indexOf(v.skeletonId) > -1) + for (var I = 0, D = u.skeletons.length; I < D; I++) { + var R = u.skeletons[I]; + if (R.id === v.skeletonId) { + var w = Ue.a.Parse(R, t); + s.push(w), b.push(R.id), (l += "\n\tSkeleton " + w.toString(h)); + } + } + if (void 0 !== u.morphTargetManagers && null !== u.morphTargetManagers) + for (var L = 0, F = u.morphTargetManagers; L < F.length; L++) { + var N = F[L]; + Ma.a.Parse(N, t); + } + var k = Ee.a.Parse(v, t, r); + o.push(k), (l += "\n\tMesh " + k.toString(h)); + } + } + for (p = 0, f = t.meshes.length; p < f; p++) (m = t.meshes[p])._waitingParentId && ((m.parent = t.getLastEntryByID(m._waitingParentId)), (m._waitingParentId = null)), m._waitingData.lods && Ga(t, m); + for (p = 0, f = t.skeletons.length; p < f; p++) { + (w = t.skeletons[p])._hasWaitingData && + (null != w.bones && + w.bones.forEach(function (e) { + if (e._waitingTransformNodeId) { + var n = t.getLastEntryByID(e._waitingTransformNodeId); + n && e.linkTransformNode(n), (e._waitingTransformNodeId = null); + } + }), + (w._hasWaitingData = null)); + } + for (p = 0, f = t.meshes.length; p < f; p++) (m = t.meshes[p])._waitingData.freezeWorldMatrix ? (m.freezeWorldMatrix(), (m._waitingData.freezeWorldMatrix = null)) : m.computeWorldMatrix(!0); + } + if (void 0 !== u.particleSystems && null !== u.particleSystems) { + var z = i.a.GetIndividualParser(me.a.NAME_PARTICLESYSTEM); + if (z) + for (p = 0, f = u.particleSystems.length; p < f; p++) { + var j = u.particleSystems[p]; + -1 !== d.indexOf(j.emitterId) && a.push(z(j, t, r)); + } + } + return !0; + } catch (e) { + var B = Va("importMesh", u ? u.producer : "Unknown") + l; + if (!c) throw (g.a.Log(B), e); + c(B, e); + } finally { + null !== l && $i.a.loggingLevel !== $i.a.NO_LOGGING && g.a.Log(Va("importMesh", u ? u.producer : "Unknown") + ($i.a.loggingLevel !== $i.a.MINIMAL_LOGGING ? l : "")); + } + return !1; + }, + load: function (e, t, n, i) { + var r = "importScene has failed JSON parse"; + try { + var o = JSON.parse(t); + if ( + ((r = ""), + void 0 !== o.useDelayedTextureLoading && null !== o.useDelayedTextureLoading && (e.useDelayedTextureLoading = o.useDelayedTextureLoading && !$i.a.ForceFullSceneLoadingForIncremental), + void 0 !== o.autoClear && null !== o.autoClear && (e.autoClear = o.autoClear), + void 0 !== o.clearColor && null !== o.clearColor && (e.clearColor = s.b.FromArray(o.clearColor)), + void 0 !== o.ambientColor && null !== o.ambientColor && (e.ambientColor = s.a.FromArray(o.ambientColor)), + void 0 !== o.gravity && null !== o.gravity && (e.gravity = a.e.FromArray(o.gravity)), + o.fogMode && 0 !== o.fogMode) + ) + switch (((e.fogMode = o.fogMode), (e.fogColor = s.a.FromArray(o.fogColor)), (e.fogStart = o.fogStart), (e.fogEnd = o.fogEnd), (e.fogDensity = o.fogDensity), (r += "\tFog mode for scene: "), e.fogMode)) { + case 1: + r += "exp\n"; + break; + case 2: + r += "exp2\n"; + break; + case 3: + r += "linear\n"; + } + if (o.physicsEnabled) { + var c; + "cannon" === o.physicsEngine + ? (c = new Da(void 0, void 0, za.LoaderInjectedPhysicsEngine)) + : "oimo" === o.physicsEngine + ? (c = new Ra(void 0, za.LoaderInjectedPhysicsEngine)) + : "ammo" === o.physicsEngine && (c = new Fa(void 0, za.LoaderInjectedPhysicsEngine, void 0)), + (r = "\tPhysics engine " + (o.physicsEngine ? o.physicsEngine : "oimo") + " enabled\n"); + var l = o.physicsGravity ? a.e.FromArray(o.physicsGravity) : null; + e.enablePhysics(l, c); + } + if ((void 0 !== o.metadata && null !== o.metadata && (e.metadata = o.metadata), void 0 !== o.collisionsEnabled && null !== o.collisionsEnabled && (e.collisionsEnabled = o.collisionsEnabled), !Ua(e, t, n, i, !0))) + return !1; + if ( + (o.autoAnimate && e.beginAnimation(e, o.autoAnimateFrom, o.autoAnimateTo, o.autoAnimateLoop, o.autoAnimateSpeed || 1), + void 0 !== o.activeCameraID && null !== o.activeCameraID && e.setActiveCameraByID(o.activeCameraID), + void 0 !== o.environmentTexture && null !== o.environmentTexture) + ) { + var u = void 0 === o.isPBR || o.isPBR; + if (o.environmentTextureType && "BABYLON.HDRCubeTexture" === o.environmentTextureType) { + var h = o.environmentTextureSize ? o.environmentTextureSize : 128, + d = new Ea(n + o.environmentTexture, e, h, !0, !u); + o.environmentTextureRotationY && (d.rotationY = o.environmentTextureRotationY), (e.environmentTexture = d); + } else if ($r.a.EndsWith(o.environmentTexture, ".env")) { + var p = new Ar.a(n + o.environmentTexture, e); + o.environmentTextureRotationY && (p.rotationY = o.environmentTextureRotationY), (e.environmentTexture = p); + } else { + var f = Ar.a.CreateFromPrefilteredData(n + o.environmentTexture, e); + o.environmentTextureRotationY && (f.rotationY = o.environmentTextureRotationY), (e.environmentTexture = f); + } + if (!0 === o.createDefaultSkybox) { + var m = void 0 !== e.activeCamera && null !== e.activeCamera ? (e.activeCamera.maxZ - e.activeCamera.minZ) / 2 : 1e3, + b = o.skyboxBlurLevel || 0; + e.createDefaultSkybox(e.environmentTexture, u, m, b); + } + } + return !0; + } catch (e) { + var _ = Va("importScene", o ? o.producer : "Unknown") + r; + if (!i) throw (g.a.Log(_), e); + i(_, e); + } finally { + null !== r && $i.a.loggingLevel !== $i.a.NO_LOGGING && g.a.Log(Va("importScene", o ? o.producer : "Unknown") + ($i.a.loggingLevel !== $i.a.MINIMAL_LOGGING ? r : "")); + } + return !1; + }, + loadAssetContainer: function (e, t, n, i) { + return Ua(e, t, n, i); + }, + }); + var Ha = n(103), + Wa = n(162), + Xa = (function () { + function e() { + (this._isEnabled = !0), (this.leftColor = s.a.White()), (this.rightColor = s.a.Black()), (this.bias = 0), (this.power = 1); + } + return ( + Object.defineProperty(e.prototype, "isEnabled", { + get: function () { + return this._isEnabled; + }, + set: function (e) { + this._isEnabled !== e && ((this._isEnabled = e), ue.a.MarkAllMaterialsAsDirty(20)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.clone = function () { + var t = new e(); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.isEnabled = this.isEnabled), (e.leftColor = this.leftColor.asArray()), (e.rightColor = this.rightColor.asArray()), (e.bias = this.bias), (e.power = this.power), e; + }), + (e.Parse = function (t) { + var n = new e(); + return (n.isEnabled = t.isEnabled), (n.leftColor = s.a.FromArray(t.leftColor)), (n.rightColor = s.a.FromArray(t.rightColor)), (n.bias = t.bias), (n.power = t.power || 1), n; + }), + e + ); + })(); + He.a._FresnelParametersParser = Xa.Parse; + var Ya = n(95), + Ka = n(160), + Za = n(199), + qa = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i._useMicroSurfaceFromReflectivityMapAlpha = !0), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "PBRSpecularGlossinessMaterial"; + }), + (t.prototype.clone = function (e) { + var n = this, + i = He.a.Clone(function () { + return new t(e, n.getScene()); + }, this); + return (i.id = e), (i.name = e), this.clearCoat.copyTo(i.clearCoat), this.anisotropy.copyTo(i.anisotropy), this.brdf.copyTo(i.brdf), this.sheen.copyTo(i.sheen), this.subSurface.copyTo(i.subSurface), i; + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + return ( + (e.customType = "BABYLON.PBRSpecularGlossinessMaterial"), + (e.clearCoat = this.clearCoat.serialize()), + (e.anisotropy = this.anisotropy.serialize()), + (e.brdf = this.brdf.serialize()), + (e.sheen = this.sheen.serialize()), + (e.subSurface = this.subSurface.serialize()), + e + ); + }), + (t.Parse = function (e, n, i) { + var r = He.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + return ( + e.clearCoat && r.clearCoat.parse(e.clearCoat, n, i), + e.anisotropy && r.anisotropy.parse(e.anisotropy, n, i), + e.brdf && r.brdf.parse(e.brdf, n, i), + e.sheen && r.sheen.parse(e.sheen, n, i), + e.subSurface && r.subSurface.parse(e.subSurface, n, i), + r + ); + }), + Object(h.c)([Object(He.e)("diffuse"), Object(He.b)("_markAllSubMeshesAsTexturesDirty", "_albedoColor")], t.prototype, "diffuseColor", void 0), + Object(h.c)([Object(He.m)(), Object(He.b)("_markAllSubMeshesAsTexturesDirty", "_albedoTexture")], t.prototype, "diffuseTexture", void 0), + Object(h.c)([Object(He.e)("specular"), Object(He.b)("_markAllSubMeshesAsTexturesDirty", "_reflectivityColor")], t.prototype, "specularColor", void 0), + Object(h.c)([Object(He.c)(), Object(He.b)("_markAllSubMeshesAsTexturesDirty", "_microSurface")], t.prototype, "glossiness", void 0), + Object(h.c)([Object(He.m)(), Object(He.b)("_markAllSubMeshesAsTexturesDirty", "_reflectivityTexture")], t.prototype, "specularGlossinessTexture", void 0), + t + ); + })(Ka.a); + c.a.RegisteredTypes["BABYLON.PBRSpecularGlossinessMaterial"] = qa; + var Qa = n(106), + Ja = (function (e) { + function t(t, n) { + var i = e.call(this, n) || this; + return t + ? ((i._engine = n.getEngine()), + (i._textureMatrix = a.a.Identity()), + (i.name = t), + (i.url = t), + (i.hasAlpha = !1), + (i.isCube = !1), + (i.is3D = i._engine.webGLVersion > 1), + (i.wrapU = 0), + (i.wrapV = 0), + (i.wrapR = 0), + (i.anisotropicFilteringLevel = 1), + (i._texture = i._getFromCache(t, !0)), + i._texture || (n.useDelayedTextureLoading ? (i.delayLoadState = 4) : i.loadTexture()), + i) + : i; + } + return ( + Object(h.d)(t, e), + (t.prototype.getTextureMatrix = function () { + return this._textureMatrix; + }), + (t.prototype.load3dlTexture = function () { + var e, + n = this._engine; + (e = 1 === n.webGLVersion ? n.createRawTexture(null, 1, 1, 5, !1, !1, 2, null, 0) : n.createRawTexture3D(null, 1, 1, 1, 5, !1, !1, 2, null, 0)), (this._texture = e); + var i = function (i) { + if ("string" == typeof i) { + for (var r, o = null, a = null, s = i.split("\n"), c = 0, l = 0, u = 0, h = 0, d = 0, p = 0; p < s.length; p++) + if (((r = s[p]), t._noneEmptyLineRegex.test(r) && 0 !== r.indexOf("#"))) { + var f = r.split(" "); + if (0 !== c) { + if (0 != c) { + var m = Math.max(parseInt(f[0]), 0), + g = Math.max(parseInt(f[1]), 0), + b = Math.max(parseInt(f[2]), 0); + (d = Math.max(m, d)), (d = Math.max(g, d)), (d = Math.max(b, d)); + var _ = 4 * (l + h * c + u * c * c); + a && ((a[_ + 0] = m), (a[_ + 1] = g), (a[_ + 2] = b)), ++u % c == 0 && ((u = 0), ++h % c == 0 && (l++, (h = 0))); + } + } else (c = f.length), (o = new Uint8Array(c * c * c * 4)), (a = new Float32Array(c * c * c * 4)); + } + if (a && o) + for (p = 0; p < a.length; p++) + if (p > 0 && (p + 1) % 4 == 0) o[p] = 255; + else { + var v = a[p]; + o[p] = (v / d) * 255; + } + e.is3D ? (e.updateSize(c, c, c), n.updateRawTexture3D(e, o, 5, !1)) : (e.updateSize(c * c, c), n.updateRawTexture(e, o, 5, !1)); + } + }, + r = this.getScene(); + return r ? r._loadFile(this.url, i) : this._engine._loadFile(this.url, i), this._texture; + }), + (t.prototype.loadTexture = function () { + this.url && this.url.toLocaleLowerCase().indexOf(".3dl") == this.url.length - 4 && this.load3dlTexture(); + }), + (t.prototype.clone = function () { + var e = new t(this.url, this.getScene()); + return (e.level = this.level), e; + }), + (t.prototype.delayLoad = function () { + 4 === this.delayLoadState && ((this.delayLoadState = 1), (this._texture = this._getFromCache(this.url, !0)), this._texture || this.loadTexture()); + }), + (t.Parse = function (e, n) { + var i = null; + return e.name && !e.isRenderTarget && (((i = new t(e.name, n)).name = e.name), (i.level = e.level)), i; + }), + (t.prototype.serialize = function () { + if (!this.name) return null; + var e = {}; + return (e.name = this.name), (e.level = this.level), (e.customType = "BABYLON.ColorGradingTexture"), e; + }), + (t._noneEmptyLineRegex = /\S+/), + t + ); + })(Cr.a); + c.a.RegisteredTypes["BABYLON.ColorGradingTexture"] = Ja; + var $a = (function (e) { + function t(t, n, i, r, o, a, s) { + void 0 === r && (r = !1), void 0 === o && (o = !0), void 0 === a && (a = null), void 0 === s && (s = null); + var c = e.call(this, n) || this; + if (((c._onLoad = null), (c._onError = null), (c.coordinatesMode = ln.a.CUBIC_MODE), !t)) throw new Error("Image url is not set"); + return ( + (c.name = t), + (c.url = t), + (c._size = i), + (c._noMipmap = r), + (c.gammaSpace = o), + (c._onLoad = a), + (c._onError = s), + (c.hasAlpha = !1), + (c.isCube = !0), + (c._texture = c._getFromCache(t, c._noMipmap)), + c._texture + ? a && + (c._texture.isReady + ? $e.b.SetImmediate(function () { + return a(); + }) + : c._texture.onLoadedObservable.add(a)) + : n.useDelayedTextureLoading + ? (c.delayLoadState = 4) + : c.loadImage(c.loadTexture.bind(c), c._onError), + c + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.loadImage = function (e, t) { + var n = this, + i = document.createElement("canvas"), + r = new Image(); + r.addEventListener("load", function () { + (n._width = r.width), (n._height = r.height), (i.width = n._width), (i.height = n._height); + var t = i.getContext("2d"); + t.drawImage(r, 0, 0); + var o = t.getImageData(0, 0, r.width, r.height); + (n._buffer = o.data.buffer), i.remove(), e(); + }), + r.addEventListener("error", function (e) { + t && t(n.getClassName() + " could not be loaded", e); + }), + (r.src = this.url); + }), + (t.prototype.loadTexture = function () { + var e = this, + n = this.getScene(); + n && + (this._texture = n.getEngine().createRawCubeTextureFromUrl( + this.url, + n, + this._size, + 4, + n.getEngine().getCaps().textureFloat ? 1 : 7, + this._noMipmap, + function () { + for (var n = e.getFloat32ArrayFromArrayBuffer(e._buffer), i = Sa.ConvertPanoramaToCubemap(n, e._width, e._height, e._size), r = [], o = 0; o < 6; o++) { + var a = i[t._FacesMapping[o]]; + r.push(a); + } + return r; + }, + null, + this._onLoad, + this._onError + )); + }), + (t.prototype.getFloat32ArrayFromArrayBuffer = function (e) { + for (var t = new DataView(e), n = new Float32Array((3 * e.byteLength) / 4), i = 0, r = 0; r < e.byteLength; r++) (r + 1) % 4 != 0 && (n[i++] = t.getUint8(r) / 255); + return n; + }), + (t.prototype.getClassName = function () { + return "EquiRectangularCubeTexture"; + }), + (t.prototype.clone = function () { + var e = this.getScene(); + if (!e) return this; + var n = new t(this.url, e, this._size, this._noMipmap, this.gammaSpace); + return (n.level = this.level), (n.wrapU = this.wrapU), (n.wrapV = this.wrapV), (n.coordinatesIndex = this.coordinatesIndex), (n.coordinatesMode = this.coordinatesMode), n; + }), + (t._FacesMapping = ["right", "left", "up", "down", "front", "back"]), + t + ); + })(Cr.a), + es = (function () { + function e() {} + return ( + (e.GetTGAHeader = function (e) { + var t = 0; + return { + id_length: e[t++], + colormap_type: e[t++], + image_type: e[t++], + colormap_index: e[t++] | (e[t++] << 8), + colormap_length: e[t++] | (e[t++] << 8), + colormap_size: e[t++], + origin: [e[t++] | (e[t++] << 8), e[t++] | (e[t++] << 8)], + width: e[t++] | (e[t++] << 8), + height: e[t++] | (e[t++] << 8), + pixel_size: e[t++], + flags: e[t++], + }; + }), + (e.UploadContent = function (t, n) { + if (n.length < 19) g.a.Error("Unable to load TGA file - Not enough data to contain header"); + else { + var i = 18, + r = e.GetTGAHeader(n); + if (r.id_length + i > n.length) g.a.Error("Unable to load TGA file - Not enough data"); + else { + i += r.id_length; + var o, + a = !1, + s = !1, + c = !1; + switch (r.image_type) { + case e._TYPE_RLE_INDEXED: + a = !0; + case e._TYPE_INDEXED: + s = !0; + break; + case e._TYPE_RLE_RGB: + a = !0; + case e._TYPE_RGB: + break; + case e._TYPE_RLE_GREY: + a = !0; + case e._TYPE_GREY: + c = !0; + } + var l, + u, + h, + d, + p, + f, + m, + b = r.pixel_size >> 3, + _ = r.width * r.height * b; + if ((s && (l = n.subarray(i, (i += r.colormap_length * (r.colormap_size >> 3)))), a)) { + var v, y, C; + o = new Uint8Array(_); + for (var P = 0, x = new Uint8Array(b); i < _ && P < _; ) + if (((y = 1 + (127 & (v = n[i++]))), 128 & v)) { + for (C = 0; C < b; ++C) x[C] = n[i++]; + for (C = 0; C < y; ++C) o.set(x, P + C * b); + P += b * y; + } else { + for (y *= b, C = 0; C < y; ++C) o[P + C] = n[i++]; + P += y; + } + } else o = n.subarray(i, (i += s ? r.width * r.height : _)); + switch ((r.flags & e._ORIGIN_MASK) >> e._ORIGIN_SHIFT) { + default: + case e._ORIGIN_UL: + (u = 0), (d = 1), (m = r.width), (h = 0), (p = 1), (f = r.height); + break; + case e._ORIGIN_BL: + (u = 0), (d = 1), (m = r.width), (h = r.height - 1), (p = -1), (f = -1); + break; + case e._ORIGIN_UR: + (u = r.width - 1), (d = -1), (m = -1), (h = 0), (p = 1), (f = r.height); + break; + case e._ORIGIN_BR: + (u = r.width - 1), (d = -1), (m = -1), (h = r.height - 1), (p = -1), (f = -1); + } + var T = e["_getImageData" + (c ? "Grey" : "") + r.pixel_size + "bits"](r, l, o, h, p, f, u, d, m); + t.getEngine()._uploadDataToTextureDirectly(t, T); + } + } + }), + (e._getImageData8bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h, + d = n, + p = t, + f = e.width, + m = e.height, + g = 0, + b = new Uint8Array(f * m * 4); + for (h = i; h !== o; h += r) + for (u = a; u !== c; u += s, g++) (l = d[g]), (b[4 * (u + f * h) + 3] = 255), (b[4 * (u + f * h) + 2] = p[3 * l + 0]), (b[4 * (u + f * h) + 1] = p[3 * l + 1]), (b[4 * (u + f * h) + 0] = p[3 * l + 2]); + return b; + }), + (e._getImageData16bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h, + d = n, + p = e.width, + f = e.height, + m = 0, + g = new Uint8Array(p * f * 4); + for (h = i; h !== o; h += r) + for (u = a; u !== c; u += s, m += 2) { + var b = ((255 * ((31744 & (l = d[m + 0] + (d[m + 1] << 8))) >> 10)) / 31) | 0, + _ = ((255 * ((992 & l) >> 5)) / 31) | 0, + v = ((255 * (31 & l)) / 31) | 0; + (g[4 * (u + p * h) + 0] = b), (g[4 * (u + p * h) + 1] = _), (g[4 * (u + p * h) + 2] = v), (g[4 * (u + p * h) + 3] = 32768 & l ? 0 : 255); + } + return g; + }), + (e._getImageData24bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h = n, + d = e.width, + p = e.height, + f = 0, + m = new Uint8Array(d * p * 4); + for (u = i; u !== o; u += r) for (l = a; l !== c; l += s, f += 3) (m[4 * (l + d * u) + 3] = 255), (m[4 * (l + d * u) + 2] = h[f + 0]), (m[4 * (l + d * u) + 1] = h[f + 1]), (m[4 * (l + d * u) + 0] = h[f + 2]); + return m; + }), + (e._getImageData32bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h = n, + d = e.width, + p = e.height, + f = 0, + m = new Uint8Array(d * p * 4); + for (u = i; u !== o; u += r) for (l = a; l !== c; l += s, f += 4) (m[4 * (l + d * u) + 2] = h[f + 0]), (m[4 * (l + d * u) + 1] = h[f + 1]), (m[4 * (l + d * u) + 0] = h[f + 2]), (m[4 * (l + d * u) + 3] = h[f + 3]); + return m; + }), + (e._getImageDataGrey8bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h, + d = n, + p = e.width, + f = e.height, + m = 0, + g = new Uint8Array(p * f * 4); + for (h = i; h !== o; h += r) for (u = a; u !== c; u += s, m++) (l = d[m]), (g[4 * (u + p * h) + 0] = l), (g[4 * (u + p * h) + 1] = l), (g[4 * (u + p * h) + 2] = l), (g[4 * (u + p * h) + 3] = 255); + return g; + }), + (e._getImageDataGrey16bits = function (e, t, n, i, r, o, a, s, c) { + var l, + u, + h = n, + d = e.width, + p = e.height, + f = 0, + m = new Uint8Array(d * p * 4); + for (u = i; u !== o; u += r) for (l = a; l !== c; l += s, f += 2) (m[4 * (l + d * u) + 0] = h[f + 0]), (m[4 * (l + d * u) + 1] = h[f + 0]), (m[4 * (l + d * u) + 2] = h[f + 0]), (m[4 * (l + d * u) + 3] = h[f + 1]); + return m; + }), + (e._TYPE_INDEXED = 1), + (e._TYPE_RGB = 2), + (e._TYPE_GREY = 3), + (e._TYPE_RLE_INDEXED = 9), + (e._TYPE_RLE_RGB = 10), + (e._TYPE_RLE_GREY = 11), + (e._ORIGIN_MASK = 48), + (e._ORIGIN_SHIFT = 4), + (e._ORIGIN_BL = 0), + (e._ORIGIN_BR = 1), + (e._ORIGIN_UL = 2), + (e._ORIGIN_UR = 3), + e + ); + })(), + ts = (function () { + function e() { + this.supportCascades = !1; + } + return ( + (e.prototype.canLoad = function (e) { + return $r.a.EndsWith(e, ".tga"); + }), + (e.prototype.loadCubeData = function (e, t, n, i, r) { + throw ".env not supported in Cube."; + }), + (e.prototype.loadData = function (e, t, n) { + var i = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), + r = es.GetTGAHeader(i); + n(r.width, r.height, t.generateMipMaps, !1, function () { + es.UploadContent(t, i); + }); + }), + e + ); + })(); + ue.a._TextureLoaders.push(new ts()); + var ns, + is = function () {}; + !(function (e) { + (e[(e.cTFETC1 = 0)] = "cTFETC1"), + (e[(e.cTFBC1 = 1)] = "cTFBC1"), + (e[(e.cTFBC4 = 2)] = "cTFBC4"), + (e[(e.cTFPVRTC1_4_OPAQUE_ONLY = 3)] = "cTFPVRTC1_4_OPAQUE_ONLY"), + (e[(e.cTFBC7_M6_OPAQUE_ONLY = 4)] = "cTFBC7_M6_OPAQUE_ONLY"), + (e[(e.cTFETC2 = 5)] = "cTFETC2"), + (e[(e.cTFBC3 = 6)] = "cTFBC3"), + (e[(e.cTFBC5 = 7)] = "cTFBC5"); + })(ns || (ns = {})); + var rs = (function () { + function e() {} + return ( + (e.GetInternalFormatFromBasisFormat = function (e) { + if (e === ns.cTFETC1) return 36196; + if (e === ns.cTFBC1) return 33776; + if (e === ns.cTFBC3) return 33779; + throw "The chosen Basis transcoder format is not currently supported"; + }), + (e._CreateWorkerAsync = function () { + var t = this; + return ( + this._WorkerPromise || + (this._WorkerPromise = new Promise(function (n) { + t._Worker + ? n(t._Worker) + : $e.b.LoadFileAsync(e.WasmModuleURL).then(function (i) { + var r = URL.createObjectURL(new Blob(["(" + os + ")()"], { type: "application/javascript" })); + t._Worker = new Worker(r); + var o = function (e) { + "init" === e.data.action && (t._Worker.removeEventListener("message", o), n(t._Worker)); + }; + t._Worker.addEventListener("message", o), t._Worker.postMessage({ action: "init", url: e.JSModuleURL, wasmBinary: i }); + }); + })), + this._WorkerPromise + ); + }), + (e.TranscodeAsync = function (e, t) { + var n = this, + i = e instanceof ArrayBuffer ? new Uint8Array(e) : e; + return new Promise(function (e, r) { + n._CreateWorkerAsync().then(function () { + var o = n._actionId++, + a = function (t) { + "transcode" === t.data.action && t.data.id === o && (n._Worker.removeEventListener("message", a), t.data.success ? e(t.data) : r("Transcode is not supported on this device")); + }; + n._Worker.addEventListener("message", a); + var s = new Uint8Array(i.byteLength); + s.set(new Uint8Array(i.buffer, i.byteOffset, i.byteLength)), n._Worker.postMessage({ action: "transcode", id: o, imageData: s, config: t, ignoreSupportedFormats: n._IgnoreSupportedFormats }, [s.buffer]); + }); + }); + }), + (e.LoadTextureFromTranscodeResult = function (t, n) { + for ( + var i, + r = t.getEngine(), + o = function () { + if (((i = n.fileInfo.images[a].levels[0]), (t._invertVScale = t.invertY), -1 === n.format)) + if (((t.type = 10), (t.format = 4), r.webGLVersion < 2 && (z.a.Log2(i.width) % 1 != 0 || z.a.Log2(i.height) % 1 != 0))) { + var o = new pn.a(r, pn.b.Temp); + (t._invertVScale = t.invertY), + (o.type = 10), + (o.format = 4), + (o.width = (i.width + 3) & -4), + (o.height = (i.height + 3) & -4), + r._bindTextureDirectly(r._gl.TEXTURE_2D, o, !0), + r._uploadDataToTextureDirectly(o, i.transcodedPixels, a, 0, 4, !0), + r._rescaleTexture(o, t, r.scenes[0], r._getInternalFormat(4), function () { + r._releaseTexture(o), r._bindTextureDirectly(r._gl.TEXTURE_2D, t, !0); + }); + } else (t._invertVScale = !t.invertY), (t.width = (i.width + 3) & -4), (t.height = (i.height + 3) & -4), r._uploadDataToTextureDirectly(t, i.transcodedPixels, a, 0, 4, !0); + else + (t.width = i.width), + (t.height = i.height), + n.fileInfo.images[a].levels.forEach(function (i, o) { + r._uploadCompressedDataToTextureDirectly(t, e.GetInternalFormatFromBasisFormat(n.format), i.width, i.height, i.transcodedPixels, a, o); + }), + r.webGLVersion < 2 && + (z.a.Log2(t.width) % 1 != 0 || z.a.Log2(t.height) % 1 != 0) && + ($e.b.Warn( + "Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1." + ), + (t._cachedWrapU = ln.a.CLAMP_ADDRESSMODE), + (t._cachedWrapV = ln.a.CLAMP_ADDRESSMODE)); + }, + a = 0; + a < n.fileInfo.images.length; + a++ + ) + o(); + }), + (e._IgnoreSupportedFormats = !1), + (e.JSModuleURL = "assets/babylonjs/basis_transcoder.js"), + (e.WasmModuleURL = "assets/babylonjs/basis_transcoder.wasm"), + (e._WorkerPromise = null), + (e._Worker = null), + (e._actionId = 0), + e + ); + })(); + function os() { + var e = 0, + t = 1, + n = 5, + i = 6, + r = null; + function o(e, t, n, i, r) { + var o = e.getImageTranscodedSizeInBytes(t, n, i), + a = new Uint8Array(o); + if (!e.transcodeImage(a, t, n, i, 1, 0)) return null; + r && + (a = (function (e, t, n, i) { + for (var r = new Uint16Array(4), o = new Uint16Array(n * i), a = n / 4, s = i / 4, c = 0; c < s; c++) + for (var l = 0; l < a; l++) { + var u = t + 8 * (c * a + l); + (r[0] = e[u] | (e[u + 1] << 8)), + (r[1] = e[u + 2] | (e[u + 3] << 8)), + (r[2] = ((2 * (31 & r[0]) + 1 * (31 & r[1])) / 3) | (((2 * (2016 & r[0]) + 1 * (2016 & r[1])) / 3) & 2016) | (((2 * (63488 & r[0]) + 1 * (63488 & r[1])) / 3) & 63488)), + (r[3] = ((2 * (31 & r[1]) + 1 * (31 & r[0])) / 3) | (((2 * (2016 & r[1]) + 1 * (2016 & r[0])) / 3) & 2016) | (((2 * (63488 & r[1]) + 1 * (63488 & r[0])) / 3) & 63488)); + for (var h = 0; h < 4; h++) { + var d = e[u + 4 + h], + p = (4 * c + h) * n + 4 * l; + (o[p++] = r[3 & d]), (o[p++] = r[(d >> 2) & 3]), (o[p++] = r[(d >> 4) & 3]), (o[p++] = r[(d >> 6) & 3]); + } + } + return o; + })(a, 0, (e.getImageWidth(t, n) + 3) & -4, (e.getImageHeight(t, n) + 3) & -4)); + return a; + } + onmessage = function (a) { + if ("init" === a.data.action) + r || + ((Module = { wasmBinary: a.data.wasmBinary }), + importScripts(a.data.url), + (r = new Promise(function (e) { + Module.onRuntimeInitialized = function () { + Module.initializeBasis(), e(); + }; + }))), + r.then(function () { + postMessage({ action: "init" }); + }); + else if ("transcode" === a.data.action) { + var s = a.data.config, + c = a.data.imageData, + l = new Module.BasisFile(c), + u = (function (e) { + for (var t = e.getHasAlpha(), n = e.getNumImages(), i = [], r = 0; r < n; r++) { + for (var o = { levels: [] }, a = e.getNumLevels(r), s = 0; s < a; s++) { + var c = { width: e.getImageWidth(r, s), height: e.getImageHeight(r, s) }; + o.levels.push(c); + } + i.push(o); + } + return { hasAlpha: t, images: i }; + })(l), + h = a.data.ignoreSupportedFormats + ? null + : (function (r, o) { + var a = null; + r.supportedCompressionFormats && + (r.supportedCompressionFormats.etc1 ? (a = e) : r.supportedCompressionFormats.s3tc ? (a = o.hasAlpha ? i : t) : r.supportedCompressionFormats.pvrtc || (r.supportedCompressionFormats.etc2 && (a = n))); + return a; + })(a.data.config, u), + d = !1; + null === h && ((d = !0), (h = u.hasAlpha ? i : t)); + var p = !0; + l.startTranscoding() || (p = !1); + for (var f = [], m = 0; m < u.images.length && p; m++) { + var g = u.images[m]; + if (void 0 === s.loadSingleImage || s.loadSingleImage === m) { + var b = g.levels.length; + !1 === s.loadMipmapLevels && (b = 1); + for (var _ = 0; _ < b; _++) { + var v = g.levels[_], + y = o(l, m, _, h, d); + if (!y) { + p = !1; + break; + } + (v.transcodedPixels = y), f.push(v.transcodedPixels.buffer); + } + } + } + l.close(), l.delete(), d && (h = -1), p ? postMessage({ action: "transcode", success: p, id: a.data.id, fileInfo: u, format: h }, f) : postMessage({ action: "transcode", success: p, id: a.data.id }); + } + }; + } + var as = (function () { + function e() { + this.supportCascades = !0; + } + return ( + (e.prototype.canLoad = function (e) { + return $r.a.EndsWith(e, ".basis"); + }), + (e.prototype.loadCubeData = function (e, t, n, i, r) { + if (!Array.isArray(e)) { + var o = t.getEngine().getCaps(), + a = { supportedCompressionFormats: { etc1: !!o.etc1, s3tc: !!o.s3tc, pvrtc: !!o.pvrtc, etc2: !!o.etc2 } }; + rs.TranscodeAsync(e, a) + .then(function (e) { + var n = e.fileInfo.images[0].levels.length > 1 && t.generateMipMaps; + rs.LoadTextureFromTranscodeResult(t, e), t.getEngine()._setCubeMapTextureParams(n), (t.isReady = !0), t.onLoadedObservable.notifyObservers(t), t.onLoadedObservable.clear(), i && i(); + }) + .catch(function (e) { + $e.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"), (t.isReady = !0); + }); + } + }), + (e.prototype.loadData = function (e, t, n) { + var i = t.getEngine().getCaps(), + r = { supportedCompressionFormats: { etc1: !!i.etc1, s3tc: !!i.s3tc, pvrtc: !!i.pvrtc, etc2: !!i.etc2 } }; + rs.TranscodeAsync(e, r) + .then(function (e) { + var i = e.fileInfo.images[0].levels[0], + r = e.fileInfo.images[0].levels.length > 1 && t.generateMipMaps; + n(i.width, i.height, r, -1 !== e.format, function () { + rs.LoadTextureFromTranscodeResult(t, e); + }); + }) + .catch(function (e) { + $e.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"), n(0, 0, !1, !1, function () {}); + }); + }), + e + ); + })(); + ue.a._TextureLoaders.push(new as()), + (Mi.a.prototype.unBindMultiColorAttachmentFramebuffer = function (e, t, n) { + void 0 === t && (t = !1), (this._currentRenderTarget = null); + var i = this._gl; + if (e[0]._MSAAFramebuffer) { + i.bindFramebuffer(i.READ_FRAMEBUFFER, e[0]._MSAAFramebuffer), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, e[0]._framebuffer); + var r = e[0]._attachments; + r || ((r = new Array(e.length)), (e[0]._attachments = r)); + for (var o = 0; o < e.length; o++) { + for (var a = e[o], s = 0; s < r.length; s++) r[s] = i.NONE; + (r[o] = i[this.webGLVersion > 1 ? "COLOR_ATTACHMENT" + o : "COLOR_ATTACHMENT" + o + "_WEBGL"]), + i.readBuffer(r[o]), + i.drawBuffers(r), + i.blitFramebuffer(0, 0, a.width, a.height, 0, 0, a.width, a.height, i.COLOR_BUFFER_BIT, i.NEAREST); + } + for (o = 0; o < r.length; o++) r[o] = i[this.webGLVersion > 1 ? "COLOR_ATTACHMENT" + o : "COLOR_ATTACHMENT" + o + "_WEBGL"]; + i.drawBuffers(r); + } + for (o = 0; o < e.length; o++) { + !(a = e[o]).generateMipMaps || t || a.isCube || (this._bindTextureDirectly(i.TEXTURE_2D, a, !0), i.generateMipmap(i.TEXTURE_2D), this._bindTextureDirectly(i.TEXTURE_2D, null)); + } + n && (e[0]._MSAAFramebuffer && this._bindUnboundFramebuffer(e[0]._framebuffer), n()), this._bindUnboundFramebuffer(null); + }), + (Mi.a.prototype.createMultipleRenderTarget = function (e, t) { + var n = !1, + i = !0, + r = !1, + o = !1, + a = 1, + s = new Array(), + c = new Array(); + void 0 !== t && + ((n = void 0 !== t.generateMipMaps && t.generateMipMaps), + (i = void 0 === t.generateDepthBuffer || t.generateDepthBuffer), + (r = void 0 !== t.generateStencilBuffer && t.generateStencilBuffer), + (o = void 0 !== t.generateDepthTexture && t.generateDepthTexture), + (a = t.textureCount || 1), + t.types && (s = t.types), + t.samplingModes && (c = t.samplingModes)); + var l = this._gl, + u = l.createFramebuffer(); + this._bindUnboundFramebuffer(u); + for (var h = e.width || e, d = e.height || e, p = [], f = [], m = this._setupFramebufferDepthAttachments(r, i, h, d), b = 0; b < a; b++) { + var _ = c[b] || 3, + v = s[b] || 0; + ((1 !== v || this._caps.textureFloatLinearFiltering) && (2 !== v || this._caps.textureHalfFloatLinearFiltering)) || (_ = 1); + var y = this._getSamplingParameters(_, n); + 1 !== v || this._caps.textureFloat || ((v = 0), g.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")); + var C = new pn.a(this, pn.b.MultiRenderTarget), + P = l[this.webGLVersion > 1 ? "COLOR_ATTACHMENT" + b : "COLOR_ATTACHMENT" + b + "_WEBGL"]; + p.push(C), + f.push(P), + l.activeTexture(l["TEXTURE" + b]), + l.bindTexture(l.TEXTURE_2D, C._webGLTexture), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MAG_FILTER, y.mag), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MIN_FILTER, y.min), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE), + l.texImage2D(l.TEXTURE_2D, 0, this._getRGBABufferInternalSizedFormat(v), h, d, 0, l.RGBA, this._getWebGLTextureType(v), null), + l.framebufferTexture2D(l.DRAW_FRAMEBUFFER, P, l.TEXTURE_2D, C._webGLTexture, 0), + n && this._gl.generateMipmap(this._gl.TEXTURE_2D), + this._bindTextureDirectly(l.TEXTURE_2D, null), + (C._framebuffer = u), + (C._depthStencilBuffer = m), + (C.baseWidth = h), + (C.baseHeight = d), + (C.width = h), + (C.height = d), + (C.isReady = !0), + (C.samples = 1), + (C.generateMipMaps = n), + (C.samplingMode = _), + (C.type = v), + (C._generateDepthBuffer = i), + (C._generateStencilBuffer = r), + (C._attachments = f), + this._internalTexturesCache.push(C); + } + if (o && this._caps.depthTextureExtension) { + var x = new pn.a(this, pn.b.MultiRenderTarget); + l.activeTexture(l.TEXTURE0), + l.bindTexture(l.TEXTURE_2D, x._webGLTexture), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MAG_FILTER, l.NEAREST), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MIN_FILTER, l.NEAREST), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE), + l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE), + l.texImage2D(l.TEXTURE_2D, 0, this.webGLVersion < 2 ? l.DEPTH_COMPONENT : l.DEPTH_COMPONENT16, h, d, 0, l.DEPTH_COMPONENT, l.UNSIGNED_SHORT, null), + l.framebufferTexture2D(l.FRAMEBUFFER, l.DEPTH_ATTACHMENT, l.TEXTURE_2D, x._webGLTexture, 0), + (x._framebuffer = u), + (x.baseWidth = h), + (x.baseHeight = d), + (x.width = h), + (x.height = d), + (x.isReady = !0), + (x.samples = 1), + (x.generateMipMaps = n), + (x.samplingMode = l.NEAREST), + (x._generateDepthBuffer = i), + (x._generateStencilBuffer = r), + p.push(x), + this._internalTexturesCache.push(x); + } + return l.drawBuffers(f), this._bindUnboundFramebuffer(null), this.resetTextureCache(), p; + }), + (Mi.a.prototype.updateMultipleRenderTargetTextureSampleCount = function (e, t) { + if (this.webGLVersion < 2 || !e || 0 == e.length) return 1; + if (e[0].samples === t) return t; + var n = this._gl; + (t = Math.min(t, this.getCaps().maxMSAASamples)), + e[0]._depthStencilBuffer && (n.deleteRenderbuffer(e[0]._depthStencilBuffer), (e[0]._depthStencilBuffer = null)), + e[0]._MSAAFramebuffer && (n.deleteFramebuffer(e[0]._MSAAFramebuffer), (e[0]._MSAAFramebuffer = null)); + for (var i = 0; i < e.length; i++) e[i]._MSAARenderBuffer && (n.deleteRenderbuffer(e[i]._MSAARenderBuffer), (e[i]._MSAARenderBuffer = null)); + if (t > 1 && n.renderbufferStorageMultisample) { + var r = n.createFramebuffer(); + if (!r) throw new Error("Unable to create multi sampled framebuffer"); + this._bindUnboundFramebuffer(r); + var o = this._setupFramebufferDepthAttachments(e[0]._generateStencilBuffer, e[0]._generateDepthBuffer, e[0].width, e[0].height, t), + a = []; + for (i = 0; i < e.length; i++) { + var s = e[i], + c = n[this.webGLVersion > 1 ? "COLOR_ATTACHMENT" + i : "COLOR_ATTACHMENT" + i + "_WEBGL"], + l = n.createRenderbuffer(); + if (!l) throw new Error("Unable to create multi sampled framebuffer"); + n.bindRenderbuffer(n.RENDERBUFFER, l), + n.renderbufferStorageMultisample(n.RENDERBUFFER, t, this._getRGBAMultiSampleBufferFormat(s.type), s.width, s.height), + n.framebufferRenderbuffer(n.FRAMEBUFFER, c, n.RENDERBUFFER, l), + (s._MSAAFramebuffer = r), + (s._MSAARenderBuffer = l), + (s.samples = t), + (s._depthStencilBuffer = o), + n.bindRenderbuffer(n.RENDERBUFFER, null), + a.push(c); + } + n.drawBuffers(a); + } else this._bindUnboundFramebuffer(e[0]._framebuffer); + return this._bindUnboundFramebuffer(null), t; + }); + var ss = (function (e) { + function t(t, n, i, r, o) { + var a = this, + s = !(!o || !o.generateMipMaps) && o.generateMipMaps, + c = !(!o || !o.generateDepthTexture) && o.generateDepthTexture, + l = !o || void 0 === o.doNotChangeAspectRatio || o.doNotChangeAspectRatio; + if ((((a = e.call(this, t, n, r, s, l) || this)._engine = r.getEngine()), a.isSupported)) { + for (var u = [], h = [], d = 0; d < i; d++) + o && o.types && void 0 !== o.types[d] ? u.push(o.types[d]) : u.push(o && o.defaultType ? o.defaultType : 0), + o && o.samplingModes && void 0 !== o.samplingModes[d] ? h.push(o.samplingModes[d]) : h.push(ln.a.BILINEAR_SAMPLINGMODE); + var p = !o || void 0 === o.generateDepthBuffer || o.generateDepthBuffer, + f = !(!o || void 0 === o.generateStencilBuffer) && o.generateStencilBuffer; + return ( + (a._size = n), + (a._multiRenderTargetOptions = { samplingModes: h, generateMipMaps: s, generateDepthBuffer: p, generateStencilBuffer: f, generateDepthTexture: c, types: u, textureCount: i }), + a._createInternalTextures(), + a._createTextures(), + a + ); + } + a.dispose(); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "isSupported", { + get: function () { + return this._engine.webGLVersion > 1 || this._engine.getCaps().drawBuffersExtension; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "textures", { + get: function () { + return this._textures; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "depthTexture", { + get: function () { + return this._textures[this._textures.length - 1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "wrapU", { + set: function (e) { + if (this._textures) for (var t = 0; t < this._textures.length; t++) this._textures[t].wrapU = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "wrapV", { + set: function (e) { + if (this._textures) for (var t = 0; t < this._textures.length; t++) this._textures[t].wrapV = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._rebuild = function () { + this.releaseInternalTextures(), this._createInternalTextures(); + for (var e = 0; e < this._internalTextures.length; e++) { + this._textures[e]._texture = this._internalTextures[e]; + } + this._texture = this._internalTextures[0]; + }), + (t.prototype._createInternalTextures = function () { + this._internalTextures = this._engine.createMultipleRenderTarget(this._size, this._multiRenderTargetOptions); + }), + (t.prototype._createTextures = function () { + this._textures = []; + for (var e = 0; e < this._internalTextures.length; e++) { + var t = new ln.a(null, this.getScene()); + (t._texture = this._internalTextures[e]), this._textures.push(t); + } + this._texture = this._internalTextures[0]; + }), + Object.defineProperty(t.prototype, "samples", { + get: function () { + return this._samples; + }, + set: function (e) { + this._samples !== e && (this._samples = this._engine.updateMultipleRenderTargetTextureSampleCount(this._internalTextures, e)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.resize = function (e) { + this.releaseInternalTextures(), (this._size = e), this._createInternalTextures(); + }), + (t.prototype.unbindFrameBuffer = function (e, t) { + var n = this; + e.unBindMultiColorAttachmentFramebuffer(this._internalTextures, this.isCube, function () { + n.onAfterRenderObservable.notifyObservers(t); + }); + }), + (t.prototype.dispose = function () { + this.releaseInternalTextures(), e.prototype.dispose.call(this); + }), + (t.prototype.releaseInternalTextures = function () { + if (this._internalTextures) for (var e = this._internalTextures.length - 1; e >= 0; e--) void 0 !== this._internalTextures[e] && (this._internalTextures[e].dispose(), this._internalTextures.splice(e, 1)); + }), + t + ); + })(mn.a), + cs = n(125), + ls = n(97), + us = (function (e) { + function t(t, n, i, r, o, a) { + var s = e.call(this, t, i, null, r, o, a) || this; + return (s._animate = !0), (s._time = 0), (s._texturePath = n), s._loadJson(n), (s.refreshRate = 1), s; + } + return ( + Object(h.d)(t, e), + (t.prototype._loadJson = function (e) { + var t = this, + n = function () { + g.a.Log("No config file found in " + e + " trying to use ShadersStore or DOM element"); + try { + t.setFragment(t._texturePath); + } catch (e) { + g.a.Error("No json or ShaderStore or DOM element found for CustomProceduralTexture"); + } + }, + i = e + "/config.json", + r = new ls.a(); + r.open("GET", i), + r.addEventListener( + "load", + function () { + if (200 === r.status || (r.responseText && r.responseText.length > 0)) + try { + (t._config = JSON.parse(r.response)), + t.updateShaderUniforms(), + t.updateTextures(), + t.setFragment(t._texturePath + "/custom"), + (t._animate = t._config.animate), + (t.refreshRate = t._config.refreshrate); + } catch (e) { + n(); + } + else n(); + }, + !1 + ), + r.addEventListener( + "error", + function () { + n(); + }, + !1 + ); + try { + r.send(); + } catch (e) { + g.a.Error("CustomProceduralTexture: Error on XHR send request."); + } + }), + (t.prototype.isReady = function () { + if (!e.prototype.isReady.call(this)) return !1; + for (var t in this._textures) { + if (!this._textures[t].isReady()) return !1; + } + return !0; + }), + (t.prototype.render = function (t) { + var n = this.getScene(); + this._animate && n && ((this._time += 0.03 * n.getAnimationRatio()), this.updateShaderUniforms()), e.prototype.render.call(this, t); + }), + (t.prototype.updateTextures = function () { + for (var e = 0; e < this._config.sampler2Ds.length; e++) this.setTexture(this._config.sampler2Ds[e].sample2Dname, new ln.a(this._texturePath + "/" + this._config.sampler2Ds[e].textureRelativeUrl, this.getScene())); + }), + (t.prototype.updateShaderUniforms = function () { + if (this._config) + for (var e = 0; e < this._config.uniforms.length; e++) { + var t = this._config.uniforms[e]; + switch (t.type) { + case "float": + this.setFloat(t.name, t.value); + break; + case "color3": + this.setColor3(t.name, new s.a(t.r, t.g, t.b)); + break; + case "color4": + this.setColor4(t.name, new s.b(t.r, t.g, t.b, t.a)); + break; + case "vector2": + this.setVector2(t.name, new a.d(t.x, t.y)); + break; + case "vector3": + this.setVector3(t.name, new a.e(t.x, t.y, t.z)); + } + } + this.setFloat("time", this._time); + }), + Object.defineProperty(t.prototype, "animate", { + get: function () { + return this._animate; + }, + set: function (e) { + this._animate = e; + }, + enumerable: !0, + configurable: !0, + }), + t + ); + })(cs.a), + hs = + "\n\nuniform float brightness;\nuniform float persistence;\nuniform float timeScale;\n\nvarying vec2 vUV;\n\nvec2 hash22(vec2 p)\n{\np=p*mat2(127.1,311.7,269.5,183.3);\np=-1.0+2.0*fract(sin(p)*43758.5453123);\nreturn sin(p*6.283+timeScale);\n}\nfloat interpolationNoise(vec2 p)\n{\nvec2 pi=floor(p);\nvec2 pf=p-pi;\nvec2 w=pf*pf*(3.-2.*pf);\nfloat f00=dot(hash22(pi+vec2(.0,.0)),pf-vec2(.0,.0));\nfloat f01=dot(hash22(pi+vec2(.0,1.)),pf-vec2(.0,1.));\nfloat f10=dot(hash22(pi+vec2(1.0,0.)),pf-vec2(1.0,0.));\nfloat f11=dot(hash22(pi+vec2(1.0,1.)),pf-vec2(1.0,1.));\nfloat xm1=mix(f00,f10,w.x);\nfloat xm2=mix(f01,f11,w.x);\nfloat ym=mix(xm1,xm2,w.y);\nreturn ym;\n}\nfloat perlinNoise2D(float x,float y)\n{\nfloat sum=0.0;\nfloat frequency=0.0;\nfloat amplitude=0.0;\nfor(int i=0; i 0; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isConnectedInVertexShader", { + get: function () { + if (this.target === ps.Vertex) return !0; + if (!this.hasEndpoints) return !1; + for (var e = 0, t = this._endpoints; e < t.length; e++) { + var n = t[e]; + if (n.ownerBlock.target === ps.Vertex) return !0; + if (n.target === ps.Vertex) return !0; + if ( + (n.ownerBlock.target === ps.Neutral || n.ownerBlock.target === ps.VertexAndFragment) && + n.ownerBlock.outputs.some(function (e) { + return e.isConnectedInVertexShader; + }) + ) + return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isConnectedInFragmentShader", { + get: function () { + if (this.target === ps.Fragment) return !0; + if (!this.hasEndpoints) return !1; + for (var e = 0, t = this._endpoints; e < t.length; e++) { + var n = t[e]; + if (n.ownerBlock.target === ps.Fragment) return !0; + if ( + (n.ownerBlock.target === ps.Neutral || n.ownerBlock.target === ps.VertexAndFragment) && + n.ownerBlock.outputs.some(function (e) { + return e.isConnectedInFragmentShader; + }) + ) + return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "NodeMaterialConnectionPoint"; + }), + (e.prototype.canConnectTo = function (e) { + return this.checkCompatibilityState(e) === bs.Compatible; + }), + (e.prototype.checkCompatibilityState = function (e) { + if (this._ownerBlock.target === ps.Fragment) { + var t = e.ownerBlock; + if (t.target === ps.Vertex) return bs.TargetIncompatible; + for (var n = 0, i = t.outputs; n < i.length; n++) { + if (i[n].isConnectedInVertexShader) return bs.TargetIncompatible; + } + } + if (this.type !== e.type && e.innerType !== fs.AutoDetect) { + switch (this.type) { + case fs.Vector3: + if (e.type === fs.Color3) return bs.Compatible; + break; + case fs.Vector4: + if (e.type === fs.Color4) return bs.Compatible; + break; + case fs.Color3: + if (e.type === fs.Vector3) return bs.Compatible; + break; + case fs.Color4: + if (e.type === fs.Vector4) return bs.Compatible; + } + return e.acceptedConnectionPointTypes && -1 !== e.acceptedConnectionPointTypes.indexOf(this.type) ? bs.Compatible : bs.TypeIncompatible; + } + return e.excludedConnectionPointTypes && -1 !== e.excludedConnectionPointTypes.indexOf(this.type) ? 1 : bs.Compatible; + }), + (e.prototype.connectTo = function (e, t) { + if ((void 0 === t && (t = !1), !t && !this.canConnectTo(e))) throw "Cannot connect these two connectors."; + return this._endpoints.push(e), (e._connectedPoint = this), (this._enforceAssociatedVariableName = !1), this.onConnectionObservable.notifyObservers(e), e.onConnectionObservable.notifyObservers(this), this; + }), + (e.prototype.disconnectFrom = function (e) { + var t = this._endpoints.indexOf(e); + return -1 === t || (this._endpoints.splice(t, 1), (e._connectedPoint = null), (this._enforceAssociatedVariableName = !1), (e._enforceAssociatedVariableName = !1)), this; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.name = this.name), this.connectedPoint && ((e.inputName = this.name), (e.targetBlockId = this.connectedPoint.ownerBlock.uniqueId), (e.targetConnectionName = this.connectedPoint.name)), e; + }), + (e.prototype.dispose = function () { + this.onConnectionObservable.clear(); + }), + e + ); + })(), + As = n(205), + Is = (function () { + function e(e, t, n, i) { + void 0 === t && (t = ps.Vertex), + void 0 === n && (n = !1), + void 0 === i && (i = !1), + (this._isFinalMerger = !1), + (this._isInput = !1), + (this._isUnique = !1), + (this.inputsAreExclusive = !1), + (this._codeVariableName = ""), + (this._inputs = new Array()), + (this._outputs = new Array()), + (this.comments = ""), + (this.name = e), + (this._target = t), + (this._isFinalMerger = n), + (this._isInput = i), + (this.uniqueId = As.a.UniqueId); + } + return ( + Object.defineProperty(e.prototype, "isUnique", { + get: function () { + return this._isUnique; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isFinalMerger", { + get: function () { + return this._isFinalMerger; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isInput", { + get: function () { + return this._isInput; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "buildId", { + get: function () { + return this._buildId; + }, + set: function (e) { + this._buildId = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "target", { + get: function () { + return this._target; + }, + set: function (e) { + 0 == (this._target & e) && (this._target = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "inputs", { + get: function () { + return this._inputs; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "outputs", { + get: function () { + return this._outputs; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getInputByName = function (e) { + var t = this._inputs.filter(function (t) { + return t.name === e; + }); + return t.length ? t[0] : null; + }), + (e.prototype.getOutputByName = function (e) { + var t = this._outputs.filter(function (t) { + return t.name === e; + }); + return t.length ? t[0] : null; + }), + (e.prototype.initialize = function (e) {}), + (e.prototype.bind = function (e, t, n) {}), + (e.prototype._declareOutput = function (e, t) { + return t._getGLType(e.type) + " " + e.associatedVariableName; + }), + (e.prototype._writeVariable = function (e) { + return e.connectedPoint ? "" + e.associatedVariableName : "0."; + }), + (e.prototype._writeFloat = function (e) { + var t = e.toString(); + return -1 === t.indexOf(".") && (t += ".0"), "" + t; + }), + (e.prototype.getClassName = function () { + return "NodeMaterialBlock"; + }), + (e.prototype.registerInput = function (e, t, n, i) { + void 0 === n && (n = !1); + var r = new Ms(e, this, _s.Input); + return (r.type = t), (r.isOptional = n), i && (r.target = i), this._inputs.push(r), this; + }), + (e.prototype.registerOutput = function (e, t, n) { + var i = new Ms(e, this, _s.Output); + return (i.type = t), n && (i.target = n), this._outputs.push(i), this; + }), + (e.prototype.getFirstAvailableInput = function (e) { + void 0 === e && (e = null); + for (var t = 0, n = this._inputs; t < n.length; t++) { + var i = n[t]; + if (!(i.connectedPoint || (e && e.type !== i.type && i.type !== fs.AutoDetect))) return i; + } + return null; + }), + (e.prototype.getFirstAvailableOutput = function (e) { + void 0 === e && (e = null); + for (var t = 0, n = this._outputs; t < n.length; t++) { + var i = n[t]; + if (!e || !e.target || e.target === ps.Neutral || 0 != (e.target & i.target)) return i; + } + return null; + }), + (e.prototype.getSiblingOutput = function (e) { + var t = this._outputs.indexOf(e); + return -1 === t || t >= this._outputs.length ? null : this._outputs[t + 1]; + }), + (e.prototype.connectTo = function (e, t) { + if (0 !== this._outputs.length) { + for (var n = t && t.output ? this.getOutputByName(t.output) : this.getFirstAvailableOutput(e), i = !0; i; ) { + var r = t && t.input ? e.getInputByName(t.input) : e.getFirstAvailableInput(n); + if (n && r && n.canConnectTo(r)) n.connectTo(r), (i = !1); + else { + if (!n) throw "Unable to find a compatible match"; + n = this.getSiblingOutput(n); + } + } + return this; + } + }), + (e.prototype._buildBlock = function (e) {}), + (e.prototype.updateUniformsAndSamples = function (e, t, n, i) {}), + (e.prototype.provideFallbacks = function (e, t) {}), + (e.prototype.initializeDefines = function (e, t, n, i) { + void 0 === i && (i = !1); + }), + (e.prototype.prepareDefines = function (e, t, n, i) { + void 0 === i && (i = !1); + }), + (e.prototype.autoConfigure = function (e) {}), + (e.prototype.replaceRepeatableContent = function (e, t, n, i) {}), + (e.prototype.isReady = function (e, t, n, i) { + return void 0 === i && (i = !1), !0; + }), + (e.prototype._linkConnectionTypes = function (e, t) { + (this._inputs[e]._linkedConnectionSource = this._inputs[t]), (this._inputs[t]._linkedConnectionSource = this._inputs[e]); + }), + (e.prototype._processBuild = function (e, t, n, i) { + e.build(t, i); + var r = null != t._vertexState, + o = e._buildTarget === ps.Vertex && e.target !== ps.VertexAndFragment; + if (r && (0 == (e.target & e._buildTarget) || 0 == (e.target & n.target) || (this.target !== ps.VertexAndFragment && o)) && ((!e.isInput && t.target !== e._buildTarget) || (e.isInput && e.isAttribute))) { + var a = n.connectedPoint; + t._vertexState._emitVaryingFromString("v_" + a.associatedVariableName, t._getGLType(a.type)) && (t._vertexState.compilationString += "v_" + a.associatedVariableName + " = " + a.associatedVariableName + ";\r\n"), + (n.associatedVariableName = "v_" + a.associatedVariableName), + (n._enforceAssociatedVariableName = !0); + } + }), + (e.prototype.build = function (e, t) { + if (this._buildId === e.sharedData.buildId) return !0; + if (!this.isInput) + for (var n = 0, i = this._outputs; n < i.length; n++) { + (l = i[n]).associatedVariableName || (l.associatedVariableName = e._getFreeVariableName(l.name)); + } + for (var r = 0, o = this._inputs; r < o.length; r++) { + var a = o[r]; + if (a.connectedPoint) { + if (this.target !== ps.Neutral) { + if (0 == (a.target & this.target)) continue; + if (0 == (a.target & e.target)) continue; + } + (d = a.connectedPoint.ownerBlock) && d !== this && this._processBuild(d, e, a, t); + } else a.isOptional || e.sharedData.checks.notConnectedNonOptionalInputs.push(a); + } + if (this._buildId === e.sharedData.buildId) return !0; + if ((e.sharedData.verbose, this.isFinalMerger)) + switch (e.target) { + case ps.Vertex: + e.sharedData.checks.emitVertex = !0; + break; + case ps.Fragment: + e.sharedData.checks.emitFragment = !0; + } + !this.isInput && e.sharedData.emitComments && (e.compilationString += "\r\n//" + this.name + "\r\n"), this._buildBlock(e), (this._buildId = e.sharedData.buildId), (this._buildTarget = e.target); + for (var s = 0, c = this._outputs; s < c.length; s++) { + var l; + if (0 != ((l = c[s]).target & e.target)) + for (var u = 0, h = l.endpoints; u < h.length; u++) { + var d, + p = h[u]; + (d = p.ownerBlock) && 0 != (d.target & e.target) && -1 !== t.indexOf(d) && this._processBuild(d, e, p, t); + } + } + return !1; + }), + (e.prototype._inputRename = function (e) { + return e; + }), + (e.prototype._outputRename = function (e) { + return e; + }), + (e.prototype._dumpPropertiesCode = function () { + return ""; + }), + (e.prototype._dumpCode = function (e, t) { + var n; + t.push(this); + var i = this.name.replace(/[^A-Za-z_]+/g, ""); + if (((this._codeVariableName = i || this.getClassName() + "_" + this.uniqueId), -1 !== e.indexOf(this._codeVariableName))) { + var r = 0; + do { + r++, (this._codeVariableName = i + r); + } while (-1 !== e.indexOf(this._codeVariableName)); + } + e.push(this._codeVariableName), + (n = "\r\n// " + this.getClassName() + "\r\n"), + this.comments && (n += "// " + this.comments + "\r\n"), + (n += "var " + this._codeVariableName + " = new BABYLON." + this.getClassName() + '("' + this.name + '");\r\n'), + (n += this._dumpPropertiesCode()); + for (var o = 0, a = this.inputs; o < a.length; o++) { + var s = a[o]; + if (s.isConnected) { + var c = s.connectedPoint.ownerBlock; + -1 === t.indexOf(c) && (n += c._dumpCode(e, t)); + } + } + for (var l = 0, u = this.outputs; l < u.length; l++) { + var h = u[l]; + if (h.hasEndpoints) + for (var d = 0, p = h.endpoints; d < p.length; d++) { + (c = p[d].ownerBlock) && -1 === t.indexOf(c) && (n += c._dumpCode(e, t)); + } + } + return n; + }), + (e.prototype._dumpCodeForOutputConnections = function (e) { + var t = ""; + if (-1 !== e.indexOf(this)) return t; + e.push(this); + for (var n = 0, i = this.inputs; n < i.length; n++) { + var r = i[n]; + if (r.isConnected) { + var o = r.connectedPoint, + a = o.ownerBlock; + (t += a._dumpCodeForOutputConnections(e)), (t += a._codeVariableName + "." + a._outputRename(o.name) + ".connectTo(" + this._codeVariableName + "." + this._inputRename(r.name) + ");\r\n"); + } + } + return t; + }), + (e.prototype.clone = function (e, t) { + void 0 === t && (t = ""); + var n = this.serialize(), + i = c.a.GetClass(n.customType); + if (i) { + var r = new i(); + return r._deserialize(n, e, t), r; + } + return null; + }), + (e.prototype.serialize = function () { + var e = {}; + (e.customType = "BABYLON." + this.getClassName()), (e.id = this.uniqueId), (e.name = this.name), (e.comments = this.comments), (e.inputs = []); + for (var t = 0, n = this.inputs; t < n.length; t++) { + var i = n[t]; + e.inputs.push(i.serialize()); + } + return e; + }), + (e.prototype._deserialize = function (e, t, n) { + (this.name = e.name), (this.comments = e.comments); + }), + (e.prototype.dispose = function () { + for (var e = 0, t = this.inputs; e < t.length; e++) { + t[e].dispose(); + } + for (var n = 0, i = this.outputs; n < i.length; n++) { + i[n].dispose(); + } + }), + e + ); + })(), + Ds = (function () { + function e() { + (this.supportUniformBuffers = !1), + (this.attributes = new Array()), + (this.uniforms = new Array()), + (this.constants = new Array()), + (this.samplers = new Array()), + (this.functions = {}), + (this.extensions = {}), + (this.counters = {}), + (this._attributeDeclaration = ""), + (this._uniformDeclaration = ""), + (this._constantDeclaration = ""), + (this._samplerDeclaration = ""), + (this._varyingTransfer = ""), + (this._repeatableContentAnchorIndex = 0), + (this._builtCompilationString = ""), + (this.compilationString = ""); + } + return ( + (e.prototype.finalize = function (e) { + var t = e.sharedData.emitComments, + n = this.target === ps.Fragment; + (this.compilationString = "\r\n" + (t ? "//Entry point\r\n" : "") + "void main(void) {\r\n" + this.compilationString), + this._constantDeclaration && (this.compilationString = "\r\n" + (t ? "//Constants\r\n" : "") + this._constantDeclaration + "\r\n" + this.compilationString); + var i = ""; + for (var r in this.functions) i += this.functions[r] + "\r\n"; + for (var o in ((this.compilationString = "\r\n" + i + "\r\n" + this.compilationString), + !n && this._varyingTransfer && (this.compilationString = this.compilationString + "\r\n" + this._varyingTransfer), + (this.compilationString = this.compilationString + "\r\n}"), + this.sharedData.varyingDeclaration && (this.compilationString = "\r\n" + (t ? "//Varyings\r\n" : "") + this.sharedData.varyingDeclaration + "\r\n" + this.compilationString), + this._samplerDeclaration && (this.compilationString = "\r\n" + (t ? "//Samplers\r\n" : "") + this._samplerDeclaration + "\r\n" + this.compilationString), + this._uniformDeclaration && (this.compilationString = "\r\n" + (t ? "//Uniforms\r\n" : "") + this._uniformDeclaration + "\r\n" + this.compilationString), + this._attributeDeclaration && !n && (this.compilationString = "\r\n" + (t ? "//Attributes\r\n" : "") + this._attributeDeclaration + "\r\n" + this.compilationString), + this.extensions)) { + var a = this.extensions[o]; + this.compilationString = "\r\n" + a + "\r\n" + this.compilationString; + } + this._builtCompilationString = this.compilationString; + }), + Object.defineProperty(e.prototype, "_repeatableContentAnchor", { + get: function () { + return "###___ANCHOR" + this._repeatableContentAnchorIndex++ + "___###"; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._getFreeVariableName = function (e) { + return ( + (e = e.replace(/[^a-zA-Z_]+/g, "")), + void 0 === this.sharedData.variableNames[e] + ? ((this.sharedData.variableNames[e] = 0), "output" === e || "texture" === e ? e + this.sharedData.variableNames[e] : e) + : (this.sharedData.variableNames[e]++, e + this.sharedData.variableNames[e]) + ); + }), + (e.prototype._getFreeDefineName = function (e) { + return void 0 === this.sharedData.defineNames[e] ? (this.sharedData.defineNames[e] = 0) : this.sharedData.defineNames[e]++, e + this.sharedData.defineNames[e]; + }), + (e.prototype._excludeVariableName = function (e) { + this.sharedData.variableNames[e] = 0; + }), + (e.prototype._emit2DSampler = function (e) { + (this._samplerDeclaration += "uniform sampler2D " + e + ";\r\n"), this.samplers.push(e); + }), + (e.prototype._getGLType = function (e) { + switch (e) { + case fs.Float: + return "float"; + case fs.Int: + return "int"; + case fs.Vector2: + return "vec2"; + case fs.Color3: + case fs.Vector3: + return "vec3"; + case fs.Color4: + case fs.Vector4: + return "vec4"; + case fs.Matrix: + return "mat4"; + } + return ""; + }), + (e.prototype._emitExtension = function (e, t) { + this.extensions[e] || (this.extensions[e] = t); + }), + (e.prototype._emitFunction = function (e, t, n) { + this.functions[e] || (this.sharedData.emitComments && (t = n + "\r\n" + t), (this.functions[e] = t)); + }), + (e.prototype._emitCodeFromInclude = function (e, t, n) { + if (n && n.repeatKey) return "#include<" + e + ">[0.." + n.repeatKey + "]\r\n"; + var i = Xt.a.IncludesShadersStore[e] + "\r\n"; + if ((this.sharedData.emitComments && (i = t + "\r\n" + i), !n)) return i; + if (n.replaceStrings) + for (var r = 0; r < n.replaceStrings.length; r++) { + var o = n.replaceStrings[r]; + i = i.replace(o.search, o.replace); + } + return i; + }), + (e.prototype._emitFunctionFromInclude = function (e, t, n, i) { + void 0 === i && (i = ""); + var r = e + i; + if (!this.functions[r]) { + if (!(n && (n.removeAttributes || n.removeUniforms || n.removeVaryings || n.removeIfDef || n.replaceStrings))) + return ( + n && n.repeatKey ? (this.functions[r] = "#include<" + e + ">[0.." + n.repeatKey + "]\r\n") : (this.functions[r] = "#include<" + e + ">\r\n"), + void (this.sharedData.emitComments && (this.functions[r] = t + "\r\n" + this.functions[r])) + ); + if ( + ((this.functions[r] = Xt.a.IncludesShadersStore[e]), + this.sharedData.emitComments && (this.functions[r] = t + "\r\n" + this.functions[r]), + n.removeIfDef && + ((this.functions[r] = this.functions[r].replace(/^\s*?#ifdef.+$/gm, "")), + (this.functions[r] = this.functions[r].replace(/^\s*?#endif.*$/gm, "")), + (this.functions[r] = this.functions[r].replace(/^\s*?#else.*$/gm, "")), + (this.functions[r] = this.functions[r].replace(/^\s*?#elif.*$/gm, ""))), + n.removeAttributes && (this.functions[r] = this.functions[r].replace(/^\s*?attribute.+$/gm, "")), + n.removeUniforms && (this.functions[r] = this.functions[r].replace(/^\s*?uniform.+$/gm, "")), + n.removeVaryings && (this.functions[r] = this.functions[r].replace(/^\s*?varying.+$/gm, "")), + n.replaceStrings) + ) + for (var o = 0; o < n.replaceStrings.length; o++) { + var a = n.replaceStrings[o]; + this.functions[r] = this.functions[r].replace(a.search, a.replace); + } + } + }), + (e.prototype._registerTempVariable = function (e) { + return -1 === this.sharedData.temps.indexOf(e) && (this.sharedData.temps.push(e), !0); + }), + (e.prototype._emitVaryingFromString = function (e, t, n, i) { + return ( + void 0 === n && (n = ""), + void 0 === i && (i = !1), + -1 === this.sharedData.varyings.indexOf(e) && + (this.sharedData.varyings.push(e), + n && ($r.a.StartsWith(n, "defined(") ? (this.sharedData.varyingDeclaration += "#if " + n + "\r\n") : (this.sharedData.varyingDeclaration += (i ? "#ifndef" : "#ifdef") + " " + n + "\r\n")), + (this.sharedData.varyingDeclaration += "varying " + t + " " + e + ";\r\n"), + n && (this.sharedData.varyingDeclaration += "#endif\r\n"), + !0) + ); + }), + (e.prototype._emitUniformFromString = function (e, t, n, i) { + void 0 === n && (n = ""), + void 0 === i && (i = !1), + -1 === this.uniforms.indexOf(e) && + (this.uniforms.push(e), + n && (this._uniformDeclaration += (i ? "#ifndef" : "#ifdef") + " " + n + "\r\n"), + (this._uniformDeclaration += "uniform " + t + " " + e + ";\r\n"), + n && (this._uniformDeclaration += "#endif\r\n")); + }), + (e.prototype._emitFloat = function (e) { + return e.toString() === e.toFixed(0) ? e + ".0" : e.toString(); + }), + e + ); + })(), + Rs = (function () { + function e() { + (this.temps = new Array()), + (this.varyings = new Array()), + (this.varyingDeclaration = ""), + (this.inputBlocks = new Array()), + (this.textureBlocks = new Array()), + (this.bindableBlocks = new Array()), + (this.blocksWithFallbacks = new Array()), + (this.blocksWithDefines = new Array()), + (this.repeatableContentBlocks = new Array()), + (this.dynamicUniformBlocks = new Array()), + (this.blockingBlocks = new Array()), + (this.animatedInputs = new Array()), + (this.variableNames = {}), + (this.defineNames = {}), + (this.hints = { needWorldViewMatrix: !1, needWorldViewProjectionMatrix: !1, needAlphaBlending: !1, needAlphaTesting: !1 }), + (this.checks = { emitVertex: !1, emitFragment: !1, notConnectedNonOptionalInputs: new Array() }), + (this.variableNames.position = 0), + (this.variableNames.normal = 0), + (this.variableNames.tangent = 0), + (this.variableNames.uv = 0), + (this.variableNames.uv2 = 0), + (this.variableNames.uv3 = 0), + (this.variableNames.uv4 = 0), + (this.variableNames.uv4 = 0), + (this.variableNames.uv5 = 0), + (this.variableNames.uv6 = 0), + (this.variableNames.color = 0), + (this.variableNames.matricesIndices = 0), + (this.variableNames.matricesWeights = 0), + (this.variableNames.matricesIndicesExtra = 0), + (this.variableNames.matricesWeightsExtra = 0), + (this.variableNames.diffuseBase = 0), + (this.variableNames.specularBase = 0), + (this.variableNames.worldPos = 0), + (this.variableNames.shadow = 0), + (this.variableNames.vTBN = 0), + (this.defineNames.MAINUV0 = 0), + (this.defineNames.MAINUV1 = 0), + (this.defineNames.MAINUV2 = 0), + (this.defineNames.MAINUV3 = 0), + (this.defineNames.MAINUV4 = 0), + (this.defineNames.MAINUV5 = 0), + (this.defineNames.MAINUV6 = 0), + (this.defineNames.MAINUV7 = 0); + } + return ( + (e.prototype.emitErrors = function () { + var e = ""; + this.checks.emitVertex || (e += "NodeMaterial does not have a vertex output. You need to at least add a block that generates a glPosition value.\r\n"), + this.checks.emitFragment || (e += "NodeMaterial does not have a fragment output. You need to at least add a block that generates a glFragColor value.\r\n"); + for (var t = 0, n = this.checks.notConnectedNonOptionalInputs; t < n.length; t++) { + var i = n[t]; + e += "input " + i.name + " from block " + i.ownerBlock.name + "[" + i.ownerBlock.getClassName() + "] is not connected and is not optional.\r\n"; + } + if (e) throw "Build of NodeMaterial failed:\r\n" + e; + }), + e + ); + })(), + ws = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex) || this; + return ( + (n.complementW = 1), + (n.complementZ = 0), + n.registerInput("vector", fs.AutoDetect), + n.registerInput("transform", fs.Matrix), + n.registerOutput("output", fs.Vector4), + n.registerOutput("xyz", fs.Vector3), + n._inputs[0].onConnectionObservable.add(function (e) { + if (e.ownerBlock.isInput) { + var t = e.ownerBlock; + ("normal" !== t.name && "tangent" !== t.name) || (n.complementW = 0); + } + }), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "TransformBlock"; + }), + Object.defineProperty(t.prototype, "vector", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyz", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "transform", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.vector, + i = this.transform; + if (n.connectedPoint) { + switch (n.connectedPoint.type) { + case fs.Vector2: + t.compilationString += + this._declareOutput(this.output, t) + + " = " + + i.associatedVariableName + + " * vec4(" + + n.associatedVariableName + + ", " + + this._writeFloat(this.complementZ) + + ", " + + this._writeFloat(this.complementW) + + ");\r\n"; + break; + case fs.Vector3: + case fs.Color3: + t.compilationString += this._declareOutput(this.output, t) + " = " + i.associatedVariableName + " * vec4(" + n.associatedVariableName + ", " + this._writeFloat(this.complementW) + ");\r\n"; + break; + default: + t.compilationString += this._declareOutput(this.output, t) + " = " + i.associatedVariableName + " * " + n.associatedVariableName + ";\r\n"; + } + this.xyz.hasEndpoints && (t.compilationString += this._declareOutput(this.xyz, t) + " = " + this.output.associatedVariableName + ".xyz;\r\n"); + } + return this; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.complementZ = this.complementZ), (t.complementW = this.complementW), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.complementZ = void 0 !== t.complementZ ? t.complementZ : 0), (this.complementW = void 0 !== t.complementW ? t.complementW : 1); + }), + (t.prototype._dumpPropertiesCode = function () { + var e = this._codeVariableName + ".complementZ = " + this.complementZ + ";\r\n"; + return (e += this._codeVariableName + ".complementW = " + this.complementW + ";\r\n"); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.TransformBlock"] = ws; + var Ls = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex, !0) || this; + return n.registerInput("vector", fs.Vector4), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VertexOutputBlock"; + }), + Object.defineProperty(t.prototype, "vector", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.vector; + return (t.compilationString += "gl_Position = " + n.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.VertexOutputBlock"] = Ls; + var Fs, + Ns = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment, !0) || this; + return n.registerInput("rgba", fs.Color4, !0), n.registerInput("rgb", fs.Color3, !0), n.registerInput("a", fs.Float, !0), n.rgb.acceptedConnectionPointTypes.push(fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "FragmentOutputBlock"; + }), + Object.defineProperty(t.prototype, "rgba", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgb", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "a", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.rgba, + i = this.rgb, + r = this.a; + if (((t.sharedData.hints.needAlphaBlending = n.isConnected || r.isConnected), n.connectedPoint)) + r.isConnected + ? (t.compilationString += "gl_FragColor = vec4(" + n.associatedVariableName + ".rgb, " + r.associatedVariableName + ");\r\n") + : (t.compilationString += "gl_FragColor = " + n.associatedVariableName + ";\r\n"); + else if (i.connectedPoint) { + var o = "1.0"; + r.connectedPoint && (o = r.associatedVariableName), + i.connectedPoint.type === fs.Float + ? (t.compilationString += "gl_FragColor = vec4(" + i.associatedVariableName + ", " + i.associatedVariableName + ", " + i.associatedVariableName + ", " + o + ");\r\n") + : (t.compilationString += "gl_FragColor = vec4(" + i.associatedVariableName + ", " + o + ");\r\n"); + } else t.sharedData.checks.notConnectedNonOptionalInputs.push(n); + return this; + }), + t + ); + })(Is); + (c.a.RegisteredTypes["BABYLON.FragmentOutputBlock"] = Ns), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Time = 1)] = "Time"); + })(Fs || (Fs = {})); + var ks = (function (e) { + function t(t, n, i) { + void 0 === n && (n = ps.Vertex), void 0 === i && (i = fs.AutoDetect); + var r = e.call(this, t, n, !1, !0) || this; + return ( + (r._mode = ms.Undefined), + (r._animationType = Fs.None), + (r.min = 0), + (r.max = 0), + (r.isBoolean = !1), + (r.matrixMode = 0), + (r._systemValue = null), + (r.visibleInInspector = !1), + (r.isConstant = !1), + (r.groupInInspector = ""), + (r.onValueChangedObservable = new o.c()), + (r._type = i), + r.setDefaultValue(), + r.registerOutput("output", i), + r + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "type", { + get: function () { + if (this._type === fs.AutoDetect) { + if (this.isUniform && null != this.value) { + if (!isNaN(this.value)) return (this._type = fs.Float), this._type; + switch (this.value.getClassName()) { + case "Vector2": + return (this._type = fs.Vector2), this._type; + case "Vector3": + return (this._type = fs.Vector3), this._type; + case "Vector4": + return (this._type = fs.Vector4), this._type; + case "Color3": + return (this._type = fs.Color3), this._type; + case "Color4": + return (this._type = fs.Color4), this._type; + case "Matrix": + return (this._type = fs.Matrix), this._type; + } + } + if (this.isAttribute) + switch (this.name) { + case "position": + case "normal": + case "tangent": + return (this._type = fs.Vector3), this._type; + case "uv": + case "uv2": + return (this._type = fs.Vector2), this._type; + case "matricesIndices": + case "matricesWeights": + case "world0": + case "world1": + case "world2": + case "world3": + return (this._type = fs.Vector4), this._type; + case "color": + return (this._type = fs.Color4), this._type; + } + if (this.isSystemValue) + switch (this._systemValue) { + case gs.World: + case gs.WorldView: + case gs.WorldViewProjection: + case gs.View: + case gs.ViewProjection: + case gs.Projection: + return (this._type = fs.Matrix), this._type; + case gs.CameraPosition: + return (this._type = fs.Vector3), this._type; + case gs.FogColor: + return (this._type = fs.Color3), this._type; + case gs.DeltaTime: + return (this._type = fs.Float), this._type; + } + } + return this._type; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setAsAttribute = function (e) { + return e && (this.name = e), (this._mode = ms.Attribute), this; + }), + (t.prototype.setAsSystemValue = function (e) { + return (this.systemValue = e), this; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._storedValue; + }, + set: function (e) { + this.type === fs.Float && (this.isBoolean ? (e = e ? 1 : 0) : this.min !== this.max && ((e = Math.max(this.min, e)), (e = Math.min(this.max, e)))), + (this._storedValue = e), + (this._mode = ms.Uniform), + this.onValueChangedObservable.notifyObservers(this); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "valueCallback", { + get: function () { + return this._valueCallback; + }, + set: function (e) { + (this._valueCallback = e), (this._mode = ms.Uniform); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "associatedVariableName", { + get: function () { + return this._associatedVariableName; + }, + set: function (e) { + this._associatedVariableName = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "animationType", { + get: function () { + return this._animationType; + }, + set: function (e) { + this._animationType = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isUndefined", { + get: function () { + return this._mode === ms.Undefined; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isUniform", { + get: function () { + return this._mode === ms.Uniform; + }, + set: function (e) { + (this._mode = e ? ms.Uniform : ms.Undefined), (this.associatedVariableName = ""); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isAttribute", { + get: function () { + return this._mode === ms.Attribute; + }, + set: function (e) { + (this._mode = e ? ms.Attribute : ms.Undefined), (this.associatedVariableName = ""); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isVarying", { + get: function () { + return this._mode === ms.Varying; + }, + set: function (e) { + (this._mode = e ? ms.Varying : ms.Undefined), (this.associatedVariableName = ""); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isSystemValue", { + get: function () { + return null != this._systemValue; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "systemValue", { + get: function () { + return this._systemValue; + }, + set: function (e) { + (this._mode = ms.Uniform), (this.associatedVariableName = ""), (this._systemValue = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "InputBlock"; + }), + (t.prototype.animate = function (e) { + switch (this._animationType) { + case Fs.Time: + this.type === fs.Float && (this.value += 0.01 * e.getAnimationRatio()); + } + }), + (t.prototype._emitDefine = function (e) { + return "!" === e[0] ? "#ifndef " + e.substring(1) + "\r\n" : "#ifdef " + e + "\r\n"; + }), + (t.prototype.initialize = function (e) { + this.associatedVariableName = ""; + }), + (t.prototype.setDefaultValue = function () { + switch (this.type) { + case fs.Float: + this.value = 0; + break; + case fs.Vector2: + this.value = a.d.Zero(); + break; + case fs.Vector3: + this.value = a.e.Zero(); + break; + case fs.Vector4: + this.value = a.f.Zero(); + break; + case fs.Color3: + this.value = s.a.White(); + break; + case fs.Color4: + this.value = new s.b(1, 1, 1, 1); + break; + case fs.Matrix: + this.value = a.a.Identity(); + } + }), + (t.prototype._emitConstant = function (e) { + switch (this.type) { + case fs.Float: + return "" + e._emitFloat(this.value); + case fs.Vector2: + return "vec2(" + this.value.x + ", " + this.value.y + ")"; + case fs.Vector3: + return "vec3(" + this.value.x + ", " + this.value.y + ", " + this.value.z + ")"; + case fs.Vector4: + return "vec4(" + this.value.x + ", " + this.value.y + ", " + this.value.z + ", " + this.value.w + ")"; + case fs.Color3: + return "vec3(" + this.value.r + ", " + this.value.g + ", " + this.value.b + ")"; + case fs.Color4: + return "vec4(" + this.value.r + ", " + this.value.g + ", " + this.value.b + ", " + this.value.a + ")"; + } + return ""; + }), + (t.prototype._emit = function (e, t) { + if (this.isUniform) { + if ((this.associatedVariableName || (this.associatedVariableName = e._getFreeVariableName("u_" + this.name)), this.isConstant)) { + if (-1 !== e.constants.indexOf(this.associatedVariableName)) return; + return e.constants.push(this.associatedVariableName), void (e._constantDeclaration += this._declareOutput(this.output, e) + " = " + this._emitConstant(e) + ";\r\n"); + } + if (-1 !== e.uniforms.indexOf(this.associatedVariableName)) return; + e.uniforms.push(this.associatedVariableName), + t && (e._uniformDeclaration += this._emitDefine(t)), + (e._uniformDeclaration += "uniform " + e._getGLType(this.type) + " " + this.associatedVariableName + ";\r\n"), + t && (e._uniformDeclaration += "#endif\r\n"); + var n = e.sharedData.hints; + if (null !== this._systemValue && void 0 !== this._systemValue) + switch (this._systemValue) { + case gs.WorldView: + n.needWorldViewMatrix = !0; + break; + case gs.WorldViewProjection: + n.needWorldViewProjectionMatrix = !0; + } + else this._animationType !== Fs.None && e.sharedData.animatedInputs.push(this); + } else if (this.isAttribute) { + if (((this.associatedVariableName = this.name), this.target === ps.Vertex && e._vertexState)) return void this._emit(e._vertexState, t); + if (-1 !== e.attributes.indexOf(this.associatedVariableName)) return; + e.attributes.push(this.associatedVariableName), + t && (e._attributeDeclaration += this._emitDefine(t)), + (e._attributeDeclaration += "attribute " + e._getGLType(this.type) + " " + this.associatedVariableName + ";\r\n"), + t && (e._attributeDeclaration += "#endif\r\n"); + } + }), + (t.prototype._transmitWorld = function (e, t, n, i) { + if (this._systemValue) { + var r = this.associatedVariableName; + switch (this._systemValue) { + case gs.World: + e.setMatrix(r, t); + break; + case gs.WorldView: + e.setMatrix(r, n); + break; + case gs.WorldViewProjection: + e.setMatrix(r, i); + } + } + }), + (t.prototype._transmit = function (e, t) { + if (!this.isAttribute) { + var n = this.associatedVariableName; + if (this._systemValue) + switch (this._systemValue) { + case gs.World: + case gs.WorldView: + case gs.WorldViewProjection: + return; + case gs.View: + e.setMatrix(n, t.getViewMatrix()); + break; + case gs.Projection: + e.setMatrix(n, t.getProjectionMatrix()); + break; + case gs.ViewProjection: + e.setMatrix(n, t.getTransformMatrix()); + break; + case gs.CameraPosition: + e.setVector3(n, t.activeCamera.globalPosition); + break; + case gs.FogColor: + e.setColor3(n, t.fogColor); + break; + case gs.DeltaTime: + e.setFloat(n, t.deltaTime / 1e3); + } + else { + var i = this._valueCallback ? this._valueCallback() : this._storedValue; + if (null !== i) + switch (this.type) { + case fs.Float: + e.setFloat(n, i); + break; + case fs.Int: + e.setInt(n, i); + break; + case fs.Color3: + e.setColor3(n, i); + break; + case fs.Color4: + e.setDirectColor4(n, i); + break; + case fs.Vector2: + e.setVector2(n, i); + break; + case fs.Vector3: + e.setVector3(n, i); + break; + case fs.Vector4: + e.setVector4(n, i); + break; + case fs.Matrix: + e.setMatrix(n, i); + } + } + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), (this.isUniform || this.isSystemValue) && t.sharedData.inputBlocks.push(this), this._emit(t); + }), + (t.prototype._dumpPropertiesCode = function () { + var e = this._codeVariableName; + if (this.isAttribute) return e + '.setAsAttribute("' + this.name + '");\r\n'; + if (this.isSystemValue) return e + ".setAsSystemValue(BABYLON.NodeMaterialSystemValues." + gs[this._systemValue] + ");\r\n"; + if (this.isUniform) { + var t = ""; + switch (this.type) { + case fs.Float: + var n = e + ".value = " + this.value + ";\r\n"; + return ( + (n += e + ".min = " + this.min + ";\r\n"), + (n += e + ".max = " + this.max + ";\r\n"), + (n += e + ".isBoolean = " + this.isBoolean + ";\r\n"), + (n += e + ".matrixMode = " + this.matrixMode + ";\r\n"), + (n += e + ".animationType = BABYLON.AnimatedInputBlockTypes." + Fs[this.animationType] + ";\r\n") + ); + case fs.Vector2: + t = "new BABYLON.Vector2(" + this.value.x + ", " + this.value.y + ")"; + break; + case fs.Vector3: + t = "new BABYLON.Vector3(" + this.value.x + ", " + this.value.y + ", " + this.value.z + ")"; + break; + case fs.Vector4: + t = "new BABYLON.Vector4(" + this.value.x + ", " + this.value.y + ", " + this.value.z + ", " + this.value.w + ")"; + break; + case fs.Color3: + t = "new BABYLON.Color3(" + this.value.r + ", " + this.value.g + ", " + this.value.b + ")"; + break; + case fs.Color4: + t = "new BABYLON.Color4(" + this.value.r + ", " + this.value.g + ", " + this.value.b + ", " + this.value.a + ")"; + break; + case fs.Matrix: + t = "BABYLON.Matrix.FromArray([" + this.value.m.toString() + "])"; + } + var i = e + ".value = " + t + ";\r\n"; + return (i += e + ".isConstant = " + (this.isConstant ? "true" : "false") + ";\r\n"), (i += e + ".visibleInInspector = " + (this.visibleInInspector ? "true" : "false") + ";\r\n"); + } + return ""; + }), + (t.prototype.dispose = function () { + this.onValueChangedObservable.clear(), e.prototype.dispose.call(this); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return ( + (t.type = this.type), + (t.mode = this._mode), + (t.systemValue = this._systemValue), + (t.animationType = this._animationType), + (t.visibleInInspector = this.visibleInInspector), + (t.min = this.min), + (t.max = this.max), + (t.isBoolean = this.isBoolean), + (t.matrixMode = this.matrixMode), + (t.isConstant = this.isConstant), + (t.groupInInspector = this.groupInInspector), + null != this._storedValue && + this._mode === ms.Uniform && + (this._storedValue.asArray ? ((t.valueType = "BABYLON." + this._storedValue.getClassName()), (t.value = this._storedValue.asArray())) : ((t.valueType = "number"), (t.value = this._storedValue))), + t + ); + }), + (t.prototype._deserialize = function (t, n, i) { + if ( + (e.prototype._deserialize.call(this, t, n, i), + (this._type = t.type), + (this._mode = t.mode), + (this._systemValue = t.systemValue || t.wellKnownValue), + (this._animationType = t.animationType), + (this.visibleInInspector = t.visibleInInspector), + (this.min = t.min || 0), + (this.max = t.max || 0), + (this.isBoolean = !!t.isBoolean), + (this.matrixMode = t.matrixMode || 0), + (this.isConstant = !!t.isConstant), + (this.groupInInspector = t.groupInInspector || ""), + t.valueType) + ) + if ("number" === t.valueType) this._storedValue = t.value; + else { + var r = c.a.GetClass(t.valueType); + r && (this._storedValue = r.FromArray(t.value)); + } + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.InputBlock"] = ks; + var zs = (function (e) { + function t() { + var t = e.call(this) || this; + return ( + (t.NORMAL = !1), + (t.TANGENT = !1), + (t.UV1 = !1), + (t.NUM_BONE_INFLUENCERS = 0), + (t.BonesPerMesh = 0), + (t.BONETEXTURE = !1), + (t.MORPHTARGETS = !1), + (t.MORPHTARGETS_NORMAL = !1), + (t.MORPHTARGETS_TANGENT = !1), + (t.MORPHTARGETS_UV = !1), + (t.NUM_MORPH_INFLUENCERS = 0), + (t.IMAGEPROCESSING = !1), + (t.VIGNETTE = !1), + (t.VIGNETTEBLENDMODEMULTIPLY = !1), + (t.VIGNETTEBLENDMODEOPAQUE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.EXPOSURE = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = !1), + (t.SAMPLER3DBGRMAP = !1), + (t.IMAGEPROCESSINGPOSTPROCESS = !1), + (t.BUMPDIRECTUV = 0), + t.rebuild(), + t + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.setValue = function (e, t) { + void 0 === this[e] && this._keys.push(e), (this[e] = t); + }), + t + ); + })(Dr.a), + js = (function (e) { + function t(n, i, r) { + void 0 === r && (r = {}); + var s = e.call(this, n, i || ue.a.LastCreatedScene) || this; + return ( + (s._buildId = t._BuildIdGenerator++), + (s._buildWasSuccessful = !1), + (s._cachedWorldViewMatrix = new a.a()), + (s._cachedWorldViewProjectionMatrix = new a.a()), + (s._optimizers = new Array()), + (s._animationFrame = -1), + (s.BJSNODEMATERIALEDITOR = s._getGlobalNodeMaterialEditor()), + (s.editorData = null), + (s.ignoreAlpha = !1), + (s.maxSimultaneousLights = 4), + (s.onBuildObservable = new o.c()), + (s._vertexOutputNodes = new Array()), + (s._fragmentOutputNodes = new Array()), + (s.attachedBlocks = new Array()), + (s._options = Object(h.a)({ emitComments: !1 }, r)), + s._attachImageProcessingConfiguration(null), + s + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._getGlobalNodeMaterialEditor = function () { + return "undefined" != typeof NODEEDITOR ? NODEEDITOR : "undefined" != typeof BABYLON && void 0 !== BABYLON.NodeEditor ? BABYLON : void 0; + }), + Object.defineProperty(t.prototype, "options", { + get: function () { + return this._options; + }, + set: function (e) { + this._options = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + this._attachImageProcessingConfiguration(e), this._markAllSubMeshesAsTexturesDirty(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "NodeMaterial"; + }), + (t.prototype._attachImageProcessingConfiguration = function (e) { + var t = this; + e !== this._imageProcessingConfiguration && + (this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + (this._imageProcessingConfiguration = e || this.getScene().imageProcessingConfiguration), + this._imageProcessingConfiguration && + (this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(function () { + t._markAllSubMeshesAsImageProcessingDirty(); + }))); + }), + (t.prototype.getBlockByName = function (e) { + for (var t = 0, n = this.attachedBlocks; t < n.length; t++) { + var i = n[t]; + if (i.name === e) return i; + } + return null; + }), + (t.prototype.getBlockByPredicate = function (e) { + for (var t = 0, n = this.attachedBlocks; t < n.length; t++) { + var i = n[t]; + if (e(i)) return i; + } + return null; + }), + (t.prototype.getInputBlockByPredicate = function (e) { + for (var t = 0, n = this.attachedBlocks; t < n.length; t++) { + var i = n[t]; + if (i.isInput && e(i)) return i; + } + return null; + }), + (t.prototype.getInputBlocks = function () { + for (var e = [], t = 0, n = this.attachedBlocks; t < n.length; t++) { + var i = n[t]; + i.isInput && e.push(i); + } + return e; + }), + (t.prototype.registerOptimizer = function (e) { + if (!(this._optimizers.indexOf(e) > -1)) return this._optimizers.push(e), this; + }), + (t.prototype.unregisterOptimizer = function (e) { + var t = this._optimizers.indexOf(e); + if (-1 !== t) return this._optimizers.splice(t, 1), this; + }), + (t.prototype.addOutputNode = function (e) { + if (null === e.target) throw "This node is not meant to be an output node. You may want to explicitly set its target value."; + return 0 != (e.target & ps.Vertex) && this._addVertexOutputNode(e), 0 != (e.target & ps.Fragment) && this._addFragmentOutputNode(e), this; + }), + (t.prototype.removeOutputNode = function (e) { + return null === e.target || (0 != (e.target & ps.Vertex) && this._removeVertexOutputNode(e), 0 != (e.target & ps.Fragment) && this._removeFragmentOutputNode(e)), this; + }), + (t.prototype._addVertexOutputNode = function (e) { + if (-1 === this._vertexOutputNodes.indexOf(e)) return (e.target = ps.Vertex), this._vertexOutputNodes.push(e), this; + }), + (t.prototype._removeVertexOutputNode = function (e) { + var t = this._vertexOutputNodes.indexOf(e); + if (-1 !== t) return this._vertexOutputNodes.splice(t, 1), this; + }), + (t.prototype._addFragmentOutputNode = function (e) { + if (-1 === this._fragmentOutputNodes.indexOf(e)) return (e.target = ps.Fragment), this._fragmentOutputNodes.push(e), this; + }), + (t.prototype._removeFragmentOutputNode = function (e) { + var t = this._fragmentOutputNodes.indexOf(e); + if (-1 !== t) return this._fragmentOutputNodes.splice(t, 1), this; + }), + (t.prototype.needAlphaBlending = function () { + return !this.ignoreAlpha && (this.alpha < 1 || (this._sharedData && this._sharedData.hints.needAlphaBlending)); + }), + (t.prototype.needAlphaTesting = function () { + return this._sharedData && this._sharedData.hints.needAlphaTesting; + }), + (t.prototype._initializeBlock = function (e, t, n) { + if ((e.initialize(t), e.autoConfigure(this), (e._preparationId = this._buildId), -1 === this.attachedBlocks.indexOf(e))) { + if (e.isUnique) + for (var i = e.getClassName(), r = 0, o = this.attachedBlocks; r < o.length; r++) { + if (o[r].getClassName() === i) throw "Cannot have multiple blocks of type " + i + " in the same NodeMaterial"; + } + this.attachedBlocks.push(e); + } + for (var a = 0, s = e.inputs; a < s.length; a++) { + var c = s[a]; + c.associatedVariableName = ""; + var l = c.connectedPoint; + if (l) { + var u = l.ownerBlock; + u !== e && ((u.target === ps.VertexAndFragment || (t.target === ps.Fragment && u.target === ps.Vertex && u._preparationId !== this._buildId)) && n.push(u), this._initializeBlock(u, t, n)); + } + } + for (var h = 0, d = e.outputs; h < d.length; h++) { + d[h].associatedVariableName = ""; + } + }), + (t.prototype._resetDualBlocks = function (e, t) { + e.target === ps.VertexAndFragment && (e.buildId = t); + for (var n = 0, i = e.inputs; n < i.length; n++) { + var r = i[n].connectedPoint; + if (r) { + var o = r.ownerBlock; + o !== e && this._resetDualBlocks(o, t); + } + } + }), + (t.prototype.removeBlock = function (e) { + var t = this.attachedBlocks.indexOf(e); + t > -1 && this.attachedBlocks.splice(t, 1), e.isFinalMerger && this.removeOutputNode(e); + }), + (t.prototype.build = function (e) { + void 0 === e && (e = !1), (this._buildWasSuccessful = !1); + var n = this.getScene().getEngine(); + if (0 === this._vertexOutputNodes.length) throw "You must define at least one vertexOutputNode"; + if (0 === this._fragmentOutputNodes.length) throw "You must define at least one fragmentOutputNode"; + (this._vertexCompilationState = new Ds()), + (this._vertexCompilationState.supportUniformBuffers = n.supportsUniformBuffers), + (this._vertexCompilationState.target = ps.Vertex), + (this._fragmentCompilationState = new Ds()), + (this._fragmentCompilationState.supportUniformBuffers = n.supportsUniformBuffers), + (this._fragmentCompilationState.target = ps.Fragment), + (this._sharedData = new Rs()), + (this._vertexCompilationState.sharedData = this._sharedData), + (this._fragmentCompilationState.sharedData = this._sharedData), + (this._sharedData.buildId = this._buildId), + (this._sharedData.emitComments = this._options.emitComments), + (this._sharedData.verbose = e), + (this._sharedData.scene = this.getScene()); + for (var i = [], r = [], o = 0, a = this._vertexOutputNodes; o < a.length; o++) { + var s = a[o]; + i.push(s), this._initializeBlock(s, this._vertexCompilationState, r); + } + for (var c = 0, l = this._fragmentOutputNodes; c < l.length; c++) { + var u = l[c]; + r.push(u), this._initializeBlock(u, this._fragmentCompilationState, i); + } + this.optimize(); + for (var h = 0, d = i; h < d.length; h++) { + (s = d[h]).build(this._vertexCompilationState, i); + } + (this._fragmentCompilationState.uniforms = this._vertexCompilationState.uniforms.slice(0)), + (this._fragmentCompilationState._uniformDeclaration = this._vertexCompilationState._uniformDeclaration), + (this._fragmentCompilationState._constantDeclaration = this._vertexCompilationState._constantDeclaration), + (this._fragmentCompilationState._vertexState = this._vertexCompilationState); + for (var p = 0, f = r; p < f.length; p++) { + u = f[p]; + this._resetDualBlocks(u, this._buildId - 1); + } + for (var m = 0, g = r; m < g.length; m++) { + (u = g[m]).build(this._fragmentCompilationState, r); + } + this._vertexCompilationState.finalize(this._vertexCompilationState), + this._fragmentCompilationState.finalize(this._fragmentCompilationState), + (this._buildId = t._BuildIdGenerator++), + this._sharedData.emitErrors(), + (this._buildWasSuccessful = !0), + this.onBuildObservable.notifyObservers(this); + for (var b = 0, _ = this.getScene().meshes; b < _.length; b++) { + var v = _[b]; + if (v.subMeshes) + for (var y = 0, C = v.subMeshes; y < C.length; y++) { + var P = C[y]; + if (P.getMaterial() === this && P._materialDefines) { + var x = P._materialDefines; + x.markAllAsDirty(), x.reset(); + } + } + } + }), + (t.prototype.optimize = function () { + for (var e = 0, t = this._optimizers; e < t.length; e++) { + t[e].optimize(this._vertexOutputNodes, this._fragmentOutputNodes); + } + }), + (t.prototype._prepareDefinesForAttributes = function (e, t) { + var n = t.NORMAL, + i = t.TANGENT, + r = t.UV1; + (t.NORMAL = e.isVerticesDataPresent(wn.b.NormalKind)), + (t.TANGENT = e.isVerticesDataPresent(wn.b.TangentKind)), + (t.UV1 = e.isVerticesDataPresent(wn.b.UVKind)), + (n === t.NORMAL && i === t.TANGENT && r === t.UV1) || t.markAsAttributesDirty(); + }), + (t.prototype.isReadyForSubMesh = function (e, t, n) { + var i = this; + if ((void 0 === n && (n = !1), !this._buildWasSuccessful)) return !1; + var r = this.getScene(); + if (this._sharedData.animatedInputs) { + var o = r.getFrameId(); + if (this._animationFrame !== o) { + for (var a = 0, s = this._sharedData.animatedInputs; a < s.length; a++) { + s[a].animate(r); + } + this._animationFrame = o; + } + } + if (t.effect && this.isFrozen && t.effect._wasPreviouslyReady) return !0; + t._materialDefines || (t._materialDefines = new zs()); + var c = t._materialDefines; + if (!this.checkReadyOnEveryCall && t.effect && c._renderId === r.getRenderId()) return !0; + var l = r.getEngine(); + if ( + (this._prepareDefinesForAttributes(e, c), + this._sharedData.blockingBlocks.some(function (t) { + return !t.isReady(e, i, c, n); + })) + ) + return !1; + if ( + (this._sharedData.blocksWithDefines.forEach(function (t) { + t.initializeDefines(e, i, c, n); + }), + this._sharedData.blocksWithDefines.forEach(function (t) { + t.prepareDefines(e, i, c, n); + }), + c.isDirty) + ) { + c.markAsProcessed(), + (this._vertexCompilationState.compilationString = this._vertexCompilationState._builtCompilationString), + (this._fragmentCompilationState.compilationString = this._fragmentCompilationState._builtCompilationString), + this._sharedData.repeatableContentBlocks.forEach(function (t) { + t.replaceRepeatableContent(i._vertexCompilationState, i._fragmentCompilationState, e, c); + }); + var u = []; + this._sharedData.dynamicUniformBlocks.forEach(function (e) { + e.updateUniformsAndSamples(i._vertexCompilationState, i, c, u); + }); + var h = this._vertexCompilationState.uniforms; + this._fragmentCompilationState.uniforms.forEach(function (e) { + -1 === h.indexOf(e) && h.push(e); + }); + var d = this._vertexCompilationState.samplers; + this._fragmentCompilationState.samplers.forEach(function (e) { + -1 === d.indexOf(e) && d.push(e); + }); + var p = new jr.a(); + this._sharedData.blocksWithFallbacks.forEach(function (t) { + t.provideFallbacks(e, p); + }); + var f = t.effect, + m = c.toString(), + g = l.createEffect( + { + vertex: "nodeMaterial" + this._buildId, + fragment: "nodeMaterial" + this._buildId, + vertexSource: this._vertexCompilationState.compilationString, + fragmentSource: this._fragmentCompilationState.compilationString, + }, + { + attributes: this._vertexCompilationState.attributes, + uniformsNames: h, + uniformBuffersNames: u, + samplers: d, + defines: m, + fallbacks: p, + onCompiled: this.onCompiled, + onError: this.onError, + indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights, maxSimultaneousMorphTargets: c.NUM_MORPH_INFLUENCERS }, + }, + l + ); + g && (this.allowShaderHotSwapping && f && !g.isReady() ? ((g = f), c.markAsUnprocessed()) : (r.resetCachedMaterial(), t.setEffect(g, c))); + } + return !(!t.effect || !t.effect.isReady()) && ((c._renderId = r.getRenderId()), (t.effect._wasPreviouslyReady = !0), !0); + }), + Object.defineProperty(t.prototype, "compiledShaders", { + get: function () { + return "// Vertex shader\r\n" + this._vertexCompilationState.compilationString + "\r\n\r\n// Fragment shader\r\n" + this._fragmentCompilationState.compilationString; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.bindOnlyWorldMatrix = function (e) { + var t = this.getScene(); + if (this._activeEffect) { + var n = this._sharedData.hints; + n.needWorldViewMatrix && e.multiplyToRef(t.getViewMatrix(), this._cachedWorldViewMatrix), n.needWorldViewProjectionMatrix && e.multiplyToRef(t.getTransformMatrix(), this._cachedWorldViewProjectionMatrix); + for (var i = 0, r = this._sharedData.inputBlocks; i < r.length; i++) { + r[i]._transmitWorld(this._activeEffect, e, this._cachedWorldViewMatrix, this._cachedWorldViewProjectionMatrix); + } + } + }), + (t.prototype.bindForSubMesh = function (e, t, n) { + var i = this.getScene(), + r = n.effect; + if (r) { + if (((this._activeEffect = r), this.bindOnlyWorldMatrix(e), this._mustRebind(i, r, t.visibility))) { + var o = this._sharedData; + if (r && i.getCachedEffect() !== r) { + for (var a = 0, s = o.bindableBlocks; a < s.length; a++) { + s[a].bind(r, this, t); + } + for (var c = 0, l = o.inputBlocks; c < l.length; c++) { + l[c]._transmit(r, i); + } + } + } + this._afterBind(t, this._activeEffect); + } + }), + (t.prototype.getActiveTextures = function () { + var t = e.prototype.getActiveTextures.call(this); + return ( + this._sharedData && + t.push.apply( + t, + this._sharedData.textureBlocks + .filter(function (e) { + return e.texture; + }) + .map(function (e) { + return e.texture; + }) + ), + t + ); + }), + (t.prototype.getTextureBlocks = function () { + return this._sharedData ? this._sharedData.textureBlocks : []; + }), + (t.prototype.hasTexture = function (t) { + if (e.prototype.hasTexture.call(this, t)) return !0; + if (!this._sharedData) return !1; + for (var n = 0, i = this._sharedData.textureBlocks; n < i.length; n++) { + if (i[n].texture === t) return !0; + } + return !1; + }), + (t.prototype.dispose = function (t, n, i) { + if (n) + for ( + var r = 0, + o = this._sharedData.textureBlocks + .filter(function (e) { + return e.texture; + }) + .map(function (e) { + return e.texture; + }); + r < o.length; + r++ + ) { + o[r].dispose(); + } + for (var a = 0, s = this.attachedBlocks; a < s.length; a++) { + s[a].dispose(); + } + this.onBuildObservable.clear(), e.prototype.dispose.call(this, t, n, i); + }), + (t.prototype._createNodeEditor = function () { + (this.BJSNODEMATERIALEDITOR = this.BJSNODEMATERIALEDITOR || this._getGlobalNodeMaterialEditor()), this.BJSNODEMATERIALEDITOR.NodeEditor.Show({ nodeMaterial: this }); + }), + (t.prototype.edit = function (e) { + var n = this; + return new Promise(function (i, r) { + if (void 0 === n.BJSNODEMATERIALEDITOR) { + var o = e && e.editorURL ? e.editorURL : t.EditorURL; + $e.b.LoadScript(o, function () { + n._createNodeEditor(), i(); + }); + } else n._createNodeEditor(), i(); + }); + }), + (t.prototype.clear = function () { + (this._vertexOutputNodes = []), (this._fragmentOutputNodes = []), (this.attachedBlocks = []); + }), + (t.prototype.setToDefault = function () { + this.clear(), (this.editorData = null); + var e = new ks("Position"); + e.setAsAttribute("position"); + var t = new ks("World"); + t.setAsSystemValue(BABYLON.NodeMaterialSystemValues.World); + var n = new ws("WorldPos"); + e.connectTo(n), t.connectTo(n); + var i = new ks("ViewProjection"); + i.setAsSystemValue(BABYLON.NodeMaterialSystemValues.ViewProjection); + var r = new ws("WorldPos * ViewProjectionTransform"); + n.connectTo(r), i.connectTo(r); + var o = new Ls("VertexOutput"); + r.connectTo(o); + var a = new ks("color"); + a.value = new s.b(0.8, 0.8, 0.8, 1); + var c = new Ns("FragmentOutput"); + a.connectTo(c), this.addOutputNode(o), this.addOutputNode(c); + }), + (t.prototype.loadAsync = function (e) { + var t = this; + return this.getScene() + ._loadFileAsync(e) + .then(function (e) { + var n = JSON.parse(e); + t.loadFromSerialization(n, ""); + }); + }), + (t.prototype._gatherBlocks = function (e, t) { + if (-1 === t.indexOf(e)) { + t.push(e); + for (var n = 0, i = e.inputs; n < i.length; n++) { + var r = i[n].connectedPoint; + if (r) { + var o = r.ownerBlock; + o !== e && this._gatherBlocks(o, t); + } + } + } + }), + (t.prototype.generateCode = function () { + for (var e = [], t = [], n = [], i = 0, r = this._vertexOutputNodes; i < r.length; i++) { + var o = r[i]; + this._gatherBlocks(o, t); + } + for (var a = [], s = 0, c = this._fragmentOutputNodes; s < c.length; s++) { + o = c[s]; + this._gatherBlocks(o, a); + } + for (var l = 'var nodeMaterial = new BABYLON.NodeMaterial("' + (this.name || "node material") + '");\r\n', u = 0, h = t; u < h.length; u++) { + (P = h[u]).isInput && -1 === e.indexOf(P) && (l += P._dumpCode(n, e)); + } + for (var d = 0, p = a; d < p.length; d++) { + (P = p[d]).isInput && -1 === e.indexOf(P) && (l += P._dumpCode(n, e)); + } + (e = []), (l += "\r\n// Connections\r\n"); + for (var f = 0, m = this._vertexOutputNodes; f < m.length; f++) { + l += (P = m[f])._dumpCodeForOutputConnections(e); + } + for (var g = 0, b = this._fragmentOutputNodes; g < b.length; g++) { + l += (P = b[g])._dumpCodeForOutputConnections(e); + } + l += "\r\n// Output nodes\r\n"; + for (var _ = 0, v = this._vertexOutputNodes; _ < v.length; _++) { + l += "nodeMaterial.addOutputNode(" + (P = v[_])._codeVariableName + ");\r\n"; + } + for (var y = 0, C = this._fragmentOutputNodes; y < C.length; y++) { + var P; + l += "nodeMaterial.addOutputNode(" + (P = C[y])._codeVariableName + ");\r\n"; + } + return (l += "nodeMaterial.build();\r\n"); + }), + (t.prototype.serialize = function (e) { + var t = e ? {} : He.a.Serialize(this); + t.editorData = JSON.parse(JSON.stringify(this.editorData)); + var n = []; + if (e) n = e; + else { + (t.customType = "BABYLON.NodeMaterial"), (t.outputNodes = []); + for (var i = 0, r = this._vertexOutputNodes; i < r.length; i++) { + var o = r[i]; + this._gatherBlocks(o, n), t.outputNodes.push(o.uniqueId); + } + for (var a = 0, s = this._fragmentOutputNodes; a < s.length; a++) { + o = s[a]; + this._gatherBlocks(o, n), -1 === t.outputNodes.indexOf(o.uniqueId) && t.outputNodes.push(o.uniqueId); + } + } + t.blocks = []; + for (var c = 0, l = n; c < l.length; c++) { + var u = l[c]; + t.blocks.push(u.serialize()); + } + if (!e) + for (var h = 0, d = this.attachedBlocks; h < d.length; h++) { + u = d[h]; + -1 === n.indexOf(u) && t.blocks.push(u.serialize()); + } + return t; + }), + (t.prototype._restoreConnections = function (e, t, n) { + for (var i = 0, r = e.outputs; i < r.length; i++) + for (var o = r[i], a = 0, s = t.blocks; a < s.length; a++) + for (var c = s[a], l = n[c.id], u = 0, h = c.inputs; u < h.length; u++) { + var d = h[u]; + if (n[d.targetBlockId] !== e || d.targetConnectionName !== o.name); + else { + var p = l.getInputByName(d.inputName); + if (!p || p.isConnected) continue; + o.connectTo(p, !0), this._restoreConnections(l, t, n); + } + } + }), + (t.prototype.loadFromSerialization = function (e, t) { + void 0 === t && (t = ""), this.clear(); + for (var n = {}, i = 0, r = e.blocks; i < r.length; i++) { + var o = r[i], + a = c.a.GetClass(o.customType); + if (a) (l = new a())._deserialize(o, this.getScene(), t), (n[o.id] = l), this.attachedBlocks.push(l); + } + for (var s = 0; s < e.blocks.length; s++) { + var l; + (l = n[e.blocks[s].id]).inputs.length || this._restoreConnections(l, e, n); + } + for (var u = 0, h = e.outputNodes; u < h.length; u++) { + var d = h[u]; + this.addOutputNode(n[d]); + } + if (e.locations || (e.editorData && e.editorData.locations)) { + for (var p = e.locations || e.editorData.locations, f = 0, m = p; f < m.length; f++) { + var g = m[f]; + n[g.blockId] && (g.blockId = n[g.blockId].uniqueId); + } + e.locations ? (this.editorData = { locations: p }) : ((this.editorData = e.editorData), (this.editorData.locations = p)); + var b = []; + for (var _ in n) b[_] = n[_].uniqueId; + this.editorData.map = b; + } + }), + (t.Parse = function (e, n, i) { + void 0 === i && (i = ""); + var r = He.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + return r.loadFromSerialization(e, i), r.build(), r; + }), + (t.ParseFromFileAsync = function (e, n, i) { + var r = new t(e, i); + return new Promise(function (e, t) { + return r + .loadAsync(n) + .then(function () { + return e(r); + }) + .catch(t); + }); + }), + (t.ParseFromSnippetAsync = function (e, n, i) { + var r = this; + return ( + void 0 === i && (i = ""), + new Promise(function (o, a) { + var s = new ls.a(); + s.addEventListener("readystatechange", function () { + if (4 == s.readyState) + if (200 == s.status) { + var r = JSON.parse(JSON.parse(s.responseText).jsonPayload), + c = JSON.parse(r.nodeMaterial), + l = He.a.Parse( + function () { + return new t(e, n); + }, + c, + n, + i + ); + l.loadFromSerialization(c); + try { + l.build(!0), o(l); + } catch (e) { + a(e); + } + } else a("Unable to load the snippet " + e); + }), + s.open("GET", r.SnippetUrl + "/" + e.replace("#", "/")), + s.send(); + }) + ); + }), + (t.CreateDefault = function (e, n) { + var i = new t(e, n); + return i.setToDefault(), i.build(), i; + }), + (t._BuildIdGenerator = 0), + (t.EditorURL = "https://unpkg.com/babylonjs-node-editor@" + ue.a.Version + "/babylon.nodeEditor.js"), + (t.SnippetUrl = "https://snippet.babylonjs.com"), + t + ); + })(Rr.a); + c.a.RegisteredTypes["BABYLON.NodeMaterial"] = js; + var Bs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex) || this; + return ( + n.registerInput("matricesIndices", fs.Vector4), + n.registerInput("matricesWeights", fs.Vector4), + n.registerInput("matricesIndicesExtra", fs.Vector4, !0), + n.registerInput("matricesWeightsExtra", fs.Vector4, !0), + n.registerInput("world", fs.Matrix), + n.registerOutput("output", fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.initialize = function (e) { + e._excludeVariableName("boneSampler"), e._excludeVariableName("boneTextureWidth"), e._excludeVariableName("mBones"), e._excludeVariableName("BonesPerMesh"); + }), + (t.prototype.getClassName = function () { + return "BonesBlock"; + }), + Object.defineProperty(t.prototype, "matricesIndices", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "matricesWeights", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "matricesIndicesExtra", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "matricesWeightsExtra", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.matricesIndices.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "matricesIndices" === e.name; + }); + t || (t = new ks("matricesIndices")).setAsAttribute("matricesIndices"), t.output.connectTo(this.matricesIndices); + } + if (!this.matricesWeights.isConnected) { + var n = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "matricesWeights" === e.name; + }); + n || (n = new ks("matricesWeights")).setAsAttribute("matricesWeights"), n.output.connectTo(this.matricesWeights); + } + if (!this.world.isConnected) { + var i = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.World; + }); + i || (i = new ks("world")).setAsSystemValue(gs.World), i.output.connectTo(this.world); + } + }), + (t.prototype.provideFallbacks = function (e, t) { + e && e.useBones && e.computeBonesUsingShaders && e.skeleton && t.addCPUSkinningFallback(0, e); + }), + (t.prototype.bind = function (e, t, n) { + Ir.a.BindBonesParameters(n, e); + }), + (t.prototype.prepareDefines = function (e, t, n) { + n._areAttributesDirty && Ir.a.PrepareDefinesForBones(e, n); + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), + t.sharedData.blocksWithFallbacks.push(this), + t.sharedData.bindableBlocks.push(this), + t.sharedData.blocksWithDefines.push(this), + t.uniforms.push("boneTextureWidth"), + t.uniforms.push("mBones"), + t.samplers.push("boneSampler"); + var n = "//" + this.name; + t._emitFunctionFromInclude("bonesDeclaration", n, { removeAttributes: !0, removeUniforms: !1, removeVaryings: !0, removeIfDef: !1 }); + var i = t._getFreeVariableName("influence"); + t.compilationString += t._emitCodeFromInclude("bonesVertex", n, { + replaceStrings: [ + { search: /finalWorld=finalWorld\*influence;/, replace: "" }, + { search: /influence/gm, replace: i }, + ], + }); + var r = this._outputs[0], + o = this.world; + return ( + (t.compilationString += "#if NUM_BONE_INFLUENCERS>0\r\n"), + (t.compilationString += this._declareOutput(r, t) + " = " + o.associatedVariableName + " * " + i + ";\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(r, t) + " = " + o.associatedVariableName + ";\r\n"), + (t.compilationString += "#endif\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.BonesBlock"] = Bs; + var Vs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex) || this; + return ( + n.registerInput("world0", fs.Vector4), + n.registerInput("world1", fs.Vector4), + n.registerInput("world2", fs.Vector4), + n.registerInput("world3", fs.Vector4), + n.registerInput("world", fs.Matrix, !0), + n.registerOutput("output", fs.Matrix), + n.registerOutput("instanceID", fs.Float), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "InstancesBlock"; + }), + Object.defineProperty(t.prototype, "world0", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world1", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world2", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world3", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "instanceID", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.world0.connectedPoint) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "world0" === e.name; + }); + t || (t = new ks("world0")).setAsAttribute("world0"), t.output.connectTo(this.world0); + } + if (!this.world1.connectedPoint) { + var n = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "world1" === e.name; + }); + n || (n = new ks("world1")).setAsAttribute("world1"), n.output.connectTo(this.world1); + } + if (!this.world2.connectedPoint) { + var i = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "world2" === e.name; + }); + i || (i = new ks("world2")).setAsAttribute("world2"), i.output.connectTo(this.world2); + } + if (!this.world3.connectedPoint) { + var r = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "world3" === e.name; + }); + r || (r = new ks("world3")).setAsAttribute("world3"), r.output.connectTo(this.world3); + } + if (!this.world.connectedPoint) { + var o = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "world" === e.name; + }); + o || (o = new ks("world")).setAsSystemValue(gs.World), o.output.connectTo(this.world); + } + this.world.define = "!INSTANCES"; + }), + (t.prototype.prepareDefines = function (e, t, n, i) { + void 0 === i && (i = !1); + var r = !1; + n.INSTANCES !== i && (n.setValue("INSTANCES", i), (r = !0)), r && n.markAsUnprocessed(); + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), t.sharedData.blocksWithDefines.push(this); + var n = this._outputs[0], + i = this._outputs[1], + r = this.world0, + o = this.world1, + a = this.world2, + s = this.world3; + return ( + (t.compilationString += "#ifdef INSTANCES\r\n"), + (t.compilationString += this._declareOutput(n, t) + " = mat4(" + r.associatedVariableName + ", " + o.associatedVariableName + ", " + a.associatedVariableName + ", " + s.associatedVariableName + ");\r\n"), + (t.compilationString += this._declareOutput(i, t) + " = float(gl_InstanceID);\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(n, t) + " = " + this.world.associatedVariableName + ";\r\n"), + (t.compilationString += this._declareOutput(i, t) + " = 0.0;\r\n"), + (t.compilationString += "#endif\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.InstancesBlock"] = Vs; + var Gs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex) || this; + return ( + n.registerInput("position", fs.Vector3), + n.registerInput("normal", fs.Vector3), + n.registerInput("tangent", fs.Vector3), + n.registerInput("uv", fs.Vector2), + n.registerOutput("positionOutput", fs.Vector3), + n.registerOutput("normalOutput", fs.Vector3), + n.registerOutput("tangentOutput", fs.Vector3), + n.registerOutput("uvOutput", fs.Vector2), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "MorphTargetsBlock"; + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normal", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "tangent", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "uv", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "positionOutput", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normalOutput", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "tangentOutput", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "uvOutput", { + get: function () { + return this._outputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.initialize = function (e) { + e._excludeVariableName("morphTargetInfluences"); + }), + (t.prototype.autoConfigure = function (e) { + if (!this.position.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "position" === e.name; + }); + t || (t = new ks("position")).setAsAttribute(), t.output.connectTo(this.position); + } + if (!this.normal.isConnected) { + var n = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "normal" === e.name; + }); + n || (n = new ks("normal")).setAsAttribute("normal"), n.output.connectTo(this.normal); + } + if (!this.tangent.isConnected) { + var i = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "tangent" === e.name; + }); + i || (i = new ks("tangent")).setAsAttribute("tangent"), i.output.connectTo(this.tangent); + } + if (!this.uv.isConnected) { + var r = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "uv" === e.name; + }); + r || (r = new ks("uv")).setAsAttribute("uv"), r.output.connectTo(this.uv); + } + }), + (t.prototype.prepareDefines = function (e, t, n) { + n._areAttributesDirty && Ir.a.PrepareDefinesForMorphTargets(e, n); + }), + (t.prototype.bind = function (e, t, n) { + n && n.morphTargetManager && n.morphTargetManager.numInfluencers > 0 && Ir.a.BindMorphTargetParameters(n, e); + }), + (t.prototype.replaceRepeatableContent = function (e, t, n, i) { + for ( + var r = this.position, + o = this.normal, + a = this.tangent, + s = this.uv, + c = this.positionOutput, + l = this.normalOutput, + u = this.tangentOutput, + h = this.uvOutput, + d = e, + p = i.NUM_MORPH_INFLUENCERS, + f = n.morphTargetManager, + m = f && f.supportsNormals && i.NORMAL, + g = f && f.supportsTangents && i.TANGENT, + b = f && f.supportsUVs && i.UV1, + _ = "", + v = 0; + v < p; + v++ + ) + (_ += "#ifdef MORPHTARGETS\r\n"), + (_ += c.associatedVariableName + " += (position" + v + " - " + r.associatedVariableName + ") * morphTargetInfluences[" + v + "];\r\n"), + m && ((_ += "#ifdef MORPHTARGETS_NORMAL\r\n"), (_ += l.associatedVariableName + " += (normal" + v + " - " + o.associatedVariableName + ") * morphTargetInfluences[" + v + "];\r\n"), (_ += "#endif\r\n")), + g && ((_ += "#ifdef MORPHTARGETS_TANGENT\r\n"), (_ += u.associatedVariableName + ".xyz += (tangent" + v + " - " + a.associatedVariableName + ".xyz) * morphTargetInfluences[" + v + "];\r\n"), (_ += "#endif\r\n")), + b && ((_ += "#ifdef MORPHTARGETS_UV\r\n"), (_ += h.associatedVariableName + ".xy += (uv_" + v + " - " + s.associatedVariableName + ".xy) * morphTargetInfluences[" + v + "];\r\n"), (_ += "#endif\r\n")), + (_ += "#endif\r\n"); + if (((d.compilationString = d.compilationString.replace(this._repeatableContentAnchor, _)), p > 0)) + for (v = 0; v < p; v++) d.attributes.push(wn.b.PositionKind + v), m && d.attributes.push(wn.b.NormalKind + v), g && d.attributes.push(wn.b.TangentKind + v), b && d.attributes.push(wn.b.UVKind + "_" + v); + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), t.sharedData.blocksWithDefines.push(this), t.sharedData.bindableBlocks.push(this), t.sharedData.repeatableContentBlocks.push(this); + var n = this.position, + i = this.normal, + r = this.tangent, + o = this.uv, + a = this.positionOutput, + s = this.normalOutput, + c = this.tangentOutput, + l = this.uvOutput, + u = "//" + this.name; + return ( + t.uniforms.push("morphTargetInfluences"), + t._emitFunctionFromInclude("morphTargetsVertexGlobalDeclaration", u), + t._emitFunctionFromInclude("morphTargetsVertexDeclaration", u, { repeatKey: "maxSimultaneousMorphTargets" }), + (t.compilationString += this._declareOutput(a, t) + " = " + n.associatedVariableName + ";\r\n"), + (t.compilationString += "#ifdef NORMAL\r\n"), + (t.compilationString += this._declareOutput(s, t) + " = " + i.associatedVariableName + ";\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(s, t) + " = vec3(0., 0., 0.);\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef TANGENT\r\n"), + (t.compilationString += this._declareOutput(c, t) + " = " + r.associatedVariableName + ";\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(c, t) + " = vec3(0., 0., 0.);\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef UV1\r\n"), + (t.compilationString += this._declareOutput(l, t) + " = " + o.associatedVariableName + ";\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(l, t) + " = vec2(0., 0.);\r\n"), + (t.compilationString += "#endif\r\n"), + (this._repeatableContentAnchor = t._repeatableContentAnchor), + (t.compilationString += this._repeatableContentAnchor), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.MorphTargetsBlock"] = Gs; + var Us = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Vertex) || this; + return n.registerInput("worldPosition", fs.Vector4, !1, ps.Vertex), n.registerOutput("direction", fs.Vector3), n.registerOutput("color", fs.Color3), n.registerOutput("intensity", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "LightInformationBlock"; + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "direction", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "color", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "intensity", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.bind = function (e, t, n) { + if (n) { + this.light && this.light.isDisposed && (this.light = null); + var i = this.light, + r = t.getScene(); + if ((!i && r.lights.length && (i = r.lights[0]), !i || !i.isEnabled)) return e.setFloat3(this._lightDataUniformName, 0, 0, 0), void e.setFloat4(this._lightColorUniformName, 0, 0, 0, 0); + i.transferToNodeMaterialEffect(e, this._lightDataUniformName), e.setColor4(this._lightColorUniformName, i.diffuse, i.intensity); + } + }), + (t.prototype.prepareDefines = function (e, t, n) { + if (n._areLightsDirty) { + var i = this.light; + n.setValue(this._lightTypeDefineName, !!(i && i instanceof Ca.a)); + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), t.sharedData.bindableBlocks.push(this), t.sharedData.blocksWithDefines.push(this); + var n = this.direction, + i = this.color, + r = this.intensity; + return ( + (this._lightDataUniformName = t._getFreeVariableName("lightData")), + (this._lightColorUniformName = t._getFreeVariableName("lightColor")), + (this._lightTypeDefineName = t._getFreeDefineName("LIGHTPOINTTYPE")), + t._emitUniformFromString(this._lightDataUniformName, "vec3"), + t._emitUniformFromString(this._lightColorUniformName, "vec4"), + (t.compilationString += "#ifdef " + this._lightTypeDefineName + "\r\n"), + (t.compilationString += this._declareOutput(n, t) + " = normalize(" + this.worldPosition.associatedVariableName + ".xyz - " + this._lightDataUniformName + ");\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += this._declareOutput(n, t) + " = " + this._lightDataUniformName + ";\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += this._declareOutput(i, t) + " = " + this._lightColorUniformName + ".rgb;\r\n"), + (t.compilationString += this._declareOutput(r, t) + " = " + this._lightColorUniformName + ".a;\r\n"), + this + ); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return this.light && (t.lightId = this.light.id), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), t.lightId && (this.light = n.getLightByID(t.lightId)); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.LightInformationBlock"] = Us; + var Hs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment) || this; + return n.registerInput("color", fs.Color4), n.registerOutput("output", fs.Color4), n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ImageProcessingBlock"; + }), + Object.defineProperty(t.prototype, "color", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.initialize = function (e) { + e._excludeVariableName("exposureLinear"), + e._excludeVariableName("contrast"), + e._excludeVariableName("vInverseScreenSize"), + e._excludeVariableName("vignetteSettings1"), + e._excludeVariableName("vignetteSettings2"), + e._excludeVariableName("vCameraColorCurveNegative"), + e._excludeVariableName("vCameraColorCurveNeutral"), + e._excludeVariableName("vCameraColorCurvePositive"), + e._excludeVariableName("txColorTransform"), + e._excludeVariableName("colorTransformSettings"); + }), + (t.prototype.isReady = function (e, t, n) { + return !(n._areImageProcessingDirty && t.imageProcessingConfiguration && !t.imageProcessingConfiguration.isReady()); + }), + (t.prototype.prepareDefines = function (e, t, n) { + n._areImageProcessingDirty && t.imageProcessingConfiguration && t.imageProcessingConfiguration.prepareDefines(n); + }), + (t.prototype.bind = function (e, t, n) { + n && t.imageProcessingConfiguration && t.imageProcessingConfiguration.bind(e); + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t), + t.sharedData.blocksWithDefines.push(this), + t.sharedData.blockingBlocks.push(this), + t.sharedData.bindableBlocks.push(this), + t.uniforms.push("exposureLinear"), + t.uniforms.push("contrast"), + t.uniforms.push("vInverseScreenSize"), + t.uniforms.push("vignetteSettings1"), + t.uniforms.push("vignetteSettings2"), + t.uniforms.push("vCameraColorCurveNegative"), + t.uniforms.push("vCameraColorCurveNeutral"), + t.uniforms.push("vCameraColorCurvePositive"), + t.uniforms.push("txColorTransform"), + t.uniforms.push("colorTransformSettings"); + var n = this.color, + i = this._outputs[0], + r = "//" + this.name; + return ( + t._emitFunctionFromInclude("helperFunctions", r), + t._emitFunctionFromInclude("imageProcessingDeclaration", r), + t._emitFunctionFromInclude("imageProcessingFunctions", r), + n.connectedPoint.type === fs.Color4 || n.connectedPoint.type === fs.Vector4 + ? (t.compilationString += this._declareOutput(i, t) + " = " + n.associatedVariableName + ";\r\n") + : (t.compilationString += this._declareOutput(i, t) + " = vec4(" + n.associatedVariableName + ", 1.0);\r\n"), + (t.compilationString += "#ifdef IMAGEPROCESSINGPOSTPROCESS\r\n"), + (t.compilationString += i.associatedVariableName + ".rgb = toLinearSpace(" + n.associatedVariableName + ".rgb);\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += "#ifdef IMAGEPROCESSING\r\n"), + (t.compilationString += i.associatedVariableName + ".rgb = toLinearSpace(" + n.associatedVariableName + ".rgb);\r\n"), + (t.compilationString += i.associatedVariableName + " = applyImageProcessing(" + i.associatedVariableName + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#endif\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ImageProcessingBlock"] = Hs; + n(172), n(173); + var Ws = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment) || this; + return ( + (n._tangentSpaceParameterName = ""), + (n.invertX = !1), + (n.invertY = !1), + n.registerInput("worldPosition", fs.Vector4, !1), + n.registerInput("worldNormal", fs.Vector4, !1), + n.registerInput("worldTangent", fs.Vector4, !0), + n.registerInput("uv", fs.Vector2, !1), + n.registerInput("normalMapColor", fs.Color3, !1), + n.registerInput("strength", fs.Float, !1), + n.registerOutput("output", fs.Vector4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "PerturbNormalBlock"; + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldNormal", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldTangent", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "uv", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normalMapColor", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "strength", { + get: function () { + return this._inputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.prepareDefines = function (e, t, n) { + n.setValue("BUMP", !0); + }), + (t.prototype.bind = function (e, t, n) { + t.getScene()._mirroredCameraPosition + ? e.setFloat2(this._tangentSpaceParameterName, this.invertX ? 1 : -1, this.invertY ? 1 : -1) + : e.setFloat2(this._tangentSpaceParameterName, this.invertX ? -1 : 1, this.invertY ? -1 : 1); + }), + (t.prototype.autoConfigure = function (e) { + if (!this.uv.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "uv" === e.name; + }); + t || (t = new ks("uv")).setAsAttribute(), t.output.connectTo(this.uv); + } + if (!this.strength.isConnected) { + var n = new ks("strength"); + (n.value = 1), n.output.connectTo(this.strength); + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = "//" + this.name, + i = this.uv, + r = this.worldPosition, + o = this.worldNormal, + a = this.worldTangent; + t.sharedData.blocksWithDefines.push(this), + t.sharedData.bindableBlocks.push(this), + (this._tangentSpaceParameterName = t._getFreeDefineName("tangentSpaceParameter")), + t._emitUniformFromString(this._tangentSpaceParameterName, "vec2"); + var s = this.strength.isConnectedToInputBlock && this.strength.connectInputBlock.isConstant ? "" + t._emitFloat(1 / this.strength.connectInputBlock.value) : "1.0 / " + this.strength.associatedVariableName; + t._emitExtension("derivatives", "#extension GL_OES_standard_derivatives : enable"); + var c = { search: /defined\(TANGENT\)/g, replace: a.isConnected ? "defined(TANGENT)" : "defined(IGNORE)" }; + return ( + a.isConnected && + ((t.compilationString += "vec3 tbnNormal = normalize(" + o.associatedVariableName + ".xyz);\r\n"), + (t.compilationString += "vec3 tbnTangent = normalize(" + a.associatedVariableName + ".xyz);\r\n"), + (t.compilationString += "vec3 tbnBitangent = cross(tbnNormal, tbnTangent);\r\n"), + (t.compilationString += "mat3 vTBN = mat3(tbnTangent, tbnBitangent, tbnNormal);\r\n")), + t._emitFunctionFromInclude("bumpFragmentFunctions", n, { + replaceStrings: [{ search: /vBumpInfos.y/g, replace: s }, { search: /vTangentSpaceParams/g, replace: this._tangentSpaceParameterName }, { search: /vPositionW/g, replace: r.associatedVariableName + ".xyz" }, c], + }), + (t.compilationString += this._declareOutput(this.output, t) + " = vec4(0.);\r\n"), + (t.compilationString += t._emitCodeFromInclude("bumpFragment", n, { + replaceStrings: [ + { search: /perturbNormal\(TBN,vBumpUV\+uvOffset\)/g, replace: "perturbNormal(TBN, " + this.normalMapColor.associatedVariableName + ")" }, + { search: /vBumpInfos.y/g, replace: s }, + { search: /vBumpUV/g, replace: i.associatedVariableName }, + { search: /vPositionW/g, replace: r.associatedVariableName + ".xyz" }, + { search: /normalW=/g, replace: this.output.associatedVariableName + ".xyz = " }, + { search: /normalW/g, replace: o.associatedVariableName + ".xyz" }, + c, + ], + })), + this + ); + }), + (t.prototype._dumpPropertiesCode = function () { + var e = this._codeVariableName + ".invertX = " + this.invertX + ";\r\n"; + return (e += this._codeVariableName + ".invertY = " + this.invertY + ";\r\n"); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.invertX = this.invertX), (t.invertY = this.invertY), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.invertX = t.invertX), (this.invertY = t.invertY); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.PerturbNormalBlock"] = Ws; + var Xs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment, !0) || this; + return n.registerInput("value", fs.Float, !0), n.registerInput("cutoff", fs.Float, !0), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DiscardBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cutoff", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + return ( + e.prototype._buildBlock.call(this, t), + (t.sharedData.hints.needAlphaTesting = !0), + (t.compilationString += "if (" + this.value.associatedVariableName + " < " + this.cutoff.associatedVariableName + ") discard;\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DiscardBlock"] = Xs; + var Ys = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment) || this; + return n.registerOutput("output", fs.Float, ps.Fragment), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "FrontFacingBlock"; + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), t.target === ps.Vertex)) throw "FrontFacingBlock must only be used in a fragment shader"; + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = gl_FrontFacing ? 1.0 : 0.0;\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.FrontFacingBlock"] = Ys; + var Ks = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Fragment) || this; + return ( + n.registerInput("input", fs.AutoDetect, !1), + n.registerOutput("dx", fs.BasedOnInput), + n.registerOutput("dy", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + (n._outputs[1]._typeConnectionSource = n._inputs[0]), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DerivativeBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dx", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dy", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this._outputs[1]; + return ( + t._emitExtension("derivatives", "#extension GL_OES_standard_derivatives : enable"), + n.hasEndpoints && (t.compilationString += this._declareOutput(n, t) + " = dFdx(" + this.input.associatedVariableName + ");\r\n"), + i.hasEndpoints && (t.compilationString += this._declareOutput(i, t) + " = dFdy(" + this.input.associatedVariableName + ");\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DerivativeBlock"] = Ks; + var Zs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.VertexAndFragment, !0) || this; + return ( + n.registerInput("worldPosition", fs.Vector4, !1, ps.Vertex), + n.registerInput("view", fs.Matrix, !1, ps.Vertex), + n.registerInput("input", fs.Color3, !1, ps.Fragment), + n.registerInput("fogColor", fs.Color3, !1, ps.Fragment), + n.registerOutput("output", fs.Color3, ps.Fragment), + n.input.acceptedConnectionPointTypes.push(fs.Color4), + n.fogColor.acceptedConnectionPointTypes.push(fs.Color4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "FogBlock"; + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "view", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fogColor", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.view.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.View; + }); + t || (t = new ks("view")).setAsSystemValue(gs.View), t.output.connectTo(this.view); + } + if (!this.fogColor.isConnected) { + var n = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.FogColor; + }); + n || (n = new ks("fogColor", void 0, fs.Color3)).setAsSystemValue(gs.FogColor), n.output.connectTo(this.fogColor); + } + }), + (t.prototype.prepareDefines = function (e, t, n) { + var i = e.getScene(); + n.setValue("FOG", t.fogEnabled && Ir.a.GetFogState(e, i)); + }), + (t.prototype.bind = function (e, t, n) { + if (n) { + var i = n.getScene(); + e.setFloat4(this._fogParameters, i.fogMode, i.fogStart, i.fogEnd, i.fogDensity); + } + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), t.target === ps.Fragment)) { + t.sharedData.blocksWithDefines.push(this), + t.sharedData.bindableBlocks.push(this), + t._emitFunctionFromInclude("fogFragmentDeclaration", "//" + this.name, { + removeUniforms: !0, + removeVaryings: !0, + removeIfDef: !1, + replaceStrings: [{ search: /float CalcFogFactor\(\)/, replace: "float CalcFogFactor(vec3 vFogDistance, vec4 vFogInfos)" }], + }); + var n = t._getFreeVariableName("fog"), + i = this.input, + r = this.fogColor; + this._fogParameters = t._getFreeVariableName("fogParameters"); + var o = this._outputs[0]; + t._emitUniformFromString(this._fogParameters, "vec4"), + (t.compilationString += "#ifdef FOG\r\n"), + (t.compilationString += "float " + n + " = CalcFogFactor(" + this._fogDistanceName + ", " + this._fogParameters + ");\r\n"), + (t.compilationString += this._declareOutput(o, t) + " = " + n + " * " + i.associatedVariableName + ".rgb + (1.0 - " + n + ") * " + r.associatedVariableName + ".rgb;\r\n"), + (t.compilationString += "#else\r\n" + this._declareOutput(o, t) + " = " + i.associatedVariableName + ".rgb;\r\n"), + (t.compilationString += "#endif\r\n"); + } else { + var a = this.worldPosition, + s = this.view; + (this._fogDistanceName = t._getFreeVariableName("vFogDistance")), + t._emitVaryingFromString(this._fogDistanceName, "vec3"), + (t.compilationString += this._fogDistanceName + " = (" + s.associatedVariableName + " * " + a.associatedVariableName + ").xyz;\r\n"); + } + return this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.FogBlock"] = Zs; + var qs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.VertexAndFragment) || this; + return ( + (n._isUnique = !0), + n.registerInput("worldPosition", fs.Vector4, !1, ps.Vertex), + n.registerInput("worldNormal", fs.Vector4, !1, ps.Fragment), + n.registerInput("cameraPosition", fs.Vector3, !1, ps.Fragment), + n.registerInput("glossiness", fs.Float, !0, ps.Fragment), + n.registerInput("glossPower", fs.Float, !0, ps.Fragment), + n.registerInput("diffuseColor", fs.Color3, !0, ps.Fragment), + n.registerInput("specularColor", fs.Color3, !0, ps.Fragment), + n.registerOutput("diffuseOutput", fs.Color3, ps.Fragment), + n.registerOutput("specularOutput", fs.Color3, ps.Fragment), + n.registerOutput("shadow", fs.Float, ps.Fragment), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "LightBlock"; + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldNormal", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraPosition", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "glossiness", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "glossPower", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "diffuseColor", { + get: function () { + return this._inputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "specularColor", { + get: function () { + return this._inputs[6]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "diffuseOutput", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "specularOutput", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadow", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.cameraPosition.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.CameraPosition; + }); + t || (t = new ks("cameraPosition")).setAsSystemValue(gs.CameraPosition), t.output.connectTo(this.cameraPosition); + } + }), + (t.prototype.prepareDefines = function (e, t, n) { + if (n._areLightsDirty) { + var i = e.getScene(); + if (this.light) { + var r = { needNormals: !1, needRebuild: !1, lightmapMode: !1, shadowEnabled: !1, specularEnabled: !1 }; + Ir.a.PrepareDefinesForLight(i, e, this.light, this._lightId, n, !0, r), r.needRebuild && n.rebuild(); + } else Ir.a.PrepareDefinesForLights(i, e, n, !0, t.maxSimultaneousLights); + } + }), + (t.prototype.updateUniformsAndSamples = function (e, t, n, i) { + for (var r = 0; r < t.maxSimultaneousLights && n["LIGHT" + r]; r++) Ir.a.PrepareUniformsAndSamplersForLight(r, e.uniforms, e.samplers, n["PROJECTEDLIGHTTEXTURE" + r], i); + }), + (t.prototype.bind = function (e, t, n) { + if (n) { + var i = n.getScene(); + this.light ? Ir.a.BindLight(this.light, this._lightId, i, e, !0) : Ir.a.BindLights(i, n, e, !0, t.maxSimultaneousLights); + } + }), + (t.prototype._injectVertexCode = function (e) { + var t = this.worldPosition, + n = "//" + this.name; + this.light + ? ((this._lightId = (void 0 !== e.counters.lightCounter ? e.counters.lightCounter : -1) + 1), + (e.counters.lightCounter = this._lightId), + e._emitFunctionFromInclude(e.supportUniformBuffers ? "lightUboDeclaration" : "lightFragmentDeclaration", n, { replaceStrings: [{ search: /{X}/g, replace: this._lightId.toString() }] }, this._lightId.toString())) + : (e._emitFunctionFromInclude(e.supportUniformBuffers ? "lightUboDeclaration" : "lightFragmentDeclaration", n, { repeatKey: "maxSimultaneousLights" }), + (this._lightId = 0), + e.sharedData.dynamicUniformBlocks.push(this)); + var i = "v_" + t.associatedVariableName; + e._emitVaryingFromString(i, "vec4") && (e.compilationString += i + " = " + t.associatedVariableName + ";\r\n"), + this.light + ? (e.compilationString += e._emitCodeFromInclude("shadowsVertex", n, { + replaceStrings: [ + { search: /{X}/g, replace: this._lightId.toString() }, + { search: /worldPos/g, replace: t.associatedVariableName }, + ], + })) + : ((e.compilationString += "vec4 worldPos = " + t.associatedVariableName + ";\r\n"), (e.compilationString += e._emitCodeFromInclude("shadowsVertex", n, { repeatKey: "maxSimultaneousLights" }))); + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), t.target === ps.Fragment)) { + t.sharedData.bindableBlocks.push(this), t.sharedData.blocksWithDefines.push(this); + var n = "//" + this.name, + i = this.worldPosition; + t._emitFunctionFromInclude("helperFunctions", n), + t._emitFunctionFromInclude("lightsFragmentFunctions", n, { replaceStrings: [{ search: /vPositionW/g, replace: "v_" + i.associatedVariableName + ".xyz" }] }), + t._emitFunctionFromInclude("shadowsFragmentFunctions", n, { replaceStrings: [{ search: /vPositionW/g, replace: "v_" + i.associatedVariableName + ".xyz" }] }), + this.light + ? t._emitFunctionFromInclude( + t.supportUniformBuffers ? "lightUboDeclaration" : "lightFragmentDeclaration", + n, + { replaceStrings: [{ search: /{X}/g, replace: this._lightId.toString() }] }, + this._lightId.toString() + ) + : t._emitFunctionFromInclude(t.supportUniformBuffers ? "lightUboDeclaration" : "lightFragmentDeclaration", n, { repeatKey: "maxSimultaneousLights" }), + 0 === this._lightId && + (t._registerTempVariable("viewDirectionW") && (t.compilationString += "vec3 viewDirectionW = normalize(" + this.cameraPosition.associatedVariableName + " - v_" + i.associatedVariableName + ".xyz);\r\n"), + (t.compilationString += "lightingInfo info;\r\n"), + (t.compilationString += "float shadow = 1.;\r\n"), + (t.compilationString += + "float glossiness = " + + (this.glossiness.isConnected ? this.glossiness.associatedVariableName : "1.0") + + " * " + + (this.glossPower.isConnected ? this.glossPower.associatedVariableName : "1024.0") + + ";\r\n"), + (t.compilationString += "vec3 diffuseBase = vec3(0., 0., 0.);\r\n"), + (t.compilationString += "vec3 specularBase = vec3(0., 0., 0.);\r\n"), + (t.compilationString += "vec3 normalW = " + this.worldNormal.associatedVariableName + ".xyz;\r\n")), + this.light + ? (t.compilationString += t._emitCodeFromInclude("lightFragment", n, { replaceStrings: [{ search: /{X}/g, replace: this._lightId.toString() }] })) + : (t.compilationString += t._emitCodeFromInclude("lightFragment", n, { repeatKey: "maxSimultaneousLights" })); + var r = this.diffuseOutput, + o = this.specularOutput; + return ( + (t.compilationString += this._declareOutput(r, t) + " = diffuseBase" + (this.diffuseColor.isConnected ? " * " + this.diffuseColor.associatedVariableName : "") + ";\r\n"), + o.hasEndpoints && (t.compilationString += this._declareOutput(o, t) + " = specularBase" + (this.specularColor.isConnected ? " * " + this.specularColor.associatedVariableName : "") + ";\r\n"), + this.shadow.hasEndpoints && (t.compilationString += this._declareOutput(this.shadow, t) + " = shadow;\r\n"), + this + ); + } + this._injectVertexCode(t); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return this.light && (t.lightId = this.light.id), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), t.lightId && (this.light = n.getLightByID(t.lightId)); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.LightBlock"] = qs; + var Qs = (function (e) { + function t(t) { + var n = e.call(this, t, ps.VertexAndFragment) || this; + return ( + (n.convertToGammaSpace = !1), + n.registerInput("uv", fs.Vector2, !1, ps.VertexAndFragment), + n.registerOutput("rgba", fs.Color4, ps.Neutral), + n.registerOutput("rgb", fs.Color3, ps.Neutral), + n.registerOutput("r", fs.Float, ps.Neutral), + n.registerOutput("g", fs.Float, ps.Neutral), + n.registerOutput("b", fs.Float, ps.Neutral), + n.registerOutput("a", fs.Float, ps.Neutral), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + (n._inputs[0]._prioritizeVertex = !0), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "TextureBlock"; + }), + Object.defineProperty(t.prototype, "uv", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgba", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgb", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "r", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "g", { + get: function () { + return this._outputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "b", { + get: function () { + return this._outputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "a", { + get: function () { + return this._outputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "target", { + get: function () { + if (!this.uv.isConnected) return ps.VertexAndFragment; + if (this.uv.sourceBlock.isInput) return ps.VertexAndFragment; + for (var e = this.uv.connectedPoint; e; ) { + if (e.target === ps.Fragment) return ps.Fragment; + if (e.target === ps.Vertex) return ps.VertexAndFragment; + if (e.target === ps.Neutral || e.target === ps.VertexAndFragment) { + var t = e.ownerBlock; + e = null; + for (var n = 0, i = t.inputs; n < i.length; n++) { + var r = i[n]; + if (r.connectedPoint) { + e = r.connectedPoint; + break; + } + } + } + } + return ps.VertexAndFragment; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.uv.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "uv" === e.name; + }); + t || (t = new ks("uv")).setAsAttribute(), t.output.connectTo(this.uv); + } + }), + (t.prototype.initializeDefines = function (e, t, n, i) { + void 0 === i && (i = !1), n._areTexturesDirty && n.setValue(this._mainUVDefineName, !1); + }), + (t.prototype.prepareDefines = function (e, t, n) { + if (n._areTexturesDirty) { + if (!this.texture || !this.texture.getTextureMatrix) return n.setValue(this._defineName, !1), void n.setValue(this._mainUVDefineName, !0); + n.setValue(this._linearDefineName, this.convertToGammaSpace), + this._isMixed && (this.texture.getTextureMatrix().isIdentityAs3x2() ? (n.setValue(this._defineName, !1), n.setValue(this._mainUVDefineName, !0)) : n.setValue(this._defineName, !0)); + } + }), + (t.prototype.isReady = function () { + return !(this.texture && !this.texture.isReadyOrNotBlocking()); + }), + (t.prototype.bind = function (e, t, n) { + n && this.texture && (this._isMixed && (e.setFloat(this._textureInfoName, this.texture.level), e.setMatrix(this._textureTransformName, this.texture.getTextureMatrix())), e.setTexture(this._samplerName, this.texture)); + }), + Object.defineProperty(t.prototype, "_isMixed", { + get: function () { + return this.target !== ps.Fragment; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._injectVertexCode = function (e) { + var t = this.uv; + ((this._defineName = e._getFreeDefineName("UVTRANSFORM")), (this._mainUVDefineName = "VMAIN" + t.associatedVariableName.toUpperCase()), t.connectedPoint.ownerBlock.isInput) && + (t.connectedPoint.ownerBlock.isAttribute || e._emitUniformFromString(t.associatedVariableName, "vec2")); + if ( + ((this._mainUVName = "vMain" + t.associatedVariableName), + (this._transformedUVName = e._getFreeVariableName("transformedUV")), + (this._textureTransformName = e._getFreeVariableName("textureTransform")), + (this._textureInfoName = e._getFreeVariableName("textureInfoName")), + e._emitVaryingFromString(this._transformedUVName, "vec2", this._defineName), + e._emitVaryingFromString(this._mainUVName, "vec2", this._mainUVDefineName), + e._emitUniformFromString(this._textureTransformName, "mat4", this._defineName), + (e.compilationString += "#ifdef " + this._defineName + "\r\n"), + (e.compilationString += this._transformedUVName + " = vec2(" + this._textureTransformName + " * vec4(" + t.associatedVariableName + ".xy, 1.0, 0.0));\r\n"), + (e.compilationString += "#elif defined(" + this._mainUVDefineName + ")\r\n"), + (e.compilationString += this._mainUVName + " = " + t.associatedVariableName + ".xy;\r\n"), + (e.compilationString += "#endif\r\n"), + this._outputs.some(function (e) { + return e.isConnectedInVertexShader; + })) + ) { + this._writeTextureRead(e, !0); + for (var n = 0, i = this._outputs; n < i.length; n++) { + var r = i[n]; + r.hasEndpoints && this._writeOutput(e, r, r.name, !0); + } + } + }), + (t.prototype._writeTextureRead = function (e, t) { + void 0 === t && (t = !1); + var n = this.uv; + if (t) { + if (e.target === ps.Fragment) return; + e.compilationString += "vec4 " + this._tempTextureRead + " = texture2D(" + this._samplerName + ", " + n.associatedVariableName + ");\r\n"; + } else + this.uv.ownerBlock.target !== ps.Fragment + ? ((e.compilationString += "#ifdef " + this._defineName + "\r\n"), + (e.compilationString += "vec4 " + this._tempTextureRead + " = texture2D(" + this._samplerName + ", " + this._transformedUVName + ");\r\n"), + (e.compilationString += "#elif defined(" + this._mainUVDefineName + ")\r\n"), + (e.compilationString += "vec4 " + this._tempTextureRead + " = texture2D(" + this._samplerName + ", " + this._mainUVName + ");\r\n"), + (e.compilationString += "#endif\r\n")) + : (e.compilationString += "vec4 " + this._tempTextureRead + " = texture2D(" + this._samplerName + ", " + n.associatedVariableName + ");\r\n"); + }), + (t.prototype._writeOutput = function (e, t, n, i) { + if ((void 0 === i && (i = !1), i)) { + if (e.target === ps.Fragment) return; + e.compilationString += this._declareOutput(t, e) + " = " + this._tempTextureRead + "." + n + ";\r\n"; + } else if (this.uv.ownerBlock.target !== ps.Fragment) { + var r = " * " + this._textureInfoName; + (e.compilationString += this._declareOutput(t, e) + " = " + this._tempTextureRead + "." + n + r + ";\r\n"), + (e.compilationString += "#ifdef " + this._linearDefineName + "\r\n"), + (e.compilationString += t.associatedVariableName + " = toGammaSpace(" + t.associatedVariableName + ");\r\n"), + (e.compilationString += "#endif\r\n"); + } else e.compilationString += this._declareOutput(t, e) + " = " + this._tempTextureRead + "." + n + ";\r\n"; + }), + (t.prototype._buildBlock = function (t) { + if ( + (e.prototype._buildBlock.call(this, t), + t.target === ps.Vertex && (this._tempTextureRead = t._getFreeVariableName("tempTextureRead")), + ((!this._isMixed && t.target === ps.Fragment) || (this._isMixed && t.target === ps.Vertex)) && + ((this._samplerName = t._getFreeVariableName(this.name + "Sampler")), + t._emit2DSampler(this._samplerName), + t.sharedData.blockingBlocks.push(this), + t.sharedData.textureBlocks.push(this), + t.sharedData.blocksWithDefines.push(this), + t.sharedData.bindableBlocks.push(this)), + t.target === ps.Fragment) + ) { + if ( + this._outputs.some(function (e) { + return e.isConnectedInFragmentShader; + }) + ) { + this._isMixed && t._emit2DSampler(this._samplerName), (this._linearDefineName = t._getFreeDefineName("ISLINEAR")); + var n = "//" + this.name; + t._emitFunctionFromInclude("helperFunctions", n), this._isMixed && t._emitUniformFromString(this._textureInfoName, "float"), this._writeTextureRead(t); + for (var i = 0, r = this._outputs; i < r.length; i++) { + var o = r[i]; + o.hasEndpoints && this._writeOutput(t, o, o.name); + } + return this; + } + } else this._injectVertexCode(t); + }), + (t.prototype._dumpPropertiesCode = function () { + if (!this.texture) return ""; + var e = this._codeVariableName + '.texture = new BABYLON.Texture("' + this.texture.name + '");\r\n'; + return ( + (e += this._codeVariableName + ".texture.wrapU = " + this.texture.wrapU + ";\r\n"), + (e += this._codeVariableName + ".texture.wrapV = " + this.texture.wrapV + ";\r\n"), + (e += this._codeVariableName + ".texture.uAng = " + this.texture.uAng + ";\r\n"), + (e += this._codeVariableName + ".texture.vAng = " + this.texture.vAng + ";\r\n"), + (e += this._codeVariableName + ".texture.wAng = " + this.texture.wAng + ";\r\n"), + (e += this._codeVariableName + ".texture.uOffset = " + this.texture.uOffset + ";\r\n"), + (e += this._codeVariableName + ".texture.vOffset = " + this.texture.vOffset + ";\r\n"), + (e += this._codeVariableName + ".texture.uScale = " + this.texture.uScale + ";\r\n"), + (e += this._codeVariableName + ".texture.vScale = " + this.texture.vScale + ";\r\n"), + (e += this._codeVariableName + ".convertToGammaSpace = " + this.convertToGammaSpace + ";\r\n") + ); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.convertToGammaSpace = this.convertToGammaSpace), this.texture && (t.texture = this.texture.serialize()), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.convertToGammaSpace = t.convertToGammaSpace), t.texture && ((i = 0 === t.texture.url.indexOf("data:") ? "" : i), (this.texture = ln.a.Parse(t.texture, n, i))); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.TextureBlock"] = Qs; + var Js = (function (e) { + function t(t) { + var n = e.call(this, t, ps.VertexAndFragment) || this; + return ( + n.registerInput("position", fs.Vector3, !1, ps.Vertex), + n.registerInput("worldPosition", fs.Vector4, !1, ps.Vertex), + n.registerInput("worldNormal", fs.Vector4, !1, ps.Fragment), + n.registerInput("world", fs.Matrix, !1, ps.Vertex), + n.registerInput("cameraPosition", fs.Vector3, !1, ps.Fragment), + n.registerInput("view", fs.Matrix, !1, ps.Fragment), + n.registerOutput("rgb", fs.Color3, ps.Fragment), + n.registerOutput("r", fs.Float, ps.Fragment), + n.registerOutput("g", fs.Float, ps.Fragment), + n.registerOutput("b", fs.Float, ps.Fragment), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ReflectionTextureBlock"; + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "worldNormal", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "world", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraPosition", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "view", { + get: function () { + return this._inputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgb", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "r", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "g", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "b", { + get: function () { + return this._outputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.position.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.isAttribute && "position" === e.name; + }); + t || (t = new ks("position")).setAsAttribute(), t.output.connectTo(this.position); + } + if (!this.world.isConnected) { + var n = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.World; + }); + n || (n = new ks("world")).setAsSystemValue(gs.World), n.output.connectTo(this.world); + } + if (!this.cameraPosition.isConnected) { + var i = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.CameraPosition; + }); + i || (i = new ks("cameraPosition")).setAsSystemValue(gs.CameraPosition), i.output.connectTo(this.cameraPosition); + } + if (!this.view.isConnected) { + var r = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.View; + }); + r || (r = new ks("view")).setAsSystemValue(gs.View), r.output.connectTo(this.view); + } + }), + (t.prototype.prepareDefines = function (e, t, n) { + n._areTexturesDirty && + this.texture && + this.texture.getTextureMatrix && + (n.setValue(this._define3DName, this.texture.isCube), + n.setValue(this._defineLocalCubicName, !!this.texture.boundingBoxSize), + n.setValue(this._defineExplicitName, 0 === this.texture.coordinatesMode), + n.setValue(this._defineSkyboxName, 5 === this.texture.coordinatesMode), + n.setValue(this._defineCubicName, 3 === this.texture.coordinatesMode), + n.setValue(this._defineSphericalName, 1 === this.texture.coordinatesMode), + n.setValue(this._definePlanarName, 2 === this.texture.coordinatesMode), + n.setValue(this._defineProjectionName, 4 === this.texture.coordinatesMode), + n.setValue(this._defineEquirectangularName, 7 === this.texture.coordinatesMode), + n.setValue(this._defineEquirectangularFixedName, 8 === this.texture.coordinatesMode), + n.setValue(this._defineMirroredEquirectangularFixedName, 9 === this.texture.coordinatesMode)); + }), + (t.prototype.isReady = function () { + return !(this.texture && !this.texture.isReadyOrNotBlocking()); + }), + (t.prototype.bind = function (e, t, n) { + n && + this.texture && + (e.setMatrix(this._reflectionMatrixName, this.texture.getReflectionTextureMatrix()), this.texture.isCube ? e.setTexture(this._cubeSamplerName, this.texture) : e.setTexture(this._2DSamplerName, this.texture)); + }), + (t.prototype._injectVertexCode = function (e) { + var t = "v_" + this.worldPosition.associatedVariableName; + e._emitVaryingFromString(t, "vec4") && (e.compilationString += t + " = " + this.worldPosition.associatedVariableName + ";\r\n"), + (this._positionUVWName = e._getFreeVariableName("positionUVW")), + (this._directionWName = e._getFreeVariableName("directionW")), + e._emitVaryingFromString(this._positionUVWName, "vec3", this._defineSkyboxName) && + ((e.compilationString += "#ifdef " + this._defineSkyboxName + "\r\n"), + (e.compilationString += this._positionUVWName + " = " + this.position.associatedVariableName + ".xyz;\r\n"), + (e.compilationString += "#endif\r\n")), + e._emitVaryingFromString(this._directionWName, "vec3", "defined(" + this._defineEquirectangularFixedName + ") || defined(" + this._defineMirroredEquirectangularFixedName + ")") && + ((e.compilationString += "#if defined(" + this._defineEquirectangularFixedName + ") || defined(" + this._defineMirroredEquirectangularFixedName + ")\r\n"), + (e.compilationString += this._directionWName + " = normalize(vec3(" + this.world.associatedVariableName + " * vec4(" + this.position.associatedVariableName + ".xyz, 0.0)));\r\n"), + (e.compilationString += "#endif\r\n")); + }), + (t.prototype._writeOutput = function (e, t, n) { + e.compilationString += this._declareOutput(t, e) + " = " + this._reflectionColorName + "." + n + ";\r\n"; + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), this.texture)) { + if (t.target !== ps.Fragment) + return ( + (this._define3DName = t._getFreeDefineName("REFLECTIONMAP_3D")), + (this._defineCubicName = t._getFreeDefineName("REFLECTIONMAP_CUBIC")), + (this._defineSphericalName = t._getFreeDefineName("REFLECTIONMAP_SPHERICAL")), + (this._definePlanarName = t._getFreeDefineName("REFLECTIONMAP_PLANAR")), + (this._defineProjectionName = t._getFreeDefineName("REFLECTIONMAP_PROJECTION")), + (this._defineExplicitName = t._getFreeDefineName("REFLECTIONMAP_EXPLICIT")), + (this._defineEquirectangularName = t._getFreeDefineName("REFLECTIONMAP_EQUIRECTANGULAR")), + (this._defineLocalCubicName = t._getFreeDefineName("USE_LOCAL_REFLECTIONMAP_CUBIC")), + (this._defineMirroredEquirectangularFixedName = t._getFreeDefineName("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED")), + (this._defineEquirectangularFixedName = t._getFreeDefineName("REFLECTIONMAP_EQUIRECTANGULAR_FIXED")), + (this._defineSkyboxName = t._getFreeDefineName("REFLECTIONMAP_SKYBOX")), + void this._injectVertexCode(t) + ); + t.sharedData.blockingBlocks.push(this), + t.sharedData.textureBlocks.push(this), + (this._cubeSamplerName = t._getFreeVariableName(this.name + "CubeSampler")), + t.samplers.push(this._cubeSamplerName), + (this._2DSamplerName = t._getFreeVariableName(this.name + "2DSampler")), + t.samplers.push(this._2DSamplerName), + (t._samplerDeclaration += "#ifdef " + this._define3DName + "\r\n"), + (t._samplerDeclaration += "uniform samplerCube " + this._cubeSamplerName + ";\r\n"), + (t._samplerDeclaration += "#else\r\n"), + (t._samplerDeclaration += "uniform sampler2D " + this._2DSamplerName + ";\r\n"), + (t._samplerDeclaration += "#endif\r\n"), + t.sharedData.blocksWithDefines.push(this), + t.sharedData.bindableBlocks.push(this); + var n = "//" + this.name; + t._emitFunction("ReciprocalPI", "#define RECIPROCAL_PI2 0.15915494", ""), + t._emitFunctionFromInclude("reflectionFunction", n), + (this._reflectionColorName = t._getFreeVariableName("reflectionColor")), + (this._reflectionCoordsName = t._getFreeVariableName("reflectionUVW")), + (this._reflection2DCoordsName = t._getFreeVariableName("reflectionUV")), + (this._reflectionMatrixName = t._getFreeVariableName("reflectionMatrix")), + t._emitUniformFromString(this._reflectionMatrixName, "mat4"); + var i = "v_" + this.worldPosition.associatedVariableName, + r = this.worldNormal.associatedVariableName + ".xyz", + o = this._reflectionMatrixName, + a = "normalize(" + this._directionWName + ")", + s = "" + this._positionUVWName, + c = "" + this.cameraPosition.associatedVariableName, + l = "" + this.view.associatedVariableName; + (t.compilationString += "vec3 " + this._reflectionColorName + ";\r\n"), + (t.compilationString += "#ifdef " + this._defineMirroredEquirectangularFixedName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeMirroredFixedEquirectangularCoords(" + i + ", " + r + ", " + a + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineEquirectangularFixedName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeFixedEquirectangularCoords(" + i + ", " + r + ", " + a + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineEquirectangularName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeEquirectangularCoords(" + i + ", " + r + ", " + c + ".xyz, " + o + ");\r\n"), + (t.compilationString += " #endif\r\n"), + (t.compilationString += "#ifdef " + this._defineSphericalName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeSphericalCoords(" + i + ", " + r + ", " + l + ", " + o + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._definePlanarName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computePlanarCoords(" + i + ", " + r + ", " + c + ".xyz, " + o + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineCubicName + "\r\n"), + (t.compilationString += " #ifdef " + this._defineLocalCubicName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeCubicLocalCoords(" + i + ", " + r + ", " + c + ".xyz, " + o + ", vReflectionSize, vReflectionPosition);\r\n"), + (t.compilationString += " #else\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeCubicCoords(" + i + ", " + r + ", " + c + ".xyz, " + o + ");\r\n"), + (t.compilationString += " #endif\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineProjectionName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeProjectionCoords(" + i + ", " + l + ", " + o + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineSkyboxName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = computeSkyBoxCoords(" + s + ", " + o + ");\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._defineExplicitName + "\r\n"), + (t.compilationString += " vec3 " + this._reflectionCoordsName + " = vec3(0, 0, 0);\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += "#ifdef " + this._define3DName + "\r\n"), + (t.compilationString += this._reflectionColorName + " = textureCube(" + this._cubeSamplerName + ", " + this._reflectionCoordsName + ").rgb;\r\n"), + (t.compilationString += "#else\r\n"), + (t.compilationString += "vec2 " + this._reflection2DCoordsName + " = " + this._reflectionCoordsName + ".xy;\r\n"), + (t.compilationString += "#ifdef " + this._defineProjectionName + "\r\n"), + (t.compilationString += this._reflection2DCoordsName + " /= " + this._reflectionCoordsName + ".z;\r\n"), + (t.compilationString += "#endif\r\n"), + (t.compilationString += this._reflection2DCoordsName + ".y = 1.0 - " + this._reflection2DCoordsName + ".y;\r\n"), + (t.compilationString += this._reflectionColorName + " = texture2D(" + this._2DSamplerName + ", " + this._reflection2DCoordsName + ").rgb;\r\n"), + (t.compilationString += "#endif\r\n"); + for (var u = 0, h = this._outputs; u < h.length; u++) { + (f = h[u]).hasEndpoints && this._writeOutput(t, f, f.name); + } + return this; + } + if (t.target === ps.Fragment) + for (var d = 0, p = this._outputs; d < p.length; d++) { + var f; + (f = p[d]).hasEndpoints && (t.compilationString += this._declareOutput(f, t) + " = vec3(0.)." + f.name + ";\r\n"); + } + }), + (t.prototype._dumpPropertiesCode = function () { + return this.texture + ? ((e = this.texture.isCube + ? this._codeVariableName + '.texture = new BABYLON.CubeTexture("' + this.texture.name + '");\r\n' + : this._codeVariableName + '.texture = new BABYLON.Texture("' + this.texture.name + '");\r\n'), + (e += this._codeVariableName + ".texture.coordinatesMode = " + this.texture.coordinatesMode + ";\r\n")) + : ""; + var e; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return this.texture && (t.texture = this.texture.serialize()), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), + t.texture && ((i = 0 === t.texture.url.indexOf("data:") ? "" : i), t.texture.isCube ? (this.texture = Ar.a.Parse(t.texture, n, i)) : (this.texture = ln.a.Parse(t.texture, n, i))); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ReflectionTextureBlock"] = Js; + var $s = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "MultiplyBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = " + this.left.associatedVariableName + " * " + this.right.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.MultiplyBlock"] = $s; + var ec = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "AddBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = " + this.left.associatedVariableName + " + " + this.right.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.AddBlock"] = ec; + var tc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("input", fs.AutoDetect), n.registerInput("factor", fs.Float), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ScaleBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "factor", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = " + this.input.associatedVariableName + " * " + this.factor.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ScaleBlock"] = tc; + var nc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return (n.minimum = 0), (n.maximum = 1), n.registerInput("value", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ClampBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = clamp(" + this.value.associatedVariableName + ", " + this._writeFloat(this.minimum) + ", " + this._writeFloat(this.maximum) + ");\r\n"), this; + }), + (t.prototype._dumpPropertiesCode = function () { + var e = this._codeVariableName + ".minimum = " + this.minimum + ";\r\n"; + return (e += this._codeVariableName + ".maximum = " + this.maximum + ";\r\n"); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.minimum = this.minimum), (t.maximum = this.maximum), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.minimum = t.minimum), (this.maximum = t.maximum); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ClampBlock"] = nc; + var ic = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("left", fs.AutoDetect), + n.registerInput("right", fs.AutoDetect), + n.registerOutput("output", fs.Vector3), + n._linkConnectionTypes(0, 1), + n._inputs[0].excludedConnectionPointTypes.push(fs.Float), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[0].excludedConnectionPointTypes.push(fs.Vector2), + n._inputs[1].excludedConnectionPointTypes.push(fs.Float), + n._inputs[1].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[1].excludedConnectionPointTypes.push(fs.Vector2), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "CrossBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = cross(" + this.left.associatedVariableName + ".xyz, " + this.right.associatedVariableName + ".xyz);\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.CrossBlock"] = ic; + var rc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("left", fs.AutoDetect), + n.registerInput("right", fs.AutoDetect), + n.registerOutput("output", fs.Float), + n._linkConnectionTypes(0, 1), + n._inputs[0].excludedConnectionPointTypes.push(fs.Float), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[1].excludedConnectionPointTypes.push(fs.Float), + n._inputs[1].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DotBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = dot(" + this.left.associatedVariableName + ", " + this.right.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DotBlock"] = rc; + var oc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + (n.sourceRange = new a.d(-1, 1)), + (n.targetRange = new a.d(0, 1)), + n.registerInput("input", fs.AutoDetect), + n.registerInput("sourceMin", fs.Float, !0), + n.registerInput("sourceMax", fs.Float, !0), + n.registerInput("targetMin", fs.Float, !0), + n.registerInput("targetMax", fs.Float, !0), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "RemapBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "sourceMin", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "sourceMax", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "targetMin", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "targetMax", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this.sourceMin.isConnected ? this.sourceMin.associatedVariableName : this._writeFloat(this.sourceRange.x), + r = this.sourceMax.isConnected ? this.sourceMax.associatedVariableName : this._writeFloat(this.sourceRange.y), + o = this.targetMin.isConnected ? this.targetMin.associatedVariableName : this._writeFloat(this.targetRange.x), + a = this.targetMax.isConnected ? this.targetMax.associatedVariableName : this._writeFloat(this.targetRange.y); + return (t.compilationString += this._declareOutput(n, t) + " = " + o + " + (" + this._inputs[0].associatedVariableName + " - " + i + ") * (" + a + " - " + o + ") / (" + r + " - " + i + ");\r\n"), this; + }), + (t.prototype._dumpPropertiesCode = function () { + var e = this._codeVariableName + ".sourceRange = new BABYLON.Vector2(" + this.sourceRange.x + ", " + this.sourceRange.y + ");\r\n"; + return (e += this._codeVariableName + ".targetRange = new BABYLON.Vector2(" + this.targetRange.x + ", " + this.targetRange.y + ");\r\n"); + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.sourceRange = this.sourceRange.asArray()), (t.targetRange = this.targetRange.asArray()), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.sourceRange = a.d.FromArray(t.sourceRange)), (this.targetRange = a.d.FromArray(t.targetRange)); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.RemapBlock"] = oc; + var ac, + sc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("input", fs.AutoDetect), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._inputs[0].excludedConnectionPointTypes.push(fs.Float), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "NormalizeBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this._inputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = normalize(" + i.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + (c.a.RegisteredTypes["BABYLON.NormalizeBlock"] = sc), + (function (e) { + (e[(e.Cos = 0)] = "Cos"), + (e[(e.Sin = 1)] = "Sin"), + (e[(e.Abs = 2)] = "Abs"), + (e[(e.Exp = 3)] = "Exp"), + (e[(e.Exp2 = 4)] = "Exp2"), + (e[(e.Round = 5)] = "Round"), + (e[(e.Floor = 6)] = "Floor"), + (e[(e.Ceiling = 7)] = "Ceiling"), + (e[(e.Sqrt = 8)] = "Sqrt"), + (e[(e.Log = 9)] = "Log"), + (e[(e.Tan = 10)] = "Tan"), + (e[(e.ArcTan = 11)] = "ArcTan"), + (e[(e.ArcCos = 12)] = "ArcCos"), + (e[(e.ArcSin = 13)] = "ArcSin"), + (e[(e.Fract = 14)] = "Fract"), + (e[(e.Sign = 15)] = "Sign"), + (e[(e.Radians = 16)] = "Radians"), + (e[(e.Degrees = 17)] = "Degrees"); + })(ac || (ac = {})); + var cc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return (n.operation = ac.Cos), n.registerInput("input", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "TrigonometryBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = ""; + switch (this.operation) { + case ac.Cos: + i = "cos"; + break; + case ac.Sin: + i = "sin"; + break; + case ac.Abs: + i = "abs"; + break; + case ac.Exp: + i = "exp"; + break; + case ac.Exp2: + i = "exp2"; + break; + case ac.Round: + i = "round"; + break; + case ac.Floor: + i = "floor"; + break; + case ac.Ceiling: + i = "ceil"; + break; + case ac.Sqrt: + i = "sqrt"; + break; + case ac.Log: + i = "log"; + break; + case ac.Tan: + i = "tan"; + break; + case ac.ArcTan: + i = "atan"; + break; + case ac.ArcCos: + i = "acos"; + break; + case ac.ArcSin: + i = "asin"; + break; + case ac.Fract: + i = "fract"; + break; + case ac.Sign: + i = "sign"; + break; + case ac.Radians: + i = "radians"; + break; + case ac.Degrees: + i = "degrees"; + } + return (t.compilationString += this._declareOutput(n, t) + " = " + i + "(" + this.input.associatedVariableName + ");\r\n"), this; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.operation = this.operation), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.operation = t.operation); + }), + (t.prototype._dumpPropertiesCode = function () { + return this._codeVariableName + ".operation = BABYLON.TrigonometryBlockOperations." + ac[this.operation] + ";\r\n"; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.TrigonometryBlock"] = cc; + var lc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("rgb ", fs.Color3, !0), + n.registerInput("r", fs.Float, !0), + n.registerInput("g", fs.Float, !0), + n.registerInput("b", fs.Float, !0), + n.registerInput("a", fs.Float, !0), + n.registerOutput("rgba", fs.Color4), + n.registerOutput("rgb", fs.Color3), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ColorMergerBlock"; + }), + Object.defineProperty(t.prototype, "rgbIn", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "r", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "g", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "b", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "a", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgba", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgbOut", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgb", { + get: function () { + return this.rgbOut; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.r, + i = this.g, + r = this.b, + o = this.a, + a = this.rgbIn, + s = this._outputs[0], + c = this._outputs[1]; + return ( + a.isConnected + ? s.hasEndpoints + ? (t.compilationString += this._declareOutput(s, t) + " = vec4(" + a.associatedVariableName + ", " + (o.isConnected ? this._writeVariable(o) : "0.0") + ");\r\n") + : c.hasEndpoints && (t.compilationString += this._declareOutput(c, t) + " = " + a.associatedVariableName + ";\r\n") + : s.hasEndpoints + ? (t.compilationString += + this._declareOutput(s, t) + + " = vec4(" + + (n.isConnected ? this._writeVariable(n) : "0.0") + + ", " + + (i.isConnected ? this._writeVariable(i) : "0.0") + + ", " + + (r.isConnected ? this._writeVariable(r) : "0.0") + + ", " + + (o.isConnected ? this._writeVariable(o) : "0.0") + + ");\r\n") + : c.hasEndpoints && + (t.compilationString += + this._declareOutput(c, t) + + " = vec3(" + + (n.isConnected ? this._writeVariable(n) : "0.0") + + ", " + + (i.isConnected ? this._writeVariable(i) : "0.0") + + ", " + + (r.isConnected ? this._writeVariable(r) : "0.0") + + ");\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ColorMergerBlock"] = lc; + var uc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("xyz ", fs.Vector3, !0), + n.registerInput("xy ", fs.Vector2, !0), + n.registerInput("x", fs.Float, !0), + n.registerInput("y", fs.Float, !0), + n.registerInput("z", fs.Float, !0), + n.registerInput("w", fs.Float, !0), + n.registerOutput("xyzw", fs.Vector4), + n.registerOutput("xyz", fs.Vector3), + n.registerOutput("xy", fs.Vector2), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VectorMergerBlock"; + }), + Object.defineProperty(t.prototype, "xyzIn", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyIn", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "x", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "y", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "z", { + get: function () { + return this._inputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "w", { + get: function () { + return this._inputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyzw", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyzOut", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyOut", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xy", { + get: function () { + return this.xyOut; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyz", { + get: function () { + return this.xyzOut; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.x, + i = this.y, + r = this.z, + o = this.w, + a = this.xyIn, + s = this.xyzIn, + c = this._outputs[0], + l = this._outputs[1], + u = this._outputs[2]; + return ( + a.isConnected + ? c.hasEndpoints + ? (t.compilationString += + this._declareOutput(c, t) + " = vec4(" + a.associatedVariableName + ", " + (r.isConnected ? this._writeVariable(r) : "0.0") + ", " + (o.isConnected ? this._writeVariable(o) : "0.0") + ");\r\n") + : l.hasEndpoints + ? (t.compilationString += this._declareOutput(l, t) + " = vec3(" + a.associatedVariableName + ", " + (r.isConnected ? this._writeVariable(r) : "0.0") + ");\r\n") + : u.hasEndpoints && (t.compilationString += this._declareOutput(u, t) + " = " + a.associatedVariableName + ";\r\n") + : s.isConnected + ? c.hasEndpoints + ? (t.compilationString += this._declareOutput(c, t) + " = vec4(" + s.associatedVariableName + ", " + (o.isConnected ? this._writeVariable(o) : "0.0") + ");\r\n") + : l.hasEndpoints + ? (t.compilationString += this._declareOutput(l, t) + " = " + s.associatedVariableName + ";\r\n") + : u.hasEndpoints && (t.compilationString += this._declareOutput(u, t) + " = " + s.associatedVariableName + ".xy;\r\n") + : c.hasEndpoints + ? (t.compilationString += + this._declareOutput(c, t) + + " = vec4(" + + (n.isConnected ? this._writeVariable(n) : "0.0") + + ", " + + (i.isConnected ? this._writeVariable(i) : "0.0") + + ", " + + (r.isConnected ? this._writeVariable(r) : "0.0") + + ", " + + (o.isConnected ? this._writeVariable(o) : "0.0") + + ");\r\n") + : l.hasEndpoints + ? (t.compilationString += + this._declareOutput(l, t) + + " = vec3(" + + (n.isConnected ? this._writeVariable(n) : "0.0") + + ", " + + (i.isConnected ? this._writeVariable(i) : "0.0") + + ", " + + (r.isConnected ? this._writeVariable(r) : "0.0") + + ");\r\n") + : u.hasEndpoints && (t.compilationString += this._declareOutput(u, t) + " = vec2(" + (n.isConnected ? this._writeVariable(n) : "0.0") + ", " + (i.isConnected ? this._writeVariable(i) : "0.0") + ");\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.VectorMergerBlock"] = uc; + var hc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("rgba", fs.Color4, !0), + n.registerInput("rgb ", fs.Color3, !0), + n.registerOutput("rgb", fs.Color3), + n.registerOutput("r", fs.Float), + n.registerOutput("g", fs.Float), + n.registerOutput("b", fs.Float), + n.registerOutput("a", fs.Float), + (n.inputsAreExclusive = !0), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ColorSplitterBlock"; + }), + Object.defineProperty(t.prototype, "rgba", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgbIn", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rgbOut", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "r", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "g", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "b", { + get: function () { + return this._outputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "a", { + get: function () { + return this._outputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._inputRename = function (e) { + return "rgb " === e ? "rgbIn" : e; + }), + (t.prototype._outputRename = function (e) { + return "rgb" === e ? "rgbOut" : e; + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.rgba.isConnected ? this.rgba : this.rgbIn; + if (n.isConnected) { + var i = this._outputs[0], + r = this._outputs[1], + o = this._outputs[2], + a = this._outputs[3], + s = this._outputs[4]; + return ( + i.hasEndpoints && (t.compilationString += this._declareOutput(i, t) + " = " + n.associatedVariableName + ".rgb;\r\n"), + r.hasEndpoints && (t.compilationString += this._declareOutput(r, t) + " = " + n.associatedVariableName + ".r;\r\n"), + o.hasEndpoints && (t.compilationString += this._declareOutput(o, t) + " = " + n.associatedVariableName + ".g;\r\n"), + a.hasEndpoints && (t.compilationString += this._declareOutput(a, t) + " = " + n.associatedVariableName + ".b;\r\n"), + s.hasEndpoints && (t.compilationString += this._declareOutput(s, t) + " = " + n.associatedVariableName + ".a;\r\n"), + this + ); + } + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ColorSplitterBlock"] = hc; + var dc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("xyzw", fs.Vector4, !0), + n.registerInput("xyz ", fs.Vector3, !0), + n.registerInput("xy ", fs.Vector2, !0), + n.registerOutput("xyz", fs.Vector3), + n.registerOutput("xy", fs.Vector2), + n.registerOutput("x", fs.Float), + n.registerOutput("y", fs.Float), + n.registerOutput("z", fs.Float), + n.registerOutput("w", fs.Float), + (n.inputsAreExclusive = !0), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "VectorSplitterBlock"; + }), + Object.defineProperty(t.prototype, "xyzw", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyzIn", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyIn", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyzOut", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "xyOut", { + get: function () { + return this._outputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "x", { + get: function () { + return this._outputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "y", { + get: function () { + return this._outputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "z", { + get: function () { + return this._outputs[4]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "w", { + get: function () { + return this._outputs[5]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._inputRename = function (e) { + switch (e) { + case "xy ": + return "xyIn"; + case "xyz ": + return "xyzIn"; + default: + return e; + } + }), + (t.prototype._outputRename = function (e) { + switch (e) { + case "xy": + return "xyOut"; + case "xyz": + return "xyzOut"; + default: + return e; + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this.xyzw.isConnected ? this.xyzw : this.xyzIn.isConnected ? this.xyzIn : this.xyIn, + i = this._outputs[0], + r = this._outputs[1], + o = this._outputs[2], + a = this._outputs[3], + s = this._outputs[4], + c = this._outputs[5]; + return ( + i.hasEndpoints && + (n === this.xyIn + ? (t.compilationString += this._declareOutput(i, t) + " = vec3(" + n.associatedVariableName + ", 0.0);\r\n") + : (t.compilationString += this._declareOutput(i, t) + " = " + n.associatedVariableName + ".xyz;\r\n")), + r.hasEndpoints && (t.compilationString += this._declareOutput(r, t) + " = " + n.associatedVariableName + ".xy;\r\n"), + o.hasEndpoints && (t.compilationString += this._declareOutput(o, t) + " = " + n.associatedVariableName + ".x;\r\n"), + a.hasEndpoints && (t.compilationString += this._declareOutput(a, t) + " = " + n.associatedVariableName + ".y;\r\n"), + s.hasEndpoints && (t.compilationString += this._declareOutput(s, t) + " = " + n.associatedVariableName + ".z;\r\n"), + c.hasEndpoints && (t.compilationString += this._declareOutput(c, t) + " = " + n.associatedVariableName + ".w;\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.VectorSplitterBlock"] = dc; + var pc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("left", fs.AutoDetect), + n.registerInput("right", fs.AutoDetect), + n.registerInput("gradient", fs.Float), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._linkConnectionTypes(0, 1), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "LerpBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "gradient", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = mix(" + this.left.associatedVariableName + " , " + this.right.associatedVariableName + ", " + this.gradient.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.LerpBlock"] = pc; + var fc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DivideBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = " + this.left.associatedVariableName + " / " + this.right.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DivideBlock"] = fc; + var mc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "SubtractBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = " + this.left.associatedVariableName + " - " + this.right.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.SubtractBlock"] = mc; + var gc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("value", fs.Float), n.registerInput("edge", fs.Float), n.registerOutput("output", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "StepBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "edge", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = step(" + this.edge.associatedVariableName + ", " + this.value.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.StepBlock"] = gc; + var bc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("input", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._outputs[0].excludedConnectionPointTypes.push(fs.Matrix), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "OneMinusBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = 1. - " + this.input.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + (c.a.RegisteredTypes["BABYLON.OneMinusBlock"] = bc), (c.a.RegisteredTypes["BABYLON.OppositeBlock"] = bc); + var _c = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("worldPosition", fs.Vector4), n.registerInput("cameraPosition", fs.Vector3), n.registerOutput("output", fs.Vector3), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ViewDirectionBlock"; + }), + Object.defineProperty(t.prototype, "worldPosition", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "cameraPosition", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.cameraPosition.isConnected) { + var t = e.getInputBlockByPredicate(function (e) { + return e.systemValue === gs.CameraPosition; + }); + t || (t = new ks("cameraPosition")).setAsSystemValue(gs.CameraPosition), t.output.connectTo(this.cameraPosition); + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = normalize(" + this.cameraPosition.associatedVariableName + " - " + this.worldPosition.associatedVariableName + ".xyz);\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ViewDirectionBlock"] = _c; + n(223); + var vc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("worldNormal", fs.Vector4), n.registerInput("viewDirection", fs.Vector3), n.registerInput("bias", fs.Float), n.registerInput("power", fs.Float), n.registerOutput("fresnel", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "FresnelBlock"; + }), + Object.defineProperty(t.prototype, "worldNormal", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "viewDirection", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bias", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "power", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fresnel", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.viewDirection.isConnected) { + var t = new _c("View direction"); + t.output.connectTo(this.viewDirection), t.autoConfigure(e); + } + if (!this.bias.isConnected) { + var n = new ks("bias"); + (n.value = 0), n.output.connectTo(this.bias); + } + if (!this.power.isConnected) { + var i = new ks("power"); + (i.value = 1), i.output.connectTo(this.power); + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = "//" + this.name; + return ( + t._emitFunctionFromInclude("fresnelFunction", n, { removeIfDef: !0 }), + (t.compilationString += + this._declareOutput(this.fresnel, t) + + " = computeFresnelTerm(" + + this.viewDirection.associatedVariableName + + ".xyz, " + + this.worldNormal.associatedVariableName + + ".xyz, " + + this.bias.associatedVariableName + + ", " + + this.power.associatedVariableName + + ");\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.FresnelBlock"] = vc; + var yc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "MaxBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = max(" + this.left.associatedVariableName + ", " + this.right.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.MaxBlock"] = yc; + var Cc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("left", fs.AutoDetect), n.registerInput("right", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._linkConnectionTypes(0, 1), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "MinBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = min(" + this.left.associatedVariableName + ", " + this.right.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.MinBlock"] = Cc; + var Pc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("left", fs.AutoDetect), + n.registerInput("right", fs.AutoDetect), + n.registerOutput("output", fs.Float), + n._linkConnectionTypes(0, 1), + n._inputs[0].excludedConnectionPointTypes.push(fs.Float), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[1].excludedConnectionPointTypes.push(fs.Float), + n._inputs[1].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DistanceBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = length(" + this.left.associatedVariableName + " - " + this.right.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DistanceBlock"] = Pc; + var xc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("value", fs.AutoDetect), n.registerOutput("output", fs.Float), n._inputs[0].excludedConnectionPointTypes.push(fs.Float), n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "LengthBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = length(" + this.value.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.LengthBlock"] = xc; + var Tc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("value", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "NegateBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = -1.0 * " + this.value.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.NegateBlock"] = Tc; + var Sc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("value", fs.Float), n.registerInput("power", fs.Float), n.registerOutput("output", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "PowBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "power", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = pow(" + this.value.associatedVariableName + ", " + this.power.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.PowBlock"] = Sc; + var Oc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("seed", fs.Vector2), + n.registerOutput("output", fs.Float), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "RandomNumberBlock"; + }), + Object.defineProperty(t.prototype, "seed", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = "//" + this.name; + return t._emitFunctionFromInclude("helperFunctions", i), (t.compilationString += this._declareOutput(n, t) + " = getRand(" + this.seed.associatedVariableName + ".xy);\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.RandomNumberBlock"] = Oc; + var Ec = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("x", fs.Float), n.registerInput("y", fs.Float), n.registerOutput("output", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ArcTan2Block"; + }), + Object.defineProperty(t.prototype, "x", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "y", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = atan(" + this.x.associatedVariableName + ", " + this.y.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ArcTan2Block"] = Ec; + var Mc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("value", fs.Float), n.registerInput("edge0", fs.Float), n.registerInput("edge1", fs.Float), n.registerOutput("output", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "SmoothStepBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "edge0", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "edge1", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = smoothstep(" + this.edge0.associatedVariableName + ", " + this.edge1.associatedVariableName + ", " + this.value.associatedVariableName + ");\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.SmoothStepBlock"] = Mc; + var Ac = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("input", fs.AutoDetect), n.registerOutput("output", fs.BasedOnInput), (n._outputs[0]._typeConnectionSource = n._inputs[0]), n._outputs[0].excludedConnectionPointTypes.push(fs.Matrix), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ReciprocalBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = 1. / " + this.input.associatedVariableName + ";\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ReciprocalBlock"] = Ac; + var Ic = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("value", fs.AutoDetect), + n.registerInput("reference", fs.AutoDetect), + n.registerInput("distance", fs.Float), + n.registerInput("replacement", fs.AutoDetect), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._linkConnectionTypes(0, 1), + n._linkConnectionTypes(0, 3), + n._inputs[0].excludedConnectionPointTypes.push(fs.Float), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[1].excludedConnectionPointTypes.push(fs.Float), + n._inputs[1].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[3].excludedConnectionPointTypes.push(fs.Float), + n._inputs[3].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ReplaceColorBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "reference", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "distance", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "replacement", { + get: function () { + return this._inputs[3]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return ( + (t.compilationString += this._declareOutput(n, t) + ";\r\n"), + (t.compilationString += "if (length(" + this.value.associatedVariableName + " - " + this.reference.associatedVariableName + ") < " + this.distance.associatedVariableName + ") {\r\n"), + (t.compilationString += n.associatedVariableName + " = " + this.replacement.associatedVariableName + ";\r\n"), + (t.compilationString += "} else {\r\n"), + (t.compilationString += n.associatedVariableName + " = " + this.value.associatedVariableName + ";\r\n"), + (t.compilationString += "}\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ReplaceColorBlock"] = Ic; + var Dc, + Rc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("value", fs.AutoDetect), + n.registerInput("steps", fs.AutoDetect), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._linkConnectionTypes(0, 1), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n._inputs[1].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "PosterizeBlock"; + }), + Object.defineProperty(t.prototype, "value", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "steps", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return ( + (t.compilationString += + this._declareOutput(n, t) + " = floor(" + this.value.associatedVariableName + " / (1.0 / " + this.steps.associatedVariableName + ")) * (1.0 / " + this.steps.associatedVariableName + ");\r\n"), + this + ); + }), + t + ); + })(Is); + (c.a.RegisteredTypes["BABYLON.PosterizeBlock"] = Rc), + (function (e) { + (e[(e.SawTooth = 0)] = "SawTooth"), (e[(e.Square = 1)] = "Square"), (e[(e.Triangle = 2)] = "Triangle"); + })(Dc || (Dc = {})); + var wc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + (n.kind = Dc.SawTooth), + n.registerInput("input", fs.AutoDetect), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._inputs[0].excludedConnectionPointTypes.push(fs.Matrix), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "WaveBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + switch (this.kind) { + case Dc.SawTooth: + t.compilationString += this._declareOutput(n, t) + " = " + this.input.associatedVariableName + " - floor(0.5 + " + this.input.associatedVariableName + ");\r\n"; + break; + case Dc.Square: + t.compilationString += this._declareOutput(n, t) + " = 1.0 - 2.0 * round(fract(" + this.input.associatedVariableName + "));\r\n"; + break; + case Dc.Triangle: + t.compilationString += this._declareOutput(n, t) + " = 2.0 * abs(2.0 * (" + this.input.associatedVariableName + " - floor(0.5 + " + this.input.associatedVariableName + "))) - 1.0;\r\n"; + } + return this; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.kind = this.kind), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.kind = t.kind); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.WaveBlock"] = wc; + var Lc = function (e, t) { + (this.step = e), (this.color = t); + }, + Fc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + (n.colorSteps = [new Lc(0, s.a.Black()), new Lc(1, s.a.White())]), + n.registerInput("gradient", fs.Float), + n.registerOutput("output", fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector2), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "GradientBlock"; + }), + Object.defineProperty(t.prototype, "gradient", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._writeColorConstant = function (e) { + var t = this.colorSteps[e]; + return "vec3(" + t.color.r + ", " + t.color.g + ", " + t.color.b + ")"; + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + if (this.colorSteps.length && this.gradient.connectedPoint) { + var i = t._getFreeVariableName("gradientTempColor"), + r = t._getFreeVariableName("gradientTempPosition"); + (t.compilationString += "vec3 " + i + " = " + this._writeColorConstant(0) + ";\r\n"), (t.compilationString += "float " + r + ";\r\n"); + var o = this.gradient.associatedVariableName; + this.gradient.connectedPoint.type !== fs.Float && (o += ".x"); + for (var a = 1; a < this.colorSteps.length; a++) { + var s = this.colorSteps[a], + c = this.colorSteps[a - 1]; + (t.compilationString += + r + + " = clamp((" + + o + + " - " + + t._emitFloat(c.step) + + ") / (" + + t._emitFloat(s.step) + + " - " + + t._emitFloat(c.step) + + "), 0.0, 1.0) * step(" + + t._emitFloat(a) + + ", " + + t._emitFloat(this.colorSteps.length - 1) + + ");\r\n"), + (t.compilationString += i + " = mix(" + i + ", " + this._writeColorConstant(a) + ", " + r + ");\r\n"); + } + return (t.compilationString += this._declareOutput(n, t) + " = " + i + ";\r\n"), this; + } + t.compilationString += this._declareOutput(n, t) + " = vec3(0., 0., 0.);\r\n"; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.colorSteps = this.colorSteps), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.colorSteps = []); + for (var r = 0, o = t.colorSteps; r < o.length; r++) { + var a = o[r]; + this.colorSteps.push(new Lc(a.step, new s.a(a.color.r, a.color.g, a.color.b))); + } + }), + (t.prototype._dumpPropertiesCode = function () { + for (var e = "", t = 0, n = this.colorSteps; t < n.length; t++) { + var i = n[t]; + e += this._codeVariableName + ".colorSteps.push(new BABYLON.GradientBlockColorStep(" + i.step + ", new BABYLON.Color3(" + i.color.r + ", " + i.color.g + ", " + i.color.b + ")));\r\n"; + } + return e; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.GradientBlock"] = Fc; + var Nc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("left", fs.AutoDetect), + n.registerInput("right", fs.AutoDetect), + n.registerInput("gradient", fs.Float), + n.registerOutput("output", fs.BasedOnInput), + (n._outputs[0]._typeConnectionSource = n._inputs[0]), + n._linkConnectionTypes(0, 1), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "NLerpBlock"; + }), + Object.defineProperty(t.prototype, "left", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "right", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "gradient", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return ( + (t.compilationString += this._declareOutput(n, t) + " = normalize(mix(" + this.left.associatedVariableName + " , " + this.right.associatedVariableName + ", " + this.gradient.associatedVariableName + "));\r\n"), this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.NLerpBlock"] = Nc; + var kc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return (n.manhattanDistance = !1), n.registerInput("seed", fs.Vector3), n.registerInput("jitter", fs.Float), n.registerOutput("output", fs.Vector2), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "WorleyNoise3DBlock"; + }), + Object.defineProperty(t.prototype, "seed", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "jitter", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), this.seed.isConnected && this._outputs[0].hasEndpoints)) { + return ( + " return mod((34.0 * x + 1.0) * x, 289.0);\r\n", + "}\r\n\r\n", + "vec3 dist(vec3 x, vec3 y, vec3 z, bool manhattanDistance){\r\n", + " return manhattanDistance ? abs(x) + abs(y) + abs(z) : (x * x + y * y + z * z);\r\n", + "}\r\n\r\n", + "vec2 worley(vec3 P, float jitter, bool manhattanDistance){\r\n", + " float K = 0.142857142857; // 1/7\r\n", + " float Ko = 0.428571428571; // 1/2-K/2\r\n", + " float K2 = 0.020408163265306; // 1/(7*7)\r\n", + " float Kz = 0.166666666667; // 1/6\r\n", + " float Kzo = 0.416666666667; // 1/2-1/6*2\r\n", + "\r\n", + " vec3 Pi = mod(floor(P), 289.0);\r\n", + " vec3 Pf = fract(P) - 0.5;\r\n", + "\r\n", + " vec3 Pfx = Pf.x + vec3(1.0, 0.0, -1.0);\r\n", + " vec3 Pfy = Pf.y + vec3(1.0, 0.0, -1.0);\r\n", + " vec3 Pfz = Pf.z + vec3(1.0, 0.0, -1.0);\r\n", + "\r\n", + " vec3 p = permute(Pi.x + vec3(-1.0, 0.0, 1.0));\r\n", + " vec3 p1 = permute(p + Pi.y - 1.0);\r\n", + " vec3 p2 = permute(p + Pi.y);\r\n", + " vec3 p3 = permute(p + Pi.y + 1.0);\r\n", + "\r\n", + " vec3 p11 = permute(p1 + Pi.z - 1.0);\r\n", + " vec3 p12 = permute(p1 + Pi.z);\r\n", + " vec3 p13 = permute(p1 + Pi.z + 1.0);\r\n", + "\r\n", + " vec3 p21 = permute(p2 + Pi.z - 1.0);\r\n", + " vec3 p22 = permute(p2 + Pi.z);\r\n", + " vec3 p23 = permute(p2 + Pi.z + 1.0);\r\n", + "\r\n", + " vec3 p31 = permute(p3 + Pi.z - 1.0);\r\n", + " vec3 p32 = permute(p3 + Pi.z);\r\n", + " vec3 p33 = permute(p3 + Pi.z + 1.0);\r\n", + "\r\n", + " vec3 ox11 = fract(p11*K) - Ko;\r\n", + " vec3 oy11 = mod(floor(p11*K), 7.0)*K - Ko;\r\n", + " vec3 oz11 = floor(p11*K2)*Kz - Kzo; // p11 < 289 guaranteed\r\n", + "\r\n", + " vec3 ox12 = fract(p12*K) - Ko;\r\n", + " vec3 oy12 = mod(floor(p12*K), 7.0)*K - Ko;\r\n", + " vec3 oz12 = floor(p12*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox13 = fract(p13*K) - Ko;\r\n", + " vec3 oy13 = mod(floor(p13*K), 7.0)*K - Ko;\r\n", + " vec3 oz13 = floor(p13*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox21 = fract(p21*K) - Ko;\r\n", + " vec3 oy21 = mod(floor(p21*K), 7.0)*K - Ko;\r\n", + " vec3 oz21 = floor(p21*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox22 = fract(p22*K) - Ko;\r\n", + " vec3 oy22 = mod(floor(p22*K), 7.0)*K - Ko;\r\n", + " vec3 oz22 = floor(p22*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox23 = fract(p23*K) - Ko;\r\n", + " vec3 oy23 = mod(floor(p23*K), 7.0)*K - Ko;\r\n", + " vec3 oz23 = floor(p23*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox31 = fract(p31*K) - Ko;\r\n", + " vec3 oy31 = mod(floor(p31*K), 7.0)*K - Ko;\r\n", + " vec3 oz31 = floor(p31*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox32 = fract(p32*K) - Ko;\r\n", + " vec3 oy32 = mod(floor(p32*K), 7.0)*K - Ko;\r\n", + " vec3 oz32 = floor(p32*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 ox33 = fract(p33*K) - Ko;\r\n", + " vec3 oy33 = mod(floor(p33*K), 7.0)*K - Ko;\r\n", + " vec3 oz33 = floor(p33*K2)*Kz - Kzo;\r\n", + "\r\n", + " vec3 dx11 = Pfx + jitter*ox11;\r\n", + " vec3 dy11 = Pfy.x + jitter*oy11;\r\n", + " vec3 dz11 = Pfz.x + jitter*oz11;\r\n", + "\r\n", + " vec3 dx12 = Pfx + jitter*ox12;\r\n", + " vec3 dy12 = Pfy.x + jitter*oy12;\r\n", + " vec3 dz12 = Pfz.y + jitter*oz12;\r\n", + "\r\n", + " vec3 dx13 = Pfx + jitter*ox13;\r\n", + " vec3 dy13 = Pfy.x + jitter*oy13;\r\n", + " vec3 dz13 = Pfz.z + jitter*oz13;\r\n", + "\r\n", + " vec3 dx21 = Pfx + jitter*ox21;\r\n", + " vec3 dy21 = Pfy.y + jitter*oy21;\r\n", + " vec3 dz21 = Pfz.x + jitter*oz21;\r\n", + "\r\n", + " vec3 dx22 = Pfx + jitter*ox22;\r\n", + " vec3 dy22 = Pfy.y + jitter*oy22;\r\n", + " vec3 dz22 = Pfz.y + jitter*oz22;\r\n", + "\r\n", + " vec3 dx23 = Pfx + jitter*ox23;\r\n", + " vec3 dy23 = Pfy.y + jitter*oy23;\r\n", + " vec3 dz23 = Pfz.z + jitter*oz23;\r\n", + "\r\n", + " vec3 dx31 = Pfx + jitter*ox31;\r\n", + " vec3 dy31 = Pfy.z + jitter*oy31;\r\n", + " vec3 dz31 = Pfz.x + jitter*oz31;\r\n", + "\r\n", + " vec3 dx32 = Pfx + jitter*ox32;\r\n", + " vec3 dy32 = Pfy.z + jitter*oy32;\r\n", + " vec3 dz32 = Pfz.y + jitter*oz32;\r\n", + "\r\n", + " vec3 dx33 = Pfx + jitter*ox33;\r\n", + " vec3 dy33 = Pfy.z + jitter*oy33;\r\n", + " vec3 dz33 = Pfz.z + jitter*oz33;\r\n", + "\r\n", + " vec3 d11 = dist(dx11, dy11, dz11, manhattanDistance);\r\n", + " vec3 d12 =dist(dx12, dy12, dz12, manhattanDistance);\r\n", + " vec3 d13 = dist(dx13, dy13, dz13, manhattanDistance);\r\n", + " vec3 d21 = dist(dx21, dy21, dz21, manhattanDistance);\r\n", + " vec3 d22 = dist(dx22, dy22, dz22, manhattanDistance);\r\n", + " vec3 d23 = dist(dx23, dy23, dz23, manhattanDistance);\r\n", + " vec3 d31 = dist(dx31, dy31, dz31, manhattanDistance);\r\n", + " vec3 d32 = dist(dx32, dy32, dz32, manhattanDistance);\r\n", + " vec3 d33 = dist(dx33, dy33, dz33, manhattanDistance);\r\n", + "\r\n", + " vec3 d1a = min(d11, d12);\r\n", + " d12 = max(d11, d12);\r\n", + " d11 = min(d1a, d13); // Smallest now not in d12 or d13\r\n", + " d13 = max(d1a, d13);\r\n", + " d12 = min(d12, d13); // 2nd smallest now not in d13\r\n", + " vec3 d2a = min(d21, d22);\r\n", + " d22 = max(d21, d22);\r\n", + " d21 = min(d2a, d23); // Smallest now not in d22 or d23\r\n", + " d23 = max(d2a, d23);\r\n", + " d22 = min(d22, d23); // 2nd smallest now not in d23\r\n", + " vec3 d3a = min(d31, d32);\r\n", + " d32 = max(d31, d32);\r\n", + " d31 = min(d3a, d33); // Smallest now not in d32 or d33\r\n", + " d33 = max(d3a, d33);\r\n", + " d32 = min(d32, d33); // 2nd smallest now not in d33\r\n", + " vec3 da = min(d11, d21);\r\n", + " d21 = max(d11, d21);\r\n", + " d11 = min(da, d31); // Smallest now in d11\r\n", + " d31 = max(da, d31); // 2nd smallest now not in d31\r\n", + " d11.xy = (d11.x < d11.y) ? d11.xy : d11.yx;\r\n", + " d11.xz = (d11.x < d11.z) ? d11.xz : d11.zx; // d11.x now smallest\r\n", + " d12 = min(d12, d21); // 2nd smallest now not in d21\r\n", + " d12 = min(d12, d22); // nor in d22\r\n", + " d12 = min(d12, d31); // nor in d31\r\n", + " d12 = min(d12, d32); // nor in d32\r\n", + " d11.yz = min(d11.yz,d12.xy); // nor in d12.yz\r\n", + " d11.y = min(d11.y,d12.z); // Only two more to go\r\n", + " d11.y = min(d11.y,d11.z); // Done! (Phew!)\r\n", + " return sqrt(d11.xy); // F1, F2\r\n", + "}\r\n\r\n", + t._emitFunction( + "worley3D", + "vec3 permute(vec3 x){\r\n return mod((34.0 * x + 1.0) * x, 289.0);\r\n}\r\n\r\nvec3 dist(vec3 x, vec3 y, vec3 z, bool manhattanDistance){\r\n return manhattanDistance ? abs(x) + abs(y) + abs(z) : (x * x + y * y + z * z);\r\n}\r\n\r\nvec2 worley(vec3 P, float jitter, bool manhattanDistance){\r\n float K = 0.142857142857; // 1/7\r\n float Ko = 0.428571428571; // 1/2-K/2\r\n float K2 = 0.020408163265306; // 1/(7*7)\r\n float Kz = 0.166666666667; // 1/6\r\n float Kzo = 0.416666666667; // 1/2-1/6*2\r\n\r\n vec3 Pi = mod(floor(P), 289.0);\r\n vec3 Pf = fract(P) - 0.5;\r\n\r\n vec3 Pfx = Pf.x + vec3(1.0, 0.0, -1.0);\r\n vec3 Pfy = Pf.y + vec3(1.0, 0.0, -1.0);\r\n vec3 Pfz = Pf.z + vec3(1.0, 0.0, -1.0);\r\n\r\n vec3 p = permute(Pi.x + vec3(-1.0, 0.0, 1.0));\r\n vec3 p1 = permute(p + Pi.y - 1.0);\r\n vec3 p2 = permute(p + Pi.y);\r\n vec3 p3 = permute(p + Pi.y + 1.0);\r\n\r\n vec3 p11 = permute(p1 + Pi.z - 1.0);\r\n vec3 p12 = permute(p1 + Pi.z);\r\n vec3 p13 = permute(p1 + Pi.z + 1.0);\r\n\r\n vec3 p21 = permute(p2 + Pi.z - 1.0);\r\n vec3 p22 = permute(p2 + Pi.z);\r\n vec3 p23 = permute(p2 + Pi.z + 1.0);\r\n\r\n vec3 p31 = permute(p3 + Pi.z - 1.0);\r\n vec3 p32 = permute(p3 + Pi.z);\r\n vec3 p33 = permute(p3 + Pi.z + 1.0);\r\n\r\n vec3 ox11 = fract(p11*K) - Ko;\r\n vec3 oy11 = mod(floor(p11*K), 7.0)*K - Ko;\r\n vec3 oz11 = floor(p11*K2)*Kz - Kzo; // p11 < 289 guaranteed\r\n\r\n vec3 ox12 = fract(p12*K) - Ko;\r\n vec3 oy12 = mod(floor(p12*K), 7.0)*K - Ko;\r\n vec3 oz12 = floor(p12*K2)*Kz - Kzo;\r\n\r\n vec3 ox13 = fract(p13*K) - Ko;\r\n vec3 oy13 = mod(floor(p13*K), 7.0)*K - Ko;\r\n vec3 oz13 = floor(p13*K2)*Kz - Kzo;\r\n\r\n vec3 ox21 = fract(p21*K) - Ko;\r\n vec3 oy21 = mod(floor(p21*K), 7.0)*K - Ko;\r\n vec3 oz21 = floor(p21*K2)*Kz - Kzo;\r\n\r\n vec3 ox22 = fract(p22*K) - Ko;\r\n vec3 oy22 = mod(floor(p22*K), 7.0)*K - Ko;\r\n vec3 oz22 = floor(p22*K2)*Kz - Kzo;\r\n\r\n vec3 ox23 = fract(p23*K) - Ko;\r\n vec3 oy23 = mod(floor(p23*K), 7.0)*K - Ko;\r\n vec3 oz23 = floor(p23*K2)*Kz - Kzo;\r\n\r\n vec3 ox31 = fract(p31*K) - Ko;\r\n vec3 oy31 = mod(floor(p31*K), 7.0)*K - Ko;\r\n vec3 oz31 = floor(p31*K2)*Kz - Kzo;\r\n\r\n vec3 ox32 = fract(p32*K) - Ko;\r\n vec3 oy32 = mod(floor(p32*K), 7.0)*K - Ko;\r\n vec3 oz32 = floor(p32*K2)*Kz - Kzo;\r\n\r\n vec3 ox33 = fract(p33*K) - Ko;\r\n vec3 oy33 = mod(floor(p33*K), 7.0)*K - Ko;\r\n vec3 oz33 = floor(p33*K2)*Kz - Kzo;\r\n\r\n vec3 dx11 = Pfx + jitter*ox11;\r\n vec3 dy11 = Pfy.x + jitter*oy11;\r\n vec3 dz11 = Pfz.x + jitter*oz11;\r\n\r\n vec3 dx12 = Pfx + jitter*ox12;\r\n vec3 dy12 = Pfy.x + jitter*oy12;\r\n vec3 dz12 = Pfz.y + jitter*oz12;\r\n\r\n vec3 dx13 = Pfx + jitter*ox13;\r\n vec3 dy13 = Pfy.x + jitter*oy13;\r\n vec3 dz13 = Pfz.z + jitter*oz13;\r\n\r\n vec3 dx21 = Pfx + jitter*ox21;\r\n vec3 dy21 = Pfy.y + jitter*oy21;\r\n vec3 dz21 = Pfz.x + jitter*oz21;\r\n\r\n vec3 dx22 = Pfx + jitter*ox22;\r\n vec3 dy22 = Pfy.y + jitter*oy22;\r\n vec3 dz22 = Pfz.y + jitter*oz22;\r\n\r\n vec3 dx23 = Pfx + jitter*ox23;\r\n vec3 dy23 = Pfy.y + jitter*oy23;\r\n vec3 dz23 = Pfz.z + jitter*oz23;\r\n\r\n vec3 dx31 = Pfx + jitter*ox31;\r\n vec3 dy31 = Pfy.z + jitter*oy31;\r\n vec3 dz31 = Pfz.x + jitter*oz31;\r\n\r\n vec3 dx32 = Pfx + jitter*ox32;\r\n vec3 dy32 = Pfy.z + jitter*oy32;\r\n vec3 dz32 = Pfz.y + jitter*oz32;\r\n\r\n vec3 dx33 = Pfx + jitter*ox33;\r\n vec3 dy33 = Pfy.z + jitter*oy33;\r\n vec3 dz33 = Pfz.z + jitter*oz33;\r\n\r\n vec3 d11 = dist(dx11, dy11, dz11, manhattanDistance);\r\n vec3 d12 =dist(dx12, dy12, dz12, manhattanDistance);\r\n vec3 d13 = dist(dx13, dy13, dz13, manhattanDistance);\r\n vec3 d21 = dist(dx21, dy21, dz21, manhattanDistance);\r\n vec3 d22 = dist(dx22, dy22, dz22, manhattanDistance);\r\n vec3 d23 = dist(dx23, dy23, dz23, manhattanDistance);\r\n vec3 d31 = dist(dx31, dy31, dz31, manhattanDistance);\r\n vec3 d32 = dist(dx32, dy32, dz32, manhattanDistance);\r\n vec3 d33 = dist(dx33, dy33, dz33, manhattanDistance);\r\n\r\n vec3 d1a = min(d11, d12);\r\n d12 = max(d11, d12);\r\n d11 = min(d1a, d13); // Smallest now not in d12 or d13\r\n d13 = max(d1a, d13);\r\n d12 = min(d12, d13); // 2nd smallest now not in d13\r\n vec3 d2a = min(d21, d22);\r\n d22 = max(d21, d22);\r\n d21 = min(d2a, d23); // Smallest now not in d22 or d23\r\n d23 = max(d2a, d23);\r\n d22 = min(d22, d23); // 2nd smallest now not in d23\r\n vec3 d3a = min(d31, d32);\r\n d32 = max(d31, d32);\r\n d31 = min(d3a, d33); // Smallest now not in d32 or d33\r\n d33 = max(d3a, d33);\r\n d32 = min(d32, d33); // 2nd smallest now not in d33\r\n vec3 da = min(d11, d21);\r\n d21 = max(d11, d21);\r\n d11 = min(da, d31); // Smallest now in d11\r\n d31 = max(da, d31); // 2nd smallest now not in d31\r\n d11.xy = (d11.x < d11.y) ? d11.xy : d11.yx;\r\n d11.xz = (d11.x < d11.z) ? d11.xz : d11.zx; // d11.x now smallest\r\n d12 = min(d12, d21); // 2nd smallest now not in d21\r\n d12 = min(d12, d22); // nor in d22\r\n d12 = min(d12, d31); // nor in d31\r\n d12 = min(d12, d32); // nor in d32\r\n d11.yz = min(d11.yz,d12.xy); // nor in d12.yz\r\n d11.y = min(d11.y,d12.z); // Only two more to go\r\n d11.y = min(d11.y,d11.z); // Done! (Phew!)\r\n return sqrt(d11.xy); // F1, F2\r\n}\r\n\r\n", + "// Worley3D" + ), + (t.compilationString += this._declareOutput(this._outputs[0], t) + " = worley(" + this.seed.associatedVariableName + ", " + this.jitter.associatedVariableName + ", " + this.manhattanDistance + ");\r\n"), + this + ); + } + }), + (t.prototype._dumpPropertiesCode = function () { + return this._codeVariableName + ".manhattanDistance = " + this.manhattanDistance + ";\r\n"; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.manhattanDistance = this.manhattanDistance), t; + }), + (t.prototype._deserialize = function (t, n, i) { + e.prototype._deserialize.call(this, t, n, i), (this.manhattanDistance = t.manhattanDistance); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.WorleyNoise3DBlock"] = kc; + var zc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("seed", fs.Vector3), n.registerOutput("output", fs.Float), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "SimplexPerlin3DBlock"; + }), + Object.defineProperty(t.prototype, "seed", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + if ((e.prototype._buildBlock.call(this, t), this.seed.isConnected && this._outputs[0].hasEndpoints)) { + return ( + "const float UNSKEWFACTOR = 1.0/6.0;\r\n", + "const float SIMPLEX_CORNER_POS = 0.5;\r\n", + "const float SIMPLEX_TETRAHADRON_HEIGHT = 0.70710678118654752440084436210485;\r\n", + "float SimplexPerlin3D( vec3 P ){\r\n", + " P *= SIMPLEX_TETRAHADRON_HEIGHT;\r\n", + " vec3 Pi = floor( P + dot( P, vec3( SKEWFACTOR) ) );", + " vec3 x0 = P - Pi + dot(Pi, vec3( UNSKEWFACTOR ) );\r\n", + " vec3 g = step(x0.yzx, x0.xyz);\r\n", + " vec3 l = 1.0 - g;\r\n", + " vec3 Pi_1 = min( g.xyz, l.zxy );\r\n", + " vec3 Pi_2 = max( g.xyz, l.zxy );\r\n", + " vec3 x1 = x0 - Pi_1 + UNSKEWFACTOR;\r\n", + " vec3 x2 = x0 - Pi_2 + SKEWFACTOR;\r\n", + " vec3 x3 = x0 - SIMPLEX_CORNER_POS;\r\n", + " vec4 v1234_x = vec4( x0.x, x1.x, x2.x, x3.x );\r\n", + " vec4 v1234_y = vec4( x0.y, x1.y, x2.y, x3.y );\r\n", + " vec4 v1234_z = vec4( x0.z, x1.z, x2.z, x3.z );\r\n", + " Pi.xyz = Pi.xyz - floor(Pi.xyz * ( 1.0 / 69.0 )) * 69.0;\r\n", + " vec3 Pi_inc1 = step( Pi, vec3( 69.0 - 1.5 ) ) * ( Pi + 1.0 );\r\n", + " vec4 Pt = vec4( Pi.xy, Pi_inc1.xy ) + vec2( 50.0, 161.0 ).xyxy;\r\n", + " Pt *= Pt;\r\n", + " vec4 V1xy_V2xy = mix( Pt.xyxy, Pt.zwzw, vec4( Pi_1.xy, Pi_2.xy ) );\r\n", + " Pt = vec4( Pt.x, V1xy_V2xy.xz, Pt.z ) * vec4( Pt.y, V1xy_V2xy.yw, Pt.w );\r\n", + " const vec3 SOMELARGEFLOATS = vec3( 635.298681, 682.357502, 668.926525 );\r\n", + " const vec3 ZINC = vec3( 48.500388, 65.294118, 63.934599 );\r\n", + " vec3 lowz_mods = vec3( 1.0 / ( SOMELARGEFLOATS.xyz + Pi.zzz * ZINC.xyz ) );\r\n", + " vec3 highz_mods = vec3( 1.0 / ( SOMELARGEFLOATS.xyz + Pi_inc1.zzz * ZINC.xyz ) );\r\n", + " Pi_1 = ( Pi_1.z < 0.5 ) ? lowz_mods : highz_mods;\r\n", + " Pi_2 = ( Pi_2.z < 0.5 ) ? lowz_mods : highz_mods;\r\n", + " vec4 hash_0 = fract( Pt * vec4( lowz_mods.x, Pi_1.x, Pi_2.x, highz_mods.x ) ) - 0.49999;\r\n", + " vec4 hash_1 = fract( Pt * vec4( lowz_mods.y, Pi_1.y, Pi_2.y, highz_mods.y ) ) - 0.49999;\r\n", + " vec4 hash_2 = fract( Pt * vec4( lowz_mods.z, Pi_1.z, Pi_2.z, highz_mods.z ) ) - 0.49999;\r\n", + " vec4 grad_results = inversesqrt( hash_0 * hash_0 + hash_1 * hash_1 + hash_2 * hash_2 ) * ( hash_0 * v1234_x + hash_1 * v1234_y + hash_2 * v1234_z );\r\n", + " const float FINAL_NORMALIZATION = 37.837227241611314102871574478976;\r\n", + " vec4 kernel_weights = v1234_x * v1234_x + v1234_y * v1234_y + v1234_z * v1234_z;\r\n", + " kernel_weights = max(0.5 - kernel_weights, 0.0);\r\n", + " kernel_weights = kernel_weights*kernel_weights*kernel_weights;\r\n", + " return dot( kernel_weights, grad_results ) * FINAL_NORMALIZATION;\r\n", + "}\r\n", + t._emitFunction( + "SimplexPerlin3D", + "const float SKEWFACTOR = 1.0/3.0;\r\nconst float UNSKEWFACTOR = 1.0/6.0;\r\nconst float SIMPLEX_CORNER_POS = 0.5;\r\nconst float SIMPLEX_TETRAHADRON_HEIGHT = 0.70710678118654752440084436210485;\r\nfloat SimplexPerlin3D( vec3 P ){\r\n P *= SIMPLEX_TETRAHADRON_HEIGHT;\r\n vec3 Pi = floor( P + dot( P, vec3( SKEWFACTOR) ) ); vec3 x0 = P - Pi + dot(Pi, vec3( UNSKEWFACTOR ) );\r\n vec3 g = step(x0.yzx, x0.xyz);\r\n vec3 l = 1.0 - g;\r\n vec3 Pi_1 = min( g.xyz, l.zxy );\r\n vec3 Pi_2 = max( g.xyz, l.zxy );\r\n vec3 x1 = x0 - Pi_1 + UNSKEWFACTOR;\r\n vec3 x2 = x0 - Pi_2 + SKEWFACTOR;\r\n vec3 x3 = x0 - SIMPLEX_CORNER_POS;\r\n vec4 v1234_x = vec4( x0.x, x1.x, x2.x, x3.x );\r\n vec4 v1234_y = vec4( x0.y, x1.y, x2.y, x3.y );\r\n vec4 v1234_z = vec4( x0.z, x1.z, x2.z, x3.z );\r\n Pi.xyz = Pi.xyz - floor(Pi.xyz * ( 1.0 / 69.0 )) * 69.0;\r\n vec3 Pi_inc1 = step( Pi, vec3( 69.0 - 1.5 ) ) * ( Pi + 1.0 );\r\n vec4 Pt = vec4( Pi.xy, Pi_inc1.xy ) + vec2( 50.0, 161.0 ).xyxy;\r\n Pt *= Pt;\r\n vec4 V1xy_V2xy = mix( Pt.xyxy, Pt.zwzw, vec4( Pi_1.xy, Pi_2.xy ) );\r\n Pt = vec4( Pt.x, V1xy_V2xy.xz, Pt.z ) * vec4( Pt.y, V1xy_V2xy.yw, Pt.w );\r\n const vec3 SOMELARGEFLOATS = vec3( 635.298681, 682.357502, 668.926525 );\r\n const vec3 ZINC = vec3( 48.500388, 65.294118, 63.934599 );\r\n vec3 lowz_mods = vec3( 1.0 / ( SOMELARGEFLOATS.xyz + Pi.zzz * ZINC.xyz ) );\r\n vec3 highz_mods = vec3( 1.0 / ( SOMELARGEFLOATS.xyz + Pi_inc1.zzz * ZINC.xyz ) );\r\n Pi_1 = ( Pi_1.z < 0.5 ) ? lowz_mods : highz_mods;\r\n Pi_2 = ( Pi_2.z < 0.5 ) ? lowz_mods : highz_mods;\r\n vec4 hash_0 = fract( Pt * vec4( lowz_mods.x, Pi_1.x, Pi_2.x, highz_mods.x ) ) - 0.49999;\r\n vec4 hash_1 = fract( Pt * vec4( lowz_mods.y, Pi_1.y, Pi_2.y, highz_mods.y ) ) - 0.49999;\r\n vec4 hash_2 = fract( Pt * vec4( lowz_mods.z, Pi_1.z, Pi_2.z, highz_mods.z ) ) - 0.49999;\r\n vec4 grad_results = inversesqrt( hash_0 * hash_0 + hash_1 * hash_1 + hash_2 * hash_2 ) * ( hash_0 * v1234_x + hash_1 * v1234_y + hash_2 * v1234_z );\r\n const float FINAL_NORMALIZATION = 37.837227241611314102871574478976;\r\n vec4 kernel_weights = v1234_x * v1234_x + v1234_y * v1234_y + v1234_z * v1234_z;\r\n kernel_weights = max(0.5 - kernel_weights, 0.0);\r\n kernel_weights = kernel_weights*kernel_weights*kernel_weights;\r\n return dot( kernel_weights, grad_results ) * FINAL_NORMALIZATION;\r\n}\r\n", + "// SimplexPerlin3D" + ), + (t.compilationString += this._declareOutput(this._outputs[0], t) + " = SimplexPerlin3D(" + this.seed.associatedVariableName + ");\r\n"), + this + ); + } + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.SimplexPerlin3DBlock"] = zc; + var jc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("normalMap0", fs.Vector3), + n.registerInput("normalMap1", fs.Vector3), + n.registerOutput("output", fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color4), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Vector4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "NormalBlendBlock"; + }), + Object.defineProperty(t.prototype, "normalMap0", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normalMap1", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this._inputs[0], + r = this._inputs[1], + o = t._getFreeVariableName("stepR"), + a = t._getFreeVariableName("stepG"); + return ( + (t.compilationString += "float " + o + " = step(0.5, " + i.associatedVariableName + ".r);\r\n"), + (t.compilationString += "float " + a + " = step(0.5, " + i.associatedVariableName + ".g);\r\n"), + (t.compilationString += this._declareOutput(n, t) + ";\r\n"), + (t.compilationString += + n.associatedVariableName + + ".r = (1.0 - " + + o + + ") * " + + i.associatedVariableName + + ".r * " + + r.associatedVariableName + + ".r * 2.0 + " + + o + + " * (1.0 - " + + i.associatedVariableName + + ".r) * (1.0 - " + + r.associatedVariableName + + ".r) * 2.0;\r\n"), + (t.compilationString += + n.associatedVariableName + + ".g = (1.0 - " + + a + + ") * " + + i.associatedVariableName + + ".g * " + + r.associatedVariableName + + ".g * 2.0 + " + + a + + " * (1.0 - " + + i.associatedVariableName + + ".g) * (1.0 - " + + r.associatedVariableName + + ".g) * 2.0;\r\n"), + (t.compilationString += n.associatedVariableName + ".b = " + i.associatedVariableName + ".b * " + r.associatedVariableName + ".b;\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.NormalBlendBlock"] = jc; + var Bc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("input", fs.Vector2), n.registerInput("angle", fs.Float), n.registerOutput("output", fs.Vector2), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "Rotate2dBlock"; + }), + Object.defineProperty(t.prototype, "input", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "angle", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.autoConfigure = function (e) { + if (!this.angle.isConnected) { + var t = new ks("angle"); + (t.value = 0), t.output.connectTo(this.angle); + } + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this.angle, + r = this.input; + return ( + (t.compilationString += + this._declareOutput(n, t) + + " = vec2(cos(" + + i.associatedVariableName + + ") * " + + r.associatedVariableName + + ".x - sin(" + + i.associatedVariableName + + ") * " + + r.associatedVariableName + + ".y, sin(" + + i.associatedVariableName + + ") * " + + r.associatedVariableName + + ".x + cos(" + + i.associatedVariableName + + ") * " + + r.associatedVariableName + + ".y);\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.Rotate2dBlock"] = Bc; + var Vc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("incident", fs.Vector3), + n.registerInput("normal", fs.Vector3), + n.registerOutput("output", fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "ReflectBlock"; + }), + Object.defineProperty(t.prototype, "incident", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normal", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return (t.compilationString += this._declareOutput(n, t) + " = reflect(" + this.incident.associatedVariableName + ".xyz, " + this.normal.associatedVariableName + ".xyz);\r\n"), this; + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.ReflectBlock"] = Vc; + var Gc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return ( + n.registerInput("incident", fs.Vector3), + n.registerInput("normal", fs.Vector3), + n.registerInput("ior", fs.Float), + n.registerOutput("output", fs.Vector3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[0].acceptedConnectionPointTypes.push(fs.Color4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Vector4), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color3), + n._inputs[1].acceptedConnectionPointTypes.push(fs.Color4), + n + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "RefractBlock"; + }), + Object.defineProperty(t.prototype, "incident", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "normal", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "ior", { + get: function () { + return this._inputs[2]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0]; + return ( + (t.compilationString += this._declareOutput(n, t) + " = refract(" + this.incident.associatedVariableName + ".xyz, " + this.normal.associatedVariableName + ".xyz, " + this.ior.associatedVariableName + ");\r\n"), this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.RefractBlock"] = Gc; + var Uc = (function (e) { + function t(t) { + var n = e.call(this, t, ps.Neutral) || this; + return n.registerInput("color", fs.Color3), n.registerInput("level", fs.Float), n.registerOutput("output", fs.Color3), n; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "DesaturateBlock"; + }), + Object.defineProperty(t.prototype, "color", { + get: function () { + return this._inputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "level", { + get: function () { + return this._inputs[1]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "output", { + get: function () { + return this._outputs[0]; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildBlock = function (t) { + e.prototype._buildBlock.call(this, t); + var n = this._outputs[0], + i = this.color.associatedVariableName, + r = t._getFreeVariableName("colorMin"), + o = t._getFreeVariableName("colorMax"), + a = t._getFreeVariableName("colorMerge"); + return ( + (t.compilationString += "float " + r + " = min(min(" + i + ".x, " + i + ".y), " + i + ".z);\r\n"), + (t.compilationString += "float " + o + " = max(max(" + i + ".x, " + i + ".y), " + i + ".z);\r\n"), + (t.compilationString += "float " + a + " = 0.5 * (" + r + " + " + o + ");\r\n"), + (t.compilationString += this._declareOutput(n, t) + " = mix(" + i + ", vec3(" + a + ", " + a + ", " + a + "), " + this.level.associatedVariableName + ");\r\n"), + this + ); + }), + t + ); + })(Is); + c.a.RegisteredTypes["BABYLON.DesaturateBlock"] = Uc; + var Hc = (function () { + function e() {} + return (e.prototype.optimize = function (e, t) {}), e; + })(), + Wc = + (n(166), + (function () { + function e(t, n) { + var i; + void 0 === n && (n = e._DefaultOptions), + (this.engine = t), + (this._ringBufferIndex = 0), + (this._ringScreenBuffer = null), + (this._fullscreenViewport = new vn.a(0, 0, 1, 1)), + (n = Object(h.a)(Object(h.a)({}, e._DefaultOptions), n)), + (this._vertexBuffers = (((i = {})[wn.b.PositionKind] = new wn.b(t, n.positions, wn.b.PositionKind, !1, !1, 2)), i)), + (this._indexBuffer = t.createIndexBuffer(n.indices)), + (t.depthCullingState.depthTest = !1), + (t.stencilState.stencilTest = !1); + } + return ( + (e.prototype._getNextFrameBuffer = function (e) { + if ((void 0 === e && (e = !0), !this._ringScreenBuffer)) { + this._ringScreenBuffer = []; + for (var t = 0; t < 2; t++) { + var n = this.engine.createRenderTargetTexture( + { width: this.engine.getRenderWidth(!0), height: this.engine.getRenderHeight(!0) }, + { generateDepthBuffer: !1, generateStencilBuffer: !1, generateMipMaps: !1, samplingMode: 1 } + ), + i = new ln.a("", null); + (i._texture = n), this._ringScreenBuffer.push(i); + } + } + var r = this._ringScreenBuffer[this._ringBufferIndex]; + return e && (this._ringBufferIndex = (this._ringBufferIndex + 1) % 2), r; + }), + (e.prototype.setViewport = function (e) { + void 0 === e && (e = this._fullscreenViewport), this.engine.setViewport(e); + }), + (e.prototype.bindBuffers = function (e) { + this.engine.bindBuffers(this._vertexBuffers, this._indexBuffer, e); + }), + (e.prototype.applyEffectWrapper = function (e) { + this.engine.enableEffect(e.effect), this.bindBuffers(e.effect), e.onApplyObservable.notifyObservers({}); + }), + (e.prototype.draw = function () { + this.engine.drawElementsType(0, 0, 6); + }), + (e.prototype.render = function (e, t) { + var n = this; + void 0 === t && (t = null), Array.isArray(e) || (e = [e]); + for (var i = 0, r = e; i < r.length; i++) { + if (!r[i].effect.isReady()) return; + } + e.forEach(function (i, r) { + var o = t; + 0 !== r && + i.effect.onBindObservable.addOnce(function () { + i.effect.setTexture("textureSampler", n._getNextFrameBuffer(!1)); + }), + (o = e.length > 1 && r != e.length - 1 ? n._getNextFrameBuffer() : t), + n.setViewport(), + n.applyEffectWrapper(i), + o && n.engine.bindFramebuffer(o.getInternalTexture()), + n.draw(), + o && n.engine.unBindFramebuffer(o.getInternalTexture()); + }); + }), + (e.prototype.dispose = function () { + this._ringScreenBuffer && + (this._ringScreenBuffer.forEach(function (e) { + e.dispose(); + }), + (this._ringScreenBuffer = null)); + var e = this._vertexBuffers[wn.b.PositionKind]; + e && (e.dispose(), delete this._vertexBuffers[wn.b.PositionKind]), this._indexBuffer && this.engine._releaseBuffer(this._indexBuffer); + }), + (e._DefaultOptions = { positions: [1, 1, -1, 1, -1, -1, 1, -1], indices: [0, 1, 2, 0, 2, 3] }), + e + ); + })()), + Xc = (function () { + function e(e) { + var t, + n = this; + this.onApplyObservable = new o.c(); + var i = e.uniformNames || []; + e.vertexShader + ? (t = { fragmentSource: e.fragmentShader, vertexSource: e.vertexShader, spectorName: e.name || "effectWrapper" }) + : (i.push("scale"), + (t = { fragmentSource: e.fragmentShader, vertex: "postprocess", spectorName: e.name || "effectWrapper" }), + this.onApplyObservable.add(function () { + n.effect.setFloat2("scale", 1, 1); + })), + (this.effect = new Xt.a(t, e.attributeNames || ["position"], i, e.samplerNames, e.engine)); + } + return ( + (e.prototype.dispose = function () { + this.effect.dispose(); + }), + e + ); + })(), + Yc = n(167), + Kc = n(78), + Zc = 0, + qc = (function () { + function e(e, t, n) { + (this.pos = e), (this.normal = t), (this.uv = n); + } + return ( + (e.prototype.clone = function () { + return new e(this.pos.clone(), this.normal.clone(), this.uv.clone()); + }), + (e.prototype.flip = function () { + this.normal = this.normal.scale(-1); + }), + (e.prototype.interpolate = function (t, n) { + return new e(a.e.Lerp(this.pos, t.pos, n), a.e.Lerp(this.normal, t.normal, n), a.d.Lerp(this.uv, t.uv, n)); + }), + e + ); + })(), + Qc = (function () { + function e(e, t) { + (this.normal = e), (this.w = t); + } + return ( + (e.FromPoints = function (t, n, i) { + var r = i.subtract(t), + o = n.subtract(t); + if (0 === r.lengthSquared() || 0 === o.lengthSquared()) return null; + var s = a.e.Normalize(a.e.Cross(r, o)); + return new e(s, a.e.Dot(s, t)); + }), + (e.prototype.clone = function () { + return new e(this.normal.clone(), this.w); + }), + (e.prototype.flip = function () { + this.normal.scaleInPlace(-1), (this.w = -this.w); + }), + (e.prototype.splitPolygon = function (t, n, i, r, o) { + var s, + c, + l = 0, + u = []; + for (s = 0; s < t.vertices.length; s++) { + var h = (c = a.e.Dot(this.normal, t.vertices[s].pos) - this.w) < -e.EPSILON ? 2 : c > e.EPSILON ? 1 : 0; + (l |= h), u.push(h); + } + switch (l) { + case 0: + (a.e.Dot(this.normal, t.plane.normal) > 0 ? n : i).push(t); + break; + case 1: + r.push(t); + break; + case 2: + o.push(t); + break; + case 3: + var d, + p = [], + f = []; + for (s = 0; s < t.vertices.length; s++) { + var m = (s + 1) % t.vertices.length, + g = u[s], + b = u[m], + _ = t.vertices[s], + v = t.vertices[m]; + if ((2 !== g && p.push(_), 1 !== g && f.push(2 !== g ? _.clone() : _), 3 == (g | b))) { + c = (this.w - a.e.Dot(this.normal, _.pos)) / a.e.Dot(this.normal, v.pos.subtract(_.pos)); + var y = _.interpolate(v, c); + p.push(y), f.push(y.clone()); + } + } + p.length >= 3 && (d = new Jc(p, t.shared)).plane && r.push(d), f.length >= 3 && (d = new Jc(f, t.shared)).plane && o.push(d); + } + }), + (e.EPSILON = 1e-5), + e + ); + })(), + Jc = (function () { + function e(e, t) { + (this.vertices = e), (this.shared = t), (this.plane = Qc.FromPoints(e[0].pos, e[1].pos, e[2].pos)); + } + return ( + (e.prototype.clone = function () { + return new e( + this.vertices.map(function (e) { + return e.clone(); + }), + this.shared + ); + }), + (e.prototype.flip = function () { + this.vertices.reverse().map(function (e) { + e.flip(); + }), + this.plane.flip(); + }), + e + ); + })(), + $c = (function () { + function e(e) { + (this.plane = null), (this.front = null), (this.back = null), (this.polygons = new Array()), e && this.build(e); + } + return ( + (e.prototype.clone = function () { + var t = new e(); + return ( + (t.plane = this.plane && this.plane.clone()), + (t.front = this.front && this.front.clone()), + (t.back = this.back && this.back.clone()), + (t.polygons = this.polygons.map(function (e) { + return e.clone(); + })), + t + ); + }), + (e.prototype.invert = function () { + for (var e = 0; e < this.polygons.length; e++) this.polygons[e].flip(); + this.plane && this.plane.flip(), this.front && this.front.invert(), this.back && this.back.invert(); + var t = this.front; + (this.front = this.back), (this.back = t); + }), + (e.prototype.clipPolygons = function (e) { + if (!this.plane) return e.slice(); + for (var t = new Array(), n = new Array(), i = 0; i < e.length; i++) this.plane.splitPolygon(e[i], t, n, t, n); + return this.front && (t = this.front.clipPolygons(t)), (n = this.back ? this.back.clipPolygons(n) : []), t.concat(n); + }), + (e.prototype.clipTo = function (e) { + (this.polygons = e.clipPolygons(this.polygons)), this.front && this.front.clipTo(e), this.back && this.back.clipTo(e); + }), + (e.prototype.allPolygons = function () { + var e = this.polygons.slice(); + return this.front && (e = e.concat(this.front.allPolygons())), this.back && (e = e.concat(this.back.allPolygons())), e; + }), + (e.prototype.build = function (t) { + if (t.length) { + this.plane || (this.plane = t[0].plane.clone()); + for (var n = new Array(), i = new Array(), r = 0; r < t.length; r++) this.plane.splitPolygon(t[r], this.polygons, this.polygons, n, i); + n.length && (this.front || (this.front = new e()), this.front.build(n)), i.length && (this.back || (this.back = new e()), this.back.build(i)); + } + }), + e + ); + })(), + el = (function () { + function e() { + this.polygons = new Array(); + } + return ( + (e.FromMesh = function (t) { + var n, + i, + r, + o, + s, + c, + l, + u, + h, + d, + p = new Array(), + f = null; + if (!(t instanceof Ee.a)) throw "BABYLON.CSG: Wrong Mesh type, must be BABYLON.Mesh"; + t.computeWorldMatrix(!0), (l = t.getWorldMatrix()), (u = t.position.clone()), (h = t.rotation.clone()), t.rotationQuaternion && (f = t.rotationQuaternion.clone()), (d = t.scaling.clone()); + for (var m = t.getIndices(), g = t.getVerticesData(wn.b.PositionKind), b = t.getVerticesData(wn.b.NormalKind), _ = t.getVerticesData(wn.b.UVKind), v = t.subMeshes, y = 0, C = v.length; y < C; y++) + for (var P = v[y].indexStart, x = v[y].indexCount + v[y].indexStart; P < x; P += 3) { + c = []; + for (var T = 0; T < 3; T++) { + var S = new a.e(b[3 * m[P + T]], b[3 * m[P + T] + 1], b[3 * m[P + T] + 2]); + r = new a.d(_[2 * m[P + T]], _[2 * m[P + T] + 1]); + var O = new a.e(g[3 * m[P + T]], g[3 * m[P + T] + 1], g[3 * m[P + T] + 2]); + (o = a.e.TransformCoordinates(O, l)), (i = a.e.TransformNormal(S, l)), (n = new qc(o, i, r)), c.push(n); + } + (s = new Jc(c, { subMeshId: y, meshId: Zc, materialIndex: v[y].materialIndex })).plane && p.push(s); + } + var E = e.FromPolygons(p); + return (E.matrix = l), (E.position = u), (E.rotation = h), (E.scaling = d), (E.rotationQuaternion = f), Zc++, E; + }), + (e.FromPolygons = function (t) { + var n = new e(); + return (n.polygons = t), n; + }), + (e.prototype.clone = function () { + var t = new e(); + return ( + (t.polygons = this.polygons.map(function (e) { + return e.clone(); + })), + t.copyTransformAttributes(this), + t + ); + }), + (e.prototype.union = function (t) { + var n = new $c(this.clone().polygons), + i = new $c(t.clone().polygons); + return n.clipTo(i), i.clipTo(n), i.invert(), i.clipTo(n), i.invert(), n.build(i.allPolygons()), e.FromPolygons(n.allPolygons()).copyTransformAttributes(this); + }), + (e.prototype.unionInPlace = function (e) { + var t = new $c(this.polygons), + n = new $c(e.polygons); + t.clipTo(n), n.clipTo(t), n.invert(), n.clipTo(t), n.invert(), t.build(n.allPolygons()), (this.polygons = t.allPolygons()); + }), + (e.prototype.subtract = function (t) { + var n = new $c(this.clone().polygons), + i = new $c(t.clone().polygons); + return n.invert(), n.clipTo(i), i.clipTo(n), i.invert(), i.clipTo(n), i.invert(), n.build(i.allPolygons()), n.invert(), e.FromPolygons(n.allPolygons()).copyTransformAttributes(this); + }), + (e.prototype.subtractInPlace = function (e) { + var t = new $c(this.polygons), + n = new $c(e.polygons); + t.invert(), t.clipTo(n), n.clipTo(t), n.invert(), n.clipTo(t), n.invert(), t.build(n.allPolygons()), t.invert(), (this.polygons = t.allPolygons()); + }), + (e.prototype.intersect = function (t) { + var n = new $c(this.clone().polygons), + i = new $c(t.clone().polygons); + return n.invert(), i.clipTo(n), i.invert(), n.clipTo(i), i.clipTo(n), n.build(i.allPolygons()), n.invert(), e.FromPolygons(n.allPolygons()).copyTransformAttributes(this); + }), + (e.prototype.intersectInPlace = function (e) { + var t = new $c(this.polygons), + n = new $c(e.polygons); + t.invert(), n.clipTo(t), n.invert(), t.clipTo(n), n.clipTo(t), t.build(n.allPolygons()), t.invert(), (this.polygons = t.allPolygons()); + }), + (e.prototype.inverse = function () { + var e = this.clone(); + return e.inverseInPlace(), e; + }), + (e.prototype.inverseInPlace = function () { + this.polygons.map(function (e) { + e.flip(); + }); + }), + (e.prototype.copyTransformAttributes = function (e) { + return (this.matrix = e.matrix), (this.position = e.position), (this.rotation = e.rotation), (this.scaling = e.scaling), (this.rotationQuaternion = e.rotationQuaternion), this; + }), + (e.prototype.buildMeshGeometry = function (e, t, n) { + var i = this.matrix.clone(); + i.invert(); + var r, + o, + s, + c = new Ee.a(e, t), + l = [], + u = [], + h = [], + d = [], + p = a.e.Zero(), + f = a.e.Zero(), + m = a.d.Zero(), + g = this.polygons, + b = [0, 0, 0], + _ = {}, + v = 0, + y = {}; + n && + g.sort(function (e, t) { + return e.shared.meshId === t.shared.meshId ? e.shared.subMeshId - t.shared.subMeshId : e.shared.meshId - t.shared.meshId; + }); + for (var C = 0, P = g.length; C < P; C++) { + y[(r = g[C]).shared.meshId] || (y[r.shared.meshId] = {}), + y[r.shared.meshId][r.shared.subMeshId] || (y[r.shared.meshId][r.shared.subMeshId] = { indexStart: 1 / 0, indexEnd: -1 / 0, materialIndex: r.shared.materialIndex }), + (s = y[r.shared.meshId][r.shared.subMeshId]); + for (var x = 2, T = r.vertices.length; x < T; x++) { + (b[0] = 0), (b[1] = x - 1), (b[2] = x); + for (var S = 0; S < 3; S++) { + p.copyFrom(r.vertices[b[S]].pos), f.copyFrom(r.vertices[b[S]].normal), m.copyFrom(r.vertices[b[S]].uv); + var O = a.e.TransformCoordinates(p, i), + E = a.e.TransformNormal(f, i); + (void 0 !== (o = _[O.x + "," + O.y + "," + O.z]) && h[3 * o] === E.x && h[3 * o + 1] === E.y && h[3 * o + 2] === E.z && d[2 * o] === m.x && d[2 * o + 1] === m.y) || + (l.push(O.x, O.y, O.z), d.push(m.x, m.y), h.push(f.x, f.y, f.z), (o = _[O.x + "," + O.y + "," + O.z] = l.length / 3 - 1)), + u.push(o), + (s.indexStart = Math.min(v, s.indexStart)), + (s.indexEnd = Math.max(v, s.indexEnd)), + v++; + } + } + } + if ((c.setVerticesData(wn.b.PositionKind, l), c.setVerticesData(wn.b.NormalKind, h), c.setVerticesData(wn.b.UVKind, d), c.setIndices(u, null), n)) { + var M, + A = 0; + for (var I in ((c.subMeshes = new Array()), y)) { + for (var D in ((M = -1), y[I])) (s = y[I][D]), Kc.b.CreateFromIndices(s.materialIndex + A, s.indexStart, s.indexEnd - s.indexStart + 1, c), (M = Math.max(s.materialIndex, M)); + A += ++M; + } + } + return c; + }), + (e.prototype.toMesh = function (e, t, n, i) { + void 0 === t && (t = null); + var r = this.buildMeshGeometry(e, n, i); + return ( + (r.material = t), + r.position.copyFrom(this.position), + r.rotation.copyFrom(this.rotation), + this.rotationQuaternion && (r.rotationQuaternion = this.rotationQuaternion.clone()), + r.scaling.copyFrom(this.scaling), + r.computeWorldMatrix(!0), + r + ); + }), + e + ); + })(), + tl = (function (e) { + function t(t, n, i, r, o, s) { + void 0 === r && (r = 1), void 0 === o && (o = 60), void 0 === s && (s = !0); + var c = e.call(this, t, i) || this; + (c._sectionPolygonPointsCount = 4), (c._running = !1), (c._autoStart = s), (c._generator = n), (c._diameter = r), (c._length = o), (c._sectionVectors = []), (c._sectionNormalVectors = []); + for (var l = 0; l < c._sectionPolygonPointsCount; l++) (c._sectionVectors[l] = a.e.Zero()), (c._sectionNormalVectors[l] = a.e.Zero()); + return c._createMesh(), c; + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "TrailMesh"; + }), + (t.prototype._createMesh = function () { + var e = new Rn.a(), + t = [], + n = [], + i = [], + r = a.e.Zero(); + r = this._generator instanceof ke.a && this._generator._boundingInfo ? this._generator._boundingInfo.boundingBox.centerWorld : this._generator.position; + for (var o = (2 * Math.PI) / this._sectionPolygonPointsCount, s = 0; s < this._sectionPolygonPointsCount; s++) t.push(r.x + Math.cos(s * o) * this._diameter, r.y + Math.sin(s * o) * this._diameter, r.z); + for (s = 1; s <= this._length; s++) { + for (var c = 0; c < this._sectionPolygonPointsCount; c++) t.push(r.x + Math.cos(c * o) * this._diameter, r.y + Math.sin(c * o) * this._diameter, r.z); + var l = t.length / 3 - 2 * this._sectionPolygonPointsCount; + for (c = 0; c < this._sectionPolygonPointsCount - 1; c++) + i.push(l + c, l + c + this._sectionPolygonPointsCount, l + c + this._sectionPolygonPointsCount + 1), i.push(l + c, l + c + this._sectionPolygonPointsCount + 1, l + c + 1); + i.push(l + this._sectionPolygonPointsCount - 1, l + this._sectionPolygonPointsCount - 1 + this._sectionPolygonPointsCount, l + this._sectionPolygonPointsCount), + i.push(l + this._sectionPolygonPointsCount - 1, l + this._sectionPolygonPointsCount, l); + } + Rn.a.ComputeNormals(t, i, n), (e.positions = t), (e.normals = n), (e.indices = i), e.applyToMesh(this, !0), this._autoStart && this.start(); + }), + (t.prototype.start = function () { + var e = this; + this._running || + ((this._running = !0), + (this._beforeRenderObserver = this.getScene().onBeforeRenderObservable.add(function () { + e.update(); + }))); + }), + (t.prototype.stop = function () { + this._beforeRenderObserver && this._running && ((this._running = !1), this.getScene().onBeforeRenderObservable.remove(this._beforeRenderObserver)); + }), + (t.prototype.update = function () { + var e = this.getVerticesData(wn.b.PositionKind), + t = this.getVerticesData(wn.b.NormalKind), + n = this._generator.getWorldMatrix(); + if (e && t) { + for (var i = 3 * this._sectionPolygonPointsCount; i < e.length; i++) e[i - 3 * this._sectionPolygonPointsCount] = e[i] - (t[i] / this._length) * this._diameter; + for (i = 3 * this._sectionPolygonPointsCount; i < t.length; i++) t[i - 3 * this._sectionPolygonPointsCount] = t[i]; + var r = e.length - 3 * this._sectionPolygonPointsCount, + o = (2 * Math.PI) / this._sectionPolygonPointsCount; + for (i = 0; i < this._sectionPolygonPointsCount; i++) + this._sectionVectors[i].copyFromFloats(Math.cos(i * o) * this._diameter, Math.sin(i * o) * this._diameter, 0), + this._sectionNormalVectors[i].copyFromFloats(Math.cos(i * o), Math.sin(i * o), 0), + a.e.TransformCoordinatesToRef(this._sectionVectors[i], n, this._sectionVectors[i]), + a.e.TransformNormalToRef(this._sectionNormalVectors[i], n, this._sectionNormalVectors[i]); + for (i = 0; i < this._sectionPolygonPointsCount; i++) + (e[r + 3 * i] = this._sectionVectors[i].x), + (e[r + 3 * i + 1] = this._sectionVectors[i].y), + (e[r + 3 * i + 2] = this._sectionVectors[i].z), + (t[r + 3 * i] = this._sectionNormalVectors[i].x), + (t[r + 3 * i + 1] = this._sectionNormalVectors[i].y), + (t[r + 3 * i + 2] = this._sectionNormalVectors[i].z); + this.updateVerticesData(wn.b.PositionKind, e, !0, !1), this.updateVerticesData(wn.b.NormalKind, t, !0, !1); + } + }), + (t.prototype.clone = function (e, n) { + return void 0 === e && (e = ""), new t(e, void 0 === n ? this._generator : n, this.getScene(), this._diameter, this._length, this._autoStart); + }), + (t.prototype.serialize = function (t) { + e.prototype.serialize.call(this, t); + }), + (t.Parse = function (e, n) { + return new t(e.name, e._generator, n, e._diameter, e._length, e._autoStart); + }), + t + ); + })(Ee.a), + nl = n(149); + (Rn.a.CreateDisc = function (e) { + var t = new Array(), + n = new Array(), + i = new Array(), + r = new Array(), + o = e.radius || 0.5, + a = e.tessellation || 64, + s = e.arc && (e.arc <= 0 || e.arc > 1) ? 1 : e.arc || 1, + c = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE; + t.push(0, 0, 0), r.push(0.5, 0.5); + for (var l = 2 * Math.PI * s, u = l / a, h = 0; h < l; h += u) { + var d = Math.cos(h), + p = Math.sin(h), + f = (d + 1) / 2, + m = (1 - p) / 2; + t.push(o * d, o * p, 0), r.push(f, m); + } + 1 === s && (t.push(t[3], t[4], t[5]), r.push(r[2], r[3])); + for (var g = t.length / 3, b = 1; b < g - 1; b++) n.push(b + 1, 0, b); + Rn.a.ComputeNormals(t, n, i), Rn.a._ComputeSides(c, t, n, i, r, e.frontUVs, e.backUVs); + var _ = new Rn.a(); + return (_.indices = n), (_.positions = t), (_.normals = i), (_.uvs = r), _; + }), + (Ee.a.CreateDisc = function (e, t, n, i, r, o) { + void 0 === i && (i = null); + var a = { radius: t, tessellation: n, sideOrientation: o, updatable: r }; + return il.CreateDisc(e, a, i); + }); + var il = (function () { + function e() {} + return ( + (e.CreateDisc = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateDisc(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + Rn.a.CreateTiledBox = function (e) { + for ( + var t = e.faceUV || new Array(6), + n = e.faceColors, + i = e.pattern || Ee.a.NO_FLIP, + r = e.width || e.size || 1, + o = e.height || e.size || 1, + c = e.depth || e.size || 1, + l = e.tileWidth || e.tileSize || 1, + u = e.tileHeight || e.tileSize || 1, + h = e.alignHorizontal || 0, + d = e.alignVertical || 0, + p = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + f = 0; + f < 6; + f++ + ) + void 0 === t[f] && (t[f] = new a.f(0, 0, 1, 1)), n && void 0 === n[f] && (n[f] = new s.b(1, 1, 1, 1)); + var m = r / 2, + g = o / 2, + b = c / 2, + _ = []; + for (f = 0; f < 2; f++) _[f] = Rn.a.CreateTiledPlane({ pattern: i, tileWidth: l, tileHeight: u, width: r, height: o, alignVertical: d, alignHorizontal: h, sideOrientation: p }); + for (f = 2; f < 4; f++) _[f] = Rn.a.CreateTiledPlane({ pattern: i, tileWidth: l, tileHeight: u, width: c, height: o, alignVertical: d, alignHorizontal: h, sideOrientation: p }); + var v = d; + d === Ee.a.BOTTOM ? (v = Ee.a.TOP) : d === Ee.a.TOP && (v = Ee.a.BOTTOM); + for (f = 4; f < 6; f++) _[f] = Rn.a.CreateTiledPlane({ pattern: i, tileWidth: l, tileHeight: u, width: r, height: c, alignVertical: v, alignHorizontal: h, sideOrientation: p }); + var y = [], + C = [], + P = [], + x = [], + T = [], + S = [], + O = [], + E = [], + M = 0, + A = 0, + I = 0; + for (f = 0; f < 6; f++) { + M = _[f].positions.length; + (S[f] = []), (O[f] = []); + for (var D = 0; D < M / 3; D++) S[f].push(new a.e(_[f].positions[3 * D], _[f].positions[3 * D + 1], _[f].positions[3 * D + 2])), O[f].push(new a.e(_[f].normals[3 * D], _[f].normals[3 * D + 1], _[f].normals[3 * D + 2])); + (A = _[f].uvs.length), (E[f] = []); + for (var R = 0; R < A; R += 2) (E[f][R] = t[f].x + (t[f].z - t[f].x) * _[f].uvs[R]), (E[f][R + 1] = t[f].y + (t[f].w - t[f].y) * _[f].uvs[R + 1]); + if ( + ((P = P.concat(E[f])), + (x = x.concat( + _[f].indices.map(function (e) { + return e + I; + }) + )), + (I += S[f].length), + n) + ) + for (var w = 0; w < 4; w++) T.push(n[f].r, n[f].g, n[f].b, n[f].a); + } + var L = new a.e(0, 0, b), + F = a.a.RotationY(Math.PI); + (y = S[0] + .map(function (e) { + return a.e.TransformNormal(e, F).add(L); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, [])), + (C = O[0] + .map(function (e) { + return a.e.TransformNormal(e, F); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, [])), + (y = y.concat( + S[1] + .map(function (e) { + return e.subtract(L); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + (C = C.concat( + O[1] + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )); + var N = new a.e(m, 0, 0), + k = a.a.RotationY(-Math.PI / 2); + (y = y.concat( + S[2] + .map(function (e) { + return a.e.TransformNormal(e, k).add(N); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + (C = C.concat( + O[2] + .map(function (e) { + return a.e.TransformNormal(e, k); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )); + var z = a.a.RotationY(Math.PI / 2); + (y = y.concat( + S[3] + .map(function (e) { + return a.e.TransformNormal(e, z).subtract(N); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + (C = C.concat( + O[3] + .map(function (e) { + return a.e.TransformNormal(e, z); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )); + var j = new a.e(0, g, 0), + B = a.a.RotationX(Math.PI / 2); + (y = y.concat( + S[4] + .map(function (e) { + return a.e.TransformNormal(e, B).add(j); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + (C = C.concat( + O[4] + .map(function (e) { + return a.e.TransformNormal(e, B); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )); + var V = a.a.RotationX(-Math.PI / 2); + (y = y.concat( + S[5] + .map(function (e) { + return a.e.TransformNormal(e, V).subtract(j); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + (C = C.concat( + O[5] + .map(function (e) { + return a.e.TransformNormal(e, V); + }) + .map(function (e) { + return [e.x, e.y, e.z]; + }) + .reduce(function (e, t) { + return e.concat(t); + }, []) + )), + Rn.a._ComputeSides(p, y, x, C, P); + var G = new Rn.a(); + if (((G.indices = x), (G.positions = y), (G.normals = C), (G.uvs = P), n)) { + var U = p === Rn.a.DOUBLESIDE ? T.concat(T) : T; + G.colors = U; + } + return G; + }; + var rl = (function () { + function e() {} + return ( + (e.CreateTiledBox = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateTiledBox(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + (Rn.a.CreateTorusKnot = function (e) { + var t, + n, + i = new Array(), + r = new Array(), + o = new Array(), + s = new Array(), + c = e.radius || 2, + l = e.tube || 0.5, + u = e.radialSegments || 32, + h = e.tubularSegments || 32, + d = e.p || 2, + p = e.q || 3, + f = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE, + m = function (e) { + var t = Math.cos(e), + n = Math.sin(e), + i = (p / d) * e, + r = Math.cos(i), + o = c * (2 + r) * 0.5 * t, + s = c * (2 + r) * n * 0.5, + l = c * Math.sin(i) * 0.5; + return new a.e(o, s, l); + }; + for (t = 0; t <= u; t++) { + var g = ((t % u) / u) * 2 * d * Math.PI, + b = m(g), + _ = m(g + 0.01), + v = _.subtract(b), + y = _.add(b), + C = a.e.Cross(v, y); + for (y = a.e.Cross(C, v), C.normalize(), y.normalize(), n = 0; n < h; n++) { + var P = ((n % h) / h) * 2 * Math.PI, + x = -l * Math.cos(P), + T = l * Math.sin(P); + r.push(b.x + x * y.x + T * C.x), r.push(b.y + x * y.y + T * C.y), r.push(b.z + x * y.z + T * C.z), s.push(t / u), s.push(n / h); + } + } + for (t = 0; t < u; t++) + for (n = 0; n < h; n++) { + var S = (n + 1) % h, + O = t * h + n, + E = (t + 1) * h + n, + M = (t + 1) * h + S, + A = t * h + S; + i.push(A), i.push(E), i.push(O), i.push(A), i.push(M), i.push(E); + } + Rn.a.ComputeNormals(r, i, o), Rn.a._ComputeSides(f, r, i, o, s, e.frontUVs, e.backUVs); + var I = new Rn.a(); + return (I.indices = i), (I.positions = r), (I.normals = o), (I.uvs = s), I; + }), + (Ee.a.CreateTorusKnot = function (e, t, n, i, r, o, a, s, c, l) { + var u = { radius: t, tube: n, radialSegments: i, tubularSegments: r, p: o, q: a, sideOrientation: l, updatable: c }; + return ol.CreateTorusKnot(e, u, s); + }); + var ol = (function () { + function e() {} + return ( + (e.CreateTorusKnot = function (e, t, n) { + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateTorusKnot(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(), + al = (function (e) { + function t(t, n) { + var i = e.call(this, t.x, t.y) || this; + return (i.index = n), i; + } + return Object(h.d)(t, e), t; + })(a.d), + sl = (function () { + function e() { + this.elements = new Array(); + } + return ( + (e.prototype.add = function (e) { + var t = this, + n = new Array(); + return ( + e.forEach(function (e) { + if (0 === n.length || !e.equalsWithEpsilon(n[0])) { + var i = new al(e, t.elements.length); + n.push(i), t.elements.push(i); + } + }), + n + ); + }), + (e.prototype.computeBounds = function () { + var e = new a.d(this.elements[0].x, this.elements[0].y), + t = new a.d(this.elements[0].x, this.elements[0].y); + return ( + this.elements.forEach(function (n) { + n.x < e.x ? (e.x = n.x) : n.x > t.x && (t.x = n.x), n.y < e.y ? (e.y = n.y) : n.y > t.y && (t.y = n.y); + }), + { min: e, max: t, width: t.x - e.x, height: t.y - e.y } + ); + }), + e + ); + })(), + cl = (function () { + function e() {} + return ( + (e.Rectangle = function (e, t, n, i) { + return [new a.d(e, t), new a.d(n, t), new a.d(n, i), new a.d(e, i)]; + }), + (e.Circle = function (e, t, n, i) { + void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 32); + for (var r = new Array(), o = 0, s = (2 * Math.PI) / i, c = 0; c < i; c++) r.push(new a.d(t + Math.cos(o) * e, n + Math.sin(o) * e)), (o -= s); + return r; + }), + (e.Parse = function (e) { + var t, + n = e + .split(/[^-+eE\.\d]+/) + .map(parseFloat) + .filter(function (e) { + return !isNaN(e); + }), + i = []; + for (t = 0; t < (2147483646 & n.length); t += 2) i.push(new a.d(n[t], n[t + 1])); + return i; + }), + (e.StartingAt = function (e, t) { + return U.StartingAt(e, t); + }), + e + ); + })(), + ll = (function () { + function e(e, t, n, i) { + var r; + void 0 === i && (i = earcut), + (this._points = new sl()), + (this._outlinepoints = new sl()), + (this._holes = new Array()), + (this._epoints = new Array()), + (this._eholes = new Array()), + (this.bjsEarcut = i), + (this._name = e), + (this._scene = n || ue.a.LastCreatedScene), + (r = t instanceof U ? t.getPoints() : t), + this._addToepoint(r), + this._points.add(r), + this._outlinepoints.add(r), + void 0 === this.bjsEarcut && g.a.Warn("Earcut was not found, the polygon will not be built."); + } + return ( + (e.prototype._addToepoint = function (e) { + for (var t = 0, n = e; t < n.length; t++) { + var i = n[t]; + this._epoints.push(i.x, i.y); + } + }), + (e.prototype.addHole = function (e) { + this._points.add(e); + var t = new sl(); + return t.add(e), this._holes.push(t), this._eholes.push(this._epoints.length / 2), this._addToepoint(e), this; + }), + (e.prototype.build = function (e, t) { + void 0 === e && (e = !1), void 0 === t && (t = 0); + var n = new Ee.a(this._name, this._scene), + i = this.buildVertexData(t); + return n.setVerticesData(wn.b.PositionKind, i.positions, e), n.setVerticesData(wn.b.NormalKind, i.normals, e), n.setVerticesData(wn.b.UVKind, i.uvs, e), n.setIndices(i.indices), n; + }), + (e.prototype.buildVertexData = function (e) { + var t = this; + void 0 === e && (e = 0); + var n = new Rn.a(), + i = new Array(), + r = new Array(), + o = new Array(), + a = this._points.computeBounds(); + this._points.elements.forEach(function (e) { + i.push(0, 1, 0), r.push(e.x, 0, e.y), o.push((e.x - a.min.x) / a.width, (e.y - a.min.y) / a.height); + }); + for (var s = new Array(), c = this.bjsEarcut(this._epoints, this._eholes, 2), l = 0; l < c.length; l++) s.push(c[l]); + if (e > 0) { + var u = r.length / 3; + this._points.elements.forEach(function (t) { + i.push(0, -1, 0), r.push(t.x, -e, t.y), o.push(1 - (t.x - a.min.x) / a.width, 1 - (t.y - a.min.y) / a.height); + }); + var h = s.length; + for (l = 0; l < h; l += 3) { + var d = s[l + 0], + p = s[l + 1], + f = s[l + 2]; + s.push(f + u), s.push(p + u), s.push(d + u); + } + this.addSide(r, i, o, s, a, this._outlinepoints, e, !1), + this._holes.forEach(function (n) { + t.addSide(r, i, o, s, a, n, e, !0); + }); + } + return (n.indices = s), (n.positions = r), (n.normals = i), (n.uvs = o), n; + }), + (e.prototype.addSide = function (e, t, n, i, r, o, s, c) { + for (var l = e.length / 3, u = 0, h = 0; h < o.elements.length; h++) { + var d, + p = o.elements[h]; + (d = h + 1 > o.elements.length - 1 ? o.elements[0] : o.elements[h + 1]), e.push(p.x, 0, p.y), e.push(p.x, -s, p.y), e.push(d.x, 0, d.y), e.push(d.x, -s, d.y); + var f = new a.e(p.x, 0, p.y), + m = new a.e(d.x, 0, d.y).subtract(f), + g = new a.e(0, 1, 0), + b = a.e.Cross(m, g); + (b = b.normalize()), + n.push(u / r.width, 0), + n.push(u / r.width, 1), + (u += m.length()), + n.push(u / r.width, 0), + n.push(u / r.width, 1), + c + ? (t.push(b.x, b.y, b.z), t.push(b.x, b.y, b.z), t.push(b.x, b.y, b.z), t.push(b.x, b.y, b.z), i.push(l), i.push(l + 2), i.push(l + 1), i.push(l + 1), i.push(l + 2), i.push(l + 3)) + : (t.push(-b.x, -b.y, -b.z), t.push(-b.x, -b.y, -b.z), t.push(-b.x, -b.y, -b.z), t.push(-b.x, -b.y, -b.z), i.push(l), i.push(l + 1), i.push(l + 2), i.push(l + 1), i.push(l + 3), i.push(l + 2)), + (l += 4); + } + }), + e + ); + })(); + (Rn.a.CreatePolygon = function (e, t, n, i, r, o) { + for (var c = n || new Array(3), l = i, u = [], h = 0; h < 3; h++) void 0 === c[h] && (c[h] = new a.f(0, 0, 1, 1)), l && void 0 === l[h] && (l[h] = new s.b(1, 1, 1, 1)); + for (var d = e.getVerticesData(wn.b.PositionKind), p = e.getVerticesData(wn.b.NormalKind), f = e.getVerticesData(wn.b.UVKind), m = e.getIndices(), g = 0, b = 0, _ = 0; _ < p.length; _ += 3) + Math.abs(p[_ + 1]) < 0.001 && (b = 1), + Math.abs(p[_ + 1] - 1) < 0.001 && (b = 0), + Math.abs(p[_ + 1] + 1) < 0.001 && (b = 2), + (f[2 * (g = _ / 3)] = (1 - f[2 * g]) * c[b].x + f[2 * g] * c[b].z), + (f[2 * g + 1] = (1 - f[2 * g + 1]) * c[b].y + f[2 * g + 1] * c[b].w), + l && u.push(l[b].r, l[b].g, l[b].b, l[b].a); + Rn.a._ComputeSides(t, d, m, p, f, r, o); + var v = new Rn.a(); + if (((v.indices = m), (v.positions = d), (v.normals = p), (v.uvs = f), l)) { + var y = t === Rn.a.DOUBLESIDE ? u.concat(u) : u; + v.colors = y; + } + return v; + }), + (Ee.a.CreatePolygon = function (e, t, n, i, r, o, a) { + void 0 === a && (a = earcut); + var s = { shape: t, holes: i, updatable: r, sideOrientation: o }; + return ul.CreatePolygon(e, s, n, a); + }), + (Ee.a.ExtrudePolygon = function (e, t, n, i, r, o, a, s) { + void 0 === s && (s = earcut); + var c = { shape: t, holes: r, depth: n, updatable: o, sideOrientation: a }; + return ul.ExtrudePolygon(e, c, i, s); + }); + var ul = (function () { + function e() {} + return ( + (e.CreatePolygon = function (e, t, n, i) { + void 0 === n && (n = null), void 0 === i && (i = earcut), (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)); + for (var r = t.shape, o = t.holes || [], s = t.depth || 0, c = [], l = [], u = 0; u < r.length; u++) c[u] = new a.d(r[u].x, r[u].z); + c[0].equalsWithEpsilon(c[c.length - 1], 1e-8) && c.pop(); + for (var h = new ll(e, c, n || E.a.LastCreatedScene, i), d = 0; d < o.length; d++) { + l = []; + for (var p = 0; p < o[d].length; p++) l.push(new a.d(o[d][p].x, o[d][p].z)); + h.addHole(l); + } + var f = h.build(t.updatable, s); + return (f._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreatePolygon(f, t.sideOrientation, t.faceUV, t.faceColors, t.frontUVs, t.backUVs).applyToMesh(f, t.updatable), f; + }), + (e.ExtrudePolygon = function (t, n, i, r) { + return void 0 === i && (i = null), void 0 === r && (r = earcut), e.CreatePolygon(t, n, i, r); + }), + e + ); + })(); + Ee.a.CreateLathe = function (e, t, n, i, r, o, a) { + var s = { shape: t, radius: n, tessellation: i, sideOrientation: a, updatable: o }; + return hl.CreateLathe(e, s, r); + }; + var hl = (function () { + function e() {} + return ( + (e.CreateLathe = function (e, t, n) { + void 0 === n && (n = null); + var i, + r = t.arc ? (t.arc <= 0 || t.arc > 1 ? 1 : t.arc) : 1, + o = void 0 === t.closed || t.closed, + s = t.shape, + c = t.radius || 1, + l = t.tessellation || 64, + u = t.clip || 0, + h = t.updatable, + d = Ee.a._GetDefaultSideOrientation(t.sideOrientation), + p = t.cap || Ee.a.NO_CAP, + f = 2 * Math.PI, + m = new Array(), + g = t.invertUV || !1, + b = 0, + _ = 0, + v = (f / l) * r, + y = new Array(); + for (b = 0; b <= l - u; b++) { + y = []; + for ((p != Ee.a.CAP_START && p != Ee.a.CAP_ALL) || (y.push(new a.e(0, s[0].y, 0)), y.push(new a.e(Math.cos(b * v) * s[0].x * c, s[0].y, Math.sin(b * v) * s[0].x * c))), _ = 0; _ < s.length; _++) + (i = new a.e(Math.cos(b * v) * s[_].x * c, s[_].y, Math.sin(b * v) * s[_].x * c)), y.push(i); + (p != Ee.a.CAP_END && p != Ee.a.CAP_ALL) || (y.push(new a.e(Math.cos(b * v) * s[s.length - 1].x * c, s[s.length - 1].y, Math.sin(b * v) * s[s.length - 1].x * c)), y.push(new a.e(0, s[s.length - 1].y, 0))), m.push(y); + } + return wa.CreateRibbon(e, { pathArray: m, closeArray: o, sideOrientation: d, updatable: h, invertUV: g, frontUVs: t.frontUVs, backUVs: t.backUVs }, n); + }), + e + ); + })(); + Rn.a.CreateTiledPlane = function (e) { + var t = e.pattern || Ee.a.NO_FLIP, + n = e.tileWidth || e.tileSize || 1, + i = e.tileHeight || e.tileSize || 1, + r = e.alignHorizontal || 0, + o = e.alignVertical || 0, + a = e.width || e.size || 1, + s = Math.floor(a / n), + c = a - s * n, + l = e.height || e.size || 1, + u = Math.floor(l / i), + h = l - u * i, + d = (n * s) / 2, + p = (i * u) / 2, + f = 0, + m = 0, + g = 0, + b = 0, + _ = 0, + v = 0; + if (c > 0 || h > 0) { + (g = -d), (b = -p); + (_ = d), (v = p); + switch (r) { + case Ee.a.CENTER: + (g -= c /= 2), (_ += c); + break; + case Ee.a.LEFT: + (_ += c), (f = -c / 2); + break; + case Ee.a.RIGHT: + (g -= c), (f = c / 2); + } + switch (o) { + case Ee.a.CENTER: + (b -= h /= 2), (v += h); + break; + case Ee.a.BOTTOM: + (v += h), (m = -h / 2); + break; + case Ee.a.TOP: + (b -= h), (m = h / 2); + } + } + var y = [], + C = [], + P = []; + (P[0] = [0, 0, 1, 0, 1, 1, 0, 1]), + (P[1] = [0, 0, 1, 0, 1, 1, 0, 1]), + (t !== Ee.a.ROTATE_TILE && t !== Ee.a.ROTATE_ROW) || (P[1] = [1, 1, 0, 1, 0, 0, 1, 0]), + (t !== Ee.a.FLIP_TILE && t !== Ee.a.FLIP_ROW) || (P[1] = [1, 0, 0, 0, 0, 1, 1, 1]), + (t !== Ee.a.FLIP_N_ROTATE_TILE && t !== Ee.a.FLIP_N_ROTATE_ROW) || (P[1] = [0, 1, 1, 1, 1, 0, 0, 0]); + for (var x = [], T = [], S = [], O = 0, E = 0; E < u; E++) + for (var M = 0; M < s; M++) + y.push(M * n - d + f, E * i - p + m, 0), + y.push((M + 1) * n - d + f, E * i - p + m, 0), + y.push((M + 1) * n - d + f, (E + 1) * i - p + m, 0), + y.push(M * n - d + f, (E + 1) * i - p + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (x = + t === Ee.a.FLIP_TILE || t === Ee.a.ROTATE_TILE || t === Ee.a.FLIP_N_ROTATE_TILE + ? x.concat(P[((M % 2) + (E % 2)) % 2]) + : t === Ee.a.FLIP_ROW || t === Ee.a.ROTATE_ROW || t === Ee.a.FLIP_N_ROTATE_ROW + ? x.concat(P[E % 2]) + : x.concat(P[0])), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1), + (O += 4); + if (c > 0 || h > 0) { + var A, + I, + D, + R, + w = h > 0 && (o === Ee.a.CENTER || o === Ee.a.TOP), + L = h > 0 && (o === Ee.a.CENTER || o === Ee.a.BOTTOM), + F = c > 0 && (r === Ee.a.CENTER || r === Ee.a.RIGHT), + N = c > 0 && (r === Ee.a.CENTER || r === Ee.a.LEFT), + k = []; + if ( + (w && + F && + (y.push(g + f, b + m, 0), + y.push(-d + f, b + m, 0), + y.push(-d + f, b + h + m, 0), + y.push(g + f, b + h + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (k = [(A = 1 - c / n), (I = 1 - h / i), (D = 1), I, D, (R = 1), A, R]), + t === Ee.a.ROTATE_ROW && (k = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + t === Ee.a.FLIP_ROW && (k = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + t === Ee.a.FLIP_N_ROTATE_ROW && (k = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]), + (x = x.concat(k)), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1)), + w && + N && + (y.push(d + f, b + m, 0), + y.push(_ + f, b + m, 0), + y.push(_ + f, b + h + m, 0), + y.push(d + f, b + h + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (k = [(A = 0), (I = 1 - h / i), (D = c / n), I, D, (R = 1), A, R]), + (t === Ee.a.ROTATE_ROW || (t === Ee.a.ROTATE_TILE && s % 2 == 0)) && (k = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + (t === Ee.a.FLIP_ROW || (t === Ee.a.FLIP_TILE && s % 2 == 0)) && (k = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + (t === Ee.a.FLIP_N_ROTATE_ROW || (t === Ee.a.FLIP_N_ROTATE_TILE && s % 2 == 0)) && (k = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]), + (x = x.concat(k)), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1)), + L && + F && + (y.push(g + f, p + m, 0), + y.push(-d + f, p + m, 0), + y.push(-d + f, v + m, 0), + y.push(g + f, v + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (k = [(A = 1 - c / n), (I = 0), (D = 1), I, D, (R = h / i), A, R]), + ((t === Ee.a.ROTATE_ROW && u % 2 == 1) || (t === Ee.a.ROTATE_TILE && u % 1 == 0)) && (k = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + ((t === Ee.a.FLIP_ROW && u % 2 == 1) || (t === Ee.a.FLIP_TILE && u % 2 == 0)) && (k = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + ((t === Ee.a.FLIP_N_ROTATE_ROW && u % 2 == 1) || (t === Ee.a.FLIP_N_ROTATE_TILE && u % 2 == 0)) && (k = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]), + (x = x.concat(k)), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1)), + L && + N && + (y.push(d + f, p + m, 0), + y.push(_ + f, p + m, 0), + y.push(_ + f, v + m, 0), + y.push(d + f, v + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (k = [(A = 0), (I = 0), (D = c / n), I, D, (R = h / i), A, R]), + ((t === Ee.a.ROTATE_ROW && u % 2 == 1) || (t === Ee.a.ROTATE_TILE && (u + s) % 2 == 1)) && (k = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + ((t === Ee.a.FLIP_ROW && u % 2 == 1) || (t === Ee.a.FLIP_TILE && (u + s) % 2 == 1)) && (k = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + ((t === Ee.a.FLIP_N_ROTATE_ROW && u % 2 == 1) || (t === Ee.a.FLIP_N_ROTATE_TILE && (u + s) % 2 == 1)) && (k = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]), + (x = x.concat(k)), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1)), + w) + ) { + var z = []; + (A = 0), + (I = 1 - h / i), + (D = 1), + (R = 1), + (z[0] = [A, I, D, I, D, R, A, R]), + (z[1] = [A, I, D, I, D, R, A, R]), + (t !== Ee.a.ROTATE_TILE && t !== Ee.a.ROTATE_ROW) || (z[1] = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + (t !== Ee.a.FLIP_TILE && t !== Ee.a.FLIP_ROW) || (z[1] = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + (t !== Ee.a.FLIP_N_ROTATE_TILE && t !== Ee.a.FLIP_N_ROTATE_ROW) || (z[1] = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]); + for (M = 0; M < s; M++) + y.push(M * n - d + f, b + m, 0), + y.push((M + 1) * n - d + f, b + m, 0), + y.push((M + 1) * n - d + f, b + h + m, 0), + y.push(M * n - d + f, b + h + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (x = + t === Ee.a.FLIP_TILE || t === Ee.a.ROTATE_TILE || t === Ee.a.FLIP_N_ROTATE_TILE + ? x.concat(z[(M + 1) % 2]) + : t === Ee.a.FLIP_ROW || t === Ee.a.ROTATE_ROW || t === Ee.a.FLIP_N_ROTATE_ROW + ? x.concat(z[1]) + : x.concat(z[0])), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1); + } + if (L) { + var j = []; + (A = 0), + (I = 0), + (D = 1), + (R = h / i), + (j[0] = [A, I, D, I, D, R, A, R]), + (j[1] = [A, I, D, I, D, R, A, R]), + (t !== Ee.a.ROTATE_TILE && t !== Ee.a.ROTATE_ROW) || (j[1] = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + (t !== Ee.a.FLIP_TILE && t !== Ee.a.FLIP_ROW) || (j[1] = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + (t !== Ee.a.FLIP_N_ROTATE_TILE && t !== Ee.a.FLIP_N_ROTATE_ROW) || (j[1] = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]); + for (M = 0; M < s; M++) + y.push(M * n - d + f, v - h + m, 0), + y.push((M + 1) * n - d + f, v - h + m, 0), + y.push((M + 1) * n - d + f, v + m, 0), + y.push(M * n - d + f, v + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (x = + t === Ee.a.FLIP_TILE || t === Ee.a.ROTATE_TILE || t === Ee.a.FLIP_N_ROTATE_TILE + ? x.concat(j[(M + u) % 2]) + : t === Ee.a.FLIP_ROW || t === Ee.a.ROTATE_ROW || t === Ee.a.FLIP_N_ROTATE_ROW + ? x.concat(j[u % 2]) + : x.concat(j[0])), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1); + } + if (F) { + var B = []; + (A = 1 - c / n), + (I = 0), + (D = 1), + (R = 1), + (B[0] = [A, I, D, I, D, R, A, R]), + (B[1] = [A, I, D, I, D, R, A, R]), + (t !== Ee.a.ROTATE_TILE && t !== Ee.a.ROTATE_ROW) || (B[1] = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + (t !== Ee.a.FLIP_TILE && t !== Ee.a.FLIP_ROW) || (B[1] = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + (t !== Ee.a.FLIP_N_ROTATE_TILE && t !== Ee.a.FLIP_N_ROTATE_ROW) || (B[1] = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]); + for (E = 0; E < u; E++) + y.push(g + f, E * i - p + m, 0), + y.push(g + c + f, E * i - p + m, 0), + y.push(g + c + f, (E + 1) * i - p + m, 0), + y.push(g + f, (E + 1) * i - p + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (x = + t === Ee.a.FLIP_TILE || t === Ee.a.ROTATE_TILE || t === Ee.a.FLIP_N_ROTATE_TILE + ? x.concat(B[(E + 1) % 2]) + : t === Ee.a.FLIP_ROW || t === Ee.a.ROTATE_ROW || t === Ee.a.FLIP_N_ROTATE_ROW + ? x.concat(B[E % 2]) + : x.concat(B[0])), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1); + } + if (N) { + var V = []; + (A = 0), + (I = 0), + (D = c / i), + (R = 1), + (V[0] = [A, I, D, I, D, R, A, R]), + (V[1] = [A, I, D, I, D, R, A, R]), + (t !== Ee.a.ROTATE_TILE && t !== Ee.a.ROTATE_ROW) || (V[1] = [1 - A, 1 - I, 1 - D, 1 - I, 1 - D, 1 - R, 1 - A, 1 - R]), + (t !== Ee.a.FLIP_TILE && t !== Ee.a.FLIP_ROW) || (V[1] = [1 - A, I, 1 - D, I, 1 - D, R, 1 - A, R]), + (t !== Ee.a.FLIP_N_ROTATE_TILE && t !== Ee.a.FLIP_N_ROTATE_ROW) || (V[1] = [A, 1 - I, D, 1 - I, D, 1 - R, A, 1 - R]); + for (E = 0; E < u; E++) + y.push(_ - c + f, E * i - p + m, 0), + y.push(_ + f, E * i - p + m, 0), + y.push(_ + f, (E + 1) * i - p + m, 0), + y.push(_ - c + f, (E + 1) * i - p + m, 0), + S.push(O, O + 1, O + 3, O + 1, O + 2, O + 3), + (O += 4), + (x = + t === Ee.a.FLIP_TILE || t === Ee.a.ROTATE_TILE || t === Ee.a.FLIP_N_ROTATE_TILE + ? x.concat(V[(E + s) % 2]) + : t === Ee.a.FLIP_ROW || t === Ee.a.ROTATE_ROW || t === Ee.a.FLIP_N_ROTATE_ROW + ? x.concat(V[E % 2]) + : x.concat(V[0])), + T.push(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), + C.push(0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1); + } + } + var G = 0 === e.sideOrientation ? 0 : e.sideOrientation || Rn.a.DEFAULTSIDE; + Rn.a._ComputeSides(G, y, S, C, x, e.frontUVs, e.backUVs); + var U = new Rn.a(); + (U.indices = S), (U.positions = y), (U.normals = C), (U.uvs = x); + var H = G === Rn.a.DOUBLESIDE ? T.concat(T) : T; + return (U.colors = H), U; + }; + var dl = (function () { + function e() {} + return ( + (e.CreateTiledPlane = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateTiledPlane(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + Ee.a.CreateTube = function (e, t, n, i, r, o, a, s, c, l) { + var u = { path: t, radius: n, tessellation: i, radiusFunction: r, arc: 1, cap: o, updatable: s, sideOrientation: c, instance: l }; + return pl.CreateTube(e, u, a); + }; + var pl = (function () { + function e() {} + return ( + (e.CreateTube = function (e, t, n) { + void 0 === n && (n = null); + var i = t.path, + r = t.instance, + o = 1; + void 0 !== t.radius ? (o = t.radius) : r && (o = r._creationDataStorage.radius); + var s = t.tessellation || 64, + c = t.radiusFunction || null, + l = t.cap || Ee.a.NO_CAP, + u = t.invertUV || !1, + h = t.updatable, + d = Ee.a._GetDefaultSideOrientation(t.sideOrientation); + t.arc = t.arc && (t.arc <= 0 || t.arc > 1) ? 1 : t.arc || 1; + var p, + f, + m = function (e, t, n, i, r, o, s, c) { + for ( + var l, + u, + h, + d, + p = t.getTangents(), + f = t.getNormals(), + m = t.getDistances(), + g = ((2 * Math.PI) / r) * c, + b = + o || + function () { + return i; + }, + _ = a.c.Matrix[0], + v = s === Ee.a.NO_CAP || s === Ee.a.CAP_END ? 0 : 2, + y = 0; + y < e.length; + y++ + ) { + (u = b(y, m[y])), (l = Array()), (h = f[y]); + for (var C = 0; C < r; C++) a.a.RotationAxisToRef(p[y], g * C, _), (d = l[C] ? l[C] : a.e.Zero()), a.e.TransformCoordinatesToRef(h, _, d), d.scaleInPlace(u).addInPlace(e[y]), (l[C] = d); + (n[v] = l), v++; + } + var P = function (t, n) { + for (var i = Array(), r = 0; r < t; r++) i.push(e[n]); + return i; + }; + switch (s) { + case Ee.a.NO_CAP: + break; + case Ee.a.CAP_START: + (n[0] = P(r, 0)), (n[1] = n[2].slice(0)); + break; + case Ee.a.CAP_END: + (n[v] = n[v - 1].slice(0)), (n[v + 1] = P(r, e.length - 1)); + break; + case Ee.a.CAP_ALL: + (n[0] = P(r, 0)), (n[1] = n[2].slice(0)), (n[v] = n[v - 1].slice(0)), (n[v + 1] = P(r, e.length - 1)); + } + return n; + }; + if (r) { + var g = r._creationDataStorage, + b = t.arc || g.arc; + return (f = m(i, (p = g.path3D.update(i)), g.pathArray, o, g.tessellation, c, g.cap, b)), (r = wa.CreateRibbon("", { pathArray: f, instance: r })), (g.path3D = p), (g.pathArray = f), (g.arc = b), (g.radius = o), r; + } + f = m(i, (p = new H(i)), new Array(), o, s, c, (l = l < 0 || l > 3 ? 0 : l), t.arc); + var _ = wa.CreateRibbon(e, { pathArray: f, closePath: !0, closeArray: !1, updatable: h, sideOrientation: d, invertUV: u, frontUVs: t.frontUVs, backUVs: t.backUVs }, n); + return ( + (_._creationDataStorage.pathArray = f), + (_._creationDataStorage.path3D = p), + (_._creationDataStorage.tessellation = s), + (_._creationDataStorage.cap = l), + (_._creationDataStorage.arc = t.arc), + (_._creationDataStorage.radius = o), + _ + ); + }), + e + ); + })(); + (Rn.a.CreateIcoSphere = function (e) { + var t, + n = e.sideOrientation || Rn.a.DEFAULTSIDE, + i = e.radius || 1, + r = void 0 === e.flat || e.flat, + o = e.subdivisions || 4, + s = e.radiusX || i, + c = e.radiusY || i, + l = e.radiusZ || i, + u = (1 + Math.sqrt(5)) / 2, + h = [-1, u, -0, 1, u, 0, -1, -u, 0, 1, -u, 0, 0, -1, -u, 0, 1, -u, 0, -1, u, 0, 1, u, u, 0, 1, u, 0, -1, -u, 0, 1, -u, 0, -1], + d = [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 12, 22, 23, 1, 5, 20, 5, 11, 4, 23, 22, 13, 22, 18, 6, 7, 1, 8, 14, 21, 4, 14, 4, 2, 16, 13, 6, 15, 6, 19, 3, 8, 9, 4, 21, 5, 13, 17, 23, 6, 13, 22, 19, 6, 18, 9, 8, 1], + p = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 2, 3, 3, 3, 4, 7, 8, 9, 9, 10, 11], + f = [5, 1, 3, 1, 6, 4, 0, 0, 5, 3, 4, 2, 2, 2, 4, 0, 2, 0, 1, 1, 6, 0, 6, 2, 0, 4, 3, 3, 4, 4, 3, 1, 4, 2, 4, 4, 0, 2, 1, 1, 2, 2, 3, 3, 1, 3, 2, 4], + m = [0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0], + g = new Array(), + b = new Array(), + _ = new Array(), + v = new Array(), + y = 0, + C = new Array(3), + P = new Array(3); + for (t = 0; t < 3; t++) (C[t] = a.e.Zero()), (P[t] = a.d.Zero()); + for (var x = 0; x < 20; x++) { + for (t = 0; t < 3; t++) { + var T = d[3 * x + t]; + C[t].copyFromFloats(h[3 * p[T]], h[3 * p[T] + 1], h[3 * p[T] + 2]), + C[t].normalize().scaleInPlace(i), + P[t].copyFromFloats(f[2 * T] * (138 / 1024) + 60 / 1024 + m[x] * (-40 / 1024), f[2 * T + 1] * (239 / 1024) + 26 / 1024 + m[x] * (20 / 1024)); + } + for ( + var S = function (e, t, n, i) { + var u, + h = a.e.Lerp(C[0], C[2], t / o), + d = a.e.Lerp(C[1], C[2], t / o), + p = o === t ? C[2] : a.e.Lerp(h, d, e / (o - t)); + if ((p.normalize(), r)) { + var f = a.e.Lerp(C[0], C[2], i / o), + m = a.e.Lerp(C[1], C[2], i / o); + u = a.e.Lerp(f, m, n / (o - i)); + } else u = new a.e(p.x, p.y, p.z); + (u.x /= s), (u.y /= c), (u.z /= l), u.normalize(); + var x = a.d.Lerp(P[0], P[2], t / o), + T = a.d.Lerp(P[1], P[2], t / o), + S = o === t ? P[2] : a.d.Lerp(x, T, e / (o - t)); + b.push(p.x * s, p.y * c, p.z * l), _.push(u.x, u.y, u.z), v.push(S.x, S.y), g.push(y), y++; + }, + O = 0; + O < o; + O++ + ) + for (var E = 0; E + O < o; E++) + S(E, O, E + 1 / 3, O + 1 / 3), + S(E + 1, O, E + 1 / 3, O + 1 / 3), + S(E, O + 1, E + 1 / 3, O + 1 / 3), + E + O + 1 < o && (S(E + 1, O, E + 2 / 3, O + 2 / 3), S(E + 1, O + 1, E + 2 / 3, O + 2 / 3), S(E, O + 1, E + 2 / 3, O + 2 / 3)); + } + Rn.a._ComputeSides(n, b, g, _, v, e.frontUVs, e.backUVs); + var M = new Rn.a(); + return (M.indices = g), (M.positions = b), (M.normals = _), (M.uvs = v), M; + }), + (Ee.a.CreateIcoSphere = function (e, t, n) { + return fl.CreateIcoSphere(e, t, n); + }); + var fl = (function () { + function e() {} + return ( + (e.CreateIcoSphere = function (e, t, n) { + void 0 === n && (n = null); + var i = new Ee.a(e, n); + return (t.sideOrientation = Ee.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), Rn.a.CreateIcoSphere(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + Ee.a.CreateDecal = function (e, t, n, i, r, o) { + var a = { position: n, normal: i, size: r, angle: o }; + return gl.CreateDecal(e, t, a); + }; + var ml, + gl = (function () { + function e() {} + return ( + (e.CreateDecal = function (e, t, n) { + var i = t.getIndices(), + r = t.getVerticesData(wn.b.PositionKind), + o = t.getVerticesData(wn.b.NormalKind), + s = n.position || a.e.Zero(), + c = n.normal || a.e.Up(), + l = n.size || a.e.One(), + u = n.angle || 0; + if (!c) { + var h = new a.e(0, 0, 1), + d = t.getScene().activeCamera, + p = a.e.TransformCoordinates(h, d.getWorldMatrix()); + c = d.globalPosition.subtract(p); + } + var f = -Math.atan2(c.z, c.x) - Math.PI / 2, + m = Math.sqrt(c.x * c.x + c.z * c.z), + g = Math.atan2(c.y, m), + b = a.a.RotationYawPitchRoll(f, g, u).multiply(a.a.Translation(s.x, s.y, s.z)), + _ = a.a.Invert(b), + v = t.getWorldMatrix().multiply(_), + y = new Rn.a(); + (y.indices = []), (y.positions = []), (y.normals = []), (y.uvs = []); + for ( + var C = 0, + P = function (e) { + var t = new Ao(); + if (!i || !r || !o) return t; + var n = i[e]; + return ( + (t.position = new a.e(r[3 * n], r[3 * n + 1], r[3 * n + 2])), + (t.position = a.e.TransformCoordinates(t.position, v)), + (t.normal = new a.e(o[3 * n], o[3 * n + 1], o[3 * n + 2])), + (t.normal = a.e.TransformNormal(t.normal, v)), + t + ); + }, + x = function (e, t) { + if (0 === e.length) return e; + for ( + var n = 0.5 * Math.abs(a.e.Dot(l, t)), + i = function (e, i) { + var r = a.e.GetClipFactor(e.position, i.position, t, n); + return new Ao(a.e.Lerp(e.position, i.position, r), a.e.Lerp(e.normal, i.normal, r)); + }, + r = new Array(), + o = 0; + o < e.length; + o += 3 + ) { + var s, + c, + u, + h = null, + d = null, + p = null, + f = null; + switch (((s = a.e.Dot(e[o].position, t) - n > 0) ? 1 : 0) + ((c = a.e.Dot(e[o + 1].position, t) - n > 0) ? 1 : 0) + ((u = a.e.Dot(e[o + 2].position, t) - n > 0) ? 1 : 0)) { + case 0: + r.push(e[o]), r.push(e[o + 1]), r.push(e[o + 2]); + break; + case 1: + if ((s && ((h = e[o + 1]), (d = e[o + 2]), (p = i(e[o], h)), (f = i(e[o], d))), c)) { + (h = e[o]), (d = e[o + 2]), (p = i(e[o + 1], h)), (f = i(e[o + 1], d)), r.push(p), r.push(d.clone()), r.push(h.clone()), r.push(d.clone()), r.push(p.clone()), r.push(f); + break; + } + u && ((h = e[o]), (d = e[o + 1]), (p = i(e[o + 2], h)), (f = i(e[o + 2], d))), + h && d && p && f && (r.push(h.clone()), r.push(d.clone()), r.push(p), r.push(f), r.push(p.clone()), r.push(d.clone())); + break; + case 2: + s || ((d = i((h = e[o].clone()), e[o + 1])), (p = i(h, e[o + 2])), r.push(h), r.push(d), r.push(p)), + c || ((d = i((h = e[o + 1].clone()), e[o + 2])), (p = i(h, e[o])), r.push(h), r.push(d), r.push(p)), + u || ((d = i((h = e[o + 2].clone()), e[o])), (p = i(h, e[o + 1])), r.push(h), r.push(d), r.push(p)); + } + } + return r; + }, + T = 0; + T < i.length; + T += 3 + ) { + var S = new Array(); + if ( + (S.push(P(T)), + S.push(P(T + 1)), + S.push(P(T + 2)), + (S = x(S, new a.e(1, 0, 0))), + (S = x(S, new a.e(-1, 0, 0))), + (S = x(S, new a.e(0, 1, 0))), + (S = x(S, new a.e(0, -1, 0))), + (S = x(S, new a.e(0, 0, 1))), + 0 !== (S = x(S, new a.e(0, 0, -1))).length) + ) + for (var O = 0; O < S.length; O++) { + var E = S[O]; + y.indices.push(C), E.position.toArray(y.positions, 3 * C), E.normal.toArray(y.normals, 3 * C), y.uvs.push(0.5 + E.position.x / l.x), y.uvs.push(0.5 + E.position.y / l.y), C++; + } + } + var M = new Ee.a(e, t.getScene()); + return y.applyToMesh(M), (M.position = s.clone()), (M.rotation = new a.e(g, f, u)), M; + }), + e + ); + })(), + bl = (function () { + function e() {} + return ( + (e.CreateBox = function (e, t, n) { + return void 0 === n && (n = null), fi.a.CreateBox(e, t, n); + }), + (e.CreateTiledBox = function (e, t, n) { + return void 0 === n && (n = null), rl.CreateTiledBox(e, t, n); + }), + (e.CreateSphere = function (e, t, n) { + return void 0 === n && (n = null), mi.CreateSphere(e, t, n); + }), + (e.CreateDisc = function (e, t, n) { + return void 0 === n && (n = null), il.CreateDisc(e, t, n); + }), + (e.CreateIcoSphere = function (e, t, n) { + return void 0 === n && (n = null), fl.CreateIcoSphere(e, t, n); + }), + (e.CreateRibbon = function (e, t, n) { + return void 0 === n && (n = null), wa.CreateRibbon(e, t, n); + }), + (e.CreateCylinder = function (e, t, n) { + return void 0 === n && (n = null), jn.CreateCylinder(e, t, n); + }), + (e.CreateTorus = function (e, t, n) { + return void 0 === n && (n = null), kn.CreateTorus(e, t, n); + }), + (e.CreateTorusKnot = function (e, t, n) { + return void 0 === n && (n = null), ol.CreateTorusKnot(e, t, n); + }), + (e.CreateLineSystem = function (e, t, n) { + return Ti.CreateLineSystem(e, t, n); + }), + (e.CreateLines = function (e, t, n) { + return void 0 === n && (n = null), Ti.CreateLines(e, t, n); + }), + (e.CreateDashedLines = function (e, t, n) { + return void 0 === n && (n = null), Ti.CreateDashedLines(e, t, n); + }), + (e.ExtrudeShape = function (e, t, n) { + return void 0 === n && (n = null), La.ExtrudeShape(e, t, n); + }), + (e.ExtrudeShapeCustom = function (e, t, n) { + return void 0 === n && (n = null), La.ExtrudeShapeCustom(e, t, n); + }), + (e.CreateLathe = function (e, t, n) { + return void 0 === n && (n = null), hl.CreateLathe(e, t, n); + }), + (e.CreateTiledPlane = function (e, t, n) { + return void 0 === n && (n = null), dl.CreateTiledPlane(e, t, n); + }), + (e.CreatePlane = function (e, t, n) { + return void 0 === n && (n = null), Le.a.CreatePlane(e, t, n); + }), + (e.CreateGround = function (e, t, n) { + return void 0 === n && (n = null), Nn.CreateGround(e, t, n); + }), + (e.CreateTiledGround = function (e, t, n) { + return void 0 === n && (n = null), Nn.CreateTiledGround(e, t, n); + }), + (e.CreateGroundFromHeightMap = function (e, t, n, i) { + return void 0 === i && (i = null), Nn.CreateGroundFromHeightMap(e, t, n, i); + }), + (e.CreatePolygon = function (e, t, n, i) { + return void 0 === n && (n = null), void 0 === i && (i = earcut), ul.CreatePolygon(e, t, n, i); + }), + (e.ExtrudePolygon = function (e, t, n, i) { + return void 0 === n && (n = null), void 0 === i && (i = earcut), ul.ExtrudePolygon(e, t, n, i); + }), + (e.CreateTube = function (e, t, n) { + return void 0 === n && (n = null), pl.CreateTube(e, t, n); + }), + (e.CreatePolyhedron = function (e, t, n) { + return void 0 === n && (n = null), fr.CreatePolyhedron(e, t, n); + }), + (e.CreateDecal = function (e, t, n) { + return gl.CreateDecal(e, t, n); + }), + e + ); + })(), + _l = function (e, t, n) { + (this.quality = e), (this.distance = t), (this.optimizeMesh = n); + }, + vl = (function () { + function e() { + (this.running = !1), (this._simplificationArray = []); + } + return ( + (e.prototype.addTask = function (e) { + this._simplificationArray.push(e); + }), + (e.prototype.executeNext = function () { + var e = this._simplificationArray.pop(); + e ? ((this.running = !0), this.runSimplification(e)) : (this.running = !1); + }), + (e.prototype.runSimplification = function (e) { + var t = this; + if (e.parallelProcessing) + e.settings.forEach(function (n) { + t.getSimplifier(e).simplify(n, function (i) { + e.mesh.addLODLevel(n.distance, i), (i.isVisible = !0), n.quality === e.settings[e.settings.length - 1].quality && e.successCallback && e.successCallback(), t.executeNext(); + }); + }); + else { + var n = this.getSimplifier(e); + $e.a.Run( + e.settings.length, + function (t) { + var i, r; + (i = e.settings[t.index]), + (r = function () { + t.executeNext(); + }), + n.simplify(i, function (t) { + e.mesh.addLODLevel(i.distance, t), (t.isVisible = !0), r(); + }); + }, + function () { + e.successCallback && e.successCallback(), t.executeNext(); + } + ); + } + }), + (e.prototype.getSimplifier = function (e) { + switch (e.simplificationType) { + case ml.QUADRATIC: + default: + return new Tl(e.mesh); + } + }), + e + ); + })(); + !(function (e) { + e[(e.QUADRATIC = 0)] = "QUADRATIC"; + })(ml || (ml = {})); + var yl = function (e) { + (this.vertices = e), (this.error = new Array(4)), (this.deleted = !1), (this.isDirty = !1), (this.deletePending = !1), (this.borderFactor = 0); + }, + Cl = (function () { + function e(e, t) { + (this.position = e), (this.id = t), (this.isBorder = !0), (this.q = new Pl()), (this.triangleCount = 0), (this.triangleStart = 0), (this.originalOffsets = []); + } + return ( + (e.prototype.updatePosition = function (e) { + this.position.copyFrom(e); + }), + e + ); + })(), + Pl = (function () { + function e(e) { + this.data = new Array(10); + for (var t = 0; t < 10; ++t) e && e[t] ? (this.data[t] = e[t]) : (this.data[t] = 0); + } + return ( + (e.prototype.det = function (e, t, n, i, r, o, a, s, c) { + return ( + this.data[e] * this.data[r] * this.data[c] + + this.data[n] * this.data[i] * this.data[s] + + this.data[t] * this.data[o] * this.data[a] - + this.data[n] * this.data[r] * this.data[a] - + this.data[e] * this.data[o] * this.data[s] - + this.data[t] * this.data[i] * this.data[c] + ); + }), + (e.prototype.addInPlace = function (e) { + for (var t = 0; t < 10; ++t) this.data[t] += e.data[t]; + }), + (e.prototype.addArrayInPlace = function (e) { + for (var t = 0; t < 10; ++t) this.data[t] += e[t]; + }), + (e.prototype.add = function (t) { + for (var n = new e(), i = 0; i < 10; ++i) n.data[i] = this.data[i] + t.data[i]; + return n; + }), + (e.FromData = function (t, n, i, r) { + return new e(e.DataFromNumbers(t, n, i, r)); + }), + (e.DataFromNumbers = function (e, t, n, i) { + return [e * e, e * t, e * n, e * i, t * t, t * n, t * i, n * n, n * i, i * i]; + }), + e + ); + })(), + xl = function (e, t) { + (this.vertexId = e), (this.triangleId = t); + }, + Tl = (function () { + function e(e) { + (this._mesh = e), (this.syncIterations = 5e3), (this.aggressiveness = 7), (this.decimationIterations = 100), (this.boundingBoxEpsilon = j.a); + } + return ( + (e.prototype.simplify = function (e, t) { + var n = this; + this.initDecimatedMesh(), + $e.a.Run( + this._mesh.subMeshes.length, + function (t) { + n.initWithMesh( + t.index, + function () { + n.runDecimation(e, t.index, function () { + t.executeNext(); + }); + }, + e.optimizeMesh + ); + }, + function () { + setTimeout(function () { + t(n._reconstructedMesh); + }, 0); + } + ); + }), + (e.prototype.runDecimation = function (e, t, n) { + var i = this, + r = ~~(this.triangles.length * e.quality), + o = 0, + s = this.triangles.length; + $e.a.Run( + this.decimationIterations, + function (e) { + var t, n; + s - o <= r + ? e.breakLoop() + : ((t = e.index), + (n = function () { + e.executeNext(); + }), + setTimeout(function () { + t % 5 == 0 && i.updateMesh(0 === t); + for (var e = 0; e < i.triangles.length; ++e) i.triangles[e].isDirty = !1; + var c = 1e-9 * Math.pow(t + 3, i.aggressiveness); + $e.a.SyncAsyncForLoop( + i.triangles.length, + i.syncIterations, + function (e) { + var t = ~~((i.triangles.length / 2 + e) % i.triangles.length), + n = i.triangles[t]; + if (n && !(n.error[3] > c || n.deleted || n.isDirty)) + for (var r = 0; r < 3; ++r) + if (n.error[r] < c) { + var s = [], + l = [], + u = n.vertices[r], + h = n.vertices[(r + 1) % 3]; + if (u.isBorder || h.isBorder) continue; + var d = a.e.Zero(); + i.calculateError(u, h, d); + var p = new Array(); + if (i.isFlipped(u, h, d, s, p)) continue; + if (i.isFlipped(h, u, d, l, p)) continue; + if (s.indexOf(!0) < 0 || l.indexOf(!0) < 0) continue; + var f = new Array(); + if ( + (p.forEach(function (e) { + -1 === f.indexOf(e) && ((e.deletePending = !0), f.push(e)); + }), + f.length % 2 != 0) + ) + continue; + (u.q = h.q.add(u.q)), u.updatePosition(d); + var m = i.references.length; + (o = i.updateTriangles(u, u, s, o)), (o = i.updateTriangles(u, h, l, o)); + var g = i.references.length - m; + if (g <= u.triangleCount) { + if (g) for (var b = 0; b < g; b++) i.references[u.triangleStart + b] = i.references[m + b]; + } else u.triangleStart = m; + u.triangleCount = g; + break; + } + }, + n, + function () { + return s - o <= r; + } + ); + }, 0)); + }, + function () { + setTimeout(function () { + i.reconstructMesh(t), n(); + }, 0); + } + ); + }), + (e.prototype.initWithMesh = function (e, t, n) { + var i = this; + (this.vertices = []), (this.triangles = []); + var r = this._mesh.getVerticesData(wn.b.PositionKind), + o = this._mesh.getIndices(), + s = this._mesh.subMeshes[e], + c = [], + l = s.verticesCount; + $e.a.SyncAsyncForLoop( + l, + (this.syncIterations / 4) >> 0, + function (e) { + if (r) { + var t = e + s.verticesStart, + o = a.e.FromArray(r, 3 * t), + l = + (function (e) { + if (n) for (var t = 0; t < i.vertices.length; ++t) if (i.vertices[t].position.equals(e)) return i.vertices[t]; + return null; + })(o) || new Cl(o, i.vertices.length); + l.originalOffsets.push(t), l.id === i.vertices.length && i.vertices.push(l), c.push(l.id); + } + }, + function () { + $e.a.SyncAsyncForLoop( + s.indexCount / 3, + i.syncIterations, + function (e) { + if (o) { + var t = 3 * (s.indexStart / 3 + e), + n = o[t + 0], + r = o[t + 1], + a = o[t + 2], + l = i.vertices[c[n - s.verticesStart]], + u = i.vertices[c[r - s.verticesStart]], + h = i.vertices[c[a - s.verticesStart]], + d = new yl([l, u, h]); + (d.originalOffset = t), i.triangles.push(d); + } + }, + function () { + i.init(t); + } + ); + } + ); + }), + (e.prototype.init = function (e) { + var t = this; + $e.a.SyncAsyncForLoop( + this.triangles.length, + this.syncIterations, + function (e) { + var n = t.triangles[e]; + n.normal = a.e.Cross(n.vertices[1].position.subtract(n.vertices[0].position), n.vertices[2].position.subtract(n.vertices[0].position)).normalize(); + for (var i = 0; i < 3; i++) n.vertices[i].q.addArrayInPlace(Pl.DataFromNumbers(n.normal.x, n.normal.y, n.normal.z, -a.e.Dot(n.normal, n.vertices[0].position))); + }, + function () { + $e.a.SyncAsyncForLoop( + t.triangles.length, + t.syncIterations, + function (e) { + for (var n = t.triangles[e], i = 0; i < 3; ++i) n.error[i] = t.calculateError(n.vertices[i], n.vertices[(i + 1) % 3]); + n.error[3] = Math.min(n.error[0], n.error[1], n.error[2]); + }, + function () { + e(); + } + ); + } + ); + }), + (e.prototype.reconstructMesh = function (e) { + var t, + n, + i, + r = []; + for (t = 0; t < this.vertices.length; ++t) this.vertices[t].triangleCount = 0; + for (t = 0; t < this.triangles.length; ++t) + if (!this.triangles[t].deleted) { + for (n = this.triangles[t], i = 0; i < 3; ++i) n.vertices[i].triangleCount = 1; + r.push(n); + } + var o = this._reconstructedMesh.getVerticesData(wn.b.PositionKind) || [], + a = this._reconstructedMesh.getVerticesData(wn.b.NormalKind) || [], + s = this._reconstructedMesh.getVerticesData(wn.b.UVKind) || [], + c = this._reconstructedMesh.getVerticesData(wn.b.ColorKind) || [], + l = this._mesh.getVerticesData(wn.b.NormalKind), + u = this._mesh.getVerticesData(wn.b.UVKind), + h = this._mesh.getVerticesData(wn.b.ColorKind), + d = 0; + for (t = 0; t < this.vertices.length; ++t) { + var p = this.vertices[t]; + (p.id = d), + p.triangleCount && + p.originalOffsets.forEach(function (e) { + l && + (o.push(p.position.x), + o.push(p.position.y), + o.push(p.position.z), + a.push(l[3 * e]), + a.push(l[3 * e + 1]), + a.push(l[3 * e + 2]), + u && u.length && (s.push(u[2 * e]), s.push(u[2 * e + 1])), + h && h.length && (c.push(h[4 * e]), c.push(h[4 * e + 1]), c.push(h[4 * e + 2]), c.push(h[4 * e + 3])), + ++d); + }); + } + var f = this._reconstructedMesh.getTotalIndices(), + m = this._reconstructedMesh.getTotalVertices(), + g = this._reconstructedMesh.subMeshes; + this._reconstructedMesh.subMeshes = []; + var b = this._reconstructedMesh.getIndices(), + _ = this._mesh.getIndices(); + for (t = 0; t < r.length; ++t) + (n = r[t]), + [0, 1, 2].forEach(function (e) { + var t = _[n.originalOffset + e], + i = n.vertices[e].originalOffsets.indexOf(t); + i < 0 && (i = 0), b.push(n.vertices[e].id + i + m); + }); + this._reconstructedMesh.setIndices(b), + this._reconstructedMesh.setVerticesData(wn.b.PositionKind, o), + this._reconstructedMesh.setVerticesData(wn.b.NormalKind, a), + s.length > 0 && this._reconstructedMesh.setVerticesData(wn.b.UVKind, s), + c.length > 0 && this._reconstructedMesh.setVerticesData(wn.b.ColorKind, c); + var v = this._mesh.subMeshes[e]; + e > 0 && + ((this._reconstructedMesh.subMeshes = []), + g.forEach(function (e) { + Kc.b.AddToMesh(e.materialIndex, e.verticesStart, e.verticesCount, e.indexStart, e.indexCount, e.getMesh()); + }), + Kc.b.AddToMesh(v.materialIndex, m, d, f, 3 * r.length, this._reconstructedMesh)); + }), + (e.prototype.initDecimatedMesh = function () { + (this._reconstructedMesh = new Ee.a(this._mesh.name + "Decimated", this._mesh.getScene())), + (this._reconstructedMesh.material = this._mesh.material), + (this._reconstructedMesh.parent = this._mesh.parent), + (this._reconstructedMesh.isVisible = !1), + (this._reconstructedMesh.renderingGroupId = this._mesh.renderingGroupId); + }), + (e.prototype.isFlipped = function (e, t, n, i, r) { + for (var o = 0; o < e.triangleCount; ++o) { + var s = this.triangles[this.references[e.triangleStart + o].triangleId]; + if (!s.deleted) { + var c = this.references[e.triangleStart + o].vertexId, + l = s.vertices[(c + 1) % 3], + u = s.vertices[(c + 2) % 3]; + if (l !== t && u !== t) { + var h = l.position.subtract(n); + h = h.normalize(); + var d = u.position.subtract(n); + if (((d = d.normalize()), Math.abs(a.e.Dot(h, d)) > 0.999)) return !0; + var p = a.e.Cross(h, d).normalize(); + if (((i[o] = !1), a.e.Dot(p, s.normal) < 0.2)) return !0; + } else (i[o] = !0), r.push(s); + } + } + return !1; + }), + (e.prototype.updateTriangles = function (e, t, n, i) { + for (var r = i, o = 0; o < t.triangleCount; ++o) { + var a = this.references[t.triangleStart + o], + s = this.triangles[a.triangleId]; + s.deleted || + (n[o] && s.deletePending + ? ((s.deleted = !0), r++) + : ((s.vertices[a.vertexId] = e), + (s.isDirty = !0), + (s.error[0] = this.calculateError(s.vertices[0], s.vertices[1]) + s.borderFactor / 2), + (s.error[1] = this.calculateError(s.vertices[1], s.vertices[2]) + s.borderFactor / 2), + (s.error[2] = this.calculateError(s.vertices[2], s.vertices[0]) + s.borderFactor / 2), + (s.error[3] = Math.min(s.error[0], s.error[1], s.error[2])), + this.references.push(a))); + } + return r; + }), + (e.prototype.identifyBorder = function () { + for (var e = 0; e < this.vertices.length; ++e) { + var t, + n = [], + i = [], + r = this.vertices[e]; + for (t = 0; t < r.triangleCount; ++t) + for (var o = this.triangles[this.references[r.triangleStart + t].triangleId], a = 0; a < 3; a++) { + for (var s = 0, c = o.vertices[a]; s < n.length && i[s] !== c.id; ) ++s; + s === n.length ? (n.push(1), i.push(c.id)) : n[s]++; + } + for (t = 0; t < n.length; ++t) 1 === n[t] ? (this.vertices[i[t]].isBorder = !0) : (this.vertices[i[t]].isBorder = !1); + } + }), + (e.prototype.updateMesh = function (e) { + var t, n, i, r; + if ((void 0 === e && (e = !1), !e)) { + var o = []; + for (t = 0; t < this.triangles.length; ++t) this.triangles[t].deleted || o.push(this.triangles[t]); + this.triangles = o; + } + for (t = 0; t < this.vertices.length; ++t) (this.vertices[t].triangleCount = 0), (this.vertices[t].triangleStart = 0); + for (t = 0; t < this.triangles.length; ++t) for (n = this.triangles[t], i = 0; i < 3; ++i) (r = n.vertices[i]).triangleCount++; + var a = 0; + for (t = 0; t < this.vertices.length; ++t) (this.vertices[t].triangleStart = a), (a += this.vertices[t].triangleCount), (this.vertices[t].triangleCount = 0); + var s = new Array(3 * this.triangles.length); + for (t = 0; t < this.triangles.length; ++t) for (n = this.triangles[t], i = 0; i < 3; ++i) (s[(r = n.vertices[i]).triangleStart + r.triangleCount] = new xl(i, t)), r.triangleCount++; + (this.references = s), e && this.identifyBorder(); + }), + (e.prototype.vertexError = function (e, t) { + var n = t.x, + i = t.y, + r = t.z; + return e.data[0] * n * n + 2 * e.data[1] * n * i + 2 * e.data[2] * n * r + 2 * e.data[3] * n + e.data[4] * i * i + 2 * e.data[5] * i * r + 2 * e.data[6] * i + e.data[7] * r * r + 2 * e.data[8] * r + e.data[9]; + }), + (e.prototype.calculateError = function (e, t, n) { + var i = e.q.add(t.q), + r = e.isBorder && t.isBorder, + o = 0, + s = i.det(0, 1, 2, 1, 4, 5, 2, 5, 7); + if (0 === s || r) { + var c = e.position.add(t.position).divide(new a.e(2, 2, 2)), + l = this.vertexError(i, e.position), + u = this.vertexError(i, t.position), + h = this.vertexError(i, c); + (o = Math.min(l, u, h)) === l ? n && n.copyFrom(e.position) : o === u ? n && n.copyFrom(t.position) : n && n.copyFrom(c); + } else + n || (n = a.e.Zero()), (n.x = (-1 / s) * i.det(1, 2, 3, 4, 5, 6, 5, 7, 8)), (n.y = (1 / s) * i.det(0, 2, 3, 1, 5, 6, 2, 7, 8)), (n.z = (-1 / s) * i.det(0, 1, 3, 1, 4, 6, 2, 5, 8)), (o = this.vertexError(i, n)); + return o; + }), + e + ); + })(); + Object.defineProperty(ge.a.prototype, "simplificationQueue", { + get: function () { + if (!this._simplificationQueue) { + this._simplificationQueue = new vl(); + var e = this._getComponent(me.a.NAME_SIMPLIFICATIONQUEUE); + e || ((e = new Sl(this)), this._addComponent(e)); + } + return this._simplificationQueue; + }, + set: function (e) { + this._simplificationQueue = e; + }, + enumerable: !0, + configurable: !0, + }), + (Ee.a.prototype.simplify = function (e, t, n, i) { + return void 0 === t && (t = !0), void 0 === n && (n = ml.QUADRATIC), this.getScene().simplificationQueue.addTask({ settings: e, parallelProcessing: t, mesh: this, simplificationType: n, successCallback: i }), this; + }); + var Sl = (function () { + function e(e) { + (this.name = me.a.NAME_SIMPLIFICATIONQUEUE), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._beforeCameraUpdateStage.registerStep(me.a.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE, this, this._beforeCameraUpdate); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () {}), + (e.prototype._beforeCameraUpdate = function () { + this.scene._simplificationQueue && !this.scene._simplificationQueue.running && this.scene._simplificationQueue.executeNext(); + }), + e + ); + })(), + Ol = n(191), + El = n(126), + Ml = n(159), + Al = (function () { + function e(e) { + void 0 === e && (e = Recast), + (this.bjsRECAST = {}), + (this.name = "RecastJSPlugin"), + "function" == typeof e ? e(this.bjsRECAST) : (this.bjsRECAST = e), + this.isSupported() || g.a.Error("RecastJS is not available. Please make sure you included the js file."); + } + return ( + (e.prototype.createNavMesh = function (e, t) { + var n, + i, + r, + o = new this.bjsRECAST.rcConfig(); + (o.cs = t.cs), + (o.ch = t.ch), + (o.borderSize = 0), + (o.tileSize = 0), + (o.walkableSlopeAngle = t.walkableSlopeAngle), + (o.walkableHeight = t.walkableHeight), + (o.walkableClimb = t.walkableClimb), + (o.walkableRadius = t.walkableRadius), + (o.maxEdgeLen = t.maxEdgeLen), + (o.maxSimplificationError = t.maxSimplificationError), + (o.minRegionArea = t.minRegionArea), + (o.mergeRegionArea = t.mergeRegionArea), + (o.maxVertsPerPoly = t.maxVertsPerPoly), + (o.detailSampleDist = t.detailSampleDist), + (o.detailSampleMaxError = t.detailSampleMaxError), + (this.navMesh = new this.bjsRECAST.NavMesh()); + var s = [], + c = [], + l = 0; + for (n = 0; n < e.length; n++) + if (e[n]) { + var u = e[n], + h = u.getIndices(); + if (!h) continue; + var d = u.getVerticesData(wn.b.PositionKind, !1, !1); + if (!d) continue; + var p = u.computeWorldMatrix(!1); + for (i = 0; i < h.length; i++) s.push(h[i] + l); + var f = a.e.Zero(), + m = a.e.Zero(); + for (r = 0; r < d.length; r += 3) a.e.FromArrayToRef(d, r, m), a.e.TransformCoordinatesToRef(m, p, f), c.push(f.x, f.y, f.z); + l += d.length / 3; + } + this.navMesh.build(c, l, s, s.length, o); + }), + (e.prototype.createDebugNavMesh = function (e) { + var t, + n, + i = this.navMesh.getDebugNavMesh(), + r = i.getTriangleCount(), + o = [], + a = []; + for (t = 0; t < 3 * r; t++) o.push(t); + for (t = 0; t < r; t++) + for (n = 0; n < 3; n++) { + var s = i.getTriangle(t).getPoint(n); + a.push(s.x, s.y, s.z); + } + var c = new Ee.a("NavMeshDebug", e), + l = new Rn.a(); + return (l.indices = o), (l.positions = a), l.applyToMesh(c, !1), c; + }), + (e.prototype.getClosestPoint = function (e) { + var t = new this.bjsRECAST.Vec3(e.x, e.y, e.z), + n = this.navMesh.getClosestPoint(t); + return new a.e(n.x, n.y, n.z); + }), + (e.prototype.getRandomPointAround = function (e, t) { + var n = new this.bjsRECAST.Vec3(e.x, e.y, e.z), + i = this.navMesh.getRandomPointAround(n, t); + return new a.e(i.x, i.y, i.z); + }), + (e.prototype.moveAlong = function (e, t) { + var n = new this.bjsRECAST.Vec3(e.x, e.y, e.z), + i = new this.bjsRECAST.Vec3(t.x, t.y, t.z), + r = this.navMesh.moveAlong(n, i); + return new a.e(r.x, r.y, r.z); + }), + (e.prototype.computePath = function (e, t) { + var n, + i = new this.bjsRECAST.Vec3(e.x, e.y, e.z), + r = new this.bjsRECAST.Vec3(t.x, t.y, t.z), + o = this.navMesh.computePath(i, r), + s = o.getPointCount(), + c = []; + for (n = 0; n < s; n++) { + var l = o.getPoint(n); + c.push(new a.e(l.x, l.y, l.z)); + } + return c; + }), + (e.prototype.createCrowd = function (e, t, n) { + return new Il(this, e, t, n); + }), + (e.prototype.setDefaultQueryExtent = function (e) { + var t = new this.bjsRECAST.Vec3(e.x, e.y, e.z); + this.navMesh.setDefaultQueryExtent(t); + }), + (e.prototype.getDefaultQueryExtent = function () { + var e = this.navMesh.getDefaultQueryExtent(); + return new a.e(e.x, e.y, e.z); + }), + (e.prototype.dispose = function () {}), + (e.prototype.isSupported = function () { + return void 0 !== this.bjsRECAST; + }), + e + ); + })(), + Il = (function () { + function e(e, t, n, i) { + var r = this; + (this.recastCrowd = {}), + (this.transforms = new Array()), + (this.agents = new Array()), + (this._onBeforeAnimationsObserver = null), + (this.bjsRECASTPlugin = e), + (this.recastCrowd = new this.bjsRECASTPlugin.bjsRECAST.Crowd(t, n, this.bjsRECASTPlugin.navMesh.getNavMesh())), + (this._scene = i), + (this._onBeforeAnimationsObserver = i.onBeforeAnimationsObservable.add(function () { + r.update(0.001 * i.getEngine().getDeltaTime()); + })); + } + return ( + (e.prototype.addAgent = function (e, t, n) { + var i = new this.bjsRECASTPlugin.bjsRECAST.dtCrowdAgentParams(); + (i.radius = t.radius), + (i.height = t.height), + (i.maxAcceleration = t.maxAcceleration), + (i.maxSpeed = t.maxSpeed), + (i.collisionQueryRange = t.collisionQueryRange), + (i.pathOptimizationRange = t.pathOptimizationRange), + (i.separationWeight = t.separationWeight), + (i.updateFlags = 7), + (i.obstacleAvoidanceType = 0), + (i.queryFilterType = 0), + (i.userData = 0); + var r = this.recastCrowd.addAgent(new this.bjsRECASTPlugin.bjsRECAST.Vec3(e.x, e.y, e.z), i); + return this.transforms.push(n), this.agents.push(r), r; + }), + (e.prototype.getAgentPosition = function (e) { + var t = this.recastCrowd.getAgentPosition(e); + return new a.e(t.x, t.y, t.z); + }), + (e.prototype.getAgentVelocity = function (e) { + var t = this.recastCrowd.getAgentVelocity(e); + return new a.e(t.x, t.y, t.z); + }), + (e.prototype.agentGoto = function (e, t) { + this.recastCrowd.agentGoto(e, new this.bjsRECASTPlugin.bjsRECAST.Vec3(t.x, t.y, t.z)); + }), + (e.prototype.agentTeleport = function (e, t) { + this.recastCrowd.agentTeleport(e, new this.bjsRECASTPlugin.bjsRECAST.Vec3(t.x, t.y, t.z)); + }), + (e.prototype.updateAgentParameters = function (e, t) { + var n = this.recastCrowd.getAgentParameters(e); + void 0 !== t.radius && (n.radius = t.radius), + void 0 !== t.height && (n.height = t.height), + void 0 !== t.maxAcceleration && (n.maxAcceleration = t.maxAcceleration), + void 0 !== t.maxSpeed && (n.maxSpeed = t.maxSpeed), + void 0 !== t.collisionQueryRange && (n.collisionQueryRange = t.collisionQueryRange), + void 0 !== t.pathOptimizationRange && (n.pathOptimizationRange = t.pathOptimizationRange), + void 0 !== t.separationWeight && (n.separationWeight = t.separationWeight), + this.recastCrowd.setAgentParameters(e, n); + }), + (e.prototype.removeAgent = function (e) { + this.recastCrowd.removeAgent(e); + var t = this.agents.indexOf(e); + t > -1 && (this.agents.splice(t, 1), this.transforms.splice(t, 1)); + }), + (e.prototype.getAgents = function () { + return this.agents; + }), + (e.prototype.update = function (e) { + this.recastCrowd.update(e); + for (var t = 0; t < this.agents.length; t++) this.transforms[t].position = this.getAgentPosition(this.agents[t]); + }), + (e.prototype.setDefaultQueryExtent = function (e) { + var t = new this.bjsRECASTPlugin.bjsRECAST.Vec3(e.x, e.y, e.z); + this.recastCrowd.setDefaultQueryExtent(t); + }), + (e.prototype.getDefaultQueryExtent = function () { + var e = this.recastCrowd.getDefaultQueryExtent(); + return new a.e(e.x, e.y, e.z); + }), + (e.prototype.dispose = function () { + this.recastCrowd.destroy(), this._scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver), (this._onBeforeAnimationsObserver = null); + }), + e + ); + })(); + ue.a.OfflineProviderFactory = function (e, t, n) { + return void 0 === n && (n = !1), new Rl(e, t, n); + }; + var Dl, + Rl = (function () { + function e(t, n, i) { + var r = this; + void 0 === i && (i = !1), + (this._idbFactory = "undefined" != typeof window ? window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB : indexedDB), + (this._callbackManifestChecked = n), + (this._currentSceneUrl = e._ReturnFullUrlLocation(t)), + (this._db = null), + (this._enableSceneOffline = !1), + (this._enableTexturesOffline = !1), + (this._manifestVersionFound = 0), + (this._mustUpdateRessources = !1), + (this._hasReachedQuota = !1), + e.IDBStorageEnabled + ? i + ? ((this._enableSceneOffline = !0), + (this._enableTexturesOffline = !0), + (this._manifestVersionFound = 1), + $e.b.SetImmediate(function () { + r._callbackManifestChecked(!0); + })) + : this._checkManifestFile() + : this._callbackManifestChecked(!0); + } + return ( + Object.defineProperty(e.prototype, "enableSceneOffline", { + get: function () { + return this._enableSceneOffline; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "enableTexturesOffline", { + get: function () { + return this._enableTexturesOffline; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._checkManifestFile = function () { + var t = this, + n = function () { + (t._enableSceneOffline = !1), (t._enableTexturesOffline = !1), t._callbackManifestChecked(!1); + }, + i = !1, + r = this._currentSceneUrl + ".manifest", + o = new ls.a(); + navigator.onLine && ((i = !0), (r = r + (null == r.match(/\?/) ? "?" : "&") + Date.now())), + o.open("GET", r), + o.addEventListener( + "load", + function () { + if (200 === o.status || e._ValidateXHRData(o, 1)) + try { + var i = JSON.parse(o.response); + (t._enableSceneOffline = i.enableSceneOffline), + (t._enableTexturesOffline = i.enableTexturesOffline && e.IsUASupportingBlobStorage), + i.version && !isNaN(parseInt(i.version)) && (t._manifestVersionFound = i.version), + t._callbackManifestChecked && t._callbackManifestChecked(!0); + } catch (e) { + n(); + } + else n(); + }, + !1 + ), + o.addEventListener( + "error", + function () { + if (i) { + i = !1; + var e = t._currentSceneUrl + ".manifest"; + o.open("GET", e), o.send(); + } else n(); + }, + !1 + ); + try { + o.send(); + } catch (e) { + g.a.Error("Error on XHR send request."), this._callbackManifestChecked(!1); + } + }), + (e.prototype.open = function (e, t) { + var n = this, + i = function () { + (n._isSupported = !1), t && t(); + }; + if (this._idbFactory && (this._enableSceneOffline || this._enableTexturesOffline)) + if (this._db) e && e(); + else { + (this._hasReachedQuota = !1), (this._isSupported = !0); + var r = this._idbFactory.open("babylonjs", 1); + (r.onerror = function () { + i(); + }), + (r.onblocked = function () { + g.a.Error("IDB request blocked. Please reload the page."), i(); + }), + (r.onsuccess = function () { + (n._db = r.result), e(); + }), + (r.onupgradeneeded = function (e) { + if (((n._db = e.target.result), n._db)) + try { + n._db.createObjectStore("scenes", { keyPath: "sceneUrl" }), n._db.createObjectStore("versions", { keyPath: "sceneUrl" }), n._db.createObjectStore("textures", { keyPath: "textureUrl" }); + } catch (e) { + g.a.Error("Error while creating object stores. Exception: " + e.message), i(); + } + }); + } + else (this._isSupported = !1), t && t(); + }), + (e.prototype.loadImage = function (t, n) { + var i = this, + r = e._ReturnFullUrlLocation(t), + o = function () { + i._hasReachedQuota || null === i._db ? (n.src = t) : i._saveImageIntoDBAsync(r, n); + }; + this._mustUpdateRessources ? o() : this._loadImageFromDBAsync(r, n, o); + }), + (e.prototype._loadImageFromDBAsync = function (e, t, n) { + if (this._isSupported && null !== this._db) { + var i, + r = this._db.transaction(["textures"]); + (r.onabort = function () { + t.src = e; + }), + (r.oncomplete = function () { + var r; + if (i) { + var o = window.URL || window.webkitURL; + (r = o.createObjectURL(i.data)), + (t.onerror = function () { + g.a.Error("Error loading image from blob URL: " + r + " switching back to web url: " + e), (t.src = e); + }), + (t.src = r); + } else n(); + }); + var o = r.objectStore("textures").get(e); + (o.onsuccess = function (e) { + i = e.target.result; + }), + (o.onerror = function () { + g.a.Error("Error loading texture " + e + " from DB."), (t.src = e); + }); + } else g.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."), (t.src = e); + }), + (e.prototype._saveImageIntoDBAsync = function (t, n) { + var i = this; + if (this._isSupported) { + var r = function () { + var e; + if (o) { + var t = window.URL || window.webkitURL; + try { + e = t.createObjectURL(o); + } catch (n) { + e = t.createObjectURL(o); + } + } + e && (n.src = e); + }; + if (e.IsUASupportingBlobStorage) { + var o, + a = new ls.a(); + a.open("GET", t), + (a.responseType = "blob"), + a.addEventListener( + "load", + function () { + if (200 === a.status && i._db) { + o = a.response; + var s = i._db.transaction(["textures"], "readwrite"); + (s.onabort = function (e) { + try { + var t = (e.srcElement || e.target).error; + t && "QuotaExceededError" === t.name && (i._hasReachedQuota = !0); + } catch (e) {} + r(); + }), + (s.oncomplete = function () { + r(); + }); + var c = { textureUrl: t, data: o }; + try { + var l = s.objectStore("textures").put(c); + (l.onsuccess = function () {}), + (l.onerror = function () { + r(); + }); + } catch (r) { + 25 === r.code && ((e.IsUASupportingBlobStorage = !1), (i._enableTexturesOffline = !1)), (n.src = t); + } + } else n.src = t; + }, + !1 + ), + a.addEventListener( + "error", + function () { + g.a.Error("Error in XHR request in BABYLON.Database."), (n.src = t); + }, + !1 + ), + a.send(); + } else n.src = t; + } else g.a.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."), (n.src = t); + }), + (e.prototype._checkVersionFromDB = function (e, t) { + var n = this; + this._loadVersionFromDBAsync(e, t, function () { + n._saveVersionIntoDBAsync(e, t); + }); + }), + (e.prototype._loadVersionFromDBAsync = function (e, t, n) { + var i, + r = this; + if (this._isSupported && this._db) + try { + var o = this._db.transaction(["versions"]); + (o.oncomplete = function () { + i ? (r._manifestVersionFound !== i.data ? ((r._mustUpdateRessources = !0), n()) : t(i.data)) : ((r._mustUpdateRessources = !0), n()); + }), + (o.onabort = function () { + t(-1); + }); + var a = o.objectStore("versions").get(e); + (a.onsuccess = function (e) { + i = e.target.result; + }), + (a.onerror = function () { + g.a.Error("Error loading version for scene " + e + " from DB."), t(-1); + }); + } catch (e) { + g.a.Error("Error while accessing 'versions' object store (READ OP). Exception: " + e.message), t(-1); + } + else g.a.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."), t(-1); + }), + (e.prototype._saveVersionIntoDBAsync = function (e, t) { + var n = this; + if (this._isSupported && !this._hasReachedQuota && this._db) + try { + var i = this._db.transaction(["versions"], "readwrite"); + (i.onabort = function (e) { + try { + var i = e.srcElement.error; + i && "QuotaExceededError" === i.name && (n._hasReachedQuota = !0); + } catch (e) {} + t(-1); + }), + (i.oncomplete = function () { + t(n._manifestVersionFound); + }); + var r = { sceneUrl: e, data: this._manifestVersionFound }, + o = i.objectStore("versions").put(r); + (o.onsuccess = function () {}), + (o.onerror = function () { + g.a.Error("Error in DB add version request in BABYLON.Database."); + }); + } catch (e) { + g.a.Error("Error while accessing 'versions' object store (WRITE OP). Exception: " + e.message), t(-1); + } + else t(-1); + }), + (e.prototype.loadFile = function (t, n, i, r, o) { + var a = this, + s = e._ReturnFullUrlLocation(t), + c = function () { + a._saveFileAsync(s, n, i, o, r); + }; + this._checkVersionFromDB(s, function (e) { + -1 !== e ? (a._mustUpdateRessources ? a._saveFileAsync(s, n, i, o, r) : a._loadFileAsync(s, n, c)) : r && r(); + }); + }), + (e.prototype._loadFileAsync = function (e, t, n) { + if (this._isSupported && this._db) { + var i, r; + i = -1 !== e.indexOf(".babylon") ? "scenes" : "textures"; + var o = this._db.transaction([i]); + (o.oncomplete = function () { + r ? t(r.data) : n(); + }), + (o.onabort = function () { + n(); + }); + var a = o.objectStore(i).get(e); + (a.onsuccess = function (e) { + r = e.target.result; + }), + (a.onerror = function () { + g.a.Error("Error loading file " + e + " from DB."), n(); + }); + } else g.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."), t(); + }), + (e.prototype._saveFileAsync = function (t, n, i, r, o) { + var a = this; + if (this._isSupported) { + var s; + s = -1 !== t.indexOf(".babylon") ? "scenes" : "textures"; + var c, + l = new ls.a(); + l.open("GET", t + "?" + Date.now()), + r && (l.responseType = "arraybuffer"), + i && (l.onprogress = i), + l.addEventListener( + "load", + function () { + if (200 === l.status || (l.status < 400 && e._ValidateXHRData(l, r ? 6 : 1))) + if (((c = r ? l.response : l.responseText), !a._hasReachedQuota && a._db)) { + var i, + u = a._db.transaction([s], "readwrite"); + (u.onabort = function (e) { + try { + var t = e.srcElement.error; + t && "QuotaExceededError" === t.name && (a._hasReachedQuota = !0); + } catch (e) {} + n(c); + }), + (u.oncomplete = function () { + n(c); + }), + (i = "scenes" === s ? { sceneUrl: t, data: c, version: a._manifestVersionFound } : { textureUrl: t, data: c }); + try { + var h = u.objectStore(s).put(i); + (h.onsuccess = function () {}), + (h.onerror = function () { + g.a.Error("Error in DB add file request in BABYLON.Database."); + }); + } catch (e) { + n(c); + } + } else n(c); + else l.status >= 400 && o ? o(l) : n(); + }, + !1 + ), + l.addEventListener( + "error", + function () { + g.a.Error("error on XHR request."), n(); + }, + !1 + ), + l.send(); + } else g.a.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."), n(); + }), + (e._ValidateXHRData = function (e, t) { + void 0 === t && (t = 7); + try { + if (1 & t) { + if (e.responseText && e.responseText.length > 0) return !0; + if (1 === t) return !1; + } + if (2 & t) { + var n = es.GetTGAHeader(e.response); + if (n.width && n.height && n.width > 0 && n.height > 0) return !0; + if (2 === t) return !1; + } + if (4 & t) { + var i = new Uint8Array(e.response, 0, 3); + return 68 === i[0] && 68 === i[1] && 83 === i[2]; + } + } catch (e) {} + return !1; + }), + (e.IsUASupportingBlobStorage = !0), + (e.IDBStorageEnabled = !1), + (e._ParseURL = function (e) { + document.createElement("a").href = e; + var t = e.substring(0, e.lastIndexOf("#")), + n = e.substring(t.lastIndexOf("/") + 1, e.length); + return e.substring(0, e.indexOf(n, 0)); + }), + (e._ReturnFullUrlLocation = function (t) { + //return -1 === t.indexOf("http:/") && -1 === t.indexOf("https:/") ? e._ParseURL(window.location.href) + t : t; + }), + e + ); + })(), + wl = (function () { + function e() { + (this.direction1 = new a.e(0, 1, 0)), (this.direction2 = new a.e(0, 1, 0)), (this.minEmitBox = new a.e(-0.5, -0.5, -0.5)), (this.maxEmitBox = new a.e(0.5, 0.5, 0.5)); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = z.a.RandomRange(this.direction1.x, this.direction2.x), + o = z.a.RandomRange(this.direction1.y, this.direction2.y), + s = z.a.RandomRange(this.direction1.z, this.direction2.z); + if (i) return (t.x = r), (t.y = o), void (t.z = s); + a.e.TransformNormalFromFloatsToRef(r, o, s, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r = z.a.RandomRange(this.minEmitBox.x, this.maxEmitBox.x), + o = z.a.RandomRange(this.minEmitBox.y, this.maxEmitBox.y), + s = z.a.RandomRange(this.minEmitBox.z, this.maxEmitBox.z); + if (i) return (t.x = r), (t.y = o), void (t.z = s); + a.e.TransformCoordinatesFromFloatsToRef(r, o, s, e, t); + }), + (e.prototype.clone = function () { + var t = new e(); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setVector3("direction1", this.direction1), e.setVector3("direction2", this.direction2), e.setVector3("minEmitBox", this.minEmitBox), e.setVector3("maxEmitBox", this.maxEmitBox); + }), + (e.prototype.getEffectDefines = function () { + return "#define BOXEMITTER"; + }), + (e.prototype.getClassName = function () { + return "BoxParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return ( + (e.type = this.getClassName()), (e.direction1 = this.direction1.asArray()), (e.direction2 = this.direction2.asArray()), (e.minEmitBox = this.minEmitBox.asArray()), (e.maxEmitBox = this.maxEmitBox.asArray()), e + ); + }), + (e.prototype.parse = function (e) { + a.e.FromArrayToRef(e.direction1, 0, this.direction1), a.e.FromArrayToRef(e.direction2, 0, this.direction2), a.e.FromArrayToRef(e.minEmitBox, 0, this.minEmitBox), a.e.FromArrayToRef(e.maxEmitBox, 0, this.maxEmitBox); + }), + e + ); + })(), + Ll = (function () { + function e(e, t, n) { + void 0 === e && (e = 1), + void 0 === t && (t = Math.PI), + void 0 === n && (n = 0), + (this.directionRandomizer = n), + (this.radiusRange = 1), + (this.heightRange = 1), + (this.emitFromSpawnPointOnly = !1), + (this.angle = t), + (this.radius = e); + } + return ( + Object.defineProperty(e.prototype, "radius", { + get: function () { + return this._radius; + }, + set: function (e) { + (this._radius = e), this._buildHeight(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "angle", { + get: function () { + return this._angle; + }, + set: function (e) { + (this._angle = e), this._buildHeight(); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._buildHeight = function () { + 0 !== this._angle ? (this._height = this._radius / Math.tan(this._angle / 2)) : (this._height = 1); + }), + (e.prototype.startDirectionFunction = function (e, t, n, i) { + if (1 === Math.abs(Math.cos(this._angle))) { + if (i) return (t.x = 0), (t.y = 1), void (t.z = 0); + a.e.TransformNormalFromFloatsToRef(0, 1, 0, e, t); + } else { + var r = n.position.subtract(e.getTranslation()).normalize(), + o = z.a.RandomRange(0, this.directionRandomizer), + s = z.a.RandomRange(0, this.directionRandomizer), + c = z.a.RandomRange(0, this.directionRandomizer); + if (((r.x += o), (r.y += s), (r.z += c), r.normalize(), i)) return void t.copyFrom(r); + a.e.TransformNormalFromFloatsToRef(r.x, r.y, r.z, e, t); + } + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r, + o = z.a.RandomRange(0, 2 * Math.PI); + r = this.emitFromSpawnPointOnly ? 1e-4 : 1 - (r = z.a.RandomRange(0, this.heightRange)) * r; + var s = this._radius - z.a.RandomRange(0, this._radius * this.radiusRange), + c = (s *= r) * Math.sin(o), + l = s * Math.cos(o), + u = r * this._height; + if (i) return (t.x = c), (t.y = u), void (t.z = l); + a.e.TransformCoordinatesFromFloatsToRef(c, u, l, e, t); + }), + (e.prototype.clone = function () { + var t = new e(this._radius, this._angle, this.directionRandomizer); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setFloat2("radius", this._radius, this.radiusRange), e.setFloat("coneAngle", this._angle), e.setFloat2("height", this._height, this.heightRange), e.setFloat("directionRandomizer", this.directionRandomizer); + }), + (e.prototype.getEffectDefines = function () { + var e = "#define CONEEMITTER"; + return this.emitFromSpawnPointOnly && (e += "\n#define CONEEMITTERSPAWNPOINT"), e; + }), + (e.prototype.getClassName = function () { + return "ConeParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return ( + (e.type = this.getClassName()), + (e.radius = this._radius), + (e.angle = this._angle), + (e.directionRandomizer = this.directionRandomizer), + (e.radiusRange = this.radiusRange), + (e.heightRange = this.heightRange), + (e.emitFromSpawnPointOnly = this.emitFromSpawnPointOnly), + e + ); + }), + (e.prototype.parse = function (e) { + (this.radius = e.radius), + (this.angle = e.angle), + (this.directionRandomizer = e.directionRandomizer), + (this.radiusRange = e.radiusRange), + (this.heightRange = e.heightRange), + (this.emitFromSpawnPointOnly = e.emitFromSpawnPointOnly); + }), + e + ); + })(), + Fl = (function () { + function e(e, t, n, i) { + void 0 === e && (e = 1), void 0 === t && (t = 1), void 0 === n && (n = 1), void 0 === i && (i = 0), (this.radius = e), (this.height = t), (this.radiusRange = n), (this.directionRandomizer = i); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = n.position.subtract(e.getTranslation()).normalize(), + o = z.a.RandomRange(-this.directionRandomizer / 2, this.directionRandomizer / 2), + s = Math.atan2(r.x, r.z); + (s += z.a.RandomRange(-Math.PI / 2, Math.PI / 2) * this.directionRandomizer), + (r.y = o), + (r.x = Math.sin(s)), + (r.z = Math.cos(s)), + r.normalize(), + i ? t.copyFrom(r) : a.e.TransformNormalFromFloatsToRef(r.x, r.y, r.z, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r = z.a.RandomRange(-this.height / 2, this.height / 2), + o = z.a.RandomRange(0, 2 * Math.PI), + s = z.a.RandomRange((1 - this.radiusRange) * (1 - this.radiusRange), 1), + c = Math.sqrt(s) * this.radius, + l = c * Math.cos(o), + u = c * Math.sin(o); + i ? t.copyFromFloats(l, r, u) : a.e.TransformCoordinatesFromFloatsToRef(l, r, u, e, t); + }), + (e.prototype.clone = function () { + var t = new e(this.radius, this.directionRandomizer); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setFloat("radius", this.radius), e.setFloat("height", this.height), e.setFloat("radiusRange", this.radiusRange), e.setFloat("directionRandomizer", this.directionRandomizer); + }), + (e.prototype.getEffectDefines = function () { + return "#define CYLINDEREMITTER"; + }), + (e.prototype.getClassName = function () { + return "CylinderParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.getClassName()), (e.radius = this.radius), (e.height = this.height), (e.radiusRange = this.radiusRange), (e.directionRandomizer = this.directionRandomizer), e; + }), + (e.prototype.parse = function (e) { + (this.radius = e.radius), (this.height = e.height), (this.radiusRange = e.radiusRange), (this.directionRandomizer = e.directionRandomizer); + }), + e + ); + })(), + Nl = (function (e) { + function t(t, n, i, r, o) { + void 0 === t && (t = 1), void 0 === n && (n = 1), void 0 === i && (i = 1), void 0 === r && (r = new a.e(0, 1, 0)), void 0 === o && (o = new a.e(0, 1, 0)); + var s = e.call(this, t, n, i) || this; + return (s.direction1 = r), (s.direction2 = o), s; + } + return ( + Object(h.d)(t, e), + (t.prototype.startDirectionFunction = function (e, t, n) { + var i = z.a.RandomRange(this.direction1.x, this.direction2.x), + r = z.a.RandomRange(this.direction1.y, this.direction2.y), + o = z.a.RandomRange(this.direction1.z, this.direction2.z); + a.e.TransformNormalFromFloatsToRef(i, r, o, e, t); + }), + (t.prototype.clone = function () { + var e = new t(this.radius, this.height, this.radiusRange, this.direction1, this.direction2); + return M.a.DeepCopy(this, e), e; + }), + (t.prototype.applyToShader = function (e) { + e.setFloat("radius", this.radius), e.setFloat("height", this.height), e.setFloat("radiusRange", this.radiusRange), e.setVector3("direction1", this.direction1), e.setVector3("direction2", this.direction2); + }), + (t.prototype.getEffectDefines = function () { + return "#define CYLINDEREMITTER\n#define DIRECTEDCYLINDEREMITTER"; + }), + (t.prototype.getClassName = function () { + return "CylinderDirectedParticleEmitter"; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.direction1 = this.direction1.asArray()), (t.direction2 = this.direction2.asArray()), t; + }), + (t.prototype.parse = function (t) { + e.prototype.parse.call(this, t), this.direction1.copyFrom(t.direction1), this.direction2.copyFrom(t.direction2); + }), + t + ); + })(Fl), + kl = (function () { + function e(e, t, n) { + void 0 === e && (e = 1), void 0 === t && (t = 1), void 0 === n && (n = 0), (this.radius = e), (this.radiusRange = t), (this.directionRandomizer = n); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = n.position.subtract(e.getTranslation()).normalize(), + o = z.a.RandomRange(0, this.directionRandomizer), + s = z.a.RandomRange(0, this.directionRandomizer), + c = z.a.RandomRange(0, this.directionRandomizer); + (r.x += o), (r.y += s), (r.z += c), r.normalize(), i ? t.copyFrom(r) : a.e.TransformNormalFromFloatsToRef(r.x, r.y, r.z, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r = this.radius - z.a.RandomRange(0, this.radius * this.radiusRange), + o = z.a.RandomRange(0, 1), + s = z.a.RandomRange(0, 2 * Math.PI), + c = Math.acos(2 * o - 1), + l = r * Math.cos(s) * Math.sin(c), + u = r * Math.cos(c), + h = r * Math.sin(s) * Math.sin(c); + i ? t.copyFromFloats(l, Math.abs(u), h) : a.e.TransformCoordinatesFromFloatsToRef(l, Math.abs(u), h, e, t); + }), + (e.prototype.clone = function () { + var t = new e(this.radius, this.directionRandomizer); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setFloat("radius", this.radius), e.setFloat("radiusRange", this.radiusRange), e.setFloat("directionRandomizer", this.directionRandomizer); + }), + (e.prototype.getEffectDefines = function () { + return "#define HEMISPHERICEMITTER"; + }), + (e.prototype.getClassName = function () { + return "HemisphericParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.getClassName()), (e.radius = this.radius), (e.radiusRange = this.radiusRange), (e.directionRandomizer = this.directionRandomizer), e; + }), + (e.prototype.parse = function (e) { + (this.radius = e.radius), (this.radiusRange = e.radiusRange), (this.directionRandomizer = e.directionRandomizer); + }), + e + ); + })(), + zl = (function () { + function e() { + (this.direction1 = new a.e(0, 1, 0)), (this.direction2 = new a.e(0, 1, 0)); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = z.a.RandomRange(this.direction1.x, this.direction2.x), + o = z.a.RandomRange(this.direction1.y, this.direction2.y), + s = z.a.RandomRange(this.direction1.z, this.direction2.z); + i ? t.copyFromFloats(r, o, s) : a.e.TransformNormalFromFloatsToRef(r, o, s, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + i ? t.copyFromFloats(0, 0, 0) : a.e.TransformCoordinatesFromFloatsToRef(0, 0, 0, e, t); + }), + (e.prototype.clone = function () { + var t = new e(); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setVector3("direction1", this.direction1), e.setVector3("direction2", this.direction2); + }), + (e.prototype.getEffectDefines = function () { + return "#define POINTEMITTER"; + }), + (e.prototype.getClassName = function () { + return "PointParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.getClassName()), (e.direction1 = this.direction1.asArray()), (e.direction2 = this.direction2.asArray()), e; + }), + (e.prototype.parse = function (e) { + a.e.FromArrayToRef(e.direction1, 0, this.direction1), a.e.FromArrayToRef(e.direction2, 0, this.direction2); + }), + e + ); + })(), + jl = (function () { + function e(e, t, n) { + void 0 === e && (e = 1), void 0 === t && (t = 1), void 0 === n && (n = 0), (this.radius = e), (this.radiusRange = t), (this.directionRandomizer = n); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = n.position.subtract(e.getTranslation()).normalize(), + o = z.a.RandomRange(0, this.directionRandomizer), + s = z.a.RandomRange(0, this.directionRandomizer), + c = z.a.RandomRange(0, this.directionRandomizer); + (r.x += o), (r.y += s), (r.z += c), r.normalize(), i ? t.copyFrom(r) : a.e.TransformNormalFromFloatsToRef(r.x, r.y, r.z, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r = this.radius - z.a.RandomRange(0, this.radius * this.radiusRange), + o = z.a.RandomRange(0, 1), + s = z.a.RandomRange(0, 2 * Math.PI), + c = Math.acos(2 * o - 1), + l = r * Math.cos(s) * Math.sin(c), + u = r * Math.cos(c), + h = r * Math.sin(s) * Math.sin(c); + i ? t.copyFromFloats(l, u, h) : a.e.TransformCoordinatesFromFloatsToRef(l, u, h, e, t); + }), + (e.prototype.clone = function () { + var t = new e(this.radius, this.directionRandomizer); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setFloat("radius", this.radius), e.setFloat("radiusRange", this.radiusRange), e.setFloat("directionRandomizer", this.directionRandomizer); + }), + (e.prototype.getEffectDefines = function () { + return "#define SPHEREEMITTER"; + }), + (e.prototype.getClassName = function () { + return "SphereParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.getClassName()), (e.radius = this.radius), (e.radiusRange = this.radiusRange), (e.directionRandomizer = this.directionRandomizer), e; + }), + (e.prototype.parse = function (e) { + (this.radius = e.radius), (this.radiusRange = e.radiusRange), (this.directionRandomizer = e.directionRandomizer); + }), + e + ); + })(), + Bl = (function (e) { + function t(t, n, i) { + void 0 === t && (t = 1), void 0 === n && (n = new a.e(0, 1, 0)), void 0 === i && (i = new a.e(0, 1, 0)); + var r = e.call(this, t) || this; + return (r.direction1 = n), (r.direction2 = i), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.startDirectionFunction = function (e, t, n) { + var i = z.a.RandomRange(this.direction1.x, this.direction2.x), + r = z.a.RandomRange(this.direction1.y, this.direction2.y), + o = z.a.RandomRange(this.direction1.z, this.direction2.z); + a.e.TransformNormalFromFloatsToRef(i, r, o, e, t); + }), + (t.prototype.clone = function () { + var e = new t(this.radius, this.direction1, this.direction2); + return M.a.DeepCopy(this, e), e; + }), + (t.prototype.applyToShader = function (e) { + e.setFloat("radius", this.radius), e.setFloat("radiusRange", this.radiusRange), e.setVector3("direction1", this.direction1), e.setVector3("direction2", this.direction2); + }), + (t.prototype.getEffectDefines = function () { + return "#define SPHEREEMITTER\n#define DIRECTEDSPHEREEMITTER"; + }), + (t.prototype.getClassName = function () { + return "SphereDirectedParticleEmitter"; + }), + (t.prototype.serialize = function () { + var t = e.prototype.serialize.call(this); + return (t.direction1 = this.direction1.asArray()), (t.direction2 = this.direction2.asArray()), t; + }), + (t.prototype.parse = function (t) { + e.prototype.parse.call(this, t), this.direction1.copyFrom(t.direction1), this.direction2.copyFrom(t.direction2); + }), + t + ); + })(jl), + Vl = (function () { + function e() { + (this.particlePositionGenerator = function () {}), (this.particleDestinationGenerator = function () {}); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + var r = a.c.Vector3[0]; + if (this.particleDestinationGenerator) { + this.particleDestinationGenerator(-1, n, r); + var o = a.c.Vector3[1]; + r.subtractToRef(n.position, o), o.scaleToRef(1 / n.lifeTime, r); + } else r.set(0, 0, 0); + i ? t.copyFrom(r) : a.e.TransformNormalToRef(r, e, t); + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + var r = a.c.Vector3[0]; + this.particlePositionGenerator ? this.particlePositionGenerator(-1, n, r) : r.set(0, 0, 0), i ? t.copyFrom(r) : a.e.TransformCoordinatesToRef(r, e, t); + }), + (e.prototype.clone = function () { + var t = new e(); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) {}), + (e.prototype.getEffectDefines = function () { + return "#define CUSTOMEMITTER"; + }), + (e.prototype.getClassName = function () { + return "CustomParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.getClassName()), e; + }), + (e.prototype.parse = function (e) {}), + e + ); + })(), + Gl = (function () { + function e(e) { + (this.mesh = e), + (this._indices = null), + (this._positions = null), + (this._normals = null), + (this._storedNormal = a.e.Zero()), + (this.direction1 = new a.e(0, 1, 0)), + (this.direction2 = new a.e(0, 1, 0)), + (this.useMeshNormalsForDirection = !0), + e && ((this._indices = e.getIndices()), (this._positions = e.getVerticesData(wn.b.PositionKind)), (this._normals = e.getVerticesData(wn.b.NormalKind))); + } + return ( + (e.prototype.startDirectionFunction = function (e, t, n, i) { + if (this.useMeshNormalsForDirection && this._normals) a.e.TransformNormalToRef(this._storedNormal, e, t); + else { + var r = z.a.RandomRange(this.direction1.x, this.direction2.x), + o = z.a.RandomRange(this.direction1.y, this.direction2.y), + s = z.a.RandomRange(this.direction1.z, this.direction2.z); + i ? t.copyFromFloats(r, o, s) : a.e.TransformNormalFromFloatsToRef(r, o, s, e, t); + } + }), + (e.prototype.startPositionFunction = function (e, t, n, i) { + if (this._indices && this._positions) { + var r = (3 * Math.random() * (this._indices.length / 3)) | 0, + o = Math.random(), + s = Math.random() * (1 - o), + c = 1 - o - s, + l = this._indices[r], + u = this._indices[r + 1], + h = this._indices[r + 2], + d = a.c.Vector3[0], + p = a.c.Vector3[1], + f = a.c.Vector3[2], + m = a.c.Vector3[3]; + a.e.FromArrayToRef(this._positions, 3 * l, d), + a.e.FromArrayToRef(this._positions, 3 * u, p), + a.e.FromArrayToRef(this._positions, 3 * h, f), + (m.x = o * d.x + s * p.x + c * f.x), + (m.y = o * d.y + s * p.y + c * f.y), + (m.z = o * d.z + s * p.z + c * f.z), + i ? t.copyFromFloats(m.x, m.y, m.z) : a.e.TransformCoordinatesFromFloatsToRef(m.x, m.y, m.z, e, t), + this.useMeshNormalsForDirection && + this._normals && + (a.e.FromArrayToRef(this._normals, 3 * l, d), + a.e.FromArrayToRef(this._normals, 3 * u, p), + a.e.FromArrayToRef(this._normals, 3 * h, f), + (this._storedNormal.x = o * d.x + s * p.x + c * f.x), + (this._storedNormal.y = o * d.y + s * p.y + c * f.y), + (this._storedNormal.z = o * d.z + s * p.z + c * f.z)); + } + }), + (e.prototype.clone = function () { + var t = new e(this.mesh); + return M.a.DeepCopy(this, t), t; + }), + (e.prototype.applyToShader = function (e) { + e.setVector3("direction1", this.direction1), e.setVector3("direction2", this.direction2); + }), + (e.prototype.getEffectDefines = function () { + return ""; + }), + (e.prototype.getClassName = function () { + return "MeshParticleEmitter"; + }), + (e.prototype.serialize = function () { + var e, + t = {}; + return ( + (t.type = this.getClassName()), + (t.direction1 = this.direction1.asArray()), + (t.direction2 = this.direction2.asArray()), + (t.meshId = null === (e = this.mesh) || void 0 === e ? void 0 : e.id), + (t.useMeshNormalsForDirection = this.useMeshNormalsForDirection), + t + ); + }), + (e.prototype.parse = function (e, t) { + a.e.FromArrayToRef(e.direction1, 0, this.direction1), + a.e.FromArrayToRef(e.direction2, 0, this.direction2), + e.meshId && (this.mesh = t.getLastMeshByID(e.meshId) || void 0), + (this.useMeshNormalsForDirection = e.useMeshNormalsForDirection); + }), + e + ); + })(), + Ul = (function () { + function e(t) { + (this.animations = []), + (this.renderingGroupId = 0), + (this.emitter = a.e.Zero()), + (this.emitRate = 10), + (this.manualEmitCount = -1), + (this.updateSpeed = 0.01), + (this.targetStopDuration = 0), + (this.disposeOnStop = !1), + (this.minEmitPower = 1), + (this.maxEmitPower = 1), + (this.minLifeTime = 1), + (this.maxLifeTime = 1), + (this.minSize = 1), + (this.maxSize = 1), + (this.minScaleX = 1), + (this.maxScaleX = 1), + (this.minScaleY = 1), + (this.maxScaleY = 1), + (this.minInitialRotation = 0), + (this.maxInitialRotation = 0), + (this.minAngularSpeed = 0), + (this.maxAngularSpeed = 0), + (this.layerMask = 268435455), + (this.customShader = null), + (this.preventAutoStart = !1), + (this.noiseStrength = new a.e(10, 10, 10)), + (this.onAnimationEnd = null), + (this.blendMode = e.BLENDMODE_ONEONE), + (this.forceDepthWrite = !1), + (this.preWarmCycles = 0), + (this.preWarmStepOffset = 1), + (this.spriteCellChangeSpeed = 1), + (this.startSpriteCellID = 0), + (this.endSpriteCellID = 0), + (this.spriteCellWidth = 0), + (this.spriteCellHeight = 0), + (this.spriteRandomStartCell = !1), + (this.translationPivot = new a.d(0, 0)), + (this.beginAnimationOnStart = !1), + (this.beginAnimationFrom = 0), + (this.beginAnimationTo = 60), + (this.beginAnimationLoop = !1), + (this.worldOffset = new a.e(0, 0, 0)), + (this.gravity = a.e.Zero()), + (this._colorGradients = null), + (this._sizeGradients = null), + (this._lifeTimeGradients = null), + (this._angularSpeedGradients = null), + (this._velocityGradients = null), + (this._limitVelocityGradients = null), + (this._dragGradients = null), + (this._emitRateGradients = null), + (this._startSizeGradients = null), + (this._rampGradients = null), + (this._colorRemapGradients = null), + (this._alphaRemapGradients = null), + (this.startDelay = 0), + (this.limitVelocityDamping = 0.4), + (this.color1 = new s.b(1, 1, 1, 1)), + (this.color2 = new s.b(1, 1, 1, 1)), + (this.colorDead = new s.b(0, 0, 0, 1)), + (this.textureMask = new s.b(1, 1, 1, 1)), + (this._isSubEmitter = !1), + (this.billboardMode = 7), + (this._isBillboardBased = !0), + (this._imageProcessingConfigurationDefines = new En.b()), + (this.id = t), + (this.name = t); + } + return ( + Object.defineProperty(e.prototype, "noiseTexture", { + get: function () { + return this._noiseTexture; + }, + set: function (e) { + this._noiseTexture !== e && ((this._noiseTexture = e), this._reset()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isAnimationSheetEnabled", { + get: function () { + return this._isAnimationSheetEnabled; + }, + set: function (e) { + this._isAnimationSheetEnabled != e && ((this._isAnimationSheetEnabled = e), this._reset()); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype._hasTargetStopDurationDependantGradient = function () { + return (this._startSizeGradients && this._startSizeGradients.length > 0) || (this._emitRateGradients && this._emitRateGradients.length > 0) || (this._lifeTimeGradients && this._lifeTimeGradients.length > 0); + }), + (e.prototype.getDragGradients = function () { + return this._dragGradients; + }), + (e.prototype.getLimitVelocityGradients = function () { + return this._limitVelocityGradients; + }), + (e.prototype.getColorGradients = function () { + return this._colorGradients; + }), + (e.prototype.getSizeGradients = function () { + return this._sizeGradients; + }), + (e.prototype.getColorRemapGradients = function () { + return this._colorRemapGradients; + }), + (e.prototype.getAlphaRemapGradients = function () { + return this._alphaRemapGradients; + }), + (e.prototype.getLifeTimeGradients = function () { + return this._lifeTimeGradients; + }), + (e.prototype.getAngularSpeedGradients = function () { + return this._angularSpeedGradients; + }), + (e.prototype.getVelocityGradients = function () { + return this._velocityGradients; + }), + (e.prototype.getStartSizeGradients = function () { + return this._startSizeGradients; + }), + (e.prototype.getEmitRateGradients = function () { + return this._emitRateGradients; + }), + Object.defineProperty(e.prototype, "direction1", { + get: function () { + return this.particleEmitterType.direction1 ? this.particleEmitterType.direction1 : a.e.Zero(); + }, + set: function (e) { + this.particleEmitterType.direction1 && (this.particleEmitterType.direction1 = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "direction2", { + get: function () { + return this.particleEmitterType.direction2 ? this.particleEmitterType.direction2 : a.e.Zero(); + }, + set: function (e) { + this.particleEmitterType.direction2 && (this.particleEmitterType.direction2 = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "minEmitBox", { + get: function () { + return this.particleEmitterType.minEmitBox ? this.particleEmitterType.minEmitBox : a.e.Zero(); + }, + set: function (e) { + this.particleEmitterType.minEmitBox && (this.particleEmitterType.minEmitBox = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "maxEmitBox", { + get: function () { + return this.particleEmitterType.maxEmitBox ? this.particleEmitterType.maxEmitBox : a.e.Zero(); + }, + set: function (e) { + this.particleEmitterType.maxEmitBox && (this.particleEmitterType.maxEmitBox = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isBillboardBased", { + get: function () { + return this._isBillboardBased; + }, + set: function (e) { + this._isBillboardBased !== e && ((this._isBillboardBased = e), this._reset()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "imageProcessingConfiguration", { + get: function () { + return this._imageProcessingConfiguration; + }, + set: function (e) { + this._attachImageProcessingConfiguration(e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._attachImageProcessingConfiguration = function (e) { + e !== this._imageProcessingConfiguration && (this._imageProcessingConfiguration = e || this._scene.imageProcessingConfiguration); + }), + (e.prototype._reset = function () {}), + (e.prototype._removeGradientAndTexture = function (e, t, n) { + if (!t) return this; + for (var i = 0, r = 0, o = t; r < o.length; r++) { + if (o[r].gradient === e) { + t.splice(i, 1); + break; + } + i++; + } + return n && n.dispose(), this; + }), + (e.prototype.createPointEmitter = function (e, t) { + var n = new zl(); + return (n.direction1 = e), (n.direction2 = t), (this.particleEmitterType = n), n; + }), + (e.prototype.createHemisphericEmitter = function (e, t) { + void 0 === e && (e = 1), void 0 === t && (t = 1); + var n = new kl(e, t); + return (this.particleEmitterType = n), n; + }), + (e.prototype.createSphereEmitter = function (e, t) { + void 0 === e && (e = 1), void 0 === t && (t = 1); + var n = new jl(e, t); + return (this.particleEmitterType = n), n; + }), + (e.prototype.createDirectedSphereEmitter = function (e, t, n) { + void 0 === e && (e = 1), void 0 === t && (t = new a.e(0, 1, 0)), void 0 === n && (n = new a.e(0, 1, 0)); + var i = new Bl(e, t, n); + return (this.particleEmitterType = i), i; + }), + (e.prototype.createCylinderEmitter = function (e, t, n, i) { + void 0 === e && (e = 1), void 0 === t && (t = 1), void 0 === n && (n = 1), void 0 === i && (i = 0); + var r = new Fl(e, t, n, i); + return (this.particleEmitterType = r), r; + }), + (e.prototype.createDirectedCylinderEmitter = function (e, t, n, i, r) { + void 0 === e && (e = 1), void 0 === t && (t = 1), void 0 === n && (n = 1), void 0 === i && (i = new a.e(0, 1, 0)), void 0 === r && (r = new a.e(0, 1, 0)); + var o = new Nl(e, t, n, i, r); + return (this.particleEmitterType = o), o; + }), + (e.prototype.createConeEmitter = function (e, t) { + void 0 === e && (e = 1), void 0 === t && (t = Math.PI / 4); + var n = new Ll(e, t); + return (this.particleEmitterType = n), n; + }), + (e.prototype.createBoxEmitter = function (e, t, n, i) { + var r = new wl(); + return (this.particleEmitterType = r), (this.direction1 = e), (this.direction2 = t), (this.minEmitBox = n), (this.maxEmitBox = i), r; + }), + (e.BLENDMODE_ONEONE = 0), + (e.BLENDMODE_STANDARD = 1), + (e.BLENDMODE_ADD = 2), + (e.BLENDMODE_MULTIPLY = 3), + (e.BLENDMODE_MULTIPLYADD = 4), + e + ); + })(), + Hl = (function () { + function e() {} + return ( + (e.prototype.getColorToRef = function (e) { + this.color2 ? s.b.LerpToRef(this.color1, this.color2, Math.random(), e) : e.copyFrom(this.color1); + }), + e + ); + })(), + Wl = function () {}, + Xl = (function () { + function e() {} + return ( + (e.prototype.getFactor = function () { + return void 0 === this.factor2 ? this.factor1 : this.factor1 + (this.factor2 - this.factor1) * Math.random(); + }), + e + ); + })(), + Yl = (function () { + function e() {} + return ( + (e.GetCurrentGradient = function (e, t, n) { + for (var i = 0; i < t.length - 1; i++) { + var r = t[i], + o = t[i + 1]; + if (e >= r.gradient && e <= o.gradient) return void n(r, o, (e - r.gradient) / (o.gradient - r.gradient)); + } + var a = t.length - 1; + n(t[a], t[a], 1); + }), + e + ); + })(), + Kl = (function () { + function e(t) { + (this.particleSystem = t), + (this.position = a.e.Zero()), + (this.direction = a.e.Zero()), + (this.color = new s.b(0, 0, 0, 0)), + (this.colorStep = new s.b(0, 0, 0, 0)), + (this.lifeTime = 1), + (this.age = 0), + (this.size = 0), + (this.scale = new a.d(1, 1)), + (this.angle = 0), + (this.angularSpeed = 0), + (this.cellIndex = 0), + (this._attachedSubEmitters = null), + (this._currentColor1 = new s.b(0, 0, 0, 0)), + (this._currentColor2 = new s.b(0, 0, 0, 0)), + (this._currentSize1 = 0), + (this._currentSize2 = 0), + (this._currentAngularSpeed1 = 0), + (this._currentAngularSpeed2 = 0), + (this._currentVelocity1 = 0), + (this._currentVelocity2 = 0), + (this._currentLimitVelocity1 = 0), + (this._currentLimitVelocity2 = 0), + (this._currentDrag1 = 0), + (this._currentDrag2 = 0), + (this.id = e._Count++), + this.particleSystem.isAnimationSheetEnabled && this.updateCellInfoFromSystem(); + } + return ( + (e.prototype.updateCellInfoFromSystem = function () { + this.cellIndex = this.particleSystem.startSpriteCellID; + }), + (e.prototype.updateCellIndex = function () { + var e = this.age, + t = this.particleSystem.spriteCellChangeSpeed; + this.particleSystem.spriteRandomStartCell && + (void 0 === this._randomCellOffset && (this._randomCellOffset = Math.random() * this.lifeTime), 0 === t ? ((t = 1), (e = this._randomCellOffset)) : (e += this._randomCellOffset)); + var n = this._initialEndSpriteCellID - this._initialStartSpriteCellID, + i = z.a.Clamp(((e * t) % this.lifeTime) / this.lifeTime); + this.cellIndex = (this._initialStartSpriteCellID + i * n) | 0; + }), + (e.prototype._inheritParticleInfoToSubEmitter = function (e) { + if (e.particleSystem.emitter.position) { + var t = e.particleSystem.emitter; + t.position.copyFrom(this.position), e.inheritDirection && t.setDirection(this.direction.normalize(), 0, Math.PI / 2); + } else { + e.particleSystem.emitter.copyFrom(this.position); + } + this.direction.scaleToRef(e.inheritedVelocityAmount / 2, a.c.Vector3[0]), e.particleSystem._inheritedVelocityOffset.copyFrom(a.c.Vector3[0]); + }), + (e.prototype._inheritParticleInfoToSubEmitters = function () { + var e = this; + this._attachedSubEmitters && + this._attachedSubEmitters.length > 0 && + this._attachedSubEmitters.forEach(function (t) { + e._inheritParticleInfoToSubEmitter(t); + }); + }), + (e.prototype._reset = function () { + (this.age = 0), + (this.id = e._Count++), + (this._currentColorGradient = null), + (this._currentSizeGradient = null), + (this._currentAngularSpeedGradient = null), + (this._currentVelocityGradient = null), + (this._currentLimitVelocityGradient = null), + (this._currentDragGradient = null), + (this.cellIndex = this.particleSystem.startSpriteCellID), + (this._randomCellOffset = void 0); + }), + (e.prototype.copyTo = function (e) { + e.position.copyFrom(this.position), + this._initialDirection ? (e._initialDirection ? e._initialDirection.copyFrom(this._initialDirection) : (e._initialDirection = this._initialDirection.clone())) : (e._initialDirection = null), + e.direction.copyFrom(this.direction), + this._localPosition && (e._localPosition ? e._localPosition.copyFrom(this._localPosition) : (e._localPosition = this._localPosition.clone())), + e.color.copyFrom(this.color), + e.colorStep.copyFrom(this.colorStep), + (e.lifeTime = this.lifeTime), + (e.age = this.age), + (e._randomCellOffset = this._randomCellOffset), + (e.size = this.size), + e.scale.copyFrom(this.scale), + (e.angle = this.angle), + (e.angularSpeed = this.angularSpeed), + (e.particleSystem = this.particleSystem), + (e.cellIndex = this.cellIndex), + (e.id = this.id), + (e._attachedSubEmitters = this._attachedSubEmitters), + this._currentColorGradient && ((e._currentColorGradient = this._currentColorGradient), e._currentColor1.copyFrom(this._currentColor1), e._currentColor2.copyFrom(this._currentColor2)), + this._currentSizeGradient && ((e._currentSizeGradient = this._currentSizeGradient), (e._currentSize1 = this._currentSize1), (e._currentSize2 = this._currentSize2)), + this._currentAngularSpeedGradient && + ((e._currentAngularSpeedGradient = this._currentAngularSpeedGradient), (e._currentAngularSpeed1 = this._currentAngularSpeed1), (e._currentAngularSpeed2 = this._currentAngularSpeed2)), + this._currentVelocityGradient && ((e._currentVelocityGradient = this._currentVelocityGradient), (e._currentVelocity1 = this._currentVelocity1), (e._currentVelocity2 = this._currentVelocity2)), + this._currentLimitVelocityGradient && + ((e._currentLimitVelocityGradient = this._currentLimitVelocityGradient), (e._currentLimitVelocity1 = this._currentLimitVelocity1), (e._currentLimitVelocity2 = this._currentLimitVelocity2)), + this._currentDragGradient && ((e._currentDragGradient = this._currentDragGradient), (e._currentDrag1 = this._currentDrag1), (e._currentDrag2 = this._currentDrag2)), + this.particleSystem.isAnimationSheetEnabled && ((e._initialStartSpriteCellID = this._initialStartSpriteCellID), (e._initialEndSpriteCellID = this._initialEndSpriteCellID)), + this.particleSystem.useRampGradients && e.remapData.copyFrom(this.remapData), + this._randomNoiseCoordinates1 && + (e._randomNoiseCoordinates1 + ? (e._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1), e._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)) + : ((e._randomNoiseCoordinates1 = this._randomNoiseCoordinates1.clone()), (e._randomNoiseCoordinates2 = this._randomNoiseCoordinates2.clone()))); + }), + (e._Count = 0), + e + ); + })(); + !(function (e) { + (e[(e.ATTACHED = 0)] = "ATTACHED"), (e[(e.END = 1)] = "END"); + })(Dl || (Dl = {})); + var Zl = (function () { + function e(e) { + (this.particleSystem = e), + (this.type = Dl.END), + (this.inheritDirection = !1), + (this.inheritedVelocityAmount = 0), + (e.emitter && e.emitter.dispose) || (e.emitter = new ke.a("SubemitterSystemEmitter", e.getScene())), + e.onDisposeObservable.add(function () { + e.emitter && e.emitter.dispose && e.emitter.dispose(); + }); + } + return ( + (e.prototype.clone = function () { + var t = this.particleSystem.emitter; + t ? (t instanceof a.e ? (t = t.clone()) : t instanceof ke.a && ((t = new Ee.a("", t.getScene())).isVisible = !1)) : (t = new a.e()); + var n = new e(this.particleSystem.clone("", t)); + return ( + (n.particleSystem.name += "Clone"), + (n.type = this.type), + (n.inheritDirection = this.inheritDirection), + (n.inheritedVelocityAmount = this.inheritedVelocityAmount), + (n.particleSystem._disposeEmitterOnDispose = !0), + (n.particleSystem.disposeOnStop = !0), + n + ); + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.type = this.type), (e.inheritDirection = this.inheritDirection), (e.inheritedVelocityAmount = this.inheritedVelocityAmount), (e.particleSystem = this.particleSystem.serialize()), e; + }), + (e._ParseParticleSystem = function (e, t, n) { + throw zo.a.WarnImport("ParseParticle"); + }), + (e.Parse = function (t, n, i) { + var r = t.particleSystem, + o = new e(e._ParseParticleSystem(r, n, i)); + return (o.type = t.type), (o.inheritDirection = t.inheritDirection), (o.inheritedVelocityAmount = t.inheritedVelocityAmount), (o.particleSystem._isSubEmitter = !0), o; + }), + (e.prototype.dispose = function () { + this.particleSystem.dispose(); + }), + e + ); + })(), + ql = + "\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n#include\n#include\n#include\n#include\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\nvoid main(void) {\n#include\nvec4 textureColor=texture2D(diffuseSampler,vUV);\nvec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor;\n#ifdef RAMPGRADIENT\nfloat alpha=baseColor.a;\nfloat remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0);\nvec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.));\nbaseColor.rgb*=rampColor.rgb;\n\nfloat finalAlpha=baseColor.a;\nbaseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0);\n#endif\n#ifdef BLENDMULTIPLYMODE\nfloat sourceAlpha=vColor.a*textureColor.a;\nbaseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha);\n#endif\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\n#else\n#ifdef IMAGEPROCESSING\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\nbaseColor=applyImageProcessing(baseColor);\n#endif\n#endif\ngl_FragColor=baseColor;\n}"; + Xt.a.ShadersStore.particlesPixelShader = ql; + var Ql = + "\nattribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\n\nuniform mat4 view;\nuniform mat4 projection;\nuniform vec2 translationPivot;\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos;\n#endif\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nuniform mat4 invView;\n#endif\n#include\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\nvec3 zaxis=normalize(cross(yaxis,xaxis));\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn position+alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\nvec3 normalizedToCamera=normalize(toCamera);\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn position+alignedCorner;\n}\n#endif\nvoid main(void) {\nvec2 cornerPos;\ncornerPos=(vec2(offset.x-0.5,offset.y-0.5)-translationPivot)*size+translationPivot;\n#ifdef BILLBOARD\n\nvec3 rotatedCorner;\n#ifdef BILLBOARDY\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=position-eyePosition;\nyaxis.y=0.;\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner);\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz;\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 toCamera=position-eyePosition;\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner);\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz;\n#else\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner;\n#endif\n#ifdef RAMPGRADIENT\nremapRanges=remapData;\n#endif\n\ngl_Position=projection*vec4(viewPos,1.0);\n#else\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=normalize(direction);\nvec3 worldPos=rotate(yaxis,rotatedCorner);\ngl_Position=projection*view*vec4(worldPos,1.0);\n#endif\nvColor=color;\n#ifdef ANIMATESHEET\nfloat rowOffset=floor(cellIndex/particlesInfos.z);\nfloat columnOffset=cellIndex-rowOffset*particlesInfos.z;\nvec2 uvScale=particlesInfos.xy;\nvec2 uvOffset=vec2(offset.x ,1.0-offset.y);\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\n#else\nvUV=offset;\n#endif\n\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nvec4 worldPos=invView*vec4(viewPos,1.0);\n#endif\n#include\n}"; + Xt.a.ShadersStore.particlesVertexShader = Ql; + var Jl = (function (e) { + function t(t, n, i, r, c, l) { + void 0 === r && (r = null), void 0 === c && (c = !1), void 0 === l && (l = 0.01); + var u = e.call(this, t) || this; + return ( + (u._inheritedVelocityOffset = new a.e()), + (u.onDisposeObservable = new o.c()), + (u._particles = new Array()), + (u._stockParticles = new Array()), + (u._newPartsExcess = 0), + (u._vertexBuffers = {}), + (u._scaledColorStep = new s.b(0, 0, 0, 0)), + (u._colorDiff = new s.b(0, 0, 0, 0)), + (u._scaledDirection = a.e.Zero()), + (u._scaledGravity = a.e.Zero()), + (u._currentRenderId = -1), + (u._useInstancing = !1), + (u._started = !1), + (u._stopped = !1), + (u._actualFrame = 0), + (u._currentEmitRate1 = 0), + (u._currentEmitRate2 = 0), + (u._currentStartSize1 = 0), + (u._currentStartSize2 = 0), + (u._rawTextureWidth = 256), + (u._useRampGradients = !1), + (u._disposeEmitterOnDispose = !1), + (u.isLocal = !1), + (u.recycleParticle = function (e) { + var t = u._particles.pop(); + t !== e && t.copyTo(e), u._stockParticles.push(t); + }), + (u._createParticle = function () { + var e; + if ((0 !== u._stockParticles.length ? (e = u._stockParticles.pop())._reset() : (e = new Kl(u)), u._subEmitters && u._subEmitters.length > 0)) { + var t = u._subEmitters[Math.floor(Math.random() * u._subEmitters.length)]; + (e._attachedSubEmitters = []), + t.forEach(function (t) { + if (t.type === Dl.ATTACHED) { + var n = t.clone(); + e._attachedSubEmitters.push(n), n.particleSystem.start(); + } + }); + } + return e; + }), + (u._emitFromParticle = function (e) { + if (u._subEmitters && 0 !== u._subEmitters.length) { + var t = Math.floor(Math.random() * u._subEmitters.length); + u._subEmitters[t].forEach(function (t) { + if (t.type === Dl.END) { + var n = t.clone(); + e._inheritParticleInfoToSubEmitter(n), (n.particleSystem._rootParticleSystem = u), u.activeSubSystems.push(n.particleSystem), n.particleSystem.start(); + } + }); + } + }), + (u._capacity = n), + (u._epsilon = l), + (u._isAnimationSheetEnabled = c), + (u._scene = i || E.a.LastCreatedScene), + u._attachImageProcessingConfiguration(null), + (u._customEffect = r), + u._scene.particleSystems.push(u), + (u._useInstancing = u._scene.getEngine().getCaps().instancedArrays), + u._createIndexBuffer(), + u._createVertexBuffers(), + (u.particleEmitterType = new wl()), + (u.updateFunction = function (e) { + var t = null, + n = null; + u.noiseTexture && ((t = u.noiseTexture.getSize()), (n = u.noiseTexture.getContent())); + for ( + var i, + r = function () { + i = e[o]; + var r = u._scaledUpdateSpeed, + c = i.age; + if (((i.age += r), i.age > i.lifeTime)) { + var l = i.age - c; + (r = ((i.lifeTime - c) * r) / l), (i.age = i.lifeTime); + } + var h = i.age / i.lifeTime; + u._colorGradients && u._colorGradients.length > 0 + ? Yl.GetCurrentGradient(h, u._colorGradients, function (e, t, n) { + e !== i._currentColorGradient && (i._currentColor1.copyFrom(i._currentColor2), t.getColorToRef(i._currentColor2), (i._currentColorGradient = e)), + s.b.LerpToRef(i._currentColor1, i._currentColor2, n, i.color); + }) + : (i.colorStep.scaleToRef(r, u._scaledColorStep), i.color.addInPlace(u._scaledColorStep), i.color.a < 0 && (i.color.a = 0)), + u._angularSpeedGradients && + u._angularSpeedGradients.length > 0 && + Yl.GetCurrentGradient(h, u._angularSpeedGradients, function (e, t, n) { + e !== i._currentAngularSpeedGradient && ((i._currentAngularSpeed1 = i._currentAngularSpeed2), (i._currentAngularSpeed2 = t.getFactor()), (i._currentAngularSpeedGradient = e)), + (i.angularSpeed = z.a.Lerp(i._currentAngularSpeed1, i._currentAngularSpeed2, n)); + }), + (i.angle += i.angularSpeed * r); + var d = r; + if ( + (u._velocityGradients && + u._velocityGradients.length > 0 && + Yl.GetCurrentGradient(h, u._velocityGradients, function (e, t, n) { + e !== i._currentVelocityGradient && ((i._currentVelocity1 = i._currentVelocity2), (i._currentVelocity2 = t.getFactor()), (i._currentVelocityGradient = e)), + (d *= z.a.Lerp(i._currentVelocity1, i._currentVelocity2, n)); + }), + i.direction.scaleToRef(d, u._scaledDirection), + u._limitVelocityGradients && + u._limitVelocityGradients.length > 0 && + Yl.GetCurrentGradient(h, u._limitVelocityGradients, function (e, t, n) { + e !== i._currentLimitVelocityGradient && ((i._currentLimitVelocity1 = i._currentLimitVelocity2), (i._currentLimitVelocity2 = t.getFactor()), (i._currentLimitVelocityGradient = e)); + var r = z.a.Lerp(i._currentLimitVelocity1, i._currentLimitVelocity2, n); + i.direction.length() > r && i.direction.scaleInPlace(u.limitVelocityDamping); + }), + u._dragGradients && + u._dragGradients.length > 0 && + Yl.GetCurrentGradient(h, u._dragGradients, function (e, t, n) { + e !== i._currentDragGradient && ((i._currentDrag1 = i._currentDrag2), (i._currentDrag2 = t.getFactor()), (i._currentDragGradient = e)); + var r = z.a.Lerp(i._currentDrag1, i._currentDrag2, n); + u._scaledDirection.scaleInPlace(1 - r); + }), + u.isLocal ? (i._localPosition.addInPlace(u._scaledDirection), a.e.TransformCoordinatesToRef(i._localPosition, u._emitterWorldMatrix, i.position)) : i.position.addInPlace(u._scaledDirection), + n && t && i._randomNoiseCoordinates1) + ) { + var p = u._fetchR(i._randomNoiseCoordinates1.x, i._randomNoiseCoordinates1.y, t.width, t.height, n), + f = u._fetchR(i._randomNoiseCoordinates1.z, i._randomNoiseCoordinates2.x, t.width, t.height, n), + m = u._fetchR(i._randomNoiseCoordinates2.y, i._randomNoiseCoordinates2.z, t.width, t.height, n), + g = a.c.Vector3[0], + b = a.c.Vector3[1]; + g.copyFromFloats((2 * p - 1) * u.noiseStrength.x, (2 * f - 1) * u.noiseStrength.y, (2 * m - 1) * u.noiseStrength.z), g.scaleToRef(r, b), i.direction.addInPlace(b); + } + if ( + (u.gravity.scaleToRef(r, u._scaledGravity), + i.direction.addInPlace(u._scaledGravity), + u._sizeGradients && + u._sizeGradients.length > 0 && + Yl.GetCurrentGradient(h, u._sizeGradients, function (e, t, n) { + e !== i._currentSizeGradient && ((i._currentSize1 = i._currentSize2), (i._currentSize2 = t.getFactor()), (i._currentSizeGradient = e)), + (i.size = z.a.Lerp(i._currentSize1, i._currentSize2, n)); + }), + u._useRampGradients && + (u._colorRemapGradients && + u._colorRemapGradients.length > 0 && + Yl.GetCurrentGradient(h, u._colorRemapGradients, function (e, t, n) { + var r = z.a.Lerp(e.factor1, t.factor1, n), + o = z.a.Lerp(e.factor2, t.factor2, n); + (i.remapData.x = r), (i.remapData.y = o - r); + }), + u._alphaRemapGradients && + u._alphaRemapGradients.length > 0 && + Yl.GetCurrentGradient(h, u._alphaRemapGradients, function (e, t, n) { + var r = z.a.Lerp(e.factor1, t.factor1, n), + o = z.a.Lerp(e.factor2, t.factor2, n); + (i.remapData.z = r), (i.remapData.w = o - r); + })), + u._isAnimationSheetEnabled && i.updateCellIndex(), + i._inheritParticleInfoToSubEmitters(), + i.age >= i.lifeTime) + ) + return ( + u._emitFromParticle(i), + i._attachedSubEmitters && + (i._attachedSubEmitters.forEach(function (e) { + (e.particleSystem.disposeOnStop = !0), e.particleSystem.stop(); + }), + (i._attachedSubEmitters = null)), + u.recycleParticle(i), + o--, + "continue" + ); + }, + o = 0; + o < e.length; + o++ + ) + r(); + }), + u + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "useRampGradients", { + get: function () { + return this._useRampGradients; + }, + set: function (e) { + this._useRampGradients !== e && ((this._useRampGradients = e), this._resetEffect()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "particles", { + get: function () { + return this._particles; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "ParticleSystem"; + }), + (t.prototype._addFactorGradient = function (e, t, n, i) { + var r = new Xl(); + (r.gradient = t), + (r.factor1 = n), + (r.factor2 = i), + e.push(r), + e.sort(function (e, t) { + return e.gradient < t.gradient ? -1 : e.gradient > t.gradient ? 1 : 0; + }); + }), + (t.prototype._removeFactorGradient = function (e, t) { + if (e) + for (var n = 0, i = 0, r = e; i < r.length; i++) { + if (r[i].gradient === t) { + e.splice(n, 1); + break; + } + n++; + } + }), + (t.prototype.addLifeTimeGradient = function (e, t, n) { + return this._lifeTimeGradients || (this._lifeTimeGradients = []), this._addFactorGradient(this._lifeTimeGradients, e, t, n), this; + }), + (t.prototype.removeLifeTimeGradient = function (e) { + return this._removeFactorGradient(this._lifeTimeGradients, e), this; + }), + (t.prototype.addSizeGradient = function (e, t, n) { + return this._sizeGradients || (this._sizeGradients = []), this._addFactorGradient(this._sizeGradients, e, t, n), this; + }), + (t.prototype.removeSizeGradient = function (e) { + return this._removeFactorGradient(this._sizeGradients, e), this; + }), + (t.prototype.addColorRemapGradient = function (e, t, n) { + return this._colorRemapGradients || (this._colorRemapGradients = []), this._addFactorGradient(this._colorRemapGradients, e, t, n), this; + }), + (t.prototype.removeColorRemapGradient = function (e) { + return this._removeFactorGradient(this._colorRemapGradients, e), this; + }), + (t.prototype.addAlphaRemapGradient = function (e, t, n) { + return this._alphaRemapGradients || (this._alphaRemapGradients = []), this._addFactorGradient(this._alphaRemapGradients, e, t, n), this; + }), + (t.prototype.removeAlphaRemapGradient = function (e) { + return this._removeFactorGradient(this._alphaRemapGradients, e), this; + }), + (t.prototype.addAngularSpeedGradient = function (e, t, n) { + return this._angularSpeedGradients || (this._angularSpeedGradients = []), this._addFactorGradient(this._angularSpeedGradients, e, t, n), this; + }), + (t.prototype.removeAngularSpeedGradient = function (e) { + return this._removeFactorGradient(this._angularSpeedGradients, e), this; + }), + (t.prototype.addVelocityGradient = function (e, t, n) { + return this._velocityGradients || (this._velocityGradients = []), this._addFactorGradient(this._velocityGradients, e, t, n), this; + }), + (t.prototype.removeVelocityGradient = function (e) { + return this._removeFactorGradient(this._velocityGradients, e), this; + }), + (t.prototype.addLimitVelocityGradient = function (e, t, n) { + return this._limitVelocityGradients || (this._limitVelocityGradients = []), this._addFactorGradient(this._limitVelocityGradients, e, t, n), this; + }), + (t.prototype.removeLimitVelocityGradient = function (e) { + return this._removeFactorGradient(this._limitVelocityGradients, e), this; + }), + (t.prototype.addDragGradient = function (e, t, n) { + return this._dragGradients || (this._dragGradients = []), this._addFactorGradient(this._dragGradients, e, t, n), this; + }), + (t.prototype.removeDragGradient = function (e) { + return this._removeFactorGradient(this._dragGradients, e), this; + }), + (t.prototype.addEmitRateGradient = function (e, t, n) { + return this._emitRateGradients || (this._emitRateGradients = []), this._addFactorGradient(this._emitRateGradients, e, t, n), this; + }), + (t.prototype.removeEmitRateGradient = function (e) { + return this._removeFactorGradient(this._emitRateGradients, e), this; + }), + (t.prototype.addStartSizeGradient = function (e, t, n) { + return this._startSizeGradients || (this._startSizeGradients = []), this._addFactorGradient(this._startSizeGradients, e, t, n), this; + }), + (t.prototype.removeStartSizeGradient = function (e) { + return this._removeFactorGradient(this._emitRateGradients, e), this; + }), + (t.prototype._createRampGradientTexture = function () { + if (this._rampGradients && this._rampGradients.length && !this._rampGradientsTexture) { + for (var e = new Uint8Array(4 * this._rawTextureWidth), t = s.c.Color3[0], n = 0; n < this._rawTextureWidth; n++) { + var i = n / this._rawTextureWidth; + Yl.GetCurrentGradient(i, this._rampGradients, function (i, r, o) { + s.a.LerpToRef(i.color, r.color, o, t), (e[4 * n] = 255 * t.r), (e[4 * n + 1] = 255 * t.g), (e[4 * n + 2] = 255 * t.b), (e[4 * n + 3] = 255); + }); + } + this._rampGradientsTexture = Cs.a.CreateRGBATexture(e, this._rawTextureWidth, 1, this._scene, !1, !1, ln.a.NEAREST_SAMPLINGMODE); + } + }), + (t.prototype.getRampGradients = function () { + return this._rampGradients; + }), + (t.prototype.addRampGradient = function (e, t) { + this._rampGradients || (this._rampGradients = []); + var n = new Wl(); + return ( + (n.gradient = e), + (n.color = t), + this._rampGradients.push(n), + this._rampGradients.sort(function (e, t) { + return e.gradient < t.gradient ? -1 : e.gradient > t.gradient ? 1 : 0; + }), + this._rampGradientsTexture && (this._rampGradientsTexture.dispose(), (this._rampGradientsTexture = null)), + this._createRampGradientTexture(), + this + ); + }), + (t.prototype.removeRampGradient = function (e) { + return ( + this._removeGradientAndTexture(e, this._rampGradients, this._rampGradientsTexture), + (this._rampGradientsTexture = null), + this._rampGradients && this._rampGradients.length > 0 && this._createRampGradientTexture(), + this + ); + }), + (t.prototype.addColorGradient = function (e, t, n) { + this._colorGradients || (this._colorGradients = []); + var i = new Hl(); + return ( + (i.gradient = e), + (i.color1 = t), + (i.color2 = n), + this._colorGradients.push(i), + this._colorGradients.sort(function (e, t) { + return e.gradient < t.gradient ? -1 : e.gradient > t.gradient ? 1 : 0; + }), + this + ); + }), + (t.prototype.removeColorGradient = function (e) { + if (!this._colorGradients) return this; + for (var t = 0, n = 0, i = this._colorGradients; n < i.length; n++) { + if (i[n].gradient === e) { + this._colorGradients.splice(t, 1); + break; + } + t++; + } + return this; + }), + (t.prototype._fetchR = function (e, t, n, i, r) { + return r[4 * ((((e = 0.5 * Math.abs(e) + 0.5) * n) % n | 0) + (((t = 0.5 * Math.abs(t) + 0.5) * i) % i | 0) * n)] / 255; + }), + (t.prototype._reset = function () { + this._resetEffect(); + }), + (t.prototype._resetEffect = function () { + this._vertexBuffer && (this._vertexBuffer.dispose(), (this._vertexBuffer = null)), this._spriteBuffer && (this._spriteBuffer.dispose(), (this._spriteBuffer = null)), this._createVertexBuffers(); + }), + (t.prototype._createVertexBuffers = function () { + (this._vertexBufferSize = this._useInstancing ? 10 : 12), + this._isAnimationSheetEnabled && (this._vertexBufferSize += 1), + (this._isBillboardBased && this.billboardMode !== t.BILLBOARDMODE_STRETCHED) || (this._vertexBufferSize += 3), + this._useRampGradients && (this._vertexBufferSize += 4); + var e = this._scene.getEngine(); + (this._vertexData = new Float32Array(this._capacity * this._vertexBufferSize * (this._useInstancing ? 1 : 4))), (this._vertexBuffer = new wn.a(e, this._vertexData, !0, this._vertexBufferSize)); + var n = 0, + i = this._vertexBuffer.createVertexBuffer(wn.b.PositionKind, n, 3, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers[wn.b.PositionKind] = i), (n += 3); + var r = this._vertexBuffer.createVertexBuffer(wn.b.ColorKind, n, 4, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers[wn.b.ColorKind] = r), (n += 4); + var o = this._vertexBuffer.createVertexBuffer("angle", n, 1, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers.angle = o), (n += 1); + var a, + s = this._vertexBuffer.createVertexBuffer("size", n, 2, this._vertexBufferSize, this._useInstancing); + if (((this._vertexBuffers.size = s), (n += 2), this._isAnimationSheetEnabled)) { + var c = this._vertexBuffer.createVertexBuffer("cellIndex", n, 1, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers.cellIndex = c), (n += 1); + } + if (!this._isBillboardBased || this.billboardMode === t.BILLBOARDMODE_STRETCHED) { + var l = this._vertexBuffer.createVertexBuffer("direction", n, 3, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers.direction = l), (n += 3); + } + if (this._useRampGradients) { + var u = this._vertexBuffer.createVertexBuffer("remapData", n, 4, this._vertexBufferSize, this._useInstancing); + (this._vertexBuffers.remapData = u), (n += 4); + } + if (this._useInstancing) { + var h = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]); + (this._spriteBuffer = new wn.a(e, h, !1, 2)), (a = this._spriteBuffer.createVertexBuffer("offset", 0, 2)); + } else (a = this._vertexBuffer.createVertexBuffer("offset", n, 2, this._vertexBufferSize, this._useInstancing)), (n += 2); + this._vertexBuffers.offset = a; + }), + (t.prototype._createIndexBuffer = function () { + if (!this._useInstancing) { + for (var e = [], t = 0, n = 0; n < this._capacity; n++) e.push(t), e.push(t + 1), e.push(t + 2), e.push(t), e.push(t + 2), e.push(t + 3), (t += 4); + this._indexBuffer = this._scene.getEngine().createIndexBuffer(e); + } + }), + (t.prototype.getCapacity = function () { + return this._capacity; + }), + (t.prototype.isAlive = function () { + return this._alive; + }), + (t.prototype.isStarted = function () { + return this._started; + }), + (t.prototype._prepareSubEmitterInternalArray = function () { + var e = this; + (this._subEmitters = new Array()), + this.subEmitters && + this.subEmitters.forEach(function (n) { + n instanceof t ? e._subEmitters.push([new Zl(n)]) : n instanceof Zl ? e._subEmitters.push([n]) : n instanceof Array && e._subEmitters.push(n); + }); + }), + (t.prototype.start = function (e) { + var t = this; + if ((void 0 === e && (e = this.startDelay), !this.targetStopDuration && this._hasTargetStopDurationDependantGradient())) + throw "Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set"; + if (e) + setTimeout(function () { + t.start(0); + }, e); + else { + if ( + (this._prepareSubEmitterInternalArray(), + (this._started = !0), + (this._stopped = !1), + (this._actualFrame = 0), + this._subEmitters && 0 != this._subEmitters.length && (this.activeSubSystems = new Array()), + this._emitRateGradients && + (this._emitRateGradients.length > 0 && + ((this._currentEmitRateGradient = this._emitRateGradients[0]), (this._currentEmitRate1 = this._currentEmitRateGradient.getFactor()), (this._currentEmitRate2 = this._currentEmitRate1)), + this._emitRateGradients.length > 1 && (this._currentEmitRate2 = this._emitRateGradients[1].getFactor())), + this._startSizeGradients && + (this._startSizeGradients.length > 0 && + ((this._currentStartSizeGradient = this._startSizeGradients[0]), (this._currentStartSize1 = this._currentStartSizeGradient.getFactor()), (this._currentStartSize2 = this._currentStartSize1)), + this._startSizeGradients.length > 1 && (this._currentStartSize2 = this._startSizeGradients[1].getFactor())), + this.preWarmCycles) + ) { + this.emitter instanceof ke.a && this.emitter.computeWorldMatrix(!0); + var n = this.noiseTexture; + if (n && n.onGeneratedObservable) + n.onGeneratedObservable.addOnce(function () { + setTimeout(function () { + for (var e = 0; e < t.preWarmCycles; e++) t.animate(!0), n.render(); + }); + }); + else for (var i = 0; i < this.preWarmCycles; i++) this.animate(!0); + } + this.beginAnimationOnStart && this.animations && this.animations.length > 0 && this.getScene().beginAnimation(this, this.beginAnimationFrom, this.beginAnimationTo, this.beginAnimationLoop); + } + }), + (t.prototype.stop = function (e) { + void 0 === e && (e = !0), (this._stopped = !0), e && this._stopSubEmitters(); + }), + (t.prototype.reset = function () { + (this._stockParticles = []), (this._particles = []); + }), + (t.prototype._appendParticleVertex = function (e, n, i, r) { + var o = e * this._vertexBufferSize; + if ( + ((this._vertexData[o++] = n.position.x + this.worldOffset.x), + (this._vertexData[o++] = n.position.y + this.worldOffset.y), + (this._vertexData[o++] = n.position.z + this.worldOffset.z), + (this._vertexData[o++] = n.color.r), + (this._vertexData[o++] = n.color.g), + (this._vertexData[o++] = n.color.b), + (this._vertexData[o++] = n.color.a), + (this._vertexData[o++] = n.angle), + (this._vertexData[o++] = n.scale.x * n.size), + (this._vertexData[o++] = n.scale.y * n.size), + this._isAnimationSheetEnabled && (this._vertexData[o++] = n.cellIndex), + this._isBillboardBased) + ) + this.billboardMode === t.BILLBOARDMODE_STRETCHED && ((this._vertexData[o++] = n.direction.x), (this._vertexData[o++] = n.direction.y), (this._vertexData[o++] = n.direction.z)); + else if (n._initialDirection) { + var s = n._initialDirection; + this.isLocal && (a.e.TransformNormalToRef(s, this._emitterWorldMatrix, a.c.Vector3[0]), (s = a.c.Vector3[0])), + 0 === s.x && 0 === s.z && (s.x = 0.001), + (this._vertexData[o++] = s.x), + (this._vertexData[o++] = s.y), + (this._vertexData[o++] = s.z); + } else { + var c = n.direction; + this.isLocal && (a.e.TransformNormalToRef(c, this._emitterWorldMatrix, a.c.Vector3[0]), (c = a.c.Vector3[0])), + 0 === c.x && 0 === c.z && (c.x = 0.001), + (this._vertexData[o++] = c.x), + (this._vertexData[o++] = c.y), + (this._vertexData[o++] = c.z); + } + this._useRampGradients && ((this._vertexData[o++] = n.remapData.x), (this._vertexData[o++] = n.remapData.y), (this._vertexData[o++] = n.remapData.z), (this._vertexData[o++] = n.remapData.w)), + this._useInstancing || + (this._isAnimationSheetEnabled && (0 === i ? (i = this._epsilon) : 1 === i && (i = 1 - this._epsilon), 0 === r ? (r = this._epsilon) : 1 === r && (r = 1 - this._epsilon)), + (this._vertexData[o++] = i), + (this._vertexData[o++] = r)); + }), + (t.prototype._stopSubEmitters = function () { + this.activeSubSystems && + (this.activeSubSystems.forEach(function (e) { + e.stop(!0); + }), + (this.activeSubSystems = new Array())); + }), + (t.prototype._removeFromRoot = function () { + if (this._rootParticleSystem) { + var e = this._rootParticleSystem.activeSubSystems.indexOf(this); + -1 !== e && this._rootParticleSystem.activeSubSystems.splice(e, 1), (this._rootParticleSystem = null); + } + }), + (t.prototype._update = function (e) { + var t, + n = this; + if (((this._alive = this._particles.length > 0), this.emitter.position)) { + var i = this.emitter; + this._emitterWorldMatrix = i.getWorldMatrix(); + } else { + var r = this.emitter; + this._emitterWorldMatrix = a.a.Translation(r.x, r.y, r.z); + } + this.updateFunction(this._particles); + for ( + var o, + c = function () { + if (l._particles.length === l._capacity) return "break"; + if (((t = l._createParticle()), l._particles.push(t), l.targetStopDuration && l._lifeTimeGradients && l._lifeTimeGradients.length > 0)) { + var e = z.a.Clamp(l._actualFrame / l.targetStopDuration); + Yl.GetCurrentGradient(e, l._lifeTimeGradients, function (n, i) { + var r = n, + o = i, + a = r.getFactor(), + s = o.getFactor(), + c = (e - r.gradient) / (o.gradient - r.gradient); + t.lifeTime = z.a.Lerp(a, s, c); + }); + } else t.lifeTime = z.a.RandomRange(l.minLifeTime, l.maxLifeTime); + var i = z.a.RandomRange(l.minEmitPower, l.maxEmitPower); + if ( + (l.startPositionFunction ? l.startPositionFunction(l._emitterWorldMatrix, t.position, t, l.isLocal) : l.particleEmitterType.startPositionFunction(l._emitterWorldMatrix, t.position, t, l.isLocal), + l.isLocal && (t._localPosition ? t._localPosition.copyFrom(t.position) : (t._localPosition = t.position.clone()), a.e.TransformCoordinatesToRef(t._localPosition, l._emitterWorldMatrix, t.position)), + l.startDirectionFunction ? l.startDirectionFunction(l._emitterWorldMatrix, t.direction, t, l.isLocal) : l.particleEmitterType.startDirectionFunction(l._emitterWorldMatrix, t.direction, t, l.isLocal), + 0 === i ? (t._initialDirection ? t._initialDirection.copyFrom(t.direction) : (t._initialDirection = t.direction.clone())) : (t._initialDirection = null), + t.direction.scaleInPlace(i), + l._sizeGradients && 0 !== l._sizeGradients.length + ? ((t._currentSizeGradient = l._sizeGradients[0]), + (t._currentSize1 = t._currentSizeGradient.getFactor()), + (t.size = t._currentSize1), + l._sizeGradients.length > 1 ? (t._currentSize2 = l._sizeGradients[1].getFactor()) : (t._currentSize2 = t._currentSize1)) + : (t.size = z.a.RandomRange(l.minSize, l.maxSize)), + t.scale.copyFromFloats(z.a.RandomRange(l.minScaleX, l.maxScaleX), z.a.RandomRange(l.minScaleY, l.maxScaleY)), + l._startSizeGradients && l._startSizeGradients[0] && l.targetStopDuration) + ) { + var r = l._actualFrame / l.targetStopDuration; + Yl.GetCurrentGradient(r, l._startSizeGradients, function (e, i, r) { + e !== n._currentStartSizeGradient && ((n._currentStartSize1 = n._currentStartSize2), (n._currentStartSize2 = i.getFactor()), (n._currentStartSizeGradient = e)); + var o = z.a.Lerp(n._currentStartSize1, n._currentStartSize2, r); + t.scale.scaleInPlace(o); + }); + } + l._angularSpeedGradients && 0 !== l._angularSpeedGradients.length + ? ((t._currentAngularSpeedGradient = l._angularSpeedGradients[0]), + (t.angularSpeed = t._currentAngularSpeedGradient.getFactor()), + (t._currentAngularSpeed1 = t.angularSpeed), + l._angularSpeedGradients.length > 1 ? (t._currentAngularSpeed2 = l._angularSpeedGradients[1].getFactor()) : (t._currentAngularSpeed2 = t._currentAngularSpeed1)) + : (t.angularSpeed = z.a.RandomRange(l.minAngularSpeed, l.maxAngularSpeed)), + (t.angle = z.a.RandomRange(l.minInitialRotation, l.maxInitialRotation)), + l._velocityGradients && + l._velocityGradients.length > 0 && + ((t._currentVelocityGradient = l._velocityGradients[0]), + (t._currentVelocity1 = t._currentVelocityGradient.getFactor()), + l._velocityGradients.length > 1 ? (t._currentVelocity2 = l._velocityGradients[1].getFactor()) : (t._currentVelocity2 = t._currentVelocity1)), + l._limitVelocityGradients && + l._limitVelocityGradients.length > 0 && + ((t._currentLimitVelocityGradient = l._limitVelocityGradients[0]), + (t._currentLimitVelocity1 = t._currentLimitVelocityGradient.getFactor()), + l._limitVelocityGradients.length > 1 ? (t._currentLimitVelocity2 = l._limitVelocityGradients[1].getFactor()) : (t._currentLimitVelocity2 = t._currentLimitVelocity1)), + l._dragGradients && + l._dragGradients.length > 0 && + ((t._currentDragGradient = l._dragGradients[0]), + (t._currentDrag1 = t._currentDragGradient.getFactor()), + l._dragGradients.length > 1 ? (t._currentDrag2 = l._dragGradients[1].getFactor()) : (t._currentDrag2 = t._currentDrag1)), + l._colorGradients && 0 !== l._colorGradients.length + ? ((t._currentColorGradient = l._colorGradients[0]), + t._currentColorGradient.getColorToRef(t.color), + t._currentColor1.copyFrom(t.color), + l._colorGradients.length > 1 ? l._colorGradients[1].getColorToRef(t._currentColor2) : t._currentColor2.copyFrom(t.color)) + : ((o = z.a.RandomRange(0, 1)), s.b.LerpToRef(l.color1, l.color2, o, t.color), l.colorDead.subtractToRef(t.color, l._colorDiff), l._colorDiff.scaleToRef(1 / t.lifeTime, t.colorStep)), + l._isAnimationSheetEnabled && ((t._initialStartSpriteCellID = l.startSpriteCellID), (t._initialEndSpriteCellID = l.endSpriteCellID)), + t.direction.addInPlace(l._inheritedVelocityOffset), + l._useRampGradients && (t.remapData = new a.f(0, 1, 0, 1)), + l.noiseTexture && + (t._randomNoiseCoordinates1 + ? (t._randomNoiseCoordinates1.copyFromFloats(Math.random(), Math.random(), Math.random()), t._randomNoiseCoordinates2.copyFromFloats(Math.random(), Math.random(), Math.random())) + : ((t._randomNoiseCoordinates1 = new a.e(Math.random(), Math.random(), Math.random())), (t._randomNoiseCoordinates2 = new a.e(Math.random(), Math.random(), Math.random())))), + t._inheritParticleInfoToSubEmitters(); + }, + l = this, + u = 0; + u < e; + u++ + ) { + if ("break" === c()) break; + } + }), + (t._GetAttributeNamesOrOptions = function (e, t, n) { + void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1); + var i = [wn.b.PositionKind, wn.b.ColorKind, "angle", "offset", "size"]; + return e && i.push("cellIndex"), t || i.push("direction"), n && i.push("remapData"), i; + }), + (t._GetEffectCreationOptions = function (e) { + void 0 === e && (e = !1); + var t = ["invView", "view", "projection", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "textureMask", "translationPivot", "eyePosition"]; + return e && t.push("particlesInfos"), t; + }), + (t.prototype._getEffect = function (e) { + if (this._customEffect) return this._customEffect; + var n = []; + if ( + (this._scene.clipPlane && n.push("#define CLIPPLANE"), + this._scene.clipPlane2 && n.push("#define CLIPPLANE2"), + this._scene.clipPlane3 && n.push("#define CLIPPLANE3"), + this._scene.clipPlane4 && n.push("#define CLIPPLANE4"), + this._scene.clipPlane5 && n.push("#define CLIPPLANE5"), + this._scene.clipPlane6 && n.push("#define CLIPPLANE6"), + this._isAnimationSheetEnabled && n.push("#define ANIMATESHEET"), + e === t.BLENDMODE_MULTIPLY && n.push("#define BLENDMULTIPLYMODE"), + this._useRampGradients && n.push("#define RAMPGRADIENT"), + this._isBillboardBased) + ) + switch ((n.push("#define BILLBOARD"), this.billboardMode)) { + case t.BILLBOARDMODE_Y: + n.push("#define BILLBOARDY"); + break; + case t.BILLBOARDMODE_STRETCHED: + n.push("#define BILLBOARDSTRETCHED"); + break; + case t.BILLBOARDMODE_ALL: + } + this._imageProcessingConfiguration && (this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines), n.push(this._imageProcessingConfigurationDefines.toString())); + var i = n.join("\n"); + if (this._cachedDefines !== i) { + this._cachedDefines = i; + var r = t._GetAttributeNamesOrOptions(this._isAnimationSheetEnabled, this._isBillboardBased && this.billboardMode !== t.BILLBOARDMODE_STRETCHED, this._useRampGradients), + o = t._GetEffectCreationOptions(this._isAnimationSheetEnabled), + a = ["diffuseSampler", "rampSampler"]; + En.a && (En.a.PrepareUniforms(o, this._imageProcessingConfigurationDefines), En.a.PrepareSamplers(a, this._imageProcessingConfigurationDefines)), + (this._effect = this._scene.getEngine().createEffect("particles", r, o, a, i)); + } + return this._effect; + }), + (t.prototype.animate = function (e) { + var t = this; + if ((void 0 === e && (e = !1), this._started)) { + if (!e) { + if (!this.isReady()) return; + if (this._currentRenderId === this._scene.getFrameId()) return; + this._currentRenderId = this._scene.getFrameId(); + } + var n; + if (((this._scaledUpdateSpeed = this.updateSpeed * (e ? this.preWarmStepOffset : this._scene.getAnimationRatio())), this.manualEmitCount > -1)) + (n = this.manualEmitCount), (this._newPartsExcess = 0), (this.manualEmitCount = 0); + else { + var i = this.emitRate; + if (this._emitRateGradients && this._emitRateGradients.length > 0 && this.targetStopDuration) { + var r = this._actualFrame / this.targetStopDuration; + Yl.GetCurrentGradient(r, this._emitRateGradients, function (e, n, r) { + e !== t._currentEmitRateGradient && ((t._currentEmitRate1 = t._currentEmitRate2), (t._currentEmitRate2 = n.getFactor()), (t._currentEmitRateGradient = e)), + (i = z.a.Lerp(t._currentEmitRate1, t._currentEmitRate2, r)); + }); + } + (n = (i * this._scaledUpdateSpeed) >> 0), (this._newPartsExcess += i * this._scaledUpdateSpeed - n); + } + if ( + (this._newPartsExcess > 1 && ((n += this._newPartsExcess >> 0), (this._newPartsExcess -= this._newPartsExcess >> 0)), + (this._alive = !1), + this._stopped ? (n = 0) : ((this._actualFrame += this._scaledUpdateSpeed), this.targetStopDuration && this._actualFrame >= this.targetStopDuration && this.stop()), + this._update(n), + this._stopped && (this._alive || ((this._started = !1), this.onAnimationEnd && this.onAnimationEnd(), this.disposeOnStop && this._scene._toBeDisposed.push(this))), + !e) + ) { + for (var o = 0, a = 0; a < this._particles.length; a++) { + var s = this._particles[a]; + this._appendParticleVertices(o, s), (o += this._useInstancing ? 1 : 4); + } + this._vertexBuffer && this._vertexBuffer.update(this._vertexData); + } + 0 === this.manualEmitCount && this.disposeOnStop && this.stop(); + } + }), + (t.prototype._appendParticleVertices = function (e, t) { + this._appendParticleVertex(e++, t, 0, 0), this._useInstancing || (this._appendParticleVertex(e++, t, 1, 0), this._appendParticleVertex(e++, t, 1, 1), this._appendParticleVertex(e++, t, 0, 1)); + }), + (t.prototype.rebuild = function () { + for (var e in (this._createIndexBuffer(), this._vertexBuffer && this._vertexBuffer._rebuild(), this._vertexBuffers)) this._vertexBuffers[e]._rebuild(); + }), + (t.prototype.isReady = function () { + if (!(this.emitter && this._imageProcessingConfiguration.isReady() && this.particleTexture && this.particleTexture.isReady())) return !1; + if (this.blendMode !== t.BLENDMODE_MULTIPLYADD) { + if (!this._getEffect(this.blendMode).isReady()) return !1; + } else { + if (!this._getEffect(t.BLENDMODE_MULTIPLY).isReady()) return !1; + if (!this._getEffect(t.BLENDMODE_ADD).isReady()) return !1; + } + return !0; + }), + (t.prototype._render = function (e) { + var n = this._getEffect(e), + i = this._scene.getEngine(); + i.enableEffect(n); + var r = this._scene.getViewMatrix(); + if ((n.setTexture("diffuseSampler", this.particleTexture), n.setMatrix("view", r), n.setMatrix("projection", this._scene.getProjectionMatrix()), this._isAnimationSheetEnabled && this.particleTexture)) { + var o = this.particleTexture.getBaseSize(); + n.setFloat3("particlesInfos", this.spriteCellWidth / o.width, this.spriteCellHeight / o.height, o.width / this.spriteCellWidth); + } + if ((n.setVector2("translationPivot", this.translationPivot), n.setFloat4("textureMask", this.textureMask.r, this.textureMask.g, this.textureMask.b, this.textureMask.a), this._isBillboardBased)) { + var a = this._scene.activeCamera; + n.setVector3("eyePosition", a.globalPosition); + } + if ( + (this._rampGradientsTexture && n.setTexture("rampSampler", this._rampGradientsTexture), + this._scene.clipPlane || this._scene.clipPlane2 || this._scene.clipPlane3 || this._scene.clipPlane4 || this._scene.clipPlane5 || this._scene.clipPlane6) + ) { + var s = r.clone(); + s.invert(), n.setMatrix("invView", s), Ir.a.BindClipPlane(n, this._scene); + } + switch ((i.bindBuffers(this._vertexBuffers, this._indexBuffer, n), this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess && this._imageProcessingConfiguration.bind(n), e)) { + case t.BLENDMODE_ADD: + i.setAlphaMode(1); + break; + case t.BLENDMODE_ONEONE: + i.setAlphaMode(6); + break; + case t.BLENDMODE_STANDARD: + i.setAlphaMode(2); + break; + case t.BLENDMODE_MULTIPLY: + i.setAlphaMode(4); + } + return this._useInstancing ? i.drawArraysType(Fo.a.TriangleFanDrawMode, 0, 4, this._particles.length) : i.drawElementsType(Fo.a.TriangleFillMode, 0, 6 * this._particles.length), this._particles.length; + }), + (t.prototype.render = function () { + if (!this.isReady() || !this._particles.length) return 0; + var e = this._scene.getEngine(); + e.setState(!1), this.forceDepthWrite && e.setDepthWrite(!0); + var n = 0; + return this.blendMode === t.BLENDMODE_MULTIPLYADD && (n = this._render(t.BLENDMODE_MULTIPLY) + this._render(t.BLENDMODE_ADD)), (n = this._render(this.blendMode)), e.unbindInstanceAttributes(), e.setAlphaMode(0), n; + }), + (t.prototype.dispose = function (e) { + if ( + (void 0 === e && (e = !0), + this._vertexBuffer && (this._vertexBuffer.dispose(), (this._vertexBuffer = null)), + this._spriteBuffer && (this._spriteBuffer.dispose(), (this._spriteBuffer = null)), + this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)), + e && this.particleTexture && (this.particleTexture.dispose(), (this.particleTexture = null)), + e && this.noiseTexture && (this.noiseTexture.dispose(), (this.noiseTexture = null)), + this._rampGradientsTexture && (this._rampGradientsTexture.dispose(), (this._rampGradientsTexture = null)), + this._removeFromRoot(), + this._subEmitters && this._subEmitters.length) + ) { + for (var t = 0; t < this._subEmitters.length; t++) + for (var n = 0, i = this._subEmitters[t]; n < i.length; n++) { + i[n].dispose(); + } + (this._subEmitters = []), (this.subEmitters = []); + } + this._disposeEmitterOnDispose && this.emitter && this.emitter.dispose && this.emitter.dispose(!0), + (t = this._scene.particleSystems.indexOf(this)) > -1 && this._scene.particleSystems.splice(t, 1), + this._scene._activeParticleSystems.dispose(), + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(), + this.reset(); + }), + (t.prototype.clone = function (e, n) { + var i = null, + r = null; + if (null != this.customShader) { + var o = (r = this.customShader).shaderOptions.defines.length > 0 ? r.shaderOptions.defines.join("\n") : ""; + i = this._scene.getEngine().createEffectForParticles(r.shaderPath.fragmentElement, r.shaderOptions.uniforms, r.shaderOptions.samplers, o); + } else this._customEffect && (i = this._customEffect); + var a = new t(e, this._capacity, this._scene, i); + ((a.customShader = r), + M.a.DeepCopy(this, a, ["particles", "customShader", "noiseTexture", "particleTexture", "onDisposeObservable"]), + void 0 === n && (n = this.emitter), + (a.noiseTexture = this.noiseTexture), + (a.emitter = n), + this.particleTexture) && + (this.particleTexture instanceof An.a + ? ((a.particleTexture = this.particleTexture.clone()), a.particleTexture.getContext().drawImage(this.particleTexture.getContext().canvas, 0, 0), a.particleTexture.update()) + : (a.particleTexture = new ln.a(this.particleTexture.url, this._scene))); + return ( + this._colorGradients && + this._colorGradients.forEach(function (e) { + a.addColorGradient(e.gradient, e.color1, e.color2); + }), + this._dragGradients && + this._dragGradients.forEach(function (e) { + a.addDragGradient(e.gradient, e.factor1, e.factor2); + }), + this._angularSpeedGradients && + this._angularSpeedGradients.forEach(function (e) { + a.addAngularSpeedGradient(e.gradient, e.factor1, e.factor2); + }), + this._emitRateGradients && + this._emitRateGradients.forEach(function (e) { + a.addEmitRateGradient(e.gradient, e.factor1, e.factor2); + }), + this._lifeTimeGradients && + this._lifeTimeGradients.forEach(function (e) { + a.addLifeTimeGradient(e.gradient, e.factor1, e.factor2); + }), + this._limitVelocityGradients && + this._limitVelocityGradients.forEach(function (e) { + a.addLimitVelocityGradient(e.gradient, e.factor1, e.factor2); + }), + this._sizeGradients && + this._sizeGradients.forEach(function (e) { + a.addSizeGradient(e.gradient, e.factor1, e.factor2); + }), + this._startSizeGradients && + this._startSizeGradients.forEach(function (e) { + a.addStartSizeGradient(e.gradient, e.factor1, e.factor2); + }), + this._velocityGradients && + this._velocityGradients.forEach(function (e) { + a.addVelocityGradient(e.gradient, e.factor1, e.factor2); + }), + this._rampGradients && + this._rampGradients.forEach(function (e) { + a.addRampGradient(e.gradient, e.color); + }), + this._colorRemapGradients && + this._colorRemapGradients.forEach(function (e) { + a.addColorRemapGradient(e.gradient, e.factor1, e.factor2); + }), + this._alphaRemapGradients && + this._alphaRemapGradients.forEach(function (e) { + a.addAlphaRemapGradient(e.gradient, e.factor1, e.factor2); + }), + this.preventAutoStart || a.start(), + a + ); + }), + (t.prototype.serialize = function () { + var e = {}; + if ((t._Serialize(e, this), (e.textureMask = this.textureMask.asArray()), (e.customShader = this.customShader), (e.preventAutoStart = this.preventAutoStart), this.subEmitters)) { + (e.subEmitters = []), this._subEmitters || this._prepareSubEmitterInternalArray(); + for (var n = 0, i = this._subEmitters; n < i.length; n++) { + for (var r = [], o = 0, a = i[n]; o < a.length; o++) { + var s = a[o]; + r.push(s.serialize()); + } + e.subEmitters.push(r); + } + } + return e; + }), + (t._Serialize = function (e, t) { + if (((e.name = t.name), (e.id = t.id), (e.capacity = t.getCapacity()), t.emitter.position)) { + var n = t.emitter; + e.emitterId = n.id; + } else { + var i = t.emitter; + e.emitter = i.asArray(); + } + t.particleEmitterType && (e.particleEmitterType = t.particleEmitterType.serialize()), + t.particleTexture && ((e.textureName = t.particleTexture.name), (e.invertY = t.particleTexture._invertY)), + (e.isLocal = t.isLocal), + He.a.AppendSerializedAnimations(t, e), + (e.beginAnimationOnStart = t.beginAnimationOnStart), + (e.beginAnimationFrom = t.beginAnimationFrom), + (e.beginAnimationTo = t.beginAnimationTo), + (e.beginAnimationLoop = t.beginAnimationLoop), + (e.startDelay = t.startDelay), + (e.renderingGroupId = t.renderingGroupId), + (e.isBillboardBased = t.isBillboardBased), + (e.billboardMode = t.billboardMode), + (e.minAngularSpeed = t.minAngularSpeed), + (e.maxAngularSpeed = t.maxAngularSpeed), + (e.minSize = t.minSize), + (e.maxSize = t.maxSize), + (e.minScaleX = t.minScaleX), + (e.maxScaleX = t.maxScaleX), + (e.minScaleY = t.minScaleY), + (e.maxScaleY = t.maxScaleY), + (e.minEmitPower = t.minEmitPower), + (e.maxEmitPower = t.maxEmitPower), + (e.minLifeTime = t.minLifeTime), + (e.maxLifeTime = t.maxLifeTime), + (e.emitRate = t.emitRate), + (e.gravity = t.gravity.asArray()), + (e.noiseStrength = t.noiseStrength.asArray()), + (e.color1 = t.color1.asArray()), + (e.color2 = t.color2.asArray()), + (e.colorDead = t.colorDead.asArray()), + (e.updateSpeed = t.updateSpeed), + (e.targetStopDuration = t.targetStopDuration), + (e.blendMode = t.blendMode), + (e.preWarmCycles = t.preWarmCycles), + (e.preWarmStepOffset = t.preWarmStepOffset), + (e.minInitialRotation = t.minInitialRotation), + (e.maxInitialRotation = t.maxInitialRotation), + (e.startSpriteCellID = t.startSpriteCellID), + (e.endSpriteCellID = t.endSpriteCellID), + (e.spriteCellChangeSpeed = t.spriteCellChangeSpeed), + (e.spriteCellWidth = t.spriteCellWidth), + (e.spriteCellHeight = t.spriteCellHeight), + (e.spriteRandomStartCell = t.spriteRandomStartCell), + (e.isAnimationSheetEnabled = t.isAnimationSheetEnabled); + var r = t.getColorGradients(); + if (r) { + e.colorGradients = []; + for (var o = 0, a = r; o < a.length; o++) { + var s = a[o], + c = { gradient: s.gradient, color1: s.color1.asArray() }; + s.color2 && (c.color2 = s.color2.asArray()), e.colorGradients.push(c); + } + } + var l = t.getRampGradients(); + if (l) { + e.rampGradients = []; + for (var u = 0, h = l; u < h.length; u++) { + var d = h[u]; + c = { gradient: d.gradient, color: d.color.asArray() }; + e.rampGradients.push(c); + } + e.useRampGradients = t.useRampGradients; + } + var p = t.getColorRemapGradients(); + if (p) { + e.colorRemapGradients = []; + for (var f = 0, m = p; f < m.length; f++) { + var g = m[f]; + c = { gradient: g.gradient, factor1: g.factor1 }; + void 0 !== g.factor2 && (c.factor2 = g.factor2), e.colorRemapGradients.push(c); + } + } + var b = t.getAlphaRemapGradients(); + if (b) { + e.alphaRemapGradients = []; + for (var _ = 0, v = b; _ < v.length; _++) { + var y = v[_]; + c = { gradient: y.gradient, factor1: y.factor1 }; + void 0 !== y.factor2 && (c.factor2 = y.factor2), e.alphaRemapGradients.push(c); + } + } + var C = t.getSizeGradients(); + if (C) { + e.sizeGradients = []; + for (var P = 0, x = C; P < x.length; P++) { + var T = x[P]; + c = { gradient: T.gradient, factor1: T.factor1 }; + void 0 !== T.factor2 && (c.factor2 = T.factor2), e.sizeGradients.push(c); + } + } + var S = t.getAngularSpeedGradients(); + if (S) { + e.angularSpeedGradients = []; + for (var O = 0, E = S; O < E.length; O++) { + var M = E[O]; + c = { gradient: M.gradient, factor1: M.factor1 }; + void 0 !== M.factor2 && (c.factor2 = M.factor2), e.angularSpeedGradients.push(c); + } + } + var A = t.getVelocityGradients(); + if (A) { + e.velocityGradients = []; + for (var I = 0, D = A; I < D.length; I++) { + var R = D[I]; + c = { gradient: R.gradient, factor1: R.factor1 }; + void 0 !== R.factor2 && (c.factor2 = R.factor2), e.velocityGradients.push(c); + } + } + var w = t.getDragGradients(); + if (w) { + e.dragGradients = []; + for (var L = 0, F = w; L < F.length; L++) { + var N = F[L]; + c = { gradient: N.gradient, factor1: N.factor1 }; + void 0 !== N.factor2 && (c.factor2 = N.factor2), e.dragGradients.push(c); + } + } + var k = t.getEmitRateGradients(); + if (k) { + e.emitRateGradients = []; + for (var z = 0, j = k; z < j.length; z++) { + var B = j[z]; + c = { gradient: B.gradient, factor1: B.factor1 }; + void 0 !== B.factor2 && (c.factor2 = B.factor2), e.emitRateGradients.push(c); + } + } + var V = t.getStartSizeGradients(); + if (V) { + e.startSizeGradients = []; + for (var G = 0, U = V; G < U.length; G++) { + var H = U[G]; + c = { gradient: H.gradient, factor1: H.factor1 }; + void 0 !== H.factor2 && (c.factor2 = H.factor2), e.startSizeGradients.push(c); + } + } + var W = t.getLifeTimeGradients(); + if (W) { + e.lifeTimeGradients = []; + for (var X = 0, Y = W; X < Y.length; X++) { + var K = Y[X]; + c = { gradient: K.gradient, factor1: K.factor1 }; + void 0 !== K.factor2 && (c.factor2 = K.factor2), e.lifeTimeGradients.push(c); + } + } + var Z = t.getLimitVelocityGradients(); + if (Z) { + e.limitVelocityGradients = []; + for (var q = 0, Q = Z; q < Q.length; q++) { + var J = Q[q]; + c = { gradient: J.gradient, factor1: J.factor1 }; + void 0 !== J.factor2 && (c.factor2 = J.factor2), e.limitVelocityGradients.push(c); + } + e.limitVelocityDamping = t.limitVelocityDamping; + } + t.noiseTexture && (e.noiseTexture = t.noiseTexture.serialize()); + }), + (t._Parse = function (e, t, n, i) { + if ( + (e.textureName && ((t.particleTexture = new ln.a(i + e.textureName, n, !1, void 0 === e.invertY || e.invertY)), (t.particleTexture.name = e.textureName)), + e.emitterId || 0 === e.emitterId || void 0 !== e.emitter ? (e.emitterId ? (t.emitter = n.getLastMeshByID(e.emitterId)) : (t.emitter = a.e.FromArray(e.emitter))) : (t.emitter = a.e.Zero()), + (t.isLocal = !!e.isLocal), + void 0 !== e.renderingGroupId && (t.renderingGroupId = e.renderingGroupId), + void 0 !== e.isBillboardBased && (t.isBillboardBased = e.isBillboardBased), + void 0 !== e.billboardMode && (t.billboardMode = e.billboardMode), + e.animations) + ) { + for (var r = 0; r < e.animations.length; r++) { + var o = e.animations[r], + l = c.a.GetClass("BABYLON.Animation"); + l && t.animations.push(l.Parse(o)); + } + (t.beginAnimationOnStart = e.beginAnimationOnStart), (t.beginAnimationFrom = e.beginAnimationFrom), (t.beginAnimationTo = e.beginAnimationTo), (t.beginAnimationLoop = e.beginAnimationLoop); + } + if ( + (e.autoAnimate && n.beginAnimation(t, e.autoAnimateFrom, e.autoAnimateTo, e.autoAnimateLoop, e.autoAnimateSpeed || 1), + (t.startDelay = 0 | e.startDelay), + (t.minAngularSpeed = e.minAngularSpeed), + (t.maxAngularSpeed = e.maxAngularSpeed), + (t.minSize = e.minSize), + (t.maxSize = e.maxSize), + e.minScaleX && ((t.minScaleX = e.minScaleX), (t.maxScaleX = e.maxScaleX), (t.minScaleY = e.minScaleY), (t.maxScaleY = e.maxScaleY)), + void 0 !== e.preWarmCycles && ((t.preWarmCycles = e.preWarmCycles), (t.preWarmStepOffset = e.preWarmStepOffset)), + void 0 !== e.minInitialRotation && ((t.minInitialRotation = e.minInitialRotation), (t.maxInitialRotation = e.maxInitialRotation)), + (t.minLifeTime = e.minLifeTime), + (t.maxLifeTime = e.maxLifeTime), + (t.minEmitPower = e.minEmitPower), + (t.maxEmitPower = e.maxEmitPower), + (t.emitRate = e.emitRate), + (t.gravity = a.e.FromArray(e.gravity)), + e.noiseStrength && (t.noiseStrength = a.e.FromArray(e.noiseStrength)), + (t.color1 = s.b.FromArray(e.color1)), + (t.color2 = s.b.FromArray(e.color2)), + (t.colorDead = s.b.FromArray(e.colorDead)), + (t.updateSpeed = e.updateSpeed), + (t.targetStopDuration = e.targetStopDuration), + (t.blendMode = e.blendMode), + e.colorGradients) + ) + for (var u = 0, h = e.colorGradients; u < h.length; u++) { + var d = h[u]; + t.addColorGradient(d.gradient, s.b.FromArray(d.color1), d.color2 ? s.b.FromArray(d.color2) : void 0); + } + if (e.rampGradients) { + for (var p = 0, f = e.rampGradients; p < f.length; p++) { + var m = f[p]; + t.addRampGradient(m.gradient, s.a.FromArray(m.color)); + } + t.useRampGradients = e.useRampGradients; + } + if (e.colorRemapGradients) + for (var g = 0, b = e.colorRemapGradients; g < b.length; g++) { + var _ = b[g]; + t.addColorRemapGradient(_.gradient, void 0 !== _.factor1 ? _.factor1 : _.factor, _.factor2); + } + if (e.alphaRemapGradients) + for (var v = 0, y = e.alphaRemapGradients; v < y.length; v++) { + var C = y[v]; + t.addAlphaRemapGradient(C.gradient, void 0 !== C.factor1 ? C.factor1 : C.factor, C.factor2); + } + if (e.sizeGradients) + for (var P = 0, x = e.sizeGradients; P < x.length; P++) { + var T = x[P]; + t.addSizeGradient(T.gradient, void 0 !== T.factor1 ? T.factor1 : T.factor, T.factor2); + } + if (e.angularSpeedGradients) + for (var S = 0, O = e.angularSpeedGradients; S < O.length; S++) { + var E = O[S]; + t.addAngularSpeedGradient(E.gradient, void 0 !== E.factor1 ? E.factor1 : E.factor, E.factor2); + } + if (e.velocityGradients) + for (var M = 0, A = e.velocityGradients; M < A.length; M++) { + var I = A[M]; + t.addVelocityGradient(I.gradient, void 0 !== I.factor1 ? I.factor1 : I.factor, I.factor2); + } + if (e.dragGradients) + for (var D = 0, R = e.dragGradients; D < R.length; D++) { + var w = R[D]; + t.addDragGradient(w.gradient, void 0 !== w.factor1 ? w.factor1 : w.factor, w.factor2); + } + if (e.emitRateGradients) + for (var L = 0, F = e.emitRateGradients; L < F.length; L++) { + var N = F[L]; + t.addEmitRateGradient(N.gradient, void 0 !== N.factor1 ? N.factor1 : N.factor, N.factor2); + } + if (e.startSizeGradients) + for (var k = 0, z = e.startSizeGradients; k < z.length; k++) { + var j = z[k]; + t.addStartSizeGradient(j.gradient, void 0 !== j.factor1 ? j.factor1 : j.factor, j.factor2); + } + if (e.lifeTimeGradients) + for (var B = 0, V = e.lifeTimeGradients; B < V.length; B++) { + var G = V[B]; + t.addLifeTimeGradient(G.gradient, void 0 !== G.factor1 ? G.factor1 : G.factor, G.factor2); + } + if (e.limitVelocityGradients) { + for (var U = 0, H = e.limitVelocityGradients; U < H.length; U++) { + var W = H[U]; + t.addLimitVelocityGradient(W.gradient, void 0 !== W.factor1 ? W.factor1 : W.factor, W.factor2); + } + t.limitVelocityDamping = e.limitVelocityDamping; + } + var X; + if ((e.noiseTexture && (t.noiseTexture = cs.a.Parse(e.noiseTexture, n, i)), e.particleEmitterType)) { + switch (e.particleEmitterType.type) { + case "SphereParticleEmitter": + X = new jl(); + break; + case "SphereDirectedParticleEmitter": + X = new Bl(); + break; + case "ConeEmitter": + case "ConeParticleEmitter": + X = new Ll(); + break; + case "CylinderParticleEmitter": + X = new Fl(); + break; + case "HemisphericParticleEmitter": + X = new kl(); + break; + case "BoxEmitter": + case "BoxParticleEmitter": + default: + X = new wl(); + } + X.parse(e.particleEmitterType, n); + } else (X = new wl()).parse(e, n); + (t.particleEmitterType = X), + (t.startSpriteCellID = e.startSpriteCellID), + (t.endSpriteCellID = e.endSpriteCellID), + (t.spriteCellWidth = e.spriteCellWidth), + (t.spriteCellHeight = e.spriteCellHeight), + (t.spriteCellChangeSpeed = e.spriteCellChangeSpeed), + (t.spriteRandomStartCell = e.spriteRandomStartCell); + }), + (t.Parse = function (e, n, i, r) { + void 0 === r && (r = !1); + var o = e.name, + a = null, + c = null; + if (e.customShader) { + var l = (c = e.customShader).shaderOptions.defines.length > 0 ? c.shaderOptions.defines.join("\n") : ""; + a = n.getEngine().createEffectForParticles(c.shaderPath.fragmentElement, c.shaderOptions.uniforms, c.shaderOptions.samplers, l); + } + var u = new t(o, e.capacity, n, a, e.isAnimationSheetEnabled); + if (((u.customShader = c), e.id && (u.id = e.id), e.subEmitters)) { + u.subEmitters = []; + for (var h = 0, d = e.subEmitters; h < d.length; h++) { + for (var p = [], f = 0, m = d[h]; f < m.length; f++) { + var g = m[f]; + p.push(Zl.Parse(g, n, i)); + } + u.subEmitters.push(p); + } + } + return t._Parse(e, u, n, i), (u.textureMask = s.b.FromArray(e.textureMask)), e.preventAutoStart && (u.preventAutoStart = e.preventAutoStart), r || u.preventAutoStart || u.start(), u; + }), + (t.BILLBOARDMODE_Y = 2), + (t.BILLBOARDMODE_ALL = 7), + (t.BILLBOARDMODE_STRETCHED = 8), + t + ); + })(Ul); + Zl._ParseParticleSystem = Jl.Parse; + Xt.a.ShadersStore.gpuUpdateParticlesPixelShader = "#version 300 es\nvoid main() {\ndiscard;\n}\n"; + var $l = + "#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\nuniform mat4 emitterWM;\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\n\nin vec3 position;\n#ifdef CUSTOMEMITTER\nin vec3 initialPosition;\n#endif\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\n\nout vec3 outPosition;\n#ifdef CUSTOMEMITTER\nout vec3 outInitialPosition;\n#endif\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 cellInfos;\n#endif\nvec3 getRandomVec3(float offset) {\nreturn texture(randomSampler2,vec2(float(gl_VertexID)*offset/currentCount,0)).rgb;\n}\nvec4 getRandomVec4(float offset) {\nreturn texture(randomSampler,vec2(float(gl_VertexID)*offset/currentCount,0));\n}\nvoid main() {\nfloat newAge=age+timeDelta;\n\nif (newAge>=life && stopFactor != 0.) {\nvec3 newPosition;\nvec3 newDirection;\n\nvec4 randoms=getRandomVec4(seed.x);\n\noutLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r;\noutAge=newAge-life;\n\noutSeed=seed;\n\n#ifdef SIZEGRADIENTS\noutSize.x=texture(sizeGradientSampler,vec2(0,0)).r;\n#else\noutSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g;\n#endif\noutSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b;\noutSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a;\n#ifndef COLORGRADIENTS\n\noutColor=color1+(color2-color1)*randoms.b;\n#endif\n\n#ifndef ANGULARSPEEDGRADIENTS\noutAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a;\noutAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#else\noutAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#endif\n\n#ifdef POINTEMITTER\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\nnewPosition=vec3(0,0,0);\nnewDirection=direction1+(direction2-direction1)*randoms3;\n#elif defined(BOXEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\nnewPosition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2;\nnewDirection=direction1+(direction2-direction1)*randoms3;\n#elif defined(HEMISPHERICEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat phi=2.0*PI*randoms2.x;\nfloat theta=acos(2.0*randoms2.y-1.0);\nfloat randX=cos(phi)*sin(theta);\nfloat randY=cos(theta);\nfloat randZ=sin(phi)*sin(theta);\nnewPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ);\nnewDirection=newPosition+directionRandomizer*randoms3;\n#elif defined(SPHEREEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat phi=2.0*PI*randoms2.x;\nfloat theta=acos(2.0*randoms2.y-1.0);\nfloat randX=cos(phi)*sin(theta);\nfloat randY=cos(theta);\nfloat randZ=sin(phi)*sin(theta);\nnewPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ);\n#ifdef DIRECTEDSPHEREEMITTER\nnewDirection=direction1+(direction2-direction1)*randoms3;\n#else\n\nnewDirection=newPosition+directionRandomizer*randoms3;\n#endif\n#elif defined(CYLINDEREMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat yPos=(randoms2.x-0.5)*height;\nfloat angle=randoms2.y*PI*2.;\nfloat inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange));\nfloat positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared)));\nfloat xPos=positionRadius*cos(angle);\nfloat zPos=positionRadius*sin(angle);\nnewPosition=vec3(xPos,yPos,zPos);\n#ifdef DIRECTEDCYLINDEREMITTER\nnewDirection=direction1+(direction2-direction1)*randoms3;\n#else\n\nangle=angle+((randoms3.x-0.5)*PI);\nnewDirection=vec3(cos(angle),randoms3.y-0.5,sin(angle));\nnewDirection=normalize(newDirection);\n#endif\n#elif defined(CONEEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nfloat s=2.0*PI*randoms2.x;\n#ifdef CONEEMITTERSPAWNPOINT\nfloat h=0.0001;\n#else\nfloat h=randoms2.y*height.y;\n\nh=1.-h*h;\n#endif\nfloat lRadius=radius.x-radius.x*randoms2.z*radius.y;\nlRadius=lRadius*h;\nfloat randX=lRadius*sin(s);\nfloat randZ=lRadius*cos(s);\nfloat randY=h*height.x;\nnewPosition=vec3(randX,randY,randZ);\n\nif (abs(cos(coneAngle)) == 1.0) {\nnewDirection=vec3(0.,1.0,0.);\n} else {\nvec3 randoms3=getRandomVec3(seed.z);\nnewDirection=normalize(newPosition+directionRandomizer*randoms3);\n}\n#elif defined(CUSTOMEMITTER)\nnewPosition=initialPosition;\noutInitialPosition=initialPosition;\n#else\n\nnewPosition=vec3(0.,0.,0.);\n\nnewDirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5));\n#endif\nfloat power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a;\noutPosition=(emitterWM*vec4(newPosition,1.)).xyz;\n#ifdef CUSTOMEMITTER\noutDirection=direction;\n#ifndef BILLBOARD\noutInitialDirection=direction;\n#endif\n#else\nvec3 initial=(emitterWM*vec4(newDirection,0.)).xyz;\noutDirection=initial*power;\n#ifndef BILLBOARD\noutInitialDirection=initial;\n#endif\n#endif\n#ifdef ANIMATESHEET\noutCellIndex=cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=randoms.a*outLife;\n#endif\n#endif\n#ifdef NOISE\noutNoiseCoordinates1=noiseCoordinates1;\noutNoiseCoordinates2=noiseCoordinates2;\n#endif\n} else {\nfloat directionScale=timeDelta;\noutAge=newAge;\nfloat ageGradient=newAge/life;\n#ifdef VELOCITYGRADIENTS\ndirectionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r;\n#endif\n#ifdef DRAGGRADIENTS\ndirectionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r;\n#endif\n#if defined(CUSTOMEMITTER)\noutPosition=position+(direction-position)*ageGradient;\noutInitialPosition=initialPosition;\n#else\noutPosition=position+direction*directionScale;\n#endif\noutLife=life;\noutSeed=seed;\n#ifndef COLORGRADIENTS\noutColor=color;\n#endif\n#ifdef SIZEGRADIENTS\noutSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r;\noutSize.yz=size.yz;\n#else\noutSize=size;\n#endif\n#ifndef BILLBOARD\noutInitialDirection=initialDirection;\n#endif\n#ifdef CUSTOMEMITTER\noutDirection=direction;\n#else\nvec3 updatedDirection=direction+gravity*timeDelta;\n#ifdef LIMITVELOCITYGRADIENTS\nfloat limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r;\nfloat currentVelocity=length(updatedDirection);\nif (currentVelocity>limitVelocity) {\nupdatedDirection=updatedDirection*limitVelocityDamping;\n}\n#endif\noutDirection=updatedDirection;\n#ifdef NOISE\nvec3 localPosition=outPosition-emitterWM[3].xyz;\nfloat fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r;\nfloat fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r;\nfloat fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r;\nvec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength;\noutDirection=outDirection+force*timeDelta;\noutNoiseCoordinates1=noiseCoordinates1;\noutNoiseCoordinates2=noiseCoordinates2;\n#endif\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nfloat angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r;\noutAngle=angle+angularSpeed*timeDelta;\n#else\noutAngle=vec2(angle.x+angle.y*timeDelta,angle.y);\n#endif\n#ifdef ANIMATESHEET\nfloat offsetAge=outAge;\nfloat dist=cellInfos.y-cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=cellStartOffset;\noffsetAge+=cellStartOffset;\n#else\nfloat cellStartOffset=0.;\n#endif\nfloat ratio=clamp(mod(cellStartOffset+cellInfos.z*offsetAge,life)/life,0.,1.0);\noutCellIndex=float(int(cellInfos.x+ratio*dist));\n#endif\n}\n}"; + Xt.a.ShadersStore.gpuUpdateParticlesVertexShader = $l; + var eu = + "#ifdef CLIPPLANE\nin float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nin float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nin float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nin float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nin float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nin float fClipDistance6;\n#endif"; + Xt.a.IncludesShadersStore.clipPlaneFragmentDeclaration2 = eu; + var tu = + "#version 300 es\nuniform sampler2D textureSampler;\nin vec2 vUV;\nin vec4 vColor;\nout vec4 outFragColor;\n#include\n#include\n#include\n#include\nvoid main() {\n#include\nvec4 textureColor=texture(textureSampler,vUV);\noutFragColor=textureColor*vColor;\n#ifdef BLENDMULTIPLYMODE\nfloat alpha=vColor.a*textureColor.a;\noutFragColor.rgb=outFragColor.rgb*alpha+vec3(1.0)*(1.0-alpha);\n#endif\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\n#else\n#ifdef IMAGEPROCESSING\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\noutFragColor=applyImageProcessing(outFragColor);\n#endif\n#endif\n}\n"; + Xt.a.ShadersStore.gpuRenderParticlesPixelShader = tu; + var nu = + "#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nout float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nout float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nout float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nout float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nuniform vec4 vClipPlane5;\nout float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nuniform vec4 vClipPlane6;\nout float fClipDistance6;\n#endif"; + Xt.a.IncludesShadersStore.clipPlaneVertexDeclaration2 = nu; + var iu = + "#version 300 es\nuniform mat4 view;\nuniform mat4 projection;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n\nin vec3 position;\nin float age;\nin float life;\nin vec3 size;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nin vec3 direction;\n#endif\nin float angle;\n#ifdef ANIMATESHEET\nin float cellIndex;\n#endif\nin vec2 offset;\nin vec2 uv;\nout vec2 vUV;\nout vec4 vColor;\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nuniform mat4 invView;\n#endif\n#include\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nin vec4 color;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\nvec3 zaxis=normalize(cross(yaxis,xaxis));\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn (position+worldOffset)+alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\nvec3 normalizedToCamera=normalize(toCamera);\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn (position+worldOffset)+alignedCorner;\n}\n#endif\nvoid main() {\n#ifdef ANIMATESHEET\nfloat rowOffset=floor(cellIndex/sheetInfos.z);\nfloat columnOffset=cellIndex-rowOffset*sheetInfos.z;\nvec2 uvScale=sheetInfos.xy;\nvec2 uvOffset=vec2(uv.x ,1.0-uv.y);\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\n#else\nvUV=uv;\n#endif\nfloat ratio=age/life;\n#ifdef COLORGRADIENTS\nvColor=texture(colorGradientSampler,vec2(ratio,0));\n#else\nvColor=color*vec4(1.0-ratio)+colorDead*vec4(ratio);\n#endif\nvec2 cornerPos=(offset-translationPivot)*size.yz*size.x+translationPivot;\n#ifdef BILLBOARD\nvec4 rotatedCorner;\nrotatedCorner.w=0.;\n#ifdef BILLBOARDY\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=(position+worldOffset)-eyePosition;\nyaxis.y=0.;\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner.xyz);\nvec4 viewPosition=(view*vec4(worldPos,1.0));\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 toCamera=(position+worldOffset)-eyePosition;\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner.xyz);\nvec4 viewPosition=(view*vec4(worldPos,1.0));\n#else\n\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\n\nvec4 viewPosition=view*vec4((position+worldOffset),1.0)+rotatedCorner;\n#endif\n#else\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=0.;\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nvec3 yaxis=normalize(initialDirection);\nvec3 worldPos=rotate(yaxis,rotatedCorner);\n\nvec4 viewPosition=view*vec4(worldPos,1.0);\n#endif\ngl_Position=projection*viewPosition;\n\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nvec4 worldPos=invView*viewPosition;\n#endif\n#include\n}"; + Xt.a.ShadersStore.gpuRenderParticlesVertexShader = iu; + var ru = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = !1); + var a = e.call(this, t) || this; + (a.layerMask = 268435455), + (a._accumulatedCount = 0), + (a._targetIndex = 0), + (a._currentRenderId = -1), + (a._started = !1), + (a._stopped = !1), + (a._timeDelta = 0), + (a._actualFrame = 0), + (a._rawTextureWidth = 256), + (a.onDisposeObservable = new o.c()), + (a.forceDepthWrite = !1), + (a._preWarmDone = !1), + (a._scene = i || E.a.LastCreatedScene), + a._attachImageProcessingConfiguration(null), + (a._engine = a._scene.getEngine()), + n.randomTextureSize || delete n.randomTextureSize; + var s = Object(h.a)({ capacity: 5e4, randomTextureSize: a._engine.getCaps().maxTextureSize }, n), + c = n; + isFinite(c) && (s.capacity = c), + (a._capacity = s.capacity), + (a._activeCount = s.capacity), + (a._currentActiveCount = 0), + (a._isAnimationSheetEnabled = r), + a._scene.particleSystems.push(a), + (a._updateEffectOptions = { + attributes: ["position", "initialPosition", "age", "life", "seed", "size", "color", "direction", "initialDirection", "angle", "cellIndex", "cellStartOffset", "noiseCoordinates1", "noiseCoordinates2"], + uniformsNames: [ + "currentCount", + "timeDelta", + "emitterWM", + "lifeTime", + "color1", + "color2", + "sizeRange", + "scaleRange", + "gravity", + "emitPower", + "direction1", + "direction2", + "minEmitBox", + "maxEmitBox", + "radius", + "directionRandomizer", + "height", + "coneAngle", + "stopFactor", + "angleRange", + "radiusRange", + "cellInfos", + "noiseStrength", + "limitVelocityDamping", + ], + uniformBuffersNames: [], + samplers: ["randomSampler", "randomSampler2", "sizeGradientSampler", "angularSpeedGradientSampler", "velocityGradientSampler", "limitVelocityGradientSampler", "noiseSampler", "dragGradientSampler"], + defines: "", + fallbacks: null, + onCompiled: null, + onError: null, + indexParameters: null, + maxSimultaneousLights: 0, + transformFeedbackVaryings: [], + }), + (a.particleEmitterType = new wl()); + for (var l = Math.min(a._engine.getCaps().maxTextureSize, s.randomTextureSize), u = [], d = 0; d < l; ++d) u.push(Math.random()), u.push(Math.random()), u.push(Math.random()), u.push(Math.random()); + (a._randomTexture = new Cs.a(new Float32Array(u), l, 1, 5, a._scene, !1, !1, 1, 1)), (a._randomTexture.wrapU = ln.a.WRAP_ADDRESSMODE), (a._randomTexture.wrapV = ln.a.WRAP_ADDRESSMODE), (u = []); + for (d = 0; d < l; ++d) u.push(Math.random()), u.push(Math.random()), u.push(Math.random()), u.push(Math.random()); + return ( + (a._randomTexture2 = new Cs.a(new Float32Array(u), l, 1, 5, a._scene, !1, !1, 1, 1)), + (a._randomTexture2.wrapU = ln.a.WRAP_ADDRESSMODE), + (a._randomTexture2.wrapV = ln.a.WRAP_ADDRESSMODE), + (a._randomTextureSize = l), + a + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t, "IsSupported", { + get: function () { + return !!E.a.LastCreatedEngine && E.a.LastCreatedEngine.webGLVersion > 1; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getCapacity = function () { + return this._capacity; + }), + Object.defineProperty(t.prototype, "activeParticleCount", { + get: function () { + return this._activeCount; + }, + set: function (e) { + this._activeCount = Math.min(e, this._capacity); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "isLocal", { + get: function () { + return !1; + }, + set: function (e) {}, + enumerable: !0, + configurable: !0, + }), + (t.prototype.isReady = function () { + return this._updateEffect + ? !!(this.emitter && this._updateEffect.isReady() && this._imageProcessingConfiguration.isReady() && this._renderEffect.isReady() && this.particleTexture && this.particleTexture.isReady()) + : (this._recreateUpdateEffect(), this._recreateRenderEffect(), !1); + }), + (t.prototype.isStarted = function () { + return this._started; + }), + (t.prototype.start = function (e) { + var t = this; + if ((void 0 === e && (e = this.startDelay), !this.targetStopDuration && this._hasTargetStopDurationDependantGradient())) + throw "Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set"; + e + ? setTimeout(function () { + t.start(0); + }, e) + : ((this._started = !0), + (this._stopped = !1), + (this._preWarmDone = !1), + this.beginAnimationOnStart && this.animations && this.animations.length > 0 && this.getScene().beginAnimation(this, this.beginAnimationFrom, this.beginAnimationTo, this.beginAnimationLoop)); + }), + (t.prototype.stop = function () { + this._stopped = !0; + }), + (t.prototype.reset = function () { + this._releaseBuffers(), this._releaseVAOs(), (this._currentActiveCount = 0), (this._targetIndex = 0); + }), + (t.prototype.getClassName = function () { + return "GPUParticleSystem"; + }), + (t.prototype._removeGradientAndTexture = function (t, n, i) { + return e.prototype._removeGradientAndTexture.call(this, t, n, i), this._releaseBuffers(), this; + }), + (t.prototype.addColorGradient = function (e, t, n) { + this._colorGradients || (this._colorGradients = []); + var i = new Hl(); + return ( + (i.gradient = e), + (i.color1 = t), + this._colorGradients.push(i), + this._colorGradients.sort(function (e, t) { + return e.gradient < t.gradient ? -1 : e.gradient > t.gradient ? 1 : 0; + }), + this._colorGradientsTexture && (this._colorGradientsTexture.dispose(), (this._colorGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeColorGradient = function (e) { + return this._removeGradientAndTexture(e, this._colorGradients, this._colorGradientsTexture), (this._colorGradientsTexture = null), this; + }), + (t.prototype._addFactorGradient = function (e, t, n) { + var i = new Xl(); + (i.gradient = t), + (i.factor1 = n), + e.push(i), + e.sort(function (e, t) { + return e.gradient < t.gradient ? -1 : e.gradient > t.gradient ? 1 : 0; + }), + this._releaseBuffers(); + }), + (t.prototype.addSizeGradient = function (e, t) { + return ( + this._sizeGradients || (this._sizeGradients = []), + this._addFactorGradient(this._sizeGradients, e, t), + this._sizeGradientsTexture && (this._sizeGradientsTexture.dispose(), (this._sizeGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeSizeGradient = function (e) { + return this._removeGradientAndTexture(e, this._sizeGradients, this._sizeGradientsTexture), (this._sizeGradientsTexture = null), this; + }), + (t.prototype.addAngularSpeedGradient = function (e, t) { + return ( + this._angularSpeedGradients || (this._angularSpeedGradients = []), + this._addFactorGradient(this._angularSpeedGradients, e, t), + this._angularSpeedGradientsTexture && (this._angularSpeedGradientsTexture.dispose(), (this._angularSpeedGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeAngularSpeedGradient = function (e) { + return this._removeGradientAndTexture(e, this._angularSpeedGradients, this._angularSpeedGradientsTexture), (this._angularSpeedGradientsTexture = null), this; + }), + (t.prototype.addVelocityGradient = function (e, t) { + return ( + this._velocityGradients || (this._velocityGradients = []), + this._addFactorGradient(this._velocityGradients, e, t), + this._velocityGradientsTexture && (this._velocityGradientsTexture.dispose(), (this._velocityGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeVelocityGradient = function (e) { + return this._removeGradientAndTexture(e, this._velocityGradients, this._velocityGradientsTexture), (this._velocityGradientsTexture = null), this; + }), + (t.prototype.addLimitVelocityGradient = function (e, t) { + return ( + this._limitVelocityGradients || (this._limitVelocityGradients = []), + this._addFactorGradient(this._limitVelocityGradients, e, t), + this._limitVelocityGradientsTexture && (this._limitVelocityGradientsTexture.dispose(), (this._limitVelocityGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeLimitVelocityGradient = function (e) { + return this._removeGradientAndTexture(e, this._limitVelocityGradients, this._limitVelocityGradientsTexture), (this._limitVelocityGradientsTexture = null), this; + }), + (t.prototype.addDragGradient = function (e, t) { + return ( + this._dragGradients || (this._dragGradients = []), + this._addFactorGradient(this._dragGradients, e, t), + this._dragGradientsTexture && (this._dragGradientsTexture.dispose(), (this._dragGradientsTexture = null)), + this._releaseBuffers(), + this + ); + }), + (t.prototype.removeDragGradient = function (e) { + return this._removeGradientAndTexture(e, this._dragGradients, this._dragGradientsTexture), (this._dragGradientsTexture = null), this; + }), + (t.prototype.addEmitRateGradient = function (e, t, n) { + return this; + }), + (t.prototype.removeEmitRateGradient = function (e) { + return this; + }), + (t.prototype.addStartSizeGradient = function (e, t, n) { + return this; + }), + (t.prototype.removeStartSizeGradient = function (e) { + return this; + }), + (t.prototype.addColorRemapGradient = function (e, t, n) { + return this; + }), + (t.prototype.removeColorRemapGradient = function () { + return this; + }), + (t.prototype.addAlphaRemapGradient = function (e, t, n) { + return this; + }), + (t.prototype.removeAlphaRemapGradient = function () { + return this; + }), + (t.prototype.addRampGradient = function (e, t) { + return this; + }), + (t.prototype.removeRampGradient = function () { + return this; + }), + (t.prototype.getRampGradients = function () { + return null; + }), + Object.defineProperty(t.prototype, "useRampGradients", { + get: function () { + return !1; + }, + set: function (e) {}, + enumerable: !0, + configurable: !0, + }), + (t.prototype.addLifeTimeGradient = function (e, t, n) { + return this; + }), + (t.prototype.removeLifeTimeGradient = function (e) { + return this; + }), + (t.prototype._reset = function () { + this._releaseBuffers(); + }), + (t.prototype._createUpdateVAO = function (e) { + var t = {}; + t.position = e.createVertexBuffer("position", 0, 3); + var n = 3; + this.particleEmitterType instanceof Vl && ((t.initialPosition = e.createVertexBuffer("initialPosition", n, 3)), (n += 3)), + (t.age = e.createVertexBuffer("age", n, 1)), + (n += 1), + (t.life = e.createVertexBuffer("life", n, 1)), + (n += 1), + (t.seed = e.createVertexBuffer("seed", n, 4)), + (n += 4), + (t.size = e.createVertexBuffer("size", n, 3)), + (n += 3), + this._colorGradientsTexture || ((t.color = e.createVertexBuffer("color", n, 4)), (n += 4)), + (t.direction = e.createVertexBuffer("direction", n, 3)), + (n += 3), + this._isBillboardBased || ((t.initialDirection = e.createVertexBuffer("initialDirection", n, 3)), (n += 3)), + this._angularSpeedGradientsTexture ? ((t.angle = e.createVertexBuffer("angle", n, 1)), (n += 1)) : ((t.angle = e.createVertexBuffer("angle", n, 2)), (n += 2)), + this._isAnimationSheetEnabled && ((t.cellIndex = e.createVertexBuffer("cellIndex", n, 1)), (n += 1), this.spriteRandomStartCell && ((t.cellStartOffset = e.createVertexBuffer("cellStartOffset", n, 1)), (n += 1))), + this.noiseTexture && ((t.noiseCoordinates1 = e.createVertexBuffer("noiseCoordinates1", n, 3)), (n += 3), (t.noiseCoordinates2 = e.createVertexBuffer("noiseCoordinates2", n, 3)), (n += 3)); + var i = this._engine.recordVertexArrayObject(t, null, this._updateEffect); + return this._engine.bindArrayBuffer(null), i; + }), + (t.prototype._createRenderVAO = function (e, t) { + var n = {}; + n.position = e.createVertexBuffer("position", 0, 3, this._attributesStrideSize, !0); + var i = 3; + this.particleEmitterType instanceof Vl && (i += 3), + (n.age = e.createVertexBuffer("age", i, 1, this._attributesStrideSize, !0)), + (i += 1), + (n.life = e.createVertexBuffer("life", i, 1, this._attributesStrideSize, !0)), + (i += 5), + (n.size = e.createVertexBuffer("size", i, 3, this._attributesStrideSize, !0)), + (i += 3), + this._colorGradientsTexture || ((n.color = e.createVertexBuffer("color", i, 4, this._attributesStrideSize, !0)), (i += 4)), + this.billboardMode === Jl.BILLBOARDMODE_STRETCHED && (n.direction = e.createVertexBuffer("direction", i, 3, this._attributesStrideSize, !0)), + (i += 3), + this._isBillboardBased || ((n.initialDirection = e.createVertexBuffer("initialDirection", i, 3, this._attributesStrideSize, !0)), (i += 3)), + (n.angle = e.createVertexBuffer("angle", i, 1, this._attributesStrideSize, !0)), + this._angularSpeedGradientsTexture ? i++ : (i += 2), + this._isAnimationSheetEnabled && + ((n.cellIndex = e.createVertexBuffer("cellIndex", i, 1, this._attributesStrideSize, !0)), + (i += 1), + this.spriteRandomStartCell && ((n.cellStartOffset = e.createVertexBuffer("cellStartOffset", i, 1, this._attributesStrideSize, !0)), (i += 1))), + this.noiseTexture && + ((n.noiseCoordinates1 = e.createVertexBuffer("noiseCoordinates1", i, 3, this._attributesStrideSize, !0)), + (i += 3), + (n.noiseCoordinates2 = e.createVertexBuffer("noiseCoordinates2", i, 3, this._attributesStrideSize, !0)), + (i += 3)), + (n.offset = t.createVertexBuffer("offset", 0, 2)), + (n.uv = t.createVertexBuffer("uv", 2, 2)); + var r = this._engine.recordVertexArrayObject(n, null, this._renderEffect); + return this._engine.bindArrayBuffer(null), r; + }), + (t.prototype._initialize = function (e) { + if ((void 0 === e && (e = !1), !this._buffer0 || e)) { + var t = this._scene.getEngine(), + n = new Array(); + (this._attributesStrideSize = 21), + (this._targetIndex = 0), + this.particleEmitterType instanceof Vl && (this._attributesStrideSize += 3), + this.isBillboardBased || (this._attributesStrideSize += 3), + this._colorGradientsTexture && (this._attributesStrideSize -= 4), + this._angularSpeedGradientsTexture && (this._attributesStrideSize -= 1), + this._isAnimationSheetEnabled && ((this._attributesStrideSize += 1), this.spriteRandomStartCell && (this._attributesStrideSize += 1)), + this.noiseTexture && (this._attributesStrideSize += 6); + for (var i = this.particleEmitterType instanceof Vl, r = a.c.Vector3[0], o = 0; o < this._capacity; o++) + n.push(0), + n.push(0), + n.push(0), + i && (this.particleEmitterType.particlePositionGenerator(o, null, r), n.push(r.x), n.push(r.y), n.push(r.z)), + n.push(0), + n.push(0), + n.push(Math.random()), + n.push(Math.random()), + n.push(Math.random()), + n.push(Math.random()), + n.push(0), + n.push(0), + n.push(0), + this._colorGradientsTexture || (n.push(0), n.push(0), n.push(0), n.push(0)), + i ? (this.particleEmitterType.particleDestinationGenerator(o, null, r), n.push(r.x), n.push(r.y), n.push(r.z)) : (n.push(0), n.push(0), n.push(0)), + this.isBillboardBased || (n.push(0), n.push(0), n.push(0)), + n.push(0), + this._angularSpeedGradientsTexture || n.push(0), + this._isAnimationSheetEnabled && (n.push(0), this.spriteRandomStartCell && n.push(0)), + this.noiseTexture && (n.push(Math.random()), n.push(Math.random()), n.push(Math.random()), n.push(Math.random()), n.push(Math.random()), n.push(Math.random())); + var s = new Float32Array([0.5, 0.5, 1, 1, -0.5, 0.5, 0, 1, -0.5, -0.5, 0, 0, 0.5, -0.5, 1, 0]); + (this._buffer0 = new wn.a(t, n, !1, this._attributesStrideSize)), + (this._buffer1 = new wn.a(t, n, !1, this._attributesStrideSize)), + (this._spriteBuffer = new wn.a(t, s, !1, 4)), + (this._updateVAO = []), + this._updateVAO.push(this._createUpdateVAO(this._buffer0)), + this._updateVAO.push(this._createUpdateVAO(this._buffer1)), + (this._renderVAO = []), + this._renderVAO.push(this._createRenderVAO(this._buffer1, this._spriteBuffer)), + this._renderVAO.push(this._createRenderVAO(this._buffer0, this._spriteBuffer)), + (this._sourceBuffer = this._buffer0), + (this._targetBuffer = this._buffer1); + } + }), + (t.prototype._recreateUpdateEffect = function () { + var e = this.particleEmitterType ? this.particleEmitterType.getEffectDefines() : ""; + this._isBillboardBased && (e += "\n#define BILLBOARD"), + this._colorGradientsTexture && (e += "\n#define COLORGRADIENTS"), + this._sizeGradientsTexture && (e += "\n#define SIZEGRADIENTS"), + this._angularSpeedGradientsTexture && (e += "\n#define ANGULARSPEEDGRADIENTS"), + this._velocityGradientsTexture && (e += "\n#define VELOCITYGRADIENTS"), + this._limitVelocityGradientsTexture && (e += "\n#define LIMITVELOCITYGRADIENTS"), + this._dragGradientsTexture && (e += "\n#define DRAGGRADIENTS"), + this.isAnimationSheetEnabled && ((e += "\n#define ANIMATESHEET"), this.spriteRandomStartCell && (e += "\n#define ANIMATESHEETRANDOMSTART")), + this.noiseTexture && (e += "\n#define NOISE"), + (this._updateEffect && this._updateEffectOptions.defines === e) || + ((this._updateEffectOptions.transformFeedbackVaryings = ["outPosition"]), + this.particleEmitterType instanceof Vl && this._updateEffectOptions.transformFeedbackVaryings.push("outInitialPosition"), + this._updateEffectOptions.transformFeedbackVaryings.push("outAge"), + this._updateEffectOptions.transformFeedbackVaryings.push("outLife"), + this._updateEffectOptions.transformFeedbackVaryings.push("outSeed"), + this._updateEffectOptions.transformFeedbackVaryings.push("outSize"), + this._colorGradientsTexture || this._updateEffectOptions.transformFeedbackVaryings.push("outColor"), + this._updateEffectOptions.transformFeedbackVaryings.push("outDirection"), + this._isBillboardBased || this._updateEffectOptions.transformFeedbackVaryings.push("outInitialDirection"), + this._updateEffectOptions.transformFeedbackVaryings.push("outAngle"), + this.isAnimationSheetEnabled && + (this._updateEffectOptions.transformFeedbackVaryings.push("outCellIndex"), this.spriteRandomStartCell && this._updateEffectOptions.transformFeedbackVaryings.push("outCellStartOffset")), + this.noiseTexture && (this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates1"), this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates2")), + (this._updateEffectOptions.defines = e), + (this._updateEffect = new Xt.a("gpuUpdateParticles", this._updateEffectOptions, this._scene.getEngine()))); + }), + (t.prototype._recreateRenderEffect = function () { + var e = ""; + if ( + (this._scene.clipPlane && (e = "\n#define CLIPPLANE"), + this._scene.clipPlane2 && (e = "\n#define CLIPPLANE2"), + this._scene.clipPlane3 && (e = "\n#define CLIPPLANE3"), + this._scene.clipPlane4 && (e = "\n#define CLIPPLANE4"), + this._scene.clipPlane5 && (e = "\n#define CLIPPLANE5"), + this._scene.clipPlane6 && (e = "\n#define CLIPPLANE6"), + this.blendMode === Jl.BLENDMODE_MULTIPLY && (e = "\n#define BLENDMULTIPLYMODE"), + this._isBillboardBased) + ) + switch (((e += "\n#define BILLBOARD"), this.billboardMode)) { + case Jl.BILLBOARDMODE_Y: + e += "\n#define BILLBOARDY"; + break; + case Jl.BILLBOARDMODE_STRETCHED: + e += "\n#define BILLBOARDSTRETCHED"; + break; + case Jl.BILLBOARDMODE_ALL: + } + if ( + (this._colorGradientsTexture && (e += "\n#define COLORGRADIENTS"), + this.isAnimationSheetEnabled && (e += "\n#define ANIMATESHEET"), + this._imageProcessingConfiguration && (this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines), (e += "\n" + this._imageProcessingConfigurationDefines.toString())), + !this._renderEffect || this._renderEffect.defines !== e) + ) { + var t = ["worldOffset", "view", "projection", "colorDead", "invView", "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "sheetInfos", "translationPivot", "eyePosition"], + n = ["textureSampler", "colorGradientSampler"]; + En.a && (En.a.PrepareUniforms(t, this._imageProcessingConfigurationDefines), En.a.PrepareSamplers(n, this._imageProcessingConfigurationDefines)), + (this._renderEffect = new Xt.a("gpuRenderParticles", ["position", "age", "life", "size", "color", "offset", "uv", "direction", "initialDirection", "angle", "cellIndex"], t, n, this._scene.getEngine(), e)); + } + }), + (t.prototype.animate = function (e) { + void 0 === e && (e = !1), + (this._timeDelta = this.updateSpeed * (e ? this.preWarmStepOffset : this._scene.getAnimationRatio())), + (this._actualFrame += this._timeDelta), + this._stopped || (this.targetStopDuration && this._actualFrame >= this.targetStopDuration && this.stop()); + }), + (t.prototype._createFactorGradientTexture = function (e, t) { + var n = this[t]; + if (e && e.length && !n) { + for (var i = new Float32Array(this._rawTextureWidth), r = 0; r < this._rawTextureWidth; r++) { + var o = r / this._rawTextureWidth; + Yl.GetCurrentGradient(o, e, function (e, t, n) { + i[r] = z.a.Lerp(e.factor1, t.factor1, n); + }); + } + this[t] = Cs.a.CreateRTexture(i, this._rawTextureWidth, 1, this._scene, !1, !1, ln.a.NEAREST_SAMPLINGMODE); + } + }), + (t.prototype._createSizeGradientTexture = function () { + this._createFactorGradientTexture(this._sizeGradients, "_sizeGradientsTexture"); + }), + (t.prototype._createAngularSpeedGradientTexture = function () { + this._createFactorGradientTexture(this._angularSpeedGradients, "_angularSpeedGradientsTexture"); + }), + (t.prototype._createVelocityGradientTexture = function () { + this._createFactorGradientTexture(this._velocityGradients, "_velocityGradientsTexture"); + }), + (t.prototype._createLimitVelocityGradientTexture = function () { + this._createFactorGradientTexture(this._limitVelocityGradients, "_limitVelocityGradientsTexture"); + }), + (t.prototype._createDragGradientTexture = function () { + this._createFactorGradientTexture(this._dragGradients, "_dragGradientsTexture"); + }), + (t.prototype._createColorGradientTexture = function () { + if (this._colorGradients && this._colorGradients.length && !this._colorGradientsTexture) { + for (var e = new Uint8Array(4 * this._rawTextureWidth), t = s.c.Color4[0], n = 0; n < this._rawTextureWidth; n++) { + var i = n / this._rawTextureWidth; + Yl.GetCurrentGradient(i, this._colorGradients, function (i, r, o) { + s.b.LerpToRef(i.color1, r.color1, o, t), (e[4 * n] = 255 * t.r), (e[4 * n + 1] = 255 * t.g), (e[4 * n + 2] = 255 * t.b), (e[4 * n + 3] = 255 * t.a); + }); + } + this._colorGradientsTexture = Cs.a.CreateRGBATexture(e, this._rawTextureWidth, 1, this._scene, !1, !1, ln.a.NEAREST_SAMPLINGMODE); + } + }), + (t.prototype.render = function (e) { + if ((void 0 === e && (e = !1), !this._started)) return 0; + if ( + (this._createColorGradientTexture(), + this._createSizeGradientTexture(), + this._createAngularSpeedGradientTexture(), + this._createVelocityGradientTexture(), + this._createLimitVelocityGradientTexture(), + this._createDragGradientTexture(), + this._recreateUpdateEffect(), + this._recreateRenderEffect(), + !this.isReady()) + ) + return 0; + if (!e) { + if (!this._preWarmDone && this.preWarmCycles) { + for (var t = 0; t < this.preWarmCycles; t++) this.animate(!0), this.render(!0); + this._preWarmDone = !0; + } + if (this._currentRenderId === this._scene.getFrameId()) return 0; + this._currentRenderId = this._scene.getFrameId(); + } + if ((this._initialize(), (this._accumulatedCount += this.emitRate * this._timeDelta), this._accumulatedCount > 1)) { + var n = 0 | this._accumulatedCount; + (this._accumulatedCount -= n), (this._currentActiveCount = Math.min(this._activeCount, this._currentActiveCount + n)); + } + if (!this._currentActiveCount) return 0; + var i; + if ( + (this._engine.enableEffect(this._updateEffect), + this._engine.setState(!1), + this._updateEffect.setFloat("currentCount", this._currentActiveCount), + this._updateEffect.setFloat("timeDelta", this._timeDelta), + this._updateEffect.setFloat("stopFactor", this._stopped ? 0 : 1), + this._updateEffect.setTexture("randomSampler", this._randomTexture), + this._updateEffect.setTexture("randomSampler2", this._randomTexture2), + this._updateEffect.setFloat2("lifeTime", this.minLifeTime, this.maxLifeTime), + this._updateEffect.setFloat2("emitPower", this.minEmitPower, this.maxEmitPower), + this._colorGradientsTexture || (this._updateEffect.setDirectColor4("color1", this.color1), this._updateEffect.setDirectColor4("color2", this.color2)), + this._updateEffect.setFloat2("sizeRange", this.minSize, this.maxSize), + this._updateEffect.setFloat4("scaleRange", this.minScaleX, this.maxScaleX, this.minScaleY, this.maxScaleY), + this._updateEffect.setFloat4("angleRange", this.minAngularSpeed, this.maxAngularSpeed, this.minInitialRotation, this.maxInitialRotation), + this._updateEffect.setVector3("gravity", this.gravity), + this._sizeGradientsTexture && this._updateEffect.setTexture("sizeGradientSampler", this._sizeGradientsTexture), + this._angularSpeedGradientsTexture && this._updateEffect.setTexture("angularSpeedGradientSampler", this._angularSpeedGradientsTexture), + this._velocityGradientsTexture && this._updateEffect.setTexture("velocityGradientSampler", this._velocityGradientsTexture), + this._limitVelocityGradientsTexture && + (this._updateEffect.setTexture("limitVelocityGradientSampler", this._limitVelocityGradientsTexture), this._updateEffect.setFloat("limitVelocityDamping", this.limitVelocityDamping)), + this._dragGradientsTexture && this._updateEffect.setTexture("dragGradientSampler", this._dragGradientsTexture), + this.particleEmitterType && this.particleEmitterType.applyToShader(this._updateEffect), + this._isAnimationSheetEnabled && this._updateEffect.setFloat3("cellInfos", this.startSpriteCellID, this.endSpriteCellID, this.spriteCellChangeSpeed), + this.noiseTexture && (this._updateEffect.setTexture("noiseSampler", this.noiseTexture), this._updateEffect.setVector3("noiseStrength", this.noiseStrength)), + this.emitter.position) + ) { + i = this.emitter.getWorldMatrix(); + } else { + var r = this.emitter; + i = a.a.Translation(r.x, r.y, r.z); + } + if ( + (this._updateEffect.setMatrix("emitterWM", i), + this._engine.bindVertexArrayObject(this._updateVAO[this._targetIndex], null), + this._engine.bindTransformFeedbackBuffer(this._targetBuffer.getBuffer()), + this._engine.setRasterizerState(!1), + this._engine.beginTransformFeedback(!0), + this._engine.drawArraysType(Fo.a.PointListDrawMode, 0, this._currentActiveCount), + this._engine.endTransformFeedback(), + this._engine.setRasterizerState(!0), + this._engine.bindTransformFeedbackBuffer(null), + !e) + ) { + this._engine.enableEffect(this._renderEffect); + var o = this._scene.getViewMatrix(); + if ( + (this._renderEffect.setMatrix("view", o), + this._renderEffect.setMatrix("projection", this._scene.getProjectionMatrix()), + this._renderEffect.setTexture("textureSampler", this.particleTexture), + this._renderEffect.setVector2("translationPivot", this.translationPivot), + this._renderEffect.setVector3("worldOffset", this.worldOffset), + this._colorGradientsTexture ? this._renderEffect.setTexture("colorGradientSampler", this._colorGradientsTexture) : this._renderEffect.setDirectColor4("colorDead", this.colorDead), + this._isAnimationSheetEnabled && this.particleTexture) + ) { + var s = this.particleTexture.getBaseSize(); + this._renderEffect.setFloat3("sheetInfos", this.spriteCellWidth / s.width, this.spriteCellHeight / s.height, s.width / this.spriteCellWidth); + } + if (this._isBillboardBased) { + var c = this._scene.activeCamera; + this._renderEffect.setVector3("eyePosition", c.globalPosition); + } + if (this._scene.clipPlane || this._scene.clipPlane2 || this._scene.clipPlane3 || this._scene.clipPlane4 || this._scene.clipPlane5 || this._scene.clipPlane6) { + var l = o.clone(); + l.invert(), this._renderEffect.setMatrix("invView", l), Ir.a.BindClipPlane(this._renderEffect, this._scene); + } + switch ((this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess && this._imageProcessingConfiguration.bind(this._renderEffect), this.blendMode)) { + case Jl.BLENDMODE_ADD: + this._engine.setAlphaMode(1); + break; + case Jl.BLENDMODE_ONEONE: + this._engine.setAlphaMode(6); + break; + case Jl.BLENDMODE_STANDARD: + this._engine.setAlphaMode(2); + break; + case Jl.BLENDMODE_MULTIPLY: + this._engine.setAlphaMode(4); + } + this.forceDepthWrite && this._engine.setDepthWrite(!0), + this._engine.bindVertexArrayObject(this._renderVAO[this._targetIndex], null), + this._engine.drawArraysType(Fo.a.TriangleFanDrawMode, 0, 4, this._currentActiveCount), + this._engine.setAlphaMode(0); + } + this._targetIndex++, 2 === this._targetIndex && (this._targetIndex = 0); + var u = this._sourceBuffer; + return (this._sourceBuffer = this._targetBuffer), (this._targetBuffer = u), this._currentActiveCount; + }), + (t.prototype.rebuild = function () { + this._initialize(!0); + }), + (t.prototype._releaseBuffers = function () { + this._buffer0 && (this._buffer0.dispose(), (this._buffer0 = null)), + this._buffer1 && (this._buffer1.dispose(), (this._buffer1 = null)), + this._spriteBuffer && (this._spriteBuffer.dispose(), (this._spriteBuffer = null)); + }), + (t.prototype._releaseVAOs = function () { + if (this._updateVAO) { + for (var e = 0; e < this._updateVAO.length; e++) this._engine.releaseVertexArrayObject(this._updateVAO[e]); + this._updateVAO = []; + for (e = 0; e < this._renderVAO.length; e++) this._engine.releaseVertexArrayObject(this._renderVAO[e]); + this._renderVAO = []; + } + }), + (t.prototype.dispose = function (e) { + void 0 === e && (e = !0); + var t = this._scene.particleSystems.indexOf(this); + t > -1 && this._scene.particleSystems.splice(t, 1), + this._releaseBuffers(), + this._releaseVAOs(), + this._colorGradientsTexture && (this._colorGradientsTexture.dispose(), (this._colorGradientsTexture = null)), + this._sizeGradientsTexture && (this._sizeGradientsTexture.dispose(), (this._sizeGradientsTexture = null)), + this._angularSpeedGradientsTexture && (this._angularSpeedGradientsTexture.dispose(), (this._angularSpeedGradientsTexture = null)), + this._velocityGradientsTexture && (this._velocityGradientsTexture.dispose(), (this._velocityGradientsTexture = null)), + this._limitVelocityGradientsTexture && (this._limitVelocityGradientsTexture.dispose(), (this._limitVelocityGradientsTexture = null)), + this._dragGradientsTexture && (this._dragGradientsTexture.dispose(), (this._dragGradientsTexture = null)), + this._randomTexture && (this._randomTexture.dispose(), (this._randomTexture = null)), + this._randomTexture2 && (this._randomTexture2.dispose(), (this._randomTexture2 = null)), + e && this.particleTexture && (this.particleTexture.dispose(), (this.particleTexture = null)), + e && this.noiseTexture && (this.noiseTexture.dispose(), (this.noiseTexture = null)), + this.onDisposeObservable.notifyObservers(this), + this.onDisposeObservable.clear(); + }), + (t.prototype.clone = function (e, n) { + var i = new t(e, { capacity: this._capacity, randomTextureSize: this._randomTextureSize }, this._scene); + return ( + M.a.DeepCopy(this, i, ["particles", "customShader", "noiseTexture", "particleTexture", "onDisposeObservable"]), + void 0 === n && (n = this.emitter), + (i.emitter = n), + this.particleTexture && (i.particleTexture = new ln.a(this.particleTexture.url, this._scene)), + (i.noiseTexture = this.noiseTexture), + this._colorGradients && + this._colorGradients.forEach(function (e) { + i.addColorGradient(e.gradient, e.color1, e.color2); + }), + this._dragGradients && + this._dragGradients.forEach(function (e) { + i.addDragGradient(e.gradient, e.factor1); + }), + this._angularSpeedGradients && + this._angularSpeedGradients.forEach(function (e) { + i.addAngularSpeedGradient(e.gradient, e.factor1); + }), + this._emitRateGradients && + this._emitRateGradients.forEach(function (e) { + i.addEmitRateGradient(e.gradient, e.factor1, e.factor2); + }), + this._lifeTimeGradients && + this._lifeTimeGradients.forEach(function (e) { + i.addLifeTimeGradient(e.gradient, e.factor1, e.factor2); + }), + this._limitVelocityGradients && + this._limitVelocityGradients.forEach(function (e) { + i.addLimitVelocityGradient(e.gradient, e.factor1); + }), + this._sizeGradients && + this._sizeGradients.forEach(function (e) { + i.addSizeGradient(e.gradient, e.factor1); + }), + this._startSizeGradients && + this._startSizeGradients.forEach(function (e) { + i.addStartSizeGradient(e.gradient, e.factor1, e.factor2); + }), + this._velocityGradients && + this._velocityGradients.forEach(function (e) { + i.addVelocityGradient(e.gradient, e.factor1); + }), + this._rampGradients && + this._rampGradients.forEach(function (e) { + i.addRampGradient(e.gradient, e.color); + }), + this._colorRemapGradients && + this._colorRemapGradients.forEach(function (e) { + i.addColorRemapGradient(e.gradient, e.factor1, e.factor2); + }), + this._alphaRemapGradients && + this._alphaRemapGradients.forEach(function (e) { + i.addAlphaRemapGradient(e.gradient, e.factor1, e.factor2); + }), + i + ); + }), + (t.prototype.serialize = function () { + var e = {}; + return Jl._Serialize(e, this), (e.activeParticleCount = this.activeParticleCount), e; + }), + (t.Parse = function (e, n, i, r) { + void 0 === r && (r = !1); + var o = new t(e.name, { capacity: e.capacity, randomTextureSize: e.randomTextureSize }, n); + return e.activeParticleCount && (o.activeParticleCount = e.activeParticleCount), Jl._Parse(e, o, n, i), e.preventAutoStart && (o.preventAutoStart = e.preventAutoStart), r || o.preventAutoStart || o.start(), o; + }), + t + ); + })(Ul), + ou = (function () { + function e() { + this.systems = new Array(); + } + return ( + Object.defineProperty(e.prototype, "emitterNode", { + get: function () { + return this._emitterNode; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setEmitterAsSphere = function (e, t, n) { + this._emitterNode && this._emitterNode.dispose(), (this._emitterCreationOptions = { kind: "Sphere", options: e, renderingGroupId: t }); + var i = mi.CreateSphere("emitterSphere", { diameter: e.diameter, segments: e.segments }, n); + i.renderingGroupId = t; + var r = new Mn.a("emitterSphereMaterial", n); + (r.emissiveColor = e.color), (i.material = r); + for (var o = 0, a = this.systems; o < a.length; o++) { + a[o].emitter = i; + } + this._emitterNode = i; + }), + (e.prototype.start = function (e) { + for (var t = 0, n = this.systems; t < n.length; t++) { + var i = n[t]; + e && (i.emitter = e), i.start(); + } + }), + (e.prototype.dispose = function () { + for (var e = 0, t = this.systems; e < t.length; e++) { + t[e].dispose(); + } + (this.systems = []), this._emitterNode && (this._emitterNode.dispose(), (this._emitterNode = null)); + }), + (e.prototype.serialize = function () { + for (var e = { systems: [] }, t = 0, n = this.systems; t < n.length; t++) { + var i = n[t]; + e.systems.push(i.serialize()); + } + return this._emitterNode && (e.emitter = this._emitterCreationOptions), e; + }), + (e.Parse = function (t, n, i) { + void 0 === i && (i = !1); + var r = new e(), + o = this.BaseAssetsUrl + "/textures/"; + n = n || E.a.LastCreatedScene; + for (var a = 0, c = t.systems; a < c.length; a++) { + var l = c[a]; + r.systems.push(i ? ru.Parse(l, n, o, !0) : Jl.Parse(l, n, o, !0)); + } + if (t.emitter) { + var u = t.emitter.options; + switch (t.emitter.kind) { + case "Sphere": + r.setEmitterAsSphere({ diameter: u.diameter, segments: u.segments, color: s.a.FromArray(u.color) }, t.emitter.renderingGroupId, n); + } + } + return r; + }), + (e.BaseAssetsUrl = "https://assets.babylonjs.com/particles"), + e + ); + })(), + au = (function () { + function e() {} + return ( + (e.CreateDefault = function (e, t, n, i) { + var r; + return ( + void 0 === t && (t = 500), + void 0 === i && (i = !1), + ((r = i ? new ru("default system", { capacity: t }, n) : new Jl("default system", t, n)).emitter = e), + (r.particleTexture = new ln.a("https://www.babylonjs.com/assets/Flare.png", r.getScene())), + r.createConeEmitter(0.1, Math.PI / 4), + (r.color1 = new s.b(1, 1, 1, 1)), + (r.color2 = new s.b(1, 1, 1, 1)), + (r.colorDead = new s.b(1, 1, 1, 0)), + (r.minSize = 0.1), + (r.maxSize = 0.1), + (r.minEmitPower = 2), + (r.maxEmitPower = 2), + (r.updateSpeed = 1 / 60), + (r.emitRate = 30), + r + ); + }), + (e.CreateAsync = function (t, n, i) { + void 0 === i && (i = !1), n || (n = E.a.LastCreatedScene); + var r = {}; + return ( + n._addPendingData(r), + new Promise(function (o, a) { + if (i && !ru.IsSupported) return n._removePendingData(r), a("Particle system with GPU is not supported."); + $e.b.LoadFile( + e.BaseAssetsUrl + "/systems/" + t + ".json", + function (e) { + n._removePendingData(r); + var t = JSON.parse(e.toString()); + return o(ou.Parse(t, n, i)); + }, + void 0, + void 0, + void 0, + function () { + return n._removePendingData(r), a("An error occured while the creation of your particle system. Check if your type '" + t + "' exists."); + } + ); + }) + ); + }), + (e.ExportSet = function (e) { + for (var t = new ou(), n = 0, i = e; n < i.length; n++) { + var r = i[n]; + t.systems.push(r); + } + return t; + }), + (e.BaseAssetsUrl = ou.BaseAssetsUrl), + e + ); + })(); + i.a.AddParser(me.a.NAME_PARTICLESYSTEM, function (e, t, n, r) { + var o = i.a.GetIndividualParser(me.a.NAME_PARTICLESYSTEM); + if (o && void 0 !== e.particleSystems && null !== e.particleSystems) + for (var a = 0, s = e.particleSystems.length; a < s; a++) { + var c = e.particleSystems[a]; + n.particleSystems.push(o(c, t, r)); + } + }), + i.a.AddIndividualParser(me.a.NAME_PARTICLESYSTEM, function (e, t, n) { + return e.activeParticleCount ? ru.Parse(e, t, n) : Jl.Parse(e, t, n); + }), + (ue.a.prototype.createEffectForParticles = function (e, t, n, i, r, o, a) { + void 0 === t && (t = []), void 0 === n && (n = []), void 0 === i && (i = ""); + var s = Jl._GetAttributeNamesOrOptions(), + c = Jl._GetEffectCreationOptions(); + return ( + -1 === i.indexOf(" BILLBOARD") && (i += "\n#define BILLBOARD\n"), + -1 === n.indexOf("diffuseSampler") && n.push("diffuseSampler"), + this.createEffect({ vertex: "particles", fragmentElement: e }, s, c.concat(t), n, i, r, o, a) + ); + }), + (Ee.a.prototype.getEmittedParticleSystems = function () { + for (var e = new Array(), t = 0; t < this.getScene().particleSystems.length; t++) { + var n = this.getScene().particleSystems[t]; + n.emitter === this && e.push(n); + } + return e; + }), + (Ee.a.prototype.getHierarchyEmittedParticleSystems = function () { + var e = new Array(), + t = this.getDescendants(); + t.push(this); + for (var n = 0; n < this.getScene().particleSystems.length; n++) { + var i = this.getScene().particleSystems[n], + r = i.emitter; + r.position && -1 !== t.indexOf(r) && e.push(i); + } + return e; + }); + var su, + cu = 42, + lu = (function () { + function e(e, t, n, i, r, o, c, l, u, h) { + void 0 === u && (u = null), + void 0 === h && (h = null), + (this.idx = 0), + (this.id = 0), + (this.color = new s.b(1, 1, 1, 1)), + (this.position = a.e.Zero()), + (this.rotation = a.e.Zero()), + (this.scaling = a.e.One()), + (this.uvs = new a.f(0, 0, 1, 1)), + (this.velocity = a.e.Zero()), + (this.pivot = a.e.Zero()), + (this.translateFromPivot = !1), + (this.alive = !0), + (this.isVisible = !0), + (this._pos = 0), + (this._ind = 0), + (this.shapeId = 0), + (this.idxInShape = 0), + (this._stillInvisible = !1), + (this._rotationMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]), + (this.parentId = null), + (this.materialIndex = null), + (this.cullingStrategy = ke.a.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY), + (this._globalPosition = a.e.Zero()), + (this.idx = e), + (this.id = t), + (this._pos = n), + (this._ind = i), + (this._model = r), + (this.shapeId = o), + (this.idxInShape = c), + (this._sps = l), + u && ((this._modelBoundingInfo = u), (this._boundingInfo = new ti.a(u.minimum, u.maximum))), + null !== h && (this.materialIndex = h); + } + return ( + (e.prototype.copyToRef = function (e) { + return ( + e.position.copyFrom(this.position), + e.rotation.copyFrom(this.rotation), + this.rotationQuaternion && (e.rotationQuaternion ? e.rotationQuaternion.copyFrom(this.rotationQuaternion) : (e.rotationQuaternion = this.rotationQuaternion.clone())), + e.scaling.copyFrom(this.scaling), + this.color && (e.color ? e.color.copyFrom(this.color) : (e.color = this.color.clone())), + e.uvs.copyFrom(this.uvs), + e.velocity.copyFrom(this.velocity), + e.pivot.copyFrom(this.pivot), + (e.translateFromPivot = this.translateFromPivot), + (e.alive = this.alive), + (e.isVisible = this.isVisible), + (e.parentId = this.parentId), + (e.cullingStrategy = this.cullingStrategy), + null !== this.materialIndex && (e.materialIndex = this.materialIndex), + this + ); + }), + Object.defineProperty(e.prototype, "scale", { + get: function () { + return this.scaling; + }, + set: function (e) { + this.scaling = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "quaternion", { + get: function () { + return this.rotationQuaternion; + }, + set: function (e) { + this.rotationQuaternion = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.intersectsMesh = function (e) { + return !(!this._boundingInfo || !e._boundingInfo) && (this._sps._bSphereOnly ? ni.a.Intersects(this._boundingInfo.boundingSphere, e._boundingInfo.boundingSphere) : this._boundingInfo.intersects(e._boundingInfo, !1)); + }), + (e.prototype.isInFrustum = function (e) { + return null !== this._boundingInfo && this._boundingInfo.isInFrustum(e, this.cullingStrategy); + }), + (e.prototype.getRotationMatrix = function (e) { + var t; + if (this.rotationQuaternion) t = this.rotationQuaternion; + else { + t = a.c.Quaternion[0]; + var n = this.rotation; + a.b.RotationYawPitchRollToRef(n.y, n.x, n.z, t); + } + t.toRotationMatrix(e); + }), + e + ); + })(), + uu = function (e, t, n, i, r, o, a, s, c) { + (this._indicesLength = 0), + (this.shapeID = e), + (this._shape = t), + (this._indices = n), + (this._indicesLength = n.length), + (this._shapeUV = o), + (this._shapeColors = r), + (this._normals = i), + (this._positionFunction = a), + (this._vertexFunction = s), + (this._material = c); + }, + hu = function (e, t, n) { + (this.ind = 0), (this.indicesLength = 0), (this.sqDistance = 0), (this.materialIndex = 0), (this.ind = e), (this.indicesLength = t), (this.materialIndex = n); + }, + du = (function () { + function e(e, t, n) { + (this.particles = new Array()), + (this.nbParticles = 0), + (this.billboard = !1), + (this.recomputeNormals = !1), + (this.counter = 0), + (this.vars = {}), + (this._bSphereOnly = !1), + (this._bSphereRadiusFactor = 1), + (this._positions = new Array()), + (this._indices = new Array()), + (this._normals = new Array()), + (this._colors = new Array()), + (this._uvs = new Array()), + (this._index = 0), + (this._updatable = !0), + (this._pickable = !1), + (this._isVisibilityBoxLocked = !1), + (this._alwaysVisible = !1), + (this._depthSort = !1), + (this._expandable = !1), + (this._shapeCounter = 0), + (this._copy = new lu(0, 0, 0, 0, null, 0, 0, this)), + (this._color = new s.b(0, 0, 0, 0)), + (this._computeParticleColor = !0), + (this._computeParticleTexture = !0), + (this._computeParticleRotation = !0), + (this._computeParticleVertex = !1), + (this._computeBoundingBox = !1), + (this._depthSortParticles = !0), + (this._mustUnrotateFixedNormals = !1), + (this._particlesIntersect = !1), + (this._needs32Bits = !1), + (this._isNotBuilt = !0), + (this._lastParticleId = 0), + (this._idxOfId = []), + (this._multimaterialEnabled = !1), + (this._useModelMaterial = !1), + (this._depthSortFunction = function (e, t) { + return t.sqDistance - e.sqDistance; + }), + (this._materialSortFunction = function (e, t) { + return e.materialIndex - t.materialIndex; + }), + (this._autoUpdateSubMeshes = !1), + (this.name = e), + (this._scene = t || E.a.LastCreatedScene), + (this._camera = t.activeCamera), + (this._pickable = !!n && n.isPickable), + (this._depthSort = !!n && n.enableDepthSort), + (this._multimaterialEnabled = !!n && n.enableMultiMaterial), + (this._useModelMaterial = !!n && n.useModelMaterial), + (this._multimaterialEnabled = !!this._useModelMaterial || this._multimaterialEnabled), + (this._expandable = !!n && n.expandable), + (this._particlesIntersect = !!n && n.particleIntersection), + (this._bSphereOnly = !!n && n.boundingSphereOnly), + (this._bSphereRadiusFactor = n && n.bSphereRadiusFactor ? n.bSphereRadiusFactor : 1), + n && void 0 !== n.updatable ? (this._updatable = n.updatable) : (this._updatable = !0), + this._pickable && (this.pickedParticles = []), + (this._depthSort || this._multimaterialEnabled) && (this.depthSortedParticles = []), + this._multimaterialEnabled && ((this._multimaterial = new Ta.a(this.name + "MultiMaterial", this._scene)), (this._materials = []), (this._materialIndexesById = {})); + } + return ( + (e.prototype.buildMesh = function () { + if (!this._isNotBuilt && this.mesh) return this.mesh; + if (0 === this.nbParticles && !this.mesh) { + var e = il.CreateDisc("", { radius: 1, tessellation: 3 }, this._scene); + this.addShape(e, 1), e.dispose(); + } + if ( + ((this._indices32 = this._needs32Bits ? new Uint32Array(this._indices) : new Uint16Array(this._indices)), + (this._positions32 = new Float32Array(this._positions)), + (this._uvs32 = new Float32Array(this._uvs)), + (this._colors32 = new Float32Array(this._colors)), + !this.mesh) + ) { + var t = new Ee.a(this.name, this._scene); + this.mesh = t; + } + !this._updatable && this._multimaterialEnabled && this._sortParticlesByMaterial(), + this.recomputeNormals && Rn.a.ComputeNormals(this._positions32, this._indices32, this._normals), + (this._normals32 = new Float32Array(this._normals)), + (this._fixedNormal32 = new Float32Array(this._normals)), + this._mustUnrotateFixedNormals && this._unrotateFixedNormals(); + var n = new Rn.a(); + return ( + (n.indices = this._depthSort ? this._indices : this._indices32), + n.set(this._positions32, wn.b.PositionKind), + n.set(this._normals32, wn.b.NormalKind), + this._uvs32.length > 0 && n.set(this._uvs32, wn.b.UVKind), + this._colors32.length > 0 && n.set(this._colors32, wn.b.ColorKind), + n.applyToMesh(this.mesh, this._updatable), + (this.mesh.isPickable = this._pickable), + this._multimaterialEnabled && this.setMultiMaterial(this._materials), + this._expandable || + (this._depthSort || this._multimaterialEnabled || (this._indices = null), + (this._positions = null), + (this._normals = null), + (this._uvs = null), + (this._colors = null), + this._updatable || (this.particles.length = 0)), + (this._isNotBuilt = !1), + (this.recomputeNormals = !1), + this.mesh + ); + }), + (e.prototype.digest = function (e, t) { + var n = (t && t.facetNb) || 1, + i = (t && t.number) || 0, + r = (t && t.delta) || 0, + o = e.getVerticesData(wn.b.PositionKind), + s = e.getIndices(), + c = e.getVerticesData(wn.b.UVKind), + l = e.getVerticesData(wn.b.ColorKind), + u = e.getVerticesData(wn.b.NormalKind), + h = t && t.storage ? t.storage : null, + d = 0, + p = s.length / 3; + i ? ((i = i > p ? p : i), (n = Math.round(p / i)), (r = 0)) : (n = n > p ? p : n); + for (var f = [], m = [], g = [], b = [], _ = [], v = a.e.Zero(), y = n; d < p; ) { + d > p - (n = y + Math.floor((1 + r) * Math.random())) && (n = p - d), (f.length = 0), (m.length = 0), (g.length = 0), (b.length = 0), (_.length = 0); + for (var C = 0, P = 3 * d; P < 3 * (d + n); P++) { + g.push(C); + var x = s[P], + T = 3 * x; + if ((f.push(o[T], o[T + 1], o[T + 2]), m.push(u[T], u[T + 1], u[T + 2]), c)) { + var S = 2 * x; + b.push(c[S], c[S + 1]); + } + if (l) { + var O = 4 * x; + _.push(l[O], l[O + 1], l[O + 2], l[O + 3]); + } + C++; + } + var E, + M = this.nbParticles, + A = this._posToShape(f), + I = this._uvsToShapeUV(b), + D = Array.from(g), + R = Array.from(_), + w = Array.from(m); + for (v.copyFromFloats(0, 0, 0), E = 0; E < A.length; E++) v.addInPlace(A[E]); + v.scaleInPlace(1 / A.length); + var L, + F = new a.e(1 / 0, 1 / 0, 1 / 0), + N = new a.e(-1 / 0, -1 / 0, -1 / 0); + for (E = 0; E < A.length; E++) A[E].subtractInPlace(v), F.minimizeInPlaceFromFloats(A[E].x, A[E].y, A[E].z), N.maximizeInPlaceFromFloats(A[E].x, A[E].y, A[E].z); + this._particlesIntersect && (L = new ti.a(F, N)); + var k = null; + this._useModelMaterial && (k = e.material ? e.material : this._setDefaultMaterial()); + var z = new uu(this._shapeCounter, A, D, w, R, I, null, null, k), + j = this._positions.length, + B = this._indices.length; + this._meshBuilder(this._index, B, A, this._positions, D, this._indices, b, this._uvs, R, this._colors, w, this._normals, M, 0, null, z), + this._addParticle(M, this._lastParticleId, j, B, z, this._shapeCounter, 0, L, h), + this.particles[this.nbParticles].position.addInPlace(v), + h || ((this._index += A.length), M++, this.nbParticles++, this._lastParticleId++), + this._shapeCounter++, + (d += n); + } + return (this._isNotBuilt = !0), this; + }), + (e.prototype._unrotateFixedNormals = function () { + for (var e = 0, t = 0, n = a.c.Vector3[0], i = a.c.Quaternion[0], r = a.c.Matrix[0], o = 0; o < this.particles.length; o++) { + var s = this.particles[o], + c = s._model._shape; + if (s.rotationQuaternion) s.rotationQuaternion.conjugateToRef(i); + else { + var l = s.rotation; + a.b.RotationYawPitchRollToRef(l.y, l.x, l.z, i), i.conjugateInPlace(); + } + i.toRotationMatrix(r); + for (var u = 0; u < c.length; u++) (t = e + 3 * u), a.e.TransformNormalFromFloatsToRef(this._normals32[t], this._normals32[t + 1], this._normals32[t + 2], r, n), n.toArray(this._fixedNormal32, t); + e = t + 3; + } + }), + (e.prototype._resetCopy = function () { + var e = this._copy; + e.position.setAll(0), e.rotation.setAll(0), (e.rotationQuaternion = null), e.scaling.setAll(1), e.uvs.copyFromFloats(0, 0, 1, 1), (e.color = null), (e.translateFromPivot = !1), (e.materialIndex = null); + }), + (e.prototype._meshBuilder = function (e, t, n, i, r, o, s, c, l, u, h, d, p, f, m, g) { + var b, + _ = 0, + v = 0, + y = 0; + this._resetCopy(); + var C = this._copy, + P = !(!m || !m.storage); + if (((C.idx = p), (C.idxInShape = f), this._useModelMaterial)) { + var x = g._material.uniqueId, + T = this._materialIndexesById; + T.hasOwnProperty(x) || ((T[x] = this._materials.length), this._materials.push(g._material)); + var S = T[x]; + C.materialIndex = S; + } + if ((m && m.positionFunction && (m.positionFunction(C, p, f), (this._mustUnrotateFixedNormals = !0)), P)) return C; + var O = a.c.Matrix[0], + E = a.c.Vector3[0], + M = a.c.Vector3[1], + A = a.c.Vector3[2], + I = a.c.Vector3[3]; + a.a.IdentityToRef(O), C.getRotationMatrix(O), C.pivot.multiplyToRef(C.scaling, I), C.translateFromPivot ? A.setAll(0) : A.copyFrom(I); + var D = m && m.vertexFunction; + for (b = 0; b < n.length; b++) { + if ((E.copyFrom(n[b]), D && m.vertexFunction(C, E, b), E.multiplyInPlace(C.scaling).subtractInPlace(I), a.e.TransformCoordinatesToRef(E, O, M), M.addInPlace(A).addInPlace(C.position), i.push(M.x, M.y, M.z), s)) { + var R = C.uvs; + c.push((R.z - R.x) * s[_] + R.x, (R.w - R.y) * s[_ + 1] + R.y), (_ += 2); + } + if (C.color) this._color = C.color; + else { + var w = this._color; + l && void 0 !== l[v] ? ((w.r = l[v]), (w.g = l[v + 1]), (w.b = l[v + 2]), (w.a = l[v + 3])) : ((w.r = 1), (w.g = 1), (w.b = 1), (w.a = 1)); + } + u.push(this._color.r, this._color.g, this._color.b, this._color.a), (v += 4), !this.recomputeNormals && h && (a.e.TransformNormalFromFloatsToRef(h[y], h[y + 1], h[y + 2], O, E), d.push(E.x, E.y, E.z), (y += 3)); + } + for (b = 0; b < r.length; b++) { + var L = e + r[b]; + o.push(L), L > 65535 && (this._needs32Bits = !0); + } + if (this._pickable) { + var F = r.length / 3; + for (b = 0; b < F; b++) this.pickedParticles.push({ idx: p, faceId: b }); + } + if (this._depthSort || this._multimaterialEnabled) { + var N = null !== C.materialIndex ? C.materialIndex : 0; + this.depthSortedParticles.push(new hu(t, r.length, N)); + } + return C; + }), + (e.prototype._posToShape = function (e) { + for (var t = [], n = 0; n < e.length; n += 3) t.push(a.e.FromArray(e, n)); + return t; + }), + (e.prototype._uvsToShapeUV = function (e) { + var t = []; + if (e) for (var n = 0; n < e.length; n++) t.push(e[n]); + return t; + }), + (e.prototype._addParticle = function (e, t, n, i, r, o, a, s, c) { + void 0 === s && (s = null), void 0 === c && (c = null); + var l = new lu(e, t, n, i, r, o, a, this, s); + return (c || this.particles).push(l), l; + }), + (e.prototype.addShape = function (e, t, n) { + var i = e.getVerticesData(wn.b.PositionKind), + r = e.getIndices(), + o = e.getVerticesData(wn.b.UVKind), + a = e.getVerticesData(wn.b.ColorKind), + s = e.getVerticesData(wn.b.NormalKind); + this.recomputeNormals = !s; + var c = Array.from(r), + l = Array.from(s), + u = a ? Array.from(a) : [], + h = n && n.storage ? n.storage : null, + d = null; + this._particlesIntersect && (d = e.getBoundingInfo()); + var p = this._posToShape(i), + f = this._uvsToShapeUV(o), + m = n ? n.positionFunction : null, + g = n ? n.vertexFunction : null, + b = null; + this._useModelMaterial && (b = e.material ? e.material : this._setDefaultMaterial()); + for (var _ = new uu(this._shapeCounter, p, c, l, u, f, m, g, b), v = 0; v < t; v++) this._insertNewParticle(this.nbParticles, v, _, p, r, o, a, s, d, h, n); + return this._shapeCounter++, (this._isNotBuilt = !0), this._shapeCounter - 1; + }), + (e.prototype._rebuildParticle = function (e, t) { + void 0 === t && (t = !1), this._resetCopy(); + var n = this._copy; + e._model._positionFunction && e._model._positionFunction(n, e.idx, e.idxInShape); + var i = a.c.Matrix[0], + r = a.c.Vector3[0], + o = a.c.Vector3[1], + s = a.c.Vector3[2], + c = a.c.Vector3[3]; + n.getRotationMatrix(i), e.pivot.multiplyToRef(e.scaling, c), n.translateFromPivot ? s.copyFromFloats(0, 0, 0) : s.copyFrom(c); + for (var l = e._model._shape, u = 0; u < l.length; u++) + r.copyFrom(l[u]), + e._model._vertexFunction && e._model._vertexFunction(n, r, u), + r.multiplyInPlace(n.scaling).subtractInPlace(c), + a.e.TransformCoordinatesToRef(r, i, o), + o + .addInPlace(s) + .addInPlace(n.position) + .toArray(this._positions32, e._pos + 3 * u); + t && (e.position.setAll(0), e.rotation.setAll(0), (e.rotationQuaternion = null), e.scaling.setAll(1), e.uvs.setAll(0), e.pivot.setAll(0), (e.translateFromPivot = !1), (e.parentId = null)); + }), + (e.prototype.rebuildMesh = function (e) { + void 0 === e && (e = !1); + for (var t = 0; t < this.particles.length; t++) this._rebuildParticle(this.particles[t], e); + return this.mesh.updateVerticesData(wn.b.PositionKind, this._positions32, !1, !1), this; + }), + (e.prototype.removeParticles = function (e, t) { + var n = t - e + 1; + if (!this._expandable || n <= 0 || n >= this.nbParticles || !this._updatable) return []; + var i = this.particles, + r = this.nbParticles; + if (t < r - 1) + for (var o = t + 1, a = i[o]._pos - i[e]._pos, s = i[o]._ind - i[e]._ind, c = o; c < r; c++) { + var l = i[c]; + (l._pos -= a), (l._ind -= s); + } + var u = i.splice(e, n); + (this._positions.length = 0), + (this._indices.length = 0), + (this._colors.length = 0), + (this._uvs.length = 0), + (this._normals.length = 0), + (this._index = 0), + (this._idxOfId.length = 0), + (this._depthSort || this._multimaterialEnabled) && (this.depthSortedParticles = []); + for (var h = 0, d = i.length, p = 0; p < d; p++) { + var f = i[p], + m = f._model, + g = m._shape, + b = m._indices, + _ = m._normals, + v = m._shapeColors, + y = m._shapeUV; + (f.idx = p), + (this._idxOfId[f.id] = p), + this._meshBuilder(this._index, h, g, this._positions, b, this._indices, y, this._uvs, v, this._colors, _, this._normals, f.idx, f.idxInShape, null, m), + (this._index += g.length), + (h += b.length); + } + return (this.nbParticles -= n), (this._isNotBuilt = !0), u; + }), + (e.prototype.insertParticlesFromArray = function (e) { + if (!this._expandable) return this; + for (var t = 0, n = e[0].shapeId, i = e.length, r = 0; r < i; r++) { + var o = e[r], + a = o._model, + s = a._shape, + c = a._indices, + l = a._shapeUV, + u = a._shapeColors, + h = a._normals, + d = !h; + this.recomputeNormals = d || this.recomputeNormals; + var p = o._boundingInfo, + f = this._insertNewParticle(this.nbParticles, t, a, s, c, l, u, h, p, null, null); + o.copyToRef(f), t++, n != o.shapeId && ((n = o.shapeId), (t = 0)); + } + return (this._isNotBuilt = !0), this; + }), + (e.prototype._insertNewParticle = function (e, t, n, i, r, o, a, s, c, l, u) { + var h = this._positions.length, + d = this._indices.length, + p = this._meshBuilder(this._index, d, i, this._positions, r, this._indices, o, this._uvs, a, this._colors, s, this._normals, e, t, u, n), + f = null; + return ( + this._updatable && + ((f = this._addParticle(this.nbParticles, this._lastParticleId, h, d, n, this._shapeCounter, t, c, l)).position.copyFrom(p.position), + f.rotation.copyFrom(p.rotation), + p.rotationQuaternion && (f.rotationQuaternion ? f.rotationQuaternion.copyFrom(p.rotationQuaternion) : (f.rotationQuaternion = p.rotationQuaternion.clone())), + p.color && (f.color ? f.color.copyFrom(p.color) : (f.color = p.color.clone())), + f.scaling.copyFrom(p.scaling), + f.uvs.copyFrom(p.uvs), + null !== p.materialIndex && (f.materialIndex = p.materialIndex), + this.expandable && (this._idxOfId[f.id] = f.idx)), + l || ((this._index += i.length), this.nbParticles++, this._lastParticleId++), + f + ); + }), + (e.prototype.setParticles = function (e, t, n) { + if ((void 0 === e && (e = 0), void 0 === t && (t = this.nbParticles - 1), void 0 === n && (n = !0), !this._updatable || this._isNotBuilt)) return this; + this.beforeUpdateParticles(e, t, n); + var i = a.c.Matrix[0], + r = a.c.Matrix[1], + o = this.mesh, + s = this._colors32, + c = this._positions32, + l = this._normals32, + u = this._uvs32, + h = this._indices32, + d = this._indices, + p = this._fixedNormal32, + f = a.c.Vector3, + m = f[5].copyFromFloats(1, 0, 0), + g = f[6].copyFromFloats(0, 1, 0), + b = f[7].copyFromFloats(0, 0, 1), + _ = f[8].setAll(Number.MAX_VALUE), + v = f[9].setAll(-Number.MAX_VALUE), + y = f[10].setAll(0); + if (((this.billboard || this._depthSort) && (this.mesh.computeWorldMatrix(!0), this.mesh._worldMatrix.invertToRef(r)), this.billboard)) { + var C = f[0]; + this._camera.getDirectionToRef(Be.a.Z, C), a.e.TransformNormalToRef(C, r, b), b.normalize(); + var P = this._camera.getViewMatrix(!0); + a.e.TransformNormalFromFloatsToRef(P.m[1], P.m[5], P.m[9], r, g), a.e.CrossToRef(g, b, m), g.normalize(), m.normalize(); + } + this._depthSort && a.e.TransformCoordinatesToRef(this._camera.globalPosition, r, y), a.a.IdentityToRef(i); + var x = 0, + T = 0, + S = 0, + O = 0, + E = 0, + M = 0, + A = 0; + if ((this.mesh.isFacetDataEnabled && (this._computeBoundingBox = !0), (t = t >= this.nbParticles ? this.nbParticles - 1 : t), this._computeBoundingBox && (0 != e || t != this.nbParticles - 1))) { + var I = this.mesh._boundingInfo; + I && (_.copyFrom(I.minimum), v.copyFrom(I.maximum)); + } + var D = ((T = this.particles[e]._pos) / 3) | 0; + (O = 4 * D), (M = 2 * D); + for (var R = e; R <= t; R++) { + var w = this.particles[R]; + this.updateParticle(w); + var L = w._model._shape, + F = w._model._shapeUV, + N = w._rotationMatrix, + k = w.position, + z = w.rotation, + j = w.scaling, + B = w._globalPosition; + if (this._depthSort && this._depthSortParticles) { + var V = this.depthSortedParticles[R]; + (V.ind = w._ind), (V.indicesLength = w._model._indicesLength), (V.sqDistance = a.e.DistanceSquared(w.position, y)); + } + if (!w.alive || (w._stillInvisible && !w.isVisible)) (T += 3 * (A = L.length)), (O += 4 * A), (M += 2 * A); + else { + if (w.isVisible) { + w._stillInvisible = !1; + var G = f[12]; + if ((w.pivot.multiplyToRef(j, G), this.billboard && ((z.x = 0), (z.y = 0)), (this._computeParticleRotation || this.billboard) && w.getRotationMatrix(i), null !== w.parentId)) { + var U = this.getParticleById(w.parentId); + if (U) { + var H = U._rotationMatrix, + W = U._globalPosition, + X = k.x * H[1] + k.y * H[4] + k.z * H[7], + Y = k.x * H[0] + k.y * H[3] + k.z * H[6], + K = k.x * H[2] + k.y * H[5] + k.z * H[8]; + if (((B.x = W.x + Y), (B.y = W.y + X), (B.z = W.z + K), this._computeParticleRotation || this.billboard)) { + var Z = i.m; + (N[0] = Z[0] * H[0] + Z[1] * H[3] + Z[2] * H[6]), + (N[1] = Z[0] * H[1] + Z[1] * H[4] + Z[2] * H[7]), + (N[2] = Z[0] * H[2] + Z[1] * H[5] + Z[2] * H[8]), + (N[3] = Z[4] * H[0] + Z[5] * H[3] + Z[6] * H[6]), + (N[4] = Z[4] * H[1] + Z[5] * H[4] + Z[6] * H[7]), + (N[5] = Z[4] * H[2] + Z[5] * H[5] + Z[6] * H[8]), + (N[6] = Z[8] * H[0] + Z[9] * H[3] + Z[10] * H[6]), + (N[7] = Z[8] * H[1] + Z[9] * H[4] + Z[10] * H[7]), + (N[8] = Z[8] * H[2] + Z[9] * H[5] + Z[10] * H[8]); + } + } else w.parentId = null; + } else if (((B.x = k.x), (B.y = k.y), (B.z = k.z), this._computeParticleRotation || this.billboard)) { + Z = i.m; + (N[0] = Z[0]), (N[1] = Z[1]), (N[2] = Z[2]), (N[3] = Z[4]), (N[4] = Z[5]), (N[5] = Z[6]), (N[6] = Z[8]), (N[7] = Z[9]), (N[8] = Z[10]); + } + var q = f[11]; + for (w.translateFromPivot ? q.setAll(0) : q.copyFrom(G), A = 0; A < L.length; A++) { + (x = T + 3 * A), (S = O + 4 * A), (E = M + 2 * A), (C = f[0]).copyFrom(L[A]), this._computeParticleVertex && this.updateParticleVertex(w, C, A); + var Q = C.x * j.x - G.x, + J = C.y * j.y - G.y, + $ = C.z * j.z - G.z; + (Y = Q * N[0] + J * N[3] + $ * N[6]), (X = Q * N[1] + J * N[4] + $ * N[7]), (K = Q * N[2] + J * N[5] + $ * N[8]); + (Y += q.x), (X += q.y), (K += q.z); + var ee = (c[x] = B.x + m.x * Y + g.x * X + b.x * K), + te = (c[x + 1] = B.y + m.y * Y + g.y * X + b.y * K), + ne = (c[x + 2] = B.z + m.z * Y + g.z * X + b.z * K); + if ((this._computeBoundingBox && (_.minimizeInPlaceFromFloats(ee, te, ne), v.maximizeInPlaceFromFloats(ee, te, ne)), !this._computeParticleVertex)) { + var ie = p[x], + re = p[x + 1], + oe = p[x + 2], + ae = ie * N[0] + re * N[3] + oe * N[6], + se = ie * N[1] + re * N[4] + oe * N[7], + ce = ie * N[2] + re * N[5] + oe * N[8]; + (l[x] = m.x * ae + g.x * se + b.x * ce), (l[x + 1] = m.y * ae + g.y * se + b.y * ce), (l[x + 2] = m.z * ae + g.z * se + b.z * ce); + } + if (this._computeParticleColor && w.color) { + var le = w.color, + ue = this._colors32; + (ue[S] = le.r), (ue[S + 1] = le.g), (ue[S + 2] = le.b), (ue[S + 3] = le.a); + } + if (this._computeParticleTexture) { + var he = w.uvs; + (u[E] = F[2 * A] * (he.z - he.x) + he.x), (u[E + 1] = F[2 * A + 1] * (he.w - he.y) + he.y); + } + } + } else + for (w._stillInvisible = !0, A = 0; A < L.length; A++) { + if (((S = O + 4 * A), (E = M + 2 * A), (c[(x = T + 3 * A)] = c[x + 1] = c[x + 2] = 0), (l[x] = l[x + 1] = l[x + 2] = 0), this._computeParticleColor && w.color)) { + le = w.color; + (s[S] = le.r), (s[S + 1] = le.g), (s[S + 2] = le.b), (s[S + 3] = le.a); + } + if (this._computeParticleTexture) { + he = w.uvs; + (u[E] = F[2 * A] * (he.z - he.x) + he.x), (u[E + 1] = F[2 * A + 1] * (he.w - he.y) + he.y); + } + } + if (this._particlesIntersect) { + var de = w._boundingInfo, + pe = de.boundingBox, + fe = de.boundingSphere, + me = w._modelBoundingInfo; + if (!this._bSphereOnly) { + var ge = me.boundingBox.vectors, + be = f[1], + _e = f[2]; + be.setAll(Number.MAX_VALUE), _e.setAll(-Number.MAX_VALUE); + for (var ve = 0; ve < 8; ve++) { + var ye = ge[ve].x * j.x, + Ce = ge[ve].y * j.y, + Pe = ge[ve].z * j.z, + xe = ((Y = ye * N[0] + Ce * N[3] + Pe * N[6]), (X = ye * N[1] + Ce * N[4] + Pe * N[7]), (K = ye * N[2] + Ce * N[5] + Pe * N[8]), k.x + m.x * Y + g.x * X + b.x * K), + Te = k.y + m.y * Y + g.y * X + b.y * K, + Se = k.z + m.z * Y + g.z * X + b.z * K; + be.minimizeInPlaceFromFloats(xe, Te, Se), _e.maximizeInPlaceFromFloats(xe, Te, Se); + } + pe.reConstruct(be, _e, o._worldMatrix); + } + var Oe = me.minimum.multiplyToRef(j, f[1]), + Ee = me.maximum.multiplyToRef(j, f[2]), + Me = Ee.addToRef(Oe, f[3]).scaleInPlace(0.5).addInPlace(B), + Ae = Ee.subtractToRef(Oe, f[4]).scaleInPlace(0.5 * this._bSphereRadiusFactor), + Ie = Me.subtractToRef(Ae, f[1]), + De = Me.addToRef(Ae, f[2]); + fe.reConstruct(Ie, De, o._worldMatrix); + } + (T = x + 3), (O = S + 4), (M = E + 2); + } + } + if (n) { + if ( + (this._computeParticleColor && o.updateVerticesData(wn.b.ColorKind, s, !1, !1), + this._computeParticleTexture && o.updateVerticesData(wn.b.UVKind, u, !1, !1), + o.updateVerticesData(wn.b.PositionKind, c, !1, !1), + !o.areNormalsFrozen || o.isFacetDataEnabled) + ) { + if (this._computeParticleVertex || o.isFacetDataEnabled) { + var Re = o.isFacetDataEnabled ? o.getFacetDataParameters() : null; + Rn.a.ComputeNormals(c, h, l, Re); + for (var we = 0; we < l.length; we++) p[we] = l[we]; + } + o.areNormalsFrozen || o.updateVerticesData(wn.b.NormalKind, l, !1, !1); + } + if (this._depthSort && this._depthSortParticles) { + var Le = this.depthSortedParticles; + Le.sort(this._depthSortFunction); + for (var Fe = Le.length, Ne = 0, ke = 0; ke < Fe; ke++) { + var ze = Le[ke].indicesLength, + je = Le[ke].ind; + for (we = 0; we < ze; we++) (h[Ne] = d[je + we]), Ne++; + } + o.updateIndices(h); + } + } + return ( + this._computeBoundingBox && (o._boundingInfo ? o._boundingInfo.reConstruct(_, v, o._worldMatrix) : (o._boundingInfo = new ti.a(_, v, o._worldMatrix))), + this._autoUpdateSubMeshes && this.computeSubMeshes(), + this.afterUpdateParticles(e, t, n), + this + ); + }), + (e.prototype.dispose = function () { + this.mesh.dispose(), + (this.vars = null), + (this._positions = null), + (this._indices = null), + (this._normals = null), + (this._uvs = null), + (this._colors = null), + (this._indices32 = null), + (this._positions32 = null), + (this._normals32 = null), + (this._fixedNormal32 = null), + (this._uvs32 = null), + (this._colors32 = null), + (this.pickedParticles = null); + }), + (e.prototype.getParticleById = function (e) { + var t = this.particles[e]; + if (t && t.id == e) return t; + var n = this.particles, + i = this._idxOfId[e]; + if (void 0 !== i) return n[i]; + for (var r = 0, o = this.nbParticles; r < o; ) { + var a = n[r]; + if (a.id == e) return a; + r++; + } + return null; + }), + (e.prototype.getParticlesByShapeId = function (e) { + var t = []; + return this.getParticlesByShapeIdToRef(e, t), t; + }), + (e.prototype.getParticlesByShapeIdToRef = function (e, t) { + t.length = 0; + for (var n = 0; n < this.nbParticles; n++) { + var i = this.particles[n]; + i.shapeId == e && t.push(i); + } + return this; + }), + (e.prototype.computeSubMeshes = function () { + if (!this.mesh || !this._multimaterialEnabled) return this; + var e = this.depthSortedParticles; + if (this.particles.length > 0) + for (var t = 0; t < this.particles.length; t++) { + var n = this.particles[t]; + n.materialIndex || (n.materialIndex = 0); + var i = e[t]; + (i.materialIndex = n.materialIndex), (i.ind = n._ind), (i.indicesLength = n._model._indicesLength); + } + this._sortParticlesByMaterial(); + var r = this._indicesByMaterial, + o = this._materialIndexes, + a = this.mesh; + a.subMeshes = []; + for (var s = a.getTotalVertices(), c = 0; c < o.length; c++) { + var l = r[c], + u = r[c + 1] - l, + h = o[c]; + new Kc.b(h, 0, s, l, u, a); + } + return this; + }), + (e.prototype._sortParticlesByMaterial = function () { + var e = [0]; + this._indicesByMaterial = e; + var t = []; + this._materialIndexes = t; + var n = this.depthSortedParticles; + n.sort(this._materialSortFunction); + var i = n.length, + r = this._indices32, + o = this._indices, + a = 0, + s = n[0].materialIndex; + t.push(s); + for (var c = 0; c < i; c++) { + var l = n[c], + u = l.indicesLength, + h = l.ind; + l.materialIndex !== s && ((s = l.materialIndex), e.push(a), t.push(s)); + for (var d = 0; d < u; d++) (r[a] = o[h + d]), a++; + } + return e.push(r.length), this._updatable && this.mesh.updateIndices(r), this; + }), + (e.prototype._setMaterialIndexesById = function () { + this._materialIndexesById = {}; + for (var e = 0; e < this._materials.length; e++) { + var t = this._materials[e].uniqueId; + this._materialIndexesById[t] = e; + } + }), + (e.prototype._filterUniqueMaterialId = function (e) { + return e.filter(function (e, t, n) { + return n.indexOf(e) === t; + }); + }), + (e.prototype._setDefaultMaterial = function () { + return this._defaultMaterial || (this._defaultMaterial = new Mn.a(this.name + "DefaultMaterial", this._scene)), this._defaultMaterial; + }), + (e.prototype.refreshVisibleSize = function () { + return this._isVisibilityBoxLocked || this.mesh.refreshBoundingInfo(), this; + }), + (e.prototype.setVisibilityBox = function (e) { + var t = e / 2; + this.mesh._boundingInfo = new ti.a(new a.e(-t, -t, -t), new a.e(t, t, t)); + }), + Object.defineProperty(e.prototype, "isAlwaysVisible", { + get: function () { + return this._alwaysVisible; + }, + set: function (e) { + (this._alwaysVisible = e), (this.mesh.alwaysSelectAsActiveMesh = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isVisibilityBoxLocked", { + get: function () { + return this._isVisibilityBoxLocked; + }, + set: function (e) { + (this._isVisibilityBoxLocked = e), (this.mesh.getBoundingInfo().isLocked = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleRotation", { + get: function () { + return this._computeParticleRotation; + }, + set: function (e) { + this._computeParticleRotation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleColor", { + get: function () { + return this._computeParticleColor; + }, + set: function (e) { + this._computeParticleColor = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleTexture", { + get: function () { + return this._computeParticleTexture; + }, + set: function (e) { + this._computeParticleTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleVertex", { + get: function () { + return this._computeParticleVertex; + }, + set: function (e) { + this._computeParticleVertex = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeBoundingBox", { + get: function () { + return this._computeBoundingBox; + }, + set: function (e) { + this._computeBoundingBox = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "depthSortParticles", { + get: function () { + return this._depthSortParticles; + }, + set: function (e) { + this._depthSortParticles = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "expandable", { + get: function () { + return this._expandable; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "multimaterialEnabled", { + get: function () { + return this._multimaterialEnabled; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "useModelMaterial", { + get: function () { + return this._useModelMaterial; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "materials", { + get: function () { + return this._materials; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setMultiMaterial = function (e) { + (this._materials = this._filterUniqueMaterialId(e)), this._setMaterialIndexesById(), this._multimaterial && this._multimaterial.dispose(), (this._multimaterial = new Ta.a(this.name + "MultiMaterial", this._scene)); + for (var t = 0; t < this._materials.length; t++) this._multimaterial.subMaterials.push(this._materials[t]); + this.computeSubMeshes(), (this.mesh.material = this._multimaterial); + }), + Object.defineProperty(e.prototype, "multimaterial", { + get: function () { + return this._multimaterial; + }, + set: function (e) { + this._multimaterial = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "autoUpdateSubMeshes", { + get: function () { + return this._autoUpdateSubMeshes; + }, + set: function (e) { + this._autoUpdateSubMeshes = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.initParticles = function () {}), + (e.prototype.recycleParticle = function (e) { + return e; + }), + (e.prototype.updateParticle = function (e) { + return e; + }), + (e.prototype.updateParticleVertex = function (e, t, n) { + return t; + }), + (e.prototype.beforeUpdateParticles = function (e, t, n) {}), + (e.prototype.afterUpdateParticles = function (e, t, n) {}), + e + ); + })(), + pu = (function () { + function e(e, t, n, i, r) { + (this.idx = 0), + (this.color = new s.b(1, 1, 1, 1)), + (this.position = a.e.Zero()), + (this.rotation = a.e.Zero()), + (this.uv = new a.d(0, 0)), + (this.velocity = a.e.Zero()), + (this.pivot = a.e.Zero()), + (this.translateFromPivot = !1), + (this._pos = 0), + (this._ind = 0), + (this.groupId = 0), + (this.idxInGroup = 0), + (this._stillInvisible = !1), + (this._rotationMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1]), + (this.parentId = null), + (this._globalPosition = a.e.Zero()), + (this.idx = e), + (this._group = t), + (this.groupId = n), + (this.idxInGroup = i), + (this._pcs = r); + } + return ( + Object.defineProperty(e.prototype, "size", { + get: function () { + return this.size; + }, + set: function (e) { + this.size = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "quaternion", { + get: function () { + return this.rotationQuaternion; + }, + set: function (e) { + this.rotationQuaternion = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.intersectsMesh = function (e, t) { + if (!e._boundingInfo) return !1; + if ((t = t || !1)) return e.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position)); + var n, i, r, o, a, s; + (n = e.getBoundingInfo().boundingBox.maximumWorld.x), + (i = e.getBoundingInfo().boundingBox.minimumWorld.x), + (r = e.getBoundingInfo().boundingBox.maximumWorld.y), + (o = e.getBoundingInfo().boundingBox.minimumWorld.y), + (a = e.getBoundingInfo().boundingBox.maximumWorld.z), + (s = e.getBoundingInfo().boundingBox.minimumWorld.z); + var c = this.position.x + this._pcs.mesh.position.x, + l = this.position.y + this._pcs.mesh.position.y, + u = this.position.z + this._pcs.mesh.position.z; + return i <= c && c <= n && o <= l && l <= r && s <= u && u <= a; + }), + (e.prototype.getRotationMatrix = function (e) { + var t; + if (this.rotationQuaternion) t = this.rotationQuaternion; + else { + t = a.c.Quaternion[0]; + var n = this.rotation; + a.b.RotationYawPitchRollToRef(n.y, n.x, n.z, t); + } + t.toRotationMatrix(e); + }), + e + ); + })(), + fu = function (e, t) { + (this.groupID = e), (this._positionFunction = t); + }; + !(function (e) { + (e[(e.Color = 2)] = "Color"), (e[(e.UV = 1)] = "UV"), (e[(e.Random = 0)] = "Random"), (e[(e.Stated = 3)] = "Stated"); + })(su || (su = {})); + var mu = (function () { + function e(e, t, n, i) { + (this.particles = new Array()), + (this.nbParticles = 0), + (this.counter = 0), + (this.vars = {}), + (this._promises = []), + (this._positions = new Array()), + (this._indices = new Array()), + (this._normals = new Array()), + (this._colors = new Array()), + (this._uvs = new Array()), + (this._updatable = !0), + (this._isVisibilityBoxLocked = !1), + (this._alwaysVisible = !1), + (this._groups = new Array()), + (this._groupCounter = 0), + (this._computeParticleColor = !0), + (this._computeParticleTexture = !0), + (this._computeParticleRotation = !0), + (this._computeBoundingBox = !1), + (this._isReady = !1), + (this.name = e), + (this._size = t), + (this._scene = n || E.a.LastCreatedScene), + i && void 0 !== i.updatable ? (this._updatable = i.updatable) : (this._updatable = !0); + } + return ( + (e.prototype.buildMeshAsync = function () { + var e = this; + return Promise.all(this._promises).then(function () { + return (e._isReady = !0), e._buildMesh(); + }); + }), + (e.prototype._buildMesh = function () { + 0 === this.nbParticles && this.addPoints(1), (this._positions32 = new Float32Array(this._positions)), (this._uvs32 = new Float32Array(this._uvs)), (this._colors32 = new Float32Array(this._colors)); + var e = new Rn.a(); + e.set(this._positions32, wn.b.PositionKind), this._uvs32.length > 0 && e.set(this._uvs32, wn.b.UVKind); + var t = 0; + this._colors32.length > 0 && ((t = 1), e.set(this._colors32, wn.b.ColorKind)); + var n = new Ee.a(this.name, this._scene); + e.applyToMesh(n, this._updatable), (this.mesh = n), (this._positions = null), (this._uvs = null), (this._colors = null), this._updatable || (this.particles.length = 0); + var i = new Mn.a("point cloud material", this._scene); + return ( + (i.emissiveColor = new s.a(t, t, t)), + (i.disableLighting = !0), + (i.pointsCloud = !0), + (i.pointSize = this._size), + (n.material = i), + new Promise(function (e) { + return e(n); + }) + ); + }), + (e.prototype._addParticle = function (e, t, n, i) { + var r = new pu(e, t, n, i, this); + return this.particles.push(r), r; + }), + (e.prototype._randomUnitVector = function (e) { + (e.position = new a.e(Math.random(), Math.random(), Math.random())), (e.color = new s.b(1, 1, 1, 1)); + }), + (e.prototype._getColorIndicesForCoord = function (e, t, n, i) { + var r = e._groupImageData, + o = n * (4 * i) + 4 * t, + a = [o, o + 1, o + 2, o + 3], + c = a[1], + l = a[2], + u = a[3], + h = r[a[0]], + d = r[c], + p = r[l], + f = r[u]; + return new s.b(h / 255, d / 255, p / 255, f); + }), + (e.prototype._setPointsColorOrUV = function (e, t, n, i, r, o, c) { + n && e.updateFacetData(); + var l = 2 * e.getBoundingInfo().boundingSphere.radius, + u = e.getVerticesData(wn.b.PositionKind), + h = e.getIndices(), + d = e.getVerticesData(wn.b.UVKind), + p = e.getVerticesData(wn.b.ColorKind), + f = a.e.Zero(); + e.computeWorldMatrix(); + var m = e.getWorldMatrix(); + if (!m.isIdentity()) for (var g = 0; g < u.length / 3; g++) a.e.TransformCoordinatesFromFloatsToRef(u[3 * g], u[3 * g + 1], u[3 * g + 2], m, f), (u[3 * g] = f.x), (u[3 * g + 1] = f.y), (u[3 * g + 2] = f.z); + var b, + _, + v = 0, + y = 0, + C = 0, + P = 0, + x = 0, + T = 0, + S = 0, + O = 0, + E = 0, + M = 0, + A = 0, + I = 0, + D = 0, + R = 0, + w = a.e.Zero(), + L = a.e.Zero(), + F = a.e.Zero(), + N = a.e.Zero(), + k = a.e.Zero(), + j = 0, + B = 0, + V = 0, + G = 0, + U = 0, + H = 0, + W = a.d.Zero(), + X = a.d.Zero(), + Y = a.d.Zero(), + K = a.d.Zero(), + Z = a.d.Zero(), + q = 0, + Q = 0, + J = 0, + $ = 0, + ee = 0, + te = 0, + ne = 0, + ie = 0, + re = 0, + oe = 0, + ae = 0, + se = 0, + ce = a.f.Zero(), + le = a.f.Zero(), + ue = a.f.Zero(), + he = a.f.Zero(), + de = a.f.Zero(), + pe = 0, + fe = 0; + c = c || 0; + var me, + ge = new a.f(0, 0, 0, 0), + be = a.e.Zero(), + _e = a.e.Zero(), + ve = a.e.Zero(), + ye = 0, + Ce = a.e.Zero(), + Pe = 0, + xe = 0, + Te = new Re(a.e.Zero(), new a.e(1, 0, 0)), + Se = a.e.Zero(); + for (y = 0; y < h.length / 3; y++) { + var Oe, Ee, Me, Ae, Ie, De, we, Le; + (C = h[3 * y]), + (P = h[3 * y + 1]), + (x = h[3 * y + 2]), + (T = u[3 * C]), + (S = u[3 * C + 1]), + (O = u[3 * C + 2]), + (E = u[3 * P]), + (M = u[3 * P + 1]), + (A = u[3 * P + 2]), + (I = u[3 * x]), + (D = u[3 * x + 1]), + (R = u[3 * x + 2]), + w.set(T, S, O), + L.set(E, M, A), + F.set(I, D, R), + L.subtractToRef(w, N), + F.subtractToRef(L, k), + d && ((j = d[2 * C]), (B = d[2 * C + 1]), (V = d[2 * P]), (G = d[2 * P + 1]), (U = d[2 * x]), (H = d[2 * x + 1]), W.set(j, B), X.set(V, G), Y.set(U, H), X.subtractToRef(W, K), Y.subtractToRef(X, Z)), + p && + i && + ((q = p[4 * C]), + (Q = p[4 * C + 1]), + (J = p[4 * C + 2]), + ($ = p[4 * C + 3]), + (ee = p[4 * P]), + (te = p[4 * P + 1]), + (ne = p[4 * P + 2]), + (ie = p[4 * P + 3]), + (re = p[4 * x]), + (oe = p[4 * x + 1]), + (ae = p[4 * x + 2]), + (se = p[4 * x + 3]), + ce.set(q, Q, J, $), + le.set(ee, te, ne, ie), + ue.set(re, oe, ae, se), + le.subtractToRef(ce, he), + ue.subtractToRef(le, de)); + for (var Fe, Ne, ke = new s.a(0, 0, 0), ze = new s.a(0, 0, 0), je = 0; je < t._groupDensity[y]; je++) + (v = this.particles.length), + this._addParticle(v, t, this._groupCounter, y + je), + (Ne = this.particles[v]), + (pe = z.a.RandomRange(0, 1)), + (fe = z.a.RandomRange(0, 1)), + (b = w.add(N.scale(pe)).add(k.scale(pe * fe))), + n && + ((be = e.getFacetNormal(y).normalize().scale(-1)), + (_e = N.clone().normalize()), + (ve = a.e.Cross(be, _e)), + (ye = z.a.RandomRange(0, 2 * Math.PI)), + (Ce = _e.scale(Math.cos(ye)).add(ve.scale(Math.sin(ye)))), + (ye = z.a.RandomRange(0.1, Math.PI / 2)), + (Se = Ce.scale(Math.cos(ye)).add(be.scale(Math.sin(ye)))), + (Te.origin = b.add(Se.scale(1e-5))), + (Te.direction = Se), + (Te.length = l), + (me = Te.intersectsMesh(e)).hit && ((xe = me.pickedPoint.subtract(b).length()), (Pe = z.a.RandomRange(0, 1) * xe), b.addInPlace(Se.scale(Pe)))), + (Ne.position = b.clone()), + this._positions.push(Ne.position.x, Ne.position.y, Ne.position.z), + void 0 !== i + ? d && + ((_ = W.add(K.scale(pe)).add(Z.scale(pe * fe))), + i + ? r && null !== t._groupImageData + ? ((Oe = t._groupImgWidth), + (Ee = t._groupImgHeight), + (Fe = this._getColorIndicesForCoord(t, Math.round(_.x * Oe), Math.round(_.y * Ee), Oe)), + (Ne.color = Fe), + this._colors.push(Fe.r, Fe.g, Fe.b, Fe.a)) + : p + ? ((ge = ce.add(he.scale(pe)).add(de.scale(pe * fe))), (Ne.color = new s.b(ge.x, ge.y, ge.z, ge.w)), this._colors.push(ge.x, ge.y, ge.z, ge.w)) + : ((ge = ce.set(Math.random(), Math.random(), Math.random(), 1)), (Ne.color = new s.b(ge.x, ge.y, ge.z, ge.w)), this._colors.push(ge.x, ge.y, ge.z, ge.w)) + : ((Ne.uv = _.clone()), this._uvs.push(Ne.uv.x, Ne.uv.y))) + : (o + ? (ke.set(o.r, o.g, o.b), + (Me = z.a.RandomRange(-c, c)), + (Ae = z.a.RandomRange(-c, c)), + (Ie = (Le = ke.toHSV()).r), + (De = Le.g + Me) < 0 && (De = 0), + De > 1 && (De = 1), + (we = Le.b + Ae) < 0 && (we = 0), + we > 1 && (we = 1), + s.a.HSVtoRGBToRef(Ie, De, we, ze), + ge.set(ze.r, ze.g, ze.b, 1)) + : (ge = ce.set(Math.random(), Math.random(), Math.random(), 1)), + (Ne.color = new s.b(ge.x, ge.y, ge.z, ge.w)), + this._colors.push(ge.x, ge.y, ge.z, ge.w)); + } + }), + (e.prototype._colorFromTexture = function (e, t, n) { + var i = this; + if (null === e.material) return g.a.Warn(e.name + "has no material."), (t._groupImageData = null), void this._setPointsColorOrUV(e, t, n, !0, !1); + var r = e.material.getActiveTextures(); + if (0 === r.length) return g.a.Warn(e.name + "has no useable texture."), (t._groupImageData = null), void this._setPointsColorOrUV(e, t, n, !0, !1); + var o = e.clone(); + o.setEnabled(!1), + this._promises.push( + new Promise(function (e) { + Cr.a.WhenAllReady(r, function () { + var a = t._textureNb; + return ( + a < 0 && (a = 0), + a > r.length - 1 && (a = r.length - 1), + (t._groupImageData = r[a].readPixels()), + (t._groupImgWidth = r[a].getSize().width), + (t._groupImgHeight = r[a].getSize().height), + i._setPointsColorOrUV(o, t, n, !0, !0), + o.dispose(), + e() + ); + }); + }) + ); + }), + (e.prototype._calculateDensity = function (e, t, n) { + for ( + var i, r, o, s, c, l, u, h, d, p, f, m, g, b, _, v, y, C = new Array(), P = a.e.Zero(), x = a.e.Zero(), T = a.e.Zero(), S = a.e.Zero(), O = a.e.Zero(), E = a.e.Zero(), M = new Array(), A = 0, I = n.length / 3, D = 0; + D < I; + D++ + ) + (i = n[3 * D]), + (r = n[3 * D + 1]), + (o = n[3 * D + 2]), + (s = t[3 * i]), + (c = t[3 * i + 1]), + (l = t[3 * i + 2]), + (u = t[3 * r]), + (h = t[3 * r + 1]), + (d = t[3 * r + 2]), + (p = t[3 * o]), + (f = t[3 * o + 1]), + (m = t[3 * o + 2]), + P.set(s, c, l), + x.set(u, h, d), + T.set(p, f, m), + x.subtractToRef(P, S), + T.subtractToRef(x, O), + T.subtractToRef(P, E), + (v = ((g = S.length()) + (b = O.length()) + (_ = E.length())) / 2), + (A += y = Math.sqrt(v * (v - g) * (v - b) * (v - _))), + (M[D] = y); + var R = 0; + for (D = 0; D < I; D++) (C[D] = Math.floor((e * M[D]) / A)), (R += C[D]); + var w = e - R, + L = Math.floor(w / I), + F = w % I; + L > 0 && + (C = C.map(function (e) { + return e + L; + })); + for (D = 0; D < F; D++) C[D] += 1; + return C; + }), + (e.prototype.addPoints = function (e, t) { + void 0 === t && (t = this._randomUnitVector); + for (var n, i = new fu(this._groupCounter, t), r = this.nbParticles, o = 0; o < e; o++) + (n = this._addParticle(r, i, this._groupCounter, o)), + i && i._positionFunction && i._positionFunction(n, r, o), + this._positions.push(n.position.x, n.position.y, n.position.z), + n.color && this._colors.push(n.color.r, n.color.g, n.color.b, n.color.a), + n.uv && this._uvs.push(n.uv.x, n.uv.y), + r++; + return (this.nbParticles += e), this._groupCounter++, this._groupCounter; + }), + (e.prototype.addSurfacePoints = function (e, t, n, i, r) { + var o = n || su.Random; + (isNaN(o) || o < 0 || o > 3) && (o = su.Random); + var a = e.getVerticesData(wn.b.PositionKind), + c = e.getIndices(); + this._groups.push(this._groupCounter); + var l = new fu(this._groupCounter, null); + switch (((l._groupDensity = this._calculateDensity(t, a, c)), o === su.Color ? (l._textureNb = i || 0) : (i = i || new s.b(1, 1, 1, 1)), o)) { + case su.Color: + this._colorFromTexture(e, l, !1); + break; + case su.UV: + this._setPointsColorOrUV(e, l, !1, !1, !1); + break; + case su.Random: + this._setPointsColorOrUV(e, l, !1); + break; + case su.Stated: + this._setPointsColorOrUV(e, l, !1, void 0, void 0, i, r); + } + return (this.nbParticles += t), this._groupCounter++, this._groupCounter - 1; + }), + (e.prototype.addVolumePoints = function (e, t, n, i, r) { + var o = n || su.Random; + (isNaN(o) || o < 0 || o > 3) && (o = su.Random); + var a = e.getVerticesData(wn.b.PositionKind), + c = e.getIndices(); + this._groups.push(this._groupCounter); + var l = new fu(this._groupCounter, null); + switch (((l._groupDensity = this._calculateDensity(t, a, c)), o === su.Color ? (l._textureNb = i || 0) : (i = i || new s.b(1, 1, 1, 1)), o)) { + case su.Color: + this._colorFromTexture(e, l, !0); + break; + case su.UV: + this._setPointsColorOrUV(e, l, !0, !1, !1); + break; + case su.Random: + this._setPointsColorOrUV(e, l, !0); + break; + case su.Stated: + this._setPointsColorOrUV(e, l, !0, void 0, void 0, i, r); + } + return (this.nbParticles += t), this._groupCounter++, this._groupCounter - 1; + }), + (e.prototype.setParticles = function (e, t, n) { + if ((void 0 === e && (e = 0), void 0 === t && (t = this.nbParticles - 1), void 0 === n && (n = !0), !this._updatable || !this._isReady)) return this; + this.beforeUpdateParticles(e, t, n); + var i = a.c.Matrix[0], + r = this.mesh, + o = this._colors32, + s = this._positions32, + c = this._uvs32, + l = a.c.Vector3, + u = l[5].copyFromFloats(1, 0, 0), + h = l[6].copyFromFloats(0, 1, 0), + d = l[7].copyFromFloats(0, 0, 1), + p = l[8].setAll(Number.MAX_VALUE), + f = l[9].setAll(-Number.MAX_VALUE); + a.a.IdentityToRef(i); + var m = 0; + if ((this.mesh.isFacetDataEnabled && (this._computeBoundingBox = !0), (t = t >= this.nbParticles ? this.nbParticles - 1 : t), this._computeBoundingBox && (0 != e || t != this.nbParticles - 1))) { + var g = this.mesh._boundingInfo; + g && (p.copyFrom(g.minimum), f.copyFrom(g.maximum)); + } + m = 0; + for (var b = 0, _ = 0, v = 0, y = e; y <= t; y++) { + var C = this.particles[y]; + (b = 3 * (m = C.idx)), (_ = 4 * m), (v = 2 * m), this.updateParticle(C); + var P = C._rotationMatrix, + x = C.position, + T = C._globalPosition; + if ((this._computeParticleRotation && C.getRotationMatrix(i), null !== C.parentId)) { + var S = this.particles[C.parentId], + O = S._rotationMatrix, + E = S._globalPosition, + M = x.x * O[1] + x.y * O[4] + x.z * O[7], + A = x.x * O[0] + x.y * O[3] + x.z * O[6], + I = x.x * O[2] + x.y * O[5] + x.z * O[8]; + if (((T.x = E.x + A), (T.y = E.y + M), (T.z = E.z + I), this._computeParticleRotation)) { + var D = i.m; + (P[0] = D[0] * O[0] + D[1] * O[3] + D[2] * O[6]), + (P[1] = D[0] * O[1] + D[1] * O[4] + D[2] * O[7]), + (P[2] = D[0] * O[2] + D[1] * O[5] + D[2] * O[8]), + (P[3] = D[4] * O[0] + D[5] * O[3] + D[6] * O[6]), + (P[4] = D[4] * O[1] + D[5] * O[4] + D[6] * O[7]), + (P[5] = D[4] * O[2] + D[5] * O[5] + D[6] * O[8]), + (P[6] = D[8] * O[0] + D[9] * O[3] + D[10] * O[6]), + (P[7] = D[8] * O[1] + D[9] * O[4] + D[10] * O[7]), + (P[8] = D[8] * O[2] + D[9] * O[5] + D[10] * O[8]); + } + } else if (((T.x = 0), (T.y = 0), (T.z = 0), this._computeParticleRotation)) { + D = i.m; + (P[0] = D[0]), (P[1] = D[1]), (P[2] = D[2]), (P[3] = D[4]), (P[4] = D[5]), (P[5] = D[6]), (P[6] = D[8]), (P[7] = D[9]), (P[8] = D[10]); + } + var R = l[11]; + C.translateFromPivot ? R.setAll(0) : R.copyFrom(C.pivot); + var w = l[0]; + w.copyFrom(C.position); + var L = w.x - C.pivot.x, + F = w.y - C.pivot.y, + N = w.z - C.pivot.z, + k = L * P[0] + F * P[3] + N * P[6], + z = L * P[1] + F * P[4] + N * P[7], + j = L * P[2] + F * P[5] + N * P[8]; + (k += R.x), (z += R.y), (j += R.z); + var B = (s[b] = T.x + u.x * k + h.x * z + d.x * j), + V = (s[b + 1] = T.y + u.y * k + h.y * z + d.y * j), + G = (s[b + 2] = T.z + u.z * k + h.z * z + d.z * j); + if ((this._computeBoundingBox && (p.minimizeInPlaceFromFloats(B, V, G), f.maximizeInPlaceFromFloats(B, V, G)), this._computeParticleColor && C.color)) { + var U = C.color, + H = this._colors32; + (H[_] = U.r), (H[_ + 1] = U.g), (H[_ + 2] = U.b), (H[_ + 3] = U.a); + } + if (this._computeParticleTexture && C.uv) { + var W = C.uv, + X = this._uvs32; + (X[v] = W.x), (X[v + 1] = W.y); + } + } + return ( + n && (this._computeParticleColor && r.updateVerticesData(wn.b.ColorKind, o, !1, !1), this._computeParticleTexture && r.updateVerticesData(wn.b.UVKind, c, !1, !1), r.updateVerticesData(wn.b.PositionKind, s, !1, !1)), + this._computeBoundingBox && (r._boundingInfo ? r._boundingInfo.reConstruct(p, f, r._worldMatrix) : (r._boundingInfo = new ti.a(p, f, r._worldMatrix))), + this.afterUpdateParticles(e, t, n), + this + ); + }), + (e.prototype.dispose = function () { + this.mesh.dispose(), + (this.vars = null), + (this._positions = null), + (this._indices = null), + (this._normals = null), + (this._uvs = null), + (this._colors = null), + (this._indices32 = null), + (this._positions32 = null), + (this._uvs32 = null), + (this._colors32 = null); + }), + (e.prototype.refreshVisibleSize = function () { + return this._isVisibilityBoxLocked || this.mesh.refreshBoundingInfo(), this; + }), + (e.prototype.setVisibilityBox = function (e) { + var t = e / 2; + this.mesh._boundingInfo = new ti.a(new a.e(-t, -t, -t), new a.e(t, t, t)); + }), + Object.defineProperty(e.prototype, "isAlwaysVisible", { + get: function () { + return this._alwaysVisible; + }, + set: function (e) { + (this._alwaysVisible = e), (this.mesh.alwaysSelectAsActiveMesh = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleRotation", { + set: function (e) { + this._computeParticleRotation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleColor", { + get: function () { + return this._computeParticleColor; + }, + set: function (e) { + this._computeParticleColor = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeParticleTexture", { + get: function () { + return this._computeParticleTexture; + }, + set: function (e) { + this._computeParticleTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "computeBoundingBox", { + get: function () { + return this._computeBoundingBox; + }, + set: function (e) { + this._computeBoundingBox = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.initParticles = function () {}), + (e.prototype.recycleParticle = function (e) { + return e; + }), + (e.prototype.updateParticle = function (e) { + return e; + }), + (e.prototype.beforeUpdateParticles = function (e, t, n) {}), + (e.prototype.afterUpdateParticles = function (e, t, n) {}), + e + ); + })(); + (ge.a.prototype.getPhysicsEngine = function () { + return this._physicsEngine; + }), + (ge.a.prototype.enablePhysics = function (e, t) { + if ((void 0 === e && (e = null), this._physicsEngine)) return !0; + var n = this._getComponent(me.a.NAME_PHYSICSENGINE); + n || ((n = new _u(this)), this._addComponent(n)); + try { + return (this._physicsEngine = new Aa(e, t)), (this._physicsTimeAccumulator = 0), !0; + } catch (e) { + return g.a.Error(e.message), !1; + } + }), + (ge.a.prototype.disablePhysicsEngine = function () { + this._physicsEngine && (this._physicsEngine.dispose(), (this._physicsEngine = null)); + }), + (ge.a.prototype.isPhysicsEnabled = function () { + return void 0 !== this._physicsEngine; + }), + (ge.a.prototype.deleteCompoundImpostor = function (e) { + var t = e.parts[0].mesh; + t.physicsImpostor && (t.physicsImpostor.dispose(), (t.physicsImpostor = null)); + }), + (ge.a.prototype._advancePhysicsEngineStep = function (e) { + if (this._physicsEngine) { + var t = this._physicsEngine.getSubTimeStep(); + if (t > 0) + for (this._physicsTimeAccumulator += e; this._physicsTimeAccumulator > t; ) + this.onBeforePhysicsObservable.notifyObservers(this), this._physicsEngine._step(t / 1e3), this.onAfterPhysicsObservable.notifyObservers(this), (this._physicsTimeAccumulator -= t); + else this.onBeforePhysicsObservable.notifyObservers(this), this._physicsEngine._step(e / 1e3), this.onAfterPhysicsObservable.notifyObservers(this); + } + }), + Object.defineProperty(ke.a.prototype, "physicsImpostor", { + get: function () { + return this._physicsImpostor; + }, + set: function (e) { + var t = this; + this._physicsImpostor !== e && + (this._disposePhysicsObserver && this.onDisposeObservable.remove(this._disposePhysicsObserver), + (this._physicsImpostor = e), + e && + (this._disposePhysicsObserver = this.onDisposeObservable.add(function () { + t.physicsImpostor && (t.physicsImpostor.dispose(), (t.physicsImpostor = null)); + }))); + }, + enumerable: !0, + configurable: !0, + }), + (ke.a.prototype.getPhysicsImpostor = function () { + return this.physicsImpostor; + }), + (ke.a.prototype.applyImpulse = function (e, t) { + return this.physicsImpostor ? (this.physicsImpostor.applyImpulse(e, t), this) : this; + }), + (ke.a.prototype.setPhysicsLinkWith = function (e, t, n, i) { + return this.physicsImpostor && e.physicsImpostor ? (this.physicsImpostor.createJoint(e.physicsImpostor, gi.HingeJoint, { mainPivot: t, connectedPivot: n, nativeParams: i }), this) : this; + }); + var gu, + bu, + _u = (function () { + function e(e) { + var t = this; + (this.name = me.a.NAME_PHYSICSENGINE), + (this.scene = e), + (this.scene.onBeforePhysicsObservable = new o.c()), + (this.scene.onAfterPhysicsObservable = new o.c()), + (this.scene.getDeterministicFrameTime = function () { + return t.scene._physicsEngine ? 1e3 * t.scene._physicsEngine.getTimeStep() : 1e3 / 60; + }); + } + return ( + (e.prototype.register = function () {}), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () { + this.scene.onBeforePhysicsObservable.clear(), this.scene.onAfterPhysicsObservable.clear(), this.scene._physicsEngine && this.scene.disablePhysicsEngine(); + }), + e + ); + })(), + vu = (function () { + function e(e) { + (this._scene = e), (this._physicsEngine = this._scene.getPhysicsEngine()), this._physicsEngine || g.a.Warn("Physics engine not enabled. Please enable the physics before you can use the methods."); + } + return ( + (e.prototype.applyRadialExplosionImpulse = function (e, t, n, i) { + if (!this._physicsEngine) return g.a.Warn("Physics engine not enabled. Please enable the physics before you call this method."), null; + var r = this._physicsEngine.getImpostors(); + if (0 === r.length) return null; + "number" == typeof t && (((t = new Tu()).radius = t), (t.strength = n || t.strength), (t.falloff = i || t.falloff)); + var o = new yu(this._scene, t), + a = Array(); + return ( + r.forEach(function (t) { + var n = o.getImpostorHitData(t, e); + n && (t.applyImpulse(n.force, n.contactPoint), a.push({ impostor: t, hitData: n })); + }), + o.triggerAffectedImpostorsCallback(a), + o.dispose(!1), + o + ); + }), + (e.prototype.applyRadialExplosionForce = function (e, t, n, i) { + if (!this._physicsEngine) return g.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."), null; + var r = this._physicsEngine.getImpostors(); + if (0 === r.length) return null; + "number" == typeof t && (((t = new Tu()).radius = t), (t.strength = n || t.strength), (t.falloff = i || t.falloff)); + var o = new yu(this._scene, t), + a = Array(); + return ( + r.forEach(function (t) { + var n = o.getImpostorHitData(t, e); + n && (t.applyForce(n.force, n.contactPoint), a.push({ impostor: t, hitData: n })); + }), + o.triggerAffectedImpostorsCallback(a), + o.dispose(!1), + o + ); + }), + (e.prototype.gravitationalField = function (e, t, n, i) { + if (!this._physicsEngine) return g.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."), null; + if (0 === this._physicsEngine.getImpostors().length) return null; + "number" == typeof t && (((t = new Tu()).radius = t), (t.strength = n || t.strength), (t.falloff = i || t.falloff)); + var r = new Cu(this, this._scene, e, t); + return r.dispose(!1), r; + }), + (e.prototype.updraft = function (e, t, n, i, r) { + if (!this._physicsEngine) return g.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."), null; + if (0 === this._physicsEngine.getImpostors().length) return null; + "number" == typeof t && (((t = new Su()).radius = t), (t.strength = n || t.strength), (t.height = i || t.height), (t.updraftMode = r || t.updraftMode)); + var o = new Pu(this._scene, e, t); + return o.dispose(!1), o; + }), + (e.prototype.vortex = function (e, t, n, i) { + if (!this._physicsEngine) return g.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."), null; + if (0 === this._physicsEngine.getImpostors().length) return null; + "number" == typeof t && (((t = new Ou()).radius = t), (t.strength = n || t.strength), (t.height = i || t.height)); + var r = new xu(this._scene, e, t); + return r.dispose(!1), r; + }), + e + ); + })(), + yu = (function () { + function e(e, t) { + (this._scene = e), (this._options = t), (this._dataFetched = !1), (this._options = Object(h.a)(Object(h.a)({}, new Tu()), this._options)); + } + return ( + (e.prototype.getData = function () { + return (this._dataFetched = !0), { sphere: this._sphere }; + }), + (e.prototype.getImpostorHitData = function (e, t) { + if (0 === e.mass) return null; + if (!this._intersectsWithSphere(e, t, this._options.radius)) return null; + if ("Mesh" !== e.object.getClassName() && "InstancedMesh" !== e.object.getClassName()) return null; + var n = e.getObjectCenter().subtract(t), + i = new Re(t, n, this._options.radius).intersectsMesh(e.object).pickedPoint; + if (!i) return null; + var r = a.e.Distance(t, i); + if (r > this._options.radius) return null; + var o = this._options.falloff === gu.Constant ? this._options.strength : this._options.strength * (1 - r / this._options.radius); + return { force: n.multiplyByFloats(o, o, o), contactPoint: i, distanceFromOrigin: r }; + }), + (e.prototype.triggerAffectedImpostorsCallback = function (e) { + this._options.affectedImpostorsCallback && this._options.affectedImpostorsCallback(e); + }), + (e.prototype.dispose = function (e) { + var t = this; + void 0 === e && (e = !0), + e + ? this._sphere.dispose() + : setTimeout(function () { + t._dataFetched || t._sphere.dispose(); + }, 0); + }), + (e.prototype._prepareSphere = function () { + this._sphere || ((this._sphere = mi.CreateSphere("radialExplosionEventSphere", this._options.sphere, this._scene)), (this._sphere.isVisible = !1)); + }), + (e.prototype._intersectsWithSphere = function (e, t, n) { + var i = e.object; + return ( + this._prepareSphere(), + (this._sphere.position = t), + (this._sphere.scaling = new a.e(2 * n, 2 * n, 2 * n)), + this._sphere._updateBoundingInfo(), + this._sphere.computeWorldMatrix(!0), + this._sphere.intersectsMesh(i, !0) + ); + }), + e + ); + })(), + Cu = (function () { + function e(e, t, n, i) { + (this._physicsHelper = e), + (this._scene = t), + (this._origin = n), + (this._options = i), + (this._dataFetched = !1), + (this._options = Object(h.a)(Object(h.a)({}, new Tu()), this._options)), + (this._tickCallback = this._tick.bind(this)), + (this._options.strength = -1 * this._options.strength); + } + return ( + (e.prototype.getData = function () { + return (this._dataFetched = !0), { sphere: this._sphere }; + }), + (e.prototype.enable = function () { + this._tickCallback.call(this), this._scene.registerBeforeRender(this._tickCallback); + }), + (e.prototype.disable = function () { + this._scene.unregisterBeforeRender(this._tickCallback); + }), + (e.prototype.dispose = function (e) { + var t = this; + void 0 === e && (e = !0), + e + ? this._sphere.dispose() + : setTimeout(function () { + t._dataFetched || t._sphere.dispose(); + }, 0); + }), + (e.prototype._tick = function () { + if (this._sphere) this._physicsHelper.applyRadialExplosionForce(this._origin, this._options); + else { + var e = this._physicsHelper.applyRadialExplosionForce(this._origin, this._options); + e && (this._sphere = e.getData().sphere.clone("radialExplosionEventSphereClone")); + } + }), + e + ); + })(), + Pu = (function () { + function e(e, t, n) { + (this._scene = e), + (this._origin = t), + (this._options = n), + (this._originTop = a.e.Zero()), + (this._originDirection = a.e.Zero()), + (this._cylinderPosition = a.e.Zero()), + (this._dataFetched = !1), + (this._physicsEngine = this._scene.getPhysicsEngine()), + (this._options = Object(h.a)(Object(h.a)({}, new Su()), this._options)), + this._origin.addToRef(new a.e(0, this._options.height / 2, 0), this._cylinderPosition), + this._origin.addToRef(new a.e(0, this._options.height, 0), this._originTop), + this._options.updraftMode === bu.Perpendicular && (this._originDirection = this._origin.subtract(this._originTop).normalize()), + (this._tickCallback = this._tick.bind(this)), + this._prepareCylinder(); + } + return ( + (e.prototype.getData = function () { + return (this._dataFetched = !0), { cylinder: this._cylinder }; + }), + (e.prototype.enable = function () { + this._tickCallback.call(this), this._scene.registerBeforeRender(this._tickCallback); + }), + (e.prototype.disable = function () { + this._scene.unregisterBeforeRender(this._tickCallback); + }), + (e.prototype.dispose = function (e) { + var t = this; + void 0 === e && (e = !0), + this._cylinder && + (e + ? this._cylinder.dispose() + : setTimeout(function () { + t._dataFetched || t._cylinder.dispose(); + }, 0)); + }), + (e.prototype.getImpostorHitData = function (e) { + if (0 === e.mass) return null; + if (!this._intersectsWithCylinder(e)) return null; + var t = e.getObjectCenter(); + if (this._options.updraftMode === bu.Perpendicular) var n = this._originDirection; + else n = t.subtract(this._originTop); + var i = a.e.Distance(this._origin, t), + r = -1 * this._options.strength; + return { force: n.multiplyByFloats(r, r, r), contactPoint: t, distanceFromOrigin: i }; + }), + (e.prototype._tick = function () { + var e = this; + this._physicsEngine.getImpostors().forEach(function (t) { + var n = e.getImpostorHitData(t); + n && t.applyForce(n.force, n.contactPoint); + }); + }), + (e.prototype._prepareCylinder = function () { + this._cylinder || ((this._cylinder = jn.CreateCylinder("updraftEventCylinder", { height: this._options.height, diameter: 2 * this._options.radius }, this._scene)), (this._cylinder.isVisible = !1)); + }), + (e.prototype._intersectsWithCylinder = function (e) { + var t = e.object; + return (this._cylinder.position = this._cylinderPosition), this._cylinder.intersectsMesh(t, !0); + }), + e + ); + })(), + xu = (function () { + function e(e, t, n) { + (this._scene = e), + (this._origin = t), + (this._options = n), + (this._originTop = a.e.Zero()), + (this._cylinderPosition = a.e.Zero()), + (this._dataFetched = !1), + (this._physicsEngine = this._scene.getPhysicsEngine()), + (this._options = Object(h.a)(Object(h.a)({}, new Ou()), this._options)), + this._origin.addToRef(new a.e(0, this._options.height / 2, 0), this._cylinderPosition), + this._origin.addToRef(new a.e(0, this._options.height, 0), this._originTop), + (this._tickCallback = this._tick.bind(this)), + this._prepareCylinder(); + } + return ( + (e.prototype.getData = function () { + return (this._dataFetched = !0), { cylinder: this._cylinder }; + }), + (e.prototype.enable = function () { + this._tickCallback.call(this), this._scene.registerBeforeRender(this._tickCallback); + }), + (e.prototype.disable = function () { + this._scene.unregisterBeforeRender(this._tickCallback); + }), + (e.prototype.dispose = function (e) { + var t = this; + void 0 === e && (e = !0), + e + ? this._cylinder.dispose() + : setTimeout(function () { + t._dataFetched || t._cylinder.dispose(); + }, 0); + }), + (e.prototype.getImpostorHitData = function (e) { + if (0 === e.mass) return null; + if (!this._intersectsWithCylinder(e)) return null; + if ("Mesh" !== e.object.getClassName() && "InstancedMesh" !== e.object.getClassName()) return null; + var t = e.getObjectCenter(), + n = new a.e(this._origin.x, t.y, this._origin.z), + i = t.subtract(n), + r = new Re(n, i, this._options.radius).intersectsMesh(e.object), + o = r.pickedPoint; + if (!o) return null; + var s = r.distance / this._options.radius, + c = o.normalize(); + if ((s > this._options.centripetalForceThreshold && (c = c.negate()), s > this._options.centripetalForceThreshold)) + var l = c.x * this._options.centripetalForceMultiplier, + u = c.y * this._options.updraftForceMultiplier, + h = c.z * this._options.centripetalForceMultiplier; + else { + var d = a.e.Cross(n, t).normalize(); + (l = (d.x + c.x) * this._options.centrifugalForceMultiplier), (u = this._originTop.y * this._options.updraftForceMultiplier), (h = (d.z + c.z) * this._options.centrifugalForceMultiplier); + } + var p = new a.e(l, u, h); + return { force: (p = p.multiplyByFloats(this._options.strength, this._options.strength, this._options.strength)), contactPoint: t, distanceFromOrigin: s }; + }), + (e.prototype._tick = function () { + var e = this; + this._physicsEngine.getImpostors().forEach(function (t) { + var n = e.getImpostorHitData(t); + n && t.applyForce(n.force, n.contactPoint); + }); + }), + (e.prototype._prepareCylinder = function () { + this._cylinder || ((this._cylinder = jn.CreateCylinder("vortexEventCylinder", { height: this._options.height, diameter: 2 * this._options.radius }, this._scene)), (this._cylinder.isVisible = !1)); + }), + (e.prototype._intersectsWithCylinder = function (e) { + var t = e.object; + return (this._cylinder.position = this._cylinderPosition), this._cylinder.intersectsMesh(t, !0); + }), + e + ); + })(), + Tu = function () { + (this.radius = 5), (this.strength = 10), (this.falloff = gu.Constant), (this.sphere = { segments: 32, diameter: 1 }); + }, + Su = function () { + (this.radius = 5), (this.strength = 10), (this.height = 10), (this.updraftMode = bu.Center); + }, + Ou = function () { + (this.radius = 5), (this.strength = 10), (this.height = 10), (this.centripetalForceThreshold = 0.7), (this.centripetalForceMultiplier = 5), (this.centrifugalForceMultiplier = 0.5), (this.updraftForceMultiplier = 0.02); + }; + !(function (e) { + (e[(e.Constant = 0)] = "Constant"), (e[(e.Linear = 1)] = "Linear"); + })(gu || (gu = {})), + (function (e) { + (e[(e.Center = 0)] = "Center"), (e[(e.Perpendicular = 1)] = "Perpendicular"); + })(bu || (bu = {})); + var Eu = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float degree;\nvoid main(void)\n{\nvec3 color=texture2D(textureSampler,vUV).rgb;\nfloat luminance=dot(color,vec3(0.3,0.59,0.11));\nvec3 blackAndWhite=vec3(luminance,luminance,luminance);\ngl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0);\n}"; + Xt.a.ShadersStore.blackAndWhitePixelShader = Eu; + var Mu = (function (e) { + function t(t, n, i, r, o, a) { + var s = e.call(this, t, "blackAndWhite", ["degree"], null, n, i, r, o, a) || this; + return ( + (s.degree = 1), + s.onApplyObservable.add(function (e) { + e.setFloat("degree", s.degree); + }), + s + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Au = (function () { + function e(e, t, n, i) { + (this._name = t), (this._singleInstance = i || !0), (this._getPostProcesses = n), (this._cameras = {}), (this._indicesForCamera = {}), (this._postProcesses = {}); + } + return ( + Object.defineProperty(e.prototype, "isSupported", { + get: function () { + for (var e in this._postProcesses) if (this._postProcesses.hasOwnProperty(e)) for (var t = this._postProcesses[e], n = 0; n < t.length; n++) if (!t[n].isSupported) return !1; + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._update = function () {}), + (e.prototype._attachCameras = function (e) { + var t, + n = this, + i = $e.b.MakeArray(e || this._cameras); + if (i) + for (var r = 0; r < i.length; r++) { + var o = i[r], + a = o.name; + if (((t = this._singleInstance ? 0 : a), !this._postProcesses[t])) { + var s = this._getPostProcesses(); + s && (this._postProcesses[t] = Array.isArray(s) ? s : [s]); + } + this._indicesForCamera[a] || (this._indicesForCamera[a] = []), + this._postProcesses[t].forEach(function (e) { + var t = o.attachPostProcess(e); + n._indicesForCamera[a].push(t); + }), + this._cameras[a] || (this._cameras[a] = o); + } + }), + (e.prototype._detachCameras = function (e) { + var t = $e.b.MakeArray(e || this._cameras); + if (t) + for (var n = 0; n < t.length; n++) { + var i = t[n], + r = i.name, + o = this._postProcesses[this._singleInstance ? 0 : r]; + o && + o.forEach(function (e) { + i.detachPostProcess(e); + }), + this._cameras[r] && (this._cameras[r] = null); + } + }), + (e.prototype._enable = function (e) { + var t = this, + n = $e.b.MakeArray(e || this._cameras); + if (n) + for (var i = 0; i < n.length; i++) + for (var r = n[i], o = r.name, a = 0; a < this._indicesForCamera[o].length; a++) + (void 0 !== r._postProcesses[this._indicesForCamera[o][a]] && null !== r._postProcesses[this._indicesForCamera[o][a]]) || + this._postProcesses[this._singleInstance ? 0 : o].forEach(function (e) { + n[i].attachPostProcess(e, t._indicesForCamera[o][a]); + }); + }), + (e.prototype._disable = function (e) { + var t = $e.b.MakeArray(e || this._cameras); + if (t) + for (var n = 0; n < t.length; n++) { + var i = t[n], + r = i.name; + this._postProcesses[this._singleInstance ? 0 : r].forEach(function (e) { + i.detachPostProcess(e); + }); + } + }), + (e.prototype.getPostProcesses = function (e) { + return this._singleInstance ? this._postProcesses[0] : e ? this._postProcesses[e.name] : null; + }), + e + ); + })(), + Iu = + "#include\n\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float threshold;\nuniform float exposure;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nfloat luma=getLuminance(gl_FragColor.rgb*exposure);\ngl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb;\n}"; + Xt.a.ShadersStore.extractHighlightsPixelShader = Iu; + var Du = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === s && (s = 0), void 0 === c && (c = !1); + var l = e.call(this, t, "extractHighlights", ["threshold", "exposure"], null, n, i, r, o, a, null, s, void 0, null, c) || this; + return ( + (l.threshold = 0.9), + (l._exposure = 1), + (l._inputPostProcess = null), + l.onApplyObservable.add(function (e) { + l._inputPostProcess && e.setTextureFromPostProcess("textureSampler", l._inputPostProcess), e.setFloat("threshold", Math.pow(l.threshold, j.b)), e.setFloat("exposure", l._exposure); + }), + l + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Ru = + "uniform sampler2D textureSampler;\nuniform sampler2D bloomBlur;\nvarying vec2 vUV;\nuniform float bloomWeight;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nvec3 blurred=texture2D(bloomBlur,vUV).rgb;\ngl_FragColor.rgb=gl_FragColor.rgb+(blurred.rgb*bloomWeight);\n}\n"; + Xt.a.ShadersStore.bloomMergePixelShader = Ru; + var wu = (function (e) { + function t(t, n, i, r, o, a, s, c, l, u, h) { + void 0 === u && (u = 0), void 0 === h && (h = !1); + var d = e.call(this, t, "bloomMerge", ["bloomWeight"], ["circleOfConfusionSampler", "blurStep0", "blurStep1", "blurStep2", "bloomBlur"], o, a, s, c, l, null, u, void 0, null, !0) || this; + return ( + (d.weight = r), + d.onApplyObservable.add(function (e) { + e.setTextureFromPostProcess("textureSampler", n), e.setTextureFromPostProcessOutput("bloomBlur", i), e.setFloat("bloomWeight", d.weight); + }), + h || d.updateEffect(), + d + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Lu = (function (e) { + function t(t, n, i, r, o, s) { + void 0 === o && (o = 0), void 0 === s && (s = !1); + var c = + e.call( + this, + t.getEngine(), + "bloom", + function () { + return c._effects; + }, + !0 + ) || this; + return ( + (c.bloomScale = n), + (c._effects = []), + (c._downscale = new Du("highlights", 1, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, o, s)), + (c._blurX = new Er("horizontal blur", new a.d(1, 0), 10, n, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, o, void 0, s)), + (c._blurX.alwaysForcePOT = !0), + (c._blurX.autoClear = !1), + (c._blurY = new Er("vertical blur", new a.d(0, 1), 10, n, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, o, void 0, s)), + (c._blurY.alwaysForcePOT = !0), + (c._blurY.autoClear = !1), + (c.kernel = r), + (c._effects = [c._downscale, c._blurX, c._blurY]), + (c._merge = new wu("bloomMerge", c._downscale, c._blurY, i, n, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, o, s)), + (c._merge.autoClear = !1), + c._effects.push(c._merge), + c + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "threshold", { + get: function () { + return this._downscale.threshold; + }, + set: function (e) { + this._downscale.threshold = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "weight", { + get: function () { + return this._merge.weight; + }, + set: function (e) { + this._merge.weight = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "kernel", { + get: function () { + return this._blurX.kernel / this.bloomScale; + }, + set: function (e) { + (this._blurX.kernel = e * this.bloomScale), (this._blurY.kernel = e * this.bloomScale); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.disposeEffects = function (e) { + for (var t = 0; t < this._effects.length; t++) this._effects[t].dispose(e); + }), + (t.prototype._updateEffects = function () { + for (var e = 0; e < this._effects.length; e++) this._effects[e].updateEffect(); + }), + (t.prototype._isReady = function () { + for (var e = 0; e < this._effects.length; e++) if (!this._effects[e].isReady()) return !1; + return !0; + }), + t + ); + })(Au), + Fu = + "\nuniform sampler2D textureSampler;\n\nuniform float chromatic_aberration;\nuniform float radialIntensity;\nuniform vec2 direction;\nuniform vec2 centerPosition;\nuniform float screen_width;\nuniform float screen_height;\n\nvarying vec2 vUV;\nvoid main(void)\n{\nvec2 centered_screen_pos=vec2(vUV.x-centerPosition.x,vUV.y-centerPosition.y);\nvec2 directionOfEffect=direction;\nif(directionOfEffect.x == 0. && directionOfEffect.y == 0.){\ndirectionOfEffect=normalize(centered_screen_pos);\n}\nfloat radius2=centered_screen_pos.x*centered_screen_pos.x\n+centered_screen_pos.y*centered_screen_pos.y;\nfloat radius=sqrt(radius2);\nvec4 original=texture2D(textureSampler,vUV);\n\nvec3 ref_indices=vec3(-0.3,0.0,0.3);\nfloat ref_shiftX=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.x/screen_width;\nfloat ref_shiftY=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.y/screen_height;\n\nvec2 ref_coords_r=vec2(vUV.x+ref_indices.r*ref_shiftX,vUV.y+ref_indices.r*ref_shiftY*0.5);\nvec2 ref_coords_g=vec2(vUV.x+ref_indices.g*ref_shiftX,vUV.y+ref_indices.g*ref_shiftY*0.5);\nvec2 ref_coords_b=vec2(vUV.x+ref_indices.b*ref_shiftX,vUV.y+ref_indices.b*ref_shiftY*0.5);\noriginal.r=texture2D(textureSampler,ref_coords_r).r;\noriginal.g=texture2D(textureSampler,ref_coords_g).g;\noriginal.b=texture2D(textureSampler,ref_coords_b).b;\noriginal.a=clamp(texture2D(textureSampler,ref_coords_r).a+texture2D(textureSampler,ref_coords_g).a+texture2D(textureSampler,ref_coords_b).a,0.,1.);\ngl_FragColor=original;\n}"; + Xt.a.ShadersStore.chromaticAberrationPixelShader = Fu; + var Nu = (function (e) { + function t(t, n, i, r, o, s, c, l, u, h) { + void 0 === u && (u = 0), void 0 === h && (h = !1); + var d = e.call(this, t, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], r, o, s, c, l, null, u, void 0, null, h) || this; + return ( + (d.aberrationAmount = 30), + (d.radialIntensity = 0), + (d.direction = new a.d(0.707, 0.707)), + (d.centerPosition = new a.d(0.5, 0.5)), + d.onApplyObservable.add(function (e) { + e.setFloat("chromatic_aberration", d.aberrationAmount), + e.setFloat("screen_width", n), + e.setFloat("screen_height", i), + e.setFloat("radialIntensity", d.radialIntensity), + e.setFloat2("direction", d.direction.x, d.direction.y), + e.setFloat2("centerPosition", d.centerPosition.x, d.centerPosition.y); + }), + d + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + ku = + "\nuniform sampler2D depthSampler;\n\nvarying vec2 vUV;\n\nuniform vec2 cameraMinMaxZ;\n\nuniform float focusDistance;\nuniform float cocPrecalculation;\nvoid main(void)\n{\nfloat depth=texture2D(depthSampler,vUV).r;\nfloat pixelDistance=(cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth)*1000.0;\nfloat coc=abs(cocPrecalculation* ((focusDistance-pixelDistance)/pixelDistance));\ncoc=clamp(coc,0.0,1.0);\ngl_FragColor=vec4(coc,depth,coc,1.0);\n}\n"; + Xt.a.ShadersStore.circleOfConfusionPixelShader = ku; + var zu = (function (e) { + function t(t, n, i, r, o, a, s, c, l) { + void 0 === c && (c = 0), void 0 === l && (l = !1); + var u = e.call(this, t, "circleOfConfusion", ["cameraMinMaxZ", "focusDistance", "cocPrecalculation"], ["depthSampler"], i, r, o, a, s, null, c, void 0, null, l) || this; + return ( + (u.lensSize = 50), + (u.fStop = 1.4), + (u.focusDistance = 2e3), + (u.focalLength = 50), + (u._depthTexture = null), + (u._depthTexture = n), + u.onApplyObservable.add(function (e) { + if (u._depthTexture) { + e.setTexture("depthSampler", u._depthTexture); + var t = ((u.lensSize / u.fStop) * u.focalLength) / (u.focusDistance - u.focalLength); + e.setFloat("focusDistance", u.focusDistance), e.setFloat("cocPrecalculation", t), e.setFloat2("cameraMinMaxZ", u._depthTexture.activeCamera.minZ, u._depthTexture.activeCamera.maxZ); + } else g.a.Warn("No depth texture set on CircleOfConfusionPostProcess"); + }), + u + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "depthTexture", { + set: function (e) { + this._depthTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + t + ); + })(Wt.a), + ju = + "\nuniform sampler2D textureSampler;\nuniform sampler2D colorTable;\n\nvarying vec2 vUV;\n\nconst float SLICE_COUNT=16.0;\n\nvec4 sampleAs3DTexture(sampler2D textureSampler,vec3 uv,float width) {\nfloat sliceSize=1.0/width;\nfloat slicePixelSize=sliceSize/width;\nfloat sliceInnerSize=slicePixelSize*(width-1.0);\nfloat zSlice0=min(floor(uv.z*width),width-1.0);\nfloat zSlice1=min(zSlice0+1.0,width-1.0);\nfloat xOffset=slicePixelSize*0.5+uv.x*sliceInnerSize;\nfloat s0=xOffset+(zSlice0*sliceSize);\nfloat s1=xOffset+(zSlice1*sliceSize);\nvec4 slice0Color=texture2D(textureSampler,vec2(s0,uv.y));\nvec4 slice1Color=texture2D(textureSampler,vec2(s1,uv.y));\nfloat zOffset=mod(uv.z*width,1.0);\nvec4 result=mix(slice0Color,slice1Color,zOffset);\nreturn result;\n}\nvoid main(void)\n{\nvec4 screen_color=texture2D(textureSampler,vUV);\ngl_FragColor=sampleAs3DTexture(colorTable,screen_color.rgb,SLICE_COUNT);\n}"; + Xt.a.ShadersStore.colorCorrectionPixelShader = ju; + var Bu = (function (e) { + function t(t, n, i, r, o, a, s) { + var c = e.call(this, t, "colorCorrection", null, ["colorTable"], i, r, o, a, s) || this; + return ( + (c._colorTableTexture = new ln.a(n, r.getScene(), !0, !1, ln.a.TRILINEAR_SAMPLINGMODE)), + (c._colorTableTexture.anisotropicFilteringLevel = 1), + (c._colorTableTexture.wrapU = ln.a.CLAMP_ADDRESSMODE), + (c._colorTableTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), + (c.onApply = function (e) { + e.setTexture("colorTable", c._colorTableTexture); + }), + c + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Vu = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 screenSize;\nuniform float kernel[9];\nvoid main(void)\n{\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\nvec4 colorSum =\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,-1))*kernel[0] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,-1))*kernel[1] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,-1))*kernel[2] +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0))*kernel[3] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,0))*kernel[4] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0))*kernel[5] +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,1))*kernel[6] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1))*kernel[7] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,1))*kernel[8];\nfloat kernelWeight =\nkernel[0] +\nkernel[1] +\nkernel[2] +\nkernel[3] +\nkernel[4] +\nkernel[5] +\nkernel[6] +\nkernel[7] +\nkernel[8];\nif (kernelWeight<=0.0) {\nkernelWeight=1.0;\n}\ngl_FragColor=vec4((colorSum/kernelWeight).rgb,1);\n}"; + Xt.a.ShadersStore.convolutionPixelShader = Vu; + var Gu = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === c && (c = 0); + var l = e.call(this, t, "convolution", ["kernel", "screenSize"], null, i, r, o, a, s, null, c) || this; + return ( + (l.kernel = n), + (l.onApply = function (e) { + e.setFloat2("screenSize", l.width, l.height), e.setArray("kernel", l.kernel); + }), + l + ); + } + return ( + Object(h.d)(t, e), + (t.EdgeDetect0Kernel = [1, 0, -1, 0, 0, 0, -1, 0, 1]), + (t.EdgeDetect1Kernel = [0, 1, 0, 1, -4, 1, 0, 1, 0]), + (t.EdgeDetect2Kernel = [-1, -1, -1, -1, 8, -1, -1, -1, -1]), + (t.SharpenKernel = [0, -1, 0, -1, 5, -1, 0, -1, 0]), + (t.EmbossKernel = [-2, -1, 0, -1, 1, 1, 0, 1, 2]), + (t.GaussianKernel = [0, 1, 0, 1, 1, 1, 0, 1, 0]), + t + ); + })(Wt.a), + Uu = (function (e) { + function t(t, n, i, r, o, a, s, c, l, u, h, d, p) { + void 0 === c && (c = null), void 0 === l && (l = ln.a.BILINEAR_SAMPLINGMODE), void 0 === d && (d = 0), void 0 === p && (p = !1); + var f = e.call(this, t, i, r, o, a, (l = 2), u, h, (d = 0), "#define DOF 1\r\n", p) || this; + return ( + (f.direction = i), + f.onApplyObservable.add(function (e) { + null != c && e.setTextureFromPostProcess("textureSampler", c), + e.setTextureFromPostProcessOutput("circleOfConfusionSampler", s), + n.activeCamera && e.setFloat2("cameraMinMaxZ", n.activeCamera.minZ, n.activeCamera.maxZ); + }), + f + ); + } + return Object(h.d)(t, e), t; + })(Er), + Hu = + "uniform sampler2D textureSampler;\nvarying vec2 vUV;\nuniform sampler2D circleOfConfusionSampler;\nuniform sampler2D blurStep0;\n#if BLUR_LEVEL>0\nuniform sampler2D blurStep1;\n#endif\n#if BLUR_LEVEL>1\nuniform sampler2D blurStep2;\n#endif\nvoid main(void)\n{\nfloat coc=texture2D(circleOfConfusionSampler,vUV).r;\n#if BLUR_LEVEL == 0\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred0=texture2D(blurStep0,vUV);\ngl_FragColor=mix(original,blurred0,coc);\n#endif\n#if BLUR_LEVEL == 1\nif(coc<0.5){\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(original,blurred1,coc/0.5);\n}else{\nvec4 blurred0=texture2D(blurStep0,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(blurred1,blurred0,(coc-0.5)/0.5);\n}\n#endif\n#if BLUR_LEVEL == 2\nif(coc<0.33){\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred2=texture2D(blurStep2,vUV);\ngl_FragColor=mix(original,blurred2,coc/0.33);\n}else if(coc<0.66){\nvec4 blurred1=texture2D(blurStep1,vUV);\nvec4 blurred2=texture2D(blurStep2,vUV);\ngl_FragColor=mix(blurred2,blurred1,(coc-0.33)/0.33);\n}else{\nvec4 blurred0=texture2D(blurStep0,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(blurred1,blurred0,(coc-0.66)/0.34);\n}\n#endif\n}\n"; + Xt.a.ShadersStore.depthOfFieldMergePixelShader = Hu; + var Wu, + Xu = function () {}, + Yu = (function (e) { + function t(t, n, i, r, o, a, s, c, l, u, h) { + void 0 === u && (u = 0), void 0 === h && (h = !1); + var d = e.call(this, t, "depthOfFieldMerge", [], ["circleOfConfusionSampler", "blurStep0", "blurStep1", "blurStep2"], o, a, s, c, l, null, u, void 0, null, !0) || this; + return ( + (d.blurSteps = r), + d.onApplyObservable.add(function (e) { + e.setTextureFromPostProcess("textureSampler", n), + e.setTextureFromPostProcessOutput("circleOfConfusionSampler", i), + r.forEach(function (t, n) { + e.setTextureFromPostProcessOutput("blurStep" + (r.length - n - 1), t); + }); + }), + h || d.updateEffect(), + d + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.updateEffect = function (t, n, i, r, o, a) { + void 0 === t && (t = null), + void 0 === n && (n = null), + void 0 === i && (i = null), + t || ((t = ""), (t += "#define BLUR_LEVEL " + (this.blurSteps.length - 1) + "\n")), + e.prototype.updateEffect.call(this, t, n, i, r, o, a); + }), + t + ); + })(Wt.a); + !(function (e) { + (e[(e.Low = 0)] = "Low"), (e[(e.Medium = 1)] = "Medium"), (e[(e.High = 2)] = "High"); + })(Wu || (Wu = {})); + var Ku = (function (e) { + function t(t, n, i, r, o) { + void 0 === i && (i = Wu.Low), void 0 === r && (r = 0), void 0 === o && (o = !1); + var s = + e.call( + this, + t.getEngine(), + "depth of field", + function () { + return s._effects; + }, + !0 + ) || this; + (s._effects = []), (s._circleOfConfusion = new zu("circleOfConfusion", n, 1, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, r, o)), (s._depthOfFieldBlurY = []), (s._depthOfFieldBlurX = []); + var c = 1, + l = 15; + switch (i) { + case Wu.High: + (c = 3), (l = 51); + break; + case Wu.Medium: + (c = 2), (l = 31); + break; + default: + (l = 15), (c = 1); + } + for (var u = l / Math.pow(2, c - 1), h = 1, d = 0; d < c; d++) { + var p = new Uu("verticle blur", t, new a.d(0, 1), u, h, null, s._circleOfConfusion, 0 == d ? s._circleOfConfusion : null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, r, o); + (p.autoClear = !1), (h = 0.75 / Math.pow(2, d)); + var f = new Uu("horizontal blur", t, new a.d(1, 0), u, h, null, s._circleOfConfusion, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, r, o); + (f.autoClear = !1), s._depthOfFieldBlurY.push(p), s._depthOfFieldBlurX.push(f); + } + s._effects = [s._circleOfConfusion]; + for (d = 0; d < s._depthOfFieldBlurX.length; d++) s._effects.push(s._depthOfFieldBlurY[d]), s._effects.push(s._depthOfFieldBlurX[d]); + return ( + (s._dofMerge = new Yu("dofMerge", s._circleOfConfusion, s._circleOfConfusion, s._depthOfFieldBlurX, h, null, ln.a.BILINEAR_SAMPLINGMODE, t.getEngine(), !1, r, o)), + (s._dofMerge.autoClear = !1), + s._effects.push(s._dofMerge), + s + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "focalLength", { + get: function () { + return this._circleOfConfusion.focalLength; + }, + set: function (e) { + this._circleOfConfusion.focalLength = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fStop", { + get: function () { + return this._circleOfConfusion.fStop; + }, + set: function (e) { + this._circleOfConfusion.fStop = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "focusDistance", { + get: function () { + return this._circleOfConfusion.focusDistance; + }, + set: function (e) { + this._circleOfConfusion.focusDistance = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "lensSize", { + get: function () { + return this._circleOfConfusion.lensSize; + }, + set: function (e) { + this._circleOfConfusion.lensSize = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "DepthOfFieldEffect"; + }), + Object.defineProperty(t.prototype, "depthTexture", { + set: function (e) { + this._circleOfConfusion.depthTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.disposeEffects = function (e) { + for (var t = 0; t < this._effects.length; t++) this._effects[t].dispose(e); + }), + (t.prototype._updateEffects = function () { + for (var e = 0; e < this._effects.length; e++) this._effects[e].updateEffect(); + }), + (t.prototype._isReady = function () { + for (var e = 0; e < this._effects.length; e++) if (!this._effects[e].isReady()) return !1; + return !0; + }), + t + ); + })(Au), + Zu = "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D passSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(passSampler,vUV);\n}"; + Xt.a.ShadersStore.displayPassPixelShader = Zu; + var qu = (function (e) { + function t(t, n, i, r, o, a) { + return e.call(this, t, "displayPass", ["passSampler"], ["passSampler"], n, i, r, o, a) || this; + } + return Object(h.d)(t, e), t; + })(Wt.a), + Qu = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform mat4 kernelMatrix;\nvoid main(void)\n{\nvec3 baseColor=texture2D(textureSampler,vUV).rgb;\nvec3 updatedColor=(kernelMatrix*vec4(baseColor,1.0)).rgb;\ngl_FragColor=vec4(updatedColor,1.0);\n}"; + Xt.a.ShadersStore.filterPixelShader = Qu; + var Ju = (function (e) { + function t(t, n, i, r, o, a, s) { + var c = e.call(this, t, "filter", ["kernelMatrix"], null, i, r, o, a, s) || this; + return ( + (c.kernelMatrix = n), + (c.onApply = function (e) { + e.setMatrix("kernelMatrix", c.kernelMatrix); + }), + c + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + $u = + "uniform sampler2D textureSampler;\nuniform vec2 texelSize;\nvarying vec2 vUV;\nvarying vec2 sampleCoordS;\nvarying vec2 sampleCoordE;\nvarying vec2 sampleCoordN;\nvarying vec2 sampleCoordW;\nvarying vec2 sampleCoordNW;\nvarying vec2 sampleCoordSE;\nvarying vec2 sampleCoordNE;\nvarying vec2 sampleCoordSW;\nconst float fxaaQualitySubpix=1.0;\nconst float fxaaQualityEdgeThreshold=0.166;\nconst float fxaaQualityEdgeThresholdMin=0.0833;\nconst vec3 kLumaCoefficients=vec3(0.2126,0.7152,0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb,kLumaCoefficients)\nvoid main(){\nvec2 posM;\nposM.x=vUV.x;\nposM.y=vUV.y;\nvec4 rgbyM=texture2D(textureSampler,vUV,0.0);\nfloat lumaM=FxaaLuma(rgbyM);\nfloat lumaS=FxaaLuma(texture2D(textureSampler,sampleCoordS,0.0));\nfloat lumaE=FxaaLuma(texture2D(textureSampler,sampleCoordE,0.0));\nfloat lumaN=FxaaLuma(texture2D(textureSampler,sampleCoordN,0.0));\nfloat lumaW=FxaaLuma(texture2D(textureSampler,sampleCoordW,0.0));\nfloat maxSM=max(lumaS,lumaM);\nfloat minSM=min(lumaS,lumaM);\nfloat maxESM=max(lumaE,maxSM);\nfloat minESM=min(lumaE,minSM);\nfloat maxWN=max(lumaN,lumaW);\nfloat minWN=min(lumaN,lumaW);\nfloat rangeMax=max(maxWN,maxESM);\nfloat rangeMin=min(minWN,minESM);\nfloat rangeMaxScaled=rangeMax*fxaaQualityEdgeThreshold;\nfloat range=rangeMax-rangeMin;\nfloat rangeMaxClamped=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\n#ifndef MALI\nif(range=edgeVert;\nfloat subpixA=subpixNSWE*2.0+subpixNWSWNESE;\nif (!horzSpan)\n{\nlumaN=lumaW;\n}\nif (!horzSpan)\n{\nlumaS=lumaE;\n}\nif (horzSpan)\n{\nlengthSign=texelSize.y;\n}\nfloat subpixB=(subpixA*(1.0/12.0))-lumaM;\nfloat gradientN=lumaN-lumaM;\nfloat gradientS=lumaS-lumaM;\nfloat lumaNN=lumaN+lumaM;\nfloat lumaSS=lumaS+lumaM;\nbool pairN=abs(gradientN)>=abs(gradientS);\nfloat gradient=max(abs(gradientN),abs(gradientS));\nif (pairN)\n{\nlengthSign=-lengthSign;\n}\nfloat subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);\nvec2 posB;\nposB.x=posM.x;\nposB.y=posM.y;\nvec2 offNP;\noffNP.x=(!horzSpan) ? 0.0 : texelSize.x;\noffNP.y=(horzSpan) ? 0.0 : texelSize.y;\nif (!horzSpan)\n{\nposB.x+=lengthSign*0.5;\n}\nif (horzSpan)\n{\nposB.y+=lengthSign*0.5;\n}\nvec2 posN;\nposN.x=posB.x-offNP.x*1.5;\nposN.y=posB.y-offNP.y*1.5;\nvec2 posP;\nposP.x=posB.x+offNP.x*1.5;\nposP.y=posB.y+offNP.y*1.5;\nfloat subpixD=((-2.0)*subpixC)+3.0;\nfloat lumaEndN=FxaaLuma(texture2D(textureSampler,posN,0.0));\nfloat subpixE=subpixC*subpixC;\nfloat lumaEndP=FxaaLuma(texture2D(textureSampler,posP,0.0));\nif (!pairN)\n{\nlumaNN=lumaSS;\n}\nfloat gradientScaled=gradient*1.0/4.0;\nfloat lumaMM=lumaM-lumaNN*0.5;\nfloat subpixF=subpixD*subpixE;\nbool lumaMLTZero=lumaMM<0.0;\nlumaEndN-=lumaNN*0.5;\nlumaEndP-=lumaNN*0.5;\nbool doneN=abs(lumaEndN)>=gradientScaled;\nbool doneP=abs(lumaEndP)>=gradientScaled;\nif (!doneN)\n{\nposN.x-=offNP.x*3.0;\n}\nif (!doneN)\n{\nposN.y-=offNP.y*3.0;\n}\nbool doneNP=(!doneN) || (!doneP);\nif (!doneP)\n{\nposP.x+=offNP.x*3.0;\n}\nif (!doneP)\n{\nposP.y+=offNP.y*3.0;\n}\nif (doneNP)\n{\nif (!doneN) lumaEndN=FxaaLuma(texture2D(textureSampler,posN.xy,0.0));\nif (!doneP) lumaEndP=FxaaLuma(texture2D(textureSampler,posP.xy,0.0));\nif (!doneN) lumaEndN=lumaEndN-lumaNN*0.5;\nif (!doneP) lumaEndP=lumaEndP-lumaNN*0.5;\ndoneN=abs(lumaEndN)>=gradientScaled;\ndoneP=abs(lumaEndP)>=gradientScaled;\nif (!doneN) posN.x-=offNP.x*12.0;\nif (!doneN) posN.y-=offNP.y*12.0;\ndoneNP=(!doneN) || (!doneP);\nif (!doneP) posP.x+=offNP.x*12.0;\nif (!doneP) posP.y+=offNP.y*12.0;\n}\nfloat dstN=posM.x-posN.x;\nfloat dstP=posP.x-posM.x;\nif (!horzSpan)\n{\ndstN=posM.y-posN.y;\n}\nif (!horzSpan)\n{\ndstP=posP.y-posM.y;\n}\nbool goodSpanN=(lumaEndN<0.0) != lumaMLTZero;\nfloat spanLength=(dstP+dstN);\nbool goodSpanP=(lumaEndP<0.0) != lumaMLTZero;\nfloat spanLengthRcp=1.0/spanLength;\nbool directionN=dstN -1 ? "#define MALI 1\n" : null; + }), + t + ); + })(Wt.a), + nh = + "#include\n\nuniform sampler2D textureSampler;\n\nuniform float intensity;\nuniform float animatedSeed;\n\nvarying vec2 vUV;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nvec2 seed=vUV*(animatedSeed);\nfloat grain=dither(seed,intensity);\n\nfloat lum=getLuminance(gl_FragColor.rgb);\nfloat grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.;\ngl_FragColor.rgb+=grain*grainAmount;\ngl_FragColor.rgb=max(gl_FragColor.rgb,0.0);\n}"; + Xt.a.ShadersStore.grainPixelShader = nh; + var ih = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === s && (s = 0), void 0 === c && (c = !1); + var l = e.call(this, t, "grain", ["intensity", "animatedSeed"], [], n, i, r, o, a, null, s, void 0, null, c) || this; + return ( + (l.intensity = 30), + (l.animated = !1), + l.onApplyObservable.add(function (e) { + e.setFloat("intensity", l.intensity), e.setFloat("animatedSeed", l.animated ? Math.random() + 1 : 1); + }), + l + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + rh = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nconst vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722);\nvoid main(void)\n{\nvec4 tex=texture2D(textureSampler,vUV);\nvec3 c=tex.rgb;\nfloat luma=dot(c.rgb,RGBLuminanceCoefficients);\n\n\ngl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a);\n}"; + Xt.a.ShadersStore.highlightsPixelShader = rh; + var oh = (function (e) { + function t(t, n, i, r, o, a, s) { + return void 0 === s && (s = 0), e.call(this, t, "highlights", null, null, n, i, r, o, a, null, s) || this; + } + return Object(h.d)(t, e), t; + })(Wt.a); + Xt.a.IncludesShadersStore.mrtFragmentDeclaration = "#if __VERSION__>=200\nlayout(location=0) out vec4 glFragData[{X}];\n#endif\n"; + var ah = + "#extension GL_EXT_draw_buffers : require\n#if defined(BUMP) || !defined(NORMAL)\n#extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\nprecision highp int;\n#ifdef BUMP\nvarying mat4 vWorldView;\nvarying vec3 vNormalW;\n#else\nvarying vec3 vNormalV;\n#endif\nvarying vec4 vViewPos;\n#if defined(POSITION) || defined(BUMP)\nvarying vec3 vPositionW;\n#endif\n#ifdef VELOCITY\nvarying vec4 vCurrentPosition;\nvarying vec4 vPreviousPosition;\n#endif\n#ifdef NEED_UV\nvarying vec2 vUV;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform vec2 vTangentSpaceParams;\n#endif\n#ifdef REFLECTIVITY\nvarying vec2 vReflectivityUV;\nuniform sampler2D reflectivitySampler;\n#endif\n#ifdef ALPHATEST\nuniform sampler2D diffuseSampler;\n#endif\n#include[RENDER_TARGET_COUNT]\n#include\nvoid main() {\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\ngl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0);\n\n#ifdef BUMP\nvec3 normalW=normalize(vNormalW);\n#include\ngl_FragData[1]=vec4(normalize(vec3(vWorldView*vec4(normalW,0.0))),1.0);\n#else\ngl_FragData[1]=vec4(normalize(vNormalV),1.0);\n#endif\n#ifdef POSITION\ngl_FragData[POSITION_INDEX]=vec4(vPositionW,1.0);\n#endif\n#ifdef VELOCITY\nvec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5;\nvec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5;\nvec2 velocity=abs(a-b);\nvelocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;\ngl_FragData[VELOCITY_INDEX]=vec4(velocity,0.0,1.0);\n#endif\n#ifdef REFLECTIVITY\n#ifdef HAS_SPECULAR\n\nvec4 reflectivity=texture2D(reflectivitySampler,vReflectivityUV);\n#elif HAS_REFLECTIVITY\n\nvec4 reflectivity=vec4(texture2D(reflectivitySampler,vReflectivityUV).rgb,1.0);\n#else\nvec4 reflectivity=vec4(0.0,0.0,0.0,1.0);\n#endif\ngl_FragData[REFLECTIVITY_INDEX]=reflectivity;\n#endif\n}"; + Xt.a.ShadersStore.geometryPixelShader = ah; + n(210); + var sh = + "precision highp float;\nprecision highp int;\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n#include\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef NEED_UV\nvarying vec2 vUV;\n#ifdef ALPHATEST\nuniform mat4 diffuseMatrix;\n#endif\n#ifdef BUMP\nuniform mat4 bumpMatrix;\nvarying vec2 vBumpUV;\n#endif\n#ifdef REFLECTIVITY\nuniform mat4 reflectivityMatrix;\nvarying vec2 vReflectivityUV;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n\nuniform mat4 viewProjection;\nuniform mat4 view;\n#ifdef BUMP\nvarying mat4 vWorldView;\n#endif\n#ifdef BUMP\nvarying vec3 vNormalW;\n#else\nvarying vec3 vNormalV;\n#endif\nvarying vec4 vViewPos;\n#if defined(POSITION) || defined(BUMP)\nvarying vec3 vPositionW;\n#endif\n#ifdef VELOCITY\nuniform mat4 previousWorld;\nuniform mat4 previousViewProjection;\n#ifdef BONES_VELOCITY_ENABLED\n#if NUM_BONE_INFLUENCERS>0\nuniform mat4 mPreviousBones[BonesPerMesh];\n#endif\n#endif\nvarying vec4 vCurrentPosition;\nvarying vec4 vPreviousPosition;\n#endif\nvoid main(void)\n{\nvec3 positionUpdated=position;\nvec3 normalUpdated=normal;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#include\n#if defined(VELOCITY) && !defined(BONES_VELOCITY_ENABLED)\n\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\nvPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0);\n#endif\n#include\nvec4 pos=vec4(finalWorld*vec4(positionUpdated,1.0));\n#ifdef BUMP\nvWorldView=view*finalWorld;\nvNormalW=normalUpdated;\n#else\nvNormalV=normalize(vec3((view*finalWorld)*vec4(normalUpdated,0.0)));\n#endif\nvViewPos=view*pos;\n#if defined(VELOCITY) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;\npreviousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(positionUpdated,1.0);\n#else\nvPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0);\n#endif\n#endif\n#if defined(POSITION) || defined(BUMP)\nvPositionW=pos.xyz/pos.w;\n#endif\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#ifdef NEED_UV\n#ifdef UV1\n#ifdef ALPHATEST\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#else\nvUV=uv;\n#endif\n#ifdef BUMP\nvBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#endif\n#ifdef UV2\n#ifdef ALPHATEST\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#else\nvUV=uv2;\n#endif\n#ifdef BUMP\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n#endif\n#ifdef REFLECTIVITY\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#endif\n#include\n}\n"; + Xt.a.ShadersStore.geometryVertexShader = sh; + var ch = (function () { + function e(t, n) { + void 0 === n && (n = 1), + (this._previousTransformationMatrices = {}), + (this._previousBonesTransformationMatrices = {}), + (this.excludedSkinnedMeshesFromVelocity = []), + (this.renderTransparentMeshes = !0), + (this._enablePosition = !1), + (this._enableVelocity = !1), + (this._enableReflectivity = !1), + (this._positionIndex = -1), + (this._velocityIndex = -1), + (this._reflectivityIndex = -1), + (this._scene = t), + (this._ratio = n), + e._SceneComponentInitialization(this._scene), + this._createRenderTargets(); + } + return ( + Object.defineProperty(e.prototype, "renderList", { + set: function (e) { + this._multiRenderTarget.renderList = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isSupported", { + get: function () { + return this._multiRenderTarget.isSupported; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getTextureIndex = function (t) { + switch (t) { + case e.POSITION_TEXTURE_TYPE: + return this._positionIndex; + case e.VELOCITY_TEXTURE_TYPE: + return this._velocityIndex; + case e.REFLECTIVITY_TEXTURE_TYPE: + return this._reflectivityIndex; + default: + return -1; + } + }), + Object.defineProperty(e.prototype, "enablePosition", { + get: function () { + return this._enablePosition; + }, + set: function (e) { + (this._enablePosition = e), this.dispose(), this._createRenderTargets(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "enableVelocity", { + get: function () { + return this._enableVelocity; + }, + set: function (e) { + (this._enableVelocity = e), e || (this._previousTransformationMatrices = {}), this.dispose(), this._createRenderTargets(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "enableReflectivity", { + get: function () { + return this._enableReflectivity; + }, + set: function (e) { + (this._enableReflectivity = e), this.dispose(), this._createRenderTargets(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "scene", { + get: function () { + return this._scene; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "ratio", { + get: function () { + return this._ratio; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isReady = function (e, t) { + var n = e.getMaterial(); + if (n && n.disableDepthWrite) return !1; + var i = [], + r = [wn.b.PositionKind, wn.b.NormalKind], + o = e.getMesh(); + if (n) { + var a = !1; + n.needAlphaBlending() && (i.push("#define ALPHATEST"), (a = !0)), + n.bumpTexture && Mn.a.BumpTextureEnabled && (i.push("#define BUMP"), (a = !0)), + this._enableReflectivity && (n instanceof Mn.a && n.specularTexture ? (i.push("#define HAS_SPECULAR"), (a = !0)) : n instanceof Hr.a && n.reflectivityTexture && (i.push("#define HAS_REFLECTIVITY"), (a = !0))), + a && (i.push("#define NEED_UV"), o.isVerticesDataPresent(wn.b.UVKind) && (r.push(wn.b.UVKind), i.push("#define UV1")), o.isVerticesDataPresent(wn.b.UV2Kind) && (r.push(wn.b.UV2Kind), i.push("#define UV2"))); + } + this._enablePosition && (i.push("#define POSITION"), i.push("#define POSITION_INDEX " + this._positionIndex)), + this._enableVelocity && (i.push("#define VELOCITY"), i.push("#define VELOCITY_INDEX " + this._velocityIndex), -1 === this.excludedSkinnedMeshesFromVelocity.indexOf(o) && i.push("#define BONES_VELOCITY_ENABLED")), + this._enableReflectivity && (i.push("#define REFLECTIVITY"), i.push("#define REFLECTIVITY_INDEX " + this._reflectivityIndex)), + o.useBones && o.computeBonesUsingShaders + ? (r.push(wn.b.MatricesIndicesKind), + r.push(wn.b.MatricesWeightsKind), + o.numBoneInfluencers > 4 && (r.push(wn.b.MatricesIndicesExtraKind), r.push(wn.b.MatricesWeightsExtraKind)), + i.push("#define NUM_BONE_INFLUENCERS " + o.numBoneInfluencers), + i.push("#define BonesPerMesh " + (o.skeleton ? o.skeleton.bones.length + 1 : 0))) + : i.push("#define NUM_BONE_INFLUENCERS 0"); + var s = o.morphTargetManager, + c = 0; + s && s.numInfluencers > 0 && ((c = s.numInfluencers), i.push("#define MORPHTARGETS"), i.push("#define NUM_MORPH_INFLUENCERS " + c), Ir.a.PrepareAttributesForMorphTargetsInfluencers(r, o, c)), + t && (i.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(r)), + i.push("#define RENDER_TARGET_COUNT " + this._multiRenderTarget.textures.length); + var l = i.join("\n"); + return ( + this._cachedDefines !== l && + ((this._cachedDefines = l), + (this._effect = this._scene + .getEngine() + .createEffect( + "geometry", + r, + [ + "world", + "mBones", + "viewProjection", + "diffuseMatrix", + "view", + "previousWorld", + "previousViewProjection", + "mPreviousBones", + "morphTargetInfluences", + "bumpMatrix", + "reflectivityMatrix", + "vTangentSpaceParams", + "vBumpInfos", + ], + ["diffuseSampler", "bumpSampler", "reflectivitySampler"], + l, + void 0, + void 0, + void 0, + { buffersCount: this._multiRenderTarget.textures.length - 1, maxSimultaneousMorphTargets: c } + ))), + this._effect.isReady() + ); + }), + (e.prototype.getGBuffer = function () { + return this._multiRenderTarget; + }), + Object.defineProperty(e.prototype, "samples", { + get: function () { + return this._multiRenderTarget.samples; + }, + set: function (e) { + this._multiRenderTarget.samples = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this.getGBuffer().dispose(); + }), + (e.prototype._createRenderTargets = function () { + var e = this, + t = this._scene.getEngine(), + n = 2; + if ( + (this._enablePosition && ((this._positionIndex = n), n++), + this._enableVelocity && ((this._velocityIndex = n), n++), + this._enableReflectivity && ((this._reflectivityIndex = n), n++), + (this._multiRenderTarget = new ss("gBuffer", { width: t.getRenderWidth() * this._ratio, height: t.getRenderHeight() * this._ratio }, n, this._scene, { + generateMipMaps: !1, + generateDepthTexture: !0, + defaultType: 1, + })), + this.isSupported) + ) { + (this._multiRenderTarget.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._multiRenderTarget.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._multiRenderTarget.refreshRate = 1), + (this._multiRenderTarget.renderParticles = !1), + (this._multiRenderTarget.renderList = null), + this._multiRenderTarget.onClearObservable.add(function (e) { + e.clear(new s.b(0, 0, 0, 1), !0, !0, !0); + }); + var i = function (t) { + var n = t.getRenderingMesh(), + i = e._scene, + r = i.getEngine(), + o = t.getMaterial(); + if (o) { + if ( + ((n._internalAbstractMeshDataInfo._isActiveIntermediate = !1), + e._enableVelocity && !e._previousTransformationMatrices[n.uniqueId] && ((e._previousTransformationMatrices[n.uniqueId] = { world: a.a.Identity(), viewProjection: i.getTransformMatrix() }), n.skeleton)) + ) { + var s = n.skeleton.getTransformMatrices(n); + e._previousBonesTransformationMatrices[n.uniqueId] = e._copyBonesTransformationMatrices(s, new Float32Array(s.length)); + } + r.setState(o.backFaceCulling, 0, !1, i.useRightHandedSystem); + var c = n._getInstancesRenderList(t._id); + if (!c.mustReturn) { + var l = r.getCaps().instancedArrays && null !== c.visibleInstances[t._id]; + if (e.isReady(t, l)) { + if ((r.enableEffect(e._effect), n._bind(t, e._effect, o.fillMode), e._effect.setMatrix("viewProjection", i.getTransformMatrix()), e._effect.setMatrix("view", i.getViewMatrix()), o)) { + if (o.needAlphaTesting()) { + var u = o.getAlphaTestTexture(); + u && (e._effect.setTexture("diffuseSampler", u), e._effect.setMatrix("diffuseMatrix", u.getTextureMatrix())); + } + o.bumpTexture && + i.getEngine().getCaps().standardDerivatives && + Mn.a.BumpTextureEnabled && + (e._effect.setFloat3("vBumpInfos", o.bumpTexture.coordinatesIndex, 1 / o.bumpTexture.level, o.parallaxScaleBias), + e._effect.setMatrix("bumpMatrix", o.bumpTexture.getTextureMatrix()), + e._effect.setTexture("bumpSampler", o.bumpTexture), + e._effect.setFloat2("vTangentSpaceParams", o.invertNormalMapX ? -1 : 1, o.invertNormalMapY ? -1 : 1)), + e._enableReflectivity && + (o instanceof Mn.a && o.specularTexture + ? (e._effect.setMatrix("reflectivityMatrix", o.specularTexture.getTextureMatrix()), e._effect.setTexture("reflectivitySampler", o.specularTexture)) + : o instanceof Hr.a && + o.reflectivityTexture && + (e._effect.setMatrix("reflectivityMatrix", o.reflectivityTexture.getTextureMatrix()), e._effect.setTexture("reflectivitySampler", o.reflectivityTexture))); + } + n.useBones && + n.computeBonesUsingShaders && + n.skeleton && + (e._effect.setMatrices("mBones", n.skeleton.getTransformMatrices(n)), e._enableVelocity && e._effect.setMatrices("mPreviousBones", e._previousBonesTransformationMatrices[n.uniqueId])), + Ir.a.BindMorphTargetParameters(n, e._effect), + e._enableVelocity && + (e._effect.setMatrix("previousWorld", e._previousTransformationMatrices[n.uniqueId].world), + e._effect.setMatrix("previousViewProjection", e._previousTransformationMatrices[n.uniqueId].viewProjection)), + n._processRendering(t, e._effect, o.fillMode, c, l, function (t, n) { + return e._effect.setMatrix("world", n); + }); + } + e._enableVelocity && + ((e._previousTransformationMatrices[n.uniqueId].world = n.getWorldMatrix().clone()), + (e._previousTransformationMatrices[n.uniqueId].viewProjection = e._scene.getTransformMatrix().clone()), + n.skeleton && e._copyBonesTransformationMatrices(n.skeleton.getTransformMatrices(n), e._previousBonesTransformationMatrices[n.uniqueId])); + } + } + }; + this._multiRenderTarget.customRenderFunction = function (n, r, o, a) { + var s; + if (a.length) { + for (t.setColorWrite(!1), s = 0; s < a.length; s++) i(a.data[s]); + t.setColorWrite(!0); + } + for (s = 0; s < n.length; s++) i(n.data[s]); + for (s = 0; s < r.length; s++) i(r.data[s]); + if (e.renderTransparentMeshes) for (s = 0; s < o.length; s++) i(o.data[s]); + }; + } + }), + (e.prototype._copyBonesTransformationMatrices = function (e, t) { + for (var n = 0; n < e.length; n++) t[n] = e[n]; + return t; + }), + (e.POSITION_TEXTURE_TYPE = 1), + (e.VELOCITY_TEXTURE_TYPE = 2), + (e.REFLECTIVITY_TEXTURE_TYPE = 3), + (e._SceneComponentInitialization = function (e) { + throw zo.a.WarnImport("GeometryBufferRendererSceneComponent"); + }), + e + ); + })(); + Object.defineProperty(ge.a.prototype, "geometryBufferRenderer", { + get: function () { + this._geometryBufferRenderer; + }, + set: function (e) { + e && e.isSupported && (this._geometryBufferRenderer = e); + }, + enumerable: !0, + configurable: !0, + }), + (ge.a.prototype.enableGeometryBufferRenderer = function (e) { + return ( + void 0 === e && (e = 1), this._geometryBufferRenderer || ((this._geometryBufferRenderer = new ch(this, e)), this._geometryBufferRenderer.isSupported || (this._geometryBufferRenderer = null)), this._geometryBufferRenderer + ); + }), + (ge.a.prototype.disableGeometryBufferRenderer = function () { + this._geometryBufferRenderer && (this._geometryBufferRenderer.dispose(), (this._geometryBufferRenderer = null)); + }); + var lh = (function () { + function e(e) { + (this.name = me.a.NAME_GEOMETRYBUFFERRENDERER), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._gatherRenderTargetsStage.registerStep(me.a.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER, this, this._gatherRenderTargets); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () {}), + (e.prototype._gatherRenderTargets = function (e) { + this.scene._geometryBufferRenderer && e.push(this.scene._geometryBufferRenderer.getGBuffer()); + }), + e + ); + })(); + ch._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_GEOMETRYBUFFERRENDERER); + t || ((t = new lh(e)), e._addComponent(t)); + }; + var uh = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D velocitySampler;\nuniform float motionStrength;\nuniform float motionScale;\nuniform vec2 screenSize;\nvoid main(void)\n{\n#ifdef GEOMETRY_SUPPORTED\nvec2 texelSize=1.0/screenSize;\nvec2 velocityColor=texture2D(velocitySampler,vUV).rg*2.0-1.0;\nvec2 velocity=vec2(pow(velocityColor.r,3.0),pow(velocityColor.g,3.0));\nvelocity*=motionScale*motionStrength;\nfloat speed=length(velocity/texelSize);\nint samplesCount=int(clamp(speed,1.0,SAMPLES));\nvelocity=normalize(velocity)*texelSize;\nfloat hlim=float(-samplesCount)*0.5+0.5;\nvec4 result=texture2D(textureSampler,vUV);\nfor (int i=1; i=samplesCount)\nbreak;\nvec2 offset=vUV+velocity*(hlim+float(i));\nresult+=texture2D(textureSampler,offset);\n}\ngl_FragColor=result/float(samplesCount);\ngl_FragColor.a=1.0;\n#else\ngl_FragColor=texture2D(textureSampler,vUV);\n#endif\n}\n"; + Xt.a.ShadersStore.motionBlurPixelShader = uh; + var hh = (function (e) { + function t(t, n, i, r, o, s, c, l, u) { + void 0 === l && (l = 0), void 0 === u && (u = !1); + var h = e.call(this, t, "motionBlur", ["motionStrength", "motionScale", "screenSize"], ["velocitySampler"], i, r, o, s, c, "#define GEOMETRY_SUPPORTED\n#define SAMPLES 64.0", l, void 0, null, u) || this; + return ( + (h.motionStrength = 1), + (h._motionBlurSamples = 32), + (h._geometryBufferRenderer = n.enableGeometryBufferRenderer()), + h._geometryBufferRenderer + ? ((h._geometryBufferRenderer.enableVelocity = !0), + (h.onApply = function (e) { + if ((e.setVector2("screenSize", new a.d(h.width, h.height)), e.setFloat("motionScale", n.getAnimationRatio()), e.setFloat("motionStrength", h.motionStrength), h._geometryBufferRenderer)) { + var t = h._geometryBufferRenderer.getTextureIndex(ch.VELOCITY_TEXTURE_TYPE); + e.setTexture("velocitySampler", h._geometryBufferRenderer.getGBuffer().textures[t]); + } + })) + : (g.a.Warn("Multiple Render Target support needed to compute object based motion blur"), h.updateEffect()), + h + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "motionBlurSamples", { + get: function () { + return this._motionBlurSamples; + }, + set: function (e) { + (this._motionBlurSamples = e), this._geometryBufferRenderer && this.updateEffect("#define GEOMETRY_SUPPORTED\n#define SAMPLES " + e.toFixed(1)); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.excludeSkinnedMesh = function (e) { + this._geometryBufferRenderer && e.skeleton && this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.push(e); + }), + (t.prototype.removeExcludedSkinnedMesh = function (e) { + if (this._geometryBufferRenderer && e.skeleton) { + var t = this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.indexOf(e); + -1 !== t && this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.splice(t, 1); + } + }), + (t.prototype.dispose = function (t) { + this._geometryBufferRenderer && + ((this._geometryBufferRenderer._previousTransformationMatrices = {}), + (this._geometryBufferRenderer._previousBonesTransformationMatrices = {}), + (this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity = [])), + e.prototype.dispose.call(this, t); + }), + t + ); + })(Wt.a), + dh = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D refractionSampler;\n\nuniform vec3 baseColor;\nuniform float depth;\nuniform float colorLevel;\nvoid main() {\nfloat ref=1.0-texture2D(refractionSampler,vUV).r;\nvec2 uv=vUV-vec2(0.5);\nvec2 offset=uv*depth*ref;\nvec3 sourceColor=texture2D(textureSampler,vUV-offset).rgb;\ngl_FragColor=vec4(sourceColor+sourceColor*ref*colorLevel,1.0);\n}"; + Xt.a.ShadersStore.refractionPixelShader = dh; + var ph = (function (e) { + function t(t, n, i, r, o, a, s, c, l, u) { + var h = e.call(this, t, "refraction", ["baseColor", "depth", "colorLevel"], ["refractionSampler"], a, s, c, l, u) || this; + return ( + (h.color = i), + (h.depth = r), + (h.colorLevel = o), + (h._ownRefractionTexture = !0), + h.onActivateObservable.add(function (e) { + h._refTexture = h._refTexture || new ln.a(n, e.getScene()); + }), + h.onApplyObservable.add(function (e) { + e.setColor3("baseColor", h.color), e.setFloat("depth", h.depth), e.setFloat("colorLevel", h.colorLevel), e.setTexture("refractionSampler", h._refTexture); + }), + h + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "refractionTexture", { + get: function () { + return this._refTexture; + }, + set: function (e) { + this._refTexture && this._ownRefractionTexture && this._refTexture.dispose(), (this._refTexture = e), (this._ownRefractionTexture = !1); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.dispose = function (t) { + this._refTexture && this._ownRefractionTexture && (this._refTexture.dispose(), (this._refTexture = null)), e.prototype.dispose.call(this, t); + }), + t + ); + })(Wt.a), + fh = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 screenSize;\nuniform vec2 sharpnessAmounts;\nvoid main(void)\n{\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\nvec4 color=texture2D(textureSampler,vUV);\nvec4 edgeDetection=texture2D(textureSampler,vUV+onePixel*vec2(0,-1)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1)) -\ncolor*4.0;\ngl_FragColor=max(vec4(color.rgb*sharpnessAmounts.y,color.a)-(sharpnessAmounts.x*vec4(edgeDetection.rgb,0)),0.);\n}"; + Xt.a.ShadersStore.sharpenPixelShader = fh; + var mh = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === s && (s = 0), void 0 === c && (c = !1); + var l = e.call(this, t, "sharpen", ["sharpnessAmounts", "screenSize"], null, n, i, r, o, a, null, s, void 0, null, c) || this; + return ( + (l.colorAmount = 1), + (l.edgeAmount = 0.3), + (l.onApply = function (e) { + e.setFloat2("screenSize", l.width, l.height), e.setFloat2("sharpnessAmounts", l.edgeAmount, l.colorAmount); + }), + l + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + gh = (function () { + function e(e, t) { + (this.engine = e), (this._name = t), (this._renderEffects = {}), (this._renderEffectsForIsolatedPass = new Array()), (this._cameras = []); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return this._name; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "cameras", { + get: function () { + return this._cameras; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "PostProcessRenderPipeline"; + }), + Object.defineProperty(e.prototype, "isSupported", { + get: function () { + for (var e in this._renderEffects) if (this._renderEffects.hasOwnProperty(e) && !this._renderEffects[e].isSupported) return !1; + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addEffect = function (e) { + this._renderEffects[e._name] = e; + }), + (e.prototype._rebuild = function () {}), + (e.prototype._enableEffect = function (e, t) { + var n = this._renderEffects[e]; + n && n._enable($e.b.MakeArray(t || this._cameras)); + }), + (e.prototype._disableEffect = function (e, t) { + var n = this._renderEffects[e]; + n && n._disable($e.b.MakeArray(t || this._cameras)); + }), + (e.prototype._attachCameras = function (e, t) { + var n = $e.b.MakeArray(e || this._cameras); + if (n) { + var i, + r = []; + for (i = 0; i < n.length; i++) { + var o = n[i], + a = o.name; + -1 === this._cameras.indexOf(o) ? (this._cameras[a] = o) : t && r.push(i); + } + for (i = 0; i < r.length; i++) e.splice(r[i], 1); + for (var s in this._renderEffects) this._renderEffects.hasOwnProperty(s) && this._renderEffects[s]._attachCameras(n); + } + }), + (e.prototype._detachCameras = function (e) { + var t = $e.b.MakeArray(e || this._cameras); + if (t) { + for (var n in this._renderEffects) this._renderEffects.hasOwnProperty(n) && this._renderEffects[n]._detachCameras(t); + for (var i = 0; i < t.length; i++) this._cameras.splice(this._cameras.indexOf(t[i]), 1); + } + }), + (e.prototype._update = function () { + for (var e in this._renderEffects) this._renderEffects.hasOwnProperty(e) && this._renderEffects[e]._update(); + for (var t = 0; t < this._cameras.length; t++) { + var n = this._cameras[t].name; + this._renderEffectsForIsolatedPass[n] && this._renderEffectsForIsolatedPass[n]._update(); + } + }), + (e.prototype._reset = function () { + (this._renderEffects = {}), (this._renderEffectsForIsolatedPass = new Array()); + }), + (e.prototype._enableMSAAOnFirstPostProcess = function (e) { + if (1 === this.engine.webGLVersion) return !1; + var t = Object.keys(this._renderEffects); + if (t.length > 0) { + var n = this._renderEffects[t[0]].getPostProcesses(); + n && (n[0].samples = e); + } + return !0; + }), + (e.prototype.dispose = function () {}), + Object(h.c)([Object(He.c)()], e.prototype, "_name", void 0), + e + ); + })(), + bh = (function () { + function e() { + this._renderPipelines = {}; + } + return ( + Object.defineProperty(e.prototype, "supportedPipelines", { + get: function () { + var e = []; + for (var t in this._renderPipelines) + if (this._renderPipelines.hasOwnProperty(t)) { + var n = this._renderPipelines[t]; + n.isSupported && e.push(n); + } + return e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addPipeline = function (e) { + this._renderPipelines[e._name] = e; + }), + (e.prototype.attachCamerasToRenderPipeline = function (e, t, n) { + void 0 === n && (n = !1); + var i = this._renderPipelines[e]; + i && i._attachCameras(t, n); + }), + (e.prototype.detachCamerasFromRenderPipeline = function (e, t) { + var n = this._renderPipelines[e]; + n && n._detachCameras(t); + }), + (e.prototype.enableEffectInPipeline = function (e, t, n) { + var i = this._renderPipelines[e]; + i && i._enableEffect(t, n); + }), + (e.prototype.disableEffectInPipeline = function (e, t, n) { + var i = this._renderPipelines[e]; + i && i._disableEffect(t, n); + }), + (e.prototype.update = function () { + for (var e in this._renderPipelines) + if (this._renderPipelines.hasOwnProperty(e)) { + var t = this._renderPipelines[e]; + t.isSupported ? t._update() : (t.dispose(), delete this._renderPipelines[e]); + } + }), + (e.prototype._rebuild = function () { + for (var e in this._renderPipelines) { + if (this._renderPipelines.hasOwnProperty(e)) this._renderPipelines[e]._rebuild(); + } + }), + (e.prototype.dispose = function () { + for (var e in this._renderPipelines) { + if (this._renderPipelines.hasOwnProperty(e)) this._renderPipelines[e].dispose(); + } + }), + e + ); + })(); + Object.defineProperty(ge.a.prototype, "postProcessRenderPipelineManager", { + get: function () { + if (!this._postProcessRenderPipelineManager) { + var e = this._getComponent(me.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER); + e || ((e = new _h(this)), this._addComponent(e)), (this._postProcessRenderPipelineManager = new bh()); + } + return this._postProcessRenderPipelineManager; + }, + enumerable: !0, + configurable: !0, + }); + var _h = (function () { + function e(e) { + (this.name = me.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._gatherRenderTargetsStage.registerStep(me.a.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER, this, this._gatherRenderTargets); + }), + (e.prototype.rebuild = function () { + this.scene._postProcessRenderPipelineManager && this.scene._postProcessRenderPipelineManager._rebuild(); + }), + (e.prototype.dispose = function () { + this.scene._postProcessRenderPipelineManager && this.scene._postProcessRenderPipelineManager.dispose(); + }), + (e.prototype._gatherRenderTargets = function () { + this.scene._postProcessRenderPipelineManager && this.scene._postProcessRenderPipelineManager.update(); + }), + e + ); + })(), + vh = (function (e) { + function t(t, n, i, r, o) { + void 0 === t && (t = ""), void 0 === n && (n = !0), void 0 === i && (i = E.a.LastCreatedScene), void 0 === o && (o = !0); + var a = e.call(this, i.getEngine(), t) || this; + (a._camerasToBeAttached = []), + (a.SharpenPostProcessId = "SharpenPostProcessEffect"), + (a.ImageProcessingPostProcessId = "ImageProcessingPostProcessEffect"), + (a.FxaaPostProcessId = "FxaaPostProcessEffect"), + (a.ChromaticAberrationPostProcessId = "ChromaticAberrationPostProcessEffect"), + (a.GrainPostProcessId = "GrainPostProcessEffect"), + (a._glowLayer = null), + (a.animations = []), + (a._imageProcessingConfigurationObserver = null), + (a._sharpenEnabled = !1), + (a._bloomEnabled = !1), + (a._depthOfFieldEnabled = !1), + (a._depthOfFieldBlurLevel = Wu.Low), + (a._fxaaEnabled = !1), + (a._imageProcessingEnabled = !0), + (a._bloomScale = 0.5), + (a._chromaticAberrationEnabled = !1), + (a._grainEnabled = !1), + (a._buildAllowed = !0), + (a._resizeObserver = null), + (a._hardwareScaleLevel = 1), + (a._bloomKernel = 64), + (a._bloomWeight = 0.15), + (a._bloomThreshold = 0.9), + (a._samples = 1), + (a._hasCleared = !1), + (a._prevPostProcess = null), + (a._prevPrevPostProcess = null), + (a._depthOfFieldSceneObserver = null), + (a._cameras = r || i.cameras), + (a._cameras = a._cameras.slice()), + (a._camerasToBeAttached = a._cameras.slice()), + (a._buildAllowed = o), + (a._scene = i); + var s = a._scene.getEngine().getCaps(); + (a._hdr = n && (s.textureHalfFloatRender || s.textureFloatRender)), + a._hdr ? (s.textureHalfFloatRender ? (a._defaultPipelineTextureType = 2) : s.textureFloatRender && (a._defaultPipelineTextureType = 1)) : (a._defaultPipelineTextureType = 0), + i.postProcessRenderPipelineManager.addPipeline(a); + var c = a._scene.getEngine(); + return ( + (a.sharpen = new mh("sharpen", 1, null, ln.a.BILINEAR_SAMPLINGMODE, c, !1, a._defaultPipelineTextureType, !0)), + (a._sharpenEffect = new Au( + c, + a.SharpenPostProcessId, + function () { + return a.sharpen; + }, + !0 + )), + (a.depthOfField = new Ku(a._scene, null, a._depthOfFieldBlurLevel, a._defaultPipelineTextureType, !0)), + (a.bloom = new Lu(a._scene, a._bloomScale, a._bloomWeight, a.bloomKernel, a._defaultPipelineTextureType, !0)), + (a.chromaticAberration = new Nu("ChromaticAberration", c.getRenderWidth(), c.getRenderHeight(), 1, null, ln.a.BILINEAR_SAMPLINGMODE, c, !1, a._defaultPipelineTextureType, !0)), + (a._chromaticAberrationEffect = new Au( + c, + a.ChromaticAberrationPostProcessId, + function () { + return a.chromaticAberration; + }, + !0 + )), + (a.grain = new ih("Grain", 1, null, ln.a.BILINEAR_SAMPLINGMODE, c, !1, a._defaultPipelineTextureType, !0)), + (a._grainEffect = new Au( + c, + a.GrainPostProcessId, + function () { + return a.grain; + }, + !0 + )), + (a._resizeObserver = c.onResizeObservable.add(function () { + (a._hardwareScaleLevel = c.getHardwareScalingLevel()), (a.bloomKernel = a.bloomKernel); + })), + (a._imageProcessingConfigurationObserver = a._scene.imageProcessingConfiguration.onUpdateParameters.add(function () { + a.bloom._downscale._exposure = a._scene.imageProcessingConfiguration.exposure; + })), + a._buildPipeline(), + a + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "scene", { + get: function () { + return this._scene; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "sharpenEnabled", { + get: function () { + return this._sharpenEnabled; + }, + set: function (e) { + this._sharpenEnabled !== e && ((this._sharpenEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bloomKernel", { + get: function () { + return this._bloomKernel; + }, + set: function (e) { + (this._bloomKernel = e), (this.bloom.kernel = e / this._hardwareScaleLevel); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bloomWeight", { + get: function () { + return this._bloomWeight; + }, + set: function (e) { + this._bloomWeight !== e && ((this.bloom.weight = e), (this._bloomWeight = e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bloomThreshold", { + get: function () { + return this._bloomThreshold; + }, + set: function (e) { + this._bloomThreshold !== e && ((this.bloom.threshold = e), (this._bloomThreshold = e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bloomScale", { + get: function () { + return this._bloomScale; + }, + set: function (e) { + this._bloomScale !== e && ((this._bloomScale = e), this._rebuildBloom(), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "bloomEnabled", { + get: function () { + return this._bloomEnabled; + }, + set: function (e) { + this._bloomEnabled !== e && ((this._bloomEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._rebuildBloom = function () { + var e = this.bloom; + (this.bloom = new Lu(this._scene, this.bloomScale, this._bloomWeight, this.bloomKernel, this._defaultPipelineTextureType, !1)), (this.bloom.threshold = e.threshold); + for (var t = 0; t < this._cameras.length; t++) e.disposeEffects(this._cameras[t]); + }), + Object.defineProperty(t.prototype, "depthOfFieldEnabled", { + get: function () { + return this._depthOfFieldEnabled; + }, + set: function (e) { + this._depthOfFieldEnabled !== e && ((this._depthOfFieldEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "depthOfFieldBlurLevel", { + get: function () { + return this._depthOfFieldBlurLevel; + }, + set: function (e) { + if (this._depthOfFieldBlurLevel !== e) { + this._depthOfFieldBlurLevel = e; + var t = this.depthOfField; + (this.depthOfField = new Ku(this._scene, null, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType, !1)), + (this.depthOfField.focalLength = t.focalLength), + (this.depthOfField.focusDistance = t.focusDistance), + (this.depthOfField.fStop = t.fStop), + (this.depthOfField.lensSize = t.lensSize); + for (var n = 0; n < this._cameras.length; n++) t.disposeEffects(this._cameras[n]); + this._buildPipeline(); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fxaaEnabled", { + get: function () { + return this._fxaaEnabled; + }, + set: function (e) { + this._fxaaEnabled !== e && ((this._fxaaEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "samples", { + get: function () { + return this._samples; + }, + set: function (e) { + this._samples !== e && ((this._samples = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "imageProcessingEnabled", { + get: function () { + return this._imageProcessingEnabled; + }, + set: function (e) { + this._imageProcessingEnabled !== e && ((this._imageProcessingEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "glowLayerEnabled", { + get: function () { + return null != this._glowLayer; + }, + set: function (e) { + e && !this._glowLayer ? (this._glowLayer = new Uo("", this._scene)) : !e && this._glowLayer && (this._glowLayer.dispose(), (this._glowLayer = null)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "glowLayer", { + get: function () { + return this._glowLayer; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "chromaticAberrationEnabled", { + get: function () { + return this._chromaticAberrationEnabled; + }, + set: function (e) { + this._chromaticAberrationEnabled !== e && ((this._chromaticAberrationEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "grainEnabled", { + get: function () { + return this._grainEnabled; + }, + set: function (e) { + this._grainEnabled !== e && ((this._grainEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "DefaultRenderingPipeline"; + }), + (t.prototype.prepare = function () { + var e = this._buildAllowed; + (this._buildAllowed = !0), this._buildPipeline(), (this._buildAllowed = e); + }), + (t.prototype._setAutoClearAndTextureSharing = function (e, t) { + void 0 === t && (t = !1), + this._hasCleared ? (e.autoClear = !1) : ((e.autoClear = !0), (this._scene.autoClear = !1), (this._hasCleared = !0)), + t || (this._prevPrevPostProcess ? e.shareOutputWith(this._prevPrevPostProcess) : e.useOwnOutput(), this._prevPostProcess && (this._prevPrevPostProcess = this._prevPostProcess), (this._prevPostProcess = e)); + }), + (t.prototype._buildPipeline = function () { + var e = this; + if (this._buildAllowed) { + this._scene.autoClear = !0; + var t = this._scene.getEngine(); + if ( + (this._disposePostProcesses(), + null !== this._cameras && (this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras), (this._cameras = this._camerasToBeAttached.slice())), + this._reset(), + (this._prevPostProcess = null), + (this._prevPrevPostProcess = null), + (this._hasCleared = !1), + this.depthOfFieldEnabled) + ) { + if (this._cameras.length > 1) { + for (var n = 0, i = this._cameras; n < i.length; n++) { + var r = i[n]; + (o = this._scene.enableDepthRenderer(r)).useOnlyInActiveCamera = !0; + } + this._depthOfFieldSceneObserver = this._scene.onAfterRenderTargetsRenderObservable.add(function (t) { + e._cameras.indexOf(t.activeCamera) > -1 && (e.depthOfField.depthTexture = t.enableDepthRenderer(t.activeCamera).getDepthMap()); + }); + } else { + this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver); + var o = this._scene.enableDepthRenderer(this._cameras[0]); + this.depthOfField.depthTexture = o.getDepthMap(); + } + this.depthOfField._isReady() || this.depthOfField._updateEffects(), this.addEffect(this.depthOfField), this._setAutoClearAndTextureSharing(this.depthOfField._effects[0], !0); + } else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver); + this.bloomEnabled && (this.bloom._isReady() || this.bloom._updateEffects(), this.addEffect(this.bloom), this._setAutoClearAndTextureSharing(this.bloom._effects[0], !0)), + this._imageProcessingEnabled && + ((this.imageProcessing = new Dn("imageProcessing", 1, null, ln.a.BILINEAR_SAMPLINGMODE, t, !1, this._defaultPipelineTextureType)), + this._hdr + ? (this.addEffect( + new Au( + t, + this.ImageProcessingPostProcessId, + function () { + return e.imageProcessing; + }, + !0 + ) + ), + this._setAutoClearAndTextureSharing(this.imageProcessing)) + : (this._scene.imageProcessingConfiguration.applyByPostProcess = !1)), + this.sharpenEnabled && (this.sharpen.isReady() || this.sharpen.updateEffect(), this.addEffect(this._sharpenEffect), this._setAutoClearAndTextureSharing(this.sharpen)), + this.grainEnabled && (this.grain.isReady() || this.grain.updateEffect(), this.addEffect(this._grainEffect), this._setAutoClearAndTextureSharing(this.grain)), + this.chromaticAberrationEnabled && + (this.chromaticAberration.isReady() || this.chromaticAberration.updateEffect(), this.addEffect(this._chromaticAberrationEffect), this._setAutoClearAndTextureSharing(this.chromaticAberration)), + this.fxaaEnabled && + ((this.fxaa = new th("fxaa", 1, null, ln.a.BILINEAR_SAMPLINGMODE, t, !1, this._defaultPipelineTextureType)), + this.addEffect( + new Au( + t, + this.FxaaPostProcessId, + function () { + return e.fxaa; + }, + !0 + ) + ), + this._setAutoClearAndTextureSharing(this.fxaa, !0)), + null !== this._cameras && this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras), + this._scene.activeCameras && this._scene.activeCameras.length > 1 && (this._scene.autoClear = !0), + !this._enableMSAAOnFirstPostProcess(this.samples) && this.samples > 1 && g.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0"); + } + }), + (t.prototype._disposePostProcesses = function (e) { + void 0 === e && (e = !1); + for (var t = 0; t < this._cameras.length; t++) { + var n = this._cameras[t]; + this.imageProcessing && this.imageProcessing.dispose(n), + this.fxaa && this.fxaa.dispose(n), + e && + (this.sharpen && this.sharpen.dispose(n), + this.depthOfField && (this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver), this.depthOfField.disposeEffects(n)), + this.bloom && this.bloom.disposeEffects(n), + this.chromaticAberration && this.chromaticAberration.dispose(n), + this.grain && this.grain.dispose(n), + this._glowLayer && this._glowLayer.dispose()); + } + (this.imageProcessing = null), + (this.fxaa = null), + e && + ((this.sharpen = null), + (this._sharpenEffect = null), + (this.depthOfField = null), + (this.bloom = null), + (this.chromaticAberration = null), + (this._chromaticAberrationEffect = null), + (this.grain = null), + (this._grainEffect = null), + (this._glowLayer = null)); + }), + (t.prototype.addCamera = function (e) { + this._camerasToBeAttached.push(e), this._buildPipeline(); + }), + (t.prototype.removeCamera = function (e) { + var t = this._camerasToBeAttached.indexOf(e); + this._camerasToBeAttached.splice(t, 1), this._buildPipeline(); + }), + (t.prototype.dispose = function () { + this._disposePostProcesses(!0), + this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras), + (this._scene.autoClear = !0), + this._resizeObserver && (this._scene.getEngine().onResizeObservable.remove(this._resizeObserver), (this._resizeObserver = null)), + this._scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigurationObserver), + e.prototype.dispose.call(this); + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + return (e.customType = "DefaultRenderingPipeline"), e; + }), + (t.Parse = function (e, n, i) { + return He.a.Parse( + function () { + return new t(e._name, e._name._hdr, n); + }, + e, + n, + i + ); + }), + Object(h.c)([Object(He.c)()], t.prototype, "sharpenEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "bloomKernel", null), + Object(h.c)([Object(He.c)()], t.prototype, "_bloomWeight", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_bloomThreshold", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_hdr", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "bloomWeight", null), + Object(h.c)([Object(He.c)()], t.prototype, "bloomThreshold", null), + Object(h.c)([Object(He.c)()], t.prototype, "bloomScale", null), + Object(h.c)([Object(He.c)()], t.prototype, "bloomEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "depthOfFieldEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "depthOfFieldBlurLevel", null), + Object(h.c)([Object(He.c)()], t.prototype, "fxaaEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "samples", null), + Object(h.c)([Object(He.c)()], t.prototype, "imageProcessingEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "glowLayerEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "chromaticAberrationEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "grainEnabled", null), + t + ); + })(gh); + c.a.RegisteredTypes["BABYLON.DefaultRenderingPipeline"] = vh; + var yh = + "\nuniform sampler2D textureSampler;\n\nuniform float gain;\nuniform float threshold;\nuniform float screen_width;\nuniform float screen_height;\n\nvarying vec2 vUV;\n\nvec4 highlightColor(vec4 color) {\nvec4 highlight=color;\nfloat luminance=dot(highlight.rgb,vec3(0.2125,0.7154,0.0721));\nfloat lum_threshold;\nif (threshold>1.0) { lum_threshold=0.94+0.01*threshold; }\nelse { lum_threshold=0.5+0.44*threshold; }\nluminance=clamp((luminance-lum_threshold)*(1.0/(1.0-lum_threshold)),0.0,1.0);\nhighlight*=luminance*gain;\nhighlight.a=1.0;\nreturn highlight;\n}\nvoid main(void)\n{\nvec4 original=texture2D(textureSampler,vUV);\n\nif (gain == -1.0) {\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\nreturn;\n}\nfloat w=2.0/screen_width;\nfloat h=2.0/screen_height;\nfloat weight=1.0;\n\nvec4 blurred=vec4(0.0,0.0,0.0,0.0);\n#ifdef PENTAGON\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.84*w,0.43*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.48*w,-1.29*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.61*w,1.51*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.55*w,-0.74*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.71*w,-0.52*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.94*w,1.59*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.40*w,-1.87*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.62*w,1.16*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.09*w,0.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.46*w,-1.71*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.08*w,2.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.85*w,-1.89*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.89*w,0.16*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.29*w,1.88*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.40*w,-2.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.54*w,2.26*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.60*w,-0.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.31*w,-1.30*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.83*w,2.53*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.12*w,-2.48*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.60*w,1.11*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.99*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.50*w,-2.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.85*w,3.33*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.94*w,-1.92*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.27*w,-0.53*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.95*w,2.48*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.23*w,-3.04*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.17*w,2.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.97*w,-0.04*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.25*w,-2.00*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.31*w,3.08*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.94*w,-2.59*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.37*w,0.64*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.13*w,1.93*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.03*w,-3.65*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.60*w,3.17*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.14*w,-1.19*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.00*w,-1.19*h)));\n#else\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.85*w,0.36*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.52*w,-1.14*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.46*w,1.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.46*w,-0.83*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.79*w,-0.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.11*w,1.62*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.29*w,-2.07*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.69*w,1.39*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.28*w,0.12*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.65*w,-1.69*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.08*w,2.44*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.63*w,-1.90*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.55*w,0.31*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.13*w,1.52*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.56*w,-2.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.38*w,2.34*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.64*w,-0.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.53*w,-1.21*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.06*w,2.63*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.00*w,-2.69*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.59*w,1.32*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.78*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.57*w,-2.50*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.54*w,2.93*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.39*w,-1.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,-0.28*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.04*w,2.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.02*w,-3.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.09*w,2.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.07*w,-0.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.44*w,-1.90*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.52*w,3.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.68*w,-2.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,0.79*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.76*w,1.46*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.05*w,-2.94*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.21*w,2.88*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.84*w,-1.30*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.98*w,-0.96*h)));\n#endif\nblurred/=39.0;\ngl_FragColor=blurred;\n\n}"; + Xt.a.ShadersStore.lensHighlightsPixelShader = yh; + var Ch = + "\n\n\n\n\nuniform sampler2D textureSampler;\nuniform sampler2D highlightsSampler;\nuniform sampler2D depthSampler;\nuniform sampler2D grainSampler;\n\nuniform float grain_amount;\nuniform bool blur_noise;\nuniform float screen_width;\nuniform float screen_height;\nuniform float distortion;\nuniform bool dof_enabled;\n\nuniform float screen_distance;\nuniform float aperture;\nuniform float darken;\nuniform float edge_blur;\nuniform bool highlights;\n\nuniform float near;\nuniform float far;\n\nvarying vec2 vUV;\n\n#define PI 3.14159265\n#define TWOPI 6.28318530\n#define inverse_focal_length 0.1\n\nvec2 centered_screen_pos;\nvec2 distorted_coords;\nfloat radius2;\nfloat radius;\n\nvec2 rand(vec2 co)\n{\nfloat noise1=(fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453));\nfloat noise2=(fract(sin(dot(co,vec2(12.9898,78.233)*2.0))*43758.5453));\nreturn clamp(vec2(noise1,noise2),0.0,1.0);\n}\n\nvec2 getDistortedCoords(vec2 coords) {\nif (distortion == 0.0) { return coords; }\nvec2 direction=1.0*normalize(centered_screen_pos);\nvec2 dist_coords=vec2(0.5,0.5);\ndist_coords.x=0.5+direction.x*radius2*1.0;\ndist_coords.y=0.5+direction.y*radius2*1.0;\nfloat dist_amount=clamp(distortion*0.23,0.0,1.0);\ndist_coords=mix(coords,dist_coords,dist_amount);\nreturn dist_coords;\n}\n\nfloat sampleScreen(inout vec4 color,const in vec2 offset,const in float weight) {\n\nvec2 coords=distorted_coords;\nfloat angle=rand(coords*100.0).x*TWOPI;\ncoords+=vec2(offset.x*cos(angle)-offset.y*sin(angle),offset.x*sin(angle)+offset.y*cos(angle));\ncolor+=texture2D(textureSampler,coords)*weight;\nreturn weight;\n}\n\nfloat getBlurLevel(float size) {\nreturn min(3.0,ceil(size/1.0));\n}\n\nvec4 getBlurColor(float size) {\nvec4 col=texture2D(textureSampler,distorted_coords);\nif (size == 0.0) { return col; }\n\n\nfloat blur_level=getBlurLevel(size);\nfloat w=(size/screen_width);\nfloat h=(size/screen_height);\nfloat total_weight=1.0;\nvec2 sample_coords;\ntotal_weight+=sampleScreen(col,vec2(-0.50*w,0.24*h),0.93);\ntotal_weight+=sampleScreen(col,vec2(0.30*w,-0.75*h),0.90);\ntotal_weight+=sampleScreen(col,vec2(0.36*w,0.96*h),0.87);\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,-0.55*h),0.85);\ntotal_weight+=sampleScreen(col,vec2(1.33*w,-0.37*h),0.83);\ntotal_weight+=sampleScreen(col,vec2(-0.82*w,1.31*h),0.80);\ntotal_weight+=sampleScreen(col,vec2(-0.31*w,-1.67*h),0.78);\ntotal_weight+=sampleScreen(col,vec2(1.47*w,1.11*h),0.76);\ntotal_weight+=sampleScreen(col,vec2(-1.97*w,0.19*h),0.74);\ntotal_weight+=sampleScreen(col,vec2(1.42*w,-1.57*h),0.72);\nif (blur_level>1.0) {\ntotal_weight+=sampleScreen(col,vec2(0.01*w,2.25*h),0.70);\ntotal_weight+=sampleScreen(col,vec2(-1.62*w,-1.74*h),0.67);\ntotal_weight+=sampleScreen(col,vec2(2.49*w,0.20*h),0.65);\ntotal_weight+=sampleScreen(col,vec2(-2.07*w,1.61*h),0.63);\ntotal_weight+=sampleScreen(col,vec2(0.46*w,-2.70*h),0.61);\ntotal_weight+=sampleScreen(col,vec2(1.55*w,2.40*h),0.59);\ntotal_weight+=sampleScreen(col,vec2(-2.88*w,-0.75*h),0.56);\ntotal_weight+=sampleScreen(col,vec2(2.73*w,-1.44*h),0.54);\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,3.02*h),0.52);\ntotal_weight+=sampleScreen(col,vec2(-1.28*w,-3.05*h),0.49);\n}\nif (blur_level>2.0) {\ntotal_weight+=sampleScreen(col,vec2(3.11*w,1.43*h),0.46);\ntotal_weight+=sampleScreen(col,vec2(-3.36*w,1.08*h),0.44);\ntotal_weight+=sampleScreen(col,vec2(1.80*w,-3.16*h),0.41);\ntotal_weight+=sampleScreen(col,vec2(0.83*w,3.65*h),0.38);\ntotal_weight+=sampleScreen(col,vec2(-3.16*w,-2.19*h),0.34);\ntotal_weight+=sampleScreen(col,vec2(3.92*w,-0.53*h),0.31);\ntotal_weight+=sampleScreen(col,vec2(-2.59*w,3.12*h),0.26);\ntotal_weight+=sampleScreen(col,vec2(-0.20*w,-4.15*h),0.22);\ntotal_weight+=sampleScreen(col,vec2(3.02*w,3.00*h),0.15);\n}\ncol/=total_weight;\n\nif (darken>0.0) {\ncol.rgb*=clamp(0.3,1.0,1.05-size*0.5*darken);\n}\n\n\n\n\nreturn col;\n}\nvoid main(void)\n{\n\ncentered_screen_pos=vec2(vUV.x-0.5,vUV.y-0.5);\nradius2=centered_screen_pos.x*centered_screen_pos.x+centered_screen_pos.y*centered_screen_pos.y;\nradius=sqrt(radius2);\ndistorted_coords=getDistortedCoords(vUV);\nvec2 texels_coords=vec2(vUV.x*screen_width,vUV.y*screen_height);\nfloat depth=texture2D(depthSampler,distorted_coords).r;\nfloat distance=near+(far-near)*depth;\nvec4 color=texture2D(textureSampler,vUV);\n\n\nfloat coc=abs(aperture*(screen_distance*(inverse_focal_length-1.0/distance)-1.0));\n\nif (dof_enabled == false || coc<0.07) { coc=0.0; }\n\nfloat edge_blur_amount=0.0;\nif (edge_blur>0.0) {\nedge_blur_amount=clamp((radius*2.0-1.0+0.15*edge_blur)*1.5,0.0,1.0)*1.3;\n}\n\nfloat blur_amount=max(edge_blur_amount,coc);\n\nif (blur_amount == 0.0) {\ngl_FragColor=texture2D(textureSampler,distorted_coords);\n}\nelse {\n\ngl_FragColor=getBlurColor(blur_amount*1.7);\n\nif (highlights) {\ngl_FragColor.rgb+=clamp(coc,0.0,1.0)*texture2D(highlightsSampler,distorted_coords).rgb;\n}\nif (blur_noise) {\n\nvec2 noise=rand(distorted_coords)*0.01*blur_amount;\nvec2 blurred_coord=vec2(distorted_coords.x+noise.x,distorted_coords.y+noise.y);\ngl_FragColor=0.04*texture2D(textureSampler,blurred_coord)+0.96*gl_FragColor;\n}\n}\n\nif (grain_amount>0.0) {\nvec4 grain_color=texture2D(grainSampler,texels_coords*0.003);\ngl_FragColor.rgb+=(-0.5+grain_color.rgb)*0.30*grain_amount;\n}\n}\n"; + Xt.a.ShadersStore.depthOfFieldPixelShader = Ch; + var Ph = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = 1); + var a = e.call(this, i.getEngine(), t) || this; + return ( + (a.LensChromaticAberrationEffect = "LensChromaticAberrationEffect"), + (a.HighlightsEnhancingEffect = "HighlightsEnhancingEffect"), + (a.LensDepthOfFieldEffect = "LensDepthOfFieldEffect"), + (a._pentagonBokehIsEnabled = !1), + (a._scene = i), + (a._depthTexture = i.enableDepthRenderer().getDepthMap()), + n.grain_texture ? (a._grainTexture = n.grain_texture) : a._createGrainTexture(), + (a._edgeBlur = n.edge_blur ? n.edge_blur : 0), + (a._grainAmount = n.grain_amount ? n.grain_amount : 0), + (a._chromaticAberration = n.chromatic_aberration ? n.chromatic_aberration : 0), + (a._distortion = n.distortion ? n.distortion : 0), + (a._highlightsGain = void 0 !== n.dof_gain ? n.dof_gain : -1), + (a._highlightsThreshold = n.dof_threshold ? n.dof_threshold : 1), + (a._dofDistance = void 0 !== n.dof_focus_distance ? n.dof_focus_distance : -1), + (a._dofAperture = n.dof_aperture ? n.dof_aperture : 1), + (a._dofDarken = n.dof_darken ? n.dof_darken : 0), + (a._dofPentagon = void 0 === n.dof_pentagon || n.dof_pentagon), + (a._blurNoise = void 0 === n.blur_noise || n.blur_noise), + a._createChromaticAberrationPostProcess(r), + a._createHighlightsPostProcess(r), + a._createDepthOfFieldPostProcess(r / 4), + a.addEffect( + new Au( + i.getEngine(), + a.LensChromaticAberrationEffect, + function () { + return a._chromaticAberrationPostProcess; + }, + !0 + ) + ), + a.addEffect( + new Au( + i.getEngine(), + a.HighlightsEnhancingEffect, + function () { + return a._highlightsPostProcess; + }, + !0 + ) + ), + a.addEffect( + new Au( + i.getEngine(), + a.LensDepthOfFieldEffect, + function () { + return a._depthOfFieldPostProcess; + }, + !0 + ) + ), + -1 === a._highlightsGain && a._disableEffect(a.HighlightsEnhancingEffect, null), + i.postProcessRenderPipelineManager.addPipeline(a), + o && i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(t, o), + a + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.getClassName = function () { + return "LensRenderingPipeline"; + }), + Object.defineProperty(t.prototype, "scene", { + get: function () { + return this._scene; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "edgeBlur", { + get: function () { + return this._edgeBlur; + }, + set: function (e) { + this.setEdgeBlur(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "grainAmount", { + get: function () { + return this._grainAmount; + }, + set: function (e) { + this.setGrainAmount(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "chromaticAberration", { + get: function () { + return this._chromaticAberration; + }, + set: function (e) { + this.setChromaticAberration(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dofAperture", { + get: function () { + return this._dofAperture; + }, + set: function (e) { + this.setAperture(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "edgeDistortion", { + get: function () { + return this._distortion; + }, + set: function (e) { + this.setEdgeDistortion(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "dofDistortion", { + get: function () { + return this._dofDistance; + }, + set: function (e) { + this.setFocusDistance(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "darkenOutOfFocus", { + get: function () { + return this._dofDarken; + }, + set: function (e) { + this.setDarkenOutOfFocus(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "blurNoise", { + get: function () { + return this._blurNoise; + }, + set: function (e) { + this._blurNoise = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "pentagonBokeh", { + get: function () { + return this._pentagonBokehIsEnabled; + }, + set: function (e) { + e ? this.enablePentagonBokeh() : this.disablePentagonBokeh(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "highlightsGain", { + get: function () { + return this._highlightsGain; + }, + set: function (e) { + this.setHighlightsGain(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "highlightsThreshold", { + get: function () { + return this._highlightsThreshold; + }, + set: function (e) { + this.setHighlightsThreshold(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.setEdgeBlur = function (e) { + this._edgeBlur = e; + }), + (t.prototype.disableEdgeBlur = function () { + this._edgeBlur = 0; + }), + (t.prototype.setGrainAmount = function (e) { + this._grainAmount = e; + }), + (t.prototype.disableGrain = function () { + this._grainAmount = 0; + }), + (t.prototype.setChromaticAberration = function (e) { + this._chromaticAberration = e; + }), + (t.prototype.disableChromaticAberration = function () { + this._chromaticAberration = 0; + }), + (t.prototype.setEdgeDistortion = function (e) { + this._distortion = e; + }), + (t.prototype.disableEdgeDistortion = function () { + this._distortion = 0; + }), + (t.prototype.setFocusDistance = function (e) { + this._dofDistance = e; + }), + (t.prototype.disableDepthOfField = function () { + this._dofDistance = -1; + }), + (t.prototype.setAperture = function (e) { + this._dofAperture = e; + }), + (t.prototype.setDarkenOutOfFocus = function (e) { + this._dofDarken = e; + }), + (t.prototype.enablePentagonBokeh = function () { + this._highlightsPostProcess.updateEffect("#define PENTAGON\n"), (this._pentagonBokehIsEnabled = !0); + }), + (t.prototype.disablePentagonBokeh = function () { + (this._pentagonBokehIsEnabled = !1), this._highlightsPostProcess.updateEffect(); + }), + (t.prototype.enableNoiseBlur = function () { + this._blurNoise = !0; + }), + (t.prototype.disableNoiseBlur = function () { + this._blurNoise = !1; + }), + (t.prototype.setHighlightsGain = function (e) { + this._highlightsGain = e; + }), + (t.prototype.setHighlightsThreshold = function (e) { + -1 === this._highlightsGain && (this._highlightsGain = 1), (this._highlightsThreshold = e); + }), + (t.prototype.disableHighlights = function () { + this._highlightsGain = -1; + }), + (t.prototype.dispose = function (e) { + void 0 === e && (e = !1), + this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._scene.cameras), + (this._chromaticAberrationPostProcess = null), + (this._highlightsPostProcess = null), + (this._depthOfFieldPostProcess = null), + this._grainTexture.dispose(), + e && this._scene.disableDepthRenderer(); + }), + (t.prototype._createChromaticAberrationPostProcess = function (e) { + var t = this; + (this._chromaticAberrationPostProcess = new Wt.a( + "LensChromaticAberration", + "chromaticAberration", + ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], + [], + e, + null, + ln.a.TRILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1 + )), + (this._chromaticAberrationPostProcess.onApply = function (e) { + e.setFloat("chromatic_aberration", t._chromaticAberration), + e.setFloat("screen_width", t._scene.getEngine().getRenderWidth()), + e.setFloat("screen_height", t._scene.getEngine().getRenderHeight()), + e.setFloat("radialIntensity", 1), + e.setFloat2("direction", 17, 17), + e.setFloat2("centerPosition", 0.5, 0.5); + }); + }), + (t.prototype._createHighlightsPostProcess = function (e) { + var t = this; + (this._highlightsPostProcess = new Wt.a( + "LensHighlights", + "lensHighlights", + ["gain", "threshold", "screen_width", "screen_height"], + [], + e, + null, + ln.a.TRILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1, + this._dofPentagon ? "#define PENTAGON\n" : "" + )), + (this._highlightsPostProcess.onApply = function (e) { + e.setFloat("gain", t._highlightsGain), + e.setFloat("threshold", t._highlightsThreshold), + e.setTextureFromPostProcess("textureSampler", t._chromaticAberrationPostProcess), + e.setFloat("screen_width", t._scene.getEngine().getRenderWidth()), + e.setFloat("screen_height", t._scene.getEngine().getRenderHeight()); + }); + }), + (t.prototype._createDepthOfFieldPostProcess = function (e) { + var t = this; + (this._depthOfFieldPostProcess = new Wt.a( + "LensDepthOfField", + "depthOfField", + ["grain_amount", "blur_noise", "screen_width", "screen_height", "distortion", "dof_enabled", "screen_distance", "aperture", "darken", "edge_blur", "highlights", "near", "far"], + ["depthSampler", "grainSampler", "highlightsSampler"], + e, + null, + ln.a.TRILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1 + )), + (this._depthOfFieldPostProcess.onApply = function (e) { + e.setTexture("depthSampler", t._depthTexture), + e.setTexture("grainSampler", t._grainTexture), + e.setTextureFromPostProcess("textureSampler", t._highlightsPostProcess), + e.setTextureFromPostProcess("highlightsSampler", t._depthOfFieldPostProcess), + e.setFloat("grain_amount", t._grainAmount), + e.setBool("blur_noise", t._blurNoise), + e.setFloat("screen_width", t._scene.getEngine().getRenderWidth()), + e.setFloat("screen_height", t._scene.getEngine().getRenderHeight()), + e.setFloat("distortion", t._distortion), + e.setBool("dof_enabled", -1 !== t._dofDistance), + e.setFloat("screen_distance", 1 / (0.1 - 1 / t._dofDistance)), + e.setFloat("aperture", t._dofAperture), + e.setFloat("darken", t._dofDarken), + e.setFloat("edge_blur", t._edgeBlur), + e.setBool("highlights", -1 !== t._highlightsGain), + t._scene.activeCamera && (e.setFloat("near", t._scene.activeCamera.minZ), e.setFloat("far", t._scene.activeCamera.maxZ)); + }); + }), + (t.prototype._createGrainTexture = function () { + (this._grainTexture = new An.a("LensNoiseTexture", 512, this._scene, !1, ln.a.BILINEAR_SAMPLINGMODE)), (this._grainTexture.wrapU = ln.a.WRAP_ADDRESSMODE), (this._grainTexture.wrapV = ln.a.WRAP_ADDRESSMODE); + for (var e, t, n, i = this._grainTexture.getContext(), r = 0; r < 512; r++) + for (var o = 0; o < 512; o++) (e = Math.floor(255 * ((t = 0.42), (n = 0.58), Math.random() * (n - t) + t))), (i.fillStyle = "rgb(" + e + ", " + e + ", " + e + ")"), i.fillRect(r, o, 1, 1); + this._grainTexture.update(!1); + }), + t + ); + })(gh), + xh = + "\nprecision highp float;\nuniform sampler2D textureSampler;\nuniform float near;\nuniform float far;\nuniform float radius;\nfloat scales[16]=float[16](\n0.1,\n0.11406250000000001,\n0.131640625,\n0.15625,\n0.187890625,\n0.2265625,\n0.272265625,\n0.325,\n0.384765625,\n0.4515625,\n0.525390625,\n0.60625,\n0.694140625,\n0.7890625,\n0.891015625,\n1.0\n);\nvarying vec2 vUV;\nfloat perspectiveDepthToViewZ( const in float invClipZ,const in float near,const in float far ) {\nreturn ( near*far )/( ( far-near )*invClipZ-far );\n}\nfloat viewZToPerspectiveDepth( const in float viewZ,const in float near,const in float far ) {\nreturn ( near*far/viewZ+far)/( far-near );\n}\nfloat viewZToOrthographicDepth( const in float viewZ,const in float near,const in float far ) {\nreturn ( viewZ+near )/( near-far );\n}\n#ifdef SSAO\nuniform sampler2D randomSampler;\nuniform sampler2D normalSampler;\nuniform float randTextureTiles;\nuniform float samplesFactor;\nuniform vec3 sampleSphere[SAMPLES];\nuniform float totalStrength;\nuniform float base;\nuniform float xViewport;\nuniform float yViewport;\nuniform float maxZ;\nuniform float minZAspect;\nuniform vec2 texelSize;\nuniform mat4 projection;\nvoid main()\n{\nvec3 random=texture2D(randomSampler,vUV*randTextureTiles).rgb;\nfloat depth=texture2D(textureSampler,vUV).r;\nfloat depthSign=depth/abs(depth);\ndepth=depth*depthSign;\nvec3 normal=texture2D(normalSampler,vUV).rgb;\nfloat occlusion=0.0;\nfloat correctedRadius=min(radius,minZAspect*depth/near);\nvec3 vViewRay=vec3((vUV.x*2.0-1.0)*xViewport,(vUV.y*2.0-1.0)*yViewport,depthSign);\nvec3 origin=vViewRay*depth;\nvec3 rvec=random*2.0-1.0;\nrvec.z=0.0;\n\nfloat dotProduct=dot(rvec,normal);\nrvec=1.0-abs(dotProduct)>1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x);\nvec3 tangent=normalize(rvec-normal*dot(rvec,normal));\nvec3 bitangent=cross(normal,tangent);\nmat3 tbn=mat3(tangent,bitangent,normal);\nfloat difference;\nfor (int i=0; i1.0 || offset.y>1.0) {\ncontinue;\n}\n\nfloat sampleDepth=abs(texture2D(textureSampler,offset.xy).r);\n\ndifference=depthSign*samplePosition.z-sampleDepth;\nfloat rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference);\nocclusion+=(difference>=0.0 ? 1.0 : 0.0)*rangeCheck;\n}\nocclusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth));\nfloat ao=1.0-totalStrength*occlusion*samplesFactor;\nfloat result=clamp(ao+base,0.0,1.0);\ngl_FragColor=vec4(vec3(result),1.0);\n}\n#endif\n#ifdef BILATERAL_BLUR\nuniform sampler2D depthSampler;\nuniform float outSize;\nuniform float samplerOffsets[SAMPLES];\nvec4 blur9(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.3846153846)*direction;\nvec2 off2=vec2(3.2307692308)*direction;\ncolor+=texture2D(image,uv)*0.2270270270;\ncolor+=texture2D(image,uv+(off1/resolution))*0.3162162162;\ncolor+=texture2D(image,uv-(off1/resolution))*0.3162162162;\ncolor+=texture2D(image,uv+(off2/resolution))*0.0702702703;\ncolor+=texture2D(image,uv-(off2/resolution))*0.0702702703;\nreturn color;\n}\nvec4 blur13(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.411764705882353)*direction;\nvec2 off2=vec2(3.2941176470588234)*direction;\nvec2 off3=vec2(5.176470588235294)*direction;\ncolor+=texture2D(image,uv)*0.1964825501511404;\ncolor+=texture2D(image,uv+(off1/resolution))*0.2969069646728344;\ncolor+=texture2D(image,uv-(off1/resolution))*0.2969069646728344;\ncolor+=texture2D(image,uv+(off2/resolution))*0.09447039785044732;\ncolor+=texture2D(image,uv-(off2/resolution))*0.09447039785044732;\ncolor+=texture2D(image,uv+(off3/resolution))*0.010381362401148057;\ncolor+=texture2D(image,uv-(off3/resolution))*0.010381362401148057;\nreturn color;\n}\nvec4 blur13Bilateral(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.411764705882353)*direction;\nvec2 off2=vec2(3.2941176470588234)*direction;\nvec2 off3=vec2(5.176470588235294)*direction;\nfloat compareDepth=abs(texture2D(depthSampler,uv).r);\nfloat sampleDepth;\nfloat weight;\nfloat weightSum=30.0;\ncolor+=texture2D(image,uv)*30.0;\nsampleDepth=abs(texture2D(depthSampler,uv+(off1/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off1/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off1/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off1/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv+(off2/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off2/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off2/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off2/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv+(off3/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off3/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off3/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off3/resolution))*weight;\nreturn color/weightSum;\n}\nvoid main()\n{\n#if EXPENSIVE\nfloat compareDepth=abs(texture2D(depthSampler,vUV).r);\nfloat texelsize=1.0/outSize;\nfloat result=0.0;\nfloat weightSum=0.0;\nfor (int i=0; i 0 ? n._ssaoCombinePostProcess.width : n._originalColorPostProcess.width), + e.setFloat("near", n._scene.activeCamera.minZ), + e.setFloat("far", n._scene.activeCamera.maxZ), + e.setFloat("radius", n.radius), + e.setTexture("depthSampler", n._depthTexture), + e.setArray("samplerOffsets", n._samplerOffsets)); + }), + (this._blurVPostProcess = new Wt.a( + "BlurV", + "ssao2", + ["outSize", "samplerOffsets", "near", "far", "radius"], + ["depthSampler"], + t, + null, + ln.a.TRILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1, + "#define BILATERAL_BLUR\n#define BILATERAL_BLUR_V\n#define SAMPLES 16\n#define EXPENSIVE " + (i ? "1" : "0") + "\n" + )), + (this._blurVPostProcess.onApply = function (e) { + n._scene.activeCamera && + (e.setFloat("outSize", n._ssaoCombinePostProcess.height > 0 ? n._ssaoCombinePostProcess.height : n._originalColorPostProcess.height), + e.setFloat("near", n._scene.activeCamera.minZ), + e.setFloat("far", n._scene.activeCamera.maxZ), + e.setFloat("radius", n.radius), + e.setTexture("depthSampler", n._depthTexture), + e.setArray("samplerOffsets", n._samplerOffsets)); + }), + (this._blurHPostProcess.samples = this.textureSamples), + (this._blurVPostProcess.samples = this.textureSamples); + }), + (t.prototype._rebuild = function () { + e.prototype._rebuild.call(this); + }), + (t.prototype._radicalInverse_VdC = function (e) { + return ( + (this._bits[0] = e), + (this._bits[0] = ((this._bits[0] << 16) | (this._bits[0] >> 16)) >>> 0), + (this._bits[0] = ((1431655765 & this._bits[0]) << 1) | (((2863311530 & this._bits[0]) >>> 1) >>> 0)), + (this._bits[0] = ((858993459 & this._bits[0]) << 2) | (((3435973836 & this._bits[0]) >>> 2) >>> 0)), + (this._bits[0] = ((252645135 & this._bits[0]) << 4) | (((4042322160 & this._bits[0]) >>> 4) >>> 0)), + (this._bits[0] = ((16711935 & this._bits[0]) << 8) | (((4278255360 & this._bits[0]) >>> 8) >>> 0)), + 2.3283064365386963e-10 * this._bits[0] + ); + }), + (t.prototype._hammersley = function (e, t) { + return [e / t, this._radicalInverse_VdC(e)]; + }), + (t.prototype._hemisphereSample_uniform = function (e, t) { + var n = 2 * t * Math.PI, + i = 1 - (0.85 * e + 0.15), + r = Math.sqrt(1 - i * i); + return new a.e(Math.cos(n) * r, Math.sin(n) * r, i); + }), + (t.prototype._generateHemisphere = function () { + for (var e, t = this.samples, n = [], i = 0; i < t; ) { + if (t < 16) e = this._hemisphereSample_uniform(Math.random(), Math.random()); + else { + var r = this._hammersley(i, t); + e = this._hemisphereSample_uniform(r[0], r[1]); + } + n.push(e.x, e.y, e.z), i++; + } + return n; + }), + (t.prototype._createSSAOPostProcess = function (e) { + var t = this, + n = this.samples; + (this._sampleSphere = this._generateHemisphere()), + (this._ssaoPostProcess = new Wt.a( + "ssao2", + "ssao2", + ["sampleSphere", "samplesFactor", "randTextureTiles", "totalStrength", "radius", "base", "range", "projection", "near", "far", "texelSize", "xViewport", "yViewport", "maxZ", "minZAspect"], + ["randomSampler", "normalSampler"], + e, + null, + ln.a.BILINEAR_SAMPLINGMODE, + this._scene.getEngine(), + !1, + "#define SAMPLES " + n + "\n#define SSAO" + )), + (this._ssaoPostProcess.onApply = function (e) { + t._scene.activeCamera && + (e.setArray3("sampleSphere", t._sampleSphere), + e.setFloat("randTextureTiles", 32), + e.setFloat("samplesFactor", 1 / t.samples), + e.setFloat("totalStrength", t.totalStrength), + e.setFloat2("texelSize", 1 / t._ssaoPostProcess.width, 1 / t._ssaoPostProcess.height), + e.setFloat("radius", t.radius), + e.setFloat("maxZ", t.maxZ), + e.setFloat("minZAspect", t.minZAspect), + e.setFloat("base", t.base), + e.setFloat("near", t._scene.activeCamera.minZ), + e.setFloat("far", t._scene.activeCamera.maxZ), + e.setFloat("xViewport", Math.tan(t._scene.activeCamera.fov / 2) * t._scene.getEngine().getAspectRatio(t._scene.activeCamera, !0)), + e.setFloat("yViewport", Math.tan(t._scene.activeCamera.fov / 2)), + e.setMatrix("projection", t._scene.getProjectionMatrix()), + e.setTexture("textureSampler", t._depthTexture), + e.setTexture("normalSampler", t._normalTexture), + e.setTexture("randomSampler", t._randomTexture)); + }), + (this._ssaoPostProcess.samples = this.textureSamples); + }), + (t.prototype._createSSAOCombinePostProcess = function (e) { + var t = this; + (this._ssaoCombinePostProcess = new Wt.a("ssaoCombine", "ssaoCombine", [], ["originalColor", "viewport"], e, null, ln.a.BILINEAR_SAMPLINGMODE, this._scene.getEngine(), !1)), + (this._ssaoCombinePostProcess.onApply = function (e) { + var n = t._scene.activeCamera.viewport; + e.setVector4("viewport", a.c.Vector4[0].copyFromFloats(n.x, n.y, n.width, n.height)), e.setTextureFromPostProcess("originalColor", t._originalColorPostProcess); + }), + (this._ssaoCombinePostProcess.samples = this.textureSamples); + }), + (t.prototype._createRandomTexture = function () { + (this._randomTexture = new An.a("SSAORandomTexture", 128, this._scene, !1, ln.a.TRILINEAR_SAMPLINGMODE)), (this._randomTexture.wrapU = ln.a.WRAP_ADDRESSMODE), (this._randomTexture.wrapV = ln.a.WRAP_ADDRESSMODE); + for ( + var e = this._randomTexture.getContext(), + t = function (e, t) { + return Math.random() * (t - e) + e; + }, + n = a.e.Zero(), + i = 0; + i < 128; + i++ + ) + for (var r = 0; r < 128; r++) + (n.x = t(0, 1)), + (n.y = t(0, 1)), + (n.z = 0), + n.normalize(), + n.scaleInPlace(255), + (n.x = Math.floor(n.x)), + (n.y = Math.floor(n.y)), + (e.fillStyle = "rgb(" + n.x + ", " + n.y + ", " + n.z + ")"), + e.fillRect(i, r, 1, 1); + this._randomTexture.update(!1); + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + return (e.customType = "SSAO2RenderingPipeline"), e; + }), + (t.Parse = function (e, n, i) { + return He.a.Parse( + function () { + return new t(e._name, n, e._ratio); + }, + e, + n, + i + ); + }), + Object(h.c)([Object(He.c)()], t.prototype, "totalStrength", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "maxZ", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "minZAspect", void 0), + Object(h.c)([Object(He.c)("samples")], t.prototype, "_samples", void 0), + Object(h.c)([Object(He.c)("textureSamples")], t.prototype, "_textureSamples", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "_ratio", void 0), + Object(h.c)([Object(He.c)("expensiveBlur")], t.prototype, "_expensiveBlur", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "radius", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "base", void 0), + t + ); + })(gh); + c.a.RegisteredTypes["BABYLON.SSAO2RenderingPipeline"] = Sh; + var Oh = + "\nuniform sampler2D textureSampler;\nvarying vec2 vUV;\n#ifdef SSAO\nuniform sampler2D randomSampler;\nuniform float randTextureTiles;\nuniform float samplesFactor;\nuniform vec3 sampleSphere[SAMPLES];\nuniform float totalStrength;\nuniform float radius;\nuniform float area;\nuniform float fallOff;\nuniform float base;\nvec3 normalFromDepth(float depth,vec2 coords)\n{\nvec2 offset1=vec2(0.0,radius);\nvec2 offset2=vec2(radius,0.0);\nfloat depth1=texture2D(textureSampler,coords+offset1).r;\nfloat depth2=texture2D(textureSampler,coords+offset2).r;\nvec3 p1=vec3(offset1,depth1-depth);\nvec3 p2=vec3(offset2,depth2-depth);\nvec3 normal=cross(p1,p2);\nnormal.z=-normal.z;\nreturn normalize(normal);\n}\nvoid main()\n{\nvec3 random=normalize(texture2D(randomSampler,vUV*randTextureTiles).rgb);\nfloat depth=texture2D(textureSampler,vUV).r;\nvec3 position=vec3(vUV,depth);\nvec3 normal=normalFromDepth(depth,vUV);\nfloat radiusDepth=radius/depth;\nfloat occlusion=0.0;\nvec3 ray;\nvec3 hemiRay;\nfloat occlusionDepth;\nfloat difference;\nfor (int i=0; i0.0)\nhitCoord-=dir;\nelse\nhitCoord+=dir;\ninfo.color+=texture2D(textureSampler,projectedCoord.xy).rgb;\n}\nprojectedCoord=projection*vec4(hitCoord,1.0);\nprojectedCoord.xy/=projectedCoord.w;\nprojectedCoord.xy=0.5*projectedCoord.xy+vec2(0.5);\n\ninfo.coords=vec4(projectedCoord.xy,sampledDepth,1.0);\ninfo.color+=texture2D(textureSampler,projectedCoord.xy).rgb;\ninfo.color/=float(SMOOTH_STEPS+1);\nreturn info;\n}\n\nReflectionInfo getReflectionInfo(vec3 dir,vec3 hitCoord)\n{\nReflectionInfo info;\nvec4 projectedCoord;\nfloat sampledDepth;\ndir*=step;\nfor(int i=0; i> 0)), + e.push("#define SMOOTH_STEPS " + (this._smoothSteps >> 0)), + this.updateEffect(e.join("\n")); + }), + Object(h.c)([Object(He.c)()], t.prototype, "threshold", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "strength", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "reflectionSpecularFalloffExponent", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "step", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "roughnessFactor", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "enableSmoothReflections", null), + Object(h.c)([Object(He.c)()], t.prototype, "reflectionSamples", null), + Object(h.c)([Object(He.c)()], t.prototype, "smoothSteps", null), + t + ); + })(Wt.a), + Ih = + "uniform sampler2D textureSampler;\nvarying vec2 vUV;\n#if defined(PASS_POST_PROCESS)\nvoid main(void)\n{\nvec4 color=texture2D(textureSampler,vUV);\ngl_FragColor=color;\n}\n#endif\n#if defined(DOWN_SAMPLE_X4)\nuniform vec2 dsOffsets[16];\nvoid main(void)\n{\nvec4 average=vec4(0.0,0.0,0.0,0.0);\naverage=texture2D(textureSampler,vUV+dsOffsets[0]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[1]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[2]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[3]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[4]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[5]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[6]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[7]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[8]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[9]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[10]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[11]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[12]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[13]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[14]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[15]);\naverage/=16.0;\ngl_FragColor=average;\n}\n#endif\n#if defined(BRIGHT_PASS)\nuniform vec2 dsOffsets[4];\nuniform float brightThreshold;\nvoid main(void)\n{\nvec4 average=vec4(0.0,0.0,0.0,0.0);\naverage=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y));\naverage*=0.25;\nfloat luminance=length(average.rgb);\nif (luminanceshadowPixelDepth)\naccumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection));\ncurrentPosition+=stepL;\n}\naccumFog/=NB_STEPS;\nvec3 color=accumFog*scatteringPower;\ngl_FragColor=vec4(color*exp(color) ,1.0);\n}\n#endif\n#if defined(VLSMERGE)\nuniform sampler2D originalSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV);\n}\n#endif\n#if defined(LUMINANCE)\nuniform vec2 lumOffsets[4];\nvoid main()\n{\nfloat average=0.0;\nvec4 color=vec4(0.0);\nfloat maximum=-1e20;\nvec3 weight=vec3(0.299,0.587,0.114);\nfor (int i=0; i<4; i++)\n{\ncolor=texture2D(textureSampler,vUV+ lumOffsets[i]);\n\nfloat GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33));\n\n#ifdef WEIGHTED_AVERAGE\nfloat GreyValue=dot(color.rgb,weight);\n#endif\n#ifdef BRIGHTNESS\nfloat GreyValue=max(color.r,max(color.g,color.b));\n#endif\n#ifdef HSL_COMPONENT\nfloat GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b)));\n#endif\n#ifdef MAGNITUDE\nfloat GreyValue=length(color.rgb);\n#endif\nmaximum=max(maximum,GreyValue);\naverage+=(0.25*log(1e-5+GreyValue));\n}\naverage=exp(average);\ngl_FragColor=vec4(average,maximum,0.0,1.0);\n}\n#endif\n#if defined(LUMINANCE_DOWN_SAMPLE)\nuniform vec2 dsOffsets[9];\nuniform float halfDestPixelSize;\n#ifdef FINAL_DOWN_SAMPLER\n#include\n#endif\nvoid main()\n{\nvec4 color=vec4(0.0);\nfloat average=0.0;\nfor (int i=0; i<9; i++)\n{\ncolor=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]);\naverage+=color.r;\n}\naverage/=9.0;\n#ifdef FINAL_DOWN_SAMPLER\ngl_FragColor=pack(average);\n#else\ngl_FragColor=vec4(average,average,0.0,1.0);\n#endif\n}\n#endif\n#if defined(HDR)\nuniform sampler2D textureAdderSampler;\nuniform float averageLuminance;\nvoid main()\n{\nvec4 color=texture2D(textureAdderSampler,vUV);\n#ifndef AUTO_EXPOSURE\nvec4 adjustedColor=color/averageLuminance;\ncolor=adjustedColor;\ncolor.a=1.0;\n#endif\ngl_FragColor=color;\n}\n#endif\n#if defined(LENS_FLARE)\n#define GHOSTS 3\nuniform sampler2D lensColorSampler;\nuniform float strength;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform vec2 resolution;\nuniform float distortionStrength;\nfloat hash(vec2 p)\n{\nfloat h=dot(p,vec2(127.1,311.7));\nreturn -1.0+2.0*fract(sin(h)*43758.5453123);\n}\nfloat noise(in vec2 p)\n{\nvec2 i=floor(p);\nvec2 f=fract(p);\nvec2 u=f*f*(3.0-2.0*f);\nreturn mix(mix(hash(i+vec2(0.0,0.0)),\nhash(i+vec2(1.0,0.0)),u.x),\nmix(hash(i+vec2(0.0,1.0)),\nhash(i+vec2(1.0,1.0)),u.x),u.y);\n}\nfloat fbm(vec2 p)\n{\nfloat f=0.0;\nf+=0.5000*noise(p); p*=2.02;\nf+=0.2500*noise(p); p*=2.03;\nf+=0.1250*noise(p); p*=2.01;\nf+=0.0625*noise(p); p*=2.04;\nf/=0.9375;\nreturn f;\n}\nvec3 pattern(vec2 uv)\n{\nvec2 p=-1.0+2.0*uv;\nfloat p2=dot(p,p);\nfloat f=fbm(vec2(15.0*p2))/2.0;\nfloat r=0.2+0.6*sin(12.5*length(uv-vec2(0.5)));\nfloat g=0.2+0.6*sin(20.5*length(uv-vec2(0.5)));\nfloat b=0.2+0.6*sin(17.2*length(uv-vec2(0.5)));\nreturn (1.0-f)*vec3(r,g,b);\n}\nfloat luminance(vec3 color)\n{\nreturn dot(color.rgb,vec3(0.2126,0.7152,0.0722));\n}\nvec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion)\n{\nreturn vec4(\ntexture2D(tex,texcoord+direction*distortion.r).r,\ntexture2D(tex,texcoord+direction*distortion.g).g,\ntexture2D(tex,texcoord+direction*distortion.b).b,\n1.0\n);\n}\nvoid main(void)\n{\nvec2 uv=-vUV+vec2(1.0);\nvec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal;\nvec2 texelSize=1.0/resolution;\nvec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength);\nvec4 result=vec4(0.0);\nfloat ghostIndice=1.0;\nfor (int i=0; i=nSamples)\nbreak;\nvec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5);\nresult+=texture2D(textureSampler,offset1);\n}\ngl_FragColor=result/float(nSamples);\n}\n#endif\n"; + Xt.a.ShadersStore.standardPixelShader = Ih; + var Dh = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = null); + var a = e.call(this, n.getEngine(), t) || this; + return ( + (a.downSampleX4PostProcess = null), + (a.brightPassPostProcess = null), + (a.blurHPostProcesses = []), + (a.blurVPostProcesses = []), + (a.textureAdderPostProcess = null), + (a.volumetricLightPostProcess = null), + (a.volumetricLightSmoothXPostProcess = null), + (a.volumetricLightSmoothYPostProcess = null), + (a.volumetricLightMergePostProces = null), + (a.volumetricLightFinalPostProcess = null), + (a.luminancePostProcess = null), + (a.luminanceDownSamplePostProcesses = []), + (a.hdrPostProcess = null), + (a.textureAdderFinalPostProcess = null), + (a.lensFlareFinalPostProcess = null), + (a.hdrFinalPostProcess = null), + (a.lensFlarePostProcess = null), + (a.lensFlareComposePostProcess = null), + (a.motionBlurPostProcess = null), + (a.depthOfFieldPostProcess = null), + (a.fxaaPostProcess = null), + (a.screenSpaceReflectionPostProcess = null), + (a.brightThreshold = 1), + (a.blurWidth = 512), + (a.horizontalBlur = !1), + (a.lensTexture = null), + (a.volumetricLightCoefficient = 0.2), + (a.volumetricLightPower = 4), + (a.volumetricLightBlurScale = 64), + (a.sourceLight = null), + (a.hdrMinimumLuminance = 1), + (a.hdrDecreaseRate = 0.5), + (a.hdrIncreaseRate = 0.5), + (a.lensColorTexture = null), + (a.lensFlareStrength = 20), + (a.lensFlareGhostDispersal = 1.4), + (a.lensFlareHaloWidth = 0.7), + (a.lensFlareDistortionStrength = 16), + (a.lensFlareBlurWidth = 512), + (a.lensStarTexture = null), + (a.lensFlareDirtTexture = null), + (a.depthOfFieldDistance = 10), + (a.depthOfFieldBlurWidth = 64), + (a.animations = []), + (a._currentDepthOfFieldSource = null), + (a._fixedExposure = 1), + (a._currentExposure = 1), + (a._hdrAutoExposure = !1), + (a._hdrCurrentLuminance = 1), + (a._motionStrength = 1), + (a._isObjectBasedMotionBlur = !1), + (a._camerasToBeAttached = []), + (a._bloomEnabled = !1), + (a._depthOfFieldEnabled = !1), + (a._vlsEnabled = !1), + (a._lensFlareEnabled = !1), + (a._hdrEnabled = !1), + (a._motionBlurEnabled = !1), + (a._fxaaEnabled = !1), + (a._screenSpaceReflectionsEnabled = !1), + (a._motionBlurSamples = 64), + (a._volumetricLightStepsCount = 50), + (a._samples = 1), + (a._cameras = o || n.cameras), + (a._cameras = a._cameras.slice()), + (a._camerasToBeAttached = a._cameras.slice()), + (a._scene = n), + (a._basePostProcess = r), + (a._ratio = i), + (a._floatTextureType = n.getEngine().getCaps().textureFloatRender ? 1 : 2), + n.postProcessRenderPipelineManager.addPipeline(a), + a._buildPipeline(), + a + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "exposure", { + get: function () { + return this._fixedExposure; + }, + set: function (e) { + (this._fixedExposure = e), (this._currentExposure = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "hdrAutoExposure", { + get: function () { + return this._hdrAutoExposure; + }, + set: function (e) { + if (((this._hdrAutoExposure = e), this.hdrPostProcess)) { + var t = ["#define HDR"]; + e && t.push("#define AUTO_EXPOSURE"), this.hdrPostProcess.updateEffect(t.join("\n")); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "motionStrength", { + get: function () { + return this._motionStrength; + }, + set: function (e) { + (this._motionStrength = e), this._isObjectBasedMotionBlur && this.motionBlurPostProcess && (this.motionBlurPostProcess.motionStrength = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "objectBasedMotionBlur", { + get: function () { + return this._isObjectBasedMotionBlur; + }, + set: function (e) { + var t = this._isObjectBasedMotionBlur !== e; + (this._isObjectBasedMotionBlur = e), t && this._buildPipeline(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "BloomEnabled", { + get: function () { + return this._bloomEnabled; + }, + set: function (e) { + this._bloomEnabled !== e && ((this._bloomEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "DepthOfFieldEnabled", { + get: function () { + return this._depthOfFieldEnabled; + }, + set: function (e) { + this._depthOfFieldEnabled !== e && ((this._depthOfFieldEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "LensFlareEnabled", { + get: function () { + return this._lensFlareEnabled; + }, + set: function (e) { + this._lensFlareEnabled !== e && ((this._lensFlareEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "HDREnabled", { + get: function () { + return this._hdrEnabled; + }, + set: function (e) { + this._hdrEnabled !== e && ((this._hdrEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "VLSEnabled", { + get: function () { + return this._vlsEnabled; + }, + set: function (e) { + if (this._vlsEnabled !== e) { + if (e) if (!this._scene.enableGeometryBufferRenderer()) return void g.a.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline"); + (this._vlsEnabled = e), this._buildPipeline(); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "MotionBlurEnabled", { + get: function () { + return this._motionBlurEnabled; + }, + set: function (e) { + this._motionBlurEnabled !== e && ((this._motionBlurEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "fxaaEnabled", { + get: function () { + return this._fxaaEnabled; + }, + set: function (e) { + this._fxaaEnabled !== e && ((this._fxaaEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "screenSpaceReflectionsEnabled", { + get: function () { + return this._screenSpaceReflectionsEnabled; + }, + set: function (e) { + this._screenSpaceReflectionsEnabled !== e && ((this._screenSpaceReflectionsEnabled = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "volumetricLightStepsCount", { + get: function () { + return this._volumetricLightStepsCount; + }, + set: function (e) { + this.volumetricLightPostProcess && this.volumetricLightPostProcess.updateEffect("#define VLS\n#define NB_STEPS " + e.toFixed(1)), (this._volumetricLightStepsCount = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "motionBlurSamples", { + get: function () { + return this._motionBlurSamples; + }, + set: function (e) { + this.motionBlurPostProcess && + (this._isObjectBasedMotionBlur ? (this.motionBlurPostProcess.motionBlurSamples = e) : this.motionBlurPostProcess.updateEffect("#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + e.toFixed(1))), + (this._motionBlurSamples = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "samples", { + get: function () { + return this._samples; + }, + set: function (e) { + this._samples !== e && ((this._samples = e), this._buildPipeline()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._buildPipeline = function () { + var e = this, + t = this._ratio, + n = this._scene; + this._disposePostProcesses(), + null !== this._cameras && (this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras), (this._cameras = this._camerasToBeAttached.slice())), + this._reset(), + this._screenSpaceReflectionsEnabled && + ((this.screenSpaceReflectionPostProcess = new Ah("HDRPass", n, t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, this._floatTextureType)), + this.screenSpaceReflectionPostProcess.onApplyObservable.add(function () { + e._currentDepthOfFieldSource = e.screenSpaceReflectionPostProcess; + }), + this.addEffect( + new Au( + n.getEngine(), + "HDRScreenSpaceReflections", + function () { + return e.screenSpaceReflectionPostProcess; + }, + !0 + ) + )), + this._basePostProcess + ? (this.originalPostProcess = this._basePostProcess) + : (this.originalPostProcess = new Wt.a("HDRPass", "standard", [], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, "#define PASS_POST_PROCESS", this._floatTextureType)), + (this.originalPostProcess.autoClear = !this.screenSpaceReflectionPostProcess), + this.originalPostProcess.onApplyObservable.add(function () { + e._currentDepthOfFieldSource = e.originalPostProcess; + }), + this.addEffect( + new Au( + n.getEngine(), + "HDRPassPostProcess", + function () { + return e.originalPostProcess; + }, + !0 + ) + ), + this._bloomEnabled && + (this._createDownSampleX4PostProcess(n, t / 4), + this._createBrightPassPostProcess(n, t / 4), + this._createBlurPostProcesses(n, t / 4, 1), + this._createTextureAdderPostProcess(n, t), + (this.textureAdderFinalPostProcess = new Wt.a("HDRDepthOfFieldSource", "standard", [], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, "#define PASS_POST_PROCESS", 0)), + this.addEffect( + new Au( + n.getEngine(), + "HDRBaseDepthOfFieldSource", + function () { + return e.textureAdderFinalPostProcess; + }, + !0 + ) + )), + this._vlsEnabled && + (this._createVolumetricLightPostProcess(n, t), + (this.volumetricLightFinalPostProcess = new Wt.a("HDRVLSFinal", "standard", [], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, "#define PASS_POST_PROCESS", 0)), + this.addEffect( + new Au( + n.getEngine(), + "HDRVLSFinal", + function () { + return e.volumetricLightFinalPostProcess; + }, + !0 + ) + )), + this._lensFlareEnabled && + (this._createLensFlarePostProcess(n, t), + (this.lensFlareFinalPostProcess = new Wt.a("HDRPostLensFlareDepthOfFieldSource", "standard", [], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, "#define PASS_POST_PROCESS", 0)), + this.addEffect( + new Au( + n.getEngine(), + "HDRPostLensFlareDepthOfFieldSource", + function () { + return e.lensFlareFinalPostProcess; + }, + !0 + ) + )), + this._hdrEnabled && + (this._createLuminancePostProcesses(n, this._floatTextureType), + this._createHdrPostProcess(n, t), + (this.hdrFinalPostProcess = new Wt.a("HDRPostHDReDepthOfFieldSource", "standard", [], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, "#define PASS_POST_PROCESS", 0)), + this.addEffect( + new Au( + n.getEngine(), + "HDRPostHDReDepthOfFieldSource", + function () { + return e.hdrFinalPostProcess; + }, + !0 + ) + )), + this._depthOfFieldEnabled && (this._createBlurPostProcesses(n, t / 2, 3, "depthOfFieldBlurWidth"), this._createDepthOfFieldPostProcess(n, t)), + this._motionBlurEnabled && this._createMotionBlurPostProcess(n, t), + this._fxaaEnabled && + ((this.fxaaPostProcess = new th("fxaa", 1, null, ln.a.BILINEAR_SAMPLINGMODE, n.getEngine(), !1, 0)), + this.addEffect( + new Au( + n.getEngine(), + "HDRFxaa", + function () { + return e.fxaaPostProcess; + }, + !0 + ) + )), + null !== this._cameras && this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras), + !this._enableMSAAOnFirstPostProcess(this._samples) && this._samples > 1 && g.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0"); + }), + (t.prototype._createDownSampleX4PostProcess = function (e, t) { + var n = this, + i = new Array(32); + (this.downSampleX4PostProcess = new Wt.a("HDRDownSampleX4", "standard", ["dsOffsets"], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, "#define DOWN_SAMPLE_X4", this._floatTextureType)), + (this.downSampleX4PostProcess.onApply = function (e) { + for (var t = 0, r = n.downSampleX4PostProcess.width, o = n.downSampleX4PostProcess.height, a = -2; a < 2; a++) + for (var s = -2; s < 2; s++) (i[t] = (a + 0.5) * (1 / r)), (i[t + 1] = (s + 0.5) * (1 / o)), (t += 2); + e.setArray2("dsOffsets", i); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRDownSampleX4", + function () { + return n.downSampleX4PostProcess; + }, + !0 + ) + ); + }), + (t.prototype._createBrightPassPostProcess = function (e, t) { + var n = this, + i = new Array(8); + (this.brightPassPostProcess = new Wt.a("HDRBrightPass", "standard", ["dsOffsets", "brightThreshold"], [], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, "#define BRIGHT_PASS", this._floatTextureType)), + (this.brightPassPostProcess.onApply = function (e) { + var t = 1 / n.brightPassPostProcess.width, + r = 1 / n.brightPassPostProcess.height; + (i[0] = -0.5 * t), + (i[1] = 0.5 * r), + (i[2] = 0.5 * t), + (i[3] = 0.5 * r), + (i[4] = -0.5 * t), + (i[5] = -0.5 * r), + (i[6] = 0.5 * t), + (i[7] = -0.5 * r), + e.setArray2("dsOffsets", i), + e.setFloat("brightThreshold", n.brightThreshold); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRBrightPass", + function () { + return n.brightPassPostProcess; + }, + !0 + ) + ); + }), + (t.prototype._createBlurPostProcesses = function (e, t, n, i) { + var r = this; + void 0 === i && (i = "blurWidth"); + var o = e.getEngine(), + s = new Er("HDRBlurH_" + n, new a.d(1, 0), this[i], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, this._floatTextureType), + c = new Er("HDRBlurV_" + n, new a.d(0, 1), this[i], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, this._floatTextureType); + s.onActivateObservable.add(function () { + var e = s.width / o.getRenderWidth(); + s.kernel = r[i] * e; + }), + c.onActivateObservable.add(function () { + var e = c.height / o.getRenderHeight(); + c.kernel = r.horizontalBlur ? 64 * e : r[i] * e; + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRBlurH" + n, + function () { + return s; + }, + !0 + ) + ), + this.addEffect( + new Au( + e.getEngine(), + "HDRBlurV" + n, + function () { + return c; + }, + !0 + ) + ), + this.blurHPostProcesses.push(s), + this.blurVPostProcesses.push(c); + }), + (t.prototype._createTextureAdderPostProcess = function (e, t) { + var n = this; + (this.textureAdderPostProcess = new Wt.a( + "HDRTextureAdder", + "standard", + ["exposure"], + ["otherSampler", "lensSampler"], + t, + null, + ln.a.BILINEAR_SAMPLINGMODE, + e.getEngine(), + !1, + "#define TEXTURE_ADDER", + this._floatTextureType + )), + (this.textureAdderPostProcess.onApply = function (e) { + e.setTextureFromPostProcess("otherSampler", n._vlsEnabled ? n._currentDepthOfFieldSource : n.originalPostProcess), + e.setTexture("lensSampler", n.lensTexture), + e.setFloat("exposure", n._currentExposure), + (n._currentDepthOfFieldSource = n.textureAdderFinalPostProcess); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRTextureAdder", + function () { + return n.textureAdderPostProcess; + }, + !0 + ) + ); + }), + (t.prototype._createVolumetricLightPostProcess = function (e, t) { + var n = this, + i = e.enableGeometryBufferRenderer(); + i.enablePosition = !0; + var r = i.getGBuffer(); + this.volumetricLightPostProcess = new Wt.a( + "HDRVLS", + "standard", + ["shadowViewProjection", "cameraPosition", "sunDirection", "sunColor", "scatteringCoefficient", "scatteringPower", "depthValues"], + ["shadowMapSampler", "positionSampler"], + t / 8, + null, + ln.a.BILINEAR_SAMPLINGMODE, + e.getEngine(), + !1, + "#define VLS\n#define NB_STEPS " + this._volumetricLightStepsCount.toFixed(1) + ); + var o = a.d.Zero(); + (this.volumetricLightPostProcess.onApply = function (e) { + if (n.sourceLight && n.sourceLight.getShadowGenerator() && n._scene.activeCamera) { + var t = n.sourceLight.getShadowGenerator(); + e.setTexture("shadowMapSampler", t.getShadowMap()), + e.setTexture("positionSampler", r.textures[2]), + e.setColor3("sunColor", n.sourceLight.diffuse), + e.setVector3("sunDirection", n.sourceLight.getShadowDirection()), + e.setVector3("cameraPosition", n._scene.activeCamera.globalPosition), + e.setMatrix("shadowViewProjection", t.getTransformMatrix()), + e.setFloat("scatteringCoefficient", n.volumetricLightCoefficient), + e.setFloat("scatteringPower", n.volumetricLightPower), + (o.x = n.sourceLight.getDepthMinZ(n._scene.activeCamera)), + (o.y = n.sourceLight.getDepthMaxZ(n._scene.activeCamera)), + e.setVector2("depthValues", o); + } + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRVLS", + function () { + return n.volumetricLightPostProcess; + }, + !0 + ) + ), + this._createBlurPostProcesses(e, t / 4, 0, "volumetricLightBlurScale"), + (this.volumetricLightMergePostProces = new Wt.a("HDRVLSMerge", "standard", [], ["originalSampler"], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, "#define VLSMERGE")), + (this.volumetricLightMergePostProces.onApply = function (e) { + e.setTextureFromPostProcess("originalSampler", n._bloomEnabled ? n.textureAdderFinalPostProcess : n.originalPostProcess), (n._currentDepthOfFieldSource = n.volumetricLightFinalPostProcess); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRVLSMerge", + function () { + return n.volumetricLightMergePostProces; + }, + !0 + ) + ); + }), + (t.prototype._createLuminancePostProcesses = function (e, n) { + var i = this, + r = Math.pow(3, t.LuminanceSteps); + this.luminancePostProcess = new Wt.a("HDRLuminance", "standard", ["lumOffsets"], [], { width: r, height: r }, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, "#define LUMINANCE", n); + var o = []; + (this.luminancePostProcess.onApply = function (e) { + var t = 1 / i.luminancePostProcess.width, + n = 1 / i.luminancePostProcess.height; + (o[0] = -0.5 * t), (o[1] = 0.5 * n), (o[2] = 0.5 * t), (o[3] = 0.5 * n), (o[4] = -0.5 * t), (o[5] = -0.5 * n), (o[6] = 0.5 * t), (o[7] = -0.5 * n), e.setArray2("lumOffsets", o); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRLuminance", + function () { + return i.luminancePostProcess; + }, + !0 + ) + ); + for (var s = t.LuminanceSteps - 1; s >= 0; s--) { + r = Math.pow(3, s); + var c = "#define LUMINANCE_DOWN_SAMPLE\n"; + 0 === s && (c += "#define FINAL_DOWN_SAMPLER"); + var l = new Wt.a("HDRLuminanceDownSample" + s, "standard", ["dsOffsets", "halfDestPixelSize"], [], { width: r, height: r }, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, c, n); + this.luminanceDownSamplePostProcesses.push(l); + } + var u = this.luminancePostProcess; + this.luminanceDownSamplePostProcesses.forEach(function (t, n) { + var r = new Array(18); + (t.onApply = function (e) { + if (u) { + for (var o = 0, a = -1; a < 2; a++) for (var s = -1; s < 2; s++) (r[o] = a / u.width), (r[o + 1] = s / u.height), (o += 2); + e.setArray2("dsOffsets", r), e.setFloat("halfDestPixelSize", 0.5 / u.width), (u = n === i.luminanceDownSamplePostProcesses.length - 1 ? i.luminancePostProcess : t); + } + }), + n === i.luminanceDownSamplePostProcesses.length - 1 && + (t.onAfterRender = function () { + var t = e.getEngine().readPixels(0, 0, 1, 1), + n = new a.f(1 / 16581375, 1 / 65025, 1 / 255, 1); + i._hdrCurrentLuminance = (t[0] * n.x + t[1] * n.y + t[2] * n.z + t[3] * n.w) / 100; + }), + i.addEffect( + new Au( + e.getEngine(), + "HDRLuminanceDownSample" + n, + function () { + return t; + }, + !0 + ) + ); + }); + }), + (t.prototype._createHdrPostProcess = function (e, t) { + var n = this, + i = ["#define HDR"]; + this._hdrAutoExposure && i.push("#define AUTO_EXPOSURE"), + (this.hdrPostProcess = new Wt.a("HDR", "standard", ["averageLuminance"], ["textureAdderSampler"], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, i.join("\n"), 0)); + var r = 1, + o = 0, + a = 0; + (this.hdrPostProcess.onApply = function (t) { + if ((t.setTextureFromPostProcess("textureAdderSampler", n._currentDepthOfFieldSource), (o += e.getEngine().getDeltaTime()), r < 0)) r = n._hdrCurrentLuminance; + else { + var i = (a - o) / 1e3; + n._hdrCurrentLuminance < r + n.hdrDecreaseRate * i ? (r += n.hdrDecreaseRate * i) : n._hdrCurrentLuminance > r - n.hdrIncreaseRate * i ? (r -= n.hdrIncreaseRate * i) : (r = n._hdrCurrentLuminance); + } + n.hdrAutoExposure ? (n._currentExposure = n._fixedExposure / r) : ((r = z.a.Clamp(r, n.hdrMinimumLuminance, 1e20)), t.setFloat("averageLuminance", r)), (a = o), (n._currentDepthOfFieldSource = n.hdrFinalPostProcess); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDR", + function () { + return n.hdrPostProcess; + }, + !0 + ) + ); + }), + (t.prototype._createLensFlarePostProcess = function (e, t) { + var n = this; + (this.lensFlarePostProcess = new Wt.a( + "HDRLensFlare", + "standard", + ["strength", "ghostDispersal", "haloWidth", "resolution", "distortionStrength"], + ["lensColorSampler"], + t / 2, + null, + ln.a.BILINEAR_SAMPLINGMODE, + e.getEngine(), + !1, + "#define LENS_FLARE", + 0 + )), + this.addEffect( + new Au( + e.getEngine(), + "HDRLensFlare", + function () { + return n.lensFlarePostProcess; + }, + !0 + ) + ), + this._createBlurPostProcesses(e, t / 4, 2, "lensFlareBlurWidth"), + (this.lensFlareComposePostProcess = new Wt.a( + "HDRLensFlareCompose", + "standard", + ["lensStarMatrix"], + ["otherSampler", "lensDirtSampler", "lensStarSampler"], + t, + null, + ln.a.BILINEAR_SAMPLINGMODE, + e.getEngine(), + !1, + "#define LENS_FLARE_COMPOSE", + 0 + )), + this.addEffect( + new Au( + e.getEngine(), + "HDRLensFlareCompose", + function () { + return n.lensFlareComposePostProcess; + }, + !0 + ) + ); + var i = new a.d(0, 0); + this.lensFlarePostProcess.onApply = function (e) { + e.setTextureFromPostProcess("textureSampler", n._bloomEnabled ? n.blurHPostProcesses[0] : n.originalPostProcess), + e.setTexture("lensColorSampler", n.lensColorTexture), + e.setFloat("strength", n.lensFlareStrength), + e.setFloat("ghostDispersal", n.lensFlareGhostDispersal), + e.setFloat("haloWidth", n.lensFlareHaloWidth), + (i.x = n.lensFlarePostProcess.width), + (i.y = n.lensFlarePostProcess.height), + e.setVector2("resolution", i), + e.setFloat("distortionStrength", n.lensFlareDistortionStrength); + }; + var r = a.a.FromValues(2, 0, -1, 0, 0, 2, -1, 0, 0, 0, 1, 0, 0, 0, 0, 1), + o = a.a.FromValues(0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1, 0, 0, 0, 0, 1); + this.lensFlareComposePostProcess.onApply = function (e) { + if (n._scene.activeCamera) { + e.setTextureFromPostProcess("otherSampler", n.lensFlarePostProcess), e.setTexture("lensDirtSampler", n.lensFlareDirtTexture), e.setTexture("lensStarSampler", n.lensStarTexture); + var t = n._scene.activeCamera.getViewMatrix().getRow(0), + i = n._scene.activeCamera.getViewMatrix().getRow(2), + s = a.e.Dot(t.toVector3(), new a.e(1, 0, 0)) + a.e.Dot(i.toVector3(), new a.e(0, 0, 1)); + s *= 4; + var c = a.a.FromValues(0.5 * Math.cos(s), -Math.sin(s), 0, 0, Math.sin(s), 0.5 * Math.cos(s), 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), + l = o.multiply(c).multiply(r); + e.setMatrix("lensStarMatrix", l), (n._currentDepthOfFieldSource = n.lensFlareFinalPostProcess); + } + }; + }), + (t.prototype._createDepthOfFieldPostProcess = function (e, t) { + var n = this; + (this.depthOfFieldPostProcess = new Wt.a("HDRDepthOfField", "standard", ["distance"], ["otherSampler", "depthSampler"], t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, "#define DEPTH_OF_FIELD", 0)), + (this.depthOfFieldPostProcess.onApply = function (e) { + e.setTextureFromPostProcess("otherSampler", n._currentDepthOfFieldSource), e.setTexture("depthSampler", n._getDepthTexture()), e.setFloat("distance", n.depthOfFieldDistance); + }), + this.addEffect( + new Au( + e.getEngine(), + "HDRDepthOfField", + function () { + return n.depthOfFieldPostProcess; + }, + !0 + ) + ); + }), + (t.prototype._createMotionBlurPostProcess = function (e, t) { + var n = this; + if (this._isObjectBasedMotionBlur) { + var i = new hh("HDRMotionBlur", e, t, null, ln.a.BILINEAR_SAMPLINGMODE, e.getEngine(), !1, 0); + (i.motionStrength = this.motionStrength), (i.motionBlurSamples = this.motionBlurSamples), (this.motionBlurPostProcess = i); + } else { + this.motionBlurPostProcess = new Wt.a( + "HDRMotionBlur", + "standard", + ["inverseViewProjection", "prevViewProjection", "screenSize", "motionScale", "motionStrength"], + ["depthSampler"], + t, + null, + ln.a.BILINEAR_SAMPLINGMODE, + e.getEngine(), + !1, + "#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES " + this.motionBlurSamples.toFixed(1), + 0 + ); + var r = 0, + o = a.a.Identity(), + s = a.a.Identity(), + c = a.a.Identity(), + l = a.d.Zero(); + this.motionBlurPostProcess.onApply = function (t) { + (c = e.getProjectionMatrix().multiply(e.getViewMatrix())).invertToRef(s), + t.setMatrix("inverseViewProjection", s), + t.setMatrix("prevViewProjection", o), + (o = c), + (l.x = n.motionBlurPostProcess.width), + (l.y = n.motionBlurPostProcess.height), + t.setVector2("screenSize", l), + (r = e.getEngine().getFps() / 60), + t.setFloat("motionScale", r), + t.setFloat("motionStrength", n.motionStrength), + t.setTexture("depthSampler", n._getDepthTexture()); + }; + } + this.addEffect( + new Au( + e.getEngine(), + "HDRMotionBlur", + function () { + return n.motionBlurPostProcess; + }, + !0 + ) + ); + }), + (t.prototype._getDepthTexture = function () { + return this._scene.getEngine().getCaps().drawBuffersExtension ? this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0] : this._scene.enableDepthRenderer().getDepthMap(); + }), + (t.prototype._disposePostProcesses = function () { + for (var e = 0; e < this._cameras.length; e++) { + var t = this._cameras[e]; + this.originalPostProcess && this.originalPostProcess.dispose(t), + this.screenSpaceReflectionPostProcess && this.screenSpaceReflectionPostProcess.dispose(t), + this.downSampleX4PostProcess && this.downSampleX4PostProcess.dispose(t), + this.brightPassPostProcess && this.brightPassPostProcess.dispose(t), + this.textureAdderPostProcess && this.textureAdderPostProcess.dispose(t), + this.volumetricLightPostProcess && this.volumetricLightPostProcess.dispose(t), + this.volumetricLightSmoothXPostProcess && this.volumetricLightSmoothXPostProcess.dispose(t), + this.volumetricLightSmoothYPostProcess && this.volumetricLightSmoothYPostProcess.dispose(t), + this.volumetricLightMergePostProces && this.volumetricLightMergePostProces.dispose(t), + this.volumetricLightFinalPostProcess && this.volumetricLightFinalPostProcess.dispose(t), + this.lensFlarePostProcess && this.lensFlarePostProcess.dispose(t), + this.lensFlareComposePostProcess && this.lensFlareComposePostProcess.dispose(t); + for (var n = 0; n < this.luminanceDownSamplePostProcesses.length; n++) this.luminanceDownSamplePostProcesses[n].dispose(t); + this.luminancePostProcess && this.luminancePostProcess.dispose(t), + this.hdrPostProcess && this.hdrPostProcess.dispose(t), + this.hdrFinalPostProcess && this.hdrFinalPostProcess.dispose(t), + this.depthOfFieldPostProcess && this.depthOfFieldPostProcess.dispose(t), + this.motionBlurPostProcess && this.motionBlurPostProcess.dispose(t), + this.fxaaPostProcess && this.fxaaPostProcess.dispose(t); + for (n = 0; n < this.blurHPostProcesses.length; n++) this.blurHPostProcesses[n].dispose(t); + for (n = 0; n < this.blurVPostProcesses.length; n++) this.blurVPostProcesses[n].dispose(t); + } + (this.originalPostProcess = null), + (this.downSampleX4PostProcess = null), + (this.brightPassPostProcess = null), + (this.textureAdderPostProcess = null), + (this.textureAdderFinalPostProcess = null), + (this.volumetricLightPostProcess = null), + (this.volumetricLightSmoothXPostProcess = null), + (this.volumetricLightSmoothYPostProcess = null), + (this.volumetricLightMergePostProces = null), + (this.volumetricLightFinalPostProcess = null), + (this.lensFlarePostProcess = null), + (this.lensFlareComposePostProcess = null), + (this.luminancePostProcess = null), + (this.hdrPostProcess = null), + (this.hdrFinalPostProcess = null), + (this.depthOfFieldPostProcess = null), + (this.motionBlurPostProcess = null), + (this.fxaaPostProcess = null), + (this.screenSpaceReflectionPostProcess = null), + (this.luminanceDownSamplePostProcesses = []), + (this.blurHPostProcesses = []), + (this.blurVPostProcesses = []); + }), + (t.prototype.dispose = function () { + this._disposePostProcesses(), this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras), e.prototype.dispose.call(this); + }), + (t.prototype.serialize = function () { + var e = He.a.Serialize(this); + return ( + this.sourceLight && (e.sourceLightId = this.sourceLight.id), + this.screenSpaceReflectionPostProcess && (e.screenSpaceReflectionPostProcess = He.a.Serialize(this.screenSpaceReflectionPostProcess)), + (e.customType = "StandardRenderingPipeline"), + e + ); + }), + (t.Parse = function (e, n, i) { + var r = He.a.Parse( + function () { + return new t(e._name, n, e._ratio); + }, + e, + n, + i + ); + return ( + e.sourceLightId && (r.sourceLight = n.getLightByID(e.sourceLightId)), + e.screenSpaceReflectionPostProcess && + He.a.Parse( + function () { + return r.screenSpaceReflectionPostProcess; + }, + e.screenSpaceReflectionPostProcess, + n, + i + ), + r + ); + }), + (t.LuminanceSteps = 6), + Object(h.c)([Object(He.c)()], t.prototype, "brightThreshold", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "blurWidth", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "horizontalBlur", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "exposure", null), + Object(h.c)([Object(He.m)("lensTexture")], t.prototype, "lensTexture", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "volumetricLightCoefficient", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "volumetricLightPower", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "volumetricLightBlurScale", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "hdrMinimumLuminance", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "hdrDecreaseRate", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "hdrIncreaseRate", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "hdrAutoExposure", null), + Object(h.c)([Object(He.m)("lensColorTexture")], t.prototype, "lensColorTexture", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lensFlareStrength", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lensFlareGhostDispersal", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lensFlareHaloWidth", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lensFlareDistortionStrength", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "lensFlareBlurWidth", void 0), + Object(h.c)([Object(He.m)("lensStarTexture")], t.prototype, "lensStarTexture", void 0), + Object(h.c)([Object(He.m)("lensFlareDirtTexture")], t.prototype, "lensFlareDirtTexture", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "depthOfFieldDistance", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "depthOfFieldBlurWidth", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "motionStrength", null), + Object(h.c)([Object(He.c)()], t.prototype, "objectBasedMotionBlur", null), + Object(h.c)([Object(He.c)()], t.prototype, "_ratio", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "BloomEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "DepthOfFieldEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "LensFlareEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "HDREnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "VLSEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "MotionBlurEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "fxaaEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "screenSpaceReflectionsEnabled", null), + Object(h.c)([Object(He.c)()], t.prototype, "volumetricLightStepsCount", null), + Object(h.c)([Object(He.c)()], t.prototype, "motionBlurSamples", null), + Object(h.c)([Object(He.c)()], t.prototype, "samples", null), + t + ); + })(gh); + c.a.RegisteredTypes["BABYLON.StandardRenderingPipeline"] = Dh; + var Rh = + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform float _ExposureAdjustment;\n#if defined(HABLE_TONEMAPPING)\nconst float A=0.15;\nconst float B=0.50;\nconst float C=0.10;\nconst float D=0.20;\nconst float E=0.02;\nconst float F=0.30;\nconst float W=11.2;\n#endif\nfloat Luminance(vec3 c)\n{\nreturn dot(c,vec3(0.22,0.707,0.071));\n}\nvoid main(void)\n{\nvec3 colour=texture2D(textureSampler,vUV).rgb;\n#if defined(REINHARD_TONEMAPPING)\nfloat lum=Luminance(colour.rgb);\nfloat lumTm=lum*_ExposureAdjustment;\nfloat scale=lumTm/(1.0+lumTm);\ncolour*=scale/lum;\n#elif defined(HABLE_TONEMAPPING)\ncolour*=_ExposureAdjustment;\nconst float ExposureBias=2.0;\nvec3 x=ExposureBias*colour;\nvec3 curr=((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;\nx=vec3(W,W,W);\nvec3 whiteScale=1.0/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F);\ncolour=curr*whiteScale;\n#elif defined(OPTIMIZED_HEJIDAWSON_TONEMAPPING)\ncolour*=_ExposureAdjustment;\nvec3 X=max(vec3(0.0,0.0,0.0),colour-0.004);\nvec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06);\ncolour=retColor*retColor;\n#elif defined(PHOTOGRAPHIC_TONEMAPPING)\ncolour=vec3(1.0,1.0,1.0)-exp2(-_ExposureAdjustment*colour);\n#endif\ngl_FragColor=vec4(colour.rgb,1.0);\n}"; + Xt.a.ShadersStore.tonemapPixelShader = Rh; + var wh; + !(function (e) { + (e[(e.Hable = 0)] = "Hable"), (e[(e.Reinhard = 1)] = "Reinhard"), (e[(e.HejiDawson = 2)] = "HejiDawson"), (e[(e.Photographic = 3)] = "Photographic"); + })(wh || (wh = {})); + var Lh = (function (e) { + function t(t, n, i, r, o, a, s) { + void 0 === o && (o = 2), void 0 === s && (s = 0); + var c = e.call(this, t, "tonemap", ["_ExposureAdjustment"], null, 1, r, o, a, !0, null, s) || this; + (c._operator = n), (c.exposureAdjustment = i); + var l = "#define "; + return ( + c._operator === wh.Hable + ? (l += "HABLE_TONEMAPPING") + : c._operator === wh.Reinhard + ? (l += "REINHARD_TONEMAPPING") + : c._operator === wh.HejiDawson + ? (l += "OPTIMIZED_HEJIDAWSON_TONEMAPPING") + : c._operator === wh.Photographic && (l += "PHOTOGRAPHIC_TONEMAPPING"), + c.updateEffect(l), + (c.onApply = function (e) { + e.setFloat("_ExposureAdjustment", c.exposureAdjustment); + }), + c + ); + } + return Object(h.d)(t, e), t; + })(Wt.a), + Fh = + "uniform sampler2D textureSampler;\nuniform sampler2D lightScatteringSampler;\nuniform float decay;\nuniform float exposure;\nuniform float weight;\nuniform float density;\nuniform vec2 meshPositionOnScreen;\nvarying vec2 vUV;\nvoid main(void) {\nvec2 tc=vUV;\nvec2 deltaTexCoord=(tc-meshPositionOnScreen.xy);\ndeltaTexCoord*=1.0/float(NUM_SAMPLES)*density;\nfloat illuminationDecay=1.0;\nvec4 color=texture2D(lightScatteringSampler,tc)*0.4;\nfor(int i=0; i\n#include\n#include[0..maxSimultaneousMorphTargets]\n\n#include\nuniform mat4 viewProjection;\nuniform vec2 depthValues;\n#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#if (defined(ALPHATEST) || defined(NEED_UV)) && defined(UV1)\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#include\n#include\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n}\n"; + Xt.a.ShadersStore.volumetricLightScatteringPassVertexShader = Nh; + var kh = + "#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\n#endif\n#if defined(ALPHATEST)\nuniform sampler2D diffuseSampler;\n#endif\nvoid main(void)\n{\n#if defined(ALPHATEST)\nvec4 diffuseColor=texture2D(diffuseSampler,vUV);\nif (diffuseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\n}\n"; + Xt.a.ShadersStore.volumetricLightScatteringPassPixelShader = kh; + var zh = (function (e) { + function t(n, i, r, o, s, c, l, u, h) { + void 0 === s && (s = 100), void 0 === c && (c = ln.a.BILINEAR_SAMPLINGMODE); + var d = e.call(this, n, "volumetricLightScattering", ["decay", "exposure", "weight", "meshPositionOnScreen", "density"], ["lightScatteringSampler"], i.postProcessRatio || i, r, c, l, u, "#define NUM_SAMPLES " + s) || this; + return ( + (d._screenCoordinates = a.d.Zero()), + (d.customMeshPosition = a.e.Zero()), + (d.useCustomMeshPosition = !1), + (d.invert = !0), + (d.excludedMeshes = new Array()), + (d.exposure = 0.3), + (d.decay = 0.96815), + (d.weight = 0.58767), + (d.density = 0.926), + (l = (h = null === r ? h : r.getScene()).getEngine()), + (d._viewPort = new vn.a(0, 0, 1, 1).toGlobal(l.getRenderWidth(), l.getRenderHeight())), + (d.mesh = null !== o ? o : t.CreateDefaultMesh("VolumetricLightScatteringMesh", h)), + d._createPass(h, i.passRatio || i), + (d.onActivate = function (e) { + d.isSupported || d.dispose(e), (d.onActivate = null); + }), + d.onApplyObservable.add(function (e) { + d._updateMeshScreenCoordinates(h), + e.setTexture("lightScatteringSampler", d._volumetricLightScatteringRTT), + e.setFloat("exposure", d.exposure), + e.setFloat("decay", d.decay), + e.setFloat("weight", d.weight), + e.setFloat("density", d.density), + e.setVector2("meshPositionOnScreen", d._screenCoordinates); + }), + d + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t.prototype, "useDiffuseColor", { + get: function () { + return g.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead"), !1; + }, + set: function (e) { + g.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead"); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "VolumetricLightScatteringPostProcess"; + }), + (t.prototype._isReady = function (e, t) { + var n = e.getMesh(); + if (n === this.mesh && n.material) return n.material.isReady(n); + var i = [], + r = [wn.b.PositionKind], + o = e.getMaterial(); + o && + (o.needAlphaTesting() && i.push("#define ALPHATEST"), + n.isVerticesDataPresent(wn.b.UVKind) && (r.push(wn.b.UVKind), i.push("#define UV1")), + n.isVerticesDataPresent(wn.b.UV2Kind) && (r.push(wn.b.UV2Kind), i.push("#define UV2"))), + n.useBones && n.computeBonesUsingShaders + ? (r.push(wn.b.MatricesIndicesKind), + r.push(wn.b.MatricesWeightsKind), + i.push("#define NUM_BONE_INFLUENCERS " + n.numBoneInfluencers), + i.push("#define BonesPerMesh " + (n.skeleton ? n.skeleton.bones.length + 1 : 0))) + : i.push("#define NUM_BONE_INFLUENCERS 0"), + t && (i.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(r)); + var a = i.join("\n"); + return ( + this._cachedDefines !== a && + ((this._cachedDefines = a), + (this._volumetricLightScatteringPass = n + .getScene() + .getEngine() + .createEffect("volumetricLightScatteringPass", r, ["world", "mBones", "viewProjection", "diffuseMatrix"], ["diffuseSampler"], a, void 0, void 0, void 0, { + maxSimultaneousMorphTargets: n.numBoneInfluencers, + }))), + this._volumetricLightScatteringPass.isReady() + ); + }), + (t.prototype.setCustomMeshPosition = function (e) { + this.customMeshPosition = e; + }), + (t.prototype.getCustomMeshPosition = function () { + return this.customMeshPosition; + }), + (t.prototype.dispose = function (t) { + var n = t.getScene().customRenderTargets.indexOf(this._volumetricLightScatteringRTT); + -1 !== n && t.getScene().customRenderTargets.splice(n, 1), this._volumetricLightScatteringRTT.dispose(), e.prototype.dispose.call(this, t); + }), + (t.prototype.getPass = function () { + return this._volumetricLightScatteringRTT; + }), + (t.prototype._meshExcluded = function (e) { + return this.excludedMeshes.length > 0 && -1 !== this.excludedMeshes.indexOf(e); + }), + (t.prototype._createPass = function (e, t) { + var n = this, + i = e.getEngine(); + (this._volumetricLightScatteringRTT = new mn.a("volumetricLightScatteringMap", { width: i.getRenderWidth() * t, height: i.getRenderHeight() * t }, e, !1, !0, 0)), + (this._volumetricLightScatteringRTT.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._volumetricLightScatteringRTT.wrapV = ln.a.CLAMP_ADDRESSMODE), + (this._volumetricLightScatteringRTT.renderList = null), + (this._volumetricLightScatteringRTT.renderParticles = !1), + (this._volumetricLightScatteringRTT.ignoreCameraViewport = !0); + var r = this.getCamera(); + r ? r.customRenderTargets.push(this._volumetricLightScatteringRTT) : e.customRenderTargets.push(this._volumetricLightScatteringRTT); + var o, + a = function (e) { + var t = e.getRenderingMesh(); + if (!n._meshExcluded(t)) { + t._internalAbstractMeshDataInfo._isActiveIntermediate = !1; + var i = e.getMaterial(); + if (i) { + var r = t.getScene(), + o = r.getEngine(); + o.setState(i.backFaceCulling); + var a = t._getInstancesRenderList(e._id); + if (!a.mustReturn) { + var s = o.getCaps().instancedArrays && null !== a.visibleInstances[e._id]; + if (n._isReady(e, s)) { + var c = n._volumetricLightScatteringPass; + if ((t === n.mesh && (c = e.effect ? e.effect : i.getEffect()), o.enableEffect(c), t._bind(e, c, i.fillMode), t === n.mesh)) i.bind(t.getWorldMatrix(), t); + else { + if ((n._volumetricLightScatteringPass.setMatrix("viewProjection", r.getTransformMatrix()), i && i.needAlphaTesting())) { + var l = i.getAlphaTestTexture(); + n._volumetricLightScatteringPass.setTexture("diffuseSampler", l), l && n._volumetricLightScatteringPass.setMatrix("diffuseMatrix", l.getTextureMatrix()); + } + t.useBones && t.computeBonesUsingShaders && t.skeleton && n._volumetricLightScatteringPass.setMatrices("mBones", t.skeleton.getTransformMatrices(t)); + } + t._processRendering(e, n._volumetricLightScatteringPass, Fo.a.TriangleFillMode, a, s, function (e, t) { + return c.setMatrix("world", t); + }); + } + } + } + } + }, + c = new s.b(0, 0, 0, 1); + this._volumetricLightScatteringRTT.onBeforeRenderObservable.add(function () { + (o = e.clearColor), (e.clearColor = c); + }), + this._volumetricLightScatteringRTT.onAfterRenderObservable.add(function () { + e.clearColor = o; + }), + (this._volumetricLightScatteringRTT.customRenderFunction = function (t, n, i, r) { + var o, + s = e.getEngine(); + if (r.length) { + for (s.setColorWrite(!1), o = 0; o < r.length; o++) a(r.data[o]); + s.setColorWrite(!0); + } + for (o = 0; o < t.length; o++) a(t.data[o]); + for (o = 0; o < n.length; o++) a(n.data[o]); + if (i.length) { + for (o = 0; o < i.length; o++) { + var c = i.data[o], + l = c.getBoundingInfo(); + l && e.activeCamera && ((c._alphaIndex = c.getMesh().alphaIndex), (c._distanceToCamera = l.boundingSphere.centerWorld.subtract(e.activeCamera.position).length())); + } + var u = i.data.slice(0, i.length); + for ( + u.sort(function (e, t) { + return e._alphaIndex > t._alphaIndex ? 1 : e._alphaIndex < t._alphaIndex ? -1 : e._distanceToCamera < t._distanceToCamera ? 1 : e._distanceToCamera > t._distanceToCamera ? -1 : 0; + }), + s.setAlphaMode(2), + o = 0; + o < u.length; + o++ + ) + a(u[o]); + s.setAlphaMode(0); + } + }); + }), + (t.prototype._updateMeshScreenCoordinates = function (e) { + var t, + n = e.getTransformMatrix(); + t = this.useCustomMeshPosition ? this.customMeshPosition : this.attachedNode ? this.attachedNode.position : this.mesh.parent ? this.mesh.getAbsolutePosition() : this.mesh.position; + var i = a.e.Project(t, a.a.Identity(), n, this._viewPort); + (this._screenCoordinates.x = i.x / this._viewPort.width), (this._screenCoordinates.y = i.y / this._viewPort.height), this.invert && (this._screenCoordinates.y = 1 - this._screenCoordinates.y); + }), + (t.CreateDefaultMesh = function (e, t) { + var n = Ee.a.CreatePlane(e, 1, t); + n.billboardMode = ke.a.BILLBOARDMODE_ALL; + var i = new Mn.a(e + "Material", t); + return (i.emissiveColor = new s.a(1, 1, 1)), (n.material = i), n; + }), + Object(h.c)([Object(He.o)()], t.prototype, "customMeshPosition", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "useCustomMeshPosition", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "invert", void 0), + Object(h.c)([Object(He.k)()], t.prototype, "mesh", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "excludedMeshes", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "exposure", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "decay", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "weight", void 0), + Object(h.c)([Object(He.c)()], t.prototype, "density", void 0), + t + ); + })(Wt.a); + n(226), n(227); + Object.defineProperty(ge.a.prototype, "forceShowBoundingBoxes", { + get: function () { + return this._forceShowBoundingBoxes || !1; + }, + set: function (e) { + (this._forceShowBoundingBoxes = e), e && this.getBoundingBoxRenderer(); + }, + enumerable: !0, + configurable: !0, + }), + (ge.a.prototype.getBoundingBoxRenderer = function () { + return this._boundingBoxRenderer || (this._boundingBoxRenderer = new jh(this)), this._boundingBoxRenderer; + }), + Object.defineProperty(ke.a.prototype, "showBoundingBox", { + get: function () { + return this._showBoundingBox || !1; + }, + set: function (e) { + (this._showBoundingBox = e), e && this.getScene().getBoundingBoxRenderer(); + }, + enumerable: !0, + configurable: !0, + }); + var jh = (function () { + function e(e) { + (this.name = me.a.NAME_BOUNDINGBOXRENDERER), + (this.frontColor = new s.a(1, 1, 1)), + (this.backColor = new s.a(0.1, 0.1, 0.1)), + (this.showBackLines = !0), + (this.renderList = new ii.a(32)), + (this._vertexBuffers = {}), + (this._fillIndexBuffer = null), + (this._fillIndexData = null), + (this.scene = e), + e._addComponent(this); + } + return ( + (e.prototype.register = function () { + this.scene._beforeEvaluateActiveMeshStage.registerStep(me.a.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER, this, this.reset), + this.scene._activeMeshStage.registerStep(me.a.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER, this, this._activeMesh), + this.scene._evaluateSubMeshStage.registerStep(me.a.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER, this, this._evaluateSubMesh), + this.scene._afterRenderingGroupDrawStage.registerStep(me.a.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER, this, this.render); + }), + (e.prototype._evaluateSubMesh = function (e, t) { + if (e.showSubMeshesBoundingBox) { + var n = t.getBoundingInfo(); + null != n && ((n.boundingBox._tag = e.renderingGroupId), this.renderList.push(n.boundingBox)); + } + }), + (e.prototype._activeMesh = function (e, t) { + if (e.showBoundingBox || this.scene.forceShowBoundingBoxes) { + var n = e.getBoundingInfo(); + (n.boundingBox._tag = t.renderingGroupId), this.renderList.push(n.boundingBox); + } + }), + (e.prototype._prepareRessources = function () { + if (!this._colorShader) { + (this._colorShader = new Qa.a("colorShader", this.scene, "color", { attributes: [wn.b.PositionKind], uniforms: ["world", "viewProjection", "color"] })), (this._colorShader.reservedDataStore = { hidden: !0 }); + var e = this.scene.getEngine(), + t = Rn.a.CreateBox({ size: 1 }); + (this._vertexBuffers[wn.b.PositionKind] = new wn.b(e, t.positions, wn.b.PositionKind, !1)), this._createIndexBuffer(), (this._fillIndexData = t.indices); + } + }), + (e.prototype._createIndexBuffer = function () { + var e = this.scene.getEngine(); + this._indexBuffer = e.createIndexBuffer([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 7, 1, 6, 2, 5, 3, 4]); + }), + (e.prototype.rebuild = function () { + var e = this._vertexBuffers[wn.b.PositionKind]; + e && e._rebuild(), this._createIndexBuffer(); + }), + (e.prototype.reset = function () { + this.renderList.reset(); + }), + (e.prototype.render = function (e) { + if (0 !== this.renderList.length && (this._prepareRessources(), this._colorShader.isReady())) { + var t = this.scene.getEngine(); + t.setDepthWrite(!1), this._colorShader._preBind(); + for (var n = 0; n < this.renderList.length; n++) { + var i = this.renderList.data[n]; + if (i._tag === e) { + var r = i.minimum, + o = i.maximum.subtract(r), + s = r.add(o.scale(0.5)), + c = a.a.Scaling(o.x, o.y, o.z).multiply(a.a.Translation(s.x, s.y, s.z)).multiply(i.getWorldMatrix()); + t.bindBuffers(this._vertexBuffers, this._indexBuffer, this._colorShader.getEffect()), + this.showBackLines && + (t.setDepthFunctionToGreaterOrEqual(), + this.scene.resetCachedMaterial(), + this._colorShader.setColor4("color", this.backColor.toColor4()), + this._colorShader.bind(c), + t.drawElementsType(Fo.a.LineListDrawMode, 0, 24)), + t.setDepthFunctionToLess(), + this.scene.resetCachedMaterial(), + this._colorShader.setColor4("color", this.frontColor.toColor4()), + this._colorShader.bind(c), + t.drawElementsType(Fo.a.LineListDrawMode, 0, 24); + } + } + this._colorShader.unbind(), t.setDepthFunctionToLessOrEqual(), t.setDepthWrite(!0); + } + }), + (e.prototype.renderOcclusionBoundingBox = function (e) { + if ((this._prepareRessources(), this._colorShader.isReady() && e._boundingInfo)) { + var t = this.scene.getEngine(); + this._fillIndexBuffer || (this._fillIndexBuffer = t.createIndexBuffer(this._fillIndexData)), t.setDepthWrite(!1), t.setColorWrite(!1), this._colorShader._preBind(); + var n = e._boundingInfo.boundingBox, + i = n.minimum, + r = n.maximum.subtract(i), + o = i.add(r.scale(0.5)), + s = a.a.Scaling(r.x, r.y, r.z).multiply(a.a.Translation(o.x, o.y, o.z)).multiply(n.getWorldMatrix()); + t.bindBuffers(this._vertexBuffers, this._fillIndexBuffer, this._colorShader.getEffect()), + t.setDepthFunctionToLess(), + this.scene.resetCachedMaterial(), + this._colorShader.bind(s), + t.drawElementsType(Fo.a.TriangleFillMode, 0, 36), + this._colorShader.unbind(), + t.setDepthFunctionToLessOrEqual(), + t.setDepthWrite(!0), + t.setColorWrite(!0); + } + }), + (e.prototype.dispose = function () { + if (this._colorShader) { + this.renderList.dispose(), this._colorShader.dispose(); + var e = this._vertexBuffers[wn.b.PositionKind]; + e && (e.dispose(), (this._vertexBuffers[wn.b.PositionKind] = null)), + this.scene.getEngine()._releaseBuffer(this._indexBuffer), + this._fillIndexBuffer && (this.scene.getEngine()._releaseBuffer(this._fillIndexBuffer), (this._fillIndexBuffer = null)); + } + }), + e + ); + })(); + (ge.a.prototype.enableDepthRenderer = function (e, t) { + if ((void 0 === t && (t = !1), !(e = e || this.activeCamera))) throw "No camera available to enable depth renderer"; + if ((this._depthRenderer || (this._depthRenderer = {}), !this._depthRenderer[e.id])) { + var n = 0; + (n = this.getEngine().getCaps().textureHalfFloatRender ? 2 : this.getEngine().getCaps().textureFloatRender ? 1 : 0), (this._depthRenderer[e.id] = new la(this, n, e, t)); + } + return this._depthRenderer[e.id]; + }), + (ge.a.prototype.disableDepthRenderer = function (e) { + (e = e || this.activeCamera) && this._depthRenderer && this._depthRenderer[e.id] && (this._depthRenderer[e.id].dispose(), delete this._depthRenderer[e.id]); + }); + var Bh = (function () { + function e(e) { + (this.name = me.a.NAME_DEPTHRENDERER), (this.scene = e); + } + return ( + (e.prototype.register = function () { + this.scene._gatherRenderTargetsStage.registerStep(me.a.STEP_GATHERRENDERTARGETS_DEPTHRENDERER, this, this._gatherRenderTargets), + this.scene._gatherActiveCameraRenderTargetsStage.registerStep(me.a.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER, this, this._gatherActiveCameraRenderTargets); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () { + for (var e in this.scene._depthRenderer) this.scene._depthRenderer[e].dispose(); + }), + (e.prototype._gatherRenderTargets = function (e) { + if (this.scene._depthRenderer) + for (var t in this.scene._depthRenderer) { + var n = this.scene._depthRenderer[t]; + n.enabled && !n.useOnlyInActiveCamera && e.push(n.getDepthMap()); + } + }), + (e.prototype._gatherActiveCameraRenderTargets = function (e) { + if (this.scene._depthRenderer) + for (var t in this.scene._depthRenderer) { + var n = this.scene._depthRenderer[t]; + n.enabled && n.useOnlyInActiveCamera && this.scene.activeCamera.id === t && e.push(n.getDepthMap()); + } + }), + e + ); + })(); + la._SceneComponentInitialization = function (e) { + var t = e._getComponent(me.a.NAME_DEPTHRENDERER); + t || ((t = new Bh(e)), e._addComponent(t)); + }; + Xt.a.ShadersStore.linePixelShader = "uniform vec4 color;\nvoid main(void) {\ngl_FragColor=color;\n}"; + var Vh = + "\nattribute vec3 position;\nattribute vec4 normal;\n\nuniform mat4 worldViewProjection;\nuniform float width;\nuniform float aspectRatio;\nvoid main(void) {\nvec4 viewPosition=worldViewProjection*vec4(position,1.0);\nvec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0);\nvec2 currentScreen=viewPosition.xy/viewPosition.w;\nvec2 nextScreen=viewPositionNext.xy/viewPositionNext.w;\ncurrentScreen.x*=aspectRatio;\nnextScreen.x*=aspectRatio;\nvec2 dir=normalize(nextScreen-currentScreen);\nvec2 normalDir=vec2(-dir.y,dir.x);\nnormalDir*=width/2.0;\nnormalDir.x/=aspectRatio;\nvec4 offset=vec4(normalDir*normal.w,0.0,0.0);\ngl_Position=viewPosition+offset;\n}"; + Xt.a.ShadersStore.lineVertexShader = Vh; + (ke.a.prototype.disableEdgesRendering = function () { + return this._edgesRenderer && (this._edgesRenderer.dispose(), (this._edgesRenderer = null)), this; + }), + (ke.a.prototype.enableEdgesRendering = function (e, t) { + return void 0 === e && (e = 0.95), void 0 === t && (t = !1), this.disableEdgesRendering(), (this._edgesRenderer = new Uh(this, e, t)), this; + }), + Object.defineProperty(ke.a.prototype, "edgesRenderer", { + get: function () { + return this._edgesRenderer; + }, + enumerable: !0, + configurable: !0, + }), + (xi.b.prototype.enableEdgesRendering = function (e, t) { + return void 0 === e && (e = 0.95), void 0 === t && (t = !1), this.disableEdgesRendering(), (this._edgesRenderer = new Hh(this, e, t)), this; + }), + (xi.a.prototype.enableEdgesRendering = function (e, t) { + return void 0 === e && (e = 0.95), void 0 === t && (t = !1), xi.b.prototype.enableEdgesRendering.apply(this, arguments), this; + }); + var Gh = function () { + (this.edges = new Array()), (this.edgesConnectedCount = 0); + }, + Uh = (function () { + function e(e, t, n, i) { + var r = this; + void 0 === t && (t = 0.95), + void 0 === n && (n = !1), + void 0 === i && (i = !0), + (this.edgesWidthScalerForOrthographic = 1e3), + (this.edgesWidthScalerForPerspective = 50), + (this._linesPositions = new Array()), + (this._linesNormals = new Array()), + (this._linesIndices = new Array()), + (this._buffers = {}), + (this._checkVerticesInsteadOfIndices = !1), + (this.isEnabled = !0), + (this._source = e), + (this._checkVerticesInsteadOfIndices = n), + (this._epsilon = t), + this._prepareRessources(), + i && this._generateEdgesLines(), + (this._meshRebuildObserver = this._source.onRebuildObservable.add(function () { + r._rebuild(); + })), + (this._meshDisposeObserver = this._source.onDisposeObservable.add(function () { + r.dispose(); + })); + } + return ( + (e.prototype._prepareRessources = function () { + this._lineShader || + ((this._lineShader = new Qa.a("lineShader", this._source.getScene(), "line", { attributes: ["position", "normal"], uniforms: ["worldViewProjection", "color", "width", "aspectRatio"] })), + (this._lineShader.disableDepthWrite = !0), + (this._lineShader.backFaceCulling = !1)); + }), + (e.prototype._rebuild = function () { + var e = this._buffers[wn.b.PositionKind]; + e && e._rebuild(), (e = this._buffers[wn.b.NormalKind]) && e._rebuild(); + var t = this._source.getScene().getEngine(); + this._ib = t.createIndexBuffer(this._linesIndices); + }), + (e.prototype.dispose = function () { + this._source.onRebuildObservable.remove(this._meshRebuildObserver), this._source.onDisposeObservable.remove(this._meshDisposeObserver); + var e = this._buffers[wn.b.PositionKind]; + e && (e.dispose(), (this._buffers[wn.b.PositionKind] = null)), + (e = this._buffers[wn.b.NormalKind]) && (e.dispose(), (this._buffers[wn.b.NormalKind] = null)), + this._ib && this._source.getScene().getEngine()._releaseBuffer(this._ib), + this._lineShader.dispose(); + }), + (e.prototype._processEdgeForAdjacencies = function (e, t, n, i, r) { + return (e === n && t === i) || (e === i && t === n) ? 0 : (e === i && t === r) || (e === r && t === i) ? 1 : (e === r && t === n) || (e === n && t === r) ? 2 : -1; + }), + (e.prototype._processEdgeForAdjacenciesWithVertices = function (e, t, n, i, r) { + return (e.equalsWithEpsilon(n) && t.equalsWithEpsilon(i)) || (e.equalsWithEpsilon(i) && t.equalsWithEpsilon(n)) + ? 0 + : (e.equalsWithEpsilon(i) && t.equalsWithEpsilon(r)) || (e.equalsWithEpsilon(r) && t.equalsWithEpsilon(i)) + ? 1 + : (e.equalsWithEpsilon(r) && t.equalsWithEpsilon(n)) || (e.equalsWithEpsilon(n) && t.equalsWithEpsilon(r)) + ? 2 + : -1; + }), + (e.prototype._checkEdge = function (e, t, n, i, r) { + var o; + void 0 === t ? (o = !0) : (o = a.e.Dot(n[e], n[t]) < this._epsilon); + o && this.createLine(i, r, this._linesPositions.length / 3); + }), + (e.prototype.createLine = function (e, t, n) { + this._linesPositions.push(e.x, e.y, e.z, e.x, e.y, e.z, t.x, t.y, t.z, t.x, t.y, t.z), + this._linesNormals.push(t.x, t.y, t.z, -1, t.x, t.y, t.z, 1, e.x, e.y, e.z, -1, e.x, e.y, e.z, 1), + this._linesIndices.push(n, n + 1, n + 2, n, n + 2, n + 3); + }), + (e.prototype._generateEdgesLines = function () { + var e = this._source.getVerticesData(wn.b.PositionKind), + t = this._source.getIndices(); + if (t && e) { + var n, + i, + r = new Array(), + o = new Array(); + for (n = 0; n < t.length; n += 3) { + i = new Gh(); + var s = t[n], + c = t[n + 1], + l = t[n + 2]; + (i.p0 = new a.e(e[3 * s], e[3 * s + 1], e[3 * s + 2])), (i.p1 = new a.e(e[3 * c], e[3 * c + 1], e[3 * c + 2])), (i.p2 = new a.e(e[3 * l], e[3 * l + 1], e[3 * l + 2])); + var u = a.e.Cross(i.p1.subtract(i.p0), i.p2.subtract(i.p1)); + u.normalize(), o.push(u), r.push(i); + } + for (n = 0; n < r.length; n++) { + i = r[n]; + for (var h = n + 1; h < r.length; h++) { + var d = r[h]; + if (3 === i.edgesConnectedCount) break; + if (3 !== d.edgesConnectedCount) + for (var p = t[3 * h], f = t[3 * h + 1], m = t[3 * h + 2], g = 0; g < 3; g++) { + var b = 0; + if (void 0 === i.edges[g]) { + switch (g) { + case 0: + b = this._checkVerticesInsteadOfIndices ? this._processEdgeForAdjacenciesWithVertices(i.p0, i.p1, d.p0, d.p1, d.p2) : this._processEdgeForAdjacencies(t[3 * n], t[3 * n + 1], p, f, m); + break; + case 1: + b = this._checkVerticesInsteadOfIndices + ? this._processEdgeForAdjacenciesWithVertices(i.p1, i.p2, d.p0, d.p1, d.p2) + : this._processEdgeForAdjacencies(t[3 * n + 1], t[3 * n + 2], p, f, m); + break; + case 2: + b = this._checkVerticesInsteadOfIndices ? this._processEdgeForAdjacenciesWithVertices(i.p2, i.p0, d.p0, d.p1, d.p2) : this._processEdgeForAdjacencies(t[3 * n + 2], t[3 * n], p, f, m); + } + if (-1 !== b && ((i.edges[g] = h), (d.edges[b] = n), i.edgesConnectedCount++, d.edgesConnectedCount++, 3 === i.edgesConnectedCount)) break; + } + } + } + } + for (n = 0; n < r.length; n++) { + var _ = r[n]; + this._checkEdge(n, _.edges[0], o, _.p0, _.p1), this._checkEdge(n, _.edges[1], o, _.p1, _.p2), this._checkEdge(n, _.edges[2], o, _.p2, _.p0); + } + var v = this._source.getScene().getEngine(); + (this._buffers[wn.b.PositionKind] = new wn.b(v, this._linesPositions, wn.b.PositionKind, !1)), + (this._buffers[wn.b.NormalKind] = new wn.b(v, this._linesNormals, wn.b.NormalKind, !1, !1, 4)), + (this._ib = v.createIndexBuffer(this._linesIndices)), + (this._indicesCount = this._linesIndices.length); + } + }), + (e.prototype.isReady = function () { + return this._lineShader.isReady(); + }), + (e.prototype.render = function () { + var e = this._source.getScene(); + if (this.isReady() && e.activeCamera) { + var t = e.getEngine(); + this._lineShader._preBind(), + 1 !== this._source.edgesColor.a ? t.setAlphaMode(2) : t.setAlphaMode(0), + t.bindBuffers(this._buffers, this._ib, this._lineShader.getEffect()), + e.resetCachedMaterial(), + this._lineShader.setColor4("color", this._source.edgesColor), + e.activeCamera.mode === De.a.ORTHOGRAPHIC_CAMERA + ? this._lineShader.setFloat("width", this._source.edgesWidth / this.edgesWidthScalerForOrthographic) + : this._lineShader.setFloat("width", this._source.edgesWidth / this.edgesWidthScalerForPerspective), + this._lineShader.setFloat("aspectRatio", t.getAspectRatio(e.activeCamera)), + this._lineShader.bind(this._source.getWorldMatrix()), + t.drawElementsType(Fo.a.TriangleFillMode, 0, this._indicesCount), + this._lineShader.unbind(); + } + }), + e + ); + })(), + Hh = (function (e) { + function t(t, n, i) { + void 0 === n && (n = 0.95), void 0 === i && (i = !1); + var r = e.call(this, t, n, i, !1) || this; + return r._generateEdgesLines(), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._generateEdgesLines = function () { + var e = this._source.getVerticesData(wn.b.PositionKind), + t = this._source.getIndices(); + if (t && e) { + for (var n = a.c.Vector3[0], i = a.c.Vector3[1], r = t.length - 1, o = 0, s = 0; o < r; o += 2, s += 4) a.e.FromArrayToRef(e, 3 * t[o], n), a.e.FromArrayToRef(e, 3 * t[o + 1], i), this.createLine(n, i, s); + var c = this._source.getScene().getEngine(); + (this._buffers[wn.b.PositionKind] = new wn.b(c, this._linesPositions, wn.b.PositionKind, !1)), + (this._buffers[wn.b.NormalKind] = new wn.b(c, this._linesNormals, wn.b.NormalKind, !1, !1, 4)), + (this._ib = c.createIndexBuffer(this._linesIndices)), + (this._indicesCount = this._linesIndices.length); + } + }), + t + ); + })(Uh), + Wh = + (n(142), + n(174), + "#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform vec4 color;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\n#include\nvoid main(void) {\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\n#include\ngl_FragColor=color;\n}"); + Xt.a.ShadersStore.outlinePixelShader = Wh; + n(175); + var Xh = + "\nattribute vec3 position;\nattribute vec3 normal;\n#include\n#include\n#include[0..maxSimultaneousMorphTargets]\n\nuniform float offset;\n#include\nuniform mat4 viewProjection;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#include\nvoid main(void)\n{\nvec3 positionUpdated=position;\nvec3 normalUpdated=normal;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\nvec3 offsetPosition=positionUpdated+(normalUpdated*offset);\n#include\n#include\ngl_Position=viewProjection*finalWorld*vec4(offsetPosition,1.0);\n#ifdef ALPHATEST\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include\n}\n"; + Xt.a.ShadersStore.outlineVertexShader = Xh; + (ge.a.prototype.getOutlineRenderer = function () { + return this._outlineRenderer || (this._outlineRenderer = new Yh(this)), this._outlineRenderer; + }), + Object.defineProperty(Ee.a.prototype, "renderOutline", { + get: function () { + return this._renderOutline; + }, + set: function (e) { + e && this.getScene().getOutlineRenderer(), (this._renderOutline = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(Ee.a.prototype, "renderOverlay", { + get: function () { + return this._renderOverlay; + }, + set: function (e) { + e && this.getScene().getOutlineRenderer(), (this._renderOverlay = e); + }, + enumerable: !0, + configurable: !0, + }); + var Yh = (function () { + function e(e) { + (this.name = me.a.NAME_OUTLINERENDERER), (this.zOffset = 1), (this.scene = e), (this._engine = e.getEngine()), this.scene._addComponent(this); + } + return ( + (e.prototype.register = function () { + this.scene._beforeRenderingMeshStage.registerStep(me.a.STEP_BEFORERENDERINGMESH_OUTLINE, this, this._beforeRenderingMesh), + this.scene._afterRenderingMeshStage.registerStep(me.a.STEP_AFTERRENDERINGMESH_OUTLINE, this, this._afterRenderingMesh); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () {}), + (e.prototype.render = function (e, t, n) { + var i = this; + void 0 === n && (n = !1); + var r = this.scene, + o = r.getEngine(), + a = o.getCaps().instancedArrays && null !== t.visibleInstances[e._id] && void 0 !== t.visibleInstances[e._id]; + if (this.isReady(e, a)) { + var s = e.getRenderingMesh(), + c = e.getMaterial(); + if (c && r.activeCamera) { + if ( + (o.enableEffect(this._effect), + c.useLogarithmicDepth && this._effect.setFloat("logarithmicDepthConstant", 2 / (Math.log(r.activeCamera.maxZ + 1) / Math.LN2)), + this._effect.setFloat("offset", n ? 0 : s.outlineWidth), + this._effect.setColor4("color", n ? s.overlayColor : s.outlineColor, n ? s.overlayAlpha : c.alpha), + this._effect.setMatrix("viewProjection", r.getTransformMatrix()), + s.useBones && s.computeBonesUsingShaders && s.skeleton && this._effect.setMatrices("mBones", s.skeleton.getTransformMatrices(s)), + Ir.a.BindMorphTargetParameters(s, this._effect), + s._bind(e, this._effect, c.fillMode), + c && c.needAlphaTesting()) + ) { + var l = c.getAlphaTestTexture(); + l && (this._effect.setTexture("diffuseSampler", l), this._effect.setMatrix("diffuseMatrix", l.getTextureMatrix())); + } + o.setZOffset(-this.zOffset), + s._processRendering(e, this._effect, c.fillMode, t, a, function (e, t) { + i._effect.setMatrix("world", t); + }), + o.setZOffset(0); + } + } + }), + (e.prototype.isReady = function (e, t) { + var n = [], + i = [wn.b.PositionKind, wn.b.NormalKind], + r = e.getMesh(), + o = e.getMaterial(); + o && + (o.needAlphaTesting() && + (n.push("#define ALPHATEST"), r.isVerticesDataPresent(wn.b.UVKind) && (i.push(wn.b.UVKind), n.push("#define UV1")), r.isVerticesDataPresent(wn.b.UV2Kind) && (i.push(wn.b.UV2Kind), n.push("#define UV2"))), + o.useLogarithmicDepth && n.push("#define LOGARITHMICDEPTH")), + r.useBones && r.computeBonesUsingShaders + ? (i.push(wn.b.MatricesIndicesKind), + i.push(wn.b.MatricesWeightsKind), + r.numBoneInfluencers > 4 && (i.push(wn.b.MatricesIndicesExtraKind), i.push(wn.b.MatricesWeightsExtraKind)), + n.push("#define NUM_BONE_INFLUENCERS " + r.numBoneInfluencers), + n.push("#define BonesPerMesh " + (r.skeleton ? r.skeleton.bones.length + 1 : 0))) + : n.push("#define NUM_BONE_INFLUENCERS 0"); + var a = r.morphTargetManager, + s = 0; + a && a.numInfluencers > 0 && ((s = a.numInfluencers), n.push("#define MORPHTARGETS"), n.push("#define NUM_MORPH_INFLUENCERS " + s), Ir.a.PrepareAttributesForMorphTargetsInfluencers(i, r, s)), + t && (n.push("#define INSTANCES"), Ir.a.PushAttributesForInstances(i)); + var c = n.join("\n"); + return ( + this._cachedDefines !== c && + ((this._cachedDefines = c), + (this._effect = this.scene + .getEngine() + .createEffect("outline", i, ["world", "mBones", "viewProjection", "diffuseMatrix", "offset", "color", "logarithmicDepthConstant", "morphTargetInfluences"], ["diffuseSampler"], c, void 0, void 0, void 0, { + maxSimultaneousMorphTargets: s, + }))), + this._effect.isReady() + ); + }), + (e.prototype._beforeRenderingMesh = function (t, n, i) { + if (((this._savedDepthWrite = this._engine.getDepthWrite()), t.renderOutline)) { + var r = n.getMaterial(); + r && + r.needAlphaBlending() && + (this._engine.cacheStencilState(), + this._engine.setDepthWrite(!1), + this._engine.setColorWrite(!1), + this._engine.setStencilBuffer(!0), + this._engine.setStencilOperationPass(7681), + this._engine.setStencilFunction(519), + this._engine.setStencilMask(e._StencilReference), + this._engine.setStencilFunctionReference(e._StencilReference), + this.render(n, i, !0), + this._engine.setColorWrite(!0), + this._engine.setStencilFunction(517)), + this._engine.setDepthWrite(!1), + this.render(n, i), + this._engine.setDepthWrite(this._savedDepthWrite), + r && r.needAlphaBlending() && this._engine.restoreStencilState(); + } + }), + (e.prototype._afterRenderingMesh = function (e, t, n) { + if (e.renderOverlay) { + var i = this._engine.getAlphaMode(), + r = this._engine.alphaState.alphaBlend; + this._engine.setAlphaMode(2), this.render(t, n, !0), this._engine.setAlphaMode(i), this._engine.setDepthWrite(this._savedDepthWrite), (this._engine.alphaState.alphaBlend = r); + } + e.renderOutline && this._savedDepthWrite && (this._engine.setDepthWrite(!0), this._engine.setColorWrite(!1), this.render(t, n), this._engine.setColorWrite(!0)); + }), + (e._StencilReference = 4), + e + ); + })(), + Kh = n(189), + Zh = (function () { + function e(e, t) { + (this.name = e), + (this.color = new s.b(1, 1, 1, 1)), + (this.width = 1), + (this.height = 1), + (this.angle = 0), + (this.invertU = 0), + (this.invertV = 0), + (this.animations = new Array()), + (this.isPickable = !1), + (this._animationStarted = !1), + (this._loopAnimation = !1), + (this._fromIndex = 0), + (this._toIndex = 0), + (this._delay = 0), + (this._direction = 1), + (this._time = 0), + (this.isVisible = !0), + (this._manager = t), + this._manager.sprites.push(this), + (this.position = a.e.Zero()); + } + return ( + Object.defineProperty(e.prototype, "size", { + get: function () { + return this.width; + }, + set: function (e) { + (this.width = e), (this.height = e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.playAnimation = function (e, t, n, i, r) { + (this._fromIndex = e), + (this._toIndex = t), + (this._loopAnimation = n), + (this._delay = i), + (this._animationStarted = !0), + e < t ? (this._direction = 1) : ((this._direction = -1), (this._toIndex = e), (this._fromIndex = t)), + (this.cellIndex = e), + (this._time = 0), + (this._onAnimationEnd = r); + }), + (e.prototype.stopAnimation = function () { + this._animationStarted = !1; + }), + (e.prototype._animate = function (e) { + this._animationStarted && + ((this._time += e), + this._time > this._delay && + ((this._time = this._time % this._delay), + (this.cellIndex += this._direction), + ((this._direction > 0 && this.cellIndex > this._toIndex) || (this._direction < 0 && this.cellIndex < this._fromIndex)) && + (this._loopAnimation + ? (this.cellIndex = this._direction > 0 ? this._fromIndex : this._toIndex) + : ((this.cellIndex = this._toIndex), (this._animationStarted = !1), this._onAnimationEnd && this._onAnimationEnd(), this.disposeWhenFinishedAnimating && this.dispose())))); + }), + (e.prototype.dispose = function () { + for (var e = 0; e < this._manager.sprites.length; e++) this._manager.sprites[e] == this && this._manager.sprites.splice(e, 1); + }), + e + ); + })(); + (ge.a.prototype._internalPickSprites = function (e, t, n, i) { + if (!Ae.a) return null; + var r = null; + if (!i) { + if (!this.activeCamera) return null; + i = this.activeCamera; + } + if (this.spriteManagers.length > 0) + for (var o = 0; o < this.spriteManagers.length; o++) { + var a = this.spriteManagers[o]; + if (a.isPickable) { + var s = a.intersects(e, i, t, n); + if (s && s.hit && (n || null == r || !(s.distance >= r.distance)) && ((r = s), n)) break; + } + } + return r || new Ae.a(); + }), + (ge.a.prototype._internalMultiPickSprites = function (e, t, n) { + if (!Ae.a) return null; + var i = new Array(); + if (!n) { + if (!this.activeCamera) return null; + n = this.activeCamera; + } + if (this.spriteManagers.length > 0) + for (var r = 0; r < this.spriteManagers.length; r++) { + var o = this.spriteManagers[r]; + if (o.isPickable) { + var a = o.multiIntersects(e, n, t); + null !== a && (i = i.concat(a)); + } + } + return i; + }), + (ge.a.prototype.pickSprite = function (e, t, n, i, r) { + return this.createPickingRayInCameraSpaceToRef(e, t, this._tempSpritePickingRay, r), this._internalPickSprites(this._tempSpritePickingRay, n, i, r); + }), + (ge.a.prototype.pickSpriteWithRay = function (e, t, n, i) { + if (!this._tempSpritePickingRay) return null; + if (!i) { + if (!this.activeCamera) return null; + i = this.activeCamera; + } + return Re.TransformToRef(e, i.getViewMatrix(), this._tempSpritePickingRay), this._internalPickSprites(this._tempSpritePickingRay, t, n, i); + }), + (ge.a.prototype.multiPickSprite = function (e, t, n, i) { + return this.createPickingRayInCameraSpaceToRef(e, t, this._tempSpritePickingRay, i), this._internalMultiPickSprites(this._tempSpritePickingRay, n, i); + }), + (ge.a.prototype.multiPickSpriteWithRay = function (e, t, n) { + if (!this._tempSpritePickingRay) return null; + if (!n) { + if (!this.activeCamera) return null; + n = this.activeCamera; + } + return Re.TransformToRef(e, n.getViewMatrix(), this._tempSpritePickingRay), this._internalMultiPickSprites(this._tempSpritePickingRay, t, n); + }), + (ge.a.prototype.setPointerOverSprite = function (e) { + this._pointerOverSprite !== e && + (this._pointerOverSprite && this._pointerOverSprite.actionManager && this._pointerOverSprite.actionManager.processTrigger(10, u.a.CreateNewFromSprite(this._pointerOverSprite, this)), + (this._pointerOverSprite = e), + this._pointerOverSprite && this._pointerOverSprite.actionManager && this._pointerOverSprite.actionManager.processTrigger(9, u.a.CreateNewFromSprite(this._pointerOverSprite, this))); + }), + (ge.a.prototype.getPointerOverSprite = function () { + return this._pointerOverSprite; + }); + var qh = (function () { + function e(e) { + (this.name = me.a.NAME_SPRITE), + (this.scene = e), + (this.scene.spriteManagers = new Array()), + (this.scene._tempSpritePickingRay = Re ? Re.Zero() : null), + (this.scene.onBeforeSpritesRenderingObservable = new o.c()), + (this.scene.onAfterSpritesRenderingObservable = new o.c()), + (this._spritePredicate = function (e) { + return !!e.actionManager && e.isPickable && e.actionManager.hasPointerTriggers; + }); + } + return ( + (e.prototype.register = function () { + this.scene._pointerMoveStage.registerStep(me.a.STEP_POINTERMOVE_SPRITE, this, this._pointerMove), + this.scene._pointerDownStage.registerStep(me.a.STEP_POINTERDOWN_SPRITE, this, this._pointerDown), + this.scene._pointerUpStage.registerStep(me.a.STEP_POINTERUP_SPRITE, this, this._pointerUp); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () { + this.scene.onBeforeSpritesRenderingObservable.clear(), this.scene.onAfterSpritesRenderingObservable.clear(); + for (var e = this.scene.spriteManagers; e.length; ) e[0].dispose(); + }), + (e.prototype._pickSpriteButKeepRay = function (e, t, n, i, r) { + var o = this.scene.pickSprite(t, n, this._spritePredicate, i, r); + return o && (o.ray = e ? e.ray : null), o; + }), + (e.prototype._pointerMove = function (e, t, n, i, r) { + var o = this.scene; + return ( + i + ? o.setPointerOverSprite(null) + : (n = this._pickSpriteButKeepRay(n, e, t, !1, o.cameraToUseForPointers || void 0)) && n.hit && n.pickedSprite + ? (o.setPointerOverSprite(n.pickedSprite), + o.doNotHandleCursors || + (o._pointerOverSprite && o._pointerOverSprite.actionManager && o._pointerOverSprite.actionManager.hoverCursor + ? (r.style.cursor = o._pointerOverSprite.actionManager.hoverCursor) + : (r.style.cursor = o.hoverCursor))) + : o.setPointerOverSprite(null), + n + ); + }), + (e.prototype._pointerDown = function (e, t, n, i) { + var r = this.scene; + if (((r._pickedDownSprite = null), r.spriteManagers.length > 0 && (n = r.pickSprite(e, t, this._spritePredicate, !1, r.cameraToUseForPointers || void 0)) && n.hit && n.pickedSprite && n.pickedSprite.actionManager)) { + switch (((r._pickedDownSprite = n.pickedSprite), i.button)) { + case 0: + n.pickedSprite.actionManager.processTrigger(2, u.a.CreateNewFromSprite(n.pickedSprite, r, i)); + break; + case 1: + n.pickedSprite.actionManager.processTrigger(4, u.a.CreateNewFromSprite(n.pickedSprite, r, i)); + break; + case 2: + n.pickedSprite.actionManager.processTrigger(3, u.a.CreateNewFromSprite(n.pickedSprite, r, i)); + } + n.pickedSprite.actionManager && n.pickedSprite.actionManager.processTrigger(5, u.a.CreateNewFromSprite(n.pickedSprite, r, i)); + } + return n; + }), + (e.prototype._pointerUp = function (e, t, n, i) { + var r = this.scene; + if (r.spriteManagers.length > 0) { + var o = r.pickSprite(e, t, this._spritePredicate, !1, r.cameraToUseForPointers || void 0); + o && + (o.hit && + o.pickedSprite && + o.pickedSprite.actionManager && + (o.pickedSprite.actionManager.processTrigger(7, u.a.CreateNewFromSprite(o.pickedSprite, r, i)), + o.pickedSprite.actionManager && (this.scene._inputManager._isPointerSwiping() || o.pickedSprite.actionManager.processTrigger(1, u.a.CreateNewFromSprite(o.pickedSprite, r, i)))), + r._pickedDownSprite && r._pickedDownSprite.actionManager && r._pickedDownSprite !== o.pickedSprite && r._pickedDownSprite.actionManager.processTrigger(16, u.a.CreateNewFromSprite(r._pickedDownSprite, r, i))); + } + return n; + }), + e + ); + })(), + Qh = + "uniform bool alphaTest;\nvarying vec4 vColor;\n\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n\n#include\nvoid main(void) {\nvec4 color=texture2D(diffuseSampler,vUV);\nif (alphaTest)\n{\nif (color.a<0.95)\ndiscard;\n}\ncolor*=vColor;\n#include\ngl_FragColor=color;\n}"; + Xt.a.ShadersStore.spritesPixelShader = Qh; + var Jh = + "\nattribute vec4 position;\nattribute vec4 options;\nattribute vec2 inverts;\nattribute vec4 cellInfo;\nattribute vec4 color;\n\nuniform mat4 view;\nuniform mat4 projection;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n#include\nvoid main(void) {\nvec3 viewPos=(view*vec4(position.xyz,1.0)).xyz;\nvec2 cornerPos;\nfloat angle=position.w;\nvec2 size=vec2(options.x,options.y);\nvec2 offset=options.zw;\ncornerPos=vec2(offset.x-0.5,offset.y-0.5)*size;\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\n\nviewPos+=rotatedCorner;\ngl_Position=projection*vec4(viewPos,1.0);\n\nvColor=color;\n\nvec2 uvOffset=vec2(abs(offset.x-inverts.x),abs(1.0-offset.y-inverts.y));\nvec2 uvPlace=cellInfo.xy;\nvec2 uvSize=cellInfo.zw;\nvUV.x=uvPlace.x+uvSize.x*uvOffset.x;\nvUV.y=uvPlace.y+uvSize.y*uvOffset.y;\n\n#ifdef FOG\nvFogDistance=viewPos;\n#endif\n}"; + Xt.a.ShadersStore.spritesVertexShader = Jh; + var $h = (function () { + function e(e, t, n, i, r, a, s, c, l) { + if ( + (void 0 === a && (a = 0.01), + void 0 === s && (s = ln.a.TRILINEAR_SAMPLINGMODE), + void 0 === c && (c = !1), + void 0 === l && (l = null), + (this.name = e), + (this.sprites = new Array()), + (this.renderingGroupId = 0), + (this.layerMask = 268435455), + (this.fogEnabled = !0), + (this.isPickable = !1), + (this._packedAndReady = !1), + (this.onDisposeObservable = new o.c()), + (this._vertexBuffers = {}), + (this._blendMode = 2), + (this.disableDepthWrite = !1), + r._getComponent(me.a.NAME_SPRITE) || r._addComponent(new qh(r)), + (this._capacity = n), + (this._fromPacked = c), + (this._spriteTexture = new ln.a(t, r, !0, !1, s)), + (this._spriteTexture.wrapU = ln.a.CLAMP_ADDRESSMODE), + (this._spriteTexture.wrapV = ln.a.CLAMP_ADDRESSMODE), + i.width && i.height) + ) + (this.cellWidth = i.width), (this.cellHeight = i.height); + else { + if (void 0 === i) return; + (this.cellWidth = i), (this.cellHeight = i); + } + (this._epsilon = a), (this._scene = r), this._scene.spriteManagers.push(this); + for (var u = [], h = 0, d = 0; d < n; d++) u.push(h), u.push(h + 1), u.push(h + 2), u.push(h), u.push(h + 2), u.push(h + 3), (h += 4); + (this._indexBuffer = r.getEngine().createIndexBuffer(u)), (this._vertexData = new Float32Array(18 * n * 4)), (this._buffer = new wn.a(r.getEngine(), this._vertexData, !0, 18)); + var p = this._buffer.createVertexBuffer(wn.b.PositionKind, 0, 4), + f = this._buffer.createVertexBuffer("options", 4, 4), + m = this._buffer.createVertexBuffer("inverts", 8, 2), + g = this._buffer.createVertexBuffer("cellInfo", 10, 4), + b = this._buffer.createVertexBuffer(wn.b.ColorKind, 14, 4); + (this._vertexBuffers[wn.b.PositionKind] = p), + (this._vertexBuffers.options = f), + (this._vertexBuffers.inverts = m), + (this._vertexBuffers.cellInfo = g), + (this._vertexBuffers[wn.b.ColorKind] = b), + (this._effectBase = this._scene + .getEngine() + .createEffect("sprites", [wn.b.PositionKind, "options", "inverts", "cellInfo", wn.b.ColorKind], ["view", "projection", "textureInfos", "alphaTest"], ["diffuseSampler"], "")), + (this._effectFog = this._scene + .getEngine() + .createEffect("sprites", [wn.b.PositionKind, "options", "inverts", "cellInfo", wn.b.ColorKind], ["view", "projection", "textureInfos", "alphaTest", "vFogInfos", "vFogColor"], ["diffuseSampler"], "#define FOG")), + this._fromPacked && this._makePacked(t, l); + } + return ( + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "texture", { + get: function () { + return this._spriteTexture; + }, + set: function (e) { + this._spriteTexture = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "blendMode", { + get: function () { + return this._blendMode; + }, + set: function (e) { + this._blendMode = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._makePacked = function (e, t) { + var n = this; + if (null !== t) + try { + var i = void 0; + if ((i = "string" == typeof t ? JSON.parse(t) : t).frames.length) { + for (var r = {}, o = 0; o < i.frames.length; o++) { + var a = i.frames[o]; + if ("string" != typeof Object.keys(a)[0]) throw new Error("Invalid JSON Format. Check the frame values and make sure the name is the first parameter."); + r[a[Object.keys(a)[0]]] = a; + } + i.frames = r; + } + var s = Reflect.ownKeys(i.frames); + (this._spriteMap = s), (this._packedAndReady = !0), (this._cellData = i.frames); + } catch (e) { + throw ((this._fromPacked = !1), (this._packedAndReady = !1), new Error("Invalid JSON from string. Spritesheet managed with constant cell size.")); + } + else { + var c = /\./g, + l = void 0; + do { + (l = c.lastIndex), c.test(e); + } while (c.lastIndex > 0); + var u = e.substring(0, l - 1) + ".json", + h = new XMLHttpRequest(); + h.open("GET", u, !0), + (h.onerror = function () { + g.a.Error("JSON ERROR: Unable to load JSON file."), (n._fromPacked = !1), (n._packedAndReady = !1); + }), + (h.onload = function () { + try { + var e = JSON.parse(h.response), + t = Reflect.ownKeys(e.frames); + (n._spriteMap = t), (n._packedAndReady = !0), (n._cellData = e.frames); + } catch (e) { + throw ((n._fromPacked = !1), (n._packedAndReady = !1), new Error("Invalid JSON format. Please check documentation for format specifications.")); + } + }), + h.send(); + } + }), + (e.prototype._appendSpriteVertex = function (e, t, n, i, r) { + var o = 18 * e; + if ( + (0 === n ? (n = this._epsilon) : 1 === n && (n = 1 - this._epsilon), + 0 === i ? (i = this._epsilon) : 1 === i && (i = 1 - this._epsilon), + (this._vertexData[o] = t.position.x), + (this._vertexData[o + 1] = t.position.y), + (this._vertexData[o + 2] = t.position.z), + (this._vertexData[o + 3] = t.angle), + (this._vertexData[o + 4] = t.width), + (this._vertexData[o + 5] = t.height), + (this._vertexData[o + 6] = n), + (this._vertexData[o + 7] = i), + (this._vertexData[o + 8] = t.invertU ? 1 : 0), + (this._vertexData[o + 9] = t.invertV ? 1 : 0), + this._packedAndReady) + ) { + t.cellRef || (t.cellIndex = 0); + var a = t.cellIndex; + "number" == typeof a && isFinite(a) && Math.floor(a) === a && (t.cellRef = this._spriteMap[t.cellIndex]), + (this._vertexData[o + 10] = this._cellData[t.cellRef].frame.x / r.width), + (this._vertexData[o + 11] = this._cellData[t.cellRef].frame.y / r.height), + (this._vertexData[o + 12] = this._cellData[t.cellRef].frame.w / r.width), + (this._vertexData[o + 13] = this._cellData[t.cellRef].frame.h / r.height); + } else { + t.cellIndex || (t.cellIndex = 0); + var s = r.width / this.cellWidth, + c = (t.cellIndex / s) >> 0; + (this._vertexData[o + 10] = ((t.cellIndex - c * s) * this.cellWidth) / r.width), + (this._vertexData[o + 11] = (c * this.cellHeight) / r.height), + (this._vertexData[o + 12] = this.cellWidth / r.width), + (this._vertexData[o + 13] = this.cellHeight / r.height); + } + (this._vertexData[o + 14] = t.color.r), (this._vertexData[o + 15] = t.color.g), (this._vertexData[o + 16] = t.color.b), (this._vertexData[o + 17] = t.color.a); + }), + (e.prototype.intersects = function (e, t, n, i) { + for (var r = Math.min(this._capacity, this.sprites.length), o = a.e.Zero(), s = a.e.Zero(), c = Number.MAX_VALUE, l = null, u = a.c.Vector3[0], h = a.c.Vector3[1], d = t.getViewMatrix(), p = 0; p < r; p++) { + var f = this.sprites[p]; + if (f) { + if (n) { + if (!n(f)) continue; + } else if (!f.isPickable) continue; + if ( + (a.e.TransformCoordinatesToRef(f.position, d, h), o.copyFromFloats(h.x - f.width / 2, h.y - f.height / 2, h.z), s.copyFromFloats(h.x + f.width / 2, h.y + f.height / 2, h.z), e.intersectsBoxMinMax(o, s)) + ) { + var m = a.e.Distance(h, e.origin); + if (c > m && ((c = m), (l = f), i)) break; + } + } + } + if (l) { + var g = new Ae.a(); + d.invertToRef(a.c.Matrix[0]), (g.hit = !0), (g.pickedSprite = l), (g.distance = c); + var b = a.c.Vector3[2]; + return b.copyFrom(e.direction), b.normalize(), b.scaleInPlace(c), e.origin.addToRef(b, u), (g.pickedPoint = a.e.TransformCoordinates(u, a.c.Matrix[0])), g; + } + return null; + }), + (e.prototype.multiIntersects = function (e, t, n) { + for ( + var i, + r = Math.min(this._capacity, this.sprites.length), + o = a.e.Zero(), + s = a.e.Zero(), + c = [], + l = a.c.Vector3[0].copyFromFloats(0, 0, 0), + u = a.c.Vector3[1].copyFromFloats(0, 0, 0), + h = t.getViewMatrix(), + d = 0; + d < r; + d++ + ) { + var p = this.sprites[d]; + if (p) { + if (n) { + if (!n(p)) continue; + } else if (!p.isPickable) continue; + if ( + (a.e.TransformCoordinatesToRef(p.position, h, u), o.copyFromFloats(u.x - p.width / 2, u.y - p.height / 2, u.z), s.copyFromFloats(u.x + p.width / 2, u.y + p.height / 2, u.z), e.intersectsBoxMinMax(o, s)) + ) { + i = a.e.Distance(u, e.origin); + var f = new Ae.a(); + c.push(f), h.invertToRef(a.c.Matrix[0]), (f.hit = !0), (f.pickedSprite = p), (f.distance = i); + var m = a.c.Vector3[2]; + m.copyFrom(e.direction), m.normalize(), m.scaleInPlace(i), e.origin.addToRef(m, l), (f.pickedPoint = a.e.TransformCoordinates(l, a.c.Matrix[0])); + } + } + } + return c; + }), + (e.prototype.render = function () { + if ( + this._effectBase.isReady() && + this._effectFog.isReady() && + this._spriteTexture && + this._spriteTexture.isReady() && + this.sprites.length && + (!this._fromPacked || (this._packedAndReady && this._spriteMap && this._cellData)) + ) { + for (var e = this._scene.getEngine(), t = this._spriteTexture.getBaseSize(), n = e.getDeltaTime(), i = Math.min(this._capacity, this.sprites.length), r = 0, o = !0, a = 0; a < i; a++) { + var s = this.sprites[a]; + s && + s.isVisible && + ((o = !1), s._animate(n), this._appendSpriteVertex(r++, s, 0, 0, t), this._appendSpriteVertex(r++, s, 1, 0, t), this._appendSpriteVertex(r++, s, 1, 1, t), this._appendSpriteVertex(r++, s, 0, 1, t)); + } + if (!o) { + this._buffer.update(this._vertexData); + var c = this._effectBase; + this._scene.fogEnabled && this._scene.fogMode !== ge.a.FOGMODE_NONE && this.fogEnabled && (c = this._effectFog), e.enableEffect(c); + var l = this._scene.getViewMatrix(); + c.setTexture("diffuseSampler", this._spriteTexture), + c.setMatrix("view", l), + c.setMatrix("projection", this._scene.getProjectionMatrix()), + this._scene.fogEnabled && + this._scene.fogMode !== ge.a.FOGMODE_NONE && + this.fogEnabled && + (c.setFloat4("vFogInfos", this._scene.fogMode, this._scene.fogStart, this._scene.fogEnd, this._scene.fogDensity), c.setColor3("vFogColor", this._scene.fogColor)), + e.bindBuffers(this._vertexBuffers, this._indexBuffer, c), + e.setDepthFunctionToLessOrEqual(), + this.disableDepthWrite || (c.setBool("alphaTest", !0), e.setColorWrite(!1), e.drawElementsType(Fo.a.TriangleFillMode, 0, (r / 4) * 6), e.setColorWrite(!0), c.setBool("alphaTest", !1)), + e.setAlphaMode(this._blendMode), + e.drawElementsType(Fo.a.TriangleFillMode, 0, (r / 4) * 6), + e.setAlphaMode(0); + } + } + }), + (e.prototype.dispose = function () { + this._buffer && (this._buffer.dispose(), (this._buffer = null)), + this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)), + this._spriteTexture && (this._spriteTexture.dispose(), (this._spriteTexture = null)); + var e = this._scene.spriteManagers.indexOf(this); + this._scene.spriteManagers.splice(e, 1), this.onDisposeObservable.notifyObservers(this), this.onDisposeObservable.clear(); + }), + e + ); + })(), + ed = + "precision highp float;\nvarying vec3 vPosition;\nvarying vec2 vUV;\nvarying vec2 tUV;\nuniform float time;\nuniform float spriteCount;\nuniform sampler2D spriteSheet;\nuniform vec2 spriteMapSize;\nuniform vec2 outputSize;\nuniform vec2 stageSize;\nuniform sampler2D frameMap;\nuniform sampler2D tileMaps[LAYERS];\nuniform sampler2D animationMap;\nuniform vec3 colorMul;\nfloat mt;\nconst float fdStep=1./4.;\nconst float aFrameSteps=1./MAX_ANIMATION_FRAMES;\nmat4 getFrameData(float frameID){\nfloat fX=frameID/spriteCount;\nreturn mat4(\ntexture2D(frameMap,vec2(fX,0.),0.),\ntexture2D(frameMap,vec2(fX,fdStep*1.),0.),\ntexture2D(frameMap,vec2(fX,fdStep*2.),0.),\nvec4(0.)\n);\n}\nvoid main(){\nvec4 color=vec4(0.);\nvec2 tileUV=fract(tUV);\n#ifdef FLIPU\ntileUV.y=1.0-tileUV.y;\n#endif\nvec2 tileID=floor(tUV);\nvec2 sheetUnits=1./spriteMapSize;\nfloat spriteUnits=1./spriteCount;\nvec2 stageUnits=1./stageSize;\nfor(int i=0; i0.) {\nmt=mod(time*animationData.z,1.0);\nfor(float f=0.; fmt){\nframeID=animationData.x;\nbreak;\n}\nanimationData=texture2D(animationMap,vec2((frameID+0.5)/spriteCount,aFrameSteps*f),0.);\n}\n}\n\nmat4 frameData=getFrameData(frameID+0.5);\nvec2 frameSize=(frameData[0].wz)/spriteMapSize;\nvec2 offset=frameData[0].xy*sheetUnits;\nvec2 ratio=frameData[2].xy/frameData[0].wz;\n\nif (frameData[2].z == 1.){\ntileUV.xy=tileUV.yx;\n}\nif (i == 0){\ncolor=texture2D(spriteSheet,tileUV*frameSize+offset);\n} else {\nvec4 nc=texture2D(spriteSheet,tileUV*frameSize+offset);\nfloat alpha=min(color.a+nc.a,1.0);\nvec3 mixed=mix(color.xyz,nc.xyz,nc.a);\ncolor=vec4(mixed,alpha);\n}\n}\ncolor.xyz*=colorMul;\ngl_FragColor=color;\n}"; + Xt.a.ShadersStore.spriteMapPixelShader = ed; + var td = + "precision highp float;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nvarying vec3 vPosition;\nvarying vec2 vUV;\nvarying vec2 tUV;\nvarying vec2 stageUnits;\nvarying vec2 levelUnits;\nvarying vec2 tileID;\n\nuniform float time;\nuniform mat4 worldViewProjection;\nuniform vec2 outputSize;\nuniform vec2 stageSize;\nuniform vec2 spriteMapSize;\nuniform float stageScale;\nvoid main() {\nvec4 p=vec4( position,1. );\nvPosition=p.xyz;\nvUV=uv;\ntUV=uv*stageSize;\ngl_Position=worldViewProjection*p;\n}"; + Xt.a.ShadersStore.spriteMapVertexShader = td; + var nd, + id = (function () { + function e(e, t, n, i, r) { + var o = this; + (this.name = e), + (this.sprites = []), + (this.atlasJSON = t), + (this.sprites = this.atlasJSON.frames), + (this.spriteSheet = n), + (this.options = i), + (i.stageSize = i.stageSize || new a.d(1, 1)), + (i.outputSize = i.outputSize || i.stageSize), + (i.outputPosition = i.outputPosition || a.e.Zero()), + (i.outputRotation = i.outputRotation || a.e.Zero()), + (i.layerCount = i.layerCount || 1), + (i.maxAnimationFrames = i.maxAnimationFrames || 0), + (i.baseTile = i.baseTile || 0), + (i.flipU = i.flipU || !1), + (i.colorMultiply = i.colorMultiply || new a.e(1, 1, 1)), + (this._scene = r), + (this._frameMap = this._createFrameBuffer()), + (this._tileMaps = new Array()); + for (var s = 0; s < i.layerCount; s++) this._tileMaps.push(this._createTileBuffer(null, s)); + this._animationMap = this._createTileAnimationBuffer(null); + var c = []; + c.push("#define LAYERS " + i.layerCount), i.flipU && c.push("#define FLIPU"), c.push("#define MAX_ANIMATION_FRAMES " + i.maxAnimationFrames + ".0"); + var l, + u = Xt.a.ShadersStore.spriteMapPixelShader; + if (1 === this._scene.getEngine().webGLVersion) { + l = ""; + for (s = 0; s < i.layerCount; s++) l += "if (" + s + " == i) { frameID = texture2D(tileMaps[" + s + "], (tileID + 0.5) / stageSize, 0.).x; }"; + } else { + l = "switch(i) {"; + for (s = 0; s < i.layerCount; s++) (l += "case " + s + " : frameID = texture(tileMaps[" + s + "], (tileID + 0.5) / stageSize, 0.).x;"), (l += "break;"); + l += "}"; + } + (Xt.a.ShadersStore["spriteMap" + this.name + "PixelShader"] = u.replace("#define LAYER_ID_SWITCH", l)), + (this._material = new Qa.a( + "spriteMap:" + this.name, + this._scene, + { vertex: "spriteMap", fragment: "spriteMap" + this.name }, + { + defines: c, + attributes: ["position", "normal", "uv"], + uniforms: ["worldViewProjection", "time", "stageSize", "outputSize", "spriteMapSize", "spriteCount", "time", "colorMul", "mousePosition", "curTile", "flipU"], + samplers: ["spriteSheet", "frameMap", "tileMaps", "animationMap"], + needAlphaBlending: !0, + } + )), + (this._time = 0), + this._material.setFloat("spriteCount", this.spriteCount), + this._material.setVector2("stageSize", i.stageSize), + this._material.setVector2("outputSize", i.outputSize), + this._material.setTexture("spriteSheet", this.spriteSheet), + this._material.setVector2("spriteMapSize", new a.d(1, 1)), + this._material.setVector3("colorMul", i.colorMultiply); + var h = 0, + d = function () { + o.spriteSheet && o.spriteSheet.isReady() && o.spriteSheet._texture + ? o._material.setVector2("spriteMapSize", new a.d(o.spriteSheet._texture.baseWidth || 1, o.spriteSheet._texture.baseHeight || 1)) + : h < 100 && + setTimeout(function () { + h++, d(); + }, 100); + }; + d(), + this._material.setVector3("colorMul", i.colorMultiply), + this._material.setTexture("frameMap", this._frameMap), + this._material.setTextureArray("tileMaps", this._tileMaps), + this._material.setTexture("animationMap", this._animationMap), + this._material.setFloat("time", this._time), + (this._output = Ee.a.CreatePlane(e + ":output", 1, r, !0)), + (this._output.scaling.x = i.outputSize.x), + (this._output.scaling.y = i.outputSize.y); + this._scene.onBeforeRenderObservable.add(function () { + (o._time += o._scene.getEngine().getDeltaTime()), o._material.setFloat("time", o._time); + }), + (this._output.material = this._material); + } + return ( + Object.defineProperty(e.prototype, "spriteCount", { + get: function () { + return this.sprites.length; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "position", { + get: function () { + return this._output.position; + }, + set: function (e) { + this._output.position = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rotation", { + get: function () { + return this._output.rotation; + }, + set: function (e) { + this._output.rotation = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "animationMap", { + get: function () { + return this._animationMap; + }, + set: function (e) { + var t = e._texture._bufferView, + n = this._createTileAnimationBuffer(t); + this._animationMap.dispose(), (this._animationMap = n), this._material.setTexture("animationMap", this._animationMap); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getTileID = function () { + var e = this.getMousePosition(); + return e.multiplyInPlace(this.options.stageSize || a.d.Zero()), (e.x = Math.floor(e.x)), (e.y = Math.floor(e.y)), e; + }), + (e.prototype.getMousePosition = function () { + var e = this._output, + t = this._scene.pick(this._scene.pointerX, this._scene.pointerY, function (t) { + return t === e; + }); + if (!t || !t.hit || !t.getTextureCoordinates) return new a.d(-1, -1); + var n = t.getTextureCoordinates(); + return n || new a.d(-1, -1); + }), + (e.prototype._createFrameBuffer = function () { + for (var e = new Array(), t = 0; t < this.spriteCount; t++) e.push(0, 0, 0, 0), e.push(0, 0, 0, 0), e.push(0, 0, 0, 0), e.push(0, 0, 0, 0); + for (t = 0; t < this.spriteCount; t++) { + var n = this.sprites[t].frame, + i = this.sprites[t].spriteSourceSize, + r = this.sprites[t].sourceSize, + o = this.sprites[t].rotated ? 1 : 0, + a = this.sprites[t].trimmed ? 1 : 0; + (e[4 * t] = n.x), + (e[4 * t + 1] = n.y), + (e[4 * t + 2] = n.w), + (e[4 * t + 3] = n.h), + (e[4 * t + 4 * this.spriteCount] = i.x), + (e[4 * t + 1 + 4 * this.spriteCount] = i.y), + (e[4 * t + 3 + 4 * this.spriteCount] = i.h), + (e[4 * t + 8 * this.spriteCount] = r.w), + (e[4 * t + 1 + 8 * this.spriteCount] = r.h), + (e[4 * t + 2 + 8 * this.spriteCount] = o), + (e[4 * t + 3 + 8 * this.spriteCount] = a); + } + var s = new Float32Array(e); + return Cs.a.CreateRGBATexture(s, this.spriteCount, 4, this._scene, !1, !1, ln.a.NEAREST_NEAREST, ue.a.TEXTURETYPE_FLOAT); + }), + (e.prototype._createTileBuffer = function (e, t) { + void 0 === t && (t = 0); + var n = new Array(), + i = this.options.stageSize.y || 0, + r = this.options.stageSize.x || 0; + if (e) n = e; + else { + var o = this.options.baseTile; + 0 != t && (o = 0); + for (var a = 0; a < i; a++) for (var s = 0; s < 4 * r; s += 4) n.push(o, 0, 0, 0); + } + var c = new Float32Array(n); + return Cs.a.CreateRGBATexture(c, r, i, this._scene, !1, !1, ln.a.NEAREST_NEAREST, ue.a.TEXTURETYPE_FLOAT); + }), + (e.prototype.changeTiles = function (e, t, n) { + var i; + if ((void 0 === e && (e = 0), void 0 === n && (n = 0), null !== (i = this._tileMaps[e]._texture._bufferView))) { + var r = new Array(); + t instanceof a.d ? r.push(t) : (r = t); + for (var o = this.options.stageSize.x || 0, s = 0; s < r.length; s++) { + var c = r[s]; + (c.x = Math.floor(c.x)), (c.y = Math.floor(c.y)), (i[4 * c.x + c.y * (4 * o)] = n); + } + var l = this._createTileBuffer(i); + this._tileMaps[e].dispose(), (this._tileMaps[e] = l), this._material.setTextureArray("tileMap", this._tileMaps); + } + }), + (e.prototype._createTileAnimationBuffer = function (e) { + var t, + n = new Array(); + if (e) t = e; + else { + for (var i = 0; i < this.spriteCount; i++) { + n.push(0, 0, 0, 0); + for (var r = 1; r < (this.options.maxAnimationFrames || 4); ) n.push(0, 0, 0, 0), r++; + } + t = new Float32Array(n); + } + return Cs.a.CreateRGBATexture(t, this.spriteCount, this.options.maxAnimationFrames || 4, this._scene, !1, !1, ln.a.NEAREST_NEAREST, ue.a.TEXTURETYPE_FLOAT); + }), + (e.prototype.addAnimationToTile = function (e, t, n, i, r) { + void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === i && (i = 0), void 0 === r && (r = 1); + var o = this._animationMap._texture._bufferView, + a = 4 * e + 4 * this.spriteCount * t; + if (o) { + (o[a] = n), (o[a + 1] = i), (o[a + 2] = r); + var s = this._createTileAnimationBuffer(o); + this._animationMap.dispose(), (this._animationMap = s), this._material.setTexture("animationMap", this._animationMap); + } + }), + (e.prototype.saveTileMaps = function () { + for (var e = "", t = 0; t < this._tileMaps.length; t++) t > 0 && (e += "\n\r"), (e += this._tileMaps[t]._texture._bufferView.toString()); + var n = document.createElement("a"); + (n.href = "data:octet/stream;charset=utf-8," + encodeURI(e)), (n.target = "_blank"), (n.download = this.name + ".tilemaps"), n.click(), n.remove(); + }), + (e.prototype.loadTileMaps = function (e) { + var t = this, + n = new XMLHttpRequest(); + n.open("GET", e); + var i = this.options.layerCount || 0; + (n.onload = function () { + for (var e = n.response.split("\n\r"), r = 0; r < i; r++) { + var o = e[r].split(",").map(Number), + a = t._createTileBuffer(o); + t._tileMaps[r].dispose(), (t._tileMaps[r] = a); + } + t._material.setTextureArray("tileMap", t._tileMaps); + }), + n.send(); + }), + (e.prototype.dispose = function () { + this._output.dispose(), + this._material.dispose(), + this._animationMap.dispose(), + this._tileMaps.forEach(function (e) { + e.dispose(); + }), + this._frameMap.dispose(); + }), + e + ); + })(), + rd = (function (e) { + function t(t, n, i, r, o, a, s) { + void 0 === o && (o = null), void 0 === a && (a = 0.01), void 0 === s && (s = ln.a.TRILINEAR_SAMPLINGMODE); + var c = e.call(this, t, n, i, 64, r, a, s, !0, o) || this; + return (c.name = t), c; + } + return Object(h.d)(t, e), t; + })($h), + od = n(184), + ad = n(182), + sd = n(183), + cd = n(179); + !(function (e) { + (e[(e.INIT = 0)] = "INIT"), (e[(e.RUNNING = 1)] = "RUNNING"), (e[(e.DONE = 2)] = "DONE"), (e[(e.ERROR = 3)] = "ERROR"); + })(nd || (nd = {})); + var ld, + ud = (function () { + function e(e) { + (this.name = e), (this._isCompleted = !1), (this._taskState = nd.INIT); + } + return ( + Object.defineProperty(e.prototype, "isCompleted", { + get: function () { + return this._isCompleted; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "taskState", { + get: function () { + return this._taskState; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "errorObject", { + get: function () { + return this._errorObject; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._setErrorObject = function (e, t) { + this._errorObject || (this._errorObject = { message: e, exception: t }); + }), + (e.prototype.run = function (e, t, n) { + var i = this; + (this._taskState = nd.RUNNING), + this.runTask( + e, + function () { + i.onDoneCallback(t, n); + }, + function (e, t) { + i.onErrorCallback(n, e, t); + } + ); + }), + (e.prototype.runTask = function (e, t, n) { + throw new Error("runTask is not implemented"); + }), + (e.prototype.reset = function () { + this._taskState = nd.INIT; + }), + (e.prototype.onErrorCallback = function (e, t, n) { + (this._taskState = nd.ERROR), (this._errorObject = { message: t, exception: n }), this.onError && this.onError(this, t, n), e(); + }), + (e.prototype.onDoneCallback = function (e, t) { + try { + (this._taskState = nd.DONE), (this._isCompleted = !0), this.onSuccess && this.onSuccess(this), e(); + } catch (e) { + this.onErrorCallback(t, "Task is done, error executing success callback(s)", e); + } + }), + e + ); + })(), + hd = function (e, t, n) { + (this.remainingCount = e), (this.totalCount = t), (this.task = n); + }, + dd = (function (e) { + function t(t, n, i, r) { + var o = e.call(this, t) || this; + return (o.name = t), (o.meshesNames = n), (o.rootUrl = i), (o.sceneFilename = r), o; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + var i = this; + $i.a.ImportMesh( + this.meshesNames, + this.rootUrl, + this.sceneFilename, + e, + function (e, n, r, o) { + (i.loadedMeshes = e), (i.loadedParticleSystems = n), (i.loadedSkeletons = r), (i.loadedAnimationGroups = o), t(); + }, + null, + function (e, t, i) { + n(t, i); + } + ); + }), + t + ); + })(ud), + pd = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return (i.name = t), (i.url = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + var i = this; + e._loadFile( + this.url, + function (e) { + (i.text = e), t(); + }, + void 0, + !1, + !1, + function (e, t) { + e && n(e.status + " " + e.statusText, t); + } + ); + }), + t + ); + })(ud), + fd = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return (i.name = t), (i.url = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + var i = this; + e._loadFile( + this.url, + function (e) { + (i.data = e), t(); + }, + void 0, + !0, + !0, + function (e, t) { + e && n(e.status + " " + e.statusText, t); + } + ); + }), + t + ); + })(ud), + md = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return (i.name = t), (i.url = n), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + var i = this, + r = new Image(); + $e.b.SetCorsBehavior(this.url, r), + (r.onload = function () { + (i.image = r), t(); + }), + (r.onerror = function (e) { + n("Error loading image", e); + }), + (r.src = this.url); + }), + t + ); + })(ud), + gd = (function (e) { + function t(t, n, i, r, o) { + void 0 === o && (o = ln.a.TRILINEAR_SAMPLINGMODE); + var a = e.call(this, t) || this; + return (a.name = t), (a.url = n), (a.noMipmap = i), (a.invertY = r), (a.samplingMode = o), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + this.texture = new ln.a( + this.url, + e, + this.noMipmap, + this.invertY, + this.samplingMode, + function () { + t(); + }, + function (e, t) { + n(e, t); + } + ); + }), + t + ); + })(ud), + bd = (function (e) { + function t(t, n, i, r, o) { + var a = e.call(this, t) || this; + return (a.name = t), (a.url = n), (a.extensions = i), (a.noMipmap = r), (a.files = o), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + this.texture = new Ar.a( + this.url, + e, + this.extensions, + this.noMipmap, + this.files, + function () { + t(); + }, + function (e, t) { + n(e, t); + } + ); + }), + t + ); + })(ud), + _d = (function (e) { + function t(t, n, i, r, o, a, s) { + void 0 === r && (r = !1), void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = !1); + var c = e.call(this, t) || this; + return (c.name = t), (c.url = n), (c.size = i), (c.noMipmap = r), (c.generateHarmonics = o), (c.gammaSpace = a), (c.reserved = s), c; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + this.texture = new Ea( + this.url, + e, + this.size, + this.noMipmap, + this.generateHarmonics, + this.gammaSpace, + this.reserved, + function () { + t(); + }, + function (e, t) { + n(e, t); + } + ); + }), + t + ); + })(ud), + vd = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = !1), void 0 === o && (o = !0); + var a = e.call(this, t) || this; + return (a.name = t), (a.url = n), (a.size = i), (a.noMipmap = r), (a.gammaSpace = o), a; + } + return ( + Object(h.d)(t, e), + (t.prototype.runTask = function (e, t, n) { + this.texture = new $a( + this.url, + e, + this.size, + this.noMipmap, + this.gammaSpace, + function () { + t(); + }, + function (e, t) { + n(e, t); + } + ); + }), + t + ); + })(ud), + yd = (function () { + function e(e) { + (this._isLoading = !1), + (this._tasks = new Array()), + (this._waitingTasksCount = 0), + (this._totalTasksCount = 0), + (this.onTaskSuccessObservable = new o.c()), + (this.onTaskErrorObservable = new o.c()), + (this.onTasksDoneObservable = new o.c()), + (this.onProgressObservable = new o.c()), + (this.useDefaultLoadingScreen = !0), + (this.autoHideLoadingUI = !0), + (this._scene = e); + } + return ( + (e.prototype.addMeshTask = function (e, t, n, i) { + var r = new dd(e, t, n, i); + return this._tasks.push(r), r; + }), + (e.prototype.addTextFileTask = function (e, t) { + var n = new pd(e, t); + return this._tasks.push(n), n; + }), + (e.prototype.addBinaryFileTask = function (e, t) { + var n = new fd(e, t); + return this._tasks.push(n), n; + }), + (e.prototype.addImageTask = function (e, t) { + var n = new md(e, t); + return this._tasks.push(n), n; + }), + (e.prototype.addTextureTask = function (e, t, n, i, r) { + void 0 === r && (r = ln.a.TRILINEAR_SAMPLINGMODE); + var o = new gd(e, t, n, i, r); + return this._tasks.push(o), o; + }), + (e.prototype.addCubeTextureTask = function (e, t, n, i, r) { + var o = new bd(e, t, n, i, r); + return this._tasks.push(o), o; + }), + (e.prototype.addHDRCubeTextureTask = function (e, t, n, i, r, o, a) { + void 0 === i && (i = !1), void 0 === r && (r = !0), void 0 === o && (o = !1), void 0 === a && (a = !1); + var s = new _d(e, t, n, i, r, o, a); + return this._tasks.push(s), s; + }), + (e.prototype.addEquiRectangularCubeTextureAssetTask = function (e, t, n, i, r) { + void 0 === i && (i = !1), void 0 === r && (r = !0); + var o = new vd(e, t, n, i, r); + return this._tasks.push(o), o; + }), + (e.prototype.removeTask = function (e) { + var t = this._tasks.indexOf(e); + t > -1 && this._tasks.splice(t, 1); + }), + (e.prototype._decreaseWaitingTasksCount = function (e) { + this._waitingTasksCount--; + try { + this.onProgress && this.onProgress(this._waitingTasksCount, this._totalTasksCount, e), this.onProgressObservable.notifyObservers(new hd(this._waitingTasksCount, this._totalTasksCount, e)); + } catch (e) { + g.a.Error("Error running progress callbacks."); + } + if (0 === this._waitingTasksCount) { + try { + var t = this._tasks.slice(); + this.onFinish && this.onFinish(t); + for (var n = 0, i = t; n < i.length; n++) { + if ((e = i[n]).taskState === nd.DONE) { + var r = this._tasks.indexOf(e); + r > -1 && this._tasks.splice(r, 1); + } + } + this.onTasksDoneObservable.notifyObservers(this._tasks); + } catch (e) { + g.a.Error("Error running tasks-done callbacks."); + } + (this._isLoading = !1), this.autoHideLoadingUI && this._scene.getEngine().hideLoadingUI(); + } + }), + (e.prototype._runTask = function (e) { + var t = this, + n = function (n, i) { + e._setErrorObject(n, i), t.onTaskError && t.onTaskError(e), t.onTaskErrorObservable.notifyObservers(e), t._decreaseWaitingTasksCount(e); + }; + e.run( + this._scene, + function () { + try { + t.onTaskSuccess && t.onTaskSuccess(e), t.onTaskSuccessObservable.notifyObservers(e), t._decreaseWaitingTasksCount(e); + } catch (e) { + n("Error executing task success callbacks", e); + } + }, + n + ); + }), + (e.prototype.reset = function () { + return (this._isLoading = !1), (this._tasks = new Array()), this; + }), + (e.prototype.load = function () { + if (this._isLoading) return this; + if (((this._isLoading = !0), (this._waitingTasksCount = this._tasks.length), (this._totalTasksCount = this._tasks.length), 0 === this._waitingTasksCount)) + return (this._isLoading = !1), this.onFinish && this.onFinish(this._tasks), this.onTasksDoneObservable.notifyObservers(this._tasks), this; + this.useDefaultLoadingScreen && this._scene.getEngine().displayLoadingUI(); + for (var e = 0; e < this._tasks.length; e++) { + var t = this._tasks[e]; + t.taskState === nd.INIT && this._runTask(t); + } + return this; + }), + (e.prototype.loadAsync = function () { + var e = this; + return new Promise(function (t, n) { + e._isLoading + ? t() + : (e.onTasksDoneObservable.addOnce(function (e) { + e && e.length ? n(e) : t(); + }), + e.load()); + }); + }), + e + ); + })(), + Cd = n(138), + Pd = (function () { + function e(e, t) { + (this._meshesOrigins = []), + (this._toCenterVectors = []), + (this._scaledDirection = a.e.Zero()), + (this._newPosition = a.e.Zero()), + (this._centerPosition = a.e.Zero()), + (this._meshes = e.slice()), + t ? (this._centerMesh = t) : this._setCenterMesh(); + var n = this._meshes.indexOf(this._centerMesh); + n >= 0 && this._meshes.splice(n, 1), (this._centerPosition = this._centerMesh.getAbsolutePosition().clone()); + for (var i = 0; i < this._meshes.length; i++) + if (this._meshes[i]) { + var r = this._meshes[i]; + (this._meshesOrigins[i] = r.getAbsolutePosition().clone()), + (this._toCenterVectors[i] = a.e.Zero()), + r._boundingInfo && this._centerMesh._boundingInfo && r._boundingInfo.boundingBox.centerWorld.subtractToRef(this._centerMesh._boundingInfo.boundingBox.centerWorld, this._toCenterVectors[i]); + } + } + return ( + (e.prototype._setCenterMesh = function () { + for (var e = a.e.Zero(), t = a.e.Zero(), n = Number.MAX_VALUE, i = 0; i < this._meshes.length; i++) { + if (this._meshes[i]) (o = (r = this._meshes[i]).getBoundingInfo()) && t.addInPlace(o.boundingBox.centerWorld); + } + e = t.scale(1 / this._meshes.length); + for (i = 0; i < this._meshes.length; i++) { + var r, o; + if (this._meshes[i]) + if ((o = (r = this._meshes[i]).getBoundingInfo())) { + var s = o.boundingBox.centerWorld.subtract(e).lengthSquared(); + s < n && ((this._centerMesh = r), (n = s)); + } + } + }), + (e.prototype.getClassName = function () { + return "MeshExploder"; + }), + (e.prototype.getMeshes = function () { + var e = this._meshes.slice(); + return e.unshift(this._centerMesh), e; + }), + (e.prototype.explode = function (e) { + void 0 === e && (e = 1); + for (var t = 0; t < this._meshes.length; t++) + this._meshes[t] && + this._meshesOrigins[t] && + this._toCenterVectors[t] && + (this._toCenterVectors[t].scaleToRef(e, this._scaledDirection), this._meshesOrigins[t].addToRef(this._scaledDirection, this._newPosition), this._meshes[t].setAbsolutePosition(this._newPosition)); + this._centerMesh.setAbsolutePosition(this._centerPosition); + }), + e + ); + })(), + xd = n(118), + Td = (function () { + function e(e, t, n, i, r, o, a, s, c) { + (this.onProcessFileCallback = function () { + return !0; + }), + (this._engine = e), + (this._currentScene = t), + (this._sceneLoadedCallback = n), + (this._progressCallback = i), + (this._additionalRenderLoopLogicCallback = r), + (this._textureLoadingCallback = o), + (this._startingProcessingFilesCallback = a), + (this._onReloadCallback = s), + (this._errorCallback = c); + } + return ( + Object.defineProperty(e, "FilesToLoad", { + get: function () { + return xd.a.FilesToLoad; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.monitorElementForDragNDrop = function (e) { + var t = this; + e && + ((this._elementToMonitor = e), + (this._dragEnterHandler = function (e) { + t.drag(e); + }), + (this._dragOverHandler = function (e) { + t.drag(e); + }), + (this._dropHandler = function (e) { + t.drop(e); + }), + this._elementToMonitor.addEventListener("dragenter", this._dragEnterHandler, !1), + this._elementToMonitor.addEventListener("dragover", this._dragOverHandler, !1), + this._elementToMonitor.addEventListener("drop", this._dropHandler, !1)); + }), + (e.prototype.dispose = function () { + this._elementToMonitor && + (this._elementToMonitor.removeEventListener("dragenter", this._dragEnterHandler), + this._elementToMonitor.removeEventListener("dragover", this._dragOverHandler), + this._elementToMonitor.removeEventListener("drop", this._dropHandler)); + }), + (e.prototype.renderFunction = function () { + if ((this._additionalRenderLoopLogicCallback && this._additionalRenderLoopLogicCallback(), this._currentScene)) { + if (this._textureLoadingCallback) { + var e = this._currentScene.getWaitingItemsCount(); + e > 0 && this._textureLoadingCallback(e); + } + this._currentScene.render(); + } + }), + (e.prototype.drag = function (e) { + e.stopPropagation(), e.preventDefault(); + }), + (e.prototype.drop = function (e) { + e.stopPropagation(), e.preventDefault(), this.loadFiles(e); + }), + (e.prototype._traverseFolder = function (e, t, n, i) { + var r = this, + o = e.createReader(), + a = e.fullPath.replace(/^\//, "").replace(/(.+?)\/?$/, "$1/"); + o.readEntries(function (e) { + n.count += e.length; + for (var o = 0, s = e; o < s.length; o++) { + var c = s[o]; + c.isFile + ? c.file(function (e) { + (e.correctName = a + e.name), t.push(e), 0 == --n.count && i(); + }) + : c.isDirectory && r._traverseFolder(c, t, n, i); + } + --n.count && i(); + }); + }), + (e.prototype._processFiles = function (t) { + for (var n = 0; n < t.length; n++) { + var i = t[n].correctName.toLowerCase(), + r = i.split(".").pop(); + this.onProcessFileCallback(t[n], i, r) && + (("babylon" !== r && "stl" !== r && "obj" !== r && "gltf" !== r && "glb" !== r) || -1 !== i.indexOf(".binary.babylon") || -1 !== i.indexOf(".incremental.babylon") || (this._sceneFileToLoad = t[n]), + (e.FilesToLoad[i] = t[n])); + } + }), + (e.prototype.loadFiles = function (e) { + var t = this; + if ( + (e && e.dataTransfer && e.dataTransfer.files && (this._filesToLoad = e.dataTransfer.files), + e && e.target && e.target.files && (this._filesToLoad = e.target.files), + this._filesToLoad && 0 !== this._filesToLoad.length && (this._startingProcessingFilesCallback && this._startingProcessingFilesCallback(this._filesToLoad), this._filesToLoad && this._filesToLoad.length > 0)) + ) { + for (var n = new Array(), i = [], r = e.dataTransfer ? e.dataTransfer.items : null, o = 0; o < this._filesToLoad.length; o++) { + var a = this._filesToLoad[o], + s = a.name.toLowerCase(), + c = void 0; + if (((a.correctName = s), r)) { + var l = r[o]; + l.getAsEntry ? (c = l.getAsEntry()) : l.webkitGetAsEntry && (c = l.webkitGetAsEntry()); + } + c && c.isDirectory ? i.push(c) : n.push(a); + } + if (0 === i.length) this._processFiles(n), this._processReload(); + else + for (var u = { count: i.length }, h = 0, d = i; h < d.length; h++) { + var p = d[h]; + this._traverseFolder(p, n, u, function () { + t._processFiles(n), 0 === u.count && t._processReload(); + }); + } + } + }), + (e.prototype._processReload = function () { + this._onReloadCallback ? this._onReloadCallback(this._sceneFileToLoad) : this.reload(); + }), + (e.prototype.reload = function () { + var e = this; + this._sceneFileToLoad + ? (this._currentScene && (g.a.errorsCount > 0 && g.a.ClearLogCache(), this._engine.stopRenderLoop()), + $i.a + .LoadAsync("file:", this._sceneFileToLoad, this._engine, function (t) { + e._progressCallback && e._progressCallback(t); + }) + .then(function (t) { + e._currentScene && e._currentScene.dispose(), + (e._currentScene = t), + e._sceneLoadedCallback && e._sceneLoadedCallback(e._sceneFileToLoad, e._currentScene), + e._currentScene.executeWhenReady(function () { + e._engine.runRenderLoop(function () { + e.renderFunction(); + }); + }); + }) + .catch(function (t) { + e._errorCallback && e._errorCallback(e._sceneFileToLoad, e._currentScene, t.message); + })) + : g.a.Error("Please provide a valid .babylon file."); + }), + e + ); + })(), + Sd = n(187), + Od = n(186), + Ed = (function () { + function e(e) { + void 0 === e && (e = 0), (this.priority = e); + } + return ( + (e.prototype.getDescription = function () { + return ""; + }), + (e.prototype.apply = function (e, t) { + return !0; + }), + e + ); + })(), + Md = (function (e) { + function t(t, n, i) { + void 0 === t && (t = 0), void 0 === n && (n = 1024), void 0 === i && (i = 0.5); + var r = e.call(this, t) || this; + return (r.priority = t), (r.maximumSize = n), (r.step = i), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Reducing render target texture size to " + this.maximumSize; + }), + (t.prototype.apply = function (e, t) { + for (var n = !0, i = 0; i < e.textures.length; i++) { + var r = e.textures[i]; + if (r.canRescale && !r.getContext) { + var o = r.getSize(); + Math.max(o.width, o.height) > this.maximumSize && (r.scale(this.step), (n = !1)); + } + } + return n; + }), + t + ); + })(Ed), + Ad = (function (e) { + function t(t, n, i) { + void 0 === t && (t = 0), void 0 === n && (n = 2), void 0 === i && (i = 0.25); + var r = e.call(this, t) || this; + return (r.priority = t), (r.maximumScale = n), (r.step = i), (r._currentScale = -1), (r._directionOffset = 1), r; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Setting hardware scaling level to " + this._currentScale; + }), + (t.prototype.apply = function (e, t) { + return ( + -1 === this._currentScale && ((this._currentScale = e.getEngine().getHardwareScalingLevel()), this._currentScale > this.maximumScale && (this._directionOffset = -1)), + (this._currentScale += this._directionOffset * this.step), + e.getEngine().setHardwareScalingLevel(this._currentScale), + 1 === this._directionOffset ? this._currentScale >= this.maximumScale : this._currentScale <= this.maximumScale + ); + }), + t + ); + })(Ed), + Id = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Turning shadows on/off"; + }), + (t.prototype.apply = function (e, t) { + return (e.shadowsEnabled = t.isInImprovementMode), !0; + }), + t + ); + })(Ed), + Dd = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Turning post-processes on/off"; + }), + (t.prototype.apply = function (e, t) { + return (e.postProcessesEnabled = t.isInImprovementMode), !0; + }), + t + ); + })(Ed), + Rd = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Turning lens flares on/off"; + }), + (t.prototype.apply = function (e, t) { + return (e.lensFlaresEnabled = t.isInImprovementMode), !0; + }), + t + ); + })(Ed), + wd = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return this.onGetDescription ? this.onGetDescription() : "Running user defined callback"; + }), + (t.prototype.apply = function (e, t) { + return !this.onApply || this.onApply(e, t); + }), + t + ); + })(Ed), + Ld = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Turning particles on/off"; + }), + (t.prototype.apply = function (e, t) { + return (e.particlesEnabled = t.isInImprovementMode), !0; + }), + t + ); + })(Ed), + Fd = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(h.d)(t, e), + (t.prototype.getDescription = function () { + return "Turning render targets off"; + }), + (t.prototype.apply = function (e, t) { + return (e.renderTargetsEnabled = t.isInImprovementMode), !0; + }), + t + ); + })(Ed), + Nd = (function (e) { + function t() { + var t = (null !== e && e.apply(this, arguments)) || this; + return ( + (t._canBeMerged = function (e) { + if (!(e instanceof Ee.a)) return !1; + var t = e; + return !t.isDisposed() && !(!t.isVisible || !t.isEnabled()) && !(t.instances.length > 0) && !t.skeleton && !t.hasLODLevels; + }), + t + ); + } + return ( + Object(h.d)(t, e), + Object.defineProperty(t, "UpdateSelectionTree", { + get: function () { + return t._UpdateSelectionTree; + }, + set: function (e) { + t._UpdateSelectionTree = e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getDescription = function () { + return "Merging similar meshes together"; + }), + (t.prototype.apply = function (e, n, i) { + for (var r = e.meshes.slice(0), o = r.length, a = 0; a < o; a++) { + var s = new Array(), + c = r[a]; + if (this._canBeMerged(c)) { + s.push(c); + for (var l = a + 1; l < o; l++) { + var u = r[l]; + this._canBeMerged(u) && u.material === c.material && u.checkCollisions === c.checkCollisions && (s.push(u), o--, r.splice(l, 1), l--); + } + s.length < 2 || Ee.a.MergeMeshes(s, void 0, !0); + } + } + var h = e; + return h.createOrUpdateSelectionOctree && (null != i ? i && h.createOrUpdateSelectionOctree() : t.UpdateSelectionTree && h.createOrUpdateSelectionOctree()), !0; + }), + (t._UpdateSelectionTree = !1), + t + ); + })(Ed), + kd = (function () { + function e(e, t) { + void 0 === e && (e = 60), void 0 === t && (t = 2e3), (this.targetFrameRate = e), (this.trackerDuration = t), (this.optimizations = new Array()); + } + return ( + (e.prototype.addOptimization = function (e) { + return this.optimizations.push(e), this; + }), + (e.prototype.addCustomOptimization = function (e, t, n) { + void 0 === n && (n = 0); + var i = new wd(n); + return (i.onApply = e), (i.onGetDescription = t), this.optimizations.push(i), this; + }), + (e.LowDegradationAllowed = function (t) { + var n = new e(t), + i = 0; + return n.addOptimization(new Nd(i)), n.addOptimization(new Id(i)), n.addOptimization(new Rd(i)), i++, n.addOptimization(new Dd(i)), n.addOptimization(new Ld(i)), i++, n.addOptimization(new Md(i, 1024)), n; + }), + (e.ModerateDegradationAllowed = function (t) { + var n = new e(t), + i = 0; + return ( + n.addOptimization(new Nd(i)), + n.addOptimization(new Id(i)), + n.addOptimization(new Rd(i)), + i++, + n.addOptimization(new Dd(i)), + n.addOptimization(new Ld(i)), + i++, + n.addOptimization(new Md(i, 512)), + i++, + n.addOptimization(new Fd(i)), + i++, + n.addOptimization(new Ad(i, 2)), + n + ); + }), + (e.HighDegradationAllowed = function (t) { + var n = new e(t), + i = 0; + return ( + n.addOptimization(new Nd(i)), + n.addOptimization(new Id(i)), + n.addOptimization(new Rd(i)), + i++, + n.addOptimization(new Dd(i)), + n.addOptimization(new Ld(i)), + i++, + n.addOptimization(new Md(i, 256)), + i++, + n.addOptimization(new Fd(i)), + i++, + n.addOptimization(new Ad(i, 4)), + n + ); + }), + e + ); + })(), + zd = (function () { + function e(e, t, n, i) { + var r = this; + if ( + (void 0 === n && (n = !0), + void 0 === i && (i = !1), + (this._isRunning = !1), + (this._currentPriorityLevel = 0), + (this._targetFrameRate = 60), + (this._trackerDuration = 2e3), + (this._currentFrameRate = 0), + (this._improvementMode = !1), + (this.onSuccessObservable = new o.c()), + (this.onNewOptimizationAppliedObservable = new o.c()), + (this.onFailureObservable = new o.c()), + (this._options = t || new kd()), + this._options.targetFrameRate && (this._targetFrameRate = this._options.targetFrameRate), + this._options.trackerDuration && (this._trackerDuration = this._options.trackerDuration), + n) + ) + for (var a = 0, s = 0, c = this._options.optimizations; s < c.length; s++) { + c[s].priority = a++; + } + (this._improvementMode = i), + (this._scene = e || E.a.LastCreatedScene), + (this._sceneDisposeObserver = this._scene.onDisposeObservable.add(function () { + (r._sceneDisposeObserver = null), r.dispose(); + })); + } + return ( + Object.defineProperty(e.prototype, "isInImprovementMode", { + get: function () { + return this._improvementMode; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "currentPriorityLevel", { + get: function () { + return this._currentPriorityLevel; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "currentFrameRate", { + get: function () { + return this._currentFrameRate; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "targetFrameRate", { + get: function () { + return this._targetFrameRate; + }, + set: function (e) { + this._targetFrameRate = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "trackerDuration", { + get: function () { + return this._trackerDuration; + }, + set: function (e) { + this._trackerDuration = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "optimizations", { + get: function () { + return this._options.optimizations; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.stop = function () { + this._isRunning = !1; + }), + (e.prototype.reset = function () { + this._currentPriorityLevel = 0; + }), + (e.prototype.start = function () { + var e = this; + this._isRunning || + ((this._isRunning = !0), + this._scene.executeWhenReady(function () { + setTimeout(function () { + e._checkCurrentState(); + }, e._trackerDuration); + })); + }), + (e.prototype._checkCurrentState = function () { + var e = this; + if (this._isRunning) { + var t = this._scene, + n = this._options; + if ( + ((this._currentFrameRate = Math.round(t.getEngine().getFps())), + (this._improvementMode && this._currentFrameRate <= this._targetFrameRate) || (!this._improvementMode && this._currentFrameRate >= this._targetFrameRate)) + ) + return (this._isRunning = !1), void this.onSuccessObservable.notifyObservers(this); + for (var i = !0, r = !0, o = 0; o < n.optimizations.length; o++) { + var a = n.optimizations[o]; + a.priority === this._currentPriorityLevel && ((r = !1), (i = i && a.apply(t, this)), this.onNewOptimizationAppliedObservable.notifyObservers(a)); + } + if (r) return (this._isRunning = !1), void this.onFailureObservable.notifyObservers(this); + i && this._currentPriorityLevel++, + t.executeWhenReady(function () { + setTimeout(function () { + e._checkCurrentState(); + }, e._trackerDuration); + }); + } + }), + (e.prototype.dispose = function () { + this.stop(), + this.onSuccessObservable.clear(), + this.onFailureObservable.clear(), + this.onNewOptimizationAppliedObservable.clear(), + this._sceneDisposeObserver && this._scene.onDisposeObservable.remove(this._sceneDisposeObserver); + }), + (e.OptimizeAsync = function (t, n, i, r) { + var o = new e(t, n || kd.ModerateDegradationAllowed(), !1); + return ( + i && + o.onSuccessObservable.add(function () { + i(); + }), + r && + o.onFailureObservable.add(function () { + r(); + }), + o.start(), + o + ); + }), + e + ); + })(), + jd = [], + Bd = function (e, t) { + jd[e.id] || e.doNotSerialize || (t.vertexData.push(e.serializeVerticeData()), (jd[e.id] = !0)); + }, + Vd = function (e, t) { + var n = {}, + i = e._geometry; + return i && (e.getScene().getGeometryByID(i.id) || Bd(i, t.geometries)), e.serialize && e.serialize(n), n; + }, + Gd = (function () { + function e() {} + return ( + (e.ClearCache = function () { + jd = []; + }), + (e.Serialize = function (t) { + var n, + i, + r, + o = {}; + if ( + (e.ClearCache(), + (o.useDelayedTextureLoading = t.useDelayedTextureLoading), + (o.autoClear = t.autoClear), + (o.clearColor = t.clearColor.asArray()), + (o.ambientColor = t.ambientColor.asArray()), + (o.gravity = t.gravity.asArray()), + (o.collisionsEnabled = t.collisionsEnabled), + t.fogMode && 0 !== t.fogMode && ((o.fogMode = t.fogMode), (o.fogColor = t.fogColor.asArray()), (o.fogStart = t.fogStart), (o.fogEnd = t.fogEnd), (o.fogDensity = t.fogDensity)), + t.isPhysicsEnabled()) + ) { + var a = t.getPhysicsEngine(); + a && ((o.physicsEnabled = !0), (o.physicsGravity = a.gravity.asArray()), (o.physicsEngine = a.getPhysicsPluginName())); + } + t.metadata && (o.metadata = t.metadata), (o.morphTargetManagers = []); + for (var s = 0, c = t.meshes; s < c.length; s++) { + var l = (_ = c[s]).morphTargetManager; + l && o.morphTargetManagers.push(l.serialize()); + } + for (o.lights = [], n = 0; n < t.lights.length; n++) (i = t.lights[n]).doNotSerialize || o.lights.push(i.serialize()); + for (o.cameras = [], n = 0; n < t.cameras.length; n++) { + var u = t.cameras[n]; + u.doNotSerialize || o.cameras.push(u.serialize()); + } + if ((t.activeCamera && (o.activeCameraID = t.activeCamera.id), He.a.AppendSerializedAnimations(t, o), t.animationGroups && t.animationGroups.length > 0)) { + o.animationGroups = []; + for (var h = 0; h < t.animationGroups.length; h++) { + var d = t.animationGroups[h]; + o.animationGroups.push(d.serialize()); + } + } + if (t.reflectionProbes && t.reflectionProbes.length > 0) + for (o.reflectionProbes = [], n = 0; n < t.reflectionProbes.length; n++) { + var p = t.reflectionProbes[n]; + o.reflectionProbes.push(p.serialize()); + } + for (o.materials = [], o.multiMaterials = [], n = 0; n < t.materials.length; n++) (r = t.materials[n]).doNotSerialize || o.materials.push(r.serialize()); + for (o.multiMaterials = [], n = 0; n < t.multiMaterials.length; n++) { + var f = t.multiMaterials[n]; + o.multiMaterials.push(f.serialize()); + } + for (t.environmentTexture && (o.environmentTexture = t.environmentTexture.name), o.environmentIntensity = t.environmentIntensity, o.skeletons = [], n = 0; n < t.skeletons.length; n++) { + var m = t.skeletons[n]; + m.doNotSerialize || o.skeletons.push(m.serialize()); + } + for (o.transformNodes = [], n = 0; n < t.transformNodes.length; n++) t.transformNodes[n].doNotSerialize || o.transformNodes.push(t.transformNodes[n].serialize()); + (o.geometries = {}), + (o.geometries.boxes = []), + (o.geometries.spheres = []), + (o.geometries.cylinders = []), + (o.geometries.toruses = []), + (o.geometries.grounds = []), + (o.geometries.planes = []), + (o.geometries.torusKnots = []), + (o.geometries.vertexData = []), + (jd = []); + var g = t.getGeometries(); + for (n = 0; n < g.length; n++) { + var b = g[n]; + b.isReady() && Bd(b, o.geometries); + } + for (o.meshes = [], n = 0; n < t.meshes.length; n++) { + var _; + if ((_ = t.meshes[n]) instanceof Ee.a) { + var v = _; + v.doNotSerialize || (1 !== v.delayLoadState && 0 !== v.delayLoadState) || o.meshes.push(Vd(v, o)); + } + } + for (o.particleSystems = [], n = 0; n < t.particleSystems.length; n++) o.particleSystems.push(t.particleSystems[n].serialize()); + t.actionManager && (o.actions = t.actionManager.serialize("scene")); + for (var y = 0, C = t._serializableComponents; y < C.length; y++) { + C[y].serialize(o); + } + return o; + }), + (e.SerializeMesh = function (t, n, i) { + void 0 === n && (n = !1), void 0 === i && (i = !1); + var r = {}; + if ((e.ClearCache(), (t = t instanceof Array ? t : [t]), n || i)) + for (var o = 0; o < t.length; ++o) + i && + t[o].getDescendants().forEach(function (e) { + e instanceof Ee.a && t.indexOf(e) < 0 && !e.doNotSerialize && t.push(e); + }), + n && t[o].parent && t.indexOf(t[o].parent) < 0 && !t[o].parent.doNotSerialize && t.push(t[o].parent); + return ( + t.forEach(function (e) { + !(function (e, t) { + if (1 === e.delayLoadState || 0 === e.delayLoadState) { + if (e.material && !e.material.doNotSerialize) + if (e.material instanceof Ta.a) { + if ( + ((t.multiMaterials = t.multiMaterials || []), + (t.materials = t.materials || []), + !t.multiMaterials.some(function (t) { + return t.id === e.material.id; + })) + ) { + t.multiMaterials.push(e.material.serialize()); + for ( + var n = function (e) { + e && + (t.materials.some(function (t) { + return t.id === e.id; + }) || + t.materials.push(e.serialize())); + }, + i = 0, + r = e.material.subMaterials; + i < r.length; + i++ + ) { + n(r[i]); + } + } + } else + (t.materials = t.materials || []), + t.materials.some(function (t) { + return t.id === e.material.id; + }) || t.materials.push(e.material.serialize()); + var o = e._geometry; + o && + (t.geometries || + ((t.geometries = {}), + (t.geometries.boxes = []), + (t.geometries.spheres = []), + (t.geometries.cylinders = []), + (t.geometries.toruses = []), + (t.geometries.grounds = []), + (t.geometries.planes = []), + (t.geometries.torusKnots = []), + (t.geometries.vertexData = [])), + Bd(o, t.geometries)), + e.skeleton && !e.skeleton.doNotSerialize && ((t.skeletons = t.skeletons || []), t.skeletons.push(e.skeleton.serialize())), + (t.meshes = t.meshes || []), + t.meshes.push(Vd(e, t)); + } + })(e, r); + }), + r + ); + }), + e + ); + })(), + Ud = n(45), + Hd = n(168), + Wd = (function () { + function e(t, n) { + if ((void 0 === n && (n = null), !e.IsSupported(t))) throw "Your browser does not support recording so far."; + var i = t.getRenderingCanvas(); + if (!i) throw "The babylon engine must have a canvas to be recorded"; + (this._canvas = i), (this._canvas.isRecording = !1), (this._options = Object(h.a)(Object(h.a)({}, e._defaultOptions), n)); + var r = this._canvas.captureStream(this._options.fps); + if (this._options.audioTracks) + for (var o = 0, a = this._options.audioTracks; o < a.length; o++) { + var s = a[o]; + r.addTrack(s); + } + (this._mediaRecorder = new MediaRecorder(r, { mimeType: this._options.mimeType })), + (this._mediaRecorder.ondataavailable = this._handleDataAvailable.bind(this)), + (this._mediaRecorder.onerror = this._handleError.bind(this)), + (this._mediaRecorder.onstop = this._handleStop.bind(this)); + } + return ( + (e.IsSupported = function (e) { + var t = e.getRenderingCanvas(); + return !!t && "function" == typeof t.captureStream; + }), + Object.defineProperty(e.prototype, "isRecording", { + get: function () { + return !!this._canvas && this._canvas.isRecording; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.stopRecording = function () { + this._canvas && this._mediaRecorder && this.isRecording && ((this._canvas.isRecording = !1), this._mediaRecorder.stop()); + }), + (e.prototype.startRecording = function (e, t) { + var n = this; + if ((void 0 === e && (e = "babylonjs.webm"), void 0 === t && (t = 7), !this._canvas || !this._mediaRecorder)) throw "Recorder has already been disposed"; + if (this.isRecording) throw "Recording already in progress"; + return ( + t > 0 && + setTimeout(function () { + n.stopRecording(); + }, 1e3 * t), + (this._fileName = e), + (this._recordedChunks = []), + (this._resolve = null), + (this._reject = null), + (this._canvas.isRecording = !0), + this._mediaRecorder.start(this._options.recordChunckSize), + new Promise(function (e, t) { + (n._resolve = e), (n._reject = t); + }) + ); + }), + (e.prototype.dispose = function () { + (this._canvas = null), (this._mediaRecorder = null), (this._recordedChunks = []), (this._fileName = null), (this._resolve = null), (this._reject = null); + }), + (e.prototype._handleDataAvailable = function (e) { + e.data.size > 0 && this._recordedChunks.push(e.data); + }), + (e.prototype._handleError = function (e) { + if ((this.stopRecording(), !this._reject)) throw new e.error(); + this._reject(e.error); + }), + (e.prototype._handleStop = function () { + this.stopRecording(); + var e = new Blob(this._recordedChunks); + this._resolve && this._resolve(e), window.URL.createObjectURL(e), this._fileName && $e.b.Download(e, this._fileName); + }), + (e._defaultOptions = { mimeType: "video/webm", fps: 25, recordChunckSize: 3e3 }), + e + ); + })(), + Xd = n(202), + Yd = (function () { + function e() {} + return ( + (e.CreateScreenshot = function (t, n, i, r, o) { + void 0 === o && (o = "image/png"); + var a = e._getScreenshotSize(t, n, i), + s = a.height, + c = a.width; + if (s && c) { + $e.b._ScreenshotCanvas || ($e.b._ScreenshotCanvas = document.createElement("canvas")), ($e.b._ScreenshotCanvas.width = c), ($e.b._ScreenshotCanvas.height = s); + var l = $e.b._ScreenshotCanvas.getContext("2d"), + u = t.getRenderWidth() / t.getRenderHeight(), + h = c, + d = h / u; + d > s && (h = (d = s) * u); + var p = Math.max(0, c - h) / 2, + f = Math.max(0, s - d) / 2, + m = t.getRenderingCanvas(); + l && m && l.drawImage(m, p, f, h, d), $e.b.EncodeScreenshotCanvasData(r, o); + } else g.a.Error("Invalid 'size' parameter !"); + }), + (e.CreateScreenshotAsync = function (t, n, i, r) { + return ( + void 0 === r && (r = "image/png"), + new Promise(function (o, a) { + e.CreateScreenshot( + t, + n, + i, + function (e) { + void 0 !== e ? o(e) : a(new Error("Data is undefined")); + }, + r + ); + }) + ); + }), + (e.CreateScreenshotUsingRenderTarget = function (t, n, i, r, o, a, s, c, l) { + void 0 === o && (o = "image/png"), void 0 === a && (a = 1), void 0 === s && (s = !1), void 0 === l && (l = !1); + var u = e._getScreenshotSize(t, n, i), + h = u.height, + d = u.width, + p = { width: d, height: h }; + if (h && d) { + var f = n.getScene(), + m = null; + f.activeCamera !== n && ((m = f.activeCamera), (f.activeCamera = n)); + var b = t.getRenderingCanvas(); + if (b) { + var _ = { width: b.width, height: b.height }; + t.setSize(d, h), f.render(); + var v = new mn.a("screenShot", p, f, !1, !1, 0, !1, ln.a.NEAREST_SAMPLINGMODE); + (v.renderList = null), + (v.samples = a), + (v.renderSprites = l), + v.onAfterRenderObservable.add(function () { + $e.b.DumpFramebuffer(d, h, t, r, o, c); + }); + var y = function () { + f.incrementRenderId(), f.resetCachedMaterial(), v.render(!0), v.dispose(), m && (f.activeCamera = m), t.setSize(_.width, _.height), n.getProjectionMatrix(!0); + }; + if (s) { + var C = new th("antialiasing", 1, f.activeCamera); + v.addPostProcess(C), + C.getEffect().isReady() + ? y() + : (C.getEffect().onCompiled = function () { + y(); + }); + } else y(); + } else g.a.Error("No rendering canvas found !"); + } else g.a.Error("Invalid 'size' parameter !"); + }), + (e.CreateScreenshotUsingRenderTargetAsync = function (t, n, i, r, o, a, s, c) { + return ( + void 0 === r && (r = "image/png"), + void 0 === o && (o = 1), + void 0 === a && (a = !1), + void 0 === c && (c = !1), + new Promise(function (l, u) { + e.CreateScreenshotUsingRenderTarget( + t, + n, + i, + function (e) { + void 0 !== e ? l(e) : u(new Error("Data is undefined")); + }, + r, + o, + a, + s, + c + ); + }) + ); + }), + (e._getScreenshotSize = function (e, t, n) { + var i = 0, + r = 0; + if ("object" == typeof n) { + var o = n.precision ? Math.abs(n.precision) : 1; + n.width && n.height + ? ((i = n.height * o), (r = n.width * o)) + : n.width && !n.height + ? ((r = n.width * o), (i = Math.round(r / e.getAspectRatio(t)))) + : n.height && !n.width + ? ((i = n.height * o), (r = Math.round(i * e.getAspectRatio(t)))) + : ((r = Math.round(e.getRenderWidth() * o)), (i = Math.round(r / e.getAspectRatio(t)))); + } else isNaN(n) || ((i = n), (r = n)); + return r && (r = Math.floor(r)), i && (i = Math.floor(i)), { height: 0 | i, width: 0 | r }; + }), + e + ); + })(); + ($e.b.CreateScreenshot = Yd.CreateScreenshot), + ($e.b.CreateScreenshotAsync = Yd.CreateScreenshotAsync), + ($e.b.CreateScreenshotUsingRenderTarget = Yd.CreateScreenshotUsingRenderTarget), + ($e.b.CreateScreenshotUsingRenderTargetAsync = Yd.CreateScreenshotUsingRenderTargetAsync), + (function (e) { + (e[(e.Checkbox = 0)] = "Checkbox"), (e[(e.Slider = 1)] = "Slider"), (e[(e.Vector3 = 2)] = "Vector3"), (e[(e.Quaternion = 3)] = "Quaternion"), (e[(e.Color3 = 4)] = "Color3"), (e[(e.String = 5)] = "String"); + })(ld || (ld = {})); + var Kd = n(158), + Zd = n(197), + qd = n(181), + Qd = n(74), + Jd = n(163), + $d = (function (e) { + function t(n, i) { + void 0 === i && (i = {}); + var r = e.call(this, n) || this; + return ( + (r.options = i), + (r._direction = new a.e(0, 0, -1)), + (r._mat = new a.a()), + (r._onSelectEnabled = !1), + (r._origin = new a.e(0, 0, 0)), + (r.lastNativeXRHitResults = []), + (r.onHitTestResultObservable = new o.c()), + (r._onHitTestResults = function (e) { + var t = e.map(function (e) { + var t = a.a.FromArray(e.hitMatrix); + return ( + r._xrSessionManager.scene.useRightHandedSystem || t.toggleModelMatrixHandInPlace(), + r.options.worldParentNode && t.multiplyToRef(r.options.worldParentNode.getWorldMatrix(), t), + { xrHitResult: e, transformationMatrix: t } + ); + }); + (r.lastNativeXRHitResults = e), r.onHitTestResultObservable.notifyObservers(t); + }), + (r._onSelect = function (e) { + r._onSelectEnabled && t.XRHitTestWithSelectEvent(e, r._xrSessionManager.referenceSpace); + }), + r + ); + } + return ( + Object(h.d)(t, e), + (t.XRHitTestWithRay = function (e, t, n, i) { + return e.requestHitTest(t, n).then(function (e) { + var t = + i || + function (e) { + return !!e.hitMatrix; + }; + return e.filter(t); + }); + }), + (t.XRHitTestWithSelectEvent = function (e, t) { + var n = e.frame.getPose(e.inputSource.targetRaySpace, t); + if (!n) return Promise.resolve([]); + var i = new XRRay(n.transform); + return this.XRHitTestWithRay(e.frame.session, i, t); + }), + (t.prototype.attach = function () { + return !!e.prototype.attach.call(this) && (this.options.testOnPointerDownOnly && this._xrSessionManager.session.addEventListener("select", this._onSelect, !1), !0); + }), + (t.prototype.detach = function () { + return !!e.prototype.detach.call(this) && ((this._onSelectEnabled = !1), this._xrSessionManager.session.removeEventListener("select", this._onSelect), !0); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onHitTestResultObservable.clear(); + }), + (t.prototype._onXRFrame = function (e) { + if (this.attached && !this.options.testOnPointerDownOnly) { + var n = e.getViewerPose(this._xrSessionManager.referenceSpace); + if (n) { + a.a.FromArrayToRef(n.transform.matrix, 0, this._mat), + a.e.TransformCoordinatesFromFloatsToRef(0, 0, 0, this._mat, this._origin), + a.e.TransformCoordinatesFromFloatsToRef(0, 0, -1, this._mat, this._direction), + this._direction.subtractInPlace(this._origin), + this._direction.normalize(); + var i = new XRRay({ x: this._origin.x, y: this._origin.y, z: this._origin.z, w: 0 }, { x: this._direction.x, y: this._direction.y, z: this._direction.z, w: 0 }); + t.XRHitTestWithRay(this._xrSessionManager.session, i, this._xrSessionManager.referenceSpace).then(this._onHitTestResults); + } + } + }), + (t.Name = ao.HIT_TEST), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + $d.Name, + function (e, t) { + return function () { + return new $d(e, t); + }; + }, + $d.Version, + !0 + ); + var ep = 0, + tp = (function (e) { + function t(t, n) { + void 0 === n && (n = {}); + var i = e.call(this, t) || this; + return ( + (i._options = n), + (i._enabled = !1), + (i._lastFrameDetected = new Set()), + (i._onSelect = function (e) { + if (i._options.addAnchorOnSelect) { + var t = function (e) { + if (e.length) { + var t = e[0], + n = new XRRigidTransform(t.hitMatrix); + i.addAnchorAtRigidTransformation(n); + } + }; + i._hitTestModule && !i._hitTestModule.options.testOnPointerDownOnly && t(i._hitTestModule.lastNativeXRHitResults), $d.XRHitTestWithSelectEvent(e, i._xrSessionManager.referenceSpace).then(t), i._planeDetector; + } + }), + (i._trackedAnchors = []), + (i.onAnchorAddedObservable = new o.c()), + (i.onAnchorRemovedObservable = new o.c()), + (i.onAnchorUpdatedObservable = new o.c()), + i + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.addAnchorAtRigidTransformation = function (e, t) { + return (t || this._xrSessionManager.session).createAnchor(e, this._xrSessionManager.referenceSpace); + }), + (t.prototype.attach = function () { + return !!e.prototype.attach.call(this) && (this._options.addAnchorOnSelect && this._xrSessionManager.session.addEventListener("select", this._onSelect, !1), !0); + }), + (t.prototype.detach = function () { + return !!e.prototype.detach.call(this) && (this._xrSessionManager.session.removeEventListener("select", this._onSelect), !0); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onAnchorAddedObservable.clear(), this.onAnchorRemovedObservable.clear(), this.onAnchorUpdatedObservable.clear(); + }), + (t.prototype.setHitTestModule = function (e) { + this._hitTestModule = e; + }), + (t.prototype.setPlaneDetector = function (e, t) { + void 0 === t && (t = !0), (this._planeDetector = e), (this._options.usePlaneDetection = t); + }), + (t.prototype._onXRFrame = function (e) { + var t = this; + if (this.attached && this._enabled && e) { + var n = e.trackedAnchors; + n && + n.size && + (this._trackedAnchors + .filter(function (e) { + return !n.has(e.xrAnchor); + }) + .map(function (e) { + var n = t._trackedAnchors.indexOf(e); + t._trackedAnchors.splice(n, 1), t.onAnchorRemovedObservable.notifyObservers(e); + }), + n.forEach(function (n) { + if (t._lastFrameDetected.has(n)) { + if (n.lastChangedTime === t._xrSessionManager.currentTimestamp) { + var i = t._findIndexInAnchorArray(n), + r = t._trackedAnchors[i]; + t._updateAnchorWithXRFrame(n, r, e), t.onAnchorUpdatedObservable.notifyObservers(r); + } + } else { + var o = { id: ep++, xrAnchor: n }, + a = t._updateAnchorWithXRFrame(n, o, e); + t._trackedAnchors.push(a), t.onAnchorAddedObservable.notifyObservers(a); + } + }), + (this._lastFrameDetected = n)); + } + }), + (t.prototype._findIndexInAnchorArray = function (e) { + for (var t = 0; t < this._trackedAnchors.length; ++t) if (this._trackedAnchors[t].xrAnchor === e) return t; + return -1; + }), + (t.prototype._updateAnchorWithXRFrame = function (e, t, n) { + var i = n.getPose(e.anchorSpace, this._xrSessionManager.referenceSpace); + if (i) { + var r = t.transformationMatrix || new a.a(); + a.a.FromArrayToRef(i.transform.matrix, 0, r), + this._xrSessionManager.scene.useRightHandedSystem || r.toggleModelMatrixHandInPlace(), + (t.transformationMatrix = r), + this._options.worldParentNode && r.multiplyToRef(this._options.worldParentNode.getWorldMatrix(), r); + } + return t; + }), + (t.Name = ao.ANCHOR_SYSTEM), + (t.Version = 1), + t + ); + })(vo), + np = 0, + ip = (function (e) { + function t(t, n) { + void 0 === n && (n = {}); + var i = e.call(this, t) || this; + return ( + (i._options = n), + (i._detectedPlanes = []), + (i._enabled = !1), + (i._lastFrameDetected = new Set()), + (i.onPlaneAddedObservable = new o.c()), + (i.onPlaneRemovedObservable = new o.c()), + (i.onPlaneUpdatedObservable = new o.c()), + i._xrSessionManager.session + ? i._init() + : i._xrSessionManager.onXRSessionInit.addOnce(function () { + i._init(); + }), + i + ); + } + return ( + Object(h.d)(t, e), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onPlaneAddedObservable.clear(), this.onPlaneRemovedObservable.clear(), this.onPlaneUpdatedObservable.clear(); + }), + (t.prototype._onXRFrame = function (e) { + var t = this; + if (this.attached && this._enabled && e) { + var n = e.worldInformation.detectedPlanes; + n && + n.size && + (this._detectedPlanes + .filter(function (e) { + return !n.has(e.xrPlane); + }) + .map(function (e) { + var n = t._detectedPlanes.indexOf(e); + t._detectedPlanes.splice(n, 1), t.onPlaneRemovedObservable.notifyObservers(e); + }), + n.forEach(function (n) { + if (t._lastFrameDetected.has(n)) { + if (n.lastChangedTime === t._xrSessionManager.currentTimestamp) { + var i = t.findIndexInPlaneArray(n); + o = t._detectedPlanes[i]; + t._updatePlaneWithXRPlane(n, o, e), t.onPlaneUpdatedObservable.notifyObservers(o); + } + } else { + var r = { id: np++, xrPlane: n, polygonDefinition: [] }, + o = t._updatePlaneWithXRPlane(n, r, e); + t._detectedPlanes.push(o), t.onPlaneAddedObservable.notifyObservers(o); + } + }), + (this._lastFrameDetected = n)); + } + }), + (t.prototype._init = function () { + this._xrSessionManager.session.updateWorldTrackingState && + (this._xrSessionManager.session.updateWorldTrackingState({ planeDetectionState: { enabled: !0 } }), (this._enabled = !0), this._detectedPlanes.length && (this._detectedPlanes = [])); + }), + (t.prototype._updatePlaneWithXRPlane = function (e, t, n) { + var i = this; + t.polygonDefinition = e.polygon.map(function (e) { + var t = i._xrSessionManager.scene.useRightHandedSystem ? 1 : -1; + return new a.e(e.x, e.y, e.z * t); + }); + var r = n.getPose(e.planeSpace, this._xrSessionManager.referenceSpace); + if (r) { + var o = t.transformationMatrix || new a.a(); + a.a.FromArrayToRef(r.transform.matrix, 0, o), + this._xrSessionManager.scene.useRightHandedSystem || o.toggleModelMatrixHandInPlace(), + (t.transformationMatrix = o), + this._options.worldParentNode && o.multiplyToRef(this._options.worldParentNode.getWorldMatrix(), o); + } + return t; + }), + (t.prototype.findIndexInPlaneArray = function (e) { + for (var t = 0; t < this._detectedPlanes.length; ++t) if (this._detectedPlanes[t].xrPlane === e) return t; + return -1; + }), + (t.Name = ao.PLANE_DETECTION), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + ip.Name, + function (e, t) { + return function () { + return new ip(e, t); + }; + }, + ip.Version + ); + var rp = (function (e) { + function t(t, n) { + void 0 === n && (n = {}); + var i = e.call(this, t) || this; + return (i.options = n), (i.onBackgroundStateChangedObservable = new o.c()), i; + } + return ( + Object(h.d)(t, e), + (t.prototype.attach = function () { + return this._setBackgroundState(!1), e.prototype.attach.call(this); + }), + (t.prototype.detach = function () { + return this._setBackgroundState(!0), e.prototype.detach.call(this); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this.onBackgroundStateChangedObservable.clear(); + }), + (t.prototype._onXRFrame = function (e) {}), + (t.prototype._setBackgroundState = function (e) { + var t = this._xrSessionManager.scene; + if (!this.options.ignoreEnvironmentHelper) + if (this.options.environmentHelperRemovalFlags) { + if (this.options.environmentHelperRemovalFlags.skyBox) { + var n = t.getMeshByName("BackgroundSkybox"); + n && n.setEnabled(e); + } + if (this.options.environmentHelperRemovalFlags.ground) { + var i = t.getMeshByName("BackgroundPlane"); + i && i.setEnabled(e); + } + } else { + var r = t.getMeshByName("BackgroundHelper"); + r && r.setEnabled(e); + } + this.options.backgroundMeshes && + this.options.backgroundMeshes.forEach(function (t) { + return t.setEnabled(e); + }), + this.onBackgroundStateChangedObservable.notifyObservers(e); + }), + (t.Name = ao.BACKGROUND_REMOVER), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + rp.Name, + function (e, t) { + return function () { + return new rp(e, t); + }; + }, + rp.Version, + !0 + ); + var op = function () {}, + ap = (function (e) { + function t(t, n) { + var i = e.call(this, t) || this; + return ( + (i._options = n), + (i._attachController = function (e) { + if (!i._controllers[e.uniqueId]) + if ((i._xrSessionManager.scene.isPhysicsEnabled() || g.a.Warn("physics engine not enabled, skipped. Please add this controller manually."), i._options.physicsProperties.useControllerMesh)) + e.onMotionControllerInitObservable.addOnce(function (t) { + t.onModelLoadedObservable.addOnce(function () { + var n = new Ci(t.rootMesh, Ci.MeshImpostor, Object(h.a)({ mass: 0 }, i._options.physicsProperties)), + r = e.grip || e.pointer; + i._controllers[e.uniqueId] = { xrController: e, impostor: n, oldPos: r.position.clone(), oldRotation: r.rotationQuaternion.clone() }; + }); + }); + else { + var t = i._options.physicsProperties.impostorType || Ci.SphereImpostor, + n = i._options.physicsProperties.impostorSize || 0.1, + r = mi.CreateSphere("impostor-mesh-" + e.uniqueId, { diameterX: "number" == typeof n ? n : n.width, diameterY: "number" == typeof n ? n : n.height, diameterZ: "number" == typeof n ? n : n.depth }); + (r.isVisible = i._debugMode), (r.isPickable = !1), (r.rotationQuaternion = new a.b()); + var o = e.grip || e.pointer; + r.position.copyFrom(o.position), r.rotationQuaternion.copyFrom(o.rotationQuaternion); + var s = new Ci(r, t, Object(h.a)({ mass: 0 }, i._options.physicsProperties)); + i._controllers[e.uniqueId] = { xrController: e, impostor: s, impostorMesh: r }; + } + }), + (i._controllers = {}), + (i._debugMode = !1), + (i._delta = 0), + (i._lastTimestamp = 0), + (i._tmpQuaternion = new a.b()), + (i._tmpVector = new a.e()), + i._options.physicsProperties || (i._options.physicsProperties = {}), + i + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._enablePhysicsDebug = function () { + var e = this; + (this._debugMode = !0), + Object.keys(this._controllers).forEach(function (t) { + var n = e._controllers[t]; + n.impostorMesh && (n.impostorMesh.isVisible = !0); + }); + }), + (t.prototype.addController = function (e) { + this._attachController(e); + }), + (t.prototype.attach = function () { + var t = this; + if (!e.prototype.attach.call(this)) return !1; + if (!this._options.xrInput) return !0; + if ( + (this._options.xrInput.controllers.forEach(this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable, this._attachController), + this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable, function (e) { + t._detachController(e.uniqueId); + }), + this._options.enableHeadsetImpostor) + ) { + var n = this._options.headsetImpostorParams || { impostorType: Ci.SphereImpostor, restitution: 0.8, impostorSize: 0.3 }, + i = n.impostorSize || 0.3; + (this._headsetMesh = mi.CreateSphere("headset-mesh", { diameterX: "number" == typeof i ? i : i.width, diameterY: "number" == typeof i ? i : i.height, diameterZ: "number" == typeof i ? i : i.depth })), + (this._headsetMesh.rotationQuaternion = new a.b()), + (this._headsetMesh.isVisible = !1), + (this._headsetImpostor = new Ci(this._headsetMesh, n.impostorType, Object(h.a)({ mass: 0 }, n))); + } + return !0; + }), + (t.prototype.detach = function () { + var t = this; + return ( + !!e.prototype.detach.call(this) && + (Object.keys(this._controllers).forEach(function (e) { + t._detachController(e); + }), + this._headsetMesh && this._headsetMesh.dispose(), + !0) + ); + }), + (t.prototype.getHeadsetImpostor = function () { + return this._headsetImpostor; + }), + (t.prototype.getImpostorForController = function (e) { + var t = "string" == typeof e ? e : e.uniqueId; + return this._controllers[t] ? this._controllers[t].impostor : null; + }), + (t.prototype.setPhysicsProperties = function (e) { + this._options.physicsProperties = Object(h.a)(Object(h.a)({}, this._options.physicsProperties), e); + }), + (t.prototype._onXRFrame = function (e) { + var t = this; + (this._delta = this._xrSessionManager.currentTimestamp - this._lastTimestamp), + (this._lastTimestamp = this._xrSessionManager.currentTimestamp), + this._headsetMesh && (this._headsetMesh.position.copyFrom(this._options.xrInput.xrCamera.position), this._headsetMesh.rotationQuaternion.copyFrom(this._options.xrInput.xrCamera.rotationQuaternion)), + Object.keys(this._controllers).forEach(function (e) { + var n = t._controllers[e], + i = n.xrController.grip || n.xrController.pointer, + r = n.oldPos || n.impostorMesh.position, + o = n.oldRotation || n.impostorMesh.rotationQuaternion; + if ((i.position.subtractToRef(r, t._tmpVector), t._tmpVector.scaleInPlace(1e3 / t._delta), n.impostor.setLinearVelocity(t._tmpVector), t._debugMode, !o.equalsWithEpsilon(i.rotationQuaternion))) { + o.conjugateInPlace().multiplyToRef(i.rotationQuaternion, t._tmpQuaternion); + var a = Math.sqrt(t._tmpQuaternion.x * t._tmpQuaternion.x + t._tmpQuaternion.y * t._tmpQuaternion.y + t._tmpQuaternion.z * t._tmpQuaternion.z); + if ((t._tmpVector.set(t._tmpQuaternion.x, t._tmpQuaternion.y, t._tmpQuaternion.z), a < 0.001)) t._tmpVector.scaleInPlace(2); + else { + var s = 2 * Math.atan2(a, t._tmpQuaternion.w); + t._tmpVector.scaleInPlace(s / (a * (t._delta / 1e3))); + } + n.impostor.setAngularVelocity(t._tmpVector), t._debugMode; + } + r.copyFrom(i.position), o.copyFrom(i.rotationQuaternion); + }); + }), + (t.prototype._detachController = function (e) { + var t = this._controllers[e]; + t && (t.impostorMesh && t.impostorMesh.dispose(), delete this._controllers[e]); + }), + (t.Name = ao.PHYSICS_CONTROLLERS), + (t.Version = 1), + t + ); + })(vo); + so.AddWebXRFeature( + ap.Name, + function (e, t) { + return function () { + return new ap(e, t); + }; + }, + ap.Version, + !0 + ); + var sp = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, cp["left-right"], n, i) || this; + return ( + (r._mapping = { + defaultButton: { valueNodeName: "VALUE", unpressedNodeName: "UNPRESSED", pressedNodeName: "PRESSED" }, + defaultAxis: { valueNodeName: "VALUE", minNodeName: "MIN", maxNodeName: "MAX" }, + buttons: { + "xr-standard-trigger": { rootNodeName: "SELECT", componentProperty: "button", states: ["default", "touched", "pressed"] }, + "xr-standard-squeeze": { rootNodeName: "GRASP", componentProperty: "state", states: ["pressed"] }, + "xr-standard-touchpad": { rootNodeName: "TOUCHPAD_PRESS", labelAnchorNodeName: "squeeze-label", touchPointNodeName: "TOUCH" }, + "xr-standard-thumbstick": { rootNodeName: "THUMBSTICK_PRESS", componentProperty: "state", states: ["pressed"] }, + }, + axes: { + "xr-standard-touchpad": { "x-axis": { rootNodeName: "TOUCHPAD_TOUCH_X" }, "y-axis": { rootNodeName: "TOUCHPAD_TOUCH_Y" } }, + "xr-standard-thumbstick": { "x-axis": { rootNodeName: "THUMBSTICK_X" }, "y-axis": { rootNodeName: "THUMBSTICK_Y" } }, + }, + }), + (r.profileId = "microsoft-mixed-reality"), + r + ); + } + return ( + Object(h.d)(t, e), + (t.prototype._getFilenameAndPath = function () { + return { filename: "left" === this.handness ? t.MODEL_LEFT_FILENAME : t.MODEL_RIGHT_FILENAME, path: t.MODEL_BASE_URL + "default/" }; + }), + (t.prototype._getModelLoadingConstraints = function () { + var e = $i.a.IsPluginForExtensionAvailable(".glb"); + return e || g.a.Warn("glTF / glb loaded was not registered, using generic controller instead"), e; + }), + (t.prototype._processLoadedModel = function (e) { + var t = this; + this.rootMesh && + (this.getComponentIds().forEach(function (e, n) { + if (!t.disableAnimation && e && t.rootMesh) { + var i = t._mapping.buttons[e], + r = i.rootNodeName; + if (!r) return void g.a.Log("Skipping unknown button at index: " + n + " with mapped name: " + e); + var o = t._getChildByName(t.rootMesh, r); + if (!o) return void g.a.Warn("Missing button mesh with name: " + r); + if ( + ((i.valueMesh = t._getImmediateChildByName(o, t._mapping.defaultButton.valueNodeName)), + (i.pressedMesh = t._getImmediateChildByName(o, t._mapping.defaultButton.pressedNodeName)), + (i.unpressedMesh = t._getImmediateChildByName(o, t._mapping.defaultButton.unpressedNodeName)), + i.valueMesh && i.pressedMesh && i.unpressedMesh) + ) { + var a = t.getComponent(e); + a && + a.onButtonStateChangedObservable.add( + function (e) { + t._lerpTransform(i, e.value); + }, + void 0, + !0 + ); + } else g.a.Warn("Missing button submesh under mesh with name: " + r); + } + }), + this.getComponentIds().forEach(function (e, n) { + var i = t.getComponent(e); + i.isAxes() && + ["x-axis", "y-axis"].forEach(function (n) { + if (t.rootMesh) { + var r = t._mapping.axes[e][n], + o = t._getChildByName(t.rootMesh, r.rootNodeName); + o + ? ((r.valueMesh = t._getImmediateChildByName(o, t._mapping.defaultAxis.valueNodeName)), + (r.minMesh = t._getImmediateChildByName(o, t._mapping.defaultAxis.minNodeName)), + (r.maxMesh = t._getImmediateChildByName(o, t._mapping.defaultAxis.maxNodeName)), + r.valueMesh && r.minMesh && r.maxMesh + ? i && + i.onAxisValueChangedObservable.add( + function (e) { + var i = "x-axis" === n ? e.x : e.y; + t._lerpTransform(r, i, !0); + }, + void 0, + !0 + ) + : g.a.Warn("Missing axis submesh under mesh with name: " + r.rootNodeName)) + : g.a.Warn("Missing axis mesh with name: " + r.rootNodeName); + } + }); + })); + }), + (t.prototype._setRootMesh = function (e) { + var t; + (this.rootMesh = new Ee.a(this.profileId + " " + this.handness, this.scene)), (this.rootMesh.isPickable = !1); + for (var n = 0; n < e.length; n++) { + var i = e[n]; + (i.isPickable = !1), i.parent || (t = i); + } + t && t.setParent(this.rootMesh), (this.rootMesh.rotationQuaternion = a.b.FromEulerAngles(0, Math.PI, 0)); + }), + (t.prototype._updateModel = function () {}), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/microsoft/"), + (t.MODEL_LEFT_FILENAME = "left.glb"), + (t.MODEL_RIGHT_FILENAME = "right.glb"), + t + ); + })(uo); + mo.RegisterController("windows-mixed-reality", function (e, t) { + return new sp(t, e.gamepad, e.handedness); + }); + var cp = { + left: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { + type: "trigger", + gamepadIndices: { button: 0 }, + rootNodeName: "xr_standard_trigger", + visualResponses: { + xr_standard_trigger_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_trigger_pressed_value", + minNodeName: "xr_standard_trigger_pressed_min", + maxNodeName: "xr_standard_trigger_pressed_max", + }, + }, + }, + "xr-standard-squeeze": { + type: "squeeze", + gamepadIndices: { button: 1 }, + rootNodeName: "xr_standard_squeeze", + visualResponses: { + xr_standard_squeeze_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_squeeze_pressed_value", + minNodeName: "xr_standard_squeeze_pressed_min", + maxNodeName: "xr_standard_squeeze_pressed_max", + }, + }, + }, + "xr-standard-touchpad": { + type: "touchpad", + gamepadIndices: { button: 2, xAxis: 0, yAxis: 1 }, + rootNodeName: "xr_standard_touchpad", + visualResponses: { + xr_standard_touchpad_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_pressed_value", + minNodeName: "xr_standard_touchpad_pressed_min", + maxNodeName: "xr_standard_touchpad_pressed_max", + }, + xr_standard_touchpad_xaxis_pressed: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_xaxis_pressed_value", + minNodeName: "xr_standard_touchpad_xaxis_pressed_min", + maxNodeName: "xr_standard_touchpad_xaxis_pressed_max", + }, + xr_standard_touchpad_yaxis_pressed: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_yaxis_pressed_value", + minNodeName: "xr_standard_touchpad_yaxis_pressed_min", + maxNodeName: "xr_standard_touchpad_yaxis_pressed_max", + }, + xr_standard_touchpad_xaxis_touched: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_xaxis_touched_value", + minNodeName: "xr_standard_touchpad_xaxis_touched_min", + maxNodeName: "xr_standard_touchpad_xaxis_touched_max", + }, + xr_standard_touchpad_yaxis_touched: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_yaxis_touched_value", + minNodeName: "xr_standard_touchpad_yaxis_touched_min", + maxNodeName: "xr_standard_touchpad_yaxis_touched_max", + }, + xr_standard_touchpad_axes_touched: { componentProperty: "state", states: ["touched", "pressed"], valueNodeProperty: "visibility", valueNodeName: "xr_standard_touchpad_axes_touched_value" }, + }, + touchPointNodeName: "xr_standard_touchpad_axes_touched_value", + }, + "xr-standard-thumbstick": { + type: "thumbstick", + gamepadIndices: { button: 3, xAxis: 2, yAxis: 3 }, + rootNodeName: "xr_standard_thumbstick", + visualResponses: { + xr_standard_thumbstick_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_pressed_value", + minNodeName: "xr_standard_thumbstick_pressed_min", + maxNodeName: "xr_standard_thumbstick_pressed_max", + }, + xr_standard_thumbstick_xaxis_pressed: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_xaxis_pressed_value", + minNodeName: "xr_standard_thumbstick_xaxis_pressed_min", + maxNodeName: "xr_standard_thumbstick_xaxis_pressed_max", + }, + xr_standard_thumbstick_yaxis_pressed: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_yaxis_pressed_value", + minNodeName: "xr_standard_thumbstick_yaxis_pressed_min", + maxNodeName: "xr_standard_thumbstick_yaxis_pressed_max", + }, + }, + }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "microsoft-mixed-reality-left", + assetPath: "left.glb", + }, + right: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { + type: "trigger", + gamepadIndices: { button: 0 }, + rootNodeName: "xr_standard_trigger", + visualResponses: { + xr_standard_trigger_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_trigger_pressed_value", + minNodeName: "xr_standard_trigger_pressed_min", + maxNodeName: "xr_standard_trigger_pressed_max", + }, + }, + }, + "xr-standard-squeeze": { + type: "squeeze", + gamepadIndices: { button: 1 }, + rootNodeName: "xr_standard_squeeze", + visualResponses: { + xr_standard_squeeze_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_squeeze_pressed_value", + minNodeName: "xr_standard_squeeze_pressed_min", + maxNodeName: "xr_standard_squeeze_pressed_max", + }, + }, + }, + "xr-standard-touchpad": { + type: "touchpad", + gamepadIndices: { button: 2, xAxis: 0, yAxis: 1 }, + rootNodeName: "xr_standard_touchpad", + visualResponses: { + xr_standard_touchpad_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_pressed_value", + minNodeName: "xr_standard_touchpad_pressed_min", + maxNodeName: "xr_standard_touchpad_pressed_max", + }, + xr_standard_touchpad_xaxis_pressed: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_xaxis_pressed_value", + minNodeName: "xr_standard_touchpad_xaxis_pressed_min", + maxNodeName: "xr_standard_touchpad_xaxis_pressed_max", + }, + xr_standard_touchpad_yaxis_pressed: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_yaxis_pressed_value", + minNodeName: "xr_standard_touchpad_yaxis_pressed_min", + maxNodeName: "xr_standard_touchpad_yaxis_pressed_max", + }, + xr_standard_touchpad_xaxis_touched: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_xaxis_touched_value", + minNodeName: "xr_standard_touchpad_xaxis_touched_min", + maxNodeName: "xr_standard_touchpad_xaxis_touched_max", + }, + xr_standard_touchpad_yaxis_touched: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_touchpad_yaxis_touched_value", + minNodeName: "xr_standard_touchpad_yaxis_touched_min", + maxNodeName: "xr_standard_touchpad_yaxis_touched_max", + }, + xr_standard_touchpad_axes_touched: { componentProperty: "state", states: ["touched", "pressed"], valueNodeProperty: "visibility", valueNodeName: "xr_standard_touchpad_axes_touched_value" }, + }, + touchPointNodeName: "xr_standard_touchpad_axes_touched_value", + }, + "xr-standard-thumbstick": { + type: "thumbstick", + gamepadIndices: { button: 3, xAxis: 2, yAxis: 3 }, + rootNodeName: "xr_standard_thumbstick", + visualResponses: { + xr_standard_thumbstick_pressed: { + componentProperty: "button", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_pressed_value", + minNodeName: "xr_standard_thumbstick_pressed_min", + maxNodeName: "xr_standard_thumbstick_pressed_max", + }, + xr_standard_thumbstick_xaxis_pressed: { + componentProperty: "xAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_xaxis_pressed_value", + minNodeName: "xr_standard_thumbstick_xaxis_pressed_min", + maxNodeName: "xr_standard_thumbstick_xaxis_pressed_max", + }, + xr_standard_thumbstick_yaxis_pressed: { + componentProperty: "yAxis", + states: ["default", "touched", "pressed"], + valueNodeProperty: "transform", + valueNodeName: "xr_standard_thumbstick_yaxis_pressed_value", + minNodeName: "xr_standard_thumbstick_yaxis_pressed_min", + maxNodeName: "xr_standard_thumbstick_yaxis_pressed_max", + }, + }, + }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "microsoft-mixed-reality-right", + assetPath: "right.glb", + }, + }, + lp = (function (e) { + function t(t, n, i, r, o) { + void 0 === r && (r = !1), void 0 === o && (o = !1); + var a = e.call(this, t, up[i], n, i) || this; + return (a._forceLegacyControllers = o), (a.profileId = "oculus-touch"), a; + } + return ( + Object(h.d)(t, e), + (t.prototype._getFilenameAndPath = function () { + return { filename: "left" === this.handness ? t.MODEL_LEFT_FILENAME : t.MODEL_RIGHT_FILENAME, path: this._isQuest() ? t.QUEST_MODEL_BASE_URL : t.MODEL_BASE_URL }; + }), + (t.prototype._getModelLoadingConstraints = function () { + return !0; + }), + (t.prototype._processLoadedModel = function (e) { + var t = this, + n = this._isQuest(), + i = "right" === this.handness ? -1 : 1; + this.getComponentIds().forEach(function (e) { + var r = e && t.getComponent(e); + r && + r.onButtonStateChangedObservable.add( + function (r) { + if (t.rootMesh && !t.disableAnimation) + switch (e) { + case "xr-standard-trigger": + return void ( + n || + ((t._modelRootNode.getChildren()[3].rotation.x = 0.2 * -r.value), + (t._modelRootNode.getChildren()[3].position.y = 0.005 * -r.value), + (t._modelRootNode.getChildren()[3].position.z = 0.005 * -r.value)) + ); + case "xr-standard-squeeze": + return void (n || (t._modelRootNode.getChildren()[4].position.x = i * r.value * 0.0035)); + case "xr-standard-thumbstick": + return; + case "a-button": + case "x-button": + return void (n || (r.pressed ? (t._modelRootNode.getChildren()[1].position.y = -0.001) : (t._modelRootNode.getChildren()[1].position.y = 0))); + case "b-button": + case "y-button": + return void (n || (r.pressed ? (t._modelRootNode.getChildren()[2].position.y = -0.001) : (t._modelRootNode.getChildren()[2].position.y = 0))); + } + }, + void 0, + !0 + ); + }); + }), + (t.prototype._setRootMesh = function (e) { + (this.rootMesh = new Ee.a(this.profileId + " " + this.handness, this.scene)), + (this.rootMesh.rotationQuaternion = a.b.FromEulerAngles(0, Math.PI, 0)), + e.forEach(function (e) { + e.isPickable = !1; + }), + this._isQuest() ? (this._modelRootNode = e[0]) : ((this._modelRootNode = e[1]), (this.rootMesh.position.y = 0.034), (this.rootMesh.position.z = 0.052)), + (this._modelRootNode.parent = this.rootMesh); + }), + (t.prototype._updateModel = function () {}), + (t.prototype._isQuest = function () { + return !!navigator.userAgent.match(/Quest/gi) && !this._forceLegacyControllers; + }), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/oculus/"), + (t.MODEL_LEFT_FILENAME = "left.babylon"), + (t.MODEL_RIGHT_FILENAME = "right.babylon"), + (t.QUEST_MODEL_BASE_URL = "https://controllers.babylonjs.com/oculusQuest/"), + t + ); + })(uo); + mo.RegisterController("oculus-touch", function (e, t) { + return new lp(t, e.gamepad, e.handedness); + }), + mo.RegisterController("oculus-touch-legacy", function (e, t) { + return new lp(t, e.gamepad, e.handedness, !0); + }); + var up = { + left: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} }, + "xr-standard-squeeze": { type: "squeeze", gamepadIndices: { button: 1 }, rootNodeName: "xr_standard_squeeze", visualResponses: {} }, + "xr-standard-thumbstick": { type: "thumbstick", gamepadIndices: { button: 3, xAxis: 2, yAxis: 3 }, rootNodeName: "xr_standard_thumbstick", visualResponses: {} }, + "x-button": { type: "button", gamepadIndices: { button: 4 }, rootNodeName: "x_button", visualResponses: {} }, + "y-button": { type: "button", gamepadIndices: { button: 5 }, rootNodeName: "y_button", visualResponses: {} }, + thumbrest: { type: "button", gamepadIndices: { button: 6 }, rootNodeName: "thumbrest", visualResponses: {} }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "oculus-touch-v2-left", + assetPath: "left.glb", + }, + right: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} }, + "xr-standard-squeeze": { type: "squeeze", gamepadIndices: { button: 1 }, rootNodeName: "xr_standard_squeeze", visualResponses: {} }, + "xr-standard-thumbstick": { type: "thumbstick", gamepadIndices: { button: 3, xAxis: 2, yAxis: 3 }, rootNodeName: "xr_standard_thumbstick", visualResponses: {} }, + "a-button": { type: "button", gamepadIndices: { button: 4 }, rootNodeName: "a_button", visualResponses: {} }, + "b-button": { type: "button", gamepadIndices: { button: 5 }, rootNodeName: "b_button", visualResponses: {} }, + thumbrest: { type: "button", gamepadIndices: { button: 6 }, rootNodeName: "thumbrest", visualResponses: {} }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "oculus-touch-v2-right", + assetPath: "right.glb", + }, + }, + hp = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, dp[i], n, i) || this; + return (r.profileId = "htc-vive"), r; + } + return ( + Object(h.d)(t, e), + (t.prototype._getFilenameAndPath = function () { + return { filename: t.MODEL_FILENAME, path: t.MODEL_BASE_URL }; + }), + (t.prototype._getModelLoadingConstraints = function () { + return !0; + }), + (t.prototype._processLoadedModel = function (e) { + var t = this; + this.getComponentIds().forEach(function (e) { + var n = e && t.getComponent(e); + n && + n.onButtonStateChangedObservable.add( + function (n) { + if (t.rootMesh && !t.disableAnimation) + switch (e) { + case "xr-standard-trigger": + return void (t._modelRootNode.getChildren()[6].rotation.x = 0.15 * -n.value); + case "xr-standard-touchpad": + case "xr-standard-squeeze": + return; + } + }, + void 0, + !0 + ); + }); + }), + (t.prototype._setRootMesh = function (e) { + (this.rootMesh = new Ee.a(this.profileId + " " + this.handness, this.scene)), + e.forEach(function (e) { + e.isPickable = !1; + }), + (this._modelRootNode = e[1]), + (this._modelRootNode.parent = this.rootMesh), + (this.rootMesh.rotationQuaternion = a.b.FromEulerAngles(0, Math.PI, 0)); + }), + (t.prototype._updateModel = function () {}), + (t.MODEL_BASE_URL = "https://controllers.babylonjs.com/vive/"), + (t.MODEL_FILENAME = "wand.babylon"), + t + ); + })(uo); + mo.RegisterController("htc-vive", function (e, t) { + return new hp(t, e.gamepad, e.handedness); + }); + var dp = { + left: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} }, + "xr-standard-squeeze": { type: "squeeze", gamepadIndices: { button: 1 }, rootNodeName: "xr_standard_squeeze", visualResponses: {} }, + "xr-standard-touchpad": { type: "touchpad", gamepadIndices: { button: 2, xAxis: 0, yAxis: 1 }, rootNodeName: "xr_standard_touchpad", visualResponses: {} }, + menu: { type: "button", gamepadIndices: { button: 4 }, rootNodeName: "menu", visualResponses: {} }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "htc_vive_none", + assetPath: "none.glb", + }, + right: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} }, + "xr-standard-squeeze": { type: "squeeze", gamepadIndices: { button: 1 }, rootNodeName: "xr_standard_squeeze", visualResponses: {} }, + "xr-standard-touchpad": { type: "touchpad", gamepadIndices: { button: 2, xAxis: 0, yAxis: 1 }, rootNodeName: "xr_standard_touchpad", visualResponses: {} }, + menu: { type: "button", gamepadIndices: { button: 4 }, rootNodeName: "menu", visualResponses: {} }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "htc_vive_none", + assetPath: "none.glb", + }, + none: { + selectComponentId: "xr-standard-trigger", + components: { + "xr-standard-trigger": { type: "trigger", gamepadIndices: { button: 0 }, rootNodeName: "xr_standard_trigger", visualResponses: {} }, + "xr-standard-squeeze": { type: "squeeze", gamepadIndices: { button: 1 }, rootNodeName: "xr_standard_squeeze", visualResponses: {} }, + "xr-standard-touchpad": { type: "touchpad", gamepadIndices: { button: 2, xAxis: 0, yAxis: 1 }, rootNodeName: "xr_standard_touchpad", visualResponses: {} }, + menu: { type: "button", gamepadIndices: { button: 4 }, rootNodeName: "menu", visualResponses: {} }, + }, + gamepadMapping: "xr-standard", + rootNodeName: "htc-vive-none", + assetPath: "none.glb", + }, + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return h; + }); + var i = n(58), + r = n(1), + o = n(148), + a = n(152), + s = { min: 0, max: 0 }, + c = { min: 0, max: 0 }, + l = function (e, t, n) { + var i = r.e.Dot(t.centerWorld, e), + o = Math.abs(r.e.Dot(t.directions[0], e)) * t.extendSize.x + Math.abs(r.e.Dot(t.directions[1], e)) * t.extendSize.y + Math.abs(r.e.Dot(t.directions[2], e)) * t.extendSize.z; + (n.min = i - o), (n.max = i + o); + }, + u = function (e, t, n) { + return l(e, t, s), l(e, n, c), !(s.min > c.max || c.min > s.max); + }, + h = (function () { + function e(e, t, n) { + (this._isLocked = !1), (this.boundingBox = new o.a(e, t, n)), (this.boundingSphere = new a.a(e, t, n)); + } + return ( + (e.prototype.reConstruct = function (e, t, n) { + this.boundingBox.reConstruct(e, t, n), this.boundingSphere.reConstruct(e, t, n); + }), + Object.defineProperty(e.prototype, "minimum", { + get: function () { + return this.boundingBox.minimum; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "maximum", { + get: function () { + return this.boundingBox.maximum; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isLocked", { + get: function () { + return this._isLocked; + }, + set: function (e) { + this._isLocked = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.update = function (e) { + this._isLocked || (this.boundingBox._update(e), this.boundingSphere._update(e)); + }), + (e.prototype.centerOn = function (t, n) { + var i = e.TmpVector3[0].copyFrom(t).subtractInPlace(n), + r = e.TmpVector3[1].copyFrom(t).addInPlace(n); + return this.boundingBox.reConstruct(i, r, this.boundingBox.getWorldMatrix()), this.boundingSphere.reConstruct(i, r, this.boundingBox.getWorldMatrix()), this; + }), + (e.prototype.scale = function (e) { + return this.boundingBox.scale(e), this.boundingSphere.scale(e), this; + }), + (e.prototype.isInFrustum = function (e, t) { + return void 0 === t && (t = 0), !((2 !== t && 3 !== t) || !this.boundingSphere.isCenterInFrustum(e)) || (!!this.boundingSphere.isInFrustum(e) && (!(1 !== t && 3 !== t) || this.boundingBox.isInFrustum(e))); + }), + Object.defineProperty(e.prototype, "diagonalLength", { + get: function () { + var t = this.boundingBox; + return t.maximumWorld.subtractToRef(t.minimumWorld, e.TmpVector3[0]).length(); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isCompletelyInFrustum = function (e) { + return this.boundingBox.isCompletelyInFrustum(e); + }), + (e.prototype._checkCollision = function (e) { + return e._canDoCollision(this.boundingSphere.centerWorld, this.boundingSphere.radiusWorld, this.boundingBox.minimumWorld, this.boundingBox.maximumWorld); + }), + (e.prototype.intersectsPoint = function (e) { + return !!this.boundingSphere.centerWorld && !!this.boundingSphere.intersectsPoint(e) && !!this.boundingBox.intersectsPoint(e); + }), + (e.prototype.intersects = function (e, t) { + if (!a.a.Intersects(this.boundingSphere, e.boundingSphere)) return !1; + if (!o.a.Intersects(this.boundingBox, e.boundingBox)) return !1; + if (!t) return !0; + var n = this.boundingBox, + i = e.boundingBox; + return ( + !!u(n.directions[0], n, i) && + !!u(n.directions[1], n, i) && + !!u(n.directions[2], n, i) && + !!u(i.directions[0], n, i) && + !!u(i.directions[1], n, i) && + !!u(i.directions[2], n, i) && + !!u(r.e.Cross(n.directions[0], i.directions[0]), n, i) && + !!u(r.e.Cross(n.directions[0], i.directions[1]), n, i) && + !!u(r.e.Cross(n.directions[0], i.directions[2]), n, i) && + !!u(r.e.Cross(n.directions[1], i.directions[0]), n, i) && + !!u(r.e.Cross(n.directions[1], i.directions[1]), n, i) && + !!u(r.e.Cross(n.directions[1], i.directions[2]), n, i) && + !!u(r.e.Cross(n.directions[2], i.directions[0]), n, i) && + !!u(r.e.Cross(n.directions[2], i.directions[1]), n, i) && + !!u(r.e.Cross(n.directions[2], i.directions[2]), n, i) + ); + }), + (e.TmpVector3 = i.a.BuildArray(2, r.e.Zero)), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e, t, n, i, r, o) { + (this.source = e), (this.pointerX = t), (this.pointerY = n), (this.meshUnderPointer = i), (this.sourceEvent = r), (this.additionalData = o); + } + return ( + (e.CreateNew = function (t, n, i) { + var r = t.getScene(); + return new e(t, r.pointerX, r.pointerY, r.meshUnderPointer || t, n, i); + }), + (e.CreateNewFromSprite = function (t, n, i, r) { + return new e(t, n.pointerX, n.pointerY, n.meshUnderPointer, i, r); + }), + (e.CreateNewFromScene = function (t, n) { + return new e(null, t.pointerX, t.pointerY, t.meshUnderPointer, n); + }), + (e.CreateNewFromPrimitive = function (t, n, i, r) { + return new e(t, n.x, n.y, null, i, r); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i, + r = function () { + return void 0 === i && (i = Boolean(window && document && document.all && !window.atob)), i; + }, + o = (function () { + var e = {}; + return function (t) { + if (void 0 === e[t]) { + var n = document.querySelector(t); + if (window.HTMLIFrameElement && n instanceof window.HTMLIFrameElement) + try { + n = n.contentDocument.head; + } catch (e) { + n = null; + } + e[t] = n; + } + return e[t]; + }; + })(), + a = []; + function s(e) { + for (var t = -1, n = 0; n < a.length; n++) + if (a[n].identifier === e) { + t = n; + break; + } + return t; + } + function c(e, t) { + for (var n = {}, i = [], r = 0; r < e.length; r++) { + var o = e[r], + c = t.base ? o[0] + t.base : o[0], + l = n[c] || 0, + u = "".concat(c, " ").concat(l); + n[c] = l + 1; + var h = s(u), + d = { css: o[1], media: o[2], sourceMap: o[3] }; + -1 !== h ? (a[h].references++, a[h].updater(d)) : a.push({ identifier: u, updater: g(d, t), references: 1 }), i.push(u); + } + return i; + } + function l(e) { + var t = document.createElement("style"), + i = e.attributes || {}; + if (void 0 === i.nonce) { + var r = n.nc; + r && (i.nonce = r); + } + if ( + (Object.keys(i).forEach(function (e) { + t.setAttribute(e, i[e]); + }), + "function" == typeof e.insert) + ) + e.insert(t); + else { + var a = o(e.insert || "head"); + if (!a) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + a.appendChild(t); + } + return t; + } + var u, + h = + ((u = []), + function (e, t) { + return (u[e] = t), u.filter(Boolean).join("\n"); + }); + function d(e, t, n, i) { + var r = n ? "" : i.media ? "@media ".concat(i.media, " {").concat(i.css, "}") : i.css; + if (e.styleSheet) e.styleSheet.cssText = h(t, r); + else { + var o = document.createTextNode(r), + a = e.childNodes; + a[t] && e.removeChild(a[t]), a.length ? e.insertBefore(o, a[t]) : e.appendChild(o); + } + } + function p(e, t, n) { + var i = n.css, + r = n.media, + o = n.sourceMap; + if ((r ? e.setAttribute("media", r) : e.removeAttribute("media"), o && btoa && (i += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o)))), " */")), e.styleSheet)) + e.styleSheet.cssText = i; + else { + for (; e.firstChild; ) e.removeChild(e.firstChild); + e.appendChild(document.createTextNode(i)); + } + } + var f = null, + m = 0; + function g(e, t) { + var n, i, r; + if (t.singleton) { + var o = m++; + (n = f || (f = l(t))), (i = d.bind(null, n, o, !1)), (r = d.bind(null, n, o, !0)); + } else + (n = l(t)), + (i = p.bind(null, n, t)), + (r = function () { + !(function (e) { + if (null === e.parentNode) return !1; + e.parentNode.removeChild(e); + })(n); + }); + return ( + i(e), + function (t) { + if (t) { + if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return; + i((e = t)); + } else r(); + } + ); + } + e.exports = function (e, t) { + (t = t || {}).singleton || "boolean" == typeof t.singleton || (t.singleton = r()); + var n = c((e = e || []), t); + return function (e) { + if (((e = e || []), "[object Array]" === Object.prototype.toString.call(e))) { + for (var i = 0; i < n.length; i++) { + var r = s(n[i]); + a[r].references--; + } + for (var o = c(e, t), l = 0; l < n.length; l++) { + var u = s(n[l]); + 0 === a[u].references && (a[u].updater(), a.splice(u, 1)); + } + n = o; + } + }; + }; + }, + function (e, t, n) { + "use strict"; + e.exports = function (e) { + var t = []; + return ( + (t.toString = function () { + return this.map(function (t) { + var n = (function (e, t) { + var n = e[1] || "", + i = e[3]; + if (!i) return n; + if (t && "function" == typeof btoa) { + var r = ((a = i), (s = btoa(unescape(encodeURIComponent(JSON.stringify(a))))), (c = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s)), "/*# ".concat(c, " */")), + o = i.sources.map(function (e) { + return "/*# sourceURL=".concat(i.sourceRoot || "").concat(e, " */"); + }); + return [n].concat(o).concat([r]).join("\n"); + } + var a, s, c; + return [n].join("\n"); + })(t, e); + return t[2] ? "@media ".concat(t[2], " {").concat(n, "}") : n; + }).join(""); + }), + (t.i = function (e, n, i) { + "string" == typeof e && (e = [[null, e, ""]]); + var r = {}; + if (i) + for (var o = 0; o < this.length; o++) { + var a = this[o][0]; + null != a && (r[a] = !0); + } + for (var s = 0; s < e.length; s++) { + var c = [].concat(e[s]); + (i && r[c[0]]) || (n && (c[2] ? (c[2] = "".concat(n, " and ").concat(c[2])) : (c[2] = n)), t.push(c)); + } + }), + t + ); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(14), + s = n(102), + c = n(120), + l = (function (e) { + function t(t, n, i, r) { + void 0 === r && (r = !0); + var s = e.call(this, t, n, i, r) || this; + return ( + (s.ellipsoid = new o.e(0.5, 1, 0.5)), + (s.ellipsoidOffset = new o.e(0, 0, 0)), + (s.checkCollisions = !1), + (s.applyGravity = !1), + (s._needMoveForGravity = !1), + (s._oldPosition = o.e.Zero()), + (s._diffPosition = o.e.Zero()), + (s._newPosition = o.e.Zero()), + (s._collisionMask = -1), + (s._onCollisionPositionChange = function (e, t, n) { + void 0 === n && (n = null); + var i; + (i = t), + s._newPosition.copyFrom(i), + s._newPosition.subtractToRef(s._oldPosition, s._diffPosition), + s._diffPosition.length() > a.a.CollisionsEpsilon && (s.position.addInPlace(s._diffPosition), s.onCollide && n && s.onCollide(n)); + }), + (s.inputs = new c.a(s)), + s.inputs.addKeyboard().addMouse(), + s + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "angularSensibility", { + get: function () { + var e = this.inputs.attached.mouse; + return e ? e.angularSensibility : 0; + }, + set: function (e) { + var t = this.inputs.attached.mouse; + t && (t.angularSensibility = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysUp", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysUp : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysUp = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysDown", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysDown : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysDown = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysLeft", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysLeft : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysLeft = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "keysRight", { + get: function () { + var e = this.inputs.attached.keyboard; + return e ? e.keysRight : []; + }, + set: function (e) { + var t = this.inputs.attached.keyboard; + t && (t.keysRight = e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.attachControl = function (e, t) { + this.inputs.attachElement(e, t); + }), + (t.prototype.detachControl = function (e) { + this.inputs.detachElement(e), (this.cameraDirection = new o.e(0, 0, 0)), (this.cameraRotation = new o.d(0, 0)); + }), + Object.defineProperty(t.prototype, "collisionMask", { + get: function () { + return this._collisionMask; + }, + set: function (e) { + this._collisionMask = isNaN(e) ? -1 : e; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._collideWithWorld = function (e) { + (this.parent ? o.e.TransformCoordinates(this.position, this.parent.getWorldMatrix()) : this.position).subtractFromFloatsToRef(0, this.ellipsoid.y, 0, this._oldPosition), + this._oldPosition.addInPlace(this.ellipsoidOffset); + var t = this.getScene().collisionCoordinator; + this._collider || (this._collider = t.createCollider()), (this._collider._radius = this.ellipsoid), (this._collider.collisionMask = this._collisionMask); + var n = e; + this.applyGravity && (n = e.add(this.getScene().gravity)), t.getNewPosition(this._oldPosition, n, this._collider, 3, null, this._onCollisionPositionChange, this.uniqueId); + }), + (t.prototype._checkInputs = function () { + this._localDirection || ((this._localDirection = o.e.Zero()), (this._transformedDirection = o.e.Zero())), this.inputs.checkInputs(), e.prototype._checkInputs.call(this); + }), + (t.prototype._decideIfNeedsToMove = function () { + return this._needMoveForGravity || Math.abs(this.cameraDirection.x) > 0 || Math.abs(this.cameraDirection.y) > 0 || Math.abs(this.cameraDirection.z) > 0; + }), + (t.prototype._updatePosition = function () { + this.checkCollisions && this.getScene().collisionsEnabled ? this._collideWithWorld(this.cameraDirection) : e.prototype._updatePosition.call(this); + }), + (t.prototype.dispose = function () { + this.inputs.clear(), e.prototype.dispose.call(this); + }), + (t.prototype.getClassName = function () { + return "FreeCamera"; + }), + Object(i.c)([Object(r.o)()], t.prototype, "ellipsoid", void 0), + Object(i.c)([Object(r.o)()], t.prototype, "ellipsoidOffset", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "checkCollisions", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "applyGravity", void 0), + t + ); + })(s.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(3), + o = n(6), + a = n(1), + s = n(25), + c = n(204), + l = n(109), + u = + (n(74), + (function () { + function e(t) { + (this.metadata = null), + (this.reservedDataStore = null), + (this._hasAlpha = !1), + (this.getAlphaFromRGB = !1), + (this.level = 1), + (this.coordinatesIndex = 0), + (this._coordinatesMode = 0), + (this.wrapU = 1), + (this.wrapV = 1), + (this.wrapR = 1), + (this.anisotropicFilteringLevel = e.DEFAULT_ANISOTROPIC_FILTERING_LEVEL), + (this.gammaSpace = !0), + (this.invertZ = !1), + (this.lodLevelInAlpha = !1), + (this.isRenderTarget = !1), + (this.animations = new Array()), + (this.onDisposeObservable = new o.c()), + (this._onDisposeObserver = null), + (this.delayLoadState = 0), + (this._scene = null), + (this._texture = null), + (this._uid = null), + (this._cachedSize = l.a.Zero()), + (this._scene = t || s.a.LastCreatedScene), + this._scene && ((this.uniqueId = this._scene.getUniqueId()), this._scene.addTexture(this)), + (this._uid = null); + } + return ( + Object.defineProperty(e.prototype, "hasAlpha", { + get: function () { + return this._hasAlpha; + }, + set: function (e) { + this._hasAlpha !== e && ((this._hasAlpha = e), this._scene && this._scene.markAllMaterialsAsDirty(17)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "coordinatesMode", { + get: function () { + return this._coordinatesMode; + }, + set: function (e) { + this._coordinatesMode !== e && ((this._coordinatesMode = e), this._scene && this._scene.markAllMaterialsAsDirty(1)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isCube", { + get: function () { + return !!this._texture && this._texture.isCube; + }, + set: function (e) { + this._texture && (this._texture.isCube = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "is3D", { + get: function () { + return !!this._texture && this._texture.is3D; + }, + set: function (e) { + this._texture && (this._texture.is3D = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "is2DArray", { + get: function () { + return !!this._texture && this._texture.is2DArray; + }, + set: function (e) { + this._texture && (this._texture.is2DArray = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isRGBD", { + get: function () { + return null != this._texture && this._texture._isRGBD; + }, + set: function (e) { + this._texture && (this._texture._isRGBD = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "noMipmap", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "lodGenerationOffset", { + get: function () { + return this._texture ? this._texture._lodGenerationOffset : 0; + }, + set: function (e) { + this._texture && (this._texture._lodGenerationOffset = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "lodGenerationScale", { + get: function () { + return this._texture ? this._texture._lodGenerationScale : 0; + }, + set: function (e) { + this._texture && (this._texture._lodGenerationScale = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "linearSpecularLOD", { + get: function () { + return !!this._texture && this._texture._linearSpecularLOD; + }, + set: function (e) { + this._texture && (this._texture._linearSpecularLOD = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "irradianceTexture", { + get: function () { + return this._texture ? this._texture._irradianceTexture : null; + }, + set: function (e) { + this._texture && (this._texture._irradianceTexture = e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "uid", { + get: function () { + return this._uid || (this._uid = c.a.RandomId()), this._uid; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.toString = function () { + return this.name; + }), + (e.prototype.getClassName = function () { + return "BaseTexture"; + }), + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isBlocking", { + get: function () { + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.getTextureMatrix = function () { + return a.a.IdentityReadOnly; + }), + (e.prototype.getReflectionTextureMatrix = function () { + return a.a.IdentityReadOnly; + }), + (e.prototype.getInternalTexture = function () { + return this._texture; + }), + (e.prototype.isReadyOrNotBlocking = function () { + return !this.isBlocking || this.isReady(); + }), + (e.prototype.isReady = function () { + return 4 === this.delayLoadState ? (this.delayLoad(), !1) : !!this._texture && this._texture.isReady; + }), + (e.prototype.getSize = function () { + if (this._texture) { + if (this._texture.width) return (this._cachedSize.width = this._texture.width), (this._cachedSize.height = this._texture.height), this._cachedSize; + if (this._texture._size) return (this._cachedSize.width = this._texture._size), (this._cachedSize.height = this._texture._size), this._cachedSize; + } + return this._cachedSize; + }), + (e.prototype.getBaseSize = function () { + return this.isReady() && this._texture ? (this._texture._size ? new l.a(this._texture._size, this._texture._size) : new l.a(this._texture.baseWidth, this._texture.baseHeight)) : l.a.Zero(); + }), + (e.prototype.updateSamplingMode = function (e) { + if (this._texture) { + var t = this.getScene(); + t && t.getEngine().updateTextureSamplingMode(e, this._texture); + } + }), + (e.prototype.scale = function (e) {}), + Object.defineProperty(e.prototype, "canRescale", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._getFromCache = function (e, t, n, i) { + if (!this._scene) return null; + for (var r = this._scene.getEngine().getLoadedTexturesCache(), o = 0; o < r.length; o++) { + var a = r[o]; + if (!((void 0 !== i && i !== a.invertY) || a.url !== e || a.generateMipMaps !== !t || (n && n !== a.samplingMode))) return a.incrementReferences(), a; + } + return null; + }), + (e.prototype._rebuild = function () {}), + (e.prototype.delayLoad = function () {}), + (e.prototype.clone = function () { + return null; + }), + Object.defineProperty(e.prototype, "textureType", { + get: function () { + return this._texture && void 0 !== this._texture.type ? this._texture.type : 0; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "textureFormat", { + get: function () { + return this._texture && void 0 !== this._texture.format ? this._texture.format : 5; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + var e = this.getScene(); + e && e.markAllMaterialsAsDirty(1); + }), + (e.prototype.readPixels = function (e, t, n) { + if ((void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = null), !this._texture)) return null; + var i = this.getSize(), + r = i.width, + o = i.height, + a = this.getScene(); + if (!a) return null; + var s = a.getEngine(); + return ( + 0 != t && ((r /= Math.pow(2, t)), (o /= Math.pow(2, t)), (r = Math.round(r)), (o = Math.round(o))), + this._texture.isCube ? s._readTexturePixels(this._texture, r, o, e, t, n) : s._readTexturePixels(this._texture, r, o, -1, t, n) + ); + }), + (e.prototype.releaseInternalTexture = function () { + this._texture && (this._texture.dispose(), (this._texture = null)); + }), + Object.defineProperty(e.prototype, "_lodTextureHigh", { + get: function () { + return this._texture ? this._texture._lodTextureHigh : null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "_lodTextureMid", { + get: function () { + return this._texture ? this._texture._lodTextureMid : null; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "_lodTextureLow", { + get: function () { + return this._texture ? this._texture._lodTextureLow : null; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + if (this._scene) { + this._scene.stopAnimation && this._scene.stopAnimation(this), this._scene._removePendingData(this); + var e = this._scene.textures.indexOf(this); + e >= 0 && this._scene.textures.splice(e, 1), this._scene.onTextureRemovedObservable.notifyObservers(this); + } + void 0 !== this._texture && (this.releaseInternalTexture(), this.onDisposeObservable.notifyObservers(this), this.onDisposeObservable.clear()); + }), + (e.prototype.serialize = function () { + if (!this.name) return null; + var e = r.a.Serialize(this); + return r.a.AppendSerializedAnimations(this, e), e; + }), + (e.WhenAllReady = function (e, t) { + var n = e.length; + if (0 !== n) + for ( + var i, + r, + o = function () { + if ((i = e[a]).isReady()) 0 == --n && t(); + else if ((r = i.onLoadObservable)) { + var o = function () { + r.removeCallback(o), 0 == --n && t(); + }; + r.add(o); + } + }, + a = 0; + a < e.length; + a++ + ) + o(); + else t(); + }), + (e.DEFAULT_ANISOTROPIC_FILTERING_LEVEL = 4), + Object(i.c)([Object(r.c)()], e.prototype, "uniqueId", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "name", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "metadata", void 0), + Object(i.c)([Object(r.c)("hasAlpha")], e.prototype, "_hasAlpha", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "getAlphaFromRGB", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "level", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "coordinatesIndex", void 0), + Object(i.c)([Object(r.c)("coordinatesMode")], e.prototype, "_coordinatesMode", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "wrapU", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "wrapV", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "wrapR", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "anisotropicFilteringLevel", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "isCube", null), + Object(i.c)([Object(r.c)()], e.prototype, "is3D", null), + Object(i.c)([Object(r.c)()], e.prototype, "is2DArray", null), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "gammaSpace", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "invertZ", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "lodLevelInAlpha", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "lodGenerationOffset", null), + Object(i.c)([Object(r.c)()], e.prototype, "lodGenerationScale", null), + Object(i.c)([Object(r.c)()], e.prototype, "linearSpecularLOD", null), + Object(i.c)([Object(r.m)()], e.prototype, "irradianceTexture", null), + Object(i.c)([Object(r.c)()], e.prototype, "isRenderTarget", void 0), + e + ); + })()); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(76), + r = (function () { + function e() { + (this._startMonitoringTime = 0), + (this._min = 0), + (this._max = 0), + (this._average = 0), + (this._lastSecAverage = 0), + (this._current = 0), + (this._totalValueCount = 0), + (this._totalAccumulated = 0), + (this._lastSecAccumulated = 0), + (this._lastSecTime = 0), + (this._lastSecValueCount = 0); + } + return ( + Object.defineProperty(e.prototype, "min", { + get: function () { + return this._min; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "max", { + get: function () { + return this._max; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "average", { + get: function () { + return this._average; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "lastSecAverage", { + get: function () { + return this._lastSecAverage; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "current", { + get: function () { + return this._current; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "total", { + get: function () { + return this._totalAccumulated; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "count", { + get: function () { + return this._totalValueCount; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.fetchNewFrame = function () { + this._totalValueCount++, (this._current = 0), this._lastSecValueCount++; + }), + (e.prototype.addCount = function (t, n) { + e.Enabled && ((this._current += t), n && this._fetchResult()); + }), + (e.prototype.beginMonitoring = function () { + e.Enabled && (this._startMonitoringTime = i.a.Now); + }), + (e.prototype.endMonitoring = function (t) { + if ((void 0 === t && (t = !0), e.Enabled)) { + t && this.fetchNewFrame(); + var n = i.a.Now; + (this._current = n - this._startMonitoringTime), t && this._fetchResult(); + } + }), + (e.prototype._fetchResult = function () { + (this._totalAccumulated += this._current), + (this._lastSecAccumulated += this._current), + (this._min = Math.min(this._min, this._current)), + (this._max = Math.max(this._max, this._current)), + (this._average = this._totalAccumulated / this._totalValueCount); + var e = i.a.Now; + e - this._lastSecTime > 1e3 && ((this._lastSecAverage = this._lastSecAccumulated / this._lastSecValueCount), (this._lastSecTime = e), (this._lastSecAccumulated = 0), (this._lastSecValueCount = 0)); + }), + (e.Enabled = !0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "bonesDeclaration", + r = + "#if NUM_BONE_INFLUENCERS>0\n#ifdef BONETEXTURE\nuniform sampler2D boneSampler;\nuniform float boneTextureWidth;\n#else\nuniform mat4 mBones[BonesPerMesh];\n#endif\nattribute vec4 matricesIndices;\nattribute vec4 matricesWeights;\n#if NUM_BONE_INFLUENCERS>4\nattribute vec4 matricesIndicesExtra;\nattribute vec4 matricesWeightsExtra;\n#endif\n#ifdef BONETEXTURE\nmat4 readMatrixFromRawSampler(sampler2D smp,float index)\n{\nfloat offset=index*4.0;\nfloat dx=1.0/boneTextureWidth;\nvec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.));\nvec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.));\nvec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.));\nvec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.));\nreturn mat4(m0,m1,m2,m3);\n}\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "instancesDeclaration", + r = "#ifdef INSTANCES\nattribute vec4 world0;\nattribute vec4 world1;\nattribute vec4 world2;\nattribute vec4 world3;\n#else\nuniform mat4 world;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "instancesVertex", + r = "#ifdef INSTANCES\nmat4 finalWorld=mat4(world0,world1,world2,world3);\n#else\nmat4 finalWorld=world;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = + "#if NUM_BONE_INFLUENCERS>0\nmat4 influence;\n#ifdef BONETEXTURE\ninfluence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];\n#endif\n#else\ninfluence=mBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=mBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=mBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=mBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\n#endif\nfinalWorld=finalWorld*influence;\n#endif"; + n(7).a.IncludesShadersStore.bonesVertex = i; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return p; + }), + n.d(t, "d", function () { + return f; + }), + n.d(t, "c", function () { + return m; + }), + n.d(t, "a", function () { + return g; + }); + var i = n(2), + r = n(97), + o = n(56), + a = n(6), + s = n(118), + c = n(181), + l = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(i.d)(t, e), + (t._setPrototypeOf = + Object.setPrototypeOf || + function (e, t) { + return (e.__proto__ = t), e; + }), + t + ); + })(Error), + u = n(53), + h = n(38), + d = n(170), + p = (function (e) { + function t(n, i) { + var o = e.call(this, n) || this; + return (o.name = "LoadFileError"), l._setPrototypeOf(o, t.prototype), i instanceof r.a ? (o.request = i) : (o.file = i), o; + } + return Object(i.d)(t, e), t; + })(l), + f = (function (e) { + function t(n, i) { + var r = e.call(this, n) || this; + return (r.request = i), (r.name = "RequestFileError"), l._setPrototypeOf(r, t.prototype), r; + } + return Object(i.d)(t, e), t; + })(l), + m = (function (e) { + function t(n, i) { + var r = e.call(this, n) || this; + return (r.file = i), (r.name = "ReadFileError"), l._setPrototypeOf(r, t.prototype), r; + } + return Object(i.d)(t, e), t; + })(l), + g = (function () { + function e() {} + return ( + (e._CleanUrl = function (e) { + return (e = e.replace(/#/gm, "%23")); + }), + (e.SetCorsBehavior = function (t, n) { + if ((!t || 0 !== t.indexOf("data:")) && e.CorsBehavior) + if ("string" == typeof e.CorsBehavior || this.CorsBehavior instanceof String) n.crossOrigin = e.CorsBehavior; + else { + var i = e.CorsBehavior(t); + i && (n.crossOrigin = i); + } + }), + (e.LoadImage = function (t, n, i, r, o) { + var a; + void 0 === o && (o = ""); + var c = !1; + if ( + (t instanceof ArrayBuffer || ArrayBuffer.isView(t) + ? "undefined" != typeof Blob + ? ((a = URL.createObjectURL(new Blob([t], { type: o }))), (c = !0)) + : (a = "data:" + o + ";base64," + u.a.EncodeArrayBufferToBase64(t)) + : t instanceof Blob + ? ((a = URL.createObjectURL(t)), (c = !0)) + : ((a = e._CleanUrl(t)), (a = e.PreprocessUrl(t))), + "undefined" == typeof Image) + ) + return ( + e.LoadFile( + a, + function (e) { + createImageBitmap(new Blob([e], { type: o })) + .then(function (e) { + n(e), c && URL.revokeObjectURL(a); + }) + .catch(function (e) { + i && i("Error while trying to load image: " + t, e); + }); + }, + void 0, + r || void 0, + !0, + function (e, n) { + i && i("Error while trying to load image: " + t, n); + } + ), + null + ); + var l = new Image(); + e.SetCorsBehavior(a, l); + var h = function () { + l.removeEventListener("load", h), l.removeEventListener("error", d), n(l), c && l.src && URL.revokeObjectURL(l.src); + }, + d = function (e) { + l.removeEventListener("load", h), l.removeEventListener("error", d), i && i("Error while trying to load image: " + t, e), c && l.src && URL.revokeObjectURL(l.src); + }; + l.addEventListener("load", h), l.addEventListener("error", d); + var p = function () { + l.src = a; + }; + if ("data:" !== a.substr(0, 5) && r && r.enableTexturesOffline) + r.open(function () { + r && r.loadImage(a, l); + }, p); + else { + if (-1 !== a.indexOf("file:")) { + var f = decodeURIComponent(a.substring(5).toLowerCase()); + if (s.a.FilesToLoad[f]) { + try { + var m; + try { + m = URL.createObjectURL(s.a.FilesToLoad[f]); + } catch (e) { + m = URL.createObjectURL(s.a.FilesToLoad[f]); + } + (l.src = m), (c = !0); + } catch (e) { + l.src = ""; + } + return l; + } + } + p(); + } + return l; + }), + (e.ReadFile = function (e, t, n, i, r) { + var o = new FileReader(), + s = { + onCompleteObservable: new a.c(), + abort: function () { + return o.abort(); + }, + }; + return ( + (o.onloadend = function (e) { + return s.onCompleteObservable.notifyObservers(s); + }), + r && + (o.onerror = function (t) { + r(new m("Unable to read " + e.name, e)); + }), + (o.onload = function (e) { + t(e.target.result); + }), + n && (o.onprogress = n), + i ? o.readAsArrayBuffer(e) : o.readAsText(e), + s + ); + }), + (e.LoadFile = function (t, n, i, r, o, a) { + if (-1 !== t.indexOf("file:")) { + var c = decodeURIComponent(t.substring(5).toLowerCase()); + 0 === c.indexOf("./") && (c = c.substring(2)); + var l = s.a.FilesToLoad[c]; + if (l) + return e.ReadFile( + l, + n, + i, + o, + a + ? function (e) { + return a(void 0, new p(e.message, e.file)); + } + : void 0 + ); + } + return e.RequestFile( + t, + function (e, t) { + n(e, t ? t.responseURL : void 0); + }, + i, + r, + o, + a + ? function (e) { + a(e.request, new p(e.message, e.request)); + } + : void 0 + ); + }), + (e.RequestFile = function (t, n, i, s, c, l, u) { + (t = e._CleanUrl(t)), (t = e.PreprocessUrl(t)); + var h = e.BaseUrl + t, + d = !1, + p = { + onCompleteObservable: new a.c(), + abort: function () { + return (d = !0); + }, + }, + m = function () { + var t = new r.a(), + a = null; + p.abort = function () { + (d = !0), t.readyState !== (XMLHttpRequest.DONE || 4) && t.abort(), null !== a && (clearTimeout(a), (a = null)); + }; + var s = function (m) { + t.open("GET", h), u && u(t), c && (t.responseType = "arraybuffer"), i && t.addEventListener("progress", i); + var g = function () { + t.removeEventListener("loadend", g), p.onCompleteObservable.notifyObservers(p), p.onCompleteObservable.clear(); + }; + t.addEventListener("loadend", g); + var b = function () { + if (!d && t.readyState === (XMLHttpRequest.DONE || 4)) { + if ((t.removeEventListener("readystatechange", b), (t.status >= 200 && t.status < 300) || (0 === t.status && (!o.a.IsWindowObjectExist() || e.IsFileURL())))) + return void n(c ? t.response : t.responseText, t); + var i = e.DefaultRetryStrategy; + if (i) { + var u = i(h, t, m); + if (-1 !== u) + return ( + t.removeEventListener("loadend", g), + (t = new r.a()), + void (a = setTimeout(function () { + return s(m + 1); + }, u)) + ); + } + var p = new f("Error status: " + t.status + " " + t.statusText + " - Unable to load " + h, t); + l && l(p); + } + }; + t.addEventListener("readystatechange", b), t.send(); + }; + s(0); + }; + if (s && s.enableSceneOffline) { + var g = function (e) { + e && e.status > 400 ? l && l(e) : m(); + }; + s.open(function () { + s && + s.loadFile( + e.BaseUrl + t, + function (e) { + d || n(e), p.onCompleteObservable.notifyObservers(p); + }, + i + ? function (e) { + d || i(e); + } + : void 0, + g, + c + ); + }, g); + } else m(); + return p; + }), + (e.IsFileURL = function () { + return "file:" === location.protocol; + }), + (e.DefaultRetryStrategy = c.a.ExponentialBackoff()), + (e.BaseUrl = ""), + (e.CorsBehavior = "anonymous"), + (e.PreprocessUrl = function (e) { + return e; + }), + e + ); + })(); + (h.a._FileToolsLoadImage = g.LoadImage.bind(g)), (h.a._FileToolsLoadFile = g.LoadFile.bind(g)), (d.a._FileToolsLoadFile = g.LoadFile.bind(g)); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(2), + r = n(10), + o = n(8), + a = (n(225), n(112)), + s = (function (e) { + function t(t, n, i, r, s, c) { + void 0 === i && (i = null), void 0 === s && (s = 3), void 0 === c && (c = 5); + var l = e.call(this, null, i, !r, void 0, s, void 0, void 0, void 0, void 0, c) || this; + (l.name = t), + (l._engine = l.getScene().getEngine()), + (l.wrapU = o.a.CLAMP_ADDRESSMODE), + (l.wrapV = o.a.CLAMP_ADDRESSMODE), + (l._generateMipMaps = r), + n.getContext + ? ((l._canvas = n), (l._texture = l._engine.createDynamicTexture(n.width, n.height, r, s))) + : ((l._canvas = a.a.CreateCanvas(1, 1)), n.width || 0 === n.width ? (l._texture = l._engine.createDynamicTexture(n.width, n.height, r, s)) : (l._texture = l._engine.createDynamicTexture(n, n, r, s))); + var u = l.getSize(); + return (l._canvas.width = u.width), (l._canvas.height = u.height), (l._context = l._canvas.getContext("2d")), l; + } + return ( + Object(i.d)(t, e), + (t.prototype.getClassName = function () { + return "DynamicTexture"; + }), + Object.defineProperty(t.prototype, "canRescale", { + get: function () { + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._recreate = function (e) { + (this._canvas.width = e.width), (this._canvas.height = e.height), this.releaseInternalTexture(), (this._texture = this._engine.createDynamicTexture(e.width, e.height, this._generateMipMaps, this.samplingMode)); + }), + (t.prototype.scale = function (e) { + var t = this.getSize(); + (t.width *= e), (t.height *= e), this._recreate(t); + }), + (t.prototype.scaleTo = function (e, t) { + var n = this.getSize(); + (n.width = e), (n.height = t), this._recreate(n); + }), + (t.prototype.getContext = function () { + return this._context; + }), + (t.prototype.clear = function () { + var e = this.getSize(); + this._context.fillRect(0, 0, e.width, e.height); + }), + (t.prototype.update = function (e, t) { + void 0 === t && (t = !1), this._engine.updateDynamicTexture(this._texture, this._canvas, void 0 === e || e, t, this._format || void 0); + }), + (t.prototype.drawText = function (e, t, n, i, r, o, a, s) { + void 0 === s && (s = !0); + var c = this.getSize(); + if ((o && ((this._context.fillStyle = o), this._context.fillRect(0, 0, c.width, c.height)), (this._context.font = i), null == t)) { + var l = this._context.measureText(e); + t = (c.width - l.width) / 2; + } + if (null == n) { + var u = parseInt(i.replace(/\D/g, "")); + n = c.height / 2 + u / 3.65; + } + (this._context.fillStyle = r), this._context.fillText(e, t, n), s && this.update(a); + }), + (t.prototype.clone = function () { + var e = this.getScene(); + if (!e) return this; + var n = this.getSize(), + i = new t(this.name, n, e, this._generateMipMaps); + return (i.hasAlpha = this.hasAlpha), (i.level = this.level), (i.wrapU = this.wrapU), (i.wrapV = this.wrapV), i; + }), + (t.prototype.serialize = function () { + var t = this.getScene(); + t && !t.isReady() && r.a.Warn("The scene must be ready before serializing the dynamic texture"); + var n = e.prototype.serialize.call(this); + return this._canvas.toDataURL && (n.base64String = this._canvas.toDataURL()), (n.invertY = this._invertY), (n.samplingMode = this.samplingMode), n; + }), + (t.prototype._rebuild = function () { + this.update(); + }), + t + ); + })(o.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(56), + r = (function () { + function e() {} + return ( + Object.defineProperty(e, "Now", { + get: function () { + return i.a.IsWindowObjectExist() && window.performance && window.performance.now ? window.performance.now() : Date.now(); + }, + enumerable: !0, + configurable: !0, + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e, t, n, i) { + (this.x = e), (this.y = t), (this.width = n), (this.height = i); + } + return ( + (e.prototype.toGlobal = function (t, n) { + return new e(this.x * t, this.y * n, this.width * t, this.height * n); + }), + (e.prototype.toGlobalToRef = function (e, t, n) { + return (n.x = this.x * e), (n.y = this.y * t), (n.width = this.width * e), (n.height = this.height * t), this; + }), + (e.prototype.clone = function () { + return new e(this.x, this.y, this.width, this.height); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }), + n.d(t, "b", function () { + return l; + }); + var i = n(2), + r = n(4), + o = n(153), + a = n(63), + s = n(161), + c = (function () { + function e() { + (this._materialDefines = null), (this._materialEffect = null); + } + return ( + Object.defineProperty(e.prototype, "materialDefines", { + get: function () { + return this._materialDefines; + }, + set: function (e) { + this._materialDefines = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "effect", { + get: function () { + return this._materialEffect; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setEffect = function (e, t) { + void 0 === t && (t = null), this._materialEffect !== e ? ((this._materialDefines = t), (this._materialEffect = e)) : e || (this._materialDefines = null); + }), + e + ); + })(), + l = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === c && (c = !0); + var l = e.call(this) || this; + return ( + (l.materialIndex = t), + (l.verticesStart = n), + (l.verticesCount = i), + (l.indexStart = r), + (l.indexCount = o), + (l._linesIndexCount = 0), + (l._linesIndexBuffer = null), + (l._lastColliderWorldVertices = null), + (l._lastColliderTransformMatrix = null), + (l._renderId = 0), + (l._alphaIndex = 0), + (l._distanceToCamera = 0), + (l._currentMaterial = null), + (l._mesh = a), + (l._renderingMesh = s || a), + a.subMeshes.push(l), + (l._trianglePlanes = []), + (l._id = a.subMeshes.length - 1), + c && (l.refreshBoundingInfo(), a.computeWorldMatrix(!0)), + l + ); + } + return ( + Object(i.d)(t, e), + (t.AddToMesh = function (e, n, i, r, o, a, s, c) { + return void 0 === c && (c = !0), new t(e, n, i, r, o, a, s, c); + }), + Object.defineProperty(t.prototype, "IsGlobal", { + get: function () { + return 0 === this.verticesStart && this.verticesCount === this._mesh.getTotalVertices(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getBoundingInfo = function () { + return this.IsGlobal ? this._mesh.getBoundingInfo() : this._boundingInfo; + }), + (t.prototype.setBoundingInfo = function (e) { + return (this._boundingInfo = e), this; + }), + (t.prototype.getMesh = function () { + return this._mesh; + }), + (t.prototype.getRenderingMesh = function () { + return this._renderingMesh; + }), + (t.prototype.getMaterial = function () { + var e = this._renderingMesh.material; + if (null == e) return this._mesh.getScene().defaultMaterial; + if (e.getSubMaterial) { + var t = e.getSubMaterial(this.materialIndex); + return this._currentMaterial !== t && ((this._currentMaterial = t), (this._materialDefines = null)), t; + } + return e; + }), + (t.prototype.refreshBoundingInfo = function (e) { + if ((void 0 === e && (e = null), (this._lastColliderWorldVertices = null), this.IsGlobal || !this._renderingMesh || !this._renderingMesh.geometry)) return this; + if ((e || (e = this._renderingMesh.getVerticesData(r.b.PositionKind)), !e)) return (this._boundingInfo = this._mesh.getBoundingInfo()), this; + var t, + n = this._renderingMesh.getIndices(); + if (0 === this.indexStart && this.indexCount === n.length) { + var i = this._renderingMesh.getBoundingInfo(); + t = { minimum: i.minimum.clone(), maximum: i.maximum.clone() }; + } else t = Object(s.b)(e, n, this.indexStart, this.indexCount, this._renderingMesh.geometry.boundingBias); + return this._boundingInfo ? this._boundingInfo.reConstruct(t.minimum, t.maximum) : (this._boundingInfo = new a.a(t.minimum, t.maximum)), this; + }), + (t.prototype._checkCollision = function (e) { + return this.getBoundingInfo()._checkCollision(e); + }), + (t.prototype.updateBoundingInfo = function (e) { + var t = this.getBoundingInfo(); + return t || (this.refreshBoundingInfo(), (t = this.getBoundingInfo())), t && t.update(e), this; + }), + (t.prototype.isInFrustum = function (e) { + var t = this.getBoundingInfo(); + return !!t && t.isInFrustum(e, this._mesh.cullingStrategy); + }), + (t.prototype.isCompletelyInFrustum = function (e) { + var t = this.getBoundingInfo(); + return !!t && t.isCompletelyInFrustum(e); + }), + (t.prototype.render = function (e) { + return this._renderingMesh.render(this, e, this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh ? this._mesh : void 0), this; + }), + (t.prototype._getLinesIndexBuffer = function (e, t) { + if (!this._linesIndexBuffer) { + for (var n = [], i = this.indexStart; i < this.indexStart + this.indexCount; i += 3) n.push(e[i], e[i + 1], e[i + 1], e[i + 2], e[i + 2], e[i]); + (this._linesIndexBuffer = t.createIndexBuffer(n)), (this._linesIndexCount = n.length); + } + return this._linesIndexBuffer; + }), + (t.prototype.canIntersects = function (e) { + var t = this.getBoundingInfo(); + return !!t && e.intersectsBox(t.boundingBox); + }), + (t.prototype.intersects = function (e, t, n, i, r) { + var o = this.getMaterial(); + if (!o) return null; + var a = 3, + s = !1; + switch (o.fillMode) { + case 3: + case 4: + case 5: + case 6: + case 8: + return null; + case 7: + (a = 1), (s = !0); + } + return "InstancedLinesMesh" === this._mesh.getClassName() || "LinesMesh" === this._mesh.getClassName() + ? n.length + ? this._intersectLines(e, t, n, this._mesh.intersectionThreshold, i) + : this._intersectUnIndexedLines(e, t, n, this._mesh.intersectionThreshold, i) + : !n.length && this._mesh._unIndexed + ? this._intersectUnIndexedTriangles(e, t, n, i, r) + : this._intersectTriangles(e, t, n, a, s, i, r); + }), + (t.prototype._intersectLines = function (e, t, n, i, r) { + for (var a = null, s = this.indexStart; s < this.indexStart + this.indexCount; s += 2) { + var c = t[n[s]], + l = t[n[s + 1]], + u = e.intersectionSegment(c, l, i); + if (!(u < 0) && (r || !a || u < a.distance) && (((a = new o.a(null, null, u)).faceId = s / 2), r)) break; + } + return a; + }), + (t.prototype._intersectUnIndexedLines = function (e, t, n, i, r) { + for (var a = null, s = this.verticesStart; s < this.verticesStart + this.verticesCount; s += 2) { + var c = t[s], + l = t[s + 1], + u = e.intersectionSegment(c, l, i); + if (!(u < 0) && (r || !a || u < a.distance) && (((a = new o.a(null, null, u)).faceId = s / 2), r)) break; + } + return a; + }), + (t.prototype._intersectTriangles = function (e, t, n, i, r, o, a) { + for (var s = null, c = -1, l = this.indexStart; l < this.indexStart + this.indexCount; l += i) { + c++; + var u = n[l], + h = n[l + 1], + d = n[l + 2]; + if (r && 4294967295 === d) l += 2; + else { + var p = t[u], + f = t[h], + m = t[d]; + if (!a || a(p, f, m, e)) { + var g = e.intersectsTriangle(p, f, m); + if (g) { + if (g.distance < 0) continue; + if ((o || !s || g.distance < s.distance) && (((s = g).faceId = c), o)) break; + } + } + } + } + return s; + }), + (t.prototype._intersectUnIndexedTriangles = function (e, t, n, i, r) { + for (var o = null, a = this.verticesStart; a < this.verticesStart + this.verticesCount; a += 3) { + var s = t[a], + c = t[a + 1], + l = t[a + 2]; + if (!r || r(s, c, l, e)) { + var u = e.intersectsTriangle(s, c, l); + if (u) { + if (u.distance < 0) continue; + if ((i || !o || u.distance < o.distance) && (((o = u).faceId = a / 3), i)) break; + } + } + } + return o; + }), + (t.prototype._rebuild = function () { + this._linesIndexBuffer && (this._linesIndexBuffer = null); + }), + (t.prototype.clone = function (e, n) { + var i = new t(this.materialIndex, this.verticesStart, this.verticesCount, this.indexStart, this.indexCount, e, n, !1); + if (!this.IsGlobal) { + var r = this.getBoundingInfo(); + if (!r) return i; + i._boundingInfo = new a.a(r.minimum, r.maximum); + } + return i; + }), + (t.prototype.dispose = function () { + this._linesIndexBuffer && (this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer), (this._linesIndexBuffer = null)); + var e = this._mesh.subMeshes.indexOf(this); + this._mesh.subMeshes.splice(e, 1); + }), + (t.prototype.getClassName = function () { + return "SubMesh"; + }), + (t.CreateFromIndices = function (e, n, i, r, o) { + for (var a = Number.MAX_VALUE, s = -Number.MAX_VALUE, c = (o || r).getIndices(), l = n; l < n + i; l++) { + var u = c[l]; + u < a && (a = u), u > s && (s = u); + } + return new t(e, a, s - a + 1, n, i, r, o); + }), + t + ); + })(c); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return p; + }); + var i = n(1), + r = n(5), + o = n(16), + a = n(4), + s = n(78), + c = n(103), + l = n(63), + u = n(12), + h = n(45), + d = n(161), + p = (function () { + function e(e, t, n, i, r) { + void 0 === i && (i = !1), + void 0 === r && (r = null), + (this.delayLoadState = 0), + (this._totalVertices = 0), + (this._isDisposed = !1), + (this._indexBufferIsUpdatable = !1), + (this.id = e), + (this.uniqueId = t.getUniqueId()), + (this._engine = t.getEngine()), + (this._meshes = []), + (this._scene = t), + (this._vertexBuffers = {}), + (this._indices = []), + (this._updatable = i), + n ? this.setAllVerticesData(n, i) : ((this._totalVertices = 0), (this._indices = [])), + this._engine.getCaps().vertexArrayObject && (this._vertexArrayObjects = {}), + r && (this.applyToMesh(r), r.computeWorldMatrix(!0)); + } + return ( + Object.defineProperty(e.prototype, "boundingBias", { + get: function () { + return this._boundingBias; + }, + set: function (e) { + this._boundingBias ? this._boundingBias.copyFrom(e) : (this._boundingBias = e.clone()), this._updateBoundingInfo(!0, null); + }, + enumerable: !0, + configurable: !0, + }), + (e.CreateGeometryForMesh = function (t) { + var n = new e(e.RandomId(), t.getScene()); + return n.applyToMesh(t), n; + }), + Object.defineProperty(e.prototype, "extend", { + get: function () { + return this._extend; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.getEngine = function () { + return this._engine; + }), + (e.prototype.isReady = function () { + return 1 === this.delayLoadState || 0 === this.delayLoadState; + }), + Object.defineProperty(e.prototype, "doNotSerialize", { + get: function () { + for (var e = 0; e < this._meshes.length; e++) if (!this._meshes[e].doNotSerialize) return !1; + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._rebuild = function () { + for (var e in (this._vertexArrayObjects && (this._vertexArrayObjects = {}), 0 !== this._meshes.length && this._indices && (this._indexBuffer = this._engine.createIndexBuffer(this._indices)), this._vertexBuffers)) { + this._vertexBuffers[e]._rebuild(); + } + }), + (e.prototype.setAllVerticesData = function (e, t) { + e.applyToGeometry(this, t), this.notifyUpdate(); + }), + (e.prototype.setVerticesData = function (e, t, n, i) { + void 0 === n && (n = !1); + var r = new a.b(this._engine, t, e, n, 0 === this._meshes.length, i); + this.setVerticesBuffer(r); + }), + (e.prototype.removeVerticesData = function (e) { + this._vertexBuffers[e] && (this._vertexBuffers[e].dispose(), delete this._vertexBuffers[e]); + }), + (e.prototype.setVerticesBuffer = function (e, t) { + void 0 === t && (t = null); + var n = e.getKind(); + if ((this._vertexBuffers[n] && this._vertexBuffers[n].dispose(), (this._vertexBuffers[n] = e), n === a.b.PositionKind)) { + var i = e.getData(); + null != t ? (this._totalVertices = t) : null != i && (this._totalVertices = i.length / (e.byteStride / 4)), this._updateExtend(i), this._resetPointsArrayCache(); + for (var r = this._meshes, o = r.length, s = 0; s < o; s++) { + var c = r[s]; + (c._boundingInfo = new l.a(this._extend.minimum, this._extend.maximum)), c._createGlobalSubMesh(!1), c.computeWorldMatrix(!0); + } + } + this.notifyUpdate(n), this._vertexArrayObjects && (this._disposeVertexArrayObjects(), (this._vertexArrayObjects = {})); + }), + (e.prototype.updateVerticesDataDirectly = function (e, t, n, i) { + void 0 === i && (i = !1); + var r = this.getVertexBuffer(e); + r && (r.updateDirectly(t, n, i), this.notifyUpdate(e)); + }), + (e.prototype.updateVerticesData = function (e, t, n) { + void 0 === n && (n = !1); + var i = this.getVertexBuffer(e); + i && (i.update(t), e === a.b.PositionKind && this._updateBoundingInfo(n, t), this.notifyUpdate(e)); + }), + (e.prototype._updateBoundingInfo = function (e, t) { + if ((e && this._updateExtend(t), this._resetPointsArrayCache(), e)) + for (var n = 0, i = this._meshes; n < i.length; n++) { + var r = i[n]; + r._boundingInfo ? r._boundingInfo.reConstruct(this._extend.minimum, this._extend.maximum) : (r._boundingInfo = new l.a(this._extend.minimum, this._extend.maximum)); + for (var o = 0, a = r.subMeshes; o < a.length; o++) { + a[o].refreshBoundingInfo(); + } + } + }), + (e.prototype._bind = function (e, t) { + if (e) { + void 0 === t && (t = this._indexBuffer); + var n = this.getVertexBuffers(); + n && + (t == this._indexBuffer && this._vertexArrayObjects + ? (this._vertexArrayObjects[e.key] || (this._vertexArrayObjects[e.key] = this._engine.recordVertexArrayObject(n, t, e)), this._engine.bindVertexArrayObject(this._vertexArrayObjects[e.key], t)) + : this._engine.bindBuffers(n, t, e)); + } + }), + (e.prototype.getTotalVertices = function () { + return this.isReady() ? this._totalVertices : 0; + }), + (e.prototype.getVerticesData = function (e, t, n) { + var i = this.getVertexBuffer(e); + if (!i) return null; + var r = i.getData(); + if (!r) return null; + var o = i.getSize() * a.b.GetTypeByteLength(i.type), + s = this._totalVertices * i.getSize(); + if (i.type !== a.b.FLOAT || i.byteStride !== o) { + var c = []; + return ( + i.forEach(s, function (e) { + return c.push(e); + }), + c + ); + } + if (!(r instanceof Array || r instanceof Float32Array) || 0 !== i.byteOffset || r.length !== s) { + if (r instanceof Array) { + var l = i.byteOffset / 4; + return u.b.Slice(r, l, l + s); + } + if (r instanceof ArrayBuffer) return new Float32Array(r, i.byteOffset, s); + l = r.byteOffset + i.byteOffset; + if (n || (t && 1 !== this._meshes.length)) { + var h = new Float32Array(s), + d = new Float32Array(r.buffer, l, s); + return h.set(d), h; + } + return new Float32Array(r.buffer, l, s); + } + return n || (t && 1 !== this._meshes.length) ? u.b.Slice(r) : r; + }), + (e.prototype.isVertexBufferUpdatable = function (e) { + var t = this._vertexBuffers[e]; + return !!t && t.isUpdatable(); + }), + (e.prototype.getVertexBuffer = function (e) { + return this.isReady() ? this._vertexBuffers[e] : null; + }), + (e.prototype.getVertexBuffers = function () { + return this.isReady() ? this._vertexBuffers : null; + }), + (e.prototype.isVerticesDataPresent = function (e) { + return this._vertexBuffers ? void 0 !== this._vertexBuffers[e] : !!this._delayInfo && -1 !== this._delayInfo.indexOf(e); + }), + (e.prototype.getVerticesDataKinds = function () { + var e, + t = []; + if (!this._vertexBuffers && this._delayInfo) for (e in this._delayInfo) t.push(e); + else for (e in this._vertexBuffers) t.push(e); + return t; + }), + (e.prototype.updateIndices = function (e, t, n) { + if ((void 0 === n && (n = !1), this._indexBuffer)) + if (this._indexBufferIsUpdatable) { + var i = e.length !== this._indices.length; + if ((n || (this._indices = e.slice()), this._engine.updateDynamicIndexBuffer(this._indexBuffer, e, t), i)) + for (var r = 0, o = this._meshes; r < o.length; r++) { + o[r]._createGlobalSubMesh(!0); + } + } else this.setIndices(e, null, !0); + }), + (e.prototype.setIndices = function (e, t, n) { + void 0 === t && (t = null), + void 0 === n && (n = !1), + this._indexBuffer && this._engine._releaseBuffer(this._indexBuffer), + this._disposeVertexArrayObjects(), + (this._indices = e), + (this._indexBufferIsUpdatable = n), + 0 !== this._meshes.length && this._indices && (this._indexBuffer = this._engine.createIndexBuffer(this._indices, n)), + null != t && (this._totalVertices = t); + for (var i = 0, r = this._meshes; i < r.length; i++) { + r[i]._createGlobalSubMesh(!0); + } + this.notifyUpdate(); + }), + (e.prototype.getTotalIndices = function () { + return this.isReady() ? this._indices.length : 0; + }), + (e.prototype.getIndices = function (e, t) { + if (!this.isReady()) return null; + var n = this._indices; + if (t || (e && 1 !== this._meshes.length)) { + for (var i = n.length, r = [], o = 0; o < i; o++) r.push(n[o]); + return r; + } + return n; + }), + (e.prototype.getIndexBuffer = function () { + return this.isReady() ? this._indexBuffer : null; + }), + (e.prototype._releaseVertexArrayObject = function (e) { + void 0 === e && (e = null), e && this._vertexArrayObjects && this._vertexArrayObjects[e.key] && (this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e.key]), delete this._vertexArrayObjects[e.key]); + }), + (e.prototype.releaseForMesh = function (e, t) { + var n = this._meshes, + i = n.indexOf(e); + -1 !== i && (n.splice(i, 1), (e._geometry = null), 0 === n.length && t && this.dispose()); + }), + (e.prototype.applyToMesh = function (e) { + if (e._geometry !== this) { + var t = e._geometry; + t && t.releaseForMesh(e); + var n = this._meshes; + (e._geometry = this), this._scene.pushGeometry(this), n.push(e), this.isReady() ? this._applyToMesh(e) : (e._boundingInfo = this._boundingInfo); + } + }), + (e.prototype._updateExtend = function (e) { + void 0 === e && (e = null), e || (e = this.getVerticesData(a.b.PositionKind)), (this._extend = Object(d.a)(e, 0, this._totalVertices, this.boundingBias, 3)); + }), + (e.prototype._applyToMesh = function (e) { + var t = this._meshes.length; + for (var n in this._vertexBuffers) { + 1 === t && this._vertexBuffers[n].create(); + var i = this._vertexBuffers[n].getBuffer(); + i && (i.references = t), + n === a.b.PositionKind && (this._extend || this._updateExtend(), (e._boundingInfo = new l.a(this._extend.minimum, this._extend.maximum)), e._createGlobalSubMesh(!1), e._updateBoundingInfo()); + } + 1 === t && this._indices && this._indices.length > 0 && (this._indexBuffer = this._engine.createIndexBuffer(this._indices)), + this._indexBuffer && (this._indexBuffer.references = t), + e._syncGeometryWithMorphTargetManager(), + e.synchronizeInstances(); + }), + (e.prototype.notifyUpdate = function (e) { + this.onGeometryUpdated && this.onGeometryUpdated(this, e); + for (var t = 0, n = this._meshes; t < n.length; t++) { + n[t]._markSubMeshesAsAttributesDirty(); + } + }), + (e.prototype.load = function (e, t) { + 2 !== this.delayLoadState && (this.isReady() ? t && t() : ((this.delayLoadState = 2), this._queueLoad(e, t))); + }), + (e.prototype._queueLoad = function (e, t) { + var n = this; + this.delayLoadingFile && + (e._addPendingData(this), + e._loadFile( + this.delayLoadingFile, + function (i) { + if (n._delayLoadingFunction) { + n._delayLoadingFunction(JSON.parse(i), n), (n.delayLoadState = 1), (n._delayInfo = []), e._removePendingData(n); + for (var r = n._meshes, o = r.length, a = 0; a < o; a++) n._applyToMesh(r[a]); + t && t(); + } + }, + void 0, + !0 + )); + }), + (e.prototype.toLeftHanded = function () { + var e = this.getIndices(!1); + if (null != e && e.length > 0) { + for (var t = 0; t < e.length; t += 3) { + var n = e[t + 0]; + (e[t + 0] = e[t + 2]), (e[t + 2] = n); + } + this.setIndices(e); + } + var i = this.getVerticesData(a.b.PositionKind, !1); + if (null != i && i.length > 0) { + for (t = 0; t < i.length; t += 3) i[t + 2] = -i[t + 2]; + this.setVerticesData(a.b.PositionKind, i, !1); + } + var r = this.getVerticesData(a.b.NormalKind, !1); + if (null != r && r.length > 0) { + for (t = 0; t < r.length; t += 3) r[t + 2] = -r[t + 2]; + this.setVerticesData(a.b.NormalKind, r, !1); + } + }), + (e.prototype._resetPointsArrayCache = function () { + this._positions = null; + }), + (e.prototype._generatePointsArray = function () { + if (this._positions) return !0; + var e = this.getVerticesData(a.b.PositionKind); + if (!e || 0 === e.length) return !1; + this._positions = []; + for (var t = 0; t < e.length; t += 3) this._positions.push(i.e.FromArray(e, t)); + return !0; + }), + (e.prototype.isDisposed = function () { + return this._isDisposed; + }), + (e.prototype._disposeVertexArrayObjects = function () { + if (this._vertexArrayObjects) { + for (var e in this._vertexArrayObjects) this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e]); + this._vertexArrayObjects = {}; + } + }), + (e.prototype.dispose = function () { + var e, + t = this._meshes, + n = t.length; + for (e = 0; e < n; e++) this.releaseForMesh(t[e]); + for (var i in ((this._meshes = []), this._disposeVertexArrayObjects(), this._vertexBuffers)) this._vertexBuffers[i].dispose(); + (this._vertexBuffers = {}), + (this._totalVertices = 0), + this._indexBuffer && this._engine._releaseBuffer(this._indexBuffer), + (this._indexBuffer = null), + (this._indices = []), + (this.delayLoadState = 0), + (this.delayLoadingFile = null), + (this._delayLoadingFunction = null), + (this._delayInfo = []), + (this._boundingInfo = null), + this._scene.removeGeometry(this), + (this._isDisposed = !0); + }), + (e.prototype.copy = function (t) { + var n = new o.a(); + n.indices = []; + var i = this.getIndices(); + if (i) for (var r = 0; r < i.length; r++) n.indices.push(i[r]); + var a, + s = !1, + c = !1; + for (a in this._vertexBuffers) { + var u = this.getVerticesData(a); + if (u && (u instanceof Float32Array ? n.set(new Float32Array(u), a) : n.set(u.slice(0), a), !c)) { + var h = this.getVertexBuffer(a); + h && (c = !(s = h.isUpdatable())); + } + } + var d = new e(t, this._scene, n, s); + for (a in ((d.delayLoadState = this.delayLoadState), (d.delayLoadingFile = this.delayLoadingFile), (d._delayLoadingFunction = this._delayLoadingFunction), this._delayInfo)) + (d._delayInfo = d._delayInfo || []), d._delayInfo.push(a); + return (d._boundingInfo = new l.a(this._extend.minimum, this._extend.maximum)), d; + }), + (e.prototype.serialize = function () { + var e = {}; + return (e.id = this.id), (e.updatable = this._updatable), h.a && h.a.HasTags(this) && (e.tags = h.a.GetTags(this)), e; + }), + (e.prototype.toNumberArray = function (e) { + return Array.isArray(e) ? e : Array.prototype.slice.call(e); + }), + (e.prototype.serializeVerticeData = function () { + var e = this.serialize(); + return ( + this.isVerticesDataPresent(a.b.PositionKind) && ((e.positions = this.toNumberArray(this.getVerticesData(a.b.PositionKind))), this.isVertexBufferUpdatable(a.b.PositionKind) && (e.positions._updatable = !0)), + this.isVerticesDataPresent(a.b.NormalKind) && ((e.normals = this.toNumberArray(this.getVerticesData(a.b.NormalKind))), this.isVertexBufferUpdatable(a.b.NormalKind) && (e.normals._updatable = !0)), + this.isVerticesDataPresent(a.b.TangentKind) && ((e.tangets = this.toNumberArray(this.getVerticesData(a.b.TangentKind))), this.isVertexBufferUpdatable(a.b.TangentKind) && (e.tangets._updatable = !0)), + this.isVerticesDataPresent(a.b.UVKind) && ((e.uvs = this.toNumberArray(this.getVerticesData(a.b.UVKind))), this.isVertexBufferUpdatable(a.b.UVKind) && (e.uvs._updatable = !0)), + this.isVerticesDataPresent(a.b.UV2Kind) && ((e.uv2s = this.toNumberArray(this.getVerticesData(a.b.UV2Kind))), this.isVertexBufferUpdatable(a.b.UV2Kind) && (e.uv2s._updatable = !0)), + this.isVerticesDataPresent(a.b.UV3Kind) && ((e.uv3s = this.toNumberArray(this.getVerticesData(a.b.UV3Kind))), this.isVertexBufferUpdatable(a.b.UV3Kind) && (e.uv3s._updatable = !0)), + this.isVerticesDataPresent(a.b.UV4Kind) && ((e.uv4s = this.toNumberArray(this.getVerticesData(a.b.UV4Kind))), this.isVertexBufferUpdatable(a.b.UV4Kind) && (e.uv4s._updatable = !0)), + this.isVerticesDataPresent(a.b.UV5Kind) && ((e.uv5s = this.toNumberArray(this.getVerticesData(a.b.UV5Kind))), this.isVertexBufferUpdatable(a.b.UV5Kind) && (e.uv5s._updatable = !0)), + this.isVerticesDataPresent(a.b.UV6Kind) && ((e.uv6s = this.toNumberArray(this.getVerticesData(a.b.UV6Kind))), this.isVertexBufferUpdatable(a.b.UV6Kind) && (e.uv6s._updatable = !0)), + this.isVerticesDataPresent(a.b.ColorKind) && ((e.colors = this.toNumberArray(this.getVerticesData(a.b.ColorKind))), this.isVertexBufferUpdatable(a.b.ColorKind) && (e.colors._updatable = !0)), + this.isVerticesDataPresent(a.b.MatricesIndicesKind) && + ((e.matricesIndices = this.toNumberArray(this.getVerticesData(a.b.MatricesIndicesKind))), + (e.matricesIndices._isExpanded = !0), + this.isVertexBufferUpdatable(a.b.MatricesIndicesKind) && (e.matricesIndices._updatable = !0)), + this.isVerticesDataPresent(a.b.MatricesWeightsKind) && + ((e.matricesWeights = this.toNumberArray(this.getVerticesData(a.b.MatricesWeightsKind))), this.isVertexBufferUpdatable(a.b.MatricesWeightsKind) && (e.matricesWeights._updatable = !0)), + (e.indices = this.toNumberArray(this.getIndices())), + e + ); + }), + (e.ExtractFromMesh = function (e, t) { + var n = e._geometry; + return n ? n.copy(t) : null; + }), + (e.RandomId = function () { + return u.b.RandomId(); + }), + (e._ImportGeometry = function (t, n) { + var i = n.getScene(), + o = t.geometryId; + if (o) { + var c = i.getGeometryByID(o); + c && c.applyToMesh(n); + } else if (t instanceof ArrayBuffer) { + var l = n._binaryInfo; + if (l.positionsAttrDesc && l.positionsAttrDesc.count > 0) { + var u = new Float32Array(t, l.positionsAttrDesc.offset, l.positionsAttrDesc.count); + n.setVerticesData(a.b.PositionKind, u, !1); + } + if (l.normalsAttrDesc && l.normalsAttrDesc.count > 0) { + var h = new Float32Array(t, l.normalsAttrDesc.offset, l.normalsAttrDesc.count); + n.setVerticesData(a.b.NormalKind, h, !1); + } + if (l.tangetsAttrDesc && l.tangetsAttrDesc.count > 0) { + var d = new Float32Array(t, l.tangetsAttrDesc.offset, l.tangetsAttrDesc.count); + n.setVerticesData(a.b.TangentKind, d, !1); + } + if (l.uvsAttrDesc && l.uvsAttrDesc.count > 0) { + var p = new Float32Array(t, l.uvsAttrDesc.offset, l.uvsAttrDesc.count); + n.setVerticesData(a.b.UVKind, p, !1); + } + if (l.uvs2AttrDesc && l.uvs2AttrDesc.count > 0) { + var f = new Float32Array(t, l.uvs2AttrDesc.offset, l.uvs2AttrDesc.count); + n.setVerticesData(a.b.UV2Kind, f, !1); + } + if (l.uvs3AttrDesc && l.uvs3AttrDesc.count > 0) { + var m = new Float32Array(t, l.uvs3AttrDesc.offset, l.uvs3AttrDesc.count); + n.setVerticesData(a.b.UV3Kind, m, !1); + } + if (l.uvs4AttrDesc && l.uvs4AttrDesc.count > 0) { + var g = new Float32Array(t, l.uvs4AttrDesc.offset, l.uvs4AttrDesc.count); + n.setVerticesData(a.b.UV4Kind, g, !1); + } + if (l.uvs5AttrDesc && l.uvs5AttrDesc.count > 0) { + var b = new Float32Array(t, l.uvs5AttrDesc.offset, l.uvs5AttrDesc.count); + n.setVerticesData(a.b.UV5Kind, b, !1); + } + if (l.uvs6AttrDesc && l.uvs6AttrDesc.count > 0) { + var _ = new Float32Array(t, l.uvs6AttrDesc.offset, l.uvs6AttrDesc.count); + n.setVerticesData(a.b.UV6Kind, _, !1); + } + if (l.colorsAttrDesc && l.colorsAttrDesc.count > 0) { + var v = new Float32Array(t, l.colorsAttrDesc.offset, l.colorsAttrDesc.count); + n.setVerticesData(a.b.ColorKind, v, !1, l.colorsAttrDesc.stride); + } + if (l.matricesIndicesAttrDesc && l.matricesIndicesAttrDesc.count > 0) { + for (var y = new Int32Array(t, l.matricesIndicesAttrDesc.offset, l.matricesIndicesAttrDesc.count), C = [], P = 0; P < y.length; P++) { + var x = y[P]; + C.push(255 & x), C.push((65280 & x) >> 8), C.push((16711680 & x) >> 16), C.push(x >> 24); + } + n.setVerticesData(a.b.MatricesIndicesKind, C, !1); + } + if (l.matricesWeightsAttrDesc && l.matricesWeightsAttrDesc.count > 0) { + var T = new Float32Array(t, l.matricesWeightsAttrDesc.offset, l.matricesWeightsAttrDesc.count); + n.setVerticesData(a.b.MatricesWeightsKind, T, !1); + } + if (l.indicesAttrDesc && l.indicesAttrDesc.count > 0) { + var S = new Int32Array(t, l.indicesAttrDesc.offset, l.indicesAttrDesc.count); + n.setIndices(S, null); + } + if (l.subMeshesAttrDesc && l.subMeshesAttrDesc.count > 0) { + var O = new Int32Array(t, l.subMeshesAttrDesc.offset, 5 * l.subMeshesAttrDesc.count); + n.subMeshes = []; + for (P = 0; P < l.subMeshesAttrDesc.count; P++) { + var E = O[5 * P + 0], + M = O[5 * P + 1], + A = O[5 * P + 2], + I = O[5 * P + 3], + D = O[5 * P + 4]; + s.b.AddToMesh(E, M, A, I, D, n); + } + } + } else if (t.positions && t.normals && t.indices) { + if ( + (n.setVerticesData(a.b.PositionKind, t.positions, t.positions._updatable), + n.setVerticesData(a.b.NormalKind, t.normals, t.normals._updatable), + t.tangents && n.setVerticesData(a.b.TangentKind, t.tangents, t.tangents._updatable), + t.uvs && n.setVerticesData(a.b.UVKind, t.uvs, t.uvs._updatable), + t.uvs2 && n.setVerticesData(a.b.UV2Kind, t.uvs2, t.uvs2._updatable), + t.uvs3 && n.setVerticesData(a.b.UV3Kind, t.uvs3, t.uvs3._updatable), + t.uvs4 && n.setVerticesData(a.b.UV4Kind, t.uvs4, t.uvs4._updatable), + t.uvs5 && n.setVerticesData(a.b.UV5Kind, t.uvs5, t.uvs5._updatable), + t.uvs6 && n.setVerticesData(a.b.UV6Kind, t.uvs6, t.uvs6._updatable), + t.colors && n.setVerticesData(a.b.ColorKind, r.b.CheckColors4(t.colors, t.positions.length / 3), t.colors._updatable), + t.matricesIndices) + ) + if (t.matricesIndices._isExpanded) delete t.matricesIndices._isExpanded, n.setVerticesData(a.b.MatricesIndicesKind, t.matricesIndices, t.matricesIndices._updatable); + else { + for (C = [], P = 0; P < t.matricesIndices.length; P++) { + var R = t.matricesIndices[P]; + C.push(255 & R), C.push((65280 & R) >> 8), C.push((16711680 & R) >> 16), C.push(R >> 24); + } + n.setVerticesData(a.b.MatricesIndicesKind, C, t.matricesIndices._updatable); + } + if (t.matricesIndicesExtra) + if (t.matricesIndicesExtra._isExpanded) delete t.matricesIndices._isExpanded, n.setVerticesData(a.b.MatricesIndicesExtraKind, t.matricesIndicesExtra, t.matricesIndicesExtra._updatable); + else { + for (C = [], P = 0; P < t.matricesIndicesExtra.length; P++) { + R = t.matricesIndicesExtra[P]; + C.push(255 & R), C.push((65280 & R) >> 8), C.push((16711680 & R) >> 16), C.push(R >> 24); + } + n.setVerticesData(a.b.MatricesIndicesExtraKind, C, t.matricesIndicesExtra._updatable); + } + t.matricesWeights && (e._CleanMatricesWeights(t, n), n.setVerticesData(a.b.MatricesWeightsKind, t.matricesWeights, t.matricesWeights._updatable)), + t.matricesWeightsExtra && n.setVerticesData(a.b.MatricesWeightsExtraKind, t.matricesWeightsExtra, t.matricesWeights._updatable), + n.setIndices(t.indices, null); + } + if (t.subMeshes) { + n.subMeshes = []; + for (var w = 0; w < t.subMeshes.length; w++) { + var L = t.subMeshes[w]; + s.b.AddToMesh(L.materialIndex, L.verticesStart, L.verticesCount, L.indexStart, L.indexCount, n); + } + } + n._shouldGenerateFlatShading && (n.convertToFlatShadedMesh(), delete n._shouldGenerateFlatShading), n.computeWorldMatrix(!0), i.onMeshImportedObservable.notifyObservers(n); + }), + (e._CleanMatricesWeights = function (e, t) { + if (c.a.CleanBoneMatrixWeights) { + var n = 0; + if (e.skeletonId > -1) { + var i = t.getScene().getLastSkeletonByID(e.skeletonId); + if (i) { + n = i.bones.length; + for ( + var r = t.getVerticesData(a.b.MatricesIndicesKind), + o = t.getVerticesData(a.b.MatricesIndicesExtraKind), + s = e.matricesWeights, + l = e.matricesWeightsExtra, + u = e.numBoneInfluencer, + h = s.length, + d = 0; + d < h; + d += 4 + ) { + for (var p = 0, f = -1, m = 0; m < 4; m++) { + (p += g = s[d + m]), g < 0.001 && f < 0 && (f = m); + } + if (l) + for (m = 0; m < 4; m++) { + var g; + (p += g = l[d + m]), g < 0.001 && f < 0 && (f = m + 4); + } + if (((f < 0 || f > u - 1) && (f = u - 1), p > 0.001)) { + var b = 1 / p; + for (m = 0; m < 4; m++) s[d + m] *= b; + if (l) for (m = 0; m < 4; m++) l[d + m] *= b; + } else f >= 4 ? ((l[d + f - 4] = 1 - p), (o[d + f - 4] = n)) : ((s[d + f] = 1 - p), (r[d + f] = n)); + } + t.setVerticesData(a.b.MatricesIndicesKind, r), e.matricesWeightsExtra && t.setVerticesData(a.b.MatricesIndicesExtraKind, o); + } + } + } + }), + (e.Parse = function (t, n, r) { + if (n.getGeometryByID(t.id)) return null; + var s = new e(t.id, n, void 0, t.updatable); + return ( + h.a && h.a.AddTagsTo(s, t.tags), + t.delayLoadingFile + ? ((s.delayLoadState = 4), + (s.delayLoadingFile = r + t.delayLoadingFile), + (s._boundingInfo = new l.a(i.e.FromArray(t.boundingBoxMinimum), i.e.FromArray(t.boundingBoxMaximum))), + (s._delayInfo = []), + t.hasUVs && s._delayInfo.push(a.b.UVKind), + t.hasUVs2 && s._delayInfo.push(a.b.UV2Kind), + t.hasUVs3 && s._delayInfo.push(a.b.UV3Kind), + t.hasUVs4 && s._delayInfo.push(a.b.UV4Kind), + t.hasUVs5 && s._delayInfo.push(a.b.UV5Kind), + t.hasUVs6 && s._delayInfo.push(a.b.UV6Kind), + t.hasColors && s._delayInfo.push(a.b.ColorKind), + t.hasMatricesIndices && s._delayInfo.push(a.b.MatricesIndicesKind), + t.hasMatricesWeights && s._delayInfo.push(a.b.MatricesWeightsKind), + (s._delayLoadingFunction = o.a.ImportVertexData)) + : o.a.ImportVertexData(t, s), + n.pushGeometry(s, !0), + s + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.ALPHA_DISABLE = 0), + (e.ALPHA_ADD = 1), + (e.ALPHA_COMBINE = 2), + (e.ALPHA_SUBTRACT = 3), + (e.ALPHA_MULTIPLY = 4), + (e.ALPHA_MAXIMIZED = 5), + (e.ALPHA_ONEONE = 6), + (e.ALPHA_PREMULTIPLIED = 7), + (e.ALPHA_PREMULTIPLIED_PORTERDUFF = 8), + (e.ALPHA_INTERPOLATE = 9), + (e.ALPHA_SCREENMODE = 10), + (e.ALPHA_ONEONE_ONEONE = 11), + (e.ALPHA_ALPHATOCOLOR = 12), + (e.ALPHA_REVERSEONEMINUS = 13), + (e.ALPHA_SRC_DSTONEMINUSSRCALPHA = 14), + (e.ALPHA_ONEONE_ONEZERO = 15), + (e.ALPHA_EXCLUSION = 16), + (e.ALPHA_EQUATION_ADD = 0), + (e.ALPHA_EQUATION_SUBSTRACT = 1), + (e.ALPHA_EQUATION_REVERSE_SUBTRACT = 2), + (e.ALPHA_EQUATION_MAX = 3), + (e.ALPHA_EQUATION_MIN = 4), + (e.ALPHA_EQUATION_DARKEN = 5), + (e.DELAYLOADSTATE_NONE = 0), + (e.DELAYLOADSTATE_LOADED = 1), + (e.DELAYLOADSTATE_LOADING = 2), + (e.DELAYLOADSTATE_NOTLOADED = 4), + (e.NEVER = 512), + (e.ALWAYS = 519), + (e.LESS = 513), + (e.EQUAL = 514), + (e.LEQUAL = 515), + (e.GREATER = 516), + (e.GEQUAL = 518), + (e.NOTEQUAL = 517), + (e.KEEP = 7680), + (e.REPLACE = 7681), + (e.INCR = 7682), + (e.DECR = 7683), + (e.INVERT = 5386), + (e.INCR_WRAP = 34055), + (e.DECR_WRAP = 34056), + (e.TEXTURE_CLAMP_ADDRESSMODE = 0), + (e.TEXTURE_WRAP_ADDRESSMODE = 1), + (e.TEXTURE_MIRROR_ADDRESSMODE = 2), + (e.TEXTUREFORMAT_ALPHA = 0), + (e.TEXTUREFORMAT_LUMINANCE = 1), + (e.TEXTUREFORMAT_LUMINANCE_ALPHA = 2), + (e.TEXTUREFORMAT_RGB = 4), + (e.TEXTUREFORMAT_RGBA = 5), + (e.TEXTUREFORMAT_RED = 6), + (e.TEXTUREFORMAT_R = 6), + (e.TEXTUREFORMAT_RG = 7), + (e.TEXTUREFORMAT_RED_INTEGER = 8), + (e.TEXTUREFORMAT_R_INTEGER = 8), + (e.TEXTUREFORMAT_RG_INTEGER = 9), + (e.TEXTUREFORMAT_RGB_INTEGER = 10), + (e.TEXTUREFORMAT_RGBA_INTEGER = 11), + (e.TEXTURETYPE_UNSIGNED_BYTE = 0), + (e.TEXTURETYPE_UNSIGNED_INT = 0), + (e.TEXTURETYPE_FLOAT = 1), + (e.TEXTURETYPE_HALF_FLOAT = 2), + (e.TEXTURETYPE_BYTE = 3), + (e.TEXTURETYPE_SHORT = 4), + (e.TEXTURETYPE_UNSIGNED_SHORT = 5), + (e.TEXTURETYPE_INT = 6), + (e.TEXTURETYPE_UNSIGNED_INTEGER = 7), + (e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8), + (e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9), + (e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10), + (e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11), + (e.TEXTURETYPE_UNSIGNED_INT_24_8 = 12), + (e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13), + (e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14), + (e.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15), + (e.TEXTURE_NEAREST_SAMPLINGMODE = 1), + (e.TEXTURE_NEAREST_NEAREST = 1), + (e.TEXTURE_BILINEAR_SAMPLINGMODE = 2), + (e.TEXTURE_LINEAR_LINEAR = 2), + (e.TEXTURE_TRILINEAR_SAMPLINGMODE = 3), + (e.TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3), + (e.TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4), + (e.TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5), + (e.TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6), + (e.TEXTURE_NEAREST_LINEAR = 7), + (e.TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8), + (e.TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9), + (e.TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10), + (e.TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11), + (e.TEXTURE_LINEAR_NEAREST = 12), + (e.TEXTURE_EXPLICIT_MODE = 0), + (e.TEXTURE_SPHERICAL_MODE = 1), + (e.TEXTURE_PLANAR_MODE = 2), + (e.TEXTURE_CUBIC_MODE = 3), + (e.TEXTURE_PROJECTION_MODE = 4), + (e.TEXTURE_SKYBOX_MODE = 5), + (e.TEXTURE_INVCUBIC_MODE = 6), + (e.TEXTURE_EQUIRECTANGULAR_MODE = 7), + (e.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8), + (e.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9), + (e.SCALEMODE_FLOOR = 1), + (e.SCALEMODE_NEAREST = 2), + (e.SCALEMODE_CEILING = 3), + (e.MATERIAL_TextureDirtyFlag = 1), + (e.MATERIAL_LightDirtyFlag = 2), + (e.MATERIAL_FresnelDirtyFlag = 4), + (e.MATERIAL_AttributesDirtyFlag = 8), + (e.MATERIAL_MiscDirtyFlag = 16), + (e.MATERIAL_AllDirtyFlag = 31), + (e.MATERIAL_TriangleFillMode = 0), + (e.MATERIAL_WireFrameFillMode = 1), + (e.MATERIAL_PointFillMode = 2), + (e.MATERIAL_PointListDrawMode = 3), + (e.MATERIAL_LineListDrawMode = 4), + (e.MATERIAL_LineLoopDrawMode = 5), + (e.MATERIAL_LineStripDrawMode = 6), + (e.MATERIAL_TriangleStripDrawMode = 7), + (e.MATERIAL_TriangleFanDrawMode = 8), + (e.MATERIAL_ClockWiseSideOrientation = 0), + (e.MATERIAL_CounterClockWiseSideOrientation = 1), + (e.ACTION_NothingTrigger = 0), + (e.ACTION_OnPickTrigger = 1), + (e.ACTION_OnLeftPickTrigger = 2), + (e.ACTION_OnRightPickTrigger = 3), + (e.ACTION_OnCenterPickTrigger = 4), + (e.ACTION_OnPickDownTrigger = 5), + (e.ACTION_OnDoublePickTrigger = 6), + (e.ACTION_OnPickUpTrigger = 7), + (e.ACTION_OnPickOutTrigger = 16), + (e.ACTION_OnLongPressTrigger = 8), + (e.ACTION_OnPointerOverTrigger = 9), + (e.ACTION_OnPointerOutTrigger = 10), + (e.ACTION_OnEveryFrameTrigger = 11), + (e.ACTION_OnIntersectionEnterTrigger = 12), + (e.ACTION_OnIntersectionExitTrigger = 13), + (e.ACTION_OnKeyDownTrigger = 14), + (e.ACTION_OnKeyUpTrigger = 15), + (e.PARTICLES_BILLBOARDMODE_Y = 2), + (e.PARTICLES_BILLBOARDMODE_ALL = 7), + (e.PARTICLES_BILLBOARDMODE_STRETCHED = 8), + (e.MESHES_CULLINGSTRATEGY_STANDARD = 0), + (e.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1), + (e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2), + (e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3), + (e.SCENELOADER_NO_LOGGING = 0), + (e.SCENELOADER_MINIMAL_LOGGING = 1), + (e.SCENELOADER_SUMMARY_LOGGING = 2), + (e.SCENELOADER_DETAILED_LOGGING = 3), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(1), + r = n(4), + o = (function () { + function e() { + (this._pickingUnavailable = !1), + (this.hit = !1), + (this.distance = 0), + (this.pickedPoint = null), + (this.pickedMesh = null), + (this.bu = 0), + (this.bv = 0), + (this.faceId = -1), + (this.subMeshId = 0), + (this.pickedSprite = null), + (this.originMesh = null), + (this.ray = null); + } + return ( + (e.prototype.getNormal = function (e, t) { + if ((void 0 === e && (e = !1), void 0 === t && (t = !0), !this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(r.b.NormalKind))) return null; + var n, + o = this.pickedMesh.getIndices(); + if (!o) return null; + if (t) { + var a = this.pickedMesh.getVerticesData(r.b.NormalKind), + s = i.e.FromArray(a, 3 * o[3 * this.faceId]), + c = i.e.FromArray(a, 3 * o[3 * this.faceId + 1]), + l = i.e.FromArray(a, 3 * o[3 * this.faceId + 2]); + (s = s.scale(this.bu)), (c = c.scale(this.bv)), (l = l.scale(1 - this.bu - this.bv)), (n = new i.e(s.x + c.x + l.x, s.y + c.y + l.y, s.z + c.z + l.z)); + } else { + var u = this.pickedMesh.getVerticesData(r.b.PositionKind), + h = i.e.FromArray(u, 3 * o[3 * this.faceId]), + d = i.e.FromArray(u, 3 * o[3 * this.faceId + 1]), + p = i.e.FromArray(u, 3 * o[3 * this.faceId + 2]), + f = h.subtract(d), + m = p.subtract(d); + n = i.e.Cross(f, m); + } + if (e) { + var g = this.pickedMesh.getWorldMatrix(); + this.pickedMesh.nonUniformScaling && (i.c.Matrix[0].copyFrom(g), (g = i.c.Matrix[0]).setTranslationFromFloats(0, 0, 0), g.invert(), g.transposeToRef(i.c.Matrix[1]), (g = i.c.Matrix[1])), + (n = i.e.TransformNormal(n, g)); + } + return n.normalize(), n; + }), + (e.prototype.getTextureCoordinates = function () { + if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(r.b.UVKind)) return null; + var e = this.pickedMesh.getIndices(); + if (!e) return null; + var t = this.pickedMesh.getVerticesData(r.b.UVKind); + if (!t) return null; + var n = i.d.FromArray(t, 2 * e[3 * this.faceId]), + o = i.d.FromArray(t, 2 * e[3 * this.faceId + 1]), + a = i.d.FromArray(t, 2 * e[3 * this.faceId + 2]); + return (n = n.scale(this.bu)), (o = o.scale(this.bv)), (a = a.scale(1 - this.bu - this.bv)), new i.d(n.x + o.x + a.x, n.y + o.y + a.y); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "clipPlaneFragment", + r = + "#ifdef CLIPPLANE\nif (fClipDistance>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE2\nif (fClipDistance2>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE3\nif (fClipDistance3>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE4\nif (fClipDistance4>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE5\nif (fClipDistance5>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE6\nif (fClipDistance6>0.0)\n{\ndiscard;\n}\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "clipPlaneVertex", + r = + "#ifdef CLIPPLANE\nfClipDistance=dot(worldPos,vClipPlane);\n#endif\n#ifdef CLIPPLANE2\nfClipDistance2=dot(worldPos,vClipPlane2);\n#endif\n#ifdef CLIPPLANE3\nfClipDistance3=dot(worldPos,vClipPlane3);\n#endif\n#ifdef CLIPPLANE4\nfClipDistance4=dot(worldPos,vClipPlane4);\n#endif\n#ifdef CLIPPLANE5\nfClipDistance5=dot(worldPos,vClipPlane5);\n#endif\n#ifdef CLIPPLANE6\nfClipDistance6=dot(worldPos,vClipPlane6);\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(1), + r = n(5), + o = n(9), + a = n(16); + (a.a.CreateBox = function (e) { + var t, + n = [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23], + o = [ + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + 0, + -1, + 0, + ], + s = [], + c = e.width || e.size || 1, + l = e.height || e.size || 1, + u = e.depth || e.size || 1, + h = e.wrap || !1, + d = void 0 === e.topBaseAt ? 1 : e.topBaseAt, + p = void 0 === e.bottomBaseAt ? 0 : e.bottomBaseAt, + f = [2, 0, 3, 1][(d = (d + 4) % 4)], + m = [2, 0, 1, 3][(p = (p + 4) % 4)], + g = [ + 1, + -1, + 1, + -1, + -1, + 1, + -1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + -1, + -1, + 1, + -1, + -1, + -1, + -1, + 1, + -1, + -1, + 1, + 1, + -1, + 1, + -1, + -1, + 1, + -1, + 1, + 1, + 1, + 1, + -1, + 1, + 1, + -1, + -1, + 1, + -1, + -1, + -1, + -1, + 1, + -1, + -1, + 1, + 1, + -1, + 1, + -1, + 1, + 1, + -1, + 1, + 1, + 1, + 1, + -1, + 1, + 1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 1, + ]; + if (h) { + (n = [2, 3, 0, 2, 0, 1, 4, 5, 6, 4, 6, 7, 9, 10, 11, 9, 11, 8, 12, 14, 15, 12, 13, 14]), + (g = [-1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1]); + for ( + var b = [ + [1, 1, 1], + [-1, 1, 1], + [-1, 1, -1], + [1, 1, -1], + ], + _ = [ + [-1, -1, 1], + [1, -1, 1], + [1, -1, -1], + [-1, -1, -1], + ], + v = [17, 18, 19, 16], + y = [22, 23, 20, 21]; + f > 0; + + ) + b.unshift(b.pop()), v.unshift(v.pop()), f--; + for (; m > 0; ) _.unshift(_.pop()), y.unshift(y.pop()), m--; + (b = b.flat()), (_ = _.flat()), (g = g.concat(b).concat(_)), n.push(v[0], v[2], v[3], v[0], v[1], v[2]), n.push(y[0], y[2], y[3], y[0], y[1], y[2]); + } + var C = [c / 2, l / 2, u / 2]; + t = g.reduce(function (e, t, n) { + return e.concat(t * C[n % 3]); + }, []); + for (var P = 0 === e.sideOrientation ? 0 : e.sideOrientation || a.a.DEFAULTSIDE, x = e.faceUV || new Array(6), T = e.faceColors, S = [], O = 0; O < 6; O++) + void 0 === x[O] && (x[O] = new i.f(0, 0, 1, 1)), T && void 0 === T[O] && (T[O] = new r.b(1, 1, 1, 1)); + for (var E = 0; E < 6; E++) if ((s.push(x[E].z, x[E].w), s.push(x[E].x, x[E].w), s.push(x[E].x, x[E].y), s.push(x[E].z, x[E].y), T)) for (var M = 0; M < 4; M++) S.push(T[E].r, T[E].g, T[E].b, T[E].a); + a.a._ComputeSides(P, t, n, o, s, e.frontUVs, e.backUVs); + var A = new a.a(); + if (((A.indices = n), (A.positions = t), (A.normals = o), (A.uvs = s), T)) { + var I = P === a.a.DOUBLESIDE ? S.concat(S) : S; + A.colors = I; + } + return A; + }), + (o.a.CreateBox = function (e, t, n, i, r) { + void 0 === n && (n = null); + var o = { size: t, sideOrientation: r, updatable: i }; + return s.CreateBox(e, o, n); + }); + var s = (function () { + function e() {} + return ( + (e.CreateBox = function (e, t, n) { + void 0 === n && (n = null); + var i = new o.a(e, n); + return (t.sideOrientation = o.a._GetDefaultSideOrientation(t.sideOrientation)), (i._originalBuilderSideOrientation = t.sideOrientation), a.a.CreateBox(t).applyToMesh(i, t.updatable), i; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(1), + r = (function () { + function e(e, t, n, r) { + (this.normal = new i.e(e, t, n)), (this.d = r); + } + return ( + (e.prototype.asArray = function () { + return [this.normal.x, this.normal.y, this.normal.z, this.d]; + }), + (e.prototype.clone = function () { + return new e(this.normal.x, this.normal.y, this.normal.z, this.d); + }), + (e.prototype.getClassName = function () { + return "Plane"; + }), + (e.prototype.getHashCode = function () { + var e = this.normal.getHashCode(); + return (e = (397 * e) ^ (0 | this.d)); + }), + (e.prototype.normalize = function () { + var e = Math.sqrt(this.normal.x * this.normal.x + this.normal.y * this.normal.y + this.normal.z * this.normal.z), + t = 0; + return 0 !== e && (t = 1 / e), (this.normal.x *= t), (this.normal.y *= t), (this.normal.z *= t), (this.d *= t), this; + }), + (e.prototype.transform = function (t) { + var n = e._TmpMatrix; + i.a.TransposeToRef(t, n); + var r = n.m, + o = this.normal.x, + a = this.normal.y, + s = this.normal.z, + c = this.d; + return new e(o * r[0] + a * r[1] + s * r[2] + c * r[3], o * r[4] + a * r[5] + s * r[6] + c * r[7], o * r[8] + a * r[9] + s * r[10] + c * r[11], o * r[12] + a * r[13] + s * r[14] + c * r[15]); + }), + (e.prototype.dotCoordinate = function (e) { + return this.normal.x * e.x + this.normal.y * e.y + this.normal.z * e.z + this.d; + }), + (e.prototype.copyFromPoints = function (e, t, n) { + var i, + r = t.x - e.x, + o = t.y - e.y, + a = t.z - e.z, + s = n.x - e.x, + c = n.y - e.y, + l = n.z - e.z, + u = o * l - a * c, + h = a * s - r * l, + d = r * c - o * s, + p = Math.sqrt(u * u + h * h + d * d); + return (i = 0 !== p ? 1 / p : 0), (this.normal.x = u * i), (this.normal.y = h * i), (this.normal.z = d * i), (this.d = -(this.normal.x * e.x + this.normal.y * e.y + this.normal.z * e.z)), this; + }), + (e.prototype.isFrontFacingTo = function (e, t) { + return i.e.Dot(this.normal, e) <= t; + }), + (e.prototype.signedDistanceTo = function (e) { + return i.e.Dot(e, this.normal) + this.d; + }), + (e.FromArray = function (t) { + return new e(t[0], t[1], t[2], t[3]); + }), + (e.FromPoints = function (t, n, i) { + var r = new e(0, 0, 0, 0); + return r.copyFromPoints(t, n, i), r; + }), + (e.FromPositionAndNormal = function (t, n) { + var i = new e(0, 0, 0, 0); + return n.normalize(), (i.normal = n), (i.d = -(n.x * t.x + n.y * t.y + n.z * t.z)), i; + }), + (e.SignedDistanceToPlaneFromPositionAndNormal = function (e, t, n) { + var r = -(t.x * e.x + t.y * e.y + t.z * e.z); + return i.e.Dot(n, t) + r; + }), + (e._TmpMatrix = i.a.Identity()), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "clipPlaneFragmentDeclaration", + r = + "#ifdef CLIPPLANE\nvarying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nvarying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nvarying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nvarying float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nvarying float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nvarying float fClipDistance6;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "fogFragmentDeclaration", + r = + "#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\n#define E 2.71828\nuniform vec4 vFogInfos;\nuniform vec3 vFogColor;\nvarying vec3 vFogDistance;\nfloat CalcFogFactor()\n{\nfloat fogCoeff=1.0;\nfloat fogStart=vFogInfos.y;\nfloat fogEnd=vFogInfos.z;\nfloat fogDensity=vFogInfos.w;\nfloat fogDistance=length(vFogDistance);\nif (FOGMODE_LINEAR == vFogInfos.x)\n{\nfogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);\n}\nelse if (FOGMODE_EXP == vFogInfos.x)\n{\nfogCoeff=1.0/pow(E,fogDistance*fogDensity);\n}\nelse if (FOGMODE_EXP2 == vFogInfos.x)\n{\nfogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);\n}\nreturn clamp(fogCoeff,0.0,1.0);\n}\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "clipPlaneVertexDeclaration", + r = + "#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nvarying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nvarying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nvarying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nvarying float fClipDistance4;\n#endif\n#ifdef CLIPPLANE5\nuniform vec4 vClipPlane5;\nvarying float fClipDistance5;\n#endif\n#ifdef CLIPPLANE6\nuniform vec4 vClipPlane6;\nvarying float fClipDistance6;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }), + n.d(t, "c", function () { + return a; + }); + var i = n(2), + r = (function () { + function e() {} + return (e.KEYDOWN = 1), (e.KEYUP = 2), e; + })(), + o = function (e, t) { + (this.type = e), (this.event = t); + }, + a = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i.type = t), (i.event = n), (i.skipOnPointerObservable = !1), i; + } + return Object(i.d)(t, e), t; + })(o); + }, + function (e, t, n) { + "use strict"; + var i = "#ifdef FOG\nfloat fog=CalcFogFactor();\ncolor.rgb=fog*color.rgb+(1.0-fog)*vFogColor;\n#endif"; + n(7).a.IncludesShadersStore.fogFragment = i; + }, + function (e, t, n) { + "use strict"; + var i = "fogVertexDeclaration", + r = "#ifdef FOG\nvarying vec3 vFogDistance;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(2), + r = n(8), + o = + (n(155), + (function (e) { + function t(t, n, i, o, a, s, c, l, u) { + void 0 === s && (s = !0), void 0 === c && (c = !1), void 0 === l && (l = 3), void 0 === u && (u = 0); + var h = e.call(this, null, a, !s, c) || this; + return (h.format = o), (h._engine = a.getEngine()), (h._texture = a.getEngine().createRawTexture(t, n, i, o, s, c, l, null, u)), (h.wrapU = r.a.CLAMP_ADDRESSMODE), (h.wrapV = r.a.CLAMP_ADDRESSMODE), h; + } + return ( + Object(i.d)(t, e), + (t.prototype.update = function (e) { + this._engine.updateRawTexture(this._texture, e, this._texture.format, this._texture.invertY, null, this._texture.type); + }), + (t.CreateLuminanceTexture = function (e, n, i, r, o, a, s) { + return void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = 3), new t(e, n, i, 1, r, o, a, s); + }), + (t.CreateLuminanceAlphaTexture = function (e, n, i, r, o, a, s) { + return void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = 3), new t(e, n, i, 2, r, o, a, s); + }), + (t.CreateAlphaTexture = function (e, n, i, r, o, a, s) { + return void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = 3), new t(e, n, i, 0, r, o, a, s); + }), + (t.CreateRGBTexture = function (e, n, i, r, o, a, s, c) { + return void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = 3), void 0 === c && (c = 0), new t(e, n, i, 4, r, o, a, s, c); + }), + (t.CreateRGBATexture = function (e, n, i, r, o, a, s, c) { + return void 0 === o && (o = !0), void 0 === a && (a = !1), void 0 === s && (s = 3), void 0 === c && (c = 0), new t(e, n, i, 5, r, o, a, s, c); + }), + (t.CreateRTexture = function (e, n, i, o, a, s, c, l) { + return void 0 === a && (a = !0), void 0 === s && (s = !1), void 0 === c && (c = r.a.TRILINEAR_SAMPLINGMODE), void 0 === l && (l = 1), new t(e, n, i, 6, o, a, s, c, l); + }), + t + ); + })(r.a)); + }, + function (e, t, n) { + "use strict"; + var i = "#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif"; + n(7).a.IncludesShadersStore.fogVertex = i; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(2), + r = n(28), + o = n(45), + a = n(13), + s = (function (e) { + function t(t, n) { + var i = e.call(this, t, n, !0) || this; + return n.multiMaterials.push(i), (i.subMaterials = new Array()), (i._storeEffectOnSubMeshes = !0), i; + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "subMaterials", { + get: function () { + return this._subMaterials; + }, + set: function (e) { + (this._subMaterials = e), this._hookArray(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getChildren = function () { + return this.subMaterials; + }), + (t.prototype._hookArray = function (e) { + var t = this, + n = e.push; + e.push = function () { + for (var i = [], r = 0; r < arguments.length; r++) i[r] = arguments[r]; + var o = n.apply(e, i); + return t._markAllSubMeshesAsTexturesDirty(), o; + }; + var i = e.splice; + e.splice = function (n, r) { + var o = i.apply(e, [n, r]); + return t._markAllSubMeshesAsTexturesDirty(), o; + }; + }), + (t.prototype.getSubMaterial = function (e) { + return e < 0 || e >= this.subMaterials.length ? this.getScene().defaultMaterial : this.subMaterials[e]; + }), + (t.prototype.getActiveTextures = function () { + var t; + return (t = e.prototype.getActiveTextures.call(this)).concat.apply( + t, + this.subMaterials.map(function (e) { + return e ? e.getActiveTextures() : []; + }) + ); + }), + (t.prototype.getClassName = function () { + return "MultiMaterial"; + }), + (t.prototype.isReadyForSubMesh = function (e, t, n) { + for (var i = 0; i < this.subMaterials.length; i++) { + var r = this.subMaterials[i]; + if (r) { + if (r._storeEffectOnSubMeshes) { + if (!r.isReadyForSubMesh(e, t, n)) return !1; + continue; + } + if (!r.isReady(e)) return !1; + } + } + return !0; + }), + (t.prototype.clone = function (e, n) { + for (var i = new t(e, this.getScene()), r = 0; r < this.subMaterials.length; r++) { + var o = null, + a = this.subMaterials[r]; + (o = n && a ? a.clone(e + "-" + a.name) : this.subMaterials[r]), i.subMaterials.push(o); + } + return i; + }), + (t.prototype.serialize = function () { + var e = {}; + (e.name = this.name), (e.id = this.id), o.a && (e.tags = o.a.GetTags(this)), (e.materials = []); + for (var t = 0; t < this.subMaterials.length; t++) { + var n = this.subMaterials[t]; + n ? e.materials.push(n.id) : e.materials.push(null); + } + return e; + }), + (t.prototype.dispose = function (t, n, i) { + var r = this.getScene(); + if (r) { + if (i) + for (var o = 0; o < this.subMaterials.length; o++) { + var a = this.subMaterials[o]; + a && a.dispose(t, n); + } + (o = r.multiMaterials.indexOf(this)) >= 0 && r.multiMaterials.splice(o, 1), e.prototype.dispose.call(this, t, n); + } + }), + (t.ParseMultiMaterial = function (e, n) { + var i = new t(e.name, n); + (i.id = e.id), o.a && o.a.AddTagsTo(i, e.tags); + for (var r = 0; r < e.materials.length; r++) { + var a = e.materials[r]; + a ? i.subMaterials.push(n.getLastMaterialByID(a)) : i.subMaterials.push(null); + } + return i; + }), + t + ); + })(r.a); + a.a.RegisteredTypes["BABYLON.MultiMaterial"] = s; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return B; + }), + n.d(t, "a", function () { + return V; + }); + var i = n(2), + r = n(3), + o = n(10), + a = n(47), + s = n(158), + c = n(18), + l = n(1), + u = n(4), + h = n(5), + d = n(17), + p = n(11), + f = (function () { + function e(t) { + (this._isEnabled = !1), + (this.isEnabled = !1), + (this.intensity = 1), + (this.roughness = 0), + (this._indexOfRefraction = e._DefaultIndexOfRefraction), + (this.indexOfRefraction = e._DefaultIndexOfRefraction), + (this._texture = null), + (this.texture = null), + (this._bumpTexture = null), + (this.bumpTexture = null), + (this._isTintEnabled = !1), + (this.isTintEnabled = !1), + (this.tintColor = h.a.White()), + (this.tintColorAtDistance = 1), + (this.tintThickness = 1), + (this._tintTexture = null), + (this.tintTexture = null), + (this._internalMarkAllSubMeshesAsTexturesDirty = t); + } + return ( + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + this._internalMarkAllSubMeshesAsTexturesDirty(); + }), + (e.prototype.isReadyForSubMesh = function (e, t, n, i) { + if (e._areTexturesDirty && t.texturesEnabled) { + if (this._texture && d.a.ClearCoatTextureEnabled && !this._texture.isReadyOrNotBlocking()) return !1; + if (n.getCaps().standardDerivatives && this._bumpTexture && d.a.ClearCoatBumpTextureEnabled && !i && !this._bumpTexture.isReady()) return !1; + if (this._isTintEnabled && this._tintTexture && d.a.ClearCoatTintTextureEnabled && !this._tintTexture.isReadyOrNotBlocking()) return !1; + } + return !0; + }), + (e.prototype.prepareDefines = function (t, n) { + this._isEnabled + ? ((t.CLEARCOAT = !0), + t._areTexturesDirty && + n.texturesEnabled && + (this._texture && d.a.ClearCoatTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._texture, t, "CLEARCOAT_TEXTURE") : (t.CLEARCOAT_TEXTURE = !1), + this._bumpTexture && d.a.ClearCoatBumpTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._bumpTexture, t, "CLEARCOAT_BUMP") : (t.CLEARCOAT_BUMP = !1), + (t.CLEARCOAT_DEFAULTIOR = this._indexOfRefraction === e._DefaultIndexOfRefraction), + this._isTintEnabled + ? ((t.CLEARCOAT_TINT = !0), this._tintTexture && d.a.ClearCoatTintTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._tintTexture, t, "CLEARCOAT_TINT_TEXTURE") : (t.CLEARCOAT_TINT_TEXTURE = !1)) + : ((t.CLEARCOAT_TINT = !1), (t.CLEARCOAT_TINT_TEXTURE = !1)))) + : ((t.CLEARCOAT = !1), (t.CLEARCOAT_TEXTURE = !1), (t.CLEARCOAT_BUMP = !1), (t.CLEARCOAT_TINT = !1), (t.CLEARCOAT_TINT_TEXTURE = !1)); + }), + (e.prototype.bindForSubMesh = function (e, t, n, i, r, o, a) { + if (!e.useUbo || !r || !e.isSync) { + this._texture && d.a.ClearCoatTextureEnabled && (e.updateFloat2("vClearCoatInfos", this._texture.coordinatesIndex, this._texture.level), p.a.BindTextureMatrix(this._texture, e, "clearCoat")), + this._bumpTexture && + n.getCaps().standardDerivatives && + d.a.ClearCoatTextureEnabled && + !i && + (e.updateFloat2("vClearCoatBumpInfos", this._bumpTexture.coordinatesIndex, this._bumpTexture.level), + p.a.BindTextureMatrix(this._bumpTexture, e, "clearCoatBump"), + t._mirroredCameraPosition ? e.updateFloat2("vClearCoatTangentSpaceParams", o ? 1 : -1, a ? 1 : -1) : e.updateFloat2("vClearCoatTangentSpaceParams", o ? -1 : 1, a ? -1 : 1)), + this._tintTexture && + d.a.ClearCoatTintTextureEnabled && + (e.updateFloat2("vClearCoatTintInfos", this._tintTexture.coordinatesIndex, this._tintTexture.level), p.a.BindTextureMatrix(this._tintTexture, e, "clearCoatTint")), + e.updateFloat2("vClearCoatParams", this.intensity, this.roughness); + var s = 1 - this._indexOfRefraction, + c = 1 + this._indexOfRefraction, + l = Math.pow(-s / c, 2), + u = 1 / this._indexOfRefraction; + e.updateFloat4("vClearCoatRefractionParams", l, u, s, c), + this._isTintEnabled && + (e.updateFloat4("vClearCoatTintParams", this.tintColor.r, this.tintColor.g, this.tintColor.b, Math.max(1e-5, this.tintThickness)), + e.updateFloat("clearCoatColorAtDistance", Math.max(1e-5, this.tintColorAtDistance))); + } + t.texturesEnabled && + (this._texture && d.a.ClearCoatTextureEnabled && e.setTexture("clearCoatSampler", this._texture), + this._bumpTexture && n.getCaps().standardDerivatives && d.a.ClearCoatBumpTextureEnabled && !i && e.setTexture("clearCoatBumpSampler", this._bumpTexture), + this._isTintEnabled && this._tintTexture && d.a.ClearCoatTintTextureEnabled && e.setTexture("clearCoatTintSampler", this._tintTexture)); + }), + (e.prototype.hasTexture = function (e) { + return this._texture === e || this._bumpTexture === e || this._tintTexture === e; + }), + (e.prototype.getActiveTextures = function (e) { + this._texture && e.push(this._texture), this._bumpTexture && e.push(this._bumpTexture), this._tintTexture && e.push(this._tintTexture); + }), + (e.prototype.getAnimatables = function (e) { + this._texture && this._texture.animations && this._texture.animations.length > 0 && e.push(this._texture), + this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0 && e.push(this._bumpTexture), + this._tintTexture && this._tintTexture.animations && this._tintTexture.animations.length > 0 && e.push(this._tintTexture); + }), + (e.prototype.dispose = function (e) { + e && (this._texture && this._texture.dispose(), this._bumpTexture && this._bumpTexture.dispose(), this._tintTexture && this._tintTexture.dispose()); + }), + (e.prototype.getClassName = function () { + return "PBRClearCoatConfiguration"; + }), + (e.AddFallbacks = function (e, t, n) { + return e.CLEARCOAT_BUMP && t.addFallback(n++, "CLEARCOAT_BUMP"), e.CLEARCOAT_TINT && t.addFallback(n++, "CLEARCOAT_TINT"), e.CLEARCOAT && t.addFallback(n++, "CLEARCOAT"), n; + }), + (e.AddUniforms = function (e) { + e.push( + "vClearCoatTangentSpaceParams", + "vClearCoatParams", + "vClearCoatRefractionParams", + "vClearCoatTintParams", + "clearCoatColorAtDistance", + "clearCoatMatrix", + "clearCoatBumpMatrix", + "clearCoatTintMatrix", + "vClearCoatInfos", + "vClearCoatBumpInfos", + "vClearCoatTintInfos" + ); + }), + (e.AddSamplers = function (e) { + e.push("clearCoatSampler", "clearCoatBumpSampler", "clearCoatTintSampler"); + }), + (e.PrepareUniformBuffer = function (e) { + e.addUniform("vClearCoatParams", 2), + e.addUniform("vClearCoatRefractionParams", 4), + e.addUniform("vClearCoatInfos", 2), + e.addUniform("clearCoatMatrix", 16), + e.addUniform("vClearCoatBumpInfos", 2), + e.addUniform("vClearCoatTangentSpaceParams", 2), + e.addUniform("clearCoatBumpMatrix", 16), + e.addUniform("vClearCoatTintParams", 4), + e.addUniform("clearCoatColorAtDistance", 1), + e.addUniform("vClearCoatTintInfos", 2), + e.addUniform("clearCoatTintMatrix", 16); + }), + (e.prototype.copyTo = function (e) { + r.a.Clone(function () { + return e; + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.prototype.parse = function (e, t, n) { + var i = this; + r.a.Parse( + function () { + return i; + }, + e, + t, + n + ); + }), + (e._DefaultIndexOfRefraction = 1.5), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "intensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "roughness", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "indexOfRefraction", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "texture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "bumpTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isTintEnabled", void 0), + Object(i.c)([Object(r.e)()], e.prototype, "tintColor", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "tintColorAtDistance", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "tintThickness", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "tintTexture", void 0), + e + ); + })(), + m = (function () { + function e(e) { + (this._isEnabled = !1), (this.isEnabled = !1), (this.intensity = 1), (this.direction = new l.d(1, 0)), (this._texture = null), (this.texture = null), (this._internalMarkAllSubMeshesAsTexturesDirty = e); + } + return ( + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + this._internalMarkAllSubMeshesAsTexturesDirty(); + }), + (e.prototype.isReadyForSubMesh = function (e, t) { + return !(e._areTexturesDirty && t.texturesEnabled && this._texture && d.a.AnisotropicTextureEnabled && !this._texture.isReadyOrNotBlocking()); + }), + (e.prototype.prepareDefines = function (e, t, n) { + this._isEnabled + ? ((e.ANISOTROPIC = this._isEnabled), + this._isEnabled && !t.isVerticesDataPresent(u.b.TangentKind) && ((e._needUVs = !0), (e.MAINUV1 = !0)), + e._areTexturesDirty && n.texturesEnabled && (this._texture && d.a.AnisotropicTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._texture, e, "ANISOTROPIC_TEXTURE") : (e.ANISOTROPIC_TEXTURE = !1))) + : ((e.ANISOTROPIC = !1), (e.ANISOTROPIC_TEXTURE = !1)); + }), + (e.prototype.bindForSubMesh = function (e, t, n) { + (e.useUbo && n && e.isSync) || + (this._texture && d.a.AnisotropicTextureEnabled && (e.updateFloat2("vAnisotropyInfos", this._texture.coordinatesIndex, this._texture.level), p.a.BindTextureMatrix(this._texture, e, "anisotropy")), + e.updateFloat3("vAnisotropy", this.direction.x, this.direction.y, this.intensity)), + t.texturesEnabled && this._texture && d.a.AnisotropicTextureEnabled && e.setTexture("anisotropySampler", this._texture); + }), + (e.prototype.hasTexture = function (e) { + return this._texture === e; + }), + (e.prototype.getActiveTextures = function (e) { + this._texture && e.push(this._texture); + }), + (e.prototype.getAnimatables = function (e) { + this._texture && this._texture.animations && this._texture.animations.length > 0 && e.push(this._texture); + }), + (e.prototype.dispose = function (e) { + e && this._texture && this._texture.dispose(); + }), + (e.prototype.getClassName = function () { + return "PBRAnisotropicConfiguration"; + }), + (e.AddFallbacks = function (e, t, n) { + return e.ANISOTROPIC && t.addFallback(n++, "ANISOTROPIC"), n; + }), + (e.AddUniforms = function (e) { + e.push("vAnisotropy", "vAnisotropyInfos", "anisotropyMatrix"); + }), + (e.PrepareUniformBuffer = function (e) { + e.addUniform("vAnisotropy", 3), e.addUniform("vAnisotropyInfos", 2), e.addUniform("anisotropyMatrix", 16); + }), + (e.AddSamplers = function (e) { + e.push("anisotropySampler"); + }), + (e.prototype.copyTo = function (e) { + r.a.Clone(function () { + return e; + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.prototype.parse = function (e, t, n) { + var i = this; + r.a.Parse( + function () { + return i; + }, + e, + t, + n + ); + }), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "intensity", void 0), + Object(i.c)([Object(r.n)()], e.prototype, "direction", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "texture", void 0), + e + ); + })(), + g = (function () { + function e(t) { + (this._useEnergyConservation = e.DEFAULT_USE_ENERGY_CONSERVATION), + (this.useEnergyConservation = e.DEFAULT_USE_ENERGY_CONSERVATION), + (this._useSmithVisibilityHeightCorrelated = e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED), + (this.useSmithVisibilityHeightCorrelated = e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED), + (this._useSphericalHarmonics = e.DEFAULT_USE_SPHERICAL_HARMONICS), + (this.useSphericalHarmonics = e.DEFAULT_USE_SPHERICAL_HARMONICS), + (this._useSpecularGlossinessInputEnergyConservation = e.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION), + (this.useSpecularGlossinessInputEnergyConservation = e.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION), + (this._internalMarkAllSubMeshesAsMiscDirty = t); + } + return ( + (e.prototype._markAllSubMeshesAsMiscDirty = function () { + this._internalMarkAllSubMeshesAsMiscDirty(); + }), + (e.prototype.prepareDefines = function (e) { + (e.BRDF_V_HEIGHT_CORRELATED = this._useSmithVisibilityHeightCorrelated), + (e.MS_BRDF_ENERGY_CONSERVATION = this._useEnergyConservation && this._useSmithVisibilityHeightCorrelated), + (e.SPHERICAL_HARMONICS = this._useSphericalHarmonics), + (e.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION = this._useSpecularGlossinessInputEnergyConservation); + }), + (e.prototype.getClassName = function () { + return "PBRBRDFConfiguration"; + }), + (e.prototype.copyTo = function (e) { + r.a.Clone(function () { + return e; + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.prototype.parse = function (e, t, n) { + var i = this; + r.a.Parse( + function () { + return i; + }, + e, + t, + n + ); + }), + (e.DEFAULT_USE_ENERGY_CONSERVATION = !0), + (e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED = !0), + (e.DEFAULT_USE_SPHERICAL_HARMONICS = !0), + (e.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION = !0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsMiscDirty")], e.prototype, "useEnergyConservation", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsMiscDirty")], e.prototype, "useSmithVisibilityHeightCorrelated", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsMiscDirty")], e.prototype, "useSphericalHarmonics", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsMiscDirty")], e.prototype, "useSpecularGlossinessInputEnergyConservation", void 0), + e + ); + })(), + b = (function () { + function e(e) { + (this._isEnabled = !1), + (this.isEnabled = !1), + (this._linkSheenWithAlbedo = !1), + (this.linkSheenWithAlbedo = !1), + (this.intensity = 1), + (this.color = h.a.White()), + (this._texture = null), + (this.texture = null), + (this._internalMarkAllSubMeshesAsTexturesDirty = e); + } + return ( + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + this._internalMarkAllSubMeshesAsTexturesDirty(); + }), + (e.prototype.isReadyForSubMesh = function (e, t) { + return !(e._areTexturesDirty && t.texturesEnabled && this._texture && d.a.SheenTextureEnabled && !this._texture.isReadyOrNotBlocking()); + }), + (e.prototype.prepareDefines = function (e, t) { + this._isEnabled + ? ((e.SHEEN = this._isEnabled), + (e.SHEEN_LINKWITHALBEDO = this._linkSheenWithAlbedo), + e._areTexturesDirty && t.texturesEnabled && (this._texture && d.a.SheenTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._texture, e, "SHEEN_TEXTURE") : (e.SHEEN_TEXTURE = !1))) + : ((e.SHEEN = !1), (e.SHEEN_TEXTURE = !1), (e.SHEEN_LINKWITHALBEDO = !1)); + }), + (e.prototype.bindForSubMesh = function (e, t, n) { + (e.useUbo && n && e.isSync) || + (this._texture && d.a.SheenTextureEnabled && (e.updateFloat2("vSheenInfos", this._texture.coordinatesIndex, this._texture.level), p.a.BindTextureMatrix(this._texture, e, "sheen")), + e.updateFloat4("vSheenColor", this.color.r, this.color.g, this.color.b, this.intensity)), + t.texturesEnabled && this._texture && d.a.SheenTextureEnabled && e.setTexture("sheenSampler", this._texture); + }), + (e.prototype.hasTexture = function (e) { + return this._texture === e; + }), + (e.prototype.getActiveTextures = function (e) { + this._texture && e.push(this._texture); + }), + (e.prototype.getAnimatables = function (e) { + this._texture && this._texture.animations && this._texture.animations.length > 0 && e.push(this._texture); + }), + (e.prototype.dispose = function (e) { + e && this._texture && this._texture.dispose(); + }), + (e.prototype.getClassName = function () { + return "PBRSheenConfiguration"; + }), + (e.AddFallbacks = function (e, t, n) { + return e.SHEEN && t.addFallback(n++, "SHEEN"), n; + }), + (e.AddUniforms = function (e) { + e.push("vSheenColor", "vSheenInfos", "sheenMatrix"); + }), + (e.PrepareUniformBuffer = function (e) { + e.addUniform("vSheenColor", 4), e.addUniform("vSheenInfos", 2), e.addUniform("sheenMatrix", 16); + }), + (e.AddSamplers = function (e) { + e.push("sheenSampler"); + }), + (e.prototype.copyTo = function (e) { + r.a.Clone(function () { + return e; + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.prototype.parse = function (e, t, n) { + var i = this; + r.a.Parse( + function () { + return i; + }, + e, + t, + n + ); + }), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isEnabled", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "linkSheenWithAlbedo", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "intensity", void 0), + Object(i.c)([Object(r.e)()], e.prototype, "color", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "texture", void 0), + e + ); + })(), + _ = (function () { + function e(e) { + (this._isRefractionEnabled = !1), + (this.isRefractionEnabled = !1), + (this._isTranslucencyEnabled = !1), + (this.isTranslucencyEnabled = !1), + (this._isScatteringEnabled = !1), + (this.refractionIntensity = 1), + (this.translucencyIntensity = 1), + (this.scatteringIntensity = 1), + (this._thicknessTexture = null), + (this.thicknessTexture = null), + (this._refractionTexture = null), + (this.refractionTexture = null), + (this._indexOfRefraction = 1), + (this.indexOfRefraction = 1), + (this._invertRefractionY = !1), + (this.invertRefractionY = !1), + (this._linkRefractionWithTransparency = !1), + (this.linkRefractionWithTransparency = !1), + (this.minimumThickness = 0), + (this.maximumThickness = 1), + (this.tintColor = h.a.White()), + (this.tintColorAtDistance = 1), + (this.diffusionDistance = h.a.White()), + (this._useMaskFromThicknessTexture = !1), + (this.useMaskFromThicknessTexture = !1), + (this._internalMarkAllSubMeshesAsTexturesDirty = e); + } + return ( + (e.prototype._markAllSubMeshesAsTexturesDirty = function () { + this._internalMarkAllSubMeshesAsTexturesDirty(); + }), + (e.prototype.isReadyForSubMesh = function (e, t) { + if (e._areTexturesDirty && t.texturesEnabled) { + if (this._thicknessTexture && d.a.ThicknessTextureEnabled && !this._thicknessTexture.isReadyOrNotBlocking()) return !1; + var n = this._getRefractionTexture(t); + if (n && d.a.RefractionTextureEnabled && !n.isReadyOrNotBlocking()) return !1; + } + return !0; + }), + (e.prototype.prepareDefines = function (e, t) { + if ( + e._areTexturesDirty && + ((e.SUBSURFACE = !1), + (e.SS_TRANSLUCENCY = this._isTranslucencyEnabled), + (e.SS_SCATERRING = this._isScatteringEnabled), + (e.SS_THICKNESSANDMASK_TEXTURE = !1), + (e.SS_MASK_FROM_THICKNESS_TEXTURE = !1), + (e.SS_REFRACTION = !1), + (e.SS_REFRACTIONMAP_3D = !1), + (e.SS_GAMMAREFRACTION = !1), + (e.SS_RGBDREFRACTION = !1), + (e.SS_LINEARSPECULARREFRACTION = !1), + (e.SS_REFRACTIONMAP_OPPOSITEZ = !1), + (e.SS_LODINREFRACTIONALPHA = !1), + (e.SS_LINKREFRACTIONTOTRANSPARENCY = !1), + (this._isRefractionEnabled || this._isTranslucencyEnabled || this._isScatteringEnabled) && + ((e.SUBSURFACE = !0), + e._areTexturesDirty && t.texturesEnabled && this._thicknessTexture && d.a.ThicknessTextureEnabled && p.a.PrepareDefinesForMergedUV(this._thicknessTexture, e, "SS_THICKNESSANDMASK_TEXTURE"), + (e.SS_MASK_FROM_THICKNESS_TEXTURE = this._useMaskFromThicknessTexture)), + this._isRefractionEnabled && t.texturesEnabled) + ) { + var n = this._getRefractionTexture(t); + n && + d.a.RefractionTextureEnabled && + ((e.SS_REFRACTION = !0), + (e.SS_REFRACTIONMAP_3D = n.isCube), + (e.SS_GAMMAREFRACTION = n.gammaSpace), + (e.SS_RGBDREFRACTION = n.isRGBD), + (e.SS_LINEARSPECULARREFRACTION = n.linearSpecularLOD), + (e.SS_REFRACTIONMAP_OPPOSITEZ = n.invertZ), + (e.SS_LODINREFRACTIONALPHA = n.lodLevelInAlpha), + (e.SS_LINKREFRACTIONTOTRANSPARENCY = this._linkRefractionWithTransparency)); + } + }), + (e.prototype.bindForSubMesh = function (e, t, n, i, r) { + var o = this._getRefractionTexture(t); + if (!e.useUbo || !i || !e.isSync) { + if ( + (this._thicknessTexture && + d.a.ThicknessTextureEnabled && + (e.updateFloat2("vThicknessInfos", this._thicknessTexture.coordinatesIndex, this._thicknessTexture.level), p.a.BindTextureMatrix(this._thicknessTexture, e, "thickness")), + e.updateFloat2("vThicknessParam", this.minimumThickness, this.maximumThickness - this.minimumThickness), + o && d.a.RefractionTextureEnabled) + ) { + e.updateMatrix("refractionMatrix", o.getReflectionTextureMatrix()); + var a = 1; + o.isCube || (o.depth && (a = o.depth)), + e.updateFloat4("vRefractionInfos", o.level, 1 / this._indexOfRefraction, a, this._invertRefractionY ? -1 : 1), + e.updateFloat3("vRefractionMicrosurfaceInfos", o.getSize().width, o.lodGenerationScale, o.lodGenerationOffset); + } + e.updateColor3("vDiffusionDistance", this.diffusionDistance), + e.updateFloat4("vTintColor", this.tintColor.r, this.tintColor.g, this.tintColor.b, this.tintColorAtDistance), + e.updateFloat3("vSubSurfaceIntensity", this.refractionIntensity, this.translucencyIntensity, this.scatteringIntensity); + } + t.texturesEnabled && + (this._thicknessTexture && d.a.ThicknessTextureEnabled && e.setTexture("thicknessSampler", this._thicknessTexture), + o && + d.a.RefractionTextureEnabled && + (r + ? e.setTexture("refractionSampler", o) + : (e.setTexture("refractionSampler", o._lodTextureMid || o), e.setTexture("refractionSamplerLow", o._lodTextureLow || o), e.setTexture("refractionSamplerHigh", o._lodTextureHigh || o)))); + }), + (e.prototype.unbind = function (e) { + return !(!this._refractionTexture || !this._refractionTexture.isRenderTarget) && (e.setTexture("refractionSampler", null), !0); + }), + (e.prototype._getRefractionTexture = function (e) { + return this._refractionTexture ? this._refractionTexture : this._isRefractionEnabled ? e.environmentTexture : null; + }), + Object.defineProperty(e.prototype, "disableAlphaBlending", { + get: function () { + return this.isRefractionEnabled && this._linkRefractionWithTransparency; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.fillRenderTargetTextures = function (e) { + d.a.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget && e.push(this._refractionTexture); + }), + (e.prototype.hasTexture = function (e) { + return this._thicknessTexture === e || this._refractionTexture === e; + }), + (e.prototype.hasRenderTargetTextures = function () { + return !!(d.a.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget); + }), + (e.prototype.getActiveTextures = function (e) { + this._thicknessTexture && e.push(this._thicknessTexture), this._refractionTexture && e.push(this._refractionTexture); + }), + (e.prototype.getAnimatables = function (e) { + this._thicknessTexture && this._thicknessTexture.animations && this._thicknessTexture.animations.length > 0 && e.push(this._thicknessTexture), + this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0 && e.push(this._refractionTexture); + }), + (e.prototype.dispose = function (e) { + e && (this._thicknessTexture && this._thicknessTexture.dispose(), this._refractionTexture && this._refractionTexture.dispose()); + }), + (e.prototype.getClassName = function () { + return "PBRSubSurfaceConfiguration"; + }), + (e.AddFallbacks = function (e, t, n) { + return e.SS_SCATERRING && t.addFallback(n++, "SS_SCATERRING"), e.SS_TRANSLUCENCY && t.addFallback(n++, "SS_TRANSLUCENCY"), n; + }), + (e.AddUniforms = function (e) { + e.push("vDiffusionDistance", "vTintColor", "vSubSurfaceIntensity", "vRefractionMicrosurfaceInfos", "vRefractionInfos", "vThicknessInfos", "vThicknessParam", "refractionMatrix", "thicknessMatrix"); + }), + (e.AddSamplers = function (e) { + e.push("thicknessSampler", "refractionSampler", "refractionSamplerLow", "refractionSamplerHigh"); + }), + (e.PrepareUniformBuffer = function (e) { + e.addUniform("vRefractionMicrosurfaceInfos", 3), + e.addUniform("vRefractionInfos", 4), + e.addUniform("refractionMatrix", 16), + e.addUniform("vThicknessInfos", 2), + e.addUniform("thicknessMatrix", 16), + e.addUniform("vThicknessParam", 2), + e.addUniform("vDiffusionDistance", 3), + e.addUniform("vTintColor", 4), + e.addUniform("vSubSurfaceIntensity", 3); + }), + (e.prototype.copyTo = function (e) { + r.a.Clone(function () { + return e; + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.prototype.parse = function (e, t, n) { + var i = this; + r.a.Parse( + function () { + return i; + }, + e, + t, + n + ); + }), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isRefractionEnabled", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "isTranslucencyEnabled", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "refractionIntensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "translucencyIntensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "scatteringIntensity", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "thicknessTexture", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "refractionTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "indexOfRefraction", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "invertRefractionY", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "linkRefractionWithTransparency", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "minimumThickness", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "maximumThickness", void 0), + Object(i.c)([Object(r.e)()], e.prototype, "tintColor", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "tintColorAtDistance", void 0), + Object(i.c)([Object(r.e)()], e.prototype, "diffusionDistance", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], e.prototype, "useMaskFromThicknessTexture", void 0), + e + ); + })(), + v = n(50), + y = n(41), + C = n(46), + P = n(8), + x = (n(213), n(7)), + T = + "uniform vec3 vReflectionColor;\nuniform vec4 vAlbedoColor;\n\nuniform vec4 vLightingIntensity;\nuniform vec4 vReflectivityColor;\nuniform vec3 vEmissiveColor;\nuniform float visibility;\n\n#ifdef ALBEDO\nuniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform vec4 vAmbientInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform vec2 vTangentSpaceParams;\n#endif\n#ifdef OPACITY\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef REFLECTIVITY\nuniform vec3 vReflectivityInfos;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;\n#endif\n\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(SS_REFRACTION)\nuniform mat4 view;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\n#endif\n#endif\n\n#ifdef CLEARCOAT\nuniform vec2 vClearCoatParams;\nuniform vec4 vClearCoatRefractionParams;\n#ifdef CLEARCOAT_TEXTURE\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;\nuniform vec2 vClearCoatTangentSpaceParams;\nuniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT\nuniform vec4 vClearCoatTintParams;\nuniform float clearCoatColorAtDistance;\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#endif\n\n#ifdef ANISOTROPIC\nuniform vec3 vAnisotropy;\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\n#endif\n#endif\n\n#ifdef SHEEN\nuniform vec4 vSheenColor;\n#ifdef SHEEN_TEXTURE\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\n#endif\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec3 vRefractionMicrosurfaceInfos;\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;\n#endif\nuniform vec2 vThicknessParam;\nuniform vec3 vDiffusionDistance;\nuniform vec4 vTintColor;\nuniform vec3 vSubSurfaceIntensity;\n#endif"; + x.a.IncludesShadersStore.pbrFragmentDeclaration = T; + var S = + "layout(std140,column_major) uniform;\nuniform Material\n{\nuniform vec2 vAlbedoInfos;\nuniform vec4 vAmbientInfos;\nuniform vec2 vOpacityInfos;\nuniform vec2 vEmissiveInfos;\nuniform vec2 vLightmapInfos;\nuniform vec3 vReflectivityInfos;\nuniform vec2 vMicroSurfaceSamplerInfos;\nuniform vec2 vReflectionInfos;\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\nuniform vec3 vBumpInfos;\nuniform mat4 albedoMatrix;\nuniform mat4 ambientMatrix;\nuniform mat4 opacityMatrix;\nuniform mat4 emissiveMatrix;\nuniform mat4 lightmapMatrix;\nuniform mat4 reflectivityMatrix;\nuniform mat4 microSurfaceSamplerMatrix;\nuniform mat4 bumpMatrix;\nuniform vec2 vTangentSpaceParams;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionColor;\nuniform vec4 vAlbedoColor;\nuniform vec4 vLightingIntensity;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float pointSize;\nuniform vec4 vReflectivityColor;\nuniform vec3 vEmissiveColor;\nuniform float visibility;\nuniform vec2 vClearCoatParams;\nuniform vec4 vClearCoatRefractionParams;\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\nuniform vec2 vClearCoatBumpInfos;\nuniform vec2 vClearCoatTangentSpaceParams;\nuniform mat4 clearCoatBumpMatrix;\nuniform vec4 vClearCoatTintParams;\nuniform float clearCoatColorAtDistance;\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\nuniform vec3 vAnisotropy;\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\nuniform vec4 vSheenColor;\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\nuniform vec3 vRefractionMicrosurfaceInfos;\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;\nuniform vec2 vThicknessParam;\nuniform vec3 vDiffusionDistance;\nuniform vec4 vTintColor;\nuniform vec3 vSubSurfaceIntensity;\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};"; + x.a.IncludesShadersStore.pbrUboDeclaration = S; + var O = + "uniform vec4 vEyePosition;\nuniform vec3 vAmbientColor;\nuniform vec4 vCameraInfos;\n\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nuniform vec2 vDebugMode;\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#endif\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif"; + x.a.IncludesShadersStore.pbrFragmentExtraDeclaration = O; + n(60), n(61); + var E = + "#ifdef ALBEDO\n#if ALBEDODIRECTUV == 1\n#define vAlbedoUV vMainUV1\n#elif ALBEDODIRECTUV == 2\n#define vAlbedoUV vMainUV2\n#else\nvarying vec2 vAlbedoUV;\n#endif\nuniform sampler2D albedoSampler;\n#endif\n#ifdef AMBIENT\n#if AMBIENTDIRECTUV == 1\n#define vAmbientUV vMainUV1\n#elif AMBIENTDIRECTUV == 2\n#define vAmbientUV vMainUV2\n#else\nvarying vec2 vAmbientUV;\n#endif\nuniform sampler2D ambientSampler;\n#endif\n#ifdef OPACITY\n#if OPACITYDIRECTUV == 1\n#define vOpacityUV vMainUV1\n#elif OPACITYDIRECTUV == 2\n#define vOpacityUV vMainUV2\n#else\nvarying vec2 vOpacityUV;\n#endif\nuniform sampler2D opacitySampler;\n#endif\n#ifdef EMISSIVE\n#if EMISSIVEDIRECTUV == 1\n#define vEmissiveUV vMainUV1\n#elif EMISSIVEDIRECTUV == 2\n#define vEmissiveUV vMainUV2\n#else\nvarying vec2 vEmissiveUV;\n#endif\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef LIGHTMAP\n#if LIGHTMAPDIRECTUV == 1\n#define vLightmapUV vMainUV1\n#elif LIGHTMAPDIRECTUV == 2\n#define vLightmapUV vMainUV2\n#else\nvarying vec2 vLightmapUV;\n#endif\nuniform sampler2D lightmapSampler;\n#endif\n#ifdef REFLECTIVITY\n#if REFLECTIVITYDIRECTUV == 1\n#define vReflectivityUV vMainUV1\n#elif REFLECTIVITYDIRECTUV == 2\n#define vReflectivityUV vMainUV2\n#else\nvarying vec2 vReflectivityUV;\n#endif\nuniform sampler2D reflectivitySampler;\n#endif\n#ifdef MICROSURFACEMAP\n#if MICROSURFACEMAPDIRECTUV == 1\n#define vMicroSurfaceSamplerUV vMainUV1\n#elif MICROSURFACEMAPDIRECTUV == 2\n#define vMicroSurfaceSamplerUV vMainUV2\n#else\nvarying vec2 vMicroSurfaceSamplerUV;\n#endif\nuniform sampler2D microSurfaceSampler;\n#endif\n#ifdef CLEARCOAT\n#ifdef CLEARCOAT_TEXTURE\n#if CLEARCOAT_TEXTUREDIRECTUV == 1\n#define vClearCoatUV vMainUV1\n#elif CLEARCOAT_TEXTUREDIRECTUV == 2\n#define vClearCoatUV vMainUV2\n#else\nvarying vec2 vClearCoatUV;\n#endif\nuniform sampler2D clearCoatSampler;\n#endif\n#ifdef CLEARCOAT_BUMP\n#if CLEARCOAT_BUMPDIRECTUV == 1\n#define vClearCoatBumpUV vMainUV1\n#elif CLEARCOAT_BUMPDIRECTUV == 2\n#define vClearCoatBumpUV vMainUV2\n#else\nvarying vec2 vClearCoatBumpUV;\n#endif\nuniform sampler2D clearCoatBumpSampler;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\n#if CLEARCOAT_TINT_TEXTUREDIRECTUV == 1\n#define vClearCoatTintUV vMainUV1\n#elif CLEARCOAT_TINT_TEXTUREDIRECTUV == 2\n#define vClearCoatTintUV vMainUV2\n#else\nvarying vec2 vClearCoatTintUV;\n#endif\nuniform sampler2D clearCoatTintSampler;\n#endif\n#endif\n#ifdef SHEEN\n#ifdef SHEEN_TEXTURE\n#if SHEEN_TEXTUREDIRECTUV == 1\n#define vSheenUV vMainUV1\n#elif SHEEN_TEXTUREDIRECTUV == 2\n#define vSheenUV vMainUV2\n#else\nvarying vec2 vSheenUV;\n#endif\nuniform sampler2D sheenSampler;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\n#if ANISOTROPIC_TEXTUREDIRECTUV == 1\n#define vAnisotropyUV vMainUV1\n#elif ANISOTROPIC_TEXTUREDIRECTUV == 2\n#define vAnisotropyUV vMainUV2\n#else\nvarying vec2 vAnisotropyUV;\n#endif\nuniform sampler2D anisotropySampler;\n#endif\n#endif\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#ifdef USEIRRADIANCEMAP\nuniform samplerCube irradianceSampler;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform sampler2D reflectionSamplerLow;\nuniform sampler2D reflectionSamplerHigh;\n#endif\n#ifdef USEIRRADIANCEMAP\nuniform sampler2D irradianceSampler;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#endif\n#ifdef ENVIRONMENTBRDF\nuniform sampler2D environmentBrdfSampler;\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\n#ifdef SS_REFRACTIONMAP_3D\n#define sampleRefraction(s,c) textureCube(s,c)\nuniform samplerCube refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube refractionSamplerLow;\nuniform samplerCube refractionSamplerHigh;\n#endif\n#else\n#define sampleRefraction(s,c) texture2D(s,c)\nuniform sampler2D refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube refractionSamplerLow;\nuniform samplerCube refractionSamplerHigh;\n#endif\n#endif\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\n#if SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 1\n#define vThicknessUV vMainUV1\n#elif SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 2\n#define vThicknessUV vMainUV2\n#else\nvarying vec2 vThicknessUV;\n#endif\nuniform sampler2D thicknessSampler;\n#endif\n#endif"; + x.a.IncludesShadersStore.pbrFragmentSamplersDeclaration = E; + n(140), n(86), n(142), n(87), n(59); + var M = + "\n#define RECIPROCAL_PI2 0.15915494\n#define RECIPROCAL_PI 0.31830988618\n\n#define MINIMUMVARIANCE 0.0005\nfloat convertRoughnessToAverageSlope(float roughness)\n{\n\nreturn square(roughness)+MINIMUMVARIANCE;\n}\nfloat fresnelGrazingReflectance(float reflectance0) {\n\n\nfloat reflectance90=saturate(reflectance0*25.0);\nreturn reflectance90;\n}\nvec2 getAARoughnessFactors(vec3 normalVector) {\n#ifdef SPECULARAA\nvec3 nDfdx=dFdx(normalVector.xyz);\nvec3 nDfdy=dFdy(normalVector.xyz);\nfloat slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy));\n\nfloat geometricRoughnessFactor=pow(saturate(slopeSquare),0.333);\n\nfloat geometricAlphaGFactor=sqrt(slopeSquare);\n\ngeometricAlphaGFactor*=0.75;\nreturn vec2(geometricRoughnessFactor,geometricAlphaGFactor);\n#else\nreturn vec2(0.);\n#endif\n}\n#ifdef ANISOTROPIC\n\n\nvec2 getAnisotropicRoughness(float alphaG,float anisotropy) {\nfloat alphaT=max(alphaG*(1.0+anisotropy),MINIMUMVARIANCE);\nfloat alphaB=max(alphaG*(1.0-anisotropy),MINIMUMVARIANCE);\nreturn vec2(alphaT,alphaB);\n}\n\n\nvec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy) {\nvec3 anisotropicFrameDirection=anisotropy>=0.0 ? B : T;\nvec3 anisotropicFrameTangent=cross(normalize(anisotropicFrameDirection),V);\nvec3 anisotropicFrameNormal=cross(anisotropicFrameTangent,anisotropicFrameDirection);\nvec3 anisotropicNormal=normalize(mix(N,anisotropicFrameNormal,abs(anisotropy)));\nreturn anisotropicNormal;\n\n}\n#endif\n#if defined(CLEARCOAT) || defined(SS_REFRACTION)\n\n\n\nvec3 cocaLambert(vec3 alpha,float distance) {\nreturn exp(-alpha*distance);\n}\n\nvec3 cocaLambert(float NdotVRefract,float NdotLRefract,vec3 alpha,float thickness) {\nreturn cocaLambert(alpha,(thickness*((NdotLRefract+NdotVRefract)/(NdotLRefract*NdotVRefract))));\n}\n\nvec3 computeColorAtDistanceInMedia(vec3 color,float distance) {\nreturn -log(color)/distance;\n}\nvec3 computeClearCoatAbsorption(float NdotVRefract,float NdotLRefract,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {\nvec3 clearCoatAbsorption=mix(vec3(1.0),\ncocaLambert(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness),\nclearCoatIntensity);\nreturn clearCoatAbsorption;\n}\n#endif\n\n\n\n\n#ifdef MICROSURFACEAUTOMATIC\nfloat computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor)\n{\nconst float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95;\nfloat reflectivityLuminance=getLuminance(reflectivityColor);\nfloat reflectivityLuma=sqrt(reflectivityLuminance);\nmicroSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax;\nreturn microSurface;\n}\n#endif"; + x.a.IncludesShadersStore.pbrHelperFunctions = M; + n(141), n(99); + var A = + "#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;\nuniform vec3 vSphericalL1_1;\nuniform vec3 vSphericalL10;\nuniform vec3 vSphericalL11;\nuniform vec3 vSphericalL2_2;\nuniform vec3 vSphericalL2_1;\nuniform vec3 vSphericalL20;\nuniform vec3 vSphericalL21;\nuniform vec3 vSphericalL22;\n\n\n\n\n\n\n\nvec3 computeEnvironmentIrradiance(vec3 normal) {\nreturn vSphericalL00\n+vSphericalL1_1*(normal.y)\n+vSphericalL10*(normal.z)\n+vSphericalL11*(normal.x)\n+vSphericalL2_2*(normal.y*normal.x)\n+vSphericalL2_1*(normal.y*normal.z)\n+vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+vSphericalL21*(normal.z*normal.x)\n+vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));\n}\n#else\nuniform vec3 vSphericalX;\nuniform vec3 vSphericalY;\nuniform vec3 vSphericalZ;\nuniform vec3 vSphericalXX_ZZ;\nuniform vec3 vSphericalYY_ZZ;\nuniform vec3 vSphericalZZ;\nuniform vec3 vSphericalXY;\nuniform vec3 vSphericalYZ;\nuniform vec3 vSphericalZX;\n\nvec3 computeEnvironmentIrradiance(vec3 normal) {\n\n\n\n\n\n\n\n\n\nfloat Nx=normal.x;\nfloat Ny=normal.y;\nfloat Nz=normal.z;\nvec3 C1=vSphericalZZ.rgb;\nvec3 Cx=vSphericalX.rgb;\nvec3 Cy=vSphericalY.rgb;\nvec3 Cz=vSphericalZ.rgb;\nvec3 Cxx_zz=vSphericalXX_ZZ.rgb;\nvec3 Cyy_zz=vSphericalYY_ZZ.rgb;\nvec3 Cxy=vSphericalXY.rgb;\nvec3 Cyz=vSphericalYZ.rgb;\nvec3 Czx=vSphericalZX.rgb;\nvec3 a1=Cyy_zz*Ny+Cy;\nvec3 a2=Cyz*Nz+a1;\nvec3 b1=Czx*Nz+Cx;\nvec3 b2=Cxy*Ny+b1;\nvec3 b3=Cxx_zz*Nx+b2;\nvec3 t1=Cz*Nz+C1;\nvec3 t2=a2*Ny+t1;\nvec3 t3=b3*Nx+t2;\nreturn t3;\n}\n#endif\n#endif"; + x.a.IncludesShadersStore.harmonicsFunctions = A; + var I = + "\nstruct preLightingInfo\n{\n\nvec3 lightOffset;\nfloat lightDistanceSquared;\nfloat lightDistance;\n\nfloat attenuation;\n\nvec3 L;\nvec3 H;\nfloat NdotV;\nfloat NdotLUnclamped;\nfloat NdotL;\nfloat VdotH;\nfloat roughness;\n};\npreLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\nresult.lightOffset=lightData.xyz-vPositionW;\nresult.lightDistanceSquared=dot(result.lightOffset,result.lightOffset);\n\nresult.lightDistance=sqrt(result.lightDistanceSquared);\n\nresult.L=normalize(result.lightOffset);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\nresult.NdotLUnclamped=dot(N,result.L);\nresult.NdotL=saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeDirectionalPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\nresult.lightDistance=length(-lightData.xyz);\n\nresult.L=normalize(-lightData.xyz);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\nresult.NdotLUnclamped=dot(N,result.L);\nresult.NdotL=saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeHemisphericPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\n\nresult.NdotL=dot(N,lightData.xyz)*0.5+0.5;\nresult.NdotL=saturateEps(result.NdotL);\nresult.NdotLUnclamped=result.NdotL;\n#ifdef SPECULARTERM\nresult.L=normalize(lightData.xyz);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\n#endif\nreturn result;\n}"; + x.a.IncludesShadersStore.pbrDirectLightingSetupFunctions = I; + var D = + "float computeDistanceLightFalloff_Standard(vec3 lightOffset,float range)\n{\nreturn max(0.,1.0-length(lightOffset)/range);\n}\nfloat computeDistanceLightFalloff_Physical(float lightDistanceSquared)\n{\nreturn 1.0/maxEps(lightDistanceSquared);\n}\nfloat computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange)\n{\nfloat lightDistanceFalloff=1.0/maxEps(lightDistanceSquared);\nfloat factor=lightDistanceSquared*inverseSquaredRange;\nfloat attenuation=saturate(1.0-factor*factor);\nattenuation*=attenuation;\n\nlightDistanceFalloff*=attenuation;\nreturn lightDistanceFalloff;\n}\nfloat computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDistanceLightFalloff_Physical(lightDistanceSquared);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange);\n#else\nreturn computeDistanceLightFalloff_Standard(lightOffset,range);\n#endif\n}\nfloat computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent)\n{\nfloat falloff=0.0;\nfloat cosAngle=maxEps(dot(-lightDirection,directionToLightCenterW));\nif (cosAngle>=cosHalfAngle)\n{\nfalloff=max(0.,pow(cosAngle,exponent));\n}\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle)\n{\nconst float kMinusLog2ConeAngleIntensityRatio=6.64385618977;\n\n\n\n\n\nfloat concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle);\n\n\nvec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa);\nfloat falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG));\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset)\n{\n\n\n\nfloat cd=dot(-lightDirection,directionToLightCenterW);\nfloat falloff=saturate(cd*lightAngleScale+lightAngleOffset);\n\nfalloff*=falloff;\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset);\n#else\nreturn computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent);\n#endif\n}"; + x.a.IncludesShadersStore.pbrDirectLightingFalloffFunctions = D; + var R = + "\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n\n\n\n\n#ifdef MS_BRDF_ENERGY_CONSERVATION\n\n\nvec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\nreturn 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);\n}\n#endif\n#ifdef ENVIRONMENTBRDF\nvec3 getBRDFLookup(float NdotV,float perceptualRoughness) {\n\nvec2 UV=vec2(NdotV,perceptualRoughness);\n\nvec4 brdfLookup=texture2D(environmentBrdfSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup.rgb=fromRGBD(brdfLookup.rgba);\n#endif\nreturn brdfLookup.rgb;\n}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;\n}\n#endif\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nvec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{\n\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));\n}\n#endif\n#if defined(SHEEN) && defined(REFLECTION)\n\nvec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) {\nvec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b;\nreturn sheenEnvironmentReflectance;\n}\n#endif\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90)\n{\nreturn reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);\n}\nfloat fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90)\n{\nreturn reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);\n}\n#ifdef CLEARCOAT\n\n\n\n\n\nvec3 getR0RemappedForClearCoat(vec3 f0) {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturate(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvec3 s=sqrt(f0);\nvec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s);\nreturn t*t;\n#endif\n}\n#endif\n\n\n\n\n\n\nfloat normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG)\n{\n\n\n\nfloat a2=square(alphaG);\nfloat d=NdotH*NdotH*(a2-1.0)+1.0;\nreturn a2/(PI*d*d);\n}\n#ifdef SHEEN\n\nfloat normalDistributionFunction_CharlieSheen(float NdotH,float alphaG)\n{\nfloat invR=1./alphaG;\nfloat cos2h=NdotH*NdotH;\nfloat sin2h=1.-cos2h;\nreturn (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);\n}\n#endif\n#ifdef ANISOTROPIC\n\n\nfloat normalDistributionFunction_BurleyGGX_Anisotropic(float NdotH,float TdotH,float BdotH,const vec2 alphaTB) {\nfloat a2=alphaTB.x*alphaTB.y;\nvec3 v=vec3(alphaTB.y*TdotH,alphaTB.x*BdotH,a2*NdotH);\nfloat v2=dot(v,v);\nfloat w2=a2/v2;\nreturn a2*w2*w2*RECIPROCAL_PI;\n}\n#endif\n\n\n\n\n#ifdef BRDF_V_HEIGHT_CORRELATED\n\n\n\nfloat smithVisibility_GGXCorrelated(float NdotL,float NdotV,float alphaG) {\n#ifdef MOBILE\n\nfloat GGXV=NdotL*(NdotV*(1.0-alphaG)+alphaG);\nfloat GGXL=NdotV*(NdotL*(1.0-alphaG)+alphaG);\nreturn 0.5/(GGXV+GGXL);\n#else\nfloat a2=alphaG*alphaG;\nfloat GGXV=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);\nfloat GGXL=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);\nreturn 0.5/(GGXV+GGXL);\n#endif\n}\n#else\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfloat smithVisibilityG1_TrowbridgeReitzGGXFast(float dot,float alphaG)\n{\n#ifdef MOBILE\n\nreturn 1.0/(dot+alphaG+(1.0-alphaG)*dot ));\n#else\nfloat alphaSquared=alphaG*alphaG;\nreturn 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));\n#endif\n}\nfloat smithVisibility_TrowbridgeReitzGGXFast(float NdotL,float NdotV,float alphaG)\n{\nfloat visibility=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);\n\nreturn visibility;\n}\n#endif\n#ifdef ANISOTROPIC\n\n\nfloat smithVisibility_GGXCorrelated_Anisotropic(float NdotL,float NdotV,float TdotV,float BdotV,float TdotL,float BdotL,const vec2 alphaTB) {\nfloat lambdaV=NdotL*length(vec3(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));\nfloat lambdaL=NdotV*length(vec3(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));\nfloat v=0.5/(lambdaV+lambdaL);\nreturn v;\n}\n#endif\n#ifdef CLEARCOAT\nfloat visibility_Kelemen(float VdotH) {\n\n\n\nreturn 0.25/(VdotH*VdotH);\n}\n#endif\n#ifdef SHEEN\n\n\n\nfloat visibility_Ashikhmin(float NdotL,float NdotV)\n{\nreturn 1./(4.*(NdotL+NdotV-NdotL*NdotV));\n}\n#endif\n\n\n\n\n\n\n\nfloat diffuseBRDF_Burley(float NdotL,float NdotV,float VdotH,float roughness) {\n\n\nfloat diffuseFresnelNV=pow5(saturateEps(1.0-NdotL));\nfloat diffuseFresnelNL=pow5(saturateEps(1.0-NdotV));\nfloat diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness;\nfloat fresnel =\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);\nreturn fresnel/PI;\n}\n#ifdef SS_TRANSLUCENCY\n\n\nvec3 transmittanceBRDF_Burley(const vec3 tintColor,const vec3 diffusionDistance,float thickness) {\nvec3 S=1./maxEps(diffusionDistance);\nvec3 temp=exp((-0.333333333*thickness)*S);\nreturn tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);\n}\n\n\nfloat computeWrappedDiffuseNdotL(float NdotL,float w) {\nfloat t=1.0+w;\nfloat invt2=1.0/square(t);\nreturn saturate((NdotL+w)*invt2);\n}\n#endif\n"; + x.a.IncludesShadersStore.pbrBRDFFunctions = R; + var w = + "#define CLEARCOATREFLECTANCE90 1.0\n\nstruct lightingInfo\n{\nvec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef CLEARCOAT\n\n\nvec4 clearCoat;\n#endif\n#ifdef SHEEN\nvec3 sheen;\n#endif\n};\n\nfloat adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance) {\n#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF)\n\nfloat lightRoughness=lightRadius/lightDistance;\n\nfloat totalRoughness=saturate(lightRoughness+roughness);\nreturn totalRoughness;\n#else\nreturn roughness;\n#endif\n}\nvec3 computeHemisphericDiffuseLighting(preLightingInfo info,vec3 lightColor,vec3 groundColor) {\nreturn mix(groundColor,lightColor,info.NdotL);\n}\nvec3 computeDiffuseLighting(preLightingInfo info,vec3 lightColor) {\nfloat diffuseTerm=diffuseBRDF_Burley(info.NdotL,info.NdotV,info.VdotH,info.roughness);\nreturn diffuseTerm*info.attenuation*info.NdotL*lightColor;\n}\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\nstrq/=strq.w;\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\nreturn toLinearSpace(textureColor);\n}\n#ifdef SS_TRANSLUCENCY\nvec3 computeDiffuseAndTransmittedLighting(preLightingInfo info,vec3 lightColor,vec3 transmittance) {\nfloat NdotL=absEps(info.NdotLUnclamped);\n\nfloat wrapNdotL=computeWrappedDiffuseNdotL(NdotL,0.02);\n\nfloat trAdapt=step(0.,info.NdotLUnclamped);\nvec3 transmittanceNdotL=mix(transmittance*wrapNdotL,vec3(wrapNdotL),trAdapt);\nfloat diffuseTerm=diffuseBRDF_Burley(NdotL,info.NdotV,info.VdotH,info.roughness);\nreturn diffuseTerm*transmittanceNdotL*info.attenuation*lightColor;\n}\n#endif\n#ifdef SPECULARTERM\nvec3 computeSpecularLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat roughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\nvec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG);\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfloat smithVisibility=smithVisibility_GGXCorrelated(info.NdotL,info.NdotV,alphaG);\n#else\nfloat smithVisibility=smithVisibility_TrowbridgeReitzGGXFast(info.NdotL,info.NdotV,alphaG);\n#endif\nvec3 specTerm=fresnel*distribution*smithVisibility;\nreturn specTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n#ifdef ANISOTROPIC\nvec3 computeAnisotropicSpecularLighting(preLightingInfo info,vec3 V,vec3 N,vec3 T,vec3 B,float anisotropy,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat TdotH=dot(T,info.H);\nfloat BdotH=dot(B,info.H);\nfloat TdotV=dot(T,V);\nfloat BdotV=dot(B,V);\nfloat TdotL=dot(T,info.L);\nfloat BdotL=dot(B,info.L);\nfloat alphaG=convertRoughnessToAverageSlope(info.roughness);\nvec2 alphaTB=getAnisotropicRoughness(alphaG,anisotropy);\nalphaTB=max(alphaTB,square(geometricRoughnessFactor));\nvec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\nfloat distribution=normalDistributionFunction_BurleyGGX_Anisotropic(NdotH,TdotH,BdotH,alphaTB);\nfloat smithVisibility=smithVisibility_GGXCorrelated_Anisotropic(info.NdotL,info.NdotV,TdotV,BdotV,TdotL,BdotL,alphaTB);\nvec3 specTerm=fresnel*distribution*smithVisibility;\nreturn specTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n#ifdef CLEARCOAT\nvec4 computeClearCoatLighting(preLightingInfo info,vec3 Ncc,float geometricRoughnessFactor,float clearCoatIntensity,vec3 lightColor) {\nfloat NccdotL=saturateEps(dot(Ncc,info.L));\nfloat NccdotH=saturateEps(dot(Ncc,info.H));\nfloat clearCoatRoughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(clearCoatRoughness);\nfloat fresnel=fresnelSchlickGGX(info.VdotH,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);\nfresnel*=clearCoatIntensity;\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NccdotH,alphaG);\nfloat kelemenVisibility=visibility_Kelemen(info.VdotH);\nfloat clearCoatTerm=fresnel*distribution*kelemenVisibility;\nreturn vec4(\nclearCoatTerm*info.attenuation*NccdotL*lightColor,\n1.0-fresnel\n);\n}\nvec3 computeClearCoatLightingAbsorption(float NdotVRefract,vec3 L,vec3 Ncc,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {\nvec3 LRefract=-refract(L,Ncc,vClearCoatRefractionParams.y);\nfloat NdotLRefract=saturateEps(dot(Ncc,LRefract));\nvec3 absorption=computeClearCoatAbsorption(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity);\nreturn absorption;\n}\n#endif\n#ifdef SHEEN\nvec3 computeSheenLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat roughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\n\n\nfloat fresnel=1.;\nfloat distribution=normalDistributionFunction_CharlieSheen(NdotH,alphaG);\nfloat ashikhminvisibility=visibility_Ashikhmin(info.NdotL,info.NdotV);\nfloat sheenTerm=fresnel*distribution*ashikhminvisibility;\nreturn sheenTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n"; + x.a.IncludesShadersStore.pbrDirectLightingFunctions = w; + var L = + "#if defined(REFLECTION) || defined(SS_REFRACTION)\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float microsurfaceAverageSlope) {\nfloat microsurfaceAverageSlopeTexels=cubeMapDimensionPixels*microsurfaceAverageSlope;\nfloat lod=log2(microsurfaceAverageSlopeTexels);\nreturn lod;\n}\nfloat getLinearLodFromRoughness(float cubeMapDimensionPixels,float roughness) {\nfloat lod=log2(cubeMapDimensionPixels)*roughness;\nreturn lod;\n}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION)\nfloat environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) {\n\n\nfloat temp=NdotVUnclamped+ambientOcclusion;\nreturn saturate(square(temp)-1.0+ambientOcclusion);\n}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION)\nfloat environmentHorizonOcclusion(vec3 view,vec3 normal) {\n\nvec3 reflection=reflect(view,normal);\nfloat temp=saturate(1.0+1.1*dot(reflection,normal));\nreturn square(temp);\n}\n#endif\n\n\n\n\n#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA)\n\n\n#define UNPACK_LOD(x) (1.0-x)*255.0\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) {\nfloat microsurfaceAverageSlope=alphaG;\n\n\n\n\n\n\nmicrosurfaceAverageSlope*=sqrt(abs(NdotV));\nreturn getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope);\n}\n#endif"; + x.a.IncludesShadersStore.pbrIBLFunctions = L; + n(172), n(171), n(82), n(173), n(114), n(100), n(174), n(90); + var F = + "#if DEBUGMODE>0\nif (vClipSpacePosition.x/vClipSpacePosition.w\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include\n#include\n#include\n#include\n\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#ifdef REFLECTION\n#include\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include\n\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#endif\n#ifdef CLEARCOAT\n\nvec3 clearCoatNormalW=normalW;\n#endif\n#include\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nvec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#if defined(TWOSIDEDLIGHTING)\nfaceNormal=gl_FrontFacing ? faceNormal : -faceNormal;\n#endif\nnormalW*=sign(dot(normalW,faceNormal));\n#endif\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n\n\nvec3 surfaceAlbedo=vAlbedoColor.rgb;\n\nfloat alpha=vAlbedoColor.a;\n#ifdef ALBEDO\nvec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset);\n#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST)\nalpha*=albedoTexture.a;\n#endif\n#ifdef GAMMAALBEDO\nsurfaceAlbedo*=toLinearSpace(albedoTexture.rgb);\n#else\nsurfaceAlbedo*=albedoTexture.rgb;\n#endif\nsurfaceAlbedo*=vAlbedoInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nsurfaceAlbedo*=vColor.rgb;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_ALBEDO\n\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#ifdef OPACITYRGB\nalpha=getLuminance(opacityMap.rgb);\n#else\nalpha*=opacityMap.a;\n#endif\nalpha*=vOpacityInfos.y;\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#if !defined(SS_LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL)\n#ifdef ALPHATEST\nif (alpha\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\n\nvec3 ambientOcclusionColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nvec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\n#ifdef AMBIENTINGRAYSCALE\nambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);\n#endif\nambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);\n#endif\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\n\nfloat microSurface=vReflectivityColor.a;\nvec3 surfaceReflectivityColor=vReflectivityColor.rgb;\n#ifdef METALLICWORKFLOW\nvec2 metallicRoughness=surfaceReflectivityColor.rg;\n#ifdef REFLECTIVITY\nvec4 surfaceMetallicColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\n#ifdef AOSTOREINMETALMAPRED\nvec3 aoStoreInMetalMap=vec3(surfaceMetallicColorMap.r,surfaceMetallicColorMap.r,surfaceMetallicColorMap.r);\nambientOcclusionColor=mix(ambientOcclusionColor,aoStoreInMetalMap,vReflectivityInfos.z);\n#endif\n#ifdef METALLNESSSTOREINMETALMAPBLUE\nmetallicRoughness.r*=surfaceMetallicColorMap.b;\n#else\nmetallicRoughness.r*=surfaceMetallicColorMap.r;\n#endif\n#ifdef ROUGHNESSSTOREINMETALMAPALPHA\nmetallicRoughness.g*=surfaceMetallicColorMap.a;\n#else\n#ifdef ROUGHNESSSTOREINMETALMAPGREEN\nmetallicRoughness.g*=surfaceMetallicColorMap.g;\n#endif\n#endif\n#endif\n#ifdef MICROSURFACEMAP\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\nmetallicRoughness.g*=microSurfaceTexel.r;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS\n\nmicroSurface=1.0-metallicRoughness.g;\n\nvec3 baseColor=surfaceAlbedo;\n#ifdef REFLECTANCE\n\n\n\n\n\nsurfaceAlbedo=baseColor.rgb*(1.0-metallicRoughness.r);\n\nsurfaceReflectivityColor=mix(0.16*reflectance*reflectance,baseColor,metallicRoughness.r);\n#else\nvec3 metallicF0=vec3(vReflectivityColor.a,vReflectivityColor.a,vReflectivityColor.a);\n#ifdef METALLICF0FACTORFROMMETALLICMAP\n#ifdef REFLECTIVITY\nmetallicF0*=surfaceMetallicColorMap.a;\n#endif\n#endif\n\nsurfaceAlbedo=mix(baseColor.rgb*(1.0-metallicF0.r),vec3(0.,0.,0.),metallicRoughness.r);\n\nsurfaceReflectivityColor=mix(metallicF0,baseColor,metallicRoughness.r);\n#endif\n#else\n#ifdef REFLECTIVITY\nvec4 surfaceReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\nsurfaceReflectivityColor*=toLinearSpace(surfaceReflectivityColorMap.rgb);\nsurfaceReflectivityColor*=vReflectivityInfos.y;\n#ifdef MICROSURFACEFROMREFLECTIVITYMAP\nmicroSurface*=surfaceReflectivityColorMap.a;\nmicroSurface*=vReflectivityInfos.z;\n#else\n#ifdef MICROSURFACEAUTOMATIC\nmicroSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor);\n#endif\n#ifdef MICROSURFACEMAP\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\nmicroSurface*=microSurfaceTexel.r;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE\n#endif\n#endif\n#endif\n\nmicroSurface=saturate(microSurface);\n\nfloat roughness=1.-microSurface;\n\n#ifdef ALPHAFRESNEL\n#if defined(ALPHATEST) || defined(ALPHABLEND)\n\n\n\nfloat opacityPerceptual=alpha;\n#ifdef LINEARALPHAFRESNEL\nfloat opacity0=opacityPerceptual;\n#else\nfloat opacity0=opacityPerceptual*opacityPerceptual;\n#endif\nfloat opacity90=fresnelGrazingReflectance(opacity0);\nvec3 normalForward=faceforward(normalW,-viewDirectionW,normalW);\n\nalpha=getReflectanceFromAnalyticalBRDFLookup_Jones(saturate(dot(viewDirectionW,normalForward)),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x;\n#ifdef ALPHATEST\nif (alpha[0..maxSimultaneousLights]\n\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\nvec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(specularEnvironmentR0,environmentBrdf);\n#ifdef RADIANCEOCCLUSION\n#ifdef AMBIENTINGRAYSCALE\nfloat ambientMonochrome=ambientOcclusionColor.r;\n#else\nfloat ambientMonochrome=getLuminance(ambientOcclusionColor);\n#endif\nfloat seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped);\nspecularEnvironmentReflectance*=seo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat eho=environmentHorizonOcclusion(-viewDirectionW,normalW);\nspecularEnvironmentReflectance*=eho;\n#endif\n#endif\n#endif\n#else\n\nvec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface));\n#endif\n\n#if defined(SHEEN) && defined(REFLECTION)\nvec3 sheenEnvironmentReflectance=getSheenReflectanceFromBRDFLookup(sheenColor,environmentBrdf);\n#ifdef RADIANCEOCCLUSION\nsheenEnvironmentReflectance*=seo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nsheenEnvironmentReflectance*=eho;\n#endif\n#endif\n#endif\n#endif\n\n#ifdef CLEARCOAT\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\n\nvec3 environmentClearCoatBrdf=getBRDFLookup(clearCoatNdotV,clearCoatRoughness);\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromBRDFLookup(vec3(vClearCoatRefractionParams.x),environmentClearCoatBrdf);\n#ifdef RADIANCEOCCLUSION\nfloat clearCoatSeo=environmentRadianceOcclusion(ambientMonochrome,clearCoatNdotVUnclamped);\nclearCoatEnvironmentReflectance*=clearCoatSeo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat clearCoatEho=environmentHorizonOcclusion(-viewDirectionW,clearCoatNormalW);\nclearCoatEnvironmentReflectance*=clearCoatEho;\n#endif\n#endif\n#endif\n#else\n\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(clearCoatNdotV,vec3(1.),vec3(1.),sqrt(1.-clearCoatRoughness));\n#endif\nclearCoatEnvironmentReflectance*=clearCoatIntensity;\n#if defined(CLEARCOAT_TINT)\n\nabsorption=computeClearCoatAbsorption(clearCoatNdotVRefract,clearCoatNdotVRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity);\n#ifdef REFLECTION\nenvironmentIrradiance*=absorption;\n#ifdef SHEEN\nsheenEnvironmentReflectance*=absorption;\n#endif\n#endif\nspecularEnvironmentReflectance*=absorption;\n#endif\n\nfloat fresnelIBLClearCoat=fresnelSchlickGGX(clearCoatNdotV,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);\nfresnelIBLClearCoat*=clearCoatIntensity;\nfloat conservationFactor=(1.-fresnelIBLClearCoat);\n#ifdef REFLECTION\nenvironmentIrradiance*=conservationFactor;\n#ifdef SHEEN\nsheenEnvironmentReflectance*=conservationFactor;\n#endif\n#endif\nspecularEnvironmentReflectance*=conservationFactor;\n#endif\n\n#ifdef SS_REFRACTION\nvec3 refractionTransmittance=vec3(refractionIntensity);\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);\n\n\n\n\n\nrefractionTransmittance*=cocaLambert(volumeAlbedo,thickness);\n#elif defined(SS_LINKREFRACTIONTOTRANSPARENCY)\n\nfloat maxChannel=max(max(surfaceAlbedo.r,surfaceAlbedo.g),surfaceAlbedo.b);\nvec3 volumeAlbedo=saturate(maxChannel*surfaceAlbedo);\n\nenvironmentRefraction.rgb*=volumeAlbedo;\n#else\n\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);\nrefractionTransmittance*=cocaLambert(volumeAlbedo,vThicknessParam.y);\n#endif\n\nsurfaceAlbedo*=(1.-refractionIntensity);\n#ifdef REFLECTION\n\nenvironmentIrradiance*=(1.-refractionIntensity);\n#endif\n\nvec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance);\nspecularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,refractionIntensity);\n\nrefractionTransmittance*=1.0-specularEnvironmentReflectance;\n#endif\n\n#if defined(REFLECTION) && defined(SS_TRANSLUCENCY)\n#if defined(USESPHERICALINVERTEX)\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nirradianceVector.z*=-1.0;\n#endif\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP)\nvec3 refractionIrradiance=computeEnvironmentIrradiance(-irradianceVector);\n#elif defined(USEIRRADIANCEMAP)\nvec3 refractionIrradiance=sampleReflection(irradianceSampler,-irradianceVector).rgb;\n#ifdef RGBDREFLECTION\nrefractionIrradiance.rgb=fromRGBD(refractionIrradiance);\n#endif\n#ifdef GAMMAREFLECTION\nrefractionIrradiance.rgb=toLinearSpace(refractionIrradiance.rgb);\n#endif\n#else\nvec3 refractionIrradiance=vec3(0.);\n#endif\nrefractionIrradiance*=transmittance;\n#endif\n\n\n\n#ifndef METALLICWORKFLOW\n#ifdef SPECULAR_GLOSSINESS_ENERGY_CONSERVATION\nsurfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb;\n#endif\n#endif\n\n#ifdef REFLECTION\nvec3 finalIrradiance=environmentIrradiance;\n#if defined(SS_TRANSLUCENCY)\nfinalIrradiance+=refractionIrradiance;\n#endif\nfinalIrradiance*=surfaceAlbedo.rgb;\n#endif\n\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase;\nfinalSpecular=max(finalSpecular,0.0);\n\nvec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalSpecularScaled*=energyConservationFactor;\n#endif\n#endif\n\n#ifdef REFLECTION\nvec3 finalRadiance=environmentRadiance.rgb;\nfinalRadiance*=specularEnvironmentReflectance;\n\nvec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalRadianceScaled*=energyConservationFactor;\n#endif\n#endif\n\n#ifdef SS_REFRACTION\nvec3 finalRefraction=environmentRefraction.rgb;\nfinalRefraction*=refractionTransmittance;\n#endif\n\n#ifdef CLEARCOAT\nvec3 finalClearCoat=clearCoatBase;\nfinalClearCoat=max(finalClearCoat,0.0);\n\nvec3 finalClearCoatScaled=finalClearCoat*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalClearCoatScaled*=energyConservationFactor;\n#endif\n\n#ifdef REFLECTION\nvec3 finalClearCoatRadiance=environmentClearCoatRadiance.rgb;\nfinalClearCoatRadiance*=clearCoatEnvironmentReflectance;\n\nvec3 finalClearCoatRadianceScaled=finalClearCoatRadiance*vLightingIntensity.z;\n#endif\n#ifdef SS_REFRACTION\nfinalRefraction*=conservationFactor;\n#ifdef CLEARCOAT_TINT\nfinalRefraction*=absorption;\n#endif\n#endif\n#endif\n\n#ifdef SHEEN\nvec3 finalSheen=sheenBase*sheenColor;\nfinalSheen=max(finalSheen,0.0);\nvec3 finalSheenScaled=finalSheen*vLightingIntensity.x*vLightingIntensity.w;\n\n\n\n\n\n#ifdef REFLECTION\nvec3 finalSheenRadiance=environmentSheenRadiance.rgb;\nfinalSheenRadiance*=sheenEnvironmentReflectance;\n\nvec3 finalSheenRadianceScaled=finalSheenRadiance*vLightingIntensity.z;\n#endif\n#endif\n\n#ifdef ALPHABLEND\nfloat luminanceOverAlpha=0.0;\n#if defined(REFLECTION) && defined(RADIANCEOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalRadianceScaled);\n#if defined(CLEARCOAT)\nluminanceOverAlpha+=getLuminance(finalClearCoatRadianceScaled);\n#endif\n#endif\n#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA)\nluminanceOverAlpha+=getLuminance(finalSpecularScaled);\n#endif\n#if defined(CLEARCOAT) && defined(CLEARCOATOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalClearCoatScaled);\n#endif\n#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA)\nalpha=saturate(alpha+luminanceOverAlpha*luminanceOverAlpha);\n#endif\n#endif\n#endif\n\n\nvec3 finalDiffuse=diffuseBase;\nfinalDiffuse*=surfaceAlbedo.rgb;\nfinalDiffuse=max(finalDiffuse,0.0);\n\nvec3 finalAmbient=vAmbientColor;\nfinalAmbient*=surfaceAlbedo.rgb;\n\nvec3 finalEmissive=vEmissiveColor;\n#ifdef EMISSIVE\nvec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb;\nfinalEmissive*=toLinearSpace(emissiveColorTex.rgb);\nfinalEmissive*=vEmissiveInfos.y;\n#endif\n\n#ifdef AMBIENT\nvec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),ambientOcclusionColor,vAmbientInfos.w);\n#else\nvec3 ambientOcclusionForDirectDiffuse=ambientOcclusionColor;\n#endif\n\n\n\nvec4 finalColor=vec4(\nfinalAmbient*ambientOcclusionColor +\nfinalDiffuse*ambientOcclusionForDirectDiffuse*vLightingIntensity.x +\n#ifndef UNLIT\n#ifdef REFLECTION\nfinalIrradiance*ambientOcclusionColor*vLightingIntensity.z +\n#endif\n#ifdef SPECULARTERM\n\n\nfinalSpecularScaled +\n#endif\n#ifdef CLEARCOAT\n\n\nfinalClearCoatScaled +\n#endif\n#ifdef SHEEN\n\n\nfinalSheenScaled +\n#endif\n#ifdef REFLECTION\n\n\nfinalRadianceScaled +\n#ifdef CLEARCOAT\n\n\nfinalClearCoatRadianceScaled +\n#endif\n#ifdef SHEEN\n\n\nfinalSheenRadianceScaled +\n#endif\n#endif\n#ifdef SS_REFRACTION\nfinalRefraction*vLightingIntensity.z +\n#endif\n#endif\nfinalEmissive*vLightingIntensity.y,\nalpha);\n\n#ifdef LIGHTMAP\n#ifndef LIGHTMAPEXCLUDED\n#ifdef USELIGHTMAPASSHADOWMAP\nfinalColor.rgb*=lightmapColor.rgb;\n#else\nfinalColor.rgb+=lightmapColor.rgb;\n#endif\n#endif\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FOG\n\nfinalColor=max(finalColor,0.0);\n#include\n#include(color,finalColor)\n#ifdef IMAGEPROCESSINGPOSTPROCESS\n\n\nfinalColor.rgb=clamp(finalColor.rgb,0.,30.0);\n#else\n\nfinalColor=applyImageProcessing(finalColor);\n#endif\nfinalColor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\n\nfinalColor.rgb*=finalColor.a;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\ngl_FragColor=finalColor;\n#include\n}\n"; + x.a.ShadersStore.pbrPixelShader = N; + var k = + "uniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef ALBEDO\nuniform mat4 albedoMatrix;\nuniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;\nuniform vec4 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\nuniform mat4 lightmapMatrix;\n#endif\n#ifdef REFLECTIVITY\nuniform vec3 vReflectivityInfos;\nuniform mat4 reflectivityMatrix;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;\nuniform mat4 microSurfaceSamplerMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform mat4 bumpMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\n#endif\n\n#ifdef CLEARCOAT\n#ifdef CLEARCOAT_TEXTURE\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;\nuniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\n#endif\n#endif\n\n#ifdef SHEEN\n#ifdef SHEEN_TEXTURE\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\n#endif\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;\n#endif\n#endif\n"; + x.a.IncludesShadersStore.pbrVertexDeclaration = k; + n(70), n(71), n(224), n(88), n(91), n(131), n(132), n(143), n(72), n(73), n(210), n(83), n(93), n(101), n(175); + var z = + "precision highp float;\n#include<__decl__pbrVertex>\n#define CUSTOM_VERTEX_BEGIN\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n\n#include\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0\nvarying vec2 vAlbedoUV;\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nvarying vec2 vAmbientUV;\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nvarying vec2 vOpacityUV;\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nvarying vec2 vEmissiveUV;\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nvarying vec2 vLightmapUV;\n#endif\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0\nvarying vec2 vReflectivityUV;\n#endif\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0\nvarying vec2 vMicroSurfaceSamplerUV;\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nvarying vec2 vBumpUV;\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0\nvarying vec2 vClearCoatUV;\n#endif\n#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0\nvarying vec2 vClearCoatBumpUV;\n#endif\n#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0\nvarying vec2 vClearCoatTintUV;\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0\nvarying vec2 vSheenUV;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0\nvarying vec2 vAnisotropyUV;\n#endif\n#endif\n#ifdef SUBSURFACE\n#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0\nvarying vec2 vThicknessUV;\n#endif\n#endif\n\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include\n#endif\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include\n#include\n#include\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#include[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include\n#include\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n} else {\ngl_Position=viewProjectionR*finalWorld*vec4(positionUpdated,1.0);\n}\n#else\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0\nif (vAlbedoInfos.x == 0.)\n{\nvAlbedoUV=vec2(albedoMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nif (vAmbientInfos.x == 0.)\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nif (vEmissiveInfos.x == 0.)\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nif (vLightmapInfos.x == 0.)\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0\nif (vReflectivityInfos.x == 0.)\n{\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0\nif (vMicroSurfaceSamplerInfos.x == 0.)\n{\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nif (vBumpInfos.x == 0.)\n{\nvBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0\nif (vClearCoatInfos.x == 0.)\n{\nvClearCoatUV=vec2(clearCoatMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvClearCoatUV=vec2(clearCoatMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0\nif (vClearCoatBumpInfos.x == 0.)\n{\nvClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0\nif (vClearCoatTintInfos.x == 0.)\n{\nvClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0\nif (vSheenInfos.x == 0.)\n{\nvSheenUV=vec2(sheenMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvSheenUV=vec2(sheenMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef ANISOTROPIC\n#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0\nif (vAnisotropyInfos.x == 0.)\n{\nvAnisotropyUV=vec2(anisotropyMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvAnisotropyUV=vec2(anisotropyMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef SUBSURFACE\n#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0\nif (vThicknessInfos.x == 0.)\n{\nvThicknessUV=vec2(thicknessMatrix*vec4(uvUpdated,1.0,0.0));\n}\nelse\n{\nvThicknessUV=vec2(thicknessMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n\n#include\n\n#include\n\n#include\n\n#include[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n\n#include\n#define CUSTOM_VERTEX_MAIN_END\n}"; + x.a.ShadersStore.pbrVertexShader = z; + var j = n(43), + B = (function (e) { + function t() { + var t = e.call(this) || this; + return ( + (t.PBR = !0), + (t.MAINUV1 = !1), + (t.MAINUV2 = !1), + (t.UV1 = !1), + (t.UV2 = !1), + (t.ALBEDO = !1), + (t.GAMMAALBEDO = !1), + (t.ALBEDODIRECTUV = 0), + (t.VERTEXCOLOR = !1), + (t.AMBIENT = !1), + (t.AMBIENTDIRECTUV = 0), + (t.AMBIENTINGRAYSCALE = !1), + (t.OPACITY = !1), + (t.VERTEXALPHA = !1), + (t.OPACITYDIRECTUV = 0), + (t.OPACITYRGB = !1), + (t.ALPHATEST = !1), + (t.DEPTHPREPASS = !1), + (t.ALPHABLEND = !1), + (t.ALPHAFROMALBEDO = !1), + (t.ALPHATESTVALUE = "0.5"), + (t.SPECULAROVERALPHA = !1), + (t.RADIANCEOVERALPHA = !1), + (t.ALPHAFRESNEL = !1), + (t.LINEARALPHAFRESNEL = !1), + (t.PREMULTIPLYALPHA = !1), + (t.EMISSIVE = !1), + (t.EMISSIVEDIRECTUV = 0), + (t.REFLECTIVITY = !1), + (t.REFLECTIVITYDIRECTUV = 0), + (t.SPECULARTERM = !1), + (t.MICROSURFACEFROMREFLECTIVITYMAP = !1), + (t.MICROSURFACEAUTOMATIC = !1), + (t.LODBASEDMICROSFURACE = !1), + (t.MICROSURFACEMAP = !1), + (t.MICROSURFACEMAPDIRECTUV = 0), + (t.METALLICWORKFLOW = !1), + (t.ROUGHNESSSTOREINMETALMAPALPHA = !1), + (t.ROUGHNESSSTOREINMETALMAPGREEN = !1), + (t.METALLNESSSTOREINMETALMAPBLUE = !1), + (t.AOSTOREINMETALMAPRED = !1), + (t.METALLICF0FACTORFROMMETALLICMAP = !1), + (t.ENVIRONMENTBRDF = !1), + (t.ENVIRONMENTBRDF_RGBD = !1), + (t.NORMAL = !1), + (t.TANGENT = !1), + (t.BUMP = !1), + (t.BUMPDIRECTUV = 0), + (t.OBJECTSPACE_NORMALMAP = !1), + (t.PARALLAX = !1), + (t.PARALLAXOCCLUSION = !1), + (t.NORMALXYSCALE = !0), + (t.LIGHTMAP = !1), + (t.LIGHTMAPDIRECTUV = 0), + (t.USELIGHTMAPASSHADOWMAP = !1), + (t.GAMMALIGHTMAP = !1), + (t.RGBDLIGHTMAP = !1), + (t.REFLECTION = !1), + (t.REFLECTIONMAP_3D = !1), + (t.REFLECTIONMAP_SPHERICAL = !1), + (t.REFLECTIONMAP_PLANAR = !1), + (t.REFLECTIONMAP_CUBIC = !1), + (t.USE_LOCAL_REFLECTIONMAP_CUBIC = !1), + (t.REFLECTIONMAP_PROJECTION = !1), + (t.REFLECTIONMAP_SKYBOX = !1), + (t.REFLECTIONMAP_EXPLICIT = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + (t.INVERTCUBICMAP = !1), + (t.USESPHERICALFROMREFLECTIONMAP = !1), + (t.USEIRRADIANCEMAP = !1), + (t.SPHERICAL_HARMONICS = !1), + (t.USESPHERICALINVERTEX = !1), + (t.REFLECTIONMAP_OPPOSITEZ = !1), + (t.LODINREFLECTIONALPHA = !1), + (t.GAMMAREFLECTION = !1), + (t.RGBDREFLECTION = !1), + (t.LINEARSPECULARREFLECTION = !1), + (t.RADIANCEOCCLUSION = !1), + (t.HORIZONOCCLUSION = !1), + (t.INSTANCES = !1), + (t.NUM_BONE_INFLUENCERS = 0), + (t.BonesPerMesh = 0), + (t.BONETEXTURE = !1), + (t.NONUNIFORMSCALING = !1), + (t.MORPHTARGETS = !1), + (t.MORPHTARGETS_NORMAL = !1), + (t.MORPHTARGETS_TANGENT = !1), + (t.MORPHTARGETS_UV = !1), + (t.NUM_MORPH_INFLUENCERS = 0), + (t.IMAGEPROCESSING = !1), + (t.VIGNETTE = !1), + (t.VIGNETTEBLENDMODEMULTIPLY = !1), + (t.VIGNETTEBLENDMODEOPAQUE = !1), + (t.TONEMAPPING = !1), + (t.TONEMAPPING_ACES = !1), + (t.CONTRAST = !1), + (t.COLORCURVES = !1), + (t.COLORGRADING = !1), + (t.COLORGRADING3D = !1), + (t.SAMPLER3DGREENDEPTH = !1), + (t.SAMPLER3DBGRMAP = !1), + (t.IMAGEPROCESSINGPOSTPROCESS = !1), + (t.EXPOSURE = !1), + (t.MULTIVIEW = !1), + (t.USEPHYSICALLIGHTFALLOFF = !1), + (t.USEGLTFLIGHTFALLOFF = !1), + (t.TWOSIDEDLIGHTING = !1), + (t.SHADOWFLOAT = !1), + (t.CLIPPLANE = !1), + (t.CLIPPLANE2 = !1), + (t.CLIPPLANE3 = !1), + (t.CLIPPLANE4 = !1), + (t.CLIPPLANE5 = !1), + (t.CLIPPLANE6 = !1), + (t.POINTSIZE = !1), + (t.FOG = !1), + (t.LOGARITHMICDEPTH = !1), + (t.FORCENORMALFORWARD = !1), + (t.SPECULARAA = !1), + (t.CLEARCOAT = !1), + (t.CLEARCOAT_DEFAULTIOR = !1), + (t.CLEARCOAT_TEXTURE = !1), + (t.CLEARCOAT_TEXTUREDIRECTUV = 0), + (t.CLEARCOAT_BUMP = !1), + (t.CLEARCOAT_BUMPDIRECTUV = 0), + (t.CLEARCOAT_TINT = !1), + (t.CLEARCOAT_TINT_TEXTURE = !1), + (t.CLEARCOAT_TINT_TEXTUREDIRECTUV = 0), + (t.ANISOTROPIC = !1), + (t.ANISOTROPIC_TEXTURE = !1), + (t.ANISOTROPIC_TEXTUREDIRECTUV = 0), + (t.BRDF_V_HEIGHT_CORRELATED = !1), + (t.MS_BRDF_ENERGY_CONSERVATION = !1), + (t.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION = !1), + (t.SHEEN = !1), + (t.SHEEN_TEXTURE = !1), + (t.SHEEN_TEXTUREDIRECTUV = 0), + (t.SHEEN_LINKWITHALBEDO = !1), + (t.SUBSURFACE = !1), + (t.SS_REFRACTION = !1), + (t.SS_TRANSLUCENCY = !1), + (t.SS_SCATERRING = !1), + (t.SS_THICKNESSANDMASK_TEXTURE = !1), + (t.SS_THICKNESSANDMASK_TEXTUREDIRECTUV = 0), + (t.SS_REFRACTIONMAP_3D = !1), + (t.SS_REFRACTIONMAP_OPPOSITEZ = !1), + (t.SS_LODINREFRACTIONALPHA = !1), + (t.SS_GAMMAREFRACTION = !1), + (t.SS_RGBDREFRACTION = !1), + (t.SS_LINEARSPECULARREFRACTION = !1), + (t.SS_LINKREFRACTIONTOTRANSPARENCY = !1), + (t.SS_MASK_FROM_THICKNESS_TEXTURE = !1), + (t.UNLIT = !1), + (t.DEBUGMODE = 0), + t.rebuild(), + t + ); + } + return ( + Object(i.d)(t, e), + (t.prototype.reset = function () { + e.prototype.reset.call(this), (this.ALPHATESTVALUE = "0.5"), (this.PBR = !0); + }), + t + ); + })(y.a), + V = (function (e) { + function t(n, i) { + var r = e.call(this, n, i) || this; + return ( + (r._directIntensity = 1), + (r._emissiveIntensity = 1), + (r._environmentIntensity = 1), + (r._specularIntensity = 1), + (r._lightingInfos = new l.f(r._directIntensity, r._emissiveIntensity, r._environmentIntensity, r._specularIntensity)), + (r._disableBumpMap = !1), + (r._albedoTexture = null), + (r._ambientTexture = null), + (r._ambientTextureStrength = 1), + (r._ambientTextureImpactOnAnalyticalLights = t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS), + (r._opacityTexture = null), + (r._reflectionTexture = null), + (r._emissiveTexture = null), + (r._reflectivityTexture = null), + (r._metallicTexture = null), + (r._metallic = null), + (r._roughness = null), + (r._metallicF0Factor = 0.5), + (r._useMetallicF0FactorFromMetallicTexture = !1), + (r._microSurfaceTexture = null), + (r._bumpTexture = null), + (r._lightmapTexture = null), + (r._ambientColor = new h.a(0, 0, 0)), + (r._albedoColor = new h.a(1, 1, 1)), + (r._reflectivityColor = new h.a(1, 1, 1)), + (r._reflectionColor = new h.a(1, 1, 1)), + (r._emissiveColor = new h.a(0, 0, 0)), + (r._microSurface = 0.9), + (r._useLightmapAsShadowmap = !1), + (r._useHorizonOcclusion = !0), + (r._useRadianceOcclusion = !0), + (r._useAlphaFromAlbedoTexture = !1), + (r._useSpecularOverAlpha = !0), + (r._useMicroSurfaceFromReflectivityMapAlpha = !1), + (r._useRoughnessFromMetallicTextureAlpha = !0), + (r._useRoughnessFromMetallicTextureGreen = !1), + (r._useMetallnessFromMetallicTextureBlue = !1), + (r._useAmbientOcclusionFromMetallicTextureRed = !1), + (r._useAmbientInGrayScale = !1), + (r._useAutoMicroSurfaceFromReflectivityMap = !1), + (r._lightFalloff = t.LIGHTFALLOFF_PHYSICAL), + (r._useRadianceOverAlpha = !0), + (r._useObjectSpaceNormalMap = !1), + (r._useParallax = !1), + (r._useParallaxOcclusion = !1), + (r._parallaxScaleBias = 0.05), + (r._disableLighting = !1), + (r._maxSimultaneousLights = 4), + (r._invertNormalMapX = !1), + (r._invertNormalMapY = !1), + (r._twoSidedLighting = !1), + (r._alphaCutOff = 0.4), + (r._forceAlphaTest = !1), + (r._useAlphaFresnel = !1), + (r._useLinearAlphaFresnel = !1), + (r._transparencyMode = null), + (r._environmentBRDFTexture = null), + (r._forceIrradianceInFragment = !1), + (r._forceNormalForward = !1), + (r._enableSpecularAntiAliasing = !1), + (r._imageProcessingObserver = null), + (r._renderTargets = new a.a(16)), + (r._globalAmbientColor = new h.a(0, 0, 0)), + (r._useLogarithmicDepth = !1), + (r._unlit = !1), + (r._debugMode = 0), + (r.debugMode = 0), + (r.debugLimit = -1), + (r.debugFactor = 1), + (r.clearCoat = new f(r._markAllSubMeshesAsTexturesDirty.bind(r))), + (r.anisotropy = new m(r._markAllSubMeshesAsTexturesDirty.bind(r))), + (r.brdf = new g(r._markAllSubMeshesAsMiscDirty.bind(r))), + (r.sheen = new b(r._markAllSubMeshesAsTexturesDirty.bind(r))), + (r.subSurface = new _(r._markAllSubMeshesAsTexturesDirty.bind(r))), + (r._rebuildInParallel = !1), + r._attachImageProcessingConfiguration(null), + (r.getRenderTargetTextures = function () { + return ( + r._renderTargets.reset(), + d.a.ReflectionTextureEnabled && r._reflectionTexture && r._reflectionTexture.isRenderTarget && r._renderTargets.push(r._reflectionTexture), + r.subSurface.fillRenderTargetTextures(r._renderTargets), + r._renderTargets + ); + }), + (r._environmentBRDFTexture = s.a.GetEnvironmentBRDFTexture(i)), + r + ); + } + return ( + Object(i.d)(t, e), + (t.prototype._attachImageProcessingConfiguration = function (e) { + var t = this; + e !== this._imageProcessingConfiguration && + (this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + (this._imageProcessingConfiguration = e || this.getScene().imageProcessingConfiguration), + this._imageProcessingConfiguration && + (this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(function () { + t._markAllSubMeshesAsImageProcessingDirty(); + }))); + }), + Object.defineProperty(t.prototype, "hasRenderTargetTextures", { + get: function () { + return !!(d.a.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) || this.subSurface.hasRenderTargetTextures(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "PBRBaseMaterial"; + }), + Object.defineProperty(t.prototype, "useLogarithmicDepth", { + get: function () { + return this._useLogarithmicDepth; + }, + set: function (e) { + this._useLogarithmicDepth = e && this.getScene().getEngine().getCaps().fragmentDepthSupported; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "transparencyMode", { + get: function () { + return this._transparencyMode; + }, + set: function (e) { + this._transparencyMode !== e && ((this._transparencyMode = e), (this._forceAlphaTest = e === t.PBRMATERIAL_ALPHATESTANDBLEND), this._markAllSubMeshesAsTexturesAndMiscDirty()); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "_disableAlphaBlending", { + get: function () { + return this.subSurface.disableAlphaBlending || this._transparencyMode === t.PBRMATERIAL_OPAQUE || this._transparencyMode === t.PBRMATERIAL_ALPHATEST; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.needAlphaBlending = function () { + return !this._disableAlphaBlending && (this.alpha < 1 || null != this._opacityTexture || this._shouldUseAlphaFromAlbedoTexture()); + }), + (t.prototype.needAlphaBlendingForMesh = function (t) { + return !(this._disableAlphaBlending && t.visibility >= 1) && e.prototype.needAlphaBlendingForMesh.call(this, t); + }), + (t.prototype.needAlphaTesting = function () { + return ( + !!this._forceAlphaTest || + (!this.subSurface.disableAlphaBlending && null != this._albedoTexture && this._albedoTexture.hasAlpha && (null == this._transparencyMode || this._transparencyMode === t.PBRMATERIAL_ALPHATEST)) + ); + }), + (t.prototype._shouldUseAlphaFromAlbedoTexture = function () { + return null != this._albedoTexture && this._albedoTexture.hasAlpha && this._useAlphaFromAlbedoTexture && this._transparencyMode !== t.PBRMATERIAL_OPAQUE; + }), + (t.prototype.getAlphaTestTexture = function () { + return this._albedoTexture; + }), + (t.prototype.isReadyForSubMesh = function (e, t, n) { + if (t.effect && this.isFrozen && t.effect._wasPreviouslyReady) return !0; + t._materialDefines || (t._materialDefines = new B()); + var i = t._materialDefines; + if (!this.checkReadyOnEveryCall && t.effect && i._renderId === this.getScene().getRenderId()) return !0; + var r = this.getScene(), + a = r.getEngine(); + if (i._areTexturesDirty && r.texturesEnabled) { + if (this._albedoTexture && d.a.DiffuseTextureEnabled && !this._albedoTexture.isReadyOrNotBlocking()) return !1; + if (this._ambientTexture && d.a.AmbientTextureEnabled && !this._ambientTexture.isReadyOrNotBlocking()) return !1; + if (this._opacityTexture && d.a.OpacityTextureEnabled && !this._opacityTexture.isReadyOrNotBlocking()) return !1; + var s = this._getReflectionTexture(); + if (s && d.a.ReflectionTextureEnabled) { + if (!s.isReadyOrNotBlocking()) return !1; + if (s.irradianceTexture && !s.irradianceTexture.isReadyOrNotBlocking()) return !1; + } + if (this._lightmapTexture && d.a.LightmapTextureEnabled && !this._lightmapTexture.isReadyOrNotBlocking()) return !1; + if (this._emissiveTexture && d.a.EmissiveTextureEnabled && !this._emissiveTexture.isReadyOrNotBlocking()) return !1; + if (d.a.SpecularTextureEnabled) { + if (this._metallicTexture) { + if (!this._metallicTexture.isReadyOrNotBlocking()) return !1; + } else if (this._reflectivityTexture && !this._reflectivityTexture.isReadyOrNotBlocking()) return !1; + if (this._microSurfaceTexture && !this._microSurfaceTexture.isReadyOrNotBlocking()) return !1; + } + if (a.getCaps().standardDerivatives && this._bumpTexture && d.a.BumpTextureEnabled && !this._disableBumpMap && !this._bumpTexture.isReady()) return !1; + if (this._environmentBRDFTexture && d.a.ReflectionTextureEnabled && !this._environmentBRDFTexture.isReady()) return !1; + } + if (!(this.subSurface.isReadyForSubMesh(i, r) && this.clearCoat.isReadyForSubMesh(i, r, a, this._disableBumpMap) && this.sheen.isReadyForSubMesh(i, r) && this.anisotropy.isReadyForSubMesh(i, r))) return !1; + if (i._areImageProcessingDirty && this._imageProcessingConfiguration && !this._imageProcessingConfiguration.isReady()) return !1; + a.getCaps().standardDerivatives || e.isVerticesDataPresent(u.b.NormalKind) || (e.createNormals(!0), o.a.Warn("PBRMaterial: Normals have been created for the mesh: " + e.name)); + var c = t.effect, + l = i._areLightsDisposed, + h = this._prepareEffect(e, i, this.onCompiled, this.onError, n); + if (h) + if (this.allowShaderHotSwapping && c && !h.isReady()) { + if (((h = c), (this._rebuildInParallel = !0), i.markAsUnprocessed(), l)) return (i._areLightsDisposed = !0), !1; + } else (this._rebuildInParallel = !1), r.resetCachedMaterial(), t.setEffect(h, i), this.buildUniformLayout(); + return !(!t.effect || !t.effect.isReady()) && ((i._renderId = r.getRenderId()), (t.effect._wasPreviouslyReady = !0), !0); + }), + (t.prototype.isMetallicWorkflow = function () { + return !(null == this._metallic && null == this._roughness && !this._metallicTexture); + }), + (t.prototype._prepareEffect = function (e, t, n, i, r, o) { + if ((void 0 === n && (n = null), void 0 === i && (i = null), void 0 === r && (r = null), void 0 === o && (o = null), this._prepareDefines(e, t, r, o), !t.isDirty)) return null; + t.markAsProcessed(); + var a = this.getScene().getEngine(), + s = new j.a(), + c = 0; + t.USESPHERICALINVERTEX && s.addFallback(c++, "USESPHERICALINVERTEX"), + t.FOG && s.addFallback(c, "FOG"), + t.SPECULARAA && s.addFallback(c, "SPECULARAA"), + t.POINTSIZE && s.addFallback(c, "POINTSIZE"), + t.LOGARITHMICDEPTH && s.addFallback(c, "LOGARITHMICDEPTH"), + t.PARALLAX && s.addFallback(c, "PARALLAX"), + t.PARALLAXOCCLUSION && s.addFallback(c++, "PARALLAXOCCLUSION"), + (c = m.AddFallbacks(t, s, c)), + (c = m.AddFallbacks(t, s, c)), + (c = _.AddFallbacks(t, s, c)), + (c = b.AddFallbacks(t, s, c)), + t.ENVIRONMENTBRDF && s.addFallback(c++, "ENVIRONMENTBRDF"), + t.TANGENT && s.addFallback(c++, "TANGENT"), + t.BUMP && s.addFallback(c++, "BUMP"), + (c = p.a.HandleFallbacksForShadows(t, s, this._maxSimultaneousLights, c++)), + t.SPECULARTERM && s.addFallback(c++, "SPECULARTERM"), + t.USESPHERICALFROMREFLECTIONMAP && s.addFallback(c++, "USESPHERICALFROMREFLECTIONMAP"), + t.USEIRRADIANCEMAP && s.addFallback(c++, "USEIRRADIANCEMAP"), + t.LIGHTMAP && s.addFallback(c++, "LIGHTMAP"), + t.NORMAL && s.addFallback(c++, "NORMAL"), + t.AMBIENT && s.addFallback(c++, "AMBIENT"), + t.EMISSIVE && s.addFallback(c++, "EMISSIVE"), + t.VERTEXCOLOR && s.addFallback(c++, "VERTEXCOLOR"), + t.MORPHTARGETS && s.addFallback(c++, "MORPHTARGETS"), + t.MULTIVIEW && s.addFallback(0, "MULTIVIEW"); + var l = [u.b.PositionKind]; + t.NORMAL && l.push(u.b.NormalKind), + t.TANGENT && l.push(u.b.TangentKind), + t.UV1 && l.push(u.b.UVKind), + t.UV2 && l.push(u.b.UV2Kind), + t.VERTEXCOLOR && l.push(u.b.ColorKind), + p.a.PrepareAttributesForBones(l, e, t, s), + p.a.PrepareAttributesForInstances(l, t), + p.a.PrepareAttributesForMorphTargets(l, e, t); + var h = "pbr", + d = [ + "world", + "view", + "viewProjection", + "vEyePosition", + "vLightsType", + "vAmbientColor", + "vAlbedoColor", + "vReflectivityColor", + "vEmissiveColor", + "visibility", + "vReflectionColor", + "vFogInfos", + "vFogColor", + "pointSize", + "vAlbedoInfos", + "vAmbientInfos", + "vOpacityInfos", + "vReflectionInfos", + "vReflectionPosition", + "vReflectionSize", + "vEmissiveInfos", + "vReflectivityInfos", + "vMicroSurfaceSamplerInfos", + "vBumpInfos", + "vLightmapInfos", + "mBones", + "vClipPlane", + "vClipPlane2", + "vClipPlane3", + "vClipPlane4", + "vClipPlane5", + "vClipPlane6", + "albedoMatrix", + "ambientMatrix", + "opacityMatrix", + "reflectionMatrix", + "emissiveMatrix", + "reflectivityMatrix", + "normalMatrix", + "microSurfaceSamplerMatrix", + "bumpMatrix", + "lightmapMatrix", + "vLightingIntensity", + "logarithmicDepthConstant", + "vSphericalX", + "vSphericalY", + "vSphericalZ", + "vSphericalXX_ZZ", + "vSphericalYY_ZZ", + "vSphericalZZ", + "vSphericalXY", + "vSphericalYZ", + "vSphericalZX", + "vSphericalL00", + "vSphericalL1_1", + "vSphericalL10", + "vSphericalL11", + "vSphericalL2_2", + "vSphericalL2_1", + "vSphericalL20", + "vSphericalL21", + "vSphericalL22", + "vReflectionMicrosurfaceInfos", + "vTangentSpaceParams", + "boneTextureWidth", + "vDebugMode", + ], + g = [ + "albedoSampler", + "reflectivitySampler", + "ambientSampler", + "emissiveSampler", + "bumpSampler", + "lightmapSampler", + "opacitySampler", + "reflectionSampler", + "reflectionSamplerLow", + "reflectionSamplerHigh", + "irradianceSampler", + "microSurfaceSampler", + "environmentBrdfSampler", + "boneSampler", + ], + y = ["Material", "Scene"]; + _.AddUniforms(d), + _.AddSamplers(g), + f.AddUniforms(d), + f.AddSamplers(g), + m.AddUniforms(d), + m.AddSamplers(g), + b.AddUniforms(d), + b.AddSamplers(g), + v.a && (v.a.PrepareUniforms(d, t), v.a.PrepareSamplers(g, t)), + p.a.PrepareUniformsAndSamplersList({ uniformsNames: d, uniformBuffersNames: y, samplers: g, defines: t, maxSimultaneousLights: this._maxSimultaneousLights }), + this.customShaderNameResolve && (h = this.customShaderNameResolve(h, d, y, g, t)); + var C = t.toString(); + return a.createEffect( + h, + { + attributes: l, + uniformsNames: d, + uniformBuffersNames: y, + samplers: g, + defines: C, + fallbacks: s, + onCompiled: n, + onError: i, + indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: t.NUM_MORPH_INFLUENCERS }, + }, + a + ); + }), + (t.prototype._prepareDefines = function (e, n, i, r) { + void 0 === i && (i = null), void 0 === r && (r = null); + var o = this.getScene(), + a = o.getEngine(); + if ( + (p.a.PrepareDefinesForLights(o, e, n, !0, this._maxSimultaneousLights, this._disableLighting), + (n._needNormals = !0), + p.a.PrepareDefinesForMultiview(o, n), + (n.METALLICWORKFLOW = this.isMetallicWorkflow()), + n._areTexturesDirty) + ) { + if (((n._needUVs = !1), o.texturesEnabled)) { + o.getEngine().getCaps().textureLOD && (n.LODBASEDMICROSFURACE = !0), + this._albedoTexture && d.a.DiffuseTextureEnabled ? (p.a.PrepareDefinesForMergedUV(this._albedoTexture, n, "ALBEDO"), (n.GAMMAALBEDO = this._albedoTexture.gammaSpace)) : (n.ALBEDO = !1), + this._ambientTexture && d.a.AmbientTextureEnabled ? (p.a.PrepareDefinesForMergedUV(this._ambientTexture, n, "AMBIENT"), (n.AMBIENTINGRAYSCALE = this._useAmbientInGrayScale)) : (n.AMBIENT = !1), + this._opacityTexture && d.a.OpacityTextureEnabled ? (p.a.PrepareDefinesForMergedUV(this._opacityTexture, n, "OPACITY"), (n.OPACITYRGB = this._opacityTexture.getAlphaFromRGB)) : (n.OPACITY = !1); + var s = this._getReflectionTexture(); + if (s && d.a.ReflectionTextureEnabled) { + switch ( + ((n.REFLECTION = !0), + (n.GAMMAREFLECTION = s.gammaSpace), + (n.RGBDREFLECTION = s.isRGBD), + (n.REFLECTIONMAP_OPPOSITEZ = this.getScene().useRightHandedSystem ? !s.invertZ : s.invertZ), + (n.LODINREFLECTIONALPHA = s.lodLevelInAlpha), + (n.LINEARSPECULARREFLECTION = s.linearSpecularLOD), + s.coordinatesMode === P.a.INVCUBIC_MODE && (n.INVERTCUBICMAP = !0), + (n.REFLECTIONMAP_3D = s.isCube), + (n.REFLECTIONMAP_CUBIC = !1), + (n.REFLECTIONMAP_EXPLICIT = !1), + (n.REFLECTIONMAP_PLANAR = !1), + (n.REFLECTIONMAP_PROJECTION = !1), + (n.REFLECTIONMAP_SKYBOX = !1), + (n.REFLECTIONMAP_SPHERICAL = !1), + (n.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + s.coordinatesMode) + ) { + case P.a.EXPLICIT_MODE: + n.REFLECTIONMAP_EXPLICIT = !0; + break; + case P.a.PLANAR_MODE: + n.REFLECTIONMAP_PLANAR = !0; + break; + case P.a.PROJECTION_MODE: + n.REFLECTIONMAP_PROJECTION = !0; + break; + case P.a.SKYBOX_MODE: + n.REFLECTIONMAP_SKYBOX = !0; + break; + case P.a.SPHERICAL_MODE: + n.REFLECTIONMAP_SPHERICAL = !0; + break; + case P.a.EQUIRECTANGULAR_MODE: + n.REFLECTIONMAP_EQUIRECTANGULAR = !0; + break; + case P.a.FIXED_EQUIRECTANGULAR_MODE: + n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !0; + break; + case P.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE: + n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !0; + break; + case P.a.CUBIC_MODE: + case P.a.INVCUBIC_MODE: + default: + (n.REFLECTIONMAP_CUBIC = !0), (n.USE_LOCAL_REFLECTIONMAP_CUBIC = !!s.boundingBoxSize); + } + s.coordinatesMode !== P.a.SKYBOX_MODE && + (s.irradianceTexture + ? ((n.USEIRRADIANCEMAP = !0), (n.USESPHERICALFROMREFLECTIONMAP = !1)) + : s.isCube && + ((n.USESPHERICALFROMREFLECTIONMAP = !0), + (n.USEIRRADIANCEMAP = !1), + this._forceIrradianceInFragment || o.getEngine().getCaps().maxVaryingVectors <= 8 ? (n.USESPHERICALINVERTEX = !1) : (n.USESPHERICALINVERTEX = !0))); + } else + (n.REFLECTION = !1), + (n.REFLECTIONMAP_3D = !1), + (n.REFLECTIONMAP_SPHERICAL = !1), + (n.REFLECTIONMAP_PLANAR = !1), + (n.REFLECTIONMAP_CUBIC = !1), + (n.USE_LOCAL_REFLECTIONMAP_CUBIC = !1), + (n.REFLECTIONMAP_PROJECTION = !1), + (n.REFLECTIONMAP_SKYBOX = !1), + (n.REFLECTIONMAP_EXPLICIT = !1), + (n.REFLECTIONMAP_EQUIRECTANGULAR = !1), + (n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = !1), + (n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = !1), + (n.INVERTCUBICMAP = !1), + (n.USESPHERICALFROMREFLECTIONMAP = !1), + (n.USEIRRADIANCEMAP = !1), + (n.USESPHERICALINVERTEX = !1), + (n.REFLECTIONMAP_OPPOSITEZ = !1), + (n.LODINREFLECTIONALPHA = !1), + (n.GAMMAREFLECTION = !1), + (n.RGBDREFLECTION = !1), + (n.LINEARSPECULARREFLECTION = !1); + this._lightmapTexture && d.a.LightmapTextureEnabled + ? (p.a.PrepareDefinesForMergedUV(this._lightmapTexture, n, "LIGHTMAP"), + (n.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap), + (n.GAMMALIGHTMAP = this._lightmapTexture.gammaSpace), + (n.RGBDLIGHTMAP = this._lightmapTexture.isRGBD)) + : (n.LIGHTMAP = !1), + this._emissiveTexture && d.a.EmissiveTextureEnabled ? p.a.PrepareDefinesForMergedUV(this._emissiveTexture, n, "EMISSIVE") : (n.EMISSIVE = !1), + d.a.SpecularTextureEnabled + ? (this._metallicTexture + ? (p.a.PrepareDefinesForMergedUV(this._metallicTexture, n, "REFLECTIVITY"), + (n.ROUGHNESSSTOREINMETALMAPALPHA = this._useRoughnessFromMetallicTextureAlpha), + (n.ROUGHNESSSTOREINMETALMAPGREEN = !this._useRoughnessFromMetallicTextureAlpha && this._useRoughnessFromMetallicTextureGreen), + (n.METALLNESSSTOREINMETALMAPBLUE = this._useMetallnessFromMetallicTextureBlue), + (n.AOSTOREINMETALMAPRED = this._useAmbientOcclusionFromMetallicTextureRed), + (n.METALLICF0FACTORFROMMETALLICMAP = this._useMetallicF0FactorFromMetallicTexture)) + : this._reflectivityTexture + ? (p.a.PrepareDefinesForMergedUV(this._reflectivityTexture, n, "REFLECTIVITY"), + (n.MICROSURFACEFROMREFLECTIVITYMAP = this._useMicroSurfaceFromReflectivityMapAlpha), + (n.MICROSURFACEAUTOMATIC = this._useAutoMicroSurfaceFromReflectivityMap)) + : (n.REFLECTIVITY = !1), + this._microSurfaceTexture ? p.a.PrepareDefinesForMergedUV(this._microSurfaceTexture, n, "MICROSURFACEMAP") : (n.MICROSURFACEMAP = !1)) + : ((n.REFLECTIVITY = !1), (n.MICROSURFACEMAP = !1)), + o.getEngine().getCaps().standardDerivatives && this._bumpTexture && d.a.BumpTextureEnabled && !this._disableBumpMap + ? (p.a.PrepareDefinesForMergedUV(this._bumpTexture, n, "BUMP"), + this._useParallax && this._albedoTexture && d.a.DiffuseTextureEnabled ? ((n.PARALLAX = !0), (n.PARALLAXOCCLUSION = !!this._useParallaxOcclusion)) : (n.PARALLAX = !1), + (n.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap)) + : (n.BUMP = !1), + this._environmentBRDFTexture && d.a.ReflectionTextureEnabled + ? ((n.ENVIRONMENTBRDF = !0), (n.ENVIRONMENTBRDF_RGBD = this._environmentBRDFTexture.isRGBD)) + : ((n.ENVIRONMENTBRDF = !1), (n.ENVIRONMENTBRDF_RGBD = !1)), + this._shouldUseAlphaFromAlbedoTexture() ? (n.ALPHAFROMALBEDO = !0) : (n.ALPHAFROMALBEDO = !1); + } + (n.SPECULAROVERALPHA = this._useSpecularOverAlpha), + this._lightFalloff === t.LIGHTFALLOFF_STANDARD + ? ((n.USEPHYSICALLIGHTFALLOFF = !1), (n.USEGLTFLIGHTFALLOFF = !1)) + : this._lightFalloff === t.LIGHTFALLOFF_GLTF + ? ((n.USEPHYSICALLIGHTFALLOFF = !1), (n.USEGLTFLIGHTFALLOFF = !0)) + : ((n.USEPHYSICALLIGHTFALLOFF = !0), (n.USEGLTFLIGHTFALLOFF = !1)), + (n.RADIANCEOVERALPHA = this._useRadianceOverAlpha), + !this.backFaceCulling && this._twoSidedLighting ? (n.TWOSIDEDLIGHTING = !0) : (n.TWOSIDEDLIGHTING = !1), + (n.SPECULARAA = o.getEngine().getCaps().standardDerivatives && this._enableSpecularAntiAliasing); + } + (n._areTexturesDirty || n._areMiscDirty) && + ((n.ALPHATESTVALUE = this._alphaCutOff + (this._alphaCutOff % 1 == 0 ? "." : "")), + (n.PREMULTIPLYALPHA = 7 === this.alphaMode || 8 === this.alphaMode), + (n.ALPHABLEND = this.needAlphaBlendingForMesh(e)), + (n.ALPHAFRESNEL = this._useAlphaFresnel || this._useLinearAlphaFresnel), + (n.LINEARALPHAFRESNEL = this._useLinearAlphaFresnel)), + n._areImageProcessingDirty && this._imageProcessingConfiguration && this._imageProcessingConfiguration.prepareDefines(n), + (n.FORCENORMALFORWARD = this._forceNormalForward), + (n.RADIANCEOCCLUSION = this._useRadianceOcclusion), + (n.HORIZONOCCLUSION = this._useHorizonOcclusion), + n._areMiscDirty && + (p.a.PrepareDefinesForMisc(e, o, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(e) || this._forceAlphaTest, n), + (n.UNLIT = this._unlit || ((this.pointsCloud || this.wireframe) && !e.isVerticesDataPresent(u.b.NormalKind))), + (n.DEBUGMODE = this._debugMode)), + this.subSurface.prepareDefines(n, o), + this.clearCoat.prepareDefines(n, o), + this.anisotropy.prepareDefines(n, e, o), + this.brdf.prepareDefines(n), + this.sheen.prepareDefines(n, o), + p.a.PrepareDefinesForFrameBoundValues(o, a, n, !!i, r), + p.a.PrepareDefinesForAttributes(e, n, !0, !0, !0, this._transparencyMode !== t.PBRMATERIAL_OPAQUE); + }), + (t.prototype.forceCompilation = function (e, t, n) { + var r = this, + o = Object(i.a)({ clipPlane: !1, useInstances: !1 }, n), + a = new B(), + s = this._prepareEffect(e, a, void 0, void 0, o.useInstances, o.clipPlane); + s.isReady() + ? t && t(this) + : s.onCompileObservable.add(function () { + t && t(r); + }); + }), + (t.prototype.buildUniformLayout = function () { + var e = this._uniformBuffer; + e.addUniform("vAlbedoInfos", 2), + e.addUniform("vAmbientInfos", 4), + e.addUniform("vOpacityInfos", 2), + e.addUniform("vEmissiveInfos", 2), + e.addUniform("vLightmapInfos", 2), + e.addUniform("vReflectivityInfos", 3), + e.addUniform("vMicroSurfaceSamplerInfos", 2), + e.addUniform("vReflectionInfos", 2), + e.addUniform("vReflectionPosition", 3), + e.addUniform("vReflectionSize", 3), + e.addUniform("vBumpInfos", 3), + e.addUniform("albedoMatrix", 16), + e.addUniform("ambientMatrix", 16), + e.addUniform("opacityMatrix", 16), + e.addUniform("emissiveMatrix", 16), + e.addUniform("lightmapMatrix", 16), + e.addUniform("reflectivityMatrix", 16), + e.addUniform("microSurfaceSamplerMatrix", 16), + e.addUniform("bumpMatrix", 16), + e.addUniform("vTangentSpaceParams", 2), + e.addUniform("reflectionMatrix", 16), + e.addUniform("vReflectionColor", 3), + e.addUniform("vAlbedoColor", 4), + e.addUniform("vLightingIntensity", 4), + e.addUniform("vReflectionMicrosurfaceInfos", 3), + e.addUniform("pointSize", 1), + e.addUniform("vReflectivityColor", 4), + e.addUniform("vEmissiveColor", 3), + e.addUniform("visibility", 1), + f.PrepareUniformBuffer(e), + m.PrepareUniformBuffer(e), + b.PrepareUniformBuffer(e), + _.PrepareUniformBuffer(e), + e.create(); + }), + (t.prototype.unbind = function () { + if (this._activeEffect) { + var t = !1; + this._reflectionTexture && this._reflectionTexture.isRenderTarget && (this._activeEffect.setTexture("reflection2DSampler", null), (t = !0)), + this.subSurface.unbind(this._activeEffect) && (t = !0), + t && this._markAllSubMeshesAsTexturesDirty(); + } + e.prototype.unbind.call(this); + }), + (t.prototype.bindForSubMesh = function (e, t, n) { + var i = this.getScene(), + r = n._materialDefines; + if (r) { + var o = n.effect; + if (o) { + (this._activeEffect = o), r.INSTANCES || this.bindOnlyWorldMatrix(e), r.OBJECTSPACE_NORMALMAP && (e.toNormalMatrix(this._normalMatrix), this.bindOnlyNormalMatrix(this._normalMatrix)); + var a = this._mustRebind(i, o, t.visibility); + p.a.BindBonesParameters(t, this._activeEffect); + var s = null, + l = this._uniformBuffer; + if (a) { + var u = i.getEngine(); + if ((l.bindToEffect(o, "Material"), this.bindViewProjection(o), (s = this._getReflectionTexture()), !l.useUbo || !this.isFrozen || !l.isSync)) { + if (i.texturesEnabled) { + if ( + (this._albedoTexture && + d.a.DiffuseTextureEnabled && + (l.updateFloat2("vAlbedoInfos", this._albedoTexture.coordinatesIndex, this._albedoTexture.level), p.a.BindTextureMatrix(this._albedoTexture, l, "albedo")), + this._ambientTexture && + d.a.AmbientTextureEnabled && + (l.updateFloat4("vAmbientInfos", this._ambientTexture.coordinatesIndex, this._ambientTexture.level, this._ambientTextureStrength, this._ambientTextureImpactOnAnalyticalLights), + p.a.BindTextureMatrix(this._ambientTexture, l, "ambient")), + this._opacityTexture && + d.a.OpacityTextureEnabled && + (l.updateFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level), p.a.BindTextureMatrix(this._opacityTexture, l, "opacity")), + s && d.a.ReflectionTextureEnabled) + ) { + if ((l.updateMatrix("reflectionMatrix", s.getReflectionTextureMatrix()), l.updateFloat2("vReflectionInfos", s.level, 0), s.boundingBoxSize)) { + var f = s; + l.updateVector3("vReflectionPosition", f.boundingBoxPosition), l.updateVector3("vReflectionSize", f.boundingBoxSize); + } + if (!r.USEIRRADIANCEMAP) { + var m = s.sphericalPolynomial; + if (r.USESPHERICALFROMREFLECTIONMAP && m) + if (r.SPHERICAL_HARMONICS) { + var g = m.preScaledHarmonics; + this._activeEffect.setVector3("vSphericalL00", g.l00), + this._activeEffect.setVector3("vSphericalL1_1", g.l1_1), + this._activeEffect.setVector3("vSphericalL10", g.l10), + this._activeEffect.setVector3("vSphericalL11", g.l11), + this._activeEffect.setVector3("vSphericalL2_2", g.l2_2), + this._activeEffect.setVector3("vSphericalL2_1", g.l2_1), + this._activeEffect.setVector3("vSphericalL20", g.l20), + this._activeEffect.setVector3("vSphericalL21", g.l21), + this._activeEffect.setVector3("vSphericalL22", g.l22); + } else + this._activeEffect.setFloat3("vSphericalX", m.x.x, m.x.y, m.x.z), + this._activeEffect.setFloat3("vSphericalY", m.y.x, m.y.y, m.y.z), + this._activeEffect.setFloat3("vSphericalZ", m.z.x, m.z.y, m.z.z), + this._activeEffect.setFloat3("vSphericalXX_ZZ", m.xx.x - m.zz.x, m.xx.y - m.zz.y, m.xx.z - m.zz.z), + this._activeEffect.setFloat3("vSphericalYY_ZZ", m.yy.x - m.zz.x, m.yy.y - m.zz.y, m.yy.z - m.zz.z), + this._activeEffect.setFloat3("vSphericalZZ", m.zz.x, m.zz.y, m.zz.z), + this._activeEffect.setFloat3("vSphericalXY", m.xy.x, m.xy.y, m.xy.z), + this._activeEffect.setFloat3("vSphericalYZ", m.yz.x, m.yz.y, m.yz.z), + this._activeEffect.setFloat3("vSphericalZX", m.zx.x, m.zx.y, m.zx.z); + } + l.updateFloat3("vReflectionMicrosurfaceInfos", s.getSize().width, s.lodGenerationScale, s.lodGenerationOffset); + } + this._emissiveTexture && + d.a.EmissiveTextureEnabled && + (l.updateFloat2("vEmissiveInfos", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level), p.a.BindTextureMatrix(this._emissiveTexture, l, "emissive")), + this._lightmapTexture && + d.a.LightmapTextureEnabled && + (l.updateFloat2("vLightmapInfos", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level), p.a.BindTextureMatrix(this._lightmapTexture, l, "lightmap")), + d.a.SpecularTextureEnabled && + (this._metallicTexture + ? (l.updateFloat3("vReflectivityInfos", this._metallicTexture.coordinatesIndex, this._metallicTexture.level, this._ambientTextureStrength), + p.a.BindTextureMatrix(this._metallicTexture, l, "reflectivity")) + : this._reflectivityTexture && + (l.updateFloat3("vReflectivityInfos", this._reflectivityTexture.coordinatesIndex, this._reflectivityTexture.level, 1), + p.a.BindTextureMatrix(this._reflectivityTexture, l, "reflectivity")), + this._microSurfaceTexture && + (l.updateFloat2("vMicroSurfaceSamplerInfos", this._microSurfaceTexture.coordinatesIndex, this._microSurfaceTexture.level), + p.a.BindTextureMatrix(this._microSurfaceTexture, l, "microSurfaceSampler"))), + this._bumpTexture && + u.getCaps().standardDerivatives && + d.a.BumpTextureEnabled && + !this._disableBumpMap && + (l.updateFloat3("vBumpInfos", this._bumpTexture.coordinatesIndex, this._bumpTexture.level, this._parallaxScaleBias), + p.a.BindTextureMatrix(this._bumpTexture, l, "bump"), + i._mirroredCameraPosition + ? l.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1 : -1, this._invertNormalMapY ? 1 : -1) + : l.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? -1 : 1, this._invertNormalMapY ? -1 : 1)); + } + if ((this.pointsCloud && l.updateFloat("pointSize", this.pointSize), r.METALLICWORKFLOW)) { + (h.c.Color3[0].r = void 0 === this._metallic || null === this._metallic ? 1 : this._metallic), (h.c.Color3[0].g = void 0 === this._roughness || null === this._roughness ? 1 : this._roughness); + var b = 0.08 * this._metallicF0Factor; + l.updateColor4("vReflectivityColor", h.c.Color3[0], b); + } else l.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface); + l.updateColor3("vEmissiveColor", d.a.EmissiveTextureEnabled ? this._emissiveColor : h.a.BlackReadOnly), + l.updateColor3("vReflectionColor", this._reflectionColor), + !r.SS_REFRACTION && this.subSurface.linkRefractionWithTransparency ? l.updateColor4("vAlbedoColor", this._albedoColor, 1) : l.updateColor4("vAlbedoColor", this._albedoColor, this.alpha), + l.updateFloat("visibility", t.visibility), + (this._lightingInfos.x = this._directIntensity), + (this._lightingInfos.y = this._emissiveIntensity), + (this._lightingInfos.z = this._environmentIntensity * i.environmentIntensity), + (this._lightingInfos.w = this._specularIntensity), + l.updateVector4("vLightingIntensity", this._lightingInfos); + } + i.texturesEnabled && + (this._albedoTexture && d.a.DiffuseTextureEnabled && l.setTexture("albedoSampler", this._albedoTexture), + this._ambientTexture && d.a.AmbientTextureEnabled && l.setTexture("ambientSampler", this._ambientTexture), + this._opacityTexture && d.a.OpacityTextureEnabled && l.setTexture("opacitySampler", this._opacityTexture), + s && + d.a.ReflectionTextureEnabled && + (r.LODBASEDMICROSFURACE + ? l.setTexture("reflectionSampler", s) + : (l.setTexture("reflectionSampler", s._lodTextureMid || s), l.setTexture("reflectionSamplerLow", s._lodTextureLow || s), l.setTexture("reflectionSamplerHigh", s._lodTextureHigh || s)), + r.USEIRRADIANCEMAP && l.setTexture("irradianceSampler", s.irradianceTexture)), + r.ENVIRONMENTBRDF && l.setTexture("environmentBrdfSampler", this._environmentBRDFTexture), + this._emissiveTexture && d.a.EmissiveTextureEnabled && l.setTexture("emissiveSampler", this._emissiveTexture), + this._lightmapTexture && d.a.LightmapTextureEnabled && l.setTexture("lightmapSampler", this._lightmapTexture), + d.a.SpecularTextureEnabled && + (this._metallicTexture ? l.setTexture("reflectivitySampler", this._metallicTexture) : this._reflectivityTexture && l.setTexture("reflectivitySampler", this._reflectivityTexture), + this._microSurfaceTexture && l.setTexture("microSurfaceSampler", this._microSurfaceTexture)), + this._bumpTexture && u.getCaps().standardDerivatives && d.a.BumpTextureEnabled && !this._disableBumpMap && l.setTexture("bumpSampler", this._bumpTexture)), + this.subSurface.bindForSubMesh(l, i, u, this.isFrozen, r.LODBASEDMICROSFURACE), + this.clearCoat.bindForSubMesh(l, i, u, this._disableBumpMap, this.isFrozen, this._invertNormalMapX, this._invertNormalMapY), + this.anisotropy.bindForSubMesh(l, i, this.isFrozen), + this.sheen.bindForSubMesh(l, i, this.isFrozen), + p.a.BindClipPlane(this._activeEffect, i), + i.ambientColor.multiplyToRef(this._ambientColor, this._globalAmbientColor); + var _ = i._forcedViewPosition ? i._forcedViewPosition : i._mirroredCameraPosition ? i._mirroredCameraPosition : i.activeCamera.globalPosition, + v = i.useRightHandedSystem === (null != i._mirroredCameraPosition); + o.setFloat4("vEyePosition", _.x, _.y, _.z, v ? -1 : 1), o.setColor3("vAmbientColor", this._globalAmbientColor), o.setFloat2("vDebugMode", this.debugLimit, this.debugFactor); + } + (!a && this.isFrozen) || + (i.lightsEnabled && !this._disableLighting && p.a.BindLights(i, t, this._activeEffect, r, this._maxSimultaneousLights, this._rebuildInParallel), + ((i.fogEnabled && t.applyFog && i.fogMode !== c.a.FOGMODE_NONE) || s) && this.bindView(o), + p.a.BindFogParameters(i, t, this._activeEffect, !0), + r.NUM_MORPH_INFLUENCERS && p.a.BindMorphTargetParameters(t, this._activeEffect), + this._imageProcessingConfiguration.bind(this._activeEffect), + p.a.BindLogDepth(r, this._activeEffect, i)), + l.update(), + this._afterBind(t, this._activeEffect); + } + } + }), + (t.prototype.getAnimatables = function () { + var e = []; + return ( + this._albedoTexture && this._albedoTexture.animations && this._albedoTexture.animations.length > 0 && e.push(this._albedoTexture), + this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0 && e.push(this._ambientTexture), + this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0 && e.push(this._opacityTexture), + this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0 && e.push(this._reflectionTexture), + this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0 && e.push(this._emissiveTexture), + this._metallicTexture && this._metallicTexture.animations && this._metallicTexture.animations.length > 0 + ? e.push(this._metallicTexture) + : this._reflectivityTexture && this._reflectivityTexture.animations && this._reflectivityTexture.animations.length > 0 && e.push(this._reflectivityTexture), + this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0 && e.push(this._bumpTexture), + this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0 && e.push(this._lightmapTexture), + this.subSurface.getAnimatables(e), + this.clearCoat.getAnimatables(e), + this.sheen.getAnimatables(e), + this.anisotropy.getAnimatables(e), + e + ); + }), + (t.prototype._getReflectionTexture = function () { + return this._reflectionTexture ? this._reflectionTexture : this.getScene().environmentTexture; + }), + (t.prototype.getActiveTextures = function () { + var t = e.prototype.getActiveTextures.call(this); + return ( + this._albedoTexture && t.push(this._albedoTexture), + this._ambientTexture && t.push(this._ambientTexture), + this._opacityTexture && t.push(this._opacityTexture), + this._reflectionTexture && t.push(this._reflectionTexture), + this._emissiveTexture && t.push(this._emissiveTexture), + this._reflectivityTexture && t.push(this._reflectivityTexture), + this._metallicTexture && t.push(this._metallicTexture), + this._microSurfaceTexture && t.push(this._microSurfaceTexture), + this._bumpTexture && t.push(this._bumpTexture), + this._lightmapTexture && t.push(this._lightmapTexture), + this.subSurface.getActiveTextures(t), + this.clearCoat.getActiveTextures(t), + this.sheen.getActiveTextures(t), + this.anisotropy.getActiveTextures(t), + t + ); + }), + (t.prototype.hasTexture = function (t) { + return ( + !!e.prototype.hasTexture.call(this, t) || + this._albedoTexture === t || + this._ambientTexture === t || + this._opacityTexture === t || + this._reflectionTexture === t || + this._reflectivityTexture === t || + this._metallicTexture === t || + this._microSurfaceTexture === t || + this._bumpTexture === t || + this._lightmapTexture === t || + this.subSurface.hasTexture(t) || + this.clearCoat.hasTexture(t) || + this.sheen.hasTexture(t) || + this.anisotropy.hasTexture(t) + ); + }), + (t.prototype.dispose = function (t, n) { + n && + (this._albedoTexture && this._albedoTexture.dispose(), + this._ambientTexture && this._ambientTexture.dispose(), + this._opacityTexture && this._opacityTexture.dispose(), + this._reflectionTexture && this._reflectionTexture.dispose(), + this._environmentBRDFTexture && this.getScene().environmentBRDFTexture !== this._environmentBRDFTexture && this._environmentBRDFTexture.dispose(), + this._emissiveTexture && this._emissiveTexture.dispose(), + this._metallicTexture && this._metallicTexture.dispose(), + this._reflectivityTexture && this._reflectivityTexture.dispose(), + this._bumpTexture && this._bumpTexture.dispose(), + this._lightmapTexture && this._lightmapTexture.dispose()), + this.subSurface.dispose(n), + this.clearCoat.dispose(n), + this.sheen.dispose(n), + this.anisotropy.dispose(n), + this._renderTargets.dispose(), + this._imageProcessingConfiguration && this._imageProcessingObserver && this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver), + e.prototype.dispose.call(this, t, n); + }), + (t.PBRMATERIAL_OPAQUE = 0), + (t.PBRMATERIAL_ALPHATEST = 1), + (t.PBRMATERIAL_ALPHABLEND = 2), + (t.PBRMATERIAL_ALPHATESTANDBLEND = 3), + (t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS = 0), + (t.LIGHTFALLOFF_PHYSICAL = 0), + (t.LIGHTFALLOFF_GLTF = 1), + (t.LIGHTFALLOFF_STANDARD = 2), + Object(i.c)([Object(r.i)()], t.prototype, "_imageProcessingConfiguration", void 0), + Object(i.c)([Object(r.b)("_markAllSubMeshesAsMiscDirty")], t.prototype, "debugMode", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "useLogarithmicDepth", null), + Object(i.c)([Object(r.c)()], t.prototype, "transparencyMode", null), + t + ); + })(C.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(5), + s = n(35), + c = n(57); + s.a.AddNodeConstructor("Light_Type_3", function (e, t) { + return function () { + return new l(e, o.e.Zero(), t); + }; + }); + var l = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r.groundColor = new a.a(0, 0, 0)), (r.direction = n || o.e.Up()), r; + } + return ( + Object(i.d)(t, e), + (t.prototype._buildUniformLayout = function () { + this._uniformBuffer.addUniform("vLightData", 4), + this._uniformBuffer.addUniform("vLightDiffuse", 4), + this._uniformBuffer.addUniform("vLightSpecular", 4), + this._uniformBuffer.addUniform("vLightGround", 3), + this._uniformBuffer.addUniform("shadowsInfo", 3), + this._uniformBuffer.addUniform("depthValues", 2), + this._uniformBuffer.create(); + }), + (t.prototype.getClassName = function () { + return "HemisphericLight"; + }), + (t.prototype.setDirectionToTarget = function (e) { + return (this.direction = o.e.Normalize(e.subtract(o.e.Zero()))), this.direction; + }), + (t.prototype.getShadowGenerator = function () { + return null; + }), + (t.prototype.transferToEffect = function (e, t) { + var n = o.e.Normalize(this.direction); + return this._uniformBuffer.updateFloat4("vLightData", n.x, n.y, n.z, 0, t), this._uniformBuffer.updateColor3("vLightGround", this.groundColor.scale(this.intensity), t), this; + }), + (t.prototype.transferToNodeMaterialEffect = function (e, t) { + var n = o.e.Normalize(this.direction); + return e.setFloat3(t, n.x, n.y, n.z), this; + }), + (t.prototype.computeWorldMatrix = function () { + return this._worldMatrix || (this._worldMatrix = o.a.Identity()), this._worldMatrix; + }), + (t.prototype.getTypeID = function () { + return c.a.LIGHTTYPEID_HEMISPHERICLIGHT; + }), + (t.prototype.prepareLightSpecificDefines = function (e, t) { + e["HEMILIGHT" + t] = !0; + }), + Object(i.c)([Object(r.e)()], t.prototype, "groundColor", void 0), + Object(i.c)([Object(r.o)()], t.prototype, "direction", void 0), + t + ); + })(c.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + this._xhr = new XMLHttpRequest(); + } + return ( + (e.prototype._injectCustomRequestHeaders = function () { + for (var t in e.CustomRequestHeaders) { + var n = e.CustomRequestHeaders[t]; + n && this._xhr.setRequestHeader(t, n); + } + }), + Object.defineProperty(e.prototype, "onprogress", { + get: function () { + return this._xhr.onprogress; + }, + set: function (e) { + this._xhr.onprogress = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "readyState", { + get: function () { + return this._xhr.readyState; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "status", { + get: function () { + return this._xhr.status; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "statusText", { + get: function () { + return this._xhr.statusText; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "response", { + get: function () { + return this._xhr.response; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "responseURL", { + get: function () { + return this._xhr.responseURL; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "responseText", { + get: function () { + return this._xhr.responseText; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "responseType", { + get: function () { + return this._xhr.responseType; + }, + set: function (e) { + this._xhr.responseType = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addEventListener = function (e, t, n) { + this._xhr.addEventListener(e, t, n); + }), + (e.prototype.removeEventListener = function (e, t, n) { + this._xhr.removeEventListener(e, t, n); + }), + (e.prototype.abort = function () { + this._xhr.abort(); + }), + (e.prototype.send = function (t) { + e.CustomRequestHeaders && this._injectCustomRequestHeaders(), this._xhr.send(t); + }), + (e.prototype.open = function (t, n) { + for (var i = 0, r = e.CustomRequestModifiers; i < r.length; i++) { + (0, r[i])(this._xhr, n); + } + return (n = (n = n.replace("file:http:", "http:")).replace("file:https:", "https:")), this._xhr.open(t, n, !0); + }), + (e.prototype.setRequestHeader = function (e, t) { + this._xhr.setRequestHeader(e, t); + }), + (e.prototype.getResponseHeader = function (e) { + return this._xhr.getResponseHeader(e); + }), + (e.CustomRequestHeaders = {}), + (e.CustomRequestModifiers = new Array()), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return d; + }); + var i = n(2), + r = n(3), + o = n(12), + a = n(1), + s = n(68), + c = n(8), + l = n(13), + u = (n(230), n(53)), + h = n(6), + d = (function (e) { + function t(t, n, i, r, s, l, u, d, p, f, m, g, b) { + var _; + void 0 === i && (i = null), + void 0 === r && (r = !1), + void 0 === s && (s = null), + void 0 === l && (l = null), + void 0 === u && (u = null), + void 0 === d && (d = 5), + void 0 === p && (p = !1), + void 0 === f && (f = null), + void 0 === m && (m = !1), + void 0 === g && (g = 0.8), + void 0 === b && (b = 0); + var v = e.call(this, n) || this; + if ( + ((v.onLoadObservable = new h.c()), + (v.boundingBoxPosition = a.e.Zero()), + (v._rotationY = 0), + (v._files = null), + (v._forcedExtension = null), + (v._extensions = null), + (v._prefiltered = !1), + (v.name = t), + (v.url = t), + (v._noMipmap = r), + (v.hasAlpha = !1), + (v._format = d), + (v.isCube = !0), + (v._textureMatrix = a.a.Identity()), + (v._createPolynomials = m), + (v.coordinatesMode = c.a.CUBIC_MODE), + (v._extensions = i), + (v._files = s), + (v._forcedExtension = f), + !t && !s) + ) + return v; + var y = t.lastIndexOf("."), + C = f || (y > -1 ? t.substring(y).toLowerCase() : ""), + P = ".dds" === C, + x = ".env" === C; + if ( + (x ? ((v.gammaSpace = !1), (v._prefiltered = !1), (v.anisotropicFilteringLevel = 1)) : ((v._prefiltered = p), p && ((v.gammaSpace = !1), (v.anisotropicFilteringLevel = 1))), + (v._texture = v._getFromCache(t, r)), + !s && (x || P || i || (i = ["_px.jpg", "_py.jpg", "_pz.jpg", "_nx.jpg", "_ny.jpg", "_nz.jpg"]), (s = []), i)) + ) + for (var T = 0; T < i.length; T++) s.push(t + i[T]); + v._files = s; + var S = function () { + v.onLoadObservable.notifyObservers(v), l && l(); + }; + return ( + v._texture + ? v._texture.isReady + ? o.b.SetImmediate(function () { + return S(); + }) + : v._texture.onLoadedObservable.add(function () { + return S(); + }) + : n.useDelayedTextureLoading + ? (v.delayLoadState = 4) + : ((v._texture = p ? n.getEngine().createPrefilteredCubeTexture(t, n, g, b, l, u, d, f, v._createPolynomials) : n.getEngine().createCubeTexture(t, n, s, r, l, u, v._format, f, !1, g, b)), + null === (_ = v._texture) || + void 0 === _ || + _.onLoadedObservable.add(function () { + return v.onLoadObservable.notifyObservers(v); + })), + v + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "boundingBoxSize", { + get: function () { + return this._boundingBoxSize; + }, + set: function (e) { + if (!this._boundingBoxSize || !this._boundingBoxSize.equals(e)) { + this._boundingBoxSize = e; + var t = this.getScene(); + t && t.markAllMaterialsAsDirty(1); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotationY", { + get: function () { + return this._rotationY; + }, + set: function (e) { + (this._rotationY = e), this.setReflectionTextureMatrix(a.a.RotationY(this._rotationY)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "noMipmap", { + get: function () { + return this._noMipmap; + }, + enumerable: !0, + configurable: !0, + }), + (t.CreateFromImages = function (e, n, i) { + var r = ""; + return ( + e.forEach(function (e) { + return (r += e); + }), + new t(r, n, null, i, e) + ); + }), + (t.CreateFromPrefilteredData = function (e, n, i, r) { + void 0 === i && (i = null), void 0 === r && (r = !0); + var o = n.useDelayedTextureLoading; + n.useDelayedTextureLoading = !1; + var a = new t(e, n, null, !1, null, null, null, void 0, !0, i, r); + return (n.useDelayedTextureLoading = o), a; + }), + Object.defineProperty(t.prototype, "isPrefiltered", { + get: function () { + return this._prefiltered; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "CubeTexture"; + }), + (t.prototype.updateURL = function (e, t, n, i) { + void 0 === i && (i = !1), + this.url && (this.releaseInternalTexture(), this.getScene().markAllMaterialsAsDirty(1)), + (this.name && !u.a.StartsWith(this.name, "data:")) || (this.name = e), + (this.url = e), + (this.delayLoadState = 4), + (this._prefiltered = i), + this._prefiltered && ((this.gammaSpace = !1), (this.anisotropicFilteringLevel = 1)), + (this._forcedExtension = t || null), + n && (this._delayedOnLoad = n), + this.delayLoad(t); + }), + (t.prototype.delayLoad = function (e) { + var t, + n = this; + if (4 === this.delayLoadState) { + var i = this.getScene(); + i && + ((this.delayLoadState = 1), + (this._texture = this._getFromCache(this.url, this._noMipmap)), + this._texture || + (this._prefiltered + ? (this._texture = i.getEngine().createPrefilteredCubeTexture(this.url, i, 0.8, 0, this._delayedOnLoad, void 0, this._format, void 0, this._createPolynomials)) + : (this._texture = i.getEngine().createCubeTexture(this.url, i, this._files, this._noMipmap, this._delayedOnLoad, null, this._format, e)), + null === (t = this._texture) || + void 0 === t || + t.onLoadedObservable.add(function () { + return n.onLoadObservable.notifyObservers(n); + }))); + } + }), + (t.prototype.getReflectionTextureMatrix = function () { + return this._textureMatrix; + }), + (t.prototype.setReflectionTextureMatrix = function (e) { + var t = this; + e.updateFlag !== this._textureMatrix.updateFlag && + (e.isIdentity() !== this._textureMatrix.isIdentity() && + this.getScene().markAllMaterialsAsDirty(1, function (e) { + return -1 !== e.getActiveTextures().indexOf(t); + }), + (this._textureMatrix = e)); + }), + (t.Parse = function (e, n, i) { + var o = r.a.Parse( + function () { + var r = !1; + return e.prefiltered && (r = e.prefiltered), new t(i + e.name, n, e.extensions, !1, e.files || null, null, null, void 0, r, e.forcedExtension); + }, + e, + n + ); + if ((e.boundingBoxPosition && (o.boundingBoxPosition = a.e.FromArray(e.boundingBoxPosition)), e.boundingBoxSize && (o.boundingBoxSize = a.e.FromArray(e.boundingBoxSize)), e.animations)) + for (var s = 0; s < e.animations.length; s++) { + var c = e.animations[s], + u = l.a.GetClass("BABYLON.Animation"); + u && o.animations.push(u.Parse(c)); + } + return o; + }), + (t.prototype.clone = function () { + var e = this, + n = this.getScene(), + i = 0, + o = r.a.Clone(function () { + if (!n) return e; + var r = new t(e.url, n, e._extensions, e._noMipmap, e._files); + return (i = r.uniqueId), r; + }, this); + return (o.uniqueId = i), o; + }), + Object(i.c)([Object(r.c)("rotationY")], t.prototype, "rotationY", null), + Object(i.c)([Object(r.c)("files")], t.prototype, "_files", void 0), + Object(i.c)([Object(r.c)("forcedExtension")], t.prototype, "_forcedExtension", void 0), + Object(i.c)([Object(r.c)("extensions")], t.prototype, "_extensions", void 0), + Object(i.c)([Object(r.j)("textureMatrix")], t.prototype, "_textureMatrix", void 0), + t + ); + })(s.a); + (c.a._CubeTextureParser = d.Parse), (l.a.RegisteredTypes["BABYLON.CubeTexture"] = d); + }, + function (e, t, n) { + "use strict"; + var i = "shadowsFragmentFunctions", + r = + "#ifdef SHADOWS\n#ifndef SHADOWFLOAT\n\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\nreturn dot(color,bit_shift);\n}\n#endif\nfloat computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff)\n{\nfloat mask=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.));\nreturn mix(value,1.0,mask);\n}\nfloat computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\ndepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadow=textureCube(shadowSampler,directionToLight).x;\n#endif\nif (depth>shadow)\n{\nreturn darkness;\n}\nreturn 1.0;\n}\nfloat computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\ndepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\nfloat visibility=1.;\nvec3 poissonDisk[4];\npoissonDisk[0]=vec3(-1.0,1.0,-1.0);\npoissonDisk[1]=vec3(1.0,-1.0,-1.0);\npoissonDisk[2]=vec3(-1.0,-1.0,-1.0);\npoissonDisk[3]=vec3(1.0,-1.0,1.0);\n\n#ifndef SHADOWFLOAT\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))shadow)\n{\nreturn computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff);\n}\nreturn 1.;\n}\n#endif\nfloat computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadow=texture2D(shadowSampler,uv).x;\n#endif\nif (shadowPixelDepth>shadow)\n{\nreturn computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff);\n}\nreturn 1.;\n}\nfloat computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\nfloat visibility=1.;\nvec2 poissonDisk[4];\npoissonDisk[0]=vec2(-0.94201624,-0.39906216);\npoissonDisk[1]=vec2(0.94558609,-0.76890725);\npoissonDisk[2]=vec2(-0.094184101,-0.92938870);\npoissonDisk[3]=vec2(0.34495938,0.29387760);\n\n#ifndef SHADOWFLOAT\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\n}\nfloat computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\n}\n#ifdef WEBGL2\n#define GREATEST_LESS_THAN_ONE 0.99999994\n\nfloat computeShadowWithCSMPCF1(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nuvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE);\nvec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);\nfloat shadow=texture(shadowSampler,uvDepthLayer);\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithCSMPCF3(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nuvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE);\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\n\n\nvec2 uvw0=3.-2.*st;\nvec2 uvw1=1.+2.*st;\nvec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;\nvec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));\nshadow=shadow/16.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithCSMPCF5(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nuvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE);\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\nvec2 uvw0=4.-3.*st;\nvec2 uvw1=vec2(7.);\nvec2 uvw2=1.+3.*st;\nvec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;\nvec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));\nshadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[0]),layer,uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));\nshadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[1]),layer,uvDepth.z));\nshadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[2]),layer,uvDepth.z));\nshadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[2]),layer,uvDepth.z));\nshadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[2]),layer,uvDepth.z));\nshadow=shadow/144.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\nfloat computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nfloat shadow=texture2D(shadowSampler,uvDepth);\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\n\n\nvec2 uvw0=3.-2.*st;\nvec2 uvw1=1.+2.*st;\nvec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;\nvec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\nshadow=shadow/16.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\nvec2 uvw0=4.-3.*st;\nvec2 uvw1=vec2(7.);\nvec2 uvw2=1.+3.*st;\nvec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;\nvec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\nshadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\nshadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z));\nshadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z));\nshadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z));\nshadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z));\nshadow=shadow/144.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\nconst vec3 PoissonSamplers32[64]=vec3[64](\nvec3(0.06407013,0.05409927,0.),\nvec3(0.7366577,0.5789394,0.),\nvec3(-0.6270542,-0.5320278,0.),\nvec3(-0.4096107,0.8411095,0.),\nvec3(0.6849564,-0.4990818,0.),\nvec3(-0.874181,-0.04579735,0.),\nvec3(0.9989998,0.0009880066,0.),\nvec3(-0.004920578,-0.9151649,0.),\nvec3(0.1805763,0.9747483,0.),\nvec3(-0.2138451,0.2635818,0.),\nvec3(0.109845,0.3884785,0.),\nvec3(0.06876755,-0.3581074,0.),\nvec3(0.374073,-0.7661266,0.),\nvec3(0.3079132,-0.1216763,0.),\nvec3(-0.3794335,-0.8271583,0.),\nvec3(-0.203878,-0.07715034,0.),\nvec3(0.5912697,0.1469799,0.),\nvec3(-0.88069,0.3031784,0.),\nvec3(0.5040108,0.8283722,0.),\nvec3(-0.5844124,0.5494877,0.),\nvec3(0.6017799,-0.1726654,0.),\nvec3(-0.5554981,0.1559997,0.),\nvec3(-0.3016369,-0.3900928,0.),\nvec3(-0.5550632,-0.1723762,0.),\nvec3(0.925029,0.2995041,0.),\nvec3(-0.2473137,0.5538505,0.),\nvec3(0.9183037,-0.2862392,0.),\nvec3(0.2469421,0.6718712,0.),\nvec3(0.3916397,-0.4328209,0.),\nvec3(-0.03576927,-0.6220032,0.),\nvec3(-0.04661255,0.7995201,0.),\nvec3(0.4402924,0.3640312,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.)\n);\nconst vec3 PoissonSamplers64[64]=vec3[64](\nvec3(-0.613392,0.617481,0.),\nvec3(0.170019,-0.040254,0.),\nvec3(-0.299417,0.791925,0.),\nvec3(0.645680,0.493210,0.),\nvec3(-0.651784,0.717887,0.),\nvec3(0.421003,0.027070,0.),\nvec3(-0.817194,-0.271096,0.),\nvec3(-0.705374,-0.668203,0.),\nvec3(0.977050,-0.108615,0.),\nvec3(0.063326,0.142369,0.),\nvec3(0.203528,0.214331,0.),\nvec3(-0.667531,0.326090,0.),\nvec3(-0.098422,-0.295755,0.),\nvec3(-0.885922,0.215369,0.),\nvec3(0.566637,0.605213,0.),\nvec3(0.039766,-0.396100,0.),\nvec3(0.751946,0.453352,0.),\nvec3(0.078707,-0.715323,0.),\nvec3(-0.075838,-0.529344,0.),\nvec3(0.724479,-0.580798,0.),\nvec3(0.222999,-0.215125,0.),\nvec3(-0.467574,-0.405438,0.),\nvec3(-0.248268,-0.814753,0.),\nvec3(0.354411,-0.887570,0.),\nvec3(0.175817,0.382366,0.),\nvec3(0.487472,-0.063082,0.),\nvec3(-0.084078,0.898312,0.),\nvec3(0.488876,-0.783441,0.),\nvec3(0.470016,0.217933,0.),\nvec3(-0.696890,-0.549791,0.),\nvec3(-0.149693,0.605762,0.),\nvec3(0.034211,0.979980,0.),\nvec3(0.503098,-0.308878,0.),\nvec3(-0.016205,-0.872921,0.),\nvec3(0.385784,-0.393902,0.),\nvec3(-0.146886,-0.859249,0.),\nvec3(0.643361,0.164098,0.),\nvec3(0.634388,-0.049471,0.),\nvec3(-0.688894,0.007843,0.),\nvec3(0.464034,-0.188818,0.),\nvec3(-0.440840,0.137486,0.),\nvec3(0.364483,0.511704,0.),\nvec3(0.034028,0.325968,0.),\nvec3(0.099094,-0.308023,0.),\nvec3(0.693960,-0.366253,0.),\nvec3(0.678884,-0.204688,0.),\nvec3(0.001801,0.780328,0.),\nvec3(0.145177,-0.898984,0.),\nvec3(0.062655,-0.611866,0.),\nvec3(0.315226,-0.604297,0.),\nvec3(-0.780145,0.486251,0.),\nvec3(-0.371868,0.882138,0.),\nvec3(0.200476,0.494430,0.),\nvec3(-0.494552,-0.711051,0.),\nvec3(0.612476,0.705252,0.),\nvec3(-0.578845,-0.768792,0.),\nvec3(-0.772454,-0.090976,0.),\nvec3(0.504440,0.372295,0.),\nvec3(0.155736,0.065157,0.),\nvec3(0.391522,0.849605,0.),\nvec3(-0.620106,-0.328104,0.),\nvec3(0.789239,-0.419965,0.),\nvec3(-0.545396,0.538133,0.),\nvec3(-0.178564,-0.596057,0.)\n);\n\n\n\n\n\nfloat computeShadowWithCSMPCSS(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nuvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE);\nvec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);\nfloat blockerDepth=0.0;\nfloat sumBlockerDepth=0.0;\nfloat numBlocker=0.0;\nfor (int i=0; i1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nfloat blockerDepth=0.0;\nfloat sumBlockerDepth=0.0;\nfloat numBlocker=0.0;\nfor (int i=0; i=0.) {\nindex{X}=i;\nbreak;\n}\n}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nif (index{X}>=0)\n#endif\n{\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nshadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nshadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=vec3(shadow)*vCascadeColorsMultiplier{X}[index{X}];\n#endif\n#ifndef SHADOWCSMNOBLEND{X}\nfloat frustumLength=frustumLengths{X}[index{X}];\nfloat diffRatio=clamp(diff{X}/frustumLength,0.,1.)*cascadeBlendFactor{X};\nif (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.)\n{\nindex{X}+=1;\nfloat nextShadow=0.;\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nnextShadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nnextShadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nnextShadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\nshadow=mix(nextShadow,shadow,diffRatio);\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio);\n#endif\n}\n#endif\n}\n#elif defined(SHADOWCLOSEESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithCloseESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithPoissonSamplingCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow+=shadow;\nshadowLightCount+=1.0;\n#endif\n#else\nshadow=1.;\n#endif\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\n#ifdef SPECULARTERM\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase+=lightmapColor.rgb*shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase+=info.specular*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#else\n#ifdef SHADOWCSMDEBUG{X}\ndiffuseBase+=info.diffuse*shadowDebug{X};\n#else\ndiffuseBase+=info.diffuse*shadow;\n#endif\n#ifdef SPECULARTERM\nspecularBase+=info.specular*shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase+=info.clearCoat.rgb*shadow;\n#endif\n#ifdef SHEEN\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "shadowsVertex", + r = + "#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;\nfor (int i=0; i= 0 ? (this.rotation.y = -Math.atan(t.z / t.x) + Math.PI / 2) : (this.rotation.y = -Math.atan(t.z / t.x) - Math.PI / 2), + (this.rotation.z = 0), + isNaN(this.rotation.x) && (this.rotation.x = 0), + isNaN(this.rotation.y) && (this.rotation.y = 0), + isNaN(this.rotation.z) && (this.rotation.z = 0), + this.rotationQuaternion && a.b.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this.rotationQuaternion); + }), + (t.prototype.getTarget = function () { + return this._currentTarget; + }), + (t.prototype._decideIfNeedsToMove = function () { + return Math.abs(this.cameraDirection.x) > 0 || Math.abs(this.cameraDirection.y) > 0 || Math.abs(this.cameraDirection.z) > 0; + }), + (t.prototype._updatePosition = function () { + if (this.parent) return this.parent.getWorldMatrix().invertToRef(a.c.Matrix[0]), a.e.TransformNormalToRef(this.cameraDirection, a.c.Matrix[0], a.c.Vector3[0]), void this.position.addInPlace(a.c.Vector3[0]); + this.position.addInPlace(this.cameraDirection); + }), + (t.prototype._checkInputs = function () { + var t = this._decideIfNeedsToMove(), + n = Math.abs(this.cameraRotation.x) > 0 || Math.abs(this.cameraRotation.y) > 0; + if ((t && this._updatePosition(), n)) { + if (((this.rotation.x += this.cameraRotation.x), (this.rotation.y += this.cameraRotation.y), this.rotationQuaternion)) + this.rotation.lengthSquared() && a.b.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this.rotationQuaternion); + if (!this.noRotationConstraint) { + this.rotation.x > 1.570796 && (this.rotation.x = 1.570796), this.rotation.x < -1.570796 && (this.rotation.x = -1.570796); + } + } + t && + (Math.abs(this.cameraDirection.x) < this.speed * s.a && (this.cameraDirection.x = 0), + Math.abs(this.cameraDirection.y) < this.speed * s.a && (this.cameraDirection.y = 0), + Math.abs(this.cameraDirection.z) < this.speed * s.a && (this.cameraDirection.z = 0), + this.cameraDirection.scaleInPlace(this.inertia)), + n && + (Math.abs(this.cameraRotation.x) < this.speed * s.a && (this.cameraRotation.x = 0), + Math.abs(this.cameraRotation.y) < this.speed * s.a && (this.cameraRotation.y = 0), + this.cameraRotation.scaleInPlace(this.inertia)), + e.prototype._checkInputs.call(this); + }), + (t.prototype._updateCameraRotationMatrix = function () { + this.rotationQuaternion ? this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix) : a.a.RotationYawPitchRollToRef(this.rotation.y, this.rotation.x, this.rotation.z, this._cameraRotationMatrix); + }), + (t.prototype._rotateUpVectorWithCameraRotationMatrix = function () { + return a.e.TransformNormalToRef(this._defaultUp, this._cameraRotationMatrix, this.upVector), this; + }), + (t.prototype._getViewMatrix = function () { + return ( + this.lockedTarget && this.setTarget(this._getLockedTargetPosition()), + this._updateCameraRotationMatrix(), + this.rotationQuaternion && this._cachedQuaternionRotationZ != this.rotationQuaternion.z + ? (this._rotateUpVectorWithCameraRotationMatrix(), (this._cachedQuaternionRotationZ = this.rotationQuaternion.z)) + : this._cachedRotationZ != this.rotation.z && (this._rotateUpVectorWithCameraRotationMatrix(), (this._cachedRotationZ = this.rotation.z)), + a.e.TransformCoordinatesToRef(this._referencePoint, this._cameraRotationMatrix, this._transformedReferencePoint), + this.position.addToRef(this._transformedReferencePoint, this._currentTarget), + this.updateUpVectorFromRotation && + (this.rotationQuaternion + ? c.a.Y.rotateByQuaternionToRef(this.rotationQuaternion, this.upVector) + : (a.b.FromEulerVectorToRef(this.rotation, this._tmpQuaternion), c.a.Y.rotateByQuaternionToRef(this._tmpQuaternion, this.upVector))), + this._computeViewMatrix(this.position, this._currentTarget, this.upVector), + this._viewMatrix + ); + }), + (t.prototype._computeViewMatrix = function (e, t, n) { + if (this.parent) { + var i = this.parent.getWorldMatrix(); + a.e.TransformCoordinatesToRef(e, i, this._globalPosition), + a.e.TransformCoordinatesToRef(t, i, this._globalCurrentTarget), + a.e.TransformNormalToRef(n, i, this._globalCurrentUpVector), + this._markSyncedWithParent(); + } else this._globalPosition.copyFrom(e), this._globalCurrentTarget.copyFrom(t), this._globalCurrentUpVector.copyFrom(n); + this.getScene().useRightHandedSystem + ? a.a.LookAtRHToRef(this._globalPosition, this._globalCurrentTarget, this._globalCurrentUpVector, this._viewMatrix) + : a.a.LookAtLHToRef(this._globalPosition, this._globalCurrentTarget, this._globalCurrentUpVector, this._viewMatrix); + }), + (t.prototype.createRigCamera = function (e, n) { + if (this.cameraRigMode !== o.a.RIG_MODE_NONE) { + var i = new t(e, this.position.clone(), this.getScene()); + return ( + (i.isRigCamera = !0), + (i.rigParent = this), + (this.cameraRigMode !== o.a.RIG_MODE_VR && this.cameraRigMode !== o.a.RIG_MODE_WEBVR) || + (this.rotationQuaternion || (this.rotationQuaternion = new a.b()), (i._cameraRigParams = {}), (i.rotationQuaternion = new a.b())), + i + ); + } + return null; + }), + (t.prototype._updateRigCameras = function () { + var t = this._rigCameras[0], + n = this._rigCameras[1]; + switch ((this.computeWorldMatrix(), this.cameraRigMode)) { + case o.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH: + case o.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: + case o.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: + case o.a.RIG_MODE_STEREOSCOPIC_OVERUNDER: + case o.a.RIG_MODE_STEREOSCOPIC_INTERLACED: + var i = this.cameraRigMode === o.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? 1 : -1, + r = this.cameraRigMode === o.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED ? -1 : 1; + this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle * i, t), this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle * r, n); + break; + case o.a.RIG_MODE_VR: + t.rotationQuaternion + ? (t.rotationQuaternion.copyFrom(this.rotationQuaternion), n.rotationQuaternion.copyFrom(this.rotationQuaternion)) + : (t.rotation.copyFrom(this.rotation), n.rotation.copyFrom(this.rotation)), + t.position.copyFrom(this.position), + n.position.copyFrom(this.position); + } + e.prototype._updateRigCameras.call(this); + }), + (t.prototype._getRigCamPositionAndTarget = function (e, n) { + this.getTarget().subtractToRef(this.position, t._TargetFocalPoint), t._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance); + var i = t._TargetFocalPoint.addInPlace(this.position); + a.a.TranslationToRef(-i.x, -i.y, -i.z, t._TargetTransformMatrix), + t._TargetTransformMatrix.multiplyToRef(a.a.RotationY(e), t._RigCamTransformMatrix), + a.a.TranslationToRef(i.x, i.y, i.z, t._TargetTransformMatrix), + t._RigCamTransformMatrix.multiplyToRef(t._TargetTransformMatrix, t._RigCamTransformMatrix), + a.e.TransformCoordinatesToRef(this.position, t._RigCamTransformMatrix, n.position), + n.setTarget(i); + }), + (t.prototype.getClassName = function () { + return "TargetCamera"; + }), + (t._RigCamTransformMatrix = new a.a()), + (t._TargetTransformMatrix = new a.a()), + (t._TargetFocalPoint = new a.e()), + Object(i.c)([Object(r.o)()], t.prototype, "rotation", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "speed", void 0), + Object(i.c)([Object(r.k)("lockedTargetId")], t.prototype, "lockedTarget", void 0), + t + ); + })(o.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + Object.defineProperty(e, "ForceFullSceneLoadingForIncremental", { + get: function () { + return e._ForceFullSceneLoadingForIncremental; + }, + set: function (t) { + e._ForceFullSceneLoadingForIncremental = t; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "ShowLoadingScreen", { + get: function () { + return e._ShowLoadingScreen; + }, + set: function (t) { + e._ShowLoadingScreen = t; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "loggingLevel", { + get: function () { + return e._loggingLevel; + }, + set: function (t) { + e._loggingLevel = t; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "CleanBoneMatrixWeights", { + get: function () { + return e._CleanBoneMatrixWeights; + }, + set: function (t) { + e._CleanBoneMatrixWeights = t; + }, + enumerable: !0, + configurable: !0, + }), + (e._ForceFullSceneLoadingForIncremental = !1), + (e._ShowLoadingScreen = !0), + (e._CleanBoneMatrixWeights = !1), + (e._loggingLevel = 0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + e.exports = function (e, t) { + return ( + t || (t = {}), + "string" != typeof (e = e && e.__esModule ? e.default : e) + ? e + : (/^['"].*['"]$/.test(e) && (e = e.slice(1, -1)), t.hash && (e += t.hash), /["'() \t\n]/.test(e) || t.needQuotes ? '"'.concat(e.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : e) + ); + }; + }, + function (e, t, n) { + "use strict"; + var i = "lightsFragmentFunctions", + r = + "\nstruct lightingInfo\n{\nvec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef NDOTL\nfloat ndl;\n#endif\n};\nlightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\nlightingInfo result;\nvec3 lightVectorW;\nfloat attenuation=1.0;\nif (lightData.w == 0.)\n{\nvec3 direction=lightData.xyz-vPositionW;\nattenuation=max(0.,1.0-length(direction)/range);\nlightVectorW=normalize(direction);\n}\nelse\n{\nlightVectorW=normalize(-lightData.xyz);\n}\n\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;\n}\nlightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\nlightingInfo result;\nvec3 direction=lightData.xyz-vPositionW;\nvec3 lightVectorW=normalize(direction);\nfloat attenuation=max(0.,1.0-length(direction)/range);\n\nfloat cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW));\nif (cosAngle>=lightDirection.w)\n{\ncosAngle=max(0.,pow(cosAngle,lightData.w));\nattenuation*=cosAngle;\n\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;\n}\nresult.diffuse=vec3(0.);\n#ifdef SPECULARTERM\nresult.specular=vec3(0.);\n#endif\n#ifdef NDOTL\nresult.ndl=0.;\n#endif\nreturn result;\n}\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) {\nlightingInfo result;\n\nfloat ndl=dot(vNormal,lightData.xyz)*0.5+0.5;\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=mix(groundColor,diffuseColor,ndl);\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightData.xyz);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor;\n#endif\nreturn result;\n}\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\nstrq/=strq.w;\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\nreturn textureColor;\n}"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return p; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(4), + s = n(8), + c = n(11), + l = n(28), + u = n(13), + h = n(5), + d = n(43), + p = (function (e) { + function t(t, n, r, a) { + void 0 === a && (a = {}); + var s = e.call(this, t, n) || this; + return ( + (s._textures = {}), + (s._textureArrays = {}), + (s._floats = {}), + (s._ints = {}), + (s._floatsArrays = {}), + (s._colors3 = {}), + (s._colors3Arrays = {}), + (s._colors4 = {}), + (s._colors4Arrays = {}), + (s._vectors2 = {}), + (s._vectors3 = {}), + (s._vectors4 = {}), + (s._matrices = {}), + (s._matrixArrays = {}), + (s._matrices3x3 = {}), + (s._matrices2x2 = {}), + (s._vectors2Arrays = {}), + (s._vectors3Arrays = {}), + (s._vectors4Arrays = {}), + (s._cachedWorldViewMatrix = new o.a()), + (s._cachedWorldViewProjectionMatrix = new o.a()), + (s._multiview = !1), + (s._shaderPath = r), + (s._options = Object(i.a)({ needAlphaBlending: !1, needAlphaTesting: !1, attributes: ["position", "normal", "uv"], uniforms: ["worldViewProjection"], uniformBuffers: [], samplers: [], defines: [] }, a)), + s + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "shaderPath", { + get: function () { + return this._shaderPath; + }, + set: function (e) { + this._shaderPath = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "options", { + get: function () { + return this._options; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "ShaderMaterial"; + }), + (t.prototype.needAlphaBlending = function () { + return this.alpha < 1 || this._options.needAlphaBlending; + }), + (t.prototype.needAlphaTesting = function () { + return this._options.needAlphaTesting; + }), + (t.prototype._checkUniform = function (e) { + -1 === this._options.uniforms.indexOf(e) && this._options.uniforms.push(e); + }), + (t.prototype.setTexture = function (e, t) { + return -1 === this._options.samplers.indexOf(e) && this._options.samplers.push(e), (this._textures[e] = t), this; + }), + (t.prototype.setTextureArray = function (e, t) { + return -1 === this._options.samplers.indexOf(e) && this._options.samplers.push(e), this._checkUniform(e), (this._textureArrays[e] = t), this; + }), + (t.prototype.setFloat = function (e, t) { + return this._checkUniform(e), (this._floats[e] = t), this; + }), + (t.prototype.setInt = function (e, t) { + return this._checkUniform(e), (this._ints[e] = t), this; + }), + (t.prototype.setFloats = function (e, t) { + return this._checkUniform(e), (this._floatsArrays[e] = t), this; + }), + (t.prototype.setColor3 = function (e, t) { + return this._checkUniform(e), (this._colors3[e] = t), this; + }), + (t.prototype.setColor3Array = function (e, t) { + return ( + this._checkUniform(e), + (this._colors3Arrays[e] = t.reduce(function (e, t) { + return t.toArray(e, e.length), e; + }, [])), + this + ); + }), + (t.prototype.setColor4 = function (e, t) { + return this._checkUniform(e), (this._colors4[e] = t), this; + }), + (t.prototype.setColor4Array = function (e, t) { + return ( + this._checkUniform(e), + (this._colors4Arrays[e] = t.reduce(function (e, t) { + return t.toArray(e, e.length), e; + }, [])), + this + ); + }), + (t.prototype.setVector2 = function (e, t) { + return this._checkUniform(e), (this._vectors2[e] = t), this; + }), + (t.prototype.setVector3 = function (e, t) { + return this._checkUniform(e), (this._vectors3[e] = t), this; + }), + (t.prototype.setVector4 = function (e, t) { + return this._checkUniform(e), (this._vectors4[e] = t), this; + }), + (t.prototype.setMatrix = function (e, t) { + return this._checkUniform(e), (this._matrices[e] = t), this; + }), + (t.prototype.setMatrices = function (e, t) { + this._checkUniform(e); + for (var n = new Float32Array(16 * t.length), i = 0; i < t.length; i++) { + t[i].copyToArray(n, 16 * i); + } + return (this._matrixArrays[e] = n), this; + }), + (t.prototype.setMatrix3x3 = function (e, t) { + return this._checkUniform(e), (this._matrices3x3[e] = t), this; + }), + (t.prototype.setMatrix2x2 = function (e, t) { + return this._checkUniform(e), (this._matrices2x2[e] = t), this; + }), + (t.prototype.setArray2 = function (e, t) { + return this._checkUniform(e), (this._vectors2Arrays[e] = t), this; + }), + (t.prototype.setArray3 = function (e, t) { + return this._checkUniform(e), (this._vectors3Arrays[e] = t), this; + }), + (t.prototype.setArray4 = function (e, t) { + return this._checkUniform(e), (this._vectors4Arrays[e] = t), this; + }), + (t.prototype._checkCache = function (e, t) { + return !e || !this._effect || (-1 !== this._effect.defines.indexOf("#define INSTANCES")) === t; + }), + (t.prototype.isReadyForSubMesh = function (e, t, n) { + return this.isReady(e, n); + }), + (t.prototype.isReady = function (e, t) { + if (this._effect && this.isFrozen && this._effect._wasPreviouslyReady) return !0; + var n = this.getScene(), + i = n.getEngine(); + if (!this.checkReadyOnEveryCall && this._renderId === n.getRenderId() && this._checkCache(e, t)) return !0; + var r = [], + o = [], + s = new d.a(); + i.getCaps().multiview && + n.activeCamera && + n.activeCamera.outputRenderTarget && + n.activeCamera.outputRenderTarget.getViewCount() > 1 && + ((this._multiview = !0), + r.push("#define MULTIVIEW"), + -1 !== this._options.uniforms.indexOf("viewProjection") && -1 === this._options.uniforms.push("viewProjectionR") && this._options.uniforms.push("viewProjectionR")); + for (var l = 0; l < this._options.defines.length; l++) r.push(this._options.defines[l]); + for (l = 0; l < this._options.attributes.length; l++) o.push(this._options.attributes[l]); + if ( + (e && e.isVerticesDataPresent(a.b.ColorKind) && (o.push(a.b.ColorKind), r.push("#define VERTEXCOLOR")), + t && (r.push("#define INSTANCES"), c.a.PushAttributesForInstances(o)), + e && e.useBones && e.computeBonesUsingShaders && e.skeleton) + ) { + o.push(a.b.MatricesIndicesKind), o.push(a.b.MatricesWeightsKind), e.numBoneInfluencers > 4 && (o.push(a.b.MatricesIndicesExtraKind), o.push(a.b.MatricesWeightsExtraKind)); + var u = e.skeleton; + r.push("#define NUM_BONE_INFLUENCERS " + e.numBoneInfluencers), + s.addCPUSkinningFallback(0, e), + u.isUsingTextureForMatrices + ? (r.push("#define BONETEXTURE"), + -1 === this._options.uniforms.indexOf("boneTextureWidth") && this._options.uniforms.push("boneTextureWidth"), + -1 === this._options.samplers.indexOf("boneSampler") && this._options.samplers.push("boneSampler")) + : (r.push("#define BonesPerMesh " + (u.bones.length + 1)), -1 === this._options.uniforms.indexOf("mBones") && this._options.uniforms.push("mBones")); + } else r.push("#define NUM_BONE_INFLUENCERS 0"); + for (var h in this._textures) if (!this._textures[h].isReady()) return !1; + e && this._shouldTurnAlphaTestOn(e) && r.push("#define ALPHATEST"); + var p = this._effect, + f = r.join("\n"); + return ( + (this._effect = i.createEffect( + this._shaderPath, + { + attributes: o, + uniformsNames: this._options.uniforms, + uniformBuffersNames: this._options.uniformBuffers, + samplers: this._options.samplers, + defines: f, + fallbacks: s, + onCompiled: this.onCompiled, + onError: this.onError, + }, + i + )), + !!this._effect.isReady() && (p !== this._effect && n.resetCachedMaterial(), (this._renderId = n.getRenderId()), (this._effect._wasPreviouslyReady = !0), !0) + ); + }), + (t.prototype.bindOnlyWorldMatrix = function (e) { + var t = this.getScene(); + this._effect && + (-1 !== this._options.uniforms.indexOf("world") && this._effect.setMatrix("world", e), + -1 !== this._options.uniforms.indexOf("worldView") && (e.multiplyToRef(t.getViewMatrix(), this._cachedWorldViewMatrix), this._effect.setMatrix("worldView", this._cachedWorldViewMatrix)), + -1 !== this._options.uniforms.indexOf("worldViewProjection") && + (e.multiplyToRef(t.getTransformMatrix(), this._cachedWorldViewProjectionMatrix), this._effect.setMatrix("worldViewProjection", this._cachedWorldViewProjectionMatrix))); + }), + (t.prototype.bind = function (e, t) { + if ((this.bindOnlyWorldMatrix(e), this._effect && this.getScene().getCachedMaterial() !== this)) { + var n; + for (n in (-1 !== this._options.uniforms.indexOf("view") && this._effect.setMatrix("view", this.getScene().getViewMatrix()), + -1 !== this._options.uniforms.indexOf("projection") && this._effect.setMatrix("projection", this.getScene().getProjectionMatrix()), + -1 !== this._options.uniforms.indexOf("viewProjection") && + (this._effect.setMatrix("viewProjection", this.getScene().getTransformMatrix()), this._multiview && this._effect.setMatrix("viewProjectionR", this.getScene()._transformMatrixR)), + this.getScene().activeCamera && -1 !== this._options.uniforms.indexOf("cameraPosition") && this._effect.setVector3("cameraPosition", this.getScene().activeCamera.globalPosition), + c.a.BindBonesParameters(t, this._effect), + this._textures)) + this._effect.setTexture(n, this._textures[n]); + for (n in this._textureArrays) this._effect.setTextureArray(n, this._textureArrays[n]); + for (n in this._ints) this._effect.setInt(n, this._ints[n]); + for (n in this._floats) this._effect.setFloat(n, this._floats[n]); + for (n in this._floatsArrays) this._effect.setArray(n, this._floatsArrays[n]); + for (n in this._colors3) this._effect.setColor3(n, this._colors3[n]); + for (n in this._colors3Arrays) this._effect.setArray3(n, this._colors3Arrays[n]); + for (n in this._colors4) { + var i = this._colors4[n]; + this._effect.setFloat4(n, i.r, i.g, i.b, i.a); + } + for (n in this._colors4Arrays) this._effect.setArray4(n, this._colors4Arrays[n]); + for (n in this._vectors2) this._effect.setVector2(n, this._vectors2[n]); + for (n in this._vectors3) this._effect.setVector3(n, this._vectors3[n]); + for (n in this._vectors4) this._effect.setVector4(n, this._vectors4[n]); + for (n in this._matrices) this._effect.setMatrix(n, this._matrices[n]); + for (n in this._matrixArrays) this._effect.setMatrices(n, this._matrixArrays[n]); + for (n in this._matrices3x3) this._effect.setMatrix3x3(n, this._matrices3x3[n]); + for (n in this._matrices2x2) this._effect.setMatrix2x2(n, this._matrices2x2[n]); + for (n in this._vectors2Arrays) this._effect.setArray2(n, this._vectors2Arrays[n]); + for (n in this._vectors3Arrays) this._effect.setArray3(n, this._vectors3Arrays[n]); + for (n in this._vectors4Arrays) this._effect.setArray4(n, this._vectors4Arrays[n]); + } + this._afterBind(t); + }), + (t.prototype.getActiveTextures = function () { + var t = e.prototype.getActiveTextures.call(this); + for (var n in this._textures) t.push(this._textures[n]); + for (var n in this._textureArrays) for (var i = this._textureArrays[n], r = 0; r < i.length; r++) t.push(i[r]); + return t; + }), + (t.prototype.hasTexture = function (t) { + if (e.prototype.hasTexture.call(this, t)) return !0; + for (var n in this._textures) if (this._textures[n] === t) return !0; + for (var n in this._textureArrays) for (var i = this._textureArrays[n], r = 0; r < i.length; r++) if (i[r] === t) return !0; + return !1; + }), + (t.prototype.clone = function (e) { + var n = this, + o = r.a.Clone(function () { + return new t(e, n.getScene(), n._shaderPath, n._options); + }, this); + for (var a in ((o.name = e), + (o.id = e), + "object" == typeof o._shaderPath && (o._shaderPath = Object(i.a)({}, o._shaderPath)), + (this._options = Object(i.a)({}, this._options)), + Object.keys(this._options).forEach(function (e) { + var t = n._options[e]; + Array.isArray(t) && (n._options[e] = t.slice(0)); + }), + this._textures)) + o.setTexture(a, this._textures[a]); + for (var a in this._floats) o.setFloat(a, this._floats[a]); + for (var a in this._floatsArrays) o.setFloats(a, this._floatsArrays[a]); + for (var a in this._colors3) o.setColor3(a, this._colors3[a]); + for (var a in this._colors4) o.setColor4(a, this._colors4[a]); + for (var a in this._vectors2) o.setVector2(a, this._vectors2[a]); + for (var a in this._vectors3) o.setVector3(a, this._vectors3[a]); + for (var a in this._vectors4) o.setVector4(a, this._vectors4[a]); + for (var a in this._matrices) o.setMatrix(a, this._matrices[a]); + for (var a in this._matrices3x3) o.setMatrix3x3(a, this._matrices3x3[a]); + for (var a in this._matrices2x2) o.setMatrix2x2(a, this._matrices2x2[a]); + return o; + }), + (t.prototype.dispose = function (t, n, i) { + if (n) { + var r; + for (r in this._textures) this._textures[r].dispose(); + for (r in this._textureArrays) for (var o = this._textureArrays[r], a = 0; a < o.length; a++) o[a].dispose(); + } + (this._textures = {}), e.prototype.dispose.call(this, t, n, i); + }), + (t.prototype.serialize = function () { + var e, + t = r.a.Serialize(this); + for (e in ((t.customType = "BABYLON.ShaderMaterial"), (t.options = this._options), (t.shaderPath = this._shaderPath), (t.textures = {}), this._textures)) t.textures[e] = this._textures[e].serialize(); + for (e in ((t.textureArrays = {}), this._textureArrays)) { + t.textureArrays[e] = []; + for (var n = this._textureArrays[e], i = 0; i < n.length; i++) t.textureArrays[e].push(n[i].serialize()); + } + for (e in ((t.floats = {}), this._floats)) t.floats[e] = this._floats[e]; + for (e in ((t.FloatArrays = {}), this._floatsArrays)) t.FloatArrays[e] = this._floatsArrays[e]; + for (e in ((t.colors3 = {}), this._colors3)) t.colors3[e] = this._colors3[e].asArray(); + for (e in ((t.colors3Arrays = {}), this._colors3Arrays)) t.colors3Arrays[e] = this._colors3Arrays[e]; + for (e in ((t.colors4 = {}), this._colors4)) t.colors4[e] = this._colors4[e].asArray(); + for (e in ((t.colors4Arrays = {}), this._colors4Arrays)) t.colors4Arrays[e] = this._colors4Arrays[e]; + for (e in ((t.vectors2 = {}), this._vectors2)) t.vectors2[e] = this._vectors2[e].asArray(); + for (e in ((t.vectors3 = {}), this._vectors3)) t.vectors3[e] = this._vectors3[e].asArray(); + for (e in ((t.vectors4 = {}), this._vectors4)) t.vectors4[e] = this._vectors4[e].asArray(); + for (e in ((t.matrices = {}), this._matrices)) t.matrices[e] = this._matrices[e].asArray(); + for (e in ((t.matrixArray = {}), this._matrixArrays)) t.matrixArray[e] = this._matrixArrays[e]; + for (e in ((t.matrices3x3 = {}), this._matrices3x3)) t.matrices3x3[e] = this._matrices3x3[e]; + for (e in ((t.matrices2x2 = {}), this._matrices2x2)) t.matrices2x2[e] = this._matrices2x2[e]; + for (e in ((t.vectors2Arrays = {}), this._vectors2Arrays)) t.vectors2Arrays[e] = this._vectors2Arrays[e]; + for (e in ((t.vectors3Arrays = {}), this._vectors3Arrays)) t.vectors3Arrays[e] = this._vectors3Arrays[e]; + for (e in ((t.vectors4Arrays = {}), this._vectors4Arrays)) t.vectors4Arrays[e] = this._vectors4Arrays[e]; + return t; + }), + (t.Parse = function (e, n, i) { + var a, + c = r.a.Parse( + function () { + return new t(e.name, n, e.shaderPath, e.options); + }, + e, + n, + i + ); + for (a in e.textures) c.setTexture(a, s.a.Parse(e.textures[a], n, i)); + for (a in e.textureArrays) { + for (var l = e.textureArrays[a], u = new Array(), d = 0; d < l.length; d++) u.push(s.a.Parse(l[d], n, i)); + c.setTextureArray(a, u); + } + for (a in e.floats) c.setFloat(a, e.floats[a]); + for (a in e.floatsArrays) c.setFloats(a, e.floatsArrays[a]); + for (a in e.colors3) c.setColor3(a, h.a.FromArray(e.colors3[a])); + for (a in e.colors3Arrays) { + var p = e.colors3Arrays[a] + .reduce(function (e, t, n) { + return n % 3 == 0 ? e.push([t]) : e[e.length - 1].push(t), e; + }, []) + .map(function (e) { + return h.a.FromArray(e); + }); + c.setColor3Array(a, p); + } + for (a in e.colors4) c.setColor4(a, h.b.FromArray(e.colors4[a])); + for (a in e.colors4Arrays) { + p = e.colors4Arrays[a] + .reduce(function (e, t, n) { + return n % 4 == 0 ? e.push([t]) : e[e.length - 1].push(t), e; + }, []) + .map(function (e) { + return h.b.FromArray(e); + }); + c.setColor4Array(a, p); + } + for (a in e.vectors2) c.setVector2(a, o.d.FromArray(e.vectors2[a])); + for (a in e.vectors3) c.setVector3(a, o.e.FromArray(e.vectors3[a])); + for (a in e.vectors4) c.setVector4(a, o.f.FromArray(e.vectors4[a])); + for (a in e.matrices) c.setMatrix(a, o.a.FromArray(e.matrices[a])); + for (a in e.matrixArray) c._matrixArrays[a] = new Float32Array(e.matrixArray[a]); + for (a in e.matrices3x3) c.setMatrix3x3(a, e.matrices3x3[a]); + for (a in e.matrices2x2) c.setMatrix2x2(a, e.matrices2x2[a]); + for (a in e.vectors2Arrays) c.setArray2(a, e.vectors2Arrays[a]); + for (a in e.vectors3Arrays) c.setArray3(a, e.vectors3Arrays[a]); + for (a in e.vectors4Arrays) c.setArray4(a, e.vectors4Arrays[a]); + return c; + }), + t + ); + })(l.a); + u.a.RegisteredTypes["BABYLON.ShaderMaterial"] = p; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return l; + }), + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(24), + o = n(14), + a = n(7), + s = "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\n}"; + a.a.ShadersStore.passPixelShader = s; + var c = + "\nvarying vec2 vUV;\nuniform samplerCube textureSampler;\nvoid main(void)\n{\nvec2 uv=vUV*2.0-1.0;\n#ifdef POSITIVEX\ngl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x));\n#endif\n#ifdef NEGATIVEX\ngl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x));\n#endif\n#ifdef POSITIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x));\n#endif\n#ifdef NEGATIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x));\n#endif\n#ifdef POSITIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,1.001));\n#endif\n#ifdef NEGATIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,-1.001));\n#endif\n}"; + a.a.ShadersStore.passCubePixelShader = c; + var l = (function (e) { + function t(t, n, i, r, o, a, s, c) { + return void 0 === i && (i = null), void 0 === s && (s = 0), void 0 === c && (c = !1), e.call(this, t, "pass", null, null, n, i, r, o, a, void 0, s, void 0, null, c) || this; + } + return Object(i.d)(t, e), t; + })(r.a), + u = (function (e) { + function t(t, n, i, r, o, a, s, c) { + void 0 === i && (i = null), void 0 === s && (s = 0), void 0 === c && (c = !1); + var l = e.call(this, t, "passCube", null, null, n, i, r, o, a, "#define POSITIVEX", s, void 0, null, c) || this; + return (l._face = 0), l; + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "face", { + get: function () { + return this._face; + }, + set: function (e) { + if (!(e < 0 || e > 5)) + switch (((this._face = e), this._face)) { + case 0: + this.updateEffect("#define POSITIVEX"); + break; + case 1: + this.updateEffect("#define NEGATIVEX"); + break; + case 2: + this.updateEffect("#define POSITIVEY"); + break; + case 3: + this.updateEffect("#define NEGATIVEY"); + break; + case 4: + this.updateEffect("#define POSITIVEZ"); + break; + case 5: + this.updateEffect("#define NEGATIVEZ"); + } + }, + enumerable: !0, + configurable: !0, + }), + t + ); + })(r.a); + o.a._RescalePostProcessFactory = function (e) { + return new l("rescale", 1, null, 2, e, !1, 0); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }), + n.d(t, "b", function () { + return l; + }); + var i = n(1), + r = [ + Math.sqrt(1 / (4 * Math.PI)), + -Math.sqrt(3 / (4 * Math.PI)), + Math.sqrt(3 / (4 * Math.PI)), + -Math.sqrt(3 / (4 * Math.PI)), + Math.sqrt(15 / (4 * Math.PI)), + -Math.sqrt(15 / (4 * Math.PI)), + Math.sqrt(5 / (16 * Math.PI)), + -Math.sqrt(15 / (4 * Math.PI)), + Math.sqrt(15 / (16 * Math.PI)), + ], + o = [ + function (e) { + return 1; + }, + function (e) { + return e.y; + }, + function (e) { + return e.z; + }, + function (e) { + return e.x; + }, + function (e) { + return e.x * e.y; + }, + function (e) { + return e.y * e.z; + }, + function (e) { + return 3 * e.z * e.z - 1; + }, + function (e) { + return e.x * e.z; + }, + function (e) { + return e.x * e.x - e.y * e.y; + }, + ], + a = function (e, t) { + return r[e] * o[e](t); + }, + s = [Math.PI, (2 * Math.PI) / 3, (2 * Math.PI) / 3, (2 * Math.PI) / 3, Math.PI / 4, Math.PI / 4, Math.PI / 4, Math.PI / 4, Math.PI / 4], + c = (function () { + function e() { + (this.preScaled = !1), + (this.l00 = i.e.Zero()), + (this.l1_1 = i.e.Zero()), + (this.l10 = i.e.Zero()), + (this.l11 = i.e.Zero()), + (this.l2_2 = i.e.Zero()), + (this.l2_1 = i.e.Zero()), + (this.l20 = i.e.Zero()), + (this.l21 = i.e.Zero()), + (this.l22 = i.e.Zero()); + } + return ( + (e.prototype.addLight = function (e, t, n) { + var r = new i.e(t.r, t.g, t.b).scale(n); + (this.l00 = this.l00.add(r.scale(a(0, e)))), + (this.l1_1 = this.l1_1.add(r.scale(a(1, e)))), + (this.l10 = this.l10.add(r.scale(a(2, e)))), + (this.l11 = this.l11.add(r.scale(a(3, e)))), + (this.l2_2 = this.l2_2.add(r.scale(a(4, e)))), + (this.l2_1 = this.l2_1.add(r.scale(a(5, e)))), + (this.l20 = this.l20.add(r.scale(a(6, e)))), + (this.l21 = this.l21.add(r.scale(a(7, e)))), + (this.l22 = this.l22.add(r.scale(a(8, e)))); + }), + (e.prototype.scaleInPlace = function (e) { + this.l00.scaleInPlace(e), + this.l1_1.scaleInPlace(e), + this.l10.scaleInPlace(e), + this.l11.scaleInPlace(e), + this.l2_2.scaleInPlace(e), + this.l2_1.scaleInPlace(e), + this.l20.scaleInPlace(e), + this.l21.scaleInPlace(e), + this.l22.scaleInPlace(e); + }), + (e.prototype.convertIncidentRadianceToIrradiance = function () { + this.l00.scaleInPlace(s[0]), + this.l1_1.scaleInPlace(s[1]), + this.l10.scaleInPlace(s[2]), + this.l11.scaleInPlace(s[3]), + this.l2_2.scaleInPlace(s[4]), + this.l2_1.scaleInPlace(s[5]), + this.l20.scaleInPlace(s[6]), + this.l21.scaleInPlace(s[7]), + this.l22.scaleInPlace(s[8]); + }), + (e.prototype.convertIrradianceToLambertianRadiance = function () { + this.scaleInPlace(1 / Math.PI); + }), + (e.prototype.preScaleForRendering = function () { + (this.preScaled = !0), + this.l00.scaleInPlace(r[0]), + this.l1_1.scaleInPlace(r[1]), + this.l10.scaleInPlace(r[2]), + this.l11.scaleInPlace(r[3]), + this.l2_2.scaleInPlace(r[4]), + this.l2_1.scaleInPlace(r[5]), + this.l20.scaleInPlace(r[6]), + this.l21.scaleInPlace(r[7]), + this.l22.scaleInPlace(r[8]); + }), + (e.FromArray = function (t) { + var n = new e(); + return ( + i.e.FromArrayToRef(t[0], 0, n.l00), + i.e.FromArrayToRef(t[1], 0, n.l1_1), + i.e.FromArrayToRef(t[2], 0, n.l10), + i.e.FromArrayToRef(t[3], 0, n.l11), + i.e.FromArrayToRef(t[4], 0, n.l2_2), + i.e.FromArrayToRef(t[5], 0, n.l2_1), + i.e.FromArrayToRef(t[6], 0, n.l20), + i.e.FromArrayToRef(t[7], 0, n.l21), + i.e.FromArrayToRef(t[8], 0, n.l22), + n + ); + }), + (e.FromPolynomial = function (t) { + var n = new e(); + return ( + (n.l00 = t.xx.scale(0.376127).add(t.yy.scale(0.376127)).add(t.zz.scale(0.376126))), + (n.l1_1 = t.y.scale(0.977204)), + (n.l10 = t.z.scale(0.977204)), + (n.l11 = t.x.scale(0.977204)), + (n.l2_2 = t.xy.scale(1.16538)), + (n.l2_1 = t.yz.scale(1.16538)), + (n.l20 = t.zz.scale(1.34567).subtract(t.xx.scale(0.672834)).subtract(t.yy.scale(0.672834))), + (n.l21 = t.zx.scale(1.16538)), + (n.l22 = t.xx.scale(1.16538).subtract(t.yy.scale(1.16538))), + n.l1_1.scaleInPlace(-1), + n.l11.scaleInPlace(-1), + n.l2_1.scaleInPlace(-1), + n.l21.scaleInPlace(-1), + n.scaleInPlace(Math.PI), + n + ); + }), + e + ); + })(), + l = (function () { + function e() { + (this.x = i.e.Zero()), (this.y = i.e.Zero()), (this.z = i.e.Zero()), (this.xx = i.e.Zero()), (this.yy = i.e.Zero()), (this.zz = i.e.Zero()), (this.xy = i.e.Zero()), (this.yz = i.e.Zero()), (this.zx = i.e.Zero()); + } + return ( + Object.defineProperty(e.prototype, "preScaledHarmonics", { + get: function () { + return this._harmonics || (this._harmonics = c.FromPolynomial(this)), this._harmonics.preScaled || this._harmonics.preScaleForRendering(), this._harmonics; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addAmbient = function (e) { + var t = new i.e(e.r, e.g, e.b); + (this.xx = this.xx.add(t)), (this.yy = this.yy.add(t)), (this.zz = this.zz.add(t)); + }), + (e.prototype.scaleInPlace = function (e) { + this.x.scaleInPlace(e), + this.y.scaleInPlace(e), + this.z.scaleInPlace(e), + this.xx.scaleInPlace(e), + this.yy.scaleInPlace(e), + this.zz.scaleInPlace(e), + this.yz.scaleInPlace(e), + this.zx.scaleInPlace(e), + this.xy.scaleInPlace(e); + }), + (e.FromHarmonics = function (t) { + var n = new e(); + return ( + (n._harmonics = t), + (n.x = t.l11.scale(1.02333).scale(-1)), + (n.y = t.l1_1.scale(1.02333).scale(-1)), + (n.z = t.l10.scale(1.02333)), + (n.xx = t.l00.scale(0.886277).subtract(t.l20.scale(0.247708)).add(t.l22.scale(0.429043))), + (n.yy = t.l00.scale(0.886277).subtract(t.l20.scale(0.247708)).subtract(t.l22.scale(0.429043))), + (n.zz = t.l00.scale(0.886277).add(t.l20.scale(0.495417))), + (n.yz = t.l2_1.scale(0.858086).scale(-1)), + (n.zx = t.l21.scale(0.858086).scale(-1)), + (n.xy = t.l2_2.scale(0.858086)), + n.scaleInPlace(1 / Math.PI), + n + ); + }), + (e.FromArray = function (t) { + var n = new e(); + return ( + i.e.FromArrayToRef(t[0], 0, n.x), + i.e.FromArrayToRef(t[1], 0, n.y), + i.e.FromArrayToRef(t[2], 0, n.z), + i.e.FromArrayToRef(t[3], 0, n.xx), + i.e.FromArrayToRef(t[4], 0, n.yy), + i.e.FromArrayToRef(t[5], 0, n.zz), + i.e.FromArrayToRef(t[6], 0, n.yz), + i.e.FromArrayToRef(t[7], 0, n.zx), + i.e.FromArrayToRef(t[8], 0, n.xy), + n + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e, t) { + (this.width = e), (this.height = t); + } + return ( + (e.prototype.toString = function () { + return "{W: " + this.width + ", H: " + this.height + "}"; + }), + (e.prototype.getClassName = function () { + return "Size"; + }), + (e.prototype.getHashCode = function () { + var e = 0 | this.width; + return (e = (397 * e) ^ (0 | this.height)); + }), + (e.prototype.copyFrom = function (e) { + (this.width = e.width), (this.height = e.height); + }), + (e.prototype.copyFromFloats = function (e, t) { + return (this.width = e), (this.height = t), this; + }), + (e.prototype.set = function (e, t) { + return this.copyFromFloats(e, t); + }), + (e.prototype.multiplyByFloats = function (t, n) { + return new e(this.width * t, this.height * n); + }), + (e.prototype.clone = function () { + return new e(this.width, this.height); + }), + (e.prototype.equals = function (e) { + return !!e && this.width === e.width && this.height === e.height; + }), + Object.defineProperty(e.prototype, "surface", { + get: function () { + return this.width * this.height; + }, + enumerable: !0, + configurable: !0, + }), + (e.Zero = function () { + return new e(0, 0); + }), + (e.prototype.add = function (t) { + return new e(this.width + t.width, this.height + t.height); + }), + (e.prototype.subtract = function (t) { + return new e(this.width - t.width, this.height - t.height); + }), + (e.Lerp = function (t, n, i) { + return new e(t.width + (n.width - t.width) * i, t.height + (n.height - t.height) * i); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(1), + o = n(58), + a = n(35), + s = n(23), + c = (function (e) { + function t(t, n, i, o, a, s, c) { + void 0 === i && (i = null), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === s && (s = null), void 0 === c && (c = null); + var l = e.call(this, t, n.getScene()) || this; + return ( + (l.name = t), + (l.children = new Array()), + (l.animations = new Array()), + (l._index = null), + (l._absoluteTransform = new r.a()), + (l._invertedAbsoluteTransform = new r.a()), + (l._scalingDeterminant = 1), + (l._worldTransform = new r.a()), + (l._needToDecompose = !0), + (l._needToCompose = !1), + (l._linkedTransformNode = null), + (l._waitingTransformNodeId = null), + (l._skeleton = n), + (l._localMatrix = o ? o.clone() : r.a.Identity()), + (l._restPose = a || l._localMatrix.clone()), + (l._baseMatrix = s || l._localMatrix.clone()), + (l._index = c), + n.bones.push(l), + l.setParent(i, !1), + (s || o) && l._updateDifferenceMatrix(), + l + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "_matrix", { + get: function () { + return this._compose(), this._localMatrix; + }, + set: function (e) { + this._localMatrix.copyFrom(e), (this._needToDecompose = !0); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "Bone"; + }), + (t.prototype.getSkeleton = function () { + return this._skeleton; + }), + (t.prototype.getParent = function () { + return this._parent; + }), + (t.prototype.getChildren = function () { + return this.children; + }), + (t.prototype.getIndex = function () { + return null === this._index ? this.getSkeleton().bones.indexOf(this) : this._index; + }), + (t.prototype.setParent = function (e, t) { + if ((void 0 === t && (t = !0), this._parent !== e)) { + if (this._parent) { + var n = this._parent.children.indexOf(this); + -1 !== n && this._parent.children.splice(n, 1); + } + (this._parent = e), this._parent && this._parent.children.push(this), t && this._updateDifferenceMatrix(), this.markAsDirty(); + } + }), + (t.prototype.getLocalMatrix = function () { + return this._compose(), this._localMatrix; + }), + (t.prototype.getBaseMatrix = function () { + return this._baseMatrix; + }), + (t.prototype.getRestPose = function () { + return this._restPose; + }), + (t.prototype.getWorldMatrix = function () { + return this._worldTransform; + }), + (t.prototype.returnToRest = function () { + this.updateMatrix(this._restPose.clone()); + }), + (t.prototype.getInvertedAbsoluteTransform = function () { + return this._invertedAbsoluteTransform; + }), + (t.prototype.getAbsoluteTransform = function () { + return this._absoluteTransform; + }), + (t.prototype.linkTransformNode = function (e) { + this._linkedTransformNode && this._skeleton._numBonesWithLinkedTransformNode--, (this._linkedTransformNode = e), this._linkedTransformNode && this._skeleton._numBonesWithLinkedTransformNode++; + }), + (t.prototype.getTransformNode = function () { + return this._linkedTransformNode; + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._decompose(), this._localPosition; + }, + set: function (e) { + this._decompose(), this._localPosition.copyFrom(e), this._markAsDirtyAndCompose(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotation", { + get: function () { + return this.getRotation(); + }, + set: function (e) { + this.setRotation(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "rotationQuaternion", { + get: function () { + return this._decompose(), this._localRotation; + }, + set: function (e) { + this.setRotationQuaternion(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "scaling", { + get: function () { + return this.getScale(); + }, + set: function (e) { + this.setScale(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "animationPropertiesOverride", { + get: function () { + return this._skeleton.animationPropertiesOverride; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._decompose = function () { + this._needToDecompose && + ((this._needToDecompose = !1), + this._localScaling || ((this._localScaling = r.e.Zero()), (this._localRotation = r.b.Zero()), (this._localPosition = r.e.Zero())), + this._localMatrix.decompose(this._localScaling, this._localRotation, this._localPosition)); + }), + (t.prototype._compose = function () { + this._needToCompose && (this._localScaling ? ((this._needToCompose = !1), r.a.ComposeToRef(this._localScaling, this._localRotation, this._localPosition, this._localMatrix)) : (this._needToCompose = !1)); + }), + (t.prototype.updateMatrix = function (e, t, n) { + void 0 === t && (t = !0), void 0 === n && (n = !0), this._baseMatrix.copyFrom(e), t && this._updateDifferenceMatrix(), n ? (this._localMatrix.copyFrom(e), this._markAsDirtyAndDecompose()) : this.markAsDirty(); + }), + (t.prototype._updateDifferenceMatrix = function (e, t) { + if ( + (void 0 === t && (t = !0), + e || (e = this._baseMatrix), + this._parent ? e.multiplyToRef(this._parent._absoluteTransform, this._absoluteTransform) : this._absoluteTransform.copyFrom(e), + this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform), + t) + ) + for (var n = 0; n < this.children.length; n++) this.children[n]._updateDifferenceMatrix(); + this._scalingDeterminant = this._absoluteTransform.determinant() < 0 ? -1 : 1; + }), + (t.prototype.markAsDirty = function () { + this._currentRenderId++, this._childUpdateId++, this._skeleton._markAsDirty(); + }), + (t.prototype._markAsDirtyAndCompose = function () { + this.markAsDirty(), (this._needToCompose = !0); + }), + (t.prototype._markAsDirtyAndDecompose = function () { + this.markAsDirty(), (this._needToDecompose = !0); + }), + (t.prototype.translate = function (e, n, i) { + void 0 === n && (n = s.b.LOCAL); + var o = this.getLocalMatrix(); + if (n == s.b.LOCAL) o.addAtIndex(12, e.x), o.addAtIndex(13, e.y), o.addAtIndex(14, e.z); + else { + var a = null; + i && (a = i.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var c = t._tmpMats[0], + l = t._tmpVecs[0]; + this._parent && (i && a ? (c.copyFrom(this._parent.getAbsoluteTransform()), c.multiplyToRef(a, c)) : c.copyFrom(this._parent.getAbsoluteTransform())), + c.setTranslationFromFloats(0, 0, 0), + c.invert(), + r.e.TransformCoordinatesToRef(e, c, l), + o.addAtIndex(12, l.x), + o.addAtIndex(13, l.y), + o.addAtIndex(14, l.z); + } + this._markAsDirtyAndDecompose(); + }), + (t.prototype.setPosition = function (e, n, i) { + void 0 === n && (n = s.b.LOCAL); + var o = this.getLocalMatrix(); + if (n == s.b.LOCAL) o.setTranslationFromFloats(e.x, e.y, e.z); + else { + var a = null; + i && (a = i.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var c = t._tmpMats[0], + l = t._tmpVecs[0]; + this._parent && (i && a ? (c.copyFrom(this._parent.getAbsoluteTransform()), c.multiplyToRef(a, c)) : c.copyFrom(this._parent.getAbsoluteTransform())), + c.invert(), + r.e.TransformCoordinatesToRef(e, c, l), + o.setTranslationFromFloats(l.x, l.y, l.z); + } + this._markAsDirtyAndDecompose(); + }), + (t.prototype.setAbsolutePosition = function (e, t) { + this.setPosition(e, s.b.WORLD, t); + }), + (t.prototype.scale = function (e, n, i, o) { + void 0 === o && (o = !1); + var a = this.getLocalMatrix(), + s = t._tmpMats[0]; + r.a.ScalingToRef(e, n, i, s), s.multiplyToRef(a, a), s.invert(); + for (var c = 0, l = this.children; c < l.length; c++) { + var u = (p = l[c]).getLocalMatrix(); + u.multiplyToRef(s, u), u.multiplyAtIndex(12, e), u.multiplyAtIndex(13, n), u.multiplyAtIndex(14, i), p._markAsDirtyAndDecompose(); + } + if ((this._markAsDirtyAndDecompose(), o)) + for (var h = 0, d = this.children; h < d.length; h++) { + var p; + (p = d[h]).scale(e, n, i, o); + } + }), + (t.prototype.setScale = function (e) { + this._decompose(), this._localScaling.copyFrom(e), this._markAsDirtyAndCompose(); + }), + (t.prototype.getScale = function () { + return this._decompose(), this._localScaling; + }), + (t.prototype.getScaleToRef = function (e) { + this._decompose(), e.copyFrom(this._localScaling); + }), + (t.prototype.setYawPitchRoll = function (e, n, i, o, a) { + if ((void 0 === o && (o = s.b.LOCAL), o === s.b.LOCAL)) { + var c = t._tmpQuat; + return r.b.RotationYawPitchRollToRef(e, n, i, c), void this.setRotationQuaternion(c, o, a); + } + var l = t._tmpMats[0]; + if (this._getNegativeRotationToRef(l, a)) { + var u = t._tmpMats[1]; + r.a.RotationYawPitchRollToRef(e, n, i, u), l.multiplyToRef(u, u), this._rotateWithMatrix(u, o, a); + } + }), + (t.prototype.rotate = function (e, n, i, o) { + void 0 === i && (i = s.b.LOCAL); + var a = t._tmpMats[0]; + a.setTranslationFromFloats(0, 0, 0), r.a.RotationAxisToRef(e, n, a), this._rotateWithMatrix(a, i, o); + }), + (t.prototype.setAxisAngle = function (e, n, i, o) { + if ((void 0 === i && (i = s.b.LOCAL), i === s.b.LOCAL)) { + var a = t._tmpQuat; + return r.b.RotationAxisToRef(e, n, a), void this.setRotationQuaternion(a, i, o); + } + var c = t._tmpMats[0]; + if (this._getNegativeRotationToRef(c, o)) { + var l = t._tmpMats[1]; + r.a.RotationAxisToRef(e, n, l), c.multiplyToRef(l, l), this._rotateWithMatrix(l, i, o); + } + }), + (t.prototype.setRotation = function (e, t, n) { + void 0 === t && (t = s.b.LOCAL), this.setYawPitchRoll(e.y, e.x, e.z, t, n); + }), + (t.prototype.setRotationQuaternion = function (e, n, i) { + if ((void 0 === n && (n = s.b.LOCAL), n === s.b.LOCAL)) return this._decompose(), this._localRotation.copyFrom(e), void this._markAsDirtyAndCompose(); + var o = t._tmpMats[0]; + if (this._getNegativeRotationToRef(o, i)) { + var a = t._tmpMats[1]; + r.a.FromQuaternionToRef(e, a), o.multiplyToRef(a, a), this._rotateWithMatrix(a, n, i); + } + }), + (t.prototype.setRotationMatrix = function (e, n, i) { + if ((void 0 === n && (n = s.b.LOCAL), n === s.b.LOCAL)) { + var o = t._tmpQuat; + return r.b.FromRotationMatrixToRef(e, o), void this.setRotationQuaternion(o, n, i); + } + var a = t._tmpMats[0]; + if (this._getNegativeRotationToRef(a, i)) { + var c = t._tmpMats[1]; + c.copyFrom(e), a.multiplyToRef(e, c), this._rotateWithMatrix(c, n, i); + } + }), + (t.prototype._rotateWithMatrix = function (e, n, i) { + void 0 === n && (n = s.b.LOCAL); + var r = this.getLocalMatrix(), + o = r.m[12], + a = r.m[13], + c = r.m[14], + l = this.getParent(), + u = t._tmpMats[3], + h = t._tmpMats[4]; + l && n == s.b.WORLD + ? (i ? (u.copyFrom(i.getWorldMatrix()), l.getAbsoluteTransform().multiplyToRef(u, u)) : u.copyFrom(l.getAbsoluteTransform()), + h.copyFrom(u), + h.invert(), + r.multiplyToRef(u, r), + r.multiplyToRef(e, r), + r.multiplyToRef(h, r)) + : n == s.b.WORLD && i + ? (u.copyFrom(i.getWorldMatrix()), h.copyFrom(u), h.invert(), r.multiplyToRef(u, r), r.multiplyToRef(e, r), r.multiplyToRef(h, r)) + : r.multiplyToRef(e, r), + r.setTranslationFromFloats(o, a, c), + this.computeAbsoluteTransforms(), + this._markAsDirtyAndDecompose(); + }), + (t.prototype._getNegativeRotationToRef = function (e, n) { + var i = t._tmpMats[2]; + return ( + e.copyFrom(this.getAbsoluteTransform()), + n && (e.multiplyToRef(n.getWorldMatrix(), e), r.a.ScalingToRef(n.scaling.x, n.scaling.y, n.scaling.z, i)), + e.invert(), + !isNaN(e.m[0]) && (i.multiplyAtIndex(0, this._scalingDeterminant), e.multiplyToRef(i, e), !0) + ); + }), + (t.prototype.getPosition = function (e, t) { + void 0 === e && (e = s.b.LOCAL), void 0 === t && (t = null); + var n = r.e.Zero(); + return this.getPositionToRef(e, t, n), n; + }), + (t.prototype.getPositionToRef = function (e, n, i) { + if ((void 0 === e && (e = s.b.LOCAL), e == s.b.LOCAL)) { + var r = this.getLocalMatrix(); + (i.x = r.m[12]), (i.y = r.m[13]), (i.z = r.m[14]); + } else { + var o = null; + n && (o = n.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var a = t._tmpMats[0]; + n && o ? (a.copyFrom(this.getAbsoluteTransform()), a.multiplyToRef(o, a)) : (a = this.getAbsoluteTransform()), (i.x = a.m[12]), (i.y = a.m[13]), (i.z = a.m[14]); + } + }), + (t.prototype.getAbsolutePosition = function (e) { + void 0 === e && (e = null); + var t = r.e.Zero(); + return this.getPositionToRef(s.b.WORLD, e, t), t; + }), + (t.prototype.getAbsolutePositionToRef = function (e, t) { + this.getPositionToRef(s.b.WORLD, e, t); + }), + (t.prototype.computeAbsoluteTransforms = function () { + if ((this._compose(), this._parent)) this._localMatrix.multiplyToRef(this._parent._absoluteTransform, this._absoluteTransform); + else { + this._absoluteTransform.copyFrom(this._localMatrix); + var e = this._skeleton.getPoseMatrix(); + e && this._absoluteTransform.multiplyToRef(e, this._absoluteTransform); + } + for (var t = this.children, n = t.length, i = 0; i < n; i++) t[i].computeAbsoluteTransforms(); + }), + (t.prototype.getDirection = function (e, t) { + void 0 === t && (t = null); + var n = r.e.Zero(); + return this.getDirectionToRef(e, t, n), n; + }), + (t.prototype.getDirectionToRef = function (e, n, i) { + void 0 === n && (n = null); + var o = null; + n && (o = n.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var a = t._tmpMats[0]; + a.copyFrom(this.getAbsoluteTransform()), n && o && a.multiplyToRef(o, a), r.e.TransformNormalToRef(e, a, i), i.normalize(); + }), + (t.prototype.getRotation = function (e, t) { + void 0 === e && (e = s.b.LOCAL), void 0 === t && (t = null); + var n = r.e.Zero(); + return this.getRotationToRef(e, t, n), n; + }), + (t.prototype.getRotationToRef = function (e, n, i) { + void 0 === e && (e = s.b.LOCAL), void 0 === n && (n = null); + var r = t._tmpQuat; + this.getRotationQuaternionToRef(e, n, r), r.toEulerAnglesToRef(i); + }), + (t.prototype.getRotationQuaternion = function (e, t) { + void 0 === e && (e = s.b.LOCAL), void 0 === t && (t = null); + var n = r.b.Identity(); + return this.getRotationQuaternionToRef(e, t, n), n; + }), + (t.prototype.getRotationQuaternionToRef = function (e, n, i) { + if ((void 0 === e && (e = s.b.LOCAL), void 0 === n && (n = null), e == s.b.LOCAL)) this._decompose(), i.copyFrom(this._localRotation); + else { + var r = t._tmpMats[0], + o = this.getAbsoluteTransform(); + n ? o.multiplyToRef(n.getWorldMatrix(), r) : r.copyFrom(o), + r.multiplyAtIndex(0, this._scalingDeterminant), + r.multiplyAtIndex(1, this._scalingDeterminant), + r.multiplyAtIndex(2, this._scalingDeterminant), + r.decompose(void 0, i, void 0); + } + }), + (t.prototype.getRotationMatrix = function (e, t) { + void 0 === e && (e = s.b.LOCAL); + var n = r.a.Identity(); + return this.getRotationMatrixToRef(e, t, n), n; + }), + (t.prototype.getRotationMatrixToRef = function (e, n, i) { + if ((void 0 === e && (e = s.b.LOCAL), e == s.b.LOCAL)) this.getLocalMatrix().getRotationMatrixToRef(i); + else { + var r = t._tmpMats[0], + o = this.getAbsoluteTransform(); + n ? o.multiplyToRef(n.getWorldMatrix(), r) : r.copyFrom(o), + r.multiplyAtIndex(0, this._scalingDeterminant), + r.multiplyAtIndex(1, this._scalingDeterminant), + r.multiplyAtIndex(2, this._scalingDeterminant), + r.getRotationMatrixToRef(i); + } + }), + (t.prototype.getAbsolutePositionFromLocal = function (e, t) { + void 0 === t && (t = null); + var n = r.e.Zero(); + return this.getAbsolutePositionFromLocalToRef(e, t, n), n; + }), + (t.prototype.getAbsolutePositionFromLocalToRef = function (e, n, i) { + void 0 === n && (n = null); + var o = null; + n && (o = n.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var a = t._tmpMats[0]; + n && o ? (a.copyFrom(this.getAbsoluteTransform()), a.multiplyToRef(o, a)) : (a = this.getAbsoluteTransform()), r.e.TransformCoordinatesToRef(e, a, i); + }), + (t.prototype.getLocalPositionFromAbsolute = function (e, t) { + void 0 === t && (t = null); + var n = r.e.Zero(); + return this.getLocalPositionFromAbsoluteToRef(e, t, n), n; + }), + (t.prototype.getLocalPositionFromAbsoluteToRef = function (e, n, i) { + void 0 === n && (n = null); + var o = null; + n && (o = n.getWorldMatrix()), this._skeleton.computeAbsoluteTransforms(); + var a = t._tmpMats[0]; + a.copyFrom(this.getAbsoluteTransform()), n && o && a.multiplyToRef(o, a), a.invert(), r.e.TransformCoordinatesToRef(e, a, i); + }), + (t._tmpVecs = o.a.BuildArray(2, r.e.Zero)), + (t._tmpQuat = r.b.Identity()), + (t._tmpMats = o.a.BuildArray(5, r.a.Identity)), + t + ); + })(a.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(9), + r = n(16); + (r.a.CreatePlane = function (e) { + var t = [], + n = [], + i = [], + o = [], + a = e.width || e.size || 1, + s = e.height || e.size || 1, + c = 0 === e.sideOrientation ? 0 : e.sideOrientation || r.a.DEFAULTSIDE, + l = a / 2, + u = s / 2; + n.push(-l, -u, 0), + i.push(0, 0, -1), + o.push(0, 0), + n.push(l, -u, 0), + i.push(0, 0, -1), + o.push(1, 0), + n.push(l, u, 0), + i.push(0, 0, -1), + o.push(1, 1), + n.push(-l, u, 0), + i.push(0, 0, -1), + o.push(0, 1), + t.push(0), + t.push(1), + t.push(2), + t.push(0), + t.push(2), + t.push(3), + r.a._ComputeSides(c, n, t, i, o, e.frontUVs, e.backUVs); + var h = new r.a(); + return (h.indices = t), (h.positions = n), (h.normals = i), (h.uvs = o), h; + }), + (i.a.CreatePlane = function (e, t, n, i, r) { + var a = { size: t, width: t, height: t, sideOrientation: r, updatable: i }; + return o.CreatePlane(e, a, n); + }); + var o = (function () { + function e() {} + return ( + (e.CreatePlane = function (e, t, n) { + void 0 === n && (n = null); + var o = new i.a(e, n); + return ( + (t.sideOrientation = i.a._GetDefaultSideOrientation(t.sideOrientation)), + (o._originalBuilderSideOrientation = t.sideOrientation), + r.a.CreatePlane(t).applyToMesh(o, t.updatable), + t.sourcePlane && (o.translate(t.sourcePlane.normal, -t.sourcePlane.d), o.setDirection(t.sourcePlane.normal.scale(-1))), + o + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.CreateCanvas = function (e, t) { + if ("undefined" == typeof document) return new OffscreenCanvas(e, t); + var n = document.createElement("canvas"); + return (n.width = e), (n.height = t), n; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }), + n.d(t, "b", function () { + return r; + }); + var i = (function () { + function e() {} + return (e.COPY = 1), (e.CUT = 2), (e.PASTE = 3), e; + })(), + r = (function () { + function e(e, t) { + (this.type = e), (this.event = t); + } + return ( + (e.GetTypeFromCharacter = function (e) { + switch (e) { + case 67: + return i.COPY; + case 86: + return i.PASTE; + case 88: + return i.CUT; + default: + return -1; + } + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "#ifdef DEPTHPREPASS\ngl_FragColor=vec4(0.,0.,0.,1.0);\nreturn;\n#endif"; + n(7).a.IncludesShadersStore.depthPrePass = i; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(35), + s = n(57), + c = n(121); + a.a.AddNodeConstructor("Light_Type_1", function (e, t) { + return function () { + return new l(e, o.e.Zero(), t); + }; + }); + var l = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return ( + (r._shadowFrustumSize = 0), + (r._shadowOrthoScale = 0.1), + (r.autoUpdateExtends = !0), + (r.autoCalcShadowZBounds = !1), + (r._orthoLeft = Number.MAX_VALUE), + (r._orthoRight = Number.MIN_VALUE), + (r._orthoTop = Number.MIN_VALUE), + (r._orthoBottom = Number.MAX_VALUE), + (r.position = n.scale(-1)), + (r.direction = n), + r + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "shadowFrustumSize", { + get: function () { + return this._shadowFrustumSize; + }, + set: function (e) { + (this._shadowFrustumSize = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowOrthoScale", { + get: function () { + return this._shadowOrthoScale; + }, + set: function (e) { + (this._shadowOrthoScale = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "DirectionalLight"; + }), + (t.prototype.getTypeID = function () { + return s.a.LIGHTTYPEID_DIRECTIONALLIGHT; + }), + (t.prototype._setDefaultShadowProjectionMatrix = function (e, t, n) { + this.shadowFrustumSize > 0 ? this._setDefaultFixedFrustumShadowProjectionMatrix(e) : this._setDefaultAutoExtendShadowProjectionMatrix(e, t, n); + }), + (t.prototype._setDefaultFixedFrustumShadowProjectionMatrix = function (e) { + var t = this.getScene().activeCamera; + t && o.a.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize, void 0 !== this.shadowMinZ ? this.shadowMinZ : t.minZ, void 0 !== this.shadowMaxZ ? this.shadowMaxZ : t.maxZ, e); + }), + (t.prototype._setDefaultAutoExtendShadowProjectionMatrix = function (e, t, n) { + var i = this.getScene().activeCamera; + if (i) { + if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) { + var r = o.e.Zero(); + (this._orthoLeft = Number.MAX_VALUE), (this._orthoRight = Number.MIN_VALUE), (this._orthoTop = Number.MIN_VALUE), (this._orthoBottom = Number.MAX_VALUE); + for (var a = Number.MAX_VALUE, s = Number.MIN_VALUE, c = 0; c < n.length; c++) { + var l = n[c]; + if (l) + for (var u = l.getBoundingInfo().boundingBox, h = 0; h < u.vectorsWorld.length; h++) + o.e.TransformCoordinatesToRef(u.vectorsWorld[h], t, r), + r.x < this._orthoLeft && (this._orthoLeft = r.x), + r.y < this._orthoBottom && (this._orthoBottom = r.y), + r.x > this._orthoRight && (this._orthoRight = r.x), + r.y > this._orthoTop && (this._orthoTop = r.y), + this.autoCalcShadowZBounds && (r.z < a && (a = r.z), r.z > s && (s = r.z)); + } + this.autoCalcShadowZBounds && ((this._shadowMinZ = a), (this._shadowMaxZ = s)); + } + var d = this._orthoRight - this._orthoLeft, + p = this._orthoTop - this._orthoBottom; + o.a.OrthoOffCenterLHToRef( + this._orthoLeft - d * this.shadowOrthoScale, + this._orthoRight + d * this.shadowOrthoScale, + this._orthoBottom - p * this.shadowOrthoScale, + this._orthoTop + p * this.shadowOrthoScale, + void 0 !== this.shadowMinZ ? this.shadowMinZ : i.minZ, + void 0 !== this.shadowMaxZ ? this.shadowMaxZ : i.maxZ, + e + ); + } + }), + (t.prototype._buildUniformLayout = function () { + this._uniformBuffer.addUniform("vLightData", 4), + this._uniformBuffer.addUniform("vLightDiffuse", 4), + this._uniformBuffer.addUniform("vLightSpecular", 4), + this._uniformBuffer.addUniform("shadowsInfo", 3), + this._uniformBuffer.addUniform("depthValues", 2), + this._uniformBuffer.create(); + }), + (t.prototype.transferToEffect = function (e, t) { + return this.computeTransformedInformation() + ? (this._uniformBuffer.updateFloat4("vLightData", this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z, 1, t), this) + : (this._uniformBuffer.updateFloat4("vLightData", this.direction.x, this.direction.y, this.direction.z, 1, t), this); + }), + (t.prototype.transferToNodeMaterialEffect = function (e, t) { + return this.computeTransformedInformation() + ? (e.setFloat3(t, this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z), this) + : (e.setFloat3(t, this.direction.x, this.direction.y, this.direction.z), this); + }), + (t.prototype.getDepthMinZ = function (e) { + return 1; + }), + (t.prototype.getDepthMaxZ = function (e) { + return 1; + }), + (t.prototype.prepareLightSpecificDefines = function (e, t) { + e["DIRLIGHT" + t] = !0; + }), + Object(i.c)([Object(r.c)()], t.prototype, "shadowFrustumSize", null), + Object(i.c)([Object(r.c)()], t.prototype, "shadowOrthoScale", null), + Object(i.c)([Object(r.c)()], t.prototype, "autoUpdateExtends", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "autoCalcShadowZBounds", void 0), + t + ); + })(c.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return h; + }), + n.d(t, "a", function () { + return d; + }); + var i = n(2), + r = n(5), + o = n(4), + a = n(9), + s = n(149), + c = n(28), + l = n(106), + u = n(11), + h = + (n(226), + n(227), + (function (e) { + function t(t, n, i, a, s, c, u) { + void 0 === n && (n = null), void 0 === i && (i = null), void 0 === a && (a = null); + var h = e.call(this, t, n, i, a, s) || this; + (h.useVertexColor = c), + (h.useVertexAlpha = u), + (h.color = new r.a(1, 1, 1)), + (h.alpha = 1), + a && ((h.color = a.color.clone()), (h.alpha = a.alpha), (h.useVertexColor = a.useVertexColor), (h.useVertexAlpha = a.useVertexAlpha)), + (h.intersectionThreshold = 0.1); + var d = { + attributes: [o.b.PositionKind, "world0", "world1", "world2", "world3"], + uniforms: ["vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6", "world", "viewProjection"], + needAlphaBlending: !0, + defines: [], + }; + return ( + !1 === u && (d.needAlphaBlending = !1), + c ? (d.defines.push("#define VERTEXCOLOR"), d.attributes.push(o.b.ColorKind)) : (d.uniforms.push("color"), (h.color4 = new r.b())), + (h._colorShader = new l.a("colorShader", h.getScene(), "color", d)), + h + ); + } + return ( + Object(i.d)(t, e), + (t.prototype._addClipPlaneDefine = function (e) { + var t = "#define " + e; + -1 === this._colorShader.options.defines.indexOf(t) && this._colorShader.options.defines.push(t); + }), + (t.prototype._removeClipPlaneDefine = function (e) { + var t = "#define " + e, + n = this._colorShader.options.defines.indexOf(t); + -1 !== n && this._colorShader.options.defines.splice(n, 1); + }), + (t.prototype.isReady = function () { + var t = this.getScene(); + return ( + t.clipPlane ? this._addClipPlaneDefine("CLIPPLANE") : this._removeClipPlaneDefine("CLIPPLANE"), + t.clipPlane2 ? this._addClipPlaneDefine("CLIPPLANE2") : this._removeClipPlaneDefine("CLIPPLANE2"), + t.clipPlane3 ? this._addClipPlaneDefine("CLIPPLANE3") : this._removeClipPlaneDefine("CLIPPLANE3"), + t.clipPlane4 ? this._addClipPlaneDefine("CLIPPLANE4") : this._removeClipPlaneDefine("CLIPPLANE4"), + t.clipPlane5 ? this._addClipPlaneDefine("CLIPPLANE5") : this._removeClipPlaneDefine("CLIPPLANE5"), + t.clipPlane6 ? this._addClipPlaneDefine("CLIPPLANE6") : this._removeClipPlaneDefine("CLIPPLANE6"), + !!this._colorShader.isReady() && e.prototype.isReady.call(this) + ); + }), + (t.prototype.getClassName = function () { + return "LinesMesh"; + }), + Object.defineProperty(t.prototype, "material", { + get: function () { + return this._colorShader; + }, + set: function (e) {}, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "checkCollisions", { + get: function () { + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._bind = function (e, t, n) { + if (!this._geometry) return this; + var i = this._colorShader.getEffect(), + r = this.isUnIndexed ? null : this._geometry.getIndexBuffer(); + if ((this._geometry._bind(i, r), !this.useVertexColor)) { + var o = this.color, + a = o.r, + s = o.g, + c = o.b; + this.color4.set(a, s, c, this.alpha), this._colorShader.setColor4("color", this.color4); + } + return u.a.BindClipPlane(i, this.getScene()), this; + }), + (t.prototype._draw = function (e, t, n) { + if (!this._geometry || !this._geometry.getVertexBuffers() || (!this._unIndexed && !this._geometry.getIndexBuffer())) return this; + var i = this.getScene().getEngine(); + return this._unIndexed ? i.drawArraysType(c.a.LineListDrawMode, e.verticesStart, e.verticesCount, n) : i.drawElementsType(c.a.LineListDrawMode, e.indexStart, e.indexCount, n), this; + }), + (t.prototype.dispose = function (t) { + this._colorShader.dispose(!1, !1, !0), e.prototype.dispose.call(this, t); + }), + (t.prototype.clone = function (e, n, i) { + return void 0 === n && (n = null), new t(e, this.getScene(), n, this, i); + }), + (t.prototype.createInstance = function (e) { + return new d(e, this); + }), + t + ); + })(a.a)), + d = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i.intersectionThreshold = n.intersectionThreshold), i; + } + return ( + Object(i.d)(t, e), + (t.prototype.getClassName = function () { + return "InstancedLinesMesh"; + }), + t + ); + })(s.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return f; + }); + var i = n(12), + r = n(1), + o = n(15), + a = n(108), + s = n(32), + c = n(68), + l = n(18), + u = n(24), + h = n(10), + d = (n(209), n(213), n(7)), + p = (n(59), "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include\nvoid main(void)\n{\ngl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);\n}"); + d.a.ShadersStore.rgbdEncodePixelShader = p; + n(229); + var f = (function () { + function e() {} + return ( + (e.GetEnvInfo = function (t) { + for (var n = new DataView(t.buffer, t.byteOffset, t.byteLength), i = 0, r = 0; r < e._MagicBytes.length; r++) if (n.getUint8(i++) !== e._MagicBytes[r]) return h.a.Error("Not a babylon environment map"), null; + for (var o = "", a = 0; (a = n.getUint8(i++)); ) o += String.fromCharCode(a); + var s = JSON.parse(o); + return s.specular && ((s.specular.specularDataPosition = i), (s.specular.lodGenerationScale = s.specular.lodGenerationScale || 0.8)), s; + }), + (e.CreateEnvTextureAsync = function (t) { + var n = this, + r = t.getInternalTexture(); + if (!r) return Promise.reject("The cube texture is invalid."); + if (!t._prefiltered) return Promise.reject("The cube texture is invalid (not prefiltered)."); + var a = r.getEngine(); + if (a && a.premultipliedAlpha) return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option set to false."); + if (0 === t.textureType) return Promise.reject("The cube texture should allow HDR (Full Float or Half Float)."); + var s = a.getRenderingCanvas(); + if (!s) return Promise.reject("Env texture can only be created when the engine is associated to a canvas."); + var c = 1; + if (!a.getCaps().textureFloatRender && ((c = 2), !a.getCaps().textureHalfFloatRender)) return Promise.reject("Env texture can only be created when the browser supports half float or full float rendering."); + var h = r.width, + d = new l.a(a), + p = {}, + f = [], + m = o.a.Log2(r.width); + m = Math.round(m); + for ( + var g = function (e) { + for ( + var n = Math.pow(2, m - e), + r = function (r) { + var o = t.readPixels(r, e), + l = a.createRawTexture(o, n, n, 5, !1, !1, 1, null, c), + h = new Promise(function (t, o) { + var c = new u.a("rgbdEncode", "rgbdEncode", null, null, 1, null, 1, a, !1, void 0, 0, void 0, null, !1); + c.getEffect().executeWhenCompiled(function () { + c.onApply = function (e) { + e._bindTexture("textureSampler", l); + }; + var o = a.getRenderWidth(), + u = a.getRenderHeight(); + a.setSize(n, n), + d.postProcessManager.directRender([c], null), + i.b.ToBlob(s, function (n) { + var i = new FileReader(); + (i.onload = function (n) { + var i = n.target.result; + (p[6 * e + r] = i), t(); + }), + i.readAsArrayBuffer(n); + }), + a.setSize(o, u); + }); + }); + f.push(h); + }, + o = 0; + o < 6; + o++ + ) + r(o); + }, + b = 0; + b <= m; + b++ + ) + g(b); + return Promise.all(f).then(function () { + d.dispose(); + for (var i = { version: 1, width: h, irradiance: n._CreateEnvTextureIrradiance(t), specular: { mipmaps: [], lodGenerationScale: t.lodGenerationScale } }, r = 0, o = 0; o <= m; o++) + for (var a = 0; a < 6; a++) { + var s = p[6 * o + a].byteLength; + i.specular.mipmaps.push({ length: s, position: r }), (r += s); + } + for (var c = JSON.stringify(i), l = new ArrayBuffer(c.length + 1), u = new Uint8Array(l), f = ((o = 0), c.length); o < f; o++) u[o] = c.charCodeAt(o); + u[c.length] = 0; + var g = e._MagicBytes.length + r + l.byteLength, + b = new ArrayBuffer(g), + _ = new Uint8Array(b), + v = new DataView(b), + y = 0; + for (o = 0; o < e._MagicBytes.length; o++) v.setUint8(y++, e._MagicBytes[o]); + _.set(new Uint8Array(l), y), (y += l.byteLength); + for (o = 0; o <= m; o++) + for (a = 0; a < 6; a++) { + var C = p[6 * o + a]; + _.set(new Uint8Array(C), y), (y += C.byteLength); + } + return b; + }); + }), + (e._CreateEnvTextureIrradiance = function (e) { + var t = e.sphericalPolynomial; + return null == t + ? null + : { + x: [t.x.x, t.x.y, t.x.z], + y: [t.y.x, t.y.y, t.y.z], + z: [t.z.x, t.z.y, t.z.z], + xx: [t.xx.x, t.xx.y, t.xx.z], + yy: [t.yy.x, t.yy.y, t.yy.z], + zz: [t.zz.x, t.zz.y, t.zz.z], + yz: [t.yz.x, t.yz.y, t.yz.z], + zx: [t.zx.x, t.zx.y, t.zx.z], + xy: [t.xy.x, t.xy.y, t.xy.z], + }; + }), + (e.CreateImageDataArrayBufferViews = function (e, t) { + if (1 !== t.version) throw new Error('Unsupported babylon environment map version "' + t.version + '"'); + var n = t.specular, + i = o.a.Log2(t.width); + if (((i = Math.round(i) + 1), n.mipmaps.length !== 6 * i)) throw new Error('Unsupported specular mipmaps number "' + n.mipmaps.length + '"'); + for (var r = new Array(i), a = 0; a < i; a++) { + r[a] = new Array(6); + for (var s = 0; s < 6; s++) { + var c = n.mipmaps[6 * a + s]; + r[a][s] = new Uint8Array(e.buffer, e.byteOffset + n.specularDataPosition + c.position, c.length); + } + } + return r; + }), + (e.UploadEnvLevelsAsync = function (t, n, i) { + if (1 !== i.version) throw new Error('Unsupported babylon environment map version "' + i.version + '"'); + var r = i.specular; + if (!r) return Promise.resolve(); + t._lodGenerationScale = r.lodGenerationScale; + var o = e.CreateImageDataArrayBufferViews(n, i); + return e.UploadLevelsAsync(t, o); + }), + (e._OnImageReadyAsync = function (e, t, n, i, r, o, a, s, c, l, u) { + return new Promise(function (h, d) { + if (n) { + var p = t.createTexture( + null, + !0, + !0, + null, + 1, + null, + function (e) { + d(e); + }, + e + ); + i.getEffect().executeWhenCompiled(function () { + (i.onApply = function (e) { + e._bindTexture("textureSampler", p), e.setFloat2("scale", 1, 1); + }), + t.scenes[0].postProcessManager.directRender([i], l, !0, o, a), + t.restoreDefaultFramebuffer(), + p.dispose(), + URL.revokeObjectURL(r), + h(); + }); + } else { + if ((t._uploadImageToTexture(u, e, o, a), s)) { + var f = c[a]; + f && t._uploadImageToTexture(f._texture, e, o, 0); + } + h(); + } + }); + }), + (e.UploadLevelsAsync = function (e, t) { + var n = this; + if (!i.b.IsExponentOfTwo(e.width)) throw new Error("Texture size must be a power of two"); + var r = Math.round(o.a.Log2(e.width)) + 1, + a = e.getEngine(), + l = !1, + h = !1, + d = null, + p = null, + f = null, + m = a.getCaps(); + if ( + ((e.format = 5), + (e.type = 0), + (e.generateMipMaps = !0), + (e._cachedAnisotropicFilteringLevel = null), + a.updateTextureSamplingMode(3, e), + m.textureLOD + ? a.webGLVersion < 2 + ? (l = !1) + : m.textureHalfFloatRender && m.textureHalfFloatLinearFiltering + ? ((l = !0), (e.type = 2)) + : m.textureFloatRender && m.textureFloatLinearFiltering && ((l = !0), (e.type = 1)) + : ((l = !1), (h = !0), (f = {})), + l) + ) + (d = new u.a("rgbdDecode", "rgbdDecode", null, null, 1, null, 3, a, !1, void 0, e.type, void 0, null, !1)), + (e._isRGBD = !1), + (e.invertY = !1), + (p = a.createRenderTargetCubeTexture(e.width, { generateDepthBuffer: !1, generateMipMaps: !0, generateStencilBuffer: !1, samplingMode: 3, type: e.type, format: 5 })); + else if (((e._isRGBD = !0), (e.invertY = !0), h)) + for (var g = e._lodGenerationScale, b = e._lodGenerationOffset, _ = 0; _ < 3; _++) { + var v = (r - 1) * g + b, + y = b + (v - b) * (1 - _ / 2), + C = Math.round(Math.min(Math.max(y, 0), v)), + P = new s.a(a, s.b.Temp); + (P.isCube = !0), (P.invertY = !0), (P.generateMipMaps = !1), a.updateTextureSamplingMode(2, P); + var x = new c.a(null); + switch (((x.isCube = !0), (x._texture = P), (f[C] = x), _)) { + case 0: + e._lodTextureLow = x; + break; + case 1: + e._lodTextureMid = x; + break; + case 2: + e._lodTextureHigh = x; + } + } + var T = [], + S = function (i) { + for ( + var r = function (r) { + var o = t[i][r], + s = new Blob([o], { type: "image/png" }), + c = URL.createObjectURL(s), + u = void 0; + if ("undefined" == typeof Image) + u = createImageBitmap(s).then(function (t) { + return n._OnImageReadyAsync(t, a, l, d, c, r, i, h, f, p, e); + }); + else { + var m = new Image(); + (m.src = c), + (u = new Promise(function (t, o) { + (m.onload = function () { + n._OnImageReadyAsync(m, a, l, d, c, r, i, h, f, p, e) + .then(function () { + return t(); + }) + .catch(function (e) { + o(e); + }); + }), + (m.onerror = function (e) { + o(e); + }); + })); + } + T.push(u); + }, + o = 0; + o < 6; + o++ + ) + r(o); + }; + for (_ = 0; _ < t.length; _++) S(_); + if (t.length < r) { + var O = void 0, + E = Math.pow(2, r - 1 - t.length), + M = E * E * 4; + switch (e.type) { + case 0: + O = new Uint8Array(M); + break; + case 2: + O = new Uint16Array(M); + break; + case 1: + O = new Float32Array(M); + } + for (_ = t.length; _ < r; _++) for (var A = 0; A < 6; A++) a._uploadArrayBufferViewToTexture(e, O, A, _); + } + return Promise.all(T).then(function () { + p && (a._releaseFramebufferObjects(p), a._releaseTexture(e), p._swapAndDie(e)), + d && d.dispose(), + h && + (e._lodTextureHigh && e._lodTextureHigh._texture && (e._lodTextureHigh._texture.isReady = !0), + e._lodTextureMid && e._lodTextureMid._texture && (e._lodTextureMid._texture.isReady = !0), + e._lodTextureLow && e._lodTextureLow._texture && (e._lodTextureLow._texture.isReady = !0)); + }); + }), + (e.UploadEnvSpherical = function (e, t) { + 1 !== t.version && h.a.Warn('Unsupported babylon environment map version "' + t.version + '"'); + var n = t.irradiance; + if (n) { + var i = new a.b(); + r.e.FromArrayToRef(n.x, 0, i.x), + r.e.FromArrayToRef(n.y, 0, i.y), + r.e.FromArrayToRef(n.z, 0, i.z), + r.e.FromArrayToRef(n.xx, 0, i.xx), + r.e.FromArrayToRef(n.yy, 0, i.yy), + r.e.FromArrayToRef(n.zz, 0, i.zz), + r.e.FromArrayToRef(n.yz, 0, i.yz), + r.e.FromArrayToRef(n.zx, 0, i.zx), + r.e.FromArrayToRef(n.xy, 0, i.xy), + (e._sphericalPolynomial = i); + } + }), + (e._UpdateRGBDAsync = function (t, n, i, r, o) { + return ( + (t._source = s.b.CubeRawRGBD), + (t._bufferViewArrayArray = n), + (t._lodGenerationScale = r), + (t._lodGenerationOffset = o), + (t._sphericalPolynomial = i), + e.UploadLevelsAsync(t, n).then(function () { + t.isReady = !0; + }) + ); + }), + (e._MagicBytes = [134, 22, 135, 150, 246, 214, 150, 54]), + e + ); + })(); + s.a._UpdateRGBDAsync = f._UpdateRGBDAsync; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return (e.FilesToLoad = {}), e; + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "c", function () { + return c; + }), + n.d(t, "b", function () { + return l; + }), + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(54), + o = n(9), + a = n(10), + s = n(25), + c = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return Object(i.d)(t, e), t; + })(r.a), + l = function () { + (this.rootNodes = []), (this.skeletons = []), (this.animationGroups = []); + }, + u = (function (e) { + function t(t) { + var n = e.call(this) || this; + return ( + (n._wasAddedToScene = !1), + (n.scene = t), + (n.sounds = []), + (n.effectLayers = []), + (n.layers = []), + (n.lensFlareSystems = []), + (n.proceduralTextures = []), + (n.reflectionProbes = []), + t.onDisposeObservable.add(function () { + n._wasAddedToScene || n.dispose(); + }), + n + ); + } + return ( + Object(i.d)(t, e), + (t.prototype.instantiateModelsToScene = function (e, t) { + var n = this; + void 0 === t && (t = !1); + var i = {}, + r = {}, + a = new l(), + s = [], + c = [], + u = { doNotInstantiate: !0 }, + h = function (t, n) { + if (((i[t.uniqueId] = n.uniqueId), (r[n.uniqueId] = n), e && (n.name = e(t.name)), n instanceof o.a)) { + var a = n; + if (a.morphTargetManager) { + var s = t.morphTargetManager; + a.morphTargetManager = s.clone(); + for (var c = 0; c < s.numTargets; c++) { + var l = s.getTarget(c), + u = a.morphTargetManager.getTarget(c); + (i[l.uniqueId] = u.uniqueId), (r[u.uniqueId] = u); + } + } + } + }; + return ( + this.transformNodes.forEach(function (e) { + if (!e.parent) { + var t = e.instantiateHierarchy(null, u, function (e, t) { + h(e, t); + }); + t && a.rootNodes.push(t); + } + }), + this.meshes.forEach(function (o) { + if (!o.parent) { + var s = o.instantiateHierarchy(null, u, function (o, a) { + if ((h(o, a), a.material)) { + var s = a; + if (s.material) + if (t) { + var l = o.material; + if (-1 === c.indexOf(l)) { + var u = l.clone(e ? e(l.name) : "Clone of " + l.name); + if ((c.push(l), (i[l.uniqueId] = u.uniqueId), (r[u.uniqueId] = u), "MultiMaterial" === l.getClassName())) + for (var d = 0, p = l.subMaterials; d < p.length; d++) { + var f = p[d]; + f && ((u = f.clone(e ? e(f.name) : "Clone of " + f.name)), c.push(f), (i[f.uniqueId] = u.uniqueId), (r[u.uniqueId] = u)); + } + } + s.material = r[i[l.uniqueId]]; + } else + "MultiMaterial" === s.material.getClassName() + ? -1 === n.scene.multiMaterials.indexOf(s.material) && n.scene.addMultiMaterial(s.material) + : -1 === n.scene.materials.indexOf(s.material) && n.scene.addMaterial(s.material); + } + }); + s && a.rootNodes.push(s); + } + }), + this.skeletons.forEach(function (t) { + var o = t.clone(e ? e(t.name) : "Clone of " + t.name); + t.overrideMesh && (o.overrideMesh = r[i[t.overrideMesh.uniqueId]]); + for (var c = 0, l = n.meshes; c < l.length; c++) { + var u = l[c]; + if (u.skeleton === t && !u.isAnInstance) { + if (((r[i[u.uniqueId]].skeleton = o), -1 !== s.indexOf(o))) continue; + s.push(o); + for (var h = 0, d = o.bones; h < d.length; h++) { + var p = d[h]; + p._linkedTransformNode && (p._linkedTransformNode = r[i[p._linkedTransformNode.uniqueId]]); + } + } + } + a.skeletons.push(o); + }), + this.animationGroups.forEach(function (e) { + var t = e.clone(e.name, function (e) { + return r[i[e.uniqueId]] || e; + }); + a.animationGroups.push(t); + }), + a + ); + }), + (t.prototype.addAllToScene = function () { + var e = this; + (this._wasAddedToScene = !0), + this.cameras.forEach(function (t) { + e.scene.addCamera(t); + }), + this.lights.forEach(function (t) { + e.scene.addLight(t); + }), + this.meshes.forEach(function (t) { + e.scene.addMesh(t); + }), + this.skeletons.forEach(function (t) { + e.scene.addSkeleton(t); + }), + this.animations.forEach(function (t) { + e.scene.addAnimation(t); + }), + this.animationGroups.forEach(function (t) { + e.scene.addAnimationGroup(t); + }), + this.multiMaterials.forEach(function (t) { + e.scene.addMultiMaterial(t); + }), + this.materials.forEach(function (t) { + e.scene.addMaterial(t); + }), + this.morphTargetManagers.forEach(function (t) { + e.scene.addMorphTargetManager(t); + }), + this.geometries.forEach(function (t) { + e.scene.addGeometry(t); + }), + this.transformNodes.forEach(function (t) { + e.scene.addTransformNode(t); + }), + this.actionManagers.forEach(function (t) { + e.scene.addActionManager(t); + }), + this.textures.forEach(function (t) { + e.scene.addTexture(t); + }), + this.reflectionProbes.forEach(function (t) { + e.scene.addReflectionProbe(t); + }), + this.environmentTexture && (this.scene.environmentTexture = this.environmentTexture); + for (var t = 0, n = this.scene._serializableComponents; t < n.length; t++) { + n[t].addFromContainer(this); + } + }), + (t.prototype.removeAllFromScene = function () { + var e = this; + (this._wasAddedToScene = !1), + this.cameras.forEach(function (t) { + e.scene.removeCamera(t); + }), + this.lights.forEach(function (t) { + e.scene.removeLight(t); + }), + this.meshes.forEach(function (t) { + e.scene.removeMesh(t); + }), + this.skeletons.forEach(function (t) { + e.scene.removeSkeleton(t); + }), + this.animations.forEach(function (t) { + e.scene.removeAnimation(t); + }), + this.animationGroups.forEach(function (t) { + e.scene.removeAnimationGroup(t); + }), + this.multiMaterials.forEach(function (t) { + e.scene.removeMultiMaterial(t); + }), + this.materials.forEach(function (t) { + e.scene.removeMaterial(t); + }), + this.morphTargetManagers.forEach(function (t) { + e.scene.removeMorphTargetManager(t); + }), + this.geometries.forEach(function (t) { + e.scene.removeGeometry(t); + }), + this.transformNodes.forEach(function (t) { + e.scene.removeTransformNode(t); + }), + this.actionManagers.forEach(function (t) { + e.scene.removeActionManager(t); + }), + this.textures.forEach(function (t) { + e.scene.removeTexture(t); + }), + this.reflectionProbes.forEach(function (t) { + e.scene.removeReflectionProbe(t); + }), + this.environmentTexture === this.scene.environmentTexture && (this.scene.environmentTexture = null); + for (var t = 0, n = this.scene._serializableComponents; t < n.length; t++) { + n[t].removeFromContainer(this); + } + }), + (t.prototype.dispose = function () { + this.cameras.forEach(function (e) { + e.dispose(); + }), + (this.cameras = []), + this.lights.forEach(function (e) { + e.dispose(); + }), + (this.lights = []), + this.meshes.forEach(function (e) { + e.dispose(); + }), + (this.meshes = []), + this.skeletons.forEach(function (e) { + e.dispose(); + }), + (this.skeletons = []), + this.animationGroups.forEach(function (e) { + e.dispose(); + }), + (this.animationGroups = []), + this.multiMaterials.forEach(function (e) { + e.dispose(); + }), + (this.multiMaterials = []), + this.materials.forEach(function (e) { + e.dispose(); + }), + (this.materials = []), + this.geometries.forEach(function (e) { + e.dispose(); + }), + (this.geometries = []), + this.transformNodes.forEach(function (e) { + e.dispose(); + }), + (this.transformNodes = []), + this.actionManagers.forEach(function (e) { + e.dispose(); + }), + (this.actionManagers = []), + this.textures.forEach(function (e) { + e.dispose(); + }), + (this.textures = []), + this.reflectionProbes.forEach(function (e) { + e.dispose(); + }), + (this.reflectionProbes = []), + this.environmentTexture && (this.environmentTexture.dispose(), (this.environmentTexture = null)); + for (var e = 0, t = this.scene._serializableComponents; e < t.length; e++) { + t[e].removeFromContainer(this, !0); + } + }), + (t.prototype._moveAssets = function (e, t, n) { + if (e) + for (var i = 0, r = e; i < r.length; i++) { + var o = r[i], + a = !0; + if (n) + for (var s = 0, c = n; s < c.length; s++) { + if (o === c[s]) { + a = !1; + break; + } + } + a && t.push(o); + } + }), + (t.prototype.moveAllFromScene = function (e) { + for (var t in ((this._wasAddedToScene = !1), void 0 === e && (e = new c()), this)) + this.hasOwnProperty(t) && ((this[t] = this[t] || ("environmentTexture" === t ? null : [])), this._moveAssets(this.scene[t], this[t], e[t])); + this.removeAllFromScene(); + }), + (t.prototype.createRootMesh = function () { + var e = new o.a("assetContainerRootMesh", this.scene); + return ( + this.meshes.forEach(function (t) { + t.parent || e.addChild(t); + }), + this.meshes.unshift(e), + e + ); + }), + (t.prototype.mergeAnimationsTo = function (e, t, n) { + if ((void 0 === e && (e = s.a.LastCreatedScene), void 0 === n && (n = null), e)) { + var i = + n || + function (t) { + return e.getBoneByName(t.name) || e.getNodeByName(t.name); + }; + this.getNodes().forEach(function (e) { + var t = i(e); + if (null !== t) { + for ( + var n = function (e) { + for ( + var n = 0, + i = t.animations.filter(function (t) { + return t.targetProperty === e.targetProperty; + }); + n < i.length; + n++ + ) { + var r = i[n], + o = t.animations.indexOf(r, 0); + o > -1 && t.animations.splice(o, 1); + } + }, + r = 0, + o = e.animations; + r < o.length; + r++ + ) { + n(o[r]); + } + t.animations = t.animations.concat(e.animations); + } + }), + this.animationGroups.slice().forEach(function (e) { + e.clone(e.name, i), + e.animatables.forEach(function (e) { + e.stop(); + }); + }), + t.forEach(function (t) { + var n = i(t.target); + n && + (e.beginAnimation(n, t.fromFrame, t.toFrame, t.loopAnimation, t.speedRatio, t.onAnimationEnd ? t.onAnimationEnd : void 0, void 0, !0, void 0, t.onAnimationLoop ? t.onAnimationLoop : void 0), + e.stopAnimation(t.target)); + }); + } else a.a.Error("No scene available to merge animations to"); + }), + t + ); + })(r.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(42), + o = n(194), + a = n(195), + s = n(196), + c = (function (e) { + function t(t) { + var n = e.call(this, t) || this; + return (n._mouseInput = null), n; + } + return ( + Object(i.d)(t, e), + (t.prototype.addKeyboard = function () { + return this.add(new o.a()), this; + }), + (t.prototype.addMouse = function (e) { + return void 0 === e && (e = !0), this._mouseInput || ((this._mouseInput = new a.a(e)), this.add(this._mouseInput)), this; + }), + (t.prototype.removeMouse = function () { + return this._mouseInput && this.remove(this._mouseInput), this; + }), + (t.prototype.addTouch = function () { + return this.add(new s.a()), this; + }), + (t.prototype.clear = function () { + e.prototype.clear.call(this), (this._mouseInput = null); + }), + t + ); + })(r.b); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(57), + s = n(23), + c = (function (e) { + function t() { + var t = (null !== e && e.apply(this, arguments)) || this; + return (t._needProjectionMatrixCompute = !0), t; + } + return ( + Object(i.d)(t, e), + (t.prototype._setPosition = function (e) { + this._position = e; + }), + Object.defineProperty(t.prototype, "position", { + get: function () { + return this._position; + }, + set: function (e) { + this._setPosition(e); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._setDirection = function (e) { + this._direction = e; + }), + Object.defineProperty(t.prototype, "direction", { + get: function () { + return this._direction; + }, + set: function (e) { + this._setDirection(e); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowMinZ", { + get: function () { + return this._shadowMinZ; + }, + set: function (e) { + (this._shadowMinZ = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowMaxZ", { + get: function () { + return this._shadowMaxZ; + }, + set: function (e) { + (this._shadowMaxZ = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.computeTransformedInformation = function () { + return ( + !(!this.parent || !this.parent.getWorldMatrix) && + (this.transformedPosition || (this.transformedPosition = o.e.Zero()), + o.e.TransformCoordinatesToRef(this.position, this.parent.getWorldMatrix(), this.transformedPosition), + this.direction && (this.transformedDirection || (this.transformedDirection = o.e.Zero()), o.e.TransformNormalToRef(this.direction, this.parent.getWorldMatrix(), this.transformedDirection)), + !0) + ); + }), + (t.prototype.getDepthScale = function () { + return 50; + }), + (t.prototype.getShadowDirection = function (e) { + return this.transformedDirection ? this.transformedDirection : this.direction; + }), + (t.prototype.getAbsolutePosition = function () { + return this.transformedPosition ? this.transformedPosition : this.position; + }), + (t.prototype.setDirectionToTarget = function (e) { + return (this.direction = o.e.Normalize(e.subtract(this.position))), this.direction; + }), + (t.prototype.getRotation = function () { + this.direction.normalize(); + var e = o.e.Cross(this.direction, s.a.Y), + t = o.e.Cross(e, this.direction); + return o.e.RotationFromAxis(e, t, this.direction); + }), + (t.prototype.needCube = function () { + return !1; + }), + (t.prototype.needProjectionMatrixCompute = function () { + return this._needProjectionMatrixCompute; + }), + (t.prototype.forceProjectionMatrixCompute = function () { + this._needProjectionMatrixCompute = !0; + }), + (t.prototype._initCache = function () { + e.prototype._initCache.call(this), (this._cache.position = o.e.Zero()); + }), + (t.prototype._isSynchronized = function () { + return !!this._cache.position.equals(this.position); + }), + (t.prototype.computeWorldMatrix = function (e) { + return !e && this.isSynchronized() + ? ((this._currentRenderId = this.getScene().getRenderId()), this._worldMatrix) + : (this._updateCache(), + this._cache.position.copyFrom(this.position), + this._worldMatrix || (this._worldMatrix = o.a.Identity()), + o.a.TranslationToRef(this.position.x, this.position.y, this.position.z, this._worldMatrix), + this.parent && this.parent.getWorldMatrix && (this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(), this._worldMatrix), this._markSyncedWithParent()), + (this._worldMatrixDeterminantIsDirty = !0), + this._worldMatrix); + }), + (t.prototype.getDepthMinZ = function (e) { + return void 0 !== this.shadowMinZ ? this.shadowMinZ : e.minZ; + }), + (t.prototype.getDepthMaxZ = function (e) { + return void 0 !== this.shadowMaxZ ? this.shadowMaxZ : e.maxZ; + }), + (t.prototype.setShadowProjectionMatrix = function (e, t, n) { + return this.customProjectionMatrixBuilder ? this.customProjectionMatrixBuilder(t, n, e) : this._setDefaultShadowProjectionMatrix(e, t, n), this; + }), + Object(i.c)([Object(r.o)()], t.prototype, "position", null), + Object(i.c)([Object(r.o)()], t.prototype, "direction", null), + Object(i.c)([Object(r.c)()], t.prototype, "shadowMinZ", null), + Object(i.c)([Object(r.c)()], t.prototype, "shadowMaxZ", null), + t + ); + })(a.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(35), + s = n(57), + c = n(121), + l = n(8); + a.a.AddNodeConstructor("Light_Type_2", function (e, t) { + return function () { + return new u(e, o.e.Zero(), o.e.Zero(), 0, 0, t); + }; + }); + var u = (function (e) { + function t(t, n, i, r, a, s) { + var c = e.call(this, t, s) || this; + return ( + (c._innerAngle = 0), + (c._projectionTextureMatrix = o.a.Zero()), + (c._projectionTextureLightNear = 1e-6), + (c._projectionTextureLightFar = 1e3), + (c._projectionTextureUpDirection = o.e.Up()), + (c._projectionTextureViewLightDirty = !0), + (c._projectionTextureProjectionLightDirty = !0), + (c._projectionTextureDirty = !0), + (c._projectionTextureViewTargetVector = o.e.Zero()), + (c._projectionTextureViewLightMatrix = o.a.Zero()), + (c._projectionTextureProjectionLightMatrix = o.a.Zero()), + (c._projectionTextureScalingMatrix = o.a.FromValues(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0.5, 0, 0.5, 0.5, 0.5, 1)), + (c.position = n), + (c.direction = i), + (c.angle = r), + (c.exponent = a), + c + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "angle", { + get: function () { + return this._angle; + }, + set: function (e) { + (this._angle = e), (this._cosHalfAngle = Math.cos(0.5 * e)), (this._projectionTextureProjectionLightDirty = !0), this.forceProjectionMatrixCompute(), this._computeAngleValues(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "innerAngle", { + get: function () { + return this._innerAngle; + }, + set: function (e) { + (this._innerAngle = e), this._computeAngleValues(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "shadowAngleScale", { + get: function () { + return this._shadowAngleScale; + }, + set: function (e) { + (this._shadowAngleScale = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "projectionTextureMatrix", { + get: function () { + return this._projectionTextureMatrix; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "projectionTextureLightNear", { + get: function () { + return this._projectionTextureLightNear; + }, + set: function (e) { + (this._projectionTextureLightNear = e), (this._projectionTextureProjectionLightDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "projectionTextureLightFar", { + get: function () { + return this._projectionTextureLightFar; + }, + set: function (e) { + (this._projectionTextureLightFar = e), (this._projectionTextureProjectionLightDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "projectionTextureUpDirection", { + get: function () { + return this._projectionTextureUpDirection; + }, + set: function (e) { + (this._projectionTextureUpDirection = e), (this._projectionTextureProjectionLightDirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "projectionTexture", { + get: function () { + return this._projectionTexture; + }, + set: function (e) { + var t = this; + if (this._projectionTexture !== e && ((this._projectionTexture = e), (this._projectionTextureDirty = !0), this._projectionTexture && !this._projectionTexture.isReady())) { + var n = this._projectionTexture; + n.onLoadObservable && + n.onLoadObservable.addOnce(function () { + t._markMeshesAsLightDirty(); + }); + } + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "SpotLight"; + }), + (t.prototype.getTypeID = function () { + return s.a.LIGHTTYPEID_SPOTLIGHT; + }), + (t.prototype._setDirection = function (t) { + e.prototype._setDirection.call(this, t), (this._projectionTextureViewLightDirty = !0); + }), + (t.prototype._setPosition = function (t) { + e.prototype._setPosition.call(this, t), (this._projectionTextureViewLightDirty = !0); + }), + (t.prototype._setDefaultShadowProjectionMatrix = function (e, t, n) { + var i = this.getScene().activeCamera; + if (i) { + this._shadowAngleScale = this._shadowAngleScale || 1; + var r = this._shadowAngleScale * this._angle; + o.a.PerspectiveFovLHToRef(r, 1, this.getDepthMinZ(i), this.getDepthMaxZ(i), e); + } + }), + (t.prototype._computeProjectionTextureViewLightMatrix = function () { + (this._projectionTextureViewLightDirty = !1), + (this._projectionTextureDirty = !0), + this.position.addToRef(this.direction, this._projectionTextureViewTargetVector), + o.a.LookAtLHToRef(this.position, this._projectionTextureViewTargetVector, this._projectionTextureUpDirection, this._projectionTextureViewLightMatrix); + }), + (t.prototype._computeProjectionTextureProjectionLightMatrix = function () { + (this._projectionTextureProjectionLightDirty = !1), (this._projectionTextureDirty = !0); + var e = this.projectionTextureLightFar, + t = this.projectionTextureLightNear, + n = e / (e - t), + i = -n * t, + r = 1 / Math.tan(this._angle / 2); + o.a.FromValuesToRef(r / 1, 0, 0, 0, 0, r, 0, 0, 0, 0, n, 1, 0, 0, i, 0, this._projectionTextureProjectionLightMatrix); + }), + (t.prototype._computeProjectionTextureMatrix = function () { + if (((this._projectionTextureDirty = !1), this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix, this._projectionTextureMatrix), this._projectionTexture instanceof l.a)) { + var e = this._projectionTexture.uScale / 2, + t = this._projectionTexture.vScale / 2; + o.a.FromValuesToRef(e, 0, 0, 0, 0, t, 0, 0, 0, 0, 0.5, 0, 0.5, 0.5, 0.5, 1, this._projectionTextureScalingMatrix); + } + this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix, this._projectionTextureMatrix); + }), + (t.prototype._buildUniformLayout = function () { + this._uniformBuffer.addUniform("vLightData", 4), + this._uniformBuffer.addUniform("vLightDiffuse", 4), + this._uniformBuffer.addUniform("vLightSpecular", 4), + this._uniformBuffer.addUniform("vLightDirection", 3), + this._uniformBuffer.addUniform("vLightFalloff", 4), + this._uniformBuffer.addUniform("shadowsInfo", 3), + this._uniformBuffer.addUniform("depthValues", 2), + this._uniformBuffer.create(); + }), + (t.prototype._computeAngleValues = function () { + (this._lightAngleScale = 1 / Math.max(0.001, Math.cos(0.5 * this._innerAngle) - this._cosHalfAngle)), (this._lightAngleOffset = -this._cosHalfAngle * this._lightAngleScale); + }), + (t.prototype.transferTexturesToEffect = function (e, t) { + return ( + this.projectionTexture && + this.projectionTexture.isReady() && + (this._projectionTextureViewLightDirty && this._computeProjectionTextureViewLightMatrix(), + this._projectionTextureProjectionLightDirty && this._computeProjectionTextureProjectionLightMatrix(), + this._projectionTextureDirty && this._computeProjectionTextureMatrix(), + e.setMatrix("textureProjectionMatrix" + t, this._projectionTextureMatrix), + e.setTexture("projectionLightSampler" + t, this.projectionTexture)), + this + ); + }), + (t.prototype.transferToEffect = function (e, t) { + var n; + return ( + this.computeTransformedInformation() + ? (this._uniformBuffer.updateFloat4("vLightData", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, this.exponent, t), (n = o.e.Normalize(this.transformedDirection))) + : (this._uniformBuffer.updateFloat4("vLightData", this.position.x, this.position.y, this.position.z, this.exponent, t), (n = o.e.Normalize(this.direction))), + this.getScene().useRightHandedSystem + ? this._uniformBuffer.updateFloat4("vLightDirection", -n.x, -n.y, -n.z, this._cosHalfAngle, t) + : this._uniformBuffer.updateFloat4("vLightDirection", n.x, n.y, n.z, this._cosHalfAngle, t), + this._uniformBuffer.updateFloat4("vLightFalloff", this.range, this._inverseSquaredRange, this._lightAngleScale, this._lightAngleOffset, t), + this + ); + }), + (t.prototype.transferToNodeMaterialEffect = function (e, t) { + var n; + return ( + (n = this.computeTransformedInformation() ? o.e.Normalize(this.transformedDirection) : o.e.Normalize(this.direction)), + this.getScene().useRightHandedSystem ? e.setFloat3(t, -n.x, -n.y, -n.z) : e.setFloat3(t, n.x, n.y, n.z), + this + ); + }), + (t.prototype.dispose = function () { + e.prototype.dispose.call(this), this._projectionTexture && this._projectionTexture.dispose(); + }), + (t.prototype.prepareLightSpecificDefines = function (e, t) { + (e["SPOTLIGHT" + t] = !0), (e["PROJECTEDLIGHTTEXTURE" + t] = !(!this.projectionTexture || !this.projectionTexture.isReady())); + }), + Object(i.c)([Object(r.c)()], t.prototype, "angle", null), + Object(i.c)([Object(r.c)()], t.prototype, "innerAngle", null), + Object(i.c)([Object(r.c)()], t.prototype, "shadowAngleScale", null), + Object(i.c)([Object(r.c)()], t.prototype, "exponent", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "projectionTextureLightNear", null), + Object(i.c)([Object(r.c)()], t.prototype, "projectionTextureLightFar", null), + Object(i.c)([Object(r.c)()], t.prototype, "projectionTextureUpDirection", null), + Object(i.c)([Object(r.m)("projectedLightTexture")], t.prototype, "_projectionTexture", void 0), + t + ); + })(c.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(3), + o = n(1), + a = n(35), + s = n(57), + c = n(121); + a.a.AddNodeConstructor("Light_Type_0", function (e, t) { + return function () { + return new l(e, o.e.Zero(), t); + }; + }); + var l = (function (e) { + function t(t, n, i) { + var r = e.call(this, t, i) || this; + return (r._shadowAngle = Math.PI / 2), (r.position = n), r; + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "shadowAngle", { + get: function () { + return this._shadowAngle; + }, + set: function (e) { + (this._shadowAngle = e), this.forceProjectionMatrixCompute(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "direction", { + get: function () { + return this._direction; + }, + set: function (e) { + var t = this.needCube(); + (this._direction = e), this.needCube() !== t && this._shadowGenerator && this._shadowGenerator.recreateShadowMap(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "PointLight"; + }), + (t.prototype.getTypeID = function () { + return s.a.LIGHTTYPEID_POINTLIGHT; + }), + (t.prototype.needCube = function () { + return !this.direction; + }), + (t.prototype.getShadowDirection = function (t) { + if (this.direction) return e.prototype.getShadowDirection.call(this, t); + switch (t) { + case 0: + return new o.e(1, 0, 0); + case 1: + return new o.e(-1, 0, 0); + case 2: + return new o.e(0, -1, 0); + case 3: + return new o.e(0, 1, 0); + case 4: + return new o.e(0, 0, 1); + case 5: + return new o.e(0, 0, -1); + } + return o.e.Zero(); + }), + (t.prototype._setDefaultShadowProjectionMatrix = function (e, t, n) { + var i = this.getScene().activeCamera; + i && o.a.PerspectiveFovLHToRef(this.shadowAngle, 1, this.getDepthMinZ(i), this.getDepthMaxZ(i), e); + }), + (t.prototype._buildUniformLayout = function () { + this._uniformBuffer.addUniform("vLightData", 4), + this._uniformBuffer.addUniform("vLightDiffuse", 4), + this._uniformBuffer.addUniform("vLightSpecular", 4), + this._uniformBuffer.addUniform("vLightFalloff", 4), + this._uniformBuffer.addUniform("shadowsInfo", 3), + this._uniformBuffer.addUniform("depthValues", 2), + this._uniformBuffer.create(); + }), + (t.prototype.transferToEffect = function (e, t) { + return ( + this.computeTransformedInformation() + ? this._uniformBuffer.updateFloat4("vLightData", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, 0, t) + : this._uniformBuffer.updateFloat4("vLightData", this.position.x, this.position.y, this.position.z, 0, t), + this._uniformBuffer.updateFloat4("vLightFalloff", this.range, this._inverseSquaredRange, 0, 0, t), + this + ); + }), + (t.prototype.transferToNodeMaterialEffect = function (e, t) { + return this.computeTransformedInformation() ? e.setFloat3(t, this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z) : e.setFloat3(t, this.position.x, this.position.y, this.position.z), this; + }), + (t.prototype.prepareLightSpecificDefines = function (e, t) { + e["POINTLIGHT" + t] = !0; + }), + Object(i.c)([Object(r.c)()], t.prototype, "shadowAngle", null), + t + ); + })(c.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }); + var i = n(10), + r = n(38), + o = n(126); + (r.a.prototype.createUniformBuffer = function (e) { + var t = this._gl.createBuffer(); + if (!t) throw new Error("Unable to create uniform buffer"); + var n = new o.a(t); + return ( + this.bindUniformBuffer(n), + e instanceof Float32Array ? this._gl.bufferData(this._gl.UNIFORM_BUFFER, e, this._gl.STATIC_DRAW) : this._gl.bufferData(this._gl.UNIFORM_BUFFER, new Float32Array(e), this._gl.STATIC_DRAW), + this.bindUniformBuffer(null), + (n.references = 1), + n + ); + }), + (r.a.prototype.createDynamicUniformBuffer = function (e) { + var t = this._gl.createBuffer(); + if (!t) throw new Error("Unable to create dynamic uniform buffer"); + var n = new o.a(t); + return ( + this.bindUniformBuffer(n), + e instanceof Float32Array ? this._gl.bufferData(this._gl.UNIFORM_BUFFER, e, this._gl.DYNAMIC_DRAW) : this._gl.bufferData(this._gl.UNIFORM_BUFFER, new Float32Array(e), this._gl.DYNAMIC_DRAW), + this.bindUniformBuffer(null), + (n.references = 1), + n + ); + }), + (r.a.prototype.updateUniformBuffer = function (e, t, n, i) { + this.bindUniformBuffer(e), + void 0 === n && (n = 0), + void 0 === i + ? t instanceof Float32Array + ? this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, n, t) + : this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, n, new Float32Array(t)) + : t instanceof Float32Array + ? this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, 0, t.subarray(n, n + i)) + : this._gl.bufferSubData(this._gl.UNIFORM_BUFFER, 0, new Float32Array(t).subarray(n, n + i)), + this.bindUniformBuffer(null); + }), + (r.a.prototype.bindUniformBuffer = function (e) { + this._gl.bindBuffer(this._gl.UNIFORM_BUFFER, e ? e.underlyingResource : null); + }), + (r.a.prototype.bindUniformBufferBase = function (e, t) { + this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER, t, e ? e.underlyingResource : null); + }), + (r.a.prototype.bindUniformBlock = function (e, t, n) { + var i = e.program, + r = this._gl.getUniformBlockIndex(i, t); + this._gl.uniformBlockBinding(i, r, n); + }); + var a = (function () { + function e(e, t, n) { + (this._alreadyBound = !1), + (this._valueCache = {}), + (this._engine = e), + (this._noUBO = !e.supportsUniformBuffers), + (this._dynamic = n), + (this._data = t || []), + (this._uniformLocations = {}), + (this._uniformSizes = {}), + (this._uniformLocationPointer = 0), + (this._needSync = !1), + this._noUBO + ? ((this.updateMatrix3x3 = this._updateMatrix3x3ForEffect), + (this.updateMatrix2x2 = this._updateMatrix2x2ForEffect), + (this.updateFloat = this._updateFloatForEffect), + (this.updateFloat2 = this._updateFloat2ForEffect), + (this.updateFloat3 = this._updateFloat3ForEffect), + (this.updateFloat4 = this._updateFloat4ForEffect), + (this.updateMatrix = this._updateMatrixForEffect), + (this.updateVector3 = this._updateVector3ForEffect), + (this.updateVector4 = this._updateVector4ForEffect), + (this.updateColor3 = this._updateColor3ForEffect), + (this.updateColor4 = this._updateColor4ForEffect)) + : (this._engine._uniformBuffers.push(this), + (this.updateMatrix3x3 = this._updateMatrix3x3ForUniform), + (this.updateMatrix2x2 = this._updateMatrix2x2ForUniform), + (this.updateFloat = this._updateFloatForUniform), + (this.updateFloat2 = this._updateFloat2ForUniform), + (this.updateFloat3 = this._updateFloat3ForUniform), + (this.updateFloat4 = this._updateFloat4ForUniform), + (this.updateMatrix = this._updateMatrixForUniform), + (this.updateVector3 = this._updateVector3ForUniform), + (this.updateVector4 = this._updateVector4ForUniform), + (this.updateColor3 = this._updateColor3ForUniform), + (this.updateColor4 = this._updateColor4ForUniform)); + } + return ( + Object.defineProperty(e.prototype, "useUbo", { + get: function () { + return !this._noUBO; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isSync", { + get: function () { + return !this._needSync; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.isDynamic = function () { + return void 0 !== this._dynamic; + }), + (e.prototype.getData = function () { + return this._bufferData; + }), + (e.prototype.getBuffer = function () { + return this._buffer; + }), + (e.prototype._fillAlignment = function (e) { + var t; + if (((t = e <= 2 ? e : 4), this._uniformLocationPointer % t != 0)) { + var n = this._uniformLocationPointer; + this._uniformLocationPointer += t - (this._uniformLocationPointer % t); + for (var i = this._uniformLocationPointer - n, r = 0; r < i; r++) this._data.push(0); + } + }), + (e.prototype.addUniform = function (e, t) { + if (!this._noUBO && void 0 === this._uniformLocations[e]) { + var n; + if (t instanceof Array) t = (n = t).length; + else { + (t = t), (n = []); + for (var i = 0; i < t; i++) n.push(0); + } + this._fillAlignment(t), (this._uniformSizes[e] = t), (this._uniformLocations[e] = this._uniformLocationPointer), (this._uniformLocationPointer += t); + for (i = 0; i < t; i++) this._data.push(n[i]); + this._needSync = !0; + } + }), + (e.prototype.addMatrix = function (e, t) { + this.addUniform(e, Array.prototype.slice.call(t.toArray())); + }), + (e.prototype.addFloat2 = function (e, t, n) { + var i = [t, n]; + this.addUniform(e, i); + }), + (e.prototype.addFloat3 = function (e, t, n, i) { + var r = [t, n, i]; + this.addUniform(e, r); + }), + (e.prototype.addColor3 = function (e, t) { + var n = new Array(); + t.toArray(n), this.addUniform(e, n); + }), + (e.prototype.addColor4 = function (e, t, n) { + var i = new Array(); + t.toArray(i), i.push(n), this.addUniform(e, i); + }), + (e.prototype.addVector3 = function (e, t) { + var n = new Array(); + t.toArray(n), this.addUniform(e, n); + }), + (e.prototype.addMatrix3x3 = function (e) { + this.addUniform(e, 12); + }), + (e.prototype.addMatrix2x2 = function (e) { + this.addUniform(e, 8); + }), + (e.prototype.create = function () { + this._noUBO || this._buffer || (this._fillAlignment(4), (this._bufferData = new Float32Array(this._data)), this._rebuild(), (this._needSync = !0)); + }), + (e.prototype._rebuild = function () { + !this._noUBO && this._bufferData && (this._dynamic ? (this._buffer = this._engine.createDynamicUniformBuffer(this._bufferData)) : (this._buffer = this._engine.createUniformBuffer(this._bufferData))); + }), + (e.prototype.update = function () { + this._buffer ? (this._dynamic || this._needSync) && (this._engine.updateUniformBuffer(this._buffer, this._bufferData), (this._needSync = !1)) : this.create(); + }), + (e.prototype.updateUniform = function (e, t, n) { + var r = this._uniformLocations[e]; + if (void 0 === r) { + if (this._buffer) return void i.a.Error("Cannot add an uniform after UBO has been created."); + this.addUniform(e, n), (r = this._uniformLocations[e]); + } + if ((this._buffer || this.create(), this._dynamic)) for (a = 0; a < n; a++) this._bufferData[r + a] = t[a]; + else { + for (var o = !1, a = 0; a < n; a++) (16 !== n && this._bufferData[r + a] === t[a]) || ((o = !0), (this._bufferData[r + a] = t[a])); + this._needSync = this._needSync || o; + } + }), + (e.prototype._cacheMatrix = function (e, t) { + var n = this._valueCache[e], + i = t.updateFlag; + return (void 0 === n || n !== i) && ((this._valueCache[e] = i), !0); + }), + (e.prototype._updateMatrix3x3ForUniform = function (t, n) { + for (var i = 0; i < 3; i++) (e._tempBuffer[4 * i] = n[3 * i]), (e._tempBuffer[4 * i + 1] = n[3 * i + 1]), (e._tempBuffer[4 * i + 2] = n[3 * i + 2]), (e._tempBuffer[4 * i + 3] = 0); + this.updateUniform(t, e._tempBuffer, 12); + }), + (e.prototype._updateMatrix3x3ForEffect = function (e, t) { + this._currentEffect.setMatrix3x3(e, t); + }), + (e.prototype._updateMatrix2x2ForEffect = function (e, t) { + this._currentEffect.setMatrix2x2(e, t); + }), + (e.prototype._updateMatrix2x2ForUniform = function (t, n) { + for (var i = 0; i < 2; i++) (e._tempBuffer[4 * i] = n[2 * i]), (e._tempBuffer[4 * i + 1] = n[2 * i + 1]), (e._tempBuffer[4 * i + 2] = 0), (e._tempBuffer[4 * i + 3] = 0); + this.updateUniform(t, e._tempBuffer, 8); + }), + (e.prototype._updateFloatForEffect = function (e, t) { + this._currentEffect.setFloat(e, t); + }), + (e.prototype._updateFloatForUniform = function (t, n) { + (e._tempBuffer[0] = n), this.updateUniform(t, e._tempBuffer, 1); + }), + (e.prototype._updateFloat2ForEffect = function (e, t, n, i) { + void 0 === i && (i = ""), this._currentEffect.setFloat2(e + i, t, n); + }), + (e.prototype._updateFloat2ForUniform = function (t, n, i) { + (e._tempBuffer[0] = n), (e._tempBuffer[1] = i), this.updateUniform(t, e._tempBuffer, 2); + }), + (e.prototype._updateFloat3ForEffect = function (e, t, n, i, r) { + void 0 === r && (r = ""), this._currentEffect.setFloat3(e + r, t, n, i); + }), + (e.prototype._updateFloat3ForUniform = function (t, n, i, r) { + (e._tempBuffer[0] = n), (e._tempBuffer[1] = i), (e._tempBuffer[2] = r), this.updateUniform(t, e._tempBuffer, 3); + }), + (e.prototype._updateFloat4ForEffect = function (e, t, n, i, r, o) { + void 0 === o && (o = ""), this._currentEffect.setFloat4(e + o, t, n, i, r); + }), + (e.prototype._updateFloat4ForUniform = function (t, n, i, r, o) { + (e._tempBuffer[0] = n), (e._tempBuffer[1] = i), (e._tempBuffer[2] = r), (e._tempBuffer[3] = o), this.updateUniform(t, e._tempBuffer, 4); + }), + (e.prototype._updateMatrixForEffect = function (e, t) { + this._currentEffect.setMatrix(e, t); + }), + (e.prototype._updateMatrixForUniform = function (e, t) { + this._cacheMatrix(e, t) && this.updateUniform(e, t.toArray(), 16); + }), + (e.prototype._updateVector3ForEffect = function (e, t) { + this._currentEffect.setVector3(e, t); + }), + (e.prototype._updateVector3ForUniform = function (t, n) { + n.toArray(e._tempBuffer), this.updateUniform(t, e._tempBuffer, 3); + }), + (e.prototype._updateVector4ForEffect = function (e, t) { + this._currentEffect.setVector4(e, t); + }), + (e.prototype._updateVector4ForUniform = function (t, n) { + n.toArray(e._tempBuffer), this.updateUniform(t, e._tempBuffer, 4); + }), + (e.prototype._updateColor3ForEffect = function (e, t, n) { + void 0 === n && (n = ""), this._currentEffect.setColor3(e + n, t); + }), + (e.prototype._updateColor3ForUniform = function (t, n) { + n.toArray(e._tempBuffer), this.updateUniform(t, e._tempBuffer, 3); + }), + (e.prototype._updateColor4ForEffect = function (e, t, n, i) { + void 0 === i && (i = ""), this._currentEffect.setColor4(e + i, t, n); + }), + (e.prototype._updateColor4ForUniform = function (t, n, i) { + n.toArray(e._tempBuffer), (e._tempBuffer[3] = i), this.updateUniform(t, e._tempBuffer, 4); + }), + (e.prototype.setTexture = function (e, t) { + this._currentEffect.setTexture(e, t); + }), + (e.prototype.updateUniformDirectly = function (e, t) { + this.updateUniform(e, t, t.length), this.update(); + }), + (e.prototype.bindToEffect = function (e, t) { + (this._currentEffect = e), !this._noUBO && this._buffer && ((this._alreadyBound = !0), e.bindUniformBuffer(this._buffer, t)); + }), + (e.prototype.dispose = function () { + if (!this._noUBO) { + var e = this._engine._uniformBuffers, + t = e.indexOf(this); + -1 !== t && ((e[t] = e[e.length - 1]), e.pop()), this._buffer && this._engine._releaseBuffer(this._buffer) && (this._buffer = null); + } + }), + (e._MAX_UNIFORM_SIZE = 256), + (e._tempBuffer = new Float32Array(e._MAX_UNIFORM_SIZE)), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return p; + }); + var i = n(2), + r = n(3), + o = n(6), + a = n(4), + s = n(21), + c = n(28), + l = n(8), + u = n(44), + h = n(200), + d = + (n(166), + n(209), + "\nattribute vec2 position;\n\nvarying vec2 vPosition;\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvPosition=position;\nvUV=position*madd+madd;\ngl_Position=vec4(position,0.0,1.0);\n}"); + n(7).a.ShadersStore.proceduralVertexShader = d; + var p = (function (e) { + function t(t, n, i, r, c, l, u) { + void 0 === c && (c = null), void 0 === l && (l = !0), void 0 === u && (u = !1); + var d = e.call(this, null, r, !l) || this; + (d.isCube = u), + (d.isEnabled = !0), + (d.autoClear = !0), + (d.onGeneratedObservable = new o.c()), + (d._textures = {}), + (d._currentRefreshId = -1), + (d._frameId = -1), + (d._refreshRate = 1), + (d._vertexBuffers = {}), + (d._uniforms = new Array()), + (d._samplers = new Array()), + (d._floats = {}), + (d._ints = {}), + (d._floatsArrays = {}), + (d._colors3 = {}), + (d._colors4 = {}), + (d._vectors2 = {}), + (d._vectors3 = {}), + (d._matrices = {}), + (d._fallbackTextureUsed = !1), + (d._cachedDefines = ""), + (d._contentUpdateId = -1); + var p = (r = d.getScene())._getComponent(s.a.NAME_PROCEDURALTEXTURE); + p || ((p = new h.a(r)), r._addComponent(p)), + r.proceduralTextures.push(d), + (d._engine = r.getEngine()), + (d.name = t), + (d.isRenderTarget = !0), + (d._size = n), + (d._generateMipMaps = l), + d.setFragment(i), + (d._fallbackTexture = c), + u + ? ((d._texture = d._engine.createRenderTargetCubeTexture(n, { generateMipMaps: l, generateDepthBuffer: !1, generateStencilBuffer: !1 })), d.setFloat("face", 0)) + : (d._texture = d._engine.createRenderTargetTexture(n, { generateMipMaps: l, generateDepthBuffer: !1, generateStencilBuffer: !1 })); + var f = []; + return f.push(1, 1), f.push(-1, 1), f.push(-1, -1), f.push(1, -1), (d._vertexBuffers[a.b.PositionKind] = new a.b(d._engine, f, a.b.PositionKind, !1, !1, 2)), d._createIndexBuffer(), d; + } + return ( + Object(i.d)(t, e), + (t.prototype.getEffect = function () { + return this._effect; + }), + (t.prototype.getContent = function () { + return (this._contentData && this._frameId === this._contentUpdateId) || ((this._contentData = this.readPixels(0, 0, this._contentData)), (this._contentUpdateId = this._frameId)), this._contentData; + }), + (t.prototype._createIndexBuffer = function () { + var e = this._engine, + t = []; + t.push(0), t.push(1), t.push(2), t.push(0), t.push(2), t.push(3), (this._indexBuffer = e.createIndexBuffer(t)); + }), + (t.prototype._rebuild = function () { + var e = this._vertexBuffers[a.b.PositionKind]; + e && e._rebuild(), this._createIndexBuffer(), this.refreshRate === u.a.REFRESHRATE_RENDER_ONCE && (this.refreshRate = u.a.REFRESHRATE_RENDER_ONCE); + }), + (t.prototype.reset = function () { + void 0 !== this._effect && this._effect.dispose(); + }), + (t.prototype._getDefines = function () { + return ""; + }), + (t.prototype.isReady = function () { + var e, + t = this, + n = this._engine; + if (!this._fragment) return !1; + if (this._fallbackTextureUsed) return !0; + var i = this._getDefines(); + return ( + !(!this._effect || i !== this._cachedDefines || !this._effect.isReady()) || + ((e = void 0 !== this._fragment.fragmentElement ? { vertex: "procedural", fragmentElement: this._fragment.fragmentElement } : { vertex: "procedural", fragment: this._fragment }), + (this._cachedDefines = i), + (this._effect = n.createEffect(e, [a.b.PositionKind], this._uniforms, this._samplers, i, void 0, void 0, function () { + t.releaseInternalTexture(), t._fallbackTexture && ((t._texture = t._fallbackTexture._texture), t._texture && t._texture.incrementReferences()), (t._fallbackTextureUsed = !0); + })), + this._effect.isReady()) + ); + }), + (t.prototype.resetRefreshCounter = function () { + this._currentRefreshId = -1; + }), + (t.prototype.setFragment = function (e) { + this._fragment = e; + }), + Object.defineProperty(t.prototype, "refreshRate", { + get: function () { + return this._refreshRate; + }, + set: function (e) { + (this._refreshRate = e), this.resetRefreshCounter(); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._shouldRender = function () { + return this.isEnabled && this.isReady() && this._texture + ? !this._fallbackTextureUsed && (-1 === this._currentRefreshId || this.refreshRate === this._currentRefreshId ? ((this._currentRefreshId = 1), this._frameId++, !0) : (this._currentRefreshId++, !1)) + : (this._texture && (this._texture.isReady = !1), !1); + }), + (t.prototype.getRenderSize = function () { + return this._size; + }), + (t.prototype.resize = function (e, t) { + this._fallbackTextureUsed || (this.releaseInternalTexture(), (this._texture = this._engine.createRenderTargetTexture(e, t)), (this._size = e), (this._generateMipMaps = t)); + }), + (t.prototype._checkUniform = function (e) { + -1 === this._uniforms.indexOf(e) && this._uniforms.push(e); + }), + (t.prototype.setTexture = function (e, t) { + return -1 === this._samplers.indexOf(e) && this._samplers.push(e), (this._textures[e] = t), this; + }), + (t.prototype.setFloat = function (e, t) { + return this._checkUniform(e), (this._floats[e] = t), this; + }), + (t.prototype.setInt = function (e, t) { + return this._checkUniform(e), (this._ints[e] = t), this; + }), + (t.prototype.setFloats = function (e, t) { + return this._checkUniform(e), (this._floatsArrays[e] = t), this; + }), + (t.prototype.setColor3 = function (e, t) { + return this._checkUniform(e), (this._colors3[e] = t), this; + }), + (t.prototype.setColor4 = function (e, t) { + return this._checkUniform(e), (this._colors4[e] = t), this; + }), + (t.prototype.setVector2 = function (e, t) { + return this._checkUniform(e), (this._vectors2[e] = t), this; + }), + (t.prototype.setVector3 = function (e, t) { + return this._checkUniform(e), (this._vectors3[e] = t), this; + }), + (t.prototype.setMatrix = function (e, t) { + return this._checkUniform(e), (this._matrices[e] = t), this; + }), + (t.prototype.render = function (e) { + var t = this.getScene(); + if (t) { + var n = this._engine; + for (var i in (n.enableEffect(this._effect), n.setState(!1), this._textures)) this._effect.setTexture(i, this._textures[i]); + for (i in this._ints) this._effect.setInt(i, this._ints[i]); + for (i in this._floats) this._effect.setFloat(i, this._floats[i]); + for (i in this._floatsArrays) this._effect.setArray(i, this._floatsArrays[i]); + for (i in this._colors3) this._effect.setColor3(i, this._colors3[i]); + for (i in this._colors4) { + var r = this._colors4[i]; + this._effect.setFloat4(i, r.r, r.g, r.b, r.a); + } + for (i in this._vectors2) this._effect.setVector2(i, this._vectors2[i]); + for (i in this._vectors3) this._effect.setVector3(i, this._vectors3[i]); + for (i in this._matrices) this._effect.setMatrix(i, this._matrices[i]); + if (this._texture) { + if (this.isCube) + for (var o = 0; o < 6; o++) + n.bindFramebuffer(this._texture, o, void 0, void 0, !0), + n.bindBuffers(this._vertexBuffers, this._indexBuffer, this._effect), + this._effect.setFloat("face", o), + this.autoClear && n.clear(t.clearColor, !0, !1, !1), + n.drawElementsType(c.a.TriangleFillMode, 0, 6), + 5 === o && n.generateMipMapsForCubemap(this._texture); + else + n.bindFramebuffer(this._texture, 0, void 0, void 0, !0), + n.bindBuffers(this._vertexBuffers, this._indexBuffer, this._effect), + this.autoClear && n.clear(t.clearColor, !0, !1, !1), + n.drawElementsType(c.a.TriangleFillMode, 0, 6); + n.unBindFramebuffer(this._texture, this.isCube), this.onGenerated && this.onGenerated(), this.onGeneratedObservable.notifyObservers(this); + } + } + }), + (t.prototype.clone = function () { + var e = this.getSize(), + n = new t(this.name, e.width, this._fragment, this.getScene(), this._fallbackTexture, this._generateMipMaps); + return (n.hasAlpha = this.hasAlpha), (n.level = this.level), (n.coordinatesMode = this.coordinatesMode), n; + }), + (t.prototype.dispose = function () { + var t = this.getScene(); + if (t) { + var n = t.proceduralTextures.indexOf(this); + n >= 0 && t.proceduralTextures.splice(n, 1); + var i = this._vertexBuffers[a.b.PositionKind]; + i && (i.dispose(), (this._vertexBuffers[a.b.PositionKind] = null)), this._indexBuffer && this._engine._releaseBuffer(this._indexBuffer) && (this._indexBuffer = null), e.prototype.dispose.call(this); + } + }), + Object(i.c)([Object(r.c)()], t.prototype, "isEnabled", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "autoClear", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "_generateMipMaps", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "_size", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "refreshRate", null), + t + ); + })(l.a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(2), + r = (function (e) { + function t(t) { + var n = e.call(this) || this; + return (n._buffer = t), n; + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "underlyingResource", { + get: function () { + return this._buffer; + }, + enumerable: !0, + configurable: !0, + }), + t + ); + })(n(127).a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this.references = 0), (this.capacity = 0), (this.is32Bits = !1); + } + return ( + Object.defineProperty(e.prototype, "underlyingResource", { + get: function () { + return null; + }, + enumerable: !0, + configurable: !0, + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(85), + r = (function () { + function e() {} + return ( + (e.GetPlanes = function (t) { + for (var n = [], r = 0; r < 6; r++) n.push(new i.a(0, 0, 0, 0)); + return e.GetPlanesToRef(t, n), n; + }), + (e.GetNearPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] + n[2]), (t.normal.y = n[7] + n[6]), (t.normal.z = n[11] + n[10]), (t.d = n[15] + n[14]), t.normalize(); + }), + (e.GetFarPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] - n[2]), (t.normal.y = n[7] - n[6]), (t.normal.z = n[11] - n[10]), (t.d = n[15] - n[14]), t.normalize(); + }), + (e.GetLeftPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] + n[0]), (t.normal.y = n[7] + n[4]), (t.normal.z = n[11] + n[8]), (t.d = n[15] + n[12]), t.normalize(); + }), + (e.GetRightPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] - n[0]), (t.normal.y = n[7] - n[4]), (t.normal.z = n[11] - n[8]), (t.d = n[15] - n[12]), t.normalize(); + }), + (e.GetTopPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] - n[1]), (t.normal.y = n[7] - n[5]), (t.normal.z = n[11] - n[9]), (t.d = n[15] - n[13]), t.normalize(); + }), + (e.GetBottomPlaneToRef = function (e, t) { + var n = e.m; + (t.normal.x = n[3] + n[1]), (t.normal.y = n[7] + n[5]), (t.normal.z = n[11] + n[9]), (t.d = n[15] + n[13]), t.normalize(); + }), + (e.GetPlanesToRef = function (t, n) { + e.GetNearPlaneToRef(t, n[0]), e.GetFarPlaneToRef(t, n[1]), e.GetLeftPlaneToRef(t, n[2]), e.GetRightPlaneToRef(t, n[3]), e.GetTopPlaneToRef(t, n[4]), e.GetBottomPlaneToRef(t, n[5]); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return d; + }); + var i = n(110), + r = n(6), + o = n(1), + a = n(92), + s = n(27), + c = n(146), + l = n(25), + u = n(10), + h = n(51), + d = (function () { + function e(e, t, n) { + (this.name = e), + (this.id = t), + (this.bones = new Array()), + (this.needInitialSkinMatrix = !1), + (this.overrideMesh = null), + (this._isDirty = !0), + (this._meshesWithPoseMatrix = new Array()), + (this._identity = o.a.Identity()), + (this._ranges = {}), + (this._lastAbsoluteTransformsUpdateId = -1), + (this._canUseTextureForBones = !1), + (this._uniqueId = 0), + (this._numBonesWithLinkedTransformNode = 0), + (this._hasWaitingData = null), + (this.doNotSerialize = !1), + (this._useTextureToStoreBoneMatrices = !0), + (this._animationPropertiesOverride = null), + (this.onBeforeComputeObservable = new r.c()), + (this.bones = []), + (this._scene = n || l.a.LastCreatedScene), + (this._uniqueId = this._scene.getUniqueId()), + this._scene.addSkeleton(this), + (this._isDirty = !0); + var i = this._scene.getEngine().getCaps(); + this._canUseTextureForBones = i.textureFloat && i.maxVertexTextureImageUnits > 0; + } + return ( + Object.defineProperty(e.prototype, "useTextureToStoreBoneMatrices", { + get: function () { + return this._useTextureToStoreBoneMatrices; + }, + set: function (e) { + (this._useTextureToStoreBoneMatrices = e), this._markAsDirty(); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "animationPropertiesOverride", { + get: function () { + return this._animationPropertiesOverride ? this._animationPropertiesOverride : this._scene.animationPropertiesOverride; + }, + set: function (e) { + this._animationPropertiesOverride = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isUsingTextureForMatrices", { + get: function () { + return this.useTextureToStoreBoneMatrices && this._canUseTextureForBones; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "uniqueId", { + get: function () { + return this._uniqueId; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "Skeleton"; + }), + (e.prototype.getChildren = function () { + return this.bones.filter(function (e) { + return !e.getParent(); + }); + }), + (e.prototype.getTransformMatrices = function (e) { + return this.needInitialSkinMatrix && e._bonesTransformMatrices ? e._bonesTransformMatrices : (this._transformMatrices || this.prepare(), this._transformMatrices); + }), + (e.prototype.getTransformMatrixTexture = function (e) { + return this.needInitialSkinMatrix && e._transformMatrixTexture ? e._transformMatrixTexture : this._transformMatrixTexture; + }), + (e.prototype.getScene = function () { + return this._scene; + }), + (e.prototype.toString = function (e) { + var t = "Name: " + this.name + ", nBones: " + this.bones.length; + if (((t += ", nAnimationRanges: " + (this._ranges ? Object.keys(this._ranges).length : "none")), e)) { + t += ", Ranges: {"; + var n = !0; + for (var i in this._ranges) n && ((t += ", "), (n = !1)), (t += i); + t += "}"; + } + return t; + }), + (e.prototype.getBoneIndexByName = function (e) { + for (var t = 0, n = this.bones.length; t < n; t++) if (this.bones[t].name === e) return t; + return -1; + }), + (e.prototype.createAnimationRange = function (e, t, n) { + if (!this._ranges[e]) { + this._ranges[e] = new c.a(e, t, n); + for (var i = 0, r = this.bones.length; i < r; i++) this.bones[i].animations[0] && this.bones[i].animations[0].createRange(e, t, n); + } + }), + (e.prototype.deleteAnimationRange = function (e, t) { + void 0 === t && (t = !0); + for (var n = 0, i = this.bones.length; n < i; n++) this.bones[n].animations[0] && this.bones[n].animations[0].deleteRange(e, t); + this._ranges[e] = null; + }), + (e.prototype.getAnimationRange = function (e) { + return this._ranges[e]; + }), + (e.prototype.getAnimationRanges = function () { + var e, + t = []; + for (e in this._ranges) t.push(this._ranges[e]); + return t; + }), + (e.prototype.copyAnimationRange = function (e, t, n) { + if ((void 0 === n && (n = !1), this._ranges[t] || !e.getAnimationRange(t))) return !1; + var i, + r, + o = !0, + a = this._getHighestAnimationFrame() + 1, + s = {}, + l = e.bones; + for (r = 0, i = l.length; r < i; r++) s[l[r].name] = l[r]; + this.bones.length !== l.length && (u.a.Warn("copyAnimationRange: this rig has " + this.bones.length + " bones, while source as " + l.length), (o = !1)); + var h = n && this.dimensionsAtRest && e.dimensionsAtRest ? this.dimensionsAtRest.divide(e.dimensionsAtRest) : null; + for (r = 0, i = this.bones.length; r < i; r++) { + var d = this.bones[r].name, + p = s[d]; + p ? (o = o && this.bones[r].copyAnimationRange(p, t, a, n, h)) : (u.a.Warn("copyAnimationRange: not same rig, missing source bone " + d), (o = !1)); + } + var f = e.getAnimationRange(t); + return f && (this._ranges[t] = new c.a(t, f.from + a, f.to + a)), o; + }), + (e.prototype.returnToRest = function () { + for (var e = 0; e < this.bones.length; e++) this.bones[e].returnToRest(); + }), + (e.prototype._getHighestAnimationFrame = function () { + for (var e = 0, t = 0, n = this.bones.length; t < n; t++) + if (this.bones[t].animations[0]) { + var i = this.bones[t].animations[0].getHighestFrame(); + e < i && (e = i); + } + return e; + }), + (e.prototype.beginAnimation = function (e, t, n, i) { + var r = this.getAnimationRange(e); + return r ? this._scene.beginAnimation(this, r.from, r.to, t, n, i) : null; + }), + (e.prototype._markAsDirty = function () { + this._isDirty = !0; + }), + (e.prototype._registerMeshWithPoseMatrix = function (e) { + this._meshesWithPoseMatrix.push(e); + }), + (e.prototype._unregisterMeshWithPoseMatrix = function (e) { + var t = this._meshesWithPoseMatrix.indexOf(e); + t > -1 && this._meshesWithPoseMatrix.splice(t, 1); + }), + (e.prototype._computeTransformMatrices = function (e, t) { + this.onBeforeComputeObservable.notifyObservers(this); + for (var n = 0; n < this.bones.length; n++) { + var i = this.bones[n]; + i._childUpdateId++; + var r = i.getParent(); + if ( + (r ? i.getLocalMatrix().multiplyToRef(r.getWorldMatrix(), i.getWorldMatrix()) : t ? i.getLocalMatrix().multiplyToRef(t, i.getWorldMatrix()) : i.getWorldMatrix().copyFrom(i.getLocalMatrix()), -1 !== i._index) + ) { + var o = null === i._index ? n : i._index; + i.getInvertedAbsoluteTransform().multiplyToArray(i.getWorldMatrix(), e, 16 * o); + } + } + this._identity.copyToArray(e, 16 * this.bones.length); + }), + (e.prototype.prepare = function () { + if (this._numBonesWithLinkedTransformNode > 0) + for (var e = 0, t = this.bones; e < t.length; e++) { + var n = t[e]; + n._linkedTransformNode && (n._linkedTransformNode.computeWorldMatrix(), (n._matrix = n._linkedTransformNode._localMatrix), n.markAsDirty()); + } + if (this._isDirty) { + if (this.needInitialSkinMatrix) + for (var i = 0; i < this._meshesWithPoseMatrix.length; i++) { + var r = this._meshesWithPoseMatrix[i], + s = r.getPoseMatrix(); + if ( + ((r._bonesTransformMatrices && r._bonesTransformMatrices.length === 16 * (this.bones.length + 1)) || (r._bonesTransformMatrices = new Float32Array(16 * (this.bones.length + 1))), + this._synchronizedWithMesh !== r) + ) { + this._synchronizedWithMesh = r; + for (var c = 0; c < this.bones.length; c++) { + var l = this.bones[c]; + if (!l.getParent()) l.getBaseMatrix().multiplyToRef(s, o.c.Matrix[1]), l._updateDifferenceMatrix(o.c.Matrix[1]); + } + if (this.isUsingTextureForMatrices) { + var u = 4 * (this.bones.length + 1); + (r._transformMatrixTexture && r._transformMatrixTexture.getSize().width === u) || + (r._transformMatrixTexture && r._transformMatrixTexture.dispose(), + (r._transformMatrixTexture = a.a.CreateRGBATexture(r._bonesTransformMatrices, 4 * (this.bones.length + 1), 1, this._scene, !1, !1, 1, 1))); + } + } + this._computeTransformMatrices(r._bonesTransformMatrices, s), this.isUsingTextureForMatrices && r._transformMatrixTexture && r._transformMatrixTexture.update(r._bonesTransformMatrices); + } + else + (this._transformMatrices && this._transformMatrices.length === 16 * (this.bones.length + 1)) || + ((this._transformMatrices = new Float32Array(16 * (this.bones.length + 1))), + this.isUsingTextureForMatrices && + (this._transformMatrixTexture && this._transformMatrixTexture.dispose(), + (this._transformMatrixTexture = a.a.CreateRGBATexture(this._transformMatrices, 4 * (this.bones.length + 1), 1, this._scene, !1, !1, 1, 1)))), + this._computeTransformMatrices(this._transformMatrices, null), + this.isUsingTextureForMatrices && this._transformMatrixTexture && this._transformMatrixTexture.update(this._transformMatrices); + (this._isDirty = !1), this._scene._activeBones.addCount(this.bones.length, !1); + } + }), + (e.prototype.getAnimatables = function () { + if (!this._animatables || this._animatables.length !== this.bones.length) { + this._animatables = []; + for (var e = 0; e < this.bones.length; e++) this._animatables.push(this.bones[e]); + } + return this._animatables; + }), + (e.prototype.clone = function (t, n) { + var r = new e(t, n || t, this._scene); + (r.needInitialSkinMatrix = this.needInitialSkinMatrix), (r.overrideMesh = this.overrideMesh); + for (var o = 0; o < this.bones.length; o++) { + var a = this.bones[o], + s = null, + c = a.getParent(); + if (c) { + var l = this.bones.indexOf(c); + s = r.bones[l]; + } + var u = new i.a(a.name, r, s, a.getBaseMatrix().clone(), a.getRestPose().clone()); + (u._index = a._index), a._linkedTransformNode && u.linkTransformNode(a._linkedTransformNode), h.a.DeepCopy(a.animations, u.animations); + } + if (this._ranges) + for (var d in ((r._ranges = {}), this._ranges)) { + var p = this._ranges[d]; + p && (r._ranges[d] = p.clone()); + } + return (this._isDirty = !0), r; + }), + (e.prototype.enableBlending = function (e) { + void 0 === e && (e = 0.01), + this.bones.forEach(function (t) { + t.animations.forEach(function (t) { + (t.enableBlending = !0), (t.blendingSpeed = e); + }); + }); + }), + (e.prototype.dispose = function () { + (this._meshesWithPoseMatrix = []), + this.getScene().stopAnimation(this), + this.getScene().removeSkeleton(this), + this._transformMatrixTexture && (this._transformMatrixTexture.dispose(), (this._transformMatrixTexture = null)); + }), + (e.prototype.serialize = function () { + var e = {}; + (e.name = this.name), (e.id = this.id), this.dimensionsAtRest && (e.dimensionsAtRest = this.dimensionsAtRest.asArray()), (e.bones = []), (e.needInitialSkinMatrix = this.needInitialSkinMatrix); + for (var t = 0; t < this.bones.length; t++) { + var n = this.bones[t], + i = n.getParent(), + r = { parentBoneIndex: i ? this.bones.indexOf(i) : -1, name: n.name, matrix: n.getBaseMatrix().toArray(), rest: n.getRestPose().toArray() }; + for (var o in (e.bones.push(r), + n.length && (r.length = n.length), + n.metadata && (r.metadata = n.metadata), + n.animations && n.animations.length > 0 && (r.animation = n.animations[0].serialize()), + (e.ranges = []), + this._ranges)) { + var a = this._ranges[o]; + if (a) { + var s = {}; + (s.name = o), (s.from = a.from), (s.to = a.to), e.ranges.push(s); + } + } + } + return e; + }), + (e.Parse = function (t, n) { + var r, + a = new e(t.name, t.id, n); + for (t.dimensionsAtRest && (a.dimensionsAtRest = o.e.FromArray(t.dimensionsAtRest)), a.needInitialSkinMatrix = t.needInitialSkinMatrix, r = 0; r < t.bones.length; r++) { + var c = t.bones[r], + l = null; + c.parentBoneIndex > -1 && (l = a.bones[c.parentBoneIndex]); + var u = c.rest ? o.a.FromArray(c.rest) : null, + h = new i.a(c.name, a, l, o.a.FromArray(c.matrix), u); + void 0 !== c.id && null !== c.id && (h.id = c.id), + c.length && (h.length = c.length), + c.metadata && (h.metadata = c.metadata), + c.animation && h.animations.push(s.a.Parse(c.animation)), + void 0 !== c.linkedTransformNodeId && null !== c.linkedTransformNodeId && ((a._hasWaitingData = !0), (h._waitingTransformNodeId = c.linkedTransformNodeId)); + } + if (t.ranges) + for (r = 0; r < t.ranges.length; r++) { + var d = t.ranges[r]; + a.createAnimationRange(d.name, d.from, d.to); + } + return a; + }), + (e.prototype.computeAbsoluteTransforms = function (e) { + void 0 === e && (e = !1); + var t = this._scene.getRenderId(); + (this._lastAbsoluteTransformsUpdateId != t || e) && (this.bones[0].computeAbsoluteTransforms(), (this._lastAbsoluteTransformsUpdateId = t)); + }), + (e.prototype.getPoseMatrix = function () { + var e = null; + return this._meshesWithPoseMatrix.length > 0 && (e = this._meshesWithPoseMatrix[0].getPoseMatrix()), e; + }), + (e.prototype.sortBones = function () { + for (var e = new Array(), t = new Array(this.bones.length), n = 0; n < this.bones.length; n++) this._sortBones(n, e, t); + this.bones = e; + }), + (e.prototype._sortBones = function (e, t, n) { + if (!n[e]) { + n[e] = !0; + var i = this.bones[e]; + void 0 === i._index && (i._index = e); + var r = i.getParent(); + r && this._sortBones(this.bones.indexOf(r), t, n), t.push(i); + } + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this.hoverCursor = ""), (this.actions = new Array()), (this.isRecursive = !1); + } + return ( + Object.defineProperty(e, "HasTriggers", { + get: function () { + for (var t in e.Triggers) if (e.Triggers.hasOwnProperty(t)) return !0; + return !1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e, "HasPickTriggers", { + get: function () { + for (var t in e.Triggers) + if (e.Triggers.hasOwnProperty(t)) { + var n = parseInt(t); + if (n >= 1 && n <= 7) return !0; + } + return !1; + }, + enumerable: !0, + configurable: !0, + }), + (e.HasSpecificTrigger = function (t) { + for (var n in e.Triggers) { + if (e.Triggers.hasOwnProperty(n)) if (parseInt(n) === t) return !0; + } + return !1; + }), + (e.Triggers = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "morphTargetsVertexGlobalDeclaration", + r = "#ifdef MORPHTARGETS\nuniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "morphTargetsVertexDeclaration", + r = + "#ifdef MORPHTARGETS\nattribute vec3 position{X};\n#ifdef MORPHTARGETS_NORMAL\nattribute vec3 normal{X};\n#endif\n#ifdef MORPHTARGETS_TANGENT\nattribute vec3 tangent{X};\n#endif\n#ifdef MORPHTARGETS_UV\nattribute vec2 uv_{X};\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i, + r, + o, + a, + s, + c, + l, + u = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + a = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, i); + else for (var s = e.length - 1; s >= 0; s--) (r = e[s]) && (a = (o < 3 ? r(a) : o > 3 ? r(t, n, a) : r(t, n)) || a); + return o > 3 && a && Object.defineProperty(t, n, a), a; + }, + h = + (this && this.__metadata) || + function (e, t) { + if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.TrackPiece = t.TrackPieceInfo = t.TrackCollisionInfo = t.CameraTransition = t.PathInfo = t.JsonVector3 = t.RegionZoneInfo = t.CoinPlacementSettings = t.RegionInfo = t.TutorialTrackPacing = t.TrackPacing = t.NewTrackPieceInfo = t.RunnerSpeedData = t.ZonePacingData = t.PieceData = t.TutorialMilestoneData = t.MilestoneData = t.TrackPieceDefinition = t.JunctionPostPiecesContainer = t.ExtraPieceDefinition = t.TrackVariationDefinition = t.TrackSection = t.QueuedTrackPiece = t.OnEnterPieceInfo = t.DeathTypes = t.CameraSettingsType = t.TrackTrigger = t.TutorialSoundEffectType = t.TutorialMessageDisplayType = t.BonusItemCategory = t.BonusItemType = t.CoinPlacement = t.TRGameRunnerGameplay = t.LedgeZoneTransition = t.TrackPieceCategory = t.TrackPieceSpecial = t.TrackPieceAttachType = t.TrackID = void 0), + n(176); + const d = n(177), + p = n(62), + f = n(232), + m = n(150), + g = n(214); + let b = (i = class { + isEquals(e) { + return e.RegionID == this.RegionID && e.ZoneID == this.ZoneID && e.PieceID == this.PieceID; + } + static create(e, t, n) { + const r = new i(); + return (r.RegionID = e), (r.ZoneID = t), (r.PieceID = n), r; + } + }); + var _, v, y, C, P, x, T, S, O, E, M, A; + u([d.jsonMember, h("design:type", Number)], b.prototype, "RegionID", void 0), + u([d.jsonMember, h("design:type", Number)], b.prototype, "ZoneID", void 0), + u([d.jsonMember, h("design:type", Number)], b.prototype, "PieceID", void 0), + (b = i = u([d.jsonObject], b)), + (t.TrackID = b), + (function (e) { + (e[(e.Normal = 0)] = "Normal"), (e[(e.Basic = 1)] = "Basic"); + })((_ = t.TrackPieceAttachType || (t.TrackPieceAttachType = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Start = 1)] = "Start"), (e[(e.End = 2)] = "End"); + })((v = t.TrackPieceSpecial || (t.TrackPieceSpecial = {}))), + (function (e) { + (e[(e.Normal = 0)] = "Normal"), + (e[(e.CompoundPieceStart = 1)] = "CompoundPieceStart"), + (e[(e.CompoundPieceMiddle = 2)] = "CompoundPieceMiddle"), + (e[(e.CompoundPieceEnd = 3)] = "CompoundPieceEnd"), + (e[(e.RegionTransitionStart = 4)] = "RegionTransitionStart"), + (e[(e.RegionTransitionEnd = 5)] = "RegionTransitionEnd"), + (e[(e.ZoneEntranceTransition = 6)] = "ZoneEntranceTransition"), + (e[(e.ZoneExitTransition = 7)] = "ZoneExitTransition"), + (e[(e.Total = 8)] = "Total"); + })((y = t.TrackPieceCategory || (t.TrackPieceCategory = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.LeftToRight = 1)] = "LeftToRight"), (e[(e.RightToLeft = 2)] = "RightToLeft"); + })((C = t.LedgeZoneTransition || (t.LedgeZoneTransition = {}))), + (function (e) { + (e[(e.Run = 0)] = "Run"), (e[(e.Ride = 1)] = "Ride"), (e[(e.WaterSlide = 2)] = "WaterSlide"), (e[(e.Luge = 3)] = "Luge"), (e[(e.DownHillSlide = 4)] = "DownHillSlide"); + })((P = t.TRGameRunnerGameplay || (t.TRGameRunnerGameplay = {}))), + (function (e) { + (e[(e.Left = 0)] = "Left"), + (e[(e.Center = 1)] = "Center"), + (e[(e.Right = 2)] = "Right"), + (e[(e.None = 3)] = "None"), + (e[(e.LeftOrCenter = 4)] = "LeftOrCenter"), + (e[(e.LeftOrRight = 5)] = "LeftOrRight"), + (e[(e.CenterOrRight = 6)] = "CenterOrRight"), + (e[(e.Any = 7)] = "Any"), + (e[(e.Default = 8)] = "Default"), + (e[(e.Total = 9)] = "Total"); + })((x = t.CoinPlacement || (t.CoinPlacement = {}))), + (function (e) { + (e[(e.Default = -2)] = "Default"), + (e[(e.None = -1)] = "None"), + (e[(e.Coin = 0)] = "Coin"), + (e[(e.CoinDouble = 1)] = "CoinDouble"), + (e[(e.CoinTriple = 2)] = "CoinTriple"), + (e[(e.Vacuum = 3)] = "Vacuum"), + (e[(e.Boost = 4)] = "Boost"), + (e[(e.Gem = 5)] = "Gem"), + (e[(e.MegaCoin = 6)] = "MegaCoin"), + (e[(e.Shield = 7)] = "Shield"), + (e[(e.Bolt = 8)] = "Bolt"), + (e[(e.Collectable = 9)] = "Collectable"), + (e[(e.ScoreBonus = 10)] = "ScoreBonus"), + (e[(e.TokenCharacter = 11)] = "TokenCharacter"), + (e[(e.TokenRegion = 12)] = "TokenRegion"), + (e[(e.TokenAttachment = 13)] = "TokenAttachment"); + })((T = t.BonusItemType || (t.BonusItemType = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Pickups = 1)] = "Pickups"), (e[(e.Coins = 2)] = "Coins"); + })((S = t.BonusItemCategory || (t.BonusItemCategory = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), + (e[(e.SwipeUpInstruction = 1)] = "SwipeUpInstruction"), + (e[(e.SwipeDownInstruction = 2)] = "SwipeDownInstruction"), + (e[(e.SwipeToTurn = 3)] = "SwipeToTurn"), + (e[(e.TiltInstruction = 4)] = "TiltInstruction"), + (e[(e.SwipeUp = 5)] = "SwipeUp"), + (e[(e.SwipeDown = 6)] = "SwipeDown"), + (e[(e.SwipeLeft = 7)] = "SwipeLeft"), + (e[(e.SwipeRight = 8)] = "SwipeRight"), + (e[(e.TiltLeft = 9)] = "TiltLeft"), + (e[(e.TiltRight = 10)] = "TiltRight"), + (e[(e.DoubleTapInstruction = 11)] = "DoubleTapInstruction"), + (e[(e.NiceJobText = 12)] = "NiceJobText"), + (e[(e.YouAreReadyText = 13)] = "YouAreReadyText"), + (e[(e.SwipeUpAndTiltInstruction = 14)] = "SwipeUpAndTiltInstruction"), + (e[(e.SwipeUpAndTiltRight = 15)] = "SwipeUpAndTiltRight"), + (e[(e.SwipeUpAndTiltLeft = 16)] = "SwipeUpAndTiltLeft"), + (e[(e.CustomMessageFadeGrow = 17)] = "CustomMessageFadeGrow"), + (e[(e.CustomMessageBounce = 18)] = "CustomMessageBounce"), + (e[(e.UnlockPowerMeter = 19)] = "UnlockPowerMeter"); + })((O = t.TutorialMessageDisplayType || (t.TutorialMessageDisplayType = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.ScoreBlast = 1)] = "ScoreBlast"), (e[(e.Wooosh = 2)] = "Wooosh"); + })((E = t.TutorialSoundEffectType || (t.TutorialSoundEffectType = {}))), + (function (e) { + (e[(e.None = 0)] = "None"), + (e[(e.CameraTransition = 1)] = "CameraTransition"), + (e[(e.Water = 2)] = "Water"), + (e[(e.MissedTurn = 3)] = "MissedTurn"), + (e[(e.Obstacle = 4)] = "Obstacle"), + (e[(e.Stumble = 5)] = "Stumble"), + (e[(e.FallSaver = 6)] = "FallSaver"), + (e[(e.Shadow = 7)] = "Shadow"), + (e[(e.WaterSlideZoneStart = 8)] = "WaterSlideZoneStart"), + (e[(e.WaterSlideZoneStop = 9)] = "WaterSlideZoneStop"), + (e[(e.ZipLineLetGo = 10)] = "ZipLineLetGo"), + (e[(e.AnimationStart = 11)] = "AnimationStart"), + (e[(e.MineCartZoneStart = 12)] = "MineCartZoneStart"), + (e[(e.MineCartZoneStop = 13)] = "MineCartZoneStop"), + (e[(e.ForestZoneStart = 14)] = "ForestZoneStart"), + (e[(e.ForestZoneStop = 15)] = "ForestZoneStop"), + (e[(e.NarrowZoneStart = 16)] = "NarrowZoneStart"), + (e[(e.NarrowZoneStop = 17)] = "NarrowZoneStop"); + })((M = t.TrackTrigger || (t.TrackTrigger = {}))), + (function (e) { + (e[(e.Default = 0)] = "Default"), (e[(e.Inherit = 1)] = "Inherit"), (e[(e.Custom = 2)] = "Custom"); + })(t.CameraSettingsType || (t.CameraSettingsType = {})), + (function (e) { + (e[(e.Fall = 0)] = "Fall"), + (e[(e.Eaten = 1)] = "Eaten"), + (e[(e.Fire = 2)] = "Fire"), + (e[(e.MineDuck = 3)] = "MineDuck"), + (e[(e.MineLedge = 4)] = "MineLedge"), + (e[(e.Mine = 5)] = "Mine"), + (e[(e.Wheel = 6)] = "Wheel"), + (e[(e.WaterLeft = 7)] = "WaterLeft"), + (e[(e.Ledge = 8)] = "Ledge"), + (e[(e.SceneryTree = 9)] = "SceneryTree"), + (e[(e.SceneryRock = 10)] = "SceneryRock"), + (e[(e.DeathThrow = 11)] = "DeathThrow"), + (e[(e.None = 12)] = "None"), + (e[(e.WaterRight = 13)] = "WaterRight"); + })((A = t.DeathTypes || (t.DeathTypes = {}))); + let I = class { + constructor() { + (this.TutorialMessageType = O.None), + (this.DisplayMessageText = ""), + (this.SetPlayerPowerPointsToMax = 0), + (this.ForceCoinsPlacementOnTrackPiece = 0), + (this.CoinPlacementLocation = x.None), + (this.PickupTypeToPlace = T.None), + (this.TutorialSoundEffect = E.None); + } + }; + u([d.jsonMember, h("design:type", Number)], I.prototype, "TutorialMessageType", void 0), + u([d.jsonMember, h("design:type", String)], I.prototype, "DisplayMessageText", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "SetPlayerPowerPointsToMax", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "ForceCoinsPlacementOnTrackPiece", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "CoinPlacementLocation", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "ForcePickupPlacementOnTrackPiece", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "PickupTypeToPlace", void 0), + u([d.jsonMember, h("design:type", Number)], I.prototype, "TutorialSoundEffect", void 0), + (I = u([d.jsonObject], I)), + (t.OnEnterPieceInfo = I); + let D = class { + constructor(e, t) { + (this.Attach = _.Normal), (this.EnterPiece = new I()), (this.ID = e), (this.Variation = t); + } + }; + u([d.jsonMember, h("design:type", b)], D.prototype, "ID", void 0), + u([d.jsonMember, h("design:type", String)], D.prototype, "Variation", void 0), + u([d.jsonMember, h("design:type", Number)], D.prototype, "Attach", void 0), + u([d.jsonMember, h("design:type", I)], D.prototype, "EnterPiece", void 0), + (D = u([d.jsonObject, h("design:paramtypes", [b, String])], D)), + (t.QueuedTrackPiece = D); + let R = class { + constructor() { + (this.Pieces = []), (this.TrackLoop = 0); + } + }; + u([d.jsonArrayMember(D), h("design:type", Array)], R.prototype, "Pieces", void 0), u([d.jsonMember, h("design:type", Number)], R.prototype, "TrackLoop", void 0), (R = u([d.jsonObject], R)), (t.TrackSection = R); + let w = class { + constructor() { + (this.PoolPreloadAmount = 0), (this.Frequency = 0), (this.CoinPlacement = x.None), (this.CanSpawnPowerup = 0); + } + }; + u([d.jsonMember, h("design:type", String)], w.prototype, "PieceName", void 0), + u([d.jsonMember, h("design:type", String)], w.prototype, "PiecePath", void 0), + u([d.jsonMember, h("design:type", Number)], w.prototype, "PoolPreloadAmount", void 0), + u([d.jsonMember, h("design:type", Number)], w.prototype, "Frequency", void 0), + u([d.jsonMember, h("design:type", Number)], w.prototype, "CoinPlacement", void 0), + u([d.jsonMember, h("design:type", Number)], w.prototype, "CanSpawnPowerup", void 0), + (w = u([d.jsonObject], w)), + (t.TrackVariationDefinition = w); + let L = (r = class { + constructor() { + (this.OverrideCoinPlacement = 0), (this.CoinPlacement = x.None), (this.OverrideCanSpawnPowerup = 0), (this.CanSpawnPowerup = 0); + } + }); + (L.default = new r()), + u([d.jsonMember, h("design:type", b)], L.prototype, "ID", void 0), + u([d.jsonMember, h("design:type", String)], L.prototype, "VariationName", void 0), + u([d.jsonMember, h("design:type", Number)], L.prototype, "OverrideCoinPlacement", void 0), + u([d.jsonMember, h("design:type", Number)], L.prototype, "CoinPlacement", void 0), + u([d.jsonMember, h("design:type", Number)], L.prototype, "OverrideCanSpawnPowerup", void 0), + u([d.jsonMember, h("design:type", Number)], L.prototype, "CanSpawnPowerup", void 0), + (L = r = u([d.jsonObject], L)), + (t.ExtraPieceDefinition = L); + let F = class { + constructor() { + this.PathPostPieces = []; + } + }; + u([d.jsonArrayMember(L), h("design:type", Array)], F.prototype, "PathPostPieces", void 0), (F = u([d.jsonObject], F)), (t.JunctionPostPiecesContainer = F); + let N = class { + constructor() { + (this.DisplayName = "INVALID"), + (this.Name = "INVALID"), + (this.ID = new b()), + (this.IsTurnLeft = 0), + (this.IsTurnRight = 0), + (this.IsJunction = 0), + (this.IsYJunction = 0), + (this.IsOptionalJunction = 0), + (this.IsSlideUnder = 0), + (this.IsJumpOver = 0), + (this.IsStumble = 0), + (this.IsLedgeLeft = 0), + (this.IsLedgeRight = 0), + (this.IsLedgeCenter = 0), + (this.IsStairs = 0), + (this.IsCurveLeft = 0), + (this.IsCurveRight = 0), + (this.IsMine = 0), + (this.IsZipLine = 0), + (this.IsWaterSlide = 0), + (this.IsNarrow = 0), + (this.IsGenericObstacle = 0), + (this.AllowDoubleObstacle = 1), + (this.LedgeZoneTransitionType = C.None), + (this.DifficultyLevel = 0), + (this.SelectionOdds = 1), + (this.Variations = []), + (this.PrePieces = []), + (this.PostPieces = []), + (this.CompoundPieceMinMiddleCount = 1), + (this.CompoundPieceMaxMiddleCount = 1), + (this.TotalPossibleFrequencies = 100), + (this.LedgeLeftOrRightIsObstacle = !0), + (this.LastChosenVariation = -1), + (this.TotalFrequencies = 0); + } + initialize() { + let e = !1; + for (let t = 0; t < this.Variations.length; t++) + if (this.Variations[t].Frequency > 0) { + e = !0; + break; + } + if (0 == e) { + const e = this.TotalPossibleFrequencies / this.Variations.length; + for (let t = 0; t < this.Variations.length; t++) this.Variations[t].Frequency = e; + } + this.TotalFrequencies = 0; + for (let e = 0; e < this.Variations.length; e++) this.TotalFrequencies += this.Variations[e].Frequency; + this.IsNarrow = this.DisplayName.includes("Narrow") || this.DisplayName.includes("narrow") ? 1 : 0; + } + isAnyJunction() { + return !!this.IsJunction || !!this.IsYJunction; + } + isCompoundStart() { + return this.CategoryType == y.CompoundPieceStart; + } + isEnd() { + return this.SpecialType == v.End; + } + getVariation() { + if (1 == this.Variations.length) this.LastChosenVariation = 0; + else { + let e = this.TotalFrequencies; + this.LastChosenVariation >= 0 && (e -= this.Variations[this.LastChosenVariation].Frequency); + let t = m.Utils.random(0, e); + for (let e = 0; e < this.Variations.length; e++) + if (e != this.LastChosenVariation && ((t -= this.Variations[e].Frequency), t < 0)) { + this.LastChosenVariation = e; + break; + } + } + return this.Variations[this.LastChosenVariation]; + } + isLeftOrRightTurn() { + return !!this.IsTurnLeft || !!this.IsTurnRight; + } + isMandatoryTurn() { + return (this.isAnyJunction() || this.isLeftOrRightTurn()) && 0 == !!this.IsOptionalJunction; + } + isObstacle() { + const e = this.LedgeZoneTransitionType == C.LeftToRight || this.LedgeZoneTransitionType == C.RightToLeft || (this.LedgeLeftOrRightIsObstacle && (!!this.IsLedgeLeft || !!this.IsLedgeRight)); + return !!this.IsSlideUnder || !!this.IsJumpOver || !!this.IsStumble || !!this.IsZipLine || !!this.IsGenericObstacle || e; + } + isZoneTransition() { + return this.CategoryType == y.ZoneEntranceTransition || this.CategoryType == y.ZoneExitTransition; + } + isTurn() { + return this.isAnyJunction() || this.isLeftOrRightTurn(); + } + }; + (N.MainPathID = 0), + u([d.jsonMember, h("design:type", String)], N.prototype, "DisplayName", void 0), + u([d.jsonMember, h("design:type", String)], N.prototype, "Name", void 0), + u([d.jsonMember, h("design:type", b)], N.prototype, "ID", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "SpecialType", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "CategoryType", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "DeathType", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "DeathShakeCamera", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsTurnLeft", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsTurnRight", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsJunction", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsYJunction", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsOptionalJunction", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsSlideUnder", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsJumpOver", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsStumble", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsLedgeLeft", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsLedgeRight", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsLedgeCenter", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsStairs", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsCurveLeft", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsCurveRight", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsMine", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsZipLine", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsWaterSlide", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsNarrow", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "IsGenericObstacle", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "AllowDoubleObstacle", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "LedgeZoneTransitionType", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "DifficultyLevel", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "SelectionOdds", void 0), + u([d.jsonMember, h("design:type", b)], N.prototype, "CompoundPieceMiddleType", void 0), + u([d.jsonMember, h("design:type", b)], N.prototype, "CompoundPieceEndType", void 0), + u([d.jsonArrayMember(w), h("design:type", Array)], N.prototype, "Variations", void 0), + u([d.jsonArrayMember(L), h("design:type", Array)], N.prototype, "PrePieces", void 0), + u([d.jsonArrayMember(L), h("design:type", Array)], N.prototype, "PostPieces", void 0), + u([d.jsonArrayMember(F), h("design:type", Array)], N.prototype, "JunctionPostPieces", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "CompoundPieceMinMiddleCount", void 0), + u([d.jsonMember, h("design:type", Number)], N.prototype, "CompoundPieceMaxMiddleCount", void 0), + (N = u([d.jsonObject()], N)), + (t.TrackPieceDefinition = N); + let k = class { + constructor() { + (this.Distance = 0), + (this.MaxTrackPieceDifficulty = 1), + (this.AllowCoins = 1), + (this.MinDistanceBetweenCoinRuns = 80), + (this.MaxCoinsPerRun = 25), + (this.AllowTurns = 1), + (this.MinDistanceBetweenTurns = 30), + (this.MaxDistanceBetweenTurns = 60), + (this.AllowTurnAfterObstacle = 0), + (this.MinDistanceAfterTurnForObstacle = 30), + (this.DistanceToFastTurnSection = 1e3), + (this.MaxDistanceForFastTurnSection = 100), + (this.AllowObstacles = 0), + (this.MinDistanceBetweenObstacles = 20), + (this.MaxDistanceBetweenObstacles = 40), + (this.MaxBackToBackObstacles = 1), + (this.DoubleObstaclePercent = 0), + (this.AllowOptionalTurns = 1), + (this.MinDistanceBetweenOptionalTurns = 30); + } + }; + u([d.jsonMember, h("design:type", Number)], k.prototype, "Distance", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxTrackPieceDifficulty", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "AllowCoins", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MinDistanceBetweenCoinRuns", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxCoinsPerRun", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "AllowTurns", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MinDistanceBetweenTurns", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxDistanceBetweenTurns", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "AllowTurnAfterObstacle", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MinDistanceAfterTurnForObstacle", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "DistanceToFastTurnSection", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxDistanceForFastTurnSection", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "AllowObstacles", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MinDistanceBetweenObstacles", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxDistanceBetweenObstacles", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MaxBackToBackObstacles", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "DoubleObstaclePercent", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "AllowOptionalTurns", void 0), + u([d.jsonMember, h("design:type", Number)], k.prototype, "MinDistanceBetweenOptionalTurns", void 0), + (k = u([d.jsonObject], k)), + (t.MilestoneData = k); + let z = class { + constructor() { + (this.TutorialMilestoneName = "Tutorial Milestone Desc"), (this.TutorialStep = 0), (this.TutorialTrackQueue = new R()), (this.AllowCoins = 0), (this.MilestoneCompleteAnalyticsEventName = ""); + } + }; + u([d.jsonMember, h("design:type", String)], z.prototype, "TutorialMilestoneName", void 0), + u([d.jsonMember, h("design:type", Number)], z.prototype, "TutorialStep", void 0), + u([d.jsonMember, h("design:type", R)], z.prototype, "TutorialTrackQueue", void 0), + u([d.jsonMember, h("design:type", Number)], z.prototype, "AllowCoins", void 0), + u([d.jsonMember, h("design:type", String)], z.prototype, "MilestoneCompleteAnalyticsEventName", void 0), + (z = u([d.jsonObject], z)), + (t.TutorialMilestoneData = z); + let j = class { + constructor() { + (this.Difficulty = 0), (this.SelectionChance = 0); + } + }; + u([d.jsonMember, h("design:type", b)], j.prototype, "ID", void 0), + u([d.jsonMember, h("design:type", Number)], j.prototype, "Difficulty", void 0), + u([d.jsonMember, h("design:type", Number)], j.prototype, "SelectionChance", void 0), + (j = u([d.jsonObject], j)), + (t.PieceData = j); + let B = class { + constructor() { + (this.RegionID = -1), (this.ZoneID = -1), (this.MinLength = 100); + } + }; + u([d.jsonMember, h("design:type", Number)], B.prototype, "RegionID", void 0), + u([d.jsonMember, h("design:type", Number)], B.prototype, "ZoneID", void 0), + u([d.jsonMember, h("design:type", Number)], B.prototype, "MinLength", void 0), + u([d.jsonArrayMember(j), h("design:type", Array)], B.prototype, "Pieces", void 0), + u([d.jsonArrayMember(k), h("design:type", Array)], B.prototype, "Milestones", void 0), + (B = u([d.jsonObject], B)), + (t.ZonePacingData = B); + let V = class {}; + u([d.jsonMember, h("design:type", Number)], V.prototype, "PercentageOfMaxSpeed", void 0), u([d.jsonMember, h("design:type", Number)], V.prototype, "ForceToAdd", void 0), (V = u([d.jsonObject], V)), (t.RunnerSpeedData = V); + t.NewTrackPieceInfo = class { + setAllMembersNull() { + (this.Definition = void 0), (this.Piece = void 0), (this.Queue = void 0), (this.Pacing = void 0); + } + areAllMembersNull() { + return null == this.Definition && null == this.Piece && null == this.Queue && null == this.Pacing; + } + }; + let G = (o = class { + constructor() { + (this.RegionID = -1), + (this.MinDistanceBetweenBaseZoneChange = 350), + (this.Milestones = []), + (this.ZonePacing = []), + (this.ActiveMilestone = new k()), + (this.ActiveZonePacing = new B()), + (this.MaxPossibleDefinitions = 100), + (this.AvailablePieceDefinitions = new Array(this.MaxPossibleDefinitions)), + (this.IsFastTurnSection = !1), + (this.NextMilestoneIndex = 0), + (this.DistanceTraveled = 0); + } + initialize(e) { + (this.ActiveMilestone = new k()), + (this.ActiveZonePacing = new B()), + (this.AvailablePieceDefinitions = new Array(this.MaxPossibleDefinitions)), + (this.IsFastTurnSection = !1), + (this.NextMilestoneIndex = 0), + (this.DistanceTraveled = 0), + this.selectNextMilestone(!1, !0); + for (const t of this.ZonePacing) + for (const [, n] of e) + if (null != n && n.ID == t.ZoneID) { + t.Pieces.length > 0 && (t.Pieces.length, n.Definitions.length); + for (const e of t.Pieces) + for (const t of n.Definitions) + if (e.ID.isEquals(t.ID)) { + (t.SelectionOdds = e.SelectionChance), (t.DifficultyLevel = e.Difficulty); + break; + } + } + } + updatePacing() {} + findZonePacing(e) { + let t; + for (let n = 0; n < this.ZonePacing.length; ++n) + if (this.ZonePacing[n].ZoneID == e) { + t = this.ZonePacing[n]; + break; + } + return t; + } + selectNextMilestone(e = !1, t = !1) { + if ((e && --this.NextMilestoneIndex, t && (this.NextMilestoneIndex = 0), this.NextMilestoneIndex < 0 && (this.NextMilestoneIndex = 0), this.NextMilestoneIndex >= this.Milestones.length)) return; + const n = this.Milestones[this.NextMilestoneIndex]; + (this.ActiveMilestone = Object.assign(new k(), n)), this.NextMilestoneIndex++; + } + static fromJson(e) { + return g.TypedJSONProvider.instance().get(o).parse(e); + } + }); + u([d.jsonMember, h("design:type", Number)], G.prototype, "RegionID", void 0), + u([d.jsonMember, h("design:type", R)], G.prototype, "StartingSection", void 0), + u([d.jsonMember, h("design:type", Number)], G.prototype, "MinDistanceBetweenBaseZoneChange", void 0), + u([d.jsonArrayMember(k), h("design:type", Array)], G.prototype, "Milestones", void 0), + u([d.jsonArrayMember(B), h("design:type", Array)], G.prototype, "ZonePacing", void 0), + u([d.jsonArrayMember(V), h("design:type", Array)], G.prototype, "RunnerSpeed", void 0), + u([d.jsonArrayMember(V), h("design:type", Array)], G.prototype, "RunnerSpeedAfterResurrect", void 0), + (G = o = u([d.jsonObject], G)), + (t.TrackPacing = G); + let U = class extends G { + constructor() { + super(...arguments), (this.TutorialEnabled = !1); + } + }; + u([d.jsonArrayMember(z), h("design:type", Array)], U.prototype, "TutorialMilestones", void 0), (U = u([d.jsonObject], U)), (t.TutorialTrackPacing = U); + let H = (a = class { + constructor() { + (this.GrowDistance = 80), (this.CullDistance = 60); + } + static fromJson(e) { + return g.TypedJSONProvider.instance().get(a).parse(e); + } + }); + u([d.jsonMember, h("design:type", String)], H.prototype, "Name", void 0), + u([d.jsonMember, h("design:type", Number)], H.prototype, "ID", void 0), + u([d.jsonMember, h("design:type", String)], H.prototype, "DisplayName", void 0), + u([d.jsonMember, h("design:type", Number)], H.prototype, "GrowDistance", void 0), + u([d.jsonMember, h("design:type", Number)], H.prototype, "CullDistance", void 0), + u([d.jsonMember, h("design:type", R)], H.prototype, "StartingSection", void 0), + u([d.jsonMember, h("design:type", String)], H.prototype, "DefaultPacingPath", void 0), + u([d.jsonMember, h("design:type", G)], H.prototype, "FreePreviewPacing", void 0), + u([d.jsonMember, h("design:type", String)], H.prototype, "SkyboxPath", void 0), + u([d.jsonMember, h("design:type", String)], H.prototype, "ChaserPath", void 0), + (H = a = u([d.jsonObject], H)), + (t.RegionInfo = H); + let W = class { + constructor() { + (this.SmartPlacement = 0), (this.UseTrackDefinitonsForAllowingCoins = 0), (this.HeightAboveGround = 0), (this.MaxHorizontalOffset = 0), (this.UseTrackDefinitonsForAllowingBonus = 0), (this.BonusItemHeightAboveGround = 0); + } + }; + u([d.jsonMember, h("design:type", Number)], W.prototype, "SmartPlacement", void 0), + u([d.jsonMember, h("design:type", Number)], W.prototype, "UseTrackDefinitonsForAllowingCoins", void 0), + u([d.jsonMember, h("design:type", Number)], W.prototype, "HeightAboveGround", void 0), + u([d.jsonMember, h("design:type", Number)], W.prototype, "MaxHorizontalOffset", void 0), + u([d.jsonMember, h("design:type", Number)], W.prototype, "UseTrackDefinitonsForAllowingBonus", void 0), + u([d.jsonMember, h("design:type", Object)], W.prototype, "BonusItemHeightAboveGround", void 0), + (W = u([d.jsonObject], W)), + (t.CoinPlacementSettings = W); + let X = (s = class { + constructor() { + (this.AllowObstacleDuringFastTurn = 0), (this.TransitionToZoneSupported = 1), (this.IsLedgeZone = 0), (this.Gameplay = P.Run); + } + getEndPiece() { + if ((null == this.EndPieces && (this.EndPieces = new Array()), this.EndPieces.length < 1)) + for (let e = 0; e < this.Definitions.length; ++e) { + const t = this.Definitions[e]; + null != t && 1 == t.isEnd() && this.EndPieces.push(t); + } + if (this.EndPieces.length > 0) { + if (1 == this.EndPieces.length) return this.EndPieces[0]; + { + const e = m.Utils.random(0, this.EndPieces.length); + if (e > -1 && e < this.EndPieces.length) return this.EndPieces[e]; + } + } + } + static fromJson(e) { + return g.TypedJSONProvider.instance().get(s).parse(e); + } + }); + u([d.jsonMember, h("design:type", String)], X.prototype, "Name", void 0), + u([d.jsonMember, h("design:type", Number)], X.prototype, "ID", void 0), + u([d.jsonArrayMember(N), h("design:type", Array)], X.prototype, "Definitions", void 0), + u([d.jsonMember, h("design:type", U)], X.prototype, "TutorialPacing", void 0), + u([d.jsonMember, h("design:type", Number)], X.prototype, "AllowObstacleDuringFastTurn", void 0), + u([d.jsonMember, h("design:type", Number)], X.prototype, "TransitionToZoneSupported", void 0), + u([d.jsonMember, h("design:type", Number)], X.prototype, "IsLedgeZone", void 0), + u([d.jsonMember, h("design:type", W)], X.prototype, "CoinSettings", void 0), + u([d.jsonMember, h("design:type", Number)], X.prototype, "Gameplay", void 0), + (X = s = u([d.jsonObject], X)), + (t.RegionZoneInfo = X); + let Y = class { + toVector3() { + return new p.Vector3(this.x, this.y, this.z); + } + }; + u([d.jsonMember, h("design:type", Number)], Y.prototype, "x", void 0), + u([d.jsonMember, h("design:type", Number)], Y.prototype, "y", void 0), + u([d.jsonMember, h("design:type", Number)], Y.prototype, "z", void 0), + (Y = u([d.jsonObject], Y)), + (t.JsonVector3 = Y); + let K = class { + constructor() { + (this.SourcePath = []), (this.EstimatedPathLength = 0), (this.SourceLastYRot = 0), (this.GeneratedPath = []), (this.GeneratedEstimatedPathLength = 0), (this.GeneratedLastYRot = 0), (this.GeneratedSmoothing = 1); + } + onDeserialized() { + for (const e of this.SourcePathList) this.SourcePath.push(e.toVector3()); + for (const e of this.GeneratedPathList) this.GeneratedPath.push(e.toVector3()); + } + }; + u([d.jsonArrayMember(Y, { name: "SourcePath" }), h("design:type", Array)], K.prototype, "SourcePathList", void 0), + u([d.jsonMember, h("design:type", Number)], K.prototype, "EstimatedPathLength", void 0), + u([d.jsonMember, h("design:type", Number)], K.prototype, "SourceLastYRot", void 0), + u([d.jsonArrayMember(Y, { name: "GeneratedPath" }), h("design:type", Array)], K.prototype, "GeneratedPathList", void 0), + u([d.jsonMember, h("design:type", Number)], K.prototype, "GeneratedEstimatedPathLength", void 0), + u([d.jsonMember, h("design:type", Number)], K.prototype, "GeneratedLastYRot", void 0), + u([d.jsonMember, h("design:type", Number)], K.prototype, "GeneratedSmoothing", void 0), + (K = u([d.jsonObject({ onDeserialized: "onDeserialized" })], K)), + (t.PathInfo = K); + let Z = class { + onDeserialized() { + (this.CameraFixedRotation = this.CameraFixedRotationLocal.toVector3()), + (this.CameraFocusRotation = this.CameraFocusRotationLocal.toVector3()), + (this.CameraFollowOffset = this.CameraFollowOffsetLocal.toVector3()), + (this.CameraFocusOffset = this.CameraFocusOffsetLocal.toVector3()); + } + }; + u([d.jsonMember({ name: "CameraFixedRotation" }), h("design:type", Y)], Z.prototype, "CameraFixedRotationLocal", void 0), + u([d.jsonMember({ name: "CameraFocusRotation" }), h("design:type", Y)], Z.prototype, "CameraFocusRotationLocal", void 0), + u([d.jsonMember({ name: "CameraFollowOffset" }), h("design:type", Y)], Z.prototype, "CameraFollowOffsetLocal", void 0), + u([d.jsonMember({ name: "CameraFocusOffset" }), h("design:type", Y)], Z.prototype, "CameraFocusOffsetLocal", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "CameraFollowDistance", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "CameraFocusDistance", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "CameraPitchHeight", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "CameraChangeRate", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FocusRotationSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FixedRotationSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FollowOffsetSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FocusOffsetSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FollowDistanceSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "FocusDistanceSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "PitchHeightSettings", void 0), + u([d.jsonMember, h("design:type", Number)], Z.prototype, "ChangeRateSettings", void 0), + (Z = u([d.jsonObject({ onDeserialized: "onDeserialized" })], Z)), + (t.CameraTransition = Z); + let q = class { + constructor() { + (this.Trigger = M.None), (this.DeathType = A.None), (this.ShakeCamera = 0); + } + }; + u([d.jsonMember, h("design:type", Number)], q.prototype, "Trigger", void 0), + u([d.jsonMember, h("design:type", Number)], q.prototype, "DeathType", void 0), + u([d.jsonMember, h("design:type", Number)], q.prototype, "ShakeCamera", void 0), + u([d.jsonMember, h("design:type", Z)], q.prototype, "Transition", void 0), + (q = u([d.jsonObject], q)), + (t.TrackCollisionInfo = q); + let Q = (c = class { + constructor() { + (this.DeathType = A.None), (this.DeathShakeCamera = 0), (this.TriggerDistance = 35); + } + static fromJson(e) { + return g.TypedJSONProvider.instance().get(c).parse(e); + } + }); + u([d.jsonMember, h("design:type", Number)], Q.prototype, "DeathType", void 0), + u([d.jsonMember, h("design:type", Number)], Q.prototype, "DeathShakeCamera", void 0), + u([d.jsonMember, h("design:type", Number)], Q.prototype, "TriggerDistance", void 0), + u([d.jsonMember, h("design:type", q)], Q.prototype, "CollisionInfo", void 0), + u([d.jsonMember, h("design:type", I)], Q.prototype, "EnterPiece", void 0), + u([d.jsonArrayMember(K), h("design:type", Array)], Q.prototype, "Paths", void 0), + (Q = c = u([d.jsonObject], Q)), + (t.TrackPieceInfo = Q); + let J = (l = class { + constructor() { + (this.Queue = new R()), + (this.NextTrackPieces = new Array(2)), + (this.DistanceFromRoot = 0), + (this.WorldRotationY = 0), + (this.CurrCoinPlacement = x.None), + (this.CurrCanSpawnPowerup = !1), + (this.PlacedBonusItemCategory = S.None), + (this.IsDeadEnd = !1), + (this.selectedPathId = 0), + (this.trackPaths = []), + (this.TrackZoneChangeDistance = !0), + (this.DistanceSinceLastMandatoryTurn = 0), + (this.BackToBackObstacleCount = 0), + (this.DistanceSinceLastObstacle = 0), + (this.DistanceSinceLastOptionalTurn = 0), + (this.DistanceSinceLastZoneChange = 0), + (this.DistanceSinceLastObstacleSlideJumpStumble = 0), + (this.DistanceSinceLastTurnLeftOrRight = 0), + (this.DistanceSinceLastJunction = 0), + (this.DistanceSinceLastZipline = 0), + (this.DistanceSinceLastBonusItem = 0), + (this.DistanceSinceLastCoinRun = 0), + (this.CoinRunCoinCount = 0), + (this.LastCoinPlacement = x.None), + (this.LastCoinPlacementHeight = l.DefaultCoinPlacementHeight), + (this.coinsList = []), + (this.tutorialStepDone = !1), + (this.tutorialMilestoneIndex = 0), + (this.triggerAnimations = new Map()); + } + getEstimatedLength(e = 0) { + return this.trackInfo.Paths[e].EstimatedPathLength; + } + getSourceLastRotY(e = 0) { + return this.trackInfo.Paths[e].SourceLastYRot; + } + getNumPaths() { + return this.trackInfo.Paths.length; + } + firstPointFromPath(e = 0) { + return this.trackInfo.Paths[e].SourcePath[0]; + } + lastPointFromPath(e = 0) { + const t = this.trackInfo.Paths[e].SourcePath.length; + return this.trackInfo.Paths[e].SourcePath[t - 1]; + } + isDeadEnd() { + return this.SelectedDefinition.isEnd() || this.IsDeadEnd; + } + setNextTrackPiece(e, t) { + (this.NextTrackPieces[e] = t), (t.PreviousTrackPiece = this); + } + getStartDirection() { + const e = this.trackPaths[this.selectedPathId]; + return e[1].subtract(e[0]); + } + getNextTrackPiecesLength() { + return null == this.NextTrackPieces[0] ? 0 : null == this.NextTrackPieces[1] ? 1 : 2; + } + changeMeshesStateForPowerup(e) { + this.assetInfo.fillMeshes.forEach((t) => { + t.checkCollisions = e > 0.01; + }); + } + updateStats(e) { + const t = this.getEstimatedLength(); + 0 == !!this.SelectedDefinition.IsSlideUnder && 0 == !!this.SelectedDefinition.IsJumpOver && 0 == !!this.SelectedDefinition.IsStumble + ? (this.DistanceSinceLastObstacleSlideJumpStumble = e.DistanceSinceLastObstacleSlideJumpStumble + t) + : (this.DistanceSinceLastObstacleSlideJumpStumble = 0), + 0 == !!this.SelectedDefinition.IsTurnLeft && 0 == !!this.SelectedDefinition.IsTurnRight ? (this.DistanceSinceLastTurnLeftOrRight = e.DistanceSinceLastTurnLeftOrRight + t) : (this.DistanceSinceLastTurnLeftOrRight = 0), + 0 == this.SelectedDefinition.isAnyJunction() ? (this.DistanceSinceLastJunction = e.DistanceSinceLastJunction + t) : (this.DistanceSinceLastJunction = 0), + 0 == this.SelectedDefinition.isMandatoryTurn() ? (this.DistanceSinceLastMandatoryTurn = e.DistanceSinceLastMandatoryTurn + t) : (this.DistanceSinceLastMandatoryTurn = 0), + 0 == !!this.SelectedDefinition.IsOptionalJunction && 0 == this.SelectedDefinition.isZoneTransition() + ? (this.DistanceSinceLastOptionalTurn = e.DistanceSinceLastOptionalTurn + t) + : (this.DistanceSinceLastOptionalTurn = 0), + this.SelectedDefinition.IsZipLine ? (this.DistanceSinceLastZipline = 0) : (this.DistanceSinceLastZipline = e.DistanceSinceLastZipline + t), + 0 == this.SelectedDefinition.isObstacle() ? (this.DistanceSinceLastObstacle = e.DistanceSinceLastObstacle + t) : ((this.DistanceSinceLastObstacle = 0), (this.BackToBackObstacleCount = 0)), + this.SelectedDefinition.isZoneTransition() ? (this.DistanceSinceLastZoneChange = 0) : this.TrackZoneChangeDistance && (this.DistanceSinceLastZoneChange = e.DistanceSinceLastZoneChange + t), + this.SelectedDefinition.isObstacle() && e.SelectedDefinition.isObstacle() && (this.BackToBackObstacleCount = e.BackToBackObstacleCount + 1); + } + updateItemDistanceStats() { + const e = this.getEstimatedLength(); + null != this.PreviousTrackPiece + ? ((this.DistanceSinceLastBonusItem = this.PreviousTrackPiece.DistanceSinceLastBonusItem + e), (this.DistanceSinceLastCoinRun = this.PreviousTrackPiece.DistanceSinceLastCoinRun + e)) + : ((this.DistanceSinceLastBonusItem = 0), (this.DistanceSinceLastCoinRun = 0)); + } + updateCoinStats(e, t) { + e && + null != this.PreviousTrackPiece && + this.PreviousTrackPiece.CoinRunCoinCount < t && + ((this.CoinRunCoinCount = this.PreviousTrackPiece.CoinRunCoinCount), + (this.LastCoinPlacement = this.PreviousTrackPiece.LastCoinPlacement), + (this.LastCoinPlacementHeight = this.PreviousTrackPiece.LastCoinPlacementHeight)); + } + updateStatsAfterItemsAdded(e, t, n) { + e && (this.DistanceSinceLastBonusItem = 0), + !t && + null != this.PreviousTrackPiece && + this.PreviousTrackPiece.CoinRunCoinCount > 0 && + ((this.PreviousTrackPiece.DistanceSinceLastCoinRun = 0), + (this.DistanceSinceLastCoinRun = this.getEstimatedLength()), + (this.CoinRunCoinCount = 0), + (this.LastCoinPlacement = x.None), + (this.LastCoinPlacementHeight = n)); + } + dispose() { + (this.NextTrackPieces = void 0), (this.PreviousTrackPiece = void 0), (this.Queue = void 0), (this.Pacing = void 0), (this.triggerAnimations = void 0), (this.coinsList = []); + } + }); + (J.DefaultCoinPlacementHeight = 0.5), + (J.BonusLedgeLeftRightAdjust = 0.375), + u([d.jsonMember, h("design:type", f.AssetInfo)], J.prototype, "assetInfo", void 0), + u([d.jsonMember, h("design:type", Q)], J.prototype, "trackInfo", void 0), + (J = l = u([d.jsonObject], J)), + (t.TrackPiece = J); + }, + function (e, t, n) { + "use strict"; + var i; + n.d(t, "a", function () { + return i; + }), + (function (e) { + e[(e.STEP = 1)] = "STEP"; + })(i || (i = {})); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(28), + r = n(4), + o = (function () { + function e(e) { + (this._vertexBuffers = {}), (this._scene = e); + } + return ( + (e.prototype._prepareBuffers = function () { + if (!this._vertexBuffers[r.b.PositionKind]) { + var e = []; + e.push(1, 1), e.push(-1, 1), e.push(-1, -1), e.push(1, -1), (this._vertexBuffers[r.b.PositionKind] = new r.b(this._scene.getEngine(), e, r.b.PositionKind, !1, !1, 2)), this._buildIndexBuffer(); + } + }), + (e.prototype._buildIndexBuffer = function () { + var e = []; + e.push(0), e.push(1), e.push(2), e.push(0), e.push(2), e.push(3), (this._indexBuffer = this._scene.getEngine().createIndexBuffer(e)); + }), + (e.prototype._rebuild = function () { + var e = this._vertexBuffers[r.b.PositionKind]; + e && (e._rebuild(), this._buildIndexBuffer()); + }), + (e.prototype._prepareFrame = function (e, t) { + void 0 === e && (e = null), void 0 === t && (t = null); + var n = this._scene.activeCamera; + return ( + !!n && + !( + !(t = + t || + n._postProcesses.filter(function (e) { + return null != e; + })) || + 0 === t.length || + !this._scene.postProcessesEnabled + ) && + (t[0].activate(n, e, null != t), !0) + ); + }), + (e.prototype.directRender = function (e, t, n, r, o) { + void 0 === t && (t = null), void 0 === n && (n = !1), void 0 === r && (r = 0), void 0 === o && (o = 0); + for (var a = this._scene.getEngine(), s = 0; s < e.length; s++) { + s < e.length - 1 ? e[s + 1].activate(this._scene.activeCamera, t) : t ? a.bindFramebuffer(t, r, void 0, void 0, n, o) : a.restoreDefaultFramebuffer(); + var c = e[s], + l = c.apply(); + l && + (c.onBeforeRenderObservable.notifyObservers(l), + this._prepareBuffers(), + a.bindBuffers(this._vertexBuffers, this._indexBuffer, l), + a.drawElementsType(i.a.TriangleFillMode, 0, 6), + c.onAfterRenderObservable.notifyObservers(l)); + } + a.setDepthBuffer(!0), a.setDepthWrite(!0); + }), + (e.prototype._finalizeFrame = function (e, t, n, r, o) { + void 0 === o && (o = !1); + var a = this._scene.activeCamera; + if ( + a && + 0 !== + (r = + r || + a._postProcesses.filter(function (e) { + return null != e; + })).length && + this._scene.postProcessesEnabled + ) { + for (var s = this._scene.getEngine(), c = 0, l = r.length; c < l; c++) { + var u = r[c]; + if ((c < l - 1 ? (u._outputTexture = r[c + 1].activate(a, t)) : t ? (s.bindFramebuffer(t, n, void 0, void 0, o), (u._outputTexture = t)) : (s.restoreDefaultFramebuffer(), (u._outputTexture = null)), e)) + break; + var h = u.apply(); + h && + (u.onBeforeRenderObservable.notifyObservers(h), + this._prepareBuffers(), + s.bindBuffers(this._vertexBuffers, this._indexBuffer, h), + s.drawElementsType(i.a.TriangleFillMode, 0, 6), + u.onAfterRenderObservable.notifyObservers(h)); + } + s.setDepthBuffer(!0), s.setDepthWrite(!0), s.setAlphaMode(0); + } + }), + (e.prototype.dispose = function () { + var e = this._vertexBuffers[r.b.PositionKind]; + e && (e.dispose(), (this._vertexBuffers[r.b.PositionKind] = null)), this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }); + var i = n(189), + r = function () {}, + o = (function () { + function e(t) { + (this._useSceneAutoClearSetup = !1), + (this._renderingGroups = new Array()), + (this._autoClearDepthStencil = {}), + (this._customOpaqueSortCompareFn = {}), + (this._customAlphaTestSortCompareFn = {}), + (this._customTransparentSortCompareFn = {}), + (this._renderingGroupInfo = new r()), + (this._scene = t); + for (var n = e.MIN_RENDERINGGROUPS; n < e.MAX_RENDERINGGROUPS; n++) this._autoClearDepthStencil[n] = { autoClear: !0, depth: !0, stencil: !0 }; + } + return ( + (e.prototype._clearDepthStencilBuffer = function (e, t) { + void 0 === e && (e = !0), void 0 === t && (t = !0), this._depthStencilBufferAlreadyCleaned || (this._scene.getEngine().clear(null, !1, e, t), (this._depthStencilBufferAlreadyCleaned = !0)); + }), + (e.prototype.render = function (t, n, i, r) { + var o = this._renderingGroupInfo; + if (((o.scene = this._scene), (o.camera = this._scene.activeCamera), this._scene.spriteManagers && r)) + for (var a = 0; a < this._scene.spriteManagers.length; a++) { + var s = this._scene.spriteManagers[a]; + this.dispatchSprites(s); + } + for (a = e.MIN_RENDERINGGROUPS; a < e.MAX_RENDERINGGROUPS; a++) { + this._depthStencilBufferAlreadyCleaned = a === e.MIN_RENDERINGGROUPS; + var c = this._renderingGroups[a]; + if (c) { + var l = Math.pow(2, a); + if (((o.renderingGroupId = a), this._scene.onBeforeRenderingGroupObservable.notifyObservers(o, l), e.AUTOCLEAR)) { + var u = this._useSceneAutoClearSetup ? this._scene.getAutoClearDepthStencilSetup(a) : this._autoClearDepthStencil[a]; + u && u.autoClear && this._clearDepthStencilBuffer(u.depth, u.stencil); + } + for (var h = 0, d = this._scene._beforeRenderingGroupDrawStage; h < d.length; h++) { + d[h].action(a); + } + c.render(t, r, i, n); + for (var p = 0, f = this._scene._afterRenderingGroupDrawStage; p < f.length; p++) { + f[p].action(a); + } + this._scene.onAfterRenderingGroupObservable.notifyObservers(o, l); + } + } + }), + (e.prototype.reset = function () { + for (var t = e.MIN_RENDERINGGROUPS; t < e.MAX_RENDERINGGROUPS; t++) { + var n = this._renderingGroups[t]; + n && n.prepare(); + } + }), + (e.prototype.dispose = function () { + this.freeRenderingGroups(), (this._renderingGroups.length = 0), (this._renderingGroupInfo = null); + }), + (e.prototype.freeRenderingGroups = function () { + for (var t = e.MIN_RENDERINGGROUPS; t < e.MAX_RENDERINGGROUPS; t++) { + var n = this._renderingGroups[t]; + n && n.dispose(); + } + }), + (e.prototype._prepareRenderingGroup = function (e) { + void 0 === this._renderingGroups[e] && (this._renderingGroups[e] = new i.a(e, this._scene, this._customOpaqueSortCompareFn[e], this._customAlphaTestSortCompareFn[e], this._customTransparentSortCompareFn[e])); + }), + (e.prototype.dispatchSprites = function (e) { + var t = e.renderingGroupId || 0; + this._prepareRenderingGroup(t), this._renderingGroups[t].dispatchSprites(e); + }), + (e.prototype.dispatchParticles = function (e) { + var t = e.renderingGroupId || 0; + this._prepareRenderingGroup(t), this._renderingGroups[t].dispatchParticles(e); + }), + (e.prototype.dispatch = function (e, t, n) { + void 0 === t && (t = e.getMesh()); + var i = t.renderingGroupId || 0; + this._prepareRenderingGroup(i), this._renderingGroups[i].dispatch(e, t, n); + }), + (e.prototype.setRenderingOrder = function (e, t, n, i) { + if ( + (void 0 === t && (t = null), + void 0 === n && (n = null), + void 0 === i && (i = null), + (this._customOpaqueSortCompareFn[e] = t), + (this._customAlphaTestSortCompareFn[e] = n), + (this._customTransparentSortCompareFn[e] = i), + this._renderingGroups[e]) + ) { + var r = this._renderingGroups[e]; + (r.opaqueSortCompareFn = this._customOpaqueSortCompareFn[e]), (r.alphaTestSortCompareFn = this._customAlphaTestSortCompareFn[e]), (r.transparentSortCompareFn = this._customTransparentSortCompareFn[e]); + } + }), + (e.prototype.setRenderingAutoClearDepthStencil = function (e, t, n, i) { + void 0 === n && (n = !0), void 0 === i && (i = !0), (this._autoClearDepthStencil[e] = { autoClear: t, depth: n, stencil: i }); + }), + (e.prototype.getAutoClearDepthStencilSetup = function (e) { + return this._autoClearDepthStencil[e]; + }), + (e.MAX_RENDERINGGROUPS = 4), + (e.MIN_RENDERINGGROUPS = 0), + (e.AUTOCLEAR = !0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(12), + r = n(6), + o = n(1), + a = n(14), + s = n(10), + c = n(22), + l = (function () { + function e(t, n, c, l, u) { + var h = this; + if ( + (void 0 === l && (l = null), + (this.autoplay = !1), + (this.loop = !1), + (this.useCustomAttenuation = !1), + (this.isPlaying = !1), + (this.isPaused = !1), + (this.spatialSound = !1), + (this.refDistance = 1), + (this.rolloffFactor = 1), + (this.maxDistance = 100), + (this.distanceModel = "linear"), + (this.onEndedObservable = new r.c()), + (this._panningModel = "equalpower"), + (this._playbackRate = 1), + (this._streaming = !1), + (this._startTime = 0), + (this._startOffset = 0), + (this._position = o.e.Zero()), + (this._positionInEmitterSpace = !1), + (this._localDirection = new o.e(1, 0, 0)), + (this._volume = 1), + (this._isReadyToPlay = !1), + (this._isDirectional = !1), + (this._coneInnerAngle = 360), + (this._coneOuterAngle = 360), + (this._coneOuterGain = 0), + (this._isOutputConnected = !1), + (this._urlType = "Unknown"), + (this.name = t), + (this._scene = c), + e._SceneComponentInitialization(c), + (this._readyToPlayCallback = l), + (this._customAttenuationFunction = function (e, t, n, i, r) { + return t < n ? e * (1 - t / n) : 0; + }), + u && + ((this.autoplay = u.autoplay || !1), + (this.loop = u.loop || !1), + void 0 !== u.volume && (this._volume = u.volume), + (this.spatialSound = u.spatialSound || !1), + (this.maxDistance = u.maxDistance || 100), + (this.useCustomAttenuation = u.useCustomAttenuation || !1), + (this.rolloffFactor = u.rolloffFactor || 1), + (this.refDistance = u.refDistance || 1), + (this.distanceModel = u.distanceModel || "linear"), + (this._playbackRate = u.playbackRate || 1), + (this._streaming = u.streaming || !1), + (this._length = u.length), + (this._offset = u.offset)), + a.a.audioEngine.canUseWebAudio && a.a.audioEngine.audioContext) + ) { + (this._soundGain = a.a.audioEngine.audioContext.createGain()), + (this._soundGain.gain.value = this._volume), + (this._inputAudioNode = this._soundGain), + (this._outputAudioNode = this._soundGain), + this.spatialSound && this._createSpatialParameters(), + this._scene.mainSoundTrack.AddSound(this); + var d = !0; + if (n) + try { + "string" == typeof n + ? (this._urlType = "String") + : n instanceof ArrayBuffer + ? (this._urlType = "ArrayBuffer") + : n instanceof MediaStream + ? (this._urlType = "MediaStream") + : Array.isArray(n) && (this._urlType = "Array"); + var p = [], + f = !1; + switch (this._urlType) { + case "MediaStream": + (this._streaming = !0), + (this._isReadyToPlay = !0), + (this._streamingSource = a.a.audioEngine.audioContext.createMediaStreamSource(n)), + this.autoplay && this.play(0, this._offset, this._length), + this._readyToPlayCallback && this._readyToPlayCallback(); + break; + case "ArrayBuffer": + n.byteLength > 0 && ((f = !0), this._soundLoaded(n)); + break; + case "String": + p.push(n); + case "Array": + 0 === p.length && (p = n); + for (var m = 0; m < p.length; m++) { + var g = p[m]; + if ( + (f = + (u && u.skipCodecCheck) || + (-1 !== g.indexOf(".mp3", g.length - 4) && a.a.audioEngine.isMP3supported) || + (-1 !== g.indexOf(".ogg", g.length - 4) && a.a.audioEngine.isOGGsupported) || + -1 !== g.indexOf(".wav", g.length - 4) || + -1 !== g.indexOf("blob:")) + ) { + this._streaming + ? ((this._htmlAudioElement = new Audio(g)), + (this._htmlAudioElement.controls = !1), + (this._htmlAudioElement.loop = this.loop), + i.b.SetCorsBehavior(g, this._htmlAudioElement), + (this._htmlAudioElement.preload = "auto"), + this._htmlAudioElement.addEventListener("canplaythrough", function () { + (h._isReadyToPlay = !0), h.autoplay && h.play(0, h._offset, h._length), h._readyToPlayCallback && h._readyToPlayCallback(); + }), + document.body.appendChild(this._htmlAudioElement), + this._htmlAudioElement.load()) + : this._scene._loadFile( + g, + function (e) { + h._soundLoaded(e); + }, + void 0, + !0, + !0, + function (e) { + e && s.a.Error("XHR " + e.status + " error on: " + g + "."), s.a.Error("Sound creation aborted."), h._scene.mainSoundTrack.RemoveSound(h); + } + ); + break; + } + } + break; + default: + d = !1; + } + d + ? f || + ((this._isReadyToPlay = !0), + this._readyToPlayCallback && + window.setTimeout(function () { + h._readyToPlayCallback && h._readyToPlayCallback(); + }, 1e3)) + : s.a.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound."); + } catch (e) { + s.a.Error("Unexpected error. Sound creation aborted."), this._scene.mainSoundTrack.RemoveSound(this); + } + } else + this._scene.mainSoundTrack.AddSound(this), + a.a.audioEngine.WarnedWebAudioUnsupported || (s.a.Error("Web Audio is not supported by your browser."), (a.a.audioEngine.WarnedWebAudioUnsupported = !0)), + this._readyToPlayCallback && + window.setTimeout(function () { + h._readyToPlayCallback && h._readyToPlayCallback(); + }, 1e3); + } + return ( + (e.prototype.dispose = function () { + a.a.audioEngine.canUseWebAudio && + (this.isPlaying && this.stop(), + (this._isReadyToPlay = !1), + -1 === this.soundTrackId ? this._scene.mainSoundTrack.RemoveSound(this) : this._scene.soundTracks && this._scene.soundTracks[this.soundTrackId].RemoveSound(this), + this._soundGain && (this._soundGain.disconnect(), (this._soundGain = null)), + this._soundPanner && (this._soundPanner.disconnect(), (this._soundPanner = null)), + this._soundSource && (this._soundSource.disconnect(), (this._soundSource = null)), + (this._audioBuffer = null), + this._htmlAudioElement && (this._htmlAudioElement.pause(), (this._htmlAudioElement.src = ""), document.body.removeChild(this._htmlAudioElement)), + this._streamingSource && this._streamingSource.disconnect(), + this._connectedTransformNode && this._registerFunc && (this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc), (this._connectedTransformNode = null))); + }), + (e.prototype.isReady = function () { + return this._isReadyToPlay; + }), + (e.prototype._soundLoaded = function (e) { + var t = this; + a.a.audioEngine.audioContext && + a.a.audioEngine.audioContext.decodeAudioData( + e, + function (e) { + (t._audioBuffer = e), (t._isReadyToPlay = !0), t.autoplay && t.play(0, t._offset, t._length), t._readyToPlayCallback && t._readyToPlayCallback(); + }, + function (e) { + s.a.Error("Error while decoding audio data for: " + t.name + " / Error: " + e); + } + ); + }), + (e.prototype.setAudioBuffer = function (e) { + a.a.audioEngine.canUseWebAudio && ((this._audioBuffer = e), (this._isReadyToPlay = !0)); + }), + (e.prototype.updateOptions = function (e) { + e && + ((this.loop = e.loop || this.loop), + (this.maxDistance = e.maxDistance || this.maxDistance), + (this.useCustomAttenuation = e.useCustomAttenuation || this.useCustomAttenuation), + (this.rolloffFactor = e.rolloffFactor || this.rolloffFactor), + (this.refDistance = e.refDistance || this.refDistance), + (this.distanceModel = e.distanceModel || this.distanceModel), + (this._playbackRate = e.playbackRate || this._playbackRate), + (this._length = e.length ? e.length / 1e3 : void 0), + (this._offset = e.offset ? e.offset / 1e3 : void 0), + this._updateSpatialParameters(), + this.isPlaying && (this._streaming && this._htmlAudioElement ? (this._htmlAudioElement.playbackRate = this._playbackRate) : this._soundSource && (this._soundSource.playbackRate.value = this._playbackRate))); + }), + (e.prototype._createSpatialParameters = function () { + a.a.audioEngine.canUseWebAudio && + a.a.audioEngine.audioContext && + (this._scene.headphone && (this._panningModel = "HRTF"), + (this._soundPanner = a.a.audioEngine.audioContext.createPanner()), + this._updateSpatialParameters(), + this._soundPanner.connect(this._outputAudioNode), + (this._inputAudioNode = this._soundPanner)); + }), + (e.prototype._updateSpatialParameters = function () { + this.spatialSound && + this._soundPanner && + (this.useCustomAttenuation + ? ((this._soundPanner.distanceModel = "linear"), + (this._soundPanner.maxDistance = Number.MAX_VALUE), + (this._soundPanner.refDistance = 1), + (this._soundPanner.rolloffFactor = 1), + (this._soundPanner.panningModel = this._panningModel)) + : ((this._soundPanner.distanceModel = this.distanceModel), + (this._soundPanner.maxDistance = this.maxDistance), + (this._soundPanner.refDistance = this.refDistance), + (this._soundPanner.rolloffFactor = this.rolloffFactor), + (this._soundPanner.panningModel = this._panningModel))); + }), + (e.prototype.switchPanningModelToHRTF = function () { + (this._panningModel = "HRTF"), this._switchPanningModel(); + }), + (e.prototype.switchPanningModelToEqualPower = function () { + (this._panningModel = "equalpower"), this._switchPanningModel(); + }), + (e.prototype._switchPanningModel = function () { + a.a.audioEngine.canUseWebAudio && this.spatialSound && this._soundPanner && (this._soundPanner.panningModel = this._panningModel); + }), + (e.prototype.connectToSoundTrackAudioNode = function (e) { + a.a.audioEngine.canUseWebAudio && (this._isOutputConnected && this._outputAudioNode.disconnect(), this._outputAudioNode.connect(e), (this._isOutputConnected = !0)); + }), + (e.prototype.setDirectionalCone = function (e, t, n) { + t < e + ? s.a.Error("setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle.") + : ((this._coneInnerAngle = e), (this._coneOuterAngle = t), (this._coneOuterGain = n), (this._isDirectional = !0), this.isPlaying && this.loop && (this.stop(), this.play(0, this._offset, this._length))); + }), + Object.defineProperty(e.prototype, "directionalConeInnerAngle", { + get: function () { + return this._coneInnerAngle; + }, + set: function (e) { + if (e != this._coneInnerAngle) { + if (this._coneOuterAngle < e) return void s.a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle."); + (this._coneInnerAngle = e), a.a.audioEngine.canUseWebAudio && this.spatialSound && this._soundPanner && (this._soundPanner.coneInnerAngle = this._coneInnerAngle); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "directionalConeOuterAngle", { + get: function () { + return this._coneOuterAngle; + }, + set: function (e) { + if (e != this._coneOuterAngle) { + if (e < this._coneInnerAngle) return void s.a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle."); + (this._coneOuterAngle = e), a.a.audioEngine.canUseWebAudio && this.spatialSound && this._soundPanner && (this._soundPanner.coneOuterAngle = this._coneOuterAngle); + } + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setPosition = function (e) { + (this._position = e), + a.a.audioEngine.canUseWebAudio && + this.spatialSound && + this._soundPanner && + !isNaN(this._position.x) && + !isNaN(this._position.y) && + !isNaN(this._position.z) && + this._soundPanner.setPosition(this._position.x, this._position.y, this._position.z); + }), + (e.prototype.setLocalDirectionToMesh = function (e) { + (this._localDirection = e), a.a.audioEngine.canUseWebAudio && this._connectedTransformNode && this.isPlaying && this._updateDirection(); + }), + (e.prototype._updateDirection = function () { + if (this._connectedTransformNode && this._soundPanner) { + var e = this._connectedTransformNode.getWorldMatrix(), + t = o.e.TransformNormal(this._localDirection, e); + t.normalize(), this._soundPanner.setOrientation(t.x, t.y, t.z); + } + }), + (e.prototype.updateDistanceFromListener = function () { + if (a.a.audioEngine.canUseWebAudio && this._connectedTransformNode && this.useCustomAttenuation && this._soundGain && this._scene.activeCamera) { + var e = this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera); + this._soundGain.gain.value = this._customAttenuationFunction(this._volume, e, this.maxDistance, this.refDistance, this.rolloffFactor); + } + }), + (e.prototype.setAttenuationFunction = function (e) { + this._customAttenuationFunction = e; + }), + (e.prototype.play = function (e, t, n) { + var i = this; + if (this._isReadyToPlay && this._scene.audioEnabled && a.a.audioEngine.audioContext) + try { + this._startOffset < 0 && ((e = -this._startOffset), (this._startOffset = 0)); + var r = e ? a.a.audioEngine.audioContext.currentTime + e : a.a.audioEngine.audioContext.currentTime; + if ( + ((this._soundSource && this._streamingSource) || + (this.spatialSound && + this._soundPanner && + (isNaN(this._position.x) || isNaN(this._position.y) || isNaN(this._position.z) || this._soundPanner.setPosition(this._position.x, this._position.y, this._position.z), + this._isDirectional && + ((this._soundPanner.coneInnerAngle = this._coneInnerAngle), + (this._soundPanner.coneOuterAngle = this._coneOuterAngle), + (this._soundPanner.coneOuterGain = this._coneOuterGain), + this._connectedTransformNode ? this._updateDirection() : this._soundPanner.setOrientation(this._localDirection.x, this._localDirection.y, this._localDirection.z)))), + this._streaming) + ) { + if ( + (this._streamingSource || + ((this._streamingSource = a.a.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement)), + (this._htmlAudioElement.onended = function () { + i._onended(); + }), + (this._htmlAudioElement.playbackRate = this._playbackRate)), + this._streamingSource.disconnect(), + this._streamingSource.connect(this._inputAudioNode), + this._htmlAudioElement) + ) + (o = function () { + if (a.a.audioEngine.unlocked) { + var e = i._htmlAudioElement.play(); + void 0 !== e && + e.catch(function (e) { + a.a.audioEngine.lock(), + (i.loop || i.autoplay) && + a.a.audioEngine.onAudioUnlockedObservable.addOnce(function () { + o(); + }); + }); + } else + (i.loop || i.autoplay) && + a.a.audioEngine.onAudioUnlockedObservable.addOnce(function () { + o(); + }); + })(); + } else { + var o = function () { + if (a.a.audioEngine.audioContext) { + (n = n || i._length), + (t = t || i._offset), + (i._soundSource = a.a.audioEngine.audioContext.createBufferSource()), + (i._soundSource.buffer = i._audioBuffer), + i._soundSource.connect(i._inputAudioNode), + (i._soundSource.loop = i.loop), + void 0 !== t && (i._soundSource.loopStart = t), + void 0 !== n && (i._soundSource.loopEnd = (0 | t) + n), + (i._soundSource.playbackRate.value = i._playbackRate), + (i._soundSource.onended = function () { + i._onended(); + }), + (r = e ? a.a.audioEngine.audioContext.currentTime + e : a.a.audioEngine.audioContext.currentTime); + var o = i.isPaused ? i._startOffset % i._soundSource.buffer.duration : t || 0; + i._soundSource.start(r, o, i.loop ? void 0 : n); + } + }; + "suspended" === a.a.audioEngine.audioContext.state + ? setTimeout(function () { + "suspended" === a.a.audioEngine.audioContext.state + ? (a.a.audioEngine.lock(), + (i.loop || i.autoplay) && + a.a.audioEngine.onAudioUnlockedObservable.addOnce(function () { + o(); + })) + : o(); + }, 500) + : o(); + } + (this._startTime = r), (this.isPlaying = !0), (this.isPaused = !1); + } catch (e) { + s.a.Error("Error while trying to play audio: " + this.name + ", " + e.message); + } + }), + (e.prototype._onended = function () { + (this.isPlaying = !1), this.onended && this.onended(), this.onEndedObservable.notifyObservers(this); + }), + (e.prototype.stop = function (e) { + var t = this; + if (this.isPlaying) + if (this._streaming) + this._htmlAudioElement ? (this._htmlAudioElement.pause(), this._htmlAudioElement.currentTime > 0 && (this._htmlAudioElement.currentTime = 0)) : this._streamingSource.disconnect(), (this.isPlaying = !1); + else if (a.a.audioEngine.audioContext && this._soundSource) { + var n = e ? a.a.audioEngine.audioContext.currentTime + e : a.a.audioEngine.audioContext.currentTime; + this._soundSource.stop(n), + (this._soundSource.onended = function () { + t.isPlaying = !1; + }), + this.isPaused || (this._startOffset = 0); + } + }), + (e.prototype.pause = function () { + this.isPlaying && + ((this.isPaused = !0), + this._streaming + ? this._htmlAudioElement + ? this._htmlAudioElement.pause() + : this._streamingSource.disconnect() + : a.a.audioEngine.audioContext && (this.stop(0), (this._startOffset += a.a.audioEngine.audioContext.currentTime - this._startTime))); + }), + (e.prototype.setVolume = function (e, t) { + a.a.audioEngine.canUseWebAudio && + this._soundGain && + (t && a.a.audioEngine.audioContext + ? (this._soundGain.gain.cancelScheduledValues(a.a.audioEngine.audioContext.currentTime), + this._soundGain.gain.setValueAtTime(this._soundGain.gain.value, a.a.audioEngine.audioContext.currentTime), + this._soundGain.gain.linearRampToValueAtTime(e, a.a.audioEngine.audioContext.currentTime + t)) + : (this._soundGain.gain.value = e)), + (this._volume = e); + }), + (e.prototype.setPlaybackRate = function (e) { + (this._playbackRate = e), + this.isPlaying && (this._streaming && this._htmlAudioElement ? (this._htmlAudioElement.playbackRate = this._playbackRate) : this._soundSource && (this._soundSource.playbackRate.value = this._playbackRate)); + }), + (e.prototype.getVolume = function () { + return this._volume; + }), + (e.prototype.attachToMesh = function (e) { + var t = this; + this._connectedTransformNode && this._registerFunc && (this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc), (this._registerFunc = null)), + (this._connectedTransformNode = e), + this.spatialSound || ((this.spatialSound = !0), this._createSpatialParameters(), this.isPlaying && this.loop && (this.stop(), this.play(0, this._offset, this._length))), + this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode), + (this._registerFunc = function (e) { + return t._onRegisterAfterWorldMatrixUpdate(e); + }), + this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc); + }), + (e.prototype.detachFromMesh = function () { + this._connectedTransformNode && this._registerFunc && (this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc), (this._registerFunc = null), (this._connectedTransformNode = null)); + }), + (e.prototype._onRegisterAfterWorldMatrixUpdate = function (e) { + if (e.getBoundingInfo) { + var t = e; + if (this._positionInEmitterSpace) t.worldMatrixFromCache.invertToRef(o.c.Matrix[0]), this.setPosition(o.c.Matrix[0].getTranslation()); + else { + var n = t.getBoundingInfo(); + this.setPosition(n.boundingSphere.centerWorld); + } + a.a.audioEngine.canUseWebAudio && this._isDirectional && this.isPlaying && this._updateDirection(); + } + }), + (e.prototype.clone = function () { + var t = this; + if (this._streaming) return null; + var n = function () { + t._isReadyToPlay ? ((r._audioBuffer = t.getAudioBuffer()), (r._isReadyToPlay = !0), r.autoplay && r.play(0, t._offset, t._length)) : window.setTimeout(n, 300); + }, + i = { + autoplay: this.autoplay, + loop: this.loop, + volume: this._volume, + spatialSound: this.spatialSound, + maxDistance: this.maxDistance, + useCustomAttenuation: this.useCustomAttenuation, + rolloffFactor: this.rolloffFactor, + refDistance: this.refDistance, + distanceModel: this.distanceModel, + }, + r = new e(this.name + "_cloned", new ArrayBuffer(0), this._scene, null, i); + return this.useCustomAttenuation && r.setAttenuationFunction(this._customAttenuationFunction), r.setPosition(this._position), r.setPlaybackRate(this._playbackRate), n(), r; + }), + (e.prototype.getAudioBuffer = function () { + return this._audioBuffer; + }), + (e.prototype.serialize = function () { + var e = { + name: this.name, + url: this.name, + autoplay: this.autoplay, + loop: this.loop, + volume: this._volume, + spatialSound: this.spatialSound, + maxDistance: this.maxDistance, + rolloffFactor: this.rolloffFactor, + refDistance: this.refDistance, + distanceModel: this.distanceModel, + playbackRate: this._playbackRate, + panningModel: this._panningModel, + soundTrackId: this.soundTrackId, + }; + return ( + this.spatialSound && + (this._connectedTransformNode && (e.connectedMeshId = this._connectedTransformNode.id), + (e.position = this._position.asArray()), + (e.refDistance = this.refDistance), + (e.distanceModel = this.distanceModel), + (e.isDirectional = this._isDirectional), + (e.localDirectionToMesh = this._localDirection.asArray()), + (e.coneInnerAngle = this._coneInnerAngle), + (e.coneOuterAngle = this._coneOuterAngle), + (e.coneOuterGain = this._coneOuterGain)), + e + ); + }), + (e.Parse = function (t, n, i, r) { + var a, + s = t.name; + a = t.url ? i + t.url : i + s; + var c, + l = { + autoplay: t.autoplay, + loop: t.loop, + volume: t.volume, + spatialSound: t.spatialSound, + maxDistance: t.maxDistance, + rolloffFactor: t.rolloffFactor, + refDistance: t.refDistance, + distanceModel: t.distanceModel, + playbackRate: t.playbackRate, + }; + if (r) { + var u = function () { + r._isReadyToPlay ? ((c._audioBuffer = r.getAudioBuffer()), (c._isReadyToPlay = !0), c.autoplay && c.play(0, c._offset, c._length)) : window.setTimeout(u, 300); + }; + (c = new e(s, new ArrayBuffer(0), n, null, l)), u(); + } else + (c = new e( + s, + a, + n, + function () { + n._removePendingData(c); + }, + l + )), + n._addPendingData(c); + if (t.position) { + var h = o.e.FromArray(t.position); + c.setPosition(h); + } + if (t.isDirectional && (c.setDirectionalCone(t.coneInnerAngle || 360, t.coneOuterAngle || 360, t.coneOuterGain || 0), t.localDirectionToMesh)) { + var d = o.e.FromArray(t.localDirectionToMesh); + c.setLocalDirectionToMesh(d); + } + if (t.connectedMeshId) { + var p = n.getMeshByID(t.connectedMeshId); + p && c.attachToMesh(p); + } + return c; + }), + (e._SceneComponentInitialization = function (e) { + throw c.a.WarnImport("AudioSceneComponent"); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + var e = this; + this.promise = new Promise(function (t, n) { + (e._resolve = t), (e._reject = n); + }); + } + return ( + Object.defineProperty(e.prototype, "resolve", { + get: function () { + return this._resolve; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "reject", { + get: function () { + return this._reject; + }, + enumerable: !0, + configurable: !0, + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.SoundController = t.MusicID = t.TrackSoundID = t.SoundID = t.SoundModel = void 0); + const i = n(40), + r = n(62), + o = n(29), + a = n(19); + class s { + static fromJson(e) { + return Object.assign(new s(), e); + } + getOffset() { + return this.start; + } + getLength() { + return this.end - this.start; + } + } + var c, l, u; + (t.SoundModel = s), + (function (e) { + (e[(e.BonusMeterFull = 0)] = "BonusMeterFull"), + (e[(e.BonusPickup = 1)] = "BonusPickup"), + (e[(e.BoostLoop = 2)] = "BoostLoop"), + (e[(e.ButtonClick = 3)] = "ButtonClick"), + (e[(e.CashRegister = 4)] = "CashRegister"), + (e[(e.ChestOpen = 5)] = "ChestOpen"), + (e[(e.ChestDropin = 6)] = "ChestDropin"), + (e[(e.ChestLeave = 7)] = "ChestLeave"), + (e[(e.ChestScreenOpen = 8)] = "ChestScreenOpen"), + (e[(e.Coin = 9)] = "Coin"), + (e[(e.MineCartTurn = 10)] = "MineCartTurn"), + (e[(e.MineCartTilt = 11)] = "MineCartTilt"), + (e[(e.MineCartLoop = 12)] = "MineCartLoop"), + (e[(e.Magnet = 13)] = "Magnet"), + (e[(e.MonkeyRoar = 14)] = "MonkeyRoar"), + (e[(e.ShieldLoop = 15)] = "ShieldLoop"), + (e[(e.ShieldPop = 16)] = "ShieldPop"), + (e[(e.Slide = 17)] = "Slide"), + (e[(e.Splash = 18)] = "Splash"), + (e[(e.Swish = 19)] = "Swish"), + (e[(e.Wooosh = 20)] = "Wooosh"), + (e[(e.SplashEntry = 21)] = "SplashEntry"), + (e[(e.GruntTrip = 22)] = "GruntTrip"), + (e[(e.GruntJump = 23)] = "GruntJump"), + (e[(e.GruntJumpLand = 24)] = "GruntJumpLand"), + (e[(e.Splat = 25)] = "Splat"), + (e[(e.Scream = 26)] = "Scream"), + (e[(e.Woohoo = 27)] = "Woohoo"), + (e[(e.PillarCrash = 28)] = "PillarCrash"), + (e[(e.PillarFall = 29)] = "PillarFall"), + (e[(e.Sizzle = 30)] = "Sizzle"); + })((c = t.SoundID || (t.SoundID = {}))), + (function (e) { + (e[(e.WaterLoopC = 0)] = "WaterLoopC"), (e[(e.SkySummitPlank = 1)] = "SkySummitPlank"), (e[(e.SpinningSpikeTrap = 2)] = "SpinningSpikeTrap"), (e[(e.FlameTrap = 3)] = "FlameTrap"), (e[(e.SawBlade = 4)] = "SawBlade"); + })((l = t.TrackSoundID || (t.TrackSoundID = {}))), + (function (e) { + (e[(e.None = -1)] = "None"), (e[(e.NightMusic = 0)] = "NightMusic"), (e[(e.Game = 1)] = "Game"); + })((u = t.MusicID || (t.MusicID = {}))); + t.SoundController = class { + constructor(e) { + (this._baseSoundURL = "assets/sounds/sfx/"), + (this._baseMusicURL = "assets/sounds/music/"), + (this._soundMuted = !1), + (this._musicMuted = !1), + (this._isInitialized = !1), + (this._soundsToLoadCount = 0), + (this._soundsLoadedCount = 0), + (this._scene = e); + } + initialize() { + (this._currentMusicState = u.None), + (this._loopedSoundPlaying = new Map()), + (this._audioSprite = new Map()), + (this._trackAudioSprite = new Map()), + (this._trackPieceSound = new Array()), + (this._sfxVolume = i.GameController.instance.gameState.flagsData.soundVolume / 100), + (this._musicVolume = i.GameController.instance.gameState.flagsData.musicVolume / 100), + (r.Engine.audioEngine.useCustomUnlockedButton = !0), + r.Engine.audioEngine.lock(), + (r.Engine.audioEngine.audioContext.onstatechange = () => {}), + this._preloadMusic(), + this._loadSFXSpriteJSON(), + this._loadTrackSFXSpriteJSON(), + this._loadSoundSpriteToBuffer(this._baseSoundURL + "sfx." + a.WebUtils.audioExtension), + this._loadTrackSpriteToBuffer(this._baseSoundURL + "track_sfx." + a.WebUtils.audioExtension), + o.EventHandler.instance.addListener(o.EventID.PlaySFX, this._playSFX.bind(this)), + o.EventHandler.instance.addListener(o.EventID.PlaySFXLoop, this._playSFXLoop.bind(this)), + o.EventHandler.instance.addListener(o.EventID.PlaySFXDelay, this._playSFXWithDelay.bind(this)), + o.EventHandler.instance.addListener(o.EventID.StopSFX, this._stopSFX.bind(this)), + o.EventHandler.instance.addListener(o.EventID.PlayMusic, this._playMusic.bind(this)), + o.EventHandler.instance.addListener(o.EventID.StopMusic, this._stopMusic.bind(this)), + o.EventHandler.instance.addListener(o.EventID.OnPlayGame, this._onPlayGame.bind(this)), + o.EventHandler.instance.addListener(o.EventID.OnPlayerDeath, this._onPlayerDeath.bind(this)), + o.EventHandler.instance.addListener(o.EventID.MusicVolumeChange, this._setMusicVolume.bind(this)), + o.EventHandler.instance.addListener(o.EventID.SoundVolumeChange, this._setSoundSFXVolume.bind(this)), + o.EventHandler.instance.addListener(o.EventID.MuteAll, this._muteAll.bind(this)), + o.EventHandler.instance.addListener(o.EventID.UnmuteAll, this._unmuteAll.bind(this)), + o.EventHandler.instance.addListener(o.EventID.OnFirstUserInput, this._startInitialMusic.bind(this)); + } + preUpdate() {} + postUpdate() {} + pause() { + this._muteAll(); + } + resume() { + this._unmuteAll(); + } + reset() { + 0 == i.GameController.instance.tutorial.shouldRestartTutorial && 0 == i.GameController.instance.isRestarting ? this._startAll() : this._unmuteAll(); + } + _checkAudioContext(e) { + try { + const t = r.Engine.audioEngine.audioContext; + t + ? t + .resume() + .then(() => { + null != e && e(); + }) + .catch((t) => { + null != e && e(); + }) + : null != e && e(); + } catch (t) { + null != e && e(); + } + } + _onAudioLoaded() { + this._soundsLoadedCount++, + this._soundsLoadedCount < this._soundsToLoadCount || + this._checkAudioContext(() => { + this._startInitialMusic(); + }); + } + _startInitialMusic() { + this._soundsLoadedCount < 3 || + (0 == this._isInitialized && (r.Engine.audioEngine.unlock(), "running" != r.Engine.audioEngine.audioContext.state && r.Engine.audioEngine.audioContext.resume(), (this._isInitialized = !0), this._startAll())); + } + _onPlayGame() { + 0 == this._isInitialized && (r.Engine.audioEngine.unlock(), (this._isInitialized = !0)), this._startAll(); + } + _onPlayerDeath() { + this._muteAll(); + } + _stopAll() { + this._isInitialized && + (this._unmuteAll(), + this._gameMusic.isPlaying && this._gameMusic.stop(0), + this._uiMusic.isPlaying && this._uiMusic.stop(0), + this._loopedSoundPlaying.forEach((e) => { + e.isPlaying && e.stop(0); + }), + this._trackPieceSound.forEach((e) => { + e.isPlaying && e.stop(0); + })); + } + _startAll() { + this._unmuteAll(), + this._stopAll(), + setTimeout(() => { + i.GameController.instance.isGameStarted ? this._playMusic(u.Game) : this._playMusic(u.NightMusic); + }, 200); + } + _playSFX(e) { + if (this._isInitialized) { + const t = this._audioSprite.get(c[e]).getOffset(), + n = this._audioSprite.get(c[e]).getLength(); + this._masterSound.setVolume(this._sfxVolume), this._masterSound.updateOptions({ spatialSound: !1 }), this._masterSound.play(0, t, n); + } + } + _playSFXLoop(e) { + if (this._isInitialized && !this._loopedSoundPlaying.has(e)) { + const t = this._audioSprite.get(c[e]).getOffset(), + n = this._audioSprite.get(c[e]).getLength(), + i = this._masterSound.clone(); + i.setVolume(this._sfxVolume), (i.loop = !0), this._loopedSoundPlaying.set(e, i), this._masterSound.updateOptions({ spatialSound: !1 }), i.play(0, t, n); + } + } + _playSFXWithDelay(e) { + const t = e.delay, + n = e.id; + setTimeout(() => { + this._playSFX(n); + }, t); + } + _getTrackPieceSound() { + const e = this._masterTrackSound.clone(); + return e.setVolume(this._sfxVolume), this._trackPieceSound.push(e), e; + } + _preloadMusic() { + this._loadAudioBuffer(this._baseMusicURL + "NightMusic." + a.WebUtils.audioExtension, (e) => { + (this._uiMusic = new r.Sound("UI", e, this._scene, null, { loop: !0 })), setTimeout(() => this._onAudioLoaded(), 200); + }), + this._loadAudioBuffer(this._baseMusicURL + "Game." + a.WebUtils.audioExtension, (e) => { + (this._gameMusic = new r.Sound("Game", e, this._scene, null, { loop: !0 })), setTimeout(() => this._onAudioLoaded(), 200); + }); + } + _loadSFXSpriteJSON() { + const e = n(290); + for (const t in e) this._audioSprite.set(t, s.fromJson(e[t])); + } + _loadTrackSFXSpriteJSON() { + const e = n(291); + for (const t in e) this._trackAudioSprite.set(t, s.fromJson(e[t])); + } + _loadSoundSpriteToBuffer(e) { + this._loadAudioBuffer(e, (e) => { + (this._masterSound = new r.Sound("master", e, this._scene)), setTimeout(() => this._onAudioLoaded(), 200); + }); + } + _loadTrackSpriteToBuffer(e) { + this._loadAudioBuffer(e, (e) => { + (this._masterTrackSound = new r.Sound("Trackmaster", e, this._scene, null, { spatialSound: !0 })), setTimeout(() => this._onAudioLoaded(), 200); + }); + } + _loadAudioBuffer(e, t) { + this._soundsToLoadCount++; + const n = new XMLHttpRequest(); + n.open("GET", e, !0), + (n.responseType = "arraybuffer"), + (n.onreadystatechange = () => { + 4 == n.readyState && 200 == n.status && t(n.response); + }), + n.send(null); + } + _playMusic(e) { + this._isInitialized && + ((this._currentMusicState = e), + this._gameMusic.isPlaying && this._gameMusic.stop(0), + this._uiMusic.isPlaying && this._uiMusic.stop(0), + e == u.NightMusic ? (this._uiMusic.play(0), this._uiMusic.setVolume(this._musicVolume)) : e == u.Game && (this._gameMusic.play(0), this._gameMusic.setVolume(this._musicVolume))); + } + _stopSFX(e) { + if (this._isInitialized && this._loopedSoundPlaying.has(e)) { + const t = this._loopedSoundPlaying.get(e); + t.isPlaying && t.stop(0), this._loopedSoundPlaying.delete(e); + } + } + _stopMusic(e) { + this._isInitialized && (e == u.Game ? this._gameMusic.isPlaying && this._gameMusic.stop(0) : e == u.NightMusic && this._uiMusic.isPlaying && this._uiMusic.stop(0)); + } + _setSoundSFXVolume(e) { + this._isInitialized && + ((this._sfxVolume = e / 100), + this._loopedSoundPlaying.forEach((e) => { + e.setVolume(this._sfxVolume); + })); + } + _setMusicVolume(e) { + this._isInitialized && + ((this._musicVolume = e / 100), this._currentMusicState == u.Game ? this._gameMusic.setVolume(this._musicVolume) : this._currentMusicState == u.NightMusic && this._uiMusic.setVolume(this._musicVolume)); + } + _muteAll() { + !this._isInitialized || this._musicMuted || this._soundMuted || (this._muteSoundSFX(), this._muteMusic()); + } + _unmuteAll() { + this._isInitialized && (this._musicMuted || this._soundMuted) && (this._unmuteSoundSFX(), this._unmuteMusic()); + } + _muteSoundSFX() { + this._isInitialized && + 0 == this._soundMuted && + ((this._soundMuted = !0), + (this._sfxVolumeBeforeMute = this._sfxVolume), + (this._sfxVolume = 0), + this._loopedSoundPlaying.forEach((e) => { + e.setVolume(this._sfxVolume); + }), + this._trackPieceSound.forEach((e) => { + e.setVolume(this._sfxVolume); + })); + } + _muteMusic() { + this._isInitialized && + 0 == this._musicMuted && + ((this._musicMuted = !0), (this._musicVolumeBeforeMute = this._musicVolume), (this._musicVolume = 0), this._gameMusic.setVolume(this._musicVolume), this._uiMusic.setVolume(this._musicVolume)); + } + _unmuteSoundSFX() { + this._isInitialized && + this._soundMuted && + ((this._soundMuted = !1), + (this._sfxVolume = this._sfxVolumeBeforeMute), + this._loopedSoundPlaying.forEach((e) => { + e.setVolume(this._sfxVolume); + }), + this._trackPieceSound.forEach((e) => { + e.setVolume(this._sfxVolume); + })); + } + _unmuteMusic() { + this._isInitialized && this._musicMuted && ((this._musicMuted = !1), (this._musicVolume = this._musicVolumeBeforeMute), this._gameMusic.setVolume(this._musicVolume), this._uiMusic.setVolume(this._musicVolume)); + } + addSoundsToTrackPiece(e) { + if (null == e.sound) { + let t = 0; + if ( + (e.name.includes("curve_water") + ? (t = l.WaterLoopC) + : "forest_jump_over_a" == e.name || "run_between_a" == e.name + ? (t = l.SpinningSpikeTrap) + : e.name.includes("mine_duck_b") || "jump_over_b" == e.name + ? (t = l.SawBlade) + : (e.name.includes("jump_or_slide_a") || e.name.includes("forest_jump_over_b") || e.name.includes("narrow_jump_or_slide_a")) && (t = l.FlameTrap), + 0 != t) + ) { + e.sound = this._getTrackPieceSound(); + const n = this._trackAudioSprite.get(l[t]).getOffset(), + i = this._trackAudioSprite.get(l[t]).getLength(); + (e.soundLength = i), (e.soundOffset = n); + } + } + } + playCoinCollectedSFX(e) { + if (this._isInitialized) { + const t = c.Coin, + n = this._audioSprite.get(c[t]).getOffset(), + i = this._audioSprite.get(c[t]).getLength(), + r = this._masterSound.clone(); + r.setVolume(this._sfxVolume), r.setPlaybackRate(e), r.play(0, n, i); + } + } + }; + }, + function (e, t, n) { + "use strict"; + var i = "imageProcessingDeclaration", + r = + "#ifdef EXPOSURE\nuniform float exposureLinear;\n#endif\n#ifdef CONTRAST\nuniform float contrast;\n#endif\n#ifdef VIGNETTE\nuniform vec2 vInverseScreenSize;\nuniform vec4 vignetteSettings1;\nuniform vec4 vignetteSettings2;\n#endif\n#ifdef COLORCURVES\nuniform vec4 vCameraColorCurveNegative;\nuniform vec4 vCameraColorCurveNeutral;\nuniform vec4 vCameraColorCurvePositive;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nuniform highp sampler3D txColorTransform;\n#else\nuniform sampler2D txColorTransform;\n#endif\nuniform vec4 colorTransformSettings;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "imageProcessingFunctions", + r = + "#if defined(COLORGRADING) && !defined(COLORGRADING3D)\n\nvec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting)\n{\nfloat sliceSize=2.0*sampler3dSetting.x;\n#ifdef SAMPLER3DGREENDEPTH\nfloat sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y;\n#else\nfloat sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y;\n#endif\nfloat sliceInteger=floor(sliceContinuous);\n\n\nfloat sliceFraction=sliceContinuous-sliceInteger;\n#ifdef SAMPLER3DGREENDEPTH\nvec2 sliceUV=color.rb;\n#else\nvec2 sliceUV=color.rg;\n#endif\nsliceUV.x*=sliceSize;\nsliceUV.x+=sliceInteger*sliceSize;\nsliceUV=saturate(sliceUV);\nvec4 slice0Color=texture2D(colorTransform,sliceUV);\nsliceUV.x+=sliceSize;\nsliceUV=saturate(sliceUV);\nvec4 slice1Color=texture2D(colorTransform,sliceUV);\nvec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction);\n#ifdef SAMPLER3DBGRMAP\ncolor.rgb=result.rgb;\n#else\ncolor.rgb=result.bgr;\n#endif\nreturn color;\n}\n#endif\n#ifdef TONEMAPPING_ACES\n\n\n\n\n\nconst mat3 ACESInputMat=mat3(\nvec3(0.59719,0.07600,0.02840),\nvec3(0.35458,0.90834,0.13383),\nvec3(0.04823,0.01566,0.83777)\n);\n\nconst mat3 ACESOutputMat=mat3(\nvec3( 1.60475,-0.10208,-0.00327),\nvec3(-0.53108,1.10813,-0.07276),\nvec3(-0.07367,-0.00605,1.07602)\n);\nvec3 RRTAndODTFit(vec3 v)\n{\nvec3 a=v*(v+0.0245786)-0.000090537;\nvec3 b=v*(0.983729*v+0.4329510)+0.238081;\nreturn a/b;\n}\nvec3 ACESFitted(vec3 color)\n{\ncolor=ACESInputMat*color;\n\ncolor=RRTAndODTFit(color);\ncolor=ACESOutputMat*color;\n\ncolor=saturate(color);\nreturn color;\n}\n#endif\nvec4 applyImageProcessing(vec4 result) {\n#ifdef EXPOSURE\nresult.rgb*=exposureLinear;\n#endif\n#ifdef VIGNETTE\n\nvec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize;\nviewportXY=viewportXY*2.0-1.0;\nvec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0);\nfloat vignetteTerm=dot(vignetteXY1,vignetteXY1);\nfloat vignette=pow(vignetteTerm,vignetteSettings2.w);\n\nvec3 vignetteColor=vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette);\nresult.rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nresult.rgb=mix(vignetteColor,result.rgb,vignette);\n#endif\n#endif\n#ifdef TONEMAPPING\n#ifdef TONEMAPPING_ACES\nresult.rgb=ACESFitted(result.rgb);\n#else\nconst float tonemappingCalibration=1.590579;\nresult.rgb=1.0-exp2(-tonemappingCalibration*result.rgb);\n#endif\n#endif\n\nresult.rgb=toGammaSpace(result.rgb);\nresult.rgb=saturate(result.rgb);\n#ifdef CONTRAST\n\nvec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb);\nif (contrast<1.0) {\n\nresult.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast);\n} else {\n\nresult.rgb=mix(result.rgb,resultHighContrast,contrast-1.0);\n}\n#endif\n\n#ifdef COLORGRADING\nvec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb;\n#else\nvec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb;\n#endif\nresult.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\n\nfloat luma=getLuminance(result.rgb);\nvec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0));\nvec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative;\nresult.rgb*=colorCurve.rgb;\nresult.rgb=mix(vec3(luma),result.rgb,colorCurve.a);\n#endif\nreturn result;\n}"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "logDepthDeclaration", + r = "#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;\nvarying float vFragmentDepth;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "morphTargetsVertex", + r = + "#ifdef MORPHTARGETS\npositionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_UV\nuvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];\n#endif\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return a; + }), + n.d(t, "a", function () { + return s; + }); + var i = n(27), + r = n(6), + o = n(25), + a = + (n(165), + (function () { + function e() {} + return ( + (e.prototype.serialize = function () { + var e = {}; + return (e.animation = this.animation.serialize()), (e.targetId = this.target.id), e; + }), + e + ); + })()), + s = (function () { + function e(e, t) { + void 0 === t && (t = null), + (this.name = e), + (this._targetedAnimations = new Array()), + (this._animatables = new Array()), + (this._from = Number.MAX_VALUE), + (this._to = -Number.MAX_VALUE), + (this._speedRatio = 1), + (this._loopAnimation = !1), + (this.onAnimationEndObservable = new r.c()), + (this.onAnimationLoopObservable = new r.c()), + (this.onAnimationGroupLoopObservable = new r.c()), + (this.onAnimationGroupEndObservable = new r.c()), + (this.onAnimationGroupPauseObservable = new r.c()), + (this.onAnimationGroupPlayObservable = new r.c()), + (this._scene = t || o.a.LastCreatedScene), + (this.uniqueId = this._scene.getUniqueId()), + this._scene.animationGroups.push(this); + } + return ( + Object.defineProperty(e.prototype, "from", { + get: function () { + return this._from; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "to", { + get: function () { + return this._to; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isStarted", { + get: function () { + return this._isStarted; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isPlaying", { + get: function () { + return this._isStarted && !this._isPaused; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "speedRatio", { + get: function () { + return this._speedRatio; + }, + set: function (e) { + if (this._speedRatio !== e) { + this._speedRatio = e; + for (var t = 0; t < this._animatables.length; t++) { + this._animatables[t].speedRatio = this._speedRatio; + } + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "loopAnimation", { + get: function () { + return this._loopAnimation; + }, + set: function (e) { + if (this._loopAnimation !== e) { + this._loopAnimation = e; + for (var t = 0; t < this._animatables.length; t++) { + this._animatables[t].loopAnimation = this._loopAnimation; + } + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "targetedAnimations", { + get: function () { + return this._targetedAnimations; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "animatables", { + get: function () { + return this._animatables; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.addTargetedAnimation = function (e, t) { + var n = new a(); + (n.animation = e), (n.target = t); + var i = e.getKeys(); + return this._from > i[0].frame && (this._from = i[0].frame), this._to < i[i.length - 1].frame && (this._to = i[i.length - 1].frame), this._targetedAnimations.push(n), n; + }), + (e.prototype.normalize = function (e, t) { + void 0 === e && (e = null), void 0 === t && (t = null), null == e && (e = this._from), null == t && (t = this._to); + for (var n = 0; n < this._targetedAnimations.length; n++) { + var i = this._targetedAnimations[n].animation.getKeys(), + r = i[0], + o = i[i.length - 1]; + if (r.frame > e) { + var a = { frame: e, value: r.value, inTangent: r.inTangent, outTangent: r.outTangent, interpolation: r.interpolation }; + i.splice(0, 0, a); + } + if (o.frame < t) { + a = { frame: t, value: o.value, inTangent: o.outTangent, outTangent: o.outTangent, interpolation: o.interpolation }; + i.push(a); + } + } + return (this._from = e), (this._to = t), this; + }), + (e.prototype._processLoop = function (e, t, n) { + var i = this; + e.onAnimationLoop = function () { + i.onAnimationLoopObservable.notifyObservers(t), + i._animationLoopFlags[n] || + ((i._animationLoopFlags[n] = !0), + i._animationLoopCount++, + i._animationLoopCount === i._targetedAnimations.length && (i.onAnimationGroupLoopObservable.notifyObservers(i), (i._animationLoopCount = 0), (i._animationLoopFlags = []))); + }; + }), + (e.prototype.start = function (e, t, n, i) { + var r = this; + if ((void 0 === e && (e = !1), void 0 === t && (t = 1), this._isStarted || 0 === this._targetedAnimations.length)) return this; + (this._loopAnimation = e), (this._animationLoopCount = 0), (this._animationLoopFlags = []); + for ( + var o = function () { + var o = a._targetedAnimations[s], + c = a._scene.beginDirectAnimation(o.target, [o.animation], void 0 !== n ? n : a._from, void 0 !== i ? i : a._to, e, t); + (c.onAnimationEnd = function () { + r.onAnimationEndObservable.notifyObservers(o), r._checkAnimationGroupEnded(c); + }), + a._processLoop(c, o, s), + a._animatables.push(c); + }, + a = this, + s = 0; + s < this._targetedAnimations.length; + s++ + ) + o(); + if (((this._speedRatio = t), void 0 !== n && void 0 !== i)) + if (n < i && this._speedRatio < 0) { + var c = i; + (i = n), (n = c); + } else n > i && this._speedRatio > 0 && (this._speedRatio = -t); + return (this._isStarted = !0), (this._isPaused = !1), this.onAnimationGroupPlayObservable.notifyObservers(this), this; + }), + (e.prototype.pause = function () { + if (!this._isStarted) return this; + this._isPaused = !0; + for (var e = 0; e < this._animatables.length; e++) { + this._animatables[e].pause(); + } + return this.onAnimationGroupPauseObservable.notifyObservers(this), this; + }), + (e.prototype.play = function (e) { + return ( + this.isStarted && this._animatables.length === this._targetedAnimations.length ? (void 0 !== e && (this.loopAnimation = e), this.restart()) : (this.stop(), this.start(e, this._speedRatio)), + (this._isPaused = !1), + this + ); + }), + (e.prototype.reset = function () { + if (!this._isStarted) return this; + for (var e = 0; e < this._animatables.length; e++) { + this._animatables[e].reset(); + } + return this; + }), + (e.prototype.restart = function () { + if (!this._isStarted) return this; + for (var e = 0; e < this._animatables.length; e++) { + this._animatables[e].restart(); + } + return this.onAnimationGroupPlayObservable.notifyObservers(this), this; + }), + (e.prototype.stop = function () { + if (!this._isStarted) return this; + for (var e = this._animatables.slice(), t = 0; t < e.length; t++) e[t].stop(); + return (this._isStarted = !1), this; + }), + (e.prototype.setWeightForAllAnimatables = function (e) { + for (var t = 0; t < this._animatables.length; t++) { + this._animatables[t].weight = e; + } + return this; + }), + (e.prototype.syncAllAnimationsWith = function (e) { + for (var t = 0; t < this._animatables.length; t++) { + this._animatables[t].syncWith(e); + } + return this; + }), + (e.prototype.goToFrame = function (e) { + if (!this._isStarted) return this; + for (var t = 0; t < this._animatables.length; t++) { + this._animatables[t].goToFrame(e); + } + return this; + }), + (e.prototype.dispose = function () { + (this._targetedAnimations = []), (this._animatables = []); + var e = this._scene.animationGroups.indexOf(this); + e > -1 && this._scene.animationGroups.splice(e, 1), + this.onAnimationEndObservable.clear(), + this.onAnimationGroupEndObservable.clear(), + this.onAnimationGroupPauseObservable.clear(), + this.onAnimationGroupPlayObservable.clear(), + this.onAnimationLoopObservable.clear(), + this.onAnimationGroupLoopObservable.clear(); + }), + (e.prototype._checkAnimationGroupEnded = function (e) { + var t = this._animatables.indexOf(e); + t > -1 && this._animatables.splice(t, 1), 0 === this._animatables.length && ((this._isStarted = !1), this.onAnimationGroupEndObservable.notifyObservers(this)); + }), + (e.prototype.clone = function (t, n) { + for (var i = new e(t || this.name, this._scene), r = 0, o = this._targetedAnimations; r < o.length; r++) { + var a = o[r]; + i.addTargetedAnimation(a.animation.clone(), n ? n(a.target) : a.target); + } + return i; + }), + (e.prototype.serialize = function () { + var e = {}; + (e.name = this.name), (e.from = this.from), (e.to = this.to), (e.targetedAnimations = []); + for (var t = 0; t < this.targetedAnimations.length; t++) { + var n = this.targetedAnimations[t]; + e.targetedAnimations[t] = n.serialize(); + } + return e; + }), + (e.Parse = function (t, n) { + for (var r = new e(t.name, n), o = 0; o < t.targetedAnimations.length; o++) { + var a = t.targetedAnimations[o], + s = i.a.Parse(a.animation), + c = a.targetId; + if ("influence" === a.animation.property) { + var l = n.getMorphTargetById(c); + l && r.addTargetedAnimation(s, l); + } else { + var u = n.getNodeByID(c); + null != u && r.addTargetedAnimation(s, u); + } + } + return null !== t.from && null !== t.to && r.normalize(t.from, t.to), r; + }), + (e.prototype.getClassName = function () { + return "AnimationGroup"; + }), + (e.prototype.toString = function (e) { + var t = "Name: " + this.name; + return ( + (t += ", type: " + this.getClassName()), + e && + ((t += ", from: " + this._from), + (t += ", to: " + this._to), + (t += ", isStarted: " + this._isStarted), + (t += ", speedRatio: " + this._speedRatio), + (t += ", targetedAnimations length: " + this._targetedAnimations.length), + (t += ", animatables length: " + this._animatables)), + t + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(1), + r = n(15), + o = n(108), + a = n(34), + s = n(5), + c = function (e, t, n, i) { + (this.name = e), (this.worldAxisForNormal = t), (this.worldAxisForFileX = n), (this.worldAxisForFileY = i); + }, + l = (function () { + function e() {} + return ( + (e.ConvertCubeMapTextureToSphericalPolynomial = function (e) { + if (!e.isCube) return null; + var t, + n, + i = e.getSize().width, + r = e.readPixels(0), + o = e.readPixels(1); + e.isRenderTarget ? ((t = e.readPixels(3)), (n = e.readPixels(2))) : ((t = e.readPixels(2)), (n = e.readPixels(3))); + var a = e.readPixels(4), + s = e.readPixels(5), + c = e.gammaSpace, + l = 0; + (1 != e.textureType && 2 != e.textureType) || (l = 1); + var u = { size: i, right: r, left: o, up: t, down: n, front: a, back: s, format: 5, type: l, gammaSpace: c }; + return this.ConvertCubeMapToSphericalPolynomial(u); + }), + (e.ConvertCubeMapToSphericalPolynomial = function (e) { + for (var t = new o.a(), n = 0, i = 2 / e.size, c = i, l = 0.5 * i - 1, u = 0; u < 6; u++) + for (var h = this.FileFaces[u], d = e[h.name], p = l, f = 5 === e.format ? 4 : 3, m = 0; m < e.size; m++) { + for (var g = l, b = 0; b < e.size; b++) { + var _ = h.worldAxisForFileX.scale(g).add(h.worldAxisForFileY.scale(p)).add(h.worldAxisForNormal); + _.normalize(); + var v = Math.pow(1 + g * g + p * p, -1.5), + y = d[m * e.size * f + b * f + 0], + C = d[m * e.size * f + b * f + 1], + P = d[m * e.size * f + b * f + 2]; + isNaN(y) && (y = 0), + isNaN(C) && (C = 0), + isNaN(P) && (P = 0), + 0 === e.type && ((y /= 255), (C /= 255), (P /= 255)), + e.gammaSpace && ((y = Math.pow(r.a.Clamp(y), a.c)), (C = Math.pow(r.a.Clamp(C), a.c)), (P = Math.pow(r.a.Clamp(P), a.c))); + (y = r.a.Clamp(y, 0, 4096)), (C = r.a.Clamp(C, 0, 4096)), (P = r.a.Clamp(P, 0, 4096)); + var x = new s.a(y, C, P); + t.addLight(_, x, v), (n += v), (g += i); + } + p += c; + } + var T = (6 * (4 * Math.PI)) / 6 / n; + return t.scaleInPlace(T), t.convertIncidentRadianceToIrradiance(), t.convertIrradianceToLambertianRadiance(), o.b.FromHarmonics(t); + }), + (e.FileFaces = [ + new c("right", new i.e(1, 0, 0), new i.e(0, 0, -1), new i.e(0, -1, 0)), + new c("left", new i.e(-1, 0, 0), new i.e(0, 0, 1), new i.e(0, -1, 0)), + new c("up", new i.e(0, 1, 0), new i.e(1, 0, 0), new i.e(0, 0, 1)), + new c("down", new i.e(0, -1, 0), new i.e(1, 0, 0), new i.e(0, 0, -1)), + new c("front", new i.e(0, 0, 1), new i.e(1, 0, 0), new i.e(0, -1, 0)), + new c("back", new i.e(0, 0, -1), new i.e(-1, 0, 0), new i.e(0, -1, 0)), + ]), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e, t, n) { + (this.name = e), (this.from = t), (this.to = n); + } + return ( + (e.prototype.clone = function () { + return new e(this.name, this.from, this.to); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = function () {}; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }); + var i = n(58), + r = n(1), + o = n(34), + a = (function () { + function e(e, t, n) { + (this.vectors = i.a.BuildArray(8, r.e.Zero)), + (this.center = r.e.Zero()), + (this.centerWorld = r.e.Zero()), + (this.extendSize = r.e.Zero()), + (this.extendSizeWorld = r.e.Zero()), + (this.directions = i.a.BuildArray(3, r.e.Zero)), + (this.vectorsWorld = i.a.BuildArray(8, r.e.Zero)), + (this.minimumWorld = r.e.Zero()), + (this.maximumWorld = r.e.Zero()), + (this.minimum = r.e.Zero()), + (this.maximum = r.e.Zero()), + this.reConstruct(e, t, n); + } + return ( + (e.prototype.reConstruct = function (e, t, n) { + var i = e.x, + o = e.y, + a = e.z, + s = t.x, + c = t.y, + l = t.z, + u = this.vectors; + this.minimum.copyFromFloats(i, o, a), + this.maximum.copyFromFloats(s, c, l), + u[0].copyFromFloats(i, o, a), + u[1].copyFromFloats(s, c, l), + u[2].copyFromFloats(s, o, a), + u[3].copyFromFloats(i, c, a), + u[4].copyFromFloats(i, o, l), + u[5].copyFromFloats(s, c, a), + u[6].copyFromFloats(i, c, l), + u[7].copyFromFloats(s, o, l), + t.addToRef(e, this.center).scaleInPlace(0.5), + t.subtractToRef(e, this.extendSize).scaleInPlace(0.5), + (this._worldMatrix = n || r.a.IdentityReadOnly), + this._update(this._worldMatrix); + }), + (e.prototype.scale = function (t) { + var n = e.TmpVector3, + i = this.maximum.subtractToRef(this.minimum, n[0]), + r = i.length(); + i.normalizeFromLength(r); + var o = r * t, + a = i.scaleInPlace(0.5 * o), + s = this.center.subtractToRef(a, n[1]), + c = this.center.addToRef(a, n[2]); + return this.reConstruct(s, c, this._worldMatrix), this; + }), + (e.prototype.getWorldMatrix = function () { + return this._worldMatrix; + }), + (e.prototype._update = function (e) { + var t = this.minimumWorld, + n = this.maximumWorld, + i = this.directions, + o = this.vectorsWorld, + a = this.vectors; + if (e.isIdentity()) { + t.copyFrom(this.minimum), n.copyFrom(this.maximum); + for (s = 0; s < 8; ++s) o[s].copyFrom(a[s]); + this.extendSizeWorld.copyFrom(this.extendSize), this.centerWorld.copyFrom(this.center); + } else { + t.setAll(Number.MAX_VALUE), n.setAll(-Number.MAX_VALUE); + for (var s = 0; s < 8; ++s) { + var c = o[s]; + r.e.TransformCoordinatesToRef(a[s], e, c), t.minimizeInPlace(c), n.maximizeInPlace(c); + } + n.subtractToRef(t, this.extendSizeWorld).scaleInPlace(0.5), n.addToRef(t, this.centerWorld).scaleInPlace(0.5); + } + r.e.FromArrayToRef(e.m, 0, i[0]), r.e.FromArrayToRef(e.m, 4, i[1]), r.e.FromArrayToRef(e.m, 8, i[2]), (this._worldMatrix = e); + }), + (e.prototype.isInFrustum = function (t) { + return e.IsInFrustum(this.vectorsWorld, t); + }), + (e.prototype.isCompletelyInFrustum = function (t) { + return e.IsCompletelyInFrustum(this.vectorsWorld, t); + }), + (e.prototype.intersectsPoint = function (e) { + var t = this.minimumWorld, + n = this.maximumWorld, + i = t.x, + r = t.y, + a = t.z, + s = n.x, + c = n.y, + l = n.z, + u = e.x, + h = e.y, + d = e.z, + p = -o.a; + return !(s - u < p || p > u - i) && !(c - h < p || p > h - r) && !(l - d < p || p > d - a); + }), + (e.prototype.intersectsSphere = function (t) { + return e.IntersectsSphere(this.minimumWorld, this.maximumWorld, t.centerWorld, t.radiusWorld); + }), + (e.prototype.intersectsMinMax = function (e, t) { + var n = this.minimumWorld, + i = this.maximumWorld, + r = n.x, + o = n.y, + a = n.z, + s = i.x, + c = i.y, + l = i.z, + u = e.x, + h = e.y, + d = e.z, + p = t.x, + f = t.y, + m = t.z; + return !(s < u || r > p) && !(c < h || o > f) && !(l < d || a > m); + }), + (e.Intersects = function (e, t) { + return e.intersectsMinMax(t.minimumWorld, t.maximumWorld); + }), + (e.IntersectsSphere = function (t, n, i, o) { + var a = e.TmpVector3[0]; + return r.e.ClampToRef(i, t, n, a), r.e.DistanceSquared(i, a) <= o * o; + }), + (e.IsCompletelyInFrustum = function (e, t) { + for (var n = 0; n < 6; ++n) for (var i = t[n], r = 0; r < 8; ++r) if (i.dotCoordinate(e[r]) < 0) return !1; + return !0; + }), + (e.IsInFrustum = function (e, t) { + for (var n = 0; n < 6; ++n) { + for (var i = !0, r = t[n], o = 0; o < 8; ++o) + if (r.dotCoordinate(e[o]) >= 0) { + i = !1; + break; + } + if (i) return !1; + } + return !0; + }), + (e.TmpVector3 = i.a.BuildArray(3, r.e.Zero)), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return h; + }); + var i = n(2), + r = n(1), + o = n(10), + a = n(31), + s = n(9), + c = n(51), + l = n(39), + u = n(4); + s.a._instancedMeshFactory = function (e, t) { + var n = new h(e, t); + if (t.instancedBuffers) for (var i in ((n.instancedBuffers = {}), t.instancedBuffers)) n.instancedBuffers[i] = t.instancedBuffers[i]; + return n; + }; + var h = (function (e) { + function t(t, n) { + var i = e.call(this, t, n.getScene()) || this; + (i._indexInSourceMeshInstanceArray = -1), + n.addInstance(i), + (i._sourceMesh = n), + (i._unIndexed = n._unIndexed), + i.position.copyFrom(n.position), + i.rotation.copyFrom(n.rotation), + i.scaling.copyFrom(n.scaling), + n.rotationQuaternion && (i.rotationQuaternion = n.rotationQuaternion.clone()), + (i.animations = n.animations); + for (var r = 0, o = n.getAnimationRanges(); r < o.length; r++) { + var a = o[r]; + null != a && i.createAnimationRange(a.name, a.from, a.to); + } + return (i.infiniteDistance = n.infiniteDistance), i.setPivotMatrix(n.getPivotMatrix()), i.refreshBoundingInfo(), i._syncSubMeshes(), i; + } + return ( + Object(i.d)(t, e), + (t.prototype.getClassName = function () { + return "InstancedMesh"; + }), + Object.defineProperty(t.prototype, "lightSources", { + get: function () { + return this._sourceMesh._lightSources; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype._resyncLightSources = function () {}), + (t.prototype._resyncLightSource = function (e) {}), + (t.prototype._removeLightSource = function (e, t) {}), + Object.defineProperty(t.prototype, "receiveShadows", { + get: function () { + return this._sourceMesh.receiveShadows; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "material", { + get: function () { + return this._sourceMesh.material; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "visibility", { + get: function () { + return this._sourceMesh.visibility; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "skeleton", { + get: function () { + return this._sourceMesh.skeleton; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(t.prototype, "renderingGroupId", { + get: function () { + return this._sourceMesh.renderingGroupId; + }, + set: function (e) { + this._sourceMesh && e !== this._sourceMesh.renderingGroupId && o.a.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene"); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getTotalVertices = function () { + return this._sourceMesh ? this._sourceMesh.getTotalVertices() : 0; + }), + (t.prototype.getTotalIndices = function () { + return this._sourceMesh.getTotalIndices(); + }), + Object.defineProperty(t.prototype, "sourceMesh", { + get: function () { + return this._sourceMesh; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.isReady = function (e) { + return void 0 === e && (e = !1), this._sourceMesh.isReady(e, !0); + }), + (t.prototype.getVerticesData = function (e, t) { + return this._sourceMesh.getVerticesData(e, t); + }), + (t.prototype.setVerticesData = function (e, t, n, i) { + return this.sourceMesh && this.sourceMesh.setVerticesData(e, t, n, i), this.sourceMesh; + }), + (t.prototype.updateVerticesData = function (e, t, n, i) { + return this.sourceMesh && this.sourceMesh.updateVerticesData(e, t, n, i), this.sourceMesh; + }), + (t.prototype.setIndices = function (e, t) { + return void 0 === t && (t = null), this.sourceMesh && this.sourceMesh.setIndices(e, t), this.sourceMesh; + }), + (t.prototype.isVerticesDataPresent = function (e) { + return this._sourceMesh.isVerticesDataPresent(e); + }), + (t.prototype.getIndices = function () { + return this._sourceMesh.getIndices(); + }), + Object.defineProperty(t.prototype, "_positions", { + get: function () { + return this._sourceMesh._positions; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.refreshBoundingInfo = function (e) { + if ((void 0 === e && (e = !1), this._boundingInfo && this._boundingInfo.isLocked)) return this; + var t = this._sourceMesh.geometry ? this._sourceMesh.geometry.boundingBias : null; + return this._refreshBoundingInfo(this._sourceMesh._getPositionData(e), t), this; + }), + (t.prototype._preActivate = function () { + return this._currentLOD && this._currentLOD._preActivate(), this; + }), + (t.prototype._activate = function (e, t) { + if ((this._sourceMesh.subMeshes || o.a.Warn("Instances should only be created for meshes with geometry."), this._currentLOD)) { + if (this._currentLOD._getWorldMatrixDeterminant() > 0 != this._getWorldMatrixDeterminant() > 0) return (this._internalAbstractMeshDataInfo._actAsRegularMesh = !0), !0; + if (((this._internalAbstractMeshDataInfo._actAsRegularMesh = !1), this._currentLOD._registerInstanceForRenderId(this, e), t)) { + if (!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate) return (this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = !0), !0; + } else if (!this._currentLOD._internalAbstractMeshDataInfo._isActive) return (this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances = !0), !0; + } + return !1; + }), + (t.prototype._postActivate = function () { + this._edgesRenderer && this._edgesRenderer.isEnabled && this._sourceMesh._renderingGroup && this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer); + }), + (t.prototype.getWorldMatrix = function () { + if (this._currentLOD && this._currentLOD.billboardMode !== l.a.BILLBOARDMODE_NONE && this._currentLOD._masterMesh !== this) { + var t = this._currentLOD._masterMesh; + return ( + (this._currentLOD._masterMesh = this), + r.c.Vector3[7].copyFrom(this._currentLOD.position), + this._currentLOD.position.set(0, 0, 0), + r.c.Matrix[0].copyFrom(this._currentLOD.computeWorldMatrix(!0)), + this._currentLOD.position.copyFrom(r.c.Vector3[7]), + (this._currentLOD._masterMesh = t), + r.c.Matrix[0] + ); + } + return e.prototype.getWorldMatrix.call(this); + }), + Object.defineProperty(t.prototype, "isAnInstance", { + get: function () { + return !0; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getLOD = function (e) { + if (!e) return this; + var t = this.getBoundingInfo(); + return (this._currentLOD = this.sourceMesh.getLOD(e, t.boundingSphere)), this._currentLOD === this.sourceMesh ? this.sourceMesh : this._currentLOD; + }), + (t.prototype._preActivateForIntermediateRendering = function (e) { + return this.sourceMesh._preActivateForIntermediateRendering(e); + }), + (t.prototype._syncSubMeshes = function () { + if ((this.releaseSubMeshes(), this._sourceMesh.subMeshes)) for (var e = 0; e < this._sourceMesh.subMeshes.length; e++) this._sourceMesh.subMeshes[e].clone(this, this._sourceMesh); + return this; + }), + (t.prototype._generatePointsArray = function () { + return this._sourceMesh._generatePointsArray(); + }), + (t.prototype.clone = function (e, t, n) { + void 0 === t && (t = null); + var i = this._sourceMesh.createInstance(e); + if ((c.a.DeepCopy(this, i, ["name", "subMeshes", "uniqueId", "parent"], []), this.refreshBoundingInfo(), t && (i.parent = t), !n)) + for (var r = 0; r < this.getScene().meshes.length; r++) { + var o = this.getScene().meshes[r]; + o.parent === this && o.clone(o.name, i); + } + return i.computeWorldMatrix(!0), i; + }), + (t.prototype.dispose = function (t, n) { + void 0 === n && (n = !1), this._sourceMesh.removeInstance(this), e.prototype.dispose.call(this, t, n); + }), + t + ); + })(a.a); + (s.a.prototype.registerInstancedBuffer = function (e, t) { + if ((this.removeVerticesData(e), !this.instancedBuffers)) { + this.instancedBuffers = {}; + for (var n = 0, i = this.instances; n < i.length; n++) { + i[n].instancedBuffers = {}; + } + this._userInstancedBuffersStorage = { data: {}, vertexBuffers: {}, strides: {}, sizes: {} }; + } + (this.instancedBuffers[e] = null), + (this._userInstancedBuffersStorage.strides[e] = t), + (this._userInstancedBuffersStorage.sizes[e] = 32 * t), + (this._userInstancedBuffersStorage.data[e] = new Float32Array(this._userInstancedBuffersStorage.sizes[e])), + (this._userInstancedBuffersStorage.vertexBuffers[e] = new u.b(this.getEngine(), this._userInstancedBuffersStorage.data[e], e, !0, !1, t, !0)), + this.setVerticesBuffer(this._userInstancedBuffersStorage.vertexBuffers[e]); + for (var r = 0, o = this.instances; r < o.length; r++) { + o[r].instancedBuffers[e] = null; + } + }), + (s.a.prototype._processInstancedBuffers = function (e, t) { + var n = e.length; + for (var i in this.instancedBuffers) { + for (var r = this._userInstancedBuffersStorage.sizes[i], o = this._userInstancedBuffersStorage.strides[i], a = (n + 1) * o; r < a; ) r *= 2; + this._userInstancedBuffersStorage.data[i].length != r && + ((this._userInstancedBuffersStorage.data[i] = new Float32Array(r)), + (this._userInstancedBuffersStorage.sizes[i] = r), + this._userInstancedBuffersStorage.vertexBuffers[i] && (this._userInstancedBuffersStorage.vertexBuffers[i].dispose(), (this._userInstancedBuffersStorage.vertexBuffers[i] = null))); + var s = this._userInstancedBuffersStorage.data[i], + c = 0; + if (t) (c += o), (h = this.instancedBuffers[i]).toArray ? h.toArray(s, c) : h.copyToArray(s, c); + for (var l = 0; l < n; l++) { + var h; + (h = e[l].instancedBuffers[i]).toArray ? h.toArray(s, c) : h.copyToArray(s, c), (c += o); + } + this._userInstancedBuffersStorage.vertexBuffers[i] + ? this._userInstancedBuffersStorage.vertexBuffers[i].updateDirectly(s, 0) + : ((this._userInstancedBuffersStorage.vertexBuffers[i] = new u.b(this.getEngine(), this._userInstancedBuffersStorage.data[i], i, !0, !1, o, !0)), + this.setVerticesBuffer(this._userInstancedBuffersStorage.vertexBuffers[i])); + } + }), + (s.a.prototype._disposeInstanceSpecificData = function () { + for (this._instanceDataStorage.instancesBuffer && (this._instanceDataStorage.instancesBuffer.dispose(), (this._instanceDataStorage.instancesBuffer = null)); this.instances.length; ) this.instances[0].dispose(); + for (var e in this.instancedBuffers) this._userInstancedBuffersStorage.vertexBuffers[e] && this._userInstancedBuffersStorage.vertexBuffers[e].dispose(); + this.instancedBuffers = {}; + }); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.Utils = void 0); + const i = n(62); + t.Utils = class { + static random(e, t) { + return Math.floor(Math.random() * (t - e) + e); + } + static lerp(e, t, n) { + return e + n * (t - e); + } + static signedAngle(e, t, n) { + return 57.29578 * Math.atan2(i.Vector3.Dot(n, i.Vector3.Cross(e, t)), i.Vector3.Dot(e, t)); + } + static repeat(e, t) { + let n = e % t; + return n < 0 && (n += t), n; + } + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._count = 0), (this._data = {}); + } + return ( + (e.prototype.copyFrom = function (e) { + var t = this; + this.clear(), + e.forEach(function (e, n) { + return t.add(e, n); + }); + }), + (e.prototype.get = function (e) { + var t = this._data[e]; + if (void 0 !== t) return t; + }), + (e.prototype.getOrAddWithFactory = function (e, t) { + var n = this.get(e); + return void 0 !== n || ((n = t(e)) && this.add(e, n)), n; + }), + (e.prototype.getOrAdd = function (e, t) { + var n = this.get(e); + return void 0 !== n ? n : (this.add(e, t), t); + }), + (e.prototype.contains = function (e) { + return void 0 !== this._data[e]; + }), + (e.prototype.add = function (e, t) { + return void 0 === this._data[e] && ((this._data[e] = t), ++this._count, !0); + }), + (e.prototype.set = function (e, t) { + return void 0 !== this._data[e] && ((this._data[e] = t), !0); + }), + (e.prototype.getAndRemove = function (e) { + var t = this.get(e); + return void 0 !== t ? (delete this._data[e], --this._count, t) : null; + }), + (e.prototype.remove = function (e) { + return !!this.contains(e) && (delete this._data[e], --this._count, !0); + }), + (e.prototype.clear = function () { + (this._data = {}), (this._count = 0); + }), + Object.defineProperty(e.prototype, "count", { + get: function () { + return this._count; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.forEach = function (e) { + for (var t in this._data) { + e(t, this._data[t]); + } + }), + (e.prototype.first = function (e) { + for (var t in this._data) { + var n = e(t, this._data[t]); + if (n) return n; + } + return null; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(58), + r = n(1), + o = (function () { + function e(e, t, n) { + (this.center = r.e.Zero()), (this.centerWorld = r.e.Zero()), (this.minimum = r.e.Zero()), (this.maximum = r.e.Zero()), this.reConstruct(e, t, n); + } + return ( + (e.prototype.reConstruct = function (e, t, n) { + this.minimum.copyFrom(e), this.maximum.copyFrom(t); + var i = r.e.Distance(e, t); + t.addToRef(e, this.center).scaleInPlace(0.5), (this.radius = 0.5 * i), this._update(n || r.a.IdentityReadOnly); + }), + (e.prototype.scale = function (t) { + var n = this.radius * t, + i = e.TmpVector3, + r = i[0].setAll(n), + o = this.center.subtractToRef(r, i[1]), + a = this.center.addToRef(r, i[2]); + return this.reConstruct(o, a, this._worldMatrix), this; + }), + (e.prototype.getWorldMatrix = function () { + return this._worldMatrix; + }), + (e.prototype._update = function (t) { + if (t.isIdentity()) this.centerWorld.copyFrom(this.center), (this.radiusWorld = this.radius); + else { + r.e.TransformCoordinatesToRef(this.center, t, this.centerWorld); + var n = e.TmpVector3[0]; + r.e.TransformNormalFromFloatsToRef(1, 1, 1, t, n), (this.radiusWorld = Math.max(Math.abs(n.x), Math.abs(n.y), Math.abs(n.z)) * this.radius); + } + }), + (e.prototype.isInFrustum = function (e) { + for (var t = this.centerWorld, n = this.radiusWorld, i = 0; i < 6; i++) if (e[i].dotCoordinate(t) <= -n) return !1; + return !0; + }), + (e.prototype.isCenterInFrustum = function (e) { + for (var t = this.centerWorld, n = 0; n < 6; n++) if (e[n].dotCoordinate(t) < 0) return !1; + return !0; + }), + (e.prototype.intersectsPoint = function (e) { + var t = r.e.DistanceSquared(this.centerWorld, e); + return !(this.radiusWorld * this.radiusWorld < t); + }), + (e.Intersects = function (e, t) { + var n = r.e.DistanceSquared(e.centerWorld, t.centerWorld), + i = e.radiusWorld + t.radiusWorld; + return !(i * i < n); + }), + (e.TmpVector3 = i.a.BuildArray(3, r.e.Zero)), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = function (e, t, n) { + (this.bu = e), (this.bv = t), (this.distance = n), (this.faceId = 0), (this.subMeshId = 0); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(47), + r = n(10), + o = n(25), + a = n(159), + s = (function () { + function e(e) { + void 0 === e && (e = null), + (this._targets = new Array()), + (this._targetInfluenceChangedObservers = new Array()), + (this._targetDataLayoutChangedObservers = new Array()), + (this._activeTargets = new i.a(16)), + (this._supportsNormals = !1), + (this._supportsTangents = !1), + (this._supportsUVs = !1), + (this._vertexCount = 0), + (this._uniqueId = 0), + (this._tempInfluences = new Array()), + (this.enableNormalMorphing = !0), + (this.enableTangentMorphing = !0), + (this.enableUVMorphing = !0), + e || (e = o.a.LastCreatedScene), + (this._scene = e), + this._scene && (this._scene.morphTargetManagers.push(this), (this._uniqueId = this._scene.getUniqueId())); + } + return ( + Object.defineProperty(e.prototype, "uniqueId", { + get: function () { + return this._uniqueId; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "vertexCount", { + get: function () { + return this._vertexCount; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "supportsNormals", { + get: function () { + return this._supportsNormals && this.enableNormalMorphing; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "supportsTangents", { + get: function () { + return this._supportsTangents && this.enableTangentMorphing; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "supportsUVs", { + get: function () { + return this._supportsUVs && this.enableUVMorphing; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "numTargets", { + get: function () { + return this._targets.length; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "numInfluencers", { + get: function () { + return this._activeTargets.length; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "influences", { + get: function () { + return this._influences; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getActiveTarget = function (e) { + return this._activeTargets.data[e]; + }), + (e.prototype.getTarget = function (e) { + return this._targets[e]; + }), + (e.prototype.addTarget = function (e) { + var t = this; + this._targets.push(e), + this._targetInfluenceChangedObservers.push( + e.onInfluenceChanged.add(function (e) { + t._syncActiveTargets(e); + }) + ), + this._targetDataLayoutChangedObservers.push( + e._onDataLayoutChanged.add(function () { + t._syncActiveTargets(!0); + }) + ), + this._syncActiveTargets(!0); + }), + (e.prototype.removeTarget = function (e) { + var t = this._targets.indexOf(e); + t >= 0 && + (this._targets.splice(t, 1), + e.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(t, 1)[0]), + e._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(t, 1)[0]), + this._syncActiveTargets(!0)); + }), + (e.prototype.clone = function () { + for (var t = new e(this._scene), n = 0, i = this._targets; n < i.length; n++) { + var r = i[n]; + t.addTarget(r.clone()); + } + return (t.enableNormalMorphing = this.enableNormalMorphing), (t.enableTangentMorphing = this.enableTangentMorphing), (t.enableUVMorphing = this.enableUVMorphing), t; + }), + (e.prototype.serialize = function () { + var e = {}; + (e.id = this.uniqueId), (e.targets = []); + for (var t = 0, n = this._targets; t < n.length; t++) { + var i = n[t]; + e.targets.push(i.serialize()); + } + return e; + }), + (e.prototype._syncActiveTargets = function (e) { + var t = 0; + this._activeTargets.reset(), (this._supportsNormals = !0), (this._supportsTangents = !0), (this._supportsUVs = !0), (this._vertexCount = 0); + for (var n = 0, i = this._targets; n < i.length; n++) { + var o = i[n]; + if (0 !== o.influence) { + this._activeTargets.push(o), + (this._tempInfluences[t++] = o.influence), + (this._supportsNormals = this._supportsNormals && o.hasNormals), + (this._supportsTangents = this._supportsTangents && o.hasTangents), + (this._supportsUVs = this._supportsUVs && o.hasUVs); + var a = o.getPositions(); + if (a) { + var s = a.length / 3; + if (0 === this._vertexCount) this._vertexCount = s; + else if (this._vertexCount !== s) return void r.a.Error("Incompatible target. Targets must all have the same vertices count."); + } + } + } + (this._influences && this._influences.length === t) || (this._influences = new Float32Array(t)); + for (var c = 0; c < t; c++) this._influences[c] = this._tempInfluences[c]; + e && this.synchronize(); + }), + (e.prototype.synchronize = function () { + if (this._scene) + for (var e = 0, t = this._scene.meshes; e < t.length; e++) { + var n = t[e]; + n.morphTargetManager === this && n._syncGeometryWithMorphTargetManager(); + } + }), + (e.Parse = function (t, n) { + var i = new e(n); + i._uniqueId = t.id; + for (var r = 0, o = t.targets; r < o.length; r++) { + var s = o[r]; + i.addTarget(a.a.Parse(s)); + } + return i; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = n(32), + r = n(10), + o = n(12), + a = n(14); + function s(e) { + return function (t, n, r, o, a, s, c, l, u, h) { + void 0 === u && (u = null), void 0 === h && (h = 0); + var d = e ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY, + p = e ? i.b.Raw3D : i.b.Raw2DArray, + f = new i.a(this, p); + (f.baseWidth = n), + (f.baseHeight = r), + (f.baseDepth = o), + (f.width = n), + (f.height = r), + (f.depth = o), + (f.format = a), + (f.type = h), + (f.generateMipMaps = s), + (f.samplingMode = l), + e ? (f.is3D = !0) : (f.is2DArray = !0), + this._doNotHandleContextLost || (f._bufferView = t), + e ? this.updateRawTexture3D(f, t, a, c, u, h) : this.updateRawTexture2DArray(f, t, a, c, u, h), + this._bindTextureDirectly(d, f, !0); + var m = this._getSamplingParameters(l, s); + return ( + this._gl.texParameteri(d, this._gl.TEXTURE_MAG_FILTER, m.mag), + this._gl.texParameteri(d, this._gl.TEXTURE_MIN_FILTER, m.min), + s && this._gl.generateMipmap(d), + this._bindTextureDirectly(d, null), + this._internalTexturesCache.push(f), + f + ); + }; + } + function c(e) { + return function (t, n, i, r, o, a) { + void 0 === o && (o = null), void 0 === a && (a = 0); + var s = e ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY, + c = this._getWebGLTextureType(a), + l = this._getInternalFormat(i), + u = this._getRGBABufferInternalSizedFormat(a, i); + this._bindTextureDirectly(s, t, !0), + this._unpackFlipY(void 0 === r || !!r), + this._doNotHandleContextLost || ((t._bufferView = n), (t.format = i), (t.invertY = r), (t._compression = o)), + t.width % 4 != 0 && this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1), + o && n ? this._gl.compressedTexImage3D(s, 0, this.getCaps().s3tc[o], t.width, t.height, t.depth, 0, n) : this._gl.texImage3D(s, 0, u, t.width, t.height, t.depth, 0, l, c, n), + t.generateMipMaps && this._gl.generateMipmap(s), + this._bindTextureDirectly(s, null), + (t.isReady = !0); + }; + } + (a.a.prototype.updateRawTexture = function (e, t, n, i, r, o) { + if ((void 0 === r && (r = null), void 0 === o && (o = 0), e)) { + var a = this._getRGBABufferInternalSizedFormat(o, n), + s = this._getInternalFormat(n), + c = this._getWebGLTextureType(o); + this._bindTextureDirectly(this._gl.TEXTURE_2D, e, !0), + this._unpackFlipY(void 0 === i || !!i), + this._doNotHandleContextLost || ((e._bufferView = t), (e.format = n), (e.type = o), (e.invertY = i), (e._compression = r)), + e.width % 4 != 0 && this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1), + r && t ? this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, this.getCaps().s3tc[r], e.width, e.height, 0, t) : this._gl.texImage2D(this._gl.TEXTURE_2D, 0, a, e.width, e.height, 0, s, c, t), + e.generateMipMaps && this._gl.generateMipmap(this._gl.TEXTURE_2D), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null), + (e.isReady = !0); + } + }), + (a.a.prototype.createRawTexture = function (e, t, n, r, o, a, s, c, l) { + void 0 === c && (c = null), void 0 === l && (l = 0); + var u = new i.a(this, i.b.Raw); + (u.baseWidth = t), + (u.baseHeight = n), + (u.width = t), + (u.height = n), + (u.format = r), + (u.generateMipMaps = o), + (u.samplingMode = s), + (u.invertY = a), + (u._compression = c), + (u.type = l), + this._doNotHandleContextLost || (u._bufferView = e), + this.updateRawTexture(u, e, r, a, c, l), + this._bindTextureDirectly(this._gl.TEXTURE_2D, u, !0); + var h = this._getSamplingParameters(s, o); + return ( + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, h.mag), + this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, h.min), + o && this._gl.generateMipmap(this._gl.TEXTURE_2D), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null), + this._internalTexturesCache.push(u), + u + ); + }), + (a.a.prototype.createRawCubeTexture = function (e, t, n, a, s, c, l, u) { + void 0 === u && (u = null); + var h = this._gl, + d = new i.a(this, i.b.CubeRaw); + (d.isCube = !0), (d.format = n), (d.type = a), this._doNotHandleContextLost || (d._bufferViewArray = e); + var p = this._getWebGLTextureType(a), + f = this._getInternalFormat(n); + f === h.RGB && (f = h.RGBA), + p !== h.FLOAT || this._caps.textureFloatLinearFiltering + ? p !== this._gl.HALF_FLOAT_OES || this._caps.textureHalfFloatLinearFiltering + ? p !== h.FLOAT || this._caps.textureFloatRender + ? p !== h.HALF_FLOAT || this._caps.colorBufferFloat || ((s = !1), r.a.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")) + : ((s = !1), r.a.Warn("Render to float textures is not supported. Mipmap generation forced to false.")) + : ((s = !1), (l = 1), r.a.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")) + : ((s = !1), (l = 1), r.a.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")); + var m = t, + g = m; + (d.width = m), + (d.height = g), + !this.needPOTTextures || (o.b.IsExponentOfTwo(d.width) && o.b.IsExponentOfTwo(d.height)) || (s = !1), + e && this.updateRawCubeTexture(d, e, n, a, c, u), + this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, d, !0), + e && s && this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP); + var b = this._getSamplingParameters(l, s); + return ( + h.texParameteri(h.TEXTURE_CUBE_MAP, h.TEXTURE_MAG_FILTER, b.mag), + h.texParameteri(h.TEXTURE_CUBE_MAP, h.TEXTURE_MIN_FILTER, b.min), + h.texParameteri(h.TEXTURE_CUBE_MAP, h.TEXTURE_WRAP_S, h.CLAMP_TO_EDGE), + h.texParameteri(h.TEXTURE_CUBE_MAP, h.TEXTURE_WRAP_T, h.CLAMP_TO_EDGE), + this._bindTextureDirectly(h.TEXTURE_CUBE_MAP, null), + (d.generateMipMaps = s), + d + ); + }), + (a.a.prototype.updateRawCubeTexture = function (e, t, n, i, r, a, s) { + void 0 === a && (a = null), void 0 === s && (s = 0), (e._bufferViewArray = t), (e.format = n), (e.type = i), (e.invertY = r), (e._compression = a); + var c = this._gl, + l = this._getWebGLTextureType(i), + u = this._getInternalFormat(n), + h = this._getRGBABufferInternalSizedFormat(i), + d = !1; + u === c.RGB && ((u = c.RGBA), (d = !0)), this._bindTextureDirectly(c.TEXTURE_CUBE_MAP, e, !0), this._unpackFlipY(void 0 === r || !!r), e.width % 4 != 0 && c.pixelStorei(c.UNPACK_ALIGNMENT, 1); + for (var p = 0; p < 6; p++) { + var f = t[p]; + a + ? c.compressedTexImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X + p, s, this.getCaps().s3tc[a], e.width, e.height, 0, f) + : (d && (f = this._convertRGBtoRGBATextureData(f, e.width, e.height, i)), c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X + p, s, h, e.width, e.height, 0, u, l, f)); + } + (!this.needPOTTextures || (o.b.IsExponentOfTwo(e.width) && o.b.IsExponentOfTwo(e.height))) && e.generateMipMaps && 0 === s && this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP), + this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null), + (e.isReady = !0); + }), + (a.a.prototype.createRawCubeTextureFromUrl = function (e, t, n, i, r, o, a, s, c, l, u, h) { + var d = this; + void 0 === c && (c = null), void 0 === l && (l = null), void 0 === u && (u = 3), void 0 === h && (h = !1); + var p = this._gl, + f = this.createRawCubeTexture(null, n, i, r, !o, h, u, null); + t._addPendingData(f), (f.url = e), this._internalTexturesCache.push(f); + return ( + this._loadFile( + e, + function (e) { + !(function (e) { + var n = f.width, + o = a(e); + if (o) { + if (s) { + var l = d._getWebGLTextureType(r), + u = d._getInternalFormat(i), + m = d._getRGBABufferInternalSizedFormat(r), + g = !1; + u === p.RGB && ((u = p.RGBA), (g = !0)), d._bindTextureDirectly(p.TEXTURE_CUBE_MAP, f, !0), d._unpackFlipY(!1); + for (var b = s(o), _ = 0; _ < b.length; _++) + for (var v = n >> _, y = 0; y < 6; y++) { + var C = b[_][y]; + g && (C = d._convertRGBtoRGBATextureData(C, v, v, r)), p.texImage2D(y, _, m, v, v, 0, u, l, C); + } + d._bindTextureDirectly(p.TEXTURE_CUBE_MAP, null); + } else d.updateRawCubeTexture(f, o, i, r, h); + (f.isReady = !0), t._removePendingData(f), c && c(); + } + })(e); + }, + void 0, + t.offlineProvider, + !0, + function (e, n) { + t._removePendingData(f), l && e && l(e.status + " " + e.statusText, n); + } + ), + f + ); + }), + (a.a.prototype.createRawTexture2DArray = s(!1)), + (a.a.prototype.createRawTexture3D = s(!0)), + (a.a.prototype.updateRawTexture2DArray = c(!1)), + (a.a.prototype.updateRawTexture3D = c(!0)); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.getMessageKeyForDeath = t.MonkeyState = t.DeathType = t.MovementAnimations = t.AnimationState = t.MovementState = t.Turn = t.TurnState = t.TiltState = t.CharacterParams = void 0); + const i = n(62), + r = n(150); + var o, a, s; + (t.CharacterParams = class { + constructor() { + (this.currentSegment = 0), + (this.currentVelocity = 0), + (this.boostVelocity = 0), + (this.currentPosition = new i.Vector3(0, 0, 13)), + (this.currentDirection = new i.Vector3(0, 0, -1)), + (this.distanceFromPieceStart = 0), + (this.distanceFromStartOfSegment = 0), + (this.pathId = 0), + (this.deltaDistance = 0); + } + }), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Left = 1)] = "Left"), (e[(e.Right = 2)] = "Right"); + })(t.TiltState || (t.TiltState = {})), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Done = 1)] = "Done"), (e[(e.Pending = 2)] = "Pending"), (e[(e.Failed = 3)] = "Failed"), (e[(e.CanTilt = 4)] = "CanTilt"); + })(t.TurnState || (t.TurnState = {})), + (function (e) { + (e[(e.None = 0)] = "None"), (e[(e.Left = 1)] = "Left"), (e[(e.Right = 2)] = "Right"); + })(t.Turn || (t.Turn = {})), + (function (e) { + (e[(e.Idle = 0)] = "Idle"), (e[(e.Running = 1)] = "Running"), (e[(e.WaterSliding = 2)] = "WaterSliding"), (e[(e.CartRiding = 3)] = "CartRiding"), (e[(e.Ziplining = 4)] = "Ziplining"), (e[(e.Death = 5)] = "Death"); + })((o = t.MovementState || (t.MovementState = {}))), + (function (e) { + (e[(e.None = -1)] = "None"), + (e[(e.Idle = 0)] = "Idle"), + (e[(e.Run = 1)] = "Run"), + (e[(e.RunStumble = 2)] = "RunStumble"), + (e[(e.SlideEnter = 3)] = "SlideEnter"), + (e[(e.Slide = 4)] = "Slide"), + (e[(e.Jump = 5)] = "Jump"), + (e[(e.DeathByHit = 6)] = "DeathByHit"), + (e[(e.DeathByFall = 7)] = "DeathByFall"), + (e[(e.DeathByMineHit = 8)] = "DeathByMineHit"), + (e[(e.DeathByWaterFall = 9)] = "DeathByWaterFall"), + (e[(e.Zipline = 10)] = "Zipline"), + (e[(e.WaterSlideEnter = 11)] = "WaterSlideEnter"), + (e[(e.WaterSlide = 12)] = "WaterSlide"), + (e[(e.MineCart = 13)] = "MineCart"), + (e[(e.MineCartDuck = 14)] = "MineCartDuck"), + (e[(e.MineCartEnter = 15)] = "MineCartEnter"), + (e[(e.MineCartExit = 16)] = "MineCartExit"); + })((a = t.AnimationState || (t.AnimationState = {}))), + (t.MovementAnimations = new Map([ + [o.Idle, a.Idle], + [o.Running, a.Run], + [o.WaterSliding, a.WaterSlideEnter], + [o.CartRiding, a.MineCartEnter], + [o.Ziplining, a.Zipline], + ])), + (function (e) { + (e[(e.Fall = 0)] = "Fall"), + (e[(e.Eaten = 1)] = "Eaten"), + (e[(e.Fire = 2)] = "Fire"), + (e[(e.MineDuck = 3)] = "MineDuck"), + (e[(e.MineLedge = 4)] = "MineLedge"), + (e[(e.Mine = 5)] = "Mine"), + (e[(e.Wheel = 6)] = "Wheel"), + (e[(e.WaterLeft = 7)] = "WaterLeft"), + (e[(e.Ledge = 8)] = "Ledge"), + (e[(e.SceneryTree = 9)] = "SceneryTree"), + (e[(e.SceneryRock = 10)] = "SceneryRock"), + (e[(e.DeathThrow = 11)] = "DeathThrow"), + (e[(e.None = 12)] = "None"), + (e[(e.WaterRight = 13)] = "WaterRight"), + (e[(e.DeathByHit = 14)] = "DeathByHit"), + (e[(e.DeathByFall = 15)] = "DeathByFall"), + (e[(e.DeathByCart = 16)] = "DeathByCart"), + (e[(e.DeathByWater = 17)] = "DeathByWater"); + })((s = t.DeathType || (t.DeathType = {}))), + (function (e) { + (e[(e.None = -1)] = "None"), (e[(e.Disappearing = 0)] = "Disappearing"), (e[(e.Idle = 1)] = "Idle"), (e[(e.Chase = 2)] = "Chase"), (e[(e.Jump = 3)] = "Jump"), (e[(e.Taunt = 4)] = "Taunt"); + })(t.MonkeyState || (t.MonkeyState = {})); + const c = n(249); + t.getMessageKeyForDeath = (e) => { + let t = "", + n = "0% 0%"; + switch (e) { + case s.Fall: + case s.DeathByFall: + (t = "Fall"), (n = "100% 200%"); + break; + case s.Eaten: + (t = "Eaten"), (n = "0% 200%"); + break; + case s.Fire: + (t = "Fire"), (n = "0% 300%"); + break; + case s.MineDuck: + (t = "MineDuck"), (n = "0% 300%"); + break; + case s.MineLedge: + (t = "MineLedge"), (n = "0% 0%"); + break; + case s.Mine: + case s.DeathByCart: + (t = "Mine"), (n = "0% 0%"); + break; + case s.Wheel: + (t = "Wheel"), (n = "0% 0%"); + break; + case s.WaterLeft: + (t = "WaterLeft"), (n = "100% 100%"); + break; + case s.WaterRight: + (t = "WaterRight"), (n = "100% 100%"); + break; + case s.Ledge: + (t = "Ledge"), (n = "100% 200%"); + break; + case s.SceneryTree: + (t = "SceneryTree"), (n = "0% 0%"); + break; + case s.SceneryRock: + (t = "SceneryRock"), (n = "0% 0%"); + break; + case s.DeathThrow: + case s.DeathByHit: + (t = "DeathThrow"), (n = "0% 100%"); + break; + default: + (t = "None"), (n = "0% 0%"); + } + const i = c[t]; + return { message: i[r.Utils.random(0, i.length)], position: n, messageKey: t }; + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.prototype.attributeProcessor = function (e) { + return e.replace("attribute", "in"); + }), + (e.prototype.varyingProcessor = function (e, t) { + return e.replace("varying", t ? "in" : "out"); + }), + (e.prototype.postProcessor = function (e, t, n) { + var i = -1 !== e.search(/#extension.+GL_EXT_draw_buffers.+require/); + if (((e = (e = e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g, "")).replace(/texture2D\s*\(/g, "texture(")), n)) + e = (e = (e = (e = (e = (e = (e = e.replace(/texture2DLodEXT\s*\(/g, "textureLod(")).replace(/textureCubeLodEXT\s*\(/g, "textureLod(")).replace(/textureCube\s*\(/g, "texture(")).replace( + /gl_FragDepthEXT/g, + "gl_FragDepth" + )).replace(/gl_FragColor/g, "glFragColor")).replace(/gl_FragData/g, "glFragData")).replace(/void\s+?main\s*\(/g, (i ? "" : "out vec4 glFragColor;\n") + "void main("); + else if (-1 !== t.indexOf("#define MULTIVIEW")) return "#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n" + e; + return e; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(8), + r = n(197), + o = (function () { + function e() {} + return ( + (e.GetEnvironmentBRDFTexture = function (e) { + if (!e.environmentBRDFTexture) { + var t = e.useDelayedTextureLoading; + e.useDelayedTextureLoading = !1; + var n = e._blockEntityCollection; + e._blockEntityCollection = !1; + var o = i.a.CreateFromBase64String(this._environmentBRDFBase64Texture, "EnvironmentBRDFTexture", e, !0, !1, i.a.BILINEAR_SAMPLINGMODE); + e._blockEntityCollection = n; + var a = e.getEngine().getLoadedTexturesCache(), + s = a.indexOf(o.getInternalTexture()); + -1 !== s && a.splice(s, 1), (o.isRGBD = !0), (o.wrapU = i.a.CLAMP_ADDRESSMODE), (o.wrapV = i.a.CLAMP_ADDRESSMODE), (e.environmentBRDFTexture = o), (e.useDelayedTextureLoading = t), r.a.ExpandRGBDTexture(o); + } + return e.environmentBRDFTexture; + }), + (e._environmentBRDFBase64Texture = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAgAElEQVR42u29yY5tWXIlZnbuiSaTbZFUkZRKrCKhElASQA0EoQABgn6hJvoXzfUP+gP9hWb6Bg00IgRoQJaKqUxmZmTEe8/v0uB2u7Fm2T7HIyIrnz88uPvt3f2a2WrMbOvf/u3PvvzP/sUf/N6//i8vf/lv/3v5H//d//Sb//Uq/5u8yf8hV/m/5Cp/L1f5hVzlG7nKJ7mKyJuIXN/hPwqXI/g++zq6rPI5u8z+WqfLre+zy7PrVv9L8brsMiGvk8XLmM/sdfHXal4e3ad6GXPdyu2ij8u/+uv/5cuf/OSLfdtEfvUr+dnf/d0X//t3H/7bf/hP//N/928h/0Yg/4VA/kogfyGQP5Wr/IFAvhbIlwK5CGQTPP+9z5uPeePJSW+yo2+s/GtN30Rnv1E+f5zxof9R/lSXv/nr//mrr3+i+5dfyX7ZZQP07Tffys//8R/l/9TtX7790T/7r/8G8pdy+/8XAvnnAvkzgfwzgfyxQP5AIL8vkJ8K5KsmMVzu1U7p5PA5AXxOAJ8TwPf7sX/51ZeXfcemqnp9w/W77/S7X/6T/vzf/7383RWCX3/z05/9i3/13/0PX//eX/2FyP8tIv+PiPy9iPy/IvIzEfm5iPxCRH4lIt/c/393//9BRD6KyKf7f488fP74/PH544dJAF9cLl98IZfLBZtuqterXr/7Dt9982v95S9+Lv+gF/3i7Spv/8lf/vnf/vGf/dF/JfKnIvLnIvLvReQ/NEngn0TklyLy6/v/34jIt00iGJOBlxAsdvv54/PH5493SQCXy9t2ueh2ueimKorrFbjq9eNH+fDtb+TXv/ol/vHyhX4Fxfbx7euPf/Lnf/PfiPyeiPyhiPxxkwB+fk8AvxzQgJcIrGTwFsiAEXH4/PH54/PHUgLY7whgu2C7bLqpQgHB2xvePn6SDx8+6G9+84384vKF/IPu8iVU9Y/+7C/+jWxffiHytYj8VER+X0T+oEEBvxqQwCMJeIngo5EI3goIwVMIPn98/vj8ESaAbbtu2ybbvl8u2ybbdtluSECA65u8ffqIDx8+6G++/VZ/efkV/sO261dQXP7wT/7kX8vl8qXIFyLylbySwe/dE0CLAr65B/9vGn0gQwRMMqgmhM/J4fPH548eAezbZd/lsm3YtssNAYiqiogAAkCvb5/k46cP8u2HD/rrb7+R/2/b9Wu9yJe//8d/9Ney6S5yEZFdRL68/38khG/uKOCnAwoYkcCoEXwkEgGDDq7CeQfyOTl8/vhd1QCum26ybZtu2yabbrKpQvXue1yvuF6v+vbpTT5+/CDffviAX1++1V9sO77WXb/66R/+4V/dgkbllQi+aBLBV/dE8LWRALwkYCWCNyMZXElkwLTMeMkga/P4/PH547ccAVwuctkvdxSw6bbdtYDbTfSZBN7e8PHTR/3u4wf55vKd/nL7DX6mu3791U9//5+/gkNFZGuSgZUQvnKowKgLWLTAQgRtEniTuEfwaELw0MJvf3LQzynud+53uG+X6y3gN9kul+2y6XVT1U27JCDAFVc8ksAn/e7jR/nN5YP+avtWfq6Xy9f7Vz/9w1dgRYngiyYhfNkkgzYBWHTg44AEMmqQUYQKOmDaiCIa8TmsfmzB+DnZDQjgcpGLbti2y3bZHjRAdRMVvb/dcYU8kcDbPQlsH/CrbddfbF98+RPZfvLFnAQeieCRDC5DMvju/vmD4JkEvjRQgKULeGggowdHkAHTYxihg89vu88I5UeGAPSOAFTlrgPopiqbKPSmCKreUoAAkCcSePukHz590m8vH+WbD9/JP335k6/+tA86KxFchv8jMvhiogE4JQm8XhfKqOAqx5qRPyeGzx8/cgSwbXcUoLJtim27C4Oi93+4v6VxQwKAvl2v+Hj9pB8+fZJvt4/yzfbF9lPdv/wJnsE2BogmyeCRED40tGFvksIXiSbgiYSRRpDNDZ6BDI6ghM+J4fPHeyKAO+zX7cb9t4tedMMNAQju5V+f1uAtBSiu1zsduMrHy5t8ePsk3376KN98sX/xE5FPAnm7/782o0DiUINXMkCXCB7/P94/e87AWUmARQWVvgMuKej9t1RLBp+Tw+ePgwngsutFFdu26WXbbl+rSvdfbnqAiuA23QcBgCugV1zl7e1NPm5v+LC96XfbJ/1W9y++fgXjA3bDYXV+MuhRwSPwL3JLMFYC+HS/LU8HYrGwIhwyNOF12SvgM4SgztdifP85MXz+KGsA2C6X7aJ6bXSAOwrY5OYIqGy3d5uq4P5GhABXuV6veLvRAf10fZMPb2/y3b7vX7+g+9v98/WOBq7GG7RNAlYy+Dgkhhb+Xxp0sE8IAC4SGAP/TbgVJK/PoJPBnAiwPKxsXfbbnRg+i3s/JAK4Q/4b9NfLtomBAqCickMBjy7BuywAUVyv8na94tMjCVzf9KNcLl/0SeA6oAEYb1i9g+FtSALb/bKL8/+t+wxXFMyswqiHoK4ToIgKqslgpg1qUC0QoYbvJZg/B/q5v4szHmPX7YEAsD0CX25OwEUVm9xag1+agKg+nxQArnKjAtDr9U0+Xd/k4/UqH7bL5YsewrcBBiMJZPRAp6TwQgWfjM9vgRbgUYGL8AvLWH2gqhesCokeUmCSwPsnhs8fP2YNYMO2XeSmAWxy2VQaXeDmDIhApf33rD4PTUCuV+DtCn27XuXT5ir8VmCJ2G5BpBM8/r/dEcJb8/0lEQMtJHA5TAlqNuLRhJChhEpSqFabH3di+G1AGj+W1/dyAR4IYJNNnuLf6+tWC9CHHiAtFhAIFLjK2/Uqn65X+SS67aK+3QeTDoy/IG2ogQ7fb/dAtz5vBgrYGqrwNtCHsVfgIvwK07OTQBURVNCBFpKCOjqCHn5L/67TgTN+fpySAC56nwSUi256kXsSuFGAVyLoUIDo8/Pz7fdoErr/v17lk162HbgHvFpIYDfoAJJfW4sGPjkU4VNAF8ZEcLmLhdc7kljdY1y1Dq9yLiI4IiRqcLujb138KIPn80ejATwRwIbtBvn1cqv+2J78/5EI5N4cJA8qIPcmwRsKAHDF9WYP6mV7VmrgLuTpxYTcMEW0LAmoQxFsuvAI8tv/a/C5fV2ZMMiKg++FCM7RDPRu8ebWY7VG6VJi+Bzk35MI2LsAckMAgwvQ0gC5DQjd3ABg2HQLAPpEAlZ1Bu7VV7MGHDFRAbo3VKsTbAY9sPWC/uvx86gBbDK3D1eEQS8pbAeSgSwmhepnJb6uBv/o/PzHLzxWA/X7TH77De5j6AGQi6o0CUGfCOD2X7cXAlCFQABtEsGLDtxuOyQB2UTQBKZe5GUPXgkUYCUAbZJRhBDeuq8xBf+bgwbehDm+BFQi2IJksOocvA8ysIMfxluVcRsY/eB3JzH8GFDAXQO48X/dcIf9jyDHptIigDsFkEe066tBSETQUYF7ElDdYEBytN4+rk9UcBPfrKaZqFHWcw3i4J8/X4ev2//bSXqAhwTay6OEIPLD2Ipt8OtAGzxkwLw9WVFRjTc/qC6H3+YK/b1oAA0KuOizHfieCLaHHiAb5NYTIC9EMEbZrVEQt1xwhVy1UfBh8PUOquMizwaap3tQXfY5B//tea/NZdfhsvbz+PURQTDSGWB87VX/7WSd4KxjUqrIgE0IUkoKGnhIvwvawpGf6eECXJ7tv4qbA7DJgwpsKthEmmYgfaAAffYF3HLxo0vwNjJ0SwRWMG4db4eh1gPNm18vQ+us/0eGmxDemu/fnM/X4evq/8342ksGHgLY5LyT/zg0wM8lcMjgGFXwqIOVFJBQw99eCvF9oZL9Mfl3QwAvIXDsBRC9R+fz8x0FPBLB0xJEpwUobrfAkARgIAF41h3wQgP6QAmX5E/7eI43IxGwwf/moIkRyWRJQIPgt9CA9b39nzt4bYUWjAlCjWDPgv8IEjgLJfzuaAsrv9VdVG4OwOXW/fdoA35qAdL0BDwvf6AAUVHd8LIEu94A3K+Q+2YxaB84MOH62P//qoo38fCRDERE2zf0JfmDa+MieElAjcDPKz+mRKCOtdgGtXaBjgNJ4H2owSpNeAW/rRH4CaHSpMwnBYYycjgSJwfie9CR6mPu20Uv8kABF206AvXlBMiIBPSlB9wjBW1fwEuSb94296VCqgMaGCt/G1BbExi3IG+r3a3J6P48Gv/J0YmEYoiGY7V/SxwFCwGoE/xa0AJ0CEiV9QPCJb1OJ5F1VTjEY2/MO9AEJvj1BJTQpqLfTlGwjABuzT962e4IoKnyrdh3+/6mzDVJ4PHOxj0JqGKoy20+wBMN6D1gLWi9NQHfVP5MEEPzjGYy8BMAOnTAJgEr8HUIejRo5xrA5xkR5AngmiSHs+zDDAmMgWzTg55GSJEmHE8IvWPAoYTfhWak/Wn/bQ0CGLSAjv83SUEfKp5q24LXuQICpzrjrgWoza8xVE00CQCORdhMJuTUT/rjuls0gO4Iby8BIEgK6gS7BsGuTtDrScH/fR68biUHNVGBnxjeNyHEvQe/ve3LZQqgG3rof6cEclsNflG9J4KtaQ8WHcVBHS1BtHE4QP9OBMS98mpbKTeDW7dJwRsnHpMBTFJpV4I+b0kY/NqInVFSyBLANbnMSgBM8F+Fqfxq/h657/Up+GaBnwV9hRqc9bZ/vA6vu+T9E8KPJWns94UfTeCj2QXwCHS9dNL8Xf3Ho/rfewSeFODGDV69AU0y6NFAE1DP3qK++rdB7/1HRxf86gT376zOr99T/h/ioBiXWQkgQgVeIrCC/WomhDmQK+hASI2ARQZKooHMLdCJwGEBBXC3+uERwg+VOHZ9ioAt9H80AI06wGgJ3nQA3BoCut6AhxYwgcPOFnxuFnrphk+NIKIGrWPQtgz3b0i7Y6D5rs1GKqTop0nQX52vmQC4BkjA+r4a7Kx9WLENGeegkhSETBCrNXIMdi/444Rw1n6E96ry7OPuj8UfLxtQ78NA2iSBbg7gIiIbdDLsb5agPhLC3RkYKv8NDbS2YGsatNRAG2oQwf9ZIOydgy1MAzBkAw8UwEEIDzSAqdPQ6za0PkeJAMH3Z0wXniUSZoHvBXU2mcjQgv56TedIKglCpIoQfgwCIjOytd8WgN0bfxoR8Fn9Gx0Aj5Zgq0lIZbsH/ibSJoFnS+C98g9ooHEELI3gliy25yONIiE6pb0NfBlyNEYyENoodkKwgl6I6s8kARgJ4ZoEfuYWHLEJa0LhSBXm7kImGeSfVdoJ1DO2G7WXsehAptupSOoyrCSF904k+6vt98X/ZcM98Hsd4JYIXhQAIg3/f9AAUYhsLQKAtkHVBnzjCKhOoYl2ym+iBtvzDzQ2DLXJ4PUmbJHAVnBQX4jkxfvHhNDqAdHXGQJgv0aSDGItgOseHIU+K9hXnIJzkoGlEKzNHagTdJ6VWEUH4iCKH4fd2AwDPaYBm4Wgng4gQ9V/CoGiuNmD04AQtNGMGzSAAQ2I2pzfogY9LRh7BrbOh4+D30sAencljFu2CUFrwY8UAWRfWwGvVOVfbx2uIILM0pwDv082dUTw8hYs8L+uIWiHGpWgClnAa1lMPJogovvvbePPs/q3Xr++kgCsfgB5oQF9WYKPJqEn6G+OE3i5AqouF59FQOmahQC8rlPLj38kg1c2f30vw+XaoIX24/pMGIgSBoZqoH3wo0sIIGlA9PWcCPrAtpPB8eBf6x1o6cHra+2+tpIFP4PgBfxZtZUJfo4qxELT948D9ucK8Mt9+ccjIQw6QJcEbrD/1g340ATuDgDkFfx6twSf1f9xvuBECYxq/7ythQQGm+5JDx6Brw4CkMGT3wgscCUoQ4sU2t6DR2ciBjTgtcpenQoZVX9NuL4Owc+dVaDursYVkVALX+shjSBKBuvCYDUZjE5BdNkxdHAUBexyHwB6NP7Iyw7sxUDViwge1t+mz8B/LAvVx/c3PeBBCToB8IUGOgqA3iV4yUg6UAOxaUFHDx6CYS8SorMOue0CCJGAf5YfRhoAI+A1CvwxqNkAY5yAIx2EQmkFfeWOXi+nEdSQQA0ZHMEItiagJArQxDXIrj8nCfQi4HZPAttrIahso9oPQ/2/JwV5JQU8zw+7I4D7/sBn4EO6rjw0FR+i3Z9fHtahzsFvJgM0X+tmVH5vaYiNDGAigewAz+gyNLThnjCURQFR1b9d3lZvnVqmj9mEPDKIUIC4KCCjBXywS4N+otp/Hk3QVthOkwEKlV9PQwXjT7s/zwF4Qf9toAAzFdjuaEB6S7D1//U5FIQu2MevO0rQQH8ZmoXE6B/IkgE60XCjVoq8gt2iCG0S8L5GdxkM1cGsfsCMArSCAnrr7dzAZxCEEpepvB8tqHJ/q+bmJGGts/AcAXFOMMeTwC7Pw0B6CtCtA2vWgonqBQJFSwH0JQK29OB2kvgj2HHXAoyeAIsCQO0kMNECAhFMqCBf8mElAkyBbX1tJQP2RJ/ha0gpAfS9l+/5n00CkrQpq0MZbOdAuxmMvHswog62jZj7BnYQe19b14kxNq2D/ehX/p68HEcF+x3yP7z/V/A/q/5DA3i5A/dzA5pdgbKp3v3/wQF4Bb70WkCTHGRAA6+KL0bFl6FJaFw0ImZwm6igSwbbwPn9RMBWf3sN2JgA/BVh/Rg0kQBgePf6HglAHLFQwqQQOwDjbdVxNZjR4iM6Qa3WxwvNxh0JFb3g/WzFQQS8b/ttKcDWoABtUMAd8j9hf0MB2uDXhzX4CHj03L9DBU3Qjz0C0l4mLSLQPicOOwZoVCB6P6dA7nDbGkVuxcNr8PU2JQO4wX5trEqmccZaHU4q8oCDFOpzAnOwqyMIMktNNNAHouDGxO37DgArQZzlmp/14W1QlqHTMaIIx7SCx0+5yza7AKJ3IXBrNAHVDcMZAU/BT/vgv/ULPOA+XiLggAREDF2g0ci6xNDRglegd7P7TWWH5oJfayliEg7bScQRBVgI4Ookg/F6rvpLWP29swREqA3CaG8/FpKqS8DTAV4TiBqIqtxfzaQRLys5I0XEFIFrPbZRQb+16Fgi2LvJv8EFUPW1gGfQv1T/F/d/HBnccP7rAwnIIyHI4ArgWeGbU4eHy6Tx/EeTZIb5bo/BsMBjmjBE08f/RB0PHYBd9eVRAGY7cHRwiBf8WeCPHY1bgBTa9xKTELzEkQX9CPtl0gJiqsAmCT7I8xbjivh3JGFI+D2nBcSJQJ8agDX+O9iBL7UfG4bzAkcaICrbtYHz1ycSmGmAjJfL3CMgT3tQpmrfB7gxSzC1DnvdhQMieG47u75+kTouKNkM8c/+vq/Q7ZYjO/hhVvRq8F/9gGfhP8aqE9EIdR6LTwJ1h0BItyDqB8iFwuNqASscRnYioxOg9ApvnYA35f8e9Ohbfe8J4rknoFkO0lmA2gmAG0YK0DkB4ieEjiLoMD8wBzom27ANZkzIoU8EMHk/uo1mzeVoEoRWKn8L/62EYAX/lsB7D/LXg74uAMr9oGivJ0CNJCGD6i9DhZdQF+gtOp4S+NODRzsDVbhdgv4BqTMNyIL9SCKwL9/FGPp5oQKxIf8A/UX6r231H7YIqLML0Ae2GtrADOvRQH5b/MPE9dt9BGLNG8jVTAQvIaK5TtvvvWQgDvyXIClUA78S9Nfg7VtIBlO7cbsEYkQDMot+ygQ7QwmOawTHnAM2XUSnJvPIYRYMmYPS+sv3J+cfP3d04JYIXsF/EwMbBKB9Q9AY+BiSwFj9mzrSXmcJhFPVHySTbgHJCPvRQ/z7G/SVUETsg0ZF+i3CRoCjhf7y1A9mOiDD7TwdwEoEXjLwAv+avLE2B7Jnb+OqDpBoAchoQJskxKnss0vu7Q2YhcDv4ySeLOg9GsCKiUIihP7yfW7zbTsBh0TQfN0iAWn9f72Z56/Ax9P7j5OAH/Qvv3/QxKfk0DgDuP+R3USg3bzBC7bO/QT9Eeh9QvDPG7glBQzJwK740lAFFgFk8P88CqDGAa223YckWYhr+c0BPdwetl2ocnsfzePAWcVnnAIp6gDVhDLyfV4nqFEDPxHsbWD3k4BDkN+pARqKMLYBPzYEvxp9xmCHQQdgWH/9EtH2TIFpu3AH/cdGydv1j0TQbRrq+D/mLcX3ZACZ15bF378CG0My6Kq/zoGOQwhASDFwFbxyNGBuSxbCEhQ/uEPe/6gAERWQObCVVfjPpQX+rexxYhYFxIkgpgX7Y/vPs+Pvxf9vwt8kAs7i32t3QCP+3SPaTwIytQXP38u0PESm+YER+o9B3vr8mETAUfDrEkPI80ck0FZ0dXh9U+HRbhey0cAc2H7A4y4egoD6y8JfkBiigLdFP8v2W00E8deT2IeAKujZ/QAVKpAtKI20gLWksHedfgPcb+0+NEHefd9vB9rayi8h7J91gBbaw20MsnWAF5xHkyDUCOoXp+yrOwwxcKj0aL6fFppaaKDv6OpHR5sgx5BAlK/+fYhuP1D196o8e7lFBaKqv5YIMnFQpd0FGVR35RJCnCDaABaXBtgbiSwtICMtalKC+1JQ6bx/PLcDPQL91QFodQNKpwOgF/9eqcBxBBqRcKAAVk+ArQOMx1RYGgB6naDhlK+uQQwJYx4meQbxtNnYQwMjt/d4f3M9ZE4UOld1LAh99fbfzOxiEkKFCkTJIUIMUeVnJ/9sDt8/e1NEJOi9oVHDGYhgnSLss9DX2IAqw1zALUncKcDr0FB5NP+0cBQNrEezDiyiADPkt9qGpwoPdL0AGPx/NOKeyf3b9WJNdfcFv6bKd2cLMJVfJ6Y3B6wB9WFUfWWEwKMfGiQL+3bz9XGQz2EHKhF41GCtZyDi/gUCsNhYoAr3UNJ58YidHKqnMb/6AB5J4N73/4L+t7mAkeeP3P+1LNSB/l0SkMEd8DcEuUlguEw6t2AU/PCE/q++Akw6QFf1u6SBrj1ZnnhG50AfkoGIdf7gJv1KcSfgzWWkQ9U33Z3tHXYASKJ9e/YhU90rvD+q9Ej69/wxYJVs506Eg/r3DkMDzEdDBRGgcZay49XihLA30P+l8N+hf1f57/0AoxbQbwYaan/rBMirE9Dk+sBzTkC8JNDEUlv5McB8PP19Y01Gayep+hC/2zvQ/2HGLAurowsNGlA1cnqGGzeH5weiYLZm7h3QQC4O2tXdhvMMk1ZS5ebpgI8eMrPvPGkwaxayk8Yc6PMOBPEdC1XZ+2UfbfOPtxLMQQAG9BcZFoF0gp/RKjxe7+oAw9T7ZPWhgedodgz0gf5KBtrtIZhQAZpAV1Bi36w6t98qVfH7hqGI318lLCjLCUFlxRHwqYEH9a2qb4XjWvDT7kBwfbZA5P0+PNuRuW1yf4yNQH3zzwv6b70QOJ0G9OT/dhoYRUGT15uQH/71MjQLtQlxfDuiCXrtM+SkA+icQdH6sU/xz7Ze7FlubV4TpoTQ2osdpaEjtqADmEU7OkBEFoLeC3IWFFeswJXKXzkboNL+wzcFHU8hTGKIboO7CLi1/P+5F+gydQhuvRbwEgxvtACmANikhLTbj0gCYk8KdlYgmj+4Ymaod7TwahwadICuX0Cm2fE5iNHPK0x/CDV66Kyg1MnqjNFBnhBoLQCgUULfaVe5nq/6EQWY67bXCszUb+7232fVPz51iGB12owK9peyP1T4raMFF/OEYJP792mgXYfZ04GHMAhBkCSmSj+dKqRPgVFGHbpLEGMiGFeQWfSgrY52VxaeDUPSNJI0P7NoisG729HHl78z6hxfs9rV3m4JjgM/lsui2qmThjCfDFSb+I9vwUqG5wwL55U7C+6ot8B+7N2o6r3q37T9trfpjgmTvv7PSQATLLeRAOZhIJHBQfDQQJPBdUwEbVW3+L08EcEE/9G4ANrCeWcnPKRHDupbNynMx5AA9IRYLmrc/YLSiD5EaEBS/s/TgnU9ILcH19n+CpHwegLejx7Mn/d25fdN+e9U/1vgb7bqf08MOtf8EXxaoh+GY8L6gDfhvs4i6HQ7seYI2sv1GchdMsBIG3xlvxcCRzdgCPTn+6q/TW00VE8Q9FaFv+R2VlOM1vm/hhjhDCdgNflVKME5B47I9xT8z0YgPAJ8myb/LqHy36j/Mwqw9AALxuO1JVjiuQAYLcFzIhiEPe05fk8tRjGw7yWQbsfuLAT2VqOId1osnr0F49VM8INACPHDoBz4B5mqqSnUgyh3ArjXxfQH5BbgUS8gP7aU+w0zHD9GGD0CGHf+P1p/DeivlhU4BbxR9a2kYFR58YaDZCUR2P0DMmgED2eg77puegy6PgDphEB0CwlG/i9d+/Hs34pBEQrBn0W51mqGnJAk3ACCHeiqkQ1XFQA5AlKH7Lk8yJKWY3/nym14h2C3JvxeMwD9ZVMz0BPMi1n1RbKl1cYhIVblF3G0ATsRiCMUvoK9//OgcwYMoe+ZKOLlC6/Xk50br9NFz9fanqA8UIYSpCwlBO4kHc4WLLBfBHVaKwKgLQjmP4Un61Vq+3s7Bsyi0WztmLjJwJwFeE0I2vD/1Q6MVwefxfUf32skCPbCnxQqf+QMPEUDHZ7vGeyj020JgkPXXwsldA7SYR1RE3h94NvNtugswcgxXEkIcBPCGZ1rmrgDC0A4K88nm2fn/eTnpQtWyZfybRoK8Dro4zYDIMGsf7saTBzvX0SMbkAD6o9CYbsfMK38cJKD9l2FJt9/VGs0h5Gib33pxMKWNsigFUh3G2un+/N1WUglI/EEx8fq27vUNnwsiOoKecL7kQS8VnWAGCFUgn6dBtQhv40CmIYggwK0uwDHRGAuBXVdfwzHUjZzATLMAoyJ4FmBhzaWBlrHld9CCWpPHRqofBqMReMGTJ78q9rDes1Tv7/0m0v0AFHXNR6P6g30SHivin7V1BOhh3iWPwvps/yE836L2XiwnUT8x2iHgfqhnwn667QHEE8oLQjEvtEW7GYBZDrDVkwNIO4G5GiBDf9fGoFM6n+vbEtzXwP6u9AduaWnGYSLAlVdl/AU+ikrSeEIKgwdaZ4AACAASURBVKj4/wtgHcHtdO2nWKcBkPfxcvnNQvsj2Me9f02r76T8q0IBn9OLKfz1HX8yVXQYGoAB/2UeBQ5/5kCL6+H/OGGoRnLSwdd3oH8r7KkGTbgIxEwVWvnF8KOpHnyzfF9Jod5Px+IF1h8owyitDw/XEgRb5bPqbt1uvn7qBIQ16vtS/u+DP3cR7CH0WWJgd5mTJKYgNzoGjQrfvu99NDBC+bnyW1x/qhTatv2OaMKgJWPvv5kwnMgxHYGFRtJW8VMl3uP+MgoqSZyWFKr7+KIDw1d6+IiOgZI4+d5iYL3imzbgyO+tph9t2oSBxOM3ugHtPoFZ1LM0hF4kXNEBssvVgPdjdXZWK7uKvyS3q1Xb1WQwtVDqSUggq+Vw3t56JA2cz7PXOwGNW1ecwxPhfe3QEUsDsFaAz8jg0nf+iZMAHNg/XSazDuC18Iq1HBRrOsAQ8NLB+16g614jmuSgs3bROxE55D+WDDQNA4ivdMJ9M1b309UqknaDU8ObV9/PwmMPATvTMAxpABLBzugUtV9bLdhNDQA+7B9tQJ06/7QNDHGSwtgZOCIA47InIoDdROQGtt0U1HI3GaoUnCnC/rzBMQJteN17+VaAzYNA7e+PFqHQUyXPUYB7iQYa5ZFjq1Zqpx8Uqu/XT7+6BWC1Xaj0GlBIwMoHu7UzcI/6/Acb8KIq+hzmGWmAYnADrIpvKP7TZeLaf0LAeQkGgebbq9FToI44p654F47tekKkI0L5PQNZPsDwPBpy/ni+wKMN76Vav4+2cFZFf8+JwAraMt0DFB7beA/u4Zz/a+RXx0M/ct4/jwaNAS8G17eSwmta0Fhx0VRxJkHMivso+onMXr+YwdWKbgioy1jp4x4AzIKg5lEA7wvHEYCRmdx11TAuT6lDLVl4KvXkAET9P4RT8H2u+lg9EPQIpw+/NpJ7RwE8HaDv/Mu4f3OdNkq/EfAiEiOANjEALvcWL9gfFV4NZbgbQc6qPky4Pm35QZxtH1f4j+P/jXuaYPcWwIEH/fmEPBoAO4m4LGxV3txOQqDU+dXgey+UwSzuqP++uImO/u/6ogCb7wTc1n61sL+vZi87rxnrNas+giTg6QLzaUCjIp6JfhwtGI7AjBBB9JjDY4ePYVR6ZPgN4owVv6Q2N5hhVHwNeYrM+w6dN6K1sMHZm/Ce7bHe3dzKr1xw1w4JrSQMZtgnoQHlr18fzunAszD4qurNUg/TDqzx/lfCaO6t4tACMUQ6P6htWjDPC1hCoZ8kpODzJ70MUR9AODcgwyqyPhmE+wfHYB/hvSqt6qeXUShhXH+d9SR8DzrDaZZdpSp/HxqLMQuATgDU/qDPRgOIeT8cvz/h/XC6BtE7ACLOWPE0KIS4UUjmZaJ2grBphiWgT41BUVWZfP3AnEIT6OrfoF122l2rMycBoU5i/OXoUZ4/aglsXwLzHNU++FVF3qikOj5HXm2PBitT1WuvJRAB+6O//W0/PY8vQH5IrAsMs/WuVmAdHBrQgrbOxJShXwRSsu08h8JMBpo0+aDTALwV4tbswgzHrftG/dJKIAQb5h9KCssWIMeto+GYqG12/HWGjx8kzqNJaa0noMWOr2KwW01AMwJoNvhMQda2/RKQP/3ecABM3g9uD6BY68Ntz9+nDOMb5iV+hIE+dP/Zs/wwJhJ9mgBnohBuStABUXjugF3hkXF9ZZJAjefKdHZCc389LoStKvIl7QIEb1d9RyciQgFDI9Cjyccc/23Aam7/PZJBhgDgin5CtQvbCzX8ip9YgIFtOAt+w0owp/hOiCWgEGbVHuYjRigPGR/YOnEoqPDoV5z5YqB3mRq2ox5ICmSSgAP1Ne+XV2NE+/vuFbCTRADxtS70VRBCjgBk2OyDUQiUgfl77b7DwaHm2rAZ7osRSOOUoHgKfNBSLI767+oDYrfwZvqChSpGfj3pFwZFsCJg2jeIQQBUiyI4WgD68ww4qO8khuWkkIuDrxWv2nv+UTBpJYiPd0KemTA8qqFiuUF1jWS3BoG6pADJq751JqBI0wvAVPyMQvjcX1zbELltKK+zBiXRFiRxG+b7q3M9xuLdzR8g0gCGNzSM5gNYfqGO9CBT8OHct6oB3KsSDBisUnwsFuISQaRHxDSv0vptt2oeLHMERfRn/FG/Cx01EpgIQG8LP+/i37PKw53xn6sYCM4/JwSRrCnIeB1ZkLsawDhaPKv/njU3wnZ/dBdGE8+YTHSG8+ofGgIjsC19YnwdM/KAnTSsqj6ig7uGgIPw3nYFzhhIIvriAxFP9CQd4HSlnzgxONIdrE7A8ZDPx9fjib8ifgegNIliRgdx95+E1T7+3nQVNNhEzDgGA3T2rEDLduwtPpuuouPcs8swwXFjdTaMKt+jA5gUAQPcf95KJQxYU0cYxEDvsBSmYuukp7AwnqniC9Afa5z8vboI68ImT0t26CvwBzSggkj447r9IojvCn7U92J/Hw0QSdwZKNNjxPCfSxRqnATkdwpOwh88oc4J8KTSm/wdbZjrc+4iFP8YO0/5JJDCfaijK5xVXevqfg6zGRrQf83chvX4aRfAE//6vv5+6490U4ADdO7QgM/5bcHP/n4OtCQhBEFeDWSvos8DPq8/IwzLzjpa8/U6MMSkBklDm8e0mn3QIY7XG1Om8wzN48y7HwhOK3P0/ZwUQHHv4psbdoVeb9VlAjChBCdtDDpOKTh9ZfcagOYq31RFjN4/gwBYzp8lAwYNwBELhZoxECeZxMlAzWGdCRV0fQWGHo8+8Kx+AAxnCIzowAxy9KvNepWfsfp4RR9kUrD88CPVTuXRybhqqTHcnxEGndsgub1Gdug8yz9fHt3Hpl57x/mfCOC29FOSQ7/noAZR5W3Ob24UMpuPYAYiQrQgk1gnFoUIKr4vKFpV15pHUJO3Y5rfH3UFHU4bGkU+NKJ9f2hJyOMxDBDpjAgwiYqvk5TqNl9EH2Arb6fA3yaA4cBtPWewhkEcIQJBlGzYp6zRmr1v+e3Fv27xpzvyI44NGDkCIi7CGNV9Dw0M8NtHC2vUwHINumCGNG8erxOwtQINsW88Tlwdoc+F85nI559ngEDpt2F/Uu3hiXYrkN/pBFS26hYDAkFgErMK67y9mGBA3L5ore5izf8b3n805MOq/t7XU4WHv1DUF/5gugCSOAIW/59uMwl6CHWAib8bvfxWl9/rBGEMTTwDfG+ezEYG4yk6FvRPuPwE+wvc39IRjENWM+/cm5b0W4Pf4WuKUnw/vD6eDbB1ETs5vl77Dhnm/51g6wPWwQAqxnivgQaeS3gy/u/1H4hpTPrIgHAN0mSgXUX13YP5PMIuQAfBr/f70cdeE+QoCX3i8nFMLcAjInBoAIYqt1LhC1WdtvmSab28AYffaeivCB+ohdYQgfUa/WS4ToMsNLHLc9nnvPZLwn1/EefPVf+U/xvnCVSEQEkEQEnEQJO7S7RvYDxNeNYKrG7DKMhtsQ8cMmhgPKKKj+F7CiHYFR5KIIPxOmg5IVAtu3ACQSPh7CzUQOgAej5CWEkIe3vgxz0ROGO//qYfz/dnLT+ZxDr4QW0eNCJBorCFOVC312Ec2TiY5Bk0cAaQmiA1VH1MOwDHQ0kHdEDDf+2UTWhS4Z8diQMicLx8MLBfverLcP/jQzF0P8EJj5+NGK9RCz755S6F/f1+X/gxeP+Wsedv+vF8/54aSPJYFjIQd624MDz/UDLQnr8HU3ztKHRf8Qeno1vyAQJBaLcMtTV3cvgP56COCqd/QP9xLgBkH4BxO13n4hNUDtACC6G1S3zqooZ6Ba4lp/zcAFb7iERKQwQcF39IFJjdXECGADw0IE4gg674pYAnk4HoHPx54tD5daO5vxrugSkMjgiiqc7TVKAT6AT8R4ckbHEQCYR/IZBxJgA+XZjsR7vaoRpIxWqeqfXuGC2CxwudicwePEB1kNkaZCuwyF0DuKv/4sz9mzP/Qxdg3BDkBTMC8Q+loD6UGBzx0Kz6eAX/KArOQTlPHFoI4vVtf4rNuLrca9edRn4xBP7k8w+9AgZCgBfEUZWfEs8iFNZ3UO7TqmkjCO/rWdgco/yIqHcQWaC2EGTzgz5y/iXQAvyx3riyxxV/JeBriaGB9OrTA5g9/eokM+37GszqfA/UZk9iW5UnCtBqBl3XoNN6Ag/+zy6A5evPAp+TIFDn15gQw9rjrOzFX0s2JBVAxa/nP1a6AsNWYGjPNGPLTQgBsNUFvOA3Ht9o/rGDN0tWOCcxJGp+f7++kkP7PxcGv1+GjkaLt/fawpwwerQxBJNW4b+PJsYEgiAYYdEAGIlDNaAbRkIgK3ut0jKByp+8yz23X6GttmBmjwDvChgiYLP5V/zhH6/110sGcKo5CkggCngxnIPoPja0j2B+1BRkiYJiviaLJqghDI63G2nAgAxMCuDdnoD0wIQm+urMB3VuAwbBrFGgGgnhAFqg9+ujKsLxB3qGCQNEEtPinIQlAj4WgIw7/iXc9V/x/yUWFs2KH504bAh4aYWf4TrTLGTy9YbftyLeVOWNfYNyt/ji29mQnqMAltU3ioTtbX343yv/1u0YPUBz6zB702tQucnX0gWaFh6DgPdmhXaapGotw0SFz1qDiTMdd8h45HfcqCPRUhA3+NmKz1l9teCPaMd4urGaewRitNBDdahR5c3AfQmDCFT9vmtQEwqAYXX4XI2n23Z9B/Yb1FL+LWox6wHGbZSo6FR1LzyG+3hriSZvWT6jfXhl2cmQZJDrAbuYAqAHo1GA/EOgD8eGcU7A8eDvH4fQBuAhBL/Zp/vamPTrRENDGLTV/7E1WEPLDlP/PwzU4YhusIMUgfIPAr6Dhv5R4y2r8ldFwiFoYHnmr8TAHbhRQSZOctH598ZYhqt6wP7q/ouqe77RJxvzFYaji/z4vna4v5cUMDXqDAJ5ytktqtBDckyjvJg04hl16LB0xFfyMfD77PZjErGQRRjYIfSvoAXntks0ok8MsUC4KARWnYPlJBeIgLeFrUgDOHYCag0/XNAbWgRwQuLAsaQwIhC1g7+jCNKuT38JfnYSyTi+QQEwwHeT4/dWHYxJPxfOj5oAnRQqgU3YgGZSOaDyK3n/qkDYBKptzR3oD6B4fyRKjp2AzSl80YR/3P+/1vBjX18Jbu+YsrMRgbqPP8zrDLTAaupphfeZtyPs9BPztpLSBZjowF3woYRwBwOWaqbev15b7X4RWsiqYiY6ZkFEIoUwUA2OrkeEQE8HYNyD/rl3m88jCGgO/nPW3xy8x4Q/HBcM1dYg5q8N+B/SBSYhtD0EY1PRGLDoKIBHF3yLz4H/gSYQJRETgqeB2d4vC8L2NVnQn4PoVJJAcP0inahAfdXVI8CFszjRagCTtRdV7Sr895NBpRKXIT64RMFw/iw5eChhEvmmyUIH+k+Qu3cLzOAN6ILlFvgWnx3YWFDz0f38ze9GlfP6UQ3ojEY0gtqRIEbA5/WgQFhsEuIeL75uTzvqHktAWfj/OD6sQXssROcGiRgFn0QVkld7OznMDT7CJKzhMIqxW9B+LCOQdH4uyxIcE49VTSeLj0wKjzcp2oDXQA8YoDEGBLMW0BJw+eAxXejPV/IXd59/tp5rVyYXDw5BlRetSpQAcvgfOwVM8ObzBq/AQ2wX4lwkQV3vNhYFfn2LFgaoDU1ogqsfqGkJYmrj9Tr22KQwBLzbLuzDeA9yzyJjVRfwegWq0H+FThDPA6ZhZwX2M2Kh4waovCzAWJTzD/qY00c+6PM8coz08VNqglzx54LfHuTJK7z2rwX35ABLg1DzsZ7Qv7l/f2yXDlbf4C/irg0MJ0aCuD0wP74MrxfdFlX7tq+vtRdCpvt599EG9Yz3V+P+Oj/n4zLruZHcJ7oMt/MNp9eD6HEeFb6/TMfbWo85Pb79HJo8t3371/PuIAZqMvjPC34nVV6ZB4hEuA7AzA5cfU0y2n6ux89D/35/n2/vWY5Bf0qwf3tPLISO1Tap9qzFB6eap/beqI94NCCbGwgqOItY3CGl446CaQ8i2Q9g0AvmgJOnBoAA0gu17tsKtKS7D4udgCYERy2QIceCX/P7mBW+g/7D9S6Mn50CS0eAoQPDcBjopIA5+EcxEjLweRjXq0UbLIjcBxsGx2IZvlf0ATjz/6qypAmY7bhrk4ahsIis6ccXKHdueAfUgk+RWPCLh42c6zEeKyJpRTdRAOqBbl/Wq/uT+q+Fx3FoTIuCzc6+hN8j4veGjuAnhSE5gKnco3A3XwYlq2sq+lmP4yEOpqEoG0M+mGDYuYT0pKCFHgLHKt3T7T9p8GcWH+n1UwGa8X6kQt2x4CeqPexegT6o/Z4Cr313PHdgrsS2ZReLfpKIf+IMFnmVmwxQ9AhithYT73+p2s+JIVfrjwiHnpAZrSsr9CMstQXP1+1+510N/q8E/YoekMN9OMFvi5LvkRDsy9rgFCOoPdpgaQIWBZjf5KCSQszZJ1ivTvLokpen6tsJAVND0NFqb6GUGg2Im4Dyx9Pn7/0dm4pADAslJzTv+dKNrAPQ0wyySm7bj1RQgbAXsRa4R+mBJzpaQmHLmy0BLoL+Nh2ZRca8uUc6P37k97n451fvTieAE8BdZ2ItqFEK6oOJIYPsiU4woo140Oh+H/UC++gatHYcOFT+2y3AYvD1rM/fpxdUcsAi70c0OxAEP45X/hymE9XeoC0zfYhbcqfbhs09HpwnKMDR6g0mmYyKth/UcLl9ITGQ8N1S6s+gA1HvQCc2pluPvN2Br8SyZyfyxPP/VhCi1L1HWX2CQCuAE8TIq/sBYdANZmTIwqq0sb0HIzhhugBeUpBZLFyA8y+EErsBUYDZHYN9QAAooQwOws+uQlhdESSSqk5Qsh8LSYI6LDS1AbmOvLlRBqQIeITvM36+TP63VfE5hFClCTr9zEyVFwS3STQBy66DMHB+PJWIrfgGnYBx2dTboPa2X49GaBVlePA7CFx4iaGi4ns0aLVjMGvtPTDtmO4XEE8E5Kb/8qYai+NHl60LgAICcUCoJPVeiYG6Pxw/X9VFNVbFn9FNPzXoIRDTyzcpREYB5Fm1EQQn3KRi9wKApR8Tz48SwxnV3qM0q7ZhpdKvr0zfY+gO4oQf+EGPFYW/Xf5hwWsUgxiBbShGoGIx+D2eH1h2EeR3UQMH4zMaUKr4033nzkSkfQADelFbLOQCalxdxvN8mInhPas9bxtGJw29Fx3Y8429MAS0fL33Oeo7qFZeiToCC3B/VSNYuU0fgDnkhxGgMFdxiYEY7MYel+OHPH30IMeVFK1C79l+QdXVpFqHlMAXEf3EYDyfkkGdNvJ8f3RAXU0jpgM7jMNA5yCrtfzOicKG/M9bgEkEjqqPPDEcDfqVwGZv6zcO9avDfOhf4OmLFd9OLBHHdxp51HvOBlnAoQksYjASA1xnIhPsapTCPjbsGB2YevpPpgM73EYeSYIftgPgte6CWesVBB9QEgfnWYMgoeC8ql69bWoRIqYHvSIv/u26bj/jdqZ9KSGk74JRo6QS9PuTiSHm6Z62kLUGH0UO4rwWrhtRETkR4iKRdI8giJ2D2nUCMjsA0TXiVDb98NAf/rCMlajA9wesWHZrAe1dlwRyVI2jx4KkyUHSx7YDe6YD4tOC6XW01puEdAJwaEJzf1uATHi6ZlSCpBQscsh6C1xRcWEG4bCFeKcAVhVlDu54JQIkTT21hptIT/Afk0kMcS9BKfjBJozcDXCrtgbWXxbMAw3INQIxtQJPAGwXmYaBbYh4SCsuKwLOAQ5awKskCMmRg8P3xwlBfbosQaDqyZqBkyQe1CLQACoTgN4qbyHsPwkTiF2pYaj6MAXBmUosQHnUEYCsBL3MW39SNKMJ5PfoBsT33DVJCEbFnBCMOkHfvj6Xq8uw+dgRIhGgAiUqf5QgKDFyhe8nnYrlqn9sG1GoAfirubygX4H+8IM1CmQrMFAJ5ExzKIp54nPoVU2Auh6eBShDlTV4u5c4HE/fVvjFrsII0Ik6QX+Iq68jB19ziLoKC27FYe0gC+j1RSS+BgB7AvAM3m8HLdy5fV60C8RMVuhD1ieQB32MCCq0QPJuvuw5IHF/geMKwOPdpmsxBwVEfGEOgeincJqNmuSFIPhPq/xM81CWIIi+gCFBqDX3QPYd2OcCRo6GZBoA3AM+00aesAOQ7/2Pe/vBCXoguD4OBD1WfPwClzcui12AuH+gC0gEwW72KfjBCQRBr05D0IQc7N8PzOCMehPWK384MPVDJQim7yDdoiRTItzzFV/ZOX9sYFetP0fsQzb6O7wOoFjxk89YoQXv+BmSN+yYHYO+BsDRAXHhuJXsEFbdIEGZQWUkNVNzGA9NZUVBIQL7jASR0AclE4Pb7JN3BO72mG92+o8UG3nybj+mASh0FsLKn9GPxDrEcS2Au35BzHO1BksriIJdpqWjKR1wlpR4fN977rZqI+XbYjYDgVDpcYQalOYKMiuQbB3G6Pu/HlMbi9a0EMkksXtjvvXTfgMKAEZRN/i/O7yD8Da2S2Bdh3ICWfp8yuMkYl5a4df4vVWt4UF0yyqEnaT6swYyWB8/j111Y1ERS9oB0SLMtBGDEBD1PEHwtdjUEAHnqmoHU4wCDAoAS+lHwtu9eQLUAgmxVvAuMB9cELMV3m8EUtcBYYI9nkNIEEJYrQeUHfnzzRyC39j8CgSkir/E0P2odnAmAqDnDIhqrtV9BDNS2POjv/0pwKr6z1h/PMz3uf9ykFYq9TtoAXSwpz0HljdvBCVAPY6t7osv6gFhMpkX13rcfXQMIpuTsfTibkfOPRAC2meLRipI4mDPwMD5x+v3+Ey+qEfACwoUEkKQSMZxYJDz9R68PyP43yvo2aYf881rNQbZgRU/jp80QnW/hdXqJxMvCFxXQSNHpE8QiF4XI+wFfQcw7VL2Md7RRajsKgh2D+6SLAKPF356+/7yXYBTUgFy/38StUjFHweD+iiHh8/LV/i/TSvGk4L5x7F6AsIKbgb4C0YjgdGRIToGUx7cgS3JKP8pRcgak95BJGQbjaJdBYQ1qHYnYHL8F45QgHx2gLMQ2cDxBD/4SeR0LSDi5XzPQNjM4ySE/HGG6g+ugltLNSARn281BPtNO72eJLjdX4ITSEgpQvJYFEUg24f1qAYQNQdxx6Q/RcB85j9f+03zf2QV33IDPHegNgPABTfqFR8cZK9TA7/ll0EQbUUHW8Gr1d+MSadia+LRHwhunv87yWoJ3h/pRDwJAbDNQQFd2P2mH4kP/wDT/ZeN3CK3+ZjvgVpw4r20AMafb58j4N1UMknuj6iCx883PU9g2VHVH5JX2eEcPghSgRBCKPzK0Q3fknwPN0Hk0CyC0zBkz//7duEetgFjVtypASDI4CsknYJgYDhqsBxxy29+eyxrAZX75EEf8f+CkOcijMDDHx4ASYGGu8WHgPwpHJc0qOG8FgFTuVk0cRZVePFwHEIUEu8xSHoL5qWg4I7/HgOKXe2dcnu2SSdCGIDTA+AcxY1zYL6Q6AAFu+/1GvjKPSeEoJV3NiM4Dz9C6oWkEav+NWjPWXNOIkKgNTi2I8LeBgaZHJxqrC4oNXoB9pzzMws/OW3ghSyQJgjbygOVEDhoj4nHLld8HPD6UUMFVLIgKrTL7cFoBRLQgEdXIseZ2/HhFPKbk4d5tYWwwR0nIFQSD2P5gQhs6meVfB+Bkyz2fOIvX/zxqsSODuAGIOLtPNnmIPCrv6Kqvgz3q4tCwNl9lWYfnsdHj2HTgQw5IBHwULmfSu1jEV3gDFSxTBmqSEVqiYK2IkWcRiAkwV/cyW9YhqHXDw9dkNQAcO6HFNJT7oChfrPUYc3KY17zAd+evAwF2w5SCKLV4EuCEKsKfjBVWHu9Q9Arh4CoBqEMWYBsNX7YgKP/69uC3M7/mOOz232QT+ox4iCyJGEFP4oBHd+GVvXBwX35nqp7qeIbV6L6tdZub3ueJ+gBIKgC6S5gOQFxDoGr+Bv2nzqbknd7ph/EmXzO0o+kZdc/wqvQkAOUffVMzKtYgx5Vob1/+HAfCdzHSiXHenX35/2JTr3KZ9Ruj2lYiMhLIFoNyMq9hFroeYMTE0bSLbhb4l3YlFPa6hMd2jk8dmrDgdQCnC4/+ANFlYTB6ATlx2GDGXP1rvL+SnWHw+cJes5/rRWt4H2pw9GklD4uSMpwasIQiaYR92gIyFX5S8dtRZt/nCAH48VXW3hRE/HKOsGquj8EM85Q9cfeAV4XwNGAlmIFIwPYrfLKuxV476RRetzcdeAsRSZhiHizCKEIOHn3EMOWy5X4uIJnXX6sFiBFLaBm/THOQAkVJK9j6TKwiSDTBWpwHkSPQJX7U959uAkoaTUuug6oQCBz1Zlxm0OJSIoIw04M+7zCGuYiznCfHww9AN6Ir+HXA7lfn2oBSJ2FOOh8SzINfmcAyITq8JX/sOMPx6A9LeYtVfwgCBZhdu25OB9/XmWWNPUEPD5dUuJ68wd1AqD2+w1PI9KxE9BW5t3z/igdYGWiL7L+wPv9jgVY8f0ZcbCKCuLAHN+c5wa69Zpr0J9t2KnpAGzyiAIPiFalJ8/xXrrA6Y+/8NoDnWCPNwFJzf5DpVkHte8hx76P+HU1+HEytEeSEIzAsu5r6wPJGu6oLz8VrKofXLce+ywIHhNa/Dmw8LrptWXZ4NKZm4pr/QQ7Qk8ehMrPtAF7PQCD309QgRgRZMKgAbFREAfBBXNalbHA9cEHMo4IgIUuPjjBWEUFEQpYTkhVO43eRiynJw9Jjj8TOUIlJExK+0wA4gWgQvcFBHAc7P4/u78/Ff4CC5ATB3P3oUwFClYgcALcxzp/B9Ez4DUV8RjBbsCBrMH4dLNwIDaCGhA6o3pXksdBvYBsktrXDgNJKAFy1Z+ZGIy5NXgXoBT8a3ZgVSPIUAMV6DjLxhsV8wX4n4ibbONObHNyCr8Z4FinNFjg8ziiF5zSV8A99u7Zdf5OisvVaAAAG3VJREFU/kIPAJLWX3hUIFD6o7MD4WkHIMXBk4IftSrPNBJVk0OoC7ice8HGS8XBKDoz/YFBLaQi392lGpCMJfhD9xVkx5Xbj73P9V4m1j0v73x9FjDDPlYvATkgFAVWcdNvJBamliOjAwRV0EpeRymAe717kMYRyy/j5FwFBX0fP7Dyx8gq8wn2ZXi8GfGYR+lFcGJSxa3Y84WgzBHetlU4cvKY44Ps4iP9fsgsPGEhQTAcHqwwGCj61SoPexKwasXFqtxq8qhD9SixoBBYcJEDNzmIoi3J7QkoJActVHocTVpPBCDhElAvMDK1PT/Sq3DwB/ygmyB9GNhYDH4so4Foy48kkPtZfZEv1PQTxYpyX0EI3Bu+/5krcN8fgwVdwWu2JNVNWAk+PcOOPMNdGFyAZ5Aj6gicgzNfwuHZg0HrLxBWfjSRl88fVCo/apX/IBrIvf65ZxtEoK9Bec4KZIPLe76osQns46NwW0pUPCPAyMc4A/KXOwZzFLGbAqD5xhhbgBcWfoJBAlarcCSQgdQJ+Movnih4gjZQTw51rz588y/ZgxVUEAQ8soCfX8OR26JwujCLGFAMsOjnwGrlPuQw9D/PPv8BYVR7pG/eeFtQpsLzR2KFI8SwKj9KlX++HeLOPuSBKrKeHBi7L4b+Kx184+ptAp4Trcscv69oARVYzWgaK01H1X0K3zNSmARKtxXYHvwJuT+8gLGGWgpHcWOmBeljFB2Ckg6wiAYOqfxEK3GMCAj6kIiTWdCBCXhkjUKMgJcLk271N9uLSbtvvK0S69OXAvoA5z94VsFubbmZvx4QAnXgBnJxENyQjy38wef81uPhxMpPJIQzr5ckuUTKe0wZyN57iFTWga8GvCwlh5UqvYgmaNV9XSxEVWs40kkosFwA70RgNOu8mLZfR6wDiwRa35y7j08NksqPQhcfkRBK/J8R75Iz+9C8gJpqzwiIeZII3QnYOkJWbVEI5jNuA+o2BwK82ifwnpSgHwaC+GNAdmW2VXfC+vPu6wR6lBj84C9WfvivZyUhZMJlJhjSukDlFJ3g4AvGJfC1iEpQJ/CaEd7G9wds7p71+odruKrHip/C7RdsxeVjzIxhoNkFGOW/+sk/YVAGtltfzZAIfzix8gcHhZCXpcGN2u69qWqD9OlRFAy7x2fQBhHUiETB+DocqvArYt98f+AEAXApsEmEcNLC0t2uPHCqPQIXwHYDfI4/9+8LMpchqr5HK39MJSrBXwnutNqjovjHFdq+fcHLp7YLR4mGgduW5hFpAXUoL4cTTuW5HJSkB5PC0S7A+8c+837DyoM1J9iv/po/o3BunlDqPjOSO/YbLFd+FGy9sxKFeT8b+nLNPrkAyD53FtT27yUS32yqUaEGTMBiASGcZ0FmK8nWxbvjC1q6WQC4VdWdAcBY8eFoAzIrC0b7Wt8wlPcIdE1FhUWeKU1Igv8Q/0dl4k/NnYSxdlDon8diUDeuQB4c8XVzcahRgyyZmNC+LAgeCfSVALde8/t1DCYawNoePGT83wlOpFUdOZKwxn89OsMEf0X8CxJCBN/dwKbFwkSMgx0ACJJDJD4iC1JEYh6XcEqVHpx4+J4I4UiAl26r5x64sttvSlAn3LBuQCz6edU8C+J5epBrC4YP52EFDgHrCw1B0eU9bOaTgh3wmYvQV3Oqqcf53XnVNXUBELX1xtSgFrirlII5d3HFulxBCNEfZx0h7K2f34XwdHpuYQcguN189Ow/nPXclaUcqMH5leCXjKOjbv3F0a7i2ZaRHmBe5zwnhA9S736ZC8AH8LHkg/T5znYgmES1dtuzGo92qwHIquiWX+4KgVLd8utv9Ml1BQNhEJW/FOgweiTguCUoQHkEwYhjfQIgm8eAzPKzHqAG5xGiiPyxeGRRaYetUpDVpHVC1T9bHGyaknb/TQTnuG7rDYwYCUT7/cMjtILzA+Go/FPw581F/mWeTkDuBsBCAK8ki+A29nMzPn4Rzjv6QV7xWW4fzQFUxb9jQQ1qc28kMi4mDl1NBr4usIsz5ltZqNm7AeJXfuTHd7nioLEyPBISU+8/tP1AC4Il/n+YGmjg2NiBRdl6yCw//zG5ph7bqaBuz8B4VMU/TqSsNPbwCeZA1cdxyG9SgKzRZPL+GXFOiH1/SFZ9wX8M3zUgvH8a4rMBjZj/h1W9MrwTiN6MlsCKiI4gycBzgV/xUaQGjGDHwHiYi0VIzeEAasCpNuL76AC7BIEl7i4AIxnAfoMxk35eJbZ68wWEUChs8IPz/EEE9BkUoNA4RCWSLJkY1h0Y/dG9bVCtUVPe7QRhtStXG4nOECDfUxc4Uw/Ik8JkA9o9+a83IrfHH11EdFUWc4phNgVFWkPsIHBnCvCCYBSgqEN9qtoXuwHhByYoJJA7BxIkkRwpDGgAHo+vQ3ZGOwCFJCJKUAx4MBpFZWvReeLgtBBkDDQu2OJxXa7SE/P4ZiUPHABjY1DsFIhPAaygWewiXK72hHjow/k8gCL6gKES8qcDZ7A+EhYlWCPGCX1wXIwzkQEKt8cP6iqkC0FEhFj/ZYtvXCtwuBLcDT5wXN+9H6ZEIkTwV/x/s78fXFX3siWHEKrC3tw7EFZ31Ll7ttknQyEMGgAqCaVe1bGk8r8nFWCQQR0h7CY0dsU/mIeIuA1AGCo02Q0YVXxub36sG1Qgfo0CBBUXxap+ECFEycQVyViBEBFPt14TK9rZHB9EwMG7DPXOv0OVHkdtx7OSCXfb3av4CFZGTwQBwT7/hKPHE4PzpJ4L4+FM9r1n8B+B+9R9I4Fu9brYUZgCunZWNxdQgIs8mASBQ4F8hJpEiaf4GPihk8FdAxin/kybjZjTj+mAQy6ihZ9whDvHAWB6BKrBXQr+5SBfqPaINwiz12UIwoTmbPACZY/fshBBBKNlW8ZCHwH/cVKSOZMm4Mxk4OwE9JeB+EFkn1IzcPQoiSB4vGgNeJSoik1A7m0TCmE/HrggB+/1M12C1Z18ACGoIeH1pH2IhAqFWgBq+kDFEWAvA3X8tpW0cnSD5WAOriOHhnYraF1eLTkS8P/QsHUBdtMPnOrMaANJE9AZiaKWII5Ue/8PTHn/UcCSTgIF2xN4zdmAQYIAKeBFl6FiO0aKfq5jcImHfPwTxcEdRmD3LcFoAva1Hdjm9UgGggI9YOoPkOBYLsT8HlG3nucMDGkOOJ8CkNOELdSO7D5qqAeJYBb2GpABgRi2gxLITgrOQ9C937HgB+0i7MeRx3gfPWCXLtgbLJAu/gCFBPzRX8eADJqCvA3FViC/BlOQC4LZyrBq8BdQAOUKoKjqR7v7EFfVFMojPgEoSlJesNIePyLHwW9NRgq7E6HvUN8A0yj0wyWDHRZ3J2A1jHdMyu3hCGwSDwdRir7h9VP7AKLgPoMCgKziOFLtrUm8aIFHlgxYfz8WBYUU55iAXauo+evJaIK/NTgRJM9sUcZRzcCnMdNKMJc7usnAyrpxHYkTRHK+n1HxS01LheAHqRWwKIDqLvQC0+PupHZgBawfVGsiniTVHwZHRqbUI/D4Cd+ftgyLAR1ehkIiqaKFw7MJEwUIuK5zsu4svoFYCFKgBJZACBuppOId2RDkPZas8H9kULcA9a0KTCQDGtpnzT+RMJiOGseHl4BQ1C29AWUXIIf/OIwwqoNEK3SCuA7FRiBrE9B4/PcrGJ1OQNj83F4Xbol/TgVHfMiIZLAdcaVkgh8sLrd+liNQH/FqsNTfj15m1J0X+ffZuq/gTY7QnvIfJz6UzBJLs83ItQpt3RfZz5iuGfNPajpngUm0R8DoA5jDlzsOTAwZjzsC3Jjxg7H914PjlcskGdghgx9HG4OOQH34uwQyzz61/0qiYNQjXxECuWYbGM/DrjtPH/Mw/K+gBLLSA+cEfPr4MroArzcDuybbr8Zc72i2UnzeHnTgzD4Ug78SzIvCoARVOQxaFFR3TzWnkkHUVFShEuqKxZnKz4p4YYcf8ZhYhuu8wFgSHcuuwCJagI4bgchJQK/qe9c/RT6nGcg6KGREJpb+MI0EY/b0jcsni3AJBeCQNsBOFVYoApcM2Aom4VFgIRdHpeIG8D3YaxBD+qCiQ+rBOSVnci8hzkAG1t/pgHA4uwDzmu8xFKkkkIqCfkIRs204r/hiDgutoAAcowBMZ9+KS0CcXVBOHCvJw2jMQSJyeoeExF2DuTuRcuWAo9sefyUQ6/oBaIjPtiRH1KvQKvygAHb171d+vc4GRMDPoxN/kL5pwlVh1mBQ1quQJAJ5j0TgOAis+h8d3mnC8xTKE34+8sDNjyVXE6nFMN+H39TQDmocHScENvN74LoGScGU4f7g6IG3n3C3qnG6JBS+Z5tHOOzRYQx+u7MZmAl0OSsRLAS/VIKfRAWU92+12aaVPksGDBWQuCMvgNy2M2Mt8EwqbjosZAec5xLEAmXmcFTHiOWARWglpNpjdEtBQRxJJU5VL5/7F1X86XntXgUK4q+KggsUoIIK8oA+kgy4+zLaACqQGTVOX6MBWdehL6BxHn+tlyBMDGAqufd7WOX5WTJwKYDfXJJP2GXDPk7Tj5Ed7BOG7DMFaBRAJgI/+H2Ngeb2SKb0zkoGlQBHkefDr7xMA5HZeJPtKIzyApI9gmnPgf1c3mulfhe0gFekDCdNFnrOwi4Gs6eTACNjB+Uegcgojog4V25P8bctRYY6RL8AJklE9ACFAGZdBEahd4d4CmghFhbzcwaXYH5qTlS6DY+KfNH5Avzjo2JJ0poDkSCMxLn73H/eB+ifvgvyIFCWAji7BWC8hd0qj0FziMdrS70BlVbgamIgcmotGZDNPwm0L9l5iHv7WRoAFx57ScFS2r2iwot8oKu8l+TOCOg2mZ2nFdjTgOFQENzKkJ8OjEnsE8f6AzyXwT6MNF3RDRnuj0Lwo6wTlBMDIyqaz6G+RiLJMg/KUrQV/rh9uH0tWduwoxmky0kSMQ+rnXxZsGadgnxfgk1pCnsIsGYltvfdzTOBIclIsN8MLAGcz5gBwj94AE8DuC9Molip/JGwB57nRyJiyD3pyk6q5ij+3TzRLohcqyqCEQBTepF15+WVmW8SEr5jMUUkx3oMIsrH3ndwAQganKzyMpOJNxMQooGBYwcByw7axIhgPRGEr6GSGJhkAELoQ1YRg+dPeD5IIRDIqq5PA2Jh0Rq0YcS8XBi0ghGRFpCtWTdum5+yLOsQf2EuYY8AfnbQZDgCjHxBSKwTGpt8QCIDVH3/4H5OwEvldhliINwAFLsEyyIfGKV+vm3eEehVqKTdNxtDiPoLHCRiuwTJxCECxMDqDjTvZ63KaPKvRgV2i/F3ohm88V8LN8hgJcXD5pVGIPPNn9EBqSQC0I4AMxBUcQNCkarkFgSn/oCs9GCVep4eUG5BRAOcQOCWlGSc3If0IFqRfURQGRrKewPKEJ9sLnIowKCcw+f48N6UHjqYtgInaCCkBbPSj8VEkCr2g8U43wY1xX/BNkwreQrzg+oaJghOCGTU8RBxuIp6VFOGoEXgEsBLIgV6gBgxoLSI5CgiYNT+GBHsU01GthrceiMUtv9KgAYktgVNeGrBbtiOQVi9x8WjiAW7UNUnm4Vet7WtsFgDCDYEwQ/EVL1PnQf/xCDLTowTh4c4HPRDoQaiwhKIAae4B7xgCBydI/CDPOrevK0FR4p6w3VfoXgQiB3T1N8Y1PCD0X19JqcHGfzB5WkQE4p/kdeXBcEVUXEIFqSij82lMyrWq/7c+LFHA7z5/dwOHHg8s/Y8C2CmhbmALtare+4UWLfb25BmXABKABTniC8gRAP2yvDAiUAsElnrxFzITQa/sAFecAOY7zPV/8jMQHSbWAiUPGkQNABhw85xrSCv+mMSzFR8+7mjw01A8f4F8S/td4jnDHYxpT8/OEyV3gz2+GTfdAeAszswfJNGlQhEIjB0Bls0BKn4Iw7WKu9f1gmSagmvqleEwJwnZwjO7npz1HdCJ1hS/mlBcRXyF3i/M7NxqJFoeH27z7nnJaBmpUZKHsTbGUc1ALEoIGsGYl9ixS50gjAT/VhB8IzvGTrBVfWEz1MzAkRFTtecW731VdjNQPukVdhdn0Y8d/a7WYH6i/TBPBzUFwAlHwtGHOQISrgb1AMUgDETTA3+THAdeRJhg59V/Ektofa9I8wxVICkC7QQSAd2O3cftzPzdMK6aA4iZI4ILfYRbb9RgqICt2AxVnYZ4kkBvHOBxT/zN9ybHx/f5Ql2fkGCX6ANm6F8WCfqAS+Eq5AGcHJd2IFHagTMHAAj+mWBnDXuc81CjhsAi5dL2K8QCYI1aJ/PJtSSxEFXASv7C2I3ZB9/a0j/7nDn/j1pHsz9Jr8fNpxPBUAUUYD4wz5GBlmyAiORjtAIGDFwzSUwqiNZ1d1tPiB7/Q9VeI9KeJU16/knkEeQJEALjY4rkp74fCZiMDSA/PgvT/aT2gYgp5E/P29AKBQAo6TRth5T4VesQFb0i4K7RA2MZpgyFXCEQHCOixuYMPgy2L7+45ezSSKt2oUkURlpXkEMOLSiXPuDQZjk63N5bmzOSxQdLHX7AhwUEA0BAeQPJIQzkAuFlOK/GtyLdiGDKEBdllQ7YouxV2Xdwza9So4Kp5Z0yAgUhTlJgFzSFrznIHYIwKcCu2/L3LsCg6UI1b1/CA+ApIV5/32HqOIjdQusE4azip5Wc1b0q/QGIAlaWEJbXP3r/L+AEipw/+BtkQVY9fIM2i/ZhgVEgJO6DZ1ksVtlYdoQAPhVO0oKmYBmnAYco4DRCRB3TwCziptaE0auER9/VzRqKNOEYINOQg2m1l9GpGNQAhh1v6UmxNQh2M4+LmlUzll0OTjYQOaGlZAEMCrdhmBphaMBwBADrSQQc3//He8KgFETT7p6BHnjj2X9EXsDjrgBS6ihoAmcSQVYmE4JgYWFpp1waAQRoqDzxDhU+HxSnZHz/9JEY6Y5MJA+cwoWrt99+U3Mc/9g/NQTFaigAEtwB1yBzwzucZSX7RZEILhR1d5GDCsBLVUdIQvsldZfEJt5i/MHx2hGJZFkVVyK242iFeh58oBUFqIQbkfp2DV2X0CkAYgv1sU+P+I/HmBu8nErugdRnUWhfp+A/ddlbEH3uQlBsNobUEMHasK1HOYn8BEEvCUaiuigXRIKj+sGOPA4KAWz9/s7WxcgB4+a6/fI2osEwv4yOENAiPf+wQhbc/5f0gGisWuQaRFmGoIqguARWsBQgTTocDLMT5OJUQnhqdCEig+/EShKSEgTVV0MBMnz04BcshPnLk/+OaV0/dwKzB4QUt1NB6uTDfGOP+cNm9mEsBAFiM7AQh9AKVEU75vy68jeOxrUC4mDEuYO0oLqoSdHaEF2eXYYSm0V+oEOwpLmYFOF3Z4CmAeBTIGueiIw2xoKPzDBJVBXQ5g5O8/twwA+QguIjJt3+g0NQEcDfUXgO5gsqlTBLkQLdl86K3CWneitQ8sg/5oWAUJP2C3V3RoEyji5n4b9lB4t9pz2CA+cAFn1Z9I/uzYsU/ELtEBOCHYQQqGcFejV+yeuRJX31zsKV5IGjway9z6PLDxKwNEPsBuOEiqw57jGgOtZ1Y++T50AuMFl7hPIbhskiOwsATtRoc7rS7dXrpcgrMCGJca6ELJo+Y0be0BW5ZKGcFz4y8W9BduwcDnK9iO5fagsKpp9ANnvDPxeP8THNyIVFo1AMas8Qk5v2Ytm0LCCYAXqn+wQsPTBh/5Bcnne14Os3uCQt28vsK1WUESJFviBgAW//3u9PLxusXchcCR2WsNzv/ImvgZzzkUByDUAIrjTvmSHAowpJBQE4SUlxMxnARlQbIqkArVAJ6pBBvELCCKlkyCDAP45BYfEPfcUpfMch3Vn4bheYK4E66BxAxHSVd5INgEPgU/NBCDfNQ8Ho1CoINAPQAW/QT8OCIZlNFCB84XhoDChFByHGjx35v9BLgyhmojqHYb5QYXnuAecvua0hZe6BV9f7v4ibvgvamrmAc1TmaEir0LQ9h97eYAYVoM/nWA60i8Q3Ifezha9BqaaL3zvqd6IAuwwLSCCuCLuJWch4h30giPtyiAphKEBcCu9BV5wwzkMxID8rhMwdwMhcSFgrBT3RUTQboAUg3+p+Qe1IGarOioVnazmefV3lHpwA0AcLWCahUiXwePHWJsP+GH1gnp/we5KfOhJAbsj0H/BIEb04TbrTPsAyb2LLu93KwfCvn5PLAwrOXAa72eEQRo1CNdw5IprsAZ3hApy9zlcITG2vpCihsRSYxNS+J4vdBZ6B52eqRcQ/QXmSjAWSfa/5GA5qEg4iJFtm624AqXLrSA2gx8p1Mdqcghv41S0lSp/xAYs9gakQc4Ie2RTUYwYgt748mV+FU1Xgp14eW3XYZ6cdqGTNHwHICTwEeTPl0jEZwIgP9gDEaogeg5IHWCF+1eoAhvEKPB/EAeTRsM/pSAP5wjWEUMM1/NJRhwJbpJSgK7S7zF3EOsI5jBQBK9DV80Z8Y0COzvmWzJXgDl40KEC6cqvqgi4OB5cpgLFYK/1CvDiItXqC6/S87wfAUfPtxqfGNzlYaOjlf1IsHPPvffHgDAoEeEST4ZLZUd/RSo91/BjXY5ggWgQ4In3fyj4mUqPrInHOCLKO3wUwRsfyXpt1nEIRLrqcWeTuk7bigsbid1zD4iDRQtnIdQsyIXnFCn1I9D7ADgxEhOvR5AJosoUbu1FkJyYCi9OhQERoIx+4AX/YqUXQhtYEwKN4Cy1HntLMmtaAQpqfrT/UCoLSxeswjA5UWPPi0mjajUWxMTdVusNvt/ChMdmILK5IRMFu90BMEzFYHdg2GAgeYVHMMJIBTA7EFTx/5fpgTFXz9w/en0ZjD8kCDoKPNGwlB01BmoWQbh+AxR689mBponGJOr9OwmMu3dtJ/ylW1Tik4ElUPmR9RqII+pVhD9ychABMQ51gOIZg+/G+5mGIzLB1JJC5WhzYjhJ7IWmLDpA8jzsAafUPkB2WnFBF4iSxkq1ty7f25rv/+EQLOxs2oUdTSA9HIR9swdBlCcFe9owPC3XWDDC0ISVzsEVbSCF/sWdA5Fu4HJqankp2SeQCYYrImNalfmhpVxYrGkUS4LeSUjg8dD7+D7w/ybIfy7vlB9/HJ978zr7/45Qgajzj+4EjIK/ULHPRAOlKr/aG0AFcqCyu0GcW45Igh6JMJmhA49/U+cEssHNJhtXDC1MOya3j/sAiAGcrEtqtgjBD6wEzSDc7D8o6C8rIqAZyPk+NQoNLAZ1hR64Yl1FBY648smUYKnSg1Xwk/0DyRyArByMUobyByhCcPnOaPyoegREFS4jNfYAw+IHCjdC1J2WDZBke/OyN85J24WiXwDYPoJyYuCD238ulvuzwt6KgHf0shWKsqCFFGjB/w8HU8eeTED9wAAAAABJRU5ErkJggg=="), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return l; + }); + var i = n(2), + r = n(6), + o = n(25), + a = n(4), + s = n(3), + c = n(13), + l = (function () { + function e(e, t, n) { + void 0 === t && (t = 0), + void 0 === n && (n = null), + (this.name = e), + (this.animations = new Array()), + (this._positions = null), + (this._normals = null), + (this._tangents = null), + (this._uvs = null), + (this._uniqueId = 0), + (this.onInfluenceChanged = new r.c()), + (this._onDataLayoutChanged = new r.c()), + (this._animationPropertiesOverride = null), + (this._scene = n || o.a.LastCreatedScene), + (this.influence = t), + this._scene && (this._uniqueId = this._scene.getUniqueId()); + } + return ( + Object.defineProperty(e.prototype, "influence", { + get: function () { + return this._influence; + }, + set: function (e) { + if (this._influence !== e) { + var t = this._influence; + (this._influence = e), this.onInfluenceChanged.hasObservers && this.onInfluenceChanged.notifyObservers(0 === t || 0 === e); + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "animationPropertiesOverride", { + get: function () { + return !this._animationPropertiesOverride && this._scene ? this._scene.animationPropertiesOverride : this._animationPropertiesOverride; + }, + set: function (e) { + this._animationPropertiesOverride = e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "uniqueId", { + get: function () { + return this._uniqueId; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasPositions", { + get: function () { + return !!this._positions; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasNormals", { + get: function () { + return !!this._normals; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasTangents", { + get: function () { + return !!this._tangents; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "hasUVs", { + get: function () { + return !!this._uvs; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setPositions = function (e) { + var t = this.hasPositions; + (this._positions = e), t !== this.hasPositions && this._onDataLayoutChanged.notifyObservers(void 0); + }), + (e.prototype.getPositions = function () { + return this._positions; + }), + (e.prototype.setNormals = function (e) { + var t = this.hasNormals; + (this._normals = e), t !== this.hasNormals && this._onDataLayoutChanged.notifyObservers(void 0); + }), + (e.prototype.getNormals = function () { + return this._normals; + }), + (e.prototype.setTangents = function (e) { + var t = this.hasTangents; + (this._tangents = e), t !== this.hasTangents && this._onDataLayoutChanged.notifyObservers(void 0); + }), + (e.prototype.getTangents = function () { + return this._tangents; + }), + (e.prototype.setUVs = function (e) { + var t = this.hasUVs; + (this._uvs = e), t !== this.hasUVs && this._onDataLayoutChanged.notifyObservers(void 0); + }), + (e.prototype.getUVs = function () { + return this._uvs; + }), + (e.prototype.clone = function () { + var t = this, + n = s.a.Clone(function () { + return new e(t.name, t.influence, t._scene); + }, this); + return (n._positions = this._positions), (n._normals = this._normals), (n._tangents = this._tangents), (n._uvs = this._uvs), n; + }), + (e.prototype.serialize = function () { + var e = {}; + return ( + (e.name = this.name), + (e.influence = this.influence), + (e.positions = Array.prototype.slice.call(this.getPositions())), + null != this.id && (e.id = this.id), + this.hasNormals && (e.normals = Array.prototype.slice.call(this.getNormals())), + this.hasTangents && (e.tangents = Array.prototype.slice.call(this.getTangents())), + this.hasUVs && (e.uvs = Array.prototype.slice.call(this.getUVs())), + s.a.AppendSerializedAnimations(this, e), + e + ); + }), + (e.prototype.getClassName = function () { + return "MorphTarget"; + }), + (e.Parse = function (t) { + var n = new e(t.name, t.influence); + if ((n.setPositions(t.positions), null != t.id && (n.id = t.id), t.normals && n.setNormals(t.normals), t.tangents && n.setTangents(t.tangents), t.uvs && n.setUVs(t.uvs), t.animations)) + for (var i = 0; i < t.animations.length; i++) { + var r = t.animations[i], + o = c.a.GetClass("BABYLON.Animation"); + o && n.animations.push(o.Parse(r)); + } + return n; + }), + (e.FromMesh = function (t, n, i) { + n || (n = t.name); + var r = new e(n, i, t.getScene()); + return ( + r.setPositions(t.getVerticesData(a.b.PositionKind)), + t.isVerticesDataPresent(a.b.NormalKind) && r.setNormals(t.getVerticesData(a.b.NormalKind)), + t.isVerticesDataPresent(a.b.TangentKind) && r.setTangents(t.getVerticesData(a.b.TangentKind)), + t.isVerticesDataPresent(a.b.UVKind) && r.setUVs(t.getVerticesData(a.b.UVKind)), + r + ); + }), + Object(i.c)([Object(s.c)()], e.prototype, "id", void 0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }); + var i = n(2), + r = n(3), + o = n(5), + a = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return ( + (i.maxSimultaneousLights = 4), + (i.disableLighting = !1), + (i.invertNormalMapX = !1), + (i.invertNormalMapY = !1), + (i.emissiveColor = new o.a(0, 0, 0)), + (i.occlusionStrength = 1), + (i.useLightmapAsShadowmap = !1), + (i._useAlphaFromAlbedoTexture = !0), + (i._useAmbientInGrayScale = !0), + i + ); + } + return ( + Object(i.d)(t, e), + Object.defineProperty(t.prototype, "doubleSided", { + get: function () { + return this._twoSidedLighting; + }, + set: function (e) { + this._twoSidedLighting !== e && ((this._twoSidedLighting = e), (this.backFaceCulling = !e), this._markAllSubMeshesAsTexturesDirty()); + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.getClassName = function () { + return "PBRBaseSimpleMaterial"; + }), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "maxSimultaneousLights", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsLightsDirty")], t.prototype, "disableLighting", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_reflectionTexture")], t.prototype, "environmentTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapX", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "invertNormalMapY", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_bumpTexture")], t.prototype, "normalTexture", void 0), + Object(i.c)([Object(r.e)("emissive"), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveColor", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "emissiveTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_ambientTextureStrength")], t.prototype, "occlusionStrength", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_ambientTexture")], t.prototype, "occlusionTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_alphaCutOff")], t.prototype, "alphaCutOff", void 0), + Object(i.c)([Object(r.c)()], t.prototype, "doubleSided", null), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", null)], t.prototype, "lightmapTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "useLightmapAsShadowmap", void 0), + t + ); + })(n(95).a); + }, + function (e, t, n) { + "use strict"; + n.d(t, "b", function () { + return r; + }), + n.d(t, "a", function () { + return o; + }); + var i = n(1); + function r(e, t, n, r, o) { + void 0 === o && (o = null); + for (var a = new i.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), s = new i.e(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE), c = n; c < n + r; c++) { + var l = 3 * t[c], + u = e[l], + h = e[l + 1], + d = e[l + 2]; + a.minimizeInPlaceFromFloats(u, h, d), s.maximizeInPlaceFromFloats(u, h, d); + } + return o && ((a.x -= a.x * o.x + o.y), (a.y -= a.y * o.x + o.y), (a.z -= a.z * o.x + o.y), (s.x += s.x * o.x + o.y), (s.y += s.y * o.x + o.y), (s.z += s.z * o.x + o.y)), { minimum: a, maximum: s }; + } + function o(e, t, n, r, o) { + void 0 === r && (r = null); + var a = new i.e(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE), + s = new i.e(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE); + o || (o = 3); + for (var c = t, l = t * o; c < t + n; c++, l += o) { + var u = e[l], + h = e[l + 1], + d = e[l + 2]; + a.minimizeInPlaceFromFloats(u, h, d), s.maximizeInPlaceFromFloats(u, h, d); + } + return r && ((a.x -= a.x * r.x + r.y), (a.y -= a.y * r.x + r.y), (a.z -= a.z * r.x + r.y), (s.x += s.x * r.x + r.y), (s.y += s.y * r.x + r.y), (s.z += s.z * r.x + r.y)), { minimum: a, maximum: s }; + } + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }); + var i = n(2), + r = n(3), + o = n(5), + a = (function () { + function e() { + (this._dirty = !0), + (this._tempColor = new o.b(0, 0, 0, 0)), + (this._globalCurve = new o.b(0, 0, 0, 0)), + (this._highlightsCurve = new o.b(0, 0, 0, 0)), + (this._midtonesCurve = new o.b(0, 0, 0, 0)), + (this._shadowsCurve = new o.b(0, 0, 0, 0)), + (this._positiveCurve = new o.b(0, 0, 0, 0)), + (this._negativeCurve = new o.b(0, 0, 0, 0)), + (this._globalHue = 30), + (this._globalDensity = 0), + (this._globalSaturation = 0), + (this._globalExposure = 0), + (this._highlightsHue = 30), + (this._highlightsDensity = 0), + (this._highlightsSaturation = 0), + (this._highlightsExposure = 0), + (this._midtonesHue = 30), + (this._midtonesDensity = 0), + (this._midtonesSaturation = 0), + (this._midtonesExposure = 0), + (this._shadowsHue = 30), + (this._shadowsDensity = 0), + (this._shadowsSaturation = 0), + (this._shadowsExposure = 0); + } + return ( + Object.defineProperty(e.prototype, "globalHue", { + get: function () { + return this._globalHue; + }, + set: function (e) { + (this._globalHue = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "globalDensity", { + get: function () { + return this._globalDensity; + }, + set: function (e) { + (this._globalDensity = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "globalSaturation", { + get: function () { + return this._globalSaturation; + }, + set: function (e) { + (this._globalSaturation = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "globalExposure", { + get: function () { + return this._globalExposure; + }, + set: function (e) { + (this._globalExposure = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "highlightsHue", { + get: function () { + return this._highlightsHue; + }, + set: function (e) { + (this._highlightsHue = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "highlightsDensity", { + get: function () { + return this._highlightsDensity; + }, + set: function (e) { + (this._highlightsDensity = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "highlightsSaturation", { + get: function () { + return this._highlightsSaturation; + }, + set: function (e) { + (this._highlightsSaturation = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "highlightsExposure", { + get: function () { + return this._highlightsExposure; + }, + set: function (e) { + (this._highlightsExposure = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "midtonesHue", { + get: function () { + return this._midtonesHue; + }, + set: function (e) { + (this._midtonesHue = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "midtonesDensity", { + get: function () { + return this._midtonesDensity; + }, + set: function (e) { + (this._midtonesDensity = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "midtonesSaturation", { + get: function () { + return this._midtonesSaturation; + }, + set: function (e) { + (this._midtonesSaturation = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "midtonesExposure", { + get: function () { + return this._midtonesExposure; + }, + set: function (e) { + (this._midtonesExposure = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "shadowsHue", { + get: function () { + return this._shadowsHue; + }, + set: function (e) { + (this._shadowsHue = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "shadowsDensity", { + get: function () { + return this._shadowsDensity; + }, + set: function (e) { + (this._shadowsDensity = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "shadowsSaturation", { + get: function () { + return this._shadowsSaturation; + }, + set: function (e) { + (this._shadowsSaturation = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "shadowsExposure", { + get: function () { + return this._shadowsExposure; + }, + set: function (e) { + (this._shadowsExposure = e), (this._dirty = !0); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.getClassName = function () { + return "ColorCurves"; + }), + (e.Bind = function (e, t, n, i, r) { + void 0 === n && (n = "vCameraColorCurvePositive"), + void 0 === i && (i = "vCameraColorCurveNeutral"), + void 0 === r && (r = "vCameraColorCurveNegative"), + e._dirty && + ((e._dirty = !1), + e.getColorGradingDataToRef(e._globalHue, e._globalDensity, e._globalSaturation, e._globalExposure, e._globalCurve), + e.getColorGradingDataToRef(e._highlightsHue, e._highlightsDensity, e._highlightsSaturation, e._highlightsExposure, e._tempColor), + e._tempColor.multiplyToRef(e._globalCurve, e._highlightsCurve), + e.getColorGradingDataToRef(e._midtonesHue, e._midtonesDensity, e._midtonesSaturation, e._midtonesExposure, e._tempColor), + e._tempColor.multiplyToRef(e._globalCurve, e._midtonesCurve), + e.getColorGradingDataToRef(e._shadowsHue, e._shadowsDensity, e._shadowsSaturation, e._shadowsExposure, e._tempColor), + e._tempColor.multiplyToRef(e._globalCurve, e._shadowsCurve), + e._highlightsCurve.subtractToRef(e._midtonesCurve, e._positiveCurve), + e._midtonesCurve.subtractToRef(e._shadowsCurve, e._negativeCurve)), + t && + (t.setFloat4(n, e._positiveCurve.r, e._positiveCurve.g, e._positiveCurve.b, e._positiveCurve.a), + t.setFloat4(i, e._midtonesCurve.r, e._midtonesCurve.g, e._midtonesCurve.b, e._midtonesCurve.a), + t.setFloat4(r, e._negativeCurve.r, e._negativeCurve.g, e._negativeCurve.b, e._negativeCurve.a)); + }), + (e.PrepareUniforms = function (e) { + e.push("vCameraColorCurveNeutral", "vCameraColorCurvePositive", "vCameraColorCurveNegative"); + }), + (e.prototype.getColorGradingDataToRef = function (t, n, i, r, o) { + null != t && + ((t = e.clamp(t, 0, 360)), + (n = e.clamp(n, -100, 100)), + (i = e.clamp(i, -100, 100)), + (r = e.clamp(r, -100, 100)), + (n = e.applyColorGradingSliderNonlinear(n)), + (n *= 0.5), + (r = e.applyColorGradingSliderNonlinear(r)), + n < 0 && ((n *= -1), (t = (t + 180) % 360)), + e.fromHSBToRef(t, n, 50 + 0.25 * r, o), + o.scaleToRef(2, o), + (o.a = 1 + 0.01 * i)); + }), + (e.applyColorGradingSliderNonlinear = function (e) { + e /= 100; + var t = Math.abs(e); + return (t = Math.pow(t, 2)), e < 0 && (t *= -1), (t *= 100); + }), + (e.fromHSBToRef = function (t, n, i, r) { + var o = e.clamp(t, 0, 360), + a = e.clamp(n / 100, 0, 1), + s = e.clamp(i / 100, 0, 1); + if (0 === a) (r.r = s), (r.g = s), (r.b = s); + else { + o /= 60; + var c = Math.floor(o), + l = o - c, + u = s * (1 - a), + h = s * (1 - a * l), + d = s * (1 - a * (1 - l)); + switch (c) { + case 0: + (r.r = s), (r.g = d), (r.b = u); + break; + case 1: + (r.r = h), (r.g = s), (r.b = u); + break; + case 2: + (r.r = u), (r.g = s), (r.b = d); + break; + case 3: + (r.r = u), (r.g = h), (r.b = s); + break; + case 4: + (r.r = d), (r.g = u), (r.b = s); + break; + default: + (r.r = s), (r.g = u), (r.b = h); + } + } + r.a = 1; + }), + (e.clamp = function (e, t, n) { + return Math.min(Math.max(e, t), n); + }), + (e.prototype.clone = function () { + return r.a.Clone(function () { + return new e(); + }, this); + }), + (e.prototype.serialize = function () { + return r.a.Serialize(this); + }), + (e.Parse = function (t) { + return r.a.Parse( + function () { + return new e(); + }, + t, + null, + null + ); + }), + Object(i.c)([Object(r.c)()], e.prototype, "_globalHue", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_globalDensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_globalSaturation", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_globalExposure", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_highlightsHue", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_highlightsDensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_highlightsSaturation", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_highlightsExposure", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_midtonesHue", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_midtonesDensity", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_midtonesSaturation", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "_midtonesExposure", void 0), + e + ); + })(); + r.a._ColorCurvesParser = a.Parse; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(53), + r = (function () { + function e(e) { + (this.byteOffset = 0), (this.buffer = e); + } + return ( + (e.prototype.loadAsync = function (e) { + var t = this; + return ( + delete this._dataView, + delete this._dataByteOffset, + this.buffer.readAsync(this.byteOffset, e).then(function (e) { + (t._dataView = new DataView(e.buffer, e.byteOffset, e.byteLength)), (t._dataByteOffset = 0); + }) + ); + }), + (e.prototype.readUint32 = function () { + var e = this._dataView.getUint32(this._dataByteOffset, !0); + return (this._dataByteOffset += 4), (this.byteOffset += 4), e; + }), + (e.prototype.readUint8Array = function (e) { + var t = new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + this._dataByteOffset, e); + return (this._dataByteOffset += e), (this.byteOffset += e), t; + }), + (e.prototype.readString = function (e) { + return i.a.Decode(this.readUint8Array(e)); + }), + (e.prototype.skipBytes = function (e) { + (this._dataByteOffset += e), (this.byteOffset += e); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(10), + r = n(13), + o = (function () { + function e() {} + return ( + (e.Instantiate = function (e) { + if (this.RegisteredExternalClasses && this.RegisteredExternalClasses[e]) return this.RegisteredExternalClasses[e]; + var t = r.a.GetClass(e); + if (t) return t; + i.a.Warn(e + " not found, you may have missed an import."); + for (var n = e.split("."), o = window || this, a = 0, s = n.length; a < s; a++) o = o[n[a]]; + return "function" != typeof o ? null : o; + }), + (e.RegisteredExternalClasses = {}), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(27), + r = n(180), + o = n(6), + a = n(18), + s = n(1), + c = n(76), + l = n(110), + u = (function () { + function e(e, t, n, i, r, a, s, c, l) { + void 0 === n && (n = 0), + void 0 === i && (i = 100), + void 0 === r && (r = !1), + void 0 === a && (a = 1), + (this.target = t), + (this.fromFrame = n), + (this.toFrame = i), + (this.loopAnimation = r), + (this.onAnimationEnd = s), + (this.onAnimationLoop = l), + (this._localDelayOffset = null), + (this._pausedDelay = null), + (this._runtimeAnimations = new Array()), + (this._paused = !1), + (this._speedRatio = 1), + (this._weight = -1), + (this._syncRoot = null), + (this.disposeOnEnd = !0), + (this.animationStarted = !1), + (this.onAnimationEndObservable = new o.c()), + (this.onAnimationLoopObservable = new o.c()), + (this._scene = e), + c && this.appendAnimations(t, c), + (this._speedRatio = a), + e._activeAnimatables.push(this); + } + return ( + Object.defineProperty(e.prototype, "syncRoot", { + get: function () { + return this._syncRoot; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "masterFrame", { + get: function () { + return 0 === this._runtimeAnimations.length ? 0 : this._runtimeAnimations[0].currentFrame; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "weight", { + get: function () { + return this._weight; + }, + set: function (e) { + this._weight = -1 !== e ? Math.min(Math.max(e, 0), 1) : -1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "speedRatio", { + get: function () { + return this._speedRatio; + }, + set: function (e) { + for (var t = 0; t < this._runtimeAnimations.length; t++) { + this._runtimeAnimations[t]._prepareForSpeedRatioChange(e); + } + this._speedRatio = e; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.syncWith = function (e) { + if (((this._syncRoot = e), e)) { + var t = this._scene._activeAnimatables.indexOf(this); + t > -1 && (this._scene._activeAnimatables.splice(t, 1), this._scene._activeAnimatables.push(this)); + } + return this; + }), + (e.prototype.getAnimations = function () { + return this._runtimeAnimations; + }), + (e.prototype.appendAnimations = function (e, t) { + for (var n = this, i = 0; i < t.length; i++) { + var o = t[i], + a = new r.a(e, o, this._scene, this); + (a._onLoop = function () { + n.onAnimationLoopObservable.notifyObservers(n), n.onAnimationLoop && n.onAnimationLoop(); + }), + this._runtimeAnimations.push(a); + } + }), + (e.prototype.getAnimationByTargetProperty = function (e) { + for (var t = this._runtimeAnimations, n = 0; n < t.length; n++) if (t[n].animation.targetProperty === e) return t[n].animation; + return null; + }), + (e.prototype.getRuntimeAnimationByTargetProperty = function (e) { + for (var t = this._runtimeAnimations, n = 0; n < t.length; n++) if (t[n].animation.targetProperty === e) return t[n]; + return null; + }), + (e.prototype.reset = function () { + for (var e = this._runtimeAnimations, t = 0; t < e.length; t++) e[t].reset(!0); + (this._localDelayOffset = null), (this._pausedDelay = null); + }), + (e.prototype.enableBlending = function (e) { + for (var t = this._runtimeAnimations, n = 0; n < t.length; n++) (t[n].animation.enableBlending = !0), (t[n].animation.blendingSpeed = e); + }), + (e.prototype.disableBlending = function () { + for (var e = this._runtimeAnimations, t = 0; t < e.length; t++) e[t].animation.enableBlending = !1; + }), + (e.prototype.goToFrame = function (e) { + var t = this._runtimeAnimations; + if (t[0]) { + var n = t[0].animation.framePerSecond, + i = e - t[0].currentFrame, + r = 0 !== this.speedRatio ? (1e3 * i) / (n * this.speedRatio) : 0; + null === this._localDelayOffset && (this._localDelayOffset = 0), (this._localDelayOffset -= r); + } + for (var o = 0; o < t.length; o++) t[o].goToFrame(e); + }), + (e.prototype.pause = function () { + this._paused || (this._paused = !0); + }), + (e.prototype.restart = function () { + this._paused = !1; + }), + (e.prototype._raiseOnAnimationEnd = function () { + this.onAnimationEnd && this.onAnimationEnd(), this.onAnimationEndObservable.notifyObservers(this); + }), + (e.prototype.stop = function (e, t) { + if (e || t) { + var n = this._scene._activeAnimatables.indexOf(this); + if (n > -1) { + for (var i = (o = this._runtimeAnimations).length - 1; i >= 0; i--) { + var r = o[i]; + (e && r.animation.name != e) || (t && !t(r.target)) || (r.dispose(), o.splice(i, 1)); + } + 0 == o.length && (this._scene._activeAnimatables.splice(n, 1), this._raiseOnAnimationEnd()); + } + } else { + if ((i = this._scene._activeAnimatables.indexOf(this)) > -1) { + this._scene._activeAnimatables.splice(i, 1); + var o = this._runtimeAnimations; + for (i = 0; i < o.length; i++) o[i].dispose(); + this._raiseOnAnimationEnd(); + } + } + }), + (e.prototype.waitAsync = function () { + var e = this; + return new Promise(function (t, n) { + e.onAnimationEndObservable.add( + function () { + t(e); + }, + void 0, + void 0, + e, + !0 + ); + }); + }), + (e.prototype._animate = function (e) { + if (this._paused) return (this.animationStarted = !1), null === this._pausedDelay && (this._pausedDelay = e), !0; + if ( + (null === this._localDelayOffset ? ((this._localDelayOffset = e), (this._pausedDelay = null)) : null !== this._pausedDelay && ((this._localDelayOffset += e - this._pausedDelay), (this._pausedDelay = null)), + 0 === this._weight) + ) + return !0; + var t, + n = !1, + i = this._runtimeAnimations; + for (t = 0; t < i.length; t++) { + var r = i[t].animate(e - this._localDelayOffset, this.fromFrame, this.toFrame, this.loopAnimation, this._speedRatio, this._weight); + n = n || r; + } + if (((this.animationStarted = n), !n)) { + if (this.disposeOnEnd) for (t = this._scene._activeAnimatables.indexOf(this), this._scene._activeAnimatables.splice(t, 1), t = 0; t < i.length; t++) i[t].dispose(); + this._raiseOnAnimationEnd(), this.disposeOnEnd && ((this.onAnimationEnd = null), (this.onAnimationLoop = null), this.onAnimationLoopObservable.clear(), this.onAnimationEndObservable.clear()); + } + return n; + }), + e + ); + })(); + (a.a.prototype._animate = function () { + if (this.animationsEnabled) { + var e = c.a.Now; + if (!this._animationTimeLast) { + if (this._pendingData.length > 0) return; + this._animationTimeLast = e; + } + (this.deltaTime = this.useConstantAnimationDeltaTime ? 16 : (e - this._animationTimeLast) * this.animationTimeScale), (this._animationTimeLast = e); + var t = this._activeAnimatables; + if (0 !== t.length) { + this._animationTime += this.deltaTime; + for (var n = this._animationTime, i = 0; i < t.length; i++) { + var r = t[i]; + !r._animate(n) && r.disposeOnEnd && i--; + } + this._processLateAnimationBindings(); + } + } + }), + (a.a.prototype.beginWeightedAnimation = function (e, t, n, i, r, o, a, s, c, l) { + void 0 === i && (i = 1), void 0 === o && (o = 1); + var u = this.beginAnimation(e, t, n, r, o, a, s, !1, c, l); + return (u.weight = i), u; + }), + (a.a.prototype.beginAnimation = function (e, t, n, i, r, o, a, s, c, l) { + void 0 === r && (r = 1), void 0 === s && (s = !0), t > n && r > 0 && (r *= -1), s && this.stopAnimation(e, void 0, c), a || (a = new u(this, e, t, n, i, r, o, void 0, l)); + var h = !c || c(e); + if ((e.animations && h && a.appendAnimations(e, e.animations), e.getAnimatables)) for (var d = e.getAnimatables(), p = 0; p < d.length; p++) this.beginAnimation(d[p], t, n, i, r, o, a, s, c, l); + return a.reset(), a; + }), + (a.a.prototype.beginHierarchyAnimation = function (e, t, n, i, r, o, a, s, c, l, u) { + void 0 === o && (o = 1), void 0 === c && (c = !0); + var h = e.getDescendants(t), + d = []; + d.push(this.beginAnimation(e, n, i, r, o, a, s, c, l)); + for (var p = 0, f = h; p < f.length; p++) { + var m = f[p]; + d.push(this.beginAnimation(m, n, i, r, o, a, s, c, l)); + } + return d; + }), + (a.a.prototype.beginDirectAnimation = function (e, t, n, i, r, o, a, s) { + return void 0 === o && (o = 1), n > i && o > 0 && (o *= -1), new u(this, e, n, i, r, o, a, t, s); + }), + (a.a.prototype.beginDirectHierarchyAnimation = function (e, t, n, i, r, o, a, s, c) { + var l = e.getDescendants(t), + u = []; + u.push(this.beginDirectAnimation(e, n, i, r, o, a, s, c)); + for (var h = 0, d = l; h < d.length; h++) { + var p = d[h]; + u.push(this.beginDirectAnimation(p, n, i, r, o, a, s, c)); + } + return u; + }), + (a.a.prototype.getAnimatableByTarget = function (e) { + for (var t = 0; t < this._activeAnimatables.length; t++) if (this._activeAnimatables[t].target === e) return this._activeAnimatables[t]; + return null; + }), + (a.a.prototype.getAllAnimatablesByTarget = function (e) { + for (var t = [], n = 0; n < this._activeAnimatables.length; n++) this._activeAnimatables[n].target === e && t.push(this._activeAnimatables[n]); + return t; + }), + (a.a.prototype.stopAnimation = function (e, t, n) { + for (var i = 0, r = this.getAllAnimatablesByTarget(e); i < r.length; i++) { + r[i].stop(t, n); + } + }), + (a.a.prototype.stopAllAnimations = function () { + if (this._activeAnimatables) { + for (var e = 0; e < this._activeAnimatables.length; e++) this._activeAnimatables[e].stop(); + this._activeAnimatables = []; + } + for (var t = 0, n = this.animationGroups; t < n.length; t++) { + n[t].stop(); + } + }), + (a.a.prototype._registerTargetForLateAnimationBinding = function (e, t) { + var n = e.target; + this._registeredForLateAnimationBindings.pushNoDuplicate(n), + n._lateAnimationHolders || (n._lateAnimationHolders = {}), + n._lateAnimationHolders[e.targetPath] || (n._lateAnimationHolders[e.targetPath] = { totalWeight: 0, animations: [], originalValue: t }), + n._lateAnimationHolders[e.targetPath].animations.push(e), + (n._lateAnimationHolders[e.targetPath].totalWeight += e.weight); + }), + (a.a.prototype._processLateAnimationBindingsForMatrices = function (e) { + var t = 1, + n = s.c.Vector3[0], + i = s.c.Vector3[1], + r = s.c.Quaternion[0], + o = 0, + a = e.animations[0], + c = e.originalValue, + l = 1; + if (e.totalWeight < 1) c.decompose(i, r, n), (l = 1 - e.totalWeight); + else if (((o = 1), (t = e.totalWeight), a.currentValue.decompose(i, r, n), 1 == (l = a.weight / t))) return a.currentValue; + i.scaleInPlace(l), n.scaleInPlace(l), r.scaleInPlace(l); + for (var u = o; u < e.animations.length; u++) { + var h = e.animations[u], + d = ((l = h.weight / t), s.c.Vector3[2]), + p = s.c.Vector3[3], + f = s.c.Quaternion[1]; + h.currentValue.decompose(p, f, d), p.scaleAndAddToRef(l, i), f.scaleAndAddToRef(l, r), d.scaleAndAddToRef(l, n); + } + var m = a._animationState.workValue; + return s.a.ComposeToRef(i, r, n, m), m; + }), + (a.a.prototype._processLateAnimationBindingsForQuaternions = function (e, t) { + var n = e.animations[0], + i = e.originalValue; + if (1 === e.animations.length) return s.b.SlerpToRef(i, n.currentValue, Math.min(1, e.totalWeight), t), t; + var r, + o, + a = 1; + if (e.totalWeight < 1) { + var c = 1 - e.totalWeight; + (o = []), (r = []).push(i), o.push(c); + } else { + if (2 === e.animations.length) return s.b.SlerpToRef(e.animations[0].currentValue, e.animations[1].currentValue, e.animations[1].weight / e.totalWeight, t), t; + (r = []), (o = []), (a = e.totalWeight); + } + for (var l = 0; l < e.animations.length; l++) { + var u = e.animations[l]; + r.push(u.currentValue), o.push(u.weight / a); + } + for (var h = 0, d = null, p = 0; p < r.length; ) d ? ((h += o[p]), s.b.SlerpToRef(d, r[p], o[p] / h, d), p++) : (s.b.SlerpToRef(r[p], r[p + 1], o[p + 1] / (o[p] + o[p + 1]), t), (d = t), (h = o[p] + o[p + 1]), (p += 2)); + return d; + }), + (a.a.prototype._processLateAnimationBindings = function () { + if (this._registeredForLateAnimationBindings.length) { + for (var e = 0; e < this._registeredForLateAnimationBindings.length; e++) { + var t = this._registeredForLateAnimationBindings.data[e]; + for (var n in t._lateAnimationHolders) { + var r = t._lateAnimationHolders[n], + o = r.animations[0], + a = r.originalValue, + c = i.a.AllowMatrixDecomposeForInterpolation && a.m, + l = t[n]; + if (c) l = this._processLateAnimationBindingsForMatrices(r); + else if (void 0 !== a.w) l = this._processLateAnimationBindingsForQuaternions(r, l || s.b.Identity()); + else { + var u = 0, + h = 1; + if (r.totalWeight < 1) l = a.scale ? a.scale(1 - r.totalWeight) : a * (1 - r.totalWeight); + else { + h = r.totalWeight; + var d = o.weight / h; + (l = 1 !== d ? (o.currentValue.scale ? o.currentValue.scale(d) : o.currentValue * d) : o.currentValue), (u = 1); + } + for (var p = u; p < r.animations.length; p++) { + var f = r.animations[p], + m = f.weight / h; + f.currentValue.scaleAndAddToRef ? f.currentValue.scaleAndAddToRef(m, l) : (l += f.currentValue * m); + } + } + t[n] = l; + } + t._lateAnimationHolders = {}; + } + this._registeredForLateAnimationBindings.reset(); + } + }), + (l.a.prototype.copyAnimationRange = function (e, t, n, r, o) { + void 0 === r && (r = !1), + void 0 === o && (o = null), + 0 === this.animations.length && (this.animations.push(new i.a(this.name, "_matrix", e.animations[0].framePerSecond, i.a.ANIMATIONTYPE_MATRIX, 0)), this.animations[0].setKeys([])); + var a = e.animations[0].getRange(t); + if (!a) return !1; + for ( + var s, + c, + l, + u = a.from, + h = a.to, + d = e.animations[0].getKeys(), + p = e.length, + f = e.getParent(), + m = this.getParent(), + g = r && f && p && this.length && p !== this.length, + b = g && m && f ? m.length / f.length : 1, + _ = r && !m && o && (1 !== o.x || 1 !== o.y || 1 !== o.z), + v = this.animations[0].getKeys(), + y = 0, + C = d.length; + y < C; + y++ + ) + (s = d[y]).frame >= u && + s.frame <= h && + (r ? ((l = s.value.clone()), g ? ((c = l.getTranslation()), l.setTranslation(c.scaleInPlace(b))) : _ && o ? ((c = l.getTranslation()), l.setTranslation(c.multiplyInPlace(o))) : (l = s.value)) : (l = s.value), + v.push({ frame: s.frame + n, value: l })); + return this.animations[0].createRange(t, u + n, h + n), !0; + }); + }, + function (e, t, n) { + "use strict"; + var i = n(2), + r = n(32), + o = n(10), + a = n(147), + s = n(38); + (s.a.prototype.createRenderTargetTexture = function (e, t) { + var n = new a.a(); + void 0 !== t && "object" == typeof t + ? ((n.generateMipMaps = t.generateMipMaps), + (n.generateDepthBuffer = !!t.generateDepthBuffer), + (n.generateStencilBuffer = !!t.generateStencilBuffer), + (n.type = void 0 === t.type ? 0 : t.type), + (n.samplingMode = void 0 === t.samplingMode ? 3 : t.samplingMode), + (n.format = void 0 === t.format ? 5 : t.format)) + : ((n.generateMipMaps = t), (n.generateDepthBuffer = !0), (n.generateStencilBuffer = !1), (n.type = 0), (n.samplingMode = 3), (n.format = 5)), + ((1 !== n.type || this._caps.textureFloatLinearFiltering) && (2 !== n.type || this._caps.textureHalfFloatLinearFiltering)) || (n.samplingMode = 1), + 1 !== n.type || this._caps.textureFloat || ((n.type = 0), o.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")); + var i = this._gl, + s = new r.a(this, r.b.RenderTarget), + c = e.width || e, + l = e.height || e, + u = e.layers || 0, + h = this._getSamplingParameters(n.samplingMode, !!n.generateMipMaps), + d = 0 !== u ? i.TEXTURE_2D_ARRAY : i.TEXTURE_2D, + p = this._getRGBABufferInternalSizedFormat(n.type, n.format), + f = this._getInternalFormat(n.format), + m = this._getWebGLTextureType(n.type); + this._bindTextureDirectly(d, s), + 0 !== u ? ((s.is2DArray = !0), i.texImage3D(d, 0, p, c, l, u, 0, f, m, null)) : i.texImage2D(d, 0, p, c, l, 0, f, m, null), + i.texParameteri(d, i.TEXTURE_MAG_FILTER, h.mag), + i.texParameteri(d, i.TEXTURE_MIN_FILTER, h.min), + i.texParameteri(d, i.TEXTURE_WRAP_S, i.CLAMP_TO_EDGE), + i.texParameteri(d, i.TEXTURE_WRAP_T, i.CLAMP_TO_EDGE), + n.generateMipMaps && this._gl.generateMipmap(d), + this._bindTextureDirectly(d, null); + var g = i.createFramebuffer(); + return ( + this._bindUnboundFramebuffer(g), + (s._depthStencilBuffer = this._setupFramebufferDepthAttachments(!!n.generateStencilBuffer, n.generateDepthBuffer, c, l)), + s.is2DArray || i.framebufferTexture2D(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.TEXTURE_2D, s._webGLTexture, 0), + this._bindUnboundFramebuffer(null), + (s._framebuffer = g), + (s.baseWidth = c), + (s.baseHeight = l), + (s.width = c), + (s.height = l), + (s.depth = u), + (s.isReady = !0), + (s.samples = 1), + (s.generateMipMaps = !!n.generateMipMaps), + (s.samplingMode = n.samplingMode), + (s.type = n.type), + (s.format = n.format), + (s._generateDepthBuffer = n.generateDepthBuffer), + (s._generateStencilBuffer = !!n.generateStencilBuffer), + this._internalTexturesCache.push(s), + s + ); + }), + (s.a.prototype.createDepthStencilTexture = function (e, t) { + if (t.isCube) { + var n = e.width || e; + return this._createDepthStencilCubeTexture(n, t); + } + return this._createDepthStencilTexture(e, t); + }), + (s.a.prototype._createDepthStencilTexture = function (e, t) { + var n = this._gl, + a = e.layers || 0, + s = 0 !== a ? n.TEXTURE_2D_ARRAY : n.TEXTURE_2D, + c = new r.a(this, r.b.Depth); + if (!this._caps.depthTextureExtension) return o.a.Error("Depth texture is not supported by your browser or hardware."), c; + var l = Object(i.a)({ bilinearFiltering: !1, comparisonFunction: 0, generateStencil: !1 }, t); + this._bindTextureDirectly(s, c, !0), this._setupDepthStencilTexture(c, e, l.generateStencil, l.bilinearFiltering, l.comparisonFunction); + var u = l.generateStencil ? n.UNSIGNED_INT_24_8 : n.UNSIGNED_INT, + h = l.generateStencil ? n.DEPTH_STENCIL : n.DEPTH_COMPONENT, + d = h; + return ( + this.webGLVersion > 1 && (d = l.generateStencil ? n.DEPTH24_STENCIL8 : n.DEPTH_COMPONENT24), + c.is2DArray ? n.texImage3D(s, 0, d, c.width, c.height, a, 0, h, u, null) : n.texImage2D(s, 0, d, c.width, c.height, 0, h, u, null), + this._bindTextureDirectly(s, null), + c + ); + }); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return u; + }); + var i = n(12), + r = n(202), + o = n(16); + function a(e) { + return new Promise(function (t) { + DracoDecoderModule({ wasmBinary: e }).then(function (e) { + t({ module: e }); + }); + }); + } + function s(e, t, n, i, r) { + var o = new e.DecoderBuffer(); + o.Init(t, t.byteLength); + var a, + s, + c = new e.Decoder(); + try { + var l = c.GetEncodedGeometryType(o); + switch (l) { + case e.TRIANGULAR_MESH: + (a = new e.Mesh()), (s = c.DecodeBufferToMesh(o, a)); + break; + case e.POINT_CLOUD: + (a = new e.PointCloud()), (s = c.DecodeBufferToPointCloud(o, a)); + break; + default: + throw new Error("Invalid geometry type " + l); + } + if (!s.ok() || !a.ptr) throw new Error(s.error_msg()); + var u = a.num_points(); + if (l === e.TRIANGULAR_MESH) { + var h = a.num_faces(), + d = new e.DracoInt32Array(); + try { + for (var p = new Uint32Array(3 * h), f = 0; f < h; f++) { + c.GetFaceFromMesh(a, f, d); + var m = 3 * f; + (p[m + 0] = d.GetValue(0)), (p[m + 1] = d.GetValue(1)), (p[m + 2] = d.GetValue(2)); + } + i(p); + } finally { + e.destroy(d); + } + } + var g = function (t, n) { + var i = new e.DracoFloat32Array(); + try { + c.GetAttributeFloatForAllPoints(a, n, i); + var o = n.num_components(); + if ("color" === t && 3 === o) { + for (var s = new Float32Array(4 * u), l = 0, h = 0; l < s.length; l += 4, h += o) (s[l + 0] = i.GetValue(h + 0)), (s[l + 1] = i.GetValue(h + 1)), (s[l + 2] = i.GetValue(h + 2)), (s[l + 3] = 1); + r(t, s); + } else { + for (s = new Float32Array(u * o), l = 0; l < s.length; l++) s[l] = i.GetValue(l); + r(t, s); + } + } finally { + e.destroy(i); + } + }; + if (n) + for (var b in n) { + var _ = n[b]; + g(b, c.GetAttributeByUniqueId(a, _)); + } + else { + var v = { position: "POSITION", normal: "NORMAL", color: "COLOR", uv: "TEX_COORD" }; + for (var b in v) { + if (-1 !== (_ = c.GetAttributeId(a, e[v[b]]))) g(b, c.GetAttribute(a, _)); + } + } + } finally { + a && e.destroy(a), e.destroy(c), e.destroy(o); + } + } + function c() { + var e; + onmessage = function (t) { + var n = t.data; + switch (n.id) { + case "init": + var i = n.decoder; + i.url && (importScripts(i.url), (e = a(i.wasmBinary))), postMessage("done"); + break; + case "decodeMesh": + if (!e) throw new Error("Draco decoder module is not available"); + e.then(function (e) { + s( + e.module, + n.dataView, + n.attributes, + function (e) { + postMessage({ id: "indices", value: e }, [e.buffer]); + }, + function (e, t) { + postMessage({ id: e, value: t }, [t.buffer]); + } + ), + postMessage("done"); + }); + } + }; + } + function l(e) { + return "object" != typeof document || "string" != typeof e ? e : i.b.GetAbsoluteUrl(e); + } + var u = (function () { + function e(t) { + void 0 === t && (t = e.DefaultNumWorkers); + var n = e.Configuration.decoder, + o = n.wasmUrl && n.wasmBinaryUrl && "object" == typeof WebAssembly ? { url: n.wasmUrl, wasmBinaryPromise: i.b.LoadFileAsync(l(n.wasmBinaryUrl)) } : { url: n.fallbackUrl, wasmBinaryPromise: Promise.resolve(void 0) }; + t && "function" == typeof Worker + ? (this._workerPoolPromise = o.wasmBinaryPromise.then(function (e) { + for (var n = "" + a + s + "(" + c + ")()", i = URL.createObjectURL(new Blob([n], { type: "application/javascript" })), u = new Array(t), h = 0; h < u.length; h++) + u[h] = new Promise(function (t, n) { + var r = new Worker(i), + a = function (e) { + r.removeEventListener("error", a), r.removeEventListener("message", s), n(e); + }, + s = function (e) { + "done" === e.data && (r.removeEventListener("error", a), r.removeEventListener("message", s), t(r)); + }; + r.addEventListener("error", a), r.addEventListener("message", s), r.postMessage({ id: "init", decoder: { url: l(o.url), wasmBinary: e } }); + }); + return Promise.all(u).then(function (e) { + return new r.a(e); + }); + })) + : (this._decoderModulePromise = o.wasmBinaryPromise.then(function (e) { + if (!o.url) throw new Error("Draco decoder module is not available"); + return i.b.LoadScriptAsync(o.url).then(function () { + return a(e); + }); + })); + } + return ( + Object.defineProperty(e, "DecoderAvailable", { + get: function () { + var t = e.Configuration.decoder; + return !!((t.wasmUrl && t.wasmBinaryUrl && "object" == typeof WebAssembly) || t.fallbackUrl); + }, + enumerable: !0, + configurable: !0, + }), + (e.GetDefaultNumWorkers = function () { + return "object" == typeof navigator && navigator.hardwareConcurrency ? Math.min(Math.floor(0.5 * navigator.hardwareConcurrency), 4) : 1; + }), + Object.defineProperty(e, "Default", { + get: function () { + return e._Default || (e._Default = new e()), e._Default; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this._workerPoolPromise && + this._workerPoolPromise.then(function (e) { + e.dispose(); + }), + delete this._workerPoolPromise, + delete this._decoderModulePromise; + }), + (e.prototype.whenReadyAsync = function () { + return this._workerPoolPromise ? this._workerPoolPromise.then(function () {}) : this._decoderModulePromise ? this._decoderModulePromise.then(function () {}) : Promise.resolve(); + }), + (e.prototype.decodeMeshAsync = function (e, t) { + var n = e instanceof ArrayBuffer ? new Uint8Array(e) : e; + if (this._workerPoolPromise) + return this._workerPoolPromise.then(function (e) { + return new Promise(function (i, r) { + e.push(function (e, a) { + var s = new o.a(), + c = function (t) { + e.removeEventListener("error", c), e.removeEventListener("message", l), r(t), a(); + }, + l = function (t) { + "done" === t.data ? (e.removeEventListener("error", c), e.removeEventListener("message", l), i(s), a()) : "indices" === t.data.id ? (s.indices = t.data.value) : s.set(t.data.value, t.data.id); + }; + e.addEventListener("error", c), e.addEventListener("message", l); + var u = new Uint8Array(n.byteLength); + u.set(new Uint8Array(n.buffer, n.byteOffset, n.byteLength)), e.postMessage({ id: "decodeMesh", dataView: u, attributes: t }, [u.buffer]); + }); + }); + }); + if (this._decoderModulePromise) + return this._decoderModulePromise.then(function (e) { + var i = new o.a(); + return ( + s( + e.module, + n, + t, + function (e) { + i.indices = e; + }, + function (e, t) { + i.set(t, e); + } + ), + i + ); + }); + throw new Error("Draco decoder module is not available"); + }), + (e.Configuration = { + decoder: { + wasmUrl: "assets/babylonjs/draco_wasm_wrapper_gltf.js", + wasmBinaryUrl: "assets/babylonjs/draco_decoder_gltf.wasm", + fallbackUrl: "assets/babylonjs/draco_decoder_gltf.js", + }, + }), + (e.DefaultNumWorkers = e.GetDefaultNumWorkers()), + (e._Default = null), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return a; + }); + var i = n(8), + r = n(44), + o = n(107), + a = (function () { + function e() {} + return ( + (e.CreateResizedCopy = function (e, t, n, a) { + void 0 === a && (a = !0); + var s = e.getScene(), + c = s.getEngine(), + l = new r.a("resized" + e.name, { width: t, height: n }, s, !e.noMipmap, !0, e._texture.type, !1, e.samplingMode, !1); + (l.wrapU = e.wrapU), + (l.wrapV = e.wrapV), + (l.uOffset = e.uOffset), + (l.vOffset = e.vOffset), + (l.uScale = e.uScale), + (l.vScale = e.vScale), + (l.uAng = e.uAng), + (l.vAng = e.vAng), + (l.wAng = e.wAng), + (l.coordinatesIndex = e.coordinatesIndex), + (l.level = e.level), + (l.anisotropicFilteringLevel = e.anisotropicFilteringLevel), + (l._texture.isReady = !1), + (e.wrapU = i.a.CLAMP_ADDRESSMODE), + (e.wrapV = i.a.CLAMP_ADDRESSMODE); + var u = new o.b("pass", 1, null, a ? i.a.BILINEAR_SAMPLINGMODE : i.a.NEAREST_SAMPLINGMODE, c, !1, 0); + return ( + u.getEffect().executeWhenCompiled(function () { + u.onApply = function (t) { + t.setTexture("textureSampler", e); + }; + var t = l.getInternalTexture(); + t && (s.postProcessManager.directRender([u], t), c.unBindFramebuffer(t), l.disposeFramebufferObjects(), u.dispose(), (t.isReady = !0)); + }), + l + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(56), + r = (function () { + function e() {} + return ( + (e.SetImmediate = function (e) { + i.a.IsWindowObjectExist() && window.setImmediate ? window.setImmediate(e) : setTimeout(e, 1); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return m; + }); + var i = n(53), + r = (function () { + function e() { + this.children = []; + } + return ( + (e.prototype.isValid = function (e) { + return !0; + }), + (e.prototype.process = function (e, t) { + var n = ""; + if (this.line) { + var r = this.line, + o = t.processor; + if (o) { + if ((o.lineProcessor && (r = o.lineProcessor(r, t.isFragment)), o.attributeProcessor && i.a.StartsWith(this.line, "attribute"))) r = o.attributeProcessor(this.line); + else if (o.varyingProcessor && i.a.StartsWith(this.line, "varying")) r = o.varyingProcessor(this.line, t.isFragment); + else if ((o.uniformProcessor || o.uniformBufferProcessor) && i.a.StartsWith(this.line, "uniform")) { + /uniform (.+) (.+)/.test(this.line) + ? o.uniformProcessor && (r = o.uniformProcessor(this.line, t.isFragment)) + : o.uniformBufferProcessor && ((r = o.uniformBufferProcessor(this.line, t.isFragment)), (t.lookForClosingBracketForUniformBuffer = !0)); + } + o.endOfUniformBufferProcessor && + t.lookForClosingBracketForUniformBuffer && + -1 !== this.line.indexOf("}") && + ((t.lookForClosingBracketForUniformBuffer = !1), (r = o.endOfUniformBufferProcessor(this.line, t.isFragment))); + } + n += r + "\r\n"; + } + return ( + this.children.forEach(function (i) { + n += i.process(e, t); + }), + this.additionalDefineKey && (e[this.additionalDefineKey] = this.additionalDefineValue || "true"), + n + ); + }), + e + ); + })(), + o = (function () { + function e() {} + return ( + Object.defineProperty(e.prototype, "currentLine", { + get: function () { + return this._lines[this.lineIndex]; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "canRead", { + get: function () { + return this.lineIndex < this._lines.length - 1; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "lines", { + set: function (e) { + this._lines = []; + for (var t = 0, n = e; t < n.length; t++) { + var i = n[t]; + if ("#" !== i[0]) + for (var r = i.split(";"), o = 0; o < r.length; o++) { + var a = r[o]; + (a = a.trim()) && this._lines.push(a + (o !== r.length - 1 ? ";" : "")); + } + else this._lines.push(i); + } + }, + enumerable: !0, + configurable: !0, + }), + e + ); + })(), + a = n(2), + s = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(a.d)(t, e), + (t.prototype.process = function (e, t) { + for (var n = 0; n < this.children.length; n++) { + var i = this.children[n]; + if (i.isValid(e)) return i.process(e, t); + } + return ""; + }), + t + ); + })(r), + c = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(a.d)(t, e), + (t.prototype.isValid = function (e) { + return this.testExpression.isTrue(e); + }), + t + ); + })(r), + l = (function () { + function e() {} + return ( + (e.prototype.isTrue = function (e) { + return !0; + }), + e + ); + })(), + u = (function (e) { + function t(t, n) { + void 0 === n && (n = !1); + var i = e.call(this) || this; + return (i.define = t), (i.not = n), i; + } + return ( + Object(a.d)(t, e), + (t.prototype.isTrue = function (e) { + var t = void 0 !== e[this.define]; + return this.not && (t = !t), t; + }), + t + ); + })(l), + h = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(a.d)(t, e), + (t.prototype.isTrue = function (e) { + return this.leftOperand.isTrue(e) || this.rightOperand.isTrue(e); + }), + t + ); + })(l), + d = (function (e) { + function t() { + return (null !== e && e.apply(this, arguments)) || this; + } + return ( + Object(a.d)(t, e), + (t.prototype.isTrue = function (e) { + return this.leftOperand.isTrue(e) && this.rightOperand.isTrue(e); + }), + t + ); + })(l), + p = (function (e) { + function t(t, n, i) { + var r = e.call(this) || this; + return (r.define = t), (r.operand = n), (r.testValue = i), r; + } + return ( + Object(a.d)(t, e), + (t.prototype.isTrue = function (e) { + var t = e[this.define]; + void 0 === t && (t = this.define); + var n = !1, + i = parseInt(t), + r = parseInt(this.testValue); + switch (this.operand) { + case ">": + n = i > r; + break; + case "<": + n = i < r; + break; + case "<=": + n = i <= r; + break; + case ">=": + n = i >= r; + break; + case "==": + n = i === r; + } + return n; + }), + t + ); + })(l), + f = n(22), + m = (function () { + function e() {} + return ( + (e.Process = function (e, t, n) { + var i = this; + this._ProcessIncludes(e, t, function (e) { + var r = i._ProcessShaderConversion(e, t); + n(r); + }); + }), + (e._ProcessPrecision = function (e, t) { + var n = t.shouldUseHighPrecisionShader; + return -1 === e.indexOf("precision highp float") ? (e = n ? "precision highp float;\n" + e : "precision mediump float;\n" + e) : n || (e = e.replace("precision highp float", "precision mediump float")), e; + }), + (e._ExtractOperation = function (e) { + var t = /defined\((.+)\)/.exec(e); + if (t && t.length) return new u(t[1].trim(), "!" === e[0]); + for (var n = "", i = 0, r = 0, o = ["==", ">=", "<=", "<", ">"]; r < o.length && ((n = o[r]), !((i = e.indexOf(n)) > -1)); r++); + if (-1 === i) return new u(e); + var a = e.substring(0, i).trim(), + s = e.substring(i + n.length).trim(); + return new p(a, n, s); + }), + (e._BuildSubExpression = function (e) { + var t = e.indexOf("||"); + if (-1 === t) { + var n = e.indexOf("&&"); + if (n > -1) { + var i = new d(), + r = e.substring(0, n).trim(), + o = e.substring(n + 2).trim(); + return (i.leftOperand = this._BuildSubExpression(r)), (i.rightOperand = this._BuildSubExpression(o)), i; + } + return this._ExtractOperation(e); + } + var a = new h(); + (r = e.substring(0, t).trim()), (o = e.substring(t + 2).trim()); + return (a.leftOperand = this._BuildSubExpression(r)), (a.rightOperand = this._BuildSubExpression(o)), a; + }), + (e._BuildExpression = function (e, t) { + var n = new c(), + i = e.substring(0, t), + r = e.substring(t).trim(); + return (n.testExpression = "#ifdef" === i ? new u(r) : "#ifndef" === i ? new u(r, !0) : this._BuildSubExpression(r)), n; + }), + (e._MoveCursorWithinIf = function (e, t, n) { + for (var i = e.currentLine; this._MoveCursor(e, n); ) { + var o = (i = e.currentLine).substring(0, 5).toLowerCase(); + if ("#else" === o) { + var a = new r(); + return t.children.push(a), void this._MoveCursor(e, a); + } + if ("#elif" === o) { + var s = this._BuildExpression(i, 5); + t.children.push(s), (n = s); + } + } + }), + (e._MoveCursor = function (e, t) { + for (; e.canRead; ) { + e.lineIndex++; + var n = e.currentLine, + i = /(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(n); + if (i && i.length) { + switch (i[0]) { + case "#ifdef": + var o = new s(); + t.children.push(o); + var a = this._BuildExpression(n, 6); + o.children.push(a), this._MoveCursorWithinIf(e, o, a); + break; + case "#else": + case "#elif": + return !0; + case "#endif": + return !1; + case "#ifndef": + o = new s(); + t.children.push(o); + a = this._BuildExpression(n, 7); + o.children.push(a), this._MoveCursorWithinIf(e, o, a); + break; + case "#if": + (o = new s()), (a = this._BuildExpression(n, 3)); + t.children.push(o), o.children.push(a), this._MoveCursorWithinIf(e, o, a); + } + } else { + var c = new r(); + if (((c.line = n), t.children.push(c), "#" === n[0] && "d" === n[1])) { + var l = n.replace(";", "").split(" "); + (c.additionalDefineKey = l[1]), 3 === l.length && (c.additionalDefineValue = l[2]); + } + } + } + return !1; + }), + (e._EvaluatePreProcessors = function (e, t, n) { + var i = new r(), + a = new o(); + return (a.lineIndex = -1), (a.lines = e.split("\n")), this._MoveCursor(a, i), i.process(t, n); + }), + (e._PreparePreProcessors = function (e) { + for (var t = {}, n = 0, i = e.defines; n < i.length; n++) { + var r = i[n].replace("#define", "").replace(";", "").trim().split(" "); + t[r[0]] = r.length > 1 ? r[1] : ""; + } + return (t.GL_ES = "true"), (t.__VERSION__ = e.version), (t[e.platformName] = "true"), t; + }), + (e._ProcessShaderConversion = function (e, t) { + var n = this._ProcessPrecision(e, t); + if (!t.processor) return n; + if (-1 !== n.indexOf("#version 3")) return n.replace("#version 300 es", ""); + var i = t.defines, + r = this._PreparePreProcessors(t); + return t.processor.preProcessor && (n = t.processor.preProcessor(n, i, t.isFragment)), (n = this._EvaluatePreProcessors(n, r, t)), t.processor.postProcessor && (n = t.processor.postProcessor(n, i, t.isFragment)), n; + }), + (e._ProcessIncludes = function (t, n, i) { + for (var r = this, o = /#include<(.+)>(\((.*)\))*(\[(.*)\])*/g, a = o.exec(t), s = new String(t); null != a; ) { + var c = a[1]; + if ( + (-1 !== c.indexOf("__decl__") && ((c = c.replace(/__decl__/, "")), n.supportsUniformBuffers && (c = (c = c.replace(/Vertex/, "Ubo")).replace(/Fragment/, "Ubo")), (c += "Declaration")), + !n.includesShadersStore[c]) + ) { + var l = n.shadersRepository + "ShadersInclude/" + c + ".fx"; + return void e._FileToolsLoadFile(l, function (e) { + (n.includesShadersStore[c] = e), r._ProcessIncludes(s, n, i); + }); + } + var u = n.includesShadersStore[c]; + if (a[2]) + for (var h = a[3].split(","), d = 0; d < h.length; d += 2) { + var p = new RegExp(h[d], "g"), + f = h[d + 1]; + u = u.replace(p, f); + } + if (a[4]) { + var m = a[5]; + if (-1 !== m.indexOf("..")) { + var g = m.split(".."), + b = parseInt(g[0]), + _ = parseInt(g[1]), + v = u.slice(0); + (u = ""), isNaN(_) && (_ = n.indexParameters[g[1]]); + for (var y = b; y < _; y++) + n.supportsUniformBuffers || + (v = v.replace(/light\{X\}.(\w*)/g, function (e, t) { + return t + "{X}"; + })), + (u += v.replace(/\{X\}/g, y.toString()) + "\n"); + } else + n.supportsUniformBuffers || + (u = u.replace(/light\{X\}.(\w*)/g, function (e, t) { + return t + "{X}"; + })), + (u = u.replace(/\{X\}/g, m)); + } + (s = s.replace(a[0], u)), (a = o.exec(t)); + } + i(s); + }), + (e._FileToolsLoadFile = function (e, t, n, i, r, o) { + throw f.a.WarnImport("FileTools"); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i = "reflectionFunction", + r = + "vec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {\n\nvec3 invOrigVec=vec3(1.0,1.0,1.0)/origVec;\nvec3 halfSize=cubeSize*0.5;\nvec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;\nvec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;\n\nvec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);\n\nfloat distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);\n\nvec3 intersectPositionWS=vertexPos+origVec*distance;\n\nreturn intersectPositionWS-cubePos;\n}\nvec3 computeFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{\nfloat lon=atan(direction.z,direction.x);\nfloat lat=acos(direction.y);\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\nfloat s=sphereCoords.x*0.5+0.5;\nfloat t=sphereCoords.y;\nreturn vec3(s,t,0);\n}\nvec3 computeMirroredFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{\nfloat lon=atan(direction.z,direction.x);\nfloat lat=acos(direction.y);\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\nfloat s=sphereCoords.x*0.5+0.5;\nfloat t=sphereCoords.y;\nreturn vec3(1.0-s,t,0);\n}\nvec3 computeEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{\nvec3 cameraToVertex=normalize(worldPos.xyz-eyePosition);\nvec3 r=normalize(reflect(cameraToVertex,worldNormal));\nr=vec3(reflectionMatrix*vec4(r,0));\nfloat lon=atan(r.z,r.x);\nfloat lat=acos(r.y);\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\nfloat s=sphereCoords.x*0.5+0.5;\nfloat t=sphereCoords.y;\nreturn vec3(s,t,0);\n}\nvec3 computeSphericalCoords(vec4 worldPos,vec3 worldNormal,mat4 view,mat4 reflectionMatrix)\n{\nvec3 viewDir=normalize(vec3(view*worldPos));\nvec3 viewNormal=normalize(vec3(view*vec4(worldNormal,0.0)));\nvec3 r=reflect(viewDir,viewNormal);\nr=vec3(reflectionMatrix*vec4(r,0));\nr.z=r.z-1.0;\nfloat m=2.0*length(r);\nreturn vec3(r.x/m+0.5,1.0-r.y/m-0.5,0);\n}\nvec3 computePlanarCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{\nvec3 viewDir=worldPos.xyz-eyePosition;\nvec3 coords=normalize(reflect(viewDir,worldNormal));\nreturn vec3(reflectionMatrix*vec4(coords,1));\n}\nvec3 computeCubicCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{\nvec3 viewDir=normalize(worldPos.xyz-eyePosition);\n\nvec3 coords=reflect(viewDir,worldNormal);\ncoords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;\n}\nvec3 computeCubicLocalCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix,vec3 reflectionSize,vec3 reflectionPosition)\n{\nvec3 viewDir=normalize(worldPos.xyz-eyePosition);\n\nvec3 coords=reflect(viewDir,worldNormal);\ncoords=parallaxCorrectNormal(worldPos.xyz,coords,reflectionSize,reflectionPosition);\ncoords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;\n}\nvec3 computeProjectionCoords(vec4 worldPos,mat4 view,mat4 reflectionMatrix)\n{\nreturn vec3(reflectionMatrix*(view*worldPos));\n}\nvec3 computeSkyBoxCoords(vec3 positionW,mat4 reflectionMatrix)\n{\nreturn vec3(reflectionMatrix*vec4(positionW,0));\n}\n#ifdef REFLECTION\nvec3 computeReflectionCoords(vec4 worldPos,vec3 worldNormal)\n{\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);\nreturn computeMirroredFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);\nreturn computeFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\nreturn computeEquirectangularCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SPHERICAL\nreturn computeSphericalCoords(worldPos,worldNormal,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_PLANAR\nreturn computePlanarCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_CUBIC\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\nreturn computeCubicLocalCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix,vReflectionSize,vReflectionPosition);\n#else\nreturn computeCubicCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#endif\n#ifdef REFLECTIONMAP_PROJECTION\nreturn computeProjectionCoords(worldPos,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nreturn computeSkyBoxCoords(vPositionUVW,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_EXPLICIT\nreturn vec3(0,0,0);\n#endif\n}\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "bumpFragmentFunctions", + r = + "#if defined(BUMP) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nvarying mat3 vTBN;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nuniform mat4 normalMatrix;\n#endif\nvec3 perturbNormal(mat3 cotangentFrame,vec3 textureSample,float scale)\n{\ntextureSample=textureSample*2.0-1.0;\n#ifdef NORMALXYSCALE\ntextureSample=normalize(textureSample*vec3(scale,scale,1.0));\n#endif\nreturn normalize(cotangentFrame*textureSample);\n}\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv,vec2 tangentSpaceParams)\n{\n\nuv=gl_FrontFacing ? uv : -uv;\n\nvec3 dp1=dFdx(p);\nvec3 dp2=dFdy(p);\nvec2 duv1=dFdx(uv);\nvec2 duv2=dFdy(uv);\n\nvec3 dp2perp=cross(dp2,normal);\nvec3 dp1perp=cross(normal,dp1);\nvec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;\nvec3 bitangent=dp2perp*duv1.y+dp1perp*duv2.y;\n\ntangent*=tangentSpaceParams.x;\nbitangent*=tangentSpaceParams.y;\n\nfloat invmax=inversesqrt(max(dot(tangent,tangent),dot(bitangent,bitangent)));\nreturn mat3(tangent*invmax,bitangent*invmax,normal);\n}\n#endif\n#if defined(BUMP)\n#if BUMPDIRECTUV == 1\n#define vBumpUV vMainUV1\n#elif BUMPDIRECTUV == 2\n#define vBumpUV vMainUV2\n#else\nvarying vec2 vBumpUV;\n#endif\nuniform sampler2D bumpSampler;\nvec3 perturbNormal(mat3 cotangentFrame,vec2 uv)\n{\nreturn perturbNormal(cotangentFrame,texture2D(bumpSampler,uv).xyz,vBumpInfos.y);\n}\n#endif\n#if defined(BUMP) || defined(CLEARCOAT_BUMP)\nvec3 perturbNormal(mat3 cotangentFrame,vec3 color)\n{\nreturn perturbNormal(cotangentFrame,color,vBumpInfos.y);\n}\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv)\n{\nreturn cotangent_frame(normal,p,uv,vTangentSpaceParams);\n}\n#endif\n#if defined(BUMP) && defined(PARALLAX)\nconst float minSamples=4.;\nconst float maxSamples=15.;\nconst int iMaxSamples=15;\n\nvec2 parallaxOcclusion(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale) {\nfloat parallaxLimit=length(vViewDirCoT.xy)/vViewDirCoT.z;\nparallaxLimit*=parallaxScale;\nvec2 vOffsetDir=normalize(vViewDirCoT.xy);\nvec2 vMaxOffset=vOffsetDir*parallaxLimit;\nfloat numSamples=maxSamples+(dot(vViewDirCoT,vNormalCoT)*(minSamples-maxSamples));\nfloat stepSize=1.0/numSamples;\n\nfloat currRayHeight=1.0;\nvec2 vCurrOffset=vec2(0,0);\nvec2 vLastOffset=vec2(0,0);\nfloat lastSampledHeight=1.0;\nfloat currSampledHeight=1.0;\nfor (int i=0; icurrRayHeight)\n{\nfloat delta1=currSampledHeight-currRayHeight;\nfloat delta2=(currRayHeight+stepSize)-lastSampledHeight;\nfloat ratio=delta1/(delta1+delta2);\nvCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset;\n\nbreak;\n}\nelse\n{\ncurrRayHeight-=stepSize;\nvLastOffset=vCurrOffset;\nvCurrOffset+=stepSize*vMaxOffset;\nlastSampledHeight=currSampledHeight;\n}\n}\nreturn vCurrOffset;\n}\nvec2 parallaxOffset(vec3 viewDir,float heightScale)\n{\n\nfloat height=texture2D(bumpSampler,vBumpUV).w;\nvec2 texCoordOffset=heightScale*viewDir.xy*height;\nreturn -texCoordOffset;\n}\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = + "vec2 uvOffset=vec2(0.0,0.0);\n#if defined(BUMP) || defined(PARALLAX)\n#ifdef NORMALXYSCALE\nfloat normalScale=1.0;\n#else\nfloat normalScale=vBumpInfos.y;\n#endif\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#else\nmat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV);\n#endif\n#elif defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#else\nmat3 TBN=cotangent_frame(normalW,vPositionW,vMainUV1,vec2(1.,1.));\n#endif\n#endif\n#ifdef PARALLAX\nmat3 invTBN=transposeMat3(TBN);\n#ifdef PARALLAXOCCLUSION\nuvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z);\n#else\nuvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z);\n#endif\n#endif\n#ifdef BUMP\n#ifdef OBJECTSPACE_NORMALMAP\nnormalW=normalize(texture2D(bumpSampler,vBumpUV).xyz*2.0-1.0);\nnormalW=normalize(mat3(normalMatrix)*normalW);\n#else\nnormalW=perturbNormal(TBN,vBumpUV+uvOffset);\n#endif\n#endif"; + n(7).a.IncludesShadersStore.bumpFragment = i; + }, + function (e, t, n) { + "use strict"; + var i = "logDepthFragment", + r = "#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "logDepthVertex", + r = "#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;\ngl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + (function (e, t) { + var n; + !(function (n) { + !(function (i) { + var r = "object" == typeof t ? t : "object" == typeof self ? self : "object" == typeof this ? this : Function("return this;")(), + o = a(n); + function a(e, t) { + return function (n, i) { + "function" != typeof e[n] && Object.defineProperty(e, n, { configurable: !0, writable: !0, value: i }), t && t(n, i); + }; + } + void 0 === r.Reflect ? (r.Reflect = n) : (o = a(r.Reflect, o)), + (function (t) { + var n = Object.prototype.hasOwnProperty, + i = "function" == typeof Symbol, + r = i && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", + o = i && void 0 !== Symbol.iterator ? Symbol.iterator : "@@iterator", + a = "function" == typeof Object.create, + s = { __proto__: [] } instanceof Array, + c = !a && !s, + l = { + create: a + ? function () { + return w(Object.create(null)); + } + : s + ? function () { + return w({ __proto__: null }); + } + : function () { + return w({}); + }, + has: c + ? function (e, t) { + return n.call(e, t); + } + : function (e, t) { + return t in e; + }, + get: c + ? function (e, t) { + return n.call(e, t) ? e[t] : void 0; + } + : function (e, t) { + return e[t]; + }, + }, + u = Object.getPrototypeOf(Function), + h = "object" == typeof e && e.env && "true" === e.env.REFLECT_METADATA_USE_MAP_POLYFILL, + d = + h || "function" != typeof Map || "function" != typeof Map.prototype.entries + ? (function () { + var e = {}, + t = [], + n = (function () { + function e(e, t, n) { + (this._index = 0), (this._keys = e), (this._values = t), (this._selector = n); + } + return ( + (e.prototype["@@iterator"] = function () { + return this; + }), + (e.prototype[o] = function () { + return this; + }), + (e.prototype.next = function () { + var e = this._index; + if (e >= 0 && e < this._keys.length) { + var n = this._selector(this._keys[e], this._values[e]); + return e + 1 >= this._keys.length ? ((this._index = -1), (this._keys = t), (this._values = t)) : this._index++, { value: n, done: !1 }; + } + return { value: void 0, done: !0 }; + }), + (e.prototype.throw = function (e) { + throw (this._index >= 0 && ((this._index = -1), (this._keys = t), (this._values = t)), e); + }), + (e.prototype.return = function (e) { + return this._index >= 0 && ((this._index = -1), (this._keys = t), (this._values = t)), { value: e, done: !0 }; + }), + e + ); + })(); + return (function () { + function t() { + (this._keys = []), (this._values = []), (this._cacheKey = e), (this._cacheIndex = -2); + } + return ( + Object.defineProperty(t.prototype, "size", { + get: function () { + return this._keys.length; + }, + enumerable: !0, + configurable: !0, + }), + (t.prototype.has = function (e) { + return this._find(e, !1) >= 0; + }), + (t.prototype.get = function (e) { + var t = this._find(e, !1); + return t >= 0 ? this._values[t] : void 0; + }), + (t.prototype.set = function (e, t) { + var n = this._find(e, !0); + return (this._values[n] = t), this; + }), + (t.prototype.delete = function (t) { + var n = this._find(t, !1); + if (n >= 0) { + for (var i = this._keys.length, r = n + 1; r < i; r++) (this._keys[r - 1] = this._keys[r]), (this._values[r - 1] = this._values[r]); + return this._keys.length--, this._values.length--, t === this._cacheKey && ((this._cacheKey = e), (this._cacheIndex = -2)), !0; + } + return !1; + }), + (t.prototype.clear = function () { + (this._keys.length = 0), (this._values.length = 0), (this._cacheKey = e), (this._cacheIndex = -2); + }), + (t.prototype.keys = function () { + return new n(this._keys, this._values, i); + }), + (t.prototype.values = function () { + return new n(this._keys, this._values, r); + }), + (t.prototype.entries = function () { + return new n(this._keys, this._values, a); + }), + (t.prototype["@@iterator"] = function () { + return this.entries(); + }), + (t.prototype[o] = function () { + return this.entries(); + }), + (t.prototype._find = function (e, t) { + return ( + this._cacheKey !== e && (this._cacheIndex = this._keys.indexOf((this._cacheKey = e))), + this._cacheIndex < 0 && t && ((this._cacheIndex = this._keys.length), this._keys.push(e), this._values.push(void 0)), + this._cacheIndex + ); + }), + t + ); + })(); + function i(e, t) { + return e; + } + function r(e, t) { + return t; + } + function a(e, t) { + return [e, t]; + } + })() + : Map, + p = + h || "function" != typeof Set || "function" != typeof Set.prototype.entries + ? (function () { + function e() { + this._map = new d(); + } + return ( + Object.defineProperty(e.prototype, "size", { + get: function () { + return this._map.size; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.has = function (e) { + return this._map.has(e); + }), + (e.prototype.add = function (e) { + return this._map.set(e, e), this; + }), + (e.prototype.delete = function (e) { + return this._map.delete(e); + }), + (e.prototype.clear = function () { + this._map.clear(); + }), + (e.prototype.keys = function () { + return this._map.keys(); + }), + (e.prototype.values = function () { + return this._map.values(); + }), + (e.prototype.entries = function () { + return this._map.entries(); + }), + (e.prototype["@@iterator"] = function () { + return this.keys(); + }), + (e.prototype[o] = function () { + return this.keys(); + }), + e + ); + })() + : Set, + f = new (h || "function" != typeof WeakMap + ? (function () { + var e = l.create(), + t = i(); + return (function () { + function e() { + this._key = i(); + } + return ( + (e.prototype.has = function (e) { + var t = r(e, !1); + return void 0 !== t && l.has(t, this._key); + }), + (e.prototype.get = function (e) { + var t = r(e, !1); + return void 0 !== t ? l.get(t, this._key) : void 0; + }), + (e.prototype.set = function (e, t) { + return (r(e, !0)[this._key] = t), this; + }), + (e.prototype.delete = function (e) { + var t = r(e, !1); + return void 0 !== t && delete t[this._key]; + }), + (e.prototype.clear = function () { + this._key = i(); + }), + e + ); + })(); + function i() { + var t; + do { + t = "@@WeakMap@@" + a(); + } while (l.has(e, t)); + return (e[t] = !0), t; + } + function r(e, i) { + if (!n.call(e, t)) { + if (!i) return; + Object.defineProperty(e, t, { value: l.create() }); + } + return e[t]; + } + function o(e, t) { + for (var n = 0; n < t; ++n) e[n] = (255 * Math.random()) | 0; + return e; + } + function a() { + var e, + t = + ((e = 16), + "function" == typeof Uint8Array + ? "undefined" != typeof crypto + ? crypto.getRandomValues(new Uint8Array(e)) + : "undefined" != typeof msCrypto + ? msCrypto.getRandomValues(new Uint8Array(e)) + : o(new Uint8Array(e), e) + : o(new Array(e), e)); + (t[6] = (79 & t[6]) | 64), (t[8] = (191 & t[8]) | 128); + for (var n = "", i = 0; i < 16; ++i) { + var r = t[i]; + (4 !== i && 6 !== i && 8 !== i) || (n += "-"), r < 16 && (n += "0"), (n += r.toString(16).toLowerCase()); + } + return n; + } + })() + : WeakMap)(); + function m(e, t, n) { + var i = f.get(e); + if (C(i)) { + if (!n) return; + (i = new d()), f.set(e, i); + } + var r = i.get(t); + if (C(r)) { + if (!n) return; + (r = new d()), i.set(t, r); + } + return r; + } + function g(e, t, n) { + var i = m(t, n, !1); + return !C(i) && !!i.has(e); + } + function b(e, t, n) { + var i = m(t, n, !1); + if (!C(i)) return i.get(e); + } + function _(e, t, n, i) { + m(n, i, !0).set(e, t); + } + function v(e, t) { + var n = [], + i = m(e, t, !1); + if (C(i)) return n; + for ( + var r = (function (e) { + var t = A(e, o); + if (!E(t)) throw new TypeError(); + var n = t.call(e); + if (!x(n)) throw new TypeError(); + return n; + })(i.keys()), + a = 0; + ; + + ) { + var s = I(r); + if (!s) return (n.length = a), n; + var c = s.value; + try { + n[a] = c; + } catch (e) { + try { + D(r); + } finally { + throw e; + } + } + a++; + } + } + function y(e) { + if (null === e) return 1; + switch (typeof e) { + case "undefined": + return 0; + case "boolean": + return 2; + case "string": + return 3; + case "symbol": + return 4; + case "number": + return 5; + case "object": + return null === e ? 1 : 6; + default: + return 6; + } + } + function C(e) { + return void 0 === e; + } + function P(e) { + return null === e; + } + function x(e) { + return "object" == typeof e ? null !== e : "function" == typeof e; + } + function T(e, t) { + switch (y(e)) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return e; + } + var n = 3 === t ? "string" : 5 === t ? "number" : "default", + i = A(e, r); + if (void 0 !== i) { + var o = i.call(e, n); + if (x(o)) throw new TypeError(); + return o; + } + return (function (e, t) { + if ("string" === t) { + var n = e.toString; + if (E(n)) if (!x((r = n.call(e)))) return r; + if (E((i = e.valueOf))) if (!x((r = i.call(e)))) return r; + } else { + var i; + if (E((i = e.valueOf))) if (!x((r = i.call(e)))) return r; + var r, + o = e.toString; + if (E(o)) if (!x((r = o.call(e)))) return r; + } + throw new TypeError(); + })(e, "default" === n ? "number" : n); + } + function S(e) { + var t = T(e, 3); + return "symbol" == typeof t + ? t + : (function (e) { + return "" + e; + })(t); + } + function O(e) { + return Array.isArray ? Array.isArray(e) : e instanceof Object ? e instanceof Array : "[object Array]" === Object.prototype.toString.call(e); + } + function E(e) { + return "function" == typeof e; + } + function M(e) { + return "function" == typeof e; + } + function A(e, t) { + var n = e[t]; + if (null != n) { + if (!E(n)) throw new TypeError(); + return n; + } + } + function I(e) { + var t = e.next(); + return !t.done && t; + } + function D(e) { + var t = e.return; + t && t.call(e); + } + function R(e) { + var t = Object.getPrototypeOf(e); + if ("function" != typeof e || e === u) return t; + if (t !== u) return t; + var n = e.prototype, + i = n && Object.getPrototypeOf(n); + if (null == i || i === Object.prototype) return t; + var r = i.constructor; + return "function" != typeof r || r === e ? t : r; + } + function w(e) { + return (e.__ = void 0), delete e.__, e; + } + t("decorate", function (e, t, n, i) { + if (C(n)) { + if (!O(e)) throw new TypeError(); + if (!M(t)) throw new TypeError(); + return (function (e, t) { + for (var n = e.length - 1; n >= 0; --n) { + var i = (0, e[n])(t); + if (!C(i) && !P(i)) { + if (!M(i)) throw new TypeError(); + t = i; + } + } + return t; + })(e, t); + } + if (!O(e)) throw new TypeError(); + if (!x(t)) throw new TypeError(); + if (!x(i) && !C(i) && !P(i)) throw new TypeError(); + return ( + P(i) && (i = void 0), + (function (e, t, n, i) { + for (var r = e.length - 1; r >= 0; --r) { + var o = (0, e[r])(t, n, i); + if (!C(o) && !P(o)) { + if (!x(o)) throw new TypeError(); + i = o; + } + } + return i; + })(e, t, (n = S(n)), i) + ); + }), + t("metadata", function (e, t) { + return function (n, i) { + if (!x(n)) throw new TypeError(); + if ( + !C(i) && + !(function (e) { + switch (y(e)) { + case 3: + case 4: + return !0; + default: + return !1; + } + })(i) + ) + throw new TypeError(); + _(e, t, n, i); + }; + }), + t("defineMetadata", function (e, t, n, i) { + if (!x(n)) throw new TypeError(); + return C(i) || (i = S(i)), _(e, t, n, i); + }), + t("hasMetadata", function (e, t, n) { + if (!x(t)) throw new TypeError(); + return ( + C(n) || (n = S(n)), + (function e(t, n, i) { + if (g(t, n, i)) return !0; + var r = R(n); + return !P(r) && e(t, r, i); + })(e, t, n) + ); + }), + t("hasOwnMetadata", function (e, t, n) { + if (!x(t)) throw new TypeError(); + return C(n) || (n = S(n)), g(e, t, n); + }), + t("getMetadata", function (e, t, n) { + if (!x(t)) throw new TypeError(); + return ( + C(n) || (n = S(n)), + (function e(t, n, i) { + if (g(t, n, i)) return b(t, n, i); + var r = R(n); + return P(r) ? void 0 : e(t, r, i); + })(e, t, n) + ); + }), + t("getOwnMetadata", function (e, t, n) { + if (!x(t)) throw new TypeError(); + return C(n) || (n = S(n)), b(e, t, n); + }), + t("getMetadataKeys", function (e, t) { + if (!x(e)) throw new TypeError(); + return ( + C(t) || (t = S(t)), + (function e(t, n) { + var i = v(t, n), + r = R(t); + if (null === r) return i; + var o = e(r, n); + if (o.length <= 0) return i; + if (i.length <= 0) return o; + for (var a = new p(), s = [], c = 0, l = i; c < l.length; c++) { + var u = l[c]; + a.has(u) || (a.add(u), s.push(u)); + } + for (var h = 0, d = o; h < d.length; h++) { + u = d[h]; + a.has(u) || (a.add(u), s.push(u)); + } + return s; + })(e, t) + ); + }), + t("getOwnMetadataKeys", function (e, t) { + if (!x(e)) throw new TypeError(); + return C(t) || (t = S(t)), v(e, t); + }), + t("deleteMetadata", function (e, t, n) { + if (!x(t)) throw new TypeError(); + C(n) || (n = S(n)); + var i = m(t, n, !1); + if (C(i)) return !1; + if (!i.delete(e)) return !1; + if (i.size > 0) return !0; + var r = f.get(t); + return r.delete(n), r.size > 0 || f.delete(t), !0; + }); + })(o); + })(); + })(n || (n = {})); + }.call(this, n(252), n(212))); + }, + function (e, t, n) { + var i; + "undefined" != typeof self && self, + (i = function () { + return (function (e) { + var t = {}; + function n(i) { + if (t[i]) return t[i].exports; + var r = (t[i] = { i: i, l: !1, exports: {} }); + return e[i].call(r.exports, r, r.exports, n), (r.l = !0), r.exports; + } + return ( + (n.m = e), + (n.c = t), + (n.d = function (e, t, i) { + n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: i }); + }), + (n.r = function (e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (n.t = function (e, t) { + if ((1 & t && (e = n(e)), 8 & t)) return e; + if (4 & t && "object" == typeof e && e && e.__esModule) return e; + var i = Object.create(null); + if ((n.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e)) + for (var r in e) + n.d( + i, + r, + function (t) { + return e[t]; + }.bind(null, r) + ); + return i; + }), + (n.n = function (e) { + var t = + e && e.__esModule + ? function () { + return e.default; + } + : function () { + return e; + }; + return n.d(t, "a", t), t; + }), + (n.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }), + (n.p = ""), + n((n.s = 0)) + ); + })([ + function (e, t, n) { + "use strict"; + n.r(t); + var i = "__typedJsonJsonObjectMetadataInformation__", + r = 'Are you sure, that you have both "experimentalDecorators" and "emitDecoratorMetadata" in your tsconfig.json?'; + function o(e) { + return !!~[Date, Number, String, Boolean].indexOf(e); + } + function a(e) { + return !!~[Float32Array, Float64Array, Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array].indexOf(e); + } + function s(e, t) { + return "string" != typeof e || + (function (e, t) { + var n = t === String || t === ArrayBuffer || t === DataView, + i = e.length >= 2 && '"' === e[0] && '"' === e[e.length - 1], + r = /^\d+$/.test(e.trim()); + return (n && !i) || (!i && !r && t === Date); + })(e, t) + ? e + : JSON.parse(e); + } + function c(e, t) { + return e === t || e.prototype instanceof t; + } + function l(e) { + for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + ("object" == typeof console && "function" == typeof console.error) || ("object" == typeof console && console.log); + } + function u(e) { + for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + ("object" == typeof console && "function" == typeof console.warn) || ("object" == typeof console && console.log); + } + function h(e) { + return !(null == e); + } + function d(e, t) { + return "number" == typeof e + ? t === Number + : "string" == typeof e + ? t === String + : "boolean" == typeof e + ? t === Boolean + : !!(function (e) { + return "object" == typeof e; + })(e) && e instanceof t; + } + var p = "object" == typeof Reflect && "function" == typeof Reflect.getMetadata; + function f(e) { + return "string" == typeof e.name ? e.name : "undefined"; + } + var m = (function () { + function e(e) { + (this.dataMembers = new Map()), (this.knownTypes = new Set()), (this.isExplicitlyMarked = !1), (this.isHandledWithoutAnnotation = !1), (this.classType = e); + } + return ( + (e.getJsonObjectName = function (t) { + var n = e.getFromConstructor(t); + return f(n ? n.classType : t); + }), + (e.getFromConstructor = function (t) { + var n = t.prototype; + if (n) { + var r; + if ((n.hasOwnProperty(i) && (r = n[i]), r && r.isExplicitlyMarked)) return r; + if (e.doesHandleWithoutAnnotation(t)) { + var o = new e(t); + return (o.isExplicitlyMarked = !0), o; + } + } + }), + (e.getKnownTypeNameFromType = function (t) { + var n = e.getFromConstructor(t); + return f(n ? n.classType : t); + }), + (e.doesHandleWithoutAnnotation = function (e) { + return o(e) || a(e) || e === DataView || e === ArrayBuffer; + }), + e + ); + })(); + function g(e, t, n) { + var r, + o = "@jsonMember on " + f(e.constructor) + "." + String(t); + if ("function" != typeof e) + if ("function" != typeof e[t]) + if (n && (n.ctor || n.deserializer)) { + if (e.hasOwnProperty(i)) r = e[i]; + else { + r = new m(e.constructor); + var a = e[i]; + a && + a.dataMembers.forEach(function (e, t) { + return r.dataMembers.set(t, e); + }), + Object.defineProperty(e, i, { enumerable: !1, configurable: !1, writable: !1, value: r }); + } + n.deserializer || r.knownTypes.add(n.ctor), + n.keyType && r.knownTypes.add(n.keyType), + n.elementType && + n.elementType.forEach(function (e) { + return r.knownTypes.add(e); + }), + Object.keys(n).forEach(function (e) { + return void 0 === n[e] && delete n[e]; + }), + r.dataMembers.set(n.name, n); + } else l(o + ": JsonMemberMetadata has unknown ctor."); + else l(o + ": cannot use a method property."); + else l(o + ": cannot use a static property."); + } + var b = ["preserveNull"]; + function _(e) { + var t = Object.keys(e) + .filter(function (e) { + return b.indexOf(e) > -1; + }) + .reduce(function (t, n) { + return (t[n] = e[n]), t; + }, {}); + return Object.keys(t).length > 0 ? t : void 0; + } + function v(e, t) { + return t && null != t[e] + ? t[e] + : (function (e) { + switch (e) { + case "preserveNull": + return !1; + } + return null; + })(e); + } + function y(e, t) { + return t ? Object.assign({}, e, t) : e; + } + var C = function () { + return (C = + Object.assign || + function (e) { + for (var t, n = 1, i = arguments.length; n < i; n++) for (var r in (t = arguments[n])) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); + return e; + }).apply(this, arguments); + }; + function P(e, t, n, i) { + t.constructor !== n && (e.__type = i && i.name ? i.name : f(t.constructor)); + } + var x = (function () { + function e() { + (this._typeHintEmitter = P), (this._errorHandler = l); + } + return ( + (e.prototype.setTypeHintEmitter = function (e) { + if ("function" != typeof e) throw new TypeError("'typeEmitterCallback' is not a function."); + this._typeHintEmitter = e; + }), + (e.prototype.setErrorHandler = function (e) { + if ("function" != typeof e) throw new TypeError("'errorHandlerCallback' is not a function."); + this._errorHandler = e; + }), + (e.prototype.convertSingleValue = function (e, t, n, i) { + if ((void 0 === n && (n = "object"), this.retrievePreserveNull(i) && null === e)) return null; + if (h(e)) { + if (d(e, t.selfType)) + return o(t.selfType) + ? e + : t.selfType === ArrayBuffer + ? this.convertAsArrayBuffer(e) + : t.selfType === DataView + ? this.convertAsDataView(e) + : (function (e) { + return e.selfType === Array; + })(t) + ? this.convertAsArray(e, t.elementTypes, n, i) + : (function (e) { + return e.selfType === Set; + })(t) + ? this.convertAsSet(e, t.elementTypes[0], n, i) + : (function (e) { + return e.selfType === Map; + })(t) + ? this.convertAsMap(e, t.keyType, t.elementTypes[0], n, i) + : a(t.selfType) + ? this.convertAsTypedArray(e) + : "object" == typeof e + ? this.convertAsObject(e, t, n, i) + : void 0; + var r = f(t.selfType), + s = f(e.constructor); + this._errorHandler(new TypeError("Could not serialize '" + n + "': expected '" + r + "', got '" + s + "'.")); + } + }), + (e.prototype.convertAsObject = function (e, t, n, i) { + var r, + o, + a = this; + if ((r = e.constructor !== t.selfType && e instanceof t.selfType ? m.getFromConstructor(e.constructor) : m.getFromConstructor(t.selfType))) { + r.beforeSerializationMethodName && + ("function" == typeof e[r.beforeSerializationMethodName] + ? e[r.beforeSerializationMethodName]() + : "function" == typeof e.constructor[r.beforeSerializationMethodName] + ? e.constructor[r.beforeSerializationMethodName]() + : this._errorHandler(new TypeError("beforeSerialization callback '" + f(r.classType) + "." + r.beforeSerializationMethodName + "' is not a method."))); + var s = r; + o = {}; + var c = y(this.options, s.options); + s.dataMembers.forEach(function (t) { + var n, + i = y(c, t.options); + if (t.serializer) n = t.serializer(e[t.key]); + else { + if (!t.ctor) throw new TypeError("Could not serialize " + t.name + ", there is no constructor nor serialization function to use."); + n = a.convertSingleValue(e[t.key], { selfType: t.ctor, elementTypes: t.elementType, keyType: t.keyType }, f(s.classType) + "." + t.key, i); + } + (h(n) || (a.retrievePreserveNull(i) && null === n)) && (o[t.name] = n); + }); + } else o = C({}, e); + return this._typeHintEmitter(o, e, t.selfType, r), o; + }), + (e.prototype.convertAsArray = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), 0 === t.length || !t[0])) throw new TypeError("Could not serialize " + n + " as Array: missing element type definition."); + e.forEach(function (e, o) { + if (!((r.retrievePreserveNull(i) && null === e) || d(e, t[0]))) { + var a = f(t[0]), + s = e && f(e.constructor); + throw new TypeError("Could not serialize " + n + "[" + o + "]: expected '" + a + "', got '" + s + "'."); + } + }); + var o = { selfType: t[0], elementTypes: t.length > 1 ? t.slice(1) : [] }; + return ( + n && (n += "[]"), + e.map(function (e) { + return r.convertSingleValue(e, o, n, i); + }) + ); + }), + (e.prototype.convertAsSet = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), !t)) throw new TypeError("Could not serialize " + n + " as Set: missing element type definition."); + var o = { selfType: t }; + n && (n += "[]"); + var a = []; + return ( + e.forEach(function (e) { + var t = r.convertSingleValue(e, o, n, i); + (h(e) && !h(t)) || a.push(t); + }), + a + ); + }), + (e.prototype.convertAsMap = function (e, t, n, i, r) { + var o = this; + if ((void 0 === i && (i = "object"), !n)) throw new TypeError("Could not serialize " + i + " as Map: missing value type definition."); + if (!t) throw new TypeError("Could not serialize " + i + " as Map: missing key type definition."); + var a = { selfType: n, elementTypes: [n] }, + s = { selfType: t }; + i && (i += "[]"); + var c = [], + l = this.retrievePreserveNull(r); + return ( + e.forEach(function (e, t) { + var n = { key: o.convertSingleValue(t, s, i, r), value: o.convertSingleValue(e, a, i, r) }, + u = h(n.key), + d = h(n.value) || (null === n.value && l); + u && d && c.push(n); + }), + c + ); + }), + (e.prototype.convertAsTypedArray = function (e) { + return Array.from(e); + }), + (e.prototype.convertAsArrayBuffer = function (e) { + return Array.from(new Uint16Array(e)) + .map(function (e) { + return String.fromCharCode(e); + }) + .join(""); + }), + (e.prototype.convertAsDataView = function (e) { + return this.convertAsArrayBuffer(e.buffer); + }), + (e.prototype.retrievePreserveNull = function (e) { + return v("preserveNull", y(this.options, e)); + }), + e + ); + })(); + function T(e, t) { + if (e.__type) return t.get(e.__type); + } + var S = (function () { + function e() { + (this._typeResolver = T), (this._errorHandler = l); + } + return ( + (e.prototype.setNameResolver = function (e) { + this._nameResolver = e; + }), + (e.prototype.setTypeResolver = function (e) { + if ("function" != typeof e) throw new TypeError("'typeResolverCallback' is not a function."); + this._typeResolver = e; + }), + (e.prototype.setErrorHandler = function (e) { + if ("function" != typeof e) throw new TypeError("'errorHandlerCallback' is not a function."); + this._errorHandler = e; + }), + (e.prototype.convertAsObject = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), "object" == typeof e && null !== e)) { + var o = t.selfConstructor, + a = m.getFromConstructor(o), + s = t.knownTypes; + a && (s = this._mergeKnownTypes(s, this._createKnownTypesMap(a.knownTypes))); + var l = this._typeResolver(e, s); + if ((l && c(l, o) && ((o = l), (a = m.getFromConstructor(l)) && (s = this._mergeKnownTypes(s, this._createKnownTypesMap(a.knownTypes)))), a && a.isExplicitlyMarked)) { + var u = a, + d = {}, + p = y(this.options, u.options); + u.dataMembers.forEach(function (t, n) { + var i, + o = e[n], + a = f(u.classType) + "." + n, + c = y(p, t.options); + if (t.deserializer) i = t.deserializer(o); + else { + if (!t.ctor) throw new TypeError("Cannot deserialize " + a + " there is no constructor nor deserialization function to use."); + i = r.convertSingleValue(o, { selfConstructor: t.ctor, elementConstructor: t.elementType, keyConstructor: t.keyType, knownTypes: s }, a, c); + } + h(i) || (r.retrievePreserveNull(c) && null === i) ? (d[t.key] = i) : t.isRequired && r._errorHandler(new TypeError("Missing required member '" + a + "'.")); + }); + var g = void 0; + if ("function" == typeof a.initializerCallback) + try { + if (!(g = a.initializerCallback(d, e))) throw new TypeError("Cannot deserialize " + n + ": 'initializer' function returned undefined/null, but '" + f(a.classType) + "' was expected."); + if (!(g instanceof a.classType)) + throw new TypeError( + "Cannot deserialize " + + n + + ":'initializer' returned '" + + f(g.constructor) + + "', but '" + + f(a.classType) + + "' was expected, and '" + + f(g.constructor) + + "' is not a subtype of '" + + f(a.classType) + + "'" + ); + } catch (e) { + return void this._errorHandler(e); + } + else g = this._instantiateType(o); + return ( + Object.assign(g, d), + a.onDeserializedMethodName && + ("function" == typeof g[a.onDeserializedMethodName] + ? g[a.onDeserializedMethodName]() + : "function" == typeof g.constructor[a.onDeserializedMethodName] + ? g.constructor[a.onDeserializedMethodName]() + : this._errorHandler(new TypeError("onDeserialized callback '" + f(a.classType) + "." + a.onDeserializedMethodName + "' is not a method."))), + g + ); + } + var b = {}; + return ( + Object.keys(e).forEach(function (n) { + b[n] = r.convertSingleValue(e[n], { selfConstructor: e[n].constructor, knownTypes: t.knownTypes, elementConstructor: t.elementConstructor, keyConstructor: t.keyConstructor }, n); + }), + b + ); + } + this._errorHandler(new TypeError("Cannot deserialize " + n + ": 'sourceObject' must be a defined object.")); + }), + (e.prototype.convertSingleValue = function (e, t, n, i) { + void 0 === n && (n = "object"); + var r = t.selfConstructor, + o = e ? f(e.constructor) : "undefined"; + if (this.retrievePreserveNull(i) && null === e) return null; + if (h(e)) { + if (~[Number, String, Boolean].indexOf(r)) { + if (e.constructor === r) return e; + throw new TypeError(this._makeTypeErrorMessage(f(r), e.constructor, n)); + } + if (r === Date) { + if ("string" == typeof e || ("number" == typeof e && e > 0)) return new Date(e); + this._throwTypeMismatchError("Date", "an ISO-8601 string", o, n); + } else { + if (r === Float32Array || r === Float64Array) return this._convertAsFloatArray(e, r, o, n); + if (r === Uint8Array || r === Uint8ClampedArray || r === Uint16Array || r === Uint32Array) return this._convertAsUintArray(e, r, o, n); + if (r === ArrayBuffer) { + if ("string" == typeof e) return this._stringToArrayBuffer(e); + this._throwTypeMismatchError("ArrayBuffer", "a string source", o, n); + } else if (r === DataView) { + if ("string" == typeof e) return this._stringToDataView(e); + this._throwTypeMismatchError("DataView", "a string source", o, n); + } else { + if (r === Array) { + if (Array.isArray(e)) return this.convertAsArray(e, t, n, i); + throw new TypeError(this._makeTypeErrorMessage(Array, e.constructor, n)); + } + if (r === Set) { + if (Array.isArray(e)) return this.convertAsSet(e, t, n, i); + this._throwTypeMismatchError("Set", "Array", o, n); + } else if (r === Map) { + if (Array.isArray(e)) return this.convertAsMap(e, t, n, i); + this._throwTypeMismatchError("Map", "a source array of key-value-pair objects", o, n); + } else if (e && "object" == typeof e) return this.convertAsObject(e, t, n, i); + } + } + } + }), + (e.prototype.convertAsArray = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), !Array.isArray(e))) return this._errorHandler(new TypeError(this._makeTypeErrorMessage(Array, e.constructor, n))), []; + if (!t.elementConstructor || !t.elementConstructor.length) return this._errorHandler(new TypeError("Could not deserialize " + n + " as Array: missing constructor reference of Array elements.")), []; + var o = { selfConstructor: t.elementConstructor[0], elementConstructor: t.elementConstructor.length > 1 ? t.elementConstructor.slice(1) : [], knownTypes: t.knownTypes }; + return e.map(function (e) { + try { + return r.convertSingleValue(e, o, n + "[]", i); + } catch (e) { + return void r._errorHandler(e); + } + }); + }), + (e.prototype.convertAsSet = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), !Array.isArray(e))) return this._errorHandler(new TypeError(this._makeTypeErrorMessage(Array, e.constructor, n))), new Set(); + if (!t.elementConstructor || !t.elementConstructor.length) + return this._errorHandler(new TypeError("Could not deserialize " + n + " as Set: missing constructor reference of Set elements.")), new Set(); + var o = { selfConstructor: t.elementConstructor[0], elementConstructor: t.elementConstructor.length > 1 ? t.elementConstructor.slice(1) : [], knownTypes: t.knownTypes }, + a = new Set(); + return ( + e.forEach(function (e, t) { + try { + a.add(r.convertSingleValue(e, o, n + "[" + t + "]", i)); + } catch (e) { + r._errorHandler(e); + } + }), + a + ); + }), + (e.prototype.convertAsMap = function (e, t, n, i) { + var r = this; + if ((void 0 === n && (n = "object"), Array.isArray(e) || this._errorHandler(new TypeError(this._makeTypeErrorMessage(Array, e.constructor, n))), !t.keyConstructor)) + return this._errorHandler(new TypeError("Could not deserialize " + n + " as Map: missing key constructor.")), new Map(); + if (!t.elementConstructor || !t.elementConstructor.length) return this._errorHandler(new TypeError("Could not deserialize " + n + " as Map: missing value constructor.")), new Map(); + var o = { selfConstructor: t.keyConstructor, knownTypes: t.knownTypes }, + a = { selfConstructor: t.elementConstructor[0], elementConstructor: t.elementConstructor.length > 1 ? t.elementConstructor.slice(1) : [], knownTypes: t.knownTypes }, + s = new Map(); + return ( + e.forEach(function (e) { + try { + var t = r.convertSingleValue(e.key, o, n, i); + h(t) && s.set(t, r.convertSingleValue(e.value, a, n + "[" + t + "]", i)); + } catch (e) { + r._errorHandler(e); + } + }), + s + ); + }), + (e.prototype._convertAsFloatArray = function (e, t, n, i) { + return Array.isArray(e) && + e.every(function (e) { + return !isNaN(e); + }) + ? new t(e) + : this._throwTypeMismatchError(t.name, "a numeric source array", n, i); + }), + (e.prototype._convertAsUintArray = function (e, t, n, i) { + return Array.isArray(e) && + e.every(function (e) { + return !isNaN(e); + }) + ? new t( + e.map(function (e) { + return ~~e; + }) + ) + : this._throwTypeMismatchError(t.name, "a numeric source array", n, i); + }), + (e.prototype._throwTypeMismatchError = function (e, t, n, i) { + throw new TypeError("Could not deserialize " + i + " as " + e + ": expected " + t + ", got " + n + "."); + }), + (e.prototype._makeTypeErrorMessage = function (e, t, n) { + return "Could not deserialize " + n + ": expected '" + ("function" == typeof e ? f(e) : e) + "', got '" + ("function" == typeof t ? f(t) : t) + "'."; + }), + (e.prototype._instantiateType = function (e) { + return new e(); + }), + (e.prototype._mergeKnownTypes = function () { + for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; + var i = new Map(); + return ( + t.forEach(function (t) { + t.forEach(function (t, n) { + e._nameResolver ? i.set(e._nameResolver(t), t) : i.set(n, t); + }); + }), + i + ); + }), + (e.prototype._createKnownTypesMap = function (e) { + var t = this, + n = new Map(); + return ( + e.forEach(function (e) { + if (t._nameResolver) n.set(t._nameResolver(e), e); + else { + var i = m.getFromConstructor(e), + r = i && i.isExplicitlyMarked && i.name ? i.name : e.name; + n.set(r, e); + } + }), + n + ); + }), + (e.prototype._stringToArrayBuffer = function (e) { + for (var t = new ArrayBuffer(2 * e.length), n = new Uint16Array(t), i = 0, r = e.length; i < r; i++) n[i] = e.charCodeAt(i); + return t; + }), + (e.prototype._stringToDataView = function (e) { + return new DataView(this._stringToArrayBuffer(e)); + }), + (e.prototype.retrievePreserveNull = function (e) { + return v("preserveNull", y(this.options, e)); + }), + e + ); + })(), + O = function () { + return (O = + Object.assign || + function (e) { + for (var t, n = 1, i = arguments.length; n < i; n++) for (var r in (t = arguments[n])) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]); + return e; + }).apply(this, arguments); + }, + E = (function () { + function e(t, n) { + (this.serializer = new x()), (this.deserializer = new S()), (this.globalKnownTypes = []), (this.indent = 0); + var i = m.getFromConstructor(t); + if (!i || (!i.isExplicitlyMarked && !i.isHandledWithoutAnnotation)) throw new TypeError("The TypedJSON root data type must have the @jsonObject decorator used."); + (this.nameResolver = function (e) { + return f(e); + }), + (this.rootConstructor = t), + (this.errorHandler = function (e) { + return l(e); + }), + n ? this.config(n) : e._globalConfig && this.config({}); + } + return ( + (e.parse = function (t, n, i) { + return new e(n, i).parse(t); + }), + (e.parseAsArray = function (t, n, i, r) { + return new e(n, i).parseAsArray(t, r); + }), + (e.parseAsSet = function (t, n, i) { + return new e(n, i).parseAsSet(t); + }), + (e.parseAsMap = function (t, n, i, r) { + return new e(i, r).parseAsMap(t, n); + }), + (e.toPlainJson = function (t, n, i) { + return new e(n, i).toPlainJson(t); + }), + (e.toPlainArray = function (t, n, i, r) { + return new e(n, r).toPlainArray(t, i); + }), + (e.toPlainSet = function (t, n, i) { + return new e(n, i).toPlainSet(t); + }), + (e.toPlainMap = function (t, n, i, r) { + return new e(i, r).toPlainMap(t, n); + }), + (e.stringify = function (t, n, i) { + return new e(n, i).stringify(t); + }), + (e.stringifyAsArray = function (t, n, i, r) { + return new e(n, r).stringifyAsArray(t, i); + }), + (e.stringifyAsSet = function (t, n, i) { + return new e(n, i).stringifyAsSet(t); + }), + (e.stringifyAsMap = function (t, n, i, r) { + return new e(i, r).stringifyAsMap(t, n); + }), + (e.setGlobalConfig = function (e) { + this._globalConfig ? Object.assign(this._globalConfig, e) : (this._globalConfig = e); + }), + (e.prototype.config = function (t) { + e._globalConfig && (t = O({}, e._globalConfig, t)).knownTypes && e._globalConfig.knownTypes && (t.knownTypes = Array.from(new Set(t.knownTypes.concat(e._globalConfig.knownTypes)))); + var n = _(t); + (this.serializer.options = n), + (this.deserializer.options = n), + t.errorHandler && ((this.errorHandler = t.errorHandler), this.deserializer.setErrorHandler(t.errorHandler), this.serializer.setErrorHandler(t.errorHandler)), + t.replacer && (this.replacer = t.replacer), + t.typeResolver && this.deserializer.setTypeResolver(t.typeResolver), + t.typeHintEmitter && this.serializer.setTypeHintEmitter(t.typeHintEmitter), + t.indent && (this.indent = t.indent), + t.nameResolver && ((this.nameResolver = t.nameResolver), this.deserializer.setNameResolver(t.nameResolver)), + t.knownTypes && + (t.knownTypes.forEach(function (e, t) { + null == e && u("TypedJSON.config: 'knownTypes' contains an undefined/null value (element " + t + ")."); + }), + (this.globalKnownTypes = t.knownTypes)); + }), + (e.prototype.parse = function (e) { + var t, + n = this, + i = s(e, this.rootConstructor), + r = m.getFromConstructor(this.rootConstructor), + o = new Map(); + this.globalKnownTypes + .filter(function (e) { + return e; + }) + .forEach(function (e) { + o.set(n.nameResolver(e), e); + }), + r && + r.knownTypes.forEach(function (e) { + o.set(n.nameResolver(e), e); + }); + try { + t = this.deserializer.convertSingleValue(i, { selfConstructor: this.rootConstructor, knownTypes: o }); + } catch (e) { + this.errorHandler(e); + } + return t; + }), + (e.prototype.parseAsArray = function (e, t) { + void 0 === t && (t = 1); + var n = s(e, Array); + return n instanceof Array + ? this.deserializer.convertAsArray(n, { + selfConstructor: Array, + elementConstructor: new Array(t - 1).fill(Array).concat(this.rootConstructor), + knownTypes: this._mapKnownTypes(this.globalKnownTypes), + }) + : (this.errorHandler(new TypeError("Expected 'json' to define an Array, but got " + typeof n + ".")), []); + }), + (e.prototype.parseAsSet = function (e) { + var t = s(e, Set); + return t instanceof Array + ? this.deserializer.convertAsSet(t, { selfConstructor: Array, elementConstructor: [this.rootConstructor], knownTypes: this._mapKnownTypes(this.globalKnownTypes) }) + : (this.errorHandler(new TypeError("Expected 'json' to define a Set (using an Array), but got " + typeof t + ".")), new Set()); + }), + (e.prototype.parseAsMap = function (e, t) { + var n = s(e, Map); + return n instanceof Array + ? this.deserializer.convertAsMap(n, { selfConstructor: Array, elementConstructor: [this.rootConstructor], knownTypes: this._mapKnownTypes(this.globalKnownTypes), keyConstructor: t }) + : (this.errorHandler(new TypeError("Expected 'json' to define a Set (using an Array), but got " + typeof n + ".")), new Map()); + }), + (e.prototype.toPlainJson = function (e) { + try { + return this.serializer.convertSingleValue(e, { selfType: this.rootConstructor }); + } catch (e) { + this.errorHandler(e); + } + }), + (e.prototype.toPlainArray = function (e, t) { + void 0 === t && (t = 1); + try { + var n = new Array(t - 1).fill(Array).concat(this.rootConstructor); + return this.serializer.convertAsArray(e, n); + } catch (e) { + this.errorHandler(e); + } + }), + (e.prototype.toPlainSet = function (e) { + try { + return this.serializer.convertAsSet(e, this.rootConstructor); + } catch (e) { + this.errorHandler(e); + } + }), + (e.prototype.toPlainMap = function (e, t) { + try { + return this.serializer.convertAsMap(e, t, this.rootConstructor); + } catch (e) { + this.errorHandler(e); + } + }), + (e.prototype.stringify = function (e) { + var t = this.toPlainJson(e); + return void 0 === t ? "" : JSON.stringify(t, this.replacer, this.indent); + }), + (e.prototype.stringifyAsArray = function (e, t) { + return JSON.stringify(this.toPlainArray(e, t), this.replacer, this.indent); + }), + (e.prototype.stringifyAsSet = function (e) { + return JSON.stringify(this.toPlainSet(e), this.replacer, this.indent); + }), + (e.prototype.stringifyAsMap = function (e, t) { + return JSON.stringify(this.toPlainMap(e, t), this.replacer, this.indent); + }), + (e.prototype._mapKnownTypes = function (e) { + var t = this, + n = new Map(); + return ( + e + .filter(function (e) { + return e; + }) + .forEach(function (e) { + return n.set(t.nameResolver(e), e); + }), + n + ); + }), + e + ); + })(); + function M(e) { + var t; + function n(e) { + var n; + if (e.prototype.hasOwnProperty(i)) (n = e.prototype[i]).classType = e; + else { + n = new m(e); + var r = e.prototype[i]; + r && + (r.dataMembers.forEach(function (e, t) { + return n.dataMembers.set(t, e); + }), + r.knownTypes.forEach(function (e) { + return n.knownTypes.add(e); + })), + Object.defineProperty(e.prototype, i, { enumerable: !1, configurable: !1, writable: !1, value: n }); + } + (n.isExplicitlyMarked = !0), (n.onDeserializedMethodName = t.onDeserialized), (n.beforeSerializationMethodName = t.beforeSerialization), (n.initializerCallback = t.initializer), t.name && (n.name = t.name); + var o = _(t); + o && (n.options = o), + "string" == typeof t.knownTypes + ? (n.knownTypeMethodName = t.knownTypes) + : t.knownTypes instanceof Array && + t.knownTypes + .filter(function (e) { + return !!e; + }) + .forEach(function (e) { + return n.knownTypes.add(e); + }); + } + if (((t = "function" == typeof e ? {} : e || {}), "function" != typeof e)) return n; + n(e); + } + function A(e, t) { + if (!(e instanceof Object) || ("string" != typeof t && "symbol" != typeof t)) + return function (t, n) { + var i, + r = e || {}, + o = "@jsonMember on " + f(t.constructor) + "." + String(n); + if (r.hasOwnProperty("constructor")) { + if (!h(r.constructor)) return void l(o + ": cannot resolve specified property constructor at runtime."); + p && !c(r.constructor, Reflect.getMetadata("design:type", t, n)) && u(o + ": detected property type does not match 'constructor' option."), (i = r.constructor); + } else if (p) { + if (!(i = Reflect.getMetadata("design:type", t, n))) return void l(o + ": cannot resolve detected property constructor at runtime."); + } else if (!r.deserializer) return void l(o + ": ReflectDecorators is required if no 'constructor' option is specified."); + I(o, i) || + g(t, n, { + ctor: i, + emitDefaultValue: r.emitDefaultValue, + isRequired: r.isRequired, + options: _(r), + key: n.toString(), + name: r.name || n.toString(), + deserializer: r.deserializer, + serializer: r.serializer, + }); + }; + var n = e, + i = "@jsonMember on " + f(n.constructor) + "." + String(t); + if (p) { + var o = Reflect.getMetadata("design:type", n, t); + o ? I(i, o) || g(n, t, { ctor: o, key: t.toString(), name: t.toString() }) : l(i + ": could not resolve detected property constructor at runtime. " + r); + } else l(i + ": ReflectDecorators is required if no 'constructor' option is specified."); + } + function I(e, t) { + return t === Array + ? (l(e + ": property is an Array. Use the jsonArrayMember decorator to serialize this property."), !0) + : t === Set + ? (l(e + ": property is a Set. Use the jsonSetMember decorator to serialize this property."), !0) + : t === Map && (l(e + ": property is a Map. Use the jsonMapMember decorator to serialize this property."), !0); + } + function D(e, t) { + return ( + void 0 === t && (t = {}), + function (n, i) { + var o = "@jsonArrayMember on " + f(n.constructor) + "." + String(i); + if ("function" == typeof e) { + var a = void 0 === t.dimensions ? 1 : t.dimensions; + !isNaN(a) && a < 1 + ? l(o + ": 'dimensions' option must be at least 1.") + : p && Reflect.getMetadata("design:type", n, i) !== Array + ? l(o + ": property is not an Array. " + r) + : g(n, i, { + ctor: Array, + elementType: R(e, a), + emitDefaultValue: t.emitDefaultValue, + isRequired: t.isRequired, + options: _(t), + key: i.toString(), + name: t.name || i.toString(), + deserializer: t.deserializer, + serializer: t.serializer, + }); + } else l(o + ": could not resolve constructor of array elements at runtime."); + } + ); + } + function R(e, t) { + var n = new Array(t).fill(Array, 0, -1); + return (n[t - 1] = e), n; + } + function w(e, t) { + return ( + void 0 === t && (t = {}), + function (n, i) { + var o = "@jsonSetMember on " + f(n.constructor) + "." + String(i); + "function" == typeof e + ? p && Reflect.getMetadata("design:type", n, i) !== Set + ? l(o + ": property is not a Set. " + r) + : g(n, i, { + ctor: Set, + elementType: [e], + emitDefaultValue: t.emitDefaultValue, + isRequired: t.isRequired, + options: _(t), + key: i.toString(), + name: t.name || i.toString(), + deserializer: t.deserializer, + serializer: t.serializer, + }) + : l(o + ": could not resolve constructor of set elements at runtime."); + } + ); + } + function L(e, t, n) { + return ( + void 0 === n && (n = {}), + function (i, o) { + var a = "@jsonMapMember on " + f(i.constructor) + "." + String(o); + "function" == typeof e + ? "function" == typeof t + ? p && Reflect.getMetadata("design:type", i, o) !== Map + ? l(a + ": property is not a Map. " + r) + : g(i, o, { + ctor: Map, + elementType: [t], + keyType: e, + emitDefaultValue: n.emitDefaultValue, + isRequired: n.isRequired, + options: _(n), + key: o.toString(), + name: n.name || o.toString(), + deserializer: n.deserializer, + serializer: n.serializer, + }) + : l(a + ": could not resolve constructor of map values at runtime.") + : l(a + ": could not resolve constructor of map keys at runtime."); + } + ); + } + function F(e) { + if ("function" != typeof e) + return function (t) { + N(t, e); + }; + N(e, {}); + } + function N(e, t) { + if (!t.overwrite && e.prototype.toJSON) throw new Error(e.name + " already has toJSON defined!"); + e.prototype.toJSON = function () { + return E.toPlainJson(this, Object.getPrototypeOf(this).constructor); + }; + } + n.d(t, "TypedJSON", function () { + return E; + }), + n.d(t, "jsonObject", function () { + return M; + }), + n.d(t, "jsonMember", function () { + return A; + }), + n.d(t, "jsonArrayMember", function () { + return D; + }), + n.d(t, "jsonSetMember", function () { + return w; + }), + n.d(t, "jsonMapMember", function () { + return L; + }), + n.d(t, "toJson", function () { + return F; + }); + }, + ]); + }), + (e.exports = i()); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.BonusItemTypeProbability = t.BonusItemProtoData = void 0); + class i {} + (t.BonusItemProtoData = i), + (i.DefaultCoinsPerRun = 15), + (i.DefaultCoinPlacementHeight = 0.5), + (i.DefaultCoinMaxHorizOffset = 0.85), + (i.MinCoinsToRepeatPlacement = 10), + (i.MaxCoinHistorySize = 15), + (i.MaxCoinsPerRun = 15), + (i.AllowCoins = !0), + (i.MinDistanceBetweenCoinRuns = 80), + (i.MinDistanceBetweenBonusItems = 500), + (i.ArcMaxHeight = 2.5), + (i.MinDistanceAfterTurn = 20), + (i.MinDistanceAfterZipline = 20), + (i.AllowBonusItems = !0), + (i.ProbabilityBonusItem = 1), + (i.BonusItemPlacementHeight = 3); + t.BonusItemTypeProbability = class { + constructor(e, t, n) { + (this.ItemType = e), (this.ItemProbability = t), (this.MaxAllowed = n); + } + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.Eval = function (t, n) { + return ( + "true" === + (t = t.match(/\([^\(\)]*\)/g) + ? t.replace(/\([^\(\)]*\)/g, function (t) { + return (t = t.slice(1, t.length - 1)), e._HandleParenthesisContent(t, n); + }) + : e._HandleParenthesisContent(t, n)) || + ("false" !== t && e.Eval(t, n)) + ); + }), + (e._HandleParenthesisContent = function (t, n) { + var i; + n = + n || + function (e) { + return "true" === e; + }; + var r = t.split("||"); + for (var o in r) + if (r.hasOwnProperty(o)) { + var a = e._SimplifyNegation(r[o].trim()), + s = a.split("&&"); + if (s.length > 1) + for (var c = 0; c < s.length; ++c) { + var l = e._SimplifyNegation(s[c].trim()); + if (!(i = "true" !== l && "false" !== l ? ("!" === l[0] ? !n(l.substring(1)) : n(l)) : "true" === l)) { + a = "false"; + break; + } + } + if (i || "true" === a) { + i = !0; + break; + } + i = "true" !== a && "false" !== a ? ("!" === a[0] ? !n(a.substring(1)) : n(a)) : "true" === a; + } + return i ? "true" : "false"; + }), + (e._SimplifyNegation = function (e) { + return ( + "!true" === + (e = (e = e.replace(/^[\s!]+/, function (e) { + return (e = e.replace(/[\s]/g, function () { + return ""; + })).length % 2 + ? "!" + : ""; + })).trim()) + ? (e = "false") + : "!false" === e && (e = "true"), + e + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return d; + }); + var i = n(1), + r = n(5), + o = n(27), + a = n(109), + s = Object.freeze(new i.b(0, 0, 0, 0)), + c = Object.freeze(i.e.Zero()), + l = Object.freeze(i.d.Zero()), + u = Object.freeze(a.a.Zero()), + h = Object.freeze(r.a.Black()), + d = (function () { + function e(e, t, n, r) { + var a = this; + if ( + ((this._events = new Array()), + (this._currentFrame = 0), + (this._originalValue = new Array()), + (this._originalBlendValue = null), + (this._offsetsCache = {}), + (this._highLimitsCache = {}), + (this._stopped = !1), + (this._blendingFactor = 0), + (this._currentValue = null), + (this._currentActiveTarget = null), + (this._directTarget = null), + (this._targetPath = ""), + (this._weight = 1), + (this._ratioOffset = 0), + (this._previousDelay = 0), + (this._previousRatio = 0), + (this._targetIsArray = !1), + (this._animation = t), + (this._target = e), + (this._scene = n), + (this._host = r), + (this._activeTargets = []), + t._runtimeAnimations.push(this), + (this._animationState = { key: 0, repeatCount: 0, loopMode: this._getCorrectLoopMode() }), + this._animation.dataType === o.a.ANIMATIONTYPE_MATRIX && (this._animationState.workValue = i.a.Zero()), + (this._keys = this._animation.getKeys()), + (this._minFrame = this._keys[0].frame), + (this._maxFrame = this._keys[this._keys.length - 1].frame), + (this._minValue = this._keys[0].value), + (this._maxValue = this._keys[this._keys.length - 1].value), + 0 !== this._minFrame) + ) { + var s = { frame: 0, value: this._minValue }; + this._keys.splice(0, 0, s); + } + if (this._target instanceof Array) { + for (var c = 0, l = 0, u = this._target; l < u.length; l++) { + var h = u[l]; + this._preparePath(h, c), this._getOriginalValues(c), c++; + } + this._targetIsArray = !0; + } else this._preparePath(this._target), this._getOriginalValues(), (this._targetIsArray = !1), (this._directTarget = this._activeTargets[0]); + var d = t.getEvents(); + d && + d.length > 0 && + d.forEach(function (e) { + a._events.push(e._clone()); + }), + (this._enableBlending = e && e.animationPropertiesOverride ? e.animationPropertiesOverride.enableBlending : this._animation.enableBlending); + } + return ( + Object.defineProperty(e.prototype, "currentFrame", { + get: function () { + return this._currentFrame; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "weight", { + get: function () { + return this._weight; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "currentValue", { + get: function () { + return this._currentValue; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "targetPath", { + get: function () { + return this._targetPath; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "target", { + get: function () { + return this._currentActiveTarget; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._preparePath = function (e, t) { + void 0 === t && (t = 0); + var n = this._animation.targetPropertyPath; + if (n.length > 1) { + for (var i = e[n[0]], r = 1; r < n.length - 1; r++) i = i[n[r]]; + (this._targetPath = n[n.length - 1]), (this._activeTargets[t] = i); + } else (this._targetPath = n[0]), (this._activeTargets[t] = e); + }), + Object.defineProperty(e.prototype, "animation", { + get: function () { + return this._animation; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.reset = function (e) { + if ((void 0 === e && (e = !1), e)) + if (this._target instanceof Array) + for (var t = 0, n = 0, i = this._target; n < i.length; n++) { + var r = i[n]; + void 0 !== this._originalValue[t] && this._setValue(r, this._activeTargets[t], this._originalValue[t], -1, t), t++; + } + else void 0 !== this._originalValue[0] && this._setValue(this._target, this._directTarget, this._originalValue[0], -1, 0); + (this._offsetsCache = {}), (this._highLimitsCache = {}), (this._currentFrame = 0), (this._blendingFactor = 0); + for (t = 0; t < this._events.length; t++) this._events[t].isDone = !1; + }), + (e.prototype.isStopped = function () { + return this._stopped; + }), + (e.prototype.dispose = function () { + var e = this._animation.runtimeAnimations.indexOf(this); + e > -1 && this._animation.runtimeAnimations.splice(e, 1); + }), + (e.prototype.setValue = function (e, t) { + if (this._targetIsArray) + for (var n = 0; n < this._target.length; n++) { + var i = this._target[n]; + this._setValue(i, this._activeTargets[n], e, t, n); + } + else this._setValue(this._target, this._directTarget, e, t, 0); + }), + (e.prototype._getOriginalValues = function (e) { + var t; + void 0 === e && (e = 0); + var n = this._activeTargets[e]; + (t = n.getRestPose && "_matrix" === this._targetPath ? n.getRestPose() : n[this._targetPath]) && t.clone ? (this._originalValue[e] = t.clone()) : (this._originalValue[e] = t); + }), + (e.prototype._setValue = function (e, t, n, r, a) { + if (((this._currentActiveTarget = t), (this._weight = r), this._enableBlending && this._blendingFactor <= 1)) { + if (!this._originalBlendValue) { + var s = t[this._targetPath]; + s.clone ? (this._originalBlendValue = s.clone()) : (this._originalBlendValue = s); + } + this._originalBlendValue.m + ? o.a.AllowMatrixDecomposeForInterpolation + ? this._currentValue + ? i.a.DecomposeLerpToRef(this._originalBlendValue, n, this._blendingFactor, this._currentValue) + : (this._currentValue = i.a.DecomposeLerp(this._originalBlendValue, n, this._blendingFactor)) + : this._currentValue + ? i.a.LerpToRef(this._originalBlendValue, n, this._blendingFactor, this._currentValue) + : (this._currentValue = i.a.Lerp(this._originalBlendValue, n, this._blendingFactor)) + : (this._currentValue = o.a._UniversalLerp(this._originalBlendValue, n, this._blendingFactor)); + var c = e && e.animationPropertiesOverride ? e.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed; + this._blendingFactor += c; + } else this._currentValue = n; + -1 !== r ? this._scene._registerTargetForLateAnimationBinding(this, this._originalValue[a]) : (t[this._targetPath] = this._currentValue), e.markAsDirty && e.markAsDirty(this._animation.targetProperty); + }), + (e.prototype._getCorrectLoopMode = function () { + return this._target && this._target.animationPropertiesOverride ? this._target.animationPropertiesOverride.loopMode : this._animation.loopMode; + }), + (e.prototype.goToFrame = function (e) { + var t = this._animation.getKeys(); + e < t[0].frame ? (e = t[0].frame) : e > t[t.length - 1].frame && (e = t[t.length - 1].frame); + var n = this._events; + if (n.length) for (var i = 0; i < n.length; i++) n[i].onlyOnce || (n[i].isDone = n[i].frame < e); + this._currentFrame = e; + var r = this._animation._interpolate(e, this._animationState); + this.setValue(r, -1); + }), + (e.prototype._prepareForSpeedRatioChange = function (e) { + var t = (this._previousDelay * (this._animation.framePerSecond * e)) / 1e3; + this._ratioOffset = this._previousRatio - t; + }), + (e.prototype.animate = function (e, t, n, i, r, a) { + void 0 === a && (a = -1); + var d = this._animation, + p = d.targetPropertyPath; + if (!p || p.length < 1) return (this._stopped = !0), !1; + var f = !0; + (t < this._minFrame || t > this._maxFrame) && (t = this._minFrame), (n < this._minFrame || n > this._maxFrame) && (n = this._maxFrame); + var m, + g, + b = n - t, + _ = (e * (d.framePerSecond * r)) / 1e3 + this._ratioOffset, + v = 0; + if (((this._previousDelay = e), (this._previousRatio = _), !i && n >= t && _ >= b)) (f = !1), (v = d._getKeyValue(this._maxValue)); + else if (!i && t >= n && _ <= b) (f = !1), (v = d._getKeyValue(this._minValue)); + else if (this._animationState.loopMode !== o.a.ANIMATIONLOOPMODE_CYCLE) { + var y = n.toString() + t.toString(); + if (!this._offsetsCache[y]) { + (this._animationState.repeatCount = 0), (this._animationState.loopMode = o.a.ANIMATIONLOOPMODE_CYCLE); + var C = d._interpolate(t, this._animationState), + P = d._interpolate(n, this._animationState); + switch (((this._animationState.loopMode = this._getCorrectLoopMode()), d.dataType)) { + case o.a.ANIMATIONTYPE_FLOAT: + this._offsetsCache[y] = P - C; + break; + case o.a.ANIMATIONTYPE_QUATERNION: + this._offsetsCache[y] = P.subtract(C); + break; + case o.a.ANIMATIONTYPE_VECTOR3: + this._offsetsCache[y] = P.subtract(C); + case o.a.ANIMATIONTYPE_VECTOR2: + this._offsetsCache[y] = P.subtract(C); + case o.a.ANIMATIONTYPE_SIZE: + this._offsetsCache[y] = P.subtract(C); + case o.a.ANIMATIONTYPE_COLOR3: + this._offsetsCache[y] = P.subtract(C); + } + this._highLimitsCache[y] = P; + } + (v = this._highLimitsCache[y]), (m = this._offsetsCache[y]); + } + if (void 0 === m) + switch (d.dataType) { + case o.a.ANIMATIONTYPE_FLOAT: + m = 0; + break; + case o.a.ANIMATIONTYPE_QUATERNION: + m = s; + break; + case o.a.ANIMATIONTYPE_VECTOR3: + m = c; + break; + case o.a.ANIMATIONTYPE_VECTOR2: + m = l; + break; + case o.a.ANIMATIONTYPE_SIZE: + m = u; + break; + case o.a.ANIMATIONTYPE_COLOR3: + m = h; + } + if (this._host && this._host.syncRoot) { + var x = this._host.syncRoot; + g = t + (n - t) * ((x.masterFrame - x.fromFrame) / (x.toFrame - x.fromFrame)); + } else g = f && 0 !== b ? t + (_ % b) : n; + var T = this._events; + if (((b > 0 && this.currentFrame > g) || (b < 0 && this.currentFrame < g)) && (this._onLoop(), T.length)) for (var S = 0; S < T.length; S++) T[S].onlyOnce || (T[S].isDone = !1); + (this._currentFrame = g), (this._animationState.repeatCount = 0 === b ? 0 : (_ / b) >> 0), (this._animationState.highLimitValue = v), (this._animationState.offsetValue = m); + var O = d._interpolate(g, this._animationState); + if ((this.setValue(O, a), T.length)) + for (S = 0; S < T.length; S++) + if ((b > 0 && g >= T[S].frame && T[S].frame >= t) || (b < 0 && g <= T[S].frame && T[S].frame <= t)) { + var E = T[S]; + E.isDone || (E.onlyOnce && (T.splice(S, 1), S--), (E.isDone = !0), E.action(g)); + } + return f || (this._stopped = !0), f; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.ExponentialBackoff = function (e, t) { + return ( + void 0 === e && (e = 3), + void 0 === t && (t = 500), + function (n, i, r) { + return 0 !== i.status || r >= e || -1 !== n.indexOf("file:") ? -1 : Math.pow(2, r) * t; + } + ); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._isDepthTestDirty = !1), (this._isDepthMaskDirty = !1), (this._isDepthFuncDirty = !1), (this._isCullFaceDirty = !1), (this._isCullDirty = !1), (this._isZOffsetDirty = !1), (this._isFrontFaceDirty = !1), this.reset(); + } + return ( + Object.defineProperty(e.prototype, "isDirty", { + get: function () { + return this._isDepthFuncDirty || this._isDepthTestDirty || this._isDepthMaskDirty || this._isCullFaceDirty || this._isCullDirty || this._isZOffsetDirty || this._isFrontFaceDirty; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "zOffset", { + get: function () { + return this._zOffset; + }, + set: function (e) { + this._zOffset !== e && ((this._zOffset = e), (this._isZOffsetDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "cullFace", { + get: function () { + return this._cullFace; + }, + set: function (e) { + this._cullFace !== e && ((this._cullFace = e), (this._isCullFaceDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "cull", { + get: function () { + return this._cull; + }, + set: function (e) { + this._cull !== e && ((this._cull = e), (this._isCullDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "depthFunc", { + get: function () { + return this._depthFunc; + }, + set: function (e) { + this._depthFunc !== e && ((this._depthFunc = e), (this._isDepthFuncDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "depthMask", { + get: function () { + return this._depthMask; + }, + set: function (e) { + this._depthMask !== e && ((this._depthMask = e), (this._isDepthMaskDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "depthTest", { + get: function () { + return this._depthTest; + }, + set: function (e) { + this._depthTest !== e && ((this._depthTest = e), (this._isDepthTestDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "frontFace", { + get: function () { + return this._frontFace; + }, + set: function (e) { + this._frontFace !== e && ((this._frontFace = e), (this._isFrontFaceDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.reset = function () { + (this._depthMask = !0), + (this._depthTest = !0), + (this._depthFunc = null), + (this._cullFace = null), + (this._cull = null), + (this._zOffset = 0), + (this._frontFace = null), + (this._isDepthTestDirty = !0), + (this._isDepthMaskDirty = !0), + (this._isDepthFuncDirty = !1), + (this._isCullFaceDirty = !1), + (this._isCullDirty = !1), + (this._isZOffsetDirty = !1), + (this._isFrontFaceDirty = !1); + }), + (e.prototype.apply = function (e) { + this.isDirty && + (this._isCullDirty && (this.cull ? e.enable(e.CULL_FACE) : e.disable(e.CULL_FACE), (this._isCullDirty = !1)), + this._isCullFaceDirty && (e.cullFace(this.cullFace), (this._isCullFaceDirty = !1)), + this._isDepthMaskDirty && (e.depthMask(this.depthMask), (this._isDepthMaskDirty = !1)), + this._isDepthTestDirty && (this.depthTest ? e.enable(e.DEPTH_TEST) : e.disable(e.DEPTH_TEST), (this._isDepthTestDirty = !1)), + this._isDepthFuncDirty && (e.depthFunc(this.depthFunc), (this._isDepthFuncDirty = !1)), + this._isZOffsetDirty && (this.zOffset ? (e.enable(e.POLYGON_OFFSET_FILL), e.polygonOffset(this.zOffset, 0)) : e.disable(e.POLYGON_OFFSET_FILL), (this._isZOffsetDirty = !1)), + this._isFrontFaceDirty && (e.frontFace(this.frontFace), (this._isFrontFaceDirty = !1))); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._isStencilTestDirty = !1), (this._isStencilMaskDirty = !1), (this._isStencilFuncDirty = !1), (this._isStencilOpDirty = !1), this.reset(); + } + return ( + Object.defineProperty(e.prototype, "isDirty", { + get: function () { + return this._isStencilTestDirty || this._isStencilMaskDirty || this._isStencilFuncDirty || this._isStencilOpDirty; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilFunc", { + get: function () { + return this._stencilFunc; + }, + set: function (e) { + this._stencilFunc !== e && ((this._stencilFunc = e), (this._isStencilFuncDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilFuncRef", { + get: function () { + return this._stencilFuncRef; + }, + set: function (e) { + this._stencilFuncRef !== e && ((this._stencilFuncRef = e), (this._isStencilFuncDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilFuncMask", { + get: function () { + return this._stencilFuncMask; + }, + set: function (e) { + this._stencilFuncMask !== e && ((this._stencilFuncMask = e), (this._isStencilFuncDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilOpStencilFail", { + get: function () { + return this._stencilOpStencilFail; + }, + set: function (e) { + this._stencilOpStencilFail !== e && ((this._stencilOpStencilFail = e), (this._isStencilOpDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilOpDepthFail", { + get: function () { + return this._stencilOpDepthFail; + }, + set: function (e) { + this._stencilOpDepthFail !== e && ((this._stencilOpDepthFail = e), (this._isStencilOpDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilOpStencilDepthPass", { + get: function () { + return this._stencilOpStencilDepthPass; + }, + set: function (e) { + this._stencilOpStencilDepthPass !== e && ((this._stencilOpStencilDepthPass = e), (this._isStencilOpDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilMask", { + get: function () { + return this._stencilMask; + }, + set: function (e) { + this._stencilMask !== e && ((this._stencilMask = e), (this._isStencilMaskDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "stencilTest", { + get: function () { + return this._stencilTest; + }, + set: function (e) { + this._stencilTest !== e && ((this._stencilTest = e), (this._isStencilTestDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.reset = function () { + (this._stencilTest = !1), + (this._stencilMask = 255), + (this._stencilFunc = e.ALWAYS), + (this._stencilFuncRef = 1), + (this._stencilFuncMask = 255), + (this._stencilOpStencilFail = e.KEEP), + (this._stencilOpDepthFail = e.KEEP), + (this._stencilOpStencilDepthPass = e.REPLACE), + (this._isStencilTestDirty = !0), + (this._isStencilMaskDirty = !0), + (this._isStencilFuncDirty = !0), + (this._isStencilOpDirty = !0); + }), + (e.prototype.apply = function (e) { + this.isDirty && + (this._isStencilTestDirty && (this.stencilTest ? e.enable(e.STENCIL_TEST) : e.disable(e.STENCIL_TEST), (this._isStencilTestDirty = !1)), + this._isStencilMaskDirty && (e.stencilMask(this.stencilMask), (this._isStencilMaskDirty = !1)), + this._isStencilFuncDirty && (e.stencilFunc(this.stencilFunc, this.stencilFuncRef, this.stencilFuncMask), (this._isStencilFuncDirty = !1)), + this._isStencilOpDirty && (e.stencilOp(this.stencilOpStencilFail, this.stencilOpDepthFail, this.stencilOpStencilDepthPass), (this._isStencilOpDirty = !1))); + }), + (e.ALWAYS = 519), + (e.KEEP = 7680), + (e.REPLACE = 7681), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this._isAlphaBlendDirty = !1), + (this._isBlendFunctionParametersDirty = !1), + (this._isBlendEquationParametersDirty = !1), + (this._isBlendConstantsDirty = !1), + (this._alphaBlend = !1), + (this._blendFunctionParameters = new Array(4)), + (this._blendEquationParameters = new Array(2)), + (this._blendConstants = new Array(4)), + this.reset(); + } + return ( + Object.defineProperty(e.prototype, "isDirty", { + get: function () { + return this._isAlphaBlendDirty || this._isBlendFunctionParametersDirty; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "alphaBlend", { + get: function () { + return this._alphaBlend; + }, + set: function (e) { + this._alphaBlend !== e && ((this._alphaBlend = e), (this._isAlphaBlendDirty = !0)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.setAlphaBlendConstants = function (e, t, n, i) { + (this._blendConstants[0] === e && this._blendConstants[1] === t && this._blendConstants[2] === n && this._blendConstants[3] === i) || + ((this._blendConstants[0] = e), (this._blendConstants[1] = t), (this._blendConstants[2] = n), (this._blendConstants[3] = i), (this._isBlendConstantsDirty = !0)); + }), + (e.prototype.setAlphaBlendFunctionParameters = function (e, t, n, i) { + (this._blendFunctionParameters[0] === e && this._blendFunctionParameters[1] === t && this._blendFunctionParameters[2] === n && this._blendFunctionParameters[3] === i) || + ((this._blendFunctionParameters[0] = e), (this._blendFunctionParameters[1] = t), (this._blendFunctionParameters[2] = n), (this._blendFunctionParameters[3] = i), (this._isBlendFunctionParametersDirty = !0)); + }), + (e.prototype.setAlphaEquationParameters = function (e, t) { + (this._blendEquationParameters[0] === e && this._blendEquationParameters[1] === t) || ((this._blendEquationParameters[0] = e), (this._blendEquationParameters[1] = t), (this._isBlendEquationParametersDirty = !0)); + }), + (e.prototype.reset = function () { + (this._alphaBlend = !1), + (this._blendFunctionParameters[0] = null), + (this._blendFunctionParameters[1] = null), + (this._blendFunctionParameters[2] = null), + (this._blendFunctionParameters[3] = null), + (this._blendEquationParameters[0] = null), + (this._blendEquationParameters[1] = null), + (this._blendConstants[0] = null), + (this._blendConstants[1] = null), + (this._blendConstants[2] = null), + (this._blendConstants[3] = null), + (this._isAlphaBlendDirty = !0), + (this._isBlendFunctionParametersDirty = !1), + (this._isBlendEquationParametersDirty = !1), + (this._isBlendConstantsDirty = !1); + }), + (e.prototype.apply = function (e) { + this.isDirty && + (this._isAlphaBlendDirty && (this._alphaBlend ? e.enable(e.BLEND) : e.disable(e.BLEND), (this._isAlphaBlendDirty = !1)), + this._isBlendFunctionParametersDirty && + (e.blendFuncSeparate(this._blendFunctionParameters[0], this._blendFunctionParameters[1], this._blendFunctionParameters[2], this._blendFunctionParameters[3]), (this._isBlendFunctionParametersDirty = !1)), + this._isBlendEquationParametersDirty && (e.blendEquationSeparate(this._blendEquationParameters[0], this._blendEquationParameters[1]), (this._isBlendEquationParametersDirty = !1)), + this._isBlendConstantsDirty && (e.blendColor(this._blendConstants[0], this._blendConstants[1], this._blendConstants[2], this._blendConstants[3]), (this._isBlendConstantsDirty = !1))); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + (this.vertexCompilationError = null), (this.fragmentCompilationError = null), (this.programLinkError = null), (this.programValidationError = null); + } + return ( + Object.defineProperty(e.prototype, "isAsync", { + get: function () { + return this.isParallelCompiled; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isReady", { + get: function () { + return !!this.program && (!this.isParallelCompiled || this.engine._isRenderingStateCompiled(this)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._handlesSpectorRebuildCallback = function (e) { + e && this.program && e(this.program); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + var i; + n.d(t, "a", function () { + return a; + }), + (function (e) { + (e[(e.Pending = 0)] = "Pending"), (e[(e.Fulfilled = 1)] = "Fulfilled"), (e[(e.Rejected = 2)] = "Rejected"); + })(i || (i = {})); + var r = function () { + (this.count = 0), (this.target = 0), (this.results = []); + }, + o = (function () { + function e(e) { + var t = this; + if (((this._state = i.Pending), (this._children = new Array()), (this._rejectWasConsumed = !1), e)) + try { + e( + function (e) { + t._resolve(e); + }, + function (e) { + t._reject(e); + } + ); + } catch (e) { + this._reject(e); + } + } + return ( + Object.defineProperty(e.prototype, "_result", { + get: function () { + return this._resultValue; + }, + set: function (e) { + (this._resultValue = e), this._parent && void 0 === this._parent._result && (this._parent._result = e); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.catch = function (e) { + return this.then(void 0, e); + }), + (e.prototype.then = function (t, n) { + var r = this, + o = new e(); + return ( + (o._onFulfilled = t), + (o._onRejected = n), + this._children.push(o), + (o._parent = this), + this._state !== i.Pending && + setTimeout(function () { + if (r._state === i.Fulfilled || r._rejectWasConsumed) { + var e = o._resolve(r._result); + if (null != e) + if (void 0 !== e._state) { + var t = e; + o._children.push(t), (t._parent = o), (o = t); + } else o._result = e; + } else o._reject(r._reason); + }), + o + ); + }), + (e.prototype._moveChildren = function (e) { + var t, + n = this; + if ( + ((t = this._children).push.apply(t, e.splice(0, e.length)), + this._children.forEach(function (e) { + e._parent = n; + }), + this._state === i.Fulfilled) + ) + for (var r = 0, o = this._children; r < o.length; r++) { + o[r]._resolve(this._result); + } + else if (this._state === i.Rejected) + for (var a = 0, s = this._children; a < s.length; a++) { + s[a]._reject(this._reason); + } + }), + (e.prototype._resolve = function (e) { + try { + this._state = i.Fulfilled; + var t = null; + if ((this._onFulfilled && (t = this._onFulfilled(e)), null != t)) + if (void 0 !== t._state) { + var n = t; + (n._parent = this), n._moveChildren(this._children), (e = n._result); + } else e = t; + this._result = e; + for (var r = 0, o = this._children; r < o.length; r++) { + o[r]._resolve(e); + } + (this._children.length = 0), delete this._onFulfilled, delete this._onRejected; + } catch (e) { + this._reject(e, !0); + } + }), + (e.prototype._reject = function (e, t) { + if ((void 0 === t && (t = !1), (this._state = i.Rejected), (this._reason = e), this._onRejected && !t)) + try { + this._onRejected(e), (this._rejectWasConsumed = !0); + } catch (t) { + e = t; + } + for (var n = 0, r = this._children; n < r.length; n++) { + var o = r[n]; + this._rejectWasConsumed ? o._resolve(null) : o._reject(e); + } + (this._children.length = 0), delete this._onFulfilled, delete this._onRejected; + }), + (e.resolve = function (t) { + var n = new e(); + return n._resolve(t), n; + }), + (e._RegisterForFulfillment = function (e, t, n) { + e.then( + function (e) { + return (t.results[n] = e), t.count++, t.count === t.target && t.rootPromise._resolve(t.results), null; + }, + function (e) { + t.rootPromise._state !== i.Rejected && t.rootPromise._reject(e); + } + ); + }), + (e.all = function (t) { + var n = new e(), + i = new r(); + if (((i.target = t.length), (i.rootPromise = n), t.length)) for (var o = 0; o < t.length; o++) e._RegisterForFulfillment(t[o], i, o); + else n._resolve([]); + return n; + }), + (e.race = function (t) { + var n = new e(); + if (t.length) + for (var i = 0, r = t; i < r.length; i++) { + r[i].then( + function (e) { + return n && (n._resolve(e), (n = null)), null; + }, + function (e) { + n && (n._reject(e), (n = null)); + } + ); + } + return n; + }), + e + ); + })(), + a = (function () { + function e() {} + return ( + (e.Apply = function (e) { + (void 0 === e && (e = !1), e || "undefined" == typeof Promise) && (window.Promise = o); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }), + n.d(t, "b", function () { + return o; + }); + var i = n(76), + r = (function () { + function e(e) { + void 0 === e && (e = 30), (this._enabled = !0), (this._rollingFrameTime = new o(e)); + } + return ( + (e.prototype.sampleFrame = function (e) { + if ((void 0 === e && (e = i.a.Now), this._enabled)) { + if (null != this._lastFrameTimeMs) { + var t = e - this._lastFrameTimeMs; + this._rollingFrameTime.add(t); + } + this._lastFrameTimeMs = e; + } + }), + Object.defineProperty(e.prototype, "averageFrameTime", { + get: function () { + return this._rollingFrameTime.average; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "averageFrameTimeVariance", { + get: function () { + return this._rollingFrameTime.variance; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "instantaneousFrameTime", { + get: function () { + return this._rollingFrameTime.history(0); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "averageFPS", { + get: function () { + return 1e3 / this._rollingFrameTime.average; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "instantaneousFPS", { + get: function () { + var e = this._rollingFrameTime.history(0); + return 0 === e ? 0 : 1e3 / e; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "isSaturated", { + get: function () { + return this._rollingFrameTime.isSaturated(); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.enable = function () { + this._enabled = !0; + }), + (e.prototype.disable = function () { + (this._enabled = !1), (this._lastFrameTimeMs = null); + }), + Object.defineProperty(e.prototype, "isEnabled", { + get: function () { + return this._enabled; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.reset = function () { + (this._lastFrameTimeMs = null), this._rollingFrameTime.reset(); + }), + e + ); + })(), + o = (function () { + function e(e) { + (this._samples = new Array(e)), this.reset(); + } + return ( + (e.prototype.add = function (e) { + var t; + if (this.isSaturated()) { + var n = this._samples[this._pos]; + (t = n - this.average), (this.average -= t / (this._sampleCount - 1)), (this._m2 -= t * (n - this.average)); + } else this._sampleCount++; + (t = e - this.average), + (this.average += t / this._sampleCount), + (this._m2 += t * (e - this.average)), + (this.variance = this._m2 / (this._sampleCount - 1)), + (this._samples[this._pos] = e), + this._pos++, + (this._pos %= this._samples.length); + }), + (e.prototype.history = function (e) { + if (e >= this._sampleCount || e >= this._samples.length) return 0; + var t = this._wrapPosition(this._pos - 1); + return this._samples[this._wrapPosition(t - e)]; + }), + (e.prototype.isSaturated = function () { + return this._sampleCount >= this._samples.length; + }), + (e.prototype.reset = function () { + (this.average = 0), (this.variance = 0), (this._sampleCount = 0), (this._pos = 0), (this._m2 = 0); + }), + (e.prototype._wrapPosition = function (e) { + var t = this._samples.length; + return ((e % t) + t) % t; + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(1), + r = function () { + (this._checkCollisions = !1), (this._collisionMask = -1), (this._collisionGroup = -1), (this._collider = null), (this._oldPositionForCollisions = new i.e(0, 0, 0)), (this._diffPositionForCollisions = new i.e(0, 0, 0)); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(47), + r = n(1), + o = (function () { + function e(e, t, n, r, o) { + void 0 === n && (n = null), + void 0 === r && (r = null), + void 0 === o && (o = null), + (this.index = e), + (this._opaqueSubMeshes = new i.a(256)), + (this._transparentSubMeshes = new i.a(256)), + (this._alphaTestSubMeshes = new i.a(256)), + (this._depthOnlySubMeshes = new i.a(256)), + (this._particleSystems = new i.a(256)), + (this._spriteManagers = new i.a(256)), + (this._edgesRenderers = new i.a(16)), + (this._scene = t), + (this.opaqueSortCompareFn = n), + (this.alphaTestSortCompareFn = r), + (this.transparentSortCompareFn = o); + } + return ( + Object.defineProperty(e.prototype, "opaqueSortCompareFn", { + set: function (t) { + (this._opaqueSortCompareFn = t), (this._renderOpaque = t ? this.renderOpaqueSorted : e.renderUnsorted); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "alphaTestSortCompareFn", { + set: function (t) { + (this._alphaTestSortCompareFn = t), (this._renderAlphaTest = t ? this.renderAlphaTestSorted : e.renderUnsorted); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "transparentSortCompareFn", { + set: function (t) { + (this._transparentSortCompareFn = t || e.defaultTransparentSortCompare), (this._renderTransparent = this.renderTransparentSorted); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.render = function (e, t, n, i) { + if (e) e(this._opaqueSubMeshes, this._alphaTestSubMeshes, this._transparentSubMeshes, this._depthOnlySubMeshes); + else { + var r = this._scene.getEngine(); + 0 !== this._depthOnlySubMeshes.length && (r.setColorWrite(!1), this._renderAlphaTest(this._depthOnlySubMeshes), r.setColorWrite(!0)), + 0 !== this._opaqueSubMeshes.length && this._renderOpaque(this._opaqueSubMeshes), + 0 !== this._alphaTestSubMeshes.length && this._renderAlphaTest(this._alphaTestSubMeshes); + var o = r.getStencilBuffer(); + if ( + (r.setStencilBuffer(!1), + t && this._renderSprites(), + n && this._renderParticles(i), + this.onBeforeTransparentRendering && this.onBeforeTransparentRendering(), + 0 !== this._transparentSubMeshes.length && (this._renderTransparent(this._transparentSubMeshes), r.setAlphaMode(0)), + r.setStencilBuffer(!1), + this._edgesRenderers.length) + ) { + for (var a = 0; a < this._edgesRenderers.length; a++) this._edgesRenderers.data[a].render(); + r.setAlphaMode(0); + } + r.setStencilBuffer(o); + } + }), + (e.prototype.renderOpaqueSorted = function (t) { + return e.renderSorted(t, this._opaqueSortCompareFn, this._scene.activeCamera, !1); + }), + (e.prototype.renderAlphaTestSorted = function (t) { + return e.renderSorted(t, this._alphaTestSortCompareFn, this._scene.activeCamera, !1); + }), + (e.prototype.renderTransparentSorted = function (t) { + return e.renderSorted(t, this._transparentSortCompareFn, this._scene.activeCamera, !0); + }), + (e.renderSorted = function (t, n, i, o) { + for (var a, s = 0, c = i ? i.globalPosition : e._zeroVector; s < t.length; s++) + ((a = t.data[s])._alphaIndex = a.getMesh().alphaIndex), (a._distanceToCamera = r.e.Distance(a.getBoundingInfo().boundingSphere.centerWorld, c)); + var l = t.data.slice(0, t.length); + for (n && l.sort(n), s = 0; s < l.length; s++) { + if (((a = l[s]), o)) { + var u = a.getMaterial(); + if (u && u.needDepthPrePass) { + var h = u.getScene().getEngine(); + h.setColorWrite(!1), h.setAlphaMode(0), a.render(!1), h.setColorWrite(!0); + } + } + a.render(o); + } + }), + (e.renderUnsorted = function (e) { + for (var t = 0; t < e.length; t++) { + e.data[t].render(!1); + } + }), + (e.defaultTransparentSortCompare = function (t, n) { + return t._alphaIndex > n._alphaIndex ? 1 : t._alphaIndex < n._alphaIndex ? -1 : e.backToFrontSortCompare(t, n); + }), + (e.backToFrontSortCompare = function (e, t) { + return e._distanceToCamera < t._distanceToCamera ? 1 : e._distanceToCamera > t._distanceToCamera ? -1 : 0; + }), + (e.frontToBackSortCompare = function (e, t) { + return e._distanceToCamera < t._distanceToCamera ? -1 : e._distanceToCamera > t._distanceToCamera ? 1 : 0; + }), + (e.prototype.prepare = function () { + this._opaqueSubMeshes.reset(), + this._transparentSubMeshes.reset(), + this._alphaTestSubMeshes.reset(), + this._depthOnlySubMeshes.reset(), + this._particleSystems.reset(), + this._spriteManagers.reset(), + this._edgesRenderers.reset(); + }), + (e.prototype.dispose = function () { + this._opaqueSubMeshes.dispose(), + this._transparentSubMeshes.dispose(), + this._alphaTestSubMeshes.dispose(), + this._depthOnlySubMeshes.dispose(), + this._particleSystems.dispose(), + this._spriteManagers.dispose(), + this._edgesRenderers.dispose(); + }), + (e.prototype.dispatch = function (e, t, n) { + void 0 === t && (t = e.getMesh()), + void 0 === n && (n = e.getMaterial()), + null != n && + (n.needAlphaBlendingForMesh(t) + ? this._transparentSubMeshes.push(e) + : n.needAlphaTesting() + ? (n.needDepthPrePass && this._depthOnlySubMeshes.push(e), this._alphaTestSubMeshes.push(e)) + : (n.needDepthPrePass && this._depthOnlySubMeshes.push(e), this._opaqueSubMeshes.push(e)), + (t._renderingGroup = this), + t._edgesRenderer && t._edgesRenderer.isEnabled && this._edgesRenderers.push(t._edgesRenderer)); + }), + (e.prototype.dispatchSprites = function (e) { + this._spriteManagers.push(e); + }), + (e.prototype.dispatchParticles = function (e) { + this._particleSystems.push(e); + }), + (e.prototype._renderParticles = function (e) { + if (0 !== this._particleSystems.length) { + var t = this._scene.activeCamera; + this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene); + for (var n = 0; n < this._particleSystems.length; n++) { + var i = this._particleSystems.data[n]; + if (0 !== (t && t.layerMask & i.layerMask)) { + var r = i.emitter; + (r.position && e && -1 === e.indexOf(r)) || this._scene._activeParticles.addCount(i.render(), !1); + } + } + this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene); + } + }), + (e.prototype._renderSprites = function () { + if (this._scene.spritesEnabled && 0 !== this._spriteManagers.length) { + var e = this._scene.activeCamera; + this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene); + for (var t = 0; t < this._spriteManagers.length; t++) { + var n = this._spriteManagers.data[t]; + 0 !== (e && e.layerMask & n.layerMask) && n.render(); + } + this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene); + } + }), + (e._zeroVector = r.e.Zero()), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e, t, n) { + (this.frame = e), (this.action = t), (this.onlyOnce = n), (this.isDone = !1); + } + return ( + (e.prototype._clone = function () { + return new e(this.frame, this.action, this.onlyOnce); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = function (e, t) { + (this.distance = e), (this.mesh = t); + }; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(10), + r = (function () { + function e(e, t, n) { + var i = this; + if (((this.loop = !1), (this._coneInnerAngle = 360), (this._coneOuterAngle = 360), (this._volume = 1), (this.isPlaying = !1), (this.isPaused = !1), (this._sounds = []), (this._weights = []), t.length !== n.length)) + throw new Error("Sounds length does not equal weights length"); + (this.loop = e), (this._weights = n); + for (var r = 0, o = 0, a = n; o < a.length; o++) { + r += a[o]; + } + for (var s = r > 0 ? 1 / r : 0, c = 0; c < this._weights.length; c++) this._weights[c] *= s; + this._sounds = t; + for (var l = 0, u = this._sounds; l < u.length; l++) { + u[l].onEndedObservable.add(function () { + i._onended(); + }); + } + } + return ( + Object.defineProperty(e.prototype, "directionalConeInnerAngle", { + get: function () { + return this._coneInnerAngle; + }, + set: function (e) { + if (e !== this._coneInnerAngle) { + if (this._coneOuterAngle < e) return void i.a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle."); + this._coneInnerAngle = e; + for (var t = 0, n = this._sounds; t < n.length; t++) { + n[t].directionalConeInnerAngle = e; + } + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "directionalConeOuterAngle", { + get: function () { + return this._coneOuterAngle; + }, + set: function (e) { + if (e !== this._coneOuterAngle) { + if (e < this._coneInnerAngle) return void i.a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle."); + this._coneOuterAngle = e; + for (var t = 0, n = this._sounds; t < n.length; t++) { + n[t].directionalConeOuterAngle = e; + } + } + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "volume", { + get: function () { + return this._volume; + }, + set: function (e) { + if (e !== this._volume) + for (var t = 0, n = this._sounds; t < n.length; t++) { + n[t].setVolume(e); + } + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._onended = function () { + void 0 !== this._currentIndex && (this._sounds[this._currentIndex].autoplay = !1), this.loop && this.isPlaying ? this.play() : (this.isPlaying = !1); + }), + (e.prototype.pause = function () { + (this.isPaused = !0), void 0 !== this._currentIndex && this._sounds[this._currentIndex].pause(); + }), + (e.prototype.stop = function () { + (this.isPlaying = !1), void 0 !== this._currentIndex && this._sounds[this._currentIndex].stop(); + }), + (e.prototype.play = function (e) { + if (!this.isPaused) { + this.stop(); + for (var t = Math.random(), n = 0, i = 0; i < this._weights.length; i++) + if (t <= (n += this._weights[i])) { + this._currentIndex = i; + break; + } + } + var r = this._sounds[this._currentIndex]; + r.isReady() ? r.play(0, this.isPaused ? void 0 : e) : (r.autoplay = !0), (this.isPlaying = !0), (this.isPaused = !1); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() { + var e = this; + (this.delay = 0), + (this.fadeInTime = 300), + (this._millisecondsPerFrame = 1e3 / 60), + (this._hovered = !1), + (this._hoverValue = 0), + (this._ownerNode = null), + (this._update = function () { + if (e._ownerNode) { + if (((e._hoverValue += e._hovered ? e._millisecondsPerFrame : -e._millisecondsPerFrame), e._setAllVisibility(e._ownerNode, (e._hoverValue - e.delay) / e.fadeInTime), e._ownerNode.visibility > 1)) + return e._setAllVisibility(e._ownerNode, 1), void (e._hoverValue = e.fadeInTime + e.delay); + if (e._ownerNode.visibility < 0 && (e._setAllVisibility(e._ownerNode, 0), e._hoverValue < 0)) return void (e._hoverValue = 0); + setTimeout(e._update, e._millisecondsPerFrame); + } + }); + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return "FadeInOut"; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.init = function () {}), + (e.prototype.attach = function (e) { + (this._ownerNode = e), this._setAllVisibility(this._ownerNode, 0); + }), + (e.prototype.detach = function () { + this._ownerNode = null; + }), + (e.prototype.fadeIn = function (e) { + (this._hovered = e), this._update(); + }), + (e.prototype._setAllVisibility = function (e, t) { + var n = this; + (e.visibility = t), + e.getChildMeshes().forEach(function (e) { + n._setAllVisibility(e, t); + }); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(3), + o = n(42), + a = n(89), + s = n(1), + c = (function () { + function e() { + (this.keysUp = [38]), (this.keysDown = [40]), (this.keysLeft = [37]), (this.keysRight = [39]), (this._keys = new Array()); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this; + this._onCanvasBlurObserver || + ((this._scene = this.camera.getScene()), + (this._engine = this._scene.getEngine()), + (this._onCanvasBlurObserver = this._engine.onCanvasBlurObservable.add(function () { + n._keys = []; + })), + (this._onKeyboardObserver = this._scene.onKeyboardObservable.add(function (e) { + var i, + r = e.event; + r.metaKey || + (e.type === a.a.KEYDOWN + ? (-1 === n.keysUp.indexOf(r.keyCode) && -1 === n.keysDown.indexOf(r.keyCode) && -1 === n.keysLeft.indexOf(r.keyCode) && -1 === n.keysRight.indexOf(r.keyCode)) || + (-1 === (i = n._keys.indexOf(r.keyCode)) && n._keys.push(r.keyCode), t || r.preventDefault()) + : (-1 === n.keysUp.indexOf(r.keyCode) && -1 === n.keysDown.indexOf(r.keyCode) && -1 === n.keysLeft.indexOf(r.keyCode) && -1 === n.keysRight.indexOf(r.keyCode)) || + ((i = n._keys.indexOf(r.keyCode)) >= 0 && n._keys.splice(i, 1), t || r.preventDefault())); + }))); + }), + (e.prototype.detachControl = function (e) { + this._scene && + (this._onKeyboardObserver && this._scene.onKeyboardObservable.remove(this._onKeyboardObserver), + this._onCanvasBlurObserver && this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver), + (this._onKeyboardObserver = null), + (this._onCanvasBlurObserver = null)), + (this._keys = []); + }), + (e.prototype.checkInputs = function () { + if (this._onKeyboardObserver) + for (var e = this.camera, t = 0; t < this._keys.length; t++) { + var n = this._keys[t], + i = e._computeLocalCameraSpeed(); + -1 !== this.keysLeft.indexOf(n) + ? e._localDirection.copyFromFloats(-i, 0, 0) + : -1 !== this.keysUp.indexOf(n) + ? e._localDirection.copyFromFloats(0, 0, i) + : -1 !== this.keysRight.indexOf(n) + ? e._localDirection.copyFromFloats(i, 0, 0) + : -1 !== this.keysDown.indexOf(n) && e._localDirection.copyFromFloats(0, 0, -i), + e.getScene().useRightHandedSystem && (e._localDirection.z *= -1), + e.getViewMatrix().invertToRef(e._cameraTransformMatrix), + s.e.TransformNormalToRef(e._localDirection, e._cameraTransformMatrix, e._transformedDirection), + e.cameraDirection.addInPlace(e._transformedDirection); + } + }), + (e.prototype.getClassName = function () { + return "FreeCameraKeyboardMoveInput"; + }), + (e.prototype._onLostFocus = function () { + this._keys = []; + }), + (e.prototype.getSimpleName = function () { + return "keyboard"; + }), + Object(i.c)([Object(r.c)()], e.prototype, "keysUp", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "keysDown", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "keysLeft", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "keysRight", void 0), + e + ); + })(); + o.a.FreeCameraKeyboardMoveInput = c; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(6), + o = n(3), + a = n(42), + s = n(20), + c = (function () { + function e(e) { + void 0 === e && (e = !0), + (this.touchEnabled = e), + (this.buttons = [0, 1, 2]), + (this.angularSensibility = 2e3), + (this.previousPosition = null), + (this.onPointerMovedObservable = new r.c()), + (this._allowCameraRotation = !0); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this, + i = this.camera.getEngine(); + this._pointerInput || + (this._pointerInput = function (r) { + var o = r.event; + if (!i.isInVRExclusivePointerMode && (n.touchEnabled || "touch" !== o.pointerType) && (r.type === s.a.POINTERMOVE || -1 !== n.buttons.indexOf(o.button))) { + var a = o.srcElement || o.target; + if (r.type === s.a.POINTERDOWN && a) { + try { + a.setPointerCapture(o.pointerId); + } catch (e) {} + (n.previousPosition = { x: o.clientX, y: o.clientY }), t || (o.preventDefault(), e.focus()); + } else if (r.type === s.a.POINTERUP && a) { + try { + a.releasePointerCapture(o.pointerId); + } catch (e) {} + (n.previousPosition = null), t || o.preventDefault(); + } else if (r.type === s.a.POINTERMOVE) { + if (!n.previousPosition || i.isPointerLock) return; + var c = o.clientX - n.previousPosition.x, + l = o.clientY - n.previousPosition.y; + n.camera.getScene().useRightHandedSystem && (c *= -1), + n.camera.parent && n.camera.parent._getWorldMatrixDeterminant() < 0 && (c *= -1), + n._allowCameraRotation && ((n.camera.cameraRotation.y += c / n.angularSensibility), (n.camera.cameraRotation.x += l / n.angularSensibility)), + n.onPointerMovedObservable.notifyObservers({ offsetX: c, offsetY: l }), + (n.previousPosition = { x: o.clientX, y: o.clientY }), + t || o.preventDefault(); + } + } + }), + (this._onMouseMove = function (e) { + if (i.isPointerLock && !i.isInVRExclusivePointerMode) { + var r = e.movementX || e.mozMovementX || e.webkitMovementX || e.msMovementX || 0; + n.camera.getScene().useRightHandedSystem && (r *= -1), n.camera.parent && n.camera.parent._getWorldMatrixDeterminant() < 0 && (r *= -1), (n.camera.cameraRotation.y += r / n.angularSensibility); + var o = e.movementY || e.mozMovementY || e.webkitMovementY || e.msMovementY || 0; + (n.camera.cameraRotation.x += o / n.angularSensibility), (n.previousPosition = null), t || e.preventDefault(); + } + }), + (this._observer = this.camera.getScene().onPointerObservable.add(this._pointerInput, s.a.POINTERDOWN | s.a.POINTERUP | s.a.POINTERMOVE)), + e.addEventListener("mousemove", this._onMouseMove, !1), + e.addEventListener("contextmenu", this.onContextMenu.bind(this), !1); + }), + (e.prototype.onContextMenu = function (e) { + e.preventDefault(); + }), + (e.prototype.detachControl = function (e) { + this._observer && + e && + (this.camera.getScene().onPointerObservable.remove(this._observer), + this._onMouseMove && e.removeEventListener("mousemove", this._onMouseMove), + this.onContextMenu && e.removeEventListener("contextmenu", this.onContextMenu), + this.onPointerMovedObservable && this.onPointerMovedObservable.clear(), + (this._observer = null), + (this._onMouseMove = null), + (this.previousPosition = null)); + }), + (e.prototype.getClassName = function () { + return "FreeCameraMouseInput"; + }), + (e.prototype.getSimpleName = function () { + return "mouse"; + }), + Object(i.c)([Object(o.c)()], e.prototype, "buttons", void 0), + Object(i.c)([Object(o.c)()], e.prototype, "angularSensibility", void 0), + e + ); + })(); + a.a.FreeCameraMouseInput = c; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(3), + o = n(42), + a = n(20), + s = n(1), + c = (function () { + function e() { + (this.touchAngularSensibility = 2e5), (this.touchMoveSensibility = 250), (this._offsetX = null), (this._offsetY = null), (this._pointerPressed = new Array()); + } + return ( + (e.prototype.attachControl = function (e, t) { + var n = this, + i = null; + void 0 === this._pointerInput && + ((this._onLostFocus = function () { + (n._offsetX = null), (n._offsetY = null); + }), + (this._pointerInput = function (e) { + var r = e.event; + if ("mouse" !== r.pointerType) + if (e.type === a.a.POINTERDOWN) { + if ((t || r.preventDefault(), n._pointerPressed.push(r.pointerId), 1 !== n._pointerPressed.length)) return; + i = { x: r.clientX, y: r.clientY }; + } else if (e.type === a.a.POINTERUP) { + if ((t || r.preventDefault(), -1 === (o = n._pointerPressed.indexOf(r.pointerId)))) return; + if ((n._pointerPressed.splice(o, 1), 0 != o)) return; + (i = null), (n._offsetX = null), (n._offsetY = null); + } else if (e.type === a.a.POINTERMOVE) { + if ((t || r.preventDefault(), !i)) return; + var o; + if (0 != (o = n._pointerPressed.indexOf(r.pointerId))) return; + (n._offsetX = r.clientX - i.x), (n._offsetY = -(r.clientY - i.y)); + } + })), + (this._observer = this.camera.getScene().onPointerObservable.add(this._pointerInput, a.a.POINTERDOWN | a.a.POINTERUP | a.a.POINTERMOVE)), + this._onLostFocus && e.addEventListener("blur", this._onLostFocus); + }), + (e.prototype.detachControl = function (e) { + this._pointerInput && + e && + (this._observer && (this.camera.getScene().onPointerObservable.remove(this._observer), (this._observer = null)), + this._onLostFocus && (e.removeEventListener("blur", this._onLostFocus), (this._onLostFocus = null)), + (this._pointerPressed = []), + (this._offsetX = null), + (this._offsetY = null)); + }), + (e.prototype.checkInputs = function () { + if (this._offsetX && this._offsetY) { + var e = this.camera; + if (((e.cameraRotation.y += this._offsetX / this.touchAngularSensibility), this._pointerPressed.length > 1)) e.cameraRotation.x += -this._offsetY / this.touchAngularSensibility; + else { + var t = e._computeLocalCameraSpeed(), + n = new s.e(0, 0, (t * this._offsetY) / this.touchMoveSensibility); + s.a.RotationYawPitchRollToRef(e.rotation.y, e.rotation.x, 0, e._cameraRotationMatrix), e.cameraDirection.addInPlace(s.e.TransformCoordinates(n, e._cameraRotationMatrix)); + } + } + }), + (e.prototype.getClassName = function () { + return "FreeCameraTouchInput"; + }), + (e.prototype.getSimpleName = function () { + return "touch"; + }), + Object(i.c)([Object(r.c)()], e.prototype, "touchAngularSensibility", void 0), + Object(i.c)([Object(r.c)()], e.prototype, "touchMoveSensibility", void 0), + e + ); + })(); + o.a.FreeCameraTouchInput = c; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(24), + r = + (n(229), + n(166), + (function () { + function e() {} + return ( + (e.ExpandRGBDTexture = function (e) { + var t = e._texture; + if (t && e.isRGBD) { + var n = t.getEngine(), + r = n.getCaps(), + o = !1; + r.textureHalfFloatRender && r.textureHalfFloatLinearFiltering ? ((o = !0), (t.type = 2)) : r.textureFloatRender && r.textureFloatLinearFiltering && ((o = !0), (t.type = 1)), + o && ((t.isReady = !1), (t._isRGBD = !1), (t.invertY = !1)), + e.onLoadObservable.addOnce(function () { + if (o) { + var r = new i.a("rgbdDecode", "rgbdDecode", null, null, 1, null, 3, n, !1, void 0, t.type, void 0, null, !1), + a = n.createRenderTargetTexture(t.width, { generateDepthBuffer: !1, generateMipMaps: !1, generateStencilBuffer: !1, samplingMode: t.samplingMode, type: t.type, format: 5 }); + r.getEffect().executeWhenCompiled(function () { + (r.onApply = function (e) { + e._bindTexture("textureSampler", t), e.setFloat2("scale", 1, 1); + }), + e.getScene().postProcessManager.directRender([r], a, !0), + n.restoreDefaultFramebuffer(), + n._releaseTexture(t), + n._releaseFramebufferObjects(a), + r && r.dispose(), + a._swapAndDie(t), + (t.isReady = !0); + }); + } + }); + } + }), + e + ); + })()); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return r; + }); + var i = n(21), + r = (function () { + function e(e) { + (this.name = i.a.NAME_LAYER), (this.scene = e), (this._engine = e.getEngine()), (e.layers = new Array()); + } + return ( + (e.prototype.register = function () { + this.scene._beforeCameraDrawStage.registerStep(i.a.STEP_BEFORECAMERADRAW_LAYER, this, this._drawCameraBackground), + this.scene._afterCameraDrawStage.registerStep(i.a.STEP_AFTERCAMERADRAW_LAYER, this, this._drawCameraForeground), + this.scene._beforeRenderTargetDrawStage.registerStep(i.a.STEP_BEFORERENDERTARGETDRAW_LAYER, this, this._drawRenderTargetBackground), + this.scene._afterRenderTargetDrawStage.registerStep(i.a.STEP_AFTERRENDERTARGETDRAW_LAYER, this, this._drawRenderTargetForeground); + }), + (e.prototype.rebuild = function () { + for (var e = 0, t = this.scene.layers; e < t.length; e++) { + t[e]._rebuild(); + } + }), + (e.prototype.dispose = function () { + for (var e = this.scene.layers; e.length; ) e[0].dispose(); + }), + (e.prototype._draw = function (e) { + var t = this.scene.layers; + if (t.length) { + this._engine.setDepthBuffer(!1); + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + e(r) && r.render(); + } + this._engine.setDepthBuffer(!0); + } + }), + (e.prototype._drawCameraPredicate = function (e, t, n) { + return !e.renderOnlyInRenderTargetTextures && e.isBackground === t && 0 != (e.layerMask & n); + }), + (e.prototype._drawCameraBackground = function (e) { + var t = this; + this._draw(function (n) { + return t._drawCameraPredicate(n, !0, e.layerMask); + }); + }), + (e.prototype._drawCameraForeground = function (e) { + var t = this; + this._draw(function (n) { + return t._drawCameraPredicate(n, !1, e.layerMask); + }); + }), + (e.prototype._drawRenderTargetPredicate = function (e, t, n, i) { + return e.renderTargetTextures.length > 0 && e.isBackground === t && e.renderTargetTextures.indexOf(i) > -1 && 0 != (e.layerMask & n); + }), + (e.prototype._drawRenderTargetBackground = function (e) { + var t = this; + this._draw(function (n) { + return t._drawRenderTargetPredicate(n, !0, t.scene.activeCamera.layerMask, e); + }); + }), + (e.prototype._drawRenderTargetForeground = function (e) { + var t = this; + this._draw(function (n) { + return t._drawRenderTargetPredicate(n, !1, t.scene.activeCamera.layerMask, e); + }); + }), + (e.prototype.addFromContainer = function (e) { + var t = this; + e.layers && + e.layers.forEach(function (e) { + t.scene.layers.push(e); + }); + }), + (e.prototype.removeFromContainer = function (e, t) { + var n = this; + void 0 === t && (t = !1), + e.layers && + e.layers.forEach(function (e) { + var i = n.scene.layers.indexOf(e); + -1 !== i && n.scene.layers.splice(i, 1), t && e.dispose(); + }); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return s; + }); + var i = n(2), + r = n(3), + o = n(160), + a = n(13), + s = (function (e) { + function t(t, n) { + var i = e.call(this, t, n) || this; + return (i._useRoughnessFromMetallicTextureAlpha = !1), (i._useRoughnessFromMetallicTextureGreen = !0), (i._useMetallnessFromMetallicTextureBlue = !0), (i.metallic = 1), (i.roughness = 1), i; + } + return ( + Object(i.d)(t, e), + (t.prototype.getClassName = function () { + return "PBRMetallicRoughnessMaterial"; + }), + (t.prototype.clone = function (e) { + var n = this, + i = r.a.Clone(function () { + return new t(e, n.getScene()); + }, this); + return (i.id = e), (i.name = e), this.clearCoat.copyTo(i.clearCoat), this.anisotropy.copyTo(i.anisotropy), this.brdf.copyTo(i.brdf), this.sheen.copyTo(i.sheen), this.subSurface.copyTo(i.subSurface), i; + }), + (t.prototype.serialize = function () { + var e = r.a.Serialize(this); + return ( + (e.customType = "BABYLON.PBRMetallicRoughnessMaterial"), + (e.clearCoat = this.clearCoat.serialize()), + (e.anisotropy = this.anisotropy.serialize()), + (e.brdf = this.brdf.serialize()), + (e.sheen = this.sheen.serialize()), + (e.subSurface = this.subSurface.serialize()), + e + ); + }), + (t.Parse = function (e, n, i) { + var o = r.a.Parse( + function () { + return new t(e.name, n); + }, + e, + n, + i + ); + return ( + e.clearCoat && o.clearCoat.parse(e.clearCoat, n, i), + e.anisotropy && o.anisotropy.parse(e.anisotropy, n, i), + e.brdf && o.brdf.parse(e.brdf, n, i), + e.sheen && o.sheen.parse(e.sheen, n, i), + e.subSurface && o.subSurface.parse(e.subSurface, n, i), + o + ); + }), + Object(i.c)([Object(r.e)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_albedoColor")], t.prototype, "baseColor", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_albedoTexture")], t.prototype, "baseTexture", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "metallic", void 0), + Object(i.c)([Object(r.c)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty")], t.prototype, "roughness", void 0), + Object(i.c)([Object(r.m)(), Object(r.b)("_markAllSubMeshesAsTexturesDirty", "_metallicTexture")], t.prototype, "metallicRoughnessTexture", void 0), + t + ); + })(o.a); + a.a.RegisteredTypes["BABYLON.PBRMetallicRoughnessMaterial"] = s; + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return o; + }); + var i = n(12), + r = n(21), + o = (function () { + function e(e) { + (this.name = r.a.NAME_PROCEDURALTEXTURE), (this.scene = e), (this.scene.proceduralTextures = new Array()); + } + return ( + (e.prototype.register = function () { + this.scene._beforeClearStage.registerStep(r.a.STEP_BEFORECLEAR_PROCEDURALTEXTURE, this, this._beforeClear); + }), + (e.prototype.rebuild = function () {}), + (e.prototype.dispose = function () {}), + (e.prototype._beforeClear = function () { + if (this.scene.proceduralTexturesEnabled) { + i.b.StartPerformanceCounter("Procedural textures", this.scene.proceduralTextures.length > 0); + for (var e = 0; e < this.scene.proceduralTextures.length; e++) { + var t = this.scene.proceduralTextures[e]; + t._shouldRender() && t.render(); + } + i.b.EndPerformanceCounter("Procedural textures", this.scene.proceduralTextures.length > 0); + } + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return c; + }); + var i = n(2), + r = n(3), + o = n(117), + a = n(32), + s = n(98), + c = + (n(155), + (function (e) { + function t(t, n, i, r, o, a, s, c, l) { + void 0 === r && (r = 5), void 0 === o && (o = 0), void 0 === a && (a = !1), void 0 === s && (s = !1), void 0 === c && (c = 3), void 0 === l && (l = null); + var u = e.call(this, "", t) || this; + return (u._texture = t.getEngine().createRawCubeTexture(n, i, r, o, a, s, c, l)), u; + } + return ( + Object(i.d)(t, e), + (t.prototype.update = function (e, t, n, i, r) { + void 0 === r && (r = null), this._texture.getEngine().updateRawCubeTexture(this._texture, e, t, n, i, r); + }), + (t.prototype.updateRGBDAsync = function (e, n, i, r) { + return void 0 === n && (n = null), void 0 === i && (i = 0.8), void 0 === r && (r = 0), t._UpdateRGBDAsync(this._texture, e, n, i, r); + }), + (t.prototype.clone = function () { + var e = this; + return r.a.Clone(function () { + var n = e.getScene(), + i = e._texture, + r = new t(n, i._bufferViewArray, i.width, i.format, i.type, i.generateMipMaps, i.invertY, i.samplingMode, i._compression); + return i.source === a.b.CubeRawRGBD && r.updateRGBDAsync(i._bufferViewArrayArray, i._sphericalPolynomial, i._lodGenerationScale, i._lodGenerationOffset), r; + }, this); + }), + (t._UpdateRGBDAsync = function (e, t, n, i, r) { + return ( + (e._source = a.b.CubeRawRGBD), + (e._bufferViewArrayArray = t), + (e._lodGenerationScale = i), + (e._lodGenerationOffset = r), + (e._sphericalPolynomial = n), + o.a.UploadLevelsAsync(e, t).then(function () { + e.isReady = !0; + }) + ); + }), + t + ); + })(s.a)); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e(e) { + (this._pendingActions = new Array()), + (this._workerInfos = e.map(function (e) { + return { worker: e, active: !1 }; + })); + } + return ( + (e.prototype.dispose = function () { + for (var e = 0, t = this._workerInfos; e < t.length; e++) { + t[e].worker.terminate(); + } + delete this._workerInfos, delete this._pendingActions; + }), + (e.prototype.push = function (e) { + for (var t = 0, n = this._workerInfos; t < n.length; t++) { + var i = n[t]; + if (!i.active) return void this._execute(i, e); + } + this._pendingActions.push(e); + }), + (e.prototype._execute = function (e, t) { + var n = this; + (e.active = !0), + t(e.worker, function () { + e.active = !1; + var t = n._pendingActions.shift(); + t && n._execute(e, t); + }); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return m; + }); + var i = n(6), + r = n(1), + o = n(5), + a = n(25), + s = n(4), + c = n(28), + l = n(8), + u = n(21), + h = n(198), + d = n(7), + p = + (n(59), + "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec4 color;\n\n#include\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\n#ifdef LINEAR\nbaseColor.rgb=toGammaSpace(baseColor.rgb);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=baseColor*color;\n}"); + d.a.ShadersStore.layerPixelShader = p; + var f = + "\nattribute vec2 position;\n\nuniform vec2 scale;\nuniform vec2 offset;\nuniform mat4 textureMatrix;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvec2 shiftedPosition=position*scale+offset;\nvUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0));\ngl_Position=vec4(shiftedPosition,0.0,1.0);\n}"; + d.a.ShadersStore.layerVertexShader = f; + var m = (function () { + function e(e, t, n, c, d) { + (this.name = e), + (this.scale = new r.d(1, 1)), + (this.offset = new r.d(0, 0)), + (this.alphaBlendingMode = 2), + (this.layerMask = 268435455), + (this.renderTargetTextures = []), + (this.renderOnlyInRenderTargetTextures = !1), + (this._vertexBuffers = {}), + (this.onDisposeObservable = new i.c()), + (this.onBeforeRenderObservable = new i.c()), + (this.onAfterRenderObservable = new i.c()), + (this.texture = t ? new l.a(t, n, !0) : null), + (this.isBackground = void 0 === c || c), + (this.color = void 0 === d ? new o.b(1, 1, 1, 1) : d), + (this._scene = n || a.a.LastCreatedScene); + var p = this._scene._getComponent(u.a.NAME_LAYER); + p || ((p = new h.a(this._scene)), this._scene._addComponent(p)), this._scene.layers.push(this); + var f = this._scene.getEngine(), + m = []; + m.push(1, 1), m.push(-1, 1), m.push(-1, -1), m.push(1, -1); + var g = new s.b(f, m, s.b.PositionKind, !1, !1, 2); + (this._vertexBuffers[s.b.PositionKind] = g), this._createIndexBuffer(); + } + return ( + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onBeforeRender", { + set: function (e) { + this._onBeforeRenderObserver && this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver), (this._onBeforeRenderObserver = this.onBeforeRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onAfterRender", { + set: function (e) { + this._onAfterRenderObserver && this.onAfterRenderObservable.remove(this._onAfterRenderObserver), (this._onAfterRenderObserver = this.onAfterRenderObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._createIndexBuffer = function () { + var e = this._scene.getEngine(), + t = []; + t.push(0), t.push(1), t.push(2), t.push(0), t.push(2), t.push(3), (this._indexBuffer = e.createIndexBuffer(t)); + }), + (e.prototype._rebuild = function () { + var e = this._vertexBuffers[s.b.PositionKind]; + e && e._rebuild(), this._createIndexBuffer(); + }), + (e.prototype.render = function () { + var e = this._scene.getEngine(), + t = ""; + this.alphaTest && (t = "#define ALPHATEST"), + this.texture && !this.texture.gammaSpace && (t += "\r\n#define LINEAR"), + this._previousDefines !== t && ((this._previousDefines = t), (this._effect = e.createEffect("layer", [s.b.PositionKind], ["textureMatrix", "color", "scale", "offset"], ["textureSampler"], t))); + var n = this._effect; + if (n && n.isReady() && this.texture && this.texture.isReady()) { + e = this._scene.getEngine(); + this.onBeforeRenderObservable.notifyObservers(this), + e.enableEffect(n), + e.setState(!1), + n.setTexture("textureSampler", this.texture), + n.setMatrix("textureMatrix", this.texture.getTextureMatrix()), + n.setFloat4("color", this.color.r, this.color.g, this.color.b, this.color.a), + n.setVector2("offset", this.offset), + n.setVector2("scale", this.scale), + e.bindBuffers(this._vertexBuffers, this._indexBuffer, n), + this.alphaTest ? e.drawElementsType(c.a.TriangleFillMode, 0, 6) : (e.setAlphaMode(this.alphaBlendingMode), e.drawElementsType(c.a.TriangleFillMode, 0, 6), e.setAlphaMode(0)), + this.onAfterRenderObservable.notifyObservers(this); + } + }), + (e.prototype.dispose = function () { + var e = this._vertexBuffers[s.b.PositionKind]; + e && (e.dispose(), (this._vertexBuffers[s.b.PositionKind] = null)), + this._indexBuffer && (this._scene.getEngine()._releaseBuffer(this._indexBuffer), (this._indexBuffer = null)), + this.texture && (this.texture.dispose(), (this.texture = null)), + (this.renderTargetTextures = []); + var t = this._scene.layers.indexOf(this); + this._scene.layers.splice(t, 1), this.onDisposeObservable.notifyObservers(this), this.onDisposeObservable.clear(), this.onAfterRenderObservable.clear(), this.onBeforeRenderObservable.clear(); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + (e.RandomId = function () { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) { + var t = (16 * Math.random()) | 0; + return ("x" === e ? t : (3 & t) | 8).toString(16); + }); + }), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.d(t, "a", function () { + return i; + }); + var i = (function () { + function e() {} + return ( + Object.defineProperty(e, "UniqueId", { + get: function () { + var e = this._UniqueIdCounter; + return this._UniqueIdCounter++, e; + }, + enumerable: !0, + configurable: !0, + }), + (e._UniqueIdCounter = 0), + e + ); + })(); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "b4164048526649efa19dd822ae6c6313.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "859534eabad5724a69cd5381dc82428f.webp"); + }, + function (e, t, n) { + "use strict"; + var i = "postprocessVertexShader", + r = "\nattribute vec2 position;\nuniform vec2 scale;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=(position*madd+madd)*scale;\ngl_Position=vec4(position,0.0,1.0);\n}"; + n(7).a.ShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = n(2), + r = n(32), + o = n(10); + n(38).a.prototype.createRenderTargetCubeTexture = function (e, t) { + var n = Object(i.a)({ generateMipMaps: !0, generateDepthBuffer: !0, generateStencilBuffer: !1, type: 0, samplingMode: 3, format: 5 }, t); + (n.generateStencilBuffer = n.generateDepthBuffer && n.generateStencilBuffer), ((1 !== n.type || this._caps.textureFloatLinearFiltering) && (2 !== n.type || this._caps.textureHalfFloatLinearFiltering)) || (n.samplingMode = 1); + var a = this._gl, + s = new r.a(this, r.b.RenderTarget); + this._bindTextureDirectly(a.TEXTURE_CUBE_MAP, s, !0); + var c = this._getSamplingParameters(n.samplingMode, n.generateMipMaps); + 1 !== n.type || this._caps.textureFloat || ((n.type = 0), o.a.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_MAG_FILTER, c.mag), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_MIN_FILTER, c.min), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), + a.texParameteri(a.TEXTURE_CUBE_MAP, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE); + for (var l = 0; l < 6; l++) a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X + l, 0, this._getRGBABufferInternalSizedFormat(n.type, n.format), e, e, 0, this._getInternalFormat(n.format), this._getWebGLTextureType(n.type), null); + var u = a.createFramebuffer(); + return ( + this._bindUnboundFramebuffer(u), + (s._depthStencilBuffer = this._setupFramebufferDepthAttachments(n.generateStencilBuffer, n.generateDepthBuffer, e, e)), + n.generateMipMaps && a.generateMipmap(a.TEXTURE_CUBE_MAP), + this._bindTextureDirectly(a.TEXTURE_CUBE_MAP, null), + this._bindUnboundFramebuffer(null), + (s._framebuffer = u), + (s.width = e), + (s.height = e), + (s.isReady = !0), + (s.isCube = !0), + (s.samples = 1), + (s.generateMipMaps = n.generateMipMaps), + (s.samplingMode = n.samplingMode), + (s.type = n.type), + (s.format = n.format), + (s._generateDepthBuffer = n.generateDepthBuffer), + (s._generateStencilBuffer = n.generateStencilBuffer), + this._internalTexturesCache.push(s), + s + ); + }; + }, + function (e, t, n) { + "use strict"; + var i = + "#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP)\n#if defined(TANGENT) && defined(NORMAL)\nvec3 tbnNormal=normalize(normalUpdated);\nvec3 tbnTangent=normalize(tangentUpdated.xyz);\nvec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;\nvTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);\n#endif\n#endif"; + n(7).a.IncludesShadersStore.bumpVertex = i; + }, + function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "DebugLayerTab", function () { + return i; + }), + n.d(t, "DebugLayer", function () { + return l; + }); + var i, + r = n(2), + o = n(12), + a = n(6), + s = n(18), + c = n(14); + Object.defineProperty(s.a.prototype, "debugLayer", { + get: function () { + return this._debugLayer || (this._debugLayer = new l(this)), this._debugLayer; + }, + enumerable: !0, + configurable: !0, + }), + (function (e) { + (e[(e.Properties = 0)] = "Properties"), (e[(e.Debug = 1)] = "Debug"), (e[(e.Statistics = 2)] = "Statistics"), (e[(e.Tools = 3)] = "Tools"), (e[(e.Settings = 4)] = "Settings"); + })(i || (i = {})); + var l = (function () { + function e(e) { + var t = this; + (this.BJSINSPECTOR = this._getGlobalInspector()), + (this._scene = e), + this._scene.onDisposeObservable.add(function () { + t._scene._debugLayer && t._scene._debugLayer.hide(); + }); + } + return ( + Object.defineProperty(e.prototype, "onPropertyChangedObservable", { + get: function () { + return this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector + ? this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable + : (this._onPropertyChangedObservable || (this._onPropertyChangedObservable = new a.c()), this._onPropertyChangedObservable); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype._createInspector = function (e) { + if (!this.isVisible()) { + if (this._onPropertyChangedObservable) { + for (var t = 0, n = this._onPropertyChangedObservable.observers; t < n.length; t++) { + var i = n[t]; + this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable.add(i); + } + this._onPropertyChangedObservable.clear(), (this._onPropertyChangedObservable = void 0); + } + var o = Object(r.a)({ overlay: !1, showExplorer: !0, showInspector: !0, embedMode: !1, handleResize: !0, enablePopup: !0 }, e); + (this.BJSINSPECTOR = this.BJSINSPECTOR || this._getGlobalInspector()), this.BJSINSPECTOR.Inspector.Show(this._scene, o); + } + }), + (e.prototype.select = function (e, t) { + this.BJSINSPECTOR && (this.BJSINSPECTOR.Inspector.MarkLineContainerTitleForHighlighting(t), this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable.notifyObservers(e)); + }), + (e.prototype._getGlobalInspector = function () { + return "undefined" != typeof INSPECTOR ? INSPECTOR : "undefined" != typeof BABYLON && void 0 !== BABYLON.Inspector ? BABYLON : void 0; + }), + (e.prototype.isVisible = function () { + return this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector.IsVisible; + }), + (e.prototype.hide = function () { + this.BJSINSPECTOR && this.BJSINSPECTOR.Inspector.Hide(); + }), + (e.prototype.show = function (t) { + var n = this; + return new Promise(function (i, r) { + if (void 0 === n.BJSINSPECTOR) { + var a = t && t.inspectorURL ? t.inspectorURL : e.InspectorURL; + o.b.LoadScript(a, function () { + n._createInspector(t), i(n); + }); + } else n._createInspector(t), i(n); + }); + }), + (e.InspectorURL = "https://unpkg.com/babylonjs-inspector@" + c.a.Version + "/babylon.inspector.bundle.js"), + e + ); + })(); + }, + function (e, t) { + var n; + n = (function () { + return this; + })(); + try { + n = n || new Function("return this")(); + } catch (e) { + "object" == typeof window && (n = window); + } + e.exports = n; + }, + function (e, t, n) { + "use strict"; + var i = n(145), + r = n(68); + Object.defineProperty(r.a.prototype, "sphericalPolynomial", { + get: function () { + if (this._texture) { + if (this._texture._sphericalPolynomial) return this._texture._sphericalPolynomial; + this._texture.isReady && (this._texture._sphericalPolynomial = i.a.ConvertCubeMapTextureToSphericalPolynomial(this)); + } + return null; + }, + set: function (e) { + this._texture && (this._texture._sphericalPolynomial = e); + }, + enumerable: !0, + configurable: !0, + }); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypedJSONProvider = void 0), n(176); + const i = n(177); + class r { + constructor() { + this._serializers = new Map(); + } + static instance() { + return null == this._instance && (this._instance = new r()), this._instance; + } + get(e) { + return 0 == this._serializers.has(e) && this._serializers.set(e, new i.TypedJSON(e)), this._serializers.get(e); + } + } + t.TypedJSONProvider = r; + }, + function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "GLTFLoaderCoordinateSystemMode", function () { + return p; + }), + n.d(t, "GLTFLoaderAnimationStartMode", function () { + return f; + }), + n.d(t, "GLTFLoaderState", function () { + return m; + }), + n.d(t, "GLTFFileLoader", function () { + return b; + }), + n.d(t, "GLTFValidation", function () { + return g; + }), + n.d(t, "GLTF1", function () { + return i; + }), + n.d(t, "GLTF2", function () { + return r; + }); + var i = {}; + n.r(i), + n.d(i, "GLTFBinaryExtension", function () { + return Te; + }), + n.d(i, "GLTFLoaderBase", function () { + return Ce; + }), + n.d(i, "GLTFLoader", function () { + return Pe; + }), + n.d(i, "GLTFLoaderExtension", function () { + return xe; + }), + n.d(i, "EComponentType", function () { + return _; + }), + n.d(i, "EShaderType", function () { + return v; + }), + n.d(i, "EParameterType", function () { + return y; + }), + n.d(i, "ETextureWrapMode", function () { + return C; + }), + n.d(i, "ETextureFilterType", function () { + return P; + }), + n.d(i, "ETextureFormat", function () { + return x; + }), + n.d(i, "ECullingType", function () { + return T; + }), + n.d(i, "EBlendingFunction", function () { + return S; + }), + n.d(i, "GLTFUtils", function () { + return Q; + }), + n.d(i, "GLTFMaterialsCommonExtension", function () { + return Se; + }); + var r = {}; + n.r(r), + n.d(r, "ArrayItem", function () { + return Le; + }), + n.d(r, "GLTFLoader", function () { + return Fe; + }), + n.d(r, "EXT_lights_image_based", function () { + return Be; + }), + n.d(r, "KHR_draco_mesh_compression", function () { + return Ge; + }), + n.d(r, "KHR_lights", function () { + return We; + }), + n.d(r, "KHR_materials_pbrSpecularGlossiness", function () { + return Xe; + }), + n.d(r, "KHR_materials_unlit", function () { + return Ye; + }), + n.d(r, "KHR_materials_clearcoat", function () { + return Ke; + }), + n.d(r, "KHR_materials_sheen", function () { + return Ze; + }), + n.d(r, "KHR_materials_specular", function () { + return qe; + }), + n.d(r, "KHR_mesh_quantization", function () { + return Qe; + }), + n.d(r, "KHR_texture_basisu", function () { + return Je; + }), + n.d(r, "KHR_texture_transform", function () { + return $e; + }), + n.d(r, "MSFT_audio_emitter", function () { + return it; + }), + n.d(r, "MSFT_lod", function () { + return rt; + }), + n.d(r, "MSFT_minecraftMesh", function () { + return ot; + }), + n.d(r, "MSFT_sRGBFactors", function () { + return at; + }), + n.d(r, "ExtrasAsMetadata", function () { + return st; + }); + var o = n(6), + a = n(12), + s = n(37), + c = n(119), + l = n(10), + u = n(163); + function h(e, t, n, i) { + var r = { + externalResourceFunction: function (e) { + return i(e).then(function (e) { + return new Uint8Array(e); + }); + }, + }; + return n && (r.uri = "file:" === t ? n : t + n), e instanceof ArrayBuffer ? GLTFValidator.validateBytes(new Uint8Array(e), r) : GLTFValidator.validateString(e, r); + } + function d() { + var e = []; + onmessage = function (t) { + var n = t.data; + switch (n.id) { + case "init": + importScripts(n.url); + break; + case "validate": + h(n.data, n.rootUrl, n.fileName, function (t) { + return new Promise(function (n, i) { + var r = e.length; + e.push({ resolve: n, reject: i }), postMessage({ id: "getExternalResource", index: r, uri: t }); + }); + }).then( + function (e) { + postMessage({ id: "validate.resolve", value: e }); + }, + function (e) { + postMessage({ id: "validate.reject", reason: e }); + } + ); + break; + case "getExternalResource.resolve": + e[n.index].resolve(n.value); + break; + case "getExternalResource.reject": + e[n.index].reject(n.reason); + } + }; + } + var p, + f, + m, + g = (function () { + function e() {} + return ( + (e.ValidateAsync = function (e, t, n, i) { + var r = this; + return "function" == typeof Worker + ? new Promise(function (o, s) { + var c = h + "(" + d + ")()", + l = URL.createObjectURL(new Blob([c], { type: "application/javascript" })), + u = new Worker(l), + p = function (e) { + u.removeEventListener("error", p), u.removeEventListener("message", f), s(e); + }, + f = function (e) { + var t = e.data; + switch (t.id) { + case "getExternalResource": + i(t.uri).then( + function (e) { + u.postMessage({ id: "getExternalResource.resolve", index: t.index, value: e }, [e]); + }, + function (e) { + u.postMessage({ id: "getExternalResource.reject", index: t.index, reason: e }); + } + ); + break; + case "validate.resolve": + u.removeEventListener("error", p), u.removeEventListener("message", f), o(t.value); + break; + case "validate.reject": + u.removeEventListener("error", p), u.removeEventListener("message", f), s(t.reason); + } + }; + u.addEventListener("error", p), + u.addEventListener("message", f), + u.postMessage({ id: "init", url: a.b.GetAbsoluteUrl(r.Configuration.url) }), + u.postMessage({ id: "validate", data: e, rootUrl: t, fileName: n }); + }) + : (this._LoadScriptPromise || (this._LoadScriptPromise = a.b.LoadScriptAsync(this.Configuration.url)), + this._LoadScriptPromise.then(function () { + return h(e, t, n, i); + })); + }), + (e.Configuration = { url: "assets/babylonjs/gltf_validator.js" }), + e + ); + })(); + !(function (e) { + (e[(e.AUTO = 0)] = "AUTO"), (e[(e.FORCE_RIGHT_HANDED = 1)] = "FORCE_RIGHT_HANDED"); + })(p || (p = {})), + (function (e) { + (e[(e.NONE = 0)] = "NONE"), (e[(e.FIRST = 1)] = "FIRST"), (e[(e.ALL = 2)] = "ALL"); + })(f || (f = {})), + (function (e) { + (e[(e.LOADING = 0)] = "LOADING"), (e[(e.READY = 1)] = "READY"), (e[(e.COMPLETE = 2)] = "COMPLETE"); + })(m || (m = {})); + var b = (function () { + function e() { + (this.onParsedObservable = new o.c()), + (this.coordinateSystemMode = p.AUTO), + (this.animationStartMode = f.FIRST), + (this.compileMaterials = !1), + (this.useClipPlane = !1), + (this.compileShadowGenerators = !1), + (this.transparencyAsCoverage = !1), + (this.useRangeRequests = !1), + (this.createInstances = !0), + (this.preprocessUrlAsync = function (e) { + return Promise.resolve(e); + }), + (this.onMeshLoadedObservable = new o.c()), + (this.onTextureLoadedObservable = new o.c()), + (this.onMaterialLoadedObservable = new o.c()), + (this.onCameraLoadedObservable = new o.c()), + (this.onCompleteObservable = new o.c()), + (this.onErrorObservable = new o.c()), + (this.onDisposeObservable = new o.c()), + (this.onExtensionLoadedObservable = new o.c()), + (this.validate = !1), + (this.onValidatedObservable = new o.c()), + (this._loader = null), + (this.name = "gltf"), + (this.extensions = { ".gltf": { isBinary: !1 }, ".glb": { isBinary: !0 } }), + (this._logIndentLevel = 0), + (this._loggingEnabled = !1), + (this._log = this._logDisabled), + (this._capturePerformanceCounters = !1), + (this._startPerformanceCounter = this._startPerformanceCounterDisabled), + (this._endPerformanceCounter = this._endPerformanceCounterDisabled); + } + return ( + Object.defineProperty(e.prototype, "onParsed", { + set: function (e) { + this._onParsedObserver && this.onParsedObservable.remove(this._onParsedObserver), (this._onParsedObserver = this.onParsedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onMeshLoaded", { + set: function (e) { + this._onMeshLoadedObserver && this.onMeshLoadedObservable.remove(this._onMeshLoadedObserver), (this._onMeshLoadedObserver = this.onMeshLoadedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onTextureLoaded", { + set: function (e) { + this._onTextureLoadedObserver && this.onTextureLoadedObservable.remove(this._onTextureLoadedObserver), (this._onTextureLoadedObserver = this.onTextureLoadedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onMaterialLoaded", { + set: function (e) { + this._onMaterialLoadedObserver && this.onMaterialLoadedObservable.remove(this._onMaterialLoadedObserver), (this._onMaterialLoadedObserver = this.onMaterialLoadedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onCameraLoaded", { + set: function (e) { + this._onCameraLoadedObserver && this.onCameraLoadedObservable.remove(this._onCameraLoadedObserver), (this._onCameraLoadedObserver = this.onCameraLoadedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onComplete", { + set: function (e) { + this._onCompleteObserver && this.onCompleteObservable.remove(this._onCompleteObserver), (this._onCompleteObserver = this.onCompleteObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onError", { + set: function (e) { + this._onErrorObserver && this.onErrorObservable.remove(this._onErrorObserver), (this._onErrorObserver = this.onErrorObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onDispose", { + set: function (e) { + this._onDisposeObserver && this.onDisposeObservable.remove(this._onDisposeObserver), (this._onDisposeObserver = this.onDisposeObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onExtensionLoaded", { + set: function (e) { + this._onExtensionLoadedObserver && this.onExtensionLoadedObservable.remove(this._onExtensionLoadedObserver), (this._onExtensionLoadedObserver = this.onExtensionLoadedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "loggingEnabled", { + get: function () { + return this._loggingEnabled; + }, + set: function (e) { + this._loggingEnabled !== e && ((this._loggingEnabled = e), this._loggingEnabled ? (this._log = this._logEnabled) : (this._log = this._logDisabled)); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "capturePerformanceCounters", { + get: function () { + return this._capturePerformanceCounters; + }, + set: function (e) { + this._capturePerformanceCounters !== e && + ((this._capturePerformanceCounters = e), + this._capturePerformanceCounters + ? ((this._startPerformanceCounter = this._startPerformanceCounterEnabled), (this._endPerformanceCounter = this._endPerformanceCounterEnabled)) + : ((this._startPerformanceCounter = this._startPerformanceCounterDisabled), (this._endPerformanceCounter = this._endPerformanceCounterDisabled))); + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "onValidated", { + set: function (e) { + this._onValidatedObserver && this.onValidatedObservable.remove(this._onValidatedObserver), (this._onValidatedObserver = this.onValidatedObservable.add(e)); + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + this._loader && (this._loader.dispose(), (this._loader = null)), this._clear(), this.onDisposeObservable.notifyObservers(void 0), this.onDisposeObservable.clear(); + }), + (e.prototype._clear = function () { + (this.preprocessUrlAsync = function (e) { + return Promise.resolve(e); + }), + this.onMeshLoadedObservable.clear(), + this.onTextureLoadedObservable.clear(), + this.onMaterialLoadedObservable.clear(), + this.onCameraLoadedObservable.clear(), + this.onCompleteObservable.clear(), + this.onExtensionLoadedObservable.clear(); + }), + (e.prototype.requestFile = function (e, t, n, i, r, s) { + var c = this; + if (r) { + if (this.useRangeRequests) { + this.validate && l.a.Warn("glTF validation is not supported when range requests are enabled"); + var h = new Array(), + d = { + abort: function () { + return h.forEach(function (e) { + return e.abort(); + }); + }, + onCompleteObservable: new o.c(), + }, + p = { + readAsync: function (n, r) { + return new Promise(function (o, a) { + h.push( + e._requestFile( + t, + function (e, t) { + var n = t.getResponseHeader("Content-Range"); + n && (p.byteLength = Number(n.split("/")[1])), o(new Uint8Array(e)); + }, + i, + !0, + !0, + function (e) { + a(e); + }, + function (e) { + e.setRequestHeader("Range", "bytes=" + n + "-" + (n + r - 1)); + } + ) + ); + }); + }, + byteLength: 0, + }; + return ( + this._unpackBinaryAsync(new u.a(p)).then(function (e) { + d.onCompleteObservable.notifyObservers(d), n(e); + }, s), + d + ); + } + return e._requestFile( + t, + function (e, t) { + var i = e; + c._unpackBinaryAsync( + new u.a({ + readAsync: function (e, t) { + return Promise.resolve(new Uint8Array(i, e, t)); + }, + byteLength: i.byteLength, + }) + ).then(function (e) { + n(e, t); + }, s); + }, + i, + !0, + !0, + s + ); + } + return e._requestFile( + t, + function (i, r) { + c._validate(e, i, a.b.GetFolderPath(t), a.b.GetFilename(t)), n({ json: c._parseJson(i) }, r); + }, + i, + !0, + !1, + s + ); + }), + (e.prototype.readFile = function (e, t, n, i, r, o) { + var a = this; + return e._readFile( + t, + function (i) { + if ((a._validate(e, i, "file:", t.name), r)) { + var s = i; + a._unpackBinaryAsync( + new u.a({ + readAsync: function (e, t) { + return Promise.resolve(new Uint8Array(s, e, t)); + }, + byteLength: s.byteLength, + }) + ).then(n, o); + } else n({ json: a._parseJson(i) }); + }, + i, + r, + o + ); + }), + (e.prototype.importMeshAsync = function (e, t, n, i, r, o) { + var a = this; + return Promise.resolve().then(function () { + return a.onParsedObservable.notifyObservers(n), a.onParsedObservable.clear(), a._log("Loading " + (o || "")), (a._loader = a._getLoader(n)), a._loader.importMeshAsync(e, t, !1, n, i, r, o); + }); + }), + (e.prototype.loadAsync = function (e, t, n, i, r) { + var o = this; + return Promise.resolve().then(function () { + return o.onParsedObservable.notifyObservers(t), o.onParsedObservable.clear(), o._log("Loading " + (r || "")), (o._loader = o._getLoader(t)), o._loader.loadAsync(e, t, n, i, r); + }); + }), + (e.prototype.loadAssetContainerAsync = function (e, t, n, i, r) { + var o = this; + return Promise.resolve().then(function () { + o.onParsedObservable.notifyObservers(t), o.onParsedObservable.clear(), o._log("Loading " + (r || "")), (o._loader = o._getLoader(t)); + var a = []; + o.onMaterialLoadedObservable.add(function (e) { + a.push(e); + }); + var s = []; + return ( + o.onTextureLoadedObservable.add(function (e) { + s.push(e); + }), + o._loader.importMeshAsync(null, e, !0, t, n, i, r).then(function (t) { + var n = new c.a(e); + return ( + Array.prototype.push.apply(n.meshes, t.meshes), + Array.prototype.push.apply(n.particleSystems, t.particleSystems), + Array.prototype.push.apply(n.skeletons, t.skeletons), + Array.prototype.push.apply(n.animationGroups, t.animationGroups), + Array.prototype.push.apply(n.materials, a), + Array.prototype.push.apply(n.textures, s), + Array.prototype.push.apply(n.lights, t.lights), + Array.prototype.push.apply(n.transformNodes, t.transformNodes), + n + ); + }) + ); + }); + }), + (e.prototype.canDirectLoad = function (e) { + return -1 !== e.indexOf("asset") && -1 !== e.indexOf("version"); + }), + (e.prototype.directLoad = function (e, t) { + return this._validate(e, t), { json: this._parseJson(t) }; + }), + (e.prototype.createPlugin = function () { + return new e(); + }), + Object.defineProperty(e.prototype, "loaderState", { + get: function () { + return this._loader ? this._loader.state : null; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.whenCompleteAsync = function () { + var e = this; + return new Promise(function (t, n) { + e.onCompleteObservable.addOnce(function () { + t(); + }), + e.onErrorObservable.addOnce(function (e) { + n(e); + }); + }); + }), + (e.prototype._validate = function (e, t, n, i) { + var r = this; + void 0 === n && (n = ""), + void 0 === i && (i = ""), + this.validate && + (this._startPerformanceCounter("Validate JSON"), + g + .ValidateAsync(t, n, i, function (t) { + return r.preprocessUrlAsync(n + t).then(function (t) { + return e._loadFileAsync(t, void 0, !0, !0); + }); + }) + .then( + function (e) { + r._endPerformanceCounter("Validate JSON"), r.onValidatedObservable.notifyObservers(e), r.onValidatedObservable.clear(); + }, + function (e) { + r._endPerformanceCounter("Validate JSON"), a.b.Warn("Failed to validate: " + e.message), r.onValidatedObservable.clear(); + } + )); + }), + (e.prototype._getLoader = function (t) { + var n = t.json.asset || {}; + this._log("Asset version: " + n.version), n.minVersion && this._log("Asset minimum version: " + n.minVersion), n.generator && this._log("Asset generator: " + n.generator); + var i = e._parseVersion(n.version); + if (!i) throw new Error("Invalid version: " + n.version); + if (void 0 !== n.minVersion) { + var r = e._parseVersion(n.minVersion); + if (!r) throw new Error("Invalid minimum version: " + n.minVersion); + if (e._compareVersion(r, { major: 2, minor: 0 }) > 0) throw new Error("Incompatible minimum version: " + n.minVersion); + } + var o = { 1: e._CreateGLTF1Loader, 2: e._CreateGLTF2Loader }[i.major]; + if (!o) throw new Error("Unsupported version: " + n.version); + return o(this); + }), + (e.prototype._parseJson = function (e) { + this._startPerformanceCounter("Parse JSON"), this._log("JSON length: " + e.length); + var t = JSON.parse(e); + return this._endPerformanceCounter("Parse JSON"), t; + }), + (e.prototype._unpackBinaryAsync = function (e) { + var t = this; + return ( + this._startPerformanceCounter("Unpack Binary"), + e.loadAsync(20).then(function () { + var n = e.readUint32(); + if (1179937895 !== n) throw new Error("Unexpected magic: " + n); + var i = e.readUint32(); + t.loggingEnabled && t._log("Binary version: " + i); + var r, + o = e.readUint32(); + if (0 != e.buffer.byteLength && o !== e.buffer.byteLength) throw new Error("Length in header does not match actual data length: " + o + " != " + e.buffer.byteLength); + switch (i) { + case 1: + r = t._unpackBinaryV1Async(e, o); + break; + case 2: + r = t._unpackBinaryV2Async(e, o); + break; + default: + throw new Error("Unsupported version: " + i); + } + return t._endPerformanceCounter("Unpack Binary"), r; + }) + ); + }), + (e.prototype._unpackBinaryV1Async = function (e, t) { + var n = e.readUint32(), + i = e.readUint32(); + if (0 !== i) throw new Error("Unexpected content format: " + i); + var r = t - e.byteOffset, + o = { json: this._parseJson(e.readString(n)), bin: null }; + if (0 !== r) { + var a = e.byteOffset; + o.bin = { + readAsync: function (t, n) { + return e.buffer.readAsync(a + t, n); + }, + byteLength: r, + }; + } + return Promise.resolve(o); + }), + (e.prototype._unpackBinaryV2Async = function (e, t) { + var n = this, + i = 1313821514, + r = 5130562, + o = e.readUint32(); + if (e.readUint32() !== i) throw new Error("First chunk format is not JSON"); + return e.byteOffset + o === t + ? e.loadAsync(o).then(function () { + return { json: n._parseJson(e.readString(o)), bin: null }; + }) + : e.loadAsync(o + 8).then(function () { + var a = { json: n._parseJson(e.readString(o)), bin: null }, + s = function () { + var n = e.readUint32(); + switch (e.readUint32()) { + case i: + throw new Error("Unexpected JSON chunk"); + case r: + var o = e.byteOffset; + (a.bin = { + readAsync: function (t, n) { + return e.buffer.readAsync(o + t, n); + }, + byteLength: n, + }), + e.skipBytes(n); + break; + default: + e.skipBytes(n); + } + return e.byteOffset !== t ? e.loadAsync(8).then(s) : Promise.resolve(a); + }; + return s(); + }); + }), + (e._parseVersion = function (e) { + if ("1.0" === e || "1.0.1" === e) return { major: 1, minor: 0 }; + var t = (e + "").match(/^(\d+)\.(\d+)/); + return t ? { major: parseInt(t[1]), minor: parseInt(t[2]) } : null; + }), + (e._compareVersion = function (e, t) { + return e.major > t.major ? 1 : e.major < t.major ? -1 : e.minor > t.minor ? 1 : e.minor < t.minor ? -1 : 0; + }), + (e.prototype._logOpen = function (e) { + this._log(e), this._logIndentLevel++; + }), + (e.prototype._logClose = function () { + --this._logIndentLevel; + }), + (e.prototype._logEnabled = function (t) { + var n = e._logSpaces.substr(0, 2 * this._logIndentLevel); + l.a.Log("" + n + t); + }), + (e.prototype._logDisabled = function (e) {}), + (e.prototype._startPerformanceCounterEnabled = function (e) { + a.b.StartPerformanceCounter(e); + }), + (e.prototype._startPerformanceCounterDisabled = function (e) {}), + (e.prototype._endPerformanceCounterEnabled = function (e) { + a.b.EndPerformanceCounter(e); + }), + (e.prototype._endPerformanceCounterDisabled = function (e) {}), + (e.IncrementalLoading = !0), + (e.HomogeneousCoordinates = !1), + (e._logSpaces = " "), + e + ); + })(); + s.a && s.a.RegisterPlugin(new b()); + var _, + v, + y, + C, + P, + x, + T, + S, + O = n(2); + !(function (e) { + (e[(e.BYTE = 5120)] = "BYTE"), (e[(e.UNSIGNED_BYTE = 5121)] = "UNSIGNED_BYTE"), (e[(e.SHORT = 5122)] = "SHORT"), (e[(e.UNSIGNED_SHORT = 5123)] = "UNSIGNED_SHORT"), (e[(e.FLOAT = 5126)] = "FLOAT"); + })(_ || (_ = {})), + (function (e) { + (e[(e.FRAGMENT = 35632)] = "FRAGMENT"), (e[(e.VERTEX = 35633)] = "VERTEX"); + })(v || (v = {})), + (function (e) { + (e[(e.BYTE = 5120)] = "BYTE"), + (e[(e.UNSIGNED_BYTE = 5121)] = "UNSIGNED_BYTE"), + (e[(e.SHORT = 5122)] = "SHORT"), + (e[(e.UNSIGNED_SHORT = 5123)] = "UNSIGNED_SHORT"), + (e[(e.INT = 5124)] = "INT"), + (e[(e.UNSIGNED_INT = 5125)] = "UNSIGNED_INT"), + (e[(e.FLOAT = 5126)] = "FLOAT"), + (e[(e.FLOAT_VEC2 = 35664)] = "FLOAT_VEC2"), + (e[(e.FLOAT_VEC3 = 35665)] = "FLOAT_VEC3"), + (e[(e.FLOAT_VEC4 = 35666)] = "FLOAT_VEC4"), + (e[(e.INT_VEC2 = 35667)] = "INT_VEC2"), + (e[(e.INT_VEC3 = 35668)] = "INT_VEC3"), + (e[(e.INT_VEC4 = 35669)] = "INT_VEC4"), + (e[(e.BOOL = 35670)] = "BOOL"), + (e[(e.BOOL_VEC2 = 35671)] = "BOOL_VEC2"), + (e[(e.BOOL_VEC3 = 35672)] = "BOOL_VEC3"), + (e[(e.BOOL_VEC4 = 35673)] = "BOOL_VEC4"), + (e[(e.FLOAT_MAT2 = 35674)] = "FLOAT_MAT2"), + (e[(e.FLOAT_MAT3 = 35675)] = "FLOAT_MAT3"), + (e[(e.FLOAT_MAT4 = 35676)] = "FLOAT_MAT4"), + (e[(e.SAMPLER_2D = 35678)] = "SAMPLER_2D"); + })(y || (y = {})), + (function (e) { + (e[(e.CLAMP_TO_EDGE = 33071)] = "CLAMP_TO_EDGE"), (e[(e.MIRRORED_REPEAT = 33648)] = "MIRRORED_REPEAT"), (e[(e.REPEAT = 10497)] = "REPEAT"); + })(C || (C = {})), + (function (e) { + (e[(e.NEAREST = 9728)] = "NEAREST"), + (e[(e.LINEAR = 9728)] = "LINEAR"), + (e[(e.NEAREST_MIPMAP_NEAREST = 9984)] = "NEAREST_MIPMAP_NEAREST"), + (e[(e.LINEAR_MIPMAP_NEAREST = 9985)] = "LINEAR_MIPMAP_NEAREST"), + (e[(e.NEAREST_MIPMAP_LINEAR = 9986)] = "NEAREST_MIPMAP_LINEAR"), + (e[(e.LINEAR_MIPMAP_LINEAR = 9987)] = "LINEAR_MIPMAP_LINEAR"); + })(P || (P = {})), + (function (e) { + (e[(e.ALPHA = 6406)] = "ALPHA"), (e[(e.RGB = 6407)] = "RGB"), (e[(e.RGBA = 6408)] = "RGBA"), (e[(e.LUMINANCE = 6409)] = "LUMINANCE"), (e[(e.LUMINANCE_ALPHA = 6410)] = "LUMINANCE_ALPHA"); + })(x || (x = {})), + (function (e) { + (e[(e.FRONT = 1028)] = "FRONT"), (e[(e.BACK = 1029)] = "BACK"), (e[(e.FRONT_AND_BACK = 1032)] = "FRONT_AND_BACK"); + })(T || (T = {})), + (function (e) { + (e[(e.ZERO = 0)] = "ZERO"), + (e[(e.ONE = 1)] = "ONE"), + (e[(e.SRC_COLOR = 768)] = "SRC_COLOR"), + (e[(e.ONE_MINUS_SRC_COLOR = 769)] = "ONE_MINUS_SRC_COLOR"), + (e[(e.DST_COLOR = 774)] = "DST_COLOR"), + (e[(e.ONE_MINUS_DST_COLOR = 775)] = "ONE_MINUS_DST_COLOR"), + (e[(e.SRC_ALPHA = 770)] = "SRC_ALPHA"), + (e[(e.ONE_MINUS_SRC_ALPHA = 771)] = "ONE_MINUS_SRC_ALPHA"), + (e[(e.DST_ALPHA = 772)] = "DST_ALPHA"), + (e[(e.ONE_MINUS_DST_ALPHA = 773)] = "ONE_MINUS_DST_ALPHA"), + (e[(e.CONSTANT_COLOR = 32769)] = "CONSTANT_COLOR"), + (e[(e.ONE_MINUS_CONSTANT_COLOR = 32770)] = "ONE_MINUS_CONSTANT_COLOR"), + (e[(e.CONSTANT_ALPHA = 32771)] = "CONSTANT_ALPHA"), + (e[(e.ONE_MINUS_CONSTANT_ALPHA = 32772)] = "ONE_MINUS_CONSTANT_ALPHA"), + (e[(e.SRC_ALPHA_SATURATE = 776)] = "SRC_ALPHA_SATURATE"); + })(S || (S = {})); + var E, + M = n(1), + A = n(5), + I = n(26), + D = n(67), + R = n(27), + w = n(110), + L = n(129), + F = n(7), + N = n(28), + k = n(94), + z = n(33), + j = n(106), + B = n(8), + V = n(16), + G = n(4), + U = n(79), + H = n(78), + W = n(31), + X = n(9), + Y = n(96), + K = n(115), + Z = n(123), + q = n(122), + Q = (function () { + function e() {} + return ( + (e.SetMatrix = function (e, t, n, i, r) { + var o = null; + if ( + ("MODEL" === n.semantic + ? (o = t.getWorldMatrix()) + : "PROJECTION" === n.semantic + ? (o = e.getProjectionMatrix()) + : "VIEW" === n.semantic + ? (o = e.getViewMatrix()) + : "MODELVIEWINVERSETRANSPOSE" === n.semantic + ? (o = M.a.Transpose(t.getWorldMatrix().multiply(e.getViewMatrix()).invert())) + : "MODELVIEW" === n.semantic + ? (o = t.getWorldMatrix().multiply(e.getViewMatrix())) + : "MODELVIEWPROJECTION" === n.semantic + ? (o = t.getWorldMatrix().multiply(e.getTransformMatrix())) + : "MODELINVERSE" === n.semantic + ? (o = t.getWorldMatrix().invert()) + : "VIEWINVERSE" === n.semantic + ? (o = e.getViewMatrix().invert()) + : "PROJECTIONINVERSE" === n.semantic + ? (o = e.getProjectionMatrix().invert()) + : "MODELVIEWINVERSE" === n.semantic + ? (o = t.getWorldMatrix().multiply(e.getViewMatrix()).invert()) + : "MODELVIEWPROJECTIONINVERSE" === n.semantic + ? (o = t.getWorldMatrix().multiply(e.getTransformMatrix()).invert()) + : "MODELINVERSETRANSPOSE" === n.semantic && (o = M.a.Transpose(t.getWorldMatrix().invert())), + o) + ) + switch (n.type) { + case y.FLOAT_MAT2: + r.setMatrix2x2(i, M.a.GetAsMatrix2x2(o)); + break; + case y.FLOAT_MAT3: + r.setMatrix3x3(i, M.a.GetAsMatrix3x3(o)); + break; + case y.FLOAT_MAT4: + r.setMatrix(i, o); + } + }), + (e.SetUniform = function (e, t, n, i) { + switch (i) { + case y.FLOAT: + return e.setFloat(t, n), !0; + case y.FLOAT_VEC2: + return e.setVector2(t, M.d.FromArray(n)), !0; + case y.FLOAT_VEC3: + return e.setVector3(t, M.e.FromArray(n)), !0; + case y.FLOAT_VEC4: + return e.setVector4(t, M.f.FromArray(n)), !0; + default: + return !1; + } + }), + (e.GetWrapMode = function (e) { + switch (e) { + case C.CLAMP_TO_EDGE: + return B.a.CLAMP_ADDRESSMODE; + case C.MIRRORED_REPEAT: + return B.a.MIRROR_ADDRESSMODE; + case C.REPEAT: + default: + return B.a.WRAP_ADDRESSMODE; + } + }), + (e.GetByteStrideFromType = function (e) { + switch (e.type) { + case "VEC2": + return 2; + case "VEC3": + return 3; + case "VEC4": + case "MAT2": + return 4; + case "MAT3": + return 9; + case "MAT4": + return 16; + default: + return 1; + } + }), + (e.GetTextureFilterMode = function (e) { + switch (e) { + case P.LINEAR: + case P.LINEAR_MIPMAP_NEAREST: + case P.LINEAR_MIPMAP_LINEAR: + return B.a.TRILINEAR_SAMPLINGMODE; + case P.NEAREST: + case P.NEAREST_MIPMAP_NEAREST: + return B.a.NEAREST_SAMPLINGMODE; + default: + return B.a.BILINEAR_SAMPLINGMODE; + } + }), + (e.GetBufferFromBufferView = function (e, t, n, i, r) { + n = t.byteOffset + n; + var o = e.loadedBufferViews[t.buffer]; + if (n + i > o.byteLength) throw new Error("Buffer access is out of range"); + var a = o.buffer; + switch (((n += o.byteOffset), r)) { + case _.BYTE: + return new Int8Array(a, n, i); + case _.UNSIGNED_BYTE: + return new Uint8Array(a, n, i); + case _.SHORT: + return new Int16Array(a, n, i); + case _.UNSIGNED_SHORT: + return new Uint16Array(a, n, i); + default: + return new Float32Array(a, n, i); + } + }), + (e.GetBufferFromAccessor = function (t, n) { + var i = t.bufferViews[n.bufferView], + r = n.count * e.GetByteStrideFromType(n); + return e.GetBufferFromBufferView(t, i, n.byteOffset, r, n.componentType); + }), + (e.DecodeBufferToText = function (e) { + for (var t = "", n = e.byteLength, i = 0; i < n; ++i) t += String.fromCharCode(e[i]); + return t; + }), + (e.GetDefaultMaterial = function (t) { + if (!e._DefaultMaterial) { + (F.a.ShadersStore.GLTFDefaultMaterialVertexShader = [ + "precision highp float;", + "", + "uniform mat4 worldView;", + "uniform mat4 projection;", + "", + "attribute vec3 position;", + "", + "void main(void)", + "{", + " gl_Position = projection * worldView * vec4(position, 1.0);", + "}", + ].join("\n")), + (F.a.ShadersStore.GLTFDefaultMaterialPixelShader = ["precision highp float;", "", "uniform vec4 u_emission;", "", "void main(void)", "{", " gl_FragColor = u_emission;", "}"].join("\n")); + var n = { attributes: ["position"], uniforms: ["worldView", "projection", "u_emission"], samplers: new Array(), needAlphaBlending: !1 }; + (e._DefaultMaterial = new j.a("GLTFDefaultMaterial", t, { vertex: "GLTFDefaultMaterial", fragment: "GLTFDefaultMaterial" }, n)), e._DefaultMaterial.setColor4("u_emission", new A.b(0.5, 0.5, 0.5, 1)); + } + return e._DefaultMaterial; + }), + (e._DefaultMaterial = null), + e + ); + })(), + J = n(80); + !(function (e) { + (e[(e.IDENTIFIER = 1)] = "IDENTIFIER"), (e[(e.UNKNOWN = 2)] = "UNKNOWN"), (e[(e.END_OF_INPUT = 3)] = "END_OF_INPUT"); + })(E || (E = {})); + var $ = (function () { + function e(e) { + (this._pos = 0), (this.currentToken = E.UNKNOWN), (this.currentIdentifier = ""), (this.currentString = ""), (this.isLetterOrDigitPattern = /^[a-zA-Z0-9]+$/), (this._toParse = e), (this._maxPos = e.length); + } + return ( + (e.prototype.getNextToken = function () { + if (this.isEnd()) return E.END_OF_INPUT; + if (((this.currentString = this.read()), (this.currentToken = E.UNKNOWN), "_" === this.currentString || this.isLetterOrDigitPattern.test(this.currentString))) + for (this.currentToken = E.IDENTIFIER, this.currentIdentifier = this.currentString; !this.isEnd() && (this.isLetterOrDigitPattern.test((this.currentString = this.peek())) || "_" === this.currentString); ) + (this.currentIdentifier += this.currentString), this.forward(); + return this.currentToken; + }), + (e.prototype.peek = function () { + return this._toParse[this._pos]; + }), + (e.prototype.read = function () { + return this._toParse[this._pos++]; + }), + (e.prototype.forward = function () { + this._pos++; + }), + (e.prototype.isEnd = function () { + return this._pos >= this._maxPos; + }), + e + ); + })(), + ee = ["MODEL", "VIEW", "PROJECTION", "MODELVIEW", "MODELVIEWPROJECTION", "JOINTMATRIX"], + te = ["world", "view", "projection", "worldView", "worldViewProjection", "mBones"], + ne = ["translation", "rotation", "scale"], + ie = ["position", "rotationQuaternion", "scaling"], + re = function (e, t, n) { + for (var i in e) { + var r = e[i]; + n[t][i] = r; + } + }, + oe = function (e) { + if (e) for (var t = 0; t < e.length / 2; t++) e[2 * t + 1] = 1 - e[2 * t + 1]; + }, + ae = function (e) { + if ("NORMAL" === e.semantic) return "normal"; + if ("POSITION" === e.semantic) return "position"; + if ("JOINT" === e.semantic) return "matricesIndices"; + if ("WEIGHT" === e.semantic) return "matricesWeights"; + if ("COLOR" === e.semantic) return "color"; + if (e.semantic && -1 !== e.semantic.indexOf("TEXCOORD_")) { + var t = Number(e.semantic.split("_")[1]); + return "uv" + (0 === t ? "" : t + 1); + } + return null; + }, + se = function (e) { + var t = null; + if (e.translation || e.rotation || e.scale) { + var n = M.e.FromArray(e.scale || [1, 1, 1]), + i = M.b.FromArray(e.rotation || [0, 0, 0, 1]), + r = M.e.FromArray(e.translation || [0, 0, 0]); + t = M.a.Compose(n, i, r); + } else t = M.a.FromArray(e.matrix); + return t; + }, + ce = function (e, t, n, i) { + for (var r = 0; r < i.bones.length; r++) if (i.bones[r].name === n) return i.bones[r]; + var o = e.nodes; + for (var a in o) { + var s = o[a]; + if (s.jointName) { + var c = s.children; + for (r = 0; r < c.length; r++) { + var l = e.nodes[c[r]]; + if (l.jointName && l.jointName === n) { + var u = se(s), + h = new w.a(s.name || "", i, ce(e, t, s.jointName, i), u); + return (h.id = a), h; + } + } + } + } + return null; + }, + le = function (e, t) { + for (var n = 0; n < e.length; n++) + for (var i = e[n], r = 0; r < i.node.children.length; r++) { + if (i.node.children[r] === t) return i.bone; + } + return null; + }, + ue = function (e, t) { + var n = e.nodes, + i = n[t]; + if (i) return { node: i, id: t }; + for (var r in n) if ((i = n[r]).jointName === t) return { node: i, id: r }; + return null; + }, + he = function (e, t) { + for (var n = 0; n < e.jointNames.length; n++) if (e.jointNames[n] === t) return !0; + return !1; + }, + de = function (e, t, n, i, r) { + if ((i || (i = new L.a(t.name || "", "", e.scene)), !t.babylonSkeleton)) return i; + var o = [], + s = []; + !(function (e, t, n, i) { + for (var r in e.nodes) { + var o = e.nodes[r], + a = r; + if (o.jointName && !he(n, o.jointName)) { + var s = se(o), + c = new w.a(o.name || "", t, null, s); + (c.id = a), i.push({ bone: c, node: o, id: a }); + } + } + for (var l = 0; l < i.length; l++) + for (var u = i[l], h = u.node.children, d = 0; d < h.length; d++) { + for (var p = null, f = 0; f < i.length; f++) + if (i[f].id === h[d]) { + p = i[f]; + break; + } + p && ((p.bone._parent = u.bone), u.bone.children.push(p.bone)); + } + })(e, i, t, o), + (i.bones = []); + for (var c = 0; c < t.jointNames.length; c++) { + if ((y = ue(e, t.jointNames[c]))) { + var l = y.node; + if (l) { + r = y.id; + var u = e.scene.getBoneByID(r); + if (u) i.bones.push(u); + else { + for (var h = !1, d = null, p = 0; p < c; p++) { + var f = ue(e, t.jointNames[p]); + if (f) { + var m = f.node; + if (m) { + var g = m.children; + if (g) { + h = !1; + for (var b = 0; b < g.length; b++) + if (g[b] === r) { + (d = ce(e, t, t.jointNames[p], i)), (h = !0); + break; + } + if (h) break; + } + } else a.b.Warn("Joint named " + t.jointNames[p] + " does not exist when looking for parent"); + } + } + var _ = se(l); + !d && o.length > 0 && (d = le(o, r)) && -1 === s.indexOf(d) && s.push(d), (new w.a(l.jointName || "", i, d, _).id = r); + } + } else a.b.Warn("Joint named " + t.jointNames[c] + " does not exist"); + } + } + var v = i.bones; + i.bones = []; + for (c = 0; c < t.jointNames.length; c++) { + var y; + if ((y = ue(e, t.jointNames[c]))) + for (p = 0; p < v.length; p++) + if (v[p].id === y.id) { + i.bones.push(v[p]); + break; + } + } + i.prepare(); + for (c = 0; c < s.length; c++) i.bones.push(s[c]); + return i; + }, + pe = function (e, t, n, i, r) { + if ((r || ((e.scene._blockEntityCollection = e.forAssetContainer), (r = new X.a(t.name || "", e.scene)), (e.scene._blockEntityCollection = !1), (r.id = i)), !t.babylonNode)) return r; + for (var o, a = [], s = null, c = new Array(), l = new Array(), u = new Array(), h = new Array(), d = 0; d < n.length; d++) { + var p = n[d]; + if ((A = e.meshes[p])) + for (var f = 0; f < A.primitives.length; f++) { + var m = new V.a(), + g = A.primitives[f]; + g.mode; + var _ = g.attributes, + v = null, + y = null; + for (var C in _) + if (((v = e.accessors[_[C]]), (y = Q.GetBufferFromAccessor(e, v)), "NORMAL" === C)) (m.normals = new Float32Array(y.length)), m.normals.set(y); + else if ("POSITION" === C) { + if (b.HomogeneousCoordinates) { + m.positions = new Float32Array(y.length - y.length / 4); + for (var P = 0; P < y.length; P += 4) (m.positions[P] = y[P]), (m.positions[P + 1] = y[P + 1]), (m.positions[P + 2] = y[P + 2]); + } else (m.positions = new Float32Array(y.length)), m.positions.set(y); + l.push(m.positions.length); + } else if (-1 !== C.indexOf("TEXCOORD_")) { + var x = Number(C.split("_")[1]), + T = G.b.UVKind + (0 === x ? "" : x + 1), + S = new Float32Array(y.length); + S.set(y), oe(S), m.set(S, T); + } else + "JOINT" === C + ? ((m.matricesIndices = new Float32Array(y.length)), m.matricesIndices.set(y)) + : "WEIGHT" === C + ? ((m.matricesWeights = new Float32Array(y.length)), m.matricesWeights.set(y)) + : "COLOR" === C && ((m.colors = new Float32Array(y.length)), m.colors.set(y)); + if ((v = e.accessors[g.indices])) (y = Q.GetBufferFromAccessor(e, v)), (m.indices = new Int32Array(y.length)), m.indices.set(y), h.push(m.indices.length); + else { + var O = []; + for (P = 0; P < m.positions.length / 3; P++) O.push(P); + (m.indices = new Int32Array(O)), h.push(m.indices.length); + } + s ? s.merge(m) : (s = m); + var E = e.scene.getMaterialByID(g.material); + a.push(null === E ? Q.GetDefaultMaterial(e.scene) : E), c.push(0 === c.length ? 0 : c[c.length - 1] + l[l.length - 2]), u.push(0 === u.length ? 0 : u[u.length - 1] + h[h.length - 2]); + } + } + (e.scene._blockEntityCollection = e.forAssetContainer), + a.length > 1 ? ((o = new k.a("multimat" + i, e.scene)).subMaterials = a) : (o = new z.a("multimat" + i, e.scene)), + 1 === a.length && (o = a[0]), + r.material || (r.material = o), + new U.a(i, e.scene, s, !1, r), + r.computeWorldMatrix(!0), + (e.scene._blockEntityCollection = !1), + (r.subMeshes = []); + var M = 0; + for (d = 0; d < n.length; d++) { + var A; + p = n[d]; + if ((A = e.meshes[p])) for (f = 0; f < A.primitives.length; f++) A.primitives[f].mode, H.b.AddToMesh(M, c[M], l[M], u[M], h[M], r, r, !0), M++; + } + return r; + }, + fe = function (e, t, n, i) { + e.position && (e.position = t), (e.rotationQuaternion || e.rotation) && (e.rotationQuaternion = n), e.scaling && (e.scaling = i); + }, + me = function (e, t, n, i) { + var r = null; + if (e.importOnlyMeshes && (t.skin || t.meshes) && e.importMeshesNames && e.importMeshesNames.length > 0 && -1 === e.importMeshesNames.indexOf(t.name || "")) return null; + if (t.skin) { + if (t.meshes) { + var o = e.skins[t.skin]; + ((a = pe(e, t, t.meshes, n, t.babylonNode)).skeleton = e.scene.getLastSkeletonByID(t.skin)), + null === a.skeleton && ((a.skeleton = de(e, o, 0, o.babylonSkeleton, t.skin)), o.babylonSkeleton || (o.babylonSkeleton = a.skeleton)), + (r = a); + } + } else if (t.meshes) { + var a; + r = a = pe(e, t, t.mesh ? [t.mesh] : t.meshes, n, t.babylonNode); + } else if (!t.light || t.babylonNode || e.importOnlyMeshes) { + if (t.camera && !t.babylonNode && !e.importOnlyMeshes) { + var s = e.cameras[t.camera]; + if (s) { + if (((e.scene._blockEntityCollection = e.forAssetContainer), "orthographic" === s.type)) { + var c = new D.a(t.camera, M.e.Zero(), e.scene, !1); + (c.name = t.name || ""), (c.mode = I.a.ORTHOGRAPHIC_CAMERA), c.attachControl(e.scene.getEngine().getInputElement()), (r = c); + } else if ("perspective" === s.type) { + var l = s[s.type], + u = new D.a(t.camera, M.e.Zero(), e.scene, !1); + (u.name = t.name || ""), + u.attachControl(e.scene.getEngine().getInputElement()), + l.aspectRatio || (l.aspectRatio = e.scene.getEngine().getRenderWidth() / e.scene.getEngine().getRenderHeight()), + l.znear && l.zfar && ((u.maxZ = l.zfar), (u.minZ = l.znear)), + (r = u); + } + e.scene._blockEntityCollection = !1; + } + } + } else { + var h = e.lights[t.light]; + if (h) + if ("ambient" === h.type) { + var d = h[h.type], + p = new Y.a(t.light, M.e.Zero(), e.scene); + (p.name = t.name || ""), d.color && (p.diffuse = A.a.FromArray(d.color)), (r = p); + } else if ("directional" === h.type) { + var f = h[h.type], + m = new K.a(t.light, M.e.Zero(), e.scene); + (m.name = t.name || ""), f.color && (m.diffuse = A.a.FromArray(f.color)), (r = m); + } else if ("point" === h.type) { + var g = h[h.type], + b = new Z.a(t.light, M.e.Zero(), e.scene); + (b.name = t.name || ""), g.color && (b.diffuse = A.a.FromArray(g.color)), (r = b); + } else if ("spot" === h.type) { + var _ = h[h.type], + v = new q.a(t.light, M.e.Zero(), M.e.Zero(), 0, 0, e.scene); + (v.name = t.name || ""), _.color && (v.diffuse = A.a.FromArray(_.color)), _.fallOfAngle && (v.angle = _.fallOfAngle), _.fallOffExponent && (v.exponent = _.fallOffExponent), (r = v); + } + } + if (!t.jointName) { + if (t.babylonNode) return t.babylonNode; + if (null === r) { + e.scene._blockEntityCollection = e.forAssetContainer; + var y = new X.a(t.name || "", e.scene); + (e.scene._blockEntityCollection = !1), (t.babylonNode = y), (r = y); + } + } + if (null !== r) { + if (t.matrix && r instanceof X.a) + !(function (e, t, n) { + if (t.matrix) { + var i = new M.e(0, 0, 0), + r = new M.b(), + o = new M.e(0, 0, 0); + M.a.FromArray(t.matrix).decompose(o, r, i), fe(e, i, r, o); + } else t.translation && t.rotation && t.scale && fe(e, M.e.FromArray(t.translation), M.b.FromArray(t.rotation), M.e.FromArray(t.scale)); + e.computeWorldMatrix(!0); + })(r, t); + else { + var C = t.translation || [0, 0, 0], + P = t.rotation || [0, 0, 0, 1], + x = t.scale || [1, 1, 1]; + fe(r, M.e.FromArray(C), M.b.FromArray(P), M.e.FromArray(x)); + } + r.updateCache(!0), (t.babylonNode = r); + } + return r; + }, + ge = function (e, t, n, i) { + void 0 === i && (i = !1); + var r = e.nodes[t], + o = null; + if ( + ((i = !(e.importOnlyMeshes && !i && e.importMeshesNames) || -1 !== e.importMeshesNames.indexOf(r.name || "") || 0 === e.importMeshesNames.length), + !r.jointName && i && null !== (o = me(e, r, t)) && ((o.id = t), (o.parent = n)), + r.children) + ) + for (var a = 0; a < r.children.length; a++) ge(e, r.children[a], o, i); + }, + be = function (e) { + var t = e.currentScene; + if (t) for (var n = 0; n < t.nodes.length; n++) ge(e, t.nodes[n], null); + else + for (var i in e.scenes) { + t = e.scenes[i]; + for (n = 0; n < t.nodes.length; n++) ge(e, t.nodes[n], null); + } + !(function (e) { + for (var t in e.animations) { + var n = e.animations[t]; + if (n.channels && n.samplers) + for (var i = null, r = 0; r < n.channels.length; r++) { + var o = n.channels[r], + s = n.samplers[o.sampler]; + if (s) { + var c = null, + l = null; + n.parameters ? ((c = n.parameters[s.input]), (l = n.parameters[s.output])) : ((c = s.input), (l = s.output)); + var u = Q.GetBufferFromAccessor(e, e.accessors[c]), + h = Q.GetBufferFromAccessor(e, e.accessors[l]), + d = o.target.id, + p = e.scene.getNodeByID(d); + if ((null === p && (p = e.scene.getNodeByName(d)), null !== p)) { + var f = p instanceof w.a, + m = o.target.path, + g = ne.indexOf(m); + -1 !== g && (m = ie[g]); + var b = R.a.ANIMATIONTYPE_MATRIX; + f || ("rotationQuaternion" === m ? ((b = R.a.ANIMATIONTYPE_QUATERNION), (p.rotationQuaternion = new M.b())) : (b = R.a.ANIMATIONTYPE_VECTOR3)); + var _ = null, + v = [], + y = 0, + C = !1; + f && i && i.getKeys().length === u.length && ((_ = i), (C = !0)), + C || ((e.scene._blockEntityCollection = e.forAssetContainer), (_ = new R.a(t, f ? "_matrix" : m, 1, b, R.a.ANIMATIONLOOPMODE_CYCLE)), (e.scene._blockEntityCollection = !1)); + for (var P = 0; P < u.length; P++) { + var x = null; + if (("rotationQuaternion" === m ? ((x = M.b.FromArray([h[y], h[y + 1], h[y + 2], h[y + 3]])), (y += 4)) : ((x = M.e.FromArray([h[y], h[y + 1], h[y + 2]])), (y += 3)), f)) { + var T = p, + S = M.e.Zero(), + O = new M.b(), + E = M.e.Zero(), + A = T.getBaseMatrix(); + C && i && (A = i.getKeys()[P].value), A.decompose(E, O, S), "position" === m ? (S = x) : "rotationQuaternion" === m ? (O = x) : (E = x), (x = M.a.Compose(E, O, S)); + } + C ? i && (i.getKeys()[P].value = x) : v.push({ frame: u[P], value: x }); + } + !C && _ && (_.setKeys(v), p.animations.push(_)), (i = _), e.scene.stopAnimation(p), e.scene.beginAnimation(p, 0, u[u.length - 1], !0, 1); + } else a.b.Warn("Creating animation named " + t + ". But cannot find node named " + d + " to attach to"); + } + } + } + })(e); + for (n = 0; n < e.scene.skeletons.length; n++) { + var r = e.scene.skeletons[n]; + e.scene.beginAnimation(r, 0, Number.MAX_VALUE, !0, 1); + } + }, + _e = function (e, t, n, i, r, o) { + return function (a) { + !(function (e, t, n, i, r) { + var o = i.values || n.parameters, + a = n.uniforms; + for (var s in r) { + var c = r[s], + l = c.type, + u = o[a[s]]; + if ((void 0 === u && (u = c.value), u)) { + var h = function (e) { + return function (n) { + c.value && e && (t.setTexture(e, n), delete r[e]); + }; + }; + l === y.SAMPLER_2D + ? xe.LoadTextureAsync(e, i.values ? u : c.value, h(s), function () { + return h(null); + }) + : c.value && Q.SetUniform(t, s, i.values ? u : c.value, l) && delete r[s]; + } + } + })(e, t, n, i, r), + (t.onBind = function (a) { + !(function (e, t, n, i, r, o, a) { + var s = o.values || r.parameters; + for (var c in n) { + var l = n[c], + u = l.type; + if (u === y.FLOAT_MAT2 || u === y.FLOAT_MAT3 || u === y.FLOAT_MAT4) + if (!l.semantic || l.source || l.node) { + if (l.semantic && (l.source || l.node)) { + var h = t.scene.getNodeByName(l.source || l.node || ""); + if ((null === h && (h = t.scene.getNodeByID(l.source || l.node || "")), null === h)) continue; + Q.SetMatrix(t.scene, h, l, c, i.getEffect()); + } + } else Q.SetMatrix(t.scene, e, l, c, i.getEffect()); + else { + var d = s[r.uniforms[c]]; + if (!d) continue; + if (u === y.SAMPLER_2D) { + var p = t.textures[o.values ? d : l.value].babylonTexture; + if (null == p) continue; + i.getEffect().setTexture(c, p); + } else Q.SetUniform(i.getEffect(), c, d, u); + } + } + a(i); + })(a, e, r, t, n, i, o); + }); + }; + }, + ve = function (e, t, n) { + for (var i in t.uniforms) { + var r = t.uniforms[i], + o = t.parameters[r]; + if (e.currentIdentifier === i && o.semantic && !o.source && !o.node) { + var a = ee.indexOf(o.semantic); + if (-1 !== a) return delete n[i], te[a]; + } + } + return e.currentIdentifier; + }, + ye = function (e) { + for (var t in e.materials) + xe.LoadMaterialAsync( + e, + t, + function (e) {}, + function () {} + ); + }, + Ce = (function () { + function e() {} + return ( + (e.CreateRuntime = function (e, t, n) { + var i = { + extensions: {}, + accessors: {}, + buffers: {}, + bufferViews: {}, + meshes: {}, + lights: {}, + cameras: {}, + nodes: {}, + images: {}, + textures: {}, + shaders: {}, + programs: {}, + samplers: {}, + techniques: {}, + materials: {}, + animations: {}, + skins: {}, + extensionsUsed: [], + scenes: {}, + buffersCount: 0, + shaderscount: 0, + scene: t, + rootUrl: n, + loadedBufferCount: 0, + loadedBufferViews: {}, + loadedShaderCount: 0, + importOnlyMeshes: !1, + dummyNodes: [], + forAssetContainer: !1, + }; + return ( + e.extensions && re(e.extensions, "extensions", i), + e.extensionsUsed && re(e.extensionsUsed, "extensionsUsed", i), + e.buffers && + (function (e, t) { + for (var n in e) { + var i = e[n]; + (t.buffers[n] = i), t.buffersCount++; + } + })(e.buffers, i), + e.bufferViews && re(e.bufferViews, "bufferViews", i), + e.accessors && re(e.accessors, "accessors", i), + e.meshes && re(e.meshes, "meshes", i), + e.lights && re(e.lights, "lights", i), + e.cameras && re(e.cameras, "cameras", i), + e.nodes && re(e.nodes, "nodes", i), + e.images && re(e.images, "images", i), + e.textures && re(e.textures, "textures", i), + e.shaders && + (function (e, t) { + for (var n in e) { + var i = e[n]; + (t.shaders[n] = i), t.shaderscount++; + } + })(e.shaders, i), + e.programs && re(e.programs, "programs", i), + e.samplers && re(e.samplers, "samplers", i), + e.techniques && re(e.techniques, "techniques", i), + e.materials && re(e.materials, "materials", i), + e.animations && re(e.animations, "animations", i), + e.skins && re(e.skins, "skins", i), + e.scenes && (i.scenes = e.scenes), + e.scene && e.scenes && (i.currentScene = e.scenes[e.scene]), + i + ); + }), + (e.LoadBufferAsync = function (e, t, n, i, r) { + var o = e.buffers[t]; + a.b.IsBase64(o.uri) + ? setTimeout(function () { + return n(new Uint8Array(a.b.DecodeBase64(o.uri))); + }) + : a.b.LoadFile( + e.rootUrl + o.uri, + function (e) { + return n(new Uint8Array(e)); + }, + r, + void 0, + !0, + function (e) { + e && i(e.status + " " + e.statusText); + } + ); + }), + (e.LoadTextureBufferAsync = function (e, t, n, i) { + var r = e.textures[t]; + if (r && r.source) + if (r.babylonTexture) n(null); + else { + var o = e.images[r.source]; + a.b.IsBase64(o.uri) + ? setTimeout(function () { + return n(new Uint8Array(a.b.DecodeBase64(o.uri))); + }) + : a.b.LoadFile( + e.rootUrl + o.uri, + function (e) { + return n(new Uint8Array(e)); + }, + void 0, + void 0, + !0, + function (e) { + e && i(e.status + " " + e.statusText); + } + ); + } + else i(""); + }), + (e.CreateTextureAsync = function (e, t, n, i, r) { + var o = e.textures[t]; + if (o.babylonTexture) i(o.babylonTexture); + else { + var a = e.samplers[o.sampler], + s = a.minFilter === P.NEAREST_MIPMAP_NEAREST || a.minFilter === P.NEAREST_MIPMAP_LINEAR || a.minFilter === P.LINEAR_MIPMAP_NEAREST || a.minFilter === P.LINEAR_MIPMAP_LINEAR, + c = B.a.BILINEAR_SAMPLINGMODE, + l = null == n ? new Blob() : new Blob([n]), + u = URL.createObjectURL(l), + h = function () { + return URL.revokeObjectURL(u); + }, + d = new B.a(u, e.scene, !s, !0, c, h, h); + void 0 !== a.wrapS && (d.wrapU = Q.GetWrapMode(a.wrapS)), void 0 !== a.wrapT && (d.wrapV = Q.GetWrapMode(a.wrapT)), (d.name = t), (o.babylonTexture = d), i(d); + } + }), + (e.LoadShaderStringAsync = function (e, t, n, i) { + var r = e.shaders[t]; + if (a.b.IsBase64(r.uri)) { + var o = atob(r.uri.split(",")[1]); + n && n(o); + } else + a.b.LoadFile(e.rootUrl + r.uri, n, void 0, void 0, !1, function (e) { + e && i && i(e.status + " " + e.statusText); + }); + }), + (e.LoadMaterialAsync = function (e, t, n, i) { + var r = e.materials[t]; + if (r.technique) { + var o = e.techniques[r.technique]; + if (!o) { + e.scene._blockEntityCollection = e.forAssetContainer; + var a = new z.a(t, e.scene); + return (e.scene._blockEntityCollection = !1), (a.diffuseColor = new A.a(0.5, 0.5, 0.5)), (a.sideOrientation = N.a.CounterClockWiseSideOrientation), void n(a); + } + var s = e.programs[o.program], + c = o.states, + l = F.a.ShadersStore[s.vertexShader + "VertexShader"], + u = F.a.ShadersStore[s.fragmentShader + "PixelShader"], + h = "", + d = "", + p = new $(l), + f = new $(u), + m = {}, + g = [], + b = [], + _ = []; + for (var v in o.uniforms) { + var C = o.uniforms[v], + P = o.parameters[C]; + if (((m[v] = P), !P.semantic || P.node || P.source)) P.type === y.SAMPLER_2D ? _.push(v) : g.push(v); + else { + var x = ee.indexOf(P.semantic); + -1 !== x ? (g.push(te[x]), delete m[v]) : g.push(v); + } + } + for (var O in o.attributes) { + var M = o.attributes[O]; + if ((R = o.parameters[M]).semantic) { + var I = ae(R); + I && b.push(I); + } + } + for (; !p.isEnd() && p.getNextToken(); ) { + if (p.currentToken === E.IDENTIFIER) { + var D = !1; + for (var O in o.attributes) { + M = o.attributes[O]; + var R = o.parameters[M]; + if (p.currentIdentifier === O && R.semantic) { + (h += ae(R)), (D = !0); + break; + } + } + D || (h += ve(p, o, m)); + } else h += p.currentString; + } + for (; !f.isEnd() && f.getNextToken(); ) { + f.currentToken === E.IDENTIFIER ? (d += ve(f, o, m)) : (d += f.currentString); + } + var w = { vertex: s.vertexShader + t, fragment: s.fragmentShader + t }, + L = { attributes: b, uniforms: g, samplers: _, needAlphaBlending: c && c.enable && -1 !== c.enable.indexOf(3042) }; + (F.a.ShadersStore[s.vertexShader + t + "VertexShader"] = h), (F.a.ShadersStore[s.fragmentShader + t + "PixelShader"] = d); + var k = new j.a(t, e.scene, w, L); + if ( + ((k.onError = (function (e, t, n) { + return function (i, r) { + t.dispose(!0), n("Cannot compile program named " + e.name + ". Error: " + r + ". Default material will be applied"); + }; + })(s, k, i)), + (k.onCompiled = _e(e, k, o, r, m, n)), + (k.sideOrientation = N.a.CounterClockWiseSideOrientation), + c && c.functions) + ) { + var B = c.functions; + B.cullFace && B.cullFace[0] !== T.BACK && (k.backFaceCulling = !1); + var V = B.blendFuncSeparate; + V && + (V[0] === S.SRC_ALPHA && V[1] === S.ONE_MINUS_SRC_ALPHA && V[2] === S.ONE && V[3] === S.ONE + ? (k.alphaMode = J.a.ALPHA_COMBINE) + : V[0] === S.ONE && V[1] === S.ONE && V[2] === S.ZERO && V[3] === S.ONE + ? (k.alphaMode = J.a.ALPHA_ONEONE) + : V[0] === S.SRC_ALPHA && V[1] === S.ONE && V[2] === S.ZERO && V[3] === S.ONE + ? (k.alphaMode = J.a.ALPHA_ADD) + : V[0] === S.ZERO && V[1] === S.ONE_MINUS_SRC_COLOR && V[2] === S.ONE && V[3] === S.ONE + ? (k.alphaMode = J.a.ALPHA_SUBTRACT) + : V[0] === S.DST_COLOR && V[1] === S.ZERO && V[2] === S.ONE && V[3] === S.ONE + ? (k.alphaMode = J.a.ALPHA_MULTIPLY) + : V[0] === S.SRC_ALPHA && V[1] === S.ONE_MINUS_SRC_COLOR && V[2] === S.ONE && V[3] === S.ONE && (k.alphaMode = J.a.ALPHA_MAXIMIZED)); + } + } else i && i("No technique found."); + }), + e + ); + })(), + Pe = (function () { + function e() { + this.state = null; + } + return ( + (e.RegisterExtension = function (t) { + e.Extensions[t.name] ? a.b.Error('Tool with the same name "' + t.name + '" already exists') : (e.Extensions[t.name] = t); + }), + (e.prototype.dispose = function () {}), + (e.prototype._importMeshAsync = function (e, t, n, i, r, o, s, c) { + var l = this; + return ( + (t.useRightHandedSystem = !0), + xe.LoadRuntimeAsync( + t, + n, + i, + function (t) { + (t.forAssetContainer = r), + (t.importOnlyMeshes = !0), + "" === e + ? (t.importMeshesNames = []) + : "string" == typeof e + ? (t.importMeshesNames = [e]) + : !e || e instanceof Array + ? ((t.importMeshesNames = []), a.b.Warn("Argument meshesNames must be of type string or string[]")) + : (t.importMeshesNames = [e]), + l._createNodes(t); + var n = new Array(), + i = new Array(); + for (var c in t.nodes) { + var u = t.nodes[c]; + u.babylonNode instanceof W.a && n.push(u.babylonNode); + } + for (var h in t.skins) { + var d = t.skins[h]; + d.babylonSkeleton instanceof L.a && i.push(d.babylonSkeleton); + } + l._loadBuffersAsync( + t, + function () { + l._loadShadersAsync(t, function () { + ye(t), be(t), !b.IncrementalLoading && o && o(n, i); + }); + }, + s + ), + b.IncrementalLoading && o && o(n, i); + }, + c + ), + !0 + ); + }), + (e.prototype.importMeshAsync = function (e, t, n, i, r, o) { + var a = this; + return new Promise(function (s, c) { + a._importMeshAsync( + e, + t, + i, + r, + n, + function (e, t) { + s({ meshes: e, particleSystems: [], skeletons: t, animationGroups: [], lights: [], transformNodes: [] }); + }, + o, + function (e) { + c(new Error(e)); + } + ); + }); + }), + (e.prototype._loadAsync = function (e, t, n, i, r, o, a) { + var s = this; + (e.useRightHandedSystem = !0), + xe.LoadRuntimeAsync( + e, + t, + n, + function (e) { + xe.LoadRuntimeExtensionsAsync( + e, + function () { + s._createNodes(e), + s._loadBuffersAsync(e, function () { + s._loadShadersAsync(e, function () { + ye(e), be(e), b.IncrementalLoading || r(); + }); + }), + b.IncrementalLoading && r(); + }, + a + ); + }, + a + ); + }), + (e.prototype.loadAsync = function (e, t, n, i) { + var r = this; + return new Promise(function (o, a) { + r._loadAsync( + e, + t, + n, + !1, + function () { + o(); + }, + i, + function (e) { + a(new Error(e)); + } + ); + }); + }), + (e.prototype._loadShadersAsync = function (e, t) { + var n = !1, + i = function (n, i) { + xe.LoadShaderStringAsync( + e, + n, + function (r) { + r instanceof ArrayBuffer || (e.loadedShaderCount++, r && (F.a.ShadersStore[n + (i.type === v.VERTEX ? "VertexShader" : "PixelShader")] = r), e.loadedShaderCount === e.shaderscount && t()); + }, + function () { + a.b.Error("Error when loading shader program named " + n + " located at " + i.uri); + } + ); + }; + for (var r in e.shaders) { + n = !0; + var o = e.shaders[r]; + o ? i.bind(this, r, o)() : a.b.Error("No shader named: " + r); + } + n || t(); + }), + (e.prototype._loadBuffersAsync = function (e, t, n) { + var i = !1, + r = function (n, i) { + xe.LoadBufferAsync( + e, + n, + function (r) { + e.loadedBufferCount++, + r && (r.byteLength != e.buffers[n].byteLength && a.b.Error("Buffer named " + n + " is length " + r.byteLength + ". Expected: " + i.byteLength), (e.loadedBufferViews[n] = r)), + e.loadedBufferCount === e.buffersCount && t(); + }, + function () { + a.b.Error("Error when loading buffer named " + n + " located at " + i.uri); + } + ); + }; + for (var o in e.buffers) { + i = !0; + var s = e.buffers[o]; + s ? r.bind(this, o, s)() : a.b.Error("No buffer named: " + o); + } + i || t(); + }), + (e.prototype._createNodes = function (e) { + var t = e.currentScene; + if (t) for (var n = 0; n < t.nodes.length; n++) ge(e, t.nodes[n], null); + else + for (var i in e.scenes) { + t = e.scenes[i]; + for (n = 0; n < t.nodes.length; n++) ge(e, t.nodes[n], null); + } + }), + (e.Extensions = {}), + e + ); + })(), + xe = (function () { + function e(e) { + this._name = e; + } + return ( + Object.defineProperty(e.prototype, "name", { + get: function () { + return this._name; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.loadRuntimeAsync = function (e, t, n, i, r) { + return !1; + }), + (e.prototype.loadRuntimeExtensionsAsync = function (e, t, n) { + return !1; + }), + (e.prototype.loadBufferAsync = function (e, t, n, i, r) { + return !1; + }), + (e.prototype.loadTextureBufferAsync = function (e, t, n, i) { + return !1; + }), + (e.prototype.createTextureAsync = function (e, t, n, i, r) { + return !1; + }), + (e.prototype.loadShaderStringAsync = function (e, t, n, i) { + return !1; + }), + (e.prototype.loadMaterialAsync = function (e, t, n, i) { + return !1; + }), + (e.LoadRuntimeAsync = function (t, n, i, r, o) { + e.ApplyExtensions( + function (e) { + return e.loadRuntimeAsync(t, n, i, r, o); + }, + function () { + setTimeout(function () { + r && r(Ce.CreateRuntime(n.json, t, i)); + }); + } + ); + }), + (e.LoadRuntimeExtensionsAsync = function (t, n, i) { + e.ApplyExtensions( + function (e) { + return e.loadRuntimeExtensionsAsync(t, n, i); + }, + function () { + setTimeout(function () { + n(); + }); + } + ); + }), + (e.LoadBufferAsync = function (t, n, i, r, o) { + e.ApplyExtensions( + function (e) { + return e.loadBufferAsync(t, n, i, r, o); + }, + function () { + Ce.LoadBufferAsync(t, n, i, r, o); + } + ); + }), + (e.LoadTextureAsync = function (t, n, i, r) { + e.LoadTextureBufferAsync( + t, + n, + function (o) { + o && e.CreateTextureAsync(t, n, o, i, r); + }, + r + ); + }), + (e.LoadShaderStringAsync = function (t, n, i, r) { + e.ApplyExtensions( + function (e) { + return e.loadShaderStringAsync(t, n, i, r); + }, + function () { + Ce.LoadShaderStringAsync(t, n, i, r); + } + ); + }), + (e.LoadMaterialAsync = function (t, n, i, r) { + e.ApplyExtensions( + function (e) { + return e.loadMaterialAsync(t, n, i, r); + }, + function () { + Ce.LoadMaterialAsync(t, n, i, r); + } + ); + }), + (e.LoadTextureBufferAsync = function (t, n, i, r) { + e.ApplyExtensions( + function (e) { + return e.loadTextureBufferAsync(t, n, i, r); + }, + function () { + Ce.LoadTextureBufferAsync(t, n, i, r); + } + ); + }), + (e.CreateTextureAsync = function (t, n, i, r, o) { + e.ApplyExtensions( + function (e) { + return e.createTextureAsync(t, n, i, r, o); + }, + function () { + Ce.CreateTextureAsync(t, n, i, r, o); + } + ); + }), + (e.ApplyExtensions = function (e, t) { + for (var n in Pe.Extensions) { + if (e(Pe.Extensions[n])) return; + } + t(); + }), + e + ); + })(); + b._CreateGLTF1Loader = function () { + return new Pe(); + }; + var Te = (function (e) { + function t() { + return e.call(this, "KHR_binary_glTF") || this; + } + return ( + Object(O.d)(t, e), + (t.prototype.loadRuntimeAsync = function (e, t, n, i, r) { + var o = t.json.extensionsUsed; + return !(!o || -1 === o.indexOf(this.name) || !t.bin) && ((this._bin = t.bin), i(Ce.CreateRuntime(t.json, e, n)), !0); + }), + (t.prototype.loadBufferAsync = function (e, t, n, i) { + return ( + -1 !== e.extensionsUsed.indexOf(this.name) && + "binary_glTF" === t && + (this._bin.readAsync(0, this._bin.byteLength).then(n, function (e) { + return i(e.message); + }), + !0) + ); + }), + (t.prototype.loadTextureBufferAsync = function (e, t, n, i) { + var r = e.textures[t], + o = e.images[r.source]; + if (!o.extensions || !(this.name in o.extensions)) return !1; + var a = o.extensions[this.name], + s = e.bufferViews[a.bufferView]; + return n(Q.GetBufferFromBufferView(e, s, 0, s.byteLength, _.UNSIGNED_BYTE)), !0; + }), + (t.prototype.loadShaderStringAsync = function (e, t, n, i) { + var r = e.shaders[t]; + if (!r.extensions || !(this.name in r.extensions)) return !1; + var o = r.extensions[this.name], + a = e.bufferViews[o.bufferView], + s = Q.GetBufferFromBufferView(e, a, 0, a.byteLength, _.UNSIGNED_BYTE); + return ( + setTimeout(function () { + var e = Q.DecodeBufferToText(s); + n(e); + }), + !0 + ); + }), + t + ); + })(xe); + Pe.RegisterExtension(new Te()); + var Se = (function (e) { + function t() { + return e.call(this, "KHR_materials_common") || this; + } + return ( + Object(O.d)(t, e), + (t.prototype.loadRuntimeExtensionsAsync = function (e, t, n) { + if (!e.extensions) return !1; + var i = e.extensions[this.name]; + if (!i) return !1; + var r = i.lights; + if (r) + for (var o in r) { + var s = r[o]; + switch (s.type) { + case "ambient": + var c = new Y.a(s.name, new M.e(0, 1, 0), e.scene), + l = s.ambient; + l && (c.diffuse = A.a.FromArray(l.color || [1, 1, 1])); + break; + case "point": + var u = new Z.a(s.name, new M.e(10, 10, 10), e.scene), + h = s.point; + h && (u.diffuse = A.a.FromArray(h.color || [1, 1, 1])); + break; + case "directional": + var d = new K.a(s.name, new M.e(0, -1, 0), e.scene), + p = s.directional; + p && (d.diffuse = A.a.FromArray(p.color || [1, 1, 1])); + break; + case "spot": + var f = s.spot; + if (f) new q.a(s.name, new M.e(0, 10, 0), new M.e(0, -1, 0), f.fallOffAngle || Math.PI, f.fallOffExponent || 0, e.scene).diffuse = A.a.FromArray(f.color || [1, 1, 1]); + break; + default: + a.b.Warn('GLTF Material Common extension: light type "' + s.type + "” not supported"); + } + } + return !1; + }), + (t.prototype.loadMaterialAsync = function (e, t, n, i) { + var r = e.materials[t]; + if (!r || !r.extensions) return !1; + var o = r.extensions[this.name]; + if (!o) return !1; + var a = new z.a(t, e.scene); + return ( + (a.sideOrientation = N.a.CounterClockWiseSideOrientation), + "CONSTANT" === o.technique && (a.disableLighting = !0), + (a.backFaceCulling = void 0 !== o.doubleSided && !o.doubleSided), + (a.alpha = void 0 === o.values.transparency ? 1 : o.values.transparency), + (a.specularPower = void 0 === o.values.shininess ? 0 : o.values.shininess), + "string" == typeof o.values.ambient ? this._loadTexture(e, o.values.ambient, a, "ambientTexture", i) : (a.ambientColor = A.a.FromArray(o.values.ambient || [0, 0, 0])), + "string" == typeof o.values.diffuse ? this._loadTexture(e, o.values.diffuse, a, "diffuseTexture", i) : (a.diffuseColor = A.a.FromArray(o.values.diffuse || [0, 0, 0])), + "string" == typeof o.values.emission ? this._loadTexture(e, o.values.emission, a, "emissiveTexture", i) : (a.emissiveColor = A.a.FromArray(o.values.emission || [0, 0, 0])), + "string" == typeof o.values.specular ? this._loadTexture(e, o.values.specular, a, "specularTexture", i) : (a.specularColor = A.a.FromArray(o.values.specular || [0, 0, 0])), + !0 + ); + }), + (t.prototype._loadTexture = function (e, t, n, i, r) { + Ce.LoadTextureBufferAsync( + e, + t, + function (o) { + Ce.CreateTextureAsync( + e, + t, + o, + function (e) { + return (n[i] = e); + }, + r + ); + }, + r + ); + }), + t + ); + })(xe); + Pe.RegisterExtension(new Se()); + var Oe = n(138), + Ee = n(144), + Me = n(49), + Ae = n(39), + Ie = n(159), + De = n(154), + Re = n(134), + we = n(74), + Le = (function () { + function e() {} + return ( + (e.Get = function (e, t, n) { + if (!t || null == n || !t[n]) throw new Error(e + ": Failed to find index (" + n + ")"); + return t[n]; + }), + (e.Assign = function (e) { + if (e) for (var t = 0; t < e.length; t++) e[t].index = t; + }), + e + ); + })(), + Fe = (function () { + function e(e) { + (this._completePromises = new Array()), + (this._forAssetContainer = !1), + (this._babylonLights = []), + (this._disposed = !1), + (this._state = null), + (this._extensions = new Array()), + (this._defaultBabylonMaterialData = {}), + (this._requests = new Array()), + (this._parent = e); + } + return ( + (e.RegisterExtension = function (t, n) { + e.UnregisterExtension(t) && l.a.Warn("Extension with the name '" + t + "' already exists"), (e._RegisteredExtensions[t] = { factory: n }); + }), + (e.UnregisterExtension = function (t) { + return !!e._RegisteredExtensions[t] && (delete e._RegisteredExtensions[t], !0); + }), + Object.defineProperty(e.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "gltf", { + get: function () { + return this._gltf; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "bin", { + get: function () { + return this._bin; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "parent", { + get: function () { + return this._parent; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "babylonScene", { + get: function () { + return this._babylonScene; + }, + enumerable: !0, + configurable: !0, + }), + Object.defineProperty(e.prototype, "rootBabylonMesh", { + get: function () { + return this._rootBabylonMesh; + }, + enumerable: !0, + configurable: !0, + }), + (e.prototype.dispose = function () { + if (!this._disposed) { + this._disposed = !0; + for (var e = 0, t = this._requests; e < t.length; e++) { + t[e].abort(); + } + for (var n in ((this._requests.length = 0), (this._completePromises.length = 0), this._extensions)) { + var i = this._extensions[n]; + i.dispose && i.dispose(), delete this._extensions[n]; + } + delete this._gltf, delete this._babylonScene, delete this._rootBabylonMesh, delete this._progressCallback, this._parent._clear(); + } + }), + (e.prototype.importMeshAsync = function (e, t, n, i, r, o, a) { + var s = this; + return Promise.resolve().then(function () { + (s._babylonScene = t), (s._rootUrl = r), (s._fileName = a || "scene"), (s._progressCallback = o), (s._forAssetContainer = n), s._loadData(i); + var c = null; + if (e) { + var l = {}; + if (s._gltf.nodes) + for (var u = 0, h = s._gltf.nodes; u < h.length; u++) { + var d = h[u]; + d.name && (l[d.name] = d.index); + } + c = (e instanceof Array ? e : [e]).map(function (e) { + var t = l[e]; + if (void 0 === t) throw new Error("Failed to find node '" + e + "'"); + return t; + }); + } + return s._loadAsync(c, function () { + return { meshes: s._getMeshes(), particleSystems: [], skeletons: s._getSkeletons(), animationGroups: s._getAnimationGroups(), lights: s._babylonLights, transformNodes: s._getTransformNodes() }; + }); + }); + }), + (e.prototype.loadAsync = function (e, t, n, i, r) { + var o = this; + return Promise.resolve().then(function () { + return (o._babylonScene = e), (o._rootUrl = n), (o._fileName = r || "scene"), (o._progressCallback = i), o._loadData(t), o._loadAsync(null, function () {}); + }); + }), + (e.prototype._loadAsync = function (e, t) { + var n = this; + return Promise.resolve().then( + function () { + (n._uniqueRootUrl = -1 === n._rootUrl.indexOf("file:") && n._fileName ? n._rootUrl : "" + n._rootUrl + Date.now() + "/"), n._loadExtensions(), n._checkExtensions(); + var i = m[m.LOADING] + " => " + m[m.READY], + r = m[m.LOADING] + " => " + m[m.COMPLETE]; + n._parent._startPerformanceCounter(i), n._parent._startPerformanceCounter(r), n._setState(m.LOADING), n._extensionsOnLoading(); + var o = new Array(), + s = n._babylonScene.blockMaterialDirtyMechanism; + if (((n._babylonScene.blockMaterialDirtyMechanism = !0), e)) o.push(n.loadSceneAsync("/nodes", { nodes: e, index: -1 })); + else if (null != n._gltf.scene || (n._gltf.scenes && n._gltf.scenes[0])) { + var c = Le.Get("/scene", n._gltf.scenes, n._gltf.scene || 0); + o.push(n.loadSceneAsync("/scenes/" + c.index, c)); + } + (n._babylonScene.blockMaterialDirtyMechanism = s), n._parent.compileMaterials && o.push(n._compileMaterialsAsync()), n._parent.compileShadowGenerators && o.push(n._compileShadowGeneratorsAsync()); + var l = Promise.all(o).then(function () { + return n._rootBabylonMesh && n._rootBabylonMesh.setEnabled(!0), n._setState(m.READY), n._extensionsOnReady(), n._startAnimations(), t(); + }); + return ( + l.then(function () { + n._parent._endPerformanceCounter(i), + a.b.SetImmediate(function () { + n._disposed || + Promise.all(n._completePromises).then( + function () { + n._parent._endPerformanceCounter(r), n._setState(m.COMPLETE), n._parent.onCompleteObservable.notifyObservers(void 0), n._parent.onCompleteObservable.clear(), n.dispose(); + }, + function (e) { + n._parent.onErrorObservable.notifyObservers(e), n._parent.onErrorObservable.clear(), n.dispose(); + } + ); + }); + }), + l + ); + }, + function (e) { + throw (n._disposed || (n._parent.onErrorObservable.notifyObservers(e), n._parent.onErrorObservable.clear(), n.dispose()), e); + } + ); + }), + (e.prototype._loadData = function (e) { + if (((this._gltf = e.json), this._setupData(), e.bin)) { + var t = this._gltf.buffers; + if (t && t[0] && !t[0].uri) { + var n = t[0]; + (n.byteLength < e.bin.byteLength - 3 || n.byteLength > e.bin.byteLength) && l.a.Warn("Binary buffer length (" + n.byteLength + ") from JSON does not match chunk length (" + e.bin.byteLength + ")"), + (this._bin = e.bin); + } else l.a.Warn("Unexpected BIN chunk"); + } + }), + (e.prototype._setupData = function () { + if ( + (Le.Assign(this._gltf.accessors), + Le.Assign(this._gltf.animations), + Le.Assign(this._gltf.buffers), + Le.Assign(this._gltf.bufferViews), + Le.Assign(this._gltf.cameras), + Le.Assign(this._gltf.images), + Le.Assign(this._gltf.materials), + Le.Assign(this._gltf.meshes), + Le.Assign(this._gltf.nodes), + Le.Assign(this._gltf.samplers), + Le.Assign(this._gltf.scenes), + Le.Assign(this._gltf.skins), + Le.Assign(this._gltf.textures), + this._gltf.nodes) + ) { + for (var e = {}, t = 0, n = this._gltf.nodes; t < n.length; t++) { + if ((c = n[t]).children) + for (var i = 0, r = c.children; i < r.length; i++) { + e[r[i]] = c.index; + } + } + for (var o = this._createRootNode(), a = 0, s = this._gltf.nodes; a < s.length; a++) { + var c, + l = e[(c = s[a]).index]; + c.parent = void 0 === l ? o : this._gltf.nodes[l]; + } + } + }), + (e.prototype._loadExtensions = function () { + for (var t in e._RegisteredExtensions) { + var n = e._RegisteredExtensions[t].factory(this); + n.name !== t && l.a.Warn("The name of the glTF loader extension instance does not match the registered name: " + n.name + " !== " + t), + this._extensions.push(n), + this._parent.onExtensionLoadedObservable.notifyObservers(n); + } + this._extensions.sort(function (e, t) { + return (e.order || Number.MAX_VALUE) - (t.order || Number.MAX_VALUE); + }), + this._parent.onExtensionLoadedObservable.clear(); + }), + (e.prototype._checkExtensions = function () { + if (this._gltf.extensionsRequired) + for ( + var e = function (e) { + if ( + !t._extensions.some(function (t) { + return t.name === e && t.enabled; + }) + ) + throw new Error("Require extension " + e + " is not available"); + }, + t = this, + n = 0, + i = this._gltf.extensionsRequired; + n < i.length; + n++ + ) { + e(i[n]); + } + }), + (e.prototype._setState = function (e) { + (this._state = e), this.log(m[this._state]); + }), + (e.prototype._createRootNode = function () { + (this._babylonScene._blockEntityCollection = this._forAssetContainer), + (this._rootBabylonMesh = new X.a("__root__", this._babylonScene)), + (this._babylonScene._blockEntityCollection = !1), + this._rootBabylonMesh.setEnabled(!1); + var t = { _babylonTransformNode: this._rootBabylonMesh, index: -1 }; + switch (this._parent.coordinateSystemMode) { + case p.AUTO: + this._babylonScene.useRightHandedSystem || ((t.rotation = [0, 1, 0, 0]), (t.scale = [1, 1, -1]), e._LoadTransform(t, this._rootBabylonMesh)); + break; + case p.FORCE_RIGHT_HANDED: + this._babylonScene.useRightHandedSystem = !0; + break; + default: + throw new Error("Invalid coordinate system mode (" + this._parent.coordinateSystemMode + ")"); + } + return this._parent.onMeshLoadedObservable.notifyObservers(this._rootBabylonMesh), t; + }), + (e.prototype.loadSceneAsync = function (e, t) { + var n = this, + i = this._extensionsLoadSceneAsync(e, t); + if (i) return i; + var r = new Array(); + if ((this.logOpen(e + " " + (t.name || "")), t.nodes)) + for (var o = 0, a = t.nodes; o < a.length; o++) { + var s = a[o], + c = Le.Get(e + "/nodes/" + s, this._gltf.nodes, s); + r.push( + this.loadNodeAsync("/nodes/" + c.index, c, function (e) { + e.parent = n._rootBabylonMesh; + }) + ); + } + if (this._gltf.nodes) + for (var l = 0, u = this._gltf.nodes; l < u.length; l++) { + if ((c = u[l])._babylonTransformNode && c._babylonBones) + for (var h = 0, d = c._babylonBones; h < d.length; h++) { + d[h].linkTransformNode(c._babylonTransformNode); + } + } + return r.push(this._loadAnimationsAsync()), this.logClose(), Promise.all(r).then(function () {}); + }), + (e.prototype._forEachPrimitive = function (e, t) { + if (e._primitiveBabylonMeshes) + for (var n = 0, i = e._primitiveBabylonMeshes; n < i.length; n++) { + t(i[n]); + } + }), + (e.prototype._getMeshes = function () { + var e = new Array(); + e.push(this._rootBabylonMesh); + var t = this._gltf.nodes; + if (t) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + this._forEachPrimitive(r, function (t) { + e.push(t); + }); + } + return e; + }), + (e.prototype._getTransformNodes = function () { + var e = new Array(), + t = this._gltf.nodes; + if (t) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + r._babylonTransformNode && "TransformNode" === r._babylonTransformNode.getClassName() && e.push(r._babylonTransformNode); + } + return e; + }), + (e.prototype._getSkeletons = function () { + var e = new Array(), + t = this._gltf.skins; + if (t) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + r._data && e.push(r._data.babylonSkeleton); + } + return e; + }), + (e.prototype._getAnimationGroups = function () { + var e = new Array(), + t = this._gltf.animations; + if (t) + for (var n = 0, i = t; n < i.length; n++) { + var r = i[n]; + r._babylonAnimationGroup && e.push(r._babylonAnimationGroup); + } + return e; + }), + (e.prototype._startAnimations = function () { + switch (this._parent.animationStartMode) { + case f.NONE: + break; + case f.FIRST: + 0 !== (e = this._getAnimationGroups()).length && e[0].start(!0); + break; + case f.ALL: + for (var e, t = 0, n = (e = this._getAnimationGroups()); t < n.length; t++) { + n[t].start(!0); + } + break; + default: + return void l.a.Error("Invalid animation start mode (" + this._parent.animationStartMode + ")"); + } + }), + (e.prototype.loadNodeAsync = function (t, n, i) { + var r = this; + void 0 === i && (i = function () {}); + var o = this._extensionsLoadNodeAsync(t, n, i); + if (o) return o; + if (n._babylonTransformNode) throw new Error(t + ": Invalid recursive node hierarchy"); + var a = new Array(); + this.logOpen(t + " " + (n.name || "")); + var s = function (o) { + if ((e.AddPointerMetadata(o, t), e._LoadTransform(n, o), null != n.camera)) { + var s = Le.Get(t + "/camera", r._gltf.cameras, n.camera); + a.push( + r.loadCameraAsync("/cameras/" + s.index, s, function (e) { + e.parent = o; + }) + ); + } + if (n.children) + for (var c = 0, l = n.children; c < l.length; c++) { + var u = l[c], + h = Le.Get(t + "/children/" + u, r._gltf.nodes, u); + a.push( + r.loadNodeAsync("/nodes/" + h.index, h, function (e) { + e.parent = o; + }) + ); + } + i(o); + }; + if (null == n.mesh) { + var c = n.name || "node" + n.index; + (this._babylonScene._blockEntityCollection = this._forAssetContainer), (n._babylonTransformNode = new Ae.a(c, this._babylonScene)), (this._babylonScene._blockEntityCollection = !1), s(n._babylonTransformNode); + } else { + var l = Le.Get(t + "/mesh", this._gltf.meshes, n.mesh); + a.push(this._loadMeshAsync("/meshes/" + l.index, n, l, s)); + } + return ( + this.logClose(), + Promise.all(a).then(function () { + return ( + r._forEachPrimitive(n, function (e) { + e.refreshBoundingInfo(!0); + }), + n._babylonTransformNode + ); + }) + ); + }), + (e.prototype._loadMeshAsync = function (e, t, n, i) { + var r = n.primitives; + if (!r || !r.length) throw new Error(e + ": Primitives are missing"); + null == r[0].index && Le.Assign(r); + var o = new Array(); + this.logOpen(e + " " + (n.name || "")); + var a = t.name || "node" + t.index; + if (1 === r.length) { + var s = n.primitives[0]; + o.push( + this._loadMeshPrimitiveAsync(e + "/primitives/" + s.index, a, t, n, s, function (e) { + (t._babylonTransformNode = e), (t._primitiveBabylonMeshes = [e]); + }) + ); + } else { + (t._babylonTransformNode = new Ae.a(a, this._babylonScene)), (t._primitiveBabylonMeshes = []); + for (var c = 0, l = r; c < l.length; c++) { + s = l[c]; + o.push( + this._loadMeshPrimitiveAsync(e + "/primitives/" + s.index, a + "_primitive" + s.index, t, n, s, function (e) { + (e.parent = t._babylonTransformNode), t._primitiveBabylonMeshes.push(e); + }) + ); + } + } + if (null != t.skin) { + var u = Le.Get(e + "/skin", this._gltf.skins, t.skin); + o.push(this._loadSkinAsync("/skins/" + u.index, t, u)); + } + return ( + i(t._babylonTransformNode), + this.logClose(), + Promise.all(o).then(function () { + return t._babylonTransformNode; + }) + ); + }), + (e.prototype._loadMeshPrimitiveAsync = function (t, n, i, r, o, a) { + var s = this, + c = this._extensionsLoadMeshPrimitiveAsync(t, n, i, r, o, a); + if (c) return c; + this.logOpen("" + t); + var l, + u, + h = this._parent.createInstances && null == i.skin && !r.primitives[0].targets; + if (h && o._instanceData) (l = o._instanceData.babylonSourceMesh.createInstance(n)), (u = o._instanceData.promise); + else { + var d = new Array(); + this._babylonScene._blockEntityCollection = this._forAssetContainer; + var p = new X.a(n, this._babylonScene); + (this._babylonScene._blockEntityCollection = !1), + (p.overrideMaterialSideOrientation = this._babylonScene.useRightHandedSystem ? N.a.CounterClockWiseSideOrientation : N.a.ClockWiseSideOrientation), + this._createMorphTargets(t, i, r, o, p), + d.push( + this._loadVertexDataAsync(t, o, p).then(function (e) { + return s._loadMorphTargetsAsync(t, o, p, e).then(function () { + e.applyToMesh(p); + }); + }) + ); + var f = e._GetDrawMode(t, o.mode); + if (null == o.material) { + var m = this._defaultBabylonMaterialData[f]; + m || ((m = this._createDefaultMaterial("__GLTFLoader._default", f)), this._parent.onMaterialLoadedObservable.notifyObservers(m), (this._defaultBabylonMaterialData[f] = m)), (p.material = m); + } else { + var g = Le.Get(t + "/material", this._gltf.materials, o.material); + d.push( + this._loadMaterialAsync("/materials/" + g.index, g, p, f, function (e) { + p.material = e; + }) + ); + } + (u = Promise.all(d)), h && (o._instanceData = { babylonSourceMesh: p, promise: u }), (l = p); + } + return ( + e.AddPointerMetadata(l, t), + this._parent.onMeshLoadedObservable.notifyObservers(l), + a(l), + this.logClose(), + u.then(function () { + return l; + }) + ); + }), + (e.prototype._loadVertexDataAsync = function (e, t, n) { + var i = this, + r = this._extensionsLoadVertexDataAsync(e, t, n); + if (r) return r; + var o = t.attributes; + if (!o) throw new Error(e + ": Attributes are missing"); + var a = new Array(), + s = new U.a(n.name, this._babylonScene); + if (null == t.indices) n.isUnIndexed = !0; + else { + var c = Le.Get(e + "/indices", this._gltf.accessors, t.indices); + a.push( + this._loadIndicesAccessorAsync("/accessors/" + c.index, c).then(function (e) { + s.setIndices(e); + }) + ); + } + var l = function (t, r, c) { + if (null != o[t]) { + (n._delayInfo = n._delayInfo || []), -1 === n._delayInfo.indexOf(r) && n._delayInfo.push(r); + var l = Le.Get(e + "/attributes/" + t, i._gltf.accessors, o[t]); + a.push( + i._loadVertexAccessorAsync("/accessors/" + l.index, l, r).then(function (e) { + s.setVerticesBuffer(e, l.count); + }) + ), + r == G.b.MatricesIndicesExtraKind && (n.numBoneInfluencers = 8), + c && c(l); + } + }; + return ( + l("POSITION", G.b.PositionKind), + l("NORMAL", G.b.NormalKind), + l("TANGENT", G.b.TangentKind), + l("TEXCOORD_0", G.b.UVKind), + l("TEXCOORD_1", G.b.UV2Kind), + l("JOINTS_0", G.b.MatricesIndicesKind), + l("WEIGHTS_0", G.b.MatricesWeightsKind), + l("JOINTS_1", G.b.MatricesIndicesExtraKind), + l("WEIGHTS_1", G.b.MatricesWeightsExtraKind), + l("COLOR_0", G.b.ColorKind, function (e) { + "VEC4" === e.type && (n.hasVertexAlpha = !0); + }), + Promise.all(a).then(function () { + return s; + }) + ); + }), + (e.prototype._createMorphTargets = function (e, t, n, i, r) { + if (i.targets) { + if (null == t._numMorphTargets) t._numMorphTargets = i.targets.length; + else if (i.targets.length !== t._numMorphTargets) throw new Error(e + ": Primitives do not have the same number of targets"); + var o = n.extras ? n.extras.targetNames : null; + r.morphTargetManager = new De.a(r.getScene()); + for (var a = 0; a < i.targets.length; a++) { + var s = t.weights ? t.weights[a] : n.weights ? n.weights[a] : 0, + c = o ? o[a] : "morphTarget" + a; + r.morphTargetManager.addTarget(new Ie.a(c, s, r.getScene())); + } + } + }), + (e.prototype._loadMorphTargetsAsync = function (e, t, n, i) { + if (!t.targets) return Promise.resolve(); + for (var r = new Array(), o = n.morphTargetManager, a = 0; a < o.numTargets; a++) { + var s = o.getTarget(a); + r.push(this._loadMorphTargetVertexDataAsync(e + "/targets/" + a, i, t.targets[a], s)); + } + return Promise.all(r).then(function () {}); + }), + (e.prototype._loadMorphTargetVertexDataAsync = function (e, t, n, i) { + var r = this, + o = new Array(), + a = function (i, a, s) { + if (null != n[i]) { + var c = t.getVertexBuffer(a); + if (c) { + var l = Le.Get(e + "/" + i, r._gltf.accessors, n[i]); + o.push( + r._loadFloatAccessorAsync("/accessors/" + l.index, l).then(function (e) { + s(c, e); + }) + ); + } + } + }; + return ( + a("POSITION", G.b.PositionKind, function (e, t) { + var n = new Float32Array(t.length); + e.forEach(t.length, function (e, i) { + n[i] = t[i] + e; + }), + i.setPositions(n); + }), + a("NORMAL", G.b.NormalKind, function (e, t) { + var n = new Float32Array(t.length); + e.forEach(n.length, function (e, i) { + n[i] = t[i] + e; + }), + i.setNormals(n); + }), + a("TANGENT", G.b.TangentKind, function (e, t) { + var n = new Float32Array((t.length / 3) * 4), + r = 0; + e.forEach((t.length / 3) * 4, function (e, i) { + (i + 1) % 4 != 0 && ((n[r] = t[r] + e), r++); + }), + i.setTangents(n); + }), + Promise.all(o).then(function () {}) + ); + }), + (e._LoadTransform = function (e, t) { + if (null == e.skin) { + var n = M.e.Zero(), + i = M.b.Identity(), + r = M.e.One(); + if (e.matrix) M.a.FromArray(e.matrix).decompose(r, i, n); + else e.translation && (n = M.e.FromArray(e.translation)), e.rotation && (i = M.b.FromArray(e.rotation)), e.scale && (r = M.e.FromArray(e.scale)); + (t.position = n), (t.rotationQuaternion = i), (t.scaling = r); + } + }), + (e.prototype._loadSkinAsync = function (e, t, n) { + var i = this, + r = this._extensionsLoadSkinAsync(e, t, n); + if (r) return r; + var o = function (e) { + i._forEachPrimitive(t, function (t) { + t.skeleton = e; + }); + }; + if (n._data) return o(n._data.babylonSkeleton), n._data.promise; + var a = "skeleton" + n.index; + this._babylonScene._blockEntityCollection = this._forAssetContainer; + var s = new L.a(n.name || a, a, this._babylonScene); + (this._babylonScene._blockEntityCollection = !1), (s.overrideMesh = this._rootBabylonMesh), this._loadBones(e, n, s), o(s); + var c = this._loadSkinInverseBindMatricesDataAsync(e, n).then(function (e) { + i._updateBoneMatrices(s, e); + }); + return (n._data = { babylonSkeleton: s, promise: c }), c; + }), + (e.prototype._loadBones = function (e, t, n) { + for (var i = {}, r = 0, o = t.joints; r < o.length; r++) { + var a = o[r], + s = Le.Get(e + "/joints/" + a, this._gltf.nodes, a); + this._loadBone(s, t, n, i); + } + }), + (e.prototype._loadBone = function (e, t, n, i) { + var r = i[e.index]; + if (r) return r; + var o = null; + e.parent && e.parent._babylonTransformNode !== this._rootBabylonMesh && (o = this._loadBone(e.parent, t, n, i)); + var a = t.joints.indexOf(e.index); + return (r = new w.a(e.name || "joint" + e.index, n, o, this._getNodeMatrix(e), null, null, a)), (i[e.index] = r), (e._babylonBones = e._babylonBones || []), e._babylonBones.push(r), r; + }), + (e.prototype._loadSkinInverseBindMatricesDataAsync = function (e, t) { + if (null == t.inverseBindMatrices) return Promise.resolve(null); + var n = Le.Get(e + "/inverseBindMatrices", this._gltf.accessors, t.inverseBindMatrices); + return this._loadFloatAccessorAsync("/accessors/" + n.index, n); + }), + (e.prototype._updateBoneMatrices = function (e, t) { + for (var n = 0, i = e.bones; n < i.length; n++) { + var r = i[n], + o = M.a.Identity(), + a = r._index; + t && -1 !== a && (M.a.FromArrayToRef(t, 16 * a, o), o.invertToRef(o)); + var s = r.getParent(); + s && o.multiplyToRef(s.getInvertedAbsoluteTransform(), o), r.updateMatrix(o, !1, !1), r._updateDifferenceMatrix(void 0, !1); + } + }), + (e.prototype._getNodeMatrix = function (e) { + return e.matrix + ? M.a.FromArray(e.matrix) + : M.a.Compose(e.scale ? M.e.FromArray(e.scale) : M.e.One(), e.rotation ? M.b.FromArray(e.rotation) : M.b.Identity(), e.translation ? M.e.FromArray(e.translation) : M.e.Zero()); + }), + (e.prototype.loadCameraAsync = function (t, n, i) { + void 0 === i && (i = function () {}); + var r = this._extensionsLoadCameraAsync(t, n, i); + if (r) return r; + var o = new Array(); + this.logOpen(t + " " + (n.name || "")), (this._babylonScene._blockEntityCollection = this._forAssetContainer); + var a = new D.a(n.name || "camera" + n.index, M.e.Zero(), this._babylonScene, !1); + switch (((this._babylonScene._blockEntityCollection = !1), (a.rotation = new M.e(0, Math.PI, 0)), n.type)) { + case "perspective": + var s = n.perspective; + if (!s) throw new Error(t + ": Camera perspective properties are missing"); + (a.fov = s.yfov), (a.minZ = s.znear), (a.maxZ = s.zfar || Number.MAX_VALUE); + break; + case "orthographic": + if (!n.orthographic) throw new Error(t + ": Camera orthographic properties are missing"); + (a.mode = I.a.ORTHOGRAPHIC_CAMERA), + (a.orthoLeft = -n.orthographic.xmag), + (a.orthoRight = n.orthographic.xmag), + (a.orthoBottom = -n.orthographic.ymag), + (a.orthoTop = n.orthographic.ymag), + (a.minZ = n.orthographic.znear), + (a.maxZ = n.orthographic.zfar); + break; + default: + throw new Error(t + ": Invalid camera type (" + n.type + ")"); + } + return ( + e.AddPointerMetadata(a, t), + this._parent.onCameraLoadedObservable.notifyObservers(a), + i(a), + Promise.all(o).then(function () { + return a; + }) + ); + }), + (e.prototype._loadAnimationsAsync = function () { + var e = this._gltf.animations; + if (!e) return Promise.resolve(); + for (var t = new Array(), n = 0; n < e.length; n++) { + var i = e[n]; + t.push(this.loadAnimationAsync("/animations/" + i.index, i)); + } + return Promise.all(t).then(function () {}); + }), + (e.prototype.loadAnimationAsync = function (e, t) { + var n = this._extensionsLoadAnimationAsync(e, t); + if (n) return n; + this._babylonScene._blockEntityCollection = this._forAssetContainer; + var i = new Ee.a(t.name || "animation" + t.index, this._babylonScene); + (this._babylonScene._blockEntityCollection = !1), (t._babylonAnimationGroup = i); + var r = new Array(); + Le.Assign(t.channels), Le.Assign(t.samplers); + for (var o = 0, a = t.channels; o < a.length; o++) { + var s = a[o]; + r.push(this._loadAnimationChannelAsync(e + "/channels/" + s.index, e, t, s, i)); + } + return Promise.all(r).then(function () { + return i.normalize(0), i; + }); + }), + (e.prototype._loadAnimationChannelAsync = function (e, t, n, i, r, o) { + var a = this; + if ((void 0 === o && (o = null), null == i.target.node)) return Promise.resolve(); + var s = Le.Get(e + "/target/node", this._gltf.nodes, i.target.node); + if (("weights" === i.target.path && !s._numMorphTargets) || ("weights" !== i.target.path && !s._babylonTransformNode)) return Promise.resolve(); + var c = Le.Get(e + "/sampler", n.samplers, i.sampler); + return this._loadAnimationSamplerAsync(t + "/samplers/" + i.sampler, c).then(function (t) { + var n, c; + switch (i.target.path) { + case "translation": + (n = "position"), (c = R.a.ANIMATIONTYPE_VECTOR3); + break; + case "rotation": + (n = "rotationQuaternion"), (c = R.a.ANIMATIONTYPE_QUATERNION); + break; + case "scale": + (n = "scaling"), (c = R.a.ANIMATIONTYPE_VECTOR3); + break; + case "weights": + (n = "influence"), (c = R.a.ANIMATIONTYPE_FLOAT); + break; + default: + throw new Error(e + "/target/path: Invalid value (" + i.target.path + ")"); + } + var l, + u, + h = 0; + switch (n) { + case "position": + l = function () { + var e = M.e.FromArray(t.output, h); + return (h += 3), e; + }; + break; + case "rotationQuaternion": + l = function () { + var e = M.b.FromArray(t.output, h); + return (h += 4), e; + }; + break; + case "scaling": + l = function () { + var e = M.e.FromArray(t.output, h); + return (h += 3), e; + }; + break; + case "influence": + l = function () { + for (var e = new Array(s._numMorphTargets), n = 0; n < s._numMorphTargets; n++) e[n] = t.output[h++]; + return e; + }; + } + switch (t.interpolation) { + case "STEP": + u = function (e) { + return { frame: t.input[e], value: l(), interpolation: Re.a.STEP }; + }; + break; + case "LINEAR": + u = function (e) { + return { frame: t.input[e], value: l() }; + }; + break; + case "CUBICSPLINE": + u = function (e) { + return { frame: t.input[e], inTangent: l(), value: l(), outTangent: l() }; + }; + } + for (var d = new Array(t.input.length), p = 0; p < t.input.length; p++) d[p] = u(p); + if ("influence" === n) + for ( + var f = function (e) { + var t = r.name + "_channel" + r.targetedAnimations.length, + i = new R.a(t, n, 1, c); + i.setKeys( + d.map(function (t) { + return { frame: t.frame, inTangent: t.inTangent ? t.inTangent[e] : void 0, value: t.value[e], outTangent: t.outTangent ? t.outTangent[e] : void 0 }; + }) + ), + a._forEachPrimitive(s, function (t) { + var n = t.morphTargetManager.getTarget(e), + o = i.clone(); + n.animations.push(o), r.addTargetedAnimation(o, n); + }); + }, + m = 0; + m < s._numMorphTargets; + m++ + ) + f(m); + else { + var g = r.name + "_channel" + r.targetedAnimations.length, + b = new R.a(g, n, 1, c); + b.setKeys(d), null != o && null != o.animations ? (o.animations.push(b), r.addTargetedAnimation(b, o)) : (s._babylonTransformNode.animations.push(b), r.addTargetedAnimation(b, s._babylonTransformNode)); + } + }); + }), + (e.prototype._loadAnimationSamplerAsync = function (e, t) { + if (t._data) return t._data; + var n = t.interpolation || "LINEAR"; + switch (n) { + case "STEP": + case "LINEAR": + case "CUBICSPLINE": + break; + default: + throw new Error(e + "/interpolation: Invalid value (" + t.interpolation + ")"); + } + var i = Le.Get(e + "/input", this._gltf.accessors, t.input), + r = Le.Get(e + "/output", this._gltf.accessors, t.output); + return ( + (t._data = Promise.all([this._loadFloatAccessorAsync("/accessors/" + i.index, i), this._loadFloatAccessorAsync("/accessors/" + r.index, r)]).then(function (e) { + var t = e[0], + i = e[1]; + return { input: t, interpolation: n, output: i }; + })), + t._data + ); + }), + (e.prototype._loadBufferAsync = function (e, t, n, i) { + var r = this._extensionsLoadBufferAsync(e, t, n, i); + if (r) return r; + if (!t._data) + if (t.uri) t._data = this.loadUriAsync(e + "/uri", t, t.uri); + else { + if (!this._bin) throw new Error(e + ": Uri is missing or the binary glTF is missing its binary chunk"); + t._data = this._bin.readAsync(0, t.byteLength); + } + return t._data.then(function (t) { + try { + return new Uint8Array(t.buffer, t.byteOffset + n, i); + } catch (t) { + throw new Error(e + ": " + t.message); + } + }); + }), + (e.prototype.loadBufferViewAsync = function (e, t) { + var n = this._extensionsLoadBufferViewAsync(e, t); + if (n) return n; + if (t._data) return t._data; + var i = Le.Get(e + "/buffer", this._gltf.buffers, t.buffer); + return (t._data = this._loadBufferAsync("/buffers/" + i.index, i, t.byteOffset || 0, t.byteLength)), t._data; + }), + (e.prototype._loadAccessorAsync = function (t, n, i) { + var r = this; + if (n._data) return n._data; + var o = e._GetNumComponents(t, n.type), + a = o * G.b.GetTypeByteLength(n.componentType), + s = o * n.count; + if (null == n.bufferView) n._data = Promise.resolve(new i(s)); + else { + var c = Le.Get(t + "/bufferView", this._gltf.bufferViews, n.bufferView); + n._data = this.loadBufferViewAsync("/bufferViews/" + c.index, c).then(function (r) { + if (5126 !== n.componentType || n.normalized) { + var l = new i(s); + return ( + G.b.ForEach(r, n.byteOffset || 0, c.byteStride || a, o, n.componentType, l.length, n.normalized || !1, function (e, t) { + l[t] = e; + }), + l + ); + } + return e._GetTypedArray(t, n.componentType, r, n.byteOffset, s); + }); + } + if (n.sparse) { + var l = n.sparse; + n._data = n._data.then(function (s) { + var c = s, + u = Le.Get(t + "/sparse/indices/bufferView", r._gltf.bufferViews, l.indices.bufferView), + h = Le.Get(t + "/sparse/values/bufferView", r._gltf.bufferViews, l.values.bufferView); + return Promise.all([r.loadBufferViewAsync("/bufferViews/" + u.index, u), r.loadBufferViewAsync("/bufferViews/" + h.index, h)]).then(function (r) { + var s, + u = r[0], + h = r[1], + d = e._GetTypedArray(t + "/sparse/indices", l.indices.componentType, u, l.indices.byteOffset, l.count), + p = o * l.count; + if (5126 !== n.componentType || n.normalized) { + var f = e._GetTypedArray(t + "/sparse/values", n.componentType, h, l.values.byteOffset, p); + (s = new i(p)), + G.b.ForEach(f, 0, a, o, n.componentType, s.length, n.normalized || !1, function (e, t) { + s[t] = e; + }); + } else s = e._GetTypedArray(t + "/sparse/values", n.componentType, h, l.values.byteOffset, p); + for (var m = 0, g = 0; g < d.length; g++) for (var b = d[g] * o, _ = 0; _ < o; _++) c[b++] = s[m++]; + return c; + }); + }); + } + return n._data; + }), + (e.prototype._loadFloatAccessorAsync = function (e, t) { + return this._loadAccessorAsync(e, t, Float32Array); + }), + (e.prototype._loadIndicesAccessorAsync = function (t, n) { + if ("SCALAR" !== n.type) throw new Error(t + "/type: Invalid value " + n.type); + if (5121 !== n.componentType && 5123 !== n.componentType && 5125 !== n.componentType) throw new Error(t + "/componentType: Invalid value " + n.componentType); + if (n._data) return n._data; + if (n.sparse) { + var i = e._GetTypedArrayConstructor(t + "/componentType", n.componentType); + n._data = this._loadAccessorAsync(t, n, i); + } else { + var r = Le.Get(t + "/bufferView", this._gltf.bufferViews, n.bufferView); + n._data = this.loadBufferViewAsync("/bufferViews/" + r.index, r).then(function (i) { + return e._GetTypedArray(t, n.componentType, i, n.byteOffset, n.count); + }); + } + return n._data; + }), + (e.prototype._loadVertexBufferViewAsync = function (e, t) { + var n = this; + return ( + e._babylonBuffer || + (e._babylonBuffer = this.loadBufferViewAsync("/bufferViews/" + e.index, e).then(function (e) { + return new G.a(n._babylonScene.getEngine(), e, !1); + })), + e._babylonBuffer + ); + }), + (e.prototype._loadVertexAccessorAsync = function (t, n, i) { + var r = this; + if (n._babylonVertexBuffer) return n._babylonVertexBuffer; + if (n.sparse) + n._babylonVertexBuffer = this._loadFloatAccessorAsync("/accessors/" + n.index, n).then(function (e) { + return new G.b(r._babylonScene.getEngine(), e, i, !1); + }); + else if (n.byteOffset && n.byteOffset % G.b.GetTypeByteLength(n.componentType) != 0) + l.a.Warn("Accessor byte offset is not a multiple of component type byte length"), + (n._babylonVertexBuffer = this._loadFloatAccessorAsync("/accessors/" + n.index, n).then(function (e) { + return new G.b(r._babylonScene.getEngine(), e, i, !1); + })); + else if (i === G.b.MatricesIndicesKind || i === G.b.MatricesIndicesExtraKind) + n._babylonVertexBuffer = this._loadFloatAccessorAsync("/accessors/" + n.index, n).then(function (e) { + return new G.b(r._babylonScene.getEngine(), e, i, !1); + }); + else { + var o = Le.Get(t + "/bufferView", this._gltf.bufferViews, n.bufferView); + n._babylonVertexBuffer = this._loadVertexBufferViewAsync(o, i).then(function (a) { + var s = e._GetNumComponents(t, n.type); + return new G.b(r._babylonScene.getEngine(), a, i, !1, !1, o.byteStride, !1, n.byteOffset, s, n.componentType, n.normalized, !0); + }); + } + return n._babylonVertexBuffer; + }), + (e.prototype._loadMaterialMetallicRoughnessPropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var i = new Array(); + return ( + t && + (t.baseColorFactor ? ((n.albedoColor = A.a.FromArray(t.baseColorFactor)), (n.alpha = t.baseColorFactor[3])) : (n.albedoColor = A.a.White()), + (n.metallic = null == t.metallicFactor ? 1 : t.metallicFactor), + (n.roughness = null == t.roughnessFactor ? 1 : t.roughnessFactor), + t.baseColorTexture && + i.push( + this.loadTextureInfoAsync(e + "/baseColorTexture", t.baseColorTexture, function (e) { + (e.name = n.name + " (Base Color)"), (n.albedoTexture = e); + }) + ), + t.metallicRoughnessTexture && + (i.push( + this.loadTextureInfoAsync(e + "/metallicRoughnessTexture", t.metallicRoughnessTexture, function (e) { + (e.name = n.name + " (Metallic Roughness)"), (n.metallicTexture = e); + }) + ), + (n.useMetallnessFromMetallicTextureBlue = !0), + (n.useRoughnessFromMetallicTextureGreen = !0), + (n.useRoughnessFromMetallicTextureAlpha = !1))), + Promise.all(i).then(function () {}) + ); + }), + (e.prototype._loadMaterialAsync = function (t, n, i, r, o) { + void 0 === o && (o = function () {}); + var a = this._extensionsLoadMaterialAsync(t, n, i, r, o); + if (a) return a; + n._data = n._data || {}; + var s = n._data[r]; + if (!s) { + this.logOpen(t + " " + (n.name || "")); + var c = this.createMaterial(t, n, r); + (s = { babylonMaterial: c, babylonMeshes: [], promise: this.loadMaterialPropertiesAsync(t, n, c) }), + (n._data[r] = s), + e.AddPointerMetadata(c, t), + this._parent.onMaterialLoadedObservable.notifyObservers(c), + this.logClose(); + } + return ( + s.babylonMeshes.push(i), + i.onDisposeObservable.addOnce(function () { + var e = s.babylonMeshes.indexOf(i); + -1 !== e && s.babylonMeshes.splice(e, 1); + }), + o(s.babylonMaterial), + s.promise.then(function () { + return s.babylonMaterial; + }) + ); + }), + (e.prototype._createDefaultMaterial = function (e, t) { + this._babylonScene._blockEntityCollection = this._forAssetContainer; + var n = new Me.a(e, this._babylonScene); + return ( + (this._babylonScene._blockEntityCollection = !1), + (n.fillMode = t), + (n.enableSpecularAntiAliasing = !0), + (n.useRadianceOverAlpha = !this._parent.transparencyAsCoverage), + (n.useSpecularOverAlpha = !this._parent.transparencyAsCoverage), + (n.transparencyMode = Me.a.PBRMATERIAL_OPAQUE), + (n.metallic = 1), + (n.roughness = 1), + n + ); + }), + (e.prototype.createMaterial = function (e, t, n) { + var i = this._extensionsCreateMaterial(e, t, n); + if (i) return i; + var r = t.name || "material" + t.index; + return this._createDefaultMaterial(r, n); + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this._extensionsLoadMaterialPropertiesAsync(e, t, n); + if (i) return i; + var r = new Array(); + return ( + r.push(this.loadMaterialBasePropertiesAsync(e, t, n)), + t.pbrMetallicRoughness && r.push(this._loadMaterialMetallicRoughnessPropertiesAsync(e + "/pbrMetallicRoughness", t.pbrMetallicRoughness, n)), + this.loadMaterialAlphaProperties(e, t, n), + Promise.all(r).then(function () {}) + ); + }), + (e.prototype.loadMaterialBasePropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var i = new Array(); + return ( + (n.emissiveColor = t.emissiveFactor ? A.a.FromArray(t.emissiveFactor) : new A.a(0, 0, 0)), + t.doubleSided && ((n.backFaceCulling = !1), (n.twoSidedLighting = !0)), + t.normalTexture && + (i.push( + this.loadTextureInfoAsync(e + "/normalTexture", t.normalTexture, function (e) { + (e.name = n.name + " (Normal)"), (n.bumpTexture = e); + }) + ), + (n.invertNormalMapX = !this._babylonScene.useRightHandedSystem), + (n.invertNormalMapY = this._babylonScene.useRightHandedSystem), + null != t.normalTexture.scale && (n.bumpTexture.level = t.normalTexture.scale), + (n.forceIrradianceInFragment = !0)), + t.occlusionTexture && + (i.push( + this.loadTextureInfoAsync(e + "/occlusionTexture", t.occlusionTexture, function (e) { + (e.name = n.name + " (Occlusion)"), (n.ambientTexture = e); + }) + ), + (n.useAmbientInGrayScale = !0), + null != t.occlusionTexture.strength && (n.ambientTextureStrength = t.occlusionTexture.strength)), + t.emissiveTexture && + i.push( + this.loadTextureInfoAsync(e + "/emissiveTexture", t.emissiveTexture, function (e) { + (e.name = n.name + " (Emissive)"), (n.emissiveTexture = e); + }) + ), + Promise.all(i).then(function () {}) + ); + }), + (e.prototype.loadMaterialAlphaProperties = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + switch (t.alphaMode || "OPAQUE") { + case "OPAQUE": + n.transparencyMode = Me.a.PBRMATERIAL_OPAQUE; + break; + case "MASK": + (n.transparencyMode = Me.a.PBRMATERIAL_ALPHATEST), (n.alphaCutOff = null == t.alphaCutoff ? 0.5 : t.alphaCutoff), n.albedoTexture && (n.albedoTexture.hasAlpha = !0); + break; + case "BLEND": + (n.transparencyMode = Me.a.PBRMATERIAL_ALPHABLEND), n.albedoTexture && ((n.albedoTexture.hasAlpha = !0), (n.useAlphaFromAlbedoTexture = !0)); + break; + default: + throw new Error(e + "/alphaMode: Invalid value (" + t.alphaMode + ")"); + } + }), + (e.prototype.loadTextureInfoAsync = function (t, n, i) { + var r = this; + void 0 === i && (i = function () {}); + var o = this._extensionsLoadTextureInfoAsync(t, n, i); + if (o) return o; + if ((this.logOpen("" + t), n.texCoord >= 2)) throw new Error(t + "/texCoord: Invalid value (" + n.texCoord + ")"); + var a = Le.Get(t + "/index", this._gltf.textures, n.index), + s = this._loadTextureAsync("/textures/" + n.index, a, function (o) { + (o.coordinatesIndex = n.texCoord || 0), e.AddPointerMetadata(o, t), r._parent.onTextureLoadedObservable.notifyObservers(o), i(o); + }); + return this.logClose(), s; + }), + (e.prototype._loadTextureAsync = function (t, n, i) { + void 0 === i && (i = function () {}); + var r = this._extensionsLoadTextureAsync(t, n, i); + if (r) return r; + this.logOpen(t + " " + (n.name || "")); + var o = null == n.sampler ? e.DefaultSampler : Le.Get(t + "/sampler", this._gltf.samplers, n.sampler), + a = Le.Get(t + "/source", this._gltf.images, n.source), + s = this._createTextureAsync(t, o, a, i); + return this.logClose(), s; + }), + (e.prototype._createTextureAsync = function (e, t, n, i) { + var r = this; + void 0 === i && (i = function () {}); + var o = this._loadSampler("/samplers/" + t.index, t), + a = new Array(), + s = new Oe.a(); + this._babylonScene._blockEntityCollection = this._forAssetContainer; + var c = new B.a( + null, + this._babylonScene, + o.noMipMaps, + !1, + o.samplingMode, + function () { + r._disposed || s.resolve(); + }, + function (t, n) { + r._disposed || s.reject(new Error(e + ": " + (n && n.message ? n.message : t || "Failed to load texture"))); + }, + void 0, + void 0, + void 0, + n.mimeType + ); + return ( + (this._babylonScene._blockEntityCollection = !1), + a.push(s.promise), + a.push( + this.loadImageAsync("/images/" + n.index, n).then(function (e) { + var t = n.uri || r._fileName + "#image" + n.index, + i = "data:" + r._uniqueRootUrl + t; + c.updateURL(i, e); + }) + ), + (c.wrapU = o.wrapU), + (c.wrapV = o.wrapV), + i(c), + Promise.all(a).then(function () { + return c; + }) + ); + }), + (e.prototype._loadSampler = function (t, n) { + return ( + n._data || + (n._data = { + noMipMaps: 9728 === n.minFilter || 9729 === n.minFilter, + samplingMode: e._GetTextureSamplingMode(t, n), + wrapU: e._GetTextureWrapMode(t + "/wrapS", n.wrapS), + wrapV: e._GetTextureWrapMode(t + "/wrapT", n.wrapT), + }), + n._data + ); + }), + (e.prototype.loadImageAsync = function (e, t) { + if (!t._data) { + if ((this.logOpen(e + " " + (t.name || "")), t.uri)) t._data = this.loadUriAsync(e + "/uri", t, t.uri); + else { + var n = Le.Get(e + "/bufferView", this._gltf.bufferViews, t.bufferView); + t._data = this.loadBufferViewAsync("/bufferViews/" + n.index, n); + } + this.logClose(); + } + return t._data; + }), + (e.prototype.loadUriAsync = function (t, n, i) { + var r = this, + o = this._extensionsLoadUriAsync(t, n, i); + if (o) return o; + if (!e._ValidateUri(i)) throw new Error(t + ": '" + i + "' is invalid"); + if (a.b.IsBase64(i)) { + var s = new Uint8Array(a.b.DecodeBase64(i)); + return this.log("Decoded " + i.substr(0, 64) + "... (" + s.length + " bytes)"), Promise.resolve(s); + } + return ( + this.log("Loading " + i), + this._parent.preprocessUrlAsync(this._rootUrl + i).then(function (e) { + return new Promise(function (n, o) { + if (!r._disposed) { + var s = a.b.LoadFile( + e, + function (e) { + if (!r._disposed) { + var t = new Uint8Array(e); + r.log("Loaded " + i + " (" + t.length + " bytes)"), n(t); + } + }, + function (e) { + if (!r._disposed && (s && ((s._lengthComputable = e.lengthComputable), (s._loaded = e.loaded), (s._total = e.total)), r._state === m.LOADING)) + try { + r._onProgress(); + } catch (e) { + o(e); + } + }, + r._babylonScene.offlineProvider, + !0, + function (e, n) { + r._disposed || o(new we.b(t + ": Failed to load '" + i + "'" + (e ? ": " + e.status + " " + e.statusText : ""), e)); + } + ); + r._requests.push(s); + } + }); + }) + ); + }), + (e.prototype._onProgress = function () { + if (this._progressCallback) { + for (var e = !0, t = 0, n = 0, i = 0, r = this._requests; i < r.length; i++) { + var o = r[i]; + if (void 0 === o._lengthComputable || void 0 === o._loaded || void 0 === o._total) return; + (e = e && o._lengthComputable), (t += o._loaded), (n += o._total); + } + this._progressCallback(new s.c(e, t, e ? n : 0)); + } + }), + (e.AddPointerMetadata = function (e, t) { + var n = (e.metadata = e.metadata || {}), + i = (n.gltf = n.gltf || {}); + (i.pointers = i.pointers || []).push(t); + }), + (e._GetTextureWrapMode = function (e, t) { + switch ((t = null == t ? 10497 : t)) { + case 33071: + return B.a.CLAMP_ADDRESSMODE; + case 33648: + return B.a.MIRROR_ADDRESSMODE; + case 10497: + return B.a.WRAP_ADDRESSMODE; + default: + return l.a.Warn(e + ": Invalid value (" + t + ")"), B.a.WRAP_ADDRESSMODE; + } + }), + (e._GetTextureSamplingMode = function (e, t) { + var n = null == t.magFilter ? 9729 : t.magFilter, + i = null == t.minFilter ? 9987 : t.minFilter; + if (9729 === n) + switch (i) { + case 9728: + return B.a.LINEAR_NEAREST; + case 9729: + return B.a.LINEAR_LINEAR; + case 9984: + return B.a.LINEAR_NEAREST_MIPNEAREST; + case 9985: + return B.a.LINEAR_LINEAR_MIPNEAREST; + case 9986: + return B.a.LINEAR_NEAREST_MIPLINEAR; + case 9987: + return B.a.LINEAR_LINEAR_MIPLINEAR; + default: + return l.a.Warn(e + "/minFilter: Invalid value (" + i + ")"), B.a.LINEAR_LINEAR_MIPLINEAR; + } + else + switch ((9728 !== n && l.a.Warn(e + "/magFilter: Invalid value (" + n + ")"), i)) { + case 9728: + return B.a.NEAREST_NEAREST; + case 9729: + return B.a.NEAREST_LINEAR; + case 9984: + return B.a.NEAREST_NEAREST_MIPNEAREST; + case 9985: + return B.a.NEAREST_LINEAR_MIPNEAREST; + case 9986: + return B.a.NEAREST_NEAREST_MIPLINEAR; + case 9987: + return B.a.NEAREST_LINEAR_MIPLINEAR; + default: + return l.a.Warn(e + "/minFilter: Invalid value (" + i + ")"), B.a.NEAREST_NEAREST_MIPNEAREST; + } + }), + (e._GetTypedArrayConstructor = function (e, t) { + switch (t) { + case 5120: + return Int8Array; + case 5121: + return Uint8Array; + case 5122: + return Int16Array; + case 5123: + return Uint16Array; + case 5125: + return Uint32Array; + case 5126: + return Float32Array; + default: + throw new Error(e + ": Invalid component type " + t); + } + }), + (e._GetTypedArray = function (t, n, i, r, o) { + var a = i.buffer; + r = i.byteOffset + (r || 0); + var s = e._GetTypedArrayConstructor(t + "/componentType", n); + try { + return new s(a, r, o); + } catch (e) { + throw new Error(t + ": " + e); + } + }), + (e._GetNumComponents = function (e, t) { + switch (t) { + case "SCALAR": + return 1; + case "VEC2": + return 2; + case "VEC3": + return 3; + case "VEC4": + case "MAT2": + return 4; + case "MAT3": + return 9; + case "MAT4": + return 16; + } + throw new Error(e + ": Invalid type (" + t + ")"); + }), + (e._ValidateUri = function (e) { + return a.b.IsBase64(e) || -1 === e.indexOf(".."); + }), + (e._GetDrawMode = function (e, t) { + switch ((null == t && (t = 4), t)) { + case 0: + return N.a.PointListDrawMode; + case 1: + return N.a.LineListDrawMode; + case 2: + return N.a.LineLoopDrawMode; + case 3: + return N.a.LineStripDrawMode; + case 4: + return N.a.TriangleFillMode; + case 5: + return N.a.TriangleStripDrawMode; + case 6: + return N.a.TriangleFanDrawMode; + } + throw new Error(e + ": Invalid mesh primitive mode (" + t + ")"); + }), + (e.prototype._compileMaterialsAsync = function () { + var e = this; + this._parent._startPerformanceCounter("Compile materials"); + var t = new Array(); + if (this._gltf.materials) + for (var n = 0, i = this._gltf.materials; n < i.length; n++) { + var r = i[n]; + if (r._data) + for (var o in r._data) + for (var a = r._data[o], s = 0, c = a.babylonMeshes; s < c.length; s++) { + var l = c[s]; + l.computeWorldMatrix(!0); + var u = a.babylonMaterial; + t.push(u.forceCompilationAsync(l)), + t.push(u.forceCompilationAsync(l, { useInstances: !0 })), + this._parent.useClipPlane && (t.push(u.forceCompilationAsync(l, { clipPlane: !0 })), t.push(u.forceCompilationAsync(l, { clipPlane: !0, useInstances: !0 }))); + } + } + return Promise.all(t).then(function () { + e._parent._endPerformanceCounter("Compile materials"); + }); + }), + (e.prototype._compileShadowGeneratorsAsync = function () { + var e = this; + this._parent._startPerformanceCounter("Compile shadow generators"); + for (var t = new Array(), n = 0, i = this._babylonScene.lights; n < i.length; n++) { + var r = i[n].getShadowGenerator(); + r && t.push(r.forceCompilationAsync()); + } + return Promise.all(t).then(function () { + e._parent._endPerformanceCounter("Compile shadow generators"); + }); + }), + (e.prototype._forEachExtensions = function (e) { + for (var t = 0, n = this._extensions; t < n.length; t++) { + var i = n[t]; + i.enabled && e(i); + } + }), + (e.prototype._applyExtensions = function (e, t, n) { + for (var i = 0, r = this._extensions; i < r.length; i++) { + var o = r[i]; + if (o.enabled) { + var a = o.name + "." + t, + s = e; + s._activeLoaderExtensionFunctions = s._activeLoaderExtensionFunctions || {}; + var c = s._activeLoaderExtensionFunctions; + if (!c[a]) { + c[a] = !0; + try { + var l = n(o); + if (l) return l; + } finally { + delete c[a]; + } + } + } + } + return null; + }), + (e.prototype._extensionsOnLoading = function () { + this._forEachExtensions(function (e) { + return e.onLoading && e.onLoading(); + }); + }), + (e.prototype._extensionsOnReady = function () { + this._forEachExtensions(function (e) { + return e.onReady && e.onReady(); + }); + }), + (e.prototype._extensionsLoadSceneAsync = function (e, t) { + return this._applyExtensions(t, "loadScene", function (n) { + return n.loadSceneAsync && n.loadSceneAsync(e, t); + }); + }), + (e.prototype._extensionsLoadNodeAsync = function (e, t, n) { + return this._applyExtensions(t, "loadNode", function (i) { + return i.loadNodeAsync && i.loadNodeAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadCameraAsync = function (e, t, n) { + return this._applyExtensions(t, "loadCamera", function (i) { + return i.loadCameraAsync && i.loadCameraAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadVertexDataAsync = function (e, t, n) { + return this._applyExtensions(t, "loadVertexData", function (i) { + return i._loadVertexDataAsync && i._loadVertexDataAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadMeshPrimitiveAsync = function (e, t, n, i, r, o) { + return this._applyExtensions(r, "loadMeshPrimitive", function (a) { + return a._loadMeshPrimitiveAsync && a._loadMeshPrimitiveAsync(e, t, n, i, r, o); + }); + }), + (e.prototype._extensionsLoadMaterialAsync = function (e, t, n, i, r) { + return this._applyExtensions(t, "loadMaterial", function (o) { + return o._loadMaterialAsync && o._loadMaterialAsync(e, t, n, i, r); + }); + }), + (e.prototype._extensionsCreateMaterial = function (e, t, n) { + return this._applyExtensions(t, "createMaterial", function (i) { + return i.createMaterial && i.createMaterial(e, t, n); + }); + }), + (e.prototype._extensionsLoadMaterialPropertiesAsync = function (e, t, n) { + return this._applyExtensions(t, "loadMaterialProperties", function (i) { + return i.loadMaterialPropertiesAsync && i.loadMaterialPropertiesAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadTextureInfoAsync = function (e, t, n) { + return this._applyExtensions(t, "loadTextureInfo", function (i) { + return i.loadTextureInfoAsync && i.loadTextureInfoAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadTextureAsync = function (e, t, n) { + return this._applyExtensions(t, "loadTexture", function (i) { + return i._loadTextureAsync && i._loadTextureAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadAnimationAsync = function (e, t) { + return this._applyExtensions(t, "loadAnimation", function (n) { + return n.loadAnimationAsync && n.loadAnimationAsync(e, t); + }); + }), + (e.prototype._extensionsLoadSkinAsync = function (e, t, n) { + return this._applyExtensions(n, "loadSkin", function (i) { + return i._loadSkinAsync && i._loadSkinAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadUriAsync = function (e, t, n) { + return this._applyExtensions(t, "loadUri", function (i) { + return i._loadUriAsync && i._loadUriAsync(e, t, n); + }); + }), + (e.prototype._extensionsLoadBufferViewAsync = function (e, t) { + return this._applyExtensions(t, "loadBufferView", function (n) { + return n.loadBufferViewAsync && n.loadBufferViewAsync(e, t); + }); + }), + (e.prototype._extensionsLoadBufferAsync = function (e, t, n, i) { + return this._applyExtensions(t, "loadBuffer", function (r) { + return r.loadBufferAsync && r.loadBufferAsync(e, t, n, i); + }); + }), + (e.LoadExtensionAsync = function (e, t, n, i) { + if (!t.extensions) return null; + var r = t.extensions[n]; + return r ? i(e + "/extensions/" + n, r) : null; + }), + (e.LoadExtraAsync = function (e, t, n, i) { + if (!t.extras) return null; + var r = t.extras[n]; + return r ? i(e + "/extras/" + n, r) : null; + }), + (e.prototype.isExtensionUsed = function (e) { + return !!this._gltf.extensionsUsed && -1 !== this._gltf.extensionsUsed.indexOf(e); + }), + (e.prototype.logOpen = function (e) { + this._parent._logOpen(e); + }), + (e.prototype.logClose = function () { + this._parent._logClose(); + }), + (e.prototype.log = function (e) { + this._parent._log(e); + }), + (e.prototype.startPerformanceCounter = function (e) { + this._parent._startPerformanceCounter(e); + }), + (e.prototype.endPerformanceCounter = function (e) { + this._parent._endPerformanceCounter(e); + }), + (e._RegisteredExtensions = {}), + (e.DefaultSampler = { index: -1 }), + e + ); + })(); + b._CreateGLTF2Loader = function (e) { + return new Fe(e); + }; + var Ne = n(15), + ke = n(108), + ze = n(201), + je = "EXT_lights_image_based", + Be = (function () { + function e(e) { + (this.name = je), (this._loader = e), (this.enabled = this._loader.isExtensionUsed(je)); + } + return ( + (e.prototype.dispose = function () { + delete this._loader, delete this._lights; + }), + (e.prototype.onLoading = function () { + var e = this._loader.gltf.extensions; + if (e && e[this.name]) { + var t = e[this.name]; + this._lights = t.lights; + } + }), + (e.prototype.loadSceneAsync = function (e, t) { + var n = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (i, r) { + var o = new Array(); + o.push(n._loader.loadSceneAsync(e, t)), n._loader.logOpen("" + i); + var a = Le.Get(i + "/light", n._lights, r.light); + return ( + o.push( + n._loadLightAsync("#/extensions/" + n.name + "/lights/" + r.light, a).then(function (e) { + n._loader.babylonScene.environmentTexture = e; + }) + ), + n._loader.logClose(), + Promise.all(o).then(function () {}) + ); + }); + }), + (e.prototype._loadLightAsync = function (e, t) { + var n = this; + if (!t._loaded) { + var i = new Array(); + this._loader.logOpen("" + e); + for ( + var r = new Array(t.specularImages.length), + o = function (n) { + var o = t.specularImages[n]; + r[n] = new Array(o.length); + for ( + var s = function (t) { + var s = e + "/specularImages/" + n + "/" + t; + a._loader.logOpen("" + s); + var c = o[t], + l = Le.Get(s, a._loader.gltf.images, c); + i.push( + a._loader.loadImageAsync("#/images/" + c, l).then(function (e) { + r[n][t] = e; + }) + ), + a._loader.logClose(); + }, + c = 0; + c < o.length; + c++ + ) + s(c); + }, + a = this, + s = 0; + s < t.specularImages.length; + s++ + ) + o(s); + this._loader.logClose(), + (t._loaded = Promise.all(i).then(function () { + var e = new ze.a(n._loader.babylonScene, null, t.specularImageSize); + if (((t._babylonTexture = e), null != t.intensity && (e.level = t.intensity), t.rotation)) { + var i = M.b.FromArray(t.rotation); + n._loader.babylonScene.useRightHandedSystem || (i = M.b.Inverse(i)), M.a.FromQuaternionToRef(i, e.getReflectionTextureMatrix()); + } + var o = ke.a.FromArray(t.irradianceCoefficients); + o.scaleInPlace(t.intensity), o.convertIrradianceToLambertianRadiance(); + var a = ke.b.FromHarmonics(o), + s = (r.length - 1) / Ne.a.Log2(t.specularImageSize); + return e.updateRGBDAsync(r, a, s); + })); + } + return t._loaded.then(function () { + return t._babylonTexture; + }); + }), + e + ); + })(); + Fe.RegisterExtension(je, function (e) { + return new Be(e); + }); + var Ve = n(167), + Ge = (function () { + function e(e) { + (this.name = "KHR_draco_mesh_compression"), (this._loader = e), (this.enabled = Ve.a.DecoderAvailable && this._loader.isExtensionUsed("KHR_draco_mesh_compression")); + } + return ( + (e.prototype.dispose = function () { + delete this.dracoCompression, delete this._loader; + }), + (e.prototype._loadVertexDataAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + if (null != t.mode) { + if (5 !== t.mode && 4 !== t.mode) throw new Error(e + ": Unsupported mode " + t.mode); + if (5 === t.mode) throw new Error(e + ": Mode " + t.mode + " is not currently supported"); + } + var a = {}, + s = function (e, t) { + var i = o.attributes[e]; + null != i && ((n._delayInfo = n._delayInfo || []), -1 === n._delayInfo.indexOf(t) && n._delayInfo.push(t), (a[t] = i)); + }; + s("POSITION", G.b.PositionKind), + s("NORMAL", G.b.NormalKind), + s("TANGENT", G.b.TangentKind), + s("TEXCOORD_0", G.b.UVKind), + s("TEXCOORD_1", G.b.UV2Kind), + s("JOINTS_0", G.b.MatricesIndicesKind), + s("WEIGHTS_0", G.b.MatricesWeightsKind), + s("COLOR_0", G.b.ColorKind); + var c = Le.Get(r, i._loader.gltf.bufferViews, o.bufferView); + return ( + c._dracoBabylonGeometry || + (c._dracoBabylonGeometry = i._loader.loadBufferViewAsync("#/bufferViews/" + c.index, c).then(function (t) { + return (i.dracoCompression || Ve.a.Default) + .decodeMeshAsync(t, a) + .then(function (e) { + var t = new U.a(n.name, i._loader.babylonScene); + return e.applyToGeometry(t), t; + }) + .catch(function (t) { + throw new Error(e + ": " + t.message); + }); + })), + c._dracoBabylonGeometry + ); + }); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_draco_mesh_compression", function (e) { + return new Ge(e); + }); + var Ue, + He = n(57); + !(function (e) { + (e.DIRECTIONAL = "directional"), (e.POINT = "point"), (e.SPOT = "spot"); + })(Ue || (Ue = {})); + var We = (function () { + function e(e) { + (this.name = "KHR_lights_punctual"), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_lights_punctual")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader, delete this._lights; + }), + (e.prototype.onLoading = function () { + var e = this._loader.gltf.extensions; + if (e && e[this.name]) { + var t = e[this.name]; + this._lights = t.lights; + } + }), + (e.prototype.loadNodeAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + return i._loader.loadNodeAsync(e, t, function (e) { + var t, + a = Le.Get(r, i._lights, o.light), + s = a.name || e.name; + switch (((i._loader.babylonScene._blockEntityCollection = i._loader._forAssetContainer), a.type)) { + case Ue.DIRECTIONAL: + t = new K.a(s, M.e.Backward(), i._loader.babylonScene); + break; + case Ue.POINT: + t = new Z.a(s, M.e.Zero(), i._loader.babylonScene); + break; + case Ue.SPOT: + var c = new q.a(s, M.e.Zero(), M.e.Backward(), 0, 1, i._loader.babylonScene); + (c.angle = 2 * ((a.spot && a.spot.outerConeAngle) || Math.PI / 4)), (c.innerAngle = 2 * ((a.spot && a.spot.innerConeAngle) || 0)), (t = c); + break; + default: + throw ((i._loader.babylonScene._blockEntityCollection = !1), new Error(r + ": Invalid light type (" + a.type + ")")); + } + (i._loader.babylonScene._blockEntityCollection = !1), + (t.falloffType = He.a.FALLOFF_GLTF), + (t.diffuse = a.color ? A.a.FromArray(a.color) : A.a.White()), + (t.intensity = null == a.intensity ? 1 : a.intensity), + (t.range = null == a.range ? Number.MAX_VALUE : a.range), + (t.parent = e), + i._loader._babylonLights.push(t), + Fe.AddPointerMetadata(t, r), + n(e); + }); + }); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_lights_punctual", function (e) { + return new We(e); + }); + var Xe = (function () { + function e(e) { + (this.name = "KHR_materials_pbrSpecularGlossiness"), (this.order = 200), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_materials_pbrSpecularGlossiness")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + var a = new Array(); + return a.push(i._loader.loadMaterialBasePropertiesAsync(e, t, n)), a.push(i._loadSpecularGlossinessPropertiesAsync(r, t, o, n)), i._loader.loadMaterialAlphaProperties(e, t, n), Promise.all(a).then(function () {}); + }); + }), + (e.prototype._loadSpecularGlossinessPropertiesAsync = function (e, t, n, i) { + if (!(i instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var r = new Array(); + return ( + (i.metallic = null), + (i.roughness = null), + n.diffuseFactor ? ((i.albedoColor = A.a.FromArray(n.diffuseFactor)), (i.alpha = n.diffuseFactor[3])) : (i.albedoColor = A.a.White()), + (i.reflectivityColor = n.specularFactor ? A.a.FromArray(n.specularFactor) : A.a.White()), + (i.microSurface = null == n.glossinessFactor ? 1 : n.glossinessFactor), + n.diffuseTexture && + r.push( + this._loader.loadTextureInfoAsync(e + "/diffuseTexture", n.diffuseTexture, function (e) { + (e.name = i.name + " (Diffuse)"), (i.albedoTexture = e); + }) + ), + n.specularGlossinessTexture && + (r.push( + this._loader.loadTextureInfoAsync(e + "/specularGlossinessTexture", n.specularGlossinessTexture, function (e) { + (e.name = i.name + " (Specular Glossiness)"), (i.reflectivityTexture = e); + }) + ), + (i.reflectivityTexture.hasAlpha = !0), + (i.useMicroSurfaceFromReflectivityMapAlpha = !0)), + Promise.all(r).then(function () {}) + ); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_materials_pbrSpecularGlossiness", function (e) { + return new Xe(e); + }); + var Ye = (function () { + function e(e) { + (this.name = "KHR_materials_unlit"), (this.order = 210), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_materials_unlit")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function () { + return i._loadUnlitPropertiesAsync(e, t, n); + }); + }), + (e.prototype._loadUnlitPropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var i = new Array(); + n.unlit = !0; + var r = t.pbrMetallicRoughness; + return ( + r && + (r.baseColorFactor ? ((n.albedoColor = A.a.FromArray(r.baseColorFactor)), (n.alpha = r.baseColorFactor[3])) : (n.albedoColor = A.a.White()), + r.baseColorTexture && + i.push( + this._loader.loadTextureInfoAsync(e + "/baseColorTexture", r.baseColorTexture, function (e) { + (e.name = n.name + " (Base Color)"), (n.albedoTexture = e); + }) + )), + t.doubleSided && ((n.backFaceCulling = !1), (n.twoSidedLighting = !0)), + this._loader.loadMaterialAlphaProperties(e, t, n), + Promise.all(i).then(function () {}) + ); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_materials_unlit", function (e) { + return new Ye(e); + }); + var Ke = (function () { + function e(e) { + (this.name = "KHR_materials_clearcoat"), (this.order = 190), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_materials_clearcoat")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + var a = new Array(); + return a.push(i._loader.loadMaterialPropertiesAsync(e, t, n)), a.push(i._loadClearCoatPropertiesAsync(r, o, n)), Promise.all(a).then(function () {}); + }); + }), + (e.prototype._loadClearCoatPropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var i = new Array(); + return ( + (n.clearCoat.isEnabled = !0), + null != t.clearcoatFactor ? (n.clearCoat.intensity = t.clearcoatFactor) : (n.clearCoat.intensity = 0), + t.clearcoatTexture && + i.push( + this._loader.loadTextureInfoAsync(e + "/clearcoatTexture", t.clearcoatTexture, function (e) { + (e.name = n.name + " (ClearCoat Intensity)"), (n.clearCoat.texture = e); + }) + ), + null != t.clearcoatRoughnessFactor ? (n.clearCoat.roughness = t.clearcoatRoughnessFactor) : (n.clearCoat.roughness = 0), + t.clearcoatRoughnessTexture && + i.push( + this._loader.loadTextureInfoAsync(e + "/clearcoatRoughnessTexture", t.clearcoatRoughnessTexture, function (e) { + (e.name = n.name + " (ClearCoat Roughness)"), (n.clearCoat.texture = e); + }) + ), + t.clearcoatNormalTexture && + (i.push( + this._loader.loadTextureInfoAsync(e + "/clearcoatNormalTexture", t.clearcoatNormalTexture, function (e) { + (e.name = n.name + " (ClearCoat Normal)"), (n.clearCoat.bumpTexture = e); + }) + ), + (n.invertNormalMapX = !n.getScene().useRightHandedSystem), + (n.invertNormalMapY = n.getScene().useRightHandedSystem), + null != t.clearcoatNormalTexture.scale && (n.clearCoat.bumpTexture.level = t.clearcoatNormalTexture.scale)), + Promise.all(i).then(function () {}) + ); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_materials_clearcoat", function (e) { + return new Ke(e); + }); + var Ze = (function () { + function e(e) { + (this.name = "KHR_materials_sheen"), (this.order = 190), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_materials_sheen")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + var a = new Array(); + return a.push(i._loader.loadMaterialPropertiesAsync(e, t, n)), a.push(i._loadSheenPropertiesAsync(r, o, n)), Promise.all(a).then(function () {}); + }); + }), + (e.prototype._loadSheenPropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + var i = new Array(); + return ( + (n.sheen.isEnabled = !0), + null != t.intensityFactor ? (n.sheen.intensity = t.intensityFactor) : (n.sheen.intensity = 0), + null != t.colorFactor && (n.sheen.color = A.a.FromArray(t.colorFactor)), + t.colorIntensityTexture && + i.push( + this._loader.loadTextureInfoAsync(e + "/sheenTexture", t.colorIntensityTexture, function (e) { + (e.name = n.name + " (Sheen Intensity)"), (n.sheen.texture = e); + }) + ), + Promise.all(i).then(function () {}) + ); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_materials_sheen", function (e) { + return new Ze(e); + }); + var qe = (function () { + function e(e) { + (this.name = "KHR_materials_specular"), (this.order = 190), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_materials_specular")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + var a = new Array(); + return a.push(i._loader.loadMaterialPropertiesAsync(e, t, n)), a.push(i._loadSpecularPropertiesAsync(r, o, n)), Promise.all(a).then(function () {}); + }); + }), + (e.prototype._loadSpecularPropertiesAsync = function (e, t, n) { + if (!(n instanceof Me.a)) throw new Error(e + ": Material type not supported"); + return void 0 !== t.specularFactor && (n.metallicF0Factor = t.specularFactor), t.specularTexture && (n.useMetallicF0FactorFromMetallicTexture = !0), Promise.resolve(); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_materials_specular", function (e) { + return new qe(e); + }); + var Qe = (function () { + function e(e) { + (this.name = "KHR_mesh_quantization"), (this.enabled = e.isExtensionUsed("KHR_mesh_quantization")); + } + return (e.prototype.dispose = function () {}), e; + })(); + Fe.RegisterExtension("KHR_mesh_quantization", function (e) { + return new Qe(e); + }); + var Je = (function () { + function e(e) { + (this.name = "KHR_texture_basisu"), (this._loader = e), (this.enabled = e.isExtensionUsed("KHR_texture_basisu")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype._loadTextureAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + var a = null == t.sampler ? Fe.DefaultSampler : Le.Get(e + "/sampler", i._loader.gltf.samplers, t.sampler), + s = Le.Get(r + "/source", i._loader.gltf.images, o.source); + return i._loader._createTextureAsync(e, a, s, function (e) { + (e.gammaSpace = !1), n(e); + }); + }); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_texture_basisu", function (e) { + return new Je(e); + }); + var $e = (function () { + function e(e) { + (this.name = "KHR_texture_transform"), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("KHR_texture_transform")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadTextureInfoAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (r, o) { + return i._loader.loadTextureInfoAsync(e, t, function (e) { + if (!(e instanceof B.a)) throw new Error(r + ": Texture type not supported"); + o.offset && ((e.uOffset = o.offset[0]), (e.vOffset = o.offset[1])), + (e.uRotationCenter = 0), + (e.vRotationCenter = 0), + o.rotation && (e.wAng = -o.rotation), + o.scale && ((e.uScale = o.scale[0]), (e.vScale = o.scale[1])), + null != o.texCoord && (e.coordinatesIndex = o.texCoord), + n(e); + }); + }); + }), + e + ); + })(); + Fe.RegisterExtension("KHR_texture_transform", function (e) { + return new $e(e); + }); + var et = n(190), + tt = n(137), + nt = n(192), + it = (function () { + function e(e) { + (this.name = "MSFT_audio_emitter"), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("MSFT_audio_emitter")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader, delete this._clips, delete this._emitters; + }), + (e.prototype.onLoading = function () { + var e = this._loader.gltf.extensions; + if (e && e[this.name]) { + var t = e[this.name]; + (this._clips = t.clips), (this._emitters = t.emitters), Le.Assign(this._clips), Le.Assign(this._emitters); + } + }), + (e.prototype.loadSceneAsync = function (e, t) { + var n = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (i, r) { + var o = new Array(); + o.push(n._loader.loadSceneAsync(e, t)); + for (var a = 0, s = r.emitters; a < s.length; a++) { + var c = s[a], + l = Le.Get(i + "/emitters", n._emitters, c); + if (null != l.refDistance || null != l.maxDistance || null != l.rolloffFactor || null != l.distanceModel || null != l.innerAngle || null != l.outerAngle) + throw new Error(i + ": Direction or Distance properties are not allowed on emitters attached to a scene"); + o.push(n._loadEmitterAsync(i + "/emitters/" + l.index, l)); + } + return Promise.all(o).then(function () {}); + }); + }), + (e.prototype.loadNodeAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (e, r) { + var o = new Array(); + return i._loader + .loadNodeAsync(e, t, function (t) { + for ( + var s = function (n) { + var r = Le.Get(e + "/emitters", i._emitters, n); + o.push( + i._loadEmitterAsync(e + "/emitters/" + r.index, r).then(function () { + for (var e = 0, n = r._babylonSounds; e < n.length; e++) { + var i = n[e]; + i.attachToMesh(t), + (null == r.innerAngle && null == r.outerAngle) || + (i.setLocalDirectionToMesh(M.e.Forward()), + i.setDirectionalCone(2 * a.b.ToDegrees(null == r.innerAngle ? Math.PI : r.innerAngle), 2 * a.b.ToDegrees(null == r.outerAngle ? Math.PI : r.outerAngle), 0)); + } + }) + ); + }, + c = 0, + l = r.emitters; + c < l.length; + c++ + ) { + s(l[c]); + } + n(t); + }) + .then(function (e) { + return Promise.all(o).then(function () { + return e; + }); + }); + }); + }), + (e.prototype.loadAnimationAsync = function (e, t) { + var n = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (i, r) { + return n._loader.loadAnimationAsync(e, t).then(function (o) { + var a = new Array(); + Le.Assign(r.events); + for (var s = 0, c = r.events; s < c.length; s++) { + var l = c[s]; + a.push(n._loadAnimationEventAsync(i + "/events/" + l.index, e, t, l, o)); + } + return Promise.all(a).then(function () { + return o; + }); + }); + }); + }), + (e.prototype._loadClipAsync = function (e, t) { + if (t._objectURL) return t._objectURL; + var n; + if (t.uri) n = this._loader.loadUriAsync(e, t, t.uri); + else { + var i = Le.Get(e + "/bufferView", this._loader.gltf.bufferViews, t.bufferView); + n = this._loader.loadBufferViewAsync("#/bufferViews/" + i.index, i); + } + return ( + (t._objectURL = n.then(function (e) { + return URL.createObjectURL(new Blob([e], { type: t.mimeType })); + })), + t._objectURL + ); + }), + (e.prototype._loadEmitterAsync = function (e, t) { + var n = this; + if (((t._babylonSounds = t._babylonSounds || []), !t._babylonData)) { + for ( + var i = new Array(), + r = t.name || "emitter" + t.index, + o = { loop: !1, autoplay: !1, volume: null == t.volume ? 1 : t.volume }, + s = function (e) { + var a = "#/extensions/" + c.name + "/clips", + s = Le.Get(a, c._clips, t.clips[e].clip); + i.push( + c._loadClipAsync(a + "/" + t.clips[e].clip, s).then(function (i) { + var a = (t._babylonSounds[e] = new tt.a(r, i, n._loader.babylonScene, null, o)); + (a.refDistance = t.refDistance || 1), + (a.maxDistance = t.maxDistance || 256), + (a.rolloffFactor = t.rolloffFactor || 1), + (a.distanceModel = t.distanceModel || "exponential"), + (a._positionInEmitterSpace = !0); + }) + ); + }, + c = this, + l = 0; + l < t.clips.length; + l++ + ) + s(l); + var u = Promise.all(i).then(function () { + var e = t.clips.map(function (e) { + return e.weight || 1; + }), + n = new nt.a(t.loop || !1, t._babylonSounds, e); + t.innerAngle && (n.directionalConeInnerAngle = 2 * a.b.ToDegrees(t.innerAngle)), + t.outerAngle && (n.directionalConeOuterAngle = 2 * a.b.ToDegrees(t.outerAngle)), + t.volume && (n.volume = t.volume), + (t._babylonData.sound = n); + }); + t._babylonData = { loaded: u }; + } + return t._babylonData.loaded; + }), + (e.prototype._getEventAction = function (e, t, n, i, r) { + switch (n) { + case "play": + return function (e) { + var n = (r || 0) + (e - i); + t.play(n); + }; + case "stop": + return function (e) { + t.stop(); + }; + case "pause": + return function (e) { + t.pause(); + }; + default: + throw new Error(e + ": Unsupported action " + n); + } + }), + (e.prototype._loadAnimationEventAsync = function (e, t, n, i, r) { + var o = this; + if (0 == r.targetedAnimations.length) return Promise.resolve(); + var a = r.targetedAnimations[0], + s = i.emitter, + c = Le.Get("#/extensions/" + this.name + "/emitters", this._emitters, s); + return this._loadEmitterAsync(e, c).then(function () { + var t = c._babylonData.sound; + if (t) { + var n = new et.a(i.time, o._getEventAction(e, t, i.action, i.time, i.startOffset)); + a.animation.addEvent(n), + r.onAnimationGroupEndObservable.add(function () { + t.stop(); + }), + r.onAnimationGroupPauseObservable.add(function () { + t.pause(); + }); + } + }); + }), + e + ); + })(); + Fe.RegisterExtension("MSFT_audio_emitter", function (e) { + return new it(e); + }); + var rt = (function () { + function e(e) { + (this.name = "MSFT_lod"), + (this.order = 100), + (this.maxLODsToLoad = 10), + (this.onNodeLODsLoadedObservable = new o.c()), + (this.onMaterialLODsLoadedObservable = new o.c()), + (this._nodeIndexLOD = null), + (this._nodeSignalLODs = new Array()), + (this._nodePromiseLODs = new Array()), + (this._materialIndexLOD = null), + (this._materialSignalLODs = new Array()), + (this._materialPromiseLODs = new Array()), + (this._indexLOD = null), + (this._bufferLODs = new Array()), + (this._loader = e), + (this.enabled = this._loader.isExtensionUsed("MSFT_lod")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader, + (this._nodeIndexLOD = null), + (this._nodeSignalLODs.length = 0), + (this._nodePromiseLODs.length = 0), + (this._materialIndexLOD = null), + (this._materialSignalLODs.length = 0), + (this._materialPromiseLODs.length = 0), + (this._indexLOD = null), + (this._bufferLODs.length = 0), + this.onMaterialLODsLoadedObservable.clear(), + this.onNodeLODsLoadedObservable.clear(); + }), + (e.prototype.onReady = function () { + for ( + var e = this, + t = function (t) { + var i = Promise.all(n._nodePromiseLODs[t]).then(function () { + 0 !== t && e._loader.endPerformanceCounter("Node LOD " + t), + e._loader.log("Loaded node LOD " + t), + e.onNodeLODsLoadedObservable.notifyObservers(t), + t !== e._nodePromiseLODs.length - 1 && (e._loader.startPerformanceCounter("Node LOD " + (t + 1)), e._nodeSignalLODs[t] && e._nodeSignalLODs[t].resolve()); + }); + n._loader._completePromises.push(i); + }, + n = this, + i = 0; + i < this._nodePromiseLODs.length; + i++ + ) + t(i); + var r = function (t) { + var n = Promise.all(o._materialPromiseLODs[t]).then(function () { + 0 !== t && e._loader.endPerformanceCounter("Material LOD " + t), + e._loader.log("Loaded material LOD " + t), + e.onMaterialLODsLoadedObservable.notifyObservers(t), + t !== e._materialPromiseLODs.length - 1 && (e._loader.startPerformanceCounter("Material LOD " + (t + 1)), e._materialSignalLODs[t] && e._materialSignalLODs[t].resolve()); + }); + o._loader._completePromises.push(n); + }, + o = this; + for (i = 0; i < this._materialPromiseLODs.length; i++) r(i); + for (i = 1; i < this._bufferLODs.length; i++) this._loadBufferLOD(i); + }), + (e.prototype.loadSceneAsync = function (e, t) { + var n = this._loader.loadSceneAsync(e, t); + return 0 !== this._bufferLODs.length && this._loadBufferLOD(0), n; + }), + (e.prototype.loadNodeAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtensionAsync(e, t, this.name, function (e, n) { + var r, + o = i._getLODs(e, t, i._loader.gltf.nodes, n.ids); + i._loader.logOpen("" + e); + for ( + var a = function (e) { + var t = o[e]; + (i._indexLOD = e), 0 !== e && ((i._nodeIndexLOD = e), (i._nodeSignalLODs[e] = i._nodeSignalLODs[e] || new Oe.a())); + var n = i._loader + .loadNodeAsync("#/nodes/" + t.index, t, function (e) { + e.setEnabled(!1); + }) + .then(function (t) { + if (0 !== e) { + var n = o[e - 1]; + n._babylonTransformNode && (i._disposeTransformNode(n._babylonTransformNode), delete n._babylonTransformNode); + } + return t.setEnabled(!0), t; + }); + 0 === e ? (r = n) : (i._nodeIndexLOD = null), (i._indexLOD = null), (i._nodePromiseLODs[e] = i._nodePromiseLODs[e] || []), i._nodePromiseLODs[e].push(n); + }, + s = 0; + s < o.length; + s++ + ) + a(s); + return i._loader.logClose(), r; + }); + }), + (e.prototype._loadMaterialAsync = function (e, t, n, i, r) { + var o = this; + return this._indexLOD + ? null + : Fe.LoadExtensionAsync(e, t, this.name, function (e, a) { + var s, + c = o._getLODs(e, t, o._loader.gltf.materials, a.ids); + o._loader.logOpen("" + e); + for ( + var l = function (e) { + var t = c[e]; + (o._indexLOD = e), 0 !== e && (o._materialIndexLOD = e); + var a = o._loader + ._loadMaterialAsync("#/materials/" + t.index, t, n, i, function (t) { + 0 === e && r(t); + }) + .then(function (t) { + if (0 !== e) { + r(t); + var n = c[e - 1]._data; + n[i] && (o._disposeMaterials([n[i].babylonMaterial]), delete n[i]); + } + return t; + }); + 0 === e ? (s = a) : (o._materialIndexLOD = null), (o._indexLOD = null), (o._materialPromiseLODs[e] = o._materialPromiseLODs[e] || []), o._materialPromiseLODs[e].push(a); + }, + u = 0; + u < c.length; + u++ + ) + l(u); + return o._loader.logClose(), s; + }); + }), + (e.prototype._loadUriAsync = function (e, t, n) { + var i = this; + if (null !== this._materialIndexLOD) { + this._loader.log("deferred"); + var r = this._materialIndexLOD - 1; + return ( + (this._materialSignalLODs[r] = this._materialSignalLODs[r] || new Oe.a()), + this._materialSignalLODs[r].promise.then(function () { + return i._loader.loadUriAsync(e, t, n); + }) + ); + } + if (null !== this._nodeIndexLOD) { + this._loader.log("deferred"); + r = this._nodeIndexLOD - 1; + return ( + (this._nodeSignalLODs[r] = this._nodeSignalLODs[r] || new Oe.a()), + this._nodeSignalLODs[this._nodeIndexLOD - 1].promise.then(function () { + return i._loader.loadUriAsync(e, t, n); + }) + ); + } + return null; + }), + (e.prototype.loadBufferAsync = function (e, t, n, i) { + if (this._loader.parent.useRangeRequests && !t.uri) { + if (!this._loader.bin) throw new Error(e + ": Uri is missing or the binary glTF is missing its binary chunk"); + var r = this._indexLOD || 0, + o = n, + a = o + i - 1, + s = this._bufferLODs[r]; + return ( + s ? ((s.start = Math.min(s.start, o)), (s.end = Math.max(s.end, a))) : ((s = { start: o, end: a, loaded: new Oe.a() }), (this._bufferLODs[r] = s)), + s.loaded.promise.then(function (e) { + return new Uint8Array(e.buffer, e.byteOffset + n - s.start, i); + }) + ); + } + return null; + }), + (e.prototype._loadBufferLOD = function (e) { + var t = this._bufferLODs[e]; + this._loader.bin.readAsync(t.start, t.end - t.start + 1).then( + function (e) { + t.loaded.resolve(e); + }, + function (e) { + t.loaded.reject(e); + } + ); + }), + (e.prototype._getLODs = function (e, t, n, i) { + if (this.maxLODsToLoad <= 0) throw new Error("maxLODsToLoad must be greater than zero"); + for (var r = new Array(), o = i.length - 1; o >= 0; o--) if ((r.push(Le.Get(e + "/ids/" + i[o], n, i[o])), r.length === this.maxLODsToLoad)) return r; + return r.push(t), r; + }), + (e.prototype._disposeTransformNode = function (e) { + var t = this, + n = new Array(), + i = e.material; + i && n.push(i); + for (var r = 0, o = e.getChildMeshes(); r < o.length; r++) { + var a = o[r]; + a.material && n.push(a.material); + } + e.dispose(); + var s = n.filter(function (e) { + return t._loader.babylonScene.meshes.every(function (t) { + return t.material != e; + }); + }); + this._disposeMaterials(s); + }), + (e.prototype._disposeMaterials = function (e) { + for (var t = {}, n = 0, i = e; n < i.length; n++) { + for (var r = 0, o = (u = i[n]).getActiveTextures(); r < o.length; r++) { + var a = o[r]; + t[a.uniqueId] = a; + } + u.dispose(); + } + for (var s in t) + for (var c = 0, l = this._loader.babylonScene.materials; c < l.length; c++) { + var u; + (u = l[c]).hasTexture(t[s]) && delete t[s]; + } + for (var s in t) t[s].dispose(); + }), + e + ); + })(); + Fe.RegisterExtension("MSFT_lod", function (e) { + return new rt(e); + }); + var ot = (function () { + function e(e) { + (this.name = "MSFT_minecraftMesh"), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("MSFT_minecraftMesh")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtraAsync(e, t, this.name, function (r, o) { + if (o) { + if (!(n instanceof Me.a)) throw new Error(r + ": Material type not supported"); + var a = i._loader.loadMaterialPropertiesAsync(e, t, n); + return n.needAlphaBlending() && ((n.forceDepthWrite = !0), (n.separateCullingPass = !0)), (n.backFaceCulling = n.forceDepthWrite), (n.twoSidedLighting = !0), a; + } + return null; + }); + }), + e + ); + })(); + Fe.RegisterExtension("MSFT_minecraftMesh", function (e) { + return new ot(e); + }); + var at = (function () { + function e(e) { + (this.name = "MSFT_sRGBFactors"), (this._loader = e), (this.enabled = this._loader.isExtensionUsed("MSFT_sRGBFactors")); + } + return ( + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadMaterialPropertiesAsync = function (e, t, n) { + var i = this; + return Fe.LoadExtraAsync(e, t, this.name, function (r, o) { + if (o) { + if (!(n instanceof Me.a)) throw new Error(r + ": Material type not supported"); + var a = i._loader.loadMaterialPropertiesAsync(e, t, n); + return n.albedoTexture || n.albedoColor.toLinearSpaceToRef(n.albedoColor), n.reflectivityTexture || n.reflectivityColor.toLinearSpaceToRef(n.reflectivityColor), a; + } + return null; + }); + }), + e + ); + })(); + Fe.RegisterExtension("MSFT_sRGBFactors", function (e) { + return new at(e); + }); + var st = (function () { + function e(e) { + (this.name = "ExtrasAsMetadata"), (this.enabled = !0), (this._loader = e); + } + return ( + (e.prototype._assignExtras = function (e, t) { + if (t.extras && Object.keys(t.extras).length > 0) { + var n = (e.metadata = e.metadata || {}); + (n.gltf = n.gltf || {}).extras = t.extras; + } + }), + (e.prototype.dispose = function () { + delete this._loader; + }), + (e.prototype.loadNodeAsync = function (e, t, n) { + var i = this; + return this._loader.loadNodeAsync(e, t, function (e) { + i._assignExtras(e, t), n(e); + }); + }), + (e.prototype.loadCameraAsync = function (e, t, n) { + var i = this; + return this._loader.loadCameraAsync(e, t, function (e) { + i._assignExtras(e, t), n(e); + }); + }), + (e.prototype.createMaterial = function (e, t, n) { + var i = this._loader.createMaterial(e, t, n); + return this._assignExtras(i, t), i; + }), + e + ); + })(); + Fe.RegisterExtension("ExtrasAsMetadata", function (e) { + return new st(e); + }); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "cd718180b9204d15f661250c7741c545.webp"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "42b21c6b50ae9ddd74894c0829ae870d.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "d4a3141421fd427168cf625156fee2ab.webp"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "79f0227ca8e0ed5e63f699e10abab7b0.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "c3a474ec7869a10db304b9734dc161a8.webp"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "62c86f25133c0384d6077e75c0913118.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "derived", function () { + return s; + }), + n.d(t, "readable", function () { + return o; + }), + n.d(t, "writable", function () { + return a; + }); + var i = n(0); + n.d(t, "get", function () { + return i.p; + }); + const r = []; + function o(e, t) { + return { subscribe: a(e, t).subscribe }; + } + function a(e, t = i.x) { + let n; + const o = []; + function a(t) { + if (Object(i.C)(e, t) && ((e = t), n)) { + const t = !r.length; + for (let t = 0; t < o.length; t += 1) { + const n = o[t]; + n[1](), r.push(n, e); + } + if (t) { + for (let e = 0; e < r.length; e += 2) r[e][0](r[e + 1]); + r.length = 0; + } + } + } + return { + set: a, + update: function (t) { + a(t(e)); + }, + subscribe: function (r, s = i.x) { + const c = [r, s]; + return ( + o.push(c), + 1 === o.length && (n = t(a) || i.x), + r(e), + () => { + const e = o.indexOf(c); + -1 !== e && o.splice(e, 1), 0 === o.length && (n(), (n = null)); + } + ); + }, + }; + } + function s(e, t, n) { + const r = !Array.isArray(e), + a = r ? [e] : e, + s = t.length < 2; + return o(n, (e) => { + let n = !1; + const o = []; + let c = 0, + l = i.x; + const u = () => { + if (c) return; + l(); + const n = t(r ? o[0] : o, e); + s ? e(n) : (l = Object(i.u)(n) ? n : i.x); + }, + h = a.map((e, t) => + Object(i.I)( + e, + (e) => { + (o[t] = e), (c &= ~(1 << t)), n && u(); + }, + () => { + c |= 1 << t; + } + ) + ); + return ( + (n = !0), + u(), + function () { + Object(i.B)(h), l(); + } + ); + }); + } + }, + function (e, t, n) { + "use strict"; + var i = "fresnelFunction", + r = "#ifdef FRESNEL\nfloat computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power)\n{\nfloat fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power);\nreturn clamp(fresnelTerm,0.,1.);\n}\n#endif"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = "bumpVertexDeclaration", + r = "#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP)\n#if defined(TANGENT) && defined(NORMAL)\nvarying mat3 vTBN;\n#endif\n#endif\n"; + n(7).a.IncludesShadersStore[i] = r; + }, + function (e, t, n) { + "use strict"; + var i = n(38), + r = n(32); + (i.a.prototype.createDynamicTexture = function (e, t, n, o) { + var a = new r.a(this, r.b.Dynamic); + return ( + (a.baseWidth = e), + (a.baseHeight = t), + n && ((e = this.needPOTTextures ? i.a.GetExponentOfTwo(e, this._caps.maxTextureSize) : e), (t = this.needPOTTextures ? i.a.GetExponentOfTwo(t, this._caps.maxTextureSize) : t)), + (a.width = e), + (a.height = t), + (a.isReady = !1), + (a.generateMipMaps = n), + (a.samplingMode = o), + this.updateTextureSamplingMode(o, a), + this._internalTexturesCache.push(a), + a + ); + }), + (i.a.prototype.updateDynamicTexture = function (e, t, n, i, r, o) { + if ((void 0 === i && (i = !1), void 0 === o && (o = !1), e)) { + this._bindTextureDirectly(this._gl.TEXTURE_2D, e, !0, o), this._unpackFlipY(n), i && this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + var a = r ? this._getInternalFormat(r) : this._gl.RGBA; + this._gl.texImage2D(this._gl.TEXTURE_2D, 0, a, a, this._gl.UNSIGNED_BYTE, t), + e.generateMipMaps && this._gl.generateMipmap(this._gl.TEXTURE_2D), + this._bindTextureDirectly(this._gl.TEXTURE_2D, null), + i && this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0), + (e.isReady = !0); + } + }); + }, + function (e, t, n) { + "use strict"; + var i = n(7), + r = (n(86), n(82), "colorPixelShader"), + o = + "#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#else\nuniform vec4 color;\n#endif\n#include\nvoid main(void) {\n#include\n#ifdef VERTEXCOLOR\ngl_FragColor=vColor;\n#else\ngl_FragColor=color;\n#endif\n}"; + i.a.ShadersStore[r] = o; + }, + function (e, t, n) { + "use strict"; + var i = n(7), + r = (n(70), n(88), n(71), n(72), n(73), n(83), "colorVertexShader"), + o = + "\nattribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include\n#include\n\n#include\nuniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\n\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\nvoid main(void) {\n#include\n#include\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*worldPos;\n} else {\ngl_Position=viewProjectionR*worldPos;\n}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#include\n#ifdef VERTEXCOLOR\n\nvColor=color;\n#endif\n}"; + i.a.ShadersStore[r] = o; + }, + function (e, t, n) { + "use strict"; + (function (e) { + n.d(t, "b", function () { + return l; + }), + n.d(t, "a", function () { + return u; + }); + var i = n(2), + r = n(10), + o = n(14), + a = n(147), + s = n(32), + c = n(127), + l = function () { + (this.renderWidth = 512), (this.renderHeight = 256), (this.textureSize = 512), (this.deterministicLockstep = !1), (this.lockstepMaxSteps = 4); + }, + u = (function (t) { + function n(n) { + void 0 === n && (n = new l()); + var i = t.call(this, null) || this; + o.a.Instances.push(i), + void 0 === n.deterministicLockstep && (n.deterministicLockstep = !1), + void 0 === n.lockstepMaxSteps && (n.lockstepMaxSteps = 4), + (i._options = n), + (i._caps = { + maxTexturesImageUnits: 16, + maxVertexTextureImageUnits: 16, + maxCombinedTexturesImageUnits: 32, + maxTextureSize: 512, + maxCubemapTextureSize: 512, + maxRenderTextureSize: 512, + maxVertexAttribs: 16, + maxVaryingVectors: 16, + maxFragmentUniformVectors: 16, + maxVertexUniformVectors: 16, + standardDerivatives: !1, + astc: null, + pvrtc: null, + etc1: null, + etc2: null, + maxAnisotropy: 0, + uintIndices: !1, + fragmentDepthSupported: !1, + highPrecisionShaderSupported: !0, + colorBufferFloat: !1, + textureFloat: !1, + textureFloatLinearFiltering: !1, + textureFloatRender: !1, + textureHalfFloat: !1, + textureHalfFloatLinearFiltering: !1, + textureHalfFloatRender: !1, + textureLOD: !1, + drawBuffersExtension: !1, + depthTextureExtension: !1, + vertexArrayObject: !1, + instancedArrays: !1, + canUseTimestampForTimerQuery: !1, + maxMSAASamples: 1, + blendMinMax: !1, + }), + r.a.Log("Babylon.js v" + o.a.Version + " - Null engine"); + var a = "undefined" != typeof self ? self : void 0 !== e ? e : window; + return "undefined" == typeof URL && (a.URL = { createObjectURL: function () {}, revokeObjectURL: function () {} }), "undefined" == typeof Blob && (a.Blob = function () {}), i; + } + return ( + Object(i.d)(n, t), + (n.prototype.isDeterministicLockStep = function () { + return this._options.deterministicLockstep; + }), + (n.prototype.getLockstepMaxSteps = function () { + return this._options.lockstepMaxSteps; + }), + (n.prototype.getHardwareScalingLevel = function () { + return 1; + }), + (n.prototype.createVertexBuffer = function (e) { + var t = new c.a(); + return (t.references = 1), t; + }), + (n.prototype.createIndexBuffer = function (e) { + var t = new c.a(); + return (t.references = 1), t; + }), + (n.prototype.clear = function (e, t, n, i) { + void 0 === i && (i = !1); + }), + (n.prototype.getRenderWidth = function (e) { + return void 0 === e && (e = !1), !e && this._currentRenderTarget ? this._currentRenderTarget.width : this._options.renderWidth; + }), + (n.prototype.getRenderHeight = function (e) { + return void 0 === e && (e = !1), !e && this._currentRenderTarget ? this._currentRenderTarget.height : this._options.renderHeight; + }), + (n.prototype.setViewport = function (e, t, n) { + this._cachedViewport = e; + }), + (n.prototype.createShaderProgram = function (e, t, n, i, r) { + return { __SPECTOR_rebuildProgram: null }; + }), + (n.prototype.getUniforms = function (e, t) { + return []; + }), + (n.prototype.getAttributes = function (e, t) { + return []; + }), + (n.prototype.bindSamplers = function (e) { + this._currentEffect = null; + }), + (n.prototype.enableEffect = function (e) { + (this._currentEffect = e), e.onBind && e.onBind(e), e._onBindObservable && e._onBindObservable.notifyObservers(e); + }), + (n.prototype.setState = function (e, t, n, i) { + void 0 === t && (t = 0), void 0 === i && (i = !1); + }), + (n.prototype.setIntArray = function (e, t) {}), + (n.prototype.setIntArray2 = function (e, t) {}), + (n.prototype.setIntArray3 = function (e, t) {}), + (n.prototype.setIntArray4 = function (e, t) {}), + (n.prototype.setFloatArray = function (e, t) {}), + (n.prototype.setFloatArray2 = function (e, t) {}), + (n.prototype.setFloatArray3 = function (e, t) {}), + (n.prototype.setFloatArray4 = function (e, t) {}), + (n.prototype.setArray = function (e, t) {}), + (n.prototype.setArray2 = function (e, t) {}), + (n.prototype.setArray3 = function (e, t) {}), + (n.prototype.setArray4 = function (e, t) {}), + (n.prototype.setMatrices = function (e, t) {}), + (n.prototype.setMatrix3x3 = function (e, t) {}), + (n.prototype.setMatrix2x2 = function (e, t) {}), + (n.prototype.setFloat = function (e, t) {}), + (n.prototype.setFloat2 = function (e, t, n) {}), + (n.prototype.setFloat3 = function (e, t, n, i) {}), + (n.prototype.setBool = function (e, t) {}), + (n.prototype.setFloat4 = function (e, t, n, i, r) {}), + (n.prototype.setAlphaMode = function (e, t) { + void 0 === t && (t = !1), this._alphaMode !== e && ((this.alphaState.alphaBlend = 0 !== e), t || this.setDepthWrite(0 === e), (this._alphaMode = e)); + }), + (n.prototype.bindBuffers = function (e, t, n) {}), + (n.prototype.wipeCaches = function (e) { + this.preventCacheWipeBetweenFrames || + (this.resetTextureCache(), + (this._currentEffect = null), + e && ((this._currentProgram = null), this.stencilState.reset(), this.depthCullingState.reset(), this.alphaState.reset()), + (this._cachedVertexBuffers = null), + (this._cachedIndexBuffer = null), + (this._cachedEffectForVertexBuffers = null)); + }), + (n.prototype.draw = function (e, t, n, i) {}), + (n.prototype.drawElementsType = function (e, t, n, i) {}), + (n.prototype.drawArraysType = function (e, t, n, i) {}), + (n.prototype._createTexture = function () { + return {}; + }), + (n.prototype._releaseTexture = function (e) {}), + (n.prototype.createTexture = function (e, t, n, i, r, o, a, c, l, u, h, d) { + void 0 === r && (r = 3), void 0 === o && (o = null), void 0 === a && (a = null), void 0 === c && (c = null), void 0 === l && (l = null), void 0 === u && (u = null), void 0 === h && (h = null); + var p = new s.a(this, s.b.Url), + f = String(e); + return ( + (p.url = f), + (p.generateMipMaps = !t), + (p.samplingMode = r), + (p.invertY = n), + (p.baseWidth = this._options.textureSize), + (p.baseHeight = this._options.textureSize), + (p.width = this._options.textureSize), + (p.height = this._options.textureSize), + u && (p.format = u), + (p.isReady = !0), + o && o(), + this._internalTexturesCache.push(p), + p + ); + }), + (n.prototype.createRenderTargetTexture = function (e, t) { + var n = new a.a(); + void 0 !== t && "object" == typeof t + ? ((n.generateMipMaps = t.generateMipMaps), + (n.generateDepthBuffer = void 0 === t.generateDepthBuffer || t.generateDepthBuffer), + (n.generateStencilBuffer = n.generateDepthBuffer && t.generateStencilBuffer), + (n.type = void 0 === t.type ? 0 : t.type), + (n.samplingMode = void 0 === t.samplingMode ? 3 : t.samplingMode)) + : ((n.generateMipMaps = t), (n.generateDepthBuffer = !0), (n.generateStencilBuffer = !1), (n.type = 0), (n.samplingMode = 3)); + var i = new s.a(this, s.b.RenderTarget), + r = e.width || e, + o = e.height || e; + return ( + (i._depthStencilBuffer = {}), + (i._framebuffer = {}), + (i.baseWidth = r), + (i.baseHeight = o), + (i.width = r), + (i.height = o), + (i.isReady = !0), + (i.samples = 1), + (i.generateMipMaps = !!n.generateMipMaps), + (i.samplingMode = n.samplingMode), + (i.type = n.type), + (i._generateDepthBuffer = n.generateDepthBuffer), + (i._generateStencilBuffer = !!n.generateStencilBuffer), + this._internalTexturesCache.push(i), + i + ); + }), + (n.prototype.updateTextureSamplingMode = function (e, t) { + t.samplingMode = e; + }), + (n.prototype.bindFramebuffer = function (e, t, n, i, r) { + this._currentRenderTarget && this.unBindFramebuffer(this._currentRenderTarget), + (this._currentRenderTarget = e), + (this._currentFramebuffer = e._MSAAFramebuffer ? e._MSAAFramebuffer : e._framebuffer), + this._cachedViewport && !r && this.setViewport(this._cachedViewport, n, i); + }), + (n.prototype.unBindFramebuffer = function (e, t, n) { + void 0 === t && (t = !1), (this._currentRenderTarget = null), n && (e._MSAAFramebuffer && (this._currentFramebuffer = e._framebuffer), n()), (this._currentFramebuffer = null); + }), + (n.prototype.createDynamicVertexBuffer = function (e) { + var t = new c.a(); + return (t.references = 1), (t.capacity = 1), t; + }), + (n.prototype.updateDynamicTexture = function (e, t, n, i, r) { + void 0 === i && (i = !1); + }), + (n.prototype.areAllEffectsReady = function () { + return !0; + }), + (n.prototype.getError = function () { + return 0; + }), + (n.prototype._getUnpackAlignement = function () { + return 1; + }), + (n.prototype._unpackFlipY = function (e) {}), + (n.prototype.updateDynamicIndexBuffer = function (e, t, n) { + void 0 === n && (n = 0); + }), + (n.prototype.updateDynamicVertexBuffer = function (e, t, n, i) {}), + (n.prototype._bindTextureDirectly = function (e, t) { + return this._boundTexturesCache[this._activeChannel] !== t && ((this._boundTexturesCache[this._activeChannel] = t), !0); + }), + (n.prototype._bindTexture = function (e, t) { + e < 0 || this._bindTextureDirectly(0, t); + }), + (n.prototype._deleteBuffer = function (e) {}), + (n.prototype.releaseEffects = function () {}), + (n.prototype.displayLoadingUI = function () {}), + (n.prototype.hideLoadingUI = function () {}), + (n.prototype._uploadCompressedDataToTextureDirectly = function (e, t, n, i, r, o, a) { + void 0 === o && (o = 0), void 0 === a && (a = 0); + }), + (n.prototype._uploadDataToTextureDirectly = function (e, t, n, i) { + void 0 === n && (n = 0), void 0 === i && (i = 0); + }), + (n.prototype._uploadArrayBufferViewToTexture = function (e, t, n, i) { + void 0 === n && (n = 0), void 0 === i && (i = 0); + }), + (n.prototype._uploadImageToTexture = function (e, t, n, i) { + void 0 === n && (n = 0), void 0 === i && (i = 0); + }), + n + ); + })(o.a); + }.call(this, n(212))); + }, + function (e, t, n) { + "use strict"; + var i = n(7), + r = (n(59), "rgbdDecodePixelShader"), + o = "\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include\nvoid main(void)\n{\ngl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);\n}"; + i.a.ShadersStore[r] = o; + }, + function (e, t, n) { + "use strict"; + var i = n(2), + r = n(38), + o = n(32), + a = n(10), + s = n(74); + (r.a.prototype._createDepthStencilCubeTexture = function (e, t) { + var n = new o.a(this, o.b.Unknown); + if (((n.isCube = !0), 1 === this.webGLVersion)) return a.a.Error("Depth cube texture is not supported by WebGL 1."), n; + var r = Object(i.a)({ bilinearFiltering: !1, comparisonFunction: 0, generateStencil: !1 }, t), + s = this._gl; + this._bindTextureDirectly(s.TEXTURE_CUBE_MAP, n, !0), this._setupDepthStencilTexture(n, e, r.generateStencil, r.bilinearFiltering, r.comparisonFunction); + for (var c = 0; c < 6; c++) + r.generateStencil + ? s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + c, 0, s.DEPTH24_STENCIL8, e, e, 0, s.DEPTH_STENCIL, s.UNSIGNED_INT_24_8, null) + : s.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + c, 0, s.DEPTH_COMPONENT24, e, e, 0, s.DEPTH_COMPONENT, s.UNSIGNED_INT, null); + return this._bindTextureDirectly(s.TEXTURE_CUBE_MAP, null), n; + }), + (r.a.prototype._partialLoadFile = function (e, t, n, i, r) { + void 0 === r && (r = null); + this._loadFile( + e, + function (e) { + (n[t] = e), n._internalCount++, 6 === n._internalCount && i(n); + }, + void 0, + void 0, + !0, + function (e, t) { + r && e && r(e.status + " " + e.statusText, t); + } + ); + }), + (r.a.prototype._cascadeLoadFiles = function (e, t, n, i) { + void 0 === i && (i = null); + var r = []; + r._internalCount = 0; + for (var o = 0; o < 6; o++) this._partialLoadFile(n[o], o, r, t, i); + }), + (r.a.prototype._cascadeLoadImgs = function (e, t, n, i, r) { + void 0 === i && (i = null); + var o = []; + o._internalCount = 0; + for (var a = 0; a < 6; a++) this._partialLoadImg(n[a], a, o, e, t, i, r); + }), + (r.a.prototype._partialLoadImg = function (e, t, n, i, r, o, a) { + var c; + void 0 === o && (o = null); + (c = s.a.LoadImage( + e, + function () { + c && ((n[t] = c), n._internalCount++, i && i._removePendingData(c)), 6 === n._internalCount && r(n); + }, + function (e, t) { + i && i._removePendingData(c), o && o(e, t); + }, + i ? i.offlineProvider : null, + a + )), + i && c && i._addPendingData(c); + }), + (r.a.prototype._setCubeMapTextureParams = function (e) { + var t = this._gl; + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MAG_FILTER, t.LINEAR), + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_MIN_FILTER, e ? t.LINEAR_MIPMAP_LINEAR : t.LINEAR), + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), + t.texParameteri(t.TEXTURE_CUBE_MAP, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), + this._bindTextureDirectly(t.TEXTURE_CUBE_MAP, null); + }), + (r.a.prototype.createCubeTexture = function (e, t, n, i, s, c, l, u, h, d, p, f) { + var m = this; + void 0 === s && (s = null), void 0 === c && (c = null), void 0 === u && (u = null), void 0 === h && (h = !1), void 0 === d && (d = 0), void 0 === p && (p = 0), void 0 === f && (f = null); + var g = this._gl, + b = f || new o.a(this, o.b.Cube); + (b.isCube = !0), (b.url = e), (b.generateMipMaps = !i), (b._lodGenerationScale = d), (b._lodGenerationOffset = p), this._doNotHandleContextLost || ((b._extension = u), (b._files = n)); + for (var _ = e.lastIndexOf("."), v = u || (_ > -1 ? e.substring(_).toLowerCase() : ""), y = null, C = 0, P = r.a._TextureLoaders; C < P.length; C++) { + var x = P[C]; + if (x.canLoad(v)) { + y = x; + break; + } + } + if (y) { + var T = function (e) { + m._bindTextureDirectly(g.TEXTURE_CUBE_MAP, b, !0), y.loadCubeData(e, b, h, s, c); + }; + n && 6 === n.length + ? y.supportCascades + ? this._cascadeLoadFiles( + t, + function (e) { + return T( + e.map(function (e) { + return new Uint8Array(e); + }) + ); + }, + n, + c + ) + : c + ? c("Textures type does not support cascades.") + : a.a.Warn("Texture loader does not support cascades.") + : this._loadFile( + e, + function (e) { + return T(new Uint8Array(e)); + }, + void 0, + void 0, + !0, + function (e, t) { + c && e && c(e.status + " " + e.statusText, t); + } + ); + } else { + if (!n) throw new Error("Cannot load cubemap because files were not defined"); + this._cascadeLoadImgs( + t, + function (e) { + var t = m.needPOTTextures ? r.a.GetExponentOfTwo(e[0].width, m._caps.maxCubemapTextureSize) : e[0].width, + n = t, + o = [g.TEXTURE_CUBE_MAP_POSITIVE_X, g.TEXTURE_CUBE_MAP_POSITIVE_Y, g.TEXTURE_CUBE_MAP_POSITIVE_Z, g.TEXTURE_CUBE_MAP_NEGATIVE_X, g.TEXTURE_CUBE_MAP_NEGATIVE_Y, g.TEXTURE_CUBE_MAP_NEGATIVE_Z]; + m._bindTextureDirectly(g.TEXTURE_CUBE_MAP, b, !0), m._unpackFlipY(!1); + for (var c = l ? m._getInternalFormat(l) : m._gl.RGBA, u = 0; u < o.length; u++) + if (e[u].width !== t || e[u].height !== n) { + if ((m._prepareWorkingCanvas(), !m._workingCanvas || !m._workingContext)) return void a.a.Warn("Cannot create canvas to resize texture."); + (m._workingCanvas.width = t), (m._workingCanvas.height = n), m._workingContext.drawImage(e[u], 0, 0, e[u].width, e[u].height, 0, 0, t, n), g.texImage2D(o[u], 0, c, c, g.UNSIGNED_BYTE, m._workingCanvas); + } else g.texImage2D(o[u], 0, c, c, g.UNSIGNED_BYTE, e[u]); + i || g.generateMipmap(g.TEXTURE_CUBE_MAP), + m._setCubeMapTextureParams(!i), + (b.width = t), + (b.height = n), + (b.isReady = !0), + l && (b.format = l), + b.onLoadedObservable.notifyObservers(b), + b.onLoadedObservable.clear(), + s && s(); + }, + n, + c + ); + } + return this._internalTexturesCache.push(b), b; + }); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TrackHelper = void 0); + const i = n(133), + r = n(62), + o = n(150), + a = n(40), + s = n(48); + t.TrackHelper = class { + static loadConfigs() { + const e = i.RegionInfo.fromJson(n(253)(`./${s.GameConfig.DEFAULT_REGION}/${s.GameConfig.DEFAULT_REGION}Region.json`)), + t = i.TrackPacing.fromJson(n(255)), + r = new Map(), + o = new Map(); + s.GameConfig.DEFAULT_ZONES.forEach((e) => { + const t = `${s.GameConfig.DEFAULT_REGION}${e}`, + a = i.RegionZoneInfo.fromJson(n(256)(`./${s.GameConfig.DEFAULT_REGION}/${e}/${t}Zone.json`)); + r.set(a.ID, a); + const c = new Map(), + l = `${s.GameConfig.DEFAULT_REGION}${e}`, + u = n(262)(`./${s.GameConfig.DEFAULT_REGION}/${e}/${l}Pieces.json`); + for (const e in u) c.set(e, i.TrackPieceInfo.fromJson(u[e])); + o.set(a.ID, c); + }); + for (const [, e] of r) for (const t of e.Definitions) t.initialize(), (t.LedgeLeftOrRightIsObstacle = !e.IsLedgeZone); + return [e, t, r, o]; + } + static selectPieceSimple(e, t, n, i) { + var r; + let a = 0; + const s = n.SelectedDefinition.ID.ZoneID, + c = (null === (r = e.getZoneInfo(s)) || void 0 === r ? void 0 : r.Definitions) || []; + if (c.length < 1) return; + for (let e = 0; e < c.length; ++e) { + const n = c[e]; + if (!(n.SelectionOdds < 1 && o.Utils.random(0, 1e3) >= 1e3 * n.SelectionOdds) && ((t.AvailablePieceDefinitions[a] = n), ++a, a > t.MaxPossibleDefinitions)) break; + } + const l = o.Utils.random(0, a); + return (i.Definition = t.AvailablePieceDefinitions[l]), i; + } + static selectPieceComplex(e, t, n, r) { + const c = n.SelectedDefinition, + l = e.getZoneInfo(c.ID.ZoneID), + u = t.findZonePacing(c.ID.ZoneID), + h = t.ActiveMilestone; + let d = !!h.AllowObstacles, + p = !1; + n.DistanceSinceLastMandatoryTurn < h.MinDistanceAfterTurnForObstacle && (d = !1), + (n.BackToBackObstacleCount >= h.MaxBackToBackObstacles || 0 == !!c.AllowDoubleObstacle) && (d = !1), + n.DistanceSinceLastObstacle < h.MinDistanceBetweenObstacles && o.Utils.random(0, 1e3) >= 1e3 * h.DoubleObstaclePercent && (d = !1), + c.isMandatoryTurn() && (d = !1), + t.IsFastTurnSection && 0 == !!l.AllowObstacleDuringFastTurn && (d = !1); + const f = n.DistanceSinceLastMandatoryTurn >= h.MinDistanceBetweenTurns, + m = c.isObstacle() && 0 == !!h.AllowTurnAfterObstacle, + g = !!h.AllowTurns && 1 == f && 0 == m, + b = n.DistanceSinceLastOptionalTurn >= h.MinDistanceBetweenOptionalTurns, + _ = 1 == !!h.AllowOptionalTurns && 1 == b, + v = !(d && (c.IsJumpOver || c.IsStumble)), + y = s.GameConfig.IS_DEBUG && s.GameConfig.DEFAULT_ZONES.length != s.GameConfig.DEBUG_SELECTED_ZONES.length, + C = y ? s.GameConfig.DEBUG_MIN_DISTANCE_BETWEEN_BASE_ZONE_CHANGE : t.MinDistanceBetweenBaseZoneChange, + P = !t.IsFastTurnSection && !c.isObstacle() && !!l.TransitionToZoneSupported && n.DistanceSinceLastZoneChange > C; + p = null == u ? n.DistanceSinceLastZoneChange > 100 : n.DistanceSinceLastZoneChange > u.MinLength; + let x = !1, + T = !1; + l.TransitionToZoneSupported && + !P && + (g && n.DistanceSinceLastMandatoryTurn >= h.MaxDistanceBetweenTurns && (x = !0), + d && n.DistanceSinceLastObstacle >= h.MaxDistanceBetweenObstacles && (T = !0), + x && T && (0 == o.Utils.random(0, 2) ? (x = !1) : (T = !1))); + const S = !(c.CategoryType == i.TrackPieceCategory.ZoneExitTransition); + let O = 0; + const E = e.getAllZones(); + for (const [, n] of E) { + if (!e.enabledZones.includes(n.Name) || (y && !s.GameConfig.DEBUG_SELECTED_ZONES.includes(n.Name))) continue; + const r = t.findZonePacing(n.ID), + u = n.ID == l.ID && S, + f = P && n.ID != l.ID && null != r, + m = c.CategoryType == i.TrackPieceCategory.ZoneExitTransition && !!n.TransitionToZoneSupported; + if (u || f || m) + for (const e of n.Definitions) { + const r = !(e.CategoryType == i.TrackPieceCategory.CompoundPieceMiddle || e.CategoryType == i.TrackPieceCategory.CompoundPieceEnd), + s = f && e.CategoryType == i.TrackPieceCategory.ZoneEntranceTransition && c.CategoryType != i.TrackPieceCategory.ZoneEntranceTransition, + u = !!n.TransitionToZoneSupported || (l.ID == n.ID && c.CategoryType != i.TrackPieceCategory.ZoneExitTransition && 0 == s); + let m = r && (s || u); + const b = e.DifficultyLevel <= h.MaxTrackPieceDifficulty; + if (n.IsLedgeZone && e.CategoryType != i.TrackPieceCategory.ZoneEntranceTransition) { + const t = !!( + (c.IsLedgeLeft && (e.IsLedgeLeft || e.LedgeZoneTransitionType == i.LedgeZoneTransition.LeftToRight)) || + (c.IsLedgeRight && (e.IsLedgeRight || e.LedgeZoneTransitionType == i.LedgeZoneTransition.RightToLeft)) + ); + m = m && t; + } + let C = m && b && (e.SelectionOdds >= 1 || o.Utils.random(0, 1e3) < 1e3 * e.SelectionOdds); + if ((y && e.CategoryType == i.TrackPieceCategory.ZoneEntranceTransition && 0 == a.GameController.instance.character.params.currentTrackPiece.SelectedDefinition.ID.ZoneID && e.ID.ZoneID > 0 && (C = !0), C)) { + const n = x || T, + r = 0 == n && P && e.CategoryType == i.TrackPieceCategory.ZoneEntranceTransition, + o = 0 == n && p && e.CategoryType == i.TrackPieceCategory.ZoneExitTransition; + let a = 0 == x && d && e.isObstacle() && !e.isZoneTransition(); + const s = 0 == T && 1 == e.isMandatoryTurn() && 1 == g, + c = 0 == n && 0 == e.isTurn() && 0 == e.isObstacle() && 0 == e.isZoneTransition(), + l = 1 == !!e.IsOptionalJunction && 1 == _; + if ((a && e.IsSlideUnder && !v && (a = !1), (c || a || s || 1 == l || r || o) && ((t.AvailablePieceDefinitions[O] = e), O++, O > t.MaxPossibleDefinitions))) break; + } + } + if (O > t.MaxPossibleDefinitions) break; + } + if (O > 0) { + const n = o.Utils.random(0, O); + if (((r.Definition = t.AvailablePieceDefinitions[n]), r.Definition.CategoryType == i.TrackPieceCategory.ZoneEntranceTransition)) { + const t = e.getZoneInfo(r.Definition.ID.ZoneID); + null != t && null != t.TutorialPacing && t.TutorialPacing.TutorialEnabled && (r.Pacing = t.TutorialPacing); + } + } else r = new i.NewTrackPieceInfo(); + return r; + } + static selectPieceTutorial() {} + static drawDebugPathSplines(e, t) { + const n = r.Vector3.Zero(), + i = []; + for (let t = 0; t < e.trackInfo.Paths[0].GeneratedPath.length; ++t) { + const r = n.add(e.trackInfo.Paths[0].GeneratedPath[t]); + i.push(r); + } + const o = e.trackInfo.Paths[0].GeneratedPath.length, + a = r.Curve3.CreateCatmullRomSpline(i, o, !1), + s = r.Mesh.CreateLines("catmullRom", a.getPoints(), t); + (s.color = new r.Color3(0, 1, 0)), s.setParent(e.assetInfo.rootMesh); + } + static createWorldSpline(e, t, n, i) { + for (const o of e.trackInfo.Paths) { + const a = []; + for (let e = 0; e < o.GeneratedPath.length; ++e) { + const s = new r.TransformNode("path_node", i); + (s.position = o.GeneratedPath[e].clone()), s.position.addInPlace(t), s.rotateAround(t, r.Axis.Y, (n * Math.PI) / 180), a.push(s.position.clone()), s.dispose(); + } + e.trackPaths.push(a); + } + } + static calcPointAlongTrack(e, t) { + let n, + o = e.currentTrackPiece.trackPaths[e.currentTrackPiece.selectedPathId], + s = e.distanceFromPieceStart; + const c = e.currentPosition; + if (e.currentSegment + 1 >= o.length) { + if (((n = a.GameController.instance.track.advanceToNextPieceAndBuild(e.currentTrackPiece)), null == n)) return e; + (e.currentTrackPiece = n), (e.currentSegment = 0), (e.pathId = i.TrackPieceDefinition.MainPathID), (s = 0), (o = e.currentTrackPiece.trackPaths[e.currentTrackPiece.selectedPathId]); + } + const l = t.deltaTime * (e.boostVelocity > 0 ? e.boostVelocity : e.currentVelocity), + u = e.currentDirection.multiplyByFloats(l, l, l); + e.currentPosition = e.currentPosition.add(u); + let h = o[e.currentSegment], + d = o[e.currentSegment + 1], + p = d.subtract(h), + f = p.length(); + p = p.normalize(); + let m = e.currentPosition.subtract(h), + g = r.Vector3.Dot(m, p); + const b = e.currentSegment; + for (; g > f; ) { + if ((++e.currentSegment, e.currentSegment + 1 >= o.length)) { + if (((n = a.GameController.instance.track.advanceToNextPieceAndBuild(e.currentTrackPiece)), null == n)) return e; + (e.currentTrackPiece = n), (e.currentSegment = 0), (e.pathId = i.TrackPieceDefinition.MainPathID), (s = 0), (o = e.currentTrackPiece.trackPaths[e.currentTrackPiece.selectedPathId]); + } + if (((h = o[e.currentSegment]), (d = o[e.currentSegment + 1]), (p = d.subtract(h)), (f = p.length()), (p = p.normalize()), (m = e.currentPosition.subtract(h)), (g = r.Vector3.Dot(m, p)), b == e.currentSegment)) break; + } + let _ = 0; + if (o.length > e.currentSegment) for (let t = 0; t < e.currentSegment; ++t) _ += r.Vector3.Distance(o[t], o[t + 1]); + (s = _ + g), (e.distanceFromPieceStart = s), (e.distanceFromStartOfSegment = g), (e.currentDirection = p), (m = p.multiplyByFloats(g, g, g)), (e.currentPosition = m.add(h)); + const v = e.currentPosition.subtract(c), + y = r.Vector3.Dot(v, v.clone().normalize()); + return (e.deltaDistance = y), a.GameController.instance.track.updatePacingDistance(y), e; + } + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.AssetUtils = t.AssetInfo = void 0); + const r = n(62), + o = n(40), + a = n(48); + class s { + constructor(e, t) { + (this.meshes = []), + (this.nodes = []), + (this.fillMeshes = []), + (this.skeletons = []), + (this.animationGroups = []), + (this.particleSystems = []), + (this.collisionMeshes = []), + (this.shadowMeshes = []), + (this.axisScaling = new r.Vector3(-1, 1, -1)), + (this.partOfPack = !1), + (this.id = e), + (this.name = t); + } + clone() { + const e = new s(Math.random().toString(36).substr(2, 9), this.name), + t = this.container.instantiateModelsToScene((e) => e); + return ( + (t.rootNodes[0].name = this.name), + (e.rootMesh = t.rootNodes[0]), + (e.animationGroups = t.animationGroups), + (e.skeletons = t.skeletons), + (e.axisScaling = this.axisScaling.clone()), + (e.partOfPack = this.partOfPack), + e.rootMesh + .getChildMeshes(!1, (e) => e instanceof r.AbstractMesh) + .forEach((t) => { + const n = t; + e.meshes.push(n), + n.name.includes("_fill") + ? (e.fillMeshes.push(n), n.setEnabled(!0), (n.isVisible = !0)) + : n.name.includes("Collider") + ? n.name.includes("ShadowBox") || n.name.includes("shadowtestbox") + ? ((n.isVisible = !1), (n.checkCollisions = !0), e.shadowMeshes.push(n)) + : ((n.renderingGroupId = o.ETR2RenderingGroup.TRACK_PIECES), + n.name.includes("mine_duck_b") && (n.scaling.z = 3), + e.collisionMeshes.push(n), + (n.checkCollisions = !0), + (n.isVisible = a.GameConfig.showColliders)) + : n.name.includes("god_rays") || ((n.checkCollisions = !0), (n.isVisible = !0)); + }), + (e.rootMesh.scaling = e.axisScaling.clone()), + e + ); + } + } + t.AssetInfo = s; + t.AssetUtils = class { + static loadAssetAsync(e, t, n) { + return i(this, void 0, void 0, function* () { + const i = yield r.SceneLoader.LoadAssetContainerAsync(t, void 0, n), + a = new s(e, e); + (a.meshes = i.meshes), + a.meshes.forEach((e) => { + (e.checkCollisions = !1), + (e.isVisible = !1), + (e.alphaIndex = 0), + (e.cullingStrategy = r.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY), + (e.renderingGroupId = o.ETR2RenderingGroup.TRACK_PIECES), + e instanceof r.Mesh && (e.receiveShadows = !1); + }); + return ( + i.transformNodes.forEach((e) => { + if (e.name.includes("god")) { + const t = 4, + i = 8, + a = 3, + s = 2, + c = s / t, + l = a / i, + u = (s - 1) / t, + h = (a - 1) / i, + d = new r.Vector4(c, l, u, h), + p = { size: 1, frontUVs: d, backUVs: d, sideOrientation: r.Mesh.DOUBLESIDE }, + f = r.MeshBuilder.CreatePlane("godray", p, n); + (f.parent = e.parent), + (f.renderingGroupId = o.ETR2RenderingGroup.TRACK_PIECES), + f.rotate(r.Axis.Z, (Math.PI / 180) * 135, r.Space.LOCAL), + (f.position = e.position.clone()), + (f.position.y -= 2), + (f.position.x -= 3), + f.setPivotPoint(new r.Vector3(0.5, 0.5, 0.5), r.Space.LOCAL), + (f.scaling.x = 10), + (f.scaling.y = 4), + (f.isVisible = !1); + } else if (e.name.includes("mine_entrance")) { + const t = r.Mesh.CreatePlane("mine_exposure_plane", 1, n); + (t.scaling = new r.Vector3(5, 5, 1)), + (t.parent = e.parent), + (t.renderingGroupId = o.ETR2RenderingGroup.TRACK_PIECES), + (t.position = e.position.clone()), + (t.position.z = 3), + (t.position.y = 1.5), + (t.isVisible = !0); + } + }), + (a.skeletons = i.skeletons), + (a.animationGroups = i.animationGroups), + (a.particleSystems = i.particleSystems), + (a.container = i), + a.container.createRootMesh(), + a + ); + }); + } + }; + }, + function (e, t, n) { + "use strict"; + var i, + r = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + a = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, i); + else for (var s = e.length - 1; s >= 0; s--) (r = e[s]) && (a = (o < 3 ? r(a) : o > 3 ? r(t, n, a) : r(t, n)) || a); + return o > 3 && a && Object.defineProperty(t, n, a), a; + }, + o = + (this && this.__metadata) || + function (e, t) { + if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.AbiltiesUpgradeModel = t.Ability = t.Rule = void 0), n(176); + const a = n(177), + s = n(214); + let c = class { + constructor() { + (this.level = 0), (this.amount = 0), (this.reward = 0); + } + }; + r([a.jsonMember, o("design:type", Number)], c.prototype, "level", void 0), + r([a.jsonMember, o("design:type", Number)], c.prototype, "amount", void 0), + r([a.jsonMember, o("design:type", Number)], c.prototype, "reward", void 0), + (c = r([a.jsonObject], c)), + (t.Rule = c); + let l = class { + constructor() { + (this.eid = 0), (this.rule = new Array()); + } + }; + r([a.jsonMember, o("design:type", Number)], l.prototype, "eid", void 0), + r([a.jsonMember, o("design:type", String)], l.prototype, "name", void 0), + r([a.jsonArrayMember(c), o("design:type", Array)], l.prototype, "rule", void 0), + (l = r([a.jsonObject], l)), + (t.Ability = l); + let u = (i = class { + constructor() { + this.data = []; + } + static fromJson(e) { + return s.TypedJSONProvider.instance().get(i).parse(e); + } + }); + r([a.jsonArrayMember(l), o("design:type", Array)], u.prototype, "data", void 0), (u = i = r([a.jsonObject], u)), (t.AbiltiesUpgradeModel = u); + }, + function (e, t, n) { + "use strict"; + var i, + r, + o = + (this && this.__decorate) || + function (e, t, n, i) { + var r, + o = arguments.length, + a = o < 3 ? t : null === i ? (i = Object.getOwnPropertyDescriptor(t, n)) : i; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, i); + else for (var s = e.length - 1; s >= 0; s--) (r = e[s]) && (a = (o < 3 ? r(a) : o > 3 ? r(t, n, a) : r(t, n)) || a); + return o > 3 && a && Object.defineProperty(t, n, a), a; + }, + a = + (this && this.__metadata) || + function (e, t) { + if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.DailyChallenges = t.ChallengeData = t.ObjectiveFilterType = t.ObjectiveTimeType = t.ObjectiveType = void 0), n(176); + const s = n(177), + c = n(214); + var l, u, h; + !(function (e) { + (e[(e.None = -1)] = "None"), + (e[(e.CollectCoins = 0)] = "CollectCoins"), + (e[(e.Distance = 1)] = "Distance"), + (e[(e.Runs = 2)] = "Runs"), + (e[(e.Score = 3)] = "Score"), + (e[(e.CollectPowerups = 4)] = "CollectPowerups"), + (e[(e.Resurrects = 5)] = "Resurrects"), + (e[(e.UsedPowerMeter = 6)] = "UsedPowerMeter"), + (e[(e.WaterZone_Exit = 7)] = "WaterZone_Exit"), + (e[(e.MineZone_Exit = 8)] = "MineZone_Exit"); + })((l = t.ObjectiveType || (t.ObjectiveType = {}))), + (function (e) { + (e[(e.None = -1)] = "None"), (e[(e.OverTime = 0)] = "OverTime"), (e[(e.PerRun = 1)] = "PerRun"), (e[(e.Lifetime = 2)] = "Lifetime"); + })((u = t.ObjectiveTimeType || (t.ObjectiveTimeType = {}))), + (function (e) { + (e[(e.None = -1)] = "None"), + (e[(e.WithoutCoins = 0)] = "WithoutCoins"), + (e[(e.WithoutPowerups = 1)] = "WithoutPowerups"), + (e[(e.WithoutStumble = 2)] = "WithoutStumble"), + (e[(e.WithoutSaveMe = 3)] = "WithoutSaveMe"), + (e[(e.InMineCart = 4)] = "InMineCart"), + (e[(e.InWaterSlide = 5)] = "InWaterSlide"); + })((h = t.ObjectiveFilterType || (t.ObjectiveFilterType = {}))); + let d = (i = class { + constructor() { + (this.objectiveType = l.Distance), (this.objectiveTimeType = u.PerRun), (this.objectiveFilterType = h.None); + } + clone() { + const e = new i(); + return ( + (e.ID = this.ID), + (e.descriptionPreEarned = this.descriptionPreEarned), + (e.tier = this.tier), + (e.objectiveType = this.objectiveType), + (e.objectiveTimeType = this.objectiveTimeType), + (e.objectiveFilterType = this.objectiveFilterType), + (e.statValue = this.statValue), + e + ); + } + }); + o([s.jsonMember, a("design:type", Number)], d.prototype, "ID", void 0), + o([s.jsonMember, a("design:type", String)], d.prototype, "descriptionPreEarned", void 0), + o([s.jsonMember, a("design:type", Number)], d.prototype, "tier", void 0), + o([s.jsonMember, a("design:type", Number)], d.prototype, "objectiveType", void 0), + o([s.jsonMember, a("design:type", Number)], d.prototype, "objectiveTimeType", void 0), + o([s.jsonMember, a("design:type", Number)], d.prototype, "objectiveFilterType", void 0), + o([s.jsonMember, a("design:type", Number)], d.prototype, "statValue", void 0), + (d = i = o([s.jsonObject], d)), + (t.ChallengeData = d); + let p = (r = class { + constructor() { + this.data = []; + } + static fromJson(e) { + return c.TypedJSONProvider.instance().get(r).parse(e); + } + }); + o([s.jsonArrayMember(d), a("design:type", Array)], p.prototype, "data", void 0), (p = r = o([s.jsonObject], p)), (t.DailyChallenges = p); + }, + function (e) { + e.exports = JSON.parse( + '{"data":[{"eid":0,"name":"Shield","rule":[{"level":1,"amount":250,"reward":25},{"level":2,"amount":1000,"reward":50},{"level":3,"amount":2500,"reward":75},{"level":4,"amount":5000,"reward":100},{"level":5,"amount":10000,"reward":150}]},{"eid":1,"name":"CoinMagnet","rule":[{"level":1,"amount":250,"reward":25},{"level":2,"amount":2500,"reward":50},{"level":3,"amount":5000,"reward":75},{"level":4,"amount":10000,"reward":100},{"level":5,"amount":25000,"reward":150}]},{"eid":2,"name":"Boost","rule":[{"level":1,"amount":100,"reward":50},{"level":2,"amount":1000,"reward":100},{"level":3,"amount":5000,"reward":150},{"level":4,"amount":10000,"reward":200},{"level":5,"amount":25000,"reward":250}]}]}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"data":[{"ID":0,"descriptionPreEarned":"Run 1,000 Meters in One Run","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":1000},{"ID":1,"descriptionPreEarned":"Run 1,500 Meters in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":1500},{"ID":2,"descriptionPreEarned":"Run 1,750 Meters in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":1750},{"ID":3,"descriptionPreEarned":"Run 2,000 Meters in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":2000},{"ID":4,"descriptionPreEarned":"Run 2,250 Meters in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":2250},{"ID":5,"descriptionPreEarned":"Run 2,500 Meters in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":2500},{"ID":6,"descriptionPreEarned":"Run 3,000 Meters in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":3000},{"ID":7,"descriptionPreEarned":"Run 3,500 Meters in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":3500},{"ID":8,"descriptionPreEarned":"Run 4,000 Meters in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":4000},{"ID":9,"descriptionPreEarned":"Run 3,000 Meters","tier":1,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3000},{"ID":10,"descriptionPreEarned":"Run 3,500 Meters","tier":1,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3500},{"ID":11,"descriptionPreEarned":"Run 4,000 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":4000},{"ID":12,"descriptionPreEarned":"Run 4,500 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":4500},{"ID":13,"descriptionPreEarned":"Run 5,000 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5000},{"ID":14,"descriptionPreEarned":"Run 5,500 Meters","tier":3,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5500},{"ID":15,"descriptionPreEarned":"Run 6,500 Meters","tier":3,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":6500},{"ID":16,"descriptionPreEarned":"Run 7,000 Meters","tier":3,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":7000},{"ID":17,"descriptionPreEarned":"Run 8,000 Meters","tier":4,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":8000},{"ID":18,"descriptionPreEarned":"Run 9,000 Meters","tier":4,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":9000},{"ID":19,"descriptionPreEarned":"Run 10,000 Meters","tier":5,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":10000},{"ID":20,"descriptionPreEarned":"Run 500 Meters\\nCollecting No Coins","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":0,"statValue":500},{"ID":21,"descriptionPreEarned":"Run 750 Meters\\nCollecting No Coins","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":0,"statValue":750},{"ID":22,"descriptionPreEarned":"Run 1,000 Meters\\nWithout Stumbling in One Run","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":1000},{"ID":23,"descriptionPreEarned":"Run 2,000 Meters\\nWithout Stumbling in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":2000},{"ID":24,"descriptionPreEarned":"Run 3,000 Meters\\nWithout Stumbling in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":3000},{"ID":25,"descriptionPreEarned":"Run 4,000 Meters\\nWithout Stumbling in One Run","tier":4,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":4000},{"ID":26,"descriptionPreEarned":"Run 3,000 Meters\\nWithout Stumbling","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":3000},{"ID":27,"descriptionPreEarned":"Run 4,000 Meters\\nWithout Stumbling","tier":3,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":4000},{"ID":28,"descriptionPreEarned":"Run 5,000 Meters\\nWithout Stumbling","tier":4,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":5000},{"ID":29,"descriptionPreEarned":"Run 6,000 Meters\\nWithout Stumbling","tier":5,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":6000},{"ID":30,"descriptionPreEarned":"Run 2,000 Meters\\nWithout Powerups in One Run","tier":2,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":1,"statValue":2000},{"ID":31,"descriptionPreEarned":"Run 3,000 Meters\\nWithout Powerups in One Run","tier":3,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":1,"statValue":3000},{"ID":32,"descriptionPreEarned":"Run 4,000 Meters\\nWithout Powerups in One Run","tier":4,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":1,"statValue":4000},{"ID":33,"descriptionPreEarned":"Run 5,000 Meters\\nWithout Powerups in One Run","tier":5,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":1,"statValue":5000},{"ID":34,"descriptionPreEarned":"Run 2,000 Meters\\nWithout Powerups in One Run","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":1,"statValue":2000},{"ID":35,"descriptionPreEarned":"Run 3,000 Meters\\nWithout Powerups in One Run","tier":3,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":1,"statValue":3000},{"ID":36,"descriptionPreEarned":"Run 4,000 Meters\\nWithout Powerups in One Run","tier":4,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":1,"statValue":4000},{"ID":37,"descriptionPreEarned":"Run 5,000 Meters\\nWithout Powerups in One Run","tier":5,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":1,"statValue":5000},{"ID":38,"descriptionPreEarned":"Ride the Minecart\\nFor 750 Meters in One Run","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":4,"statValue":750},{"ID":39,"descriptionPreEarned":"Ride the Minecart\\nFor 1000 Meters","tier":1,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":1000},{"ID":40,"descriptionPreEarned":"Ride the Minecart\\nFor 1,500 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":1500},{"ID":41,"descriptionPreEarned":"Ride the Minecart\\nFor 2,000 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":2000},{"ID":42,"descriptionPreEarned":"Swim in the WaterSlide\\nfor 750 Meters in One Run","tier":1,"objectiveType":1,"objectiveTimeType":1,"objectiveFilterType":5,"statValue":750},{"ID":43,"descriptionPreEarned":"Swim in the WaterSlide\\nfor 1000 Meters","tier":1,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":1000},{"ID":44,"descriptionPreEarned":"Swim in the WaterSlide\\nfor 1,500 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":1500},{"ID":45,"descriptionPreEarned":"Swim in the WaterSlide\\nfor 2,000 Meters","tier":2,"objectiveType":1,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":2000},{"ID":46,"descriptionPreEarned":"Collect 250 Coins\\nin One Run","tier":1,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":250},{"ID":47,"descriptionPreEarned":"Collect 350 Coins\\nin One Run","tier":2,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":350},{"ID":48,"descriptionPreEarned":"Collect 400 Coins\\nin One Run","tier":2,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":400},{"ID":49,"descriptionPreEarned":"Collect 500 Coins\\nin One Run","tier":3,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":500},{"ID":50,"descriptionPreEarned":"Collect 600 Coins\\nin One Run","tier":3,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":600},{"ID":51,"descriptionPreEarned":"Collect 700 Coins\\nin One Run","tier":3,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":700},{"ID":52,"descriptionPreEarned":"Collect 800 Coins\\nin One Run","tier":4,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":800},{"ID":53,"descriptionPreEarned":"Collect 900 Coins\\nin One Run","tier":4,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":900},{"ID":54,"descriptionPreEarned":"Collect 1,000 Coins\\nin One Run","tier":5,"objectiveType":0,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":1000},{"ID":55,"descriptionPreEarned":"Collect 1,000 Coins","tier":1,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1000},{"ID":56,"descriptionPreEarned":"Collect 1,250 Coins","tier":1,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1250},{"ID":57,"descriptionPreEarned":"Collect 1,500 Coins","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1500},{"ID":58,"descriptionPreEarned":"Collect 1,750 Coins","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1750},{"ID":59,"descriptionPreEarned":"Collect 2,000 Coins","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":2000},{"ID":60,"descriptionPreEarned":"Collect 2,250 Coins","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":2250},{"ID":61,"descriptionPreEarned":"Collect 2,500 Coins","tier":3,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":2500},{"ID":62,"descriptionPreEarned":"Collect 2,750 Coins","tier":3,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":2750},{"ID":63,"descriptionPreEarned":"Collect 3,000 Coins","tier":4,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3000},{"ID":64,"descriptionPreEarned":"Collect 250 Coins\\nin the Minecart","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":250},{"ID":65,"descriptionPreEarned":"Collect 250 Coins\\nin the WaterSlide","tier":2,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":250},{"ID":66,"descriptionPreEarned":"Collect 500 Coins\\nin the Minecart","tier":3,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":500},{"ID":67,"descriptionPreEarned":"Collect 500 Coins\\nin the WaterSlide","tier":3,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":500},{"ID":68,"descriptionPreEarned":"Collect 750 Coins\\nin the Minecart","tier":4,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":4,"statValue":750},{"ID":69,"descriptionPreEarned":"Collect 750 Coins\\nin the WaterSlide","tier":4,"objectiveType":0,"objectiveTimeType":0,"objectiveFilterType":5,"statValue":750},{"ID":70,"descriptionPreEarned":"Score 30,000 points","tier":1,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":30000},{"ID":71,"descriptionPreEarned":"Score 45,000 points","tier":1,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":45000},{"ID":72,"descriptionPreEarned":"Score 60,000 points","tier":1,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":60000},{"ID":73,"descriptionPreEarned":"Score 75,000 points","tier":1,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":75000},{"ID":74,"descriptionPreEarned":"Score 90,000 points","tier":2,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":90000},{"ID":75,"descriptionPreEarned":"Score 100,000 points","tier":2,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":100000},{"ID":76,"descriptionPreEarned":"Score 120,000 points","tier":2,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":120000},{"ID":77,"descriptionPreEarned":"Score 140,000 points","tier":2,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":140000},{"ID":78,"descriptionPreEarned":"Score 160,000 points","tier":3,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":160000},{"ID":79,"descriptionPreEarned":"Score 180,000 points","tier":3,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":180000},{"ID":80,"descriptionPreEarned":"Score 200,000 points","tier":3,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":200000},{"ID":81,"descriptionPreEarned":"Score 250,000 points","tier":4,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":250000},{"ID":82,"descriptionPreEarned":"Score 30,000 points\\nin One Run","tier":1,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":30000},{"ID":83,"descriptionPreEarned":"Score 45,000 points\\nin One Run","tier":2,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":45000},{"ID":84,"descriptionPreEarned":"Score 60,000 points\\nin One Run","tier":2,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":60000},{"ID":85,"descriptionPreEarned":"Score 75,000 points\\nin One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":75000},{"ID":86,"descriptionPreEarned":"Score 90,000 points\\nin One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":90000},{"ID":87,"descriptionPreEarned":"Score 100,000 points\\nin One Run","tier":4,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":100000},{"ID":88,"descriptionPreEarned":"Score 30,000 points \'No Save Me\'\\nin One Run","tier":1,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":3,"statValue":30000},{"ID":89,"descriptionPreEarned":"Score 50,000 points \'No Save Me\'\\nin One Run","tier":2,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":3,"statValue":50000},{"ID":90,"descriptionPreEarned":"Score 70,000 points \'No Save Me\'\\nin One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":3,"statValue":70000},{"ID":91,"descriptionPreEarned":"Score 90,000 points \'No Save Me\'\\nin One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":3,"statValue":90000},{"ID":92,"descriptionPreEarned":"Score 30,000 points\\nWithout Stumbling in One Run","tier":1,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":30000},{"ID":93,"descriptionPreEarned":"Score 50,000 points\\nWithout Stumbling in One Run","tier":2,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":50000},{"ID":94,"descriptionPreEarned":"Score 70,000 points\\nWithout Stumbling in One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":70000},{"ID":95,"descriptionPreEarned":"Score 90,000 points\\nWithout Stumbling in One Run","tier":3,"objectiveType":3,"objectiveTimeType":1,"objectiveFilterType":2,"statValue":90000},{"ID":96,"descriptionPreEarned":"Score 160,000 points\\nWithout Stumbling in One Run","tier":3,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":160000},{"ID":97,"descriptionPreEarned":"Score 180,000 points\\nWithout Stumbling in One Run","tier":4,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":180000},{"ID":98,"descriptionPreEarned":"Score 200,000 points\\nWithout Stumbling in One Run","tier":4,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":200000},{"ID":99,"descriptionPreEarned":"Score 250,000 points\\nWithout Stumbling in One Run","tier":5,"objectiveType":3,"objectiveTimeType":0,"objectiveFilterType":2,"statValue":250000},{"ID":100,"descriptionPreEarned":"Use a \'Save Me\'","tier":1,"objectiveType":5,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1},{"ID":101,"descriptionPreEarned":"Use a \'Save Me\' 3 Times","tier":2,"objectiveType":5,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3},{"ID":102,"descriptionPreEarned":"Use a \'Save Me\' 2 Times\\nin One Run","tier":3,"objectiveType":5,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":2},{"ID":103,"descriptionPreEarned":"Complete 3 Runs","tier":1,"objectiveType":2,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3},{"ID":104,"descriptionPreEarned":"Complete 5 Runs","tier":21,"objectiveType":2,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5},{"ID":105,"descriptionPreEarned":"Complete 8 Runs","tier":3,"objectiveType":2,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":8},{"ID":106,"descriptionPreEarned":"Complete 10 Runs","tier":4,"objectiveType":2,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":10},{"ID":107,"descriptionPreEarned":"Collect 5 PowerUps","tier":2,"objectiveType":4,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5},{"ID":108,"descriptionPreEarned":"Collect 10 PowerUps","tier":2,"objectiveType":4,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":10},{"ID":109,"descriptionPreEarned":"Collect 15 PowerUps","tier":3,"objectiveType":4,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":15},{"ID":110,"descriptionPreEarned":"Collect 25 PowerUps","tier":4,"objectiveType":4,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":25},{"ID":111,"descriptionPreEarned":"Collect 30 PowerUps","tier":5,"objectiveType":4,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":30},{"ID":112,"descriptionPreEarned":"Use PowerMeter 3 Times\\nin one run","tier":3,"objectiveType":6,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":3},{"ID":113,"descriptionPreEarned":"Use PowerMeter 5 Times\\nin one run","tier":4,"objectiveType":6,"objectiveTimeType":1,"objectiveFilterType":-1,"statValue":5},{"ID":114,"descriptionPreEarned":"Use PowerMeter 3 Times ","tier":2,"objectiveType":6,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3},{"ID":115,"descriptionPreEarned":"Use PowerMeter 5 Times ","tier":3,"objectiveType":6,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5},{"ID":116,"descriptionPreEarned":"Use PowerMeter 7 Times ","tier":4,"objectiveType":6,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":7},{"ID":117,"descriptionPreEarned":"Use PowerMeter 10 Times ","tier":5,"objectiveType":6,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":10},{"ID":118,"descriptionPreEarned":"Survive the WaterSlide ","tier":1,"objectiveType":7,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1},{"ID":119,"descriptionPreEarned":"Survive riding the MineCart ","tier":1,"objectiveType":8,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":1},{"ID":120,"descriptionPreEarned":"Survive the WaterSlide 3 times ","tier":2,"objectiveType":7,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3},{"ID":121,"descriptionPreEarned":"Survive riding the MineCart 3 times ","tier":2,"objectiveType":8,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":3},{"ID":122,"descriptionPreEarned":"Survive the WaterSlide 5 Times ","tier":3,"objectiveType":7,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5},{"ID":123,"descriptionPreEarned":"Survive riding the MineCart 5 Times ","tier":3,"objectiveType":8,"objectiveTimeType":0,"objectiveFilterType":-1,"statValue":5}]}' + ); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.ShadersController = t.EType = void 0); + const i = n(40), + r = n(29); + var o; + !(function (e) { + (e[(e.MINE_EXPOSURE = 0)] = "MINE_EXPOSURE"), (e[(e.TRACK_PIECE = 1)] = "TRACK_PIECE"); + })((o = t.EType || (t.EType = {}))); + t.ShadersController = class { + constructor(e) { + (this.shaders = new Map()), (this.scene = e); + } + addShader(e, t) { + this.shaders.set(e, t); + } + initialize() { + r.EventHandler.instance.addListener(r.EventID.OnPlayGame, () => { + this.shaders.get(o.TRACK_PIECE).setInt("vertexFogEnabled", 1); + }), + r.EventHandler.instance.addListener(r.EventID.OnPlayerDeath, () => { + this.shaders.get(o.TRACK_PIECE).setInt("vertexFogEnabled", 0); + }), + r.EventHandler.instance.addListener(r.EventID.OnContinueGame, () => { + this.shaders.get(o.TRACK_PIECE).setInt("vertexFogEnabled", 1); + }); + } + preUpdate() { + this.shaders.forEach((e, t) => { + switch (t) { + case o.MINE_EXPOSURE: + const t = i.GameController.instance.camera.camera.position; + e.setVector3("playerPosition", t); + } + }); + } + postUpdate() {} + pause() {} + resume() {} + reset() {} + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoinsMaterialProvider = void 0); + const i = n(62); + t.CoinsMaterialProvider = class { + constructor(e) { + this._scene = e; + } + get defaultCoinMaterial() { + const e = new i.Texture("assets/objects/coins/coin_default.jpg", this._scene), + t = new i.StandardMaterial("DefaultCoinMaterial", this._scene); + return (t.diffuseTexture = e), (t.backFaceCulling = !0), (t.emissiveColor = new i.Color3(1, 1, 1)), t; + } + get defaultPickupMaterial() { + const e = new i.Texture("assets/objects/pickups/PickUps01.jpg", this._scene), + t = new i.StandardMaterial("DefaultPickupMaterial", this._scene); + return (t.diffuseTexture = e), (t.backFaceCulling = !0), (t.emissiveColor = new i.Color3(1, 1, 1)), t; + } + update() {} + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), n(211), n(292); + const r = n(62), + o = n(40), + a = n(215), + s = n(29), + c = n(48); + t.default = class { + constructor(e) { + (this._debugRenderCount = 0), (this._canvas = e), (this._divFps = document.getElementById("fps_value")), (this._divTrackPiece = document.getElementById("track_piece_name")); + const t = new r.Engine(e, !0); + (t.enableOfflineSupport = !1), (this._scene = new r.Scene(t)), this._initializeAsync(); + const n = new r.SceneOptimizerOptions(); + n.addOptimization(new r.HardwareScalingOptimization(0, 1)); + new r.SceneOptimizer(this._scene, n).start(), + (a.GLTFValidation.Configuration = void 0), + (r.DracoCompression.Configuration = { + decoder: { wasmUrl: "assets/babylonjs/draco_wasm_wrapper_gltf.js", wasmBinaryUrl: "assets/babylonjs/draco_decoder_gltf.wasm", fallbackUrl: "assets/babylonjs/draco_decoder_gltf.js" }, + }); + } + _initializeAsync() { + return i(this, void 0, void 0, function* () { + const e = this._scene.getEngine(); + (r.SceneLoader.ShowLoadingScreen = !1), + this._checkProgress(), + o.GameController.instance.initialize(this._canvas, this._scene), + yield this._scene.whenReadyAsync(), + s.EventHandler.instance.fireEvent(s.EventID.OnLoadingUpdate, 99), + clearInterval(this._progressTimer), + e.runRenderLoop(() => { + this._scene.render(), + c.GameConfig.showDebugInfo && + this._debugRenderCount++ > 10 && + ((this._divFps.innerHTML = e.getFps().toFixed() + " fps"), + o.GameController.instance.character.params.currentTrackPiece + ? (this._divTrackPiece.innerHTML = o.GameController.instance.character.params.currentTrackPiece.assetInfo.name) + : (this._divTrackPiece.innerHTML = "-"), + (this._debugRenderCount = 0)); + }), + setTimeout(() => { + this.resize(), s.EventHandler.instance.fireEvent(s.EventID.OnLoadingUpdate, 100), s.EventHandler.instance.fireEvent(s.EventID.OnGameLoaded); + }, 500); + }); + } + _checkProgress() { + let e = 0, + t = 0, + n = 0; + this._progressTimer = setInterval(() => { + 0 == e && (e = this._scene.getWaitingItemsCount()); + const i = 100 - (this._scene.getWaitingItemsCount() / e) * 100; + (n += (i - t) / 10), n >= i && ((n = i), (t = i)), n < 0 && (n = 0), n < 99 ? s.EventHandler.instance.fireEvent(s.EventID.OnLoadingUpdate, n) : clearInterval(this._progressTimer); + }, 100); + } + resize() { + this._scene.getEngine().resize(); + } + }; + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "ecb75761cc5768501b9345d4417c76f7.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "379241e29c75c9e274f9190a2e0874bb.jpg"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "52d79153235ad2a88f8b1ff2ffdbe067.jpg"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "079dea52d8f43464bedd59bc35cc7999.jpg"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "f56ee7e8556446da578df0b7c3ffceaf.webp"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "cfba04ff0ae4c4249eb648d48bf08d37.png"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "e27e9516fb177e6a09bedd53cf084336.webp"); + }, + function (e, t, n) { + "use strict"; + n.r(t), (t.default = n.p + "35f3ce4bf67811c36a2976dae509d4d1.png"); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CharacterController = void 0); + const r = n(62), + o = n(40), + a = n(156), + s = n(250), + c = n(251), + l = n(139), + u = n(231), + h = n(133), + d = n(268), + p = n(29), + f = n(52), + m = n(48); + t.CharacterController = class { + constructor(e) { + (this._stopCalcNextPosition = !1), + (this._params = new a.CharacterParams()), + (this._isInitialized = !1), + (this._queueSlide = !1), + (this._queueJump = !1), + (this._isInNarrow = !1), + (this.PLAYER_COLLIDER_SLIDESCALE = new r.Vector3(2.2, 0.6, 2.2)), + (this.PLAYER_COLLIDER_WATERSLIDESCALE = new r.Vector3(2.2, 0.1, 2.2)), + (this.PLAYER_COLLIDER_MINECARTDUCKSCALE = new r.Vector3(2.2, 0.001, 2.2)), + (this.PLAYER_COLLIDER_MINECARTSCALE = new r.Vector3(2.2, 1.35, 2.2)), + (this.PLAYER_COLLIDER_DEFAULT_POSITION = new r.Vector3(0, 1.5, 0)), + (this.PLAYER_COLLIDER_MINECART_POSITION = new r.Vector3(0, 2.45, 0)), + (this.PLAYER_COLLIDER_SLIDE_POSITION = new r.Vector3(0, -0.2, 0)), + (this.SHAKEMAGNITUDE_SMALL = 0.05), + (this.SHAKEMAGNITUDE_BIG = 0.1), + (this.SHAKEDURATION_SMALL = 0.5), + (this.PLAYER_DEFAULT_SPEED = 0.013), + (this.PLAYER_MAX_SPEED = 0.026), + (this.PLAYER_SPEED_BOOST = this.PLAYER_DEFAULT_SPEED + 0.013), + (this.PLAYER_SPEED_BOOST_SLOW = 0.003), + (this.PLAYER_DEFAULT_JUMP_SPEED = 0.015), + (this.PLAYER_MAX_JUMP_SPEED = 0.028), + (this.GOD_MODE_DURATION = 3), + (this.GOD_MODE_RELAX_START = 1), + (this._distanceDeltaSum = 0), + (this._canAllowInput = !1), + (this.GOD_MODE_DISABLED = 0), + (this.GOD_MODE_ENABLED = 1), + (this.GOD_MODE_EXHAUSTED = 2), + (this._godModeState = this.GOD_MODE_DISABLED), + (this._godModeTime = this.GOD_MODE_DURATION), + (this._collisionStateObstacle = 0), + (this._scene = e); + } + initialize() { + return i(this, void 0, void 0, function* () { + p.EventHandler.instance.addListener(p.EventID.OnTrackRootInit, (e) => { + this._isInitialized && ((this._params.currentTrackPiece = e), (this._params.currentVelocity = this._runSpeed)); + }), + p.EventHandler.instance.addListener(p.EventID.OnCameraIntroEnd, () => { + this._canAllowInput = !0; + }), + (this._character = new d.Character()), + yield this._character.loadAssetAsync(this._scene), + (this._shadow = this._character.playerShadow), + (this._runSpeed = this.PLAYER_DEFAULT_SPEED), + (this._jumpSpeed = this.PLAYER_DEFAULT_JUMP_SPEED), + this._setupAnimator(), + this._setupMover(), + o.GameController.instance.camera.setTarget(this._character.playerTransform), + this._setState(a.MovementState.Idle), + this._setupEvents(), + (this._isInitialized = !0), + null == this._params.currentTrackPiece && + null != o.GameController.instance.track.initialTrackPiece && + ((this._params.currentTrackPiece = o.GameController.instance.track.initialTrackPiece), (this._params.currentVelocity = this._runSpeed)); + }); + } + getBoostSlowSpeed() { + return this._runSpeed + this.PLAYER_SPEED_BOOST_SLOW; + } + isInGodMode() { + return this._godModeState != this.GOD_MODE_DISABLED; + } + setToResurrectionState() { + let e = this.params.currentTrackPiece, + t = !1, + n = 5; + for (; null != e; ) { + const n = e.SelectedDefinition; + if (!n.isObstacle() && !n.isTurn()) { + (t = !0), (this.params.currentTrackPiece = e); + break; + } + e = e.NextTrackPieces[0]; + } + if (!t) + for (n = 3; null != e && n > 0; ) { + const i = e.SelectedDefinition; + if (!i.isObstacle() && !i.isTurn()) { + (t = !0), (this.params.currentTrackPiece = e); + break; + } + (e = e.PreviousTrackPiece), n--; + } + t || (e = this.params.currentTrackPiece), + (this.params.currentSegment = 0), + (this.params.distanceFromPieceStart = 0), + (this.params.currentPosition = this.params.currentTrackPiece.assetInfo.rootMesh.position), + this._shadow.setEnabled(!0), + this.player.detachFromBone(), + (this.player.position = this.params.currentPosition); + let i = this.params.currentTrackPiece.getStartDirection().clone(); + (i = i.normalize()), + this.player.lookAt(this.player.position.subtract(i)), + (this._runSpeed = this.PLAYER_DEFAULT_SPEED), + e.SelectedDefinition.IsWaterSlide + ? (this._character.startWaterTrail(), this._shadow.setEnabled(!1), this._setState(a.MovementState.WaterSliding)) + : e.SelectedDefinition.IsMine + ? (this._shadow.setEnabled(!1), this._setState(a.MovementState.CartRiding)) + : this._setState(a.MovementState.Running), + this._playerAnimator._setAnimationToFirstFrame(), + (this._playerMover.TurnState = a.TurnState.None), + o.GameController.instance.camera.updateForResurrection(this.player), + (this._godModeState = this.GOD_MODE_ENABLED), + (this._godModeTime = this.GOD_MODE_DURATION), + p.EventHandler.instance.fireEvent(p.EventID.OnGodModeEnabled), + p.EventHandler.instance.fireEvent(p.EventID.OnRessurect), + (this._runSpeed = 0.5 * this._resurrectRunSpeed), + (this._jumpSpeed = 0.5 * this._resurrectJumpSpeed), + this._updateSpeed(), + this.pause(), + (this._collisionStateObstacle = 0), + (o.GameController.instance.track.stopRemovalOnDeath = !1), + (this._stopCalcNextPosition = !1); + } + updateShadow() { + (this._shadow.position = this.player.position.clone()), + (this._shadow.position.y = 0.05 + this.params.currentPosition.y), + (this._shadow.rotation = this.player.rotation.clone()), + this._shadow.rotate(r.Axis.X, r.Tools.ToRadians(90), r.Space.LOCAL); + } + _godModeUpdate() { + const e = this._scene.getEngine().getDeltaTime() / 1e3; + (this._godModeTime -= e), + this._godModeTime < 0 + ? ((this._godModeState = this.GOD_MODE_DISABLED), p.EventHandler.instance.fireEvent(p.EventID.OnGodModeDisabled)) + : this._godModeTime < this.GOD_MODE_RELAX_START && this._godModeState == this.GOD_MODE_ENABLED && ((this._godModeState = this.GOD_MODE_EXHAUSTED), p.EventHandler.instance.fireEvent(p.EventID.OnGodModeExhausted)); + } + preUpdate() { + this._shadow.isEnabled() && this.updateShadow(), + o.GameController.instance.isGameRunning && + this._isInitialized && + ((this._godModeState != this.GOD_MODE_ENABLED && this._godModeState != this.GOD_MODE_EXHAUSTED) || this._godModeUpdate(), + null != this._params.currentTrackPiece && + (this.isPlayerDead || + this._stopCalcNextPosition || + ((this._params = u.TrackHelper.calcPointAlongTrack(this._params, this._scene)), + this._distanceDeltaSum >= 1 && (f.gameState.updateDistance(this._movementState, this._distanceDeltaSum), (this._distanceDeltaSum = 0)), + (this._distanceDeltaSum += this._params.deltaDistance), + o.GameController.instance.tutorial.isEnabled && o.GameController.instance.tutorial.processScoreToRollback())), + this._queueSlide && ((this._queueSlide = !1), this._processSlideInput()), + this._queueJump && ((this._queueJump = !1), this._processJumpInput()), + this.isPlayerDead || null == this._params.currentTrackPiece || (o.GameController.instance.tutorial.isEnabled || this.increaseSpeed(), this._checkCollission()), + this._playerMover.update(this._movementState, this._params)); + } + postUpdate() { + if (null == this.params.currentTrackPiece) return; + let e = !1; + const t = new r.Color3(0.2, 0.2, 0.2), + n = this.params.currentTrackPiece.assetInfo.shadowMeshes; + for (let t = 0; t < n.length; t++) { + const i = n[t]; + if (this._character.playerCollider.intersectsMesh(i, !0, !0)) { + e = !0; + break; + } + } + this._character.material.albedoColor = e ? t : r.Color3.White(); + } + pause() { + this._playerAnimator.pause(); + } + resume() { + this._playerAnimator.resume(); + } + reset() { + var e, t; + this._shadow.setEnabled(!0), + this.player.detachFromBone(), + (this.player.rotationQuaternion = r.Quaternion.Identity()), + (this._stopCalcNextPosition = !1), + (this._isInNarrow = !1), + (this._runSpeed = this.PLAYER_DEFAULT_SPEED), + (this._jumpSpeed = this.PLAYER_DEFAULT_JUMP_SPEED), + this._updateSpeed(), + this._setState(a.MovementState.Idle), + (this._params = new a.CharacterParams()), + this._playerMover.reset(), + this._character.setPlayerColliderToDefault(), + (this._character.playerCollider.position = this.PLAYER_COLLIDER_DEFAULT_POSITION), + this._character.playerTransform.setEnabled(!1), + null === (e = this._character.dustFx) || void 0 === e || e.stop(), + null === (t = this._character.waterSplashFx) || void 0 === t || t.stop(), + this._character.stopWaterTrail(), + (this._canAllowInput = !1), + (this._queueJump = !1), + (this._queueSlide = !1), + this._character.setPlayerCartVisibility(!1), + this._playerAnimator.setTrigger(a.AnimationState.Idle), + o.GameController.instance.tutorial.shouldRestartTutorial && + ((this._params.currentPosition = new r.Vector3(0, 0, 0)), + (this._runSpeed = 0.5 * this._resurrectRunSpeed), + (this._jumpSpeed = 0.5 * this._resurrectJumpSpeed), + this._updateSpeed(), + o.GameController.instance.camera.updateForResurrection(this.player), + (this._canAllowInput = !0)), + (this._resurrectRunSpeed = 0), + (this._resurrectJumpSpeed = 0), + (this._collisionStateObstacle = 0); + } + increaseSpeed() { + (this._runSpeed += (this._scene.deltaTime / 1e3) * 5e-5), (this._jumpSpeed += (this._scene.deltaTime / 1e3) * 45e-6), this._updateSpeed(); + } + _updateSpeed() { + this._runSpeed >= this.PLAYER_MAX_SPEED && (this._runSpeed = this.PLAYER_MAX_SPEED), + this._jumpSpeed >= this.PLAYER_MAX_JUMP_SPEED && (this._jumpSpeed = this.PLAYER_MAX_JUMP_SPEED), + this._runSpeed <= this.PLAYER_DEFAULT_SPEED && (this._runSpeed = this.PLAYER_DEFAULT_SPEED), + this._jumpSpeed <= this.PLAYER_DEFAULT_JUMP_SPEED && (this._jumpSpeed = this.PLAYER_DEFAULT_JUMP_SPEED), + this._playerMover.updateSpeedVars(this._runSpeed, this._jumpSpeed); + } + _setupEvents() { + p.EventHandler.instance.addListener(p.EventID.OnKeyPress, (e) => { + o.GameController.instance.isGameRunning && this._canAllowInput && ("Slide" == e ? this._processSlideInput() : "Jump" == e ? this._processJumpInput() : ("Left" == e || "Right" == e) && this._playerMover.tiltOrTurn(e)); + }), + p.EventHandler.instance.addListener(p.EventID.OnPlayGame, () => { + this._shadow.setEnabled(!0), + this._character.playerTransform.setEnabled(!0), + o.GameController.instance.tutorial.isEnabled + ? "waterslide" == o.GameController.instance.tutorial.currentTutorialZone + ? this._setState(a.MovementState.WaterSliding) + : "mine" == o.GameController.instance.tutorial.currentTutorialZone + ? (this._setState(a.MovementState.CartRiding), this._character.setPlayerCartVisibility(!0)) + : this._setState(a.MovementState.Running) + : this._setState(a.MovementState.Running); + }), + p.EventHandler.instance.addListener(p.EventID.OnDebugFeatureChange, () => { + m.GameConfig.showPlayerCollider ? (this._character.playerCollider.visibility = 0.5) : (this._character.playerCollider.visibility = 0); + }); + } + _processSlideInput() { + switch (this._movementState) { + case a.MovementState.Running: + if (this._playerAnimator.CurrentAnimationState == a.AnimationState.Jump || this._playerAnimator.CurrentAnimationState == a.AnimationState.Slide) return void (this._queueSlide = !0); + this._playerAnimator.setTrigger(a.AnimationState.SlideEnter), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Slide), + (this._character.playerCollider.scaling = this.PLAYER_COLLIDER_SLIDESCALE), + (this._character.playerCollider.position = this.PLAYER_COLLIDER_SLIDE_POSITION); + break; + case a.MovementState.WaterSliding: + (this._character.playerCollider.scaling = this.PLAYER_COLLIDER_WATERSLIDESCALE), this._character.waterDuckFx.start(), this._playerMover.performWaterDuck(); + break; + case a.MovementState.CartRiding: + this._playerAnimator.setTrigger(a.AnimationState.MineCartDuck), (this._character.playerCollider.scaling = this.PLAYER_COLLIDER_MINECARTDUCKSCALE); + } + } + _processJumpInput() { + if (this._movementState == a.MovementState.Running) { + if (this._playerAnimator.CurrentAnimationState == a.AnimationState.Jump) return void (this._queueJump = !0); + (this._params.currentVelocity = this._jumpSpeed), + this._character.setPlayerColliderToDefault(), + this._playerAnimator.setTrigger(a.AnimationState.Jump), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.GruntJump); + } + } + _setState(e) { + if (this._movementState != e) { + (e != a.MovementState.WaterSliding && e != a.MovementState.CartRiding && e != a.MovementState.Ziplining) || p.EventHandler.instance.fireEvent(p.EventID.OnPlayerEnteringNewZone), (this._movementState = e); + const t = a.MovementAnimations.get(this._movementState); + null != t && this._playerAnimator.setTrigger(t); + } + } + _setupAnimator() { + (this._playerAnimator = new s.CharacterAnimator(this._character.animationGroups)), + this._playerAnimator.onRunStumbleAnimationEnd.add(() => { + (this._runSpeed = 0.85 * this._runSpeed), (this._jumpSpeed = 0.85 * this._jumpSpeed), this._character.setPlayerColliderToDefault(), this._playerAnimator.setTrigger(a.AnimationState.Run); + }), + this._playerAnimator.onJumpAnimationEnd.add(() => { + this._character.setPlayerColliderToDefault(), + this._playerMover.resetJumpTimer(), + this._movementState != a.MovementState.Death && + this._movementState != a.MovementState.Ziplining && + (this._playerAnimator.setTrigger(a.AnimationState.Run), this._character.dustFx.start(), (this._character.dustFx.targetStopDuration = 1), (this._params.currentVelocity = this._runSpeed)), + (this._params.currentVelocity = this._runSpeed), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.GruntJumpLand); + }), + this._playerAnimator.onSlideEnterAnimationEnd.add(() => { + this._playerAnimator.CurrentAnimationState != a.AnimationState.Jump && + (this._character.dustFx.start(), (this._character.dustFx.targetStopDuration = 1), this._movementState != a.MovementState.Death && this._playerAnimator.setTrigger(a.AnimationState.Slide)); + }), + this._playerAnimator.onSlideAnimationEnd.add(() => { + this._playerAnimator.CurrentAnimationState != a.AnimationState.Jump && + (this._character.setPlayerColliderToDefault(), this._movementState != a.MovementState.Death && this._playerAnimator.setTrigger(a.AnimationState.Run)); + }), + this._playerAnimator.onWaterSlideEnterAnimationEnd.add(() => { + this._character.waterSplashFx.start(), this._playerAnimator.setTrigger(a.AnimationState.WaterSlide); + }), + this._playerAnimator.onMineCartDuckAnimationEnd.add(() => { + this.isPlayerDead || ((this._character.playerCollider.scaling = this.PLAYER_COLLIDER_MINECARTSCALE), this._playerAnimator.setTrigger(a.AnimationState.MineCart)); + }), + this._playerAnimator.onMineCartEnterAnimationEnd.add(() => { + this._playerAnimator.setTrigger(a.AnimationState.MineCart), p.EventHandler.instance.fireEvent(p.EventID.PlaySFXLoop, l.SoundID.MineCartLoop); + }), + this._playerAnimator.onMineCartExitAnimationEnd.add(() => { + this._playerAnimator.setTrigger(a.AnimationState.Run), + this._setState(a.MovementState.Running), + p.EventHandler.instance.fireEvent(p.EventID.StopSFX, l.SoundID.MineCartLoop), + p.EventHandler.instance.fireEvent(p.EventID.OnMineCartSurvived); + }), + this._playerAnimator.onDeathHitAnimationEnd.add((e) => { + this._notifyPlayerDeath(e); + }); + } + _setupMover() { + (this._playerMover = new c.CharacterMover(this._scene, this._character.playerTransform, this._playerAnimator)), + this._playerMover.onZiplineFallEnds.add(() => { + this._character.dustFx.start(), + (this._character.dustFx.targetStopDuration = 1), + this._playerAnimator.setTrigger(a.AnimationState.Run), + this._setState(a.MovementState.Running), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.GruntJumpLand); + }), + this._playerMover.onDeathMovementEnd.add(() => { + this._notifyPlayerDeath(void 0); + }), + this._playerMover.onWaterDuckEnd.add(() => { + this._character.setPlayerColliderToDefault(); + }), + this._playerMover.onMineLedgeDeath.add(() => { + this._death(a.DeathType.DeathByFall, "Mine Any Ledge"); + }), + this._updateSpeed(); + } + _checkCollission() { + var e; + this._checkDistanceBasedTrigger(); + let t = !1; + const n = !o.GameController.instance.powerup.isBoost && !this.isInGodMode(), + i = !o.GameController.instance.powerup.isShield, + r = null === (e = this._params.currentTrackPiece.trackInfo.CollisionInfo) || void 0 === e ? void 0 : e.Trigger; + this._processNarrowCollision(n), + this._params.currentTrackPiece.assetInfo.collisionMeshes.forEach((e) => { + this._character.playerCollider.intersectsMesh(e, !0, !0) && + (n && r == h.TrackTrigger.Stumble + ? ((t = !0), i && this._processStumbleCollision()) + : e.name.includes("zipline") + ? this._processZiplineCollision(e, !n) + : n && r == h.TrackTrigger.Obstacle + ? ((t = !0), (i || e.name.includes("Collider_forest_turn") || e.name.includes("Collider_mine_junction") || e.name.includes("Collider_waterslide_junction")) && this._processObstacleCollision()) + : !n || (r != h.TrackTrigger.MissedTurn && r != h.TrackTrigger.FallSaver) + ? n && r == h.TrackTrigger.Water + ? this._death(a.DeathType.DeathByWater, "Waterslide Death By Water") + : r == h.TrackTrigger.WaterSlideZoneStart + ? (this._character.startWaterTrail(), + this._shadow.setEnabled(!1), + this._setState(a.MovementState.WaterSliding), + this._playerAnimator.setTrigger(a.AnimationState.WaterSlideEnter), + o.GameController.instance.tutorial.enableForZoneIfRequired("waterslide")) + : r == h.TrackTrigger.MineCartZoneStart + ? (this._shadow.setEnabled(!1), + this._setState(a.MovementState.CartRiding), + this._playerAnimator.setTrigger(a.AnimationState.MineCartEnter), + this._character.setPlayerCartVisibility(!0), + (this._character.playerCollider.scaling = this.PLAYER_COLLIDER_MINECARTSCALE), + (this._character.playerCollider.position = this.PLAYER_COLLIDER_MINECART_POSITION), + o.GameController.instance.tutorial.enableForZoneIfRequired("mine")) + : r == h.TrackTrigger.WaterSlideZoneStop + ? (this._shadow.setEnabled(!0), + this._character.stopWaterTrail(), + this._movementState == a.MovementState.WaterSliding && p.EventHandler.instance.fireEvent(p.EventID.OnWaterSlideSurvived), + this._setState(a.MovementState.Running), + this._playerAnimator.setTrigger(a.AnimationState.Run), + this._character.waterSplashFx.stop(), + this._character.setPlayerColliderToDefault()) + : r == h.TrackTrigger.MineCartZoneStop + ? (this._shadow.setEnabled(!0), this._character.setPlayerCartVisibility(!1), this._playerAnimator.setTrigger(a.AnimationState.MineCartExit), this._character.setPlayerColliderToDefault()) + : r == h.TrackTrigger.NarrowZoneStart + ? (this._isInNarrow = !0) + : r == h.TrackTrigger.NarrowZoneStop && (this._isInNarrow = !1) + : this._death(a.DeathType.DeathByFall, "Missed Turn")); + }), + i || (t ? (this._collisionStateObstacle = 1) : ((this._collisionStateObstacle = 1 == this._collisionStateObstacle ? 2 : 0), 2 == this._collisionStateObstacle && o.GameController.instance.powerup.removeShield())), + o.GameController.instance.coins.checkCoinCollision(this._params.currentTrackPiece, this._character.playerCollider, this._character.playerTransform, o.GameController.instance.powerup.isMagnet), + o.GameController.instance.bonus.checkBonusItemCollision(this._params.currentTrackPiece, this._character.playerCollider); + } + _checkDistanceBasedTrigger() { + const e = o.GameController.instance.track.statueAnimationInfos; + e.forEach((t, n) => { + const i = this.player.position.subtract(t.rootMesh.position), + o = i.length(), + a = i.multiplyByFloats(1 / o, 1 / o, 1 / o), + s = this._runSpeed / this.PLAYER_MAX_SPEED; + r.Vector3.Dot(this.player.forward, a) > 0.5 && + o < 35 && + (t.animationGroups.forEach((e) => { + (e.speedRatio = (this.params.boostVelocity > 0 ? 3.5 : 2) * s), e.stop(), e.play(); + }), + t.particleSystems.forEach((e) => { + e.start(); + }), + e.splice(n, 1)); + }); + } + _processNarrowCollision(e) { + const t = this._params.currentTrackPiece.SelectedDefinition; + if (this._isInNarrow || t.IsNarrow) { + this._isInNarrow = !0; + !(t.CategoryType == h.TrackPieceCategory.ZoneEntranceTransition || t.CategoryType == h.TrackPieceCategory.ZoneExitTransition) && + e && + (this._playerMover.currentTiltAmount > 0.5 || this._playerMover.currentTiltAmount < -0.5) && + this._death(a.DeathType.DeathByFall, "Narrow Left/Right Ledge"); + } else this._isInNarrow = !1; + } + _processStumbleCollision() { + if ( + (this._playerAnimator.setTrigger(a.AnimationState.RunStumble), + o.GameController.instance.camera.shake(this.SHAKEMAGNITUDE_SMALL, this.SHAKEDURATION_SMALL), + this._params.currentTrackPiece.assetInfo.name.startsWith("narrow_stumble")) + ) + for (const e of this._params.currentTrackPiece.assetInfo.animationGroups) e.play(!1); + } + _processZiplineCollision(e, t) { + e.name.includes("start") && this._movementState != a.MovementState.Ziplining + ? (this._shadow.setEnabled(!1), + t + ? ((this._params.currentVelocity = this._runSpeed), this._setState(a.MovementState.Ziplining), this._playerMover.resetTilt()) + : this._playerAnimator.CurrentAnimationState == a.AnimationState.Jump + ? ((this._params.currentVelocity = this._runSpeed), this._setState(a.MovementState.Ziplining), this._playerMover.resetJumpTimer(), this._playerMover.resetTilt()) + : setTimeout(() => { + this._death(a.DeathType.DeathByFall, "Zipline Fall"); + }, 500)) + : e.name.includes("end") && + this._movementState == a.MovementState.Ziplining && + (this._shadow.setEnabled(!0), this._playerAnimator.setTrigger(a.AnimationState.DeathByFall), (this._params.currentVelocity = this._runSpeed), this._playerMover.startZiplineFallSimulation()); + } + _checkForFireCollision() { + const e = this.params.currentTrackPiece.assetInfo.particleSystems; + return !(0 == e.length || !e[0].name.includes("fire")); + } + _processObstacleCollision() { + o.GameController.instance.camera.shake(this.SHAKEMAGNITUDE_BIG, this.SHAKEDURATION_SMALL); + const e = this._checkForFireCollision(); + this._movementState == a.MovementState.Running + ? this._death(e ? a.DeathType.Fire : a.DeathType.DeathByHit, e ? "Obstacle Death By Fire" : "Obstacle Death By Hit") + : this._movementState == a.MovementState.CartRiding + ? this._death(a.DeathType.DeathByCart, "Obstacle Cart Hit") + : this._movementState == a.MovementState.WaterSliding && this._death(a.DeathType.DeathByHit, "Obstacle Water Hit"); + } + _notifyPlayerDeath(e) { + o.GameController.instance.isGameRunning && (p.EventHandler.instance.fireEvent(p.EventID.OnPlayerDeath, e), o.GameController.instance.tutorial.isEnabled && o.GameController.instance.tutorial.resurrectOnDeath()); + } + _death(e, t) { + if (this._movementState == a.MovementState.Death) return; + p.EventHandler.instance.fireEvent(p.EventID.PlayerDeathTypeUpdate, a.getMessageKeyForDeath(e)), + m.GameConfig.showDeathInfo && + p.EventHandler.instance.fireEvent( + p.EventID.PlayerDeathDebugInfo, + `Piece : ${this.params.currentTrackPiece.assetInfo.name}, Death : ${a.getMessageKeyForDeath(e).messageKey} - ${t}\nMover : ` + this._playerMover.debugTurnInfo() + ), + this._character.stopWaterTrail(), + this._shadow.setEnabled(!1); + const n = this._movementState; + this._setState(a.MovementState.Death), (this._resurrectRunSpeed = this._runSpeed), (this._resurrectJumpSpeed = this._jumpSpeed); + const i = this._params.currentTrackPiece; + switch ((i.SelectedDefinition.IsMine && p.EventHandler.instance.fireEvent(p.EventID.StopSFX, l.SoundID.MineCartLoop), (o.GameController.instance.track.stopRemovalOnDeath = !0), (this._stopCalcNextPosition = !0), e)) { + case a.DeathType.DeathByFall: + (this._playerMover.playerDeathMoveDirection = r.Vector3.Down()), + i.SelectedDefinition.IsLedgeLeft + ? (this._playerMover.playerRotationInDeath = 90) + : i.SelectedDefinition.IsLedgeRight + ? (this._playerMover.playerRotationInDeath = -90) + : (this._playerMover.playerRotationInDeath = 0), + this._playerAnimator.setTrigger(a.AnimationState.DeathByFall), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Scream); + break; + case a.DeathType.DeathByCart: + this._playerAnimator.setTrigger(a.AnimationState.DeathByMineHit), p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Splat); + break; + case a.DeathType.DeathByHit: + case a.DeathType.Fire: + this._playerAnimator.setTrigger(a.AnimationState.DeathByHit), + this._character.waterSplashFx.stop(), + e == a.DeathType.Fire && + (this._character.playerTransform.setEnabled(!1), + (this._character.fireCollisionSmokeFX.emitter = this._character.playerTransform.position.add(new r.Vector3(0, 0, 0))), + this._character.fireCollisionSmokeFX.start(0)), + n == a.MovementState.Running ? p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Splat) : n == a.MovementState.WaterSliding && p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Splash); + break; + case a.DeathType.DeathByWater: + (this._playerMover.playerDeathMoveDirection = this.player.getDirection(r.Vector3.Right()).add(r.Vector3.Down())), + (this._playerMover.playerRotationInDeath = 90), + this._playerAnimator.setTrigger(a.AnimationState.DeathByFall), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Scream); + break; + case a.DeathType.Eaten: + (this._playerMover.playerDeathMoveDirection = r.Vector3.Zero()), + this._playerAnimator.setTrigger(a.AnimationState.Idle), + p.EventHandler.instance.fireEvent(p.EventID.PlaySFX, l.SoundID.Scream), + this._notifyPlayerDeath(e); + } + } + get isOnZipline() { + return this._movementState == a.MovementState.Ziplining; + } + get CurrentMovementState() { + return this._movementState; + } + get currentPosition() { + return this._params.currentPosition; + } + get isPlayerDead() { + return this._movementState == a.MovementState.Death; + } + get player() { + return this._character.playerTransform; + } + get material() { + return this._character.material; + } + deathByMonkey() { + this._death(a.DeathType.Eaten, "Eaten By Monkey"); + } + get params() { + return this._params; + } + }; + }, + function (e) { + e.exports = JSON.parse( + '{"Fall":["You fell to your death.","Aaaaaaaah!","But I\'m scared of heights!","End of the road…","Mind the gap.","Missed it by *that* much."],"Eaten":["You made a tasty snack.","I eat explorers like you for breakfast.","Nom nom... leathery!"],"Fire":["Mmmm, crispy explorer.","Smells like toast."],"MineDuck":["Ow, my head!","Who put that there?!","Should have ducked."],"MineLedge":["You fell to your death.","Aaaaaaaah!","But I\'m scared of the dark!","End of the road..."],"Mine":["Harder than it looks...","Good thing I have a hard head!","Wish I had a helmet..."],"Wheel":["Who put that here?","Really? Wheels with spikes?!","Ground into a fine pulp."],"DeathThrow":["Who put that here?","Really? Wheels with spikes?!","Ground into a fine pulp."],"WaterLeft":["Weeee, sliding time!","Bubble, bubble, bubble...","If only I brought my barrel."],"WaterRight":["Weeee, sliding time!","Bubble, bubble, bubble...","If only I brought my barrel."],"Ledge":["Missed it by *that* much.","You fell to your death.","Aaaaaaaah!","Watch your step...","Temple slippery when wet."],"SceneryTree":["Tree Hugger!","Trees hurt.","Who left this tree here?"],"SceneryRock":["Harder than it looks...","Good thing I have a hard head!","Wish I had a helmet..."],"None":[""]}' + ); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CharacterAnimator = void 0); + const i = n(62), + r = n(156), + o = n(29); + t.CharacterAnimator = class { + constructor(e) { + (this.onRunStumbleAnimationEnd = new i.Observable()), + (this.onJumpAnimationEnd = new i.Observable()), + (this.onSlideAnimationEnd = new i.Observable()), + (this.onSlideEnterAnimationEnd = new i.Observable()), + (this.onWaterSlideEnterAnimationEnd = new i.Observable()), + (this.onMineCartEnterAnimationEnd = new i.Observable()), + (this.onMineCartExitAnimationEnd = new i.Observable()), + (this.onMineCartDuckAnimationEnd = new i.Observable()), + (this.onDeathHitAnimationEnd = new i.Observable()), + (this._animationGroups = e), + (this._idleAnimation = this._animationGroups.find((e) => "Idle01" === e.name)), + (this._runAnimation = this._animationGroups.find((e) => "Run01" === e.name)), + (this._runAnimation.loopAnimation = !0), + (this._runStumbleAnimation = this._animationGroups.find((e) => "RunStumble01" === e.name)), + this._runStumbleAnimation.onAnimationGroupEndObservable.add(() => { + this.onRunStumbleAnimationEnd.notifyObservers(); + }), + this._runStumbleAnimation.onAnimationGroupPlayObservable.add(() => { + o.EventHandler.instance.fireEvent(o.EventID.OnStumble); + }), + (this._jumpAnimation = this._animationGroups.find((e) => "Jump01" === e.name)), + this._jumpAnimation.onAnimationGroupEndObservable.add(() => { + this.onJumpAnimationEnd.notifyObservers(); + }), + (this._slideAnimation = this._animationGroups.find((e) => "Slide01" === e.name)), + this._slideAnimation.onAnimationGroupEndObservable.add(() => { + this.onSlideAnimationEnd.notifyObservers(); + }), + (this._slideEnterAnimation = this._animationGroups.find((e) => "SlideEnter01" === e.name)), + this._slideEnterAnimation.onAnimationGroupEndObservable.add(() => { + this.onSlideEnterAnimationEnd.notifyObservers(); + }), + (this._waterSlideEnterAnimation = this._animationGroups.find((e) => "WaterSlideEnter01" === e.name)), + this._waterSlideEnterAnimation.onAnimationGroupEndObservable.add(() => { + this.onWaterSlideEnterAnimationEnd.notifyObservers(); + }), + (this._waterSlideIdleAnimation = this._animationGroups.find((e) => "WaterSlide01" === e.name)), + (this._mineCartIdleAnimation = this._animationGroups.find((e) => "MineCartIdle01" === e.name)), + (this._mineCartEnterAnimation = this._animationGroups.find((e) => "MineCartEnter01" === e.name)), + this._mineCartEnterAnimation.onAnimationGroupEndObservable.add(() => { + this.onMineCartEnterAnimationEnd.notifyObservers(); + }), + (this._mineCartExitAnimation = this._animationGroups.find((e) => "MineCartExit01" === e.name)), + this._mineCartExitAnimation.onAnimationGroupEndObservable.add(() => { + this.onMineCartExitAnimationEnd.notifyObservers(); + }), + (this._mineCartDuckAnimation = this._animationGroups.find((e) => "MineCartDuck01" === e.name)), + this._mineCartDuckAnimation.onAnimationGroupEndObservable.add(() => { + this.onMineCartDuckAnimationEnd.notifyObservers(); + }), + (this._ziplineIdleAnimation = this._animationGroups.find((e) => "ZiplineIdle01" == e.name)), + (this._deathAnimation = this._animationGroups.find((e) => "Death01" === e.name)), + this._deathAnimation.onAnimationGroupEndObservable.add(() => { + this.onDeathHitAnimationEnd.notifyObservers(r.DeathType.DeathByHit); + }), + (this._deathCartHeadAnimation = this._animationGroups.find((e) => "DeathCartHead01" === e.name)), + this._deathCartHeadAnimation.onAnimationGroupEndObservable.add(() => { + this.onDeathHitAnimationEnd.notifyObservers(r.DeathType.DeathByCart); + }), + (this._deathFallingAnimation = this._animationGroups.find((e) => "DeathFalling01" === e.name)), + (this._deathWaterfallAnimation = this._animationGroups.find((e) => "DeathWaterfall01" === e.name)); + } + get JumpAnimLength() { + return this._jumpAnimation.to; + } + get CurrentAnimationState() { + return this._animState; + } + GetAnimation(e) { + switch (e) { + case r.AnimationState.Idle: + return this._idleAnimation; + case r.AnimationState.Run: + return this._runAnimation; + case r.AnimationState.RunStumble: + return this._runStumbleAnimation; + case r.AnimationState.Jump: + return this._jumpAnimation; + case r.AnimationState.SlideEnter: + return this._slideEnterAnimation; + case r.AnimationState.Slide: + return this._slideAnimation; + case r.AnimationState.Zipline: + return this._ziplineIdleAnimation; + case r.AnimationState.WaterSlideEnter: + return this._waterSlideEnterAnimation; + case r.AnimationState.WaterSlide: + return this._waterSlideIdleAnimation; + case r.AnimationState.MineCart: + return this._mineCartIdleAnimation; + case r.AnimationState.MineCartDuck: + return this._mineCartDuckAnimation; + case r.AnimationState.MineCartEnter: + return this._mineCartEnterAnimation; + case r.AnimationState.MineCartExit: + return this._mineCartExitAnimation; + case r.AnimationState.DeathByHit: + return this._deathAnimation; + case r.AnimationState.DeathByFall: + return this._deathFallingAnimation; + case r.AnimationState.DeathByMineHit: + return this._deathCartHeadAnimation; + case r.AnimationState.DeathByWaterFall: + return this._deathWaterfallAnimation; + } + } + _setAnimationToFirstFrame() { + this._currentAnimation.goToFrame(1); + } + _playAnimation() { + let e = !1; + null != this._previousAnimation && (this._previousAnimation.setWeightForAllAnimatables(0), this._previousAnimation.stop()), + (this._animState != r.AnimationState.Run && + this._animState != r.AnimationState.Zipline && + this._animState != r.AnimationState.WaterSlide && + this._animState != r.AnimationState.MineCart && + this._animState != r.AnimationState.DeathByFall && + this._animState != r.AnimationState.DeathByWaterFall) || + (e = !0), + this._currentAnimation.setWeightForAllAnimatables(1), + this._currentAnimation.start(e); + } + setTrigger(e) { + (this._animState = e), + (this._previousAnimation = this._currentAnimation), + (this._currentAnimation = this.GetAnimation(e)), + this._currentAnimation != this._previousAnimation && + (e == r.AnimationState.Jump && o.EventHandler.instance.fireEvent(o.EventID.OnPlayerJumpState), e == r.AnimationState.Run && o.EventHandler.instance.fireEvent(o.EventID.OnPlayerRunState), this._playAnimation()); + } + pause() { + var e; + null === (e = this._currentAnimation) || void 0 === e || e.pause(); + } + resume() { + var e; + null === (e = this._currentAnimation) || void 0 === e || e.play(this._currentAnimation.loopAnimation); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CharacterMover = void 0); + const i = n(62), + r = n(156), + o = n(40), + a = n(150); + t.CharacterMover = class { + constructor(e, t, n) { + (this.DEFAULT_PLAYER_POSITION = new i.Vector3(0, 0, 0)), + (this._currentPostion = i.Vector3.Zero()), + (this._currentDirection = new i.Vector3(0, 0, -1)), + (this._distanceFromPieceStart = 0), + (this._simulateZiplineFall = !1), + (this._ziplineFallHeight = 2), + (this._ziplineMovementOffset = 2), + (this._currentTilt = r.TiltState.None), + (this._currentTiltAmount = 0), + (this._tiltSpeed = 5), + (this._currentTurnState = r.TurnState.None), + (this._currentTurnDir = r.Turn.None), + (this._jumpTimer = 0), + (this._jumpHeight = 2), + (this._isJumpStart = !1), + (this.WATER_SLIDE_DUCKTIME = 1), + (this._waterDuckTimer = 0), + (this._IsWaterDucking = !1), + (this._waterSlideDuckDepth = 0.5), + (this._playerDeathMoveDirection = i.Vector3.Zero()), + (this._deathTimer = 0), + (this._playerToRotation = 0), + (this._params = new r.CharacterParams()), + (this._autoTurnedForPowerup = !1), + (this._waterslideHackDistanceVar = 0), + (this._previousWaterslidePieceId = -1), + (this._scene = e), + (this._player = t), + (this._animator = n), + (this.onZiplineFallEnds = new i.Observable()), + (this.onDeathMovementEnd = new i.Observable()), + (this.onWaterDuckEnd = new i.Observable()), + (this.onMineLedgeDeath = new i.Observable()), + this._player.setEnabled(!1); + } + set playerDeathMoveDirection(e) { + this._playerDeathMoveDirection = e; + } + set playerRotationInDeath(e) { + this._playerToRotation = e; + } + get currentTiltAmount() { + return this._currentTiltAmount; + } + resetTilt() { + (this._currentTiltAmount = 0), (this._currentTilt = r.TiltState.None); + } + set TurnState(e) { + this._currentTurnState = e; + } + performWaterDuck() { + this._IsWaterDucking = !0; + } + debugTurnInfo() { + return `Turn - ${this._currentTurnState}, Dirn - ${this._currentTurnDir}, Tilt - ${this._currentTilt}`; + } + updateSpeedVars(e, t) { + (this._moveSpeed = e), (this._jumpSpeed = t); + } + resetJumpTimer() { + (this._jumpTimer = 0), (this._isJumpStart = !1), (this._jumpStartYPos = 0); + } + reset() { + (this._jumpTimer = 0), + (this._isJumpStart = !1), + (this._jumpStartYPos = 0), + (this._deathTimer = 0), + (this._player.position = this.DEFAULT_PLAYER_POSITION), + this._player.setDirection(new i.Vector3(0, 0, 1)), + (this._currentTurnState = r.TurnState.None), + (this._currentTilt = r.TiltState.None), + (this._currentTiltAmount = 0), + this._player.setEnabled(!1); + } + update(e, t) { + (this._movementState = e), + (this._animator.CurrentAnimationState != r.AnimationState.DeathByFall && this._animator.CurrentAnimationState != r.AnimationState.DeathByWaterFall) || e == r.MovementState.Ziplining + ? e != r.MovementState.Death && + ((this._params = t), + (this._currentTrackPiece = this._params.currentTrackPiece), + null != this._params.currentTrackPiece && + ((this._currentPostion = this._params.currentPosition), + (this._currentDirection = this._params.currentDirection), + (this._distanceFromPieceStart = this._params.distanceFromPieceStart), + this._checkAutoTurnForPowerup(), + e == r.MovementState.Ziplining ? this._zipLineMove() : e == r.MovementState.CartRiding ? this._cartRidingMove() : e == r.MovementState.WaterSliding ? this._waterSlidingMove() : this._move()), + this._player.isEnabled() || this._player.setEnabled(!0)) + : this._updateDeathMovement(); + } + _move() { + this._applyPendingTurn(); + const e = this._getDirectionAndPosition(); + let t = e[1]; + const n = e[0]; + if (this._animator.CurrentAnimationState == r.AnimationState.Jump) { + let e; + this._isJumpStart || ((this._isJumpStart = !0), (this._jumpStartYPos = this._player.position.y)), + (this._jumpTimer += this._scene.deltaTime / 1e3 / this._animator.JumpAnimLength), + (this._jumpTimer >= 0 && this._jumpTimer <= 0.5) || (this._jumpTimer >= 0.5 && this._jumpTimer <= 1) + ? ((e = Math.sin(Math.PI * this._jumpTimer) * this._jumpHeight), (t = new i.Vector3(t.x, t.y + e, t.z))) + : (this._isJumpStart = !1), + this._jumpTimer > 1 && (this._jumpTimer = 1); + } + (this.prevYRot = this.currentYRot), this._player.setDirection(n), (this.currentYRot = this._player.rotation.y), (this._player.position = t); + } + _waterSlidingMove() { + this._applyPendingTurnWaterSlideAndMine(); + const e = this._getDirectionAndPosition(); + let t = e[1]; + const n = e[0]; + if (this._IsWaterDucking) { + this._waterDuckTimer += this._scene.deltaTime / 1e3; + const e = Math.sin(Math.PI * this._waterDuckTimer) * this._waterSlideDuckDepth; + (t = new i.Vector3(t.x, t.y - e, t.z)), + this._waterDuckTimer >= this.WATER_SLIDE_DUCKTIME && ((this._waterDuckTimer = 0), (this._IsWaterDucking = !1), null != this.onWaterDuckEnd && this.onWaterDuckEnd.notifyObservers()); + } + this._player.setDirection(n), (this._player.position = t); + } + _cartRidingMove() { + this._applyPendingTurnWaterSlideAndMine(); + const e = this._getDirectionAndPosition(), + t = e[1], + n = e[0]; + this._player.setDirection(n, 0, 0, this._currentTiltAmount * (-Math.PI / 9)); + let o = 0, + a = i.Vector3.Zero(); + 0 == this._currentTiltAmount + ? (o = 0) + : this._currentTurnState != r.TurnState.Failed && ((o = 0.45 * this._currentTiltAmount), (a = this._player.getDirection(i.Vector3.Right())), (a = a.normalize()), (a = a.multiplyByFloats(o, o, o))), + (this._player.position = new i.Vector3(t.x, t.y, t.z).add(a)); + } + startZiplineFallSimulation() { + this._simulateZiplineFall = !0; + } + _zipLineMove() { + if ((this._getDirectionAndPosition(), this._simulateZiplineFall)) + if (((this._ziplineFallHeight -= (this._scene.deltaTime / 1e3) * 6), this._ziplineFallHeight >= 0.5)) { + const e = new i.Vector3(this._currentPostion.x, this._currentPostion.y + this._ziplineFallHeight, this._currentPostion.z); + this._player.setDirection(this._currentDirection.multiply(new i.Vector3(-1, 0, -1))), (this._player.position = e); + } else (this._simulateZiplineFall = !1), (this._currentTilt = r.TiltState.None), (this._currentTiltAmount = 0), (this._ziplineFallHeight = 2), null != this.onZiplineFallEnds && this.onZiplineFallEnds.notifyObservers(); + else { + this._player.setDirection(this._currentDirection.multiply(new i.Vector3(-1, 0, -1)), 0, 2 * Math.PI - Math.PI / 8, this._currentTiltAmount * (Math.PI / 4)); + let e = 0, + t = i.Vector3.Zero(); + 0 == this._currentTiltAmount + ? (e = 0) + : this._currentTurnState != r.TurnState.Failed && ((e = 0.18 * this._currentTiltAmount), (t = this._player.getDirection(i.Vector3.Right())), (t = t.normalize()), (t = t.multiplyByFloats(e, e, e))); + const n = new i.Vector3(this._currentPostion.x, this._currentPostion.y + this._ziplineMovementOffset, this._currentPostion.z).add(t); + this._player.position = n; + } + } + _getDirectionAndPosition() { + let e, t; + if ( + (this._currentTurnState != r.TurnState.Pending && this._currentTurnState != r.TurnState.Done && this._params.currentTrackPiece.SelectedDefinition.isTurn() && (this._currentTurnState = r.TurnState.Failed), + this._movementState == r.MovementState.Running && + (this._params.currentTrackPiece.SelectedDefinition.isTurn() || this._currentTurnState != r.TurnState.Done || (this._currentTurnState = r.TurnState.None), + Math.abs(this.currentYRot - this.prevYRot) > 75 && (this._currentTurnState = r.TurnState.None)), + this._currentTurnState == r.TurnState.Failed || this._currentTurnState == r.TurnState.Pending) + ) { + (e = this._player.getDirection(i.Vector3.Forward()).clone()), (e = e.normalize()); + let n = this._params.boostVelocity > 0 ? this._params.boostVelocity : 0; + (n = this._animator.CurrentAnimationState == r.AnimationState.Jump ? this._jumpSpeed * this._scene.deltaTime : this._params.currentVelocity * this._scene.deltaTime), + (t = this._player.position.clone().add(e.multiplyByFloats(-n, 0, -n))), + (t = new i.Vector3(t.x, this._currentPostion.y, t.z)); + } else (e = this._currentDirection.multiply(new i.Vector3(-1, 0, -1))), (t = this._getTiltedPosition(this._currentPostion)); + return [e, t]; + } + _getTiltedPosition(e) { + if (0 == this._currentTiltAmount && this._currentTilt == r.TiltState.None) return e; + let t, + n = (this._scene.deltaTime / 1e3) * this._tiltSpeed, + o = !1, + a = !1; + this._currentTilt == r.TiltState.Right + ? ((t = -0.8), (n = -n)) + : this._currentTilt == r.TiltState.Left + ? (t = 0.8) + : ((t = 0), this._currentTiltAmount < t ? (o = !0) : this._currentTiltAmount > t ? ((n = -n), (a = !0)) : ((n = 0), (this._currentTiltAmount = 0))), + (this._currentTiltAmount += n), + (-0.8 == t && this._currentTiltAmount < t) || (0.8 == t && this._currentTiltAmount > t) + ? (this._currentTiltAmount = t) + : 0 == t && ((o && this._currentTiltAmount > 0) || (a && this._currentTiltAmount < 0)) && (this._currentTiltAmount = 0); + const s = this._player.getDirection(i.Vector3.Right()); + s.normalize(); + const c = s.multiplyByFloats(this._currentTiltAmount, this._currentTiltAmount, this._currentTiltAmount), + l = this._getWaterslideHackElevation(); + return this._movementState != r.MovementState.CartRiding ? new i.Vector3(e.x + c.x, e.y + l, e.z + c.z) : e; + } + _getWaterslideHackElevation() { + let e = 0; + if (3 == this._params.currentTrackPiece.SelectedDefinition.ID.ZoneID) { + const t = this._params.currentTrackPiece.SelectedDefinition.ID.PieceID; + if ( + (this._previousWaterslidePieceId != t && ((this._waterslideHackDistanceVar = 0), (this._previousWaterslidePieceId = t)), + ((3 == t || 12 == t) && this._currentTilt == r.TiltState.Right) || ((4 == t || 13 == t) && this._currentTilt == r.TiltState.Left)) + ) { + this._waterslideHackDistanceVar += this._params.deltaDistance; + const t = this._params.currentTrackPiece.getEstimatedLength(), + n = t / 2; + let i; + i = this._waterslideHackDistanceVar < n ? this._waterslideHackDistanceVar / n : (t - this._waterslideHackDistanceVar) / n; + const r = 0.8; + e = Math.abs(this._currentTiltAmount) * i * r; + } else this._waterslideHackDistanceVar = 0; + } else this._waterslideHackDistanceVar = 0; + return e; + } + _checkAutoTurnForPowerup() { + (o.GameController.instance.powerup.isBoost || o.GameController.instance.character.isInGodMode()) && this._currentTrackPiece.SelectedDefinition.isTurn() && this._currentTurnState != r.TurnState.Done + ? this._autoTurnedForPowerup || + ((this._currentTrackPiece.selectedPathId = this._currentTrackPiece.getNextTrackPiecesLength() > 1 ? a.Utils.random(0, 2) : 0), (this._currentTurnState = r.TurnState.Done), (this._autoTurnedForPowerup = !0)) + : (this._autoTurnedForPowerup = !1); + } + _applyPendingTurn() { + this._currentTurnState == r.TurnState.Pending && + (this._currentTrackPiece.SelectedDefinition.isAnyJunction() + ? this._currentTurnDir == r.Turn.Right + ? ((this._currentTrackPiece.selectedPathId = 1), (this._currentTurnState = r.TurnState.Done)) + : this._currentTurnDir == r.Turn.Left && ((this._currentTrackPiece.selectedPathId = 0), (this._currentTurnState = r.TurnState.Done)) + : this._currentTrackPiece.SelectedDefinition.isLeftOrRightTurn() && + ((this._currentTrackPiece.SelectedDefinition.IsTurnRight && this._currentTurnDir == r.Turn.Right) || (this._currentTrackPiece.SelectedDefinition.IsTurnLeft && this._currentTurnDir == r.Turn.Left)) && + ((this._currentTrackPiece.selectedPathId = 0), (this._currentTurnState = r.TurnState.Done))); + } + _applyPendingTurnWaterSlideAndMine() { + let e = 999; + if ( + ((e = this._currentTrackPiece.getEstimatedLength() / 2 - this._distanceFromPieceStart), + (e -= 1), + this._movementState == r.MovementState.WaterSliding && + (this._currentTrackPiece.SelectedDefinition.IsYJunction + ? this._currentTilt != r.TiltState.None + ? ((this._currentTrackPiece.selectedPathId = this._currentTilt == r.TiltState.Left ? 0 : 1), (this._currentTurnState = r.TurnState.Done)) + : e < 0 && (this._currentTurnState = r.TurnState.Failed) + : (this._currentTurnState = r.TurnState.None)), + this._movementState == r.MovementState.CartRiding) + ) + if (this._currentTrackPiece.SelectedDefinition.IsYJunction) + this._currentTilt != r.TiltState.None + ? ((this._currentTrackPiece.selectedPathId = this._currentTilt == r.TiltState.Left ? 0 : 1), (this._currentTurnState = r.TurnState.Done)) + : e < 0 && (this._currentTurnState = r.TurnState.Failed); + else if (this._currentTrackPiece.SelectedDefinition.IsTurnRight) + this._currentTilt == r.TiltState.Right ? ((this._currentTrackPiece.selectedPathId = 0), (this._currentTurnState = r.TurnState.Done)) : e < 0 && (this._currentTurnState = r.TurnState.Failed); + else if (this._currentTrackPiece.SelectedDefinition.IsTurnLeft) + this._currentTilt == r.TiltState.Left ? ((this._currentTrackPiece.selectedPathId = 0), (this._currentTurnState = r.TurnState.Done)) : e < 0 && (this._currentTurnState = r.TurnState.Failed); + else { + if (((this._currentTurnState = r.TurnState.None), o.GameController.instance.powerup.isBoost || o.GameController.instance.character.isInGodMode())) return; + ((this._currentTrackPiece.SelectedDefinition.IsLedgeLeft && this._currentTilt != r.TiltState.Left) || (this._currentTrackPiece.SelectedDefinition.IsLedgeRight && this._currentTilt != r.TiltState.Right)) && + null != this.onMineLedgeDeath && + this.onMineLedgeDeath.notifyObservers(); + } + } + _shouldUserTurn() { + let e = 999; + this._currentTrackPiece.SelectedDefinition.isTurn() && (e = this._currentTrackPiece.getEstimatedLength() / 2 - this._distanceFromPieceStart); + const t = this._currentTrackPiece.NextTrackPieces[0]; + null != t && t.SelectedDefinition.isTurn() && (e = this._currentTrackPiece.getEstimatedLength() - this._distanceFromPieceStart + t.getEstimatedLength() / 2); + e < 0 ? (this._currentTurnState = r.TurnState.Failed) : e > 0 && e <= 7 ? (this._currentTurnState = r.TurnState.Pending) : this._currentTrackPiece.SelectedDefinition.isTurn() || (this._currentTurnState = r.TurnState.None); + } + tiltOrTurn(e) { + this._currentTurnState != r.TurnState.Pending && this._currentTurnState != r.TurnState.Done && this._currentTurnState != r.TurnState.CanTilt && this._movementState == r.MovementState.Running && this._shouldUserTurn(), + this._currentTurnState == r.TurnState.None + ? "Left" == e + ? this._currentTilt == r.TiltState.None + ? (this._currentTilt = r.TiltState.Left) + : this._currentTilt == r.TiltState.Right && (this._currentTilt = r.TiltState.None) + : "Right" == e && (this._currentTilt == r.TiltState.None ? (this._currentTilt = r.TiltState.Right) : this._currentTilt == r.TiltState.Left && (this._currentTilt = r.TiltState.None)) + : (this._currentTurnDir = "Left" == e ? r.Turn.Left : r.Turn.Right); + } + _updateDeathMovement() { + let e = 0; + if (this._deathTimer < 1) { + this._deathTimer += this._scene.deltaTime / 1e3; + const t = this._player.position.add(this._playerDeathMoveDirection.multiply(new i.Vector3(0.1, 0.1, 0.1))); + 0 != this._playerToRotation && ((e = this._playerToRotation > 0 ? 1 : -1), this._player.rotate(i.Vector3.Forward(), (e * Math.PI) / 90)), (this._player.position = t); + } else (this._player.rotation = new i.Vector3(0, this._player.rotation.y, 0)), null != this.onDeathMovementEnd && (this.onDeathMovementEnd.notifyObservers(), (this._deathTimer = 0)); + } + }; + }, + function (e, t) { + var n, + i, + r = (e.exports = {}); + function o() { + throw new Error("setTimeout has not been defined"); + } + function a() { + throw new Error("clearTimeout has not been defined"); + } + function s(e) { + if (n === setTimeout) return setTimeout(e, 0); + if ((n === o || !n) && setTimeout) return (n = setTimeout), setTimeout(e, 0); + try { + return n(e, 0); + } catch (t) { + try { + return n.call(null, e, 0); + } catch (t) { + return n.call(this, e, 0); + } + } + } + !(function () { + try { + n = "function" == typeof setTimeout ? setTimeout : o; + } catch (e) { + n = o; + } + try { + i = "function" == typeof clearTimeout ? clearTimeout : a; + } catch (e) { + i = a; + } + })(); + var c, + l = [], + u = !1, + h = -1; + function d() { + u && c && ((u = !1), c.length ? (l = c.concat(l)) : (h = -1), l.length && p()); + } + function p() { + if (!u) { + var e = s(d); + u = !0; + for (var t = l.length; t; ) { + for (c = l, l = []; ++h < t; ) c && c[h].run(); + (h = -1), (t = l.length); + } + (c = null), + (u = !1), + (function (e) { + if (i === clearTimeout) return clearTimeout(e); + if ((i === a || !i) && clearTimeout) return (i = clearTimeout), clearTimeout(e); + try { + i(e); + } catch (t) { + try { + return i.call(null, e); + } catch (t) { + return i.call(this, e); + } + } + })(e); + } + } + function f(e, t) { + (this.fun = e), (this.array = t); + } + function m() {} + (r.nextTick = function (e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + l.push(new f(e, t)), 1 !== l.length || u || s(p); + }), + (f.prototype.run = function () { + this.fun.apply(null, this.array); + }), + (r.title = "browser"), + (r.browser = !0), + (r.env = {}), + (r.argv = []), + (r.version = ""), + (r.versions = {}), + (r.on = m), + (r.addListener = m), + (r.once = m), + (r.off = m), + (r.removeListener = m), + (r.removeAllListeners = m), + (r.emit = m), + (r.prependListener = m), + (r.prependOnceListener = m), + (r.listeners = function (e) { + return []; + }), + (r.binding = function (e) { + throw new Error("process.binding is not supported"); + }), + (r.cwd = function () { + return "/"; + }), + (r.chdir = function (e) { + throw new Error("process.chdir is not supported"); + }), + (r.umask = function () { + return 0; + }); + }, + function (e, t, n) { + var i = { "./Machu/MachuRegion.json": 254 }; + function r(e) { + var t = o(e); + return n(t); + } + function o(e) { + if (!n.o(i, e)) { + var t = new Error("Cannot find module '" + e + "'"); + throw ((t.code = "MODULE_NOT_FOUND"), t); + } + return i[e]; + } + (r.keys = function () { + return Object.keys(i); + }), + (r.resolve = o), + (e.exports = r), + (r.id = 253); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"Machu","ID":0,"DisplayName":"Sky Summit","GrowDistance":80,"CullDistance":60,"StartingSection":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":8},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":9},"Variation":null,"Attach":0,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"DefaultPacingPath":"assets/tracks/Machu/MachuDefaultPacing.json","SkyboxConfig":"","ChaserConfig":""}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"StartingSection":{"Pieces":[]},"RegionID":0,"MinDistanceBetweenBaseZoneChange":350,"Milestones":[{"Distance":0,"MaxTrackPieceDifficulty":1,"AllowCoins":1,"MinDistanceBetweenCoinRuns":80,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":25,"MaxDistanceBetweenTurns":50,"AllowTurnAfterObstacle":0,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":1000,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":10,"MaxDistanceBetweenObstacles":20,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0},{"Distance":250,"MaxTrackPieceDifficulty":1,"AllowCoins":1,"MinDistanceBetweenCoinRuns":70,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":25,"MaxDistanceBetweenTurns":50,"AllowTurnAfterObstacle":0,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":1000,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":10,"MaxDistanceBetweenObstacles":20,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0},{"Distance":500,"MaxTrackPieceDifficulty":2,"AllowCoins":1,"MinDistanceBetweenCoinRuns":60,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":20,"MaxDistanceBetweenTurns":45,"AllowTurnAfterObstacle":0,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":1000,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":10,"MaxDistanceBetweenObstacles":15,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.0500000007},{"Distance":1000,"MaxTrackPieceDifficulty":3,"AllowCoins":1,"MinDistanceBetweenCoinRuns":60,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":25,"MaxDistanceBetweenTurns":45,"AllowTurnAfterObstacle":0,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":850,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":10,"MaxDistanceBetweenObstacles":10,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.0500000007},{"Distance":1500,"MaxTrackPieceDifficulty":4,"AllowCoins":1,"MinDistanceBetweenCoinRuns":50,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":15,"MaxDistanceBetweenTurns":40,"AllowTurnAfterObstacle":1,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":850,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":7.5,"MaxDistanceBetweenObstacles":10,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.100000001},{"Distance":2000,"MaxTrackPieceDifficulty":5,"AllowCoins":1,"MinDistanceBetweenCoinRuns":50,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":15,"MaxDistanceBetweenTurns":40,"AllowTurnAfterObstacle":1,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":850,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":5,"MaxDistanceBetweenObstacles":5,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.150000006},{"Distance":3250,"MaxTrackPieceDifficulty":6,"AllowCoins":1,"MinDistanceBetweenCoinRuns":40,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":10,"MaxDistanceBetweenTurns":30,"AllowTurnAfterObstacle":1,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":850,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":5,"MaxDistanceBetweenObstacles":5,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.174999997},{"Distance":4500,"MaxTrackPieceDifficulty":7,"AllowCoins":1,"MinDistanceBetweenCoinRuns":40,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":5,"MaxDistanceBetweenTurns":25,"AllowTurnAfterObstacle":1,"MinDistanceAfterTurnForObstacle":10,"DistanceToFastTurnSection":750,"MaxDistanceForFastTurnSection":150,"AllowObstacles":1,"MinDistanceBetweenObstacles":0,"MaxDistanceBetweenObstacles":2.5,"MaxBackToBackObstacles":1,"DoubleObstaclePercent":0.200000003}],"ZonePacing":[{"RegionID":0,"ZoneID":0,"MinLength":450,"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":1},"Difficulty":1,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":2},"Difficulty":0,"SelectionChance":0.100000001},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":3},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":6},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":7},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":8},"Difficulty":0,"SelectionChance":0},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":9},"Difficulty":2,"SelectionChance":0.5},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":10},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":12},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":13},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":14},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":15},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":17},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":18},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":19},"Difficulty":2,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":20},"Difficulty":1,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":21},"Difficulty":2,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":22},"Difficulty":3,"SelectionChance":0.400000006},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":23},"Difficulty":0,"SelectionChance":0.300000012},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":24},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":25},"Difficulty":0,"SelectionChance":1}],"Milestones":[]},{"RegionID":0,"ZoneID":4,"MinLength":280,"Pieces":[{"ID":{"RegionID":0,"ZoneID":4,"PieceID":0},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":1},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":2},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":3},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":4},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":5},"Difficulty":1,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":6},"Difficulty":2,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":7},"Difficulty":1,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":4,"PieceID":8},"Difficulty":0,"SelectionChance":1}],"Milestones":[]},{"RegionID":0,"ZoneID":1,"MinLength":320,"Pieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":1},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":2},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":3},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":4},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":5},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":6},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":7},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":8},"Difficulty":0,"SelectionChance":0.200000003},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":9},"Difficulty":0,"SelectionChance":0.400000006},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":10},"Difficulty":0,"SelectionChance":0.400000006},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":11},"Difficulty":0,"SelectionChance":0.400000006},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":12},"Difficulty":0,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":13},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":14},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":15},"Difficulty":0,"SelectionChance":1}],"Milestones":[]},{"RegionID":0,"ZoneID":2,"MinLength":200,"Pieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":0},"Difficulty":3,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":1},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":3},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":4},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":5},"Difficulty":1,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":6},"Difficulty":0,"SelectionChance":0.100000001},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":7},"Difficulty":1,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":8},"Difficulty":1,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":9},"Difficulty":1,"SelectionChance":1}],"Milestones":[]},{"RegionID":0,"ZoneID":3,"MinLength":200,"Pieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":0},"Difficulty":2,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":1},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":5},"Difficulty":1,"SelectionChance":0.5},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":6},"Difficulty":1,"SelectionChance":0.25},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":7},"Difficulty":1,"SelectionChance":0.25},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":8},"Difficulty":1,"SelectionChance":0.25},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":9},"Difficulty":1,"SelectionChance":0.25},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":10},"Difficulty":0,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":11},"Difficulty":0,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":12},"Difficulty":0,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":13},"Difficulty":0,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":14},"Difficulty":1,"SelectionChance":0.75},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":15},"Difficulty":0,"SelectionChance":1},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":16},"Difficulty":1,"SelectionChance":0.75}],"Milestones":[{"Distance":0,"MaxTrackPieceDifficulty":-1,"AllowCoins":1,"MinDistanceBetweenCoinRuns":25,"MaxCoinsPerRun":25,"AllowTurns":1,"MinDistanceBetweenTurns":-1,"MaxDistanceBetweenTurns":-1,"AllowTurnAfterObstacle":1,"MinDistanceAfterTurnForObstacle":-1,"DistanceToFastTurnSection":-1,"MaxDistanceForFastTurnSection":-1,"AllowObstacles":1,"MinDistanceBetweenObstacles":-1,"MaxDistanceBetweenObstacles":-1,"MaxBackToBackObstacles":-1,"DoubleObstaclePercent":-1}]}],"RunnerSpeed":[{"PercentageOfMaxSpeed":0.5,"ForceToAdd":30},{"PercentageOfMaxSpeed":0.649999976,"ForceToAdd":10},{"PercentageOfMaxSpeed":0.850000024,"ForceToAdd":1.5},{"PercentageOfMaxSpeed":1,"ForceToAdd":0.5}],"RunnerSpeedAfterResurrect":[{"PercentageOfMaxSpeed":0.5,"ForceToAdd":30},{"PercentageOfMaxSpeed":0.649999976,"ForceToAdd":10},{"PercentageOfMaxSpeed":0.850000024,"ForceToAdd":10},{"PercentageOfMaxSpeed":1,"ForceToAdd":5}]}' + ); + }, + function (e, t, n) { + var i = { + "./Machu/Base/MachuBaseZone.json": 257, + "./Machu/Forest/MachuForestZone.json": 258, + "./Machu/MineCart/MachuMineCartZone.json": 259, + "./Machu/Narrows/MachuNarrowsZone.json": 260, + "./Machu/WaterSlide/MachuWaterSlideZone.json": 261, + }; + function r(e) { + var t = o(e); + return n(t); + } + function o(e) { + if (!n.o(i, e)) { + var t = new Error("Cannot find module '" + e + "'"); + throw ((t.code = "MODULE_NOT_FOUND"), t); + } + return i[e]; + } + (r.keys = function () { + return Object.keys(i); + }), + (r.resolve = o), + (e.exports = r), + (r.id = 256); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"Base","ID":0,"Definitions":[{"DisplayName":"Machu Base Straight Flat","Name":"Straight Flat","ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"straight_a","Prefab":{"fileID":100880,"guid":"e26733bdc8c0842269c84677f827afa7","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_b","Prefab":{"fileID":188046,"guid":"ca7028d4b309645c49099368c88c4f09","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_d","Prefab":{"fileID":198582,"guid":"a997bdc237b2f4679922eee73ffbbe58","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_organic_c","Prefab":{"fileID":153530,"guid":"d302c1f9725834b5d9b141a3ea033c03","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Junction","Name":"Junction","ID":{"RegionID":0,"ZoneID":0,"PieceID":1},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":1,"IsJunction":1,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"junction_a","Prefab":{"fileID":168078,"guid":"eed93a757c2764e7885025900b44407f","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"junction_b","Prefab":{"fileID":137950,"guid":"4885a5d6bed864b2c8007a71c7ffdc33","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Bridge","Name":"Bridge","ID":{"RegionID":0,"ZoneID":0,"PieceID":2},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"bridge_a","Prefab":{"fileID":180572,"guid":"be031fe014a4a41ae88a406d79b84b81","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Jump Over","Name":"Jump Over","ID":{"RegionID":0,"ZoneID":0,"PieceID":3},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"gap_small_a","Prefab":{"fileID":170904,"guid":"2601b527d323546b0915433d56322cc2","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"jump_over_a","Prefab":{"fileID":196860,"guid":"a3a2870e5df074041bf6120289eee543","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"bridge_gap_a","Prefab":{"fileID":176006,"guid":"28feb4432339541838f3775bda554201","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"curve_water_a","Prefab":{"fileID":178170,"guid":"5a9b885a29e674c3a8e1eec15469977e","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Straight Intro","Name":"Straight Intro","ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"straight_a","Prefab":{"fileID":100880,"guid":"e26733bdc8c0842269c84677f827afa7","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_c","Prefab":{"fileID":112208,"guid":"01476053933904776bdb2cffbca792b1","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_e","Prefab":{"fileID":110666,"guid":"f64fdcf6398de4405852309a2258f0f7","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_f","Prefab":{"fileID":123656,"guid":"0b14e1791e0d6450dad9c1c2129b4168","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Straight","Name":"Straight","ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"straight_organic_a","Prefab":{"fileID":151250,"guid":"25e45cc4e58484113b5d2981f71ba5d1","type":2},"PoolPreloadAmount":0,"Frequency":35,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"straight_organic_b","Prefab":{"fileID":133912,"guid":"be260fa310ba34a3da289e5ee1a646d3","type":2},"PoolPreloadAmount":0,"Frequency":35,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"hill_a","Prefab":{"fileID":173654,"guid":"b0677b342df604bba9bd6def5e7965f9","type":2},"PoolPreloadAmount":0,"Frequency":15,"CoinPlacement":7,"CanSpawnPowerup":0},{"PieceName":"hill_b","Prefab":{"fileID":161882,"guid":"a66377f9bbce44466916bfa3782040ba","type":2},"PoolPreloadAmount":0,"Frequency":15,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Turn Left","Name":"Turn Left","ID":{"RegionID":0,"ZoneID":0,"PieceID":6},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"turn_left_a","Prefab":{"fileID":162404,"guid":"e3d23302fcdf74e78a96b28cc23fc0e7","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Turn Right","Name":"Turn Right","ID":{"RegionID":0,"ZoneID":0,"PieceID":7},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":1,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"turn_right_a","Prefab":{"fileID":100522,"guid":"f7ce3f9446f0647a883f11d291d60fc2","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Temple Start","Name":"Temple Start","ID":{"RegionID":0,"ZoneID":0,"PieceID":8},"SpecialType":1,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"temple_opening","Prefab":{"fileID":164392,"guid":"b14460f68d3754fd2a5e8c78179b868e","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base ZipLine","Name":"ZipLine","ID":{"RegionID":0,"ZoneID":0,"PieceID":9},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":1,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":2,"SelectionOdds":0.5,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"zipline_a","Prefab":{"fileID":129878,"guid":"9efe2e88653314089abaffcde5d61613","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0},{"PieceName":"zipline_b","Prefab":{"fileID":152926,"guid":"57fc33f4f45fa452895594031d49931a","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0},{"PieceName":"zipline_c","Prefab":{"fileID":137766,"guid":"6902b0198761843369a26354244956c1","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Ledge Right Start","Name":"Ledge Right Start","ID":{"RegionID":0,"ZoneID":0,"PieceID":10},"SpecialType":0,"CategoryType":1,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":1,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":0,"ZoneID":0,"PieceID":11},"CompoundPieceEndType":{"RegionID":0,"ZoneID":0,"PieceID":12},"Variations":[{"PieceName":"ledge_start_right_a","Prefab":{"fileID":177118,"guid":"5592e2da5b6c44a42abf690ac829f7a9","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":4,"CompoundPieceMaxMiddleCount":10},{"DisplayName":"Machu Base Ledge Right Middle","Name":"Ledge Right Middle","ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"SpecialType":0,"CategoryType":2,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":1,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"ledge_right_a","Prefab":{"fileID":167106,"guid":"06e791414a3e04d598fc96f16edd6bf3","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"ledge_right_b","Prefab":{"fileID":185352,"guid":"5b8ddee85bee74e08bcb5d9acadb6129","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Ledge Right End","Name":"Ledge Right End","ID":{"RegionID":0,"ZoneID":0,"PieceID":12},"SpecialType":0,"CategoryType":3,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":1,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"ledge_end_right_a","Prefab":{"fileID":195712,"guid":"b1413b2d8e91749e0a0b87473c696f8a","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Curve Left","Name":"Curve Left","ID":{"RegionID":0,"ZoneID":0,"PieceID":13},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":1,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"curve_a","Prefab":{"fileID":194384,"guid":"3eae573f8e9434d75838fb7ba400155b","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"curve_c","Prefab":{"fileID":134470,"guid":"5f9d1b7a9238f4532a995144a9bf4f25","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Curve Right","Name":"Curve Right","ID":{"RegionID":0,"ZoneID":0,"PieceID":14},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":1,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"curve_b","Prefab":{"fileID":103874,"guid":"729a9ea95da354c6997fe6e1efa1a7e0","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"curve_d","Prefab":{"fileID":110186,"guid":"3dd03fcd9a5ea49ef955e362058d3dc1","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Ledge Left Start","Name":"Ledge Left Start","ID":{"RegionID":0,"ZoneID":0,"PieceID":15},"SpecialType":0,"CategoryType":1,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":1,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":0,"ZoneID":0,"PieceID":16},"CompoundPieceEndType":{"RegionID":0,"ZoneID":0,"PieceID":17},"Variations":[{"PieceName":"ledge_start_left_a","Prefab":{"fileID":158140,"guid":"cf645e08cfcbc4a6c94a3b1dbf31ee9f","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":4,"CompoundPieceMaxMiddleCount":10},{"DisplayName":"Machu Base Ledge Left Middle","Name":"Ledge Left Middle","ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"SpecialType":0,"CategoryType":2,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":1,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"ledge_left_a","Prefab":{"fileID":132382,"guid":"8c1895160e4ca466d9217988fe9c50b6","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"ledge_left_b","Prefab":{"fileID":109884,"guid":"128240bf5421d4a72acc1afbd232eef4","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Ledge Left End","Name":"Ledge Left End","ID":{"RegionID":0,"ZoneID":0,"PieceID":17},"SpecialType":0,"CategoryType":3,"DeathType":8,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":1,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"ledge_end_left_a","Prefab":{"fileID":181448,"guid":"8b1635035569e460a8268585ade0dc19","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Stumble","Name":"Stumble","ID":{"RegionID":0,"ZoneID":0,"PieceID":18},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":1,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"stumble_a","Prefab":{"fileID":100572,"guid":"6b2b80fcaa431405997718d0d605a967","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"stumble_b","Prefab":{"fileID":105746,"guid":"d2daff925fbd44feb9819c4d784989e7","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Jump or Slide","Name":"Jump or Slide","ID":{"RegionID":0,"ZoneID":0,"PieceID":19},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":2,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"jump_or_slide_a","Prefab":{"fileID":130622,"guid":"963fa996378724017b060f9c97af6e9e","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Slide Under","Name":"Slide Under","ID":{"RegionID":0,"ZoneID":0,"PieceID":20},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"slide_under_a","Prefab":{"fileID":102080,"guid":"b8e5a5ab8551f4e08bb5199c05558d89","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Jump Over Long","Name":"Jump Over Long","ID":{"RegionID":0,"ZoneID":0,"PieceID":21},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":0,"LedgeZoneTransitionType":0,"DifficultyLevel":2,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"jump_over_b","Prefab":{"fileID":158012,"guid":"6e5fa50f887b642b1970740537eb5af1","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"gap_large_a","Prefab":{"fileID":197052,"guid":"4c1e184ca8d2d42d59970d46a48d847a","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Run Between","Name":"Run Between","ID":{"RegionID":0,"ZoneID":0,"PieceID":22},"SpecialType":0,"CategoryType":0,"DeathType":11,"DeathShakeCamera":1,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":0.4,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"run_between_a","Prefab":{"fileID":109824,"guid":"6a40c3852d62b4c5ea6a0d3fa5dfdd5a","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":1,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Stairs Up Start","Name":"Stairs Up Start","ID":{"RegionID":0,"ZoneID":0,"PieceID":23},"SpecialType":0,"CategoryType":1,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":1,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.3,"CompoundPieceMiddleType":{"RegionID":0,"ZoneID":0,"PieceID":24},"CompoundPieceEndType":{"RegionID":0,"ZoneID":0,"PieceID":25},"Variations":[{"PieceName":"stairs_up_start_a","Prefab":{"fileID":105570,"guid":"1e6b669e5cbba4f2bbc9f92769bddd92","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":3},{"DisplayName":"Machu Base Stairs Up Middle","Name":"Stairs Up Middle","ID":{"RegionID":0,"ZoneID":0,"PieceID":24},"SpecialType":0,"CategoryType":2,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":1,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"stairs_up_middle_a","Prefab":{"fileID":176256,"guid":"1b6cff0a137fe4d36b64409f3bd956f9","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0},{"PieceName":"stairs_up_middle_b","Prefab":{"fileID":155670,"guid":"c328d3b8612f847f6ab2bafc09f9393f","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Base Stairs Up End","Name":"Stairs Up End","ID":{"RegionID":0,"ZoneID":0,"PieceID":25},"SpecialType":0,"CategoryType":3,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":1,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"stairs_up_end_a","Prefab":{"fileID":119082,"guid":"1d4bfe0f503e44650a61e5f21c26264b","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1}],"AllowObstacleDuringFastTurn":0,"TransitionToZoneSupported":1,"Gameplay":0,"UseTiltForTurn":0,"IsLedgeZone":0,"TiltRatePercentModifier":1,"LedgeLeftRightMinTolerance":0.1,"LedgeLeftRightMaxTolerance":1.1,"CoinSettings":{"SmartPlacement":0,"UseTrackDefinitonsForAllowingCoins":0,"HeightAboveGround":0,"MaxHorizontalOffset":0,"UseTrackDefinitonsForAllowingBonus":0,"BonusItemHeightAboveGround":0},"Sunlight":1,"TutorialPacing":{"StartingSection":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":8},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"TutorialStartAnalyticsEventName":"TutorialStartMain","TutorialMilestones":[{"TutorialMilestoneName":"Tutorial Jump","TutorialStep":0,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":8},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":1,"DisplayMessageText":"Swipe To Jump","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":5,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":9},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":5,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":5,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":12,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMainA"},{"TutorialMilestoneName":"Tutorial Turn","TutorialStep":1,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":3,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":8,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":7},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":8,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":7},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":7,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":6},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":7,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":6},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":13},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":12,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMainB"},{"TutorialMilestoneName":"Tutorial Slide","TutorialStep":2,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":2,"DisplayMessageText":"Swipe To Slide","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":20},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":20},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":19},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":13},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":12,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMainC"},{"TutorialMilestoneName":"Tutorial Tilt","TutorialStep":3,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":4,"DisplayMessageText":"Tilt To Collect Coins","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":10},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":15},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":16},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":17},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":14},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":10},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":13},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":12,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMainD"},{"TutorialMilestoneName":"Tutorial Meter","TutorialStep":4,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":19,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":1,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":1,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":1,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":11,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":1,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":14},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":13,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMainE"}],"SaveAndRestorePlayerSpeedOnStartEnd":0,"ResetPlayerSpeedToMinOnTutorialStart":0,"MarkTutorialCompleteWhenPacingRemoved":1}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"Forest","ID":4,"Definitions":[{"DisplayName":"Machu Forest Entrance","Name":"Entrance","ID":{"RegionID":0,"ZoneID":4,"PieceID":0},"SpecialType":0,"CategoryType":6,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_entrance_a","Prefab":{"fileID":146680,"guid":"3fea3c551ce014fd58f97c527ec9c996","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Exit","Name":"Exit","ID":{"RegionID":0,"ZoneID":4,"PieceID":1},"SpecialType":0,"CategoryType":7,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_exit_a","Prefab":{"fileID":143426,"guid":"9f49108458e8e40e69e354bb05845133","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Straight","Name":"Straight","ID":{"RegionID":0,"ZoneID":4,"PieceID":2},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_straight_a","Prefab":{"fileID":191488,"guid":"ad640ff7947d546b8976aebd32efb1b3","type":2},"PoolPreloadAmount":1,"Frequency":40,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"forest_straight_b","Prefab":{"fileID":189634,"guid":"104f432c0db7b42f4a15aa1a70b879c1","type":2},"PoolPreloadAmount":1,"Frequency":40,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"forest_hill_a","Prefab":{"fileID":179542,"guid":"e60388c395dff474aa4350077f46ab0a","type":2},"PoolPreloadAmount":1,"Frequency":20,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Turn Left","Name":"Turn Left","ID":{"RegionID":0,"ZoneID":4,"PieceID":3},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_turn_left_a","Prefab":{"fileID":108568,"guid":"10ec709c0abe2404aa0c639e3e582050","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Turn Right","Name":"Turn Right","ID":{"RegionID":0,"ZoneID":4,"PieceID":4},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":1,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_turn_right_a","Prefab":{"fileID":128776,"guid":"f9897a657ef5743e3a89c2576cac6d87","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Junction","Name":"Junction","ID":{"RegionID":0,"ZoneID":4,"PieceID":5},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":1,"IsJunction":1,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_junction_a","Prefab":{"fileID":107456,"guid":"b05bfbc215c40460385e5bf3c3da271d","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"forest_junction_b","Prefab":{"fileID":109678,"guid":"b78f4e58025684ca1ae79c71795bd5c6","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":4,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Slide Under","Name":"Slide Under","ID":{"RegionID":0,"ZoneID":4,"PieceID":6},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":2,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_slide_under_a","Prefab":{"fileID":191460,"guid":"a12882d3a156743049be32e219548fea","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":4,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Jump Over","Name":"Jump Over","ID":{"RegionID":0,"ZoneID":4,"PieceID":7},"SpecialType":0,"CategoryType":0,"DeathType":12,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":0,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_jump_over_a","Prefab":{"fileID":112274,"guid":"690facb371ff44ad39a74a7961543be1","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"forest_jump_over_b","Prefab":{"fileID":120832,"guid":"28705f683d0f04ecbbfbb52d8549894b","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"forest_river_a","Prefab":{"fileID":163104,"guid":"961f8963b740a4253909179047cb72b7","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Forest Stumble","Name":"Stumble","ID":{"RegionID":0,"ZoneID":4,"PieceID":8},"SpecialType":0,"CategoryType":0,"DeathType":1,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":1,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"forest_stumble_a","Prefab":{"fileID":186448,"guid":"4403651617aa941a691250ac99d8bf6b","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"forest_stumble_b","Prefab":{"fileID":187778,"guid":"760bce868454842679621e6eaa876bf8","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1}],"AllowObstacleDuringFastTurn":0,"TransitionToZoneSupported":0,"Gameplay":0,"UseTiltForTurn":0,"IsLedgeZone":0,"TiltRatePercentModifier":1,"LedgeLeftRightMinTolerance":0.1,"LedgeLeftRightMaxTolerance":1.1,"CoinSettings":{"SmartPlacement":0,"UseTrackDefinitonsForAllowingCoins":0,"HeightAboveGround":0,"MaxHorizontalOffset":0,"UseTrackDefinitonsForAllowingBonus":0,"BonusItemHeightAboveGround":0},"Sunlight":1,"TutorialPacing":{}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"MineCart","ID":1,"Definitions":[{"DisplayName":"Machu MineCart Straight","Name":"Straight","ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_straight_a","Prefab":{"fileID":191766,"guid":"33a512219db3342ccaf28c835846017a","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"mine_straight_b","Prefab":{"fileID":128108,"guid":"6a8c434388971473594c3a674c852cd6","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Entrance","Name":"Entrance","ID":{"RegionID":0,"ZoneID":1,"PieceID":1},"SpecialType":0,"CategoryType":6,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_entrance_a","Prefab":{"fileID":194912,"guid":"558dc3c1fc6a74685ba2d6ec3269a70e","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Exit","Name":"Exit","ID":{"RegionID":0,"ZoneID":1,"PieceID":2},"SpecialType":0,"CategoryType":7,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_exit_a","Prefab":{"fileID":112884,"guid":"1ac33785e06b849d181bb3677b67dd24","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Ledge Left Start","Name":"Ledge Left Start","ID":{"RegionID":0,"ZoneID":1,"PieceID":3},"SpecialType":0,"CategoryType":1,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":0,"ZoneID":1,"PieceID":4},"CompoundPieceEndType":{"RegionID":0,"ZoneID":1,"PieceID":5},"Variations":[{"PieceName":"mine_ledge_left_start_a","Prefab":{"fileID":113720,"guid":"e8f7889206b4f409cb697338a1a34626","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":4,"CompoundPieceMaxMiddleCount":12},{"DisplayName":"Machu MineCart Ledge Left Middle","Name":"Ledge Left Middle","ID":{"RegionID":0,"ZoneID":1,"PieceID":4},"SpecialType":0,"CategoryType":2,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":1,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_ledge_left_a","Prefab":{"fileID":190610,"guid":"8ca8ba14bc2ac49fe9e43a0241dcc983","type":2},"PoolPreloadAmount":1,"Frequency":65,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"mine_ledge_left_b","Prefab":{"fileID":153376,"guid":"8d6b9636da79444ea82d9c8cb363d281","type":2},"PoolPreloadAmount":1,"Frequency":45,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Ledge Left End","Name":"Ledge Left End","ID":{"RegionID":0,"ZoneID":1,"PieceID":5},"SpecialType":0,"CategoryType":3,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_ledge_left_end_a","Prefab":{"fileID":130366,"guid":"ce4a19be9cdac4380a32a6195b5e7312","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Turn Left","Name":"Turn Left","ID":{"RegionID":0,"ZoneID":1,"PieceID":6},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_junction_b","Prefab":{"fileID":167622,"guid":"619934b70136e4042ae52e55a0982a69","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Turn Right","Name":"Turn Right","ID":{"RegionID":0,"ZoneID":1,"PieceID":7},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":1,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_junction_c","Prefab":{"fileID":118348,"guid":"52c2691a586884a32b798a885e112c57","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Curve Right Long","Name":"Curve Right Long","ID":{"RegionID":0,"ZoneID":1,"PieceID":8},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":1,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.2,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_curve_a","Prefab":{"fileID":173686,"guid":"846082c61ec9b43049b602fe0ed944bc","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Curve Left","Name":"Curve Left","ID":{"RegionID":0,"ZoneID":1,"PieceID":9},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":1,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.4,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_curve_d","Prefab":{"fileID":148582,"guid":"6a46b6b7b31514eefbc497abda29e694","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Curve Right","Name":"Curve Right","ID":{"RegionID":0,"ZoneID":1,"PieceID":10},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":1,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.4,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_curve_c","Prefab":{"fileID":181700,"guid":"c4370397c651344e182fbb56f8a8cbcd","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Junction","Name":"Junction","ID":{"RegionID":0,"ZoneID":1,"PieceID":11},"SpecialType":0,"CategoryType":0,"DeathType":5,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":1,"IsJunction":0,"IsYJunction":1,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.4,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_junction_a","Prefab":{"fileID":126656,"guid":"4059a295dddd7437092530ab54f5f568","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Duck","Name":"Duck","ID":{"RegionID":0,"ZoneID":1,"PieceID":12},"SpecialType":0,"CategoryType":0,"DeathType":3,"DeathShakeCamera":1,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_duck_a","Prefab":{"fileID":132860,"guid":"c907ca4537ddc4cfeb7c249d459f39b5","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0},{"PieceName":"mine_duck_b","Prefab":{"fileID":195016,"guid":"952b3aafe7f23410ba3417e5820aefe2","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Ledge Right Start","Name":"Ledge Right Start","ID":{"RegionID":0,"ZoneID":1,"PieceID":13},"SpecialType":0,"CategoryType":1,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":0,"ZoneID":1,"PieceID":14},"CompoundPieceEndType":{"RegionID":0,"ZoneID":1,"PieceID":15},"Variations":[{"PieceName":"mine_ledge_right_start_a","Prefab":{"fileID":171916,"guid":"42f2f53a0177e4776a116dcc26e855a2","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":4,"CompoundPieceMaxMiddleCount":12},{"DisplayName":"Machu MineCart Ledge Right Middle","Name":"Ledge Right Middle","ID":{"RegionID":0,"ZoneID":1,"PieceID":14},"SpecialType":0,"CategoryType":2,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":1,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_ledge_right_a","Prefab":{"fileID":170186,"guid":"e9fe73f4402f145f3839fa86953c1bc4","type":2},"PoolPreloadAmount":1,"Frequency":65,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"mine_ledge_right_b","Prefab":{"fileID":112712,"guid":"dc2eb971fb37b4f49aa2351f583c6374","type":2},"PoolPreloadAmount":1,"Frequency":35,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu MineCart Ledge Right End","Name":"Ledge Right End","ID":{"RegionID":0,"ZoneID":1,"PieceID":15},"SpecialType":0,"CategoryType":3,"DeathType":4,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":1,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"mine_ledge_right_end_a","Prefab":{"fileID":115654,"guid":"820263a843b2a46e3b0b89c5605c5b08","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1}],"AllowObstacleDuringFastTurn":0,"TransitionToZoneSupported":0,"Gameplay":1,"UseTiltForTurn":1,"IsLedgeZone":0,"TiltRatePercentModifier":1,"LedgeLeftRightMinTolerance":0.4,"LedgeLeftRightMaxTolerance":1.1,"CoinSettings":{"SmartPlacement":0,"UseTrackDefinitonsForAllowingCoins":0,"HeightAboveGround":1,"MaxHorizontalOffset":0.85,"UseTrackDefinitonsForAllowingBonus":0,"BonusItemHeightAboveGround":0},"Sunlight":0,"TutorialPacing":{"StartingSection":{"Pieces":[],"TrackLoop":0},"TutorialStartAnalyticsEventName":"TutorialStartMineCart","TutorialMilestones":[{"TutorialMilestoneName":"Tutorial Mine Turn","TutorialStep":0,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":1},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":9},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":4,"DisplayMessageText":"Tilt To Live!","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":9,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":6},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":10,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":7},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":9,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":6},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":8},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMinecartA"},{"TutorialMilestoneName":"Tutorial Mine Duck","TutorialStep":1,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":2,"DisplayMessageText":"Swipe To Duck","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":1,"PieceID":8},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":13,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteMinecartB"}],"SaveAndRestorePlayerSpeedOnStartEnd":1,"ResetPlayerSpeedToMinOnTutorialStart":1,"MarkTutorialCompleteWhenPacingRemoved":1}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"Narrows","ID":2,"Definitions":[{"DisplayName":"Machu Narrows Entrance","Name":"Entrance","ID":{"RegionID":0,"ZoneID":2,"PieceID":0},"SpecialType":0,"CategoryType":6,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":3,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_start_a","Prefab":{"fileID":108856,"guid":"980c4dc67cfa84efcada18dee6ab6b1c","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Exit","Name":"Exit","ID":{"RegionID":0,"ZoneID":2,"PieceID":1},"SpecialType":0,"CategoryType":7,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_end_a","Prefab":{"fileID":112380,"guid":"6de617a73735248f5af923c6b4382d4d","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":0},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Straight","Name":"Straight","ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_straight_a","Prefab":{"fileID":198916,"guid":"0efe31ab0969c4b5fadf3e0b8e4a7298","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"narrow_straight_b","Prefab":{"fileID":174522,"guid":"796215173bde545ce939994eb10721f4","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Turn Left","Name":"Turn Left","ID":{"RegionID":0,"ZoneID":2,"PieceID":3},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_turn_left_a","Prefab":{"fileID":170448,"guid":"b20a6d81e9d3548908cb5ceaeb72245f","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Turn Right","Name":"Turn Right","ID":{"RegionID":0,"ZoneID":2,"PieceID":4},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":1,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_turn_right_a","Prefab":{"fileID":159922,"guid":"d6719ed0a12ac4ec095d9c4c6745b14e","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Jump Or Slide","Name":"Jump Or Slide","ID":{"RegionID":0,"ZoneID":2,"PieceID":5},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_jump_or_slide_a","Prefab":{"fileID":100000,"guid":"44e2a9060c7df473a83b7beeeddbf3c8","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Straight Rare","Name":"Straight Rare","ID":{"RegionID":0,"ZoneID":2,"PieceID":6},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_straight_c","Prefab":{"fileID":148728,"guid":"a77df69986f96464daa82fe9c543c33b","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"narrow_straight_d","Prefab":{"fileID":194970,"guid":"a4b955ccccfe941529890a9919be7c91","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1},{"PieceName":"narrow_straight_e","Prefab":{"fileID":164742,"guid":"9496b1df260d94b48a0a45b60fc312db","type":2},"PoolPreloadAmount":1,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Junction","Name":"Junction","ID":{"RegionID":0,"ZoneID":2,"PieceID":7},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":1,"IsJunction":1,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_junction_a","Prefab":{"fileID":195132,"guid":"fb3ac1359535c49c8a6845a7a7edad0c","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":7,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Stumble","Name":"Stumble","ID":{"RegionID":0,"ZoneID":2,"PieceID":8},"SpecialType":0,"CategoryType":0,"DeathType":1,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":1,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_stumble_a","Prefab":{"fileID":174996,"guid":"543a5f50e88774913a12ab2fd8adcb93","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu Narrows Jump","Name":"Jump","ID":{"RegionID":0,"ZoneID":2,"PieceID":9},"SpecialType":0,"CategoryType":0,"DeathType":0,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":1,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":1,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":0,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"narrow_jump_over_a","Prefab":{"fileID":171504,"guid":"48f102f9e81f747239ff755e6893448d","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1},{"PieceName":"narrow_jump_over_b","Prefab":{"fileID":118402,"guid":"c0d313fdb01c24b1cb1615ccbca26c7e","type":2},"PoolPreloadAmount":0,"Frequency":100,"CoinPlacement":3,"CanSpawnPowerup":1}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":2,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1}],"AllowObstacleDuringFastTurn":1,"TransitionToZoneSupported":0,"Gameplay":0,"UseTiltForTurn":0,"IsLedgeZone":0,"TiltRatePercentModifier":0.85,"LedgeLeftRightMinTolerance":0,"LedgeLeftRightMaxTolerance":0.8,"CoinSettings":{"SmartPlacement":0,"UseTrackDefinitonsForAllowingCoins":0,"HeightAboveGround":0,"MaxHorizontalOffset":0,"UseTrackDefinitonsForAllowingBonus":0,"BonusItemHeightAboveGround":0},"Sunlight":1,"TutorialPacing":{}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"Name":"WaterSlide","ID":3,"Definitions":[{"DisplayName":"Machu WaterSlide Entrance","Name":"Entrance","ID":{"RegionID":0,"ZoneID":3,"PieceID":0},"SpecialType":0,"CategoryType":6,"DeathType":12,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":2,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_start_a","Prefab":{"fileID":142972,"guid":"bbf83e217123e4b109fcce7ebb395c17","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Exit","Name":"Exit","ID":{"RegionID":0,"ZoneID":3,"PieceID":1},"SpecialType":0,"CategoryType":7,"DeathType":12,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_end_a","Prefab":{"fileID":138986,"guid":"3759be77208ce4f5da27d6da8becca42","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":0,"PieceID":5},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Straight","Name":"Straight","ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_straight_a","Prefab":{"fileID":170628,"guid":"cd9f72178227d4ea9bb2044b40ec200b","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":7,"CanSpawnPowerup":0},{"PieceName":"waterslide_straight_b","Prefab":{"fileID":133912,"guid":"a44f9d958ae48490e9a5e3cb16b49e60","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":7,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide CurveLeft45","Name":"CurveLeft45","ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"SpecialType":0,"CategoryType":0,"DeathType":7,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_curve_45_b","Prefab":{"fileID":170040,"guid":"461a530d9f0624dce8ba2d8ebd252e3d","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":0,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide CurveRight45","Name":"CurveRight45","ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"SpecialType":0,"CategoryType":0,"DeathType":7,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_curve_45_a","Prefab":{"fileID":158748,"guid":"36cbe8ccc90424f6bbf33e08ea990cd5","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":2,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Duck","Name":"Duck","ID":{"RegionID":0,"ZoneID":3,"PieceID":5},"SpecialType":0,"CategoryType":0,"DeathType":9,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.5,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_b","Prefab":{"fileID":134922,"guid":"c7f2f573d0c9843e4994401189b8cf01","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Duck Left","Name":"Duck Left","ID":{"RegionID":0,"ZoneID":3,"PieceID":6},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.25,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_blocked_right","Prefab":{"fileID":102752,"guid":"d35ddfcb4d30043d392d5de8485e8478","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Duck Right","Name":"Duck Right","ID":{"RegionID":0,"ZoneID":3,"PieceID":7},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.25,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_blocked_left","Prefab":{"fileID":159486,"guid":"7d10459e9f1814ce58d8f1f4788a7fdd","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Duck Center","Name":"Duck Center","ID":{"RegionID":0,"ZoneID":3,"PieceID":8},"SpecialType":0,"CategoryType":0,"DeathType":6,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.25,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_center_blocked_sides","Prefab":{"fileID":170140,"guid":"288329cd584b945ffa9f76a23ca2db14","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Duck Side","Name":"Duck Side","ID":{"RegionID":0,"ZoneID":3,"PieceID":9},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":1,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.25,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_blocked_center","Prefab":{"fileID":105240,"guid":"4c6c2a590fdf64ef686cab5eb098746c","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Tilt Right","Name":"Tilt Right","ID":{"RegionID":0,"ZoneID":3,"PieceID":10},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_left_tilt_right","Prefab":{"fileID":135018,"guid":"3fc6186df8bf049a98866bea61895b10","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":2,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":2,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Tilt Left","Name":"Tilt Left","ID":{"RegionID":0,"ZoneID":3,"PieceID":11},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_duck_right_tilt_left","Prefab":{"fileID":147108,"guid":"81d7bb36382d545d288ae9ecffa59540","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":0,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":0,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide CurveLeft90","Name":"CurveLeft90","ID":{"RegionID":0,"ZoneID":3,"PieceID":12},"SpecialType":0,"CategoryType":0,"DeathType":7,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_curve_90_b","Prefab":{"fileID":124298,"guid":"a96a580c702d54d2da7783a06bf1aca3","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":0,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide CurveRight90","Name":"CurveRight90","ID":{"RegionID":0,"ZoneID":3,"PieceID":13},"SpecialType":0,"CategoryType":0,"DeathType":13,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_curve_90_a","Prefab":{"fileID":173738,"guid":"8a07dd86671a24426a6f7d2fa6e0ed6c","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":2,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Rock","Name":"Rock","ID":{"RegionID":0,"ZoneID":3,"PieceID":14},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":1,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_straight_c","Prefab":{"fileID":101528,"guid":"9b0c23b86c56c499bbd89417fa80be88","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":5,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":5,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Tilt Tutorial","Name":"Tilt Tutorial","ID":{"RegionID":0,"ZoneID":3,"PieceID":15},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":0,"IsTurnRight":0,"IsJunction":0,"IsYJunction":0,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":0,"SelectionOdds":1,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_straight_a","Prefab":{"fileID":170628,"guid":"cd9f72178227d4ea9bb2044b40ec200b","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":5,"CanSpawnPowerup":0},{"PieceName":"waterslide_straight_b","Prefab":{"fileID":133912,"guid":"a44f9d958ae48490e9a5e3cb16b49e60","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":5,"CanSpawnPowerup":0}],"PrePieces":[],"PostPieces":[],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1},{"DisplayName":"Machu WaterSlide Junction","Name":"Junction","ID":{"RegionID":0,"ZoneID":3,"PieceID":16},"SpecialType":0,"CategoryType":0,"DeathType":10,"DeathShakeCamera":0,"IsTurnLeft":1,"IsTurnRight":1,"IsJunction":0,"IsYJunction":1,"IsOptionalJunction":0,"IsSlideUnder":0,"IsJumpOver":0,"IsStumble":0,"IsLedgeLeft":0,"IsLedgeRight":0,"IsLedgeCenter":0,"IsStairs":0,"IsCurveLeft":0,"IsCurveRight":0,"IsMine":0,"IsZipLine":0,"IsWaterSlide":1,"IsGenericObstacle":0,"AllowDoubleObstacle":1,"LedgeZoneTransitionType":0,"DifficultyLevel":1,"SelectionOdds":0.75,"CompoundPieceMiddleType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"CompoundPieceEndType":{"RegionID":-1,"ZoneID":-1,"PieceID":-1},"Variations":[{"PieceName":"waterslide_junction_a","Prefab":{"fileID":109730,"guid":"f16bf614670dc47a1b8a9895487bca3c","type":2},"PoolPreloadAmount":1,"Frequency":0,"CoinPlacement":3,"CanSpawnPowerup":0}],"PrePieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":1,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":1,"CoinPlacement":3,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"PostPieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"VariationName":null,"OverrideCoinPlacement":0,"CoinPlacement":7,"OverrideCanSpawnPowerup":0,"CanSpawnPowerup":0}],"JunctionPostPieces":[],"CompoundPieceMinMiddleCount":1,"CompoundPieceMaxMiddleCount":1}],"AllowObstacleDuringFastTurn":0,"TransitionToZoneSupported":0,"Gameplay":2,"UseTiltForTurn":1,"IsLedgeZone":0,"TiltRatePercentModifier":1,"LedgeLeftRightMinTolerance":0.1,"LedgeLeftRightMaxTolerance":1.1,"CoinSettings":{"SmartPlacement":1,"UseTrackDefinitonsForAllowingCoins":0,"HeightAboveGround":0,"MaxHorizontalOffset":1.1,"UseTrackDefinitonsForAllowingBonus":0,"BonusItemHeightAboveGround":0},"Sunlight":1,"TutorialPacing":{"StartingSection":{"Pieces":[],"TrackLoop":0},"TutorialStartAnalyticsEventName":"TutorialStartWaterslide","TutorialMilestones":[{"TutorialMilestoneName":"Tutorial Water Slide Tilt","TutorialStep":0,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":0},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":4,"DisplayMessageText":"Tilt To Dodge!","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":15},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":15},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteWaterslideA"},{"TutorialMilestoneName":"Tutorial Water Slide Tilt Left","TutorialStep":1,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":9,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":11},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteWaterslideB"},{"TutorialMilestoneName":"Tutorial Water Slide Tilt Right","TutorialStep":2,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":10,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":10},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":12,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":12},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteWaterslideC"},{"TutorialMilestoneName":"Tutorial Water Slide Duck","TutorialStep":3,"TutorialTrackQueue":{"Pieces":[{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":13},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":2,"DisplayMessageText":"Swipe To Dunk","SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":5},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":3},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":4},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":6,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":2}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":5},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":13,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":1}},{"ID":{"RegionID":0,"ZoneID":3,"PieceID":2},"Variation":null,"Attach":1,"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}],"TrackLoop":0},"AllowCoins":0,"MilestoneCompleteAnalyticsEventName":"TutorialSegmentCompleteWaterslideD"}],"SaveAndRestorePlayerSpeedOnStartEnd":1,"ResetPlayerSpeedToMinOnTutorialStart":1,"MarkTutorialCompleteWhenPacingRemoved":1}}' + ); + }, + function (e, t, n) { + var i = { + "./Machu/Base/MachuBasePieces.json": 263, + "./Machu/Forest/MachuForestPieces.json": 264, + "./Machu/MineCart/MachuMineCartPieces.json": 265, + "./Machu/Narrows/MachuNarrowsPieces.json": 266, + "./Machu/WaterSlide/MachuWaterSlidePieces.json": 267, + }; + function r(e) { + var t = o(e); + return n(t); + } + function o(e) { + if (!n.o(i, e)) { + var t = new Error("Cannot find module '" + e + "'"); + throw ((t.code = "MODULE_NOT_FOUND"), t); + } + return i[e]; + } + (r.keys = function () { + return Object.keys(i); + }), + (r.resolve = o), + (e.exports = r), + (r.id = 262); + }, + function (e) { + e.exports = JSON.parse( + '{"bridge_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9234317e-7,"y":0.15999925,"z":-6.400001},{"x":9.193606e-7,"y":-0.16000101,"z":-8.320001},{"x":8.076157e-7,"y":-0.64000136,"z":-10.880001},{"x":6.959441e-7,"y":-0.9600017,"z":-13.4400015},{"x":5.84062e-7,"y":-1.040002,"z":-16.000002},{"x":4.7251046e-7,"y":-0.9600023,"z":-18.560001},{"x":3.605887e-7,"y":-0.64000255,"z":-21.12},{"x":2.4844172e-7,"y":-0.16000283,"z":-23.680002},{"x":-0.0000011813692,"y":0.15999696,"z":-25.600002},{"x":-0.0000014439192,"y":-0.0000024175642,"z":-32.000004}],"EstimatedPathLength":32.188538,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.6483148e-7,"y":0.05925905,"z":-1.8251855},{"x":-3.7325663e-7,"y":0.1362958,"z":-4.361482},{"x":-3.9234314e-7,"y":0.15999925,"z":-6.4000015},{"x":-2.861384e-8,"y":0.09481393,"z":-7.3481493},{"x":5.24454e-7,"y":-0.023704678,"z":-7.798519},{"x":9.1936073e-7,"y":-0.16000108,"z":-8.320001},{"x":9.875503e-7,"y":-0.3140753,"z":-9.125927},{"x":8.9757896e-7,"y":-0.4859272,"z":-10.002965},{"x":8.076157e-7,"y":-0.6400014,"z":-10.880001},{"x":7.703942e-7,"y":-0.7674089,"z":-11.733335},{"x":7.331808e-7,"y":-0.87703866,"z":-12.586669},{"x":6.9594404e-7,"y":-0.96000177,"z":-13.440002},{"x":6.586534e-7,"y":-1.0103722,"z":-14.293336},{"x":6.213393e-7,"y":-1.0340759,"z":-15.146669},{"x":5.84062e-7,"y":-1.040002,"z":-16.000002},{"x":5.4686734e-7,"y":-1.0340762,"z":-16.853336},{"x":5.097094e-7,"y":-1.0103725,"z":-17.70667},{"x":4.7251044e-7,"y":-0.96000224,"z":-18.560001},{"x":4.3523892e-7,"y":-0.87703925,"z":-19.413336},{"x":3.9792633e-7,"y":-0.76740974,"z":-20.266668},{"x":3.6058864e-7,"y":-0.64000237,"z":-21.120003},{"x":3.7202545e-7,"y":-0.48592848,"z":-21.997038},{"x":3.8343705e-7,"y":-0.3140766,"z":-22.874077},{"x":2.4844118e-7,"y":-0.16000254,"z":-23.680004},{"x":-1.7378969e-7,"y":-0.023706496,"z":-24.201485},{"x":-7.424281e-7,"y":0.094811976,"z":-24.651857},{"x":-0.0000011813695,"y":0.15999699,"z":-25.600004},{"x":-0.0000013650739,"y":0.13629329,"z":-27.638525},{"x":-0.0000014190827,"y":0.059256554,"z":-30.174818},{"x":-0.0000014439194,"y":-0.0000024586916,"z":-31.999996}],"GeneratedEstimatedPathLength":32.208782,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"bridge_gap_a":{"DeathType":0,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9234317e-7,"y":0.15999925,"z":-6.400001},{"x":9.193606e-7,"y":-0.16000101,"z":-8.320001},{"x":8.076157e-7,"y":-0.64000136,"z":-10.880001},{"x":6.959441e-7,"y":-0.9600017,"z":-13.4400015},{"x":5.84062e-7,"y":-1.040002,"z":-16.000002},{"x":4.7251046e-7,"y":-0.9600023,"z":-18.560001},{"x":3.605887e-7,"y":-0.64000255,"z":-21.12},{"x":2.4844172e-7,"y":-0.16000283,"z":-23.680002},{"x":-0.0000011813692,"y":0.15999696,"z":-25.600002},{"x":-0.0000014439192,"y":-0.0000024175642,"z":-32.000004}],"EstimatedPathLength":32.188538,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.6483148e-7,"y":0.05925905,"z":-1.8251855},{"x":-3.7325663e-7,"y":0.1362958,"z":-4.361482},{"x":-3.9234314e-7,"y":0.15999925,"z":-6.4000015},{"x":-2.861384e-8,"y":0.09481393,"z":-7.3481493},{"x":5.24454e-7,"y":-0.023704678,"z":-7.798519},{"x":9.1936073e-7,"y":-0.16000108,"z":-8.320001},{"x":9.875503e-7,"y":-0.3140753,"z":-9.125927},{"x":8.9757896e-7,"y":-0.4859272,"z":-10.002965},{"x":8.076157e-7,"y":-0.6400014,"z":-10.880001},{"x":7.703942e-7,"y":-0.7674089,"z":-11.733335},{"x":7.331808e-7,"y":-0.87703866,"z":-12.586669},{"x":6.9594404e-7,"y":-0.96000177,"z":-13.440002},{"x":6.586534e-7,"y":-1.0103722,"z":-14.293336},{"x":6.213393e-7,"y":-1.0340759,"z":-15.146669},{"x":5.84062e-7,"y":-1.040002,"z":-16.000002},{"x":5.4686734e-7,"y":-1.0340762,"z":-16.853336},{"x":5.097094e-7,"y":-1.0103725,"z":-17.70667},{"x":4.7251044e-7,"y":-0.96000224,"z":-18.560001},{"x":4.3523892e-7,"y":-0.87703925,"z":-19.413336},{"x":3.9792633e-7,"y":-0.76740974,"z":-20.266668},{"x":3.6058864e-7,"y":-0.64000237,"z":-21.120003},{"x":3.7202545e-7,"y":-0.48592848,"z":-21.997038},{"x":3.8343705e-7,"y":-0.3140766,"z":-22.874077},{"x":2.4844118e-7,"y":-0.16000254,"z":-23.680004},{"x":-1.7378969e-7,"y":-0.023706496,"z":-24.201485},{"x":-7.424281e-7,"y":0.094811976,"z":-24.651857},{"x":-0.0000011813695,"y":0.15999699,"z":-25.600004},{"x":-0.0000013650739,"y":0.13629329,"z":-27.638525},{"x":-0.0000014190827,"y":0.059256554,"z":-30.174818},{"x":-0.0000014439194,"y":-0.0000024586916,"z":-31.999996}],"GeneratedEstimatedPathLength":32.208782,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"curve_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.13288085,"y":0.17367247,"z":-5.359034},{"x":0.64437985,"y":0.35665524,"z":-10.626655},{"x":1.483833,"y":0.5110622,"z":-15.792166},{"x":2.6405225,"y":0.63999754,"z":-20.84488}],"EstimatedPathLength":21.079628,"SourceLastYRot":345.28,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.004214975,"y":0.0065159206,"z":-0.20184807},{"x":0.008146799,"y":0.014388118,"z":-0.44689345},{"x":0.012013907,"y":0.023470491,"z":-0.7302913},{"x":0.016034728,"y":0.033616945,"z":-1.0471967},{"x":0.020427698,"y":0.04468137,"z":-1.3927649},{"x":0.025411252,"y":0.056517676,"z":-1.7621512},{"x":0.031203818,"y":0.068979755,"z":-2.1505103},{"x":0.03802383,"y":0.08192152,"z":-2.552998},{"x":0.04608973,"y":0.09519686,"z":-2.9647684},{"x":0.05561994,"y":0.10865968,"z":-3.380978},{"x":0.0668329,"y":0.12216388,"z":-3.796781},{"x":0.07994704,"y":0.13556336,"z":-4.2073336},{"x":0.0951808,"y":0.14871201,"z":-4.607789},{"x":0.1127526,"y":0.16146374,"z":-4.9933043},{"x":0.13288085,"y":0.17367247,"z":-5.359034},{"x":0.15530665,"y":0.18566026,"z":-5.713075},{"x":0.17959535,"y":0.19782412,"z":-6.066748},{"x":0.20570184,"y":0.21013038,"z":-6.4200425},{"x":0.23358122,"y":0.2225454,"z":-6.7729506},{"x":0.2631883,"y":0.23503545,"z":-7.125461},{"x":0.29447818,"y":0.2475669,"z":-7.477566},{"x":0.32740575,"y":0.26010603,"z":-7.829254},{"x":0.36192602,"y":0.2726192,"z":-8.180518},{"x":0.39799398,"y":0.28507274,"z":-8.531347},{"x":0.43556446,"y":0.2974329,"z":-8.881731},{"x":0.47459257,"y":0.3096661,"z":-9.231662},{"x":0.5150331,"y":0.3217386,"z":-9.581129},{"x":0.5568413,"y":0.33361676,"z":-9.930124},{"x":0.59997183,"y":0.34526688,"z":-10.278635},{"x":0.64437985,"y":0.35665524,"z":-10.626655},{"x":0.6901627,"y":0.36783165,"z":-10.974222},{"x":0.7374411,"y":0.37886998,"z":-11.321372},{"x":0.78620565,"y":0.38977304,"z":-11.668097},{"x":0.836447,"y":0.4005436,"z":-12.014388},{"x":0.8881553,"y":0.41118437,"z":-12.360234},{"x":0.94132113,"y":0.42169815,"z":-12.705626},{"x":0.995935,"y":0.43208766,"z":-13.050554},{"x":1.0519876,"y":0.44235575,"z":-13.395011},{"x":1.1094689,"y":0.45250505,"z":-13.738985},{"x":1.1683699,"y":0.4625384,"z":-14.082466},{"x":1.2286808,"y":0.47245854,"z":-14.425447},{"x":1.2903922,"y":0.48226824,"z":-14.767918},{"x":1.3534942,"y":0.49197024,"z":-15.109867},{"x":1.4179776,"y":0.5015673,"z":-15.451286},{"x":1.4838332,"y":0.51106226,"z":-15.792167},{"x":1.5541332,"y":0.520665,"z":-16.142769},{"x":1.6310838,"y":0.53052235,"z":-16.510435},{"x":1.7133751,"y":0.5405425,"z":-16.890772},{"x":1.7996963,"y":0.55063325,"z":-17.27939},{"x":1.8887377,"y":0.56070286,"z":-17.671898},{"x":1.9791889,"y":0.5706592,"z":-18.063904},{"x":2.0697403,"y":0.5804104,"z":-18.451017},{"x":2.159081,"y":0.5898645,"z":-18.828848},{"x":2.245901,"y":0.5989294,"z":-19.193005},{"x":2.3288906,"y":0.6075133,"z":-19.539093},{"x":2.4067395,"y":0.6155241,"z":-19.862728},{"x":2.478137,"y":0.6228699,"z":-20.159515},{"x":2.5417736,"y":0.6294587,"z":-20.425062},{"x":2.596339,"y":0.63519865,"z":-20.654982},{"x":2.6405225,"y":0.6399976,"z":-20.844877}],"GeneratedEstimatedPathLength":21.082336,"GeneratedLastYRot":345.28,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"curve_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.13288085,"y":-6.388455e-7,"z":-5.3590255},{"x":-0.64438474,"y":-0.0000012667944,"z":-10.626642},{"x":-1.4838378,"y":-0.0000018825714,"z":-15.792155},{"x":-2.6405175,"y":-0.0000024849012,"z":-20.844864}],"EstimatedPathLength":21.069756,"SourceLastYRot":14.72,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0042149653,"y":-2.406209e-8,"z":-0.20184775},{"x":-0.008146762,"y":-5.3273723e-8,"z":-0.4468927},{"x":-0.012013828,"y":-8.7057316e-8,"z":-0.7302901},{"x":-0.0160346,"y":-1.2483531e-7,"z":-1.047195},{"x":-0.020427518,"y":-1.6603016e-7,"z":-1.3927625},{"x":-0.025411017,"y":-2.1006436e-7,"z":-1.7621483},{"x":-0.031203534,"y":-2.5636032e-7,"z":-2.1505067},{"x":-0.03802351,"y":-3.043405e-7,"z":-2.5529935},{"x":-0.046089374,"y":-3.5342728e-7,"z":-2.9647636},{"x":-0.055619575,"y":-4.0304323e-7,"z":-3.3809724},{"x":-0.06683254,"y":-4.526107e-7,"z":-3.7967749},{"x":-0.079946734,"y":-5.015523e-7,"z":-4.207327},{"x":-0.095180556,"y":-5.492903e-7,"z":-4.6077824},{"x":-0.11275245,"y":-5.952472e-7,"z":-4.9932966},{"x":-0.13288085,"y":-6.388455e-7,"z":-5.3590255},{"x":-0.15530685,"y":-6.8105044e-7,"z":-5.713066},{"x":-0.1795958,"y":-7.232115e-7,"z":-6.0667386},{"x":-0.20570259,"y":-7.6532746e-7,"z":-6.420033},{"x":-0.23358229,"y":-8.073973e-7,"z":-6.7729406},{"x":-0.26318973,"y":-8.494198e-7,"z":-7.1254506},{"x":-0.29448003,"y":-8.9139394e-7,"z":-7.4775553},{"x":-0.327408,"y":-9.3331846e-7,"z":-7.829243},{"x":-0.3619287,"y":-9.751923e-7,"z":-8.180507},{"x":-0.39799702,"y":-0.0000010170143,"z":-8.531336},{"x":-0.43556786,"y":-0.0000010587833,"z":-8.881719},{"x":-0.47459638,"y":-0.0000011004983,"z":-9.231649},{"x":-0.5150373,"y":-0.000001142158,"z":-9.581116},{"x":-0.5568457,"y":-0.0000011837614,"z":-9.930111},{"x":-0.59997654,"y":-0.0000012253072,"z":-10.278622},{"x":-0.64438474,"y":-0.0000012667944,"z":-10.626642},{"x":-0.6901678,"y":-0.0000013082276,"z":-10.97421},{"x":-0.7374463,"y":-0.0000013496111,"z":-11.32136},{"x":-0.786211,"y":-0.0000013909439,"z":-11.668085},{"x":-0.8364525,"y":-0.0000014322251,"z":-12.014376},{"x":-0.8881609,"y":-0.0000014734532,"z":-12.360222},{"x":-0.94132686,"y":-0.000001514627,"z":-12.705614},{"x":-0.9959408,"y":-0.0000015557457,"z":-13.050543},{"x":-1.0519935,"y":-0.0000015968083,"z":-13.395},{"x":-1.1094749,"y":-0.000001637813,"z":-13.738975},{"x":-1.1683757,"y":-0.0000016787593,"z":-14.082457},{"x":-1.2286866,"y":-0.0000017196459,"z":-14.425438},{"x":-1.2903976,"y":-0.0000017604714,"z":-14.767908},{"x":-1.3534997,"y":-0.0000018012349,"z":-15.109858},{"x":-1.4179829,"y":-0.0000018419353,"z":-15.451277},{"x":-1.4838381,"y":-0.0000018825715,"z":-15.792156},{"x":-1.5541377,"y":-0.0000019243666,"z":-16.14276},{"x":-1.6310878,"y":-0.0000019681956,"z":-16.510424},{"x":-1.7133785,"y":-0.0000020135353,"z":-16.890762},{"x":-1.7996991,"y":-0.0000020598623,"z":-17.279379},{"x":-1.8887396,"y":-0.0000021066526,"z":-17.671886},{"x":-1.9791901,"y":-0.0000021533833,"z":-18.06389},{"x":-2.0697408,"y":-0.000002199531,"z":-18.451006},{"x":-2.1590805,"y":-0.0000022445718,"z":-18.828835},{"x":-2.2458997,"y":-0.0000022879826,"z":-19.192991},{"x":-2.3288884,"y":-0.0000023292396,"z":-19.539082},{"x":-2.4067364,"y":-0.00000236782,"z":-19.862715},{"x":-2.4781334,"y":-0.0000024031995,"z":-20.1595},{"x":-2.5417693,"y":-0.0000024348553,"z":-20.425049},{"x":-2.596334,"y":-0.0000024622636,"z":-20.654968},{"x":-2.6405172,"y":-0.0000024849012,"z":-20.844864}],"GeneratedEstimatedPathLength":21.072454,"GeneratedLastYRot":14.72,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"curve_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":-3.0517577e-7},{"x":0.13288085,"y":0.17773588,"z":-5.359034},{"x":0.64437985,"y":0.34707394,"z":-10.626655},{"x":1.483833,"y":0.48889223,"z":-15.792166},{"x":2.6405225,"y":0.63999754,"z":-20.84488}],"EstimatedPathLength":21.079552,"SourceLastYRot":345.28,"GeneratedPath":[{"x":0,"y":0,"z":-3.0517577e-7},{"x":0.004214975,"y":0.0067055537,"z":-0.20184836},{"x":0.008146799,"y":0.014862854,"z":-0.44689375},{"x":0.012013907,"y":0.024306446,"z":-0.73029155},{"x":0.016034728,"y":0.03487088,"z":-1.0471971},{"x":0.020427698,"y":0.046390705,"z":-1.3927652},{"x":0.025411252,"y":0.05870047,"z":-1.7621514},{"x":0.031203818,"y":0.07163471,"z":-2.1505105},{"x":0.03802383,"y":0.08502799,"z":-2.552998},{"x":0.04608973,"y":0.09871485,"z":-2.9647686},{"x":0.05561994,"y":0.112529844,"z":-3.380978},{"x":0.0668329,"y":0.1263075,"z":-3.796781},{"x":0.07994704,"y":0.13988239,"z":-4.207334},{"x":0.0951808,"y":0.15308905,"z":-4.6077895},{"x":0.1127526,"y":0.16576204,"z":-4.9933047},{"x":0.13288085,"y":0.17773588,"z":-5.359034},{"x":0.15530665,"y":0.18932602,"z":-5.713075},{"x":0.17959535,"y":0.20094682,"z":-6.066748},{"x":0.20570184,"y":0.21258128,"z":-6.4200425},{"x":0.23358122,"y":0.22421242,"z":-6.7729506},{"x":0.2631883,"y":0.23582321,"z":-7.125461},{"x":0.29447818,"y":0.24739671,"z":-7.477566},{"x":0.32740575,"y":0.25891587,"z":-7.829254},{"x":0.36192602,"y":0.27036372,"z":-8.180518},{"x":0.39799398,"y":0.28172326,"z":-8.531347},{"x":0.43556446,"y":0.29297745,"z":-8.881731},{"x":0.47459257,"y":0.3041094,"z":-9.231662},{"x":0.5150331,"y":0.31510198,"z":-9.581129},{"x":0.5568413,"y":0.32593828,"z":-9.930124},{"x":0.59997183,"y":0.33660126,"z":-10.278635},{"x":0.64437985,"y":0.34707394,"z":-10.626655},{"x":0.6901627,"y":0.35730836,"z":-10.974222},{"x":0.7374411,"y":0.36728954,"z":-11.321372},{"x":0.78620565,"y":0.37705028,"z":-11.668097},{"x":0.836447,"y":0.3866233,"z":-12.014388},{"x":0.8881553,"y":0.39604127,"z":-12.360234},{"x":0.94132113,"y":0.40533692,"z":-12.705626},{"x":0.995935,"y":0.41454297,"z":-13.050554},{"x":1.0519876,"y":0.4236922,"z":-13.395011},{"x":1.1094689,"y":0.43281722,"z":-13.738985},{"x":1.1683699,"y":0.4419508,"z":-14.082466},{"x":1.2286808,"y":0.45112568,"z":-14.425447},{"x":1.2903922,"y":0.46037453,"z":-14.767918},{"x":1.3534942,"y":0.46973008,"z":-15.109867},{"x":1.4179776,"y":0.4792251,"z":-15.451286},{"x":1.4838332,"y":0.48889226,"z":-15.792167},{"x":1.5541332,"y":0.49900967,"z":-16.142769},{"x":1.6310838,"y":0.5097386,"z":-16.510435},{"x":1.7133751,"y":0.52093667,"z":-16.890772},{"x":1.7996963,"y":0.53246105,"z":-17.27939},{"x":1.8887377,"y":0.54416925,"z":-17.671898},{"x":1.9791889,"y":0.55591875,"z":-18.063904},{"x":2.0697403,"y":0.567567,"z":-18.451017},{"x":2.159081,"y":0.5789713,"z":-18.828848},{"x":2.245901,"y":0.58998924,"z":-19.193005},{"x":2.3288906,"y":0.6004781,"z":-19.539093},{"x":2.4067395,"y":0.6102955,"z":-19.862728},{"x":2.478137,"y":0.61929864,"z":-20.159515},{"x":2.5417736,"y":0.6273451,"z":-20.425062},{"x":2.596339,"y":0.63429224,"z":-20.654982},{"x":2.6405225,"y":0.63999754,"z":-20.844877}],"GeneratedEstimatedPathLength":21.082253,"GeneratedLastYRot":345.28,"GeneratedSmoothing":5}],"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"curve_d":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.13288085,"y":-0.3173505,"z":-5.3590255},{"x":-0.64438474,"y":-0.6384681,"z":-10.626642},{"x":-1.4838378,"y":-0.9479207,"z":-15.792155},{"x":-2.6399999,"y":-1.2800026,"z":-20.880001}],"EstimatedPathLength":21.142717,"SourceLastYRot":15.000001,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0042149653,"y":-0.01193397,"z":-0.20184775},{"x":-0.008146762,"y":-0.02639335,"z":-0.4468927},{"x":-0.012013828,"y":-0.043099403,"z":-0.7302901},{"x":-0.0160346,"y":-0.06177338,"z":-1.047195},{"x":-0.020427518,"y":-0.08213654,"z":-1.3927625},{"x":-0.025411017,"y":-0.10391016,"z":-1.7621483},{"x":-0.031203534,"y":-0.12681548,"z":-2.1505067},{"x":-0.03802351,"y":-0.15057376,"z":-2.5529935},{"x":-0.046089374,"y":-0.17490625,"z":-2.9647636},{"x":-0.055619575,"y":-0.19953425,"z":-3.3809724},{"x":-0.06683254,"y":-0.22417897,"z":-3.7967749},{"x":-0.079946734,"y":-0.24856173,"z":-4.207327},{"x":-0.095180556,"y":-0.27240372,"z":-4.6077824},{"x":-0.11275245,"y":-0.29542625,"z":-4.9932966},{"x":-0.13288085,"y":-0.3173505,"z":-5.3590255},{"x":-0.15530685,"y":-0.33867317,"z":-5.713066},{"x":-0.1795958,"y":-0.36006746,"z":-6.0667386},{"x":-0.20570259,"y":-0.3815196,"z":-6.420033},{"x":-0.23358229,"y":-0.40301594,"z":-6.7729406},{"x":-0.26318973,"y":-0.4245427,"z":-7.1254506},{"x":-0.29448003,"y":-0.44608626,"z":-7.4775553},{"x":-0.327408,"y":-0.46763277,"z":-7.829243},{"x":-0.3619287,"y":-0.48916867,"z":-8.180507},{"x":-0.39799702,"y":-0.51068014,"z":-8.531336},{"x":-0.43556786,"y":-0.5321535,"z":-8.881719},{"x":-0.47459638,"y":-0.553575,"z":-9.231649},{"x":-0.5150373,"y":-0.57493085,"z":-9.581116},{"x":-0.5568457,"y":-0.5962075,"z":-9.930111},{"x":-0.59997654,"y":-0.6173911,"z":-10.278622},{"x":-0.64438474,"y":-0.6384681,"z":-10.626642},{"x":-0.69016886,"y":-0.6593901,"z":-10.974136},{"x":-0.7374503,"y":-0.68013823,"z":-11.321089},{"x":-0.7862193,"y":-0.70074314,"z":-11.667522},{"x":-0.836466,"y":-0.7212352,"z":-12.01346},{"x":-0.8881801,"y":-0.741645,"z":-12.358921},{"x":-0.94135165,"y":-0.7620028,"z":-12.703928},{"x":-0.99597085,"y":-0.78233933,"z":-13.048503},{"x":-1.0520278,"y":-0.8026851,"z":-13.392669},{"x":-1.1095121,"y":-0.8230703,"z":-13.736444},{"x":-1.168414,"y":-0.84352565,"z":-14.079853},{"x":-1.2287238,"y":-0.8640817,"z":-14.422918},{"x":-1.2904308,"y":-0.88476866,"z":-14.765659},{"x":-1.3535256,"y":-0.9056172,"z":-15.108098},{"x":-1.417998,"y":-0.92665774,"z":-15.450256},{"x":-1.4838381,"y":-0.94792074,"z":-15.792156},{"x":-1.5541172,"y":-0.9700912,"z":-16.144154},{"x":-1.6310407,"y":-0.99362344,"z":-16.51362},{"x":-1.7132999,"y":-1.0182022,"z":-16.896103},{"x":-1.7995846,"y":-1.0435121,"z":-17.287146},{"x":-1.8885863,"y":-1.0692378,"z":-17.682297},{"x":-1.9789956,"y":-1.095064,"z":-18.077103},{"x":-2.0695033,"y":-1.1206758,"z":-18.467112},{"x":-2.1588001,"y":-1.1457573,"z":-18.847866},{"x":-2.2455769,"y":-1.1699935,"z":-19.214916},{"x":-2.328524,"y":-1.1930691,"z":-19.563807},{"x":-2.4063334,"y":-1.2146689,"z":-19.890085},{"x":-2.4776945,"y":-1.2344773,"z":-20.189297},{"x":-2.5412989,"y":-1.2521793,"z":-20.45699},{"x":-2.595837,"y":-1.2674594,"z":-20.68871},{"x":-2.6399996,"y":-1.2800025,"z":-20.880001}],"GeneratedEstimatedPathLength":21.145382,"GeneratedLastYRot":15.000001,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"curve_water_a":{"DeathType":7,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.11676727,"y":0.2952315,"z":-4.0220995},{"x":-0.47006163,"y":0.4086942,"z":-7.8479505},{"x":-0.74709046,"y":0.6051087,"z":-10.555865},{"x":-0.97448075,"y":0.7310288,"z":-13.157182},{"x":-1.8582312,"y":1.1779256,"z":-17.220062},{"x":-2.6405199,"y":1.2799976,"z":-20.84488}],"EstimatedPathLength":21.11332,"SourceLastYRot":15.000001,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0039033347,"y":0.011486454,"z":-0.15175717},{"x":-0.007899823,"y":0.02598105,"z":-0.3363889},{"x":-0.012095917,"y":0.04305979,"z":-0.5501456},{"x":-0.01659807,"y":0.062298663,"z":-0.78927755},{"x":-0.021512736,"y":0.08327368,"z":-1.0500351},{"x":-0.02694637,"y":0.10556084,"z":-1.3286688},{"x":-0.03300542,"y":0.12873614,"z":-1.6214287},{"x":-0.03979634,"y":0.15237558,"z":-1.9245654},{"x":-0.047425587,"y":0.17605513,"z":-2.2343287},{"x":-0.055999614,"y":0.19935086,"z":-2.5469704},{"x":-0.06562488,"y":0.22183868,"z":-2.858739},{"x":-0.07640783,"y":0.24309468,"z":-3.1658864},{"x":-0.088454895,"y":0.2626948,"z":-3.4646616},{"x":-0.10187258,"y":0.28021508,"z":-3.7513163},{"x":-0.11676728,"y":0.2952315,"z":-4.0220995},{"x":-0.13361037,"y":0.30790165,"z":-4.2851734},{"x":-0.15261684,"y":0.3188227,"z":-4.5506525},{"x":-0.17350866,"y":0.32823002,"z":-4.8177166},{"x":-0.19600779,"y":0.33635882,"z":-5.0855474},{"x":-0.21983618,"y":0.34344447,"z":-5.353325},{"x":-0.24471581,"y":0.34972227,"z":-5.6202307},{"x":-0.27036864,"y":0.35542747,"z":-5.8854446},{"x":-0.29651666,"y":0.36079547,"z":-6.1481485},{"x":-0.32288173,"y":0.3660615,"z":-6.4075217},{"x":-0.34918588,"y":0.37146094,"z":-6.6627455},{"x":-0.3751511,"y":0.37722903,"z":-6.913001},{"x":-0.40049928,"y":0.3836011,"z":-7.157469},{"x":-0.4249525,"y":0.39081246,"z":-7.3953285},{"x":-0.4482326,"y":0.3990984,"z":-7.625763},{"x":-0.47006166,"y":0.4086942,"z":-7.8479505},{"x":-0.4908477,"y":0.41952604,"z":-8.061161},{"x":-0.51120013,"y":0.43127215,"z":-8.265807},{"x":-0.5311426,"y":0.4437961,"z":-8.462787},{"x":-0.55069876,"y":0.45696154,"z":-8.653001},{"x":-0.56989235,"y":0.47063202,"z":-8.837347},{"x":-0.5887469,"y":0.4846712,"z":-9.016725},{"x":-0.6072862,"y":0.49894264,"z":-9.192033},{"x":-0.62553394,"y":0.51330996,"z":-9.36417},{"x":-0.6435136,"y":0.52763677,"z":-9.534035},{"x":-0.66124904,"y":0.5417867,"z":-9.702528},{"x":-0.67876387,"y":0.5556233,"z":-9.870547},{"x":-0.69608176,"y":0.56901014,"z":-10.038991},{"x":-0.7132263,"y":0.58181095,"z":-10.208759},{"x":-0.7302214,"y":0.59388924,"z":-10.380751},{"x":-0.74709046,"y":0.6051087,"z":-10.555865},{"x":-0.7623299,"y":0.6148846,"z":-10.729351},{"x":-0.7748384,"y":0.62295526,"z":-10.896786},{"x":-0.78524363,"y":0.6296687,"z":-11.0595665},{"x":-0.7941732,"y":0.6353729,"z":-11.219084},{"x":-0.80225456,"y":0.64041585,"z":-11.376736},{"x":-0.8101153,"y":0.6451454,"z":-11.533912},{"x":-0.818383,"y":0.6499097,"z":-11.692009},{"x":-0.8276851,"y":0.6550566,"z":-11.85242},{"x":-0.8386494,"y":0.66093415,"z":-12.016539},{"x":-0.8519032,"y":0.6678902,"z":-12.18576},{"x":-0.86807424,"y":0.6762729,"z":-12.361477},{"x":-0.88778985,"y":0.6864301,"z":-12.545083},{"x":-0.9116779,"y":0.69870985,"z":-12.737973},{"x":-0.9403656,"y":0.71345997,"z":-12.941541},{"x":-0.9744808,"y":0.73102885,"z":-13.157182},{"x":-1.0145491,"y":0.7522169,"z":-13.386509},{"x":-1.0602292,"y":0.7771989,"z":-13.629087},{"x":-1.1108471,"y":0.8053828,"z":-13.883226},{"x":-1.1657296,"y":0.8361771,"z":-14.14724},{"x":-1.2242031,"y":0.86898977,"z":-14.419437},{"x":-1.2855933,"y":0.9032288,"z":-14.698129},{"x":-1.3492273,"y":0.93830276,"z":-14.981629},{"x":-1.414431,"y":0.9736195,"z":-15.268248},{"x":-1.4805312,"y":1.0085875,"z":-15.556296},{"x":-1.5468538,"y":1.0426146,"z":-15.844086},{"x":-1.6127257,"y":1.0751092,"z":-16.12993},{"x":-1.677473,"y":1.1054794,"z":-16.412136},{"x":-1.7404222,"y":1.1331334,"z":-16.689022},{"x":-1.8008994,"y":1.1574794,"z":-16.958893},{"x":-1.8582314,"y":1.1779257,"z":-17.220062},{"x":-1.9149525,"y":1.1949548,"z":-17.481955},{"x":-1.9736437,"y":1.2095883,"z":-17.753233},{"x":-2.033699,"y":1.222042,"z":-18.03106},{"x":-2.0945144,"y":1.2325314,"z":-18.312605},{"x":-2.1554835,"y":1.2412726,"z":-18.595036},{"x":-2.216002,"y":1.2484813,"z":-18.875523},{"x":-2.275464,"y":1.2543731,"z":-19.151226},{"x":-2.333265,"y":1.259164,"z":-19.41932},{"x":-2.3887994,"y":1.2630695,"z":-19.676966},{"x":-2.4414623,"y":1.2663058,"z":-19.921337},{"x":-2.4906483,"y":1.2690883,"z":-20.149595},{"x":-2.5357523,"y":1.271633,"z":-20.358913},{"x":-2.5761688,"y":1.2741556,"z":-20.546453},{"x":-2.6112933,"y":1.2768718,"z":-20.709387},{"x":-2.64052,"y":1.2799976,"z":-20.84488}],"GeneratedEstimatedPathLength":21.117401,"GeneratedLastYRot":15.000001,"GeneratedSmoothing":5}],"CollisionInfo":{"Trigger":2,"DeathType":7,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"gap_large_a":{"DeathType":0,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002},{"x":-0.0000015557662,"y":-9.619341e-7,"z":-10.880001},{"x":-0.0000015557662,"y":-0.0000012671098,"z":-13.4400015}],"EstimatedPathLength":13.4400015,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-5.4066696e-8,"y":4.558964e-8,"z":-0.4503704},{"x":-1.4536262e-7,"y":9.450005e-8,"z":-1.1851853},{"x":-3.3506302e-7,"y":2.988726e-8,"z":-2.5600004},{"x":-7.2157235e-7,"y":-2.5046907e-7,"z":-5.120001},{"x":-0.0000012064862,"y":-6.443487e-7,"z":-8.320002},{"x":-0.0000015557662,"y":-9.619341e-7,"z":-10.880001},{"x":-0.0000016461886,"y":-0.0000011258248,"z":-12.254816},{"x":-0.0000016009775,"y":-0.0000012134215,"z":-12.989631},{"x":-0.0000015557664,"y":-0.0000012671096,"z":-13.4400015}],"GeneratedEstimatedPathLength":13.4400015,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"gap_small_a":{"DeathType":0,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002},{"x":-3.35063e-7,"y":-5.041704e-7,"z":-7.0400014},{"x":-3.35063e-7,"y":-8.093461e-7,"z":-9.6}],"EstimatedPathLength":9.6,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-9.9277926e-8,"y":2.8635426e-8,"z":-0.5925926},{"x":-2.3578508e-7,"y":6.059162e-8,"z":-1.4696298},{"x":-3.35063e-7,"y":2.9887268e-8,"z":-2.5600002},{"x":-3.5988248e-7,"y":-1.1483536e-7,"z":-3.982223},{"x":-3.4747274e-7,"y":-3.222186e-7,"z":-5.6177793},{"x":-3.35063e-7,"y":-5.041704e-7,"z":-7.0400014},{"x":-3.35063e-7,"y":-6.341527e-7,"z":-8.130372},{"x":-3.35063e-7,"y":-7.387036e-7,"z":-9.007408},{"x":-3.35063e-7,"y":-8.093461e-7,"z":-9.6}],"GeneratedEstimatedPathLength":9.6,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":6,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"hill_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.026258452,"y":0.3246748,"z":-3.255033},{"x":0.035417903,"y":1.3145912,"z":-6.3675466},{"x":0.16867359,"y":2.8281555,"z":-9.269829},{"x":0.35836384,"y":3.660394,"z":-12.421686},{"x":0.6832246,"y":3.8387115,"z":-15.673509},{"x":1.2691972,"y":3.579331,"z":-18.882788},{"x":2.0457506,"y":2.6381323,"z":-21.910143},{"x":2.9494693,"y":1.1780084,"z":-24.700035},{"x":3.984855,"y":0.29238075,"z":-27.672049},{"x":5.139073,"y":-0.0000034229959,"z":-30.720003}],"EstimatedPathLength":32.70658,"SourceLastYRot":340.00003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.010064592,"y":0.059536368,"z":-0.849176},{"x":-0.02304679,"y":0.15514772,"z":-2.0600224},{"x":-0.02625845,"y":0.32467484,"z":-3.2550333},{"x":-0.014864438,"y":0.5859754,"z":-4.310881},{"x":0.0063001085,"y":0.92119175,"z":-5.350893},{"x":0.03541792,"y":1.3145914,"z":-6.367547},{"x":0.07244414,"y":1.8055584,"z":-7.341304},{"x":0.117423624,"y":2.3547084,"z":-8.291701},{"x":0.1686736,"y":2.8281558,"z":-9.269829},{"x":0.22271703,"y":3.1802564,"z":-10.298259},{"x":0.283031,"y":3.456654,"z":-11.354419},{"x":0.35836393,"y":3.6603942,"z":-12.421687},{"x":0.44696742,"y":3.784483,"z":-13.499799},{"x":0.55058986,"y":3.835914,"z":-14.589019},{"x":0.6832246,"y":3.8387115,"z":-15.673509},{"x":0.8521488,"y":3.8099258,"z":-16.753159},{"x":1.0500854,"y":3.7325068,"z":-17.828081},{"x":1.2691973,"y":3.5793307,"z":-18.882788},{"x":1.5092218,"y":3.3353221,"z":-19.914179},{"x":1.7704214,"y":3.0155566,"z":-20.925352},{"x":2.045751,"y":2.6381319,"z":-21.910145},{"x":2.332694,"y":2.1685855,"z":-22.850952},{"x":2.6337671,"y":1.6413801,"z":-23.765377},{"x":2.94947,"y":1.1780076,"z":-24.700037},{"x":3.280444,"y":0.8182715,"z":-25.674404},{"x":3.626048,"y":0.5223678,"z":-26.66901},{"x":3.9848554,"y":0.29238054,"z":-27.67205},{"x":4.4035416,"y":0.14014614,"z":-28.795298},{"x":4.8354306,"y":0.053827807,"z":-29.92698},{"x":5.139073,"y":-0.0000034868717,"z":-30.720001}],"GeneratedEstimatedPathLength":32.74007,"GeneratedLastYRot":340.00003,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"hill_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.28488812,"y":0.28196338,"z":-2.9014976},{"x":-1.0187148,"y":1.1275271,"z":-5.613802},{"x":-2.0078952,"y":2.3123934,"z":-8.116951},{"x":-2.98852,"y":3.360237,"z":-10.680255},{"x":-3.84,"y":3.8399987,"z":-13.4400015},{"x":-4.494441,"y":3.8399985,"z":-15.88241}],"EstimatedPathLength":17.198086,"SourceLastYRot":15.000001,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.057232533,"y":0.052227527,"z":-0.7592473},{"x":-0.1461193,"y":0.13578433,"z":-1.8408833},{"x":-0.28488815,"y":0.2819634,"z":-2.9014976},{"x":-0.48678476,"y":0.509503,"z":-3.82736},{"x":-0.73856354,"y":0.7996651,"z":-4.7322006},{"x":-1.0187148,"y":1.1275272,"z":-5.613802},{"x":-1.3298434,"y":1.502424,"z":-6.46145},{"x":-1.6693447,"y":1.915021,"z":-7.2858586},{"x":-2.0078952,"y":2.3123934,"z":-8.116951},{"x":-2.340187,"y":2.6928647,"z":-8.959655},{"x":-2.671528,"y":3.058111,"z":-9.809041},{"x":-2.98852,"y":3.360237,"z":-10.680255},{"x":-3.2892106,"y":3.5800066,"z":-11.597372},{"x":-3.575552,"y":3.7366562,"z":-12.536317},{"x":-3.84,"y":3.8399987,"z":-13.4400015},{"x":-4.096981,"y":3.8755367,"z":-14.368104},{"x":-4.332069,"y":3.8577678,"z":-15.260947},{"x":-4.494441,"y":3.839999,"z":-15.88241}],"GeneratedEstimatedPathLength":17.212423,"GeneratedLastYRot":15.000001,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"jump_or_slide_a":{"DeathType":2,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"EstimatedPathLength":7.6800013,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"GeneratedEstimatedPathLength":7.6800013,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":2,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"jump_over_a":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-6.5675823e-7,"z":-8.320001}],"EstimatedPathLength":8.320001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-6.5675823e-7,"z":-8.320001}],"GeneratedEstimatedPathLength":8.320001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"jump_over_b":{"DeathType":6,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"EstimatedPathLength":7.6800013,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"GeneratedEstimatedPathLength":7.6800013,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":6,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"junction_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":-7.121442e-8,"y":0,"z":-7.121441e-8},{"x":-3.7639018e-7,"y":0,"z":-2.5599997},{"x":2.5599995,"y":0,"z":-2.56}],"EstimatedPathLength":5.12,"SourceLastYRot":270.00003,"GeneratedPath":[{"x":-7.121442e-8,"y":0,"z":-7.121441e-8},{"x":-3.7639018e-7,"y":0,"z":-2.5599997},{"x":2.5599995,"y":0,"z":-2.56}],"GeneratedEstimatedPathLength":5.12,"GeneratedLastYRot":270.00003,"GeneratedSmoothing":1},{"SourcePath":[{"x":-7.121441e-8,"y":0,"z":0},{"x":-3.7639018e-7,"y":0,"z":-2.5599997},{"x":-2.56,"y":0,"z":-2.5599995}],"EstimatedPathLength":5.119999,"SourceLastYRot":90.00003,"GeneratedPath":[{"x":-7.121441e-8,"y":0,"z":0},{"x":-3.7639018e-7,"y":0,"z":-2.5599997},{"x":-2.56,"y":0,"z":-2.5599995}],"GeneratedEstimatedPathLength":5.119999,"GeneratedLastYRot":90.00003,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"junction_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":-3.0517577e-7,"z":-2.5600002},{"x":2.56,"y":-3.0517577e-7,"z":-2.5600002}],"EstimatedPathLength":5.12,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":-3.0517577e-7,"z":-2.5600002},{"x":2.56,"y":-3.0517577e-7,"z":-2.5600002}],"GeneratedEstimatedPathLength":5.12,"GeneratedLastYRot":270,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":8.48942e-15,"z":7.121442e-8},{"x":0,"y":-3.0517577e-7,"z":-2.5600002},{"x":-2.56,"y":-3.0517577e-7,"z":-2.5600002}],"EstimatedPathLength":5.12,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":8.48942e-15,"z":7.121442e-8},{"x":0,"y":-3.0517577e-7,"z":-2.5600002},{"x":-2.56,"y":-3.0517577e-7,"z":-2.5600002}],"GeneratedEstimatedPathLength":5.12,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"ledge_end_left_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-3.0517577e-7,"z":-2.5600004}],"EstimatedPathLength":2.5600004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-3.0517577e-7,"z":-2.5600004}],"GeneratedEstimatedPathLength":2.5600004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_end_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600002,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600002,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_left_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0893518,"y":-2.9423802e-7,"z":-5.118961}],"EstimatedPathLength":5.1197405,"SourceLastYRot":2,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0893518,"y":-2.9423802e-7,"z":-5.118961}],"GeneratedEstimatedPathLength":5.1197405,"GeneratedLastYRot":2,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_left_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.08935188,"y":-2.751645e-7,"z":-5.1189604}],"EstimatedPathLength":5.11974,"SourceLastYRot":2,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.08935188,"y":-2.751645e-7,"z":-5.1189604}],"GeneratedEstimatedPathLength":5.11974,"GeneratedLastYRot":2,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.08935139,"y":-2.7516455e-7,"z":-5.118961}],"EstimatedPathLength":5.1197405,"SourceLastYRot":358.00003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.08935139,"y":-2.7516455e-7,"z":-5.118961}],"GeneratedEstimatedPathLength":5.1197405,"GeneratedLastYRot":358.00003,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_right_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.08935132,"y":-3.5145854e-7,"z":-5.1189613}],"EstimatedPathLength":5.119741,"SourceLastYRot":358.00003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.08935132,"y":-3.5145854e-7,"z":-5.1189613}],"GeneratedEstimatedPathLength":5.119741,"GeneratedLastYRot":358.00003,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_start_left_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":2.9887275e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600002,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":2.9887275e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600002,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"ledge_start_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":2.9887275e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600002,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":2.9887275e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600002,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"run_between_a":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-6.5675823e-7,"z":-8.320001}],"EstimatedPathLength":8.320001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-6.5675823e-7,"z":-8.320001}],"GeneratedEstimatedPathLength":8.320001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":11,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"slide_under_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-8.856401e-7,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-8.856401e-7,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"stairs_twist_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":-1.3921845e-8},{"x":-0.09798241,"y":0.15999982,"z":-1.5664097},{"x":-0.6859201,"y":1.5953863,"z":-4.39603}],"EstimatedPathLength":4.8044863,"SourceLastYRot":14.994832,"GeneratedPath":[{"x":0,"y":0,"z":-1.3921845e-8},{"x":-0.0072563533,"y":-0.005755108,"z":-0.35932064},{"x":-0.02539964,"y":0.00626754,"z":-0.89268684},{"x":-0.09798241,"y":0.15999982,"z":-1.5664097},{"x":-0.27944416,"y":0.5971514,"z":-2.5208461},{"x":-0.5153454,"y":1.1760126,"z":-3.6156392},{"x":-0.6859202,"y":1.5953864,"z":-4.3960304}],"GeneratedEstimatedPathLength":4.816329,"GeneratedLastYRot":14.994832,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"stairs_up_end_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":0.63999987,"z":-1.2800002},{"x":-3.9098023e-7,"y":0.63999975,"z":-2.5600002}],"EstimatedPathLength":2.7110837,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-9.720692e-8,"y":0.18962961,"z":-0.33185193},{"x":-2.3164306e-7,"y":0.4503703,"z":-0.8059261},{"x":-3.35063e-7,"y":0.63999987,"z":-1.2800002},{"x":-3.7645054e-7,"y":0.68740726,"z":-1.7540743},{"x":-3.868219e-7,"y":0.6637035,"z":-2.2281485},{"x":-3.9098023e-7,"y":0.63999975,"z":-2.5600004}],"GeneratedEstimatedPathLength":2.7176538,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"stairs_up_middle_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9098023e-7,"y":1.2799997,"z":-2.5600004}],"EstimatedPathLength":2.8621674,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9098023e-7,"y":1.2799997,"z":-2.5600004}],"GeneratedEstimatedPathLength":2.8621674,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"stairs_up_middle_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9098023e-7,"y":1.2799997,"z":-2.5600004}],"EstimatedPathLength":2.8621674,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9098023e-7,"y":1.2799997,"z":-2.5600004}],"GeneratedEstimatedPathLength":2.8621674,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"stairs_up_start_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":1.8247518e-7,"z":-1.2800001},{"x":-3.9098023e-7,"y":0.63999975,"z":-2.5600002}],"EstimatedPathLength":2.7110834,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-9.720692e-8,"y":-0.023703635,"z":-0.3318519},{"x":-2.3164306e-7,"y":-0.047407247,"z":-0.805926},{"x":-3.35063e-7,"y":1.8247518e-7,"z":-1.2800001},{"x":-3.7645054e-7,"y":0.18962972,"z":-1.7540742},{"x":-3.868219e-7,"y":0.4503703,"z":-2.2281485},{"x":-3.9098023e-7,"y":0.63999975,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.7176533,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"EstimatedPathLength":7.6800013,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"GeneratedEstimatedPathLength":7.6800013,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_d":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-8.856401e-7,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-8.856401e-7,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_e":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_f":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"straight_organic_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.055394217,"y":-0.030083584,"z":-3.8400004},{"x":0.36443958,"y":-0.09259369,"z":-7.6800013},{"x":0.280519,"y":-0.17153561,"z":-11.505611},{"x":0.057076167,"y":-0.27674162,"z":-14.780917},{"x":-0.24506778,"y":-0.31609866,"z":-17.67814},{"x":-0.64,"y":-0.32000247,"z":-20.480001}],"EstimatedPathLength":20.548151,"SourceLastYRot":10.000003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0049669775,"y":-0.006598465,"z":-0.9955557},{"x":0.01608887,"y":-0.016539551,"z":-2.417778},{"x":0.05539422,"y":-0.030083586,"z":-3.8400004},{"x":0.15417466,"y":-0.047909737,"z":-5.1205335},{"x":0.2811386,"y":-0.06933884,"z":-6.401067},{"x":0.36443958,"y":-0.0925937,"z":-7.6800013},{"x":0.37074214,"y":-0.116717756,"z":-8.976652},{"x":0.3333818,"y":-0.14266756,"z":-10.271705},{"x":0.280519,"y":-0.17153561,"z":-11.505611},{"x":0.21928787,"y":-0.20709766,"z":-12.652147},{"x":0.14255433,"y":-0.2455779,"z":-13.737537},{"x":0.057076138,"y":-0.27674162,"z":-14.780917},{"x":-0.034372147,"y":-0.2960514,"z":-15.778196},{"x":-0.1345651,"y":-0.30804467,"z":-16.733465},{"x":-0.24506773,"y":-0.31609866,"z":-17.67814},{"x":-0.38446575,"y":-0.32017067,"z":-18.72293},{"x":-0.5341736,"y":-0.32030344,"z":-19.757126},{"x":-0.64,"y":-0.32000244,"z":-20.480005}],"GeneratedEstimatedPathLength":20.549984,"GeneratedLastYRot":10.000003,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"straight_organic_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0049774167,"y":-6.012149e-7,"z":-3.7633564},{"x":-0.06799194,"y":-0.0000010604064,"z":-7.6153345},{"x":-0.027456664,"y":-0.0000016847189,"z":-11.572447},{"x":0.38723174,"y":-0.000001972629,"z":-15.267613},{"x":0.82532775,"y":-0.0000025680818,"z":-18.982634},{"x":1.4716306,"y":-0.0000027019564,"z":-22.665655},{"x":1.92,"y":-0.0000029754638,"z":-24.960003}],"EstimatedPathLength":25.109346,"SourceLastYRot":350.00003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.00085908134,"y":-1.6113061e-7,"z":-0.9724028},{"x":0.0011651163,"y":-3.8906293e-7,"z":-2.3629563},{"x":-0.004977418,"y":-6.012149e-7,"z":-3.7633567},{"x":-0.025518391,"y":-7.5868337e-7,"z":-5.036891},{"x":-0.052507933,"y":-9.0037145e-7,"z":-6.320272},{"x":-0.06799194,"y":-0.0000010604064,"z":-7.615335},{"x":-0.07600807,"y":-0.0000012687387,"z":-8.936286},{"x":-0.07251865,"y":-0.0000014954179,"z":-10.26892},{"x":-0.027456656,"y":-0.0000016847189,"z":-11.572447},{"x":0.08219082,"y":-0.0000017942172,"z":-12.822837},{"x":0.23341092,"y":-0.0000018663374,"z":-14.044122},{"x":0.38723183,"y":-0.000001972629,"z":-15.267614},{"x":0.52381855,"y":-0.000002165428,"z":-16.505669},{"x":0.6630062,"y":-0.0000023923983,"z":-17.74593},{"x":0.8253278,"y":-0.0000025680818,"z":-18.982634},{"x":1.0326703,"y":-0.000002641726,"z":-20.26411},{"x":1.2631466,"y":-0.0000026640837,"z":-21.54203},{"x":1.4716306,"y":-0.0000027019564,"z":-22.665655},{"x":1.6523551,"y":-0.0000027929123,"z":-23.618279},{"x":1.8110869,"y":-0.0000028993832,"z":-24.416605},{"x":1.9199998,"y":-0.0000029754642,"z":-24.960003}],"GeneratedEstimatedPathLength":25.110912,"GeneratedLastYRot":350.00003,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"straight_organic_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":-3.35063e-7,"y":-0.0000011908157,"z":-12.800001}],"EstimatedPathLength":12.800001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":-3.35063e-7,"y":-0.0000011908157,"z":-12.800001}],"GeneratedEstimatedPathLength":12.800001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"stumble_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600002,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600002,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":5,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"stumble_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600002,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":2.9887275e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600002,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":5,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"temple_opening":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":2.2411346e-7,"z":5.12},{"x":-3.35063e-7,"y":-5.1175064e-8,"z":-4.7683716e-7}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":2.2411346e-7,"z":5.12},{"x":-3.35063e-7,"y":-5.1175064e-8,"z":-4.7683716e-7}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"turn_left_a":{"DeathType":0,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":5.1199994,"y":-6.1035155e-7,"z":-5.1200004}],"EstimatedPathLength":10.24,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":5.1199994,"y":-6.1035155e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":10.24,"GeneratedLastYRot":270,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"turn_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004},{"x":-5.12,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":10.24,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004},{"x":-5.12,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":10.24,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"zipline_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.9575778e-7,"y":-4.892264e-7,"z":-6.4800014},{"x":8.8181594e-7,"y":-2.1773553,"z":-9.18841},{"x":4.7757834e-7,"y":-4.25224,"z":-11.976054},{"x":6.135008e-8,"y":-6.212002,"z":-14.845748},{"x":-3.671661e-7,"y":-8.042545,"z":-17.799486},{"x":-8.0811446e-7,"y":-9.728151,"z":-20.838205},{"x":-0.0000012614053,"y":-11.251753,"z":-23.961226},{"x":-0.0000017266545,"y":-12.595091,"z":-27.165842},{"x":-0.0000022030883,"y":-13.739566,"z":-30.446657},{"x":-0.0000026894977,"y":-14.666738,"z":-33.795303},{"x":-0.0000016761157,"y":-15.360006,"z":-37.200005},{"x":-0.0000014480023,"y":-15.360005,"z":-43.600002}],"EstimatedPathLength":47.628643,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.6457912e-7,"y":0.08064263,"z":-1.819689},{"x":-3.731313e-7,"y":0.1612852,"z":-4.3593783},{"x":-3.9575778e-7,"y":-5.2167155e-7,"z":-6.4800014},{"x":-3.156103e-8,"y":-0.5682951,"z":-7.6592464},{"x":5.185615e-7,"y":-1.3785181,"z":-8.419426},{"x":8.8181594e-7,"y":-2.1773555,"z":-9.18841},{"x":8.7209276e-7,"y":-2.880838,"z":-10.108717},{"x":6.755016e-7,"y":-3.5729349,"z":-11.0378275},{"x":4.7757834e-7,"y":-4.25224,"z":-11.976054},{"x":3.4017881e-7,"y":-4.918808,"z":-12.923429},{"x":2.0144714e-7,"y":-5.572583,"z":-13.879919},{"x":6.135003e-8,"y":-6.212002,"z":-14.845748},{"x":-8.011796e-8,"y":-6.8371224,"z":-15.820954},{"x":-2.229514e-7,"y":-7.4478865,"z":-16.8055},{"x":-3.6716605e-7,"y":-8.042545,"z":-17.799486},{"x":-5.127709e-7,"y":-8.62115,"z":-18.802975},{"x":-6.5975706e-7,"y":-9.183651,"z":-19.815908},{"x":-8.0811446e-7,"y":-9.728151,"z":-20.838205},{"x":-9.578544e-7,"y":-10.254696,"z":-21.869946},{"x":-0.0000011089655,"y":-10.76324,"z":-22.911053},{"x":-0.0000012614051,"y":-11.251753,"z":-23.961226},{"x":-0.0000014151883,"y":-11.72025,"z":-25.020565},{"x":-0.0000015703001,"y":-12.168718,"z":-26.08897},{"x":-0.0000017266547,"y":-12.595091,"z":-27.165842},{"x":-0.000001884268,"y":-12.999362,"z":-28.251291},{"x":-0.0000020431237,"y":-13.381536,"z":-29.345205},{"x":-0.0000022030883,"y":-13.739566,"z":-30.446657},{"x":-0.0000024200338,"y":-14.073382,"z":-31.555773},{"x":-0.0000026380876,"y":-14.383055,"z":-32.672424},{"x":-0.0000026894977,"y":-14.666738,"z":-33.795303},{"x":-0.0000024337155,"y":-14.94083,"z":-34.815113},{"x":-0.0000020112893,"y":-15.188934,"z":-35.841152},{"x":-0.0000016761156,"y":-15.360006,"z":-37.200005},{"x":-0.0000015334612,"y":-15.411359,"z":-39.348503},{"x":-0.0000014780587,"y":-15.385681,"z":-41.829803},{"x":-0.0000014480022,"y":-15.3600025,"z":-43.6}],"GeneratedEstimatedPathLength":47.70211,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":1,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":2.24,"z":0},"CameraFollowDistance":6,"CameraFocusDistance":3.2,"CameraPitchHeight":0.96,"CameraChangeRate":0.25,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"zipline_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-2.7975287e-7,"y":-4.831865e-7,"z":-6.400001},{"x":9.1850217e-7,"y":-3.0445836,"z":-9.896114},{"x":4.3808492e-7,"y":-5.866698,"z":-13.563462},{"x":-4.9161542e-8,"y":-8.490771,"z":-17.390146},{"x":-5.415404e-7,"y":-10.905275,"z":-21.361977},{"x":-0.0000010373557,"y":-13.125407,"z":-25.463531},{"x":-0.000001534971,"y":-15.096857,"z":-29.67855},{"x":-0.0000020328748,"y":-16.769758,"z":-33.99083},{"x":-0.00000252972,"y":-18.237179,"z":-38.384697},{"x":-0.0000030243434,"y":-19.547335,"z":-42.84555},{"x":-0.000002007882,"y":-20.480007,"z":-47.36},{"x":-0.0000020709672,"y":-20.480007,"z":-53.760002}],"EstimatedPathLength":59.18564,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.2726957e-7,"y":0.112762205,"z":-1.7668109},{"x":-2.8562278e-7,"y":0.22552435,"z":-4.2447333},{"x":-2.7975287e-7,"y":-5.285543e-7,"z":-6.400001},{"x":7.235647e-8,"y":-0.7975765,"z":-7.7741327},{"x":5.88689e-7,"y":-1.9334396,"z":-8.825611},{"x":9.1850217e-7,"y":-3.0445838,"z":-9.896114},{"x":8.829621e-7,"y":-4.0091023,"z":-11.099978},{"x":6.6090297e-7,"y":-4.948902,"z":-12.322868},{"x":4.3808492e-7,"y":-5.866698,"z":-13.563462},{"x":2.763653e-7,"y":-6.763821,"z":-14.821846},{"x":1.138871e-7,"y":-7.638939,"z":-16.09793},{"x":-4.91616e-8,"y":-8.490771,"z":-17.390146},{"x":-2.1278032e-7,"y":-9.318328,"z":-18.698534},{"x":-3.769695e-7,"y":-10.1226,"z":-20.023048},{"x":-5.415403e-7,"y":-10.905275,"z":-21.361977},{"x":-7.0649094e-7,"y":-11.668928,"z":-22.715351},{"x":-8.718233e-7,"y":-12.410985,"z":-24.08314},{"x":-0.0000010373557,"y":-13.125407,"z":-25.463531},{"x":-0.0000012030836,"y":-13.812036,"z":-26.856531},{"x":-0.0000013690114,"y":-14.471032,"z":-28.262138},{"x":-0.0000015349709,"y":-15.096857,"z":-29.678549},{"x":-0.0000017009568,"y":-15.6842165,"z":-31.10575},{"x":-0.0000018669747,"y":-16.238403,"z":-32.543755},{"x":-0.000002032875,"y":-16.769758,"z":-33.99083},{"x":-0.0000021986507,"y":-17.279943,"z":-35.44693},{"x":-0.0000023643086,"y":-17.767298,"z":-36.91209},{"x":-0.00000252972,"y":-18.237179,"z":-38.384697},{"x":-0.0000027507253,"y":-18.699528,"z":-39.8647},{"x":-0.0000029714838,"y":-19.144402,"z":-41.35215},{"x":-0.0000030243434,"y":-19.547335,"z":-42.84555},{"x":-0.000002757472,"y":-19.92073,"z":-44.27656},{"x":-0.000002322702,"y":-20.252186,"z":-45.713528},{"x":-0.000002007882,"y":-20.480007,"z":-47.36},{"x":-0.0000019512804,"y":-20.549093,"z":-49.590706},{"x":-0.0000020146283,"y":-20.51455,"z":-52.030907},{"x":-0.000002070967,"y":-20.480003,"z":-53.760006}],"GeneratedEstimatedPathLength":59.259087,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":10,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"zipline_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-2.7975287e-7,"y":-4.831865e-7,"z":-6.400001},{"x":-0.08971373,"y":-4.539918,"z":-14.362608},{"x":-0.8198828,"y":-9.821624,"z":-23.992931},{"x":-2.3304808,"y":-14.880877,"z":-33.673416},{"x":-4.740659,"y":-19.626894,"z":-43.36834},{"x":-8.187323,"y":-23.972643,"z":-52.977356},{"x":-12.785022,"y":-27.793566,"z":-62.36753},{"x":-18.59504,"y":-30.971836,"z":-71.36427},{"x":-25.588451,"y":-33.391224,"z":-79.7575},{"x":-33.63022,"y":-35.0057,"z":-87.37157},{"x":-42.757427,"y":-35.840015,"z":-94.24911},{"x":-48,"y":-35.840015,"z":-97.920006}],"EstimatedPathLength":122.29889,"SourceLastYRot":54.999996,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0033226376,"y":0.16814499,"z":-1.6013854},{"x":0.0066452445,"y":0.3362899,"z":-3.9138818},{"x":-2.810897e-7,"y":-5.5083655e-7,"z":-6.400001},{"x":0.00046123622,"y":-1.1495426,"z":-8.876688},{"x":-0.009045387,"y":-2.8035202,"z":-11.5269985},{"x":-0.08971375,"y":-4.5399184,"z":-14.362609},{"x":-0.25675753,"y":-6.2537785,"z":-17.447323},{"x":-0.49496302,"y":-8.05006,"z":-20.71734},{"x":-0.8198828,"y":-9.821624,"z":-23.992931},{"x":-1.2322884,"y":-11.536121,"z":-27.215511},{"x":-1.7314076,"y":-13.225901,"z":-30.443659},{"x":-2.330481,"y":-14.8808775,"z":-33.673416},{"x":-3.0288496,"y":-16.50091,"z":-36.90717},{"x":-3.8271723,"y":-18.08614,"z":-40.14253},{"x":-4.7406588,"y":-19.626894,"z":-43.36834},{"x":-5.7701397,"y":-21.124565,"z":-46.585815},{"x":-6.9147854,"y":-22.577763,"z":-49.793743},{"x":-8.187323,"y":-23.972643,"z":-52.977356},{"x":-9.589727,"y":-25.308964,"z":-56.1382},{"x":-11.120025,"y":-26.58697,"z":-59.274723},{"x":-12.785021,"y":-27.793566,"z":-62.367527},{"x":-14.588063,"y":-28.9287,"z":-65.41794},{"x":-16.525806,"y":-29.992426,"z":-68.42464},{"x":-18.595041,"y":-30.971836,"z":-71.36427},{"x":-20.799692,"y":-31.864325,"z":-74.23558},{"x":-23.135828,"y":-32.672493,"z":-77.039825},{"x":-25.588451,"y":-33.391224,"z":-79.7575},{"x":-28.151184,"y":-34.017902,"z":-82.380516},{"x":-30.830399,"y":-34.555145,"z":-84.91696},{"x":-33.630215,"y":-35.0057,"z":-87.37157},{"x":-36.73609,"y":-35.372494,"z":-89.8374},{"x":-39.962574,"y":-35.652603,"z":-92.2214},{"x":-42.757427,"y":-35.840015,"z":-94.24911},{"x":-44.986874,"y":-35.901817,"z":-95.84623},{"x":-46.784687,"y":-35.87092,"z":-97.08705},{"x":-47.999996,"y":-35.84002,"z":-97.92}],"GeneratedEstimatedPathLength":122.39681,"GeneratedLastYRot":54.999996,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":1,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":2.24,"z":0},"CameraFollowDistance":6,"CameraFocusDistance":3.2,"CameraPitchHeight":0.96,"CameraChangeRate":0.25,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"forest_entrance_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.015082931,"y":-3.12552e-7,"z":-2.6218767},{"x":-0.12380798,"y":-6.1251643e-7,"z":-5.138161},{"x":-0.20913406,"y":-9.2271597e-7,"z":-7.740304},{"x":0.08,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.260457,"SourceLastYRot":355,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.00044216285,"y":-8.1498186e-8,"z":-0.6836567},{"x":-0.002560208,"y":-1.977244e-7,"z":-1.658633},{"x":-0.015082931,"y":-3.12552e-7,"z":-2.6218767},{"x":-0.045254797,"y":-4.130935e-7,"z":-3.46528},{"x":-0.08583134,"y":-5.122364e-7,"z":-4.296951},{"x":-0.12380798,"y":-6.1251643e-7,"z":-5.138161},{"x":-0.16785218,"y":-7.156105e-7,"z":-6.002977},{"x":-0.20929646,"y":-8.198417e-7,"z":-6.8773317},{"x":-0.20913406,"y":-9.2271597e-7,"z":-7.740304},{"x":-0.1297851,"y":-0.0000010339862,"z":-8.673707},{"x":-0.008829549,"y":-0.0000011438996,"z":-9.595726},{"x":0.07999997,"y":-0.0000012207032,"z":-10.240002}],"GeneratedEstimatedPathLength":10.261935,"GeneratedLastYRot":355,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":14,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_exit_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.013495331,"y":-0.016208997,"z":-2.5908947},{"x":0.22796433,"y":-0.11344156,"z":-5.121109},{"x":0.4949115,"y":-0.23930138,"z":-7.6913843},{"x":0.8283406,"y":-0.32000124,"z":-10.208006}],"EstimatedPathLength":10.261609,"SourceLastYRot":355,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.012941567,"y":-0.0012014599,"z":-0.6739609},{"x":-0.027382616,"y":-0.0042039203,"z":-1.635799},{"x":-0.013495331,"y":-0.016208997,"z":-2.5908947},{"x":0.047161695,"y":-0.04155784,"z":-3.4373107},{"x":0.13614705,"y":-0.0759093,"z":-4.276984},{"x":0.22796433,"y":-0.11344156,"z":-5.121109},{"x":0.3125965,"y":-0.15494691,"z":-5.9768877},{"x":0.40006053,"y":-0.19963303,"z":-6.8371162},{"x":0.4949115,"y":-0.23930138,"z":-7.6913843},{"x":0.61347926,"y":-0.2725354,"z":-8.627441},{"x":0.73943377,"y":-0.30075166,"z":-9.557536},{"x":0.8283406,"y":-0.32000124,"z":-10.208007}],"GeneratedEstimatedPathLength":10.262416,"GeneratedLastYRot":355,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":15,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_hill_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.049860872,"y":0.34993845,"z":-3.2718496},{"x":-0.16271706,"y":1.304214,"z":-6.414514},{"x":-0.3278528,"y":2.7218099,"z":-9.383132},{"x":-0.53108454,"y":3.5085342,"z":-12.571036},{"x":-0.7870781,"y":3.8330336,"z":-15.837468},{"x":-1.1952221,"y":3.6239479,"z":-19.09566},{"x":-1.7154187,"y":2.8683534,"z":-22.25651},{"x":-2.3002365,"y":1.4638574,"z":-25.176424},{"x":-3.0017464,"y":0.39953008,"z":-28.204197},{"x":-3.84,"y":-0.0000035095213,"z":-31.360003}],"EstimatedPathLength":32.902184,"SourceLastYRot":15.8898535,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.010593733,"y":0.06834193,"z":-0.853042},{"x":-0.026727563,"y":0.17556591,"z":-2.0696228},{"x":-0.04986088,"y":0.3499385,"z":-3.2718499},{"x":-0.080877006,"y":0.6061046,"z":-4.33542},{"x":-0.118892625,"y":0.92941934,"z":-5.3846364},{"x":-0.16271709,"y":1.3042142,"z":-6.4145145},{"x":-0.2124788,"y":1.7657918,"z":-7.4088244},{"x":-0.26804936,"y":2.2788491,"z":-8.383796},{"x":-0.32785282,"y":2.72181,"z":-9.383132},{"x":-0.39082065,"y":3.047902,"z":-10.426615},{"x":-0.4580214,"y":3.3038974,"z":-11.494463},{"x":-0.5310846,"y":3.5085344,"z":-12.571037},{"x":-0.6068723,"y":3.670702,"z":-13.654336},{"x":-0.68852246,"y":3.7815113,"z":-14.746359},{"x":-0.7870781,"y":3.8330336,"z":-15.837468},{"x":-0.9077057,"y":3.8231041,"z":-16.927748},{"x":-1.045239,"y":3.7538874,"z":-18.017113},{"x":-1.1952223,"y":3.6239479,"z":-19.09566},{"x":-1.3579277,"y":3.4365983,"z":-20.165411},{"x":-1.5330832,"y":3.1885257,"z":-21.224346},{"x":-1.7154189,"y":2.868353,"z":-22.256512},{"x":-1.9012494,"y":2.4356558,"z":-23.243668},{"x":-2.0942602,"y":1.9308579,"z":-24.204054},{"x":-2.300237,"y":1.4638566,"z":-25.176426},{"x":-2.520365,"y":1.0592616,"z":-26.17295},{"x":-2.753459,"y":0.6924623,"z":-27.181463},{"x":-3.0017467,"y":0.3995298,"z":-28.204199},{"x":-3.302082,"y":0.20231041,"z":-29.363533},{"x":-3.617611,"y":0.07895723,"z":-30.53709},{"x":-3.8400004,"y":-0.0000034868717,"z":-31.360004}],"GeneratedEstimatedPathLength":32.929432,"GeneratedLastYRot":15.8898535,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_jump_over_a":{"DeathType":6,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":6,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_jump_over_b":{"DeathType":2,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":4.2688688e-7,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":4.2688688e-7,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":2,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_junction_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":0.63999915,"z":-7.680001},{"x":7.68,"y":1.2799991,"z":-7.680001}],"EstimatedPathLength":15.413241,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":0.63999915,"z":-7.680001},{"x":7.68,"y":1.2799991,"z":-7.680001}],"GeneratedEstimatedPathLength":15.413241,"GeneratedLastYRot":270,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":0.63999915,"z":-7.680001},{"x":-7.68,"y":1.2799991,"z":-7.680001}],"EstimatedPathLength":15.413241,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":0.63999915,"z":-7.680001},{"x":-7.68,"y":1.2799991,"z":-7.680001}],"GeneratedEstimatedPathLength":15.413241,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_junction_b":{"DeathType":0,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":0.63999915,"z":-7.680001},{"x":7.68,"y":1.2799991,"z":-7.680001}],"EstimatedPathLength":15.413241,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":-8.48942e-15,"z":-7.1054274e-15},{"x":0,"y":0.63999915,"z":-7.680001},{"x":7.68,"y":1.2799991,"z":-7.680001}],"GeneratedEstimatedPathLength":15.413241,"GeneratedLastYRot":270,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":0.63999915,"z":-7.680001},{"x":-7.68,"y":1.2799991,"z":-7.680001}],"EstimatedPathLength":15.413241,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":0.63999915,"z":-7.680001},{"x":-7.68,"y":1.2799991,"z":-7.680001}],"GeneratedEstimatedPathLength":15.413241,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_river_a":{"DeathType":13,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-9.155273e-7,"z":-7.6800013}],"EstimatedPathLength":7.6800013,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-9.155273e-7,"z":-7.6800013}],"GeneratedEstimatedPathLength":7.6800013,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":6,"DeathType":13,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_slide_under_a":{"DeathType":9,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":4.2688688e-7,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":4.2688688e-7,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":9,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_straight_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.14732192,"y":-0.10806658,"z":-5.191009},{"x":-0.64,"y":-0.32000124,"z":-10.240001}],"EstimatedPathLength":10.271621,"SourceLastYRot":4.999999,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.025403606,"y":-0.024170296,"z":-1.3510772},{"x":-0.06717632,"y":-0.060347993,"z":-3.2789333},{"x":-0.14732192,"y":-0.10806658,"z":-5.191009},{"x":-0.30421335,"y":-0.17886698,"z":-7.071526},{"x":-0.49947768,"y":-0.26120827,"z":-8.936263},{"x":-0.6399999,"y":-0.32000124,"z":-10.240001}],"GeneratedEstimatedPathLength":10.272253,"GeneratedLastYRot":4.999999,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":7,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_straight_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.17142333,"y":-0.75691676,"z":-5.191009},{"x":0,"y":-1.2800013,"z":-10.240001}],"EstimatedPathLength":10.327612,"SourceLastYRot":4.2688688e-7,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.057141114,"y":-0.20489815,"z":-1.3510772},{"x":-0.13332927,"y":-0.49389815,"z":-3.2789333},{"x":-0.17142333,"y":-0.75691676,"z":-5.191009},{"x":-0.13332926,"y":-0.9679727,"z":-7.071526},{"x":-0.057141103,"y":-1.1530473,"z":-8.936263},{"x":-1.4901161e-8,"y":-1.2800012,"z":-10.240001}],"GeneratedEstimatedPathLength":10.328366,"GeneratedLastYRot":4.2688688e-7,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_stumble_a":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.12,"y":0.23999973,"z":-2.5600002}],"EstimatedPathLength":2.5740242,"SourceLastYRot":4.999997,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.12,"y":0.23999973,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5740242,"GeneratedLastYRot":4.999997,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":5,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_stumble_b":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.12,"y":0.23999973,"z":-2.5600002}],"EstimatedPathLength":2.5740242,"SourceLastYRot":355,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.12,"y":0.23999973,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5740242,"GeneratedLastYRot":355,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":5,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"forest_turn_left_a":{"DeathType":9,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0.12874725,"y":0.51999897,"z":-8.779377},{"x":8.4618435,"y":-0.0000012021578,"z":-10.084432}],"EstimatedPathLength":17.246391,"SourceLastYRot":280,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0.12874725,"y":0.51999897,"z":-8.779377},{"x":8.4618435,"y":-0.0000012021578,"z":-10.084432}],"GeneratedEstimatedPathLength":17.246391,"GeneratedLastYRot":280,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":9,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"forest_turn_right_a":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-0.14897,"y":0.51332265,"z":-8.653961},{"x":-8.46184,"y":-0.0000012021578,"z":-10.084432}],"EstimatedPathLength":17.121105,"SourceLastYRot":80,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-0.14897,"y":0.51332265,"z":-8.653961},{"x":-8.46184,"y":-0.0000012021578,"z":-10.084432}],"GeneratedEstimatedPathLength":17.121105,"GeneratedLastYRot":80,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"mine_curve_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.4039378,"y":-0.06550694,"z":-2.853208},{"x":-1.4866382,"y":-0.29973924,"z":-5.3089437},{"x":-3.157085,"y":-0.6579641,"z":-7.3947473},{"x":-5.327983,"y":-1.0430484,"z":-8.98481},{"x":-7.8147044,"y":-1.2440195,"z":-9.954295},{"x":-10.24,"y":-1.2800013,"z":-10.240001}],"EstimatedPathLength":16.10984,"SourceLastYRot":90,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.013792226,"y":-0.0021150534,"z":-0.10818955},{"x":-0.028402576,"y":-0.0041542496,"z":-0.240618},{"x":-0.04407534,"y":-0.006209339,"z":-0.3943959},{"x":-0.061054803,"y":-0.008372071,"z":-0.56663364},{"x":-0.07958526,"y":-0.010734194,"z":-0.75444186},{"x":-0.099911,"y":-0.013387461,"z":-0.954931},{"x":-0.1222763,"y":-0.01642362,"z":-1.1652116},{"x":-0.14692545,"y":-0.019934418,"z":-1.3823941},{"x":-0.17410275,"y":-0.024011606,"z":-1.6035888},{"x":-0.20405251,"y":-0.028746936,"z":-1.8259069},{"x":-0.23701896,"y":-0.034232162,"z":-2.0464582},{"x":-0.27324647,"y":-0.040559027,"z":-2.2623537},{"x":-0.31297922,"y":-0.04781927,"z":-2.4707031},{"x":-0.35646158,"y":-0.056104667,"z":-2.6686182},{"x":-0.40393782,"y":-0.06550695,"z":-2.853208},{"x":-0.45518956,"y":-0.07596598,"z":-3.0292325},{"x":-0.5097816,"y":-0.08733395,"z":-3.2033925},{"x":-0.56763315,"y":-0.0995711,"z":-3.3757124},{"x":-0.6286632,"y":-0.11263767,"z":-3.546217},{"x":-0.69279087,"y":-0.12649389,"z":-3.71493},{"x":-0.75993526,"y":-0.14109999,"z":-3.881877},{"x":-0.8300154,"y":-0.15641624,"z":-4.047082},{"x":-0.90295064,"y":-0.17240286,"z":-4.2105694},{"x":-0.97865975,"y":-0.18902007,"z":-4.372363},{"x":-1.057062,"y":-0.2062281,"z":-4.532489},{"x":-1.1380765,"y":-0.22398725,"z":-4.6909704},{"x":-1.2216222,"y":-0.24225768,"z":-4.8478317},{"x":-1.3076184,"y":-0.26099968,"z":-5.003098},{"x":-1.395984,"y":-0.28017345,"z":-5.156794},{"x":-1.4866383,"y":-0.29973927,"z":-5.3089437},{"x":-1.579897,"y":-0.31996483,"z":-5.4597673},{"x":-1.6760783,"y":-0.34108683,"z":-5.609394},{"x":-1.7751046,"y":-0.36301896,"z":-5.757712},{"x":-1.8768983,"y":-0.38567483,"z":-5.9046097},{"x":-1.9813819,"y":-0.40896812,"z":-6.049975},{"x":-2.0884776,"y":-0.43281248,"z":-6.193696},{"x":-2.198108,"y":-0.45712158,"z":-6.335661},{"x":-2.3101952,"y":-0.48180908,"z":-6.4757586},{"x":-2.424662,"y":-0.5067887,"z":-6.613876},{"x":-2.5414305,"y":-0.53197396,"z":-6.7499022},{"x":-2.6604235,"y":-0.5572786,"z":-6.883725},{"x":-2.781563,"y":-0.58261627,"z":-7.015233},{"x":-2.9047716,"y":-0.6079006,"z":-7.144314},{"x":-3.0299716,"y":-0.6330454,"z":-7.270856},{"x":-3.157085,"y":-0.6579641,"z":-7.3947473},{"x":-3.2866251,"y":-0.6832384,"z":-7.5164337},{"x":-3.4190454,"y":-0.70938206,"z":-7.63636},{"x":-3.5541828,"y":-0.73620784,"z":-7.754417},{"x":-3.6918721,"y":-0.76352787,"z":-7.8704915},{"x":-3.8319502,"y":-0.791155,"z":-7.984474},{"x":-3.974252,"y":-0.81890136,"z":-8.096253},{"x":-4.1186147,"y":-0.8465797,"z":-8.205719},{"x":-4.2648726,"y":-0.87400216,"z":-8.312758},{"x":-4.412863,"y":-0.9009816,"z":-8.417262},{"x":-4.5624204,"y":-0.92733014,"z":-8.519118},{"x":-4.7133822,"y":-0.95286053,"z":-8.618217},{"x":-4.865583,"y":-0.977385,"z":-8.714446},{"x":-5.01886,"y":-1.0007162,"z":-8.807695},{"x":-5.173047,"y":-1.0226665,"z":-8.897854},{"x":-5.3279834,"y":-1.0430484,"z":-8.98481},{"x":-5.484721,"y":-1.0621347,"z":-9.06888},{"x":-5.6442046,"y":-1.0803349,"z":-9.150417},{"x":-5.806097,"y":-1.0976657,"z":-9.229364},{"x":-5.9700646,"y":-1.1141442,"z":-9.305666},{"x":-6.1357718,"y":-1.1297876,"z":-9.379266},{"x":-6.302881,"y":-1.1446126,"z":-9.450107},{"x":-6.47106,"y":-1.1586362,"z":-9.518134},{"x":-6.6399703,"y":-1.1718756,"z":-9.583291},{"x":-6.8092794,"y":-1.1843477,"z":-9.645521},{"x":-6.9786506,"y":-1.1960696,"z":-9.704768},{"x":-7.147749,"y":-1.2070582,"z":-9.760977},{"x":-7.3162384,"y":-1.2173305,"z":-9.814089},{"x":-7.4837856,"y":-1.2269034,"z":-9.864051},{"x":-7.650052,"y":-1.2357941,"z":-9.910805},{"x":-7.814705,"y":-1.2440195,"z":-9.954295},{"x":-7.983205,"y":-1.2512838,"z":-9.99379},{"x":-8.159838,"y":-1.2573559,"z":-10.02883},{"x":-8.3425,"y":-1.2623509,"z":-10.05977},{"x":-8.529093,"y":-1.2663832,"z":-10.086963},{"x":-8.717512,"y":-1.2695675,"z":-10.110763},{"x":-8.905661,"y":-1.2720186,"z":-10.131523},{"x":-9.091433,"y":-1.273851,"z":-10.149599},{"x":-9.272731,"y":-1.2751795,"z":-10.165343},{"x":-9.447452,"y":-1.2761188,"z":-10.179111},{"x":-9.613495,"y":-1.2767833,"z":-10.191254},{"x":-9.768759,"y":-1.2772881,"z":-10.202127},{"x":-9.911143,"y":-1.2777475,"z":-10.212085},{"x":-10.038546,"y":-1.2782764,"z":-10.22148},{"x":-10.148865,"y":-1.2789894,"z":-10.230667},{"x":-10.240001,"y":-1.2800012,"z":-10.24}],"GeneratedEstimatedPathLength":16.14699,"GeneratedLastYRot":90,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_curve_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.35956573,"y":-0.06550692,"z":-2.6739085},{"x":1.4924482,"y":-0.29973924,"z":-5.32092},{"x":3.1985364,"y":-0.6579641,"z":-7.4292774},{"x":5.13277,"y":-0.9714654,"z":-8.869418},{"x":7.610147,"y":-1.1722332,"z":-9.898325},{"x":10.24,"y":-1.2800013,"z":-10.240001}],"EstimatedPathLength":16.099237,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.01192641,"y":-0.0021150522,"z":-0.10067398},{"x":0.023979776,"y":-0.004154247,"z":-0.22283487},{"x":0.036527876,"y":-0.0062093353,"z":-0.36408195},{"x":0.04993849,"y":-0.008372065,"z":-0.5220145},{"x":0.06457939,"y":-0.0107341865,"z":-0.69423175},{"x":0.08081837,"y":-0.013387452,"z":-0.8783331},{"x":0.09902319,"y":-0.016423607,"z":-1.0719178},{"x":0.11956164,"y":-0.019934405,"z":-1.272585},{"x":0.1428015,"y":-0.024011591,"z":-1.4779341},{"x":0.16911054,"y":-0.028746922,"z":-1.6855644},{"x":0.19885653,"y":-0.03423214,"z":-1.893075},{"x":0.2324073,"y":-0.04055901,"z":-2.0980659},{"x":0.27013054,"y":-0.047819253,"z":-2.298135},{"x":0.31239414,"y":-0.05610465,"z":-2.4908829},{"x":0.35956576,"y":-0.06550693,"z":-2.6739085},{"x":0.41144755,"y":-0.075965956,"z":-2.8522742},{"x":0.46747783,"y":-0.08733393,"z":-3.0323398},{"x":0.5274787,"y":-0.09957108,"z":-3.2136507},{"x":0.59127223,"y":-0.11263765,"z":-3.3957517},{"x":0.6586807,"y":-0.12649387,"z":-3.5781882},{"x":0.72952604,"y":-0.14109997,"z":-3.7605052},{"x":0.80363053,"y":-0.15641621,"z":-3.9422476},{"x":0.88081634,"y":-0.17240284,"z":-4.122961},{"x":0.9609053,"y":-0.18902005,"z":-4.30219},{"x":1.0437198,"y":-0.20622809,"z":-4.47948},{"x":1.1290818,"y":-0.22398722,"z":-4.654375},{"x":1.2168136,"y":-0.24225765,"z":-4.826422},{"x":1.3067372,"y":-0.26099965,"z":-4.9951653},{"x":1.3986747,"y":-0.28017342,"z":-5.1601496},{"x":1.4924483,"y":-0.29973927,"z":-5.32092},{"x":1.5890701,"y":-0.3201133,"z":-5.478504},{"x":1.6894664,"y":-0.3416383,"z":-5.634155},{"x":1.7933304,"y":-0.3641643,"z":-5.787757},{"x":1.9003555,"y":-0.3875413,"z":-5.9391956},{"x":2.0102348,"y":-0.41161934,"z":-6.088355},{"x":2.1226618,"y":-0.43624848,"z":-6.235121},{"x":2.2373295,"y":-0.46127868,"z":-6.3793774},{"x":2.3539314,"y":-0.4865601,"z":-6.521009},{"x":2.4721608,"y":-0.5119426,"z":-6.6599016},{"x":2.5917106,"y":-0.5372764,"z":-6.7959394},{"x":2.7122746,"y":-0.5624113,"z":-6.9290075},{"x":2.8335462,"y":-0.58719754,"z":-7.0589905},{"x":2.9552178,"y":-0.6114851,"z":-7.1857734},{"x":3.0769835,"y":-0.6351239,"z":-7.309241},{"x":3.1985364,"y":-0.6579641,"z":-7.4292774},{"x":3.3197343,"y":-0.68039674,"z":-7.545543},{"x":3.440826,"y":-0.7028722,"z":-7.6579247},{"x":3.5620918,"y":-0.7253305,"z":-7.7666516},{"x":3.6838112,"y":-0.7477107,"z":-7.871951},{"x":3.806265,"y":-0.7699528,"z":-7.974053},{"x":3.9297326,"y":-0.7919959,"z":-8.073185},{"x":4.0544944,"y":-0.81377995,"z":-8.169576},{"x":4.18083,"y":-0.8352442,"z":-8.263453},{"x":4.30902,"y":-0.8563284,"z":-8.355045},{"x":4.439343,"y":-0.87697196,"z":-8.444582},{"x":4.572081,"y":-0.8971146,"z":-8.532291},{"x":4.7075124,"y":-0.9166956,"z":-8.618401},{"x":4.845918,"y":-0.93565476,"z":-8.70314},{"x":4.9875774,"y":-0.95393145,"z":-8.7867365},{"x":5.1327705,"y":-0.97146547,"z":-8.869418},{"x":5.281841,"y":-0.98831624,"z":-8.951378},{"x":5.4347153,"y":-1.004596,"z":-9.032493},{"x":5.5910444,"y":-1.0203218,"z":-9.1125145},{"x":5.750483,"y":-1.0355119,"z":-9.191199},{"x":5.912683,"y":-1.0501832,"z":-9.268302},{"x":6.077296,"y":-1.0643533,"z":-9.343576},{"x":6.2439766,"y":-1.0780401,"z":-9.416779},{"x":6.4123755,"y":-1.0912609,"z":-9.487662},{"x":6.5821476,"y":-1.1040334,"z":-9.555983},{"x":6.752944,"y":-1.1163749,"z":-9.621492},{"x":6.924419,"y":-1.128303,"z":-9.683949},{"x":7.0962234,"y":-1.1398354,"z":-9.743106},{"x":7.268012,"y":-1.1509895,"z":-9.7987175},{"x":7.439435,"y":-1.161783,"z":-9.850538},{"x":7.6101475,"y":-1.1722332,"z":-9.898325},{"x":7.7864976,"y":-1.1823417,"z":-9.941767},{"x":7.973419,"y":-1.1920894,"z":-9.9809265},{"x":8.168437,"y":-1.2014631,"z":-10.016109},{"x":8.36908,"y":-1.2104498,"z":-10.047625},{"x":8.572872,"y":-1.2190362,"z":-10.075778},{"x":8.777344,"y":-1.2272093,"z":-10.100877},{"x":8.980019,"y":-1.2349559,"z":-10.123228},{"x":9.178425,"y":-1.2422631,"z":-10.14314},{"x":9.37009,"y":-1.2491174,"z":-10.160919},{"x":9.55254,"y":-1.2555059,"z":-10.176872},{"x":9.7233,"y":-1.2614154,"z":-10.191306},{"x":9.8799,"y":-1.2668328,"z":-10.20453},{"x":10.019865,"y":-1.2717451,"z":-10.216848},{"x":10.140723,"y":-1.2761389,"z":-10.228571},{"x":10.24,"y":-1.2800013,"z":-10.240003}],"GeneratedEstimatedPathLength":16.135641,"GeneratedLastYRot":270,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_curve_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.34469134,"y":-3.3673822e-7,"z":-2.8247654},{"x":-1.2800009,"y":-6.107062e-7,"z":-5.122976}],"EstimatedPathLength":5.326963,"SourceLastYRot":29.999994,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.011745621,"y":-1.28014905e-8,"z":-0.107387},{"x":-0.024148798,"y":-2.8520107e-8,"z":-0.23924431},{"x":-0.037428133,"y":-4.6800697e-8,"z":-0.39259303},{"x":-0.05180222,"y":-6.7288134e-8,"z":-0.5644541},{"x":-0.06748967,"y":-8.962731e-8,"z":-0.7518487},{"x":-0.084709086,"y":-1.13463095e-7,"z":-0.95179784},{"x":-0.10367906,"y":-1.3844037e-7,"z":-1.1613224},{"x":-0.1246182,"y":-1.6420402e-7,"z":-1.3774437},{"x":-0.1477451,"y":-1.9039895e-7,"z":-1.5971825},{"x":-0.17327838,"y":-2.1667e-7,"z":-1.8175602},{"x":-0.20143661,"y":-2.4266208e-7,"z":-2.0355973},{"x":-0.23243845,"y":-2.6802007e-7,"z":-2.2483158},{"x":-0.26650244,"y":-2.9238885e-7,"z":-2.4527357},{"x":-0.3038472,"y":-3.1541327e-7,"z":-2.6458788},{"x":-0.34469134,"y":-3.3673822e-7,"z":-2.8247654},{"x":-0.39183545,"y":-3.5739367e-7,"z":-2.998036},{"x":-0.44703007,"y":-3.7852107e-7,"z":-3.1752653},{"x":-0.5089187,"y":-3.9993262e-7,"z":-3.3548784},{"x":-0.5761452,"y":-4.214407e-7,"z":-3.5353014},{"x":-0.6473528,"y":-4.428575e-7,"z":-3.7149587},{"x":-0.7211856,"y":-4.6399535e-7,"z":-3.8922758},{"x":-0.7962869,"y":-4.846665e-7,"z":-4.0656776},{"x":-0.87130046,"y":-5.0468316e-7,"z":-4.23359},{"x":-0.9448699,"y":-5.238577e-7,"z":-4.394438},{"x":-1.0156386,"y":-5.420023e-7,"z":-4.546646},{"x":-1.0822506,"y":-5.589293e-7,"z":-4.6886396},{"x":-1.143349,"y":-5.7445084e-7,"z":-4.818845},{"x":-1.197578,"y":-5.883794e-7,"z":-4.935685},{"x":-1.2435806,"y":-6.00527e-7,"z":-5.0375876},{"x":-1.2800009,"y":-6.1070614e-7,"z":-5.1229763}],"GeneratedEstimatedPathLength":5.332934,"GeneratedLastYRot":29.999994,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_curve_d":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.40394,"y":-3.4012885e-7,"z":-2.853208},{"x":1.2800001,"y":-6.107062e-7,"z":-5.122976}],"EstimatedPathLength":5.3146267,"SourceLastYRot":330,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.014220901,"y":-1.2943143e-8,"z":-0.10857526},{"x":0.029994672,"y":-2.8854648e-8,"z":-0.24205065},{"x":0.047381923,"y":-4.7370325e-8,"z":-0.39737138},{"x":0.06644325,"y":-6.812599e-8,"z":-0.5714826},{"x":0.08723926,"y":-9.075752e-8,"z":-0.76132953},{"x":0.109830566,"y":-1.1490072e-7,"z":-0.9638575},{"x":0.13427776,"y":-1.4019143e-7,"z":-1.1760116},{"x":0.16064145,"y":-1.6626552e-7,"z":-1.3947368},{"x":0.18898223,"y":-1.9275882e-7,"z":-1.6169786},{"x":0.21936074,"y":-2.1930715e-7,"z":-1.8396822},{"x":0.25183755,"y":-2.4554637e-7,"z":-2.0597925},{"x":0.2864733,"y":-2.7111233e-7,"z":-2.2742558},{"x":0.32332855,"y":-2.956408e-7,"z":-2.4800153},{"x":0.3624639,"y":-3.1876772e-7,"z":-2.6740181},{"x":0.40394,"y":-3.4012885e-7,"z":-2.853208},{"x":0.4504521,"y":-3.6074812e-7,"z":-3.026175},{"x":0.503856,"y":-3.8177305e-7,"z":-3.202545},{"x":0.56295335,"y":-4.0302487e-7,"z":-3.3808181},{"x":0.6265458,"y":-4.2432498e-7,"z":-3.5594966},{"x":0.69343483,"y":-4.4549466e-7,"z":-3.7370806},{"x":0.7624223,"y":-4.6635523e-7,"z":-3.912072},{"x":0.83230966,"y":-4.8672797e-7,"z":-4.0829706},{"x":0.9018986,"y":-5.064343e-7,"z":-4.248279},{"x":0.96999073,"y":-5.252953e-7,"z":-4.4064975},{"x":1.0353875,"y":-5.431325e-7,"z":-4.5561266},{"x":1.0968908,"y":-5.5976716e-7,"z":-4.695668},{"x":1.1533021,"y":-5.7502047e-7,"z":-4.8236227},{"x":1.203423,"y":-5.8871393e-7,"z":-4.938491},{"x":1.2460551,"y":-6.006687e-7,"z":-5.0387754},{"x":1.2800002,"y":-6.1070614e-7,"z":-5.1229753}],"GeneratedEstimatedPathLength":5.3190746,"GeneratedLastYRot":330,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_duck_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0.0000016485794,"y":-2.7528853e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0.0000016485794,"y":-2.7528853e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":3,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_duck_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"EstimatedPathLength":5.1299906,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1299906,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":3,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_entrance_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":12,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_exit_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"EstimatedPathLength":7.6800013,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-5.804643e-7,"z":-7.6800013}],"GeneratedEstimatedPathLength":7.6800013,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":13,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"mine_junction_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":0.1388597,"y":-2.1615625e-7,"z":-1.8132503},{"x":0.3114985,"y":-3.243479e-7,"z":-2.7208276},{"x":0.7228833,"y":-4.7123078e-7,"z":-3.9529707},{"x":1.2800006,"y":-6.1035126e-7,"z":-5.119998},{"x":2.56,"y":-8.8011916e-7,"z":-7.3829756}],"EstimatedPathLength":7.9394646,"SourceLastYRot":330,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":0.1388597,"y":-2.1615625e-7,"z":-1.8132503},{"x":0.3114985,"y":-3.243479e-7,"z":-2.7208276},{"x":0.7228833,"y":-4.7123078e-7,"z":-3.9529707},{"x":1.2800006,"y":-6.1035126e-7,"z":-5.119998},{"x":2.56,"y":-8.8011916e-7,"z":-7.3829756}],"GeneratedEstimatedPathLength":7.9394646,"GeneratedLastYRot":330,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":-0.13885999,"y":-2.1615625e-7,"z":-1.8132503},{"x":-0.3115,"y":-3.243479e-7,"z":-2.7208276},{"x":-0.72288,"y":-4.7123078e-7,"z":-3.9529707},{"x":-1.2799994,"y":-6.1035126e-7,"z":-5.119998},{"x":-2.56,"y":-8.8011916e-7,"z":-7.3829756}],"EstimatedPathLength":7.9394646,"SourceLastYRot":29.999994,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":-0.13885999,"y":-2.1615625e-7,"z":-1.8132503},{"x":-0.3115,"y":-3.243479e-7,"z":-2.7208276},{"x":-0.72288,"y":-4.7123078e-7,"z":-3.9529707},{"x":-1.2799994,"y":-6.1035126e-7,"z":-5.119998},{"x":-2.56,"y":-8.8011916e-7,"z":-7.3829756}],"GeneratedEstimatedPathLength":7.9394646,"GeneratedLastYRot":29.999994,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":5,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_junction_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":0.1388597,"y":-2.1615625e-7,"z":-1.8132503},{"x":0.3114985,"y":-3.243479e-7,"z":-2.7208276},{"x":0.7228833,"y":-4.7123078e-7,"z":-3.9529707},{"x":1.2800006,"y":-6.1035126e-7,"z":-5.119998},{"x":2.56,"y":-8.8011916e-7,"z":-7.3829756}],"EstimatedPathLength":7.9394646,"SourceLastYRot":330,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":0.1388597,"y":-2.1615625e-7,"z":-1.8132503},{"x":0.3114985,"y":-3.243479e-7,"z":-2.7208276},{"x":0.7228833,"y":-4.7123078e-7,"z":-3.9529707},{"x":1.2800006,"y":-6.1035126e-7,"z":-5.119998},{"x":2.56,"y":-8.8011916e-7,"z":-7.3829756}],"GeneratedEstimatedPathLength":7.9394646,"GeneratedLastYRot":330,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":5,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"mine_junction_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":-0.13886,"y":-2.1615625e-7,"z":-1.8132503},{"x":-0.3115,"y":-3.243479e-7,"z":-2.7208276},{"x":-0.72288,"y":-4.7123078e-7,"z":-3.9529707},{"x":-1.2799994,"y":-6.1035126e-7,"z":-5.119998},{"x":-2.5599997,"y":-8.8011916e-7,"z":-7.3829756}],"EstimatedPathLength":7.9394646,"SourceLastYRot":29.999994,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":0,"y":-1.04904174e-7,"z":-0.8800001},{"x":-0.13886,"y":-2.1615625e-7,"z":-1.8132503},{"x":-0.3115,"y":-3.243479e-7,"z":-2.7208276},{"x":-0.72288,"y":-4.7123078e-7,"z":-3.9529707},{"x":-1.2799994,"y":-6.1035126e-7,"z":-5.119998},{"x":-2.5599997,"y":-8.8011916e-7,"z":-7.3829756}],"GeneratedEstimatedPathLength":7.9394646,"GeneratedLastYRot":29.999994,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":5,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"mine_ledge_left_a":{"DeathType":4,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-1.5184492e-7,"z":-1.273768},{"x":-0.08917214,"y":3.0138636e-8,"z":-2.5578916}],"EstimatedPathLength":2.5609841,"SourceLastYRot":3.999999,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.003302672,"y":-5.1731195e-8,"z":-0.3298526},{"x":0.006605343,"y":-1.2033408e-7,"z":-0.80123496},{"x":0,"y":-1.5184492e-7,"z":-1.273768},{"x":-0.02642138,"y":-1.0917164e-7,"z":-1.7486023},{"x":-0.06275077,"y":-2.9406294e-8,"z":-2.2245872},{"x":-0.08917214,"y":3.0138608e-8,"z":-2.5578918}],"GeneratedEstimatedPathLength":2.5611305,"GeneratedLastYRot":3.999999,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_left_b":{"DeathType":4,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-1.5488715e-7,"z":-1.299288},{"x":-0.08917214,"y":3.0138636e-8,"z":-2.5578916}],"EstimatedPathLength":2.5610466,"SourceLastYRot":3.999999,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.003302672,"y":-5.274527e-8,"z":-0.3383593},{"x":0.006605343,"y":-1.2270026e-7,"z":-0.8210839},{"x":0,"y":-1.5488715e-7,"z":-1.299288},{"x":-0.02642138,"y":-1.11537815e-7,"z":-1.7684512},{"x":-0.06275077,"y":-3.0420367e-8,"z":-2.233094},{"x":-0.08917214,"y":3.0138636e-8,"z":-2.5578918}],"GeneratedEstimatedPathLength":2.5611992,"GeneratedLastYRot":3.999999,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_left_end_a":{"DeathType":4,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":-9.155273e-7,"y":3.6379787e-14,"z":3.051758e-7},{"x":8.093461e-7,"y":2.9887246e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600004,"SourceLastYRot":0,"GeneratedPath":[{"x":-9.155273e-7,"y":3.6379787e-14,"z":3.051758e-7},{"x":8.093461e-7,"y":2.9887246e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_left_start_a":{"DeathType":4,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0,"y":-1.5245288e-7,"z":-1.2788676},{"x":0.089175306,"y":3.0138693e-8,"z":-2.557891}],"EstimatedPathLength":2.560996,"SourceLastYRot":356,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":-0.0033027893,"y":-5.1933856e-8,"z":-0.33155233},{"x":-0.0066055777,"y":-1.2080696e-7,"z":-0.80520135},{"x":0,"y":-1.5245288e-7,"z":-1.2788676},{"x":0.026422318,"y":-1.09644475e-7,"z":-1.7525685},{"x":0.06275301,"y":-2.9608884e-8,"z":-2.2262866},{"x":0.08917531,"y":3.013872e-8,"z":-2.557891}],"GeneratedEstimatedPathLength":2.5611436,"GeneratedLastYRot":356,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_right_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0,"y":-1.5685391e-7,"z":-1.3157861},{"x":0.089175306,"y":3.0138693e-8,"z":-2.557891}],"EstimatedPathLength":2.561088,"SourceLastYRot":356,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":-0.0033027893,"y":-5.340086e-8,"z":-0.34385848},{"x":-0.0066055777,"y":-1.2422997e-7,"z":-0.83391577},{"x":0,"y":-1.5685391e-7,"z":-1.3157861},{"x":0.026422318,"y":-1.130675e-7,"z":-1.7812829},{"x":0.06275301,"y":-3.1075913e-8,"z":-2.2385926},{"x":0.08917531,"y":3.013868e-8,"z":-2.557891}],"GeneratedEstimatedPathLength":2.561245,"GeneratedLastYRot":356,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_right_end_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_ledge_right_start_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"EstimatedPathLength":2.5600004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":3.051758e-7},{"x":0.0000017248734,"y":2.9887246e-8,"z":-2.5600002}],"GeneratedEstimatedPathLength":2.5600004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_straight_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"EstimatedPathLength":5.1299906,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1299906,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"mine_straight_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"EstimatedPathLength":5.1299906,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0000016485794,"y":-0.32000062,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1299906,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"narrow_end_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":17,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"narrow_jump_or_slide_a":{"DeathType":2,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-2.7528847e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":2,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"narrow_jump_over_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_jump_over_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"EstimatedPathLength":10.240001,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.0000012207031,"z":-10.240001}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"narrow_junction_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":2.7890367e-14,"z":-7.121439e-8},{"x":0,"y":-6.103515e-7,"z":-5.1200004},{"x":5.1200004,"y":-6.1035166e-7,"z":-5.120002}],"EstimatedPathLength":10.240001,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":2.7890367e-14,"z":-7.121439e-8},{"x":0,"y":-6.103515e-7,"z":-5.1200004},{"x":5.1200004,"y":-6.1035166e-7,"z":-5.120002}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":270,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":4.4869205e-14,"z":7.121446e-8},{"x":0,"y":-6.103515e-7,"z":-5.1200004},{"x":-5.1200004,"y":-6.1035144e-7,"z":-5.12}],"EstimatedPathLength":10.240001,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":4.4869205e-14,"z":7.121446e-8},{"x":0,"y":-6.103515e-7,"z":-5.1200004},{"x":-5.1200004,"y":-6.1035144e-7,"z":-5.12}],"GeneratedEstimatedPathLength":10.240001,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_start_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":16,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_straight_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_straight_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_straight_c":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.63999945,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.63999945,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_straight_d":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.9599995,"z":-5.1200004}],"EstimatedPathLength":5.209223,"SourceLastYRot":355,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.9599995,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.209223,"GeneratedLastYRot":355,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_straight_e":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.9599995,"z":-5.1200004}],"EstimatedPathLength":5.209223,"SourceLastYRot":4.999999,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":0.9599995,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.209223,"GeneratedLastYRot":4.999999,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_stumble_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"EstimatedPathLength":5.1200004,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-6.103515e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1200004,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":5,"DeathType":12,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_turn_left_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":5.1199994,"y":-6.1035155e-7,"z":-5.1200004}],"EstimatedPathLength":10.24,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":5.1199994,"y":-6.1035155e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":10.24,"GeneratedLastYRot":270,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"narrow_turn_right_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":-5.12,"y":-6.1035155e-7,"z":-5.1200004}],"EstimatedPathLength":10.24,"SourceLastYRot":90,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-6.1035155e-7,"y":-6.1035155e-7,"z":-5.1200004},{"x":-5.12,"y":-6.1035155e-7,"z":-5.1200004}],"GeneratedEstimatedPathLength":10.24,"GeneratedLastYRot":90,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":3,"DeathType":0,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"waterslide_curve_45_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0023899924,"y":-0.6398104,"z":-5.253956},{"x":-1.081701,"y":-1.079964,"z":-10.387234},{"x":-3.9350924,"y":-1.9062048,"z":-14.734301},{"x":-7.637469,"y":-2.5600023,"z":-18.43848}],"EstimatedPathLength":21.09972,"SourceLastYRot":45,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0021436797,"y":-0.024489932,"z":-0.19795471},{"x":0.008097293,"y":-0.054808237,"z":-0.43837017},{"x":0.016905699,"y":-0.090208724,"z":-0.71646893},{"x":0.027613763,"y":-0.12994519,"z":-1.0274734},{"x":0.03926634,"y":-0.17327146,"z":-1.3666062},{"x":0.050908297,"y":-0.21944135,"z":-1.7290902},{"x":0.06158449,"y":-0.26770863,"z":-2.1101475},{"x":0.070339784,"y":-0.3173271,"z":-2.5050008},{"x":0.07621904,"y":-0.3675506,"z":-2.9088726},{"x":0.07826711,"y":-0.41763294,"z":-3.3169856},{"x":0.07552885,"y":-0.46682793,"z":-3.724562},{"x":0.067049176,"y":-0.5143894,"z":-4.1268253},{"x":0.051872846,"y":-0.559571,"z":-4.5189967},{"x":0.02904486,"y":-0.60162675,"z":-4.8962994},{"x":-0.0023899924,"y":-0.6398104,"z":-5.253956},{"x":-0.039393924,"y":-0.67415065,"z":-5.6013093},{"x":-0.07870538,"y":-0.7055209,"z":-5.950493},{"x":-0.12094399,"y":-0.73444176,"z":-6.3009143},{"x":-0.16672961,"y":-0.761434,"z":-6.6519833},{"x":-0.21668176,"y":-0.7870182,"z":-7.0031066},{"x":-0.27142033,"y":-0.811715,"z":-7.3536944},{"x":-0.3315648,"y":-0.8360451,"z":-7.7031536},{"x":-0.3977351,"y":-0.8605292,"z":-8.050894},{"x":-0.4705508,"y":-0.88568795,"z":-8.396323},{"x":-0.55063146,"y":-0.9120419,"z":-8.738849},{"x":-0.6385971,"y":-0.9401118,"z":-9.077881},{"x":-0.735067,"y":-0.97041833,"z":-9.412827},{"x":-0.84066135,"y":-1.0034822,"z":-9.743095},{"x":-0.95599943,"y":-1.0398239,"z":-10.068094},{"x":-1.081701,"y":-1.079964,"z":-10.387234},{"x":-1.2186526,"y":-1.1241937,"z":-10.701201},{"x":-1.3667777,"y":-1.1721251,"z":-11.011165},{"x":-1.5252545,"y":-1.2232617,"z":-11.317251},{"x":-1.6932614,"y":-1.2771075,"z":-11.61959},{"x":-1.8699747,"y":-1.3331654,"z":-11.918305},{"x":-2.0545728,"y":-1.3909395,"z":-12.213527},{"x":-2.2462335,"y":-1.4499328,"z":-12.505381},{"x":-2.4441347,"y":-1.5096494,"z":-12.793997},{"x":-2.6474535,"y":-1.5695922,"z":-13.0795},{"x":-2.8553677,"y":-1.6292653,"z":-13.362019},{"x":-3.067056,"y":-1.688172,"z":-13.641681},{"x":-3.2816944,"y":-1.7458156,"z":-13.918612},{"x":-3.4984615,"y":-1.8016999,"z":-14.19294},{"x":-3.7165349,"y":-1.8553284,"z":-14.464794},{"x":-3.9350932,"y":-1.9062049,"z":-14.734302},{"x":-4.164945,"y":-1.9561547,"z":-15.007597},{"x":-4.414753,"y":-2.0070496,"z":-15.288919},{"x":-4.680472,"y":-2.0584617,"z":-15.575549},{"x":-4.9580545,"y":-2.109963,"z":-15.864763},{"x":-5.243456,"y":-2.1611257,"z":-16.153841},{"x":-5.5326304,"y":-2.211522,"z":-16.440062},{"x":-5.821534,"y":-2.2607243,"z":-16.720705},{"x":-6.106118,"y":-2.3083043,"z":-16.993048},{"x":-6.3823385,"y":-2.3538342,"z":-17.25437},{"x":-6.6461496,"y":-2.396886,"z":-17.50195},{"x":-6.8935065,"y":-2.4370327,"z":-17.733067},{"x":-7.1203623,"y":-2.473845,"z":-17.945},{"x":-7.3226714,"y":-2.5068963,"z":-18.135027},{"x":-7.4963894,"y":-2.535758,"z":-18.300428},{"x":-7.6374683,"y":-2.5600026,"z":-18.438482}],"GeneratedEstimatedPathLength":21.14456,"GeneratedLastYRot":45,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_curve_45_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.0023791504,"y":-0.63980687,"z":-5.2539573},{"x":1.0816895,"y":-1.0799574,"z":-10.387236},{"x":3.935082,"y":-1.9062021,"z":-14.734307},{"x":7.637468,"y":-2.5600038,"z":-18.43848}],"EstimatedPathLength":21.09973,"SourceLastYRot":315,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.002144109,"y":-0.024489798,"z":-0.19795477},{"x":-0.008098274,"y":-0.054807942,"z":-0.4383703},{"x":-0.016907338,"y":-0.09020825,"z":-0.7164691},{"x":-0.02761614,"y":-0.1299445,"z":-1.0274737},{"x":-0.039269526,"y":-0.17327055,"z":-1.3666067},{"x":-0.050912343,"y":-0.21944018,"z":-1.7290907},{"x":-0.06158942,"y":-0.2677072,"z":-2.1101482},{"x":-0.07034561,"y":-0.3173254,"z":-2.5050015},{"x":-0.07622574,"y":-0.36754867,"z":-2.9088736},{"x":-0.07827469,"y":-0.41763073,"z":-3.3169866},{"x":-0.075537264,"y":-0.46682543,"z":-3.7245631},{"x":-0.06705834,"y":-0.51438665,"z":-4.1268263},{"x":-0.0518827,"y":-0.55956805,"z":-4.518998},{"x":-0.029055253,"y":-0.60162354,"z":-4.8963013},{"x":0.0023791504,"y":-0.63980687,"z":-5.2539573},{"x":0.039382737,"y":-0.6741469,"z":-5.6013107},{"x":0.07869393,"y":-0.70551693,"z":-5.950495},{"x":0.12093234,"y":-0.73443747,"z":-6.3009157},{"x":0.1667178,"y":-0.7614294,"z":-6.6519847},{"x":0.21666986,"y":-0.7870133,"z":-7.003108},{"x":0.27140838,"y":-0.8117099,"z":-7.353696},{"x":0.33155283,"y":-0.83603966,"z":-7.703155},{"x":0.39772317,"y":-0.8605235,"z":-8.050896},{"x":0.47053888,"y":-0.885682,"z":-8.396324},{"x":0.55061966,"y":-0.9120357,"z":-8.738851},{"x":0.6385854,"y":-0.9401055,"z":-9.077883},{"x":0.73505545,"y":-0.97041184,"z":-9.412828},{"x":0.84064984,"y":-1.0034755,"z":-9.743097},{"x":0.95598793,"y":-1.0398172,"z":-10.068096},{"x":1.0816895,"y":-1.0799574,"z":-10.387236},{"x":1.218641,"y":-1.1241871,"z":-10.701203},{"x":1.3667662,"y":-1.1721185,"z":-11.011167},{"x":1.5252429,"y":-1.2232554,"z":-11.317254},{"x":1.6932497,"y":-1.2771014,"z":-11.619593},{"x":1.869963,"y":-1.3331596,"z":-11.918309},{"x":2.0545611,"y":-1.3909338,"z":-12.213531},{"x":2.2462218,"y":-1.4499274,"z":-12.505385},{"x":2.4441233,"y":-1.5096444,"z":-12.794003},{"x":2.6474419,"y":-1.5695877,"z":-13.079506},{"x":2.8553562,"y":-1.629261,"z":-13.362024},{"x":3.0670447,"y":-1.688168,"z":-13.641686},{"x":3.281683,"y":-1.745812,"z":-13.918618},{"x":3.4984503,"y":-1.8016968,"z":-14.192947},{"x":3.7165241,"y":-1.8553255,"z":-14.4648},{"x":3.9350827,"y":-1.9062022,"z":-14.734308},{"x":4.164935,"y":-1.9561522,"z":-15.007604},{"x":4.4147434,"y":-2.0070474,"z":-15.288926},{"x":4.680463,"y":-2.0584598,"z":-15.575556},{"x":4.958046,"y":-2.1099615,"z":-15.864769},{"x":5.2434483,"y":-2.1611245,"z":-16.153847},{"x":5.532624,"y":-2.2115211,"z":-16.440065},{"x":5.821528,"y":-2.2607238,"z":-16.720709},{"x":6.1061134,"y":-2.3083038,"z":-16.99305},{"x":6.3823347,"y":-2.3538342,"z":-17.254372},{"x":6.646147,"y":-2.3968863,"z":-17.50195},{"x":6.893504,"y":-2.437033,"z":-17.733067},{"x":7.1203604,"y":-2.473846,"z":-17.945},{"x":7.3226705,"y":-2.5068972,"z":-18.135027},{"x":7.4963894,"y":-2.535759,"z":-18.300428},{"x":7.637469,"y":-2.5600035,"z":-18.43848}],"GeneratedEstimatedPathLength":21.144575,"GeneratedLastYRot":315,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_curve_90_a":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.039224,"y":-1.0764616,"z":-8.314708},{"x":-4.187643,"y":-1.8079796,"z":-16.071527},{"x":-10.068355,"y":-2.8118565,"z":-21.928253},{"x":-17.768435,"y":-4.1072164,"z":-25.03823},{"x":-26.075945,"y":-5.1200013,"z":-26.07595}],"EstimatedPathLength":42.049656,"SourceLastYRot":90.000015,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.034730993,"y":-0.04122229,"z":-0.3140365},{"x":-0.07027642,"y":-0.092282735,"z":-0.6965743},{"x":-0.107587345,"y":-0.15191786,"z":-1.1397264},{"x":-0.1476149,"y":-0.21886423,"z":-1.6356066},{"x":-0.19131012,"y":-0.29185832,"z":-2.1763277},{"x":-0.23962411,"y":-0.36963665,"z":-2.7540026},{"x":-0.293508,"y":-0.45093584,"z":-3.3607454},{"x":-0.35391283,"y":-0.5344924,"z":-3.9886694},{"x":-0.42178965,"y":-0.61904275,"z":-4.6298866},{"x":-0.4980896,"y":-0.7033235,"z":-5.2765117},{"x":-0.5837638,"y":-0.78607106,"z":-5.920657},{"x":-0.6797631,"y":-0.8660222,"z":-6.5544357},{"x":-0.78703904,"y":-0.94191337,"z":-7.169962},{"x":-0.9065423,"y":-1.0124809,"z":-7.759348},{"x":-1.039224,"y":-1.0764616,"z":-8.314708},{"x":-1.182207,"y":-1.1346807,"z":-8.85197},{"x":-1.3323486,"y":-1.1891719,"z":-9.391524},{"x":-1.4902028,"y":-1.2404838,"z":-9.9321785},{"x":-1.6563232,"y":-1.2891653,"z":-10.472738},{"x":-1.8312645,"y":-1.3357649,"z":-11.012013},{"x":-2.0155797,"y":-1.3808315,"z":-11.548808},{"x":-2.2098231,"y":-1.4249136,"z":-12.081931},{"x":-2.414548,"y":-1.4685602,"z":-12.610188},{"x":-2.6303089,"y":-1.5123198,"z":-13.132384},{"x":-2.8576598,"y":-1.5567412,"z":-13.647331},{"x":-3.0971537,"y":-1.602373,"z":-14.1538315},{"x":-3.3493457,"y":-1.6497641,"z":-14.650696},{"x":-3.614788,"y":-1.699463,"z":-15.136726},{"x":-3.8940363,"y":-1.7520186,"z":-15.610735},{"x":-4.187643,"y":-1.8079796,"z":-16.071527},{"x":-4.4965796,"y":-1.8663918,"z":-16.522846},{"x":-4.820905,"y":-1.9259462,"z":-16.96873},{"x":-5.1598086,"y":-1.9866602,"z":-17.408426},{"x":-5.5124793,"y":-2.0485508,"z":-17.841185},{"x":-5.878104,"y":-2.1116347,"z":-18.266249},{"x":-6.2558737,"y":-2.1759293,"z":-18.682869},{"x":-6.6449738,"y":-2.2414513,"z":-19.090292},{"x":-7.044595,"y":-2.3082178,"z":-19.487764},{"x":-7.453927,"y":-2.376246,"z":-19.874535},{"x":-7.872154,"y":-2.4455523,"z":-20.24985},{"x":-8.298468,"y":-2.516154,"z":-20.612957},{"x":-8.732056,"y":-2.5880685,"z":-20.963104},{"x":-9.172108,"y":-2.661312,"z":-21.299538},{"x":-9.617812,"y":-2.7359028,"z":-21.621506},{"x":-10.068356,"y":-2.8118567,"z":-21.928253},{"x":-10.527605,"y":-2.8903363,"z":-22.21964},{"x":-10.999249,"y":-2.9721522,"z":-22.496422},{"x":-11.482212,"y":-3.0567946,"z":-22.759197},{"x":-11.975416,"y":-3.1437535,"z":-23.008566},{"x":-12.477783,"y":-3.2325177,"z":-23.245125},{"x":-12.988235,"y":-3.3225775,"z":-23.469479},{"x":-13.505697,"y":-3.413422,"z":-23.682222},{"x":-14.029092,"y":-3.5045424,"z":-23.883959},{"x":-14.557339,"y":-3.5954268,"z":-24.075287},{"x":-15.089362,"y":-3.6855657,"z":-24.256804},{"x":-15.624086,"y":-3.7744486,"z":-24.42911},{"x":-16.16043,"y":-3.8615654,"z":-24.592808},{"x":-16.697325,"y":-3.9464061,"z":-24.748493},{"x":-17.233685,"y":-4.0284595,"z":-24.896767},{"x":-17.768435,"y":-4.1072164,"z":-25.03823},{"x":-18.321861,"y":-4.185041,"z":-25.169737},{"x":-18.909687,"y":-4.2642064,"z":-25.288355},{"x":-19.523983,"y":-4.344063,"z":-25.395002},{"x":-20.156828,"y":-4.4239616,"z":-25.490602},{"x":-20.800297,"y":-4.5032535,"z":-25.576073},{"x":-21.446465,"y":-4.5812893,"z":-25.652332},{"x":-22.08741,"y":-4.6574206,"z":-25.7203},{"x":-22.715206,"y":-4.7309976,"z":-25.7809},{"x":-23.321926,"y":-4.8013716,"z":-25.835047},{"x":-23.89965,"y":-4.867893,"z":-25.883663},{"x":-24.440453,"y":-4.929914,"z":-25.927666},{"x":-24.936407,"y":-4.986784,"z":-25.967978},{"x":-25.379591,"y":-5.0378547,"z":-26.005514},{"x":-25.762077,"y":-5.0824766,"z":-26.041199},{"x":-26.075947,"y":-5.1200013,"z":-26.07595}],"GeneratedEstimatedPathLength":42.195683,"GeneratedLastYRot":90.000015,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_curve_90_b":{"DeathType":12,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.86726636,"y":-1.039943,"z":-8.34879},{"x":4.067121,"y":-1.7248831,"z":-16.104267},{"x":10.039133,"y":-2.807496,"z":-21.906828},{"x":17.750814,"y":-4.1047482,"z":-25.034552},{"x":26.075947,"y":-5.1200023,"z":-26.075949}],"EstimatedPathLength":42.145836,"SourceLastYRot":270,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.027796952,"y":-0.039868973,"z":-0.31539246},{"x":0.05423839,"y":-0.08931973,"z":-0.69968486},{"x":0.0806268,"y":-0.14711228,"z":-1.1449285},{"x":0.108264744,"y":-0.21200676,"z":-1.6431751},{"x":0.13845468,"y":-0.28276312,"z":-2.1864758},{"x":0.1724991,"y":-0.35814142,"z":-2.766882},{"x":0.21170062,"y":-0.4369018,"z":-3.3764458},{"x":0.25736165,"y":-0.51780427,"z":-4.0072184},{"x":0.3107847,"y":-0.5996088,"z":-4.651251},{"x":0.3732723,"y":-0.68107545,"z":-5.300595},{"x":0.446127,"y":-0.76096433,"z":-5.9473014},{"x":0.5306511,"y":-0.83803546,"z":-6.5834227},{"x":0.6281475,"y":-0.911049,"z":-7.2010107},{"x":0.7399184,"y":-0.9787648,"z":-7.7921157},{"x":0.8672664,"y":-1.039943,"z":-8.34879},{"x":1.0071089,"y":-1.0950891,"z":-8.8871},{"x":1.1557556,"y":-1.1459812,"z":-9.4276085},{"x":1.3135972,"y":-1.1932884,"z":-9.969105},{"x":1.4810243,"y":-1.2376797,"z":-10.510381},{"x":1.658428,"y":-1.2798243,"z":-11.050229},{"x":1.8461983,"y":-1.3203909,"z":-11.58744},{"x":2.0447268,"y":-1.360049,"z":-12.120806},{"x":2.2544036,"y":-1.3994672,"z":-12.6491165},{"x":2.4756196,"y":-1.4393147,"z":-13.171165},{"x":2.708766,"y":-1.4802608,"z":-13.685744},{"x":2.9542325,"y":-1.5229743,"z":-14.191642},{"x":3.212411,"y":-1.5681242,"z":-14.687653},{"x":3.483691,"y":-1.6163795,"z":-15.172565},{"x":3.7684646,"y":-1.6684096,"z":-15.645174},{"x":4.067121,"y":-1.7248831,"z":-16.104267},{"x":4.381152,"y":-1.7850649,"z":-16.55336},{"x":4.7111745,"y":-1.847665,"z":-16.996338},{"x":5.0562706,"y":-1.9125204,"z":-17.432564},{"x":5.4155235,"y":-1.9794688,"z":-17.861393},{"x":5.7880144,"y":-2.0483472,"z":-18.282183},{"x":6.172827,"y":-2.1189933,"z":-18.694294},{"x":6.5690413,"y":-2.191244,"z":-19.097084},{"x":6.975741,"y":-2.2649364,"z":-19.48991},{"x":7.3920097,"y":-2.3399088,"z":-19.872133},{"x":7.816926,"y":-2.4159975,"z":-20.243109},{"x":8.249575,"y":-2.49304,"z":-20.602196},{"x":8.689037,"y":-2.5708737,"z":-20.948753},{"x":9.134396,"y":-2.6493363,"z":-21.282139},{"x":9.584736,"y":-2.7282648,"z":-21.601713},{"x":10.039134,"y":-2.8074963,"z":-21.906828},{"x":10.501458,"y":-2.8883321,"z":-22.19734},{"x":10.975519,"y":-2.9718876,"z":-22.47387},{"x":11.460315,"y":-3.0577214,"z":-22.736942},{"x":11.954847,"y":-3.1453927,"z":-22.987083},{"x":12.45811,"y":-3.2344587,"z":-23.22481},{"x":12.969105,"y":-3.3244789,"z":-23.45065},{"x":13.48683,"y":-3.4150114,"z":-23.665123},{"x":14.010287,"y":-3.5056155,"z":-23.868757},{"x":14.538471,"y":-3.5958486,"z":-24.062069},{"x":15.070382,"y":-3.68527,"z":-24.245588},{"x":15.6050205,"y":-3.773438,"z":-24.419832},{"x":16.141384,"y":-3.8599114,"z":-24.58533},{"x":16.678474,"y":-3.9442487,"z":-24.7426},{"x":17.215284,"y":-4.026008,"z":-24.892164},{"x":17.750814,"y":-4.1047482,"z":-25.034552},{"x":18.305277,"y":-4.182726,"z":-25.16672},{"x":18.89425,"y":-4.262058,"z":-25.285898},{"x":19.509783,"y":-4.342091,"z":-25.393019},{"x":20.143934,"y":-4.422175,"z":-25.489008},{"x":20.788755,"y":-4.501657,"z":-25.574797},{"x":21.436304,"y":-4.579886,"z":-25.651314},{"x":22.078636,"y":-4.65621,"z":-25.719486},{"x":22.707802,"y":-4.7299767,"z":-25.780243},{"x":23.315857,"y":-4.800535,"z":-25.834515},{"x":23.894857,"y":-4.867233,"z":-25.883228},{"x":24.43686,"y":-4.9294186,"z":-25.927315},{"x":24.933912,"y":-4.98644,"z":-25.967701},{"x":25.378075,"y":-5.037646,"z":-26.005316},{"x":25.761398,"y":-5.082384,"z":-26.041088},{"x":26.075943,"y":-5.1200027,"z":-26.075949}],"GeneratedEstimatedPathLength":42.295406,"GeneratedLastYRot":270,"GeneratedSmoothing":5}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_duck_b":{"DeathType":9,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":9,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"waterslide_duck_blocked_center":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"waterslide_duck_blocked_left":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-0.0004159069,"y":-0.30619767,"z":-2.5685883},{"x":-0.2232602,"y":-0.64000064,"z":-5.1135054}],"EstimatedPathLength":5.1631455,"SourceLastYRot":4.9999986,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.008130261,"y":-0.07836217,"z":-0.66680706},{"x":0.01621431,"y":-0.19074629,"z":-1.6190128},{"x":-0.0004159069,"y":-0.30619767,"z":-2.5685883},{"x":-0.06647466,"y":-0.42778358,"z":-3.5129037},{"x":-0.15724766,"y":-0.55243677,"z":-4.454589},{"x":-0.22326015,"y":-0.64000064,"z":-5.1135054}],"GeneratedEstimatedPathLength":5.1636124,"GeneratedLastYRot":4.9999986,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_duck_blocked_right":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.11162654,"y":-0.38161045,"z":-2.5567527},{"x":0.44567108,"y":-0.64000064,"z":-5.094046}],"EstimatedPathLength":5.159683,"SourceLastYRot":350.00003,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.020702511,"y":-0.10349976,"z":-0.66358256},{"x":0.053807974,"y":-0.24940068,"z":-1.6112487},{"x":0.11162654,"y":-0.38161045,"z":-2.5567527},{"x":0.21887136,"y":-0.48643798,"z":-3.4979324},{"x":0.3508293,"y":-0.5775744,"z":-4.4369497},{"x":0.4456711,"y":-0.6400007,"z":-5.0940456}],"GeneratedEstimatedPathLength":5.160279,"GeneratedLastYRot":350.00003,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_duck_center_blocked_sides":{"DeathType":6,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":6,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_duck_left_tilt_right":{"DeathType":6,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"waterslide_duck_right_tilt_left":{"DeathType":6,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_end_a":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":-6.1035155e-7},{"x":-0.1393691,"y":-0.79539645,"z":-4.290733},{"x":-0.54644746,"y":-1.9032613,"z":-8.483154},{"x":-1.1987846,"y":-3.365799,"z":-12.533608},{"x":-2.067387,"y":-5.16327,"z":-16.40486},{"x":-3.118355,"y":-7.2759657,"z":-20.066158},{"x":-3.7006795,"y":-7.3068075,"z":-21.800455},{"x":-4.679308,"y":-7.1325974,"z":-24.023975}],"EstimatedPathLength":26.053791,"SourceLastYRot":25,"GeneratedPath":[{"x":0,"y":0,"z":-6.1035155e-7},{"x":-0.026217572,"y":-0.194641,"z":-1.1160539},{"x":-0.0679206,"y":-0.47765937,"z":-2.7088554},{"x":-0.13936912,"y":-0.7953965,"z":-4.290733},{"x":-0.24614793,"y":-1.128403,"z":-5.700747},{"x":-0.3826722,"y":-1.4961281,"z":-7.0998373},{"x":-0.5464475,"y":-1.9032614,"z":-8.483154},{"x":-0.7377161,"y":-2.352097,"z":-9.850459},{"x":-0.9562356,"y":-2.8403406,"z":-11.20199},{"x":-1.1987846,"y":-3.365799,"z":-12.533608},{"x":-1.4655448,"y":-3.928471,"z":-13.845076},{"x":-1.7563347,"y":-4.5283585,"z":-15.136633},{"x":-2.0673873,"y":-5.1632705,"z":-16.40486},{"x":-2.4215586,"y":-5.921258,"z":-17.712215},{"x":-2.7959926,"y":-6.7142706,"z":-18.996243},{"x":-3.118355,"y":-7.2759657,"z":-20.066158},{"x":-3.3324997,"y":-7.4480524,"z":-20.768879},{"x":-3.4945729,"y":-7.3888216,"z":-21.257488},{"x":-3.7006795,"y":-7.3068075,"z":-21.800455},{"x":-4.0337787,"y":-7.2574744,"z":-22.587742},{"x":-4.4109116,"y":-7.185357,"z":-23.429388},{"x":-4.679308,"y":-7.132596,"z":-24.023975}],"GeneratedEstimatedPathLength":26.09085,"GeneratedLastYRot":25,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":9,"DeathType":11,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":2.24,"z":0},"CameraFollowDistance":6,"CameraFocusDistance":3.2,"CameraPitchHeight":0.96,"CameraChangeRate":0.1,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":2}}},"waterslide_junction_a":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-0.00004394531,"y":-0.2541487,"z":-1.5378761},{"x":0.04791809,"y":-0.43113866,"z":-3.0756624},{"x":0.34882933,"y":-0.60540485,"z":-4.584389},{"x":0.84734696,"y":-0.79161984,"z":-6.039201},{"x":1.4821026,"y":-0.9843688,"z":-7.439471},{"x":3.4438202,"y":-1.4793875,"z":-10.740855},{"x":5.7281003,"y":-1.920002,"z":-13.82886}],"EstimatedPathLength":15.492506,"SourceLastYRot":315,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-0.00004394531,"y":-0.2541487,"z":-1.5378761},{"x":0.04791809,"y":-0.43113866,"z":-3.0756624},{"x":0.34882933,"y":-0.60540485,"z":-4.584389},{"x":0.84734696,"y":-0.79161984,"z":-6.039201},{"x":1.4821026,"y":-0.9843688,"z":-7.439471},{"x":3.4438202,"y":-1.4793875,"z":-10.740855},{"x":5.7281003,"y":-1.920002,"z":-13.82886}],"GeneratedEstimatedPathLength":15.492506,"GeneratedLastYRot":315,"GeneratedSmoothing":1},{"SourcePath":[{"x":0,"y":0,"z":0},{"x":-0.00004394531,"y":-0.2541487,"z":-1.5378761},{"x":-0.048018187,"y":-0.4311383,"z":-3.075659},{"x":-0.34888306,"y":-0.6054052,"z":-4.584392},{"x":-0.847373,"y":-0.79162097,"z":-6.0392084},{"x":-1.4821118,"y":-0.9843706,"z":-7.439483},{"x":-3.4438174,"y":-1.4793895,"z":-10.740868},{"x":-5.7281003,"y":-1.920002,"z":-13.82886}],"EstimatedPathLength":15.492478,"SourceLastYRot":44.999992,"GeneratedPath":[{"x":0,"y":0,"z":0},{"x":-0.00004394531,"y":-0.2541487,"z":-1.5378761},{"x":-0.048018187,"y":-0.4311383,"z":-3.075659},{"x":-0.34888306,"y":-0.6054052,"z":-4.584392},{"x":-0.847373,"y":-0.79162097,"z":-6.0392084},{"x":-1.4821118,"y":-0.9843706,"z":-7.439483},{"x":-3.4438174,"y":-1.4793895,"z":-10.740868},{"x":-5.7281003,"y":-1.920002,"z":-13.82886}],"GeneratedEstimatedPathLength":15.492478,"GeneratedLastYRot":44.999992,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}},"waterslide_start_a":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-3.35063e-7,"y":-0.08000062,"z":-5.1200004},{"x":1.5258789e-7,"y":-0.5556987,"z":-10.240001}],"EstimatedPathLength":10.262676,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.1733907e-7,"y":-0.006085438,"z":-1.3274076},{"x":-2.7190737e-7,"y":-0.021059833,"z":-3.223704},{"x":-3.35063e-7,"y":-0.08000062,"z":-5.1200004},{"x":-2.153933e-7,"y":-0.22687417,"z":-7.016297},{"x":-4.3109765e-9,"y":-0.41771415,"z":-8.912594},{"x":1.5258783e-7,"y":-0.5556987,"z":-10.240001}],"GeneratedEstimatedPathLength":10.2634,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"CollisionInfo":{"Trigger":8,"DeathType":11,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}},"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_straight_a":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_straight_b":{"DeathType":11,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.2269018e-9,"y":-0.64000034,"z":-5.1200004}],"EstimatedPathLength":5.1598454,"SourceLastYRot":0,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":-1.2269018e-9,"y":-0.64000034,"z":-5.1200004}],"GeneratedEstimatedPathLength":5.1598454,"GeneratedLastYRot":0,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0}},"waterslide_straight_c":{"DeathType":10,"DeathShakeCamera":0,"Paths":[{"SourcePath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.06063593,"y":-0.38061893,"z":-2.559139},{"x":0.2232602,"y":-0.64000064,"z":-5.1135054}],"EstimatedPathLength":5.1606464,"SourceLastYRot":355,"GeneratedPath":[{"x":0,"y":3.6379787e-14,"z":2.842171e-14},{"x":0.011943081,"y":-0.103169255,"z":-0.6636573},{"x":0.030623488,"y":-0.24862951,"z":-1.6116633},{"x":0.06063593,"y":-0.38061893,"z":-2.559139},{"x":0.11331245,"y":-0.48566678,"z":-3.5055542},{"x":0.17732102,"y":-0.5772438,"z":-4.451439},{"x":0.2232602,"y":-0.6400006,"z":-5.1135054}],"GeneratedEstimatedPathLength":5.1608753,"GeneratedLastYRot":355,"GeneratedSmoothing":1}],"EnterPiece":{"TutorialMessageType":0,"DisplayMessageText":null,"SetPlayerPowerPointsToMax":0,"ForceCoinsPlacementOnTrackPiece":0,"CoinPlacementLocation":7,"ForcePickupPlacementOnTrackPiece":0,"PickupTypeToPlace":-1,"TutorialSoundEffect":0},"CollisionInfo":{"Trigger":4,"DeathType":10,"ShakeCamera":0,"Transition":{"CameraFixedRotation":{"x":0,"y":0,"z":0},"CameraFocusRotation":{"x":0,"y":0,"z":0},"CameraFollowOffset":{"x":0,"y":0,"z":0},"CameraFocusOffset":{"x":0,"y":0,"z":0},"CameraFollowDistance":0,"CameraFocusDistance":0,"CameraPitchHeight":0,"CameraChangeRate":0,"FocusRotationSettings":0,"FixedRotationSettings":0,"FollowOffsetSettings":0,"FocusOffsetSettings":0,"FollowDistanceSettings":0,"FocusDistanceSettings":0,"PitchHeightSettings":0,"ChangeRateSettings":0}}}}' + ); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.Character = void 0); + const r = n(62), + o = n(40), + a = n(19), + s = n(48); + t.Character = class { + constructor() { + (this._characterMeshFileURL = "assets/characters/guy_dangerous/guy_dangerous.glb"), + (this._mineCartMeshFileURL = "assets/tracks/Machu/MineCart/mine_cart_a_prefab.glb"), + (this.skeletons = []), + (this.animationGroups = []), + (this.animationGroupsCart = []); + } + loadAssetAsync(e) { + return i(this, void 0, void 0, function* () { + const t = r.MeshBuilder.CreateBox("playerRoot", { size: 0.5 }); + t.isVisible = !1; + const n = yield this._loadPlayer(t, e); + this._createCollider(n), yield this._loadMineCart(e); + const i = this.playerTransform.position.clone(); + (i.y += 1.5), this.playerTransform.setPivotPoint(i, r.Space.LOCAL); + }); + } + _createShadow(e) { + (this.playerShadow = r.MeshBuilder.CreatePlane("playerShadow", { width: 0.8, height: 1.3 }, e)), + this.playerShadow.rotate(r.Axis.X, r.Tools.ToRadians(90), r.Space.LOCAL), + (this.playerShadow.renderingGroupId = o.ETR2RenderingGroup.TRACK_PIECES), + (this.playerShadow.checkCollisions = !1), + (this.playerShadow.physicsImpostor = null), + (this.playerShadow.alwaysSelectAsActiveMesh = !0), + this.playerShadow.setEnabled(!1); + const t = new r.Texture("assets/textures/BlobShadow." + a.WebUtils.textureExtension, e, !1, !1), + n = new r.StandardMaterial("playerShadowMat", e); + (n.disableLighting = !0), + (n.emissiveTexture = t), + (n.emissiveTexture.hasAlpha = !0), + (n.diffuseTexture = t), + (n.diffuseTexture.hasAlpha = !0), + (n.useAlphaFromDiffuseTexture = !0), + (n.alpha = 0.7), + (this.playerShadow.material = n); + } + _createWaterTrailLeft(e) { + (this.waterTrailLeft = new r.ParticleSystem("waterTrailLeft", 200, e)), + this.waterTrailLeft.createPointEmitter(new r.Vector3(0.1, 0.5, -3), new r.Vector3(0.1, 0.5, -3)), + (this.waterTrailLeft.isBillboardBased = !0), + (this.waterTrailLeft.isLocal = !0), + (this.waterTrailLeft.emitRate = 5), + (this.waterTrailLeft.particleTexture = new r.Texture("assets/effects/effects_transparent." + a.WebUtils.textureExtension, e, !1, !0, r.Texture.LINEAR_LINEAR)), + (this.waterTrailLeft.gravity = r.Vector3.Zero()), + (this.waterTrailLeft.updateSpeed = 2), + (this.waterTrailLeft.minLifeTime = 60), + (this.waterTrailLeft.maxLifeTime = 65), + (this.waterTrailLeft.blendMode = r.ParticleSystem.BLENDMODE_STANDARD), + (this.waterTrailLeft.minSize = 0.01), + (this.waterTrailLeft.maxSize = 0.01), + this.waterTrailLeft.addSizeGradient(0, 0.005), + this.waterTrailLeft.addSizeGradient(0.3, 0.15), + this.waterTrailLeft.addSizeGradient(1, 0.4), + this.waterTrailLeft.addColorGradient(0, new r.Color4(1, 1, 1, 0.3)), + this.waterTrailLeft.addColorGradient(0.5, new r.Color4(1, 1, 1, 0.2)), + this.waterTrailLeft.addColorGradient(1, new r.Color4(1, 1, 1, 0)), + (this.waterTrailLeft.minInitialRotation = 0), + (this.waterTrailLeft.maxInitialRotation = Math.PI), + (this.waterTrailLeft.startSpriteCellID = 3), + (this.waterTrailLeft.endSpriteCellID = 3), + (this.waterTrailLeft.spriteCellHeight = 128), + (this.waterTrailLeft.spriteCellWidth = 128), + (this.waterTrailLeft.spriteCellChangeSpeed = 0), + (this.waterTrailLeft.isAnimationSheetEnabled = !0), + (this.waterTrailLeft.renderingGroupId = o.ETR2RenderingGroup.PARTICLES), + this.waterTrailLeft.start(); + } + _loadPlayer(e, t) { + return i(this, void 0, void 0, function* () { + const n = yield r.SceneLoader.ImportMeshAsync(null, this._characterMeshFileURL, void 0, t), + i = n.meshes[0]; + n.meshes.forEach((e) => (e.alwaysSelectAsActiveMesh = !0)), + n.meshes.forEach((e) => (e.alphaIndex = 2)), + i.setDirection(new r.Vector3(0, 0, 1)), + i.scaling.scaleInPlace(0.45), + (i.isVisible = !1), + i.setParent(e), + (this.playerTransform = e), + this._createShadow(t), + (this.skeletons = n.skeletons), + (this.animationGroups = n.animationGroups); + const a = n.meshes[1]; + (a.renderingGroupId = o.ETR2RenderingGroup.CHARACTER), + (this.material = a.material), + (this.material.unlit = !0), + (this.leftHandBone = n.skeletons[0].bones.find((e) => "BoneFBXASC032LFBXASC032Hand" == e.name)), + (this.rightHandBone = n.skeletons[0].bones.find((e) => "BoneFBXASC032RFBXASC032Hand" == e.name)); + const s = n.meshes[2], + c = n.meshes[3], + l = n.meshes[4], + u = n.meshes[5]; + return ( + (s.isVisible = !1), + (u.isVisible = !1), + (c.isVisible = !1), + (l.isVisible = !1), + (this.waterSplashFx = o.GameController.instance.particle.waterSplashTrailParticle), + (this.waterSplashFx.emitter = u), + (this.dustFx = o.GameController.instance.particle.dustTrailParticle), + (this.dustFx.emitter = i), + (this.fireCollisionSmokeFX = o.GameController.instance.particle.fireCrashSmokePartile), + (this.waterDuckFx = o.GameController.instance.particle.playerDuckWaterSplashParticle), + (this.waterDuckFx.emitter = l), + this._createWaterTrailLeft(t), + (this.waterTrailLeft.emitter = s), + (this.waterTrailRight = this.waterTrailLeft.clone("waterTrailRight", s)), + (this.waterTrailRight.direction1.x *= -1), + (this.waterTrailRight.direction2.x *= -1), + this.waterTrailLeft.stop(), + this.waterTrailRight.stop(), + i + ); + }); + } + startWaterTrail() { + this.waterTrailRight.start(), this.waterTrailLeft.start(); + } + stopWaterTrail() { + this.waterTrailRight.stop(), this.waterTrailLeft.stop(); + } + _loadMineCart(e) { + return i(this, void 0, void 0, function* () { + const t = yield r.SceneLoader.ImportMeshAsync(null, this._mineCartMeshFileURL, void 0, e), + n = t.meshes[0]; + for (const e of t.meshes) e instanceof r.Mesh && ((e.material = o.GameController.instance.track.trackMaterial), (e.renderingGroupId = o.ETR2RenderingGroup.CHARACTER), e.name.includes("Collider") && (e.isVisible = !1)); + (this.playerMineCartTransform = n), + (this.playerMineCartTransform.isVisible = !1), + this.playerMineCartTransform.setDirection(new r.Vector3(0, 0, 1)), + this.playerMineCartTransform.setParent(this.playerTransform), + this.playerMineCartTransform.setEnabled(!0), + this.setPlayerCartVisibility(!1), + (this.animationGroupsCart = t.animationGroups); + }); + } + _createCollider(e) { + (this.playerCollider = r.MeshBuilder.CreateCylinder("playerSphere", { height: 1.5, diameter: 0.7 })), + this.playerCollider.setParent(e), + (this.playerCollider.position.y += 1.5), + (this.playerCollider.renderingGroupId = o.ETR2RenderingGroup.CHARACTER), + (this.playerCollider.visibility = s.GameConfig.showPlayerCollider ? 0.5 : 0), + (this.playerColliderDefaulScale = this.playerCollider.scaling), + (this.playerColliderDefaultPosition = this.playerCollider.position); + } + setPlayerCartVisibility(e) { + for (const t of this.playerMineCartTransform.getChildMeshes()) t instanceof r.Mesh && !t.name.includes("Collider") && (t.isVisible = e); + } + setPlayerColliderToDefault() { + (this.playerCollider.scaling = this.playerColliderDefaulScale), (this.playerCollider.position = this.playerColliderDefaultPosition); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.parseToMap = t.parseFromMap = t.LocalStore = void 0); + (t.LocalStore = new (class { + isLocalStorageSupported() { + let e = !1; + try { + window.localStorage, (e = !0); + } catch (t) { + e = !1; + } + return e; + } + createCookie(e, t, n) { + let i = ""; + if (n) { + const e = new Date(); + e.setTime(e.getTime() + 24 * n * 60 * 60 * 1e3), (i = "; expires=" + e.toUTCString()); + } + document.cookie = e + "=" + t + i + "; path=/"; + } + readCookie(e) { + const t = e + "=", + n = document.cookie.split(";"); + for (let e = 0; e < n.length; e++) { + let i = n[e]; + for (; " " == i.charAt(0); ) i = i.substring(1, i.length); + if (0 == i.indexOf(t)) return i.substring(t.length, i.length); + } + return null; + } + setItem(e, t) { + this.isLocalStorageSupported() ? window.localStorage.setItem(e, t) : this.createCookie(e, t); + } + getItem(e) { + return this.isLocalStorageSupported() ? window.localStorage.getItem(e) : this.readCookie(e); + } + })()), + (t.parseFromMap = (e) => { + const t = {}; + for (const [n, i] of e) t[n] = i; + return t; + }), + (t.parseToMap = (e) => { + const t = new Map(); + for (const n in e) t.set(+n, e[n]); + return t; + }); + }, + function (e) { + e.exports = JSON.parse( + '{"Sections":[{"Group":"Founders","People":["Natalia Luckyanova","Keith Shepherd"]},{"Group":"Chief Executive Officer","People":["Walter Devins"]},{"Group":"Product Owner","People":["Eve Chang"]},{"Group":"Production","People":["Cody Bradley","--","Jeremy Albert","Brian Glass","Ross LeMere","Bryan Walker"]},{"Group":"Art Director","People":["Marika Orehek"]},{"Group":"Art Project Lead","People":["Lillian Matuszek"]},{"Group":"Art","People":["Danika Bird","Dennis Bruber","Xi Chen","Helen Lee","Riley Ribatto","Ula Wigierska","--","Diego Agasso","Jon Bass","Jason Flack","Fred Lang","Robert Rose","Kiril Tchangov","Justine Warburton Hamer","Jeremiah Washburn","Robert Zamber"]},{"Group":"Design Project Lead","People":["Jeff Shepherd"]},{"Group":"Design Team","People":["Baqir Shah","Josh Sweeney","Josiah Wallace","--","Jason Stone"]},{"Group":"Engineering Technical Director","People":["Tal Arrowood"]},{"Group":"Engineering Project Lead","People":["Josh Wilson"]},{"Group":"Engineering","People":["Ryan George","Joshua Good","Justin Hair","Ian Jensen","Ben Johnson","Bryan Kisby","--","Jessica Agee","Nic Allen","Shayne Guiliano","Brian Lhota","Rob McLaughlin","Jay Nakai","Richard Sandham","Scott Sherman"]},{"Group":"Quality Assurance Manager","People":["Michael Ruegg"]},{"Group":"Quality Assurance","People":["Tony Halstead","Mark Smith","Jake Flint","Lauren Renaux","Kale Keriazes","--","Joshua Taylor"]},{"Group":"Social Media Manager","People":["Brittany Watson"]},{"Group":"Customer Service","People":["Javonda Hunt"]},{"Group":"Lead Data Scientist","People":["Clay Heaton","--","Paul Ruddle II"]},{"Group":"Director of Finance and Human Resources","People":["Cindy Vice"]},{"Group":"HR Manager","People":["Anna Zimmerman"]},{"Group":"Interns","People":["DJ Schilens","--","Chris Collins"]},{"Group":"Music","People":["Cris Velasco","Guy Whitmore"]},{"Group":"Writing","People":["Matt King"]},{"Group":"Special Thanks","People":["Leandro Basallo","Anthony Pecorella"]},{"Group":"Fan Contributions","People":["Sonny Lee Leko","Stevie Ray Ramsey"]},{"Group":"Xansr Team","People":["Simon Banerjee","Nitu Chiring","Shiraz Imam","Vaibhav Kataria","Ankit Kushwah","Pralay Mistri","Swapnil Tamgadge"]}],"Additional":[["Officially Licensed Product of","National Football League Players Inc.","Copyright 2014"]]}' + ); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.MonkeyController = void 0); + const r = n(62), + o = n(40), + a = n(156), + s = n(29), + c = n(139); + t.MonkeyController = class { + constructor(e) { + (this._monkeyState = a.MonkeyState.None), + (this._characterMeshFileURL = "assets/characters/demon_monkey/demon_monkey_chaser.glb"), + (this.MONKEY_DEFAULT_POSITION = new r.Vector3(0, 0, 20)), + (this.DISAPPEAR_FINAL_OFFSET = 6), + (this._disappearTime = 2), + (this._chaseOffset = 3), + (this._tauntOffset = 1), + (this._idleOffset = 10), + (this._maxStumbleForDeath = 2), + (this._chaseDuration = 8), + (this._disappearTimeLeft = this._disappearTime), + (this._chaseTime = 4), + (this._stumbleCounts = 0), + (this._isInitialized = !1), + (this._enemyOffset = 10), + (this._isPowerUpActive = !1), + (this._scene = e), + (this._monkeyState = a.MonkeyState.None); + } + goIdle() { + this._setState(a.MonkeyState.Idle); + } + initialize() { + this._initMonkey(), + s.EventHandler.instance.addListener(s.EventID.OnPowerupStart, () => { + (this._isPowerUpActive = !0), this._setState(a.MonkeyState.Idle); + }), + s.EventHandler.instance.addListener(s.EventID.OnPowerupComplete, () => { + this._isPowerUpActive = !1; + }), + s.EventHandler.instance.addListener(s.EventID.OnPlayerDeath, (e) => { + if (this._monkeyState == a.MonkeyState.Chase) { + e == a.DeathType.DeathByFall ? this._setState(a.MonkeyState.Idle) : this._setState(a.MonkeyState.Taunt); + } + }), + s.EventHandler.instance.addListener(s.EventID.OnPlayerJumpState, () => { + const e = o.GameController.instance.character.params.currentTrackPiece; + this.checkForObstacle(e) && a.MonkeyState.Chase == this._monkeyState && this._setState(a.MonkeyState.Jump); + }), + s.EventHandler.instance.addListener(s.EventID.OnPlayerRunState, () => { + this._monkeyState == a.MonkeyState.Jump && this._setState(a.MonkeyState.Chase); + }), + s.EventHandler.instance.addListener(s.EventID.OnPlayGame, (e) => { + e || (s.EventHandler.instance.fireEvent(s.EventID.PlaySFX, c.SoundID.MonkeyRoar), this._setState(a.MonkeyState.Chase)); + }), + s.EventHandler.instance.addListener(s.EventID.OnPlayerEnteringNewZone, () => { + this._setState(a.MonkeyState.Idle); + }), + s.EventHandler.instance.addListener(s.EventID.OnStumble, () => { + if (!o.GameController.instance.tutorial.isEnabled) + if ((this._stumbleCounts++, this._stumbleCounts >= this._maxStumbleForDeath)) { + this._setState(a.MonkeyState.Taunt); + const e = o.GameController.instance.character.player; + e.attachToBone(this._handBone, this._monkey), (e.position = r.Vector3.Zero()), (e.position.y -= 1), o.GameController.instance.character.deathByMonkey(); + } else this._stumbleCounts > 0 && (s.EventHandler.instance.fireEvent(s.EventID.PlaySFX, c.SoundID.MonkeyRoar), this._setState(a.MonkeyState.Chase)); + }); + } + checkForObstacle(e) { + if (e.SelectedDefinition.IsJumpOver || e.SelectedDefinition.IsGenericObstacle || e.SelectedDefinition.IsStumble || e.SelectedDefinition.isObstacle()) return !0; + const t = Math.min(1, e.NextTrackPieces.length); + for (let n = 0; n < t; n++) { + const t = e.NextTrackPieces[n].SelectedDefinition; + if (t.IsStumble || t.IsGenericObstacle) return !0; + } + return !1; + } + preUpdate() { + this._isInitialized && o.GameController.instance.isGameRunning && this._updateForState(); + } + _updateForState() { + const e = this._scene.getEngine().getDeltaTime() / 1e3; + switch (this._monkeyState) { + case a.MonkeyState.Chase: + this._monkey.isEnabled() || this._monkey.setEnabled(!0), + (this._chaseTime -= e), + this._chaseTime < 0 && ((this._chaseTime = this._chaseDuration), this._setState(a.MonkeyState.Disappearing, !1)), + this._updatePosition(); + break; + case a.MonkeyState.Jump: + this._updatePosition(); + break; + case a.MonkeyState.Disappearing: + if (((this._disappearTimeLeft -= e), this._disappearTimeLeft < 0)) this._setState(a.MonkeyState.Idle); + else { + const e = this._disappearTimeLeft / this._disappearTime; + (this._enemyOffset = this.DISAPPEAR_FINAL_OFFSET * Math.abs(1 - e) + e * this._chaseOffset), this._updatePosition(); + } + } + } + postUpdate() {} + pause() { + this._currentAnimation.pause(); + } + resume() { + this._currentAnimation.play(); + } + reset() { + this._monkey.setEnabled(!1), (this._enemyOffset = 2), (this._chaseTime = 4), (this._stumbleCounts = 0); + const e = this._playerPosition(); + this._monkey.lookAt(e), (this._monkey.position = this.MONKEY_DEFAULT_POSITION), this._setState(a.MonkeyState.Idle); + } + _updatePosition() { + const e = this._playerPosition().clone(); + this._monkeyState != a.MonkeyState.Jump && (e.y = o.GameController.instance.character.params.currentPosition.y); + const t = this._playerForward(), + n = new r.Vector3(this._enemyOffset, 0, this._enemyOffset); + (this._monkey.position = e.add(t.multiply(n))), this._monkey.lookAt(e); + } + _playerForward() { + if (null != o.GameController.instance.character.player) { + let e = o.GameController.instance.character.player.forward; + return null == e && (e = new r.Vector3(0, 0, 0)), e; + } + return new r.Vector3(0, 0, 0); + } + _playerPosition() { + if (null != o.GameController.instance.character.player) { + let e = o.GameController.instance.character.player.position; + return null == e && (e = new r.Vector3(0, 0, 0)), e; + } + return new r.Vector3(0, 0, 0); + } + _setState(e, t = !0) { + switch (((this._previousAnimation = this._currentAnimation), (this._monkeyState = e), this._monkeyState)) { + case a.MonkeyState.Disappearing: + this._disappearTimeLeft = this._disappearTime; + break; + case a.MonkeyState.Idle: + this._monkey.setEnabled(!1), (this._stumbleCounts = 0), (this._enemyOffset = this._idleOffset), (this._currentAnimation = this._idleAnimation); + break; + case a.MonkeyState.Jump: + this._monkey.setEnabled(!0), (this._currentAnimation = this._jumpAnimation); + break; + case a.MonkeyState.Chase: + this._monkey.setEnabled(!0), (this._currentAnimation = this._runAnimation), (this._enemyOffset = this._chaseOffset); + break; + case a.MonkeyState.Taunt: + this._monkey.setEnabled(!0), (this._enemyOffset = this._tauntOffset), (this._currentAnimation = this._tauntAnimation), this._updatePosition(); + } + t && this._playAnimation(); + } + _playAnimation() { + let e = !1; + null != this._previousAnimation && (this._previousAnimation.setWeightForAllAnimatables(0), this._previousAnimation.stop()), + this._currentAnimation.setWeightForAllAnimatables(1), + this._monkeyState == a.MonkeyState.Chase && (e = !0), + this._currentAnimation.start(e); + } + _initMonkey() { + return i(this, void 0, void 0, function* () { + const e = yield r.SceneLoader.ImportMeshAsync(null, this._characterMeshFileURL, void 0, this._scene); + e.meshes.forEach((e) => (e.cullingStrategy = r.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY)); + const t = e.meshes[0]; + (t.position = this.MONKEY_DEFAULT_POSITION), t.setDirection(new r.Vector3(0, 0, 1)), (t.scaling.x = 0.9), (t.scaling.y = 0.9), (t.scaling.z = 0.9); + const n = e.meshes[1]; + n.renderingGroupId = o.ETR2RenderingGroup.CHARACTER; + (n.material.unlit = !0), + (this._handBone = e.skeletons[0].bones.find((e) => "Bone_L_Hand" == e.name)), + (this._monkey = t), + this._monkey.setEnabled(!1), + this._setupAnimations(e.animationGroups), + (this._isInitialized = !0), + this._setState(a.MonkeyState.Idle); + }); + } + _setupAnimations(e) { + (this._animationGroups = e), + (this._idleAnimation = this._animationGroups.find((e) => "Idle01" === e.name)), + (this._runAnimation = this._animationGroups.find((e) => "Run01" === e.name)), + (this._tauntAnimation = this._animationGroups.find((e) => "Taunt01" === e.name)), + (this._jumpAnimation = this._animationGroups.find((e) => "Jump01" === e.name)); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.GameInputContoller = void 0); + const i = n(62), + r = n(29), + o = n(48); + t.GameInputContoller = class { + constructor(e) { + (this._minimumSwipeDistance = 50), + (this._minimumSwipeVelocity = 100), + (this._minimumAngle = 40), + (this._inputsActive = !0), + (this.onFirstClick = () => { + r.EventHandler.instance.fireEvent(r.EventID.OnFirstUserInput), window.removeEventListener("click", this.onFirstClick); + }), + (this._scene = e); + } + initialize() { + this._scene.actionManager || (this._scene.actionManager = new i.ActionManager(this._scene)), (this._keydownMap = {}), (this._keyupMap = {}); + const e = this; + this._scene.actionManager.registerAction( + new i.ExecuteCodeAction(i.ActionManager.OnKeyDownTrigger, function (t) { + t.sourceEvent.repeat || 0 == this._inputsActive || (e._keydownMap[t.sourceEvent.key] = "keydown" == t.sourceEvent.type); + }) + ), + this._scene.actionManager.registerAction( + new i.ExecuteCodeAction(i.ActionManager.OnKeyUpTrigger, function (t) { + t.sourceEvent.repeat || 0 == this._inputsActive || (e._keyupMap[t.sourceEvent.key] = "keyup" == t.sourceEvent.type); + }) + ), + this._scene.onPointerObservable.add(this._updateFromMouse.bind(this)), + this._attachWindowEvents(), + r.EventHandler.instance.addListener(r.EventID.OnStopInputs, () => { + this._inputsActive = !1; + }), + r.EventHandler.instance.addListener(r.EventID.OnStartInputs, () => { + this._inputsActive = !0; + }); + } + _attachWindowEvents() { + window.addEventListener( + "keydown", + (e) => { + e.preventDefault(), + o.GameConfig.canShowInspector && + e.shiftKey && + e.ctrlKey && + e.altKey && + (this._scene.debugLayer.isVisible() + ? this._scene.debugLayer.hide() + : (this._scene.debugLayer.show(), (document.getElementById("scene-explorer-host").style.zIndex = "10"), (document.getElementById("inspector-host").style.zIndex = "10"))); + }, + { passive: !1 } + ), + window.addEventListener("click", this.onFirstClick); + } + preUpdate() { + this._updateFromKeyboard(), this._validTouch && (this._startTime += this._scene.deltaTime); + } + postUpdate() {} + pause() { + this._inputsActive = !1; + } + resume() { + this._inputsActive = !0; + } + reset() {} + _updateFromKeyboard() { + (this._keydownMap.ArrowUp || this._keydownMap.w || this._keydownMap.W) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Jump"), + (this._keydownMap.ArrowDown || this._keydownMap.s || this._keydownMap.S) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Slide"), + (this._keydownMap.ArrowLeft || this._keydownMap.a || this._keydownMap.A) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Left"), + (this._keydownMap.ArrowRight || this._keydownMap.d || this._keydownMap.D) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Right"), + (this._keydownMap[" "] || this._keydownMap.Space) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Space"), + (this._keydownMap.G || this._keydownMap.g) && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "SwitchCamera"), + this._keydownMap.Escape && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Escape"), + (this._keydownMap = {}), + (this._keyupMap = {}); + } + _updateFromMouse(e) { + switch (e.type) { + case i.PointerEventTypes.POINTERDOWN: + this._validTouch || ((this._startPointerVector = new i.Vector2(e.event.x, e.event.y)), (this._startTime = 0), (this._validTouch = !0)); + break; + case i.PointerEventTypes.POINTERUP: + if (this._validTouch) { + this._endPointerVector = new i.Vector2(e.event.x, e.event.y); + const t = this._endPointerVector.subtract(this._startPointerVector), + n = Math.sqrt(t.x * t.x + t.y * t.y); + if (n / (this._startTime / 1e3) > this._minimumSwipeVelocity && n > this._minimumSwipeDistance) { + t.normalize(); + let e = i.Vector2.Dot(t, new i.Vector2(1, 0)); + if (((e = (360 * Math.acos(e)) / (2 * Math.PI)), e < this._minimumAngle)) r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Right"); + else if (180 - e < this._minimumAngle) r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Left"); + else { + let e = i.Vector2.Dot(t, new i.Vector2(0, 1)); + (e = (360 * Math.acos(e)) / (2 * Math.PI)), + e < this._minimumAngle ? r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Slide") : 180 - e < this._minimumAngle && r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Jump"); + } + } + this._validTouch = !1; + } + break; + case i.PointerEventTypes.POINTERMOVE: + break; + case i.PointerEventTypes.POINTERDOUBLETAP: + r.EventHandler.instance.fireEvent(r.EventID.OnKeyPress, "Space"); + } + } + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TrackController = void 0); + const r = n(62), + o = n(133), + a = n(40), + s = n(231), + c = n(29), + l = n(274), + u = n(178), + h = n(150), + d = n(48), + p = n(276); + t.TrackController = class { + constructor(e) { + (this._xCounts = 0), + (this._maxPiecesToAddPerUpdate = 2), + (this._growDistance = 60), + (this._canExtendTrack = !0), + (this._tempTrackPieceList = []), + (this._toRemoveTrackPieces = []), + (this._enabledZones = []), + (this._stopRemovalOnDeath = !1), + (this.statueAnimationInfos = new Array()), + (this._scene = e), + (this._trackMaterialProvider = new l.TrackMaterialProvider(e)), + (this._trackAssetPool = new p.TrackAssetsPoolManager()); + } + getFillMeshMaterial() { + return this._trackMaterialProvider.waterBridgeMaterial; + } + set stopRemovalOnDeath(e) { + this._stopRemovalOnDeath = e; + } + initialize() { + return i(this, void 0, void 0, function* () { + ([this._regionInfo, this._regionPacing, this._regionZoneInfos, this._regionZonePeices] = s.TrackHelper.loadConfigs()), + yield this._trackAssetPool.initialize(this._scene, this._regionZoneInfos, this._regionZonePeices, this._trackMaterialProvider), + this._loadInitialTrack(); + }); + } + preUpdate() { + this._trackMaterialProvider.update(), this._trackAssetPool.update(); + } + postUpdate() {} + pause() {} + resume() {} + reset() { + this._trackAssetPool.resetPool(), (this._tempTrackPieceList = []), (this._toRemoveTrackPieces = []), (this._canExtendTrack = !1), (this._stopRemovalOnDeath = !1), this._loadInitialTrack(); + } + _loadInitialTrack() { + let e; + if ( + ("done" != a.GameController.instance.gameState.flagsData.tutorialPhaseState && (e = a.GameController.instance.tutorial.enableAndGetSection(this._regionZoneInfos)), + null == e && a.GameController.instance.tutorial.needZoneTutorial && a.GameController.instance.tutorial.shouldRestartTutorial) + ) { + const t = a.GameController.instance.tutorial.enableAndGetSectionZone(void 0); + e = null != t ? t.Queue : void 0; + } + null == e && ((e = this._regionInfo.StartingSection), a.GameController.instance.tutorial.checkZoneTutorials()), this._loadInitialTrackFromSection(e); + } + _loadInitialTrackFromSection(e) { + this._regionPacing.initialize(this._regionZoneInfos), + (this._rootTrackPiece = this._createStartingTrackPiece(e.Pieces[0].ID)), + this._rootTrackPiece.Queue.Pieces.push(...e.Pieces), + this._rootTrackPiece.Queue.Pieces.shift(), + (this._toRemoveRootTrackPiece = this._rootTrackPiece), + (this._initialTrackPiece = this._rootTrackPiece), + s.TrackHelper.createWorldSpline(this._rootTrackPiece, r.Vector3.Zero(), 0, this._scene); + d.GameConfig.IS_DEBUG && + d.GameConfig.DEFAULT_ZONES.length != d.GameConfig.DEBUG_SELECTED_ZONES.length && + d.GameConfig.MAX_START_PIECES > 0 && + d.GameConfig.MAX_START_PIECES < this._rootTrackPiece.Queue.Pieces.length && + this._rootTrackPiece.Queue.Pieces.splice(d.GameConfig.MAX_START_PIECES, this._rootTrackPiece.Queue.Pieces.length - d.GameConfig.MAX_START_PIECES), + this._attachPiecesOverDistance(this._rootTrackPiece, this._growDistance), + c.EventHandler.instance.fireEvent(c.EventID.OnTrackRootInit, this._initialTrackPiece); + } + get initialTrackPiece() { + return this._initialTrackPiece; + } + _findPieceDefinition(e) { + let t; + for (const [, n] of this._regionZoneInfos) { + for (const i of n.Definitions) + if (i.ID.isEquals(e)) { + t = i; + break; + } + if (null != t) break; + } + return t; + } + _createStartingTrackPiece(e) { + const t = new o.TrackPiece(), + n = this._findPieceDefinition(e), + i = n.Variations[0]; + return ( + (t.trackInfo = this._regionZonePeices.get(e.ZoneID).get(i.PieceName)), + (t.assetInfo = this._trackAssetPool.getTrackPiece(e.ZoneID, i.PieceName)), + t.assetInfo.rootMesh.setEnabled(!0), + (t.assetInfo.rootMesh.position = r.Vector3.Zero()), + (t.SelectedDefinition = n), + (t.SelectedVariationDefinition = i), + d.GameConfig.showPathPoints && s.TrackHelper.drawDebugPathSplines(t, this._scene), + this._startTrackPieceOptions(t), + t + ); + } + _createTrackPiece(e, t) { + const n = new o.TrackPiece(), + i = this._findPieceDefinition(e); + let a = void 0; + if (null != t && t.length > 0) for (const e of i.Variations) e.PieceName == t && (a = e); + return ( + null == a && (a = i.getVariation()), + (n.trackInfo = this._regionZonePeices.get(e.ZoneID).get(a.PieceName)), + (n.assetInfo = this._trackAssetPool.getTrackPiece(e.ZoneID, a.PieceName)), + n.assetInfo.rootMesh.setEnabled(!0), + (n.assetInfo.rootMesh.position = r.Vector3.Zero()), + (n.SelectedDefinition = i), + (n.SelectedVariationDefinition = a), + (n.CurrCoinPlacement = a.CoinPlacement), + (n.CurrCanSpawnPowerup = !!a.CanSpawnPowerup), + (n.EnterPiece = n.trackInfo.EnterPiece), + d.GameConfig.showPathPoints && s.TrackHelper.drawDebugPathSplines(n, this._scene), + n + ); + } + getAllZones() { + return this._regionZoneInfos; + } + getZoneInfo(e) { + for (const [, t] of this._regionZoneInfos) if (t.ID == e) return t; + } + get enabledZones() { + return this._enabledZones; + } + _attachPiecesOverDistance(e, t, n = 0, i = 0) { + let r, + c = e; + for (; t > 0; ) { + let e, + l = new o.NewTrackPieceInfo(), + u = !1, + h = !1; + if (null != c.Queue && c.Queue.Pieces.length > 0) { + const i = c, + a = c.Queue.Pieces.shift(); + if (((e = this._findPieceDefinition(a.ID)), 0 == e.isAnyJunction())) { + switch (a.Attach) { + case o.TrackPieceAttachType.Normal: + let s = 0; + ([c, s, r] = this._attachComplexPiece(i, e, a.Variation, n)), (t -= s); + break; + case o.TrackPieceAttachType.Basic: + (c = this._attachPiece(i, e, a.Variation, n)), (t -= c.getEstimatedLength(n)), (r = c); + } + (c.Queue = i.Queue), (c.Pacing = i.Pacing), null != r && (r.EnterPiece = a.EnterPiece), (h = !0); + } else { + this._tempTrackPieceList = []; + let o = 0; + [c, o, r, this._tempTrackPieceList] = this._attachJunction(i, e, a.Variation, n); + for (let e = 0; e < this._tempTrackPieceList.length; ++e) { + const t = this._tempTrackPieceList[e]; + 0 == e ? (t.Queue = i.Queue) : t.Queue.Pieces.push(...i.Queue.Pieces), (t.Pacing = i.Pacing); + } + (t -= o), (h = !0); + } + } else + null != c.Pacing && + (a.GameController.instance.tutorial.isEnabled + ? (l = a.GameController.instance.tutorial.selectTrackPiece(c, l)) + : ((l = s.TrackHelper.selectPieceComplex(this, c.Pacing, c, l)), a.GameController.instance.tutorial.canStartZoneTutorial(l.Definition) && (l = a.GameController.instance.tutorial.enableAndGetSectionZone(l))), + (u = 1 != l.areAllMembersNull()), + (h = !1)); + if ( + (0 == h && + 0 == u && + (a.GameController.instance.tutorial.isEnabled + ? (l = a.GameController.instance.tutorial.selectTrackPiece(c, l)) + : ((l = s.TrackHelper.selectPieceComplex(this, this._regionPacing, c, l)), + a.GameController.instance.tutorial.canStartZoneTutorial(l.Definition) && (l = a.GameController.instance.tutorial.enableAndGetSectionZone(l)))), + null == l) + ) + break; + if (0 == h && null != l.Piece && null == l.Definition && ((e = this._findPieceDefinition(l.Piece.ID)), null != e && 0 == e.isAnyJunction())) { + const i = c; + (c = this._attachPiece(i, e, l.Piece.Variation, n)), (c.Queue = l.Queue), (c.Pacing = l.Pacing), (c.EnterPiece = l.Piece.EnterPiece), (t -= c.getEstimatedLength(n)), (h = !0); + } + if (0 == h && null != l.Definition) { + if (((e = l.Definition), e.isAnyJunction())) { + this._tempTrackPieceList = []; + let a = 0; + if ((([c, a, r, this._tempTrackPieceList] = this._attachJunction(c, e, void 0, n)), (t -= a) > 0 && (this._maxPiecesToAddPerUpdate, 1))) { + for (let e = 0; e < this._tempTrackPieceList.length; ++e) { + const n = this._attachPiecesOverDistance(this._tempTrackPieceList[e], t, o.TrackPieceDefinition.MainPathID, i); + e == o.TrackPieceDefinition.MainPathID && (c = n); + } + t = 0; + } + } else { + const i = e.isAnyJunction() ? n : o.TrackPieceDefinition.MainPathID; + let a = 0; + ([c, a, r] = this._attachComplexPiece(c, e, void 0, i)), (t -= a); + } + (h = !0), null == c.Pacing && null != l.Pacing && (c.Pacing = l.Pacing), (i += e.PrePieces.length + 1 + e.PostPieces.length), this._maxPiecesToAddPerUpdate; + } else if (0 == h) break; + } + return c; + } + _attachComplexPiece(e, t, n, i = 0) { + let r, + a = 0, + s = e; + if (t.isAnyJunction()) { + this._tempTrackPieceList = []; + let e = 0; + ([s, e, r, this._tempTrackPieceList] = this._attachJunction(s, t, n, i)), (a += e); + } else { + if (null != t.PrePieces) + for (const e of t.PrePieces) { + const t = this._findPieceDefinition(e.ID); + (s = this._attachPiece(s, t, e.VariationName, i, e)), (a += s.getEstimatedLength(i)); + } + if (((s = this._attachPiece(s, t, n, i)), (r = s), (a += s.getEstimatedLength(i)), 1 == t.isCompoundStart())) { + const e = h.Utils.random(t.CompoundPieceMinMiddleCount, t.CompoundPieceMaxMiddleCount + 1); + for (let n = 0; n < e; ++n) { + const e = this._findPieceDefinition(t.CompoundPieceMiddleType); + (s = this._attachPiece(s, e, void 0, o.TrackPieceDefinition.MainPathID)), (a += s.getEstimatedLength(i)); + } + const n = this._findPieceDefinition(t.CompoundPieceEndType); + (s = this._attachPiece(s, n, void 0, o.TrackPieceDefinition.MainPathID)), (a += s.getEstimatedLength(i)); + } + if (null != t.PostPieces) + for (const e of t.PostPieces) { + const t = this._findPieceDefinition(e.ID); + (s = this._attachPiece(s, t, e.VariationName, i, e)), (a += s.getEstimatedLength(i)); + } + } + return [s, a, r]; + } + _attachJunction(e, t, n, i = 0) { + let r = e, + a = e, + s = 0, + c = 0, + l = 0; + const u = []; + if (null != t.PrePieces) + for (const e of t.PrePieces) { + const t = this._findPieceDefinition(e.ID); + (r = this._attachPiece(r, t, e.VariationName)), (l += r.getEstimatedLength(i)); + } + (r = this._attachPiece(r, t, n)), (a = r); + const h = r, + d = r; + s = r.getEstimatedLength(i); + const p = r.getNumPaths(); + let f = !1; + for (let e = 0; e < p; ++e) { + r = d; + const n = !1; + if (0 == n) { + let n; + null != t.JunctionPostPieces && t.JunctionPostPieces.length > 0 + ? (n = e < t.JunctionPostPieces.length ? t.JunctionPostPieces[e].PathPostPieces : t.JunctionPostPieces[0].PathPostPieces) + : null != t.PostPieces && (n = t.PostPieces); + let a = 0; + if (null != n) + for (let t = 0; t < n.length; ++t) { + const s = n[t], + c = this._findPieceDefinition(s.ID), + l = 0 == t ? e : o.TrackPieceDefinition.MainPathID; + (r = this._attachPiece(r, c, s.VariationName, l, s)), (a += r.getEstimatedLength(i)); + } + c = c <= 0 ? a : Math.min(c, a); + } else { + const n = this.getZoneInfo(t.ID.ZoneID).getEndPiece(), + i = e; + if (null != n) r = this._attachPiece(r, n, void 0, i); + else if (null != t.PostPieces && t.PostPieces.length > 0) { + const e = t.PostPieces[0], + n = this._findPieceDefinition(e.ID); + (r = this._attachPiece(r, n, e.VariationName, i, e)), (r.IsDeadEnd = !0); + } + } + 0 == f && 0 == n && ((a = r), (f = !0)), null != h && u.push(r); + } + return [a, l + s + c, h, u]; + } + _attachPiece(e, t, n, i = 0, c = o.ExtraPieceDefinition.default) { + const l = this._createTrackPiece(t.ID, n); + (l.DistanceFromRoot = e.DistanceFromRoot + e.getEstimatedLength(i)), + e.setNextTrackPiece(i, l), + c.OverrideCoinPlacement && (l.CurrCoinPlacement = c.CoinPlacement), + c.OverrideCanSpawnPowerup && (l.CurrCanSpawnPowerup = !!c.CanSpawnPowerup); + const h = e.lastPointFromPath(i), + d = e.WorldRotationY + e.getSourceLastRotY(i), + p = r.Vector3.TransformCoordinates(h, r.Matrix.RotationAxis(r.Axis.Y, (e.WorldRotationY * Math.PI) / 180)), + f = e.assetInfo.rootMesh.position.add(p), + m = f.subtract(e.assetInfo.rootMesh.position).normalize(); + f.subtractInPlace(m.multiplyByFloats(0.01, 0, 0.01)), l.assetInfo.rootMesh.position.addInPlace(f), l.assetInfo.rootMesh.rotateAround(f, r.Axis.Y, (d * Math.PI) / 180), (l.WorldRotationY += d); + const g = l.WorldRotationY; + (l.WorldRotationY = g > 360 ? g - 360 : g), + l.updateStats(e), + a.GameController.instance.tutorial.isEnabled && (l.tutorialMilestoneIndex = a.GameController.instance.tutorial.currentMilestoneIndex), + s.TrackHelper.createWorldSpline(l, f, d, this._scene); + const b = e.PreviousTrackPiece; + if (null != b && i == o.TrackPieceDefinition.MainPathID) { + b.updateItemDistanceStats(); + const t = a.GameController.instance.bonus.addBonusItems(b), + n = a.GameController.instance.coins.addCoinsToTrackPiece(b, u.BonusItemProtoData.DefaultCoinMaxHorizOffset); + for (let e = 0; e < 5; e++) a.GameController.instance.coins.addCoinToHistory(o.CoinPlacement.None); + const i = u.BonusItemProtoData.MaxCoinsPerRun; + e.updateCoinStats(n, i), b.updateStatsAfterItemsAdded(t, n, u.BonusItemProtoData.DefaultCoinPlacementHeight); + } + return this._startTrackPieceOptions(l), l; + } + _startTrackPieceOptions(e) { + const t = e.assetInfo; + if ( + (null != e.assetInfo.sound && + r.Engine.audioEngine.unlocked && + ((e.assetInfo.sound.loop = !0), + (e.assetInfo.sound.spatialSound = !0), + (e.assetInfo.sound.distanceModel = "linear"), + (e.assetInfo.sound.maxDistance = 40), + e.assetInfo.sound.setPosition(e.assetInfo.rootMesh.position), + e.assetInfo.sound.updateOptions({ spatialSound: !0, distanceModel: "linear", maxDistance: 40 }), + e.assetInfo.sound.play(0, e.assetInfo.soundOffset, e.assetInfo.soundLength)), + !t.name.includes("narrow_jump_over") && !t.name.includes("narrow_stumble")) + ) { + for (const e of t.particleSystems) e.start(); + if (t.animationGroups.length > 0) for (const e of t.animationGroups) e.play(!0); + } + if (t.name.includes("narrow_jump_over")) + t.animationGroups.forEach((e) => { + e.play(), e.goToFrame(0), e.pause(); + }), + this.statueAnimationInfos.push(t); + else if (t.name.startsWith("narrow_stumble")) for (const e of t.animationGroups) e.play(), e.goToFrame(0), e.pause(); + } + _assignTrackPieceAnimation(e) { + if (e.assetInfo.animationGroups.length > 0) { + let t = 0; + if (null != e.PreviousTrackPiece) { + let n = new o.TrackPiece(); + for (n = e.PreviousTrackPiece; t < e.trackInfo.TriggerDistance && ((t += n.getEstimatedLength()), null != n.PreviousTrackPiece); ) n = n.PreviousTrackPiece; + const i = t - e.trackInfo.TriggerDistance; + n.triggerAnimations.set(i, e.assetInfo); + } + } + } + advanceToNextPieceAndBuild(e) { + let t = e.NextTrackPieces[e.selectedPathId]; + null == t && (t = e); + const n = this._growDistance + e.getEstimatedLength(); + this._extendTrack(t, n); + const i = e.PreviousTrackPiece; + if ((null != i && i != this._toRemoveRootTrackPiece && (this._collectOldTrackPieces(this._toRemoveRootTrackPiece, i), (this._toRemoveRootTrackPiece = i)), this._toRemoveTrackPieces.length > 6 && !this._stopRemovalOnDeath)) { + for (const e of this._toRemoveTrackPieces) { + const t = this.statueAnimationInfos.indexOf(e.assetInfo, 0); + t > -1 && this.statueAnimationInfos.splice(t, 1), a.GameController.instance.coins.removeCoinsFromTrackPiece(e), this._trackAssetPool.removeTrackPiece(e.SelectedDefinition.ID.ZoneID, e.assetInfo), e.dispose(); + } + this._toRemoveTrackPieces = []; + } + return (this._rootTrackPiece = t), t; + } + _extendTrack(e, t) { + const n = e.getNextTrackPiecesLength(); + if (n < 1) t > 0 && this._attachPiecesOverDistance(e, t, o.TrackPieceDefinition.MainPathID); + else { + e.SelectedDefinition.IsZipLine ? (t -= e.getEstimatedLength() / 4) : (t -= e.getEstimatedLength()); + for (let i = 0; i < n; ++i) { + const n = e.NextTrackPieces[i]; + this._extendTrack(n, t); + } + } + } + _collectOldTrackPieces(e, t) { + if (null == e) return; + if (((e.PreviousTrackPiece = void 0), e == t)) return; + this._toRemoveTrackPieces.push(e); + const n = e.getNextTrackPiecesLength(); + for (let i = 0; i < n; ++i) this._collectOldTrackPieces(e.NextTrackPieces[i], t), (e.NextTrackPieces[i] = void 0); + } + updatePacingDistance(e) { + if (((this._regionPacing.DistanceTraveled += e), this._regionPacing.NextMilestoneIndex >= this._regionPacing.Milestones.length)) return; + const t = this._regionPacing.Milestones[this._regionPacing.NextMilestoneIndex]; + t && this._regionPacing.DistanceTraveled > t.Distance && (this._regionPacing.selectNextMilestone(), a.GameController.instance.tutorial.isEnabled); + } + get trackMaterial() { + return this._trackMaterialProvider.trackMaterial; + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TrackMaterialProvider = void 0); + const i = n(62), + r = n(40), + o = n(237), + a = n(275), + s = n(19), + c = { vertexSource: a.lightmap_opaque_vertex, fragmentSource: a.lightmap_opaque_fragment }; + t.TrackMaterialProvider = class { + constructor(e) { + this._scene = e; + } + get colliderMaterial() { + return ( + null != this._colliderMaterial || + ((this._colliderMaterial = new i.StandardMaterial("colliderMat", this._scene)), + (this._colliderMaterial.emissiveColor = i.Color3.Magenta()), + (this._colliderMaterial.diffuseColor = i.Color3.Magenta()), + (this._colliderMaterial.backFaceCulling = !0), + (this._colliderMaterial.forceDepthWrite = !0), + (this._colliderMaterial.alpha = 0.5), + (this._colliderMaterial.disableLighting = !0), + this._colliderMaterial.freeze()), + this._colliderMaterial + ); + } + get trackMaterial() { + if (null != this._trackMaterial) return this._trackMaterial; + this._trackMaterial = new i.ShaderMaterial("lightmap", this._scene, c, { + attributes: ["position", "normal", "uv", "uv2"], + uniforms: ["world", "worldView", "worldViewProjection", "view", "projection", "lightmap", "albedo"], + needAlphaBlending: !0, + needAlphaTesting: !1, + }); + const e = new i.Texture("assets/textures/machu_lightmaps.jpg", this._scene); + e.coordinatesIndex = 1; + const t = new i.Texture("assets/textures/machu_master_a.jpg", this._scene); + return ( + this._trackMaterial.setTexture("lightmap", e), + this._trackMaterial.setTexture("albedo", t), + this._trackMaterial.setInt("vertexFogEnabled", 0), + (this._trackMaterial.backFaceCulling = !0), + (this._trackMaterial.forceDepthWrite = !0), + r.GameController.instance.shader.addShader(o.EType.TRACK_PIECE, this._trackMaterial), + this._trackMaterial + ); + } + get godRayMaterial() { + if (null != this._godRayMaterial) return this._godRayMaterial; + this._godRayMaterial = new i.StandardMaterial("god_ray", this._scene); + const e = new i.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !1); + return ( + (this._godRayMaterial.diffuseTexture = e), + (this._godRayMaterial.diffuseTexture.hasAlpha = !0), + (this._godRayMaterial.diffuseColor = new i.Color3(0.01, 0.01, 0.1)), + (this._godRayMaterial.emissiveTexture = e), + (this._godRayMaterial.emissiveTexture.hasAlpha = !0), + (this._godRayMaterial.emissiveColor = new i.Color3(0.01, 0.01, 0)), + (this._godRayMaterial.backFaceCulling = !1), + (this._godRayMaterial.alpha = 0.9999), + (this._godRayMaterial.alphaMode = i.Engine.ALPHA_ADD), + (this._godRayMaterial.disableLighting = !0), + this._godRayMaterial + ); + } + get waterPanMaterial() { + return ( + null != this._curveWaterPanMat || + ((this._curveWaterPanMatTex1 = new i.Texture("assets/textures/pan_water_b." + s.WebUtils.textureExtension, this._scene)), + (this._curveWaterPanMatTex2 = new i.Texture("assets/textures/pan_water_b." + s.WebUtils.textureExtension, this._scene)), + (this._curveWaterPanMat = new i.PBRMaterial("water_pan_mat", this._scene)), + (this._curveWaterPanMat.albedoTexture = this._curveWaterPanMatTex1), + (this._curveWaterPanMat.albedoColor = new i.Color3(0.9, 0.9, 0.9)), + (this._curveWaterPanMat.ambientColor = i.Color3.Black()), + (this._curveWaterPanMat.emissiveTexture = this._curveWaterPanMatTex2), + (this._curveWaterPanMat.emissiveColor = new i.Color3(0.3, 0.3, 0.3)), + (this._curveWaterPanMat.unlit = !0)), + this._curveWaterPanMat + ); + } + get folliageMaterial() { + return ( + null != this._foliageMat || + ((this._foliageTex = new i.Texture("assets/textures/foliage_transparent." + s.WebUtils.textureExtension, this._scene)), + (this._foliageMat = new i.StandardMaterial("foliage_mat", this._scene)), + (this._foliageMat.disableLighting = !0), + (this._foliageMat.emissiveTexture = this._foliageTex), + (this._foliageMat.emissiveColor = i.Color3.White()), + (this._foliageMat.emissiveTexture.hasAlpha = !0), + (this._foliageMat.diffuseTexture = this._foliageTex), + (this._foliageMat.diffuseColor = i.Color3.Gray()), + (this._foliageMat.diffuseTexture.hasAlpha = !0)), + this._foliageMat + ); + } + get mineExposureShader() { + return ( + null != this._mineExposureMaterial || + ((this._mineExposureMaterial = new i.ShaderMaterial("mineExposure", this._scene, "./assets/shaders/mine_exposure", { + attributes: ["position"], + uniforms: ["world", "worldView", "worldViewProjection", "view", "projection", "playerPosition"], + needAlphaBlending: !0, + })), + this._mineExposureMaterial.setVector3("color", new i.Vector3(0, 0, 0)), + (this._mineExposureMaterial.backFaceCulling = !1), + r.GameController.instance.shader.addShader(o.EType.MINE_EXPOSURE, this._mineExposureMaterial)), + this._mineExposureMaterial + ); + } + get waterBridgeMaterial() { + return ( + null != this._curveWaterBridgeMat || + ((this._curveWaterBridgeMatTex = new i.Texture("assets/effects/effects_transparent." + s.WebUtils.textureExtension, this._scene)), + (this._curveWaterBridgeMat = new i.StandardMaterial("water_pan_bridge_mat", this._scene)), + (this._curveWaterBridgeMat.diffuseTexture = this._curveWaterBridgeMatTex), + (this._curveWaterBridgeMat.opacityTexture = this._curveWaterBridgeMatTex), + (this._curveWaterBridgeMat.emissiveColor = i.Color3.White()), + (this._curveWaterBridgeMat.alpha = 0), + (this._curveWaterBridgeMat.alphaMode = i.Engine.ALPHA_COMBINE), + (this._curveWaterBridgeMat.disableLighting = !0), + (this._curveWaterBridgeMat.forceDepthWrite = !0)), + this._curveWaterBridgeMat + ); + } + update() { + null != this._curveWaterPanMat && ((this._curveWaterPanMatTex1.vOffset += 0.002 * this._scene.deltaTime), (this._curveWaterPanMatTex2.vOffset += 9e-4 * this._scene.deltaTime)); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.mine_exposure_fragment = t.mine_exposure_vertex = t.lightmap_opaque_fragment = t.lightmap_opaque_vertex = void 0), + (t.lightmap_opaque_vertex = + "\n precision highp float;\n attribute vec3 position;\n attribute vec2 uv;\n attribute vec2 uv2;\n\n uniform mat4 worldViewProjection;\n uniform mat4 worldView;\n uniform bool vertexFogEnabled;\n\n varying vec2 vUV0;\n varying vec2 vUV1;\n varying float fogFactor;\n\n void main(void) {\n if(vertexFogEnabled){\n float start = 47.0;\n float end = 50.0;\n float vDistance = length(worldView * vec4(position,1.0));\n fogFactor = clamp((vDistance - start) / (end - start), 0.0, 1.0);\n }\n vUV0 = uv;\n vUV1 = uv2;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n }\n"), + (t.lightmap_opaque_fragment = + "\n precision highp float;\n varying vec2 vUV0;\n varying vec2 vUV1;\n varying float fogFactor;\n\n uniform sampler2D lightmap;\n uniform sampler2D albedo;\n uniform bool vertexFogEnabled;\n\n void main(void) {\n float intensity = 1.2;\n vec4 color = texture2D(albedo,vUV0) * intensity;\n color.rgb *= texture2D(lightmap,vUV1).rgb;\n if(vertexFogEnabled)\n color = mix(color, vec4(1.0,1.0,1.0,0.0), fogFactor);\n gl_FragColor = color;\n }\n"), + (t.mine_exposure_vertex = + "\n precision highp float;\n\n attribute vec3 position;\n \n uniform mat4 world;\n uniform mat4 worldViewProjection;\n \n varying vec3 vPosition;\n \n void main(void) {\n vPosition = vec3(world * vec4(position,1.0));\n gl_Position = worldViewProjection * vec4(position, 1.0);\n }\n"), + (t.mine_exposure_fragment = + "\n precision highp float;\n\n varying vec3 vPosition;\n\n uniform vec3 playerPosition;\n const float MAX_EXPOSURE_DISTANCE = 15.0;\n\n uniform vec3 color;\n\n void main(void) {\n float alpha = 1.0;\n float d = distance(vPosition,playerPosition);\n if(d <= MAX_EXPOSURE_DISTANCE)\n alpha = d / MAX_EXPOSURE_DISTANCE;\n else \n alpha = 1.0;\n\n gl_FragColor = vec4(0.0,0.0,0.0,alpha);\n }\n"); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TrackAssetsPoolManager = t.TrackPiecePool = t.TrackPiecePack = void 0); + const r = n(62), + o = n(232), + a = n(48), + s = n(40), + c = n(29); + class l {} + t.TrackPiecePack = l; + class u { + constructor() { + (this.ready = new Map()), (this.used = new Map()); + } + addNewToReady() { + const e = this.asset.clone(); + e.rootMesh.setEnabled(!1), this.ready.set(e.id, e), s.GameController.instance.sound.addSoundsToTrackPiece(e), s.GameController.instance.particle.addEffectsToTrackPiece(e); + } + } + t.TrackPiecePool = u; + class h { + constructor() { + (this._zoneTrackPiecePacks = new Map()), + (this._zoneTrackPiecePool = new Map()), + (this._hasPending = !1), + (this._isLoadingPending = !1), + (this._diffuseCounter = 0), + (this._pendingIds = []), + (this._pendingPieceNames = new Map()), + (this._shouldLoadSinglePieces = !0), + (this._shouldLoadProgressively = !0); + } + initialize(e, t, n, r) { + return i(this, void 0, void 0, function* () { + (this._scene = e), + (this._trackMaterialProvider = r), + (this._trackMaterial = this._trackMaterialProvider.trackMaterial), + (this._waterPanMaterial = this._trackMaterialProvider.waterPanMaterial), + (this._waterBridgeMaterial = this._trackMaterialProvider.waterBridgeMaterial), + (this._foliageMaterial = r.folliageMaterial), + (this._godrayMaterial = r.godRayMaterial), + a.GameConfig.IS_DEBUG && (this._colliderMaterial = r.colliderMaterial), + (this._regionZoneInfos = t), + (this._regionZonePeices = n); + for (const [e, n] of t) + 0 == e || 0 == this._shouldLoadProgressively ? yield this._loadTrackAssetPack(a.GameConfig.DEFAULT_REGION, n, !1) : (yield this._loadTrackAssetPack(a.GameConfig.DEFAULT_REGION, n, !0), this._pendingIds.push(e)); + c.EventHandler.instance.addListener(c.EventID.OnGameLoaded, () => { + this._hasPending = !0; + }), + c.EventHandler.instance.addListener(c.EventID.OnDebugFeatureChange, () => { + a.GameConfig.showColliders ? (this._colliderMaterial.alpha = 0.5) : (this._colliderMaterial.alpha = 0); + }); + }); + } + update() { + 0 == this._hasPending || this._isLoadingPending || this._diffuseCounter++ < 10 || (this._pendingIds.length > 0 ? ((this._isLoadingPending = !0), this._updateAssets()) : (this._hasPending = !1), (this._diffuseCounter = 0)); + } + _updateAssets() { + return i(this, void 0, void 0, function* () { + const e = this._regionZoneInfos.get(this._pendingIds[0]); + let t = !1; + try { + t = 0 == this._shouldLoadSinglePieces ? yield this._loadTrackAssetPack(a.GameConfig.DEFAULT_REGION, e, !0) : yield this._loadSingleTrackAsset(a.GameConfig.DEFAULT_REGION, e); + } catch (e) {} + t && this._pendingIds.shift(), (this._isLoadingPending = !1); + }); + } + _loadTrackAssetPack(e, t, n) { + return i(this, void 0, void 0, function* () { + let i, r; + if (this._zoneTrackPiecePacks.has(t.ID)) i = this._zoneTrackPiecePacks.get(t.ID); + else { + (i = new l()), (i.id = t.ID), (i.name = t.Name.toLowerCase() + "_pack"); + const r = `assets/tracks/${e}/${t.Name}/${i.name}.glb`; + if (((0 != n && 0 != this._shouldLoadSinglePieces) || ((i.asset = yield o.AssetUtils.loadAssetAsync("" + i.name, r, this._scene)), this._zoneTrackPiecePacks.set(t.ID, i)), this._shouldLoadSinglePieces)) { + const e = this._regionZonePeices.get(t.ID); + this._pendingPieceNames.set(t.ID, [...e.keys()]); + } + if (n) return !1; + } + this._zoneTrackPiecePool.has(t.ID) ? (r = this._zoneTrackPiecePool.get(t.ID)) : ((r = new Map()), this._zoneTrackPiecePool.set(t.ID, r)); + const a = this._cloneTrackAssetPack(i, r, n); + return a && s.GameController.instance.track.enabledZones.push(t.Name), a; + }); + } + _loadSingleTrackAsset(e, t) { + return i(this, void 0, void 0, function* () { + const n = this._pendingPieceNames.get(t.ID); + let i; + if ((this._zoneTrackPiecePool.has(t.ID) ? (i = this._zoneTrackPiecePool.get(t.ID)) : ((i = new Map()), this._zoneTrackPiecePool.set(t.ID, i)), null != this._pendingPieceName)) { + const e = i.get(this._pendingPieceName); + if (null != e && e.ready.size < h.MAX_INITIAL_CLONES) return e.addNewToReady(), !1; + this._pendingPieceName = void 0; + } + if (n.length > 0) { + const a = n[0], + s = `assets/tracks/${e}/${t.Name}/${a}.glb`, + c = yield o.AssetUtils.loadAssetAsync("" + a, s, this._scene); + c.container.removeAllFromScene(), (c.axisScaling = new r.Vector3(-1, 1, -1)); + const l = c.meshes[0]; + l.setParent(null), l.setEnabled(!1); + for (const e of l.getChildMeshes(!1, (e) => e instanceof r.AbstractMesh)) this._addMaterialsToTrackPiece(e); + let h; + return i.has(a) ? (h = i.get(a)) : ((h = new u()), (h.id = a)), (h.asset = c), i.set(a, h), (this._pendingPieceName = a), n.shift(), !1; + } + return (this._pendingPieceName = void 0), s.GameController.instance.track.enabledZones.push(t.Name), !0; + }); + } + _cloneTrackAssetPack(e, t, n) { + const i = e.asset.container; + let r = !1; + if (n) { + if (null == e.toCloneNodes) { + const t = i.meshes[0]; + t.setParent(null), t.setEnabled(!1), (e.toCloneNodes = t.getChildren()[0].getChildren()[0].getChildren()); + } + const o = e.toCloneNodes[0]; + let a; + t.has(o.name) ? ((a = t.get(o.name)), a.ready.size < h.MAX_INITIAL_CLONES ? a.addNewToReady() : e.toCloneNodes.shift()) : this._prepareTrackPieceMesh(o, i, t, n), e.toCloneNodes.length <= 0 && (r = !0); + } else { + const e = i.meshes[0]; + e.setParent(null), e.setEnabled(!1); + for (const r of e.getChildren()[0].getChildren()[0].getChildren()) { + const e = r; + this._prepareTrackPieceMesh(e, i, t, n); + } + r = !0; + } + return !!r && (i.removeAllFromScene(), (e.toCloneNodes = void 0), !0); + } + _prepareTrackPieceMesh(e, t, n, i) { + e.setParent(null), e.setEnabled(!1); + const a = new r.AssetContainer(this._scene); + (a.meshes = [e]), (a.animationGroups = []); + for (const n of t.animationGroups) (n.name.includes(e.name) || this._isAnimationNameEquals(n.name, e.name)) && a.animationGroups.push(n); + const s = new o.AssetInfo(e.id, e.name); + (s.meshes = a.meshes), (s.animationGroups = a.animationGroups), (s.skeletons = a.skeletons), (s.container = a), (s.axisScaling = new r.Vector3(-1, -1, -1)), (s.partOfPack = !0); + for (const t of e.getChildMeshes(!1, (e) => e instanceof r.AbstractMesh)) this._addMaterialsToTrackPiece(t); + let c; + if ((n.has(e.name) ? (c = n.get(e.name)) : ((c = new u()), (c.id = e.name)), (c.asset = s), n.set(e.name, c), 0 == i)) for (let e = 0; e < h.MAX_INITIAL_CLONES; e++) c.addNewToReady(); + } + _isAnimationNameEquals(e, t) { + return "narrow_stumble_crash" == e && "narrow_stumble_a" == t; + } + _addMaterialsToTrackPiece(e) { + if (e instanceof r.InstancedMesh) + if (((e.sourceMesh.renderingGroupId = s.ETR2RenderingGroup.TRACK_PIECES), e.name.includes("curve_water_a_pan") || e.name.endsWith("_water"))) e.sourceMesh.material = this._waterPanMaterial; + else if ("Effect_torch_fire_a" == e.name && a.GameConfig.showColliders) (e.sourceMesh.material = this._colliderMaterial), (e.sourceMesh.alphaIndex = 1); + else if (e.name.includes("_fill")) (e.sourceMesh.alphaIndex = 1), (e.sourceMesh.material = this._waterBridgeMaterial); + else if (e.name.startsWith("Collider") && a.GameConfig.showColliders) (e.sourceMesh.material = this._colliderMaterial), (e.sourceMesh.alphaIndex = 1); + else if (e.name.includes("foliage")) e.sourceMesh.material = this._foliageMaterial; + else if (e.name.includes("godray")) e.sourceMesh.material = this._godrayMaterial; + else if (e.name.includes("exposure")) e.sourceMesh.material = this._trackMaterialProvider.mineExposureShader; + else { + if ("Collider_Obstacle" == e.sourceMesh.name) return; + e.sourceMesh.material = this._trackMaterial; + } + else if (e.name.includes("curve_water_a_pan") || e.name.endsWith("_water")) e.material = this._waterPanMaterial; + else if (e.name.includes("_fill")) (e.alphaIndex = 1), (e.material = this._waterBridgeMaterial); + else if (e.name.startsWith("Collider") && a.GameConfig.showColliders) (e.alphaIndex = 1), (e.material = this._colliderMaterial); + else if (e.name.includes("foliage")) e.material = this._foliageMaterial; + else if (e.name.includes("godray")) e.material = this._godrayMaterial; + else if (e.name.includes("exposure")) e.material = this._trackMaterialProvider.mineExposureShader; + else { + if ("Collider_Obstacle" == e.name) return; + e.material = this._trackMaterial; + } + } + getTrackPiece(e, t) { + if (this._zoneTrackPiecePool.has(e)) { + const n = this._zoneTrackPiecePool.get(e); + if (n.has(t)) { + const e = n.get(t); + e.ready.size <= 0 && e.addNewToReady(); + const i = e.ready.keys().next().value, + r = e.ready.get(i); + return e.ready.delete(i), e.used.set(i, r), r; + } + } + return null; + } + removeTrackPiece(e, t) { + if (this._zoneTrackPiecePool.has(e)) { + const n = this._zoneTrackPiecePool.get(e); + if (n.has(t.name)) { + const e = n.get(t.name); + if (e.used.has(t.id)) { + const n = e.used.get(t.id); + return this._resetTrackPiece(n), e.used.delete(t.id), e.ready.set(t.id, n), !0; + } + } + } + return !1; + } + resetPool() { + for (const [, e] of this._zoneTrackPiecePool) + for (const [, t] of e) + t.used.forEach((e, n) => { + this._resetTrackPiece(e), t.ready.set(n, e); + }), + t.used.clear(); + } + _resetTrackPiece(e) { + var t; + e.rootMesh.setEnabled(!1), + (e.rootMesh.position = r.Vector3.Zero()), + (e.rootMesh.rotationQuaternion = void 0), + (e.rootMesh.rotation = r.Vector3.Zero()), + (e.axisScaling = e.partOfPack ? new r.Vector3(1, 1, -1) : e.axisScaling), + (e.rootMesh.scaling = e.axisScaling.clone()), + null != e.sound && (null === (t = e.sound) || void 0 === t || t.stop()); + for (const t of e.animationGroups) t.stop(), t.reset(); + for (const t of e.particleSystems) t.stop(), t.reset(); + } + pausePool() { + for (const [, e] of this._zoneTrackPiecePool) + for (const [, t] of e) + t.used.forEach((e) => { + e.animationGroups.length > 0 && + e.animationGroups.forEach((e) => { + e.pause(); + }); + }); + } + resumePool() { + for (const [, e] of this._zoneTrackPiecePool) + for (const [, t] of e) + t.used.forEach((e) => { + e.animationGroups.length > 0 && + e.animationGroups.forEach((e) => { + e.start(!0); + }); + }); + } + } + (t.TrackAssetsPoolManager = h), (h.MAX_INITIAL_CLONES = 3); + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.SkyboxController = void 0); + const r = n(62); + t.SkyboxController = class { + constructor(e) { + (this._assetPath = "assets/environments/Machu_Skybox.glb"), (this._scene = e); + } + initialize() { + this._setupEnvironment(); + } + preUpdate() {} + postUpdate() {} + pause() {} + resume() {} + reset() {} + _setupEnvironment() { + return i(this, void 0, void 0, function* () { + const e = new r.StandardMaterial("skyBox", this._scene); + (e.backFaceCulling = !1), (e.disableLighting = !0), (e.specularColor = r.Color3.Black()), (e.specularPower = 0), (e.emissiveColor = r.Color3.White()); + const t = yield r.SceneLoader.ImportMeshAsync(null, this._assetPath, void 0, this._scene); + (this._skyboxRoot = t.meshes[0]), (this._skyboxMesh = t.meshes[1]), (this._skyboxOriginalPos = this._skyboxMesh.position); + const n = this._skyboxMesh.material.albedoTexture; + (e.diffuseTexture = n), (this._skyboxRoot.scaling = new r.Vector3(0.1, 0.1, 0.1)), (this._skyboxRoot.renderingGroupId = 0), (this._skyboxRoot.infiniteDistance = !0), (this._skyboxMesh.material = e); + }); + } + get shadowLight() { + return this._light; + } + get shadowGenerator() { + return this._shadowGenerator; + } + get skyboxRoot() { + return this._skyboxRoot; + } + get skyboxMesh() { + return this._skyboxMesh; + } + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoinsController = void 0); + const r = n(40), + o = n(62), + a = n(133), + s = n(238), + c = n(178), + l = n(150), + u = n(279); + class h { + constructor(e) { + (this._updateTimer = 0), (this._isCheckingCollision = !1), (this._currentCoinIndex = 0), (this._currentCoins = new Map()), (this._currCoinHistoryIdx = -1), (this._coinHistory = []), (this._scene = e); + } + initialize() { + return i(this, void 0, void 0, function* () { + this._coinsMaterialProvider = new s.CoinsMaterialProvider(this._scene); + const e = yield o.SceneLoader.ImportMeshAsync(null, "assets/objects/coins/default_coin_gold.glb", null, this._scene); + e.meshes.forEach((e) => { + e.setEnabled(!1); + }), + (this._defaultCoin = e.meshes[1]), + (this._defaultCoin.renderingGroupId = r.ETR2RenderingGroup.PICK_UPS), + this._defaultCoin.setParent(null), + (this._defaultCoin.material = this._coinsMaterialProvider.defaultCoinMaterial); + for (let e = 0; e < h.MAX_COINS_POOL; e++) { + const t = this._defaultCoin.createInstance("coin" + e); + t.setEnabled(!1), this._currentCoins.set(e, t), (t.alwaysSelectAsActiveMesh = !1); + } + this._coinAnimator = new u.CoinsAnimator(this._defaultCoin.clone()); + }); + } + preUpdate() { + if (((this._updateTimer += this._scene.deltaTime), this._updateTimer > 60)) { + this._updateTimer = 0; + for (const [, e] of this._currentCoins) e.rotate(o.Axis.Y, -Math.PI / 10); + } + this._coinAnimator.update(this._scene.getEngine().getDeltaTime() / 1e3); + } + pause() {} + resume() {} + postUpdate() {} + reset() { + for (const [, e] of this._currentCoins) e.setEnabled(!1); + (this._coinHistory = []), (this._isCheckingCollision = !1), this._coinAnimator.reset(); + } + addCoinsToTrackPiece(e, t) { + const n = null != e.EnterPiece && !!e.EnterPiece.ForceCoinsPlacementOnTrackPiece, + i = c.BonusItemProtoData.AllowCoins || n; + null != e.EnterPiece && e.EnterPiece.ForceCoinsPlacementOnTrackPiece && e.EnterPiece.CoinPlacementLocation != a.CoinPlacement.Any && (e.CurrCoinPlacement = e.EnterPiece.CoinPlacementLocation); + const s = e.trackPaths[a.TrackPieceDefinition.MainPathID], + l = !!e.SelectedDefinition.IsZipLine, + u = r.GameController.instance.track.getZoneInfo(e.SelectedDefinition.ID.ZoneID), + d = 0 == (!!u.CoinSettings.UseTrackDefinitonsForAllowingCoins || !1) && (e.SelectedDefinition.isMandatoryTurn() || !!e.SelectedDefinition.IsStumble || !!e.SelectedDefinition.IsJumpOver); + if ( + null == s || + s.length < 2 || + (e.DistanceSinceLastCoinRun < c.BonusItemProtoData.MinDistanceBetweenCoinRuns && 0 == l && 0 == n) || + d || + e.CurrCoinPlacement == a.CoinPlacement.None || + e.PlacedBonusItemCategory != a.BonusItemCategory.None || + 0 == i + ) + return !1; + let p = !1, + f = e.CurrCoinPlacement, + m = !1; + if ((([m, p, f] = this._chooseCoinPlacementForPiece(u, e)), 0 == m)) return !1; + e.LastCoinPlacement = f; + let g = t, + b = e.LastCoinPlacementHeight, + _ = !1; + l ? ((b = 3.2), (g = 0.8)) : (u.CoinSettings.HeightAboveGround > 0 && (b = u.CoinSettings.HeightAboveGround), u.CoinSettings.MaxHorizontalOffset > 0 && (g = u.CoinSettings.MaxHorizontalOffset)), + (e.SelectedDefinition.IsJumpOver || e.SelectedDefinition.IsStumble) && ((_ = !0), (b = c.BonusItemProtoData.ArcMaxHeight)); + let v = 0, + y = s.length - 1; + if (1 == l) { + const e = 6; + (v = 8), (y = s.length - e), y < v && (y = v); + } + let C = 0, + P = 0, + x = 0.5, + T = o.Vector3.Zero(), + S = o.Vector3.Zero(), + O = new o.Vector3(0, 0, 0), + E = !0, + M = 0, + A = !1, + I = 0; + for (let t = v; t < y; t++) + if (((T = s[t + 1].subtract(s[t])), (P = T.length()), (T = new o.Vector3(T.x / P, T.y / P, T.z / P)), C + P < x)) C += P; + else { + for (S = o.Vector3.Cross(o.Vector3.Up(), T); x < C + P; ) { + let i = 0; + if (1 == p && e.PreviousTrackPiece.LastCoinPlacement != e.LastCoinPlacement) + switch (e.PreviousTrackPiece.LastCoinPlacement) { + case a.CoinPlacement.Left: + i = -0.5; + break; + case a.CoinPlacement.Right: + i = 0.5; + break; + case a.CoinPlacement.Center: + i = e.LastCoinPlacement == a.CoinPlacement.Left ? -0.5 : 0.5; + } + else + switch (f) { + case a.CoinPlacement.Left: + i = -1; + break; + case a.CoinPlacement.Right: + i = 1; + } + p = !1; + const r = x - C; + O = T.multiplyByFloats(r, r, r); + const u = i * g; + (O = O.add(S.multiplyByFloats(u, u, u))), (O = O.add(s[t])), 1 == _ ? (1 == E && ((M = O.y), (E = !1)), (O.y = M + b)) : (O.y += b); + const d = this._currentCoins.get(this._currentCoinIndex); + if ( + ((d.position = O), + d.rotate(o.Axis.Y, I), + d.setEnabled(!0), + (I += Math.PI / 10), + this.addCoinToHistory(f), + (x += 1), + e.coinsList.push(this._currentCoinIndex), + this._currentCoinIndex++, + this._currentCoinIndex >= h.MAX_COINS_POOL && (this._currentCoinIndex = 0), + e.CoinRunCoinCount++, + e.CoinRunCoinCount >= c.BonusItemProtoData.MaxCoinsPerRun && 0 == l && 0 == n) + ) + break; + } + if (e.CoinRunCoinCount >= c.BonusItemProtoData.MaxCoinsPerRun && 0 == l && 0 == n) { + (e.DistanceSinceLastCoinRun = 0), (A = !0); + break; + } + C += P; + } + return 0 == A && l && e.CoinRunCoinCount >= c.BonusItemProtoData.MaxCoinsPerRun && (e.DistanceSinceLastCoinRun = 0), !0; + } + _chooseCoinPlacementForPiece(e, t) { + const n = !!e.CoinSettings.SmartPlacement || !1; + let i = t.CurrCoinPlacement, + r = !1; + if (1 == n) + if (t.CoinRunCoinCount > 0) { + if (t.LastCoinPlacement != i) + if (t.LastCoinPlacement == a.CoinPlacement.Left) + switch (i) { + case a.CoinPlacement.Any: + case a.CoinPlacement.LeftOrCenter: + case a.CoinPlacement.LeftOrRight: + i = a.CoinPlacement.Left; + break; + case a.CoinPlacement.Center: + case a.CoinPlacement.CenterOrRight: + (i = a.CoinPlacement.Center), (r = !0); + break; + default: + return [!1, r, i]; + } + else if (t.LastCoinPlacement == a.CoinPlacement.Center) + switch (i) { + case a.CoinPlacement.Any: + case a.CoinPlacement.CenterOrRight: + case a.CoinPlacement.LeftOrCenter: + i = a.CoinPlacement.Center; + break; + case a.CoinPlacement.Left: + (i = a.CoinPlacement.Left), (r = !0); + break; + case a.CoinPlacement.Right: + (i = a.CoinPlacement.Right), (r = !0); + break; + case a.CoinPlacement.LeftOrRight: + (i = 0 == l.Utils.random(0, 2) ? a.CoinPlacement.Left : a.CoinPlacement.Right), (r = !0); + break; + default: + return [!1, r, i]; + } + else if (t.LastCoinPlacement == a.CoinPlacement.Right) + switch (i) { + case a.CoinPlacement.Any: + case a.CoinPlacement.CenterOrRight: + case a.CoinPlacement.LeftOrRight: + i = a.CoinPlacement.Right; + break; + case a.CoinPlacement.Center: + case a.CoinPlacement.LeftOrCenter: + (i = a.CoinPlacement.Center), (r = !0); + break; + default: + return [!1, r, i]; + } + if (1 == r && 0 == this._canPlaceCoinBasedOnHistory(i)) return [!1, r, i]; + } else + switch (i) { + case a.CoinPlacement.Left: + case a.CoinPlacement.Center: + case a.CoinPlacement.Right: + break; + case a.CoinPlacement.LeftOrCenter: + i = 0 == l.Utils.random(0, 2) ? a.CoinPlacement.Left : a.CoinPlacement.Center; + break; + case a.CoinPlacement.LeftOrRight: + i = 0 == l.Utils.random(0, 2) ? a.CoinPlacement.Left : a.CoinPlacement.Right; + break; + case a.CoinPlacement.CenterOrRight: + i = 0 == l.Utils.random(0, 2) ? a.CoinPlacement.Center : a.CoinPlacement.Right; + break; + case a.CoinPlacement.Any: + switch (l.Utils.random(0, 3)) { + case 0: + i = a.CoinPlacement.Left; + break; + case 1: + i = a.CoinPlacement.Center; + break; + case 2: + i = a.CoinPlacement.Right; + } + } + else { + if (t.CoinRunCoinCount > 0) i = t.LastCoinPlacement; + else if (t.SelectedDefinition.IsLedgeLeft) i = a.CoinPlacement.Left; + else if (t.SelectedDefinition.IsLedgeRight) i = a.CoinPlacement.Right; + else if (t.SelectedDefinition.IsLedgeCenter) i = a.CoinPlacement.Center; + else if (e.Gameplay == a.TRGameRunnerGameplay.Ride) i = 0 == l.Utils.random(0, 2) ? a.CoinPlacement.Left : a.CoinPlacement.Right; + else + switch (l.Utils.random(0, 3)) { + case 0: + i = a.CoinPlacement.Left; + break; + case 1: + i = a.CoinPlacement.Center; + break; + case 2: + i = a.CoinPlacement.Right; + } + if ( + (t.SelectedDefinition.IsLedgeLeft && i != a.CoinPlacement.Left) || + (t.SelectedDefinition.IsLedgeRight && i != a.CoinPlacement.Right) || + (t.SelectedDefinition.IsLedgeCenter && i != a.CoinPlacement.Center) || + (e.Gameplay == a.TRGameRunnerGameplay.Ride && i == a.CoinPlacement.Center) + ) + return [!1, r, i]; + } + return [!0, r, i]; + } + _canPlaceCoinBasedOnHistory(e) { + if (this._coinHistory.length > 0) { + const t = this._currCoinHistoryIdx > 0 ? this._currCoinHistoryIdx - 1 : this._coinHistory.length - 1; + if (this._coinHistory[t] == e) return !0; + { + let n = 0, + i = t; + for (; i != this._currCoinHistoryIdx && this._coinHistory[i] != e; ) n++, (i = i > 0 ? i - 1 : this._coinHistory.length - 1); + return n >= c.BonusItemProtoData.MinCoinsToRepeatPlacement; + } + } + return !0; + } + addCoinToHistory(e) { + null != this._coinHistory && + (this._currCoinHistoryIdx++, + this._currCoinHistoryIdx >= c.BonusItemProtoData.MaxCoinHistorySize && (this._currCoinHistoryIdx = 0), + this._currCoinHistoryIdx >= this._coinHistory.length ? this._coinHistory.push(e) : (this._coinHistory[this._currCoinHistoryIdx] = e)); + } + checkCoinCollision(e, t, n, r) { + return i(this, void 0, void 0, function* () { + if (this._isCheckingCollision) return; + const i = this._scene.getEngine().getDeltaTime() / 1e3; + r ? this._coinAnimator.processMagnetCoinCollection(this._currentCoins, e, n, i) : e.coinsList.length > 0 ? this._coinAnimator.processNormalCoinCollection(this._currentCoins, e, t) : this._coinAnimator.resetSoundPitch(), + (this._isCheckingCollision = !1); + }); + } + removeCoinsFromTrackPiece(e) { + e.coinsList.length > 0 && + e.coinsList.forEach((e) => { + this._currentCoins.get(e).setEnabled(!1); + }); + } + } + (t.CoinsController = h), (h.MAX_COINS_POOL = 300); + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CoinsAnimator = void 0); + const i = n(40), + r = n(62), + o = n(52); + t.CoinsAnimator = class { + constructor(e) { + (this._magnetCoins = []), + (this._poolIndex = 0), + (this.POOL_SIZE = 100), + (this._animCoins = new Array()), + (this._directions = new Array(this.POOL_SIZE)), + (this._animStates = new Array(this.POOL_SIZE)), + (this._currCoinPitchMultiplier = 1), + (this._currCoinPitch = 1), + (this._constZ = 12), + (this._barPosition = new r.Vector3(-12, 0, 0)), + (this._masterCoinMesh = e), + (this._masterCoinMesh = this._masterCoinMesh.makeGeometryUnique()), + this._masterCoinMesh.setEnabled(!1), + this._masterCoinMesh.setParent(null), + (this._masterCoinMesh.renderingGroupId = 3); + for (let e = 0; e < this.POOL_SIZE; e++) { + const t = this._masterCoinMesh.createInstance("animCoin#" + e); + this._animCoins.push(t), (this._animStates[e] = !1), t.setEnabled(!1), (t.position = this._barPosition); + } + this._speed = 10; + } + reset() { + (this._magnetCoins = []), (this._currCoinPitch = 1), (this._currCoinPitchMultiplier = 1); + } + isCoinReached(e, t) { + const n = new r.Vector2(e.position.x, e.position.y), + i = new r.Vector2(this._barPosition.x, this._barPosition.y); + return r.Vector2.DistanceSquared(n, i) < t * t; + } + _addNormalCoin(e) { + const t = i.GameController.instance.camera.camera.getViewMatrix().clone(), + n = this._animCoins[this._poolIndex]; + n.setEnabled(!0), + (n.position = e.position.clone()), + (n.rotation = e.rotation.clone()), + (n.rotationQuaternion = e.rotationQuaternion.clone()), + (n.position = r.Vector3.TransformCoordinates(n.position, t)), + (n.position.z = this._constZ), + (n.parent = i.GameController.instance.camera.camera), + (this._directions[this._poolIndex] = this._barPosition.subtract(n.position)), + (this._directions[this._poolIndex].z = 0), + this._directions[this._poolIndex].normalize(), + (this._animStates[this._poolIndex] = !0), + (this._poolIndex = ++this._poolIndex % this.POOL_SIZE); + } + update(e) { + const t = this; + this._animCoins.forEach(function (n, r) { + t._animStates[r] && + (t._moveTowardsDest(n, t._directions[r], e), + t.isCoinReached(n, 1) && (o.gameState.updateCoins(i.GameController.instance.character.CurrentMovementState), (t._animStates[r] = !1), (n.position = t._barPosition), n.setEnabled(!1))); + }); + } + _moveTowardsDest(e, t, n) { + (e.position = e.position.add(t.multiplyByFloats(n, n, 0).multiplyByFloats(this._speed, this._speed, 0))), (e.position.z = this._constZ); + } + processNormalCoinCollection(e, t, n) { + const i = 1 == t.SelectedDefinition.IsMine, + r = n.getAbsolutePosition(); + for (let n = t.coinsList.length - 1; n >= 0; n--) { + const o = e.get(t.coinsList[n]); + this.playerCoinCollision(r.clone(), o.position, i) && (this._addNormalCoin(o), o.setEnabled(!1), this._fireEventsForCollectAndSound(), t.coinsList.splice(n, 1)); + } + } + playerCoinCollision(e, t, n) { + let i = 0.4; + const r = e.subtract(t).lengthSquared() <= i * i; + (e.y += n ? 0.4 : 0.7), (i += n ? 0.5 : 0); + const o = e.subtract(t).lengthSquared() <= i * i; + return r || o; + } + _fireEventsForCollectAndSound() { + i.GameController.instance.sound.playCoinCollectedSFX(this._currCoinPitch), + (this._currCoinPitch += 0.01 * this._currCoinPitchMultiplier), + (this._currCoinPitchMultiplier += 0.4), + this._currCoinPitch > 4 && ((this._currCoinPitch = 1), (this._currCoinPitchMultiplier = 1)); + } + resetSoundPitch() { + (this._currCoinPitch = 1), (this._currCoinPitchMultiplier = 1); + } + processMagnetCoinCollection(e, t, n, i) { + const r = n.position, + o = []; + null != t.PreviousTrackPiece && t.PreviousTrackPiece.coinsList.length > 0 && o.push(t.PreviousTrackPiece), + t.coinsList.length > 0 && o.push(t), + null != t.NextTrackPieces[0] && t.NextTrackPieces[0].coinsList.length > 0 && o.push(t.NextTrackPieces[0]), + null != t.NextTrackPieces[1] && t.NextTrackPieces[1].coinsList.length > 0 && o.push(t.NextTrackPieces[1]); + for (const t of o) { + for (let n = t.coinsList.length - 1; n >= 0; n--) { + const i = e.get(t.coinsList[n]); + r.subtract(i.position).length() <= 5 && (this._magnetCoins.push(t.coinsList[n]), t.coinsList.splice(n, 1)); + } + } + for (let t = this._magnetCoins.length - 1; t >= 0; t--) { + const n = e.get(this._magnetCoins[t]); + let o = r.subtract(n.position); + const a = o.length(), + s = 1 / a; + (o = o.multiplyByFloats(s, s, s)), + (n.position = n.position.add(o.multiplyByFloats(i, i, i).multiplyByFloats(this._speed, this._speed, this._speed))), + a <= 1 && (n.setEnabled(!1), this._fireEventsForCollectAndSound(), this._addNormalCoin(n), this._magnetCoins.splice(t, 1)); + } + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CameraController = t.CameraShake = void 0); + const i = n(40), + r = n(62), + o = n(48), + a = n(29), + s = n(156), + c = n(133); + class l { + set(e, t) { + (this._duration = t), (this._magnitude = e), (this._damperRate = e / t); + } + reset() { + (this._duration = 0), (this._damperRate = 0), (this._magnitude = 0); + } + } + t.CameraShake = l; + t.CameraController = class { + constructor(e) { + (this._defaultCameraRotationOffset = 0), + (this._defaultCameraFollowDistance = 4), + (this._defaultHeightOffset = 3.5), + (this._defaultCameraAcceleration = 0.05), + (this._boostCameraAcceleration = 0.1), + (this._defaultMaxCameraSpeed = 20), + (this._defaultCameraFOV = 0.7), + (this._defaultCameraRotationOffsetX = 15), + (this.INIT_CAMERA_POSITION = new r.Vector3(0, 4.79, -8.48)), + (this.INIT_CAMERA_ROTATION = new r.Vector3(6.77, 0, 0)), + (this._isFlyEndOver = !1), + (this._noCameraAnims = !1), + (this._scene = e), + (this._characterController = i.GameController.instance.character); + } + initialize() { + (this._noCameraAnims = !1), + this._noCameraAnims + ? ((this._characterCamera = new r.FreeCamera("New Character Camera", new r.Vector3(1, 4, -5), this._scene)), a.EventHandler.instance.fireEvent(a.EventID.OnCameraFlyEnd)) + : ((this._characterCamera = new r.FreeCamera("New Character Camera", new r.Vector3(42, 54, -34), this._scene)), (this._characterCamera.rotation = this.ToRadians(new r.Vector3(41, -53, -7)))), + (this._shakeSetting = new l()), + this._setCurrentCameraSetting(), + this._shakeSetting.reset(), + (this._activeCamera = this._scene.activeCamera), + this._setupChestCamera(), + this._setupFreeCamera(), + this._setupDebugCamera(), + a.EventHandler.instance.addListener(a.EventID.OnKeyPress, this._switchCamera.bind(this)), + a.EventHandler.instance.addListener(a.EventID.OnEnablingChestUI, () => { + this._scene.activeCamera = this._chestCamera; + }), + a.EventHandler.instance.addListener(a.EventID.OnDisablingChestUI, () => { + this.reset(); + }), + a.EventHandler.instance.addListener(a.EventID.OnPowerupStart, (e) => { + e == c.BonusItemType.Boost && (this._cameraAcceleration = this._boostCameraAcceleration); + }), + a.EventHandler.instance.addListener(a.EventID.OnPowerupComplete, (e) => { + e == c.BonusItemType.Boost && (this._cameraAcceleration = this._defaultCameraAcceleration); + }), + a.EventHandler.instance.addListener(a.EventID.OnPlayGame, (e) => { + (this._isFlyEndOver = !0), + this._noCameraAnims || + i.GameController.instance.tutorial.shouldRestartTutorial || + e || + ((this._cameraIntroAnim = this._scene.beginDirectAnimation(this._freeCamera, [this._cameraIntroPositionAnimation], 0, 199, !1, 1, () => { + this._cameraIntroAnim.stop("IntroPosition"), + (this._characterCamera.position = this._freeCamera.position), + (this._scene.activeCamera = this._characterCamera), + a.EventHandler.instance.fireEvent(a.EventID.OnCameraIntroEnd); + })), + (this._cameraIntroAnim.disposeOnEnd = !0)); + }), + a.EventHandler.instance.addListener(a.EventID.OnCameraFlySkip, () => { + this._cameraFlyAnim.goToFrame(450); + }); + } + _setupFreeCamera() { + (this._freeCamera = new r.FreeCamera("FreeCamera", new r.Vector3(42, 54, -34), this._scene)), + (this._freeCamera.rotation = new r.Vector3(r.Tools.ToRadians(41), r.Tools.ToRadians(-53), r.Tools.ToRadians(-7))), + (this._scene.activeCamera = this._freeCamera), + this._noCameraAnims || this._cameraAnimation(); + } + _setupDebugCamera() { + (this._debugCamera = new r.FreeCamera("DebugCamera", r.Vector3.Zero(), this._scene)), this._debugCamera.attachControl(this._scene.getEngine().getRenderingCanvas(), !1); + } + _setupChestCamera() { + (this._chestCamera = new r.FreeCamera("ChestCamera", r.Vector3.Zero(), this._scene)), + (this._chestCamera.position = this.INIT_CAMERA_POSITION), + (this._chestCamera.rotation = this.ToRadians(this.INIT_CAMERA_ROTATION)), + (this._chestCamera.layerMask = 3); + } + _switchToChestCamera() { + this._scene.activeCamera = this._chestCamera; + } + _switchBackToActiveCamera() { + this._scene.activeCamera = this._activeCamera; + } + _switchCamera(e) { + o.GameConfig.canSwitchCamera && + "SwitchCamera" == e && + (this._activeCamera == this._characterCamera + ? ((this._debugCamera.position = this._characterCamera.position.clone()), + (this._scene.activeCamera = this._debugCamera), + i.GameController.instance.isGameRunning && a.EventHandler.instance.fireEvent(a.EventID.OnPauseGame), + a.EventHandler.instance.fireEvent(a.EventID.OnDebugCameraStateChange, !0)) + : ((this._scene.activeCamera = this._characterCamera), a.EventHandler.instance.fireEvent(a.EventID.OnDebugCameraStateChange, !1)), + (this._activeCamera = this._scene.activeCamera)); + } + _cameraAnimation() { + this._cameraFlyInPosAnimation = new r.Animation("FlyInPosition", "position", 60, r.Animation.ANIMATIONTYPE_VECTOR3, r.Animation.ANIMATIONLOOPMODE_CYCLE); + const e = []; + e.push({ frame: 0, value: new r.Vector3(31.686, 38.022, -18.004) }), + e.push({ frame: 71, value: new r.Vector3(28.236, 34.256, -17.206) }), + e.push({ frame: 450, value: new r.Vector3(0, 4.79, -8.48) }), + this._cameraFlyInPosAnimation.setKeys(e), + this._freeCamera.animations.push(this._cameraFlyInPosAnimation), + (this._cameraFlyInRotationAnimation = new r.Animation("FlyInRotation", "rotation", 60, r.Animation.ANIMATIONTYPE_VECTOR3, r.Animation.ANIMATIONLOOPMODE_CYCLE)); + const t = []; + let n = this.ToRadians(new r.Vector3(40.993, -53.712, -6.714)); + t.push({ frame: 0, value: n }), + (n = this.ToRadians(new r.Vector3(39.598, -49.786, -6.341))), + t.push({ frame: 71, value: n }), + (n = this.ToRadians(new r.Vector3(6.77, 0, 0))), + t.push({ frame: 450, value: n }), + this._cameraFlyInRotationAnimation.setKeys(t), + this._freeCamera.animations.push(this._cameraFlyInRotationAnimation), + (this._cameraFlyAnim = this._scene.beginDirectAnimation(this._freeCamera, [this._cameraFlyInRotationAnimation, this._cameraFlyInPosAnimation], 0, 450, !1, 1, () => { + a.EventHandler.instance.fireEvent(a.EventID.OnCameraFlyEnd), this._cameraFlyAnim.stop("FlyInRotation"); + })), + (this._cameraFlyAnim.disposeOnEnd = !0), + (this._cameraIntroPositionAnimation = new r.Animation("IntroPosition", "position", 65, r.Animation.ANIMATIONTYPE_VECTOR3, r.Animation.ANIMATIONLOOPMODE_CYCLE)); + const i = []; + i.push({ frame: 0, value: new r.Vector3(0, 4.79, -8.48) }), + i.push({ frame: 40, value: new r.Vector3(1.9156, 4.9015, -7.1546) }), + i.push({ frame: 57, value: new r.Vector3(3.43, 4.9817, -6.1363) }), + i.push({ frame: 127, value: new r.Vector3(6.3913, 5.0324, -7.8316) }), + i.push({ frame: 136, value: new r.Vector3(6.1818, 4.944, -8.7518) }), + i.push({ frame: 153, value: new r.Vector3(4.7875, 4.6546, -10.936) }), + i.push({ frame: 199, value: new r.Vector3(0, 3.986, -19.5) }), + this._cameraIntroPositionAnimation.setKeys(i), + this._freeCamera.animations.push(this._cameraIntroPositionAnimation); + } + ToRadians(e) { + return new r.Vector3(r.Tools.ToRadians(e.x), r.Tools.ToRadians(e.y), r.Tools.ToRadians(e.z)); + } + preUpdate() {} + postUpdate() { + this._isFlyEndOver && this._updateCamera(); + } + pause() { + this._cameraIntroAnim.pause(); + } + resume() { + this._cameraIntroAnim.restart(); + } + reset() { + (this._isFlyEndOver = !1), + (this._scene.activeCamera = this._freeCamera), + (this._activeCamera = this._activeCamera), + (this._cameraRotationOffset = this._defaultCameraRotationOffset), + (this._cameraFollowDistance = this._defaultCameraFollowDistance), + (this._cameraHeightOffset = this._defaultHeightOffset), + (this._cameraAcceleration = this._defaultCameraAcceleration), + (this._maxCameraSpeed = this._defaultMaxCameraSpeed), + (this._currentRotationOffsetX = this._defaultCameraRotationOffsetX), + (this._isCameraShaking = !1), + this._shakeSetting.reset(), + (this._cameraShakeTimer = 0), + (this._characterCamera.maxZ = 50), + this._noCameraAnims || ((this._freeCamera.position = this.INIT_CAMERA_POSITION), (this._freeCamera.rotation = this.ToRadians(this.INIT_CAMERA_ROTATION))), + i.GameController.instance.tutorial.shouldRestartTutorial && ((this._scene.activeCamera = this._characterCamera), (this._activeCamera = this._scene.activeCamera)); + } + updateForResurrection(e) { + (this._player = e), this._characterCamera.setTarget(this._player.position), (this._characterCamera.position = e.position), (this._scene.activeCamera = this._characterCamera); + } + setTarget(e) { + (this._player = e), this._setCurrentCameraSetting(); + } + shake(e, t) { + t > 0 && e > 0 && (this._shakeSetting.set(e, t), (this._isCameraShaking = !0), (this._cameraShakeTimer = 0)); + } + _setCurrentCameraSetting() { + (this._cameraRotationOffset = this._defaultCameraRotationOffset), + (this._cameraHeightOffset = this._defaultHeightOffset), + (this._maxCameraSpeed = this._defaultMaxCameraSpeed), + (this._cameraFollowDistance = this._defaultCameraFollowDistance), + (this._cameraAcceleration = this._defaultCameraAcceleration), + (this._characterCamera.fov = this._defaultCameraFOV), + (this._currentRotationOffsetX = this._defaultCameraRotationOffsetX), + (this._characterCamera.maxZ = 50); + } + _updateCamera() { + if (null == this._player || this._characterController.CurrentMovementState == s.MovementState.Death) return; + let e; + if ( + (this._characterController.isOnZipline + ? (this._cameraHeightOffset = 2.5) + : this._characterController.CurrentMovementState == s.MovementState.WaterSliding + ? (this._cameraHeightOffset = 3) + : (this._cameraHeightOffset = this._defaultHeightOffset), + this._player.rotationQuaternion) + ) { + const t = new r.Matrix(); + this._player.rotationQuaternion.toRotationMatrix(t), (e = Math.atan2(t.m[8], t.m[10])); + } else e = this._player.rotation.y; + const t = r.Tools.ToRadians(this._cameraRotationOffset) + e, + n = this._player.getAbsolutePosition(), + i = n.x + Math.sin(t) * this._cameraFollowDistance, + o = n.z + Math.cos(t) * this._cameraFollowDistance, + a = i - this._characterCamera.position.x, + c = this._characterController.currentPosition.y + this._cameraHeightOffset - this._characterCamera.position.y, + l = o - this._characterCamera.position.z; + let u = a * this._cameraAcceleration * 2, + h = c * this._cameraAcceleration, + d = l * this._cameraAcceleration * 2; + if ( + ((u > this._maxCameraSpeed || u < -this._maxCameraSpeed) && (u = u < 1 ? -this._maxCameraSpeed : this._maxCameraSpeed), + (h > this._maxCameraSpeed || h < -this._maxCameraSpeed) && (h = h < 1 ? -this._maxCameraSpeed : this._maxCameraSpeed), + (d > this._maxCameraSpeed || d < -this._maxCameraSpeed) && (d = d < 1 ? -this._maxCameraSpeed : this._maxCameraSpeed), + (this._characterCamera.position = new r.Vector3(this._characterCamera.position.x + u, this._characterCamera.position.y + h, this._characterCamera.position.z + d)), + this._characterCamera.setTarget(n), + this._freeCamera.setTarget(n), + (this._characterCamera.rotation = new r.Vector3(r.Tools.ToRadians(this._currentRotationOffsetX), this._characterCamera.rotation.y, 0)), + this._isCameraShaking) + ) + if ( + ((this._cameraShakeTimer += this._scene.deltaTime / 1e3), + (this._shakeSetting._magnitude -= (this._scene.deltaTime / 1e3) * this._shakeSetting._damperRate), + this._shakeSetting._magnitude <= 0 || this._cameraShakeTimer > this._shakeSetting._duration) + ) + this._isCameraShaking = !1; + else { + const e = Math.sin(35 * this._cameraShakeTimer) * this._shakeSetting._magnitude, + t = Math.sin(55 * this._cameraShakeTimer) * this._shakeSetting._magnitude; + (this._characterCamera.position = this._characterCamera.position.add(r.Vector3.Right().multiplyByFloats(e, e, e))), + (this._characterCamera.position = this._characterCamera.position.add(r.Vector3.Up().multiplyByFloats(t, t, t))); + } + } + get camera() { + return this._characterCamera; + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParticleController = void 0); + const i = n(62), + r = n(282); + t.ParticleController = class { + constructor(e) { + (this._particlePool = []), (this._scene = e); + } + initialize() { + (this._crashFireSmokeParticle = r.ParticleProvider.getCrashFireSmokeParticle(this._scene)), + (this._waterSplashParticle = r.ParticleProvider.getWaterSplashParticle(this._scene)), + (this._playerDuckWaterSplashParticle = r.ParticleProvider.getPlayerDuckWaterSplashParticle(this._scene)), + (this._cauldronFireParticle = r.ParticleProvider.getCauldronFireParticle(this._scene)), + (this._torchFireParticle = r.ParticleProvider.getTourchFireParticle(this._scene)), + (this._horizontalLineFireParticle = r.ParticleProvider.getHorizontalLineFireParticle(this._scene, new i.Vector3(1, 0, 0))), + (this._horizontalRightLineFireParticle = r.ParticleProvider.getHorizontalLineFireParticle(this._scene, new i.Vector3(-1, 0, 0))), + (this._waterTrailRight = r.ParticleProvider.getWaterTrail(this._scene, !0)), + (this._waterTrailLeft = r.ParticleProvider.getWaterTrail(this._scene, !1)), + (this._verticalLineFireParticle = r.ParticleProvider.getVerticalLineFireParticle(this._scene)), + (this._dustTrailParticle = r.ParticleProvider.getDustTrailParticle(this._scene)), + (this._waterSplashTrailParticle = r.ParticleProvider.getWaterSplashTrailParticle(this._scene)), + (this._narrowsFlashParticle = r.ParticleProvider.getNarrowsExplosionFlareParticle(this._scene)), + (this._narrowsSmokeParticle = r.ParticleProvider.getNarrowsExplosionDustParticle(this._scene)), + (this._sparksParticle = r.ParticleProvider.getSparksParticle(this._scene)), + this._particlePool.push(this._waterSplashParticle), + this._particlePool.push(this._playerDuckWaterSplashParticle), + this._particlePool.push(this._cauldronFireParticle), + this._particlePool.push(this._torchFireParticle), + this._particlePool.push(this._horizontalLineFireParticle), + this._particlePool.push(this._verticalLineFireParticle), + this._particlePool.push(this._dustTrailParticle), + this._particlePool.push(this._waterSplashTrailParticle), + this._particlePool.push(this._narrowsFlashParticle), + this._particlePool.push(this._narrowsSmokeParticle), + this._particlePool.push(this._sparksParticle); + } + preUpdate() {} + postUpdate() {} + pause() {} + resume() {} + reset() {} + get horizontalLineFireParticle() { + return this._horizontalLineFireParticle; + } + get verticalLineFireParticle() { + return this._verticalLineFireParticle; + } + get cauldronFireParticle() { + return this._cauldronFireParticle; + } + get getTourchFireParticle() { + return this._cauldronFireParticle; + } + get waterSplashParticle() { + return this._waterSplashParticle; + } + get playerDuckWaterSplashParticle() { + return this._playerDuckWaterSplashParticle; + } + get fireCrashSmokePartile() { + return this._crashFireSmokeParticle; + } + get dustTrailParticle() { + return this._dustTrailParticle; + } + get waterTrailRight() { + return this._waterTrailRight; + } + get waterTrailLeft() { + return this._waterTrailLeft; + } + get waterSplashTrailParticle() { + return this._waterSplashTrailParticle; + } + get narrowsFlashParticle() { + return this.narrowsFlashParticle; + } + get narrowsSmokeParticle() { + return this._narrowsSmokeParticle; + } + get sparksParticle() { + return this._sparksParticle; + } + addEffectsToTrackPiece(e) { + e.particleSystems.length > 0 || + e.rootMesh + .getChildMeshes(!1, (e) => e instanceof i.AbstractMesh) + .forEach((t) => { + const n = t; + if (n.name.startsWith("Effect")) { + if (n.name.includes("_waterSplash")) { + const t = this._waterSplashParticle.clone("Fx_waterSplash_" + n.name, n); + (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_fire_breath_hl")) { + const t = this._horizontalLineFireParticle.clone("Fx_fire_hl_" + n.name, n); + (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_fire_breath_hr")) { + const t = this._horizontalRightLineFireParticle.clone("Fx_fire_hr_" + n.name, n); + (t.minInitialRotation = Math.PI), (t.maxInitialRotation = Math.PI), (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_fire_breath_v")) { + const t = this._verticalLineFireParticle.clone("Fx_fire_v_" + n.name, n); + (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_fire_cauldron_left") || n.name.includes("_fire_cauldron_right")) { + const t = this._cauldronFireParticle.clone("Fx_fire_cauldron_" + n.name, n); + e.particleSystems.push(t); + } + if (n.name.includes("_torch_fire_a")) { + const t = this._torchFireParticle.clone("Fx_torchFire_" + n.name, n); + (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_sparks")) { + const t = this._sparksParticle.clone("Fx_sparks_" + n.name, n); + (t.emitter = n), e.particleSystems.push(t); + } + if (n.name.includes("_column_explosion")) { + const t = this._narrowsFlashParticle.clone("Fx_column_explosion_flash_" + n.name, n); + t.stop(), e.particleSystems.push(t); + const i = this._narrowsSmokeParticle.clone("Fx_column_explosion_dust_" + n.name, n); + i.stop(), e.particleSystems.push(i); + } + n.isVisible = !1; + } + }); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParticleProvider = void 0); + const i = n(62), + r = n(40), + o = n(19); + t.ParticleProvider = class { + static getCrashFireSmokeParticle(e) { + const t = i.ParticleSystem.Parse( + { + name: "smokeBurst", + id: "default system", + capacity: 1e4, + emitter: [0, 0, 0], + particleEmitterType: { type: "BoxParticleEmitter", direction1: [0, 1, 0], direction2: [0, 1, 0], minEmitBox: [-0.5, -0.5, -0.5], maxEmitBox: [0.5, 0.5, 0.5] }, + texture: { + tags: null, + url: "", + uOffset: 0, + vOffset: 0, + uScale: 1, + vScale: 1, + uAng: 0, + vAng: 0, + wAng: 0, + uRotationCenter: 0.5, + vRotationCenter: 0.5, + wRotationCenter: 0.5, + isBlocking: !0, + uniqueId: 8, + name: "", + hasAlpha: !1, + getAlphaFromRGB: !1, + level: 1, + coordinatesIndex: 0, + coordinatesMode: 0, + wrapU: 1, + wrapV: 1, + wrapR: 1, + anisotropicFilteringLevel: 4, + isCube: !1, + is3D: !1, + is2DArray: !1, + gammaSpace: !0, + invertZ: !1, + lodLevelInAlpha: !1, + lodGenerationOffset: 0, + lodGenerationScale: 0, + linearSpecularLOD: !1, + isRenderTarget: !1, + animations: [], + invertY: !0, + samplingMode: 3, + }, + isLocal: !1, + animations: [], + beginAnimationOnStart: !1, + beginAnimationFrom: 0, + beginAnimationTo: 60, + beginAnimationLoop: !1, + startDelay: 0, + renderingGroupId: 0, + isBillboardBased: !0, + billboardMode: 7, + minAngularSpeed: 0.3, + maxAngularSpeed: 0.5, + minSize: 1, + maxSize: 1.5, + minScaleX: 2, + maxScaleX: 2, + minScaleY: 2, + maxScaleY: 2, + minEmitPower: 1, + maxEmitPower: 1, + minLifeTime: 1, + maxLifeTime: 1, + emitRate: 10, + gravity: [0, 0, 0], + noiseStrength: [1, 1, 1], + color1: [0, 0, 0, 1], + color2: [0, 0, 0, 0.6], + colorDead: [0, 0, 0, 0], + updateSpeed: 0.015, + targetStopDuration: 1, + blendMode: 2, + preWarmCycles: 0, + preWarmStepOffset: 1, + minInitialRotation: 0, + maxInitialRotation: 0, + startSpriteCellID: 0, + endSpriteCellID: 0, + spriteCellChangeSpeed: 1, + spriteCellWidth: 0, + spriteCellHeight: 0, + spriteRandomStartCell: !1, + isAnimationSheetEnabled: !1, + colorGradients: [], + textureMask: [1, 1, 1, 1], + customShader: null, + preventAutoStart: !0, + }, + e, + "", + !0 + ); + return ( + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.TRILINEAR_SAMPLINGMODE)), + (t.blendMode = i.ParticleSystem.BLENDMODE_STANDARD), + (t.startSpriteCellID = 2), + (t.endSpriteCellID = 2), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + (t.targetStopDuration = 1), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + t + ); + } + static getWaterSplashParticle(e) { + const t = new i.ParticleSystem("waterfallSplash_Particles", 2e3, e), + n = i.MeshBuilder.CreateBox("fx_box", { height: 0.2, width: 1, depth: 0.5 }, e); + n.isVisible = !1; + const a = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = a), + (a.useMeshNormalsForDirection = !1), + (t.emitter = n), + (a.direction1 = new i.Vector3(0, 2, 0)), + (a.direction2 = new i.Vector3(0, 2, 0)), + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.LINEAR_LINEAR)), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (t.startSpriteCellID = 3), + (t.endSpriteCellID = 3), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(0.2, 0.2, 0.2, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.2, 0.2, 0.2, 0.4)), + t.addColorGradient(0.6, new i.Color4(0.2, 0.2, 0.2, 1)), + t.addColorGradient(0.8, new i.Color4(0.2, 0.2, 0.2, 0.6)), + t.addColorGradient(1, new i.Color4(0, 0, 0, 0)), + (t.minSize = 0.4), + (t.maxSize = 0.8), + t.addSizeGradient(0, 0.1, 0.6), + t.addSizeGradient(1, 0.6, 1), + (t.minLifeTime = 0.8), + (t.maxLifeTime = 1), + (t.emitRate = 40), + (t.blendMode = i.ParticleSystem.BLENDMODE_MULTIPLYADD), + (t.gravity = new i.Vector3(0, -8, 0)), + (t.minInitialRotation = 0), + (t.maxInitialRotation = Math.PI), + t.addAngularSpeedGradient(0, 0.2, 0.6), + t.addAngularSpeedGradient(1, 0.8, 1), + (t.minEmitPower = 2), + (t.maxEmitPower = 4), + (t.updateSpeed = 0.02), + t.addLimitVelocityGradient(0, 15), + t.addLimitVelocityGradient(1, 20), + t + ); + } + static getPlayerDuckWaterSplashParticle(e) { + const t = new i.ParticleSystem("waterfallSplash_Particles", 300, e), + n = i.MeshBuilder.CreateSphere("fx_sphere", { segments: 10, diameter: 1 }, e); + n.isVisible = !1; + const a = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = a), + (a.useMeshNormalsForDirection = !0), + (t.isLocal = !0), + (t.emitter = n), + (a.direction1 = new i.Vector3(0, 0, 10)), + (a.direction2 = new i.Vector3(0, 0, 10)), + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.LINEAR_LINEAR)), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (t.startSpriteCellID = 3), + (t.endSpriteCellID = 3), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(0.2, 0.2, 0.2, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.2, 0.2, 0.2, 0.4)), + t.addColorGradient(0.6, new i.Color4(0.2, 0.2, 0.2, 1)), + t.addColorGradient(0.8, new i.Color4(0.2, 0.2, 0.2, 0.6)), + t.addColorGradient(1, new i.Color4(0, 0, 0, 0)), + (t.minSize = 0.2), + (t.maxSize = 0.4), + t.addSizeGradient(0, 0.06, 0.08), + t.addSizeGradient(1, 0.08, 1), + (t.minLifeTime = 0.2), + (t.maxLifeTime = 0.4), + (t.emitRate = 300), + (t.blendMode = i.ParticleSystem.BLENDMODE_MULTIPLYADD), + (t.minInitialRotation = 0), + (t.maxInitialRotation = Math.PI), + t.addAngularSpeedGradient(0, 0.2, 0.6), + t.addAngularSpeedGradient(1, 0.8, 1), + (t.minEmitPower = 5), + (t.maxEmitPower = 10), + (t.updateSpeed = 0.02), + t.addLimitVelocityGradient(0, 5), + t.addLimitVelocityGradient(1, 10), + (t.targetStopDuration = 0.5), + t + ); + } + static getHorizontalLineFireParticle(e, t) { + const n = new i.ParticleSystem("fire_h_particles", 2e3, e), + o = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + o.isVisible = !1; + const a = new i.MeshParticleEmitter(o); + (n.particleEmitterType = a), (a.useMeshNormalsForDirection = !1); + (t = t.multiplyByFloats(3, 3, 3)), + (a.direction1 = t.clone()), + (a.direction2 = t.clone()), + (n.emitter = o), + n.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + n.addColorGradient(0.2, new i.Color4(0.1, 0.1, 1, 0.2)), + n.addColorGradient(0.4, new i.Color4(0, 0, 1, 0.6)), + n.addColorGradient(0.6, new i.Color4(0.3, 0.2, 1, 0.8)), + n.addColorGradient(0.8, new i.Color4(0.8, 0.8, 0.1, 1)), + n.addColorGradient(1, new i.Color4(1, 0.2, 0.3, 0)), + (n.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (n.isLocal = !0), + (n.minSize = 1), + (n.maxSize = 1.5), + (n.minLifeTime = 0.3), + (n.maxLifeTime = 1), + (n.minScaleX = 1), + (n.minScaleY = 1), + (n.maxScaleX = 6), + (n.maxScaleY = 1), + (n.emitRate = 20), + (n.minEmitPower = 5), + (n.maxEmitPower = 10), + (n.updateSpeed = 0.01), + n.addLimitVelocityGradient(0, 60), + n.addLimitVelocityGradient(0.5, 80); + const s = new i.Texture("assets/effects/effects_additive.jpg", e, !0, !1, i.Texture.TRILINEAR_SAMPLINGMODE); + return ( + (n.particleTexture = s), + (n.startSpriteCellID = 4), + (n.endSpriteCellID = 8), + (n.spriteCellHeight = 64), + (n.spriteCellWidth = 128), + (n.spriteCellChangeSpeed = 3), + (n.isAnimationSheetEnabled = !0), + (n.blendMode = i.ParticleSystem.BLENDMODE_ADD), + n + ); + } + static getVerticalLineFireParticle(e) { + const t = new i.ParticleSystem("fire_v_particles", 3, e), + n = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const o = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = o), + (o.useMeshNormalsForDirection = !1), + (o.direction1 = new i.Vector3(0, 1, 0)), + (o.direction2 = new i.Vector3(0, 1, 0)), + (t.emitter = n), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(1, 0.55, 0.25, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.3, 0.3, 1, 0.6)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.8)), + t.addColorGradient(0.8, new i.Color4(0.8, 0.5, 0.1, 0.3)), + t.addColorGradient(1, new i.Color4(0, 0, 0, 0)), + (t.isLocal = !0), + (t.minInitialRotation = -0.5 * Math.PI), + (t.maxInitialRotation = -0.5 * Math.PI), + t.addSizeGradient(0.2, 1.2, 1.2), + t.addSizeGradient(0.5, 1.4, 1.6), + t.addSizeGradient(0.8, 1.6, 1.8), + t.addSizeGradient(1, 1, 1.2), + (t.minLifeTime = 1.6), + (t.maxLifeTime = 2), + (t.minScaleX = 2), + (t.maxScaleX = 2), + (t.minScaleY = 0.8), + (t.maxScaleY = 0.8), + (t.emitRate = 2), + (t.minEmitPower = 5), + (t.maxEmitPower = 10), + (t.updateSpeed = 0.05), + t.addLimitVelocityGradient(0, 4), + t.addLimitVelocityGradient(1, 20), + (t.particleTexture = new i.Texture("assets/effects/effects_additive.jpg", e, !0, !1, i.Texture.LINEAR_LINEAR)), + (t.startSpriteCellID = 4), + (t.endSpriteCellID = 11), + (t.spriteCellHeight = 64), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 2), + (t.isAnimationSheetEnabled = !0), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + t + ); + } + static getDustTrailParticle(e) { + const t = new i.ParticleSystem("lineFire_Particles", 2e3, e), + n = i.Mesh.CreateBox("fx_box", 0.2, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const a = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = a), + (a.useMeshNormalsForDirection = !1), + (a.direction1 = new i.Vector3(-0.1, 0.1, -0.5)), + (a.direction2 = new i.Vector3(0.1, 0.1, -1)), + (t.emitter = n), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + t.addColorGradient(0, new i.Color4(0.1, 0.1, 0.1, 0)), + t.addColorGradient(0.2, new i.Color4(0.6, 0.6, 0.6, 0.6)), + t.addColorGradient(0.4, new i.Color4(1, 1, 1, 1)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.6)), + t.addColorGradient(0.8, new i.Color4(0.1, 0.1, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0.1, 0.1, 0.1, 0)), + (t.isLocal = !0), + (t.minSize = 0.01), + (t.maxSize = 0.05), + (t.minInitialRotation = 0), + (t.maxInitialRotation = Math.PI), + t.addAngularSpeedGradient(0, 0.5, 0.8), + t.addAngularSpeedGradient(1, 3, 4), + t.addSizeGradient(0, 0.05, 0.3), + t.addSizeGradient(1, 0.05, 0.2), + (t.minLifeTime = 0.8), + (t.maxLifeTime = 1), + (t.emitRate = 30), + (t.minEmitPower = 5), + (t.maxEmitPower = 10), + (t.updateSpeed = 0.05), + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.TRILINEAR_SAMPLINGMODE)), + (t.startSpriteCellID = 2), + (t.endSpriteCellID = 2), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + (t.blendMode = i.ParticleSystem.BLENDMODE_STANDARD), + t + ); + } + static getWaterSplashTrailParticle(e) { + const t = new i.ParticleSystem("waterSplash_Particles", 500, e), + n = i.Mesh.CreateBox("fx_box", 0.2, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const r = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = r), + (r.useMeshNormalsForDirection = !0), + (r.direction1 = new i.Vector3(-1, 0.2, -1)), + (r.direction2 = new i.Vector3(1, 0.2, -1)), + (t.direction1 = new i.Vector3(-50, 1, 0)), + (t.direction2 = new i.Vector3(50, 1, 0)), + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.LINEAR_LINEAR)), + (t.startSpriteCellID = 3), + (t.endSpriteCellID = 3), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + t.addColorGradient(0, new i.Color4(0.1, 0.1, 0.1, 0)), + t.addColorGradient(0.2, new i.Color4(0.6, 0.6, 0.6, 0.6)), + t.addColorGradient(0.4, new i.Color4(1, 1, 1, 0.8)), + t.addColorGradient(0.6, new i.Color4(0.5, 0.5, 0.5, 0.4)), + t.addColorGradient(0.8, new i.Color4(0.1, 0.1, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0.1, 0.1, 0.1, 0)), + (t.minSize = 0.08), + (t.maxSize = 0.1), + t.addSizeGradient(0, 0.1, 0.2), + t.addSizeGradient(0.5, 0.2, 0.3), + t.addSizeGradient(1, 0.1, 0.2), + t.addLimitVelocityGradient(0, 4), + t.addLimitVelocityGradient(1, 6), + t.addAngularSpeedGradient(0, 0.5, 0.8), + t.addAngularSpeedGradient(1, 0.1, 0.2), + (t.minLifeTime = 0.1), + (t.maxLifeTime = 0.2), + (t.emitRate = 500), + (t.minEmitPower = 10), + (t.maxEmitPower = 20), + (t.updateSpeed = 0.006), + t + ); + } + static getCauldronFireParticle(e) { + const t = new i.ParticleSystem("fire_v_particles", 12, e), + n = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const o = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = o), + (o.useMeshNormalsForDirection = !1), + (o.direction1 = new i.Vector3(0, 1, 0)), + (o.direction2 = new i.Vector3(0, 1, 0)), + (t.emitter = n), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(1, 0.55, 1, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.3, 0.3, 1, 0.8)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.4)), + t.addColorGradient(0.8, new i.Color4(0.8, 0.5, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0, 0, 0, 0)), + (t.isLocal = !0), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (t.minInitialRotation = -0.5 * Math.PI), + (t.maxInitialRotation = -0.5 * Math.PI), + t.addSizeGradient(0.2, 1.2, 1.2), + t.addSizeGradient(0.5, 1.4, 1.6), + t.addSizeGradient(0.8, 1.6, 1.8), + t.addSizeGradient(1, 1, 1.2), + (t.minLifeTime = 1), + (t.maxLifeTime = 1.6), + (t.minScaleX = 1), + (t.maxScaleX = 1), + (t.minScaleY = 0.6), + (t.maxScaleY = 0.6), + (t.emitRate = 6), + (t.minEmitPower = 1), + (t.maxEmitPower = 2), + (t.updateSpeed = 0.005), + t.addLimitVelocityGradient(0, 1), + t.addLimitVelocityGradient(1, 2), + (t.particleTexture = new i.Texture("assets/effects/effects_additive.jpg", e, !0, !1, i.Texture.LINEAR_LINEAR)), + (t.startSpriteCellID = 8), + (t.endSpriteCellID = 15), + (t.spriteCellHeight = 64), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 7), + (t.isAnimationSheetEnabled = !0), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + t + ); + } + static getTourchFireParticle(e) { + const t = new i.ParticleSystem("torchFire_v_particles", 6, e), + n = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const o = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = o), + (o.useMeshNormalsForDirection = !1), + (o.direction1 = new i.Vector3(0, 1, 0)), + (o.direction2 = new i.Vector3(0, 1, 0)), + (t.emitter = n), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(1, 0.55, 1, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.3, 0.3, 1, 0.8)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.6)), + t.addColorGradient(0.8, new i.Color4(0.8, 0.5, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0, 0, 0, 0)), + (t.isLocal = !0), + (t.minInitialRotation = -0.5 * Math.PI), + (t.maxInitialRotation = -0.5 * Math.PI), + t.addSizeGradient(0, 0.4, 0.6), + t.addSizeGradient(0.5, 0.6, 0.8), + t.addSizeGradient(1, 0.8, 1), + (t.minLifeTime = 1), + (t.maxLifeTime = 1.2), + (t.minScaleX = 1.2), + (t.maxScaleX = 1.2), + (t.minScaleY = 1), + (t.maxScaleY = 1), + (t.emitRate = 6), + (t.minEmitPower = 1), + (t.maxEmitPower = 2), + (t.updateSpeed = 0.009), + t.addLimitVelocityGradient(0, 1), + t.addLimitVelocityGradient(1, 2), + (t.particleTexture = new i.Texture("assets/effects/effects_additive.jpg", e, !0, !1, i.Texture.LINEAR_LINEAR)), + (t.startSpriteCellID = 8), + (t.endSpriteCellID = 15), + (t.spriteCellHeight = 64), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 1), + (t.isAnimationSheetEnabled = !0), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + t + ); + } + static getNarrowsExplosionFlareParticle(e) { + const t = new i.ParticleSystem("flare_particles", 3, e), + n = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + n.isVisible = !1; + const o = new i.MeshParticleEmitter(n); + return ( + (t.isLocal = !0), + (t.particleEmitterType = o), + (o.useMeshNormalsForDirection = !0), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (t.minLifeTime = 0.09), + (t.maxLifeTime = 0.1), + (t.minInitialRotation = 0), + (t.maxInitialRotation = Math.PI), + (t.particleTexture = new i.Texture("assets/effects/effects_additive.jpg", e, !1, !1, i.Texture.TRILINEAR_SAMPLINGMODE)), + (t.startSpriteCellID = 45), + (t.endSpriteCellID = 45), + (t.spriteCellHeight = 64), + (t.spriteCellWidth = 64), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0), + t.addColorGradient(0, new i.Color4(0, 0, 0, 0)), + t.addColorGradient(0.2, new i.Color4(1, 0.55, 0.25, 0.2)), + t.addColorGradient(0.4, new i.Color4(0.3, 0.3, 1, 0.6)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.8)), + t.addColorGradient(0.8, new i.Color4(0.8, 0.5, 0.1, 0.3)), + t.addColorGradient(1, new i.Color4(1, 0.2, 0.3, 0)), + t.addSizeGradient(0, 2, 4), + t.addSizeGradient(0.5, 4, 6), + t.addSizeGradient(1, 2, 4), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + (t.startDelay = 1800), + (t.targetStopDuration = 0.3), + t + ); + } + static getNarrowsExplosionDustParticle(e) { + const t = new i.ParticleSystem("Dust_Particles", 50, e), + n = i.Mesh.CreateSphere("fx_sphere", 10, 0.5, e, !0, i.Mesh.DOUBLESIDE); + (n.isVisible = !1), + (t.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.TRILINEAR_SAMPLINGMODE)), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (t.startSpriteCellID = 2), + (t.endSpriteCellID = 2), + (t.spriteCellHeight = 128), + (t.spriteCellWidth = 128), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0); + const a = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = a), + (a.useMeshNormalsForDirection = !0), + (t.emitter = n), + t.addColorGradient(0, new i.Color4(0.1, 0.1, 0.1, 0)), + t.addColorGradient(0.2, new i.Color4(0.6, 0.6, 0.6, 0.6)), + t.addColorGradient(0.4, new i.Color4(1, 1, 1, 1)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.6)), + t.addColorGradient(0.8, new i.Color4(0.1, 0.1, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0.1, 0.1, 0.1, 0)), + (t.isLocal = !1), + (t.minSize = 0.5), + (t.maxSize = 2), + (t.minInitialRotation = 0.4), + (t.maxInitialRotation = Math.PI), + t.addAngularSpeedGradient(0, 0.5, 0.8), + t.addAngularSpeedGradient(1, 1, 2), + t.addSizeGradient(0, 0.6, 1), + t.addSizeGradient(1, 1.5, 1.5), + (t.minLifeTime = 1.2), + (t.maxLifeTime = 2), + (t.emitRate = 30), + (t.minEmitPower = 10), + (t.maxEmitPower = 20), + (t.updateSpeed = 0.04), + t.addLimitVelocityGradient(0, 2), + t.addLimitVelocityGradient(0.6, 0.8), + t.addLimitVelocityGradient(1, 0.1), + (t.blendMode = i.ParticleSystem.BLENDMODE_STANDARD), + (t.startDelay = 1800), + (t.targetStopDuration = 1.3), + t + ); + } + static getSparksParticle(e) { + const t = new i.ParticleSystem("Sparks_Particles", 20, e), + n = i.Mesh.CreateBox("fx_box", 0.3, e, !0, i.Mesh.DOUBLESIDE); + (n.isVisible = !1), + (t.particleTexture = new i.Texture("assets/effects/effects_additive.jpg", e, !1, !1, i.Texture.TRILINEAR_SAMPLINGMODE)), + (t.startSpriteCellID = 45), + (t.endSpriteCellID = 45), + (t.spriteCellHeight = 64), + (t.spriteCellWidth = 64), + (t.spriteCellChangeSpeed = 0), + (t.isAnimationSheetEnabled = !0); + const o = new i.MeshParticleEmitter(n); + return ( + (t.particleEmitterType = o), + (o.useMeshNormalsForDirection = !1), + (o.direction1 = new i.Vector3(-1, -0.5, -0.5)), + (o.direction2 = new i.Vector3(1, 0.5, 0.5)), + (t.emitter = n), + t.addColorGradient(0, new i.Color4(0.1, 0.1, 0.1, 0)), + t.addColorGradient(0.2, new i.Color4(0.6, 0.6, 0.6, 0.6)), + t.addColorGradient(0.4, new i.Color4(1, 1, 1, 1)), + t.addColorGradient(0.6, new i.Color4(1, 1, 1, 0.6)), + t.addColorGradient(0.8, new i.Color4(0.1, 0.1, 0.1, 0.2)), + t.addColorGradient(1, new i.Color4(0.1, 0.1, 0.1, 0)), + (t.isLocal = !0), + (t.minSize = 0.1), + (t.maxSize = 0.2), + (t.minInitialRotation = 0), + (t.maxInitialRotation = Math.PI), + t.addAngularSpeedGradient(0, 0.5, 0.8), + t.addAngularSpeedGradient(1, 1, 2), + t.addSizeGradient(0, 0.2, 0.3), + t.addSizeGradient(0.6, 0.1, 0.2), + t.addSizeGradient(1, 0.09, 0.1), + (t.minLifeTime = 2), + (t.maxLifeTime = 3), + (t.emitRate = 30), + (t.minEmitPower = 10), + (t.maxEmitPower = 20), + (t.updateSpeed = 0.09), + t.addLimitVelocityGradient(0, 4), + t.addLimitVelocityGradient(0.6, 6), + t.addLimitVelocityGradient(1, 9), + (t.blendMode = i.ParticleSystem.BLENDMODE_ADD), + (t.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + t + ); + } + static getWaterTrail(e, t) { + const n = new i.ParticleSystem("watertrail", 1e3, e); + return ( + (n.particleTexture = new i.Texture("assets/effects/effects_transparent." + o.WebUtils.textureExtension, e, !1, !0, i.Texture.LINEAR_LINEAR)), + (n.emitRate = 100), + (n.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (n.blendMode = i.ParticleSystem.BLENDMODE_ADD), + (n.emitter = i.Vector3.Zero()), + n.createPointEmitter(new i.Vector3(t ? 1 : -1, 0.5, -1), new i.Vector3(t ? 1 : -1, 0.5, -1)), + (n.gravity = i.Vector3.Zero()), + (n.startSpriteCellID = 3), + (n.endSpriteCellID = 3), + (n.spriteCellHeight = 128), + (n.spriteCellWidth = 128), + (n.spriteCellChangeSpeed = 0), + (n.isAnimationSheetEnabled = !0), + (n.minSize = 0.3), + (n.maxSize = 0.3), + (n.minLifeTime = 0.5), + (n.maxLifeTime = 0.5), + (n.updateSpeed = 0.07), + n + ); + } + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.BonusController = void 0); + const r = n(40), + o = n(133), + a = n(178), + s = n(62), + c = n(150), + l = n(238), + u = n(29), + h = n(139); + t.BonusController = class { + constructor(e) { + (this._totalProbability = 100), + (this._spawnProbability = 50), + (this._bonusLedgeLeftRightAdjust = 0.375), + (this._isCheckingCollision = !1), + (this._bonusItems = new Map([ + ["pickupShield", o.BonusItemType.Shield], + ["pickupBoost", o.BonusItemType.Boost], + ["pickupVacuum", o.BonusItemType.Vacuum], + ])), + (this._scene = e), + (this._pickupMaterialProvider = new l.CoinsMaterialProvider(this._scene)); + } + initialize() { + this._loadProbabilities(), this._loadBonusModels(), this._crateSparklesPS(); + } + preUpdate() {} + postUpdate() {} + pause() {} + resume() {} + _crateSparklesPS() { + (this._staticSparksPS = s.ParticleSystem.Parse( + { + name: "power_up_item_shine", + id: "default system", + capacity: 100, + emitter: [0, 0, 0], + particleEmitterType: { type: "BoxParticleEmitter", direction1: [-1, -1, -1], direction2: [1, 1, 1], minEmitBox: [-0.5, -0.5, -0.5], maxEmitBox: [0.5, 0.5, 0.5] }, + texture: { + tags: null, + url: "", + uOffset: 0, + vOffset: 0, + uScale: 1, + vScale: 1, + uAng: 0, + vAng: 0, + wAng: 0, + uRotationCenter: 0.5, + vRotationCenter: 0.5, + wRotationCenter: 0.5, + isBlocking: !0, + uniqueId: 8, + name: "", + hasAlpha: !1, + getAlphaFromRGB: !1, + level: 1, + coordinatesIndex: 0, + coordinatesMode: 0, + wrapU: 1, + wrapV: 1, + wrapR: 1, + anisotropicFilteringLevel: 4, + isCube: !1, + is3D: !1, + is2DArray: !1, + gammaSpace: !0, + invertZ: !1, + lodLevelInAlpha: !1, + lodGenerationOffset: 0, + lodGenerationScale: 0, + linearSpecularLOD: !1, + isRenderTarget: !1, + animations: [], + invertY: !0, + samplingMode: 3, + }, + isLocal: !1, + animations: [], + beginAnimationOnStart: !1, + beginAnimationFrom: 0, + beginAnimationTo: 60, + beginAnimationLoop: !1, + startDelay: 0, + renderingGroupId: 0, + isBillboardBased: !0, + billboardMode: 7, + minAngularSpeed: 1, + maxAngularSpeed: 2, + minSize: 0.1, + maxSize: 0.1, + minScaleX: 1, + maxScaleX: 1, + minScaleY: 1, + maxScaleY: 1, + minEmitPower: 0, + maxEmitPower: 0, + minLifeTime: 0.5, + maxLifeTime: 1, + emitRate: 10, + gravity: [0, 0, 0], + noiseStrength: [10, 10, 10], + color1: [1, 1, 1, 1], + color2: [1, 1, 1, 1], + colorDead: [1, 1, 1, 0], + updateSpeed: 0.005, + targetStopDuration: 0, + blendMode: 2, + preWarmCycles: 0, + preWarmStepOffset: 1, + minInitialRotation: 10, + maxInitialRotation: 45, + startSpriteCellID: 0, + endSpriteCellID: 0, + spriteCellChangeSpeed: 1, + spriteCellWidth: 0, + spriteCellHeight: 0, + spriteRandomStartCell: !1, + isAnimationSheetEnabled: !1, + textureMask: [1, 1, 1, 1], + customShader: null, + preventAutoStart: !1, + }, + this._scene, + null, + !1 + )), + (this._staticSparksPS.particleTexture = new s.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !0, s.Texture.TRILINEAR_SAMPLINGMODE)), + (this._staticSparksPS.startSpriteCellID = 45), + (this._staticSparksPS.endSpriteCellID = 45), + (this._staticSparksPS.spriteCellHeight = 64), + (this._staticSparksPS.spriteCellWidth = 64), + (this._staticSparksPS.spriteCellChangeSpeed = 0), + (this._staticSparksPS.isAnimationSheetEnabled = !0), + this._staticSparksPS.addColorGradient(0, new s.Color4(1, 1, 1, 0.4)), + this._staticSparksPS.addColorGradient(0.5, new s.Color4(1, 1, 1, 1)), + this._staticSparksPS.addColorGradient(1, new s.Color4(1, 1, 1, 0)), + (this._staticSparksPS.minSize = 0.4), + (this._staticSparksPS.maxSize = 0.8), + (this._staticSparksPS.targetStopDuration = 10), + (this._staticSparksPS.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + this._staticSparksPS.stop(); + } + reset() { + this._loadProbabilities(), + this._bonusItemPool.forEach((e) => { + const t = e[0]; + (t.position = s.Vector3.Zero()), t.setEnabled(!1); + }); + } + _loadProbabilities() { + (this._availableItemProbabilities = new Array()), + this._availableItemProbabilities.push(new a.BonusItemTypeProbability(o.BonusItemType.Boost, 40, 20)), + this._availableItemProbabilities.push(new a.BonusItemTypeProbability(o.BonusItemType.Shield, 30, 20)), + this._availableItemProbabilities.push(new a.BonusItemTypeProbability(o.BonusItemType.Vacuum, 30, 20)); + } + _loadBonusModels() { + return i(this, void 0, void 0, function* () { + this._bonusItemPool = new Map(); + const e = this._pickupMaterialProvider.defaultPickupMaterial; + for (const [t, n] of this._bonusItems) { + const i = yield s.SceneLoader.ImportMeshAsync(null, `assets/objects/pickups/${t}.glb`, void 0, this._scene), + o = i.meshes[0]; + o.setEnabled(!1), (o.position = s.Vector3.Zero()); + const a = s.MeshBuilder.CreateBox("pickupCollider", { size: 1 }); + (a.parent = o), + (a.position = s.Vector3.Zero()), + (a.checkCollisions = !0), + (a.scaling.x = 2.5), + (a.isVisible = !1), + this._bonusItemPool.set(n, [o, a]), + i.meshes.forEach((t) => { + t instanceof s.Mesh && ((t.material = e), (t.renderingGroupId = r.ETR2RenderingGroup.PICK_UPS)); + }); + } + }); + } + addBonusItems(e) { + if (r.GameController.instance.powerup.isPowerupActive()) return; + const t = e.trackPaths[o.TrackPieceDefinition.MainPathID], + n = r.GameController.instance.track.getZoneInfo(e.SelectedDefinition.ID.ZoneID), + i = + 0 == (n.CoinSettings.UseTrackDefinitonsForAllowingBonus || (null != n && !!n.CoinSettings.UseTrackDefinitonsForAllowingBonus)) && + (e.SelectedDefinition.IsMine || e.SelectedDefinition.isTurn() || e.SelectedDefinition.IsStairs || e.SelectedDefinition.IsWaterSlide || e.SelectedDefinition.IsSlideUnder), + c = null != e.EnterPiece && !!e.EnterPiece.ForcePickupPlacementOnTrackPiece && e.EnterPiece.PickupTypeToPlace != o.BonusItemType.None, + l = e.NextTrackPieces[0], + u = e.PreviousTrackPiece, + h = null != l && (!!l.SelectedDefinition.IsJumpOver || !!l.SelectedDefinition.IsSlideUnder), + d = null != u && (!!u.SelectedDefinition.IsJumpOver || !!u.SelectedDefinition.IsSlideUnder || !!u.SelectedDefinition.IsStairs); + if ( + (null == t || + 0 == t.length || + e.DistanceSinceLastBonusItem < a.BonusItemProtoData.MinDistanceBetweenBonusItems || + e.DistanceSinceLastMandatoryTurn < a.BonusItemProtoData.MinDistanceAfterTurn || + e.SelectedDefinition.IsZipLine || + e.DistanceSinceLastZipline < a.BonusItemProtoData.MinDistanceAfterZipline || + 1 == i || + 0 == e.CurrCanSpawnPowerup || + 1 == h || + 1 == d || + e.PlacedBonusItemCategory != o.BonusItemCategory.None || + 0 == a.BonusItemProtoData.AllowBonusItems || + a.BonusItemProtoData.ProbabilityBonusItem <= Number.EPSILON) && + 0 == c + ) + return !1; + let p = o.BonusItemType.None; + if (((p = 1 == c ? e.EnterPiece.PickupTypeToPlace : this._determinePickupItemTypeToPlace()), p == o.BonusItemType.None)) return !1; + let f = a.BonusItemProtoData.BonusItemPlacementHeight; + n.CoinSettings.BonusItemHeightAboveGround > 0 && (f = n.CoinSettings.BonusItemHeightAboveGround); + const m = Math.floor(t.length / 2), + g = t[m].clone(); + g.y += f; + let b, + _ = m - 1; + if ((_ < 0 && (_ = 0), _ != m)) { + b = t[_].subtract(t[m]); + const e = b.lengthSquared(), + n = Math.sqrt(e); + if (((b.x /= n), (b.y /= n), (b.z /= n), 2 == t.length)) { + const e = 0.5 * n; + g.addInPlace(b.multiplyByFloats(e, e, e)); + } + } else b = e.assetInfo.rootMesh.forward; + if (e.SelectedDefinition.IsLedgeLeft) { + const e = s.Vector3.Cross(s.Vector3.Up(), b); + g.addInPlace(e.multiplyByFloats(this._bonusLedgeLeftRightAdjust, this._bonusLedgeLeftRightAdjust, this._bonusLedgeLeftRightAdjust)); + } else if (1 == !!e.SelectedDefinition.IsLedgeRight) { + const e = s.Vector3.Cross(b, s.Vector3.Up()); + g.addInPlace(e.multiplyByFloats(this._bonusLedgeLeftRightAdjust, this._bonusLedgeLeftRightAdjust, this._bonusLedgeLeftRightAdjust)); + } + const v = this._bonusItemPool.get(p)[0]; + return (this._staticSparksPS.worldOffset = g), this._staticSparksPS.start(), v.setEnabled(!0), (v.position = g), v.lookAt(t[0].add(new s.Vector3(0, f, 0))), (e.bonusType = p), !0; + } + _determinePickupItemTypeToPlace() { + const e = c.Utils.random(0, this._totalProbability); + let t = o.BonusItemType.None; + if (this._totalProbability > 0 && this._availableItemProbabilities.length > 0 && e < this._spawnProbability) { + const e = this._availableItemProbabilities.length; + let n = c.Utils.random(0, this._totalProbability); + for (let i = 0; i < e; i++) { + const e = this._availableItemProbabilities[i]; + if (((n -= e.ItemProbability), n < 0 && e.ItemProbability > 0)) { + t = e.ItemType; + break; + } + } + } else t = o.BonusItemType.None; + return t; + } + checkBonusItemCollision(e, t) { + return i(this, void 0, void 0, function* () { + if (!this._isCheckingCollision) { + if (null != e.bonusType) { + const n = this._bonusItemPool.get(e.bonusType)[0], + i = this._bonusItemPool.get(e.bonusType)[1]; + t.intersectsMesh(i) && + (this._staticSparksPS.stop(), + u.EventHandler.instance.fireEvent(u.EventID.OnPowerupCollect, e.bonusType), + u.EventHandler.instance.fireEvent(u.EventID.PlaySFX, h.SoundID.BonusPickup), + (e.bonusType = void 0), + n.setEnabled(!1)); + } + this._isCheckingCollision = !1; + } + }); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.PowerupController = void 0); + const i = n(133), + r = n(40), + o = n(29), + a = n(139), + s = n(233); + t.PowerupController = class { + constructor(e) { + (this._isBoostActive = !1), + (this._isMagnetActive = !1), + (this._isShieldActive = !1), + (this._isMeterFull = !1), + (this._isTriggeredManually = !1), + (this.INITIAL_BOOST_DISTANCE = 250), + (this.INITIAL_SHIELD_TIME = 10), + (this.INITIAL_MAGNET_TIME = 10), + (this.SCALE_OFFSET = 1), + (this._boostMaxDistance = this.INITIAL_BOOST_DISTANCE), + (this._boostThresholdSlow = 10 * this.SCALE_OFFSET), + (this._magnetThresholdFast = this.INITIAL_MAGNET_TIME), + (this._shieldThresholdFast = this.INITIAL_SHIELD_TIME), + (this._boostDistanceLeft = 0), + (this._magnetTimeLeft = 0), + (this._shieldTimeLeft = 0), + (this._powerupVisibility = 0.2), + (this._visibilityReverse = !1), + (this._sfxEventSent = !1), + (this._scene = e); + } + setBoostValues(e) { + (this._boostThresholdSlow = 50), (this._boostMaxDistance = e); + } + upgradeBoost(e) { + const t = this.INITIAL_BOOST_DISTANCE + e * this.SCALE_OFFSET; + this.setBoostValues(t); + } + upgradeShield(e) { + this._shieldThresholdFast = this.INITIAL_SHIELD_TIME + this.INITIAL_SHIELD_TIME * (e / 100); + } + upgradeMagnet(e) { + this._magnetThresholdFast = this.INITIAL_MAGNET_TIME + this.INITIAL_MAGNET_TIME * (e / 100); + } + _setPowerUpsParams() { + const e = s.AbiltiesUpgradeModel.fromJson(n(235)), + t = r.GameController.instance.gameState.abilitiesData.abilitiesLevels, + i = t[2] - 1; + let o = 0; + (o = i > -1 ? this.INITIAL_BOOST_DISTANCE + e.data[2].rule[i].reward : this.INITIAL_BOOST_DISTANCE * this.SCALE_OFFSET), this.setBoostValues(o); + const a = t[1] - 1; + if (a > -1) { + const t = e.data[1].rule[a].reward; + this._magnetThresholdFast = this.INITIAL_MAGNET_TIME + this.INITIAL_MAGNET_TIME * (t / 100); + } else this._magnetThresholdFast = this.INITIAL_MAGNET_TIME; + const c = t[0] - 1; + if (c > -1) { + const t = e.data[0].rule[c].reward; + this._shieldThresholdFast = this.INITIAL_SHIELD_TIME + this.INITIAL_SHIELD_TIME * (t / 100); + } else this._shieldThresholdFast = this.INITIAL_SHIELD_TIME; + } + initialize() { + this._setPowerUpsParams(), + o.EventHandler.instance.addListener(o.EventID.OnTutorialStart, () => { + this.reset(); + }), + o.EventHandler.instance.addListener(o.EventID.OnPlayerDeath, () => { + this.reset(); + }), + o.EventHandler.instance.addListener(o.EventID.OnAbilityUpgraded, (e) => { + const t = e._id, + n = e._reward; + 2 == t ? this.upgradeBoost(n) : 1 == t ? this.upgradeMagnet(n) : 0 == t && this.upgradeShield(n); + }), + o.EventHandler.instance.addListener(o.EventID.OnPowerupCollect, (e) => { + const t = e; + t == i.BonusItemType.Boost + ? ((this._isBoostActive = !0), this._onBoostStart(), (this._boostDistanceLeft = this._boostMaxDistance)) + : t == i.BonusItemType.Vacuum + ? ((this._isMagnetActive = !0), + o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.Magnet), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupStart, i.BonusItemType.Vacuum), + (this._magnetTimeLeft = this._magnetThresholdFast)) + : t == i.BonusItemType.Shield && + (o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.ShieldLoop), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupStart, i.BonusItemType.Shield), + (this._isShieldActive = !0), + (this._shieldTimeLeft = this._shieldThresholdFast)); + }), + o.EventHandler.instance.addListener(o.EventID.OnMeterFull, () => { + (this._isMeterFull = !0), o.EventHandler.instance.fireEvent(o.EventID.PlaySFX, a.SoundID.BonusMeterFull); + }), + o.EventHandler.instance.addListener(o.EventID.OnKeyPress, (e) => { + (r.GameController.instance.tutorial.needZoneTutorial && r.GameController.instance.tutorial.isEnabled) || + ("Space" == e && + r.GameController.instance.isGameRunning && + this._isMeterFull && + !r.GameController.instance.character.isPlayerDead && + ((this._isTriggeredManually = !0), + (this._boostDistanceLeft = this._boostMaxDistance), + (this._isBoostActive = !0), + this._onBoostStart(), + (this._isMeterFull = !1), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerMeterUsed))); + }); + } + preUpdate() { + if (!r.GameController.instance.isGameRunning || r.GameController.instance.character.isPlayerDead || !this.isPowerupActive()) return; + const e = this._scene.deltaTime / 1e3; + this._createBlinkingEffect(e), + this._isBoostActive && ((this._boostDistanceLeft -= r.GameController.instance.character.params.deltaDistance), this._useBoostPower()), + this._isMagnetActive && ((this._magnetTimeLeft -= e), this._useMagnetPower()), + this._isShieldActive && ((this._shieldTimeLeft -= e), this._useShieldPower()); + } + postUpdate() {} + pause() { + this._isBoostActive && o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.BoostLoop), + this._isShieldActive && o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.ShieldLoop), + this._isMagnetActive && o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.Magnet); + } + resume() { + this._isBoostActive && o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.BoostLoop), + this._isShieldActive && o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.ShieldLoop), + this._isMagnetActive && o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.Magnet); + } + reset() { + this._isBoostActive && + ((this._isBoostActive = !1), + (this._boostDistanceLeft = 0), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Boost), + o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.BoostLoop)), + this._isShieldActive && + ((this._isShieldActive = !1), + (this._shieldTimeLeft = 0), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Shield), + o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.ShieldLoop)), + this._isMagnetActive && + ((this._isMagnetActive = !1), + (this._magnetTimeLeft = 0), + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Vacuum), + o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.Magnet)), + this._isMeterFull && ((this._isMeterFull = !1), o.EventHandler.instance.fireEvent(o.EventID.OnPowerMeterUsed, !0)), + o.EventHandler.instance.fireEvent(o.EventID.OnMeterReset), + (this._powerupVisibility = 0.2), + (this._sfxEventSent = !0), + (this._isTriggeredManually = !1), + (r.GameController.instance.character.params.boostVelocity = -1); + } + _onBoostStart() { + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupStart, i.BonusItemType.Boost), + (r.GameController.instance.character.params.boostVelocity = r.GameController.instance.character.PLAYER_SPEED_BOOST), + o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.BoostLoop); + } + _resetBoost() { + (this._isBoostActive = !1), (this._boostDistanceLeft = 0), (this._isTriggeredManually = !1), (r.GameController.instance.character.params.boostVelocity = -1); + } + _resetMagnet() { + (this._isMagnetActive = !1), (this._magnetTimeLeft = 0); + } + _resetShield() { + (this._isShieldActive = !1), (this._shieldTimeLeft = 0); + } + removeShield() { + o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Shield), + o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.ShieldLoop), + o.EventHandler.instance.fireEvent(o.EventID.PlaySFX, a.SoundID.ShieldPop), + (this._isShieldActive = !1), + (this._shieldTimeLeft = 0); + } + get shouldEmptyMeter() { + return !this._isMeterFull; + } + get isTriggeredManually() { + return this._isTriggeredManually; + } + get meterPowerUpType() { + return i.BonusItemType.Boost; + } + get isBoost() { + return this._isBoostActive; + } + get isShield() { + return this._isShieldActive; + } + get isMagnet() { + return this._isMagnetActive; + } + isPowerupActive() { + return this._isBoostActive || this._isShieldActive || this._isMagnetActive; + } + _createBlinkingEffect(e) { + this._visibilityReverse ? (this._powerupVisibility -= 5 * e) : (this._powerupVisibility += 5 * e), + this._powerupVisibility >= 1 ? (this._visibilityReverse = !0) : this._powerupVisibility <= 0.2 && (this._visibilityReverse = !1); + } + _useShieldPower() { + 0 == this._sfxEventSent && (o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.ShieldLoop), (this._sfxEventSent = !0)), + this._shieldTimeLeft < 0 && (o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Shield), o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.ShieldLoop), this._resetShield()); + } + _useBoostPower() { + this._boostDistanceLeft < 0 + ? (o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Boost), o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.BoostLoop), this._resetBoost()) + : this._boostDistanceLeft < this._boostThresholdSlow && + r.GameController.instance.character.params.boostVelocity > 0 && + ((r.GameController.instance.character.params.boostVelocity = r.GameController.instance.character.getBoostSlowSpeed()), o.EventHandler.instance.fireEvent(o.EventID.OnPowerupCooldown, i.BonusItemType.Boost)); + } + _useMagnetPower() { + 0 == this._sfxEventSent && (o.EventHandler.instance.fireEvent(o.EventID.PlaySFXLoop, a.SoundID.Magnet), (this._sfxEventSent = !0)), + this._magnetTimeLeft < 0 && (o.EventHandler.instance.fireEvent(o.EventID.OnPowerupComplete, i.BonusItemType.Vacuum), o.EventHandler.instance.fireEvent(o.EventID.StopSFX, a.SoundID.Magnet), this._resetMagnet()); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.TutorialController = void 0); + const i = n(40), + r = n(29), + o = n(133), + a = n(178), + s = n(19), + c = n(52); + t.TutorialController = class { + constructor(e) { + (this._isEnabled = !1), + (this._distanceToStepTrigger = 0), + (this._minDistanceToStepTrigger = 15), + (this._currentMilestoneIndex = 0), + (this._needZoneTutorial = !1), + (this._shouldRestartTutorial = !1), + (this._previousMilestoneIndex = 999), + (this._distanceAtStepStart = 0), + (this._scene = e); + } + initialize() {} + preUpdate() { + this._isEnabled && i.GameController.instance.isGameRunning && !i.GameController.instance.character.isPlayerDead && (this._checkAndPerformTutorialMessage(), this._checkForTutorialStep()); + } + postUpdate() {} + pause() {} + resume() {} + reset() { + (this._currentStep = void 0), (this._distanceToStepTrigger = 0); + } + get isEnabled() { + return this._isEnabled; + } + _resetSettings() { + this._shouldRestartTutorial || ((this._isEnabled = !1), (a.BonusItemProtoData.AllowCoins = !0), (a.BonusItemProtoData.AllowBonusItems = !0)); + } + enableAndGetSection(e) { + let t; + this._resetSettings(); + const n = i.GameController.instance.gameState.flagsData.tutorialPhaseState; + return ( + this._shouldRestartTutorial + ? (t = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex].TutorialTrackQueue) + : "phase2" == n + ? ((this._currentMilestoneIndex = 5), (this._previousMilestoneIndex = -1), (this._trackPacing = e.get(0).TutorialPacing), (t = this._trackPacing.TutorialMilestones[4].TutorialTrackQueue)) + : ((this._currentMilestoneIndex = 0), (this._previousMilestoneIndex = -1), (this._trackPacing = e.get(0).TutorialPacing), (t = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex].TutorialTrackQueue)), + (this._isEnabled = !0), + (a.BonusItemProtoData.AllowCoins = !1), + (a.BonusItemProtoData.AllowBonusItems = !1), + r.EventHandler.instance.fireEvent(r.EventID.OnTutorialStart), + t + ); + } + enableAndGetSectionZone(e) { + let t; + if ((this._resetSettings(), null == e)) ("waterslide" == this._currentTutorialZone || "mine" == this._currentTutorialZone) && (t = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex].TutorialTrackQueue); + else if (null != e && (e.Definition.IsMine || e.Definition.IsWaterSlide)) { + (this._currentMilestoneIndex = 0), (this._previousMilestoneIndex = 999); + const n = i.GameController.instance.gameState.flagsData.tutorialZonesDone, + r = i.GameController.instance.track.getAllZones(); + !n.includes("waterslide") && e.Definition.IsWaterSlide + ? ((this._trackPacing = r.get(3).TutorialPacing), (t = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex].TutorialTrackQueue), (this._currentTutorialZone = "waterslide")) + : !n.includes("mine") && + e.Definition.IsMine && + ((this._trackPacing = r.get(1).TutorialPacing), (t = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex].TutorialTrackQueue), (this._currentTutorialZone = "mine")); + } + if (null != t) { + let n = !1; + null == e && ((e = new o.NewTrackPieceInfo()), (n = !0)), + (e.Queue = new o.TrackSection()), + (e.Queue.Pieces = [...t.Pieces]), + (e.Queue.TrackLoop = t.TrackLoop), + n || (e.Piece = e.Queue.Pieces.shift()), + (e.Definition = void 0), + (e.Pacing = void 0), + (a.BonusItemProtoData.AllowCoins = !1), + (a.BonusItemProtoData.AllowBonusItems = !1); + } + return e; + } + enableForZoneIfRequired(e) { + this._currentTutorialZone == e && ((this._isEnabled = !0), (this._previousMilestoneIndex = -1), r.EventHandler.instance.fireEvent(r.EventID.OnTutorialStart)); + } + _disableTutorials() { + this._isEnabled = !1; + const e = i.GameController.instance.character.params; + e.currentTrackPiece.SelectedDefinition.IsWaterSlide + ? r.EventHandler.instance.fireEvent(r.EventID.OnChangeTutorialState, { tutorialPhaseState: "done", zoneDone: "waterslide" }) + : e.currentTrackPiece.SelectedDefinition.IsMine + ? r.EventHandler.instance.fireEvent(r.EventID.OnChangeTutorialState, { tutorialPhaseState: "done", zoneDone: "mine" }) + : r.EventHandler.instance.fireEvent(r.EventID.OnChangeTutorialState, { tutorialPhaseState: "done" }), + this._resetSettings(), + (this._needZoneTutorial = !1), + (this._currentTutorialZone = void 0), + setTimeout(() => { + r.EventHandler.instance.fireEvent(r.EventID.OnTutorialComplete), r.EventHandler.instance.fireEvent(r.EventID.OnPersistGameState), this.checkZoneTutorials(); + }, 5e3); + } + checkZoneTutorials() { + this._resetSettings(); + const e = i.GameController.instance.gameState.flagsData.tutorialZonesDone; + (e.includes("mine") && e.includes("waterslide")) || (this._needZoneTutorial = !0); + } + canStartZoneTutorial(e) { + if (0 == this._needZoneTutorial || e.CategoryType != o.TrackPieceCategory.ZoneEntranceTransition) return !1; + const t = i.GameController.instance.gameState.flagsData.tutorialZonesDone; + return !!((!t.includes("mine") && e.IsMine) || (!t.includes("waterslide") && e.IsWaterSlide)); + } + resurrectOnDeath() { + (this._shouldRestartTutorial = !0), + (this._currentMilestoneIndex = i.GameController.instance.character.params.currentTrackPiece.tutorialMilestoneIndex), + (this._previousMilestoneIndex = -1), + c.gameState.forceUpdateDistance(this._distanceAtStepStart), + (this._distanceAtStepStart = 0), + r.EventHandler.instance.fireEvent(r.EventID.OnResetGame), + (this._shouldRestartTutorial = !1), + r.EventHandler.instance.fireEvent(r.EventID.OnPlayGame, !0); + } + processScoreToRollback() { + this._previousMilestoneIndex < this._currentMilestoneIndex && ((this._previousMilestoneIndex = this._currentMilestoneIndex), (this._distanceAtStepStart = i.GameController.instance.gameState.currentRunData.distance)); + } + get shouldRestartTutorial() { + return this._shouldRestartTutorial; + } + get needZoneTutorial() { + return this._needZoneTutorial; + } + get currentTutorialZone() { + return this._currentTutorialZone; + } + get currentMilestoneIndex() { + return this._currentMilestoneIndex; + } + _checkForTutorialStep() { + const e = i.GameController.instance.character.params; + if (null == e.currentTrackPiece || e.currentTrackPiece.getNextTrackPiecesLength() < 0) return; + const t = e.currentTrackPiece, + n = t.NextTrackPieces[0]; + if (n.getNextTrackPiecesLength() < 0) return; + const o = n.NextTrackPieces[0], + a = o.SelectedDefinition; + if (this._distanceToStepTrigger > 0) + return ( + (this._distanceToStepTrigger -= e.deltaDistance), + void ( + null != this._currentStep && + "done" != this._currentStep && + this._distanceToStepTrigger < this._minDistanceToStepTrigger && + (r.EventHandler.instance.fireEvent(r.EventID.OnTutorialStepStart, { arrowDirection: this._currentStep }), (this._currentStep = "done")) + ) + ); + null != this._currentStep && (r.EventHandler.instance.fireEvent(r.EventID.OnTutorialStepComplete), (this._currentStep = void 0), (this._distanceToStepTrigger = 0)), + (this._distanceToStepTrigger = t.getEstimatedLength() - e.distanceFromPieceStart + n.getEstimatedLength() + o.getEstimatedLength() / 2), + a.IsTurnLeft || a.IsLedgeLeft + ? (this._currentStep = "Left") + : a.IsTurnRight || a.IsLedgeRight + ? (this._currentStep = "Right") + : a.IsSlideUnder + ? (this._currentStep = "Down") + : a.IsZipLine + ? ((this._currentStep = "Up"), (this._distanceToStepTrigger -= o.getEstimatedLength() / 2)) + : a.IsJumpOver + ? (this._currentStep = "Up") + : a.IsWaterSlide && a.Name.includes("Tilt Right") + ? (this._currentStep = "Right") + : a.IsWaterSlide && a.Name.includes("Tilt Left") + ? (this._currentStep = "Left") + : (this._currentStep = void 0), + null == this._currentStep && (this._distanceToStepTrigger = 0); + } + _checkAndPerformTutorialMessage() { + const e = i.GameController.instance.character.params; + if (null == e.currentTrackPiece || null == e.currentTrackPiece.EnterPiece || e.currentTrackPiece.tutorialStepDone) return; + let t, n, a, c, l; + switch (e.currentTrackPiece.EnterPiece.TutorialMessageType) { + case o.TutorialMessageDisplayType.SwipeToTurn: + (a = "Turn"), (n = s.WebUtils.hasTouch ? "Swipe left to turn left\nSwipe right to turn right" : 'Press "left arrow" or "A"\nto turn left\nPress "right arrow" or "D"\nto turn right'); + break; + case o.TutorialMessageDisplayType.SwipeUpInstruction: + (a = "Up"), (n = s.WebUtils.hasTouch ? "Swipe up to jump" : 'Press "up arrow" or "W"\nto jump'); + break; + case o.TutorialMessageDisplayType.SwipeDownInstruction: + (a = "Down"), + (l = "slide"), + e.currentTrackPiece.SelectedDefinition.IsWaterSlide ? (l = "dunk") : e.currentTrackPiece.SelectedDefinition.IsMine && (l = "duck"), + (n = s.WebUtils.hasTouch ? "Swipe down to " + l : 'Press "down arrow" or "S"\nto ' + l); + break; + case o.TutorialMessageDisplayType.TiltInstruction: + (a = "Turn"), + (l = "move"), + e.currentTrackPiece.SelectedDefinition.IsMine && (l = "tilt"), + (n = s.WebUtils.hasTouch ? `Swipe left to ${l} left\nSwipe right to ${l} right` : `Press "left arrow" or "A"\nto ${l} left\nPress "right arrow" or "D"\nto ${l} right`); + break; + case o.TutorialMessageDisplayType.NiceJobText: + t = "Nice Job !"; + break; + case o.TutorialMessageDisplayType.UnlockPowerMeter: + r.EventHandler.instance.fireEvent(r.EventID.OnPauseGame, "tutorialPause"), r.EventHandler.instance.fireEvent(r.EventID.OnPowerupUnlockAnim), (c = "Good job!\nBoost Power-up Unlocked!"); + break; + case o.TutorialMessageDisplayType.DoubleTapInstruction: + r.EventHandler.instance.fireEvent(r.EventID.OnMeterFull), + r.EventHandler.instance.fireEvent(r.EventID.OnUnlockPowerup), + (n = s.WebUtils.hasTouch ? "Double tap\nto activate Power-up" : 'Press "Spacebar"\nto activate Power-up'); + break; + case o.TutorialMessageDisplayType.YouAreReadyText: + (t = "You are ready now!"), this._disableTutorials(); + } + (null == n && null == t && null == c) || + (r.EventHandler.instance.fireEvent(r.EventID.OnTutorialStepStart, { messageWithDelayArrow: a, messageWithDelay: n, message: t, messageStatic: c }), (e.currentTrackPiece.tutorialStepDone = !0)); + } + selectTrackPiece(e, t) { + this._currentMilestoneIndex++, this._currentMilestoneIndex >= this._trackPacing.TutorialMilestones.length && (this._currentMilestoneIndex = this._trackPacing.TutorialMilestones.length - 1); + const n = this._trackPacing.TutorialMilestones[this._currentMilestoneIndex]; + (a.BonusItemProtoData.AllowCoins = !!n.AllowCoins), (a.BonusItemProtoData.AllowBonusItems = !1); + const i = new o.TrackSection(); + return (i.Pieces = [...n.TutorialTrackQueue.Pieces]), (t.Piece = i.Pieces.shift()), (t.Queue = i), (t.Definition = void 0), (t.Pacing = void 0), t; + } + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.CharacterFXController = void 0); + const r = n(40), + o = n(29), + a = n(62), + s = n(287), + c = n(133), + l = n(19); + t.CharacterFXController = class { + constructor(e) { + (this._initialized = !1), + (this._isBoostExhausted = !1), + (this._isGodModeExhausted = !1), + (this._boostParticleUpdateSpeed = 0), + (this._magnetEffectUpdateSpeed = 0), + (this.powerUpActive = new s.PowerUpActiveEffect()), + (this._blinkFreq = 1.5), + (this._currentTime = 0), + (this._scene = e); + } + _onPlayerReady() { + (this._sharedFillMeshMaterial = r.GameController.instance.track.getFillMeshMaterial()), + (this._sharedFillMeshMaterial.alpha = 0), + (this._playerMaterial = r.GameController.instance.character.material), + (this._playerMaterial.alphaCutOff = 0); + const e = r.GameController.instance.character.player; + this.powerUpActive.assignParent(e), (this._shieldMesh.parent = e), (this._boostParticle.emitter = e), (this._magnetEffect.emitter = e); + } + loadMesh() { + return i(this, void 0, void 0, function* () { + return (yield a.SceneLoader.ImportMeshAsync(null, "assets/effects/power_up_fx_mesh.glb", void 0, this._scene)).meshes[1]; + }); + } + initialize() { + this._createBoostTrailParticle(), + this._createMagnetEffect(), + this.loadMesh().then((e) => { + null != e && (this.powerUpActive.createEffect(e.clone(), this._scene), this._createShieldEffect(e)); + }), + o.EventHandler.instance.addListener(o.EventID.OnPlayGame, () => { + this._initialized || (this._onPlayerReady(), (this._initialized = !0)); + }), + o.EventHandler.instance.addListener(o.EventID.OnGodModeEnabled, () => { + (this._playerMaterial.transparencyMode = 2), (this._playerMaterial.alpha = 0.6), (this._sharedFillMeshMaterial.alpha = 1); + }), + o.EventHandler.instance.addListener(o.EventID.OnGodModeDisabled, () => { + (this._playerMaterial.transparencyMode = 0), (this._playerMaterial.alpha = 1), (this._sharedFillMeshMaterial.alpha = 0), (this._isGodModeExhausted = !1); + }), + o.EventHandler.instance.addListener(o.EventID.OnGodModeExhausted, () => { + this._isGodModeExhausted = !0; + }), + o.EventHandler.instance.addListener(o.EventID.OnPowerupStart, (e) => { + this.powerUpActive.isActive || this.powerUpActive.activate(), + e == c.BonusItemType.Boost + ? (this._boostParticle.start(), + (this._playerMaterial.transparencyMode = 2), + (this._playerMaterial.alpha = 0.7), + (this._playerMaterial.emissiveIntensity = 0.4), + (this._playerMaterial.emissiveColor = a.Color3.White()), + (this._sharedFillMeshMaterial.alpha = 1)) + : e == c.BonusItemType.Vacuum + ? this._magnetEffect.start() + : e == c.BonusItemType.Shield && this._shieldMesh.setEnabled(!0); + }), + o.EventHandler.instance.addListener(o.EventID.OnPowerupCooldown, () => { + (this._isBoostExhausted = !0), this._boostParticle.stop(), (this._playerMaterial.emissiveIntensity = 0); + }), + o.EventHandler.instance.addListener(o.EventID.OnTutorialStart, () => { + this.reset(); + }), + o.EventHandler.instance.addListener(o.EventID.OnPowerupComplete, (e) => { + e == c.BonusItemType.Boost + ? (this._boostParticle.stop(), + (this._playerMaterial.transparencyMode = 0), + (this._playerMaterial.alpha = 1), + (this._playerMaterial.emissiveIntensity = 0), + (this._sharedFillMeshMaterial.alpha = 0), + (this._isBoostExhausted = !1)) + : e == c.BonusItemType.Vacuum + ? this._magnetEffect.stop() + : e == c.BonusItemType.Shield && this._shieldMesh.setEnabled(!1); + }); + } + _createBoostTrailParticle() { + return ( + (this._boostParticle = a.ParticleSystem.Parse( + { + name: "boostTrail", + id: "default system", + capacity: 100, + emitter: [0, 0, 0], + particleEmitterType: { type: "BoxParticleEmitter", direction1: [0, 1, 0], direction2: [0, 1, 0], minEmitBox: [-0.2, -0.2, -0.2], maxEmitBox: [0.2, 0.2, 0.2] }, + texture: { + tags: null, + url: "", + uOffset: 0, + vOffset: 0, + uScale: 1, + vScale: 1, + uAng: 0, + vAng: 0, + wAng: 0, + uRotationCenter: 0.5, + vRotationCenter: 0.5, + wRotationCenter: 0.5, + isBlocking: !0, + uniqueId: 24, + name: "", + hasAlpha: !1, + getAlphaFromRGB: !1, + level: 1, + coordinatesIndex: 0, + coordinatesMode: 0, + wrapU: 1, + wrapV: 1, + wrapR: 1, + anisotropicFilteringLevel: 4, + isCube: !1, + is3D: !1, + is2DArray: !1, + gammaSpace: !0, + invertZ: !1, + lodLevelInAlpha: !1, + lodGenerationOffset: 0, + lodGenerationScale: 0, + linearSpecularLOD: !1, + isRenderTarget: !1, + animations: [], + invertY: !0, + samplingMode: 3, + }, + isLocal: !1, + animations: [], + beginAnimationOnStart: !1, + beginAnimationFrom: 0, + beginAnimationTo: 60, + beginAnimationLoop: !1, + startDelay: 0, + renderingGroupId: 0, + isBillboardBased: !0, + billboardMode: 7, + minAngularSpeed: 0, + maxAngularSpeed: 0, + minSize: 0.5, + maxSize: 1.5, + minScaleX: 1, + maxScaleX: 1, + minScaleY: 1, + maxScaleY: 1, + minEmitPower: 0, + maxEmitPower: 0, + minLifeTime: 0.5, + maxLifeTime: 1, + emitRate: 20, + gravity: [0, 0, 0], + noiseStrength: [10, 10, 10], + color1: [1, 1, 1, 1], + color2: [1, 1, 1, 1], + colorDead: [1, 1, 1, 0], + updateSpeed: 0.016666666666666666, + targetStopDuration: 0, + blendMode: 2, + preWarmCycles: 0, + preWarmStepOffset: 1, + minInitialRotation: 0, + maxInitialRotation: 0, + startSpriteCellID: 0, + endSpriteCellID: 0, + spriteCellChangeSpeed: 1, + spriteCellWidth: 0, + spriteCellHeight: 0, + spriteRandomStartCell: !1, + isAnimationSheetEnabled: !1, + emitRateGradients: [], + textureMask: [1, 1, 1, 1], + customShader: null, + preventAutoStart: !1, + }, + this._scene, + "", + !0 + )), + (this._boostParticle.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (this._boostParticle.particleTexture = new a.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !0, a.Texture.TRILINEAR_SAMPLINGMODE)), + (this._boostParticle.startSpriteCellID = 12), + (this._boostParticle.endSpriteCellID = 12), + (this._boostParticle.spriteCellHeight = 128), + (this._boostParticle.spriteCellWidth = 128), + (this._boostParticle.spriteCellChangeSpeed = 0), + (this._boostParticle.isAnimationSheetEnabled = !0), + (this._boostParticle.worldOffset = new a.Vector3(0, 0.4, 0)), + (this._boostParticleUpdateSpeed = this._boostParticle.updateSpeed), + this._boostParticle + ); + } + _createMagnetEffect() { + (this._magnetEffect = new a.ParticleSystem("magnet effect", 10, this._scene)), + this._magnetEffect.createPointEmitter(a.Vector3.Zero(), a.Vector3.Zero()), + (this._magnetEffect.particleTexture = new a.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !0)), + (this._magnetEffect.startSpriteCellID = 13), + (this._magnetEffect.endSpriteCellID = 13), + (this._magnetEffect.spriteCellHeight = 128), + (this._magnetEffect.spriteCellWidth = 128), + (this._magnetEffect.spriteCellChangeSpeed = 0), + (this._magnetEffect.isAnimationSheetEnabled = !0), + (this._magnetEffect.minEmitPower = 0), + (this._magnetEffect.maxEmitPower = 0), + (this._magnetEffect.emitRate = 2), + (this._magnetEffect.maxSize = 0.5), + (this._magnetEffect.minSize = 1.5), + (this._magnetEffect.updateSpeed += 0.005), + this._magnetEffect.addSizeGradient(0, 1.5), + this._magnetEffect.addSizeGradient(0.2, 1.3), + this._magnetEffect.addSizeGradient(0.5, 1), + this._magnetEffect.addSizeGradient(0.7, 0.8), + this._magnetEffect.addSizeGradient(0.9, 0.6), + this._magnetEffect.addSizeGradient(1, 0.5), + this._magnetEffect.addColorGradient(0, new a.Color4(1, 1, 1, 1)), + this._magnetEffect.addColorGradient(0.8, new a.Color4(1, 1, 1, 0.5)), + this._magnetEffect.addColorGradient(1, new a.Color4(1, 1, 1, 0)), + (this._magnetEffect.maxLifeTime = 0.5), + (this._magnetEffect.isLocal = !0), + (this._magnetEffect.renderingGroupId = r.ETR2RenderingGroup.PARTICLES), + (this._magnetEffect.worldOffset.y += 1), + (this._magnetEffectUpdateSpeed = this._magnetEffect.updateSpeed), + this._magnetEffect.stop(); + } + _createShieldEffect(e) { + (this._shieldMesh = e), (this._shieldMesh.renderingGroupId = r.ETR2RenderingGroup.CHARACTER), (this._shieldMesh.position = a.Vector3.Zero()), (this._shieldMesh.scaling = new a.Vector3(0.009, 0.009, 0.009)); + const t = new a.Texture("assets/effects/effects_transparent." + l.WebUtils.textureExtension, this._scene, !1, !1); + t.vOffset = -0.5; + const n = new a.StandardMaterial("shiledMeshMat", this._scene); + (n.diffuseTexture = t), + (n.diffuseColor = a.Color3.Green()), + (n.emissiveColor = a.Color3.Green()), + (n.diffuseTexture.hasAlpha = !0), + (n.useAlphaFromDiffuseTexture = !0), + (n.emissiveTexture = t), + (n.diffuseColor = a.Color3.Green()), + (n.disableLighting = !0), + (n.alpha = 1), + (n.alphaMode = a.Engine.ALPHA_ADD), + (n.backFaceCulling = !1), + (this._shieldMesh.position.y += 1), + (this._shieldMesh.material = n), + this._shieldMesh.setEnabled(!1); + } + preUpdate() { + if (((this._currentTime += 0.1), !this._initialized || !r.GameController.instance.isGameRunning)) return; + const e = this._scene.getEngine().getDeltaTime() / 1e3; + if ((this.powerUpActive.isActive && this.powerUpActive.update(e), this._shieldMesh.isEnabled() && this._shieldMesh.rotate(a.Axis.Y, 0.06, a.Space.LOCAL), this._isGodModeExhausted || this._isBoostExhausted)) { + const e = 0.3 + Math.abs(Math.sin(this._currentTime * this._blinkFreq)); + (this._sharedFillMeshMaterial.alpha = e), (this._playerMaterial.alpha = e); + } + } + postUpdate() {} + pause() { + this._boostParticle.isStarted && (this._boostParticle.updateSpeed = 0), this._magnetEffect.isStarted && (this._magnetEffect.updateSpeed = 0); + } + resume() { + this._boostParticle.isStarted && (this._boostParticle.updateSpeed = this._boostParticleUpdateSpeed), this._magnetEffect.isStarted && (this._magnetEffect.updateSpeed = this._magnetEffectUpdateSpeed); + } + reset() { + this._initialized && + ((this._isBoostExhausted = !1), + (this._isGodModeExhausted = !1), + this._magnetEffect.stop(), + this._boostParticle.stop(), + this._shieldMesh.setEnabled(!1), + this.powerUpActive.reset(), + (this._playerMaterial.alpha = 1), + (this._playerMaterial.transparencyMode = 0), + (this._sharedFillMeshMaterial.alpha = 0)); + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.PowerUpActiveEffect = void 0); + const i = n(62), + r = n(40); + t.PowerUpActiveEffect = class { + constructor() { + (this.meshOneScale = new i.Vector3(0.3, 0.3, 0.3)), (this.meshTwoScale = new i.Vector3(0.4, 1, 0.3)), (this.isActive = !1), (this.duration = 1.6), (this._time = 0); + } + assignParent(e) { + (this.meshOne.parent = e), (this.meshTwo.parent = e); + } + createEffect(e, t) { + (e.renderingGroupId = r.ETR2RenderingGroup.CHARACTER), + (e.scaling = e.scaling.multiplyByFloats(0.2, 0.2, 0.2)), + (this.meshOne = e.clone()), + (this.meshTwo = e.clone()), + (this.meshTwo.scaling.y += 0.003), + (this.meshOne.position.y += 0.6), + (this.meshTwo.position.y += 0.6), + e.setEnabled(!1); + const n = new i.Texture("assets/effects/effects_additive.jpg", t, !1, !1); + (this.meshOneMaterial = new i.StandardMaterial("power_up_effect_mat", t)), + (this.meshOneMaterial.diffuseTexture = n), + (this.meshOneMaterial.diffuseTexture.hasAlpha = !0), + (this.meshOneMaterial.useAlphaFromDiffuseTexture = !0), + (this.meshOneMaterial.emissiveTexture = n), + (this.meshOneMaterial.disableLighting = !0), + (this.meshOneMaterial.alpha = 0.89), + (this.meshOneMaterial.alphaMode = i.Engine.ALPHA_ADD), + (this.meshOneMaterial.backFaceCulling = !1), + (this.meshOne.material = this.meshOneMaterial), + (this.meshTwoMaterial = this.meshOneMaterial.clone("meshTwoMat")), + (this.meshTwo.material = this.meshTwoMaterial), + this.meshOne.setEnabled(!1), + this.meshTwo.setEnabled(!1); + } + activate() { + (this.isActive = !0), this.meshOne.setEnabled(!0), this.meshTwo.setEnabled(!0), (this.meshOneMaterial.alpha = 1), (this.meshTwoMaterial.alpha = 0); + } + deactivate() { + (this.isActive = !1), this.meshOne.setEnabled(!1), this.meshTwo.setEnabled(!1); + } + reset() { + this.meshOne.setEnabled(!1), this.meshTwo.setEnabled(!1), (this.isActive = !1), (this._time = 0); + } + update(e) { + if (this.isActive) { + if (((this._time += e), this._time > this.duration)) return void this.reset(); + const t = 1, + n = Math.abs(Math.sin(this._time * t)); + (this.meshOneMaterial.alpha = n), (this.meshTwoMaterial.alpha = 1 - n), this.meshOne.rotate(i.Vector3.Up(), 0.09, i.Space.WORLD), this.meshTwo.rotate(i.Vector3.Up(), 0.15, i.Space.WORLD); + } + } + }; + }, + function (e, t, n) { + "use strict"; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.DailyChallengesController = void 0); + const i = n(62), + r = n(40), + o = n(234), + a = n(52), + s = n(29); + t.DailyChallengesController = class { + constructor(e) { + (this._challengeUpdateCounter = 0), + (this._currentProgress = { percent: 0, text: "" }), + (this._shouldShowChestUI = !1), + (this._cloneDailyChallengeData = (e) => { + const t = new a.DailyChallengeData(); + return ( + (t.currentChallengeID = e.currentChallengeID), + (t.currentChallengeDate = e.currentChallengeDate), + (t.currentChallengeExpiryDate = e.currentChallengeExpiryDate), + (t.currentDayStreak = e.currentDayStreak), + (t.isChallengeCompleted = e.isChallengeCompleted), + (t.pastChallengeID = new Map(e.pastChallengeID)), + t + ); + }), + (this._scene = e); + } + get currentChallengeData() { + return this._activeChallengeData; + } + get currentChallengeProgress() { + return this._currentProgress; + } + get shouldShowChest() { + return this._shouldShowChestUI; + } + initialize() { + s.EventHandler.instance.addListener(s.EventID.OnDisablingChestUI, () => { + this._shouldShowChestUI = !1; + }), + this._initDailyChallengesController(), + s.EventHandler.instance.addListener(s.EventID.OnCheckDailyChallenge, this._checkChallengeCompletion.bind(this)), + s.EventHandler.instance.addListener(s.EventID.OnForceDailyChallenge, this._debugDailyChallenge.bind(this)); + } + _isCurrentChallengeValid() { + const e = new Date(this._dailyChallengesData.currentChallengeDate), + t = this.getDiffInDays(e); + return !(t >= 1) || (t > 1 && (this._dailyChallengesData.currentDayStreak = 0), !1); + } + _debugDailyChallenge(e) { + (this._activeChallengeID = e), + (this._isActiveChallengeCompleted = !1), + (this._activeChallengeData = this._challengesData.data.find((e) => e.ID == this._activeChallengeID)), + (this._activeChallengeExpiryTime = new Date(this._dailyChallengesData.currentChallengeExpiryDate)), + (this._dailyChallengesData.currentChallengeID = this._activeChallengeData.ID), + (this._dailyChallengesData.isChallengeCompleted = !1), + (this._dailyChallengesData.currentDayStreak = 0), + (this._currentProgress = { percent: 0, text: "" }), + s.EventHandler.instance.fireEvent(s.EventID.OnDailyChallengeDataUpdate, this._cloneDailyChallengeData(this._dailyChallengesData)), + s.EventHandler.instance.fireEvent(s.EventID.OnResetDayStatData, !0); + } + _initDailyChallengesController() { + if ( + ((this._challengesData = o.DailyChallenges.fromJson(n(236))), + (this._dailyChallengesData = this._cloneDailyChallengeData(r.GameController.instance.gameState.dailyChallengeData)), + (this._activeChallengeID = this._dailyChallengesData.currentChallengeID), + (this._isActiveChallengeCompleted = this._dailyChallengesData.isChallengeCompleted), + -1 == this._activeChallengeID) + ) + this._getNewChallenge(this._dailyChallengesData.currentDayStreak); + else { + this._dailyChallengesData.currentChallengeExpiryDate.split("/"); + (this._activeChallengeExpiryTime = new Date(this._dailyChallengesData.currentChallengeExpiryDate)), + this._isCurrentChallengeValid() + ? (this._activeChallengeData = this._challengesData.data.find((e) => e.ID == this._dailyChallengesData.currentChallengeID)) + : this._getNewChallenge(this._dailyChallengesData.currentDayStreak); + } + } + _updatePastChallengeIDs() { + const e = this._dailyChallengesData.pastChallengeID; + if (e.size > 0) + for (const t of e.entries()) { + const e = t[1], + n = new Date(e); + this.getDiffInDays(n) > 10 && this._dailyChallengesData.pastChallengeID.delete(t[0]); + } + } + _fillterChallenges() { + if ((this._updatePastChallengeIDs(), this._dailyChallengesData.pastChallengeID.size > 0)) { + const e = [...this._dailyChallengesData.pastChallengeID.keys()]; + return this._challengesData.data.filter((t) => 0 == e.includes(t.ID)); + } + return this._challengesData.data; + } + _getNewChallenge(e) { + const t = this._fillterChallenges(); + let n; + 0 == e + ? (n = t.filter((e) => 1 == e.tier)) + : 1 == e + ? (n = t.filter((e) => 1 == e.tier || 2 == e.tier)) + : 2 == e + ? (n = t.filter((e) => 1 == e.tier || 2 == e.tier || 3 == e.tier)) + : 3 == e + ? (n = t.filter((e) => 1 == e.tier || 2 == e.tier || 3 == e.tier || 4 == e.tier)) + : e >= 4 && (n = t), + 0 == n.length && (n = t); + const r = Math.floor(i.Scalar.RandomRange(0, n.length)); + (this._activeChallengeData = n[r]), + (this._activeChallengeID = this._activeChallengeData.ID), + (this._dailyChallengesData.currentChallengeID = this._activeChallengeData.ID), + (this._dailyChallengesData.isChallengeCompleted = !1); + const o = new Date(), + a = new Date(); + a.setDate(o.getDate() + 1), (this._dailyChallengesData.currentChallengeDate = o.getMonth() + 1 + "/" + o.getDate() + "/" + o.getFullYear()); + const c = a.getMonth() + 1 + "/" + a.getDate() + "/" + a.getFullYear(); + (this._dailyChallengesData.currentChallengeExpiryDate = c), + (this._activeChallengeExpiryTime = a), + this._dailyChallengesData.pastChallengeID.set(this._activeChallengeID, this._dailyChallengesData.currentChallengeDate), + (this._currentProgress.percent = 0), + (this._currentProgress.text = ""), + s.EventHandler.instance.fireEvent(s.EventID.OnDailyChallengeDataUpdate, this._cloneDailyChallengeData(this._dailyChallengesData)), + s.EventHandler.instance.fireEvent(s.EventID.OnResetDayStatData); + } + _checkForPerRunChallengeObjectiveIsComplete(e) { + if (this._isCurrentChallengeSatisfyFillterType()) { + const t = this._activeChallengeData.statValue; + switch (this._activeChallengeData.objectiveType) { + case o.ObjectiveType.CollectCoins: + return this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.coinsCollectedInWaterSlide >= t + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.coinsCollectedInMineCart >= t + : e.coins >= t; + case o.ObjectiveType.CollectPowerups: + return e.powerupsCollectedThisRun >= t; + case o.ObjectiveType.Distance: + return this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.distanceCoveredInWaterSlide >= t + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.distanceCoveredInMineCart >= t + : e.distance >= t; + case o.ObjectiveType.Resurrects: + return e.resurrectsThisRun >= t; + case o.ObjectiveType.Runs: + break; + case o.ObjectiveType.Score: + return e.score >= t; + case o.ObjectiveType.UsedPowerMeter: + return e.powermeterUsedThisRun >= t; + case o.ObjectiveType.WaterZone_Exit: + return e.waterslideSurvivedThisRun >= t; + case o.ObjectiveType.MineZone_Exit: + return e.minecartSurvivedThisRun >= t; + } + } + } + _checkForPerDayChallengeData(e) { + if (this._isCurrentChallengeSatisfyFillterType()) { + const t = this._activeChallengeData.statValue; + switch (this._activeChallengeData.objectiveType) { + case o.ObjectiveType.CollectCoins: + return this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.coinsCollectedInWaterSlide >= t + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.coinsCollectedInMineCart >= t + : e.coins >= t; + case o.ObjectiveType.CollectPowerups: + return e.powerupsCollectedToday >= t; + case o.ObjectiveType.Distance: + return this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.distanceCoveredInWaterSlide >= t + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.distanceCoveredInMineCart >= t + : e.distance >= t; + case o.ObjectiveType.Resurrects: + return e.resurrectsToday >= t; + case o.ObjectiveType.Runs: + return e.runs >= t; + case o.ObjectiveType.Score: + return e.score >= t; + case o.ObjectiveType.UsedPowerMeter: + return e.powerMeterUsedToday >= t; + case o.ObjectiveType.WaterZone_Exit: + return e.waterSlideSurvivedToday >= t; + case o.ObjectiveType.MineZone_Exit: + return e.minecartSurviveToday >= t; + } + } + } + _isCurrentChallengeSatisfyFillterType() { + const e = this._activeChallengeData.objectiveFilterType; + return ( + -1 == e || + (e == o.ObjectiveFilterType.WithoutCoins + ? 0 == r.GameController.instance.gameState.currentRunData.coins + : e == o.ObjectiveFilterType.WithoutPowerups + ? 0 == r.GameController.instance.gameState.currentRunData.powerupsCollectedThisRun + : e == o.ObjectiveFilterType.WithoutSaveMe + ? 0 == r.GameController.instance.gameState.currentRunData.resurrectsThisRun + : e != o.ObjectiveFilterType.WithoutStumble || 0 == r.GameController.instance.gameState.currentRunData.stumbleThisRun) + ); + } + _updateCurrentChallengeRunTime() { + this._isActiveChallengeCompleted || (this._dailyChallengesData.currentDayStreak = 0), + this._getNewChallenge(this._dailyChallengesData.currentDayStreak), + (this._dailyChallengesData = this._dailyChallengesData), + (this._activeChallengeID = this._dailyChallengesData.currentChallengeID), + (this._isActiveChallengeCompleted = this._dailyChallengesData.isChallengeCompleted), + (this._activeChallengeExpiryTime = new Date(this._dailyChallengesData.currentChallengeExpiryDate)), + s.EventHandler.instance.fireEvent(s.EventID.OnResetDayStatData); + } + getRewardAmount() { + const e = this._dailyChallengesData.currentDayStreak; + return 1 == e ? 200 : 2 == e ? 300 : 3 == e ? 400 : 4 == e ? 500 : this.getChestCoinReward(); + } + getChestCoinReward() { + const e = 100 * Math.random(); + return e <= 60 ? 1e3 : e > 60 && e <= 90 ? 2e3 : e > 90 ? 3e3 : void 0; + } + getDiffInDays(e) { + const t = new Date(); + return Math.floor(+t.getDate() - +e.getDate()); + } + getChallangeExpiryTime() { + const e = this._activeChallengeExpiryTime, + t = new Date(); + return Math.floor((e.getTime() - t.getTime()) / 1e3); + } + getExpiryTimeString() { + const e = this.getChallangeExpiryTime(), + t = Math.floor(e / 3600), + n = Math.floor((e % 3600) / 60), + i = Math.floor((e % 3600) % 60); + return (t > 0 ? t + (1 == t ? " hour, " : " hours, ") : "") + (n > 0 ? n + (1 == n ? " minute, " : " minutes, ") : "") + (i > 0 ? i + (1 == i ? " second" : " seconds") : ""); + } + _updateProgress(e) { + const t = this._activeChallengeData.statValue; + let n = 0; + switch (this._activeChallengeData.objectiveType) { + case o.ObjectiveType.CollectCoins: + n = + this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.coinsCollectedInWaterSlide + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.coinsCollectedInMineCart + : e.coins; + case o.ObjectiveType.CollectPowerups: + n = e.powerupsCollectedToday; + break; + case o.ObjectiveType.Distance: + n = + this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InWaterSlide + ? e.distanceCoveredInWaterSlide + : this._activeChallengeData.objectiveFilterType == o.ObjectiveFilterType.InMineCart + ? e.distanceCoveredInMineCart + : e.distance; + break; + case o.ObjectiveType.Resurrects: + n = e.resurrectsToday; + break; + case o.ObjectiveType.Runs: + n = e.runs; + break; + case o.ObjectiveType.Score: + n = e.score; + break; + case o.ObjectiveType.UsedPowerMeter: + n = e.powerMeterUsedToday; + break; + case o.ObjectiveType.WaterZone_Exit: + n = e.waterSlideSurvivedToday; + break; + case o.ObjectiveType.MineZone_Exit: + n = e.minecartSurviveToday; + } + n > t && (n = t), (this._currentProgress.percent = (n / t) * 100), (this._currentProgress.text = `${Math.round(n)} / ${t}`); + } + _checkChallengeCompletion() { + this._isActiveChallengeCompleted || + (this._activeChallengeData.objectiveTimeType == o.ObjectiveTimeType.PerRun + ? this._checkForPerRunChallengeObjectiveIsComplete(r.GameController.instance.gameState.currentRunData) && + ((this._isActiveChallengeCompleted = !0), + (this._dailyChallengesData.isChallengeCompleted = this._isActiveChallengeCompleted), + (this._dailyChallengesData.currentDayStreak += 1), + (this._shouldShowChestUI = !0), + s.EventHandler.instance.fireEvent(s.EventID.OnDailyChallengeDataUpdate, this._cloneDailyChallengeData(this._dailyChallengesData)), + (this._currentProgress = { percent: 0, text: "" })) + : this._activeChallengeData.objectiveTimeType == o.ObjectiveTimeType.OverTime && + this._checkForPerDayChallengeData(r.GameController.instance.gameState.currentDayDataFinal) && + ((this._isActiveChallengeCompleted = !0), + (this._dailyChallengesData.isChallengeCompleted = this._isActiveChallengeCompleted), + (this._dailyChallengesData.currentDayStreak += 1), + (this._shouldShowChestUI = !0), + s.EventHandler.instance.fireEvent(s.EventID.OnDailyChallengeDataUpdate, this._cloneDailyChallengeData(this._dailyChallengesData)), + (this._currentProgress = { percent: 0, text: "" }))); + } + preUpdate() { + if (this._challengeUpdateCounter % 60 == 0) { + this.getChallangeExpiryTime() <= 0 && this._updateCurrentChallengeRunTime(); + const e = this.getExpiryTimeString(); + s.EventHandler.instance.fireEvent(s.EventID.NextChallengeTimerChanged, e), + this._activeChallengeData.objectiveTimeType == o.ObjectiveTimeType.OverTime && this._updateProgress(r.GameController.instance.gameState.currentDayData); + } + this._challengeUpdateCounter++; + } + postUpdate() {} + pause() {} + resume() {} + reset() {} + }; + }, + function (e, t, n) { + "use strict"; + var i = + (this && this.__awaiter) || + function (e, t, n, i) { + return new (n || (n = Promise))(function (r, o) { + function a(e) { + try { + c(i.next(e)); + } catch (e) { + o(e); + } + } + function s(e) { + try { + c(i.throw(e)); + } catch (e) { + o(e); + } + } + function c(e) { + var t; + e.done + ? r(e.value) + : ((t = e.value), + t instanceof n + ? t + : new n(function (e) { + e(t); + })).then(a, s); + } + c((i = i.apply(e, t || [])).next()); + }); + }; + Object.defineProperty(t, "__esModule", { value: !0 }), (t.ChestController = t.ChestAnimation = void 0); + const r = n(40), + o = n(62), + a = n(29), + s = n(139); + var c; + !(function (e) { + (e[(e.Idle = 0)] = "Idle"), (e[(e.Open = 1)] = "Open"), (e[(e.Landing = 2)] = "Landing"), (e[(e.Spit = 3)] = "Spit"), (e[(e.OpenIdle = 4)] = "OpenIdle"); + })((c = t.ChestAnimation || (t.ChestAnimation = {}))); + t.ChestController = class { + constructor(e) { + (this._chestMeshFileURL = "assets/objects/chest/chest.glb"), + (this._chestTexture = "assets/objects/chest/chest.jpg"), + (this._beigeBgTexture = "assets/textures/beige_bg.jpg"), + (this._skeletons = []), + (this._animationGroups = []), + (this._scene = e); + } + initialize() { + return i(this, void 0, void 0, function* () { + this._loadBlackPanel(), + this._loadBeiegPanel(), + this._loadAssetChestAsync(this._scene), + a.EventHandler.instance.addListener(a.EventID.OnEnablingChestUI, this._enableChestUI.bind(this)), + a.EventHandler.instance.addListener(a.EventID.OnDisablingChestUI, this._disableChestUI.bind(this)), + a.EventHandler.instance.addListener(a.EventID.OnChestTap, this._chestTap.bind(this)), + (this._light = new o.HemisphericLight("HemiLight", new o.Vector3(0, 1, 0), this._scene)), + this._light.setEnabled(!1); + }); + } + _enableChestUI() { + this._blackBg.setEnabled(!0), + this._chest.setEnabled(!0), + this._beigeBg.setEnabled(!0), + this._light.setEnabled(!0), + this._playAnimation(c.Landing), + this._chestClosedSparks.start(), + a.EventHandler.instance.fireEvent(a.EventID.PlaySFX, s.SoundID.ChestDropin); + } + _disableChestUI() { + this._blackBg.setEnabled(!1), + this._chest.setEnabled(!1), + this._beigeBg.setEnabled(!1), + this._light.setEnabled(!1), + this._chestClosedSparks.stop(), + this._chestOpenRaysPS.stop(), + a.EventHandler.instance.fireEvent(a.EventID.PlaySFX, s.SoundID.ChestLeave); + } + _chestTap() { + this._chestClosedSparks.stop(), this._playAnimation(c.Open); + const e = r.GameController.instance.dailyChallenges.getRewardAmount(); + a.EventHandler.instance.fireEvent(a.EventID.OnChestReward, e), + this._chestOpenRaysPS.start(), + a.EventHandler.instance.fireEvent(a.EventID.PlaySFX, s.SoundID.ChestOpen), + setTimeout(() => { + this._chestOpenRaysPS.stop(); + }, 2e3); + } + _createidleSparksPS() { + (this._chestClosedSparks = o.ParticleSystem.Parse( + { + name: "chestSparksClosed", + id: "default system", + capacity: 400, + emitter: [0, 0, 0], + particleEmitterType: { type: "BoxParticleEmitter", direction1: [1, 0, 1], direction2: [-1, 0, -1], minEmitBox: [-0.3, -0.01, -0.3], maxEmitBox: [0.3, 0.01, 0.3] }, + texture: { + tags: null, + url: "", + uOffset: 0, + vOffset: 0, + uScale: 1, + vScale: 1, + uAng: 0, + vAng: 0, + wAng: 0, + uRotationCenter: 0.5, + vRotationCenter: 0.5, + wRotationCenter: 0.5, + isBlocking: !0, + uniqueId: 8, + name: "", + hasAlpha: !0, + getAlphaFromRGB: !1, + level: 1, + coordinatesIndex: 0, + coordinatesMode: 0, + wrapU: 1, + wrapV: 1, + wrapR: 1, + anisotropicFilteringLevel: 4, + isCube: !1, + is3D: !1, + is2DArray: !1, + gammaSpace: !0, + invertZ: !1, + lodLevelInAlpha: !1, + lodGenerationOffset: 0, + lodGenerationScale: 0, + linearSpecularLOD: !1, + isRenderTarget: !1, + animations: [], + invertY: !0, + samplingMode: 3, + }, + isLocal: !1, + animations: [], + beginAnimationOnStart: !1, + beginAnimationFrom: 0, + beginAnimationTo: 60, + beginAnimationLoop: !1, + startDelay: 0, + renderingGroupId: 0, + isBillboardBased: !0, + billboardMode: 7, + minAngularSpeed: 0, + maxAngularSpeed: 0, + minSize: 0.1, + maxSize: 0.1, + minScaleX: 1, + maxScaleX: 1, + minScaleY: 1, + maxScaleY: 1, + minEmitPower: 2, + maxEmitPower: 2, + minLifeTime: 1, + maxLifeTime: 2, + emitRate: 50, + gravity: [0, 0, 0], + noiseStrength: [10, 10, 10], + color1: [1, 1, 1, 1], + color2: [1, 1, 1, 1], + colorDead: [1, 1, 1, 0], + updateSpeed: 0.016666666666666666, + targetStopDuration: 0, + blendMode: 2, + preWarmCycles: 0, + preWarmStepOffset: 1, + minInitialRotation: 0, + maxInitialRotation: 0, + startSpriteCellID: 0, + endSpriteCellID: 0, + spriteCellChangeSpeed: 1, + spriteCellWidth: 0, + spriteCellHeight: 0, + spriteRandomStartCell: !1, + isAnimationSheetEnabled: !1, + velocityGradients: [ + { gradient: 0, factor1: 0.1, factor2: 0.3 }, + { gradient: 1, factor1: 1, factor2: 0.1 }, + ], + limitVelocityGradients: [], + limitVelocityDamping: 0.4, + textureMask: [1, 1, 1, 1], + customShader: null, + preventAutoStart: !1, + }, + this._scene, + "", + !0 + )), + (this._chestClosedSparks.particleTexture = new o.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !0, o.Texture.TRILINEAR_SAMPLINGMODE)), + (this._chestClosedSparks.startSpriteCellID = 45), + (this._chestClosedSparks.endSpriteCellID = 45), + (this._chestClosedSparks.spriteCellHeight = 64), + (this._chestClosedSparks.spriteCellWidth = 64), + (this._chestClosedSparks.spriteCellChangeSpeed = 0), + (this._chestClosedSparks.isAnimationSheetEnabled = !0), + (this._chestClosedSparks.isLocal = !1), + (this._chestClosedSparks.minSize = 0.3), + (this._chestClosedSparks.maxSize = 0.3), + (this._chestClosedSparks.minLifeTime = 1.5), + (this._chestClosedSparks.maxLifeTime = 2), + (this._chestClosedSparks.minInitialRotation = 0), + (this._chestClosedSparks.maxInitialRotation = Math.PI), + this._chestClosedSparks.addAngularSpeedGradient(0, 0.5, 0.8), + this._chestClosedSparks.addAngularSpeedGradient(1, 1, 2), + (this._chestClosedSparks.blendMode = o.ParticleSystem.BLENDMODE_ADD); + const e = new o.Vector3(0, -0.6, 0.3); + (this._chestClosedSparks.worldOffset = this._chest.position.subtract(e)), (this._chestClosedSparks.layerMask = 3), (this._chestClosedSparks.renderingGroupId = r.ETR2RenderingGroup.UI); + } + _createRaysOnOpenPS() { + (this._chestOpenRaysPS = o.ParticleSystem.Parse( + { + name: "chestRays", + id: "default system", + capacity: 10, + emitter: [0, 0, 0], + particleEmitterType: { type: "ConeParticleEmitter", radius: 0.1, angle: 0.7853981633974483, directionRandomizer: 0, radiusRange: 1, heightRange: 1, emitFromSpawnPointOnly: !1 }, + texture: { + tags: null, + url: "", + uOffset: 0, + vOffset: 0, + uScale: 1, + vScale: 1, + uAng: 0, + vAng: 0, + wAng: 0, + uRotationCenter: 0.5, + vRotationCenter: 0.5, + wRotationCenter: 0.5, + isBlocking: !0, + uniqueId: 8, + name: "", + hasAlpha: !0, + getAlphaFromRGB: !1, + level: 1, + coordinatesIndex: 0, + coordinatesMode: 0, + wrapU: 1, + wrapV: 1, + wrapR: 1, + anisotropicFilteringLevel: 4, + isCube: !1, + is3D: !1, + is2DArray: !1, + gammaSpace: !0, + invertZ: !1, + lodLevelInAlpha: !1, + lodGenerationOffset: 0, + lodGenerationScale: 0, + linearSpecularLOD: !1, + isRenderTarget: !1, + animations: [], + invertY: !0, + samplingMode: 3, + }, + isLocal: !1, + animations: [], + beginAnimationOnStart: !1, + beginAnimationFrom: 0, + beginAnimationTo: 60, + beginAnimationLoop: !1, + startDelay: 0, + renderingGroupId: 0, + isBillboardBased: !0, + billboardMode: 7, + minAngularSpeed: 0, + maxAngularSpeed: 0, + minSize: 0.1, + maxSize: 0.1, + minScaleX: 5, + maxScaleX: 10, + minScaleY: 20, + maxScaleY: 20, + minEmitPower: 0, + maxEmitPower: 0, + minLifeTime: 2, + maxLifeTime: 2, + emitRate: 3, + gravity: [0, 0, 0], + noiseStrength: [10, 10, 10], + color1: [1, 1, 1, 1], + color2: [1, 1, 1, 1], + colorDead: [1, 1, 1, 0], + updateSpeed: 0.016666666666666666, + targetStopDuration: 1, + blendMode: 2, + preWarmCycles: 0, + preWarmStepOffset: 1, + minInitialRotation: 0, + maxInitialRotation: 0, + startSpriteCellID: 0, + endSpriteCellID: 0, + spriteCellChangeSpeed: 1, + spriteCellWidth: 0, + spriteCellHeight: 0, + spriteRandomStartCell: !1, + isAnimationSheetEnabled: !1, + textureMask: [1, 1, 1, 1], + customShader: null, + preventAutoStart: !0, + }, + this._scene, + "", + !0 + )), + (this._chestOpenRaysPS.particleTexture = new o.Texture("assets/effects/effects_additive.jpg", this._scene, !1, !0, o.Texture.TRILINEAR_SAMPLINGMODE)), + (this._chestOpenRaysPS.startSpriteCellID = 21), + (this._chestOpenRaysPS.endSpriteCellID = 21), + (this._chestOpenRaysPS.spriteCellHeight = 64), + (this._chestOpenRaysPS.spriteCellWidth = 128), + (this._chestOpenRaysPS.spriteCellChangeSpeed = 0), + (this._chestOpenRaysPS.isAnimationSheetEnabled = !0), + (this._chestOpenRaysPS.blendMode = o.ParticleSystem.BLENDMODE_ADD), + (this._chestOpenRaysPS.targetStopDuration = 1), + (this._chestOpenRaysPS.minInitialRotation = Math.PI / 2), + (this._chestOpenRaysPS.maxInitialRotation = Math.PI / 2), + (this._chestOpenRaysPS.minScaleX = 20), + (this._chestOpenRaysPS.maxScaleX = 25), + (this._chestOpenRaysPS.minScaleY = 25), + (this._chestOpenRaysPS.maxScaleY = 30); + const e = new o.Vector3(0, -1, 0); + (this._chestOpenRaysPS.worldOffset = this._chest.position.subtract(e)), (this._chestOpenRaysPS.layerMask = 3), (this._chestOpenRaysPS.renderingGroupId = r.ETR2RenderingGroup.UI); + } + _initializeVFX() { + this._createidleSparksPS(), this._createRaysOnOpenPS(); + } + _loadBlackPanel() { + (this._blackBg = o.Mesh.CreatePlane("ChestBG", 20, this._scene)), (this._blackBg.position.z = 1), (this._blackBg.renderingGroupId = r.ETR2RenderingGroup.UI); + const e = new o.StandardMaterial("BlackBG", this._scene); + (e.diffuseColor = o.Color3.Black()), (e.alpha = 0.5), (this._blackBg.material = e), (this._blackBg.layerMask = 3), this._blackBg.setEnabled(!1); + } + _loadBeiegPanel() { + (this._beigeBg = o.Mesh.CreatePlane("ChestBG2", 20, this._scene)), (this._beigeBg.position.z = 2), (this._beigeBg.renderingGroupId = r.ETR2RenderingGroup.UI); + const e = new o.StandardMaterial("BeiegBG", this._scene), + t = new o.Texture(this._beigeBgTexture, this._scene); + (e.diffuseTexture = t), (this._beigeBg.material = e), (this._beigeBg.layerMask = 3), this._beigeBg.setEnabled(!1); + } + _loadAssetChestAsync(e) { + return i(this, void 0, void 0, function* () { + const t = yield o.SceneLoader.ImportMeshAsync(null, this._chestMeshFileURL, void 0, e); + this._material = new o.StandardMaterial("ChestMaterial", this._scene); + const n = new o.Texture(this._chestTexture, this._scene); + (this._material.diffuseTexture = n), + (this._material.emissiveTexture = n), + (this._material.disableLighting = !0), + (t.meshes[1].material = this._material), + (t.meshes[1].renderingGroupId = r.ETR2RenderingGroup.UI), + (this._chest = t.meshes[0]), + (this._chest.renderingGroupId = r.ETR2RenderingGroup.UI), + (this._chest.scaling = new o.Vector3(2.5 * this._chest.scaling.x, 2.5 * this._chest.scaling.y, 2.5 * this._chest.scaling.z)), + (this._chest.position.y += 2), + (this._chest.rotation = o.Vector3.Zero()), + (this._animationGroups = t.animationGroups), + (this._skeletons = t.skeletons), + (this._chest.layerMask = 3), + this._setupAnimations(), + this._chest.setEnabled(!1), + this._initializeVFX(), + this._playAnimation(c.Idle); + }); + } + _setupAnimations() { + (this._idleAnimation = this._animationGroups.find((e) => "idle" === e.name)), + (this._openAnimation = this._animationGroups.find((e) => "open" === e.name)), + this._openAnimation.onAnimationGroupEndObservable.add(() => { + this._playAnimation(c.OpenIdle); + }), + (this._landAnimation = this._animationGroups.find((e) => "landing" === e.name)), + (this._landAnimation.loopAnimation = !1), + this._landAnimation.onAnimationGroupEndObservable.add(() => { + this._playAnimation(c.Idle), a.EventHandler.instance.fireEvent(a.EventID.OnChestLandingDone); + }), + (this._openIdleAnimation = this._animationGroups.find((e) => "open_idle" === e.name)), + (this._spitAnimatoin = this._animationGroups.find((e) => "spit" === e.name)); + } + _getAnimation(e) { + switch (e) { + case c.Idle: + return this._idleAnimation; + case c.Open: + return this._openAnimation; + case c.Landing: + return this._landAnimation; + case c.Spit: + return this._spitAnimatoin; + case c.OpenIdle: + return this._openIdleAnimation; + } + } + _playAnimation(e, t = 0) { + var n, i; + const r = this._currentAnimaton; + null == r || r.stop(), null == r || r.setWeightForAllAnimatables(0), (this._currentAnimaton = this._getAnimation(e)); + let o = !1; + (e != c.Idle && e != c.OpenIdle && e != c.Spit) || (o = !0), + null === (n = this._currentAnimaton) || void 0 === n || n.setWeightForAllAnimatables(1), + 0 == t + ? null === (i = this._currentAnimaton) || void 0 === i || i.start(o) + : setTimeout(() => { + var e; + null === (e = this._currentAnimaton) || void 0 === e || e.start(o); + }, t); + } + preUpdate() {} + postUpdate() {} + pause() { + var e; + null === (e = this._currentAnimaton) || void 0 === e || e.stop(); + } + resume() { + var e; + null === (e = this._currentAnimaton) || void 0 === e || e.play(); + } + reset() {} + }; + }, + function (e) { + e.exports = JSON.parse( + '{"BonusMeterFull":{"start":0,"end":0.4010884353741497,"loop":false},"BonusPickup":{"start":2,"end":2.1775056689342405,"loop":false},"BoostLoop":{"start":4,"end":4.7424489795918365,"loop":false},"ButtonClick":{"start":6,"end":6.696598639455782,"loop":false},"CashRegister":{"start":8,"end":9.441950113378685,"loop":false},"ChestDropin":{"start":11,"end":11.708117913832199,"loop":false},"ChestLeave":{"start":13,"end":13.297052154195011,"loop":false},"ChestOpen":{"start":15,"end":15.77047619047619,"loop":false},"ChestScreenOpen":{"start":17,"end":17.979183673469386,"loop":false},"Coin":{"start":19,"end":19.353514739229023,"loop":false},"GruntJump":{"start":21,"end":21.170113378684807,"loop":false},"GruntJumpLand":{"start":23,"end":23.255419501133787,"loop":false},"GruntTrip":{"start":25,"end":25.276780045351472,"loop":false},"Magnet":{"start":27,"end":27.889387755102042,"loop":false},"MineCartLoop":{"start":29,"end":30.20843537414966,"loop":false},"MineCartTilt":{"start":32,"end":32.41151927437642,"loop":false},"MineCartTurn":{"start":34,"end":34.35233560090703,"loop":false},"MonkeyRoar":{"start":36,"end":38.114331065759636,"loop":false},"PillarCrash":{"start":40,"end":41.84746031746032,"loop":false},"PillarFall":{"start":43,"end":46.38650793650794,"loop":false},"Scream":{"start":48,"end":49.47736961451247,"loop":false},"ShieldLoop":{"start":51,"end":51.69668934240363,"loop":false},"ShieldPop":{"start":53,"end":53.66244897959184,"loop":false},"Sizzle":{"start":55,"end":56.36521541950113,"loop":false},"Slide":{"start":58,"end":58.83827664399093,"loop":false},"Splash":{"start":60,"end":62.51827664399093,"loop":false},"SplashEntry":{"start":64,"end":64.62721088435374,"loop":false},"Splat":{"start":66,"end":66.32598639455782,"loop":false},"Swish":{"start":68,"end":68.11120181405896,"loop":false},"Woohoo":{"start":70,"end":71.05224489795918,"loop":false},"Wooosh":{"start":73,"end":73.29727891156463,"loop":false}}' + ); + }, + function (e) { + e.exports = JSON.parse( + '{"FlameTrap":{"start":0,"end":2.6417687074829934,"loop":false},"SawBlade":{"start":4,"end":9.027120181405895,"loop":false},"SkySummitPlank":{"start":11,"end":12.186190476190475,"loop":false},"SpinningSpikeTrap":{"start":14,"end":14.623764172335601,"loop":false},"WaterLoopC":{"start":16,"end":18.52126984126984,"loop":false}}' + ); + }, + function (e, t, n) { + (function (t) { + var i; + "undefined" != typeof self && self, + (i = function (e, t, n, i, r) { + return (function (e) { + var t = {}; + function n(i) { + if (t[i]) return t[i].exports; + var r = (t[i] = { i: i, l: !1, exports: {} }); + return e[i].call(r.exports, r, r.exports, n), (r.l = !0), r.exports; + } + return ( + (n.m = e), + (n.c = t), + (n.d = function (e, t, i) { + n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: i }); + }), + (n.r = function (e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }); + }), + (n.t = function (e, t) { + if ((1 & t && (e = n(e)), 8 & t)) return e; + if (4 & t && "object" == typeof e && e && e.__esModule) return e; + var i = Object.create(null); + if ((n.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e)) + for (var r in e) + n.d( + i, + r, + function (t) { + return e[t]; + }.bind(null, r) + ); + return i; + }), + (n.n = function (e) { + var t = + e && e.__esModule + ? function () { + return e.default; + } + : function () { + return e; + }; + return n.d(t, "a", t), t; + }), + (n.o = function (e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }), + (n.p = ""), + n((n.s = "./legacy/legacy.ts")) + ); + })({ + "../../../../node_modules/@fortawesome/fontawesome-svg-core/index.es.js": function (e, t, n) { + "use strict"; + n.r(t), + function (e, i) { + function r(e) { + return (r = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + })(e); + } + function o(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + function a(e, t, n) { + return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e; + } + function s(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}, + i = Object.keys(n); + "function" == typeof Object.getOwnPropertySymbols && + (i = i.concat( + Object.getOwnPropertySymbols(n).filter(function (e) { + return Object.getOwnPropertyDescriptor(n, e).enumerable; + }) + )), + i.forEach(function (t) { + a(e, t, n[t]); + }); + } + return e; + } + function c(e, t) { + return ( + (function (e) { + if (Array.isArray(e)) return e; + })(e) || + (function (e, t) { + var n = [], + i = !0, + r = !1, + o = void 0; + try { + for (var a, s = e[Symbol.iterator](); !(i = (a = s.next()).done) && (n.push(a.value), !t || n.length !== t); i = !0); + } catch (e) { + (r = !0), (o = e); + } finally { + try { + i || null == s.return || s.return(); + } finally { + if (r) throw o; + } + } + return n; + })(e, t) || + (function () { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + })() + ); + } + function l(e) { + return ( + (function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = new Array(e.length); t < e.length; t++) n[t] = e[t]; + return n; + } + })(e) || + (function (e) { + if (Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e)) return Array.from(e); + })(e) || + (function () { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + })() + ); + } + n.d(t, "icon", function () { + return Pt; + }), + n.d(t, "noAuto", function () { + return _t; + }), + n.d(t, "config", function () { + return L; + }), + n.d(t, "toHtml", function () { + return Ne; + }), + n.d(t, "layer", function () { + return St; + }), + n.d(t, "text", function () { + return xt; + }), + n.d(t, "counter", function () { + return Tt; + }), + n.d(t, "library", function () { + return bt; + }), + n.d(t, "dom", function () { + return yt; + }), + n.d(t, "parse", function () { + return Ct; + }), + n.d(t, "findIconDefinition", function () { + return mt; + }); + var u = function () {}, + h = {}, + d = {}, + p = null, + f = { mark: u, measure: u }; + try { + "undefined" != typeof window && (h = window), + "undefined" != typeof document && (d = document), + "undefined" != typeof MutationObserver && (p = MutationObserver), + "undefined" != typeof performance && (f = performance); + } catch (e) {} + var m = (h.navigator || {}).userAgent, + g = void 0 === m ? "" : m, + b = h, + _ = d, + v = p, + y = f, + C = (b.document, !!_.documentElement && !!_.head && "function" == typeof _.addEventListener && "function" == typeof _.createElement), + P = ~g.indexOf("MSIE") || ~g.indexOf("Trident/"), + x = ["HTML", "HEAD", "STYLE", "SCRIPT"], + T = { fas: "solid", far: "regular", fal: "light", fab: "brands", fa: "solid" }, + S = { solid: "fas", regular: "far", light: "fal", brands: "fab" }, + O = /Font Awesome 5 (Solid|Regular|Light|Brands|Free|Pro)/, + E = { 900: "fas", 400: "far", normal: "far", 300: "fal" }, + M = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + A = M.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), + I = ["class", "data-prefix", "data-icon", "data-fa-transform", "data-fa-mask"], + D = [ + "xs", + "sm", + "lg", + "fw", + "ul", + "li", + "border", + "pull-left", + "pull-right", + "spin", + "pulse", + "rotate-90", + "rotate-180", + "rotate-270", + "flip-horizontal", + "flip-vertical", + "flip-both", + "stack", + "stack-1x", + "stack-2x", + "inverse", + "layers", + "layers-text", + "layers-counter", + ] + .concat( + M.map(function (e) { + return "".concat(e, "x"); + }) + ) + .concat( + A.map(function (e) { + return "w-".concat(e); + }) + ), + R = b.FontAwesomeConfig || {}; + _ && + "function" == typeof _.querySelector && + [ + ["data-family-prefix", "familyPrefix"], + ["data-replacement-class", "replacementClass"], + ["data-auto-replace-svg", "autoReplaceSvg"], + ["data-auto-add-css", "autoAddCss"], + ["data-auto-a11y", "autoA11y"], + ["data-search-pseudo-elements", "searchPseudoElements"], + ["data-observe-mutations", "observeMutations"], + ["data-mutate-approach", "mutateApproach"], + ["data-keep-original-source", "keepOriginalSource"], + ["data-measure-performance", "measurePerformance"], + ["data-show-missing-icons", "showMissingIcons"], + ].forEach(function (e) { + var t = c(e, 2), + n = t[0], + i = t[1], + r = (function (e) { + return "" === e || ("false" !== e && ("true" === e || e)); + })( + (function (e) { + var t = _.querySelector("script[" + e + "]"); + if (t) return t.getAttribute(e); + })(n) + ); + null != r && (R[i] = r); + }); + var w = s( + {}, + { + familyPrefix: "fa", + replacementClass: "svg-inline--fa", + autoReplaceSvg: !0, + autoAddCss: !0, + autoA11y: !0, + searchPseudoElements: !1, + observeMutations: !0, + mutateApproach: "async", + keepOriginalSource: !0, + measurePerformance: !1, + showMissingIcons: !0, + }, + R + ); + w.autoReplaceSvg || (w.observeMutations = !1); + var L = s({}, w); + b.FontAwesomeConfig = L; + var F = b || {}; + F.___FONT_AWESOME___ || (F.___FONT_AWESOME___ = {}), + F.___FONT_AWESOME___.styles || (F.___FONT_AWESOME___.styles = {}), + F.___FONT_AWESOME___.hooks || (F.___FONT_AWESOME___.hooks = {}), + F.___FONT_AWESOME___.shims || (F.___FONT_AWESOME___.shims = []); + var N = F.___FONT_AWESOME___, + k = [], + z = !1; + function j(e) { + C && (z ? setTimeout(e, 0) : k.push(e)); + } + C && + ((z = (_.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(_.readyState)) || + _.addEventListener("DOMContentLoaded", function e() { + _.removeEventListener("DOMContentLoaded", e), + (z = 1), + k.map(function (e) { + return e(); + }); + })); + var B, + V = function () {}, + G = void 0 !== e && void 0 !== e.process && "function" == typeof e.process.emit, + U = void 0 === i ? setTimeout : i, + H = []; + function W() { + for (var e = 0; e < H.length; e++) H[e][0](H[e][1]); + (H = []), (B = !1); + } + function X(e, t) { + H.push([e, t]), B || ((B = !0), U(W, 0)); + } + function Y(e) { + var t = e.owner, + n = t._state, + i = t._data, + r = e[n], + o = e.then; + if ("function" == typeof r) { + n = "fulfilled"; + try { + i = r(i); + } catch (e) { + Q(o, e); + } + } + K(o, i) || ("fulfilled" === n && Z(o, i), "rejected" === n && Q(o, i)); + } + function K(e, t) { + var n; + try { + if (e === t) throw new TypeError("A promises callback cannot return that same promise."); + if (t && ("function" == typeof t || "object" === r(t))) { + var i = t.then; + if ("function" == typeof i) + return ( + i.call( + t, + function (i) { + n || ((n = !0), t === i ? q(e, i) : Z(e, i)); + }, + function (t) { + n || ((n = !0), Q(e, t)); + } + ), + !0 + ); + } + } catch (t) { + return n || Q(e, t), !0; + } + return !1; + } + function Z(e, t) { + (e !== t && K(e, t)) || q(e, t); + } + function q(e, t) { + "pending" === e._state && ((e._state = "settled"), (e._data = t), X($, e)); + } + function Q(e, t) { + "pending" === e._state && ((e._state = "settled"), (e._data = t), X(ee, e)); + } + function J(e) { + e._then = e._then.forEach(Y); + } + function $(e) { + (e._state = "fulfilled"), J(e); + } + function ee(t) { + (t._state = "rejected"), J(t), !t._handled && G && e.process.emit("unhandledRejection", t._data, t); + } + function te(t) { + e.process.emit("rejectionHandled", t); + } + function ne(e) { + if ("function" != typeof e) throw new TypeError("Promise resolver " + e + " is not a function"); + if (this instanceof ne == 0) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + (this._then = []), + (function (e, t) { + function n(e) { + Q(t, e); + } + try { + e(function (e) { + Z(t, e); + }, n); + } catch (e) { + n(e); + } + })(e, this); + } + (ne.prototype = { + constructor: ne, + _state: "pending", + _then: null, + _data: void 0, + _handled: !1, + then: function (e, t) { + var n = { owner: this, then: new this.constructor(V), fulfilled: e, rejected: t }; + return ( + (!t && !e) || this._handled || ((this._handled = !0), "rejected" === this._state && G && X(te, this)), + "fulfilled" === this._state || "rejected" === this._state ? X(Y, n) : this._then.push(n), + n.then + ); + }, + catch: function (e) { + return this.then(null, e); + }, + }), + (ne.all = function (e) { + if (!Array.isArray(e)) throw new TypeError("You must pass an array to Promise.all()."); + return new ne(function (t, n) { + var i = [], + r = 0; + function o(e) { + return ( + r++, + function (n) { + (i[e] = n), --r || t(i); + } + ); + } + for (var a, s = 0; s < e.length; s++) (a = e[s]) && "function" == typeof a.then ? a.then(o(s), n) : (i[s] = a); + r || t(i); + }); + }), + (ne.race = function (e) { + if (!Array.isArray(e)) throw new TypeError("You must pass an array to Promise.race()."); + return new ne(function (t, n) { + for (var i, r = 0; r < e.length; r++) (i = e[r]) && "function" == typeof i.then ? i.then(t, n) : t(i); + }); + }), + (ne.resolve = function (e) { + return e && "object" === r(e) && e.constructor === ne + ? e + : new ne(function (t) { + t(e); + }); + }), + (ne.reject = function (e) { + return new ne(function (t, n) { + n(e); + }); + }); + var ie = "function" == typeof Promise ? Promise : ne, + re = 16, + oe = { size: 16, x: 0, y: 0, rotate: 0, flipX: !1, flipY: !1 }; + function ae(e) { + if (e && C) { + var t = _.createElement("style"); + t.setAttribute("type", "text/css"), (t.innerHTML = e); + for (var n = _.head.childNodes, i = null, r = n.length - 1; r > -1; r--) { + var o = n[r], + a = (o.tagName || "").toUpperCase(); + ["STYLE", "LINK"].indexOf(a) > -1 && (i = o); + } + return _.head.insertBefore(t, i), e; + } + } + function se() { + for (var e = 12, t = ""; e-- > 0; ) t += "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[(62 * Math.random()) | 0]; + return t; + } + function ce(e) { + for (var t = [], n = (e || []).length >>> 0; n--; ) t[n] = e[n]; + return t; + } + function le(e) { + return e.classList + ? ce(e.classList) + : (e.getAttribute("class") || "").split(" ").filter(function (e) { + return e; + }); + } + function ue(e, t) { + var n = t.split("-"), + i = n[0], + r = n.slice(1).join("-"); + return i !== e || + "" === r || + (function (e) { + return ~D.indexOf(e); + })(r) + ? null + : r; + } + function he(e) { + return "".concat(e).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">"); + } + function de(e) { + return Object.keys(e || {}).reduce(function (t, n) { + return t + "".concat(n, ": ").concat(e[n], ";"); + }, ""); + } + function pe(e) { + return e.size !== oe.size || e.x !== oe.x || e.y !== oe.y || e.rotate !== oe.rotate || e.flipX || e.flipY; + } + function fe(e) { + var t = e.transform, + n = e.containerWidth, + i = e.iconWidth, + r = { transform: "translate(".concat(n / 2, " 256)") }, + o = "translate(".concat(32 * t.x, ", ").concat(32 * t.y, ") "), + a = "scale(".concat((t.size / 16) * (t.flipX ? -1 : 1), ", ").concat((t.size / 16) * (t.flipY ? -1 : 1), ") "), + s = "rotate(".concat(t.rotate, " 0 0)"); + return { outer: r, inner: { transform: "".concat(o, " ").concat(a, " ").concat(s) }, path: { transform: "translate(".concat((i / 2) * -1, " -256)") } }; + } + var me = { x: 0, y: 0, width: "100%", height: "100%" }; + function ge(e) { + var t = e.icons, + n = t.main, + i = t.mask, + r = e.prefix, + o = e.iconName, + a = e.transform, + c = e.symbol, + l = e.title, + u = e.extra, + h = e.watchable, + d = void 0 !== h && h, + p = i.found ? i : n, + f = p.width, + m = p.height, + g = "fa-w-".concat(Math.ceil((f / m) * 16)), + b = [L.replacementClass, o ? "".concat(L.familyPrefix, "-").concat(o) : "", g] + .filter(function (e) { + return -1 === u.classes.indexOf(e); + }) + .concat(u.classes) + .join(" "), + _ = { + children: [], + attributes: s({}, u.attributes, { + "data-prefix": r, + "data-icon": o, + class: b, + role: u.attributes.role || "img", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 ".concat(f, " ").concat(m), + }), + }; + d && (_.attributes["data-fa-i2svg"] = ""), l && _.children.push({ tag: "title", attributes: { id: _.attributes["aria-labelledby"] || "title-".concat(se()) }, children: [l] }); + var v = s({}, _, { prefix: r, iconName: o, main: n, mask: i, transform: a, symbol: c, styles: u.styles }), + y = + i.found && n.found + ? (function (e) { + var t = e.children, + n = e.attributes, + i = e.main, + r = e.mask, + o = e.transform, + a = i.width, + c = i.icon, + l = r.width, + u = r.icon, + h = fe({ transform: o, containerWidth: l, iconWidth: a }), + d = { tag: "rect", attributes: s({}, me, { fill: "white" }) }, + p = { tag: "g", attributes: s({}, h.inner), children: [{ tag: "path", attributes: s({}, c.attributes, h.path, { fill: "black" }) }] }, + f = { tag: "g", attributes: s({}, h.outer), children: [p] }, + m = "mask-".concat(se()), + g = "clip-".concat(se()), + b = { + tag: "defs", + children: [ + { tag: "clipPath", attributes: { id: g }, children: [u] }, + { tag: "mask", attributes: s({}, me, { id: m, maskUnits: "userSpaceOnUse", maskContentUnits: "userSpaceOnUse" }), children: [d, f] }, + ], + }; + return t.push(b, { tag: "rect", attributes: s({ fill: "currentColor", "clip-path": "url(#".concat(g, ")"), mask: "url(#".concat(m, ")") }, me) }), { children: t, attributes: n }; + })(v) + : (function (e) { + var t = e.children, + n = e.attributes, + i = e.main, + r = e.transform, + o = de(e.styles); + if ((o.length > 0 && (n.style = o), pe(r))) { + var a = fe({ transform: r, containerWidth: i.width, iconWidth: i.width }); + t.push({ + tag: "g", + attributes: s({}, a.outer), + children: [{ tag: "g", attributes: s({}, a.inner), children: [{ tag: i.icon.tag, children: i.icon.children, attributes: s({}, i.icon.attributes, a.path) }] }], + }); + } else t.push(i.icon); + return { children: t, attributes: n }; + })(v), + C = y.children, + P = y.attributes; + return ( + (v.children = C), + (v.attributes = P), + c + ? (function (e) { + var t = e.prefix, + n = e.iconName, + i = e.children, + r = e.attributes, + o = e.symbol; + return [ + { + tag: "svg", + attributes: { style: "display: none;" }, + children: [{ tag: "symbol", attributes: s({}, r, { id: !0 === o ? "".concat(t, "-").concat(L.familyPrefix, "-").concat(n) : o }), children: i }], + }, + ]; + })(v) + : (function (e) { + var t = e.children, + n = e.main, + i = e.mask, + r = e.attributes, + o = e.styles, + a = e.transform; + if (pe(a) && n.found && !i.found) { + var c = { x: n.width / n.height / 2, y: 0.5 }; + r.style = de(s({}, o, { "transform-origin": "".concat(c.x + a.x / 16, "em ").concat(c.y + a.y / 16, "em") })); + } + return [{ tag: "svg", attributes: r, children: t }]; + })(v) + ); + } + function be(e) { + var t = e.content, + n = e.width, + i = e.height, + r = e.transform, + o = e.title, + a = e.extra, + c = e.watchable, + l = void 0 !== c && c, + u = s({}, a.attributes, o ? { title: o } : {}, { class: a.classes.join(" ") }); + l && (u["data-fa-i2svg"] = ""); + var h = s({}, a.styles); + pe(r) && + ((h.transform = (function (e) { + var t = e.transform, + n = e.width, + i = void 0 === n ? 16 : n, + r = e.height, + o = void 0 === r ? 16 : r, + a = e.startCentered, + s = void 0 !== a && a, + c = ""; + return ( + (c += + s && P + ? "translate(".concat(t.x / re - i / 2, "em, ").concat(t.y / re - o / 2, "em) ") + : s + ? "translate(calc(-50% + ".concat(t.x / re, "em), calc(-50% + ").concat(t.y / re, "em)) ") + : "translate(".concat(t.x / re, "em, ").concat(t.y / re, "em) ")), + (c += "scale(".concat((t.size / re) * (t.flipX ? -1 : 1), ", ").concat((t.size / re) * (t.flipY ? -1 : 1), ") ")), + (c += "rotate(".concat(t.rotate, "deg) ")) + ); + })({ transform: r, startCentered: !0, width: n, height: i })), + (h["-webkit-transform"] = h.transform)); + var d = de(h); + d.length > 0 && (u.style = d); + var p = []; + return p.push({ tag: "span", attributes: u, children: [t] }), o && p.push({ tag: "span", attributes: { class: "sr-only" }, children: [o] }), p; + } + function _e(e) { + var t = e.content, + n = e.title, + i = e.extra, + r = s({}, i.attributes, n ? { title: n } : {}, { class: i.classes.join(" ") }), + o = de(i.styles); + o.length > 0 && (r.style = o); + var a = []; + return a.push({ tag: "span", attributes: r, children: [t] }), n && a.push({ tag: "span", attributes: { class: "sr-only" }, children: [n] }), a; + } + var ve = function () {}, + ye = L.measurePerformance && y && y.mark && y.measure ? y : { mark: ve, measure: ve }, + Ce = function (e) { + ye.mark("".concat('FA "5.9.0"', " ").concat(e, " ends")), + ye.measure("".concat('FA "5.9.0"', " ").concat(e), "".concat('FA "5.9.0"', " ").concat(e, " begins"), "".concat('FA "5.9.0"', " ").concat(e, " ends")); + }, + Pe = function (e) { + return ( + ye.mark("".concat('FA "5.9.0"', " ").concat(e, " begins")), + function () { + return Ce(e); + } + ); + }, + xe = function (e, t, n, i) { + var r, + o, + a, + s = Object.keys(e), + c = s.length, + l = + void 0 !== i + ? (function (e, t) { + return function (n, i, r, o) { + return e.call(t, n, i, r, o); + }; + })(t, i) + : t; + for (void 0 === n ? ((r = 1), (a = e[s[0]])) : ((r = 0), (a = n)); r < c; r++) a = l(a, e[(o = s[r])], o, e); + return a; + }; + function Te(e) { + for (var t = "", n = 0; n < e.length; n++) t += ("000" + e.charCodeAt(n).toString(16)).slice(-4); + return t; + } + function Se(e, t) { + var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, + i = n.skipHooks, + r = void 0 !== i && i, + o = Object.keys(t).reduce(function (e, n) { + var i = t[n]; + return i.icon ? (e[i.iconName] = i.icon) : (e[n] = i), e; + }, {}); + "function" != typeof N.hooks.addPack || r ? (N.styles[e] = s({}, N.styles[e] || {}, o)) : N.hooks.addPack(e, o), "fas" === e && Se("fa", t); + } + var Oe = N.styles, + Ee = N.shims, + Me = {}, + Ae = {}, + Ie = {}, + De = function () { + var e = function (e) { + return xe( + Oe, + function (t, n, i) { + return (t[i] = xe(n, e, {})), t; + }, + {} + ); + }; + (Me = e(function (e, t, n) { + return t[3] && (e[t[3]] = n), e; + })), + (Ae = e(function (e, t, n) { + var i = t[2]; + return ( + (e[n] = n), + i.forEach(function (t) { + e[t] = n; + }), + e + ); + })); + var t = "far" in Oe; + Ie = xe( + Ee, + function (e, n) { + var i = n[0], + r = n[1], + o = n[2]; + return "far" !== r || t || (r = "fas"), (e[i] = { prefix: r, iconName: o }), e; + }, + {} + ); + }; + function Re(e, t) { + return (Me[e] || {})[t]; + } + De(); + var we = N.styles; + function Le(e) { + return e.reduce( + function (e, t) { + var n = ue(L.familyPrefix, t); + if (we[t]) e.prefix = t; + else if (L.autoFetchSvg && ["fas", "far", "fal", "fab", "fa"].indexOf(t) > -1) e.prefix = t; + else if (n) { + var i = + "fa" === e.prefix + ? (function (e) { + return Ie[e] || { prefix: null, iconName: null }; + })(n) + : {}; + (e.iconName = i.iconName || n), (e.prefix = i.prefix || e.prefix); + } else t !== L.replacementClass && 0 !== t.indexOf("fa-w-") && e.rest.push(t); + return e; + }, + { prefix: null, iconName: null, rest: [] } + ); + } + function Fe(e, t, n) { + if (e && e[t] && e[t][n]) return { prefix: t, iconName: n, icon: e[t][n] }; + } + function Ne(e) { + var t = e.tag, + n = e.attributes, + i = void 0 === n ? {} : n, + r = e.children, + o = void 0 === r ? [] : r; + return "string" == typeof e + ? he(e) + : "<" + .concat(t, " ") + .concat( + (function (e) { + return Object.keys(e || {}) + .reduce(function (t, n) { + return t + "".concat(n, '="').concat(he(e[n]), '" '); + }, "") + .trim(); + })(i), + ">" + ) + .concat(o.map(Ne).join(""), ""); + } + var ke = function () {}; + function ze(e) { + return "string" == typeof (e.getAttribute ? e.getAttribute("data-fa-i2svg") : null); + } + var je = { + replace: function (e) { + var t = e[0], + n = e[1] + .map(function (e) { + return Ne(e); + }) + .join("\n"); + if (t.parentNode && t.outerHTML) t.outerHTML = n + (L.keepOriginalSource && "svg" !== t.tagName.toLowerCase() ? "\x3c!-- ".concat(t.outerHTML, " --\x3e") : ""); + else if (t.parentNode) { + var i = document.createElement("span"); + t.parentNode.replaceChild(i, t), (i.outerHTML = n); + } + }, + nest: function (e) { + var t = e[0], + n = e[1]; + if (~le(t).indexOf(L.replacementClass)) return je.replace(e); + var i = new RegExp("".concat(L.familyPrefix, "-.*")); + delete n[0].attributes.style; + var r = n[0].attributes.class.split(" ").reduce( + function (e, t) { + return t === L.replacementClass || t.match(i) ? e.toSvg.push(t) : e.toNode.push(t), e; + }, + { toNode: [], toSvg: [] } + ); + n[0].attributes.class = r.toSvg.join(" "); + var o = n + .map(function (e) { + return Ne(e); + }) + .join("\n"); + t.setAttribute("class", r.toNode.join(" ")), t.setAttribute("data-fa-i2svg", ""), (t.innerHTML = o); + }, + }; + function Be(e) { + e(); + } + function Ve(e, t) { + var n = "function" == typeof t ? t : ke; + if (0 === e.length) n(); + else { + var i = Be; + "async" === L.mutateApproach && (i = b.requestAnimationFrame || Be), + i(function () { + var t = !0 === L.autoReplaceSvg ? je.replace : je[L.autoReplaceSvg] || je.replace, + i = Pe("mutate"); + e.map(t), i(), n(); + }); + } + } + var Ge = !1; + function Ue() { + Ge = !1; + } + var He = null; + function We(e) { + if (v && L.observeMutations) { + var t = e.treeCallback, + n = e.nodeCallback, + i = e.pseudoElementsCallback, + r = e.observeMutationsRoot, + o = void 0 === r ? _ : r; + (He = new v(function (e) { + Ge || + ce(e).forEach(function (e) { + if ( + ("childList" === e.type && e.addedNodes.length > 0 && !ze(e.addedNodes[0]) && (L.searchPseudoElements && i(e.target), t(e.target)), + "attributes" === e.type && e.target.parentNode && L.searchPseudoElements && i(e.target.parentNode), + "attributes" === e.type && ze(e.target) && ~I.indexOf(e.attributeName)) + ) + if ("class" === e.attributeName) { + var r = Le(le(e.target)), + o = r.prefix, + a = r.iconName; + o && e.target.setAttribute("data-prefix", o), a && e.target.setAttribute("data-icon", a); + } else n(e.target); + }); + })), + C && He.observe(o, { childList: !0, attributes: !0, characterData: !0, subtree: !0 }); + } + } + function Xe(e) { + var t, + n, + i = e.getAttribute("data-prefix"), + r = e.getAttribute("data-icon"), + o = void 0 !== e.innerText ? e.innerText.trim() : "", + a = Le(le(e)); + return ( + i && r && ((a.prefix = i), (a.iconName = r)), + a.prefix && o.length > 1 ? (a.iconName = ((t = a.prefix), (n = e.innerText), (Ae[t] || {})[n])) : a.prefix && 1 === o.length && (a.iconName = Re(a.prefix, Te(e.innerText))), + a + ); + } + var Ye = function (e) { + var t = { size: 16, x: 0, y: 0, flipX: !1, flipY: !1, rotate: 0 }; + return e + ? e + .toLowerCase() + .split(" ") + .reduce(function (e, t) { + var n = t.toLowerCase().split("-"), + i = n[0], + r = n.slice(1).join("-"); + if (i && "h" === r) return (e.flipX = !0), e; + if (i && "v" === r) return (e.flipY = !0), e; + if (((r = parseFloat(r)), isNaN(r))) return e; + switch (i) { + case "grow": + e.size = e.size + r; + break; + case "shrink": + e.size = e.size - r; + break; + case "left": + e.x = e.x - r; + break; + case "right": + e.x = e.x + r; + break; + case "up": + e.y = e.y - r; + break; + case "down": + e.y = e.y + r; + break; + case "rotate": + e.rotate = e.rotate + r; + } + return e; + }, t) + : t; + }; + function Ke(e) { + var t = Xe(e), + n = t.iconName, + i = t.prefix, + r = t.rest, + o = (function (e) { + var t = e.getAttribute("style"), + n = []; + return ( + t && + (n = t.split(";").reduce(function (e, t) { + var n = t.split(":"), + i = n[0], + r = n.slice(1); + return i && r.length > 0 && (e[i] = r.join(":").trim()), e; + }, {})), + n + ); + })(e), + a = (function (e) { + return Ye(e.getAttribute("data-fa-transform")); + })(e), + s = (function (e) { + var t = e.getAttribute("data-fa-symbol"); + return null !== t && ("" === t || t); + })(e), + c = (function (e) { + var t = ce(e.attributes).reduce(function (e, t) { + return "class" !== e.name && "style" !== e.name && (e[t.name] = t.value), e; + }, {}), + n = e.getAttribute("title"); + return L.autoA11y && (n ? (t["aria-labelledby"] = "".concat(L.replacementClass, "-title-").concat(se())) : ((t["aria-hidden"] = "true"), (t.focusable = "false"))), t; + })(e), + l = (function (e) { + var t = e.getAttribute("data-fa-mask"); + return t + ? Le( + t.split(" ").map(function (e) { + return e.trim(); + }) + ) + : { prefix: null, iconName: null, rest: [] }; + })(e); + return { iconName: n, title: e.getAttribute("title"), prefix: i, transform: a, symbol: s, mask: l, extra: { classes: r, styles: o, attributes: c } }; + } + function Ze(e) { + (this.name = "MissingIcon"), (this.message = e || "Icon unavailable"), (this.stack = new Error().stack); + } + (Ze.prototype = Object.create(Error.prototype)), (Ze.prototype.constructor = Ze); + var qe = { fill: "currentColor" }, + Qe = { attributeType: "XML", repeatCount: "indefinite", dur: "2s" }, + Je = { + tag: "path", + attributes: s({}, qe, { + d: + "M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z", + }), + }, + $e = s({}, Qe, { attributeName: "opacity" }), + et = { + tag: "g", + children: [ + Je, + { + tag: "circle", + attributes: s({}, qe, { cx: "256", cy: "364", r: "28" }), + children: [ + { tag: "animate", attributes: s({}, Qe, { attributeName: "r", values: "28;14;28;28;14;28;" }) }, + { tag: "animate", attributes: s({}, $e, { values: "1;0;1;1;0;1;" }) }, + ], + }, + { + tag: "path", + attributes: s({}, qe, { + opacity: "1", + d: + "M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z", + }), + children: [{ tag: "animate", attributes: s({}, $e, { values: "1;0;0;0;0;1;" }) }], + }, + { + tag: "path", + attributes: s({}, qe, { opacity: "0", d: "M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z" }), + children: [{ tag: "animate", attributes: s({}, $e, { values: "0;0;1;1;0;0;" }) }], + }, + ], + }, + tt = N.styles; + function nt(e, t) { + return new ie(function (n, i) { + var r = { found: !1, width: 512, height: 512, icon: et }; + if (e && t && tt[t] && tt[t][e]) { + var o = tt[t][e]; + return n((r = { found: !0, width: o[0], height: o[1], icon: { tag: "path", attributes: { fill: "currentColor", d: o.slice(4)[0] } } })); + } + e && t && !L.showMissingIcons ? i(new Ze("Icon is missing for prefix ".concat(t, " with icon name ").concat(e))) : n(r); + }); + } + var it = N.styles; + function rt(e) { + var t = Ke(e); + return ~t.extra.classes.indexOf("fa-layers-text") + ? (function (e, t) { + var n = t.title, + i = t.transform, + r = t.extra, + o = null, + a = null; + if (P) { + var s = parseInt(getComputedStyle(e).fontSize, 10), + c = e.getBoundingClientRect(); + (o = c.width / s), (a = c.height / s); + } + return L.autoA11y && !n && (r.attributes["aria-hidden"] = "true"), ie.resolve([e, be({ content: e.innerHTML, width: o, height: a, transform: i, title: n, extra: r, watchable: !0 })]); + })(e, t) + : (function (e, t) { + var n = t.iconName, + i = t.title, + r = t.prefix, + o = t.transform, + a = t.symbol, + s = t.mask, + l = t.extra; + return new ie(function (t, u) { + ie.all([nt(n, r), nt(s.iconName, s.prefix)]).then(function (s) { + var u = c(s, 2), + h = u[0], + d = u[1]; + t([e, ge({ icons: { main: h, mask: d }, prefix: r, iconName: n, transform: o, symbol: a, mask: d, title: i, extra: l, watchable: !0 })]); + }); + }); + })(e, t); + } + function ot(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + if (C) { + var n = _.documentElement.classList, + i = function (e) { + return n.add("".concat("fontawesome-i2svg", "-").concat(e)); + }, + r = function (e) { + return n.remove("".concat("fontawesome-i2svg", "-").concat(e)); + }, + o = L.autoFetchSvg ? Object.keys(T) : Object.keys(it), + a = [".".concat("fa-layers-text", ":not([").concat("data-fa-i2svg", "])")] + .concat( + o.map(function (e) { + return ".".concat(e, ":not([").concat("data-fa-i2svg", "])"); + }) + ) + .join(", "); + if (0 !== a.length) { + var s = []; + try { + s = ce(e.querySelectorAll(a)); + } catch (e) {} + if (s.length > 0) { + i("pending"), r("complete"); + var c = Pe("onTree"), + l = s.reduce(function (e, t) { + try { + var n = rt(t); + n && e.push(n); + } catch (e) {} + return e; + }, []); + return new ie(function (e, n) { + ie.all(l) + .then(function (n) { + Ve(n, function () { + i("active"), i("complete"), r("pending"), "function" == typeof t && t(), c(), e(); + }); + }) + .catch(function () { + c(), n(); + }); + }); + } + } + } + } + function at(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + rt(e).then(function (e) { + e && Ve([e], t); + }); + } + function st(e, t) { + var n = "".concat("data-fa-pseudo-element-pending").concat(t.replace(":", "-")); + return new ie(function (i, r) { + if (null !== e.getAttribute(n)) return i(); + var o = ce(e.children).filter(function (e) { + return e.getAttribute("data-fa-pseudo-element") === t; + })[0], + a = b.getComputedStyle(e, t), + c = a.getPropertyValue("font-family").match(O), + l = a.getPropertyValue("font-weight"); + if (o && !c) return e.removeChild(o), i(); + if (c) { + var u = a.getPropertyValue("content"), + h = ~["Light", "Regular", "Solid", "Brands"].indexOf(c[1]) ? S[c[1].toLowerCase()] : E[l], + d = Te(3 === u.length ? u.substr(1, 1) : u), + p = Re(h, d), + f = p; + if (!p || (o && o.getAttribute("data-prefix") === h && o.getAttribute("data-icon") === f)) i(); + else { + e.setAttribute(n, f), o && e.removeChild(o); + var m = { iconName: null, title: null, prefix: null, transform: oe, symbol: !1, mask: null, extra: { classes: [], styles: {}, attributes: {} } }, + g = m.extra; + (g.attributes["data-fa-pseudo-element"] = t), + nt(p, h) + .then(function (r) { + var o = ge(s({}, m, { icons: { main: r, mask: { prefix: null, iconName: null, rest: [] } }, prefix: h, iconName: f, extra: g, watchable: !0 })), + a = _.createElement("svg"); + ":before" === t ? e.insertBefore(a, e.firstChild) : e.appendChild(a), + (a.outerHTML = o + .map(function (e) { + return Ne(e); + }) + .join("\n")), + e.removeAttribute(n), + i(); + }) + .catch(r); + } + } else i(); + }); + } + function ct(e) { + return ie.all([st(e, ":before"), st(e, ":after")]); + } + function lt(e) { + return !(e.parentNode === document.head || ~x.indexOf(e.tagName.toUpperCase()) || e.getAttribute("data-fa-pseudo-element") || (e.parentNode && "svg" === e.parentNode.tagName)); + } + function ut(e) { + if (C) + return new ie(function (t, n) { + var i = ce(e.querySelectorAll("*")).filter(lt).map(ct), + r = Pe("searchPseudoElements"); + (Ge = !0), + ie + .all(i) + .then(function () { + r(), Ue(), t(); + }) + .catch(function () { + r(), Ue(), n(); + }); + }); + } + function ht() { + var e = "svg-inline--fa", + t = L.familyPrefix, + n = L.replacementClass, + i = + 'svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}'; + if ("fa" !== t || n !== e) { + var r = new RegExp("\\.".concat("fa", "\\-"), "g"), + o = new RegExp("\\.".concat(e), "g"); + i = i.replace(r, ".".concat(t, "-")).replace(o, ".".concat(n)); + } + return i; + } + function dt(e) { + return { found: !0, width: e[0], height: e[1], icon: { tag: "path", attributes: { fill: "currentColor", d: e.slice(4)[0] } } }; + } + function pt() { + L.autoAddCss && !vt && (ae(ht()), (vt = !0)); + } + function ft(e, t) { + return ( + Object.defineProperty(e, "abstract", { get: t }), + Object.defineProperty(e, "html", { + get: function () { + return e.abstract.map(function (e) { + return Ne(e); + }); + }, + }), + Object.defineProperty(e, "node", { + get: function () { + if (C) { + var t = _.createElement("div"); + return (t.innerHTML = e.html), t.children; + } + }, + }), + e + ); + } + function mt(e) { + var t = e.prefix, + n = void 0 === t ? "fa" : t, + i = e.iconName; + if (i) return Fe(bt.definitions, n, i) || Fe(N.styles, n, i); + } + var gt, + bt = new ((function () { + function e() { + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, e), + (this.definitions = {}); + } + var t, n, i; + return ( + (t = e), + (n = [ + { + key: "add", + value: function () { + for (var e = this, t = arguments.length, n = new Array(t), i = 0; i < t; i++) n[i] = arguments[i]; + var r = n.reduce(this._pullDefinitions, {}); + Object.keys(r).forEach(function (t) { + (e.definitions[t] = s({}, e.definitions[t] || {}, r[t])), Se(t, r[t]), De(); + }); + }, + }, + { + key: "reset", + value: function () { + this.definitions = {}; + }, + }, + { + key: "_pullDefinitions", + value: function (e, t) { + var n = t.prefix && t.iconName && t.icon ? { 0: t } : t; + return ( + Object.keys(n).map(function (t) { + var i = n[t], + r = i.prefix, + o = i.iconName, + a = i.icon; + e[r] || (e[r] = {}), (e[r][o] = a); + }), + e + ); + }, + }, + ]) && o(t.prototype, n), + i && o(t, i), + e + ); + })())(), + _t = function () { + (L.autoReplaceSvg = !1), (L.observeMutations = !1), He && He.disconnect(); + }, + vt = !1, + yt = { + i2svg: function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + if (C) { + pt(); + var t = e.node, + n = void 0 === t ? _ : t, + i = e.callback, + r = void 0 === i ? function () {} : i; + return L.searchPseudoElements && ut(n), ot(n, r); + } + return ie.reject("Operation requires a DOM of some kind."); + }, + css: ht, + insertCss: function () { + vt || (ae(ht()), (vt = !0)); + }, + watch: function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, + t = e.autoReplaceSvgRoot, + n = e.observeMutationsRoot; + !1 === L.autoReplaceSvg && (L.autoReplaceSvg = !0), + (L.observeMutations = !0), + j(function () { + Et({ autoReplaceSvgRoot: t }), We({ treeCallback: ot, nodeCallback: at, pseudoElementsCallback: ut, observeMutationsRoot: n }); + }); + }, + }, + Ct = { + transform: function (e) { + return Ye(e); + }, + }, + Pt = + ((gt = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = t.transform, + i = void 0 === n ? oe : n, + r = t.symbol, + o = void 0 !== r && r, + a = t.mask, + c = void 0 === a ? null : a, + l = t.title, + u = void 0 === l ? null : l, + h = t.classes, + d = void 0 === h ? [] : h, + p = t.attributes, + f = void 0 === p ? {} : p, + m = t.styles, + g = void 0 === m ? {} : m; + if (e) { + var b = e.prefix, + _ = e.iconName, + v = e.icon; + return ft(s({ type: "icon" }, e), function () { + return ( + pt(), + L.autoA11y && (u ? (f["aria-labelledby"] = "".concat(L.replacementClass, "-title-").concat(se())) : ((f["aria-hidden"] = "true"), (f.focusable = "false"))), + ge({ + icons: { main: dt(v), mask: c ? dt(c.icon) : { found: !1, width: null, height: null, icon: {} } }, + prefix: b, + iconName: _, + transform: s({}, oe, i), + symbol: o, + title: u, + extra: { attributes: f, styles: g, classes: d }, + }) + ); + }); + } + }), + function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = (e || {}).icon ? e : mt(e || {}), + i = t.mask; + return i && (i = (i || {}).icon ? i : mt(i || {})), gt(n, s({}, t, { mask: i })); + }), + xt = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = t.transform, + i = void 0 === n ? oe : n, + r = t.title, + o = void 0 === r ? null : r, + a = t.classes, + c = void 0 === a ? [] : a, + u = t.attributes, + h = void 0 === u ? {} : u, + d = t.styles, + p = void 0 === d ? {} : d; + return ft({ type: "text", content: e }, function () { + return pt(), be({ content: e, transform: s({}, oe, i), title: o, extra: { attributes: h, styles: p, classes: ["".concat(L.familyPrefix, "-layers-text")].concat(l(c)) } }); + }); + }, + Tt = function (e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = t.title, + i = void 0 === n ? null : n, + r = t.classes, + o = void 0 === r ? [] : r, + a = t.attributes, + s = void 0 === a ? {} : a, + c = t.styles, + u = void 0 === c ? {} : c; + return ft({ type: "counter", content: e }, function () { + return pt(), _e({ content: e.toString(), title: i, extra: { attributes: s, styles: u, classes: ["".concat(L.familyPrefix, "-layers-counter")].concat(l(o)) } }); + }); + }, + St = function (e) { + return ft({ type: "layer" }, function () { + pt(); + var t = []; + return ( + e(function (e) { + Array.isArray(e) + ? e.map(function (e) { + t = t.concat(e.abstract); + }) + : (t = t.concat(e.abstract)); + }), + [{ tag: "span", attributes: { class: "".concat(L.familyPrefix, "-layers") }, children: t }] + ); + }); + }, + Ot = { noAuto: _t, config: L, dom: yt, library: bt, parse: Ct, findIconDefinition: mt, icon: Pt, text: xt, counter: Tt, layer: St, toHtml: Ne }, + Et = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, + t = e.autoReplaceSvgRoot, + n = void 0 === t ? _ : t; + (Object.keys(N.styles).length > 0 || L.autoFetchSvg) && C && L.autoReplaceSvg && Ot.dom.i2svg({ node: n }); + }; + }.call(this, n("../../../../node_modules/webpack/buildin/global.js"), n("../../../../node_modules/timers-browserify/main.js").setImmediate); + }, + "../../../../node_modules/@fortawesome/free-regular-svg-icons/index.es.js": function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "far", function () { + return Kt; + }), + n.d(t, "prefix", function () { + return i; + }), + n.d(t, "faAddressBook", function () { + return r; + }), + n.d(t, "faAddressCard", function () { + return o; + }), + n.d(t, "faAngry", function () { + return a; + }), + n.d(t, "faArrowAltCircleDown", function () { + return s; + }), + n.d(t, "faArrowAltCircleLeft", function () { + return c; + }), + n.d(t, "faArrowAltCircleRight", function () { + return l; + }), + n.d(t, "faArrowAltCircleUp", function () { + return u; + }), + n.d(t, "faBell", function () { + return h; + }), + n.d(t, "faBellSlash", function () { + return d; + }), + n.d(t, "faBookmark", function () { + return p; + }), + n.d(t, "faBuilding", function () { + return f; + }), + n.d(t, "faCalendar", function () { + return m; + }), + n.d(t, "faCalendarAlt", function () { + return g; + }), + n.d(t, "faCalendarCheck", function () { + return b; + }), + n.d(t, "faCalendarMinus", function () { + return _; + }), + n.d(t, "faCalendarPlus", function () { + return v; + }), + n.d(t, "faCalendarTimes", function () { + return y; + }), + n.d(t, "faCaretSquareDown", function () { + return C; + }), + n.d(t, "faCaretSquareLeft", function () { + return P; + }), + n.d(t, "faCaretSquareRight", function () { + return x; + }), + n.d(t, "faCaretSquareUp", function () { + return T; + }), + n.d(t, "faChartBar", function () { + return S; + }), + n.d(t, "faCheckCircle", function () { + return O; + }), + n.d(t, "faCheckSquare", function () { + return E; + }), + n.d(t, "faCircle", function () { + return M; + }), + n.d(t, "faClipboard", function () { + return A; + }), + n.d(t, "faClock", function () { + return I; + }), + n.d(t, "faClone", function () { + return D; + }), + n.d(t, "faClosedCaptioning", function () { + return R; + }), + n.d(t, "faComment", function () { + return w; + }), + n.d(t, "faCommentAlt", function () { + return L; + }), + n.d(t, "faCommentDots", function () { + return F; + }), + n.d(t, "faComments", function () { + return N; + }), + n.d(t, "faCompass", function () { + return k; + }), + n.d(t, "faCopy", function () { + return z; + }), + n.d(t, "faCopyright", function () { + return j; + }), + n.d(t, "faCreditCard", function () { + return B; + }), + n.d(t, "faDizzy", function () { + return V; + }), + n.d(t, "faDotCircle", function () { + return G; + }), + n.d(t, "faEdit", function () { + return U; + }), + n.d(t, "faEnvelope", function () { + return H; + }), + n.d(t, "faEnvelopeOpen", function () { + return W; + }), + n.d(t, "faEye", function () { + return X; + }), + n.d(t, "faEyeSlash", function () { + return Y; + }), + n.d(t, "faFile", function () { + return K; + }), + n.d(t, "faFileAlt", function () { + return Z; + }), + n.d(t, "faFileArchive", function () { + return q; + }), + n.d(t, "faFileAudio", function () { + return Q; + }), + n.d(t, "faFileCode", function () { + return J; + }), + n.d(t, "faFileExcel", function () { + return $; + }), + n.d(t, "faFileImage", function () { + return ee; + }), + n.d(t, "faFilePdf", function () { + return te; + }), + n.d(t, "faFilePowerpoint", function () { + return ne; + }), + n.d(t, "faFileVideo", function () { + return ie; + }), + n.d(t, "faFileWord", function () { + return re; + }), + n.d(t, "faFlag", function () { + return oe; + }), + n.d(t, "faFlushed", function () { + return ae; + }), + n.d(t, "faFolder", function () { + return se; + }), + n.d(t, "faFolderOpen", function () { + return ce; + }), + n.d(t, "faFontAwesomeLogoFull", function () { + return le; + }), + n.d(t, "faFrown", function () { + return ue; + }), + n.d(t, "faFrownOpen", function () { + return he; + }), + n.d(t, "faFutbol", function () { + return de; + }), + n.d(t, "faGem", function () { + return pe; + }), + n.d(t, "faGrimace", function () { + return fe; + }), + n.d(t, "faGrin", function () { + return me; + }), + n.d(t, "faGrinAlt", function () { + return ge; + }), + n.d(t, "faGrinBeam", function () { + return be; + }), + n.d(t, "faGrinBeamSweat", function () { + return _e; + }), + n.d(t, "faGrinHearts", function () { + return ve; + }), + n.d(t, "faGrinSquint", function () { + return ye; + }), + n.d(t, "faGrinSquintTears", function () { + return Ce; + }), + n.d(t, "faGrinStars", function () { + return Pe; + }), + n.d(t, "faGrinTears", function () { + return xe; + }), + n.d(t, "faGrinTongue", function () { + return Te; + }), + n.d(t, "faGrinTongueSquint", function () { + return Se; + }), + n.d(t, "faGrinTongueWink", function () { + return Oe; + }), + n.d(t, "faGrinWink", function () { + return Ee; + }), + n.d(t, "faHandLizard", function () { + return Me; + }), + n.d(t, "faHandPaper", function () { + return Ae; + }), + n.d(t, "faHandPeace", function () { + return Ie; + }), + n.d(t, "faHandPointDown", function () { + return De; + }), + n.d(t, "faHandPointLeft", function () { + return Re; + }), + n.d(t, "faHandPointRight", function () { + return we; + }), + n.d(t, "faHandPointUp", function () { + return Le; + }), + n.d(t, "faHandPointer", function () { + return Fe; + }), + n.d(t, "faHandRock", function () { + return Ne; + }), + n.d(t, "faHandScissors", function () { + return ke; + }), + n.d(t, "faHandSpock", function () { + return ze; + }), + n.d(t, "faHandshake", function () { + return je; + }), + n.d(t, "faHdd", function () { + return Be; + }), + n.d(t, "faHeart", function () { + return Ve; + }), + n.d(t, "faHospital", function () { + return Ge; + }), + n.d(t, "faHourglass", function () { + return Ue; + }), + n.d(t, "faIdBadge", function () { + return He; + }), + n.d(t, "faIdCard", function () { + return We; + }), + n.d(t, "faImage", function () { + return Xe; + }), + n.d(t, "faImages", function () { + return Ye; + }), + n.d(t, "faKeyboard", function () { + return Ke; + }), + n.d(t, "faKiss", function () { + return Ze; + }), + n.d(t, "faKissBeam", function () { + return qe; + }), + n.d(t, "faKissWinkHeart", function () { + return Qe; + }), + n.d(t, "faLaugh", function () { + return Je; + }), + n.d(t, "faLaughBeam", function () { + return $e; + }), + n.d(t, "faLaughSquint", function () { + return et; + }), + n.d(t, "faLaughWink", function () { + return tt; + }), + n.d(t, "faLemon", function () { + return nt; + }), + n.d(t, "faLifeRing", function () { + return it; + }), + n.d(t, "faLightbulb", function () { + return rt; + }), + n.d(t, "faListAlt", function () { + return ot; + }), + n.d(t, "faMap", function () { + return at; + }), + n.d(t, "faMeh", function () { + return st; + }), + n.d(t, "faMehBlank", function () { + return ct; + }), + n.d(t, "faMehRollingEyes", function () { + return lt; + }), + n.d(t, "faMinusSquare", function () { + return ut; + }), + n.d(t, "faMoneyBillAlt", function () { + return ht; + }), + n.d(t, "faMoon", function () { + return dt; + }), + n.d(t, "faNewspaper", function () { + return pt; + }), + n.d(t, "faObjectGroup", function () { + return ft; + }), + n.d(t, "faObjectUngroup", function () { + return mt; + }), + n.d(t, "faPaperPlane", function () { + return gt; + }), + n.d(t, "faPauseCircle", function () { + return bt; + }), + n.d(t, "faPlayCircle", function () { + return _t; + }), + n.d(t, "faPlusSquare", function () { + return vt; + }), + n.d(t, "faQuestionCircle", function () { + return yt; + }), + n.d(t, "faRegistered", function () { + return Ct; + }), + n.d(t, "faSadCry", function () { + return Pt; + }), + n.d(t, "faSadTear", function () { + return xt; + }), + n.d(t, "faSave", function () { + return Tt; + }), + n.d(t, "faShareSquare", function () { + return St; + }), + n.d(t, "faSmile", function () { + return Ot; + }), + n.d(t, "faSmileBeam", function () { + return Et; + }), + n.d(t, "faSmileWink", function () { + return Mt; + }), + n.d(t, "faSnowflake", function () { + return At; + }), + n.d(t, "faSquare", function () { + return It; + }), + n.d(t, "faStar", function () { + return Dt; + }), + n.d(t, "faStarHalf", function () { + return Rt; + }), + n.d(t, "faStickyNote", function () { + return wt; + }), + n.d(t, "faStopCircle", function () { + return Lt; + }), + n.d(t, "faSun", function () { + return Ft; + }), + n.d(t, "faSurprise", function () { + return Nt; + }), + n.d(t, "faThumbsDown", function () { + return kt; + }), + n.d(t, "faThumbsUp", function () { + return zt; + }), + n.d(t, "faTimesCircle", function () { + return jt; + }), + n.d(t, "faTired", function () { + return Bt; + }), + n.d(t, "faTrashAlt", function () { + return Vt; + }), + n.d(t, "faUser", function () { + return Gt; + }), + n.d(t, "faUserCircle", function () { + return Ut; + }), + n.d(t, "faWindowClose", function () { + return Ht; + }), + n.d(t, "faWindowMaximize", function () { + return Wt; + }), + n.d(t, "faWindowMinimize", function () { + return Xt; + }), + n.d(t, "faWindowRestore", function () { + return Yt; + }); + var i = "far", + r = { + prefix: "far", + iconName: "address-book", + icon: [ + 448, + 512, + [], + "f2b9", + "M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-68 304H48V48h320v416zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z", + ], + }, + o = { + prefix: "far", + iconName: "address-card", + icon: [ + 576, + 512, + [], + "f2bb", + "M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H48V80h480v352zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2zM360 320h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8z", + ], + }, + a = { + prefix: "far", + iconName: "angry", + icon: [ + 496, + 512, + [], + "f556", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-144c-33.6 0-65.2 14.8-86.8 40.6-8.5 10.2-7.1 25.3 3.1 33.8s25.3 7.2 33.8-3c24.8-29.7 75-29.7 99.8 0 8.1 9.7 23.2 11.9 33.8 3 10.2-8.5 11.5-23.6 3.1-33.8-21.6-25.8-53.2-40.6-86.8-40.6zm-48-72c10.3 0 19.9-6.7 23-17.1 3.8-12.7-3.4-26.1-16.1-29.9l-80-24c-12.8-3.9-26.1 3.4-29.9 16.1-3.8 12.7 3.4 26.1 16.1 29.9l28.2 8.5c-3.1 4.9-5.3 10.4-5.3 16.6 0 17.7 14.3 32 32 32s32-14.4 32-32.1zm199-54.9c-3.8-12.7-17.1-19.9-29.9-16.1l-80 24c-12.7 3.8-19.9 17.2-16.1 29.9 3.1 10.4 12.7 17.1 23 17.1 0 17.7 14.3 32 32 32s32-14.3 32-32c0-6.2-2.2-11.7-5.3-16.6l28.2-8.5c12.7-3.7 19.9-17.1 16.1-29.8z", + ], + }, + s = { + prefix: "far", + iconName: "arrow-alt-circle-down", + icon: [ + 512, + 512, + [], + "f358", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm-32-316v116h-67c-10.7 0-16 12.9-8.5 20.5l99 99c4.7 4.7 12.3 4.7 17 0l99-99c7.6-7.6 2.2-20.5-8.5-20.5h-67V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12z", + ], + }, + c = { + prefix: "far", + iconName: "arrow-alt-circle-left", + icon: [ + 512, + 512, + [], + "f359", + "M8 256c0 137 111 248 248 248s248-111 248-248S393 8 256 8 8 119 8 256zm448 0c0 110.5-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56s200 89.5 200 200zm-72-20v40c0 6.6-5.4 12-12 12H256v67c0 10.7-12.9 16-20.5 8.5l-99-99c-4.7-4.7-4.7-12.3 0-17l99-99c7.6-7.6 20.5-2.2 20.5 8.5v67h116c6.6 0 12 5.4 12 12z", + ], + }, + l = { + prefix: "far", + iconName: "arrow-alt-circle-right", + icon: [ + 512, + 512, + [], + "f35a", + "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm72 20v-40c0-6.6 5.4-12 12-12h116v-67c0-10.7 12.9-16 20.5-8.5l99 99c4.7 4.7 4.7 12.3 0 17l-99 99c-7.6 7.6-20.5 2.2-20.5-8.5v-67H140c-6.6 0-12-5.4-12-12z", + ], + }, + u = { + prefix: "far", + iconName: "arrow-alt-circle-up", + icon: [ + 512, + 512, + [], + "f35b", + "M256 504c137 0 248-111 248-248S393 8 256 8 8 119 8 256s111 248 248 248zm0-448c110.5 0 200 89.5 200 200s-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56zm20 328h-40c-6.6 0-12-5.4-12-12V256h-67c-10.7 0-16-12.9-8.5-20.5l99-99c4.7-4.7 12.3-4.7 17 0l99 99c7.6 7.6 2.2 20.5-8.5 20.5h-67v116c0 6.6-5.4 12-12 12z", + ], + }, + h = { + prefix: "far", + iconName: "bell", + icon: [ + 448, + 512, + [], + "f0f3", + "M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z", + ], + }, + d = { + prefix: "far", + iconName: "bell-slash", + icon: [ + 640, + 512, + [], + "f1f6", + "M633.99 471.02L36 3.51C29.1-2.01 19.03-.9 13.51 6l-10 12.49C-2.02 25.39-.9 35.46 6 40.98l598 467.51c6.9 5.52 16.96 4.4 22.49-2.49l10-12.49c5.52-6.9 4.41-16.97-2.5-22.49zM163.53 368c16.71-22.03 34.48-55.8 41.4-110.58l-45.47-35.55c-3.27 90.73-36.47 120.68-54.84 140.42-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h279.66l-61.4-48H163.53zM320 96c61.86 0 112 50.14 112 112 0 .2-.06.38-.06.58.02 16.84 1.16 31.77 2.79 45.73l59.53 46.54c-8.31-22.13-14.34-51.49-14.34-92.85 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84c-26.02 5.41-49.45 16.94-69.13 32.72l38.17 29.84C275 103.18 296.65 96 320 96zm0 416c35.32 0 63.97-28.65 63.97-64H256.03c0 35.35 28.65 64 63.97 64z", + ], + }, + p = { + prefix: "far", + iconName: "bookmark", + icon: [384, 512, [], "f02e", "M336 0H48C21.49 0 0 21.49 0 48v464l192-112 192 112V48c0-26.51-21.49-48-48-48zm0 428.43l-144-84-144 84V54a6 6 0 0 1 6-6h276c3.314 0 6 2.683 6 5.996V428.43z"], + }, + f = { + prefix: "far", + iconName: "building", + icon: [ + 448, + 512, + [], + "f1ad", + "M128 148v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12zm140 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-128 96h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm128 0h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-76 84v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm76 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm180 124v36H0v-36c0-6.6 5.4-12 12-12h19.5V24c0-13.3 10.7-24 24-24h337c13.3 0 24 10.7 24 24v440H436c6.6 0 12 5.4 12 12zM79.5 463H192v-67c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v67h112.5V49L80 48l-.5 415z", + ], + }, + m = { + prefix: "far", + iconName: "calendar", + icon: [ + 448, + 512, + [], + "f133", + "M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z", + ], + }, + g = { + prefix: "far", + iconName: "calendar-alt", + icon: [ + 448, + 512, + [], + "f073", + "M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + b = { + prefix: "far", + iconName: "calendar-check", + icon: [ + 448, + 512, + [], + "f274", + "M400 64h-48V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H160V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V160h352v298a6 6 0 0 1-6 6zm-52.849-200.65L198.842 404.519c-4.705 4.667-12.303 4.637-16.971-.068l-75.091-75.699c-4.667-4.705-4.637-12.303.068-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l44.104 44.461 111.072-110.181c4.705-4.667 12.303-4.637 16.971.068l22.536 22.718c4.667 4.705 4.636 12.303-.069 16.97z", + ], + }, + _ = { + prefix: "far", + iconName: "calendar-minus", + icon: [ + 448, + 512, + [], + "f272", + "M124 328c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v24c0 6.6-5.4 12-12 12H124zm324-216v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + v = { + prefix: "far", + iconName: "calendar-plus", + icon: [ + 448, + 512, + [], + "f271", + "M336 292v24c0 6.6-5.4 12-12 12h-76v76c0 6.6-5.4 12-12 12h-24c-6.6 0-12-5.4-12-12v-76h-76c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h76v-76c0-6.6 5.4-12 12-12h24c6.6 0 12 5.4 12 12v76h76c6.6 0 12 5.4 12 12zm112-180v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + y = { + prefix: "far", + iconName: "calendar-times", + icon: [ + 448, + 512, + [], + "f273", + "M311.7 374.7l-17 17c-4.7 4.7-12.3 4.7-17 0L224 337.9l-53.7 53.7c-4.7 4.7-12.3 4.7-17 0l-17-17c-4.7-4.7-4.7-12.3 0-17l53.7-53.7-53.7-53.7c-4.7-4.7-4.7-12.3 0-17l17-17c4.7-4.7 12.3-4.7 17 0l53.7 53.7 53.7-53.7c4.7-4.7 12.3-4.7 17 0l17 17c4.7 4.7 4.7 12.3 0 17L257.9 304l53.7 53.7c4.8 4.7 4.8 12.3.1 17zM448 112v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + C = { + prefix: "far", + iconName: "caret-square-down", + icon: [ + 448, + 512, + [], + "f150", + "M125.1 208h197.8c10.7 0 16.1 13 8.5 20.5l-98.9 98.3c-4.7 4.7-12.2 4.7-16.9 0l-98.9-98.3c-7.7-7.5-2.3-20.5 8.4-20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + P = { + prefix: "far", + iconName: "caret-square-left", + icon: [ + 448, + 512, + [], + "f191", + "M272 157.1v197.8c0 10.7-13 16.1-20.5 8.5l-98.3-98.9c-4.7-4.7-4.7-12.2 0-16.9l98.3-98.9c7.5-7.7 20.5-2.3 20.5 8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + x = { + prefix: "far", + iconName: "caret-square-right", + icon: [ + 448, + 512, + [], + "f152", + "M176 354.9V157.1c0-10.7 13-16.1 20.5-8.5l98.3 98.9c4.7 4.7 4.7 12.2 0 16.9l-98.3 98.9c-7.5 7.7-20.5 2.3-20.5-8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + T = { + prefix: "far", + iconName: "caret-square-up", + icon: [ + 448, + 512, + [], + "f151", + "M322.9 304H125.1c-10.7 0-16.1-13-8.5-20.5l98.9-98.3c4.7-4.7 12.2-4.7 16.9 0l98.9 98.3c7.7 7.5 2.3 20.5-8.4 20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + S = { + prefix: "far", + iconName: "chart-bar", + icon: [ + 512, + 512, + [], + "f080", + "M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z", + ], + }, + O = { + prefix: "far", + iconName: "check-circle", + icon: [ + 512, + 512, + [], + "f058", + "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z", + ], + }, + E = { + prefix: "far", + iconName: "check-square", + icon: [ + 448, + 512, + [], + "f14a", + "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z", + ], + }, + M = { + prefix: "far", + iconName: "circle", + icon: [512, 512, [], "f111", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"], + }, + A = { + prefix: "far", + iconName: "clipboard", + icon: [ + 384, + 512, + [], + "f328", + "M336 64h-80c0-35.29-28.71-64-64-64s-64 28.71-64 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h42v36c0 6.627 5.373 12 12 12h168c6.627 0 12-5.373 12-12v-36h42a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zM192 40c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24", + ], + }, + I = { + prefix: "far", + iconName: "clock", + icon: [ + 512, + 512, + [], + "f017", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z", + ], + }, + D = { + prefix: "far", + iconName: "clone", + icon: [ + 512, + 512, + [], + "f24d", + "M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z", + ], + }, + R = { + prefix: "far", + iconName: "closed-captioning", + icon: [ + 512, + 512, + [], + "f20a", + "M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 336H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v276c0 3.3-2.7 6-6 6zm-211.1-85.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7zm190.4 0c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.9-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 220.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7z", + ], + }, + w = { + prefix: "far", + iconName: "comment", + icon: [ + 512, + 512, + [], + "f075", + "M256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z", + ], + }, + L = { + prefix: "far", + iconName: "comment-alt", + icon: [ + 512, + 512, + [], + "f27a", + "M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0 4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm16 352c0 8.8-7.2 16-16 16H288l-12.8 9.6L208 428v-60H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h384c8.8 0 16 7.2 16 16v288z", + ], + }, + F = { + prefix: "far", + iconName: "comment-dots", + icon: [ + 512, + 512, + [], + "f4ad", + "M144 208c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zM256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z", + ], + }, + N = { + prefix: "far", + iconName: "comments", + icon: [ + 576, + 512, + [], + "f086", + "M532 386.2c27.5-27.1 44-61.1 44-98.2 0-80-76.5-146.1-176.2-157.9C368.3 72.5 294.3 32 208 32 93.1 32 0 103.6 0 192c0 37 16.5 71 44 98.2-15.3 30.7-37.3 54.5-37.7 54.9-6.3 6.7-8.1 16.5-4.4 25 3.6 8.5 12 14 21.2 14 53.5 0 96.7-20.2 125.2-38.8 9.2 2.1 18.7 3.7 28.4 4.9C208.1 407.6 281.8 448 368 448c20.8 0 40.8-2.4 59.8-6.8C456.3 459.7 499.4 480 553 480c9.2 0 17.5-5.5 21.2-14 3.6-8.5 1.9-18.3-4.4-25-.4-.3-22.5-24.1-37.8-54.8zm-392.8-92.3L122.1 305c-14.1 9.1-28.5 16.3-43.1 21.4 2.7-4.7 5.4-9.7 8-14.8l15.5-31.1L77.7 256C64.2 242.6 48 220.7 48 192c0-60.7 73.3-112 160-112s160 51.3 160 112-73.3 112-160 112c-16.5 0-33-1.9-49-5.6l-19.8-4.5zM498.3 352l-24.7 24.4 15.5 31.1c2.6 5.1 5.3 10.1 8 14.8-14.6-5.1-29-12.3-43.1-21.4l-17.1-11.1-19.9 4.6c-16 3.7-32.5 5.6-49 5.6-54 0-102.2-20.1-131.3-49.7C338 339.5 416 272.9 416 192c0-3.4-.4-6.7-.7-10C479.7 196.5 528 238.8 528 288c0 28.7-16.2 50.6-29.7 64z", + ], + }, + k = { + prefix: "far", + iconName: "compass", + icon: [ + 496, + 512, + [], + "f14e", + "M347.94 129.86L203.6 195.83a31.938 31.938 0 0 0-15.77 15.77l-65.97 144.34c-7.61 16.65 9.54 33.81 26.2 26.2l144.34-65.97a31.938 31.938 0 0 0 15.77-15.77l65.97-144.34c7.61-16.66-9.54-33.81-26.2-26.2zm-77.36 148.72c-12.47 12.47-32.69 12.47-45.16 0-12.47-12.47-12.47-32.69 0-45.16 12.47-12.47 32.69-12.47 45.16 0 12.47 12.47 12.47 32.69 0 45.16zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z", + ], + }, + z = { + prefix: "far", + iconName: "copy", + icon: [ + 448, + 512, + [], + "f0c5", + "M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z", + ], + }, + j = { + prefix: "far", + iconName: "copyright", + icon: [ + 512, + 512, + [], + "f1f9", + "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm107.351-101.064c-9.614 9.712-45.53 41.396-104.065 41.396-82.43 0-140.484-61.425-140.484-141.567 0-79.152 60.275-139.401 139.762-139.401 55.531 0 88.738 26.62 97.593 34.779a11.965 11.965 0 0 1 1.936 15.322l-18.155 28.113c-3.841 5.95-11.966 7.282-17.499 2.921-8.595-6.776-31.814-22.538-61.708-22.538-48.303 0-77.916 35.33-77.916 80.082 0 41.589 26.888 83.692 78.277 83.692 32.657 0 56.843-19.039 65.726-27.225 5.27-4.857 13.596-4.039 17.82 1.738l19.865 27.17a11.947 11.947 0 0 1-1.152 15.518z", + ], + }, + B = { + prefix: "far", + iconName: "credit-card", + icon: [ + 576, + 512, + [], + "f09d", + "M527.9 32H48.1C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48.1 48h479.8c26.6 0 48.1-21.5 48.1-48V80c0-26.5-21.5-48-48.1-48zM54.1 80h467.8c3.3 0 6 2.7 6 6v42H48.1V86c0-3.3 2.7-6 6-6zm467.8 352H54.1c-3.3 0-6-2.7-6-6V256h479.8v170c0 3.3-2.7 6-6 6zM192 332v40c0 6.6-5.4 12-12 12h-72c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12zm192 0v40c0 6.6-5.4 12-12 12H236c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12z", + ], + }, + V = { + prefix: "far", + iconName: "dizzy", + icon: [ + 496, + 512, + [], + "f567", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-33.8-217.9c7.8-7.8 7.8-20.5 0-28.3L196.3 192l17.9-17.9c7.8-7.8 7.8-20.5 0-28.3-7.8-7.8-20.5-7.8-28.3 0L168 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.9 7.7 20.5 7.7 28.4-.2zm160-92.2c-7.8-7.8-20.5-7.8-28.3 0L328 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.8 7.8 20.5 7.8 28.3 0 7.8-7.8 7.8-20.5 0-28.3l-17.8-18 17.9-17.9c7.7-7.8 7.7-20.4 0-28.2zM248 272c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64z", + ], + }, + G = { + prefix: "far", + iconName: "dot-circle", + icon: [ + 512, + 512, + [], + "f192", + "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z", + ], + }, + U = { + prefix: "far", + iconName: "edit", + icon: [ + 576, + 512, + [], + "f044", + "M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z", + ], + }, + H = { + prefix: "far", + iconName: "envelope", + icon: [ + 512, + 512, + [], + "f0e0", + "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z", + ], + }, + W = { + prefix: "far", + iconName: "envelope-open", + icon: [ + 512, + 512, + [], + "f2b6", + "M494.586 164.516c-4.697-3.883-111.723-89.95-135.251-108.657C337.231 38.191 299.437 0 256 0c-43.205 0-80.636 37.717-103.335 55.859-24.463 19.45-131.07 105.195-135.15 108.549A48.004 48.004 0 0 0 0 201.485V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V201.509a48 48 0 0 0-17.414-36.993zM464 458a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V204.347c0-1.813.816-3.526 2.226-4.665 15.87-12.814 108.793-87.554 132.364-106.293C200.755 78.88 232.398 48 256 48c23.693 0 55.857 31.369 73.41 45.389 23.573 18.741 116.503 93.493 132.366 106.316a5.99 5.99 0 0 1 2.224 4.663V458zm-31.991-187.704c4.249 5.159 3.465 12.795-1.745 16.981-28.975 23.283-59.274 47.597-70.929 56.863C336.636 362.283 299.205 400 256 400c-43.452 0-81.287-38.237-103.335-55.86-11.279-8.967-41.744-33.413-70.927-56.865-5.21-4.187-5.993-11.822-1.745-16.981l15.258-18.528c4.178-5.073 11.657-5.843 16.779-1.726 28.618 23.001 58.566 47.035 70.56 56.571C200.143 320.631 232.307 352 256 352c23.602 0 55.246-30.88 73.41-45.389 11.994-9.535 41.944-33.57 70.563-56.568 5.122-4.116 12.601-3.346 16.778 1.727l15.258 18.526z", + ], + }, + X = { + prefix: "far", + iconName: "eye", + icon: [ + 576, + 512, + [], + "f06e", + "M569.354 231.631C512.97 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-102.556 0-192.091-54.701-240-136 44.157-74.933 123.677-127.27 216.162-135.007C273.958 131.078 280 144.83 280 160c0 30.928-25.072 56-56 56s-56-25.072-56-56l.001-.042C157.794 179.043 152 200.844 152 224c0 75.111 60.889 136 136 136s136-60.889 136-136c0-31.031-10.4-59.629-27.895-82.515C451.704 164.638 498.009 205.106 528 256c-47.908 81.299-137.444 136-240 136z", + ], + }, + Y = { + prefix: "far", + iconName: "eye-slash", + icon: [ + 576, + 512, + [], + "f070", + "M272.702 359.139c-80.483-9.011-136.212-86.886-116.93-167.042l116.93 167.042zM288 392c-102.556 0-192.092-54.701-240-136 21.755-36.917 52.1-68.342 88.344-91.658l-27.541-39.343C67.001 152.234 31.921 188.741 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.004 376.006 168.14 440 288 440a332.89 332.89 0 0 0 39.648-2.367l-32.021-45.744A284.16 284.16 0 0 1 288 392zm281.354-111.631c-33.232 56.394-83.421 101.742-143.554 129.492l48.116 68.74c3.801 5.429 2.48 12.912-2.949 16.712L450.23 509.83c-5.429 3.801-12.912 2.48-16.712-2.949L102.084 33.399c-3.801-5.429-2.48-12.912 2.949-16.712L125.77 2.17c5.429-3.801 12.912-2.48 16.712 2.949l55.526 79.325C226.612 76.343 256.808 72 288 72c119.86 0 224.996 63.994 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM528 256c-44.157-74.933-123.677-127.27-216.162-135.007C302.042 131.078 296 144.83 296 160c0 30.928 25.072 56 56 56s56-25.072 56-56l-.001-.042c30.632 57.277 16.739 130.26-36.928 171.719l26.695 38.135C452.626 346.551 498.308 306.386 528 256z", + ], + }, + K = { + prefix: "far", + iconName: "file", + icon: [ + 384, + 512, + [], + "f15b", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z", + ], + }, + Z = { + prefix: "far", + iconName: "file-alt", + icon: [ + 384, + 512, + [], + "f15c", + "M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z", + ], + }, + q = { + prefix: "far", + iconName: "file-archive", + icon: [ + 384, + 512, + [], + "f1c6", + "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM256 51.882L332.118 128H256V51.882zM336 464H48V48h79.714v16h32V48H208v104c0 13.255 10.745 24 24 24h104v288zM192.27 96h-32V64h32v32zm-32 0v32h-32V96h32zm0 64v32h-32v-32h32zm32 0h-32v-32h32v32zm1.909 105.678A12 12 0 0 0 182.406 256H160.27v-32h-32v32l-19.69 97.106C101.989 385.611 126.834 416 160 416c33.052 0 57.871-30.192 51.476-62.62l-17.297-87.702zM160.27 390.073c-17.918 0-32.444-12.105-32.444-27.036 0-14.932 14.525-27.036 32.444-27.036s32.444 12.105 32.444 27.036c0 14.931-14.526 27.036-32.444 27.036zm32-166.073h-32v-32h32v32z", + ], + }, + Q = { + prefix: "far", + iconName: "file-audio", + icon: [ + 384, + 512, + [], + "f1c7", + "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm144-76.024c0 10.691-12.926 16.045-20.485 8.485L136 360.486h-28c-6.627 0-12-5.373-12-12v-56c0-6.627 5.373-12 12-12h28l35.515-36.947c7.56-7.56 20.485-2.206 20.485 8.485v135.952zm41.201-47.13c9.051-9.297 9.06-24.133.001-33.439-22.149-22.752 12.235-56.246 34.395-33.481 27.198 27.94 27.212 72.444.001 100.401-21.793 22.386-56.947-10.315-34.397-33.481z", + ], + }, + J = { + prefix: "far", + iconName: "file-code", + icon: [ + 384, + 512, + [], + "f1c9", + "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm101.677-115.115L116.854 320l32.822-28.885a8.793 8.793 0 0 0 .605-12.624l-17.403-18.564c-3.384-3.613-8.964-3.662-12.438-.401L62.78 313.58c-3.703 3.474-3.704 9.367.001 12.84l57.659 54.055a8.738 8.738 0 0 0 6.012 2.381 8.746 8.746 0 0 0 6.427-2.782l17.403-18.563a8.795 8.795 0 0 0-.605-12.626zm84.284-127.85l-24.401-7.084a8.796 8.796 0 0 0-10.905 5.998L144.04 408.061c-1.353 4.66 1.338 9.552 5.998 10.905l24.403 7.084c4.68 1.355 9.557-1.354 10.905-5.998l54.612-188.112c1.354-4.66-1.337-9.552-5.997-10.905zm87.258 92.545l-57.658-54.055c-3.526-3.307-9.099-3.165-12.439.401l-17.403 18.563a8.795 8.795 0 0 0 .605 12.625L267.146 320l-32.822 28.885a8.793 8.793 0 0 0-.605 12.624l17.403 18.564a8.797 8.797 0 0 0 12.439.401h-.001l57.66-54.055c3.703-3.473 3.703-9.366-.001-12.839z", + ], + }, + $ = { + prefix: "far", + iconName: "file-excel", + icon: [ + 384, + 512, + [], + "f1c3", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm212-240h-28.8c-4.4 0-8.4 2.4-10.5 6.3-18 33.1-22.2 42.4-28.6 57.7-13.9-29.1-6.9-17.3-28.6-57.7-2.1-3.9-6.2-6.3-10.6-6.3H124c-9.3 0-15 10-10.4 18l46.3 78-46.3 78c-4.7 8 1.1 18 10.4 18h28.9c4.4 0 8.4-2.4 10.5-6.3 21.7-40 23-45 28.6-57.7 14.9 30.2 5.9 15.9 28.6 57.7 2.1 3.9 6.2 6.3 10.6 6.3H260c9.3 0 15-10 10.4-18L224 320c.7-1.1 30.3-50.5 46.3-78 4.7-8-1.1-18-10.3-18z", + ], + }, + ee = { + prefix: "far", + iconName: "file-image", + icon: [ + 384, + 512, + [], + "f1c5", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z", + ], + }, + te = { + prefix: "far", + iconName: "file-pdf", + icon: [ + 384, + 512, + [], + "f1c1", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z", + ], + }, + ne = { + prefix: "far", + iconName: "file-powerpoint", + icon: [ + 384, + 512, + [], + "f1c4", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm72-60V236c0-6.6 5.4-12 12-12h69.2c36.7 0 62.8 27 62.8 66.3 0 74.3-68.7 66.5-95.5 66.5V404c0 6.6-5.4 12-12 12H132c-6.6 0-12-5.4-12-12zm48.5-87.4h23c7.9 0 13.9-2.4 18.1-7.2 8.5-9.8 8.4-28.5.1-37.8-4.1-4.6-9.9-7-17.4-7h-23.9v52z", + ], + }, + ie = { + prefix: "far", + iconName: "file-video", + icon: [ + 384, + 512, + [], + "f1c8", + "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm228.687-211.303L224 305.374V268c0-11.046-8.954-20-20-20H100c-11.046 0-20 8.954-20 20v104c0 11.046 8.954 20 20 20h104c11.046 0 20-8.954 20-20v-37.374l52.687 52.674C286.704 397.318 304 390.28 304 375.986V264.011c0-14.311-17.309-21.319-27.313-11.314z", + ], + }, + re = { + prefix: "far", + iconName: "file-word", + icon: [ + 384, + 512, + [], + "f1c2", + "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm220.1-208c-5.7 0-10.6 4-11.7 9.5-20.6 97.7-20.4 95.4-21 103.5-.2-1.2-.4-2.6-.7-4.3-.8-5.1.3.2-23.6-99.5-1.3-5.4-6.1-9.2-11.7-9.2h-13.3c-5.5 0-10.3 3.8-11.7 9.1-24.4 99-24 96.2-24.8 103.7-.1-1.1-.2-2.5-.5-4.2-.7-5.2-14.1-73.3-19.1-99-1.1-5.6-6-9.7-11.8-9.7h-16.8c-7.8 0-13.5 7.3-11.7 14.8 8 32.6 26.7 109.5 33.2 136 1.3 5.4 6.1 9.1 11.7 9.1h25.2c5.5 0 10.3-3.7 11.6-9.1l17.9-71.4c1.5-6.2 2.5-12 3-17.3l2.9 17.3c.1.4 12.6 50.5 17.9 71.4 1.3 5.3 6.1 9.1 11.6 9.1h24.7c5.5 0 10.3-3.7 11.6-9.1 20.8-81.9 30.2-119 34.5-136 1.9-7.6-3.8-14.9-11.6-14.9h-15.8z", + ], + }, + oe = { + prefix: "far", + iconName: "flag", + icon: [ + 512, + 512, + [], + "f024", + "M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z", + ], + }, + ae = { + prefix: "far", + iconName: "flushed", + icon: [ + 496, + 512, + [], + "f579", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm96-312c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-112 24c0-44.2-35.8-80-80-80s-80 35.8-80 80 35.8 80 80 80 80-35.8 80-80zm-80 48c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm160 144H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z", + ], + }, + se = { + prefix: "far", + iconName: "folder", + icon: [ + 512, + 512, + [], + "f07b", + "M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z", + ], + }, + ce = { + prefix: "far", + iconName: "folder-open", + icon: [ + 576, + 512, + [], + "f07c", + "M527.943 224H480v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h400a48.001 48.001 0 0 0 40.704-22.56l79.942-128c19.948-31.917-3.038-73.44-40.703-73.44zM54 112h134.118l64 64H426a6 6 0 0 1 6 6v42H152a48 48 0 0 0-41.098 23.202L48 351.449V117.993A5.993 5.993 0 0 1 54 112zm394 288H72l77.234-128H528l-80 128z", + ], + }, + le = { + prefix: "far", + iconName: "font-awesome-logo-full", + icon: [ + 3992, + 512, + ["Font Awesome"], + "f4e6", + "M454.6 0H57.4C25.9 0 0 25.9 0 57.4v397.3C0 486.1 25.9 512 57.4 512h397.3c31.4 0 57.4-25.9 57.4-57.4V57.4C512 25.9 486.1 0 454.6 0zm-58.9 324.9c0 4.8-4.1 6.9-8.9 8.9-19.2 8.1-39.7 15.7-61.5 15.7-40.5 0-68.7-44.8-163.2 2.5v51.8c0 30.3-45.7 30.2-45.7 0v-250c-9-7-15-17.9-15-30.3 0-21 17.1-38.2 38.2-38.2 21 0 38.2 17.1 38.2 38.2 0 12.2-5.8 23.2-14.9 30.2v21c37.1-12 65.5-34.4 146.1-3.4 26.6 11.4 68.7-15.7 76.5-15.7 5.5 0 10.3 4.1 10.3 8.9v160.4zm432.9-174.2h-137v70.1H825c39.8 0 40.4 62.2 0 62.2H691.6v105.6c0 45.5-70.7 46.4-70.7 0V128.3c0-22 18-39.8 39.8-39.8h167.8c39.6 0 40.5 62.2.1 62.2zm191.1 23.4c-169.3 0-169.1 252.4 0 252.4 169.9 0 169.9-252.4 0-252.4zm0 196.1c-81.6 0-82.1-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm372.4 53.4c-17.5 0-31.4-13.9-31.4-31.4v-117c0-62.4-72.6-52.5-99.1-16.4v133.4c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c43.3-51.6 162.4-60.4 162.4 39.3v141.5c.3 30.4-31.5 31.4-31.7 31.4zm179.7 2.9c-44.3 0-68.3-22.9-68.3-65.8V235.2H1488c-35.6 0-36.7-55.3 0-55.3h15.5v-37.3c0-41.3 63.8-42.1 63.8 0v37.5h24.9c35.4 0 35.7 55.3 0 55.3h-24.9v108.5c0 29.6 26.1 26.3 27.4 26.3 31.4 0 52.6 56.3-22.9 56.3zM1992 123c-19.5-50.2-95.5-50-114.5 0-107.3 275.7-99.5 252.7-99.5 262.8 0 42.8 58.3 51.2 72.1 14.4l13.5-35.9H2006l13 35.9c14.2 37.7 72.1 27.2 72.1-14.4 0-10.1 5.3 6.8-99.1-262.8zm-108.9 179.1l51.7-142.9 51.8 142.9h-103.5zm591.3-85.6l-53.7 176.3c-12.4 41.2-72 41-84 0l-42.3-135.9-42.3 135.9c-12.4 40.9-72 41.2-84.5 0l-54.2-176.3c-12.5-39.4 49.8-56.1 60.2-16.9L2213 342l45.3-139.5c10.9-32.7 59.6-34.7 71.2 0l45.3 139.5 39.3-142.4c10.3-38.3 72.6-23.8 60.3 16.9zm275.4 75.1c0-42.4-33.9-117.5-119.5-117.5-73.2 0-124.4 56.3-124.4 126 0 77.2 55.3 126.4 128.5 126.4 31.7 0 93-11.5 93-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-109 8.4-115.9-43.8h148.3c16.3 0 29.3-13.4 29.3-28.9zM2571 277.7c9.5-73.4 113.9-68.6 118.6 0H2571zm316.7 148.8c-31.4 0-81.6-10.5-96.6-31.9-12.4-17 2.5-39.8 21.8-39.8 16.3 0 36.8 22.9 77.7 22.9 27.4 0 40.4-11 40.4-25.8 0-39.8-142.9-7.4-142.9-102 0-40.4 35.3-75.7 98.6-75.7 31.4 0 74.1 9.9 87.6 29.4 10.8 14.8-1.4 36.2-20.9 36.2-15.1 0-26.7-17.3-66.2-17.3-22.9 0-37.8 10.5-37.8 23.8 0 35.9 142.4 6 142.4 103.1-.1 43.7-37.4 77.1-104.1 77.1zm266.8-252.4c-169.3 0-169.1 252.4 0 252.4 170.1 0 169.6-252.4 0-252.4zm0 196.1c-81.8 0-82-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm476.9 22V268.7c0-53.8-61.4-45.8-85.7-10.5v134c0 41.3-63.8 42.1-63.8 0V268.7c0-52.1-59.5-47.4-85.7-10.1v133.6c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c9.9-14.4 41.8-37.3 78.6-37.3 35.3 0 57.7 16.4 66.7 43.8 13.9-21.8 45.8-43.8 82.6-43.8 44.3 0 70.7 23.4 70.7 72.7v145.3c.5 17.3-13.5 31.4-31.9 31.4 3.5.1-31.3 1.1-31.3-31.3zM3992 291.6c0-42.4-32.4-117.5-117.9-117.5-73.2 0-127.5 56.3-127.5 126 0 77.2 58.3 126.4 131.6 126.4 31.7 0 91.5-11.5 91.5-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-110.5 8.4-117.5-43.8h149.8c16.3 0 29.1-13.4 29.3-28.9zm-180.5-13.9c9.7-74.4 115.9-68.3 120.1 0h-120.1z", + ], + }, + ue = { + prefix: "far", + iconName: "frown", + icon: [ + 496, + 512, + [], + "f119", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z", + ], + }, + he = { + prefix: "far", + iconName: "frown-open", + icon: [ + 496, + 512, + [], + "f57a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-48-248c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 112c-35.6 0-88.8 21.3-95.8 61.2-2 11.8 9 21.5 20.5 18.1 31.2-9.6 59.4-15.3 75.3-15.3s44.1 5.7 75.3 15.3c11.4 3.5 22.5-6.3 20.5-18.1-7-39.9-60.2-61.2-95.8-61.2z", + ], + }, + de = { + prefix: "far", + iconName: "futbol", + icon: [ + 496, + 512, + [], + "f1e3", + "M483.8 179.4C449.8 74.6 352.6 8 248.1 8c-25.4 0-51.2 3.9-76.7 12.2C41.2 62.5-30.1 202.4 12.2 332.6 46.2 437.4 143.4 504 247.9 504c25.4 0 51.2-3.9 76.7-12.2 130.2-42.3 201.5-182.2 159.2-312.4zm-74.5 193.7l-52.2 6.4-43.7-60.9 24.4-75.2 71.1-22.1 38.9 36.4c-.2 30.7-7.4 61.1-21.7 89.2-4.7 9.3-10.7 17.8-16.8 26.2zm0-235.4l-10.4 53.1-70.7 22-64.2-46.5V92.5l47.4-26.2c39.2 13 73.4 38 97.9 71.4zM184.9 66.4L232 92.5v73.8l-64.2 46.5-70.6-22-10.1-52.5c24.3-33.4 57.9-58.6 97.8-71.9zM139 379.5L85.9 373c-14.4-20.1-37.3-59.6-37.8-115.3l39-36.4 71.1 22.2 24.3 74.3-43.5 61.7zm48.2 67l-22.4-48.1 43.6-61.7H287l44.3 61.7-22.4 48.1c-6.2 1.8-57.6 20.4-121.7 0z", + ], + }, + pe = { + prefix: "far", + iconName: "gem", + icon: [ + 576, + 512, + [], + "f3a5", + "M464 0H112c-4 0-7.8 2-10 5.4L2 152.6c-2.9 4.4-2.6 10.2.7 14.2l276 340.8c4.8 5.9 13.8 5.9 18.6 0l276-340.8c3.3-4.1 3.6-9.8.7-14.2L474.1 5.4C471.8 2 468.1 0 464 0zm-19.3 48l63.3 96h-68.4l-51.7-96h56.8zm-202.1 0h90.7l51.7 96H191l51.6-96zm-111.3 0h56.8l-51.7 96H68l63.3-96zm-43 144h51.4L208 352 88.3 192zm102.9 0h193.6L288 435.3 191.2 192zM368 352l68.2-160h51.4L368 352z", + ], + }, + fe = { + prefix: "far", + iconName: "grimace", + icon: [ + 496, + 512, + [], + "f57f", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm16 16H152c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h192c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48zm-168 96h-24c-8.8 0-16-7.2-16-16v-8h40v24zm0-40h-40v-8c0-8.8 7.2-16 16-16h24v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm56 24c0 8.8-7.2 16-16 16h-24v-24h40v8zm0-24h-40v-24h24c8.8 0 16 7.2 16 16v8z", + ], + }, + me = { + prefix: "far", + iconName: "grin", + icon: [ + 496, + 512, + [], + "f580", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z", + ], + }, + ge = { + prefix: "far", + iconName: "grin-alt", + icon: [ + 496, + 512, + [], + "f581", + "M200.3 248c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zm128 0c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3z", + ], + }, + be = { + prefix: "far", + iconName: "grin-beam", + icon: [ + 496, + 512, + [], + "f582", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-235.9-72.9c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3zm160 0c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3z", + ], + }, + _e = { + prefix: "far", + iconName: "grin-beam-sweat", + icon: [ + 496, + 512, + [], + "f583", + "M440 160c29.5 0 53.3-26.3 53.3-58.7 0-25-31.7-75.5-46.2-97.3-3.6-5.3-10.7-5.3-14.2 0-14.5 21.8-46.2 72.3-46.2 97.3 0 32.4 23.8 58.7 53.3 58.7zM248 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zm105.3-52.9c-24.6 15.7-46 12.9-46.4 12.9 6.9 20.2 10.8 41.8 10.8 64.3 0 110.3-89.7 200-200 200S48 366.3 48 256 137.7 56 248 56c39.8 0 76.8 11.8 108 31.9 1.7-9.5 6.3-24.1 17.2-45.7C336.4 20.6 293.7 8 248 8 111 8 0 119 0 256s111 248 248 248 248-111 248-248c0-27-4.4-52.9-12.4-77.2zM168 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z", + ], + }, + ve = { + prefix: "far", + iconName: "grin-hearts", + icon: [ + 496, + 512, + [], + "f584", + "M353.6 304.6c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-152.8-48.9c4.5 1.2 9.2-1.5 10.5-6l19.4-69.9c5.6-20.3-7.4-41.1-28.8-44.5-18.6-3-36.4 9.8-41.5 27.9l-2 7.1-7.1-1.9c-18.2-4.7-38.2 4.3-44.9 22-7.7 20.2 3.8 41.9 24.2 47.2l70.2 18.1zm188.8-65.3c-6.7-17.6-26.7-26.7-44.9-22l-7.1 1.9-2-7.1c-5-18.1-22.8-30.9-41.5-27.9-21.4 3.4-34.4 24.2-28.8 44.5l19.4 69.9c1.2 4.5 5.9 7.2 10.5 6l70.2-18.2c20.4-5.3 31.9-26.9 24.2-47.1zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200z", + ], + }, + ye = { + prefix: "far", + iconName: "grin-squint", + icon: [ + 496, + 512, + [], + "f585", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-234.7-40.8c3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3l-80-48c-5.1-3-11.4-1.9-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11.1.1 15.5zm242.9 2.5c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11-.1-15.5-3.8-4.4-10.2-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48z", + ], + }, + Ce = { + prefix: "far", + iconName: "grin-squint-tears", + icon: [ + 512, + 512, + [], + "f586", + "M117.1 384.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 479 124.3 420.8 128 395c.8-6.4-4.6-11.8-10.9-10.9zm-41.2-41.7C40.3 268 53 176.1 114.6 114.6 152.4 76.8 202.6 56 256 56c36.2 0 70.8 9.8 101.2 27.7 3.8-20.3 8-36.1 12-48.3C333.8 17.2 294.9 8 256 8 192.5 8 129.1 32.2 80.6 80.6c-74.1 74.1-91.3 183.4-52 274 12.2-4.1 27.7-8.3 47.3-12.2zm352.3-187.6c45 76.6 34.9 176.9-30.8 242.6-37.8 37.8-88 58.6-141.4 58.6-30.5 0-59.8-7-86.4-19.8-3.9 19.5-8 35-12.2 47.2 31.4 13.6 65 20.6 98.7 20.6 63.5 0 126.9-24.2 175.4-72.6 78.1-78.1 93.1-195.4 45.2-288.6-12.3 4-28.2 8.1-48.5 12zm-33.3-26.9c25.8-3.7 84-13.7 100.9-30.6 21.9-21.9 21.5-57.9-.9-80.3s-58.3-22.8-80.3-.9C397.7 33 387.7 91.2 384 117c-.8 6.4 4.6 11.8 10.9 10.9zm-187 108.3c-3-3-7.2-4.2-11.4-3.2L106 255.7c-5.7 1.4-9.5 6.7-9.1 12.6.5 5.8 5.1 10.5 10.9 11l52.3 4.8 4.8 52.3c.5 5.8 5.2 10.4 11 10.9h.9c5.5 0 10.3-3.7 11.7-9.1l22.6-90.5c1-4.2-.2-8.5-3.2-11.5zm39.7-25.1l90.5-22.6c5.7-1.4 9.5-6.7 9.1-12.6-.5-5.8-5.1-10.5-10.9-11l-52.3-4.8-4.8-52.3c-.5-5.8-5.2-10.4-11-10.9-5.6-.1-11.2 3.4-12.6 9.1L233 196.5c-1 4.1.2 8.4 3.2 11.4 5 5 11.3 3.2 11.4 3.2zm52 88.5c-29.1 29.1-59.7 52.9-83.9 65.4-9.2 4.8-10 17.5-1.7 23.4 38.9 27.7 107 6.2 143.7-30.6S416 253 388.3 214.1c-5.8-8.2-18.5-7.6-23.4 1.7-12.3 24.2-36.2 54.7-65.3 83.8z", + ], + }, + Pe = { + prefix: "far", + iconName: "grin-stars", + icon: [ + 496, + 512, + [], + "f587", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-227.9-57.5c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.5 1.9-12.2-4.3-13.2l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6.1 34.9zm259.7-72.7l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6 34.9c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.6 1.8-12.2-4.4-13.2z", + ], + }, + xe = { + prefix: "far", + iconName: "grin-tears", + icon: [ + 640, + 512, + [], + "f588", + "M117.1 256.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 351 124.3 292.8 128 267c.8-6.4-4.6-11.8-10.9-10.9zm506.7 30.6c-16.9-16.9-75.1-26.9-100.9-30.6-6.3-.9-11.7 4.5-10.8 10.8 3.7 25.8 13.7 84 30.6 100.9 21.9 21.9 57.9 21.5 80.3-.9 22.3-22.3 22.7-58.3.8-80.2zm-126.6 61.7C463.8 412.3 396.9 456 320 456c-76.9 0-143.8-43.7-177.2-107.6-12.5 37.4-25.2 43.9-28.3 46.5C159.1 460.7 234.5 504 320 504s160.9-43.3 205.5-109.1c-3.2-2.7-15.9-9.2-28.3-46.5zM122.7 224.5C137.9 129.2 220.5 56 320 56c99.5 0 182.1 73.2 197.3 168.5 2.1-.2 5.2-2.4 49.5 7C554.4 106 448.7 8 320 8S85.6 106 73.2 231.4c44.5-9.4 47.1-7.2 49.5-6.9zM320 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zM240 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z", + ], + }, + Te = { + prefix: "far", + iconName: "grin-tongue", + icon: [ + 496, + 512, + [], + "f589", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zM168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z", + ], + }, + Se = { + prefix: "far", + iconName: "grin-tongue-squint", + icon: [ + 496, + 512, + [], + "f58a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zm36.9-281.1c-3.8-4.4-10.3-5.5-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zm-162.9 45.5l-80-48c-5-3-11.4-2-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3z", + ], + }, + Oe = { + prefix: "far", + iconName: "grin-tongue-wink", + icon: [ + 496, + 512, + [], + "f58b", + "M152 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm176-52c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3z", + ], + }, + Ee = { + prefix: "far", + iconName: "grin-wink", + icon: [ + 496, + 512, + [], + "f58c", + "M328 180c-25.69 0-55.88 16.92-59.86 42.12-1.75 11.22 11.5 18.24 19.83 10.84l9.55-8.48c14.81-13.19 46.16-13.19 60.97 0l9.55 8.48c8.48 7.43 21.56.25 19.83-10.84C383.88 196.92 353.69 180 328 180zm-160 60c17.67 0 32-14.33 32-32s-14.33-32-32-32-32 14.33-32 32 14.33 32 32 32zm185.55 64.64c-25.93 8.3-64.4 13.06-105.55 13.06s-79.62-4.75-105.55-13.06c-9.94-3.13-19.4 5.37-17.71 15.34C132.67 367.13 196.06 400 248 400s115.33-32.87 123.26-80.02c1.68-9.89-7.67-18.48-17.71-15.34zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z", + ], + }, + Me = { + prefix: "far", + iconName: "hand-lizard", + icon: [ + 576, + 512, + [], + "f258", + "M556.686 290.542L410.328 64.829C397.001 44.272 374.417 32 349.917 32H56C25.121 32 0 57.122 0 88v8c0 44.112 35.888 80 80 80h196.042l-18.333 48H144c-48.523 0-88 39.477-88 88 0 30.879 25.121 56 56 56h131.552c2.987 0 5.914.549 8.697 1.631L352 408.418V480h224V355.829c0-23.225-6.679-45.801-19.314-65.287zM528 432H400v-23.582c0-19.948-12.014-37.508-30.604-44.736l-99.751-38.788A71.733 71.733 0 0 0 243.552 320H112c-4.411 0-8-3.589-8-8 0-22.056 17.944-40 40-40h113.709c19.767 0 37.786-12.407 44.84-30.873l24.552-64.281c8.996-23.553-8.428-48.846-33.63-48.846H80c-17.645 0-32-14.355-32-32v-8c0-4.411 3.589-8 8-8h293.917c8.166 0 15.693 4.09 20.137 10.942l146.358 225.715A71.84 71.84 0 0 1 528 355.829V432z", + ], + }, + Ae = { + prefix: "far", + iconName: "hand-paper", + icon: [ + 448, + 512, + [], + "f256", + "M372.57 112.641v-10.825c0-43.612-40.52-76.691-83.039-65.546-25.629-49.5-94.09-47.45-117.982.747C130.269 26.456 89.144 57.945 89.144 102v126.13c-19.953-7.427-43.308-5.068-62.083 8.871-29.355 21.796-35.794 63.333-14.55 93.153L132.48 498.569a32 32 0 0 0 26.062 13.432h222.897c14.904 0 27.835-10.289 31.182-24.813l30.184-130.958A203.637 203.637 0 0 0 448 310.564V179c0-40.62-35.523-71.992-75.43-66.359zm27.427 197.922c0 11.731-1.334 23.469-3.965 34.886L368.707 464h-201.92L51.591 302.303c-14.439-20.27 15.023-42.776 29.394-22.605l27.128 38.079c8.995 12.626 29.031 6.287 29.031-9.283V102c0-25.645 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V67c0-25.663 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V101.125c0-25.672 36.57-24.81 36.57.691V256c0 8.837 7.163 16 16 16h6.857c8.837 0 16-7.163 16-16v-76.309c0-26.242 36.57-25.64 36.57-.691v131.563z", + ], + }, + Ie = { + prefix: "far", + iconName: "hand-peace", + icon: [ + 448, + 512, + [], + "f25b", + "M362.146 191.976c-13.71-21.649-38.761-34.016-65.006-30.341V74c0-40.804-32.811-74-73.141-74-40.33 0-73.14 33.196-73.14 74L160 168l-18.679-78.85C126.578 50.843 83.85 32.11 46.209 47.208 8.735 62.238-9.571 104.963 5.008 142.85l55.757 144.927c-30.557 24.956-43.994 57.809-24.733 92.218l54.853 97.999C102.625 498.97 124.73 512 148.575 512h205.702c30.744 0 57.558-21.44 64.555-51.797l27.427-118.999a67.801 67.801 0 0 0 1.729-15.203L448 256c0-44.956-43.263-77.343-85.854-64.024zM399.987 326c0 1.488-.169 2.977-.502 4.423l-27.427 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H148.575c-6.486 0-12.542-3.621-15.805-9.449l-54.854-98c-4.557-8.141-2.619-18.668 4.508-24.488l26.647-21.764a16 16 0 0 0 4.812-18.139l-64.09-166.549C37.226 92.956 84.37 74.837 96.51 106.389l59.784 155.357A16 16 0 0 0 171.227 272h11.632c8.837 0 16-7.163 16-16V74c0-34.375 50.281-34.43 50.281 0v182c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16v-28c0-25.122 36.567-25.159 36.567 0v28c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16 0-25.12 36.567-25.16 36.567 0v70z", + ], + }, + De = { + prefix: "far", + iconName: "hand-point-down", + icon: [ + 448, + 512, + [], + "f0a7", + "M188.8 512c45.616 0 83.2-37.765 83.2-83.2v-35.647a93.148 93.148 0 0 0 22.064-7.929c22.006 2.507 44.978-3.503 62.791-15.985C409.342 368.1 448 331.841 448 269.299V248c0-60.063-40-98.512-40-127.2v-2.679c4.952-5.747 8-13.536 8-22.12V32c0-17.673-12.894-32-28.8-32H156.8C140.894 0 128 14.327 128 32v64c0 8.584 3.048 16.373 8 22.12v2.679c0 6.964-6.193 14.862-23.668 30.183l-.148.129-.146.131c-9.937 8.856-20.841 18.116-33.253 25.851C48.537 195.798 0 207.486 0 252.8c0 56.928 35.286 92 83.2 92 8.026 0 15.489-.814 22.4-2.176V428.8c0 45.099 38.101 83.2 83.2 83.2zm0-48c-18.7 0-35.2-16.775-35.2-35.2V270.4c-17.325 0-35.2 26.4-70.4 26.4-26.4 0-35.2-20.625-35.2-44 0-8.794 32.712-20.445 56.1-34.926 14.575-9.074 27.225-19.524 39.875-30.799 18.374-16.109 36.633-33.836 39.596-59.075h176.752C364.087 170.79 400 202.509 400 248v21.299c0 40.524-22.197 57.124-61.325 50.601-8.001 14.612-33.979 24.151-53.625 12.925-18.225 19.365-46.381 17.787-61.05 4.95V428.8c0 18.975-16.225 35.2-35.2 35.2zM328 64c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z", + ], + }, + Re = { + prefix: "far", + iconName: "hand-point-left", + icon: [ + 512, + 512, + [], + "f0a5", + "M0 220.8C0 266.416 37.765 304 83.2 304h35.647a93.148 93.148 0 0 0 7.929 22.064c-2.507 22.006 3.503 44.978 15.985 62.791C143.9 441.342 180.159 480 242.701 480H264c60.063 0 98.512-40 127.2-40h2.679c5.747 4.952 13.536 8 22.12 8h64c17.673 0 32-12.894 32-28.8V188.8c0-15.906-14.327-28.8-32-28.8h-64c-8.584 0-16.373 3.048-22.12 8H391.2c-6.964 0-14.862-6.193-30.183-23.668l-.129-.148-.131-.146c-8.856-9.937-18.116-20.841-25.851-33.253C316.202 80.537 304.514 32 259.2 32c-56.928 0-92 35.286-92 83.2 0 8.026.814 15.489 2.176 22.4H83.2C38.101 137.6 0 175.701 0 220.8zm48 0c0-18.7 16.775-35.2 35.2-35.2h158.4c0-17.325-26.4-35.2-26.4-70.4 0-26.4 20.625-35.2 44-35.2 8.794 0 20.445 32.712 34.926 56.1 9.074 14.575 19.524 27.225 30.799 39.875 16.109 18.374 33.836 36.633 59.075 39.596v176.752C341.21 396.087 309.491 432 264 432h-21.299c-40.524 0-57.124-22.197-50.601-61.325-14.612-8.001-24.151-33.979-12.925-53.625-19.365-18.225-17.787-46.381-4.95-61.05H83.2C64.225 256 48 239.775 48 220.8zM448 360c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z", + ], + }, + we = { + prefix: "far", + iconName: "hand-point-right", + icon: [ + 512, + 512, + [], + "f0a4", + "M428.8 137.6h-86.177a115.52 115.52 0 0 0 2.176-22.4c0-47.914-35.072-83.2-92-83.2-45.314 0-57.002 48.537-75.707 78.784-7.735 12.413-16.994 23.317-25.851 33.253l-.131.146-.129.148C135.662 161.807 127.764 168 120.8 168h-2.679c-5.747-4.952-13.536-8-22.12-8H32c-17.673 0-32 12.894-32 28.8v230.4C0 435.106 14.327 448 32 448h64c8.584 0 16.373-3.048 22.12-8h2.679c28.688 0 67.137 40 127.2 40h21.299c62.542 0 98.8-38.658 99.94-91.145 12.482-17.813 18.491-40.785 15.985-62.791A93.148 93.148 0 0 0 393.152 304H428.8c45.435 0 83.2-37.584 83.2-83.2 0-45.099-38.101-83.2-83.2-83.2zm0 118.4h-91.026c12.837 14.669 14.415 42.825-4.95 61.05 11.227 19.646 1.687 45.624-12.925 53.625 6.524 39.128-10.076 61.325-50.6 61.325H248c-45.491 0-77.21-35.913-120-39.676V215.571c25.239-2.964 42.966-21.222 59.075-39.596 11.275-12.65 21.725-25.3 30.799-39.875C232.355 112.712 244.006 80 252.8 80c23.375 0 44 8.8 44 35.2 0 35.2-26.4 53.075-26.4 70.4h158.4c18.425 0 35.2 16.5 35.2 35.2 0 18.975-16.225 35.2-35.2 35.2zM88 384c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z", + ], + }, + Le = { + prefix: "far", + iconName: "hand-point-up", + icon: [ + 448, + 512, + [], + "f0a6", + "M105.6 83.2v86.177a115.52 115.52 0 0 0-22.4-2.176c-47.914 0-83.2 35.072-83.2 92 0 45.314 48.537 57.002 78.784 75.707 12.413 7.735 23.317 16.994 33.253 25.851l.146.131.148.129C129.807 376.338 136 384.236 136 391.2v2.679c-4.952 5.747-8 13.536-8 22.12v64c0 17.673 12.894 32 28.8 32h230.4c15.906 0 28.8-14.327 28.8-32v-64c0-8.584-3.048-16.373-8-22.12V391.2c0-28.688 40-67.137 40-127.2v-21.299c0-62.542-38.658-98.8-91.145-99.94-17.813-12.482-40.785-18.491-62.791-15.985A93.148 93.148 0 0 0 272 118.847V83.2C272 37.765 234.416 0 188.8 0c-45.099 0-83.2 38.101-83.2 83.2zm118.4 0v91.026c14.669-12.837 42.825-14.415 61.05 4.95 19.646-11.227 45.624-1.687 53.625 12.925 39.128-6.524 61.325 10.076 61.325 50.6V264c0 45.491-35.913 77.21-39.676 120H183.571c-2.964-25.239-21.222-42.966-39.596-59.075-12.65-11.275-25.3-21.725-39.875-30.799C80.712 279.645 48 267.994 48 259.2c0-23.375 8.8-44 35.2-44 35.2 0 53.075 26.4 70.4 26.4V83.2c0-18.425 16.5-35.2 35.2-35.2 18.975 0 35.2 16.225 35.2 35.2zM352 424c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z", + ], + }, + Fe = { + prefix: "far", + iconName: "hand-pointer", + icon: [ + 448, + 512, + [], + "f25a", + "M358.182 179.361c-19.493-24.768-52.679-31.945-79.872-19.098-15.127-15.687-36.182-22.487-56.595-19.629V67c0-36.944-29.736-67-66.286-67S89.143 30.056 89.143 67v161.129c-19.909-7.41-43.272-5.094-62.083 8.872-29.355 21.795-35.793 63.333-14.55 93.152l109.699 154.001C134.632 501.59 154.741 512 176 512h178.286c30.802 0 57.574-21.5 64.557-51.797l27.429-118.999A67.873 67.873 0 0 0 448 326v-84c0-46.844-46.625-79.273-89.818-62.639zM80.985 279.697l27.126 38.079c8.995 12.626 29.031 6.287 29.031-9.283V67c0-25.12 36.571-25.16 36.571 0v175c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16v-35c0-25.12 36.571-25.16 36.571 0v35c0 8.836 7.163 16 16 16H272c8.837 0 16-7.164 16-16v-21c0-25.12 36.571-25.16 36.571 0v21c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16 0-25.121 36.571-25.16 36.571 0v84c0 1.488-.169 2.977-.502 4.423l-27.43 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H176c-5.769 0-11.263-2.878-14.697-7.697l-109.712-154c-14.406-20.223 14.994-42.818 29.394-22.606zM176.143 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.733 0-14-7.163-14-16zm75.428 0v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16zM327 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16z", + ], + }, + Ne = { + prefix: "far", + iconName: "hand-rock", + icon: [ + 512, + 512, + [], + "f255", + "M408.864 79.052c-22.401-33.898-66.108-42.273-98.813-23.588-29.474-31.469-79.145-31.093-108.334-.022-47.16-27.02-108.71 5.055-110.671 60.806C44.846 105.407 0 140.001 0 187.429v56.953c0 32.741 14.28 63.954 39.18 85.634l97.71 85.081c4.252 3.702 3.11 5.573 3.11 32.903 0 17.673 14.327 32 32 32h252c17.673 0 32-14.327 32-32 0-23.513-1.015-30.745 3.982-42.37l42.835-99.656c6.094-14.177 9.183-29.172 9.183-44.568V146.963c0-52.839-54.314-88.662-103.136-67.911zM464 261.406a64.505 64.505 0 0 1-5.282 25.613l-42.835 99.655c-5.23 12.171-7.883 25.04-7.883 38.25V432H188v-10.286c0-16.37-7.14-31.977-19.59-42.817l-97.71-85.08C56.274 281.255 48 263.236 48 244.381v-56.953c0-33.208 52-33.537 52 .677v41.228a16 16 0 0 0 5.493 12.067l7 6.095A16 16 0 0 0 139 235.429V118.857c0-33.097 52-33.725 52 .677v26.751c0 8.836 7.164 16 16 16h7c8.836 0 16-7.164 16-16v-41.143c0-33.134 52-33.675 52 .677v40.466c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16v-27.429c0-33.03 52-33.78 52 .677v26.751c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16 0-33.146 52-33.613 52 .677v114.445z", + ], + }, + ke = { + prefix: "far", + iconName: "hand-scissors", + icon: [ + 512, + 512, + [], + "f257", + "M256 480l70-.013c5.114 0 10.231-.583 15.203-1.729l118.999-27.427C490.56 443.835 512 417.02 512 386.277V180.575c0-23.845-13.03-45.951-34.005-57.69l-97.999-54.853c-34.409-19.261-67.263-5.824-92.218 24.733L142.85 37.008c-37.887-14.579-80.612 3.727-95.642 41.201-15.098 37.642 3.635 80.37 41.942 95.112L168 192l-94-9.141c-40.804 0-74 32.811-74 73.14 0 40.33 33.196 73.141 74 73.141h87.635c-3.675 26.245 8.692 51.297 30.341 65.006C178.657 436.737 211.044 480 256 480zm0-48.013c-25.16 0-25.12-36.567 0-36.567 8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16h-28c-25.159 0-25.122-36.567 0-36.567h28c8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16H74c-34.43 0-34.375-50.281 0-50.281h182c8.837 0 16-7.163 16-16v-11.632a16 16 0 0 0-10.254-14.933L106.389 128.51c-31.552-12.14-13.432-59.283 19.222-46.717l166.549 64.091a16.001 16.001 0 0 0 18.139-4.812l21.764-26.647c5.82-7.127 16.348-9.064 24.488-4.508l98 54.854c5.828 3.263 9.449 9.318 9.449 15.805v205.701c0 8.491-5.994 15.804-14.576 17.782l-119.001 27.427a19.743 19.743 0 0 1-4.423.502h-70z", + ], + }, + ze = { + prefix: "far", + iconName: "hand-spock", + icon: [ + 512, + 512, + [], + "f259", + "M21.096 381.79l129.092 121.513a32 32 0 0 0 21.932 8.698h237.6c14.17 0 26.653-9.319 30.68-22.904l31.815-107.313A115.955 115.955 0 0 0 477 348.811v-36.839c0-4.051.476-8.104 1.414-12.045l31.73-133.41c10.099-42.412-22.316-82.738-65.544-82.525-4.144-24.856-22.543-47.165-49.85-53.992-35.803-8.952-72.227 12.655-81.25 48.75L296.599 184 274.924 52.01c-8.286-36.07-44.303-58.572-80.304-50.296-29.616 6.804-50.138 32.389-51.882 61.295-42.637.831-73.455 40.563-64.071 81.844l31.04 136.508c-27.194-22.515-67.284-19.992-91.482 5.722-25.376 26.961-24.098 69.325 2.871 94.707zm32.068-61.811l.002-.001c7.219-7.672 19.241-7.98 26.856-.813l53.012 49.894C143.225 378.649 160 371.4 160 357.406v-69.479c0-1.193-.134-2.383-.397-3.546l-34.13-150.172c-5.596-24.617 31.502-32.86 37.054-8.421l30.399 133.757a16 16 0 0 0 15.603 12.454h8.604c10.276 0 17.894-9.567 15.594-19.583l-41.62-181.153c-5.623-24.469 31.39-33.076 37.035-8.508l45.22 196.828A16 16 0 0 0 288.956 272h13.217a16 16 0 0 0 15.522-12.119l42.372-169.49c6.104-24.422 42.962-15.159 36.865 9.217L358.805 252.12c-2.521 10.088 5.115 19.88 15.522 19.88h9.694a16 16 0 0 0 15.565-12.295L426.509 146.6c5.821-24.448 42.797-15.687 36.966 8.802L431.72 288.81a100.094 100.094 0 0 0-2.72 23.162v36.839c0 6.548-.943 13.051-2.805 19.328L397.775 464h-219.31L53.978 346.836c-7.629-7.18-7.994-19.229-.814-26.857z", + ], + }, + je = { + prefix: "far", + iconName: "handshake", + icon: [ + 640, + 512, + [], + "f2b5", + "M519.2 127.9l-47.6-47.6A56.252 56.252 0 0 0 432 64H205.2c-14.8 0-29.1 5.9-39.6 16.3L118 127.9H0v255.7h64c17.6 0 31.8-14.2 31.9-31.7h9.1l84.6 76.4c30.9 25.1 73.8 25.7 105.6 3.8 12.5 10.8 26 15.9 41.1 15.9 18.2 0 35.3-7.4 48.8-24 22.1 8.7 48.2 2.6 64-16.8l26.2-32.3c5.6-6.9 9.1-14.8 10.9-23h57.9c.1 17.5 14.4 31.7 31.9 31.7h64V127.9H519.2zM48 351.6c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16zm390-6.9l-26.1 32.2c-2.8 3.4-7.8 4-11.3 1.2l-23.9-19.4-30 36.5c-6 7.3-15 4.8-18 2.4l-36.8-31.5-15.6 19.2c-13.9 17.1-39.2 19.7-55.3 6.6l-97.3-88H96V175.8h41.9l61.7-61.6c2-.8 3.7-1.5 5.7-2.3H262l-38.7 35.5c-29.4 26.9-31.1 72.3-4.4 101.3 14.8 16.2 61.2 41.2 101.5 4.4l8.2-7.5 108.2 87.8c3.4 2.8 3.9 7.9 1.2 11.3zm106-40.8h-69.2c-2.3-2.8-4.9-5.4-7.7-7.7l-102.7-83.4 12.5-11.4c6.5-6 7-16.1 1-22.6L367 167.1c-6-6.5-16.1-6.9-22.6-1l-55.2 50.6c-9.5 8.7-25.7 9.4-34.6 0-9.3-9.9-8.5-25.1 1.2-33.9l65.6-60.1c7.4-6.8 17-10.5 27-10.5l83.7-.2c2.1 0 4.1.8 5.5 2.3l61.7 61.6H544v128zm48 47.7c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16z", + ], + }, + Be = { + prefix: "far", + iconName: "hdd", + icon: [ + 576, + 512, + [], + "f0a0", + "M567.403 235.642L462.323 84.589A48 48 0 0 0 422.919 64H153.081a48 48 0 0 0-39.404 20.589L8.597 235.642A48.001 48.001 0 0 0 0 263.054V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V263.054c0-9.801-3-19.366-8.597-27.412zM153.081 112h269.838l77.913 112H75.168l77.913-112zM528 400H48V272h480v128zm-32-64c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32zm-96 0c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z", + ], + }, + Ve = { + prefix: "far", + iconName: "heart", + icon: [ + 512, + 512, + [], + "f004", + "M458.4 64.3C400.6 15.7 311.3 23 256 79.3 200.7 23 111.4 15.6 53.6 64.3-21.6 127.6-10.6 230.8 43 285.5l175.4 178.7c10 10.2 23.4 15.9 37.6 15.9 14.3 0 27.6-5.6 37.6-15.8L469 285.6c53.5-54.7 64.7-157.9-10.6-221.3zm-23.6 187.5L259.4 430.5c-2.4 2.4-4.4 2.4-6.8 0L77.2 251.8c-36.5-37.2-43.9-107.6 7.3-150.7 38.9-32.7 98.9-27.8 136.5 10.5l35 35.7 35-35.7c37.8-38.5 97.8-43.2 136.5-10.6 51.1 43.1 43.5 113.9 7.3 150.8z", + ], + }, + Ge = { + prefix: "far", + iconName: "hospital", + icon: [ + 448, + 512, + [], + "f0f8", + "M128 244v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12zm140 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm-76 84v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm76 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm180 124v36H0v-36c0-6.627 5.373-12 12-12h19.5V85.035C31.5 73.418 42.245 64 55.5 64H144V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v40h88.5c13.255 0 24 9.418 24 21.035V464H436c6.627 0 12 5.373 12 12zM79.5 463H192v-67c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v67h112.5V112H304v24c0 13.255-10.745 24-24 24H168c-13.255 0-24-10.745-24-24v-24H79.5v351zM266 64h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6z", + ], + }, + Ue = { + prefix: "far", + iconName: "hourglass", + icon: [ + 384, + 512, + [], + "f254", + "M368 48h4c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12H12C5.373 0 0 5.373 0 12v24c0 6.627 5.373 12 12 12h4c0 80.564 32.188 165.807 97.18 208C47.899 298.381 16 383.9 16 464h-4c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h360c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12h-4c0-80.564-32.188-165.807-97.18-208C336.102 213.619 368 128.1 368 48zM64 48h256c0 101.62-57.307 184-128 184S64 149.621 64 48zm256 416H64c0-101.62 57.308-184 128-184s128 82.38 128 184z", + ], + }, + He = { + prefix: "far", + iconName: "id-badge", + icon: [ + 384, + 512, + [], + "f2c1", + "M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm0 464H48V48h288v416zM144 112h96c8.8 0 16-7.2 16-16s-7.2-16-16-16h-96c-8.8 0-16 7.2-16 16s7.2 16 16 16zm48 176c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z", + ], + }, + We = { + prefix: "far", + iconName: "id-card", + icon: [ + 576, + 512, + [], + "f2c2", + "M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H303.2c.9-4.5.8 3.6.8-22.4 0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6 0 26-.2 17.9.8 22.4H48V144h480v288zm-168-80h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm-168 96c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64z", + ], + }, + Xe = { + prefix: "far", + iconName: "image", + icon: [ + 512, + 512, + [], + "f03e", + "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z", + ], + }, + Ye = { + prefix: "far", + iconName: "images", + icon: [ + 576, + 512, + [], + "f302", + "M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v48H54a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6v-10h48zm42-336H150a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6V86a6 6 0 0 0-6-6zm6-48c26.51 0 48 21.49 48 48v256c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h384zM264 144c0 22.091-17.909 40-40 40s-40-17.909-40-40 17.909-40 40-40 40 17.909 40 40zm-72 96l39.515-39.515c4.686-4.686 12.284-4.686 16.971 0L288 240l103.515-103.515c4.686-4.686 12.284-4.686 16.971 0L480 208v80H192v-48z", + ], + }, + Ke = { + prefix: "far", + iconName: "keyboard", + icon: [ + 576, + 512, + [], + "f11c", + "M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm8 336c0 4.411-3.589 8-8 8H48c-4.411 0-8-3.589-8-8V112c0-4.411 3.589-8 8-8h480c4.411 0 8 3.589 8 8v288zM170 270v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-336 82v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm384 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zM122 188v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-98 158v-16c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z", + ], + }, + Ze = { + prefix: "far", + iconName: "kiss", + icon: [ + 496, + 512, + [], + "f596", + "M168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm136 132c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z", + ], + }, + qe = { + prefix: "far", + iconName: "kiss-beam", + icon: [ + 496, + 512, + [], + "f597", + "M168 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm56-148c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zm24-156c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4z", + ], + }, + Qe = { + prefix: "far", + iconName: "kiss-wink-heart", + icon: [ + 504, + 512, + [], + "f598", + "M304 308.5c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36 21.7-9.1 35.1-23.4 35.1-36.4zm70.5-83.5l9.5 8.5c3.8 3.3 9.3 4 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 5.8 3.1 11.2.7 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0zM136 208.5c0 17.7 14.3 32 32 32s32-14.3 32-32-14.3-32-32-32-32 14.3-32 32zm365.1 194c-8-20.8-31.5-31.5-53.1-25.9l-8.4 2.2-2.3-8.4c-5.9-21.4-27-36.5-49-33-25.2 4-40.6 28.6-34 52.6l22.9 82.6c1.5 5.3 7 8.5 12.4 7.1l83-21.5c24.1-6.3 37.7-31.8 28.5-55.7zM334 436.3c-26.1 12.5-55.2 19.7-86 19.7-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200c0 22.1-3.7 43.3-10.4 63.2 9 6.4 17 14.2 22.6 23.9 6.4.1 12.6 1.4 18.6 2.9 10.9-27.9 17.1-58.2 17.1-90C496 119 385 8 248 8S0 119 0 256s111 248 248 248c35.4 0 68.9-7.5 99.4-20.9-2.5-7.3 4.3 17.2-13.4-46.8z", + ], + }, + Je = { + prefix: "far", + iconName: "laugh", + icon: [ + 496, + 512, + [], + "f599", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 224c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm-160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z", + ], + }, + $e = { + prefix: "far", + iconName: "laugh-beam", + icon: [ + 496, + 512, + [], + "f59a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 152c-23.8 0-52.7 29.3-56 71.4-.7 8.6 10.8 11.9 14.9 4.5l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.1-42.1-32-71.4-55.8-71.4zm-201 75.9l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.6 8.5 10.9 11.9 15.1 4.5zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z", + ], + }, + et = { + prefix: "far", + iconName: "laugh-squint", + icon: [ + 496, + 512, + [], + "f59b", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM343.6 196l33.6-40.3c8.6-10.3-3.8-24.8-15.4-18l-80 48c-7.8 4.7-7.8 15.9 0 20.6l80 48c11.5 6.8 24-7.6 15.4-18L343.6 196zm-209.4 58.3l80-48c7.8-4.7 7.8-15.9 0-20.6l-80-48c-11.6-6.9-24 7.7-15.4 18l33.6 40.3-33.6 40.3c-8.7 10.4 3.8 24.8 15.4 18zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z", + ], + }, + tt = { + prefix: "far", + iconName: "laugh-wink", + icon: [ + 496, + 512, + [], + "f59c", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6C68.8 359.6 48 309.4 48 256s20.8-103.6 58.6-141.4C144.4 76.8 194.6 56 248 56s103.6 20.8 141.4 58.6c37.8 37.8 58.6 88 58.6 141.4s-20.8 103.6-58.6 141.4zM328 164c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1zm-160 60c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z", + ], + }, + nt = { + prefix: "far", + iconName: "lemon", + icon: [ + 512, + 512, + [], + "f094", + "M484.112 27.889C455.989-.233 416.108-8.057 387.059 8.865 347.604 31.848 223.504-41.111 91.196 91.197-41.277 223.672 31.923 347.472 8.866 387.058c-16.922 29.051-9.1 68.932 19.022 97.054 28.135 28.135 68.011 35.938 97.057 19.021 39.423-22.97 163.557 49.969 295.858-82.329 132.474-132.477 59.273-256.277 82.331-295.861 16.922-29.05 9.1-68.931-19.022-97.054zm-22.405 72.894c-38.8 66.609 45.6 165.635-74.845 286.08-120.44 120.443-219.475 36.048-286.076 74.843-22.679 13.207-64.035-27.241-50.493-50.488 38.8-66.609-45.6-165.635 74.845-286.08C245.573 4.702 344.616 89.086 411.219 50.292c22.73-13.24 64.005 27.288 50.488 50.491zm-169.861 8.736c1.37 10.96-6.404 20.957-17.365 22.327-54.846 6.855-135.779 87.787-142.635 142.635-1.373 10.989-11.399 18.734-22.326 17.365-10.961-1.37-18.735-11.366-17.365-22.326 9.162-73.286 104.167-168.215 177.365-177.365 10.953-1.368 20.956 6.403 22.326 17.364z", + ], + }, + it = { + prefix: "far", + iconName: "life-ring", + icon: [ + 512, + 512, + [], + "f1cd", + "M256 504c136.967 0 248-111.033 248-248S392.967 8 256 8 8 119.033 8 256s111.033 248 248 248zm-103.398-76.72l53.411-53.411c31.806 13.506 68.128 13.522 99.974 0l53.411 53.411c-63.217 38.319-143.579 38.319-206.796 0zM336 256c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zm91.28 103.398l-53.411-53.411c13.505-31.806 13.522-68.128 0-99.974l53.411-53.411c38.319 63.217 38.319 143.579 0 206.796zM359.397 84.72l-53.411 53.411c-31.806-13.505-68.128-13.522-99.973 0L152.602 84.72c63.217-38.319 143.579-38.319 206.795 0zM84.72 152.602l53.411 53.411c-13.506 31.806-13.522 68.128 0 99.974L84.72 359.398c-38.319-63.217-38.319-143.579 0-206.796z", + ], + }, + rt = { + prefix: "far", + iconName: "lightbulb", + icon: [ + 352, + 512, + [], + "f0eb", + "M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z", + ], + }, + ot = { + prefix: "far", + iconName: "list-alt", + icon: [ + 512, + 512, + [], + "f022", + "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zm-42-92v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm-252 12c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z", + ], + }, + at = { + prefix: "far", + iconName: "map", + icon: [ + 576, + 512, + [], + "f279", + "M560.02 32c-1.96 0-3.98.37-5.96 1.16L384.01 96H384L212 35.28A64.252 64.252 0 0 0 191.76 32c-6.69 0-13.37 1.05-19.81 3.14L20.12 87.95A32.006 32.006 0 0 0 0 117.66v346.32C0 473.17 7.53 480 15.99 480c1.96 0 3.97-.37 5.96-1.16L192 416l172 60.71a63.98 63.98 0 0 0 40.05.15l151.83-52.81A31.996 31.996 0 0 0 576 394.34V48.02c0-9.19-7.53-16.02-15.98-16.02zM224 90.42l128 45.19v285.97l-128-45.19V90.42zM48 418.05V129.07l128-44.53v286.2l-.64.23L48 418.05zm480-35.13l-128 44.53V141.26l.64-.24L528 93.95v288.97z", + ], + }, + st = { + prefix: "far", + iconName: "meh", + icon: [ + 496, + 512, + [], + "f11a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm8 144H160c-13.2 0-24 10.8-24 24s10.8 24 24 24h176c13.2 0 24-10.8 24-24s-10.8-24-24-24z", + ], + }, + ct = { + prefix: "far", + iconName: "meh-blank", + icon: [ + 496, + 512, + [], + "f5a4", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z", + ], + }, + lt = { + prefix: "far", + iconName: "meh-rolling-eyes", + icon: [ + 496, + 512, + [], + "f5a5", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm88-304c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 112c-22.1 0-40-17.9-40-40 0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40zm-104-40c0-39.8-32.2-72-72-72s-72 32.2-72 72 32.2 72 72 72 72-32.2 72-72zm-112 0c0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40s-40-17.9-40-40zm192 128H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z", + ], + }, + ut = { + prefix: "far", + iconName: "minus-square", + icon: [ + 448, + 512, + [], + "f146", + "M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + ht = { + prefix: "far", + iconName: "money-bill-alt", + icon: [ + 640, + 512, + [], + "f3d1", + "M320 144c-53.02 0-96 50.14-96 112 0 61.85 42.98 112 96 112 53 0 96-50.13 96-112 0-61.86-42.98-112-96-112zm40 168c0 4.42-3.58 8-8 8h-64c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h16v-55.44l-.47.31a7.992 7.992 0 0 1-11.09-2.22l-8.88-13.31a7.992 7.992 0 0 1 2.22-11.09l15.33-10.22a23.99 23.99 0 0 1 13.31-4.03H328c4.42 0 8 3.58 8 8v88h16c4.42 0 8 3.58 8 8v16zM608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zm-16 272c-35.35 0-64 28.65-64 64H112c0-35.35-28.65-64-64-64V176c35.35 0 64-28.65 64-64h416c0 35.35 28.65 64 64 64v160z", + ], + }, + dt = { + prefix: "far", + iconName: "moon", + icon: [ + 512, + 512, + [], + "f186", + "M279.135 512c78.756 0 150.982-35.804 198.844-94.775 28.27-34.831-2.558-85.722-46.249-77.401-82.348 15.683-158.272-47.268-158.272-130.792 0-48.424 26.06-92.292 67.434-115.836 38.745-22.05 28.999-80.788-15.022-88.919A257.936 257.936 0 0 0 279.135 0c-141.36 0-256 114.575-256 256 0 141.36 114.576 256 256 256zm0-464c12.985 0 25.689 1.201 38.016 3.478-54.76 31.163-91.693 90.042-91.693 157.554 0 113.848 103.641 199.2 215.252 177.944C402.574 433.964 344.366 464 279.135 464c-114.875 0-208-93.125-208-208s93.125-208 208-208z", + ], + }, + pt = { + prefix: "far", + iconName: "newspaper", + icon: [ + 576, + 512, + [], + "f1ea", + "M552 64H112c-20.858 0-38.643 13.377-45.248 32H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h496c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM48 392V144h16v248c0 4.411-3.589 8-8 8s-8-3.589-8-8zm480 8H111.422c.374-2.614.578-5.283.578-8V112h416v288zM172 280h136c6.627 0 12-5.373 12-12v-96c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v96c0 6.627 5.373 12 12 12zm28-80h80v40h-80v-40zm-40 140v-24c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H172c-6.627 0-12-5.373-12-12zm192 0v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0-144v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0 72v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12z", + ], + }, + ft = { + prefix: "far", + iconName: "object-group", + icon: [ + 512, + 512, + [], + "f247", + "M500 128c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v256H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V128h12zm-52-64h32v32h-32V64zM32 64h32v32H32V64zm32 384H32v-32h32v32zm416 0h-32v-32h32v32zm-40-64h-12c-6.627 0-12 5.373-12 12v12H96v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h12v256zm-36-192h-84v-52c0-6.628-5.373-12-12-12H108c-6.627 0-12 5.372-12 12v168c0 6.628 5.373 12 12 12h84v52c0 6.628 5.373 12 12 12h200c6.627 0 12-5.372 12-12V204c0-6.628-5.373-12-12-12zm-268-24h144v112H136V168zm240 176H232v-24h76c6.627 0 12-5.372 12-12v-76h56v112z", + ], + }, + mt = { + prefix: "far", + iconName: "object-ungroup", + icon: [ + 576, + 512, + [], + "f248", + "M564 224c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12h-88v-24h12c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v160H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h88v24h-12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V224h12zM352 64h32v32h-32V64zm0 256h32v32h-32v-32zM64 352H32v-32h32v32zm0-256H32V64h32v32zm32 216v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h12v160h-12c-6.627 0-12 5.373-12 12v12H96zm128 136h-32v-32h32v32zm280-64h-12c-6.627 0-12 5.373-12 12v12H256v-12c0-6.627-5.373-12-12-12h-12v-24h88v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12v-88h88v12c0 6.627 5.373 12 12 12h12v160zm40 64h-32v-32h32v32zm0-256h-32v-32h32v32z", + ], + }, + gt = { + prefix: "far", + iconName: "paper-plane", + icon: [ + 512, + 512, + [], + "f1d8", + "M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z", + ], + }, + bt = { + prefix: "far", + iconName: "pause-circle", + icon: [ + 512, + 512, + [], + "f28b", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm96-280v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16zm-112 0v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16z", + ], + }, + _t = { + prefix: "far", + iconName: "play-circle", + icon: [ + 512, + 512, + [], + "f144", + "M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z", + ], + }, + vt = { + prefix: "far", + iconName: "plus-square", + icon: [ + 448, + 512, + [], + "f0fe", + "M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z", + ], + }, + yt = { + prefix: "far", + iconName: "question-circle", + icon: [ + 512, + 512, + [], + "f059", + "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z", + ], + }, + Ct = { + prefix: "far", + iconName: "registered", + icon: [ + 512, + 512, + [], + "f25d", + "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm110.442-81.791c-53.046-96.284-50.25-91.468-53.271-96.085 24.267-13.879 39.482-41.563 39.482-73.176 0-52.503-30.247-85.252-101.498-85.252h-78.667c-6.617 0-12 5.383-12 12V380c0 6.617 5.383 12 12 12h38.568c6.617 0 12-5.383 12-12v-83.663h31.958l47.515 89.303a11.98 11.98 0 0 0 10.593 6.36h42.81c9.14 0 14.914-9.799 10.51-17.791zM256.933 239.906h-33.875v-64.14h27.377c32.417 0 38.929 12.133 38.929 31.709-.001 20.913-11.518 32.431-32.431 32.431z", + ], + }, + Pt = { + prefix: "far", + iconName: "sad-cry", + icon: [ + 496, + 512, + [], + "f5b3", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm144 386.4V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v151.4C315.5 447 282.8 456 248 456s-67.5-9-96-24.6V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v114.4c-34.6-36-56-84.7-56-138.4 0-110.3 89.7-200 200-200s200 89.7 200 200c0 53.7-21.4 102.5-56 138.4zM205.8 234.5c4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.3 7.9 4.8 13.7 1.6zM344 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.5 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm-96 92c-30.9 0-56 28.7-56 64s25.1 64 56 64 56-28.7 56-64-25.1-64-56-64z", + ], + }, + xt = { + prefix: "far", + iconName: "sad-tear", + icon: [ + 496, + 512, + [], + "f5b4", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm8-152c-13.2 0-24 10.8-24 24s10.8 24 24 24c23.8 0 46.3 10.5 61.6 28.8 8.1 9.8 23.2 11.9 33.8 3.1 10.2-8.5 11.6-23.6 3.1-33.8C330 320.8 294.1 304 256 304zm-88-64c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-165.6 98.8C151 290.1 126 325.4 126 342.9c0 22.7 18.8 41.1 42 41.1s42-18.4 42-41.1c0-17.5-25-52.8-36.4-68.1-2.8-3.7-8.4-3.7-11.2 0z", + ], + }, + Tt = { + prefix: "far", + iconName: "save", + icon: [ + 448, + 512, + [], + "f0c7", + "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z", + ], + }, + St = { + prefix: "far", + iconName: "share-square", + icon: [ + 576, + 512, + [], + "f14d", + "M561.938 158.06L417.94 14.092C387.926-15.922 336 5.097 336 48.032v57.198c-42.45 1.88-84.03 6.55-120.76 17.99-35.17 10.95-63.07 27.58-82.91 49.42C108.22 199.2 96 232.6 96 271.94c0 61.697 33.178 112.455 84.87 144.76 37.546 23.508 85.248-12.651 71.02-55.74-15.515-47.119-17.156-70.923 84.11-78.76V336c0 42.993 51.968 63.913 81.94 33.94l143.998-144c18.75-18.74 18.75-49.14 0-67.88zM384 336V232.16C255.309 234.082 166.492 255.35 206.31 376 176.79 357.55 144 324.08 144 271.94c0-109.334 129.14-118.947 240-119.85V48l144 144-144 144zm24.74 84.493a82.658 82.658 0 0 0 20.974-9.303c7.976-4.952 18.286.826 18.286 10.214V464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h132c6.627 0 12 5.373 12 12v4.486c0 4.917-2.987 9.369-7.569 11.152-13.702 5.331-26.396 11.537-38.05 18.585a12.138 12.138 0 0 1-6.28 1.777H54a6 6 0 0 0-6 6v340a6 6 0 0 0 6 6h340a6 6 0 0 0 6-6v-25.966c0-5.37 3.579-10.059 8.74-11.541z", + ], + }, + Ot = { + prefix: "far", + iconName: "smile", + icon: [ + 496, + 512, + [], + "f118", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z", + ], + }, + Et = { + prefix: "far", + iconName: "smile-beam", + icon: [ + 496, + 512, + [], + "f5b8", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm84-143.4c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.6-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.2-8.4-25.3-7.1-33.8 3.1zM136.5 211c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.4 1.1 7.4-.5 9.3-3.7l9.5-17zM328 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4z", + ], + }, + Mt = { + prefix: "far", + iconName: "smile-wink", + icon: [ + 496, + 512, + [], + "f4da", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm117.8-146.4c-10.2-8.5-25.3-7.1-33.8 3.1-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-60c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1z", + ], + }, + At = { + prefix: "far", + iconName: "snowflake", + icon: [ + 448, + 512, + [], + "f2dc", + "M438.237 355.927l-66.574-38.54 59.448-10.327c5.846-1.375 10.609-5.183 13.458-10.13 2.48-4.307 3.506-9.478 2.524-14.651-2.11-11.115-12.686-18.039-23.621-15.467l-85.423 31.115L255.914 256l82.136-41.926 85.423 31.115c10.936 2.572 21.512-4.352 23.621-15.467 2.111-11.115-5.046-22.209-15.981-24.781l-59.448-10.327 66.573-38.54c9.54-5.523 12.615-18.092 6.867-28.074-5.748-9.982-18.14-13.596-27.68-8.074l-66.574 38.54 20.805-56.787c3.246-10.782-2.758-22.542-13.413-26.268-10.654-3.725-21.922 1.997-25.168 12.779l-15.838 89.735-72.423 41.926V136l69.585-58.621c7.689-8.21 6.997-20.856-1.548-28.245-8.545-7.391-21.705-6.723-29.394 1.486l-38.644 46.46V20c0-11.046-9.318-20-20.813-20s-20.813 8.954-20.813 20v77.08l-38.644-46.46c-7.689-8.21-20.849-8.876-29.394-1.486-8.544 7.389-9.236 20.035-1.547 28.245L203.187 136v83.853l-72.423-41.926-15.838-89.736c-3.247-10.782-14.515-16.504-25.169-12.779-10.656 3.725-16.659 15.486-13.413 26.268l20.805 56.787-66.573-38.54c-9.54-5.523-21.933-1.908-27.68 8.074s-2.673 22.551 6.867 28.074l66.574 38.54-59.449 10.328C5.953 207.515-1.202 218.609.907 229.724c2.11 11.114 12.686 18.038 23.622 15.466l85.422-31.115L192.086 256l-82.136 41.926-85.423-31.115c-10.936-2.572-21.511 4.352-23.622 15.466-2.109 11.113 5.046 22.209 15.981 24.781l59.449 10.328-66.574 38.54C.223 361.449-2.852 374.018 2.896 384s18.14 13.597 27.68 8.074l66.574-38.54-20.805 56.786c-1.735 5.764-.828 11.805 2.02 16.751 2.48 4.307 6.433 7.784 11.392 9.517 10.655 3.725 21.923-1.997 25.169-12.779l15.838-89.736 72.423-41.926V376l-69.585 58.621c-7.69 8.21-6.997 20.855 1.547 28.245 8.544 7.388 21.705 6.723 29.394-1.487l38.644-46.46V492c0 11.046 9.318 20 20.813 20s20.813-8.954 20.813-20v-77.081l38.644 46.46c4.111 4.389 9.782 6.621 15.478 6.621 4.96 0 9.939-1.694 13.916-5.134 8.545-7.39 9.237-20.035 1.548-28.245L244.813 376v-83.853l72.423 41.926 15.838 89.736c3.246 10.782 14.514 16.504 25.168 12.779 10.653-3.726 16.659-15.487 13.412-26.268l-20.805-56.787 66.574 38.54c9.54 5.523 21.933 1.908 27.68-8.074 5.749-9.981 2.675-22.55-6.866-28.072z", + ], + }, + It = { + prefix: "far", + iconName: "square", + icon: [ + 448, + 512, + [], + "f0c8", + "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z", + ], + }, + Dt = { + prefix: "far", + iconName: "star", + icon: [ + 576, + 512, + [], + "f005", + "M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z", + ], + }, + Rt = { + prefix: "far", + iconName: "star-half", + icon: [ + 576, + 512, + [], + "f089", + "M288 385.3l-124.3 65.4 23.7-138.4-100.6-98 139-20.2 62.2-126V0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6v-54.3z", + ], + }, + wt = { + prefix: "far", + iconName: "sticky-note", + icon: [ + 448, + 512, + [], + "f249", + "M448 348.106V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80v351.988c0 26.51 21.49 48 48 48h268.118a48 48 0 0 0 33.941-14.059l83.882-83.882A48 48 0 0 0 448 348.106zm-128 80v-76.118h76.118L320 428.106zM400 80v223.988H296c-13.255 0-24 10.745-24 24v104H48V80h352z", + ], + }, + Lt = { + prefix: "far", + iconName: "stop-circle", + icon: [ + 512, + 512, + [], + "f28d", + "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm296-80v160c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z", + ], + }, + Ft = { + prefix: "far", + iconName: "sun", + icon: [ + 512, + 512, + [], + "f185", + "M220.116 487.936l-20.213-49.425a3.992 3.992 0 0 0-5.808-1.886l-45.404 28.104c-29.466 18.24-66.295-8.519-58.054-42.179l12.699-51.865a3.993 3.993 0 0 0-3.59-4.941l-53.251-3.951c-34.554-2.562-48.632-45.855-22.174-68.247L65.08 259.05a3.992 3.992 0 0 0 0-6.106l-40.76-34.497c-26.45-22.384-12.39-65.682 22.174-68.246l53.251-3.951a3.993 3.993 0 0 0 3.59-4.941L90.637 89.443c-8.239-33.656 28.581-60.42 58.054-42.179l45.403 28.104a3.993 3.993 0 0 0 5.808-1.887l20.213-49.425c13.116-32.071 58.638-32.081 71.758 0l20.212 49.424a3.994 3.994 0 0 0 5.809 1.887l45.403-28.104c29.464-18.236 66.297 8.513 58.054 42.179l-12.699 51.865a3.995 3.995 0 0 0 3.59 4.941l53.251 3.951c34.553 2.563 48.633 45.854 22.175 68.246l-40.76 34.497a3.993 3.993 0 0 0 0 6.107l40.76 34.496c26.511 22.441 12.322 65.689-22.175 68.247l-53.251 3.951a3.993 3.993 0 0 0-3.589 4.942l12.698 51.864c8.241 33.658-28.583 60.421-58.054 42.18l-45.403-28.104a3.994 3.994 0 0 0-5.809 1.887l-20.212 49.424c-13.159 32.178-58.675 31.993-71.757 0zm16.814-64.568l19.064 46.616 19.064-46.615c10.308-25.2 40.778-35.066 63.892-20.759l42.822 26.507-11.976-48.919c-6.475-26.444 12.38-52.339 39.487-54.349l50.226-3.726-38.444-32.536c-20.782-17.591-20.747-49.621.001-67.18l38.442-32.536-50.225-3.727c-27.151-2.015-45.95-27.948-39.488-54.349l11.978-48.919-42.823 26.507c-23.151 14.327-53.603 4.4-63.892-20.76l-19.064-46.615-19.064 46.617c-10.305 25.198-40.778 35.066-63.891 20.76l-42.823-26.508 11.977 48.918c6.474 26.446-12.381 52.338-39.488 54.35l-50.224 3.726 38.443 32.537c20.782 17.588 20.747 49.619 0 67.178L52.48 322.123l50.226 3.726c27.151 2.014 45.95 27.947 39.487 54.349l-11.977 48.919 42.823-26.507c23.188-14.355 53.622-4.352 63.891 20.758zM256 384c-70.58 0-128-57.421-128-128 0-70.58 57.42-128 128-128 70.579 0 128 57.42 128 128 0 70.579-57.421 128-128 128zm0-208c-44.112 0-80 35.888-80 80s35.888 80 80 80 80-35.888 80-80-35.888-80-80-80z", + ], + }, + Nt = { + prefix: "far", + iconName: "surprise", + icon: [ + 496, + 512, + [], + "f5c2", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-176c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm-48-72c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z", + ], + }, + kt = { + prefix: "far", + iconName: "thumbs-down", + icon: [ + 512, + 512, + [], + "f165", + "M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z", + ], + }, + zt = { + prefix: "far", + iconName: "thumbs-up", + icon: [ + 512, + 512, + [], + "f164", + "M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z", + ], + }, + jt = { + prefix: "far", + iconName: "times-circle", + icon: [ + 512, + 512, + [], + "f057", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z", + ], + }, + Bt = { + prefix: "far", + iconName: "tired", + icon: [ + 496, + 512, + [], + "f5c8", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm129.1-303.8c-3.8-4.4-10.3-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.8 1.6 15.3-2.5 3.8-4.5 3.9-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zM220 208c0-4.2-2.2-8.1-5.8-10.3l-80-48c-5-3-11.5-1.9-15.3 2.5-3.8 4.5-3.9 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.5 4.1 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3zm28 64c-45.4 0-100.9 38.3-107.8 93.3-1.5 11.8 6.9 21.6 15.5 17.9C178.4 373.5 212 368 248 368s69.6 5.5 92.3 15.2c8.5 3.7 17-6 15.5-17.9-6.9-55-62.4-93.3-107.8-93.3z", + ], + }, + Vt = { + prefix: "far", + iconName: "trash-alt", + icon: [ + 448, + 512, + [], + "f2ed", + "M192 188v216c0 6.627-5.373 12-12 12h-24c-6.627 0-12-5.373-12-12V188c0-6.627 5.373-12 12-12h24c6.627 0 12 5.373 12 12zm100-12h-24c-6.627 0-12 5.373-12 12v216c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12V188c0-6.627-5.373-12-12-12zm132-96c13.255 0 24 10.745 24 24v12c0 6.627-5.373 12-12 12h-20v336c0 26.51-21.49 48-48 48H80c-26.51 0-48-21.49-48-48V128H12c-6.627 0-12-5.373-12-12v-12c0-13.255 10.745-24 24-24h74.411l34.018-56.696A48 48 0 0 1 173.589 0h100.823a48 48 0 0 1 41.16 23.304L349.589 80H424zm-269.611 0h139.223L276.16 50.913A6 6 0 0 0 271.015 48h-94.028a6 6 0 0 0-5.145 2.913L154.389 80zM368 128H80v330a6 6 0 0 0 6 6h276a6 6 0 0 0 6-6V128z", + ], + }, + Gt = { + prefix: "far", + iconName: "user", + icon: [ + 448, + 512, + [], + "f007", + "M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z", + ], + }, + Ut = { + prefix: "far", + iconName: "user-circle", + icon: [ + 496, + 512, + [], + "f2bd", + "M248 104c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96zm0 144c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-240C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-49.7 0-95.1-18.3-130.1-48.4 14.9-23 40.4-38.6 69.6-39.5 20.8 6.4 40.6 9.6 60.5 9.6s39.7-3.1 60.5-9.6c29.2 1 54.7 16.5 69.6 39.5-35 30.1-80.4 48.4-130.1 48.4zm162.7-84.1c-24.4-31.4-62.1-51.9-105.1-51.9-10.2 0-26 9.6-57.6 9.6-31.5 0-47.4-9.6-57.6-9.6-42.9 0-80.6 20.5-105.1 51.9C61.9 339.2 48 299.2 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 43.2-13.9 83.2-37.3 115.9z", + ], + }, + Ht = { + prefix: "far", + iconName: "window-close", + icon: [ + 512, + 512, + [], + "f410", + "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z", + ], + }, + Wt = { + prefix: "far", + iconName: "window-maximize", + icon: [512, 512, [], "f2d0", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V192h416v234z"], + }, + Xt = { prefix: "far", iconName: "window-minimize", icon: [512, 512, [], "f2d1", "M480 480H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h448c17.7 0 32 14.3 32 32s-14.3 32-32 32z"] }, + Yt = { + prefix: "far", + iconName: "window-restore", + icon: [ + 512, + 512, + [], + "f2d2", + "M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z", + ], + }, + Kt = { + faAddressBook: r, + faAddressCard: o, + faAngry: a, + faArrowAltCircleDown: s, + faArrowAltCircleLeft: c, + faArrowAltCircleRight: l, + faArrowAltCircleUp: u, + faBell: h, + faBellSlash: d, + faBookmark: p, + faBuilding: f, + faCalendar: m, + faCalendarAlt: g, + faCalendarCheck: b, + faCalendarMinus: _, + faCalendarPlus: v, + faCalendarTimes: y, + faCaretSquareDown: C, + faCaretSquareLeft: P, + faCaretSquareRight: x, + faCaretSquareUp: T, + faChartBar: S, + faCheckCircle: O, + faCheckSquare: E, + faCircle: M, + faClipboard: A, + faClock: I, + faClone: D, + faClosedCaptioning: R, + faComment: w, + faCommentAlt: L, + faCommentDots: F, + faComments: N, + faCompass: k, + faCopy: z, + faCopyright: j, + faCreditCard: B, + faDizzy: V, + faDotCircle: G, + faEdit: U, + faEnvelope: H, + faEnvelopeOpen: W, + faEye: X, + faEyeSlash: Y, + faFile: K, + faFileAlt: Z, + faFileArchive: q, + faFileAudio: Q, + faFileCode: J, + faFileExcel: $, + faFileImage: ee, + faFilePdf: te, + faFilePowerpoint: ne, + faFileVideo: ie, + faFileWord: re, + faFlag: oe, + faFlushed: ae, + faFolder: se, + faFolderOpen: ce, + faFontAwesomeLogoFull: le, + faFrown: ue, + faFrownOpen: he, + faFutbol: de, + faGem: pe, + faGrimace: fe, + faGrin: me, + faGrinAlt: ge, + faGrinBeam: be, + faGrinBeamSweat: _e, + faGrinHearts: ve, + faGrinSquint: ye, + faGrinSquintTears: Ce, + faGrinStars: Pe, + faGrinTears: xe, + faGrinTongue: Te, + faGrinTongueSquint: Se, + faGrinTongueWink: Oe, + faGrinWink: Ee, + faHandLizard: Me, + faHandPaper: Ae, + faHandPeace: Ie, + faHandPointDown: De, + faHandPointLeft: Re, + faHandPointRight: we, + faHandPointUp: Le, + faHandPointer: Fe, + faHandRock: Ne, + faHandScissors: ke, + faHandSpock: ze, + faHandshake: je, + faHdd: Be, + faHeart: Ve, + faHospital: Ge, + faHourglass: Ue, + faIdBadge: He, + faIdCard: We, + faImage: Xe, + faImages: Ye, + faKeyboard: Ke, + faKiss: Ze, + faKissBeam: qe, + faKissWinkHeart: Qe, + faLaugh: Je, + faLaughBeam: $e, + faLaughSquint: et, + faLaughWink: tt, + faLemon: nt, + faLifeRing: it, + faLightbulb: rt, + faListAlt: ot, + faMap: at, + faMeh: st, + faMehBlank: ct, + faMehRollingEyes: lt, + faMinusSquare: ut, + faMoneyBillAlt: ht, + faMoon: dt, + faNewspaper: pt, + faObjectGroup: ft, + faObjectUngroup: mt, + faPaperPlane: gt, + faPauseCircle: bt, + faPlayCircle: _t, + faPlusSquare: vt, + faQuestionCircle: yt, + faRegistered: Ct, + faSadCry: Pt, + faSadTear: xt, + faSave: Tt, + faShareSquare: St, + faSmile: Ot, + faSmileBeam: Et, + faSmileWink: Mt, + faSnowflake: At, + faSquare: It, + faStar: Dt, + faStarHalf: Rt, + faStickyNote: wt, + faStopCircle: Lt, + faSun: Ft, + faSurprise: Nt, + faThumbsDown: kt, + faThumbsUp: zt, + faTimesCircle: jt, + faTired: Bt, + faTrashAlt: Vt, + faUser: Gt, + faUserCircle: Ut, + faWindowClose: Ht, + faWindowMaximize: Wt, + faWindowMinimize: Xt, + faWindowRestore: Yt, + }; + }, + "../../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js": function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "fas", function () { + return Zf; + }), + n.d(t, "prefix", function () { + return i; + }), + n.d(t, "faAd", function () { + return r; + }), + n.d(t, "faAddressBook", function () { + return o; + }), + n.d(t, "faAddressCard", function () { + return a; + }), + n.d(t, "faAdjust", function () { + return s; + }), + n.d(t, "faAirFreshener", function () { + return c; + }), + n.d(t, "faAlignCenter", function () { + return l; + }), + n.d(t, "faAlignJustify", function () { + return u; + }), + n.d(t, "faAlignLeft", function () { + return h; + }), + n.d(t, "faAlignRight", function () { + return d; + }), + n.d(t, "faAllergies", function () { + return p; + }), + n.d(t, "faAmbulance", function () { + return f; + }), + n.d(t, "faAmericanSignLanguageInterpreting", function () { + return m; + }), + n.d(t, "faAnchor", function () { + return g; + }), + n.d(t, "faAngleDoubleDown", function () { + return b; + }), + n.d(t, "faAngleDoubleLeft", function () { + return _; + }), + n.d(t, "faAngleDoubleRight", function () { + return v; + }), + n.d(t, "faAngleDoubleUp", function () { + return y; + }), + n.d(t, "faAngleDown", function () { + return C; + }), + n.d(t, "faAngleLeft", function () { + return P; + }), + n.d(t, "faAngleRight", function () { + return x; + }), + n.d(t, "faAngleUp", function () { + return T; + }), + n.d(t, "faAngry", function () { + return S; + }), + n.d(t, "faAnkh", function () { + return O; + }), + n.d(t, "faAppleAlt", function () { + return E; + }), + n.d(t, "faArchive", function () { + return M; + }), + n.d(t, "faArchway", function () { + return A; + }), + n.d(t, "faArrowAltCircleDown", function () { + return I; + }), + n.d(t, "faArrowAltCircleLeft", function () { + return D; + }), + n.d(t, "faArrowAltCircleRight", function () { + return R; + }), + n.d(t, "faArrowAltCircleUp", function () { + return w; + }), + n.d(t, "faArrowCircleDown", function () { + return L; + }), + n.d(t, "faArrowCircleLeft", function () { + return F; + }), + n.d(t, "faArrowCircleRight", function () { + return N; + }), + n.d(t, "faArrowCircleUp", function () { + return k; + }), + n.d(t, "faArrowDown", function () { + return z; + }), + n.d(t, "faArrowLeft", function () { + return j; + }), + n.d(t, "faArrowRight", function () { + return B; + }), + n.d(t, "faArrowUp", function () { + return V; + }), + n.d(t, "faArrowsAlt", function () { + return G; + }), + n.d(t, "faArrowsAltH", function () { + return U; + }), + n.d(t, "faArrowsAltV", function () { + return H; + }), + n.d(t, "faAssistiveListeningSystems", function () { + return W; + }), + n.d(t, "faAsterisk", function () { + return X; + }), + n.d(t, "faAt", function () { + return Y; + }), + n.d(t, "faAtlas", function () { + return K; + }), + n.d(t, "faAtom", function () { + return Z; + }), + n.d(t, "faAudioDescription", function () { + return q; + }), + n.d(t, "faAward", function () { + return Q; + }), + n.d(t, "faBackspace", function () { + return J; + }), + n.d(t, "faBackward", function () { + return $; + }), + n.d(t, "faBalanceScale", function () { + return ee; + }), + n.d(t, "faBan", function () { + return te; + }), + n.d(t, "faBandAid", function () { + return ne; + }), + n.d(t, "faBarcode", function () { + return ie; + }), + n.d(t, "faBars", function () { + return re; + }), + n.d(t, "faBaseballBall", function () { + return oe; + }), + n.d(t, "faBasketballBall", function () { + return ae; + }), + n.d(t, "faBath", function () { + return se; + }), + n.d(t, "faBatteryEmpty", function () { + return ce; + }), + n.d(t, "faBatteryFull", function () { + return le; + }), + n.d(t, "faBatteryHalf", function () { + return ue; + }), + n.d(t, "faBatteryQuarter", function () { + return he; + }), + n.d(t, "faBatteryThreeQuarters", function () { + return de; + }), + n.d(t, "faBed", function () { + return pe; + }), + n.d(t, "faBeer", function () { + return fe; + }), + n.d(t, "faBell", function () { + return me; + }), + n.d(t, "faBellSlash", function () { + return ge; + }), + n.d(t, "faBezierCurve", function () { + return be; + }), + n.d(t, "faBible", function () { + return _e; + }), + n.d(t, "faBicycle", function () { + return ve; + }), + n.d(t, "faBinoculars", function () { + return ye; + }), + n.d(t, "faBirthdayCake", function () { + return Ce; + }), + n.d(t, "faBlender", function () { + return Pe; + }), + n.d(t, "faBlenderPhone", function () { + return xe; + }), + n.d(t, "faBlind", function () { + return Te; + }), + n.d(t, "faBold", function () { + return Se; + }), + n.d(t, "faBolt", function () { + return Oe; + }), + n.d(t, "faBomb", function () { + return Ee; + }), + n.d(t, "faBone", function () { + return Me; + }), + n.d(t, "faBong", function () { + return Ae; + }), + n.d(t, "faBook", function () { + return Ie; + }), + n.d(t, "faBookDead", function () { + return De; + }), + n.d(t, "faBookOpen", function () { + return Re; + }), + n.d(t, "faBookReader", function () { + return we; + }), + n.d(t, "faBookmark", function () { + return Le; + }), + n.d(t, "faBowlingBall", function () { + return Fe; + }), + n.d(t, "faBox", function () { + return Ne; + }), + n.d(t, "faBoxOpen", function () { + return ke; + }), + n.d(t, "faBoxes", function () { + return ze; + }), + n.d(t, "faBraille", function () { + return je; + }), + n.d(t, "faBrain", function () { + return Be; + }), + n.d(t, "faBriefcase", function () { + return Ve; + }), + n.d(t, "faBriefcaseMedical", function () { + return Ge; + }), + n.d(t, "faBroadcastTower", function () { + return Ue; + }), + n.d(t, "faBroom", function () { + return He; + }), + n.d(t, "faBrush", function () { + return We; + }), + n.d(t, "faBug", function () { + return Xe; + }), + n.d(t, "faBuilding", function () { + return Ye; + }), + n.d(t, "faBullhorn", function () { + return Ke; + }), + n.d(t, "faBullseye", function () { + return Ze; + }), + n.d(t, "faBurn", function () { + return qe; + }), + n.d(t, "faBus", function () { + return Qe; + }), + n.d(t, "faBusAlt", function () { + return Je; + }), + n.d(t, "faBusinessTime", function () { + return $e; + }), + n.d(t, "faCalculator", function () { + return et; + }), + n.d(t, "faCalendar", function () { + return tt; + }), + n.d(t, "faCalendarAlt", function () { + return nt; + }), + n.d(t, "faCalendarCheck", function () { + return it; + }), + n.d(t, "faCalendarMinus", function () { + return rt; + }), + n.d(t, "faCalendarPlus", function () { + return ot; + }), + n.d(t, "faCalendarTimes", function () { + return at; + }), + n.d(t, "faCamera", function () { + return st; + }), + n.d(t, "faCameraRetro", function () { + return ct; + }), + n.d(t, "faCampground", function () { + return lt; + }), + n.d(t, "faCannabis", function () { + return ut; + }), + n.d(t, "faCapsules", function () { + return ht; + }), + n.d(t, "faCar", function () { + return dt; + }), + n.d(t, "faCarAlt", function () { + return pt; + }), + n.d(t, "faCarBattery", function () { + return ft; + }), + n.d(t, "faCarCrash", function () { + return mt; + }), + n.d(t, "faCarSide", function () { + return gt; + }), + n.d(t, "faCaretDown", function () { + return bt; + }), + n.d(t, "faCaretLeft", function () { + return _t; + }), + n.d(t, "faCaretRight", function () { + return vt; + }), + n.d(t, "faCaretSquareDown", function () { + return yt; + }), + n.d(t, "faCaretSquareLeft", function () { + return Ct; + }), + n.d(t, "faCaretSquareRight", function () { + return Pt; + }), + n.d(t, "faCaretSquareUp", function () { + return xt; + }), + n.d(t, "faCaretUp", function () { + return Tt; + }), + n.d(t, "faCartArrowDown", function () { + return St; + }), + n.d(t, "faCartPlus", function () { + return Ot; + }), + n.d(t, "faCat", function () { + return Et; + }), + n.d(t, "faCertificate", function () { + return Mt; + }), + n.d(t, "faChair", function () { + return At; + }), + n.d(t, "faChalkboard", function () { + return It; + }), + n.d(t, "faChalkboardTeacher", function () { + return Dt; + }), + n.d(t, "faChargingStation", function () { + return Rt; + }), + n.d(t, "faChartArea", function () { + return wt; + }), + n.d(t, "faChartBar", function () { + return Lt; + }), + n.d(t, "faChartLine", function () { + return Ft; + }), + n.d(t, "faChartPie", function () { + return Nt; + }), + n.d(t, "faCheck", function () { + return kt; + }), + n.d(t, "faCheckCircle", function () { + return zt; + }), + n.d(t, "faCheckDouble", function () { + return jt; + }), + n.d(t, "faCheckSquare", function () { + return Bt; + }), + n.d(t, "faChess", function () { + return Vt; + }), + n.d(t, "faChessBishop", function () { + return Gt; + }), + n.d(t, "faChessBoard", function () { + return Ut; + }), + n.d(t, "faChessKing", function () { + return Ht; + }), + n.d(t, "faChessKnight", function () { + return Wt; + }), + n.d(t, "faChessPawn", function () { + return Xt; + }), + n.d(t, "faChessQueen", function () { + return Yt; + }), + n.d(t, "faChessRook", function () { + return Kt; + }), + n.d(t, "faChevronCircleDown", function () { + return Zt; + }), + n.d(t, "faChevronCircleLeft", function () { + return qt; + }), + n.d(t, "faChevronCircleRight", function () { + return Qt; + }), + n.d(t, "faChevronCircleUp", function () { + return Jt; + }), + n.d(t, "faChevronDown", function () { + return $t; + }), + n.d(t, "faChevronLeft", function () { + return en; + }), + n.d(t, "faChevronRight", function () { + return tn; + }), + n.d(t, "faChevronUp", function () { + return nn; + }), + n.d(t, "faChild", function () { + return rn; + }), + n.d(t, "faChurch", function () { + return on; + }), + n.d(t, "faCircle", function () { + return an; + }), + n.d(t, "faCircleNotch", function () { + return sn; + }), + n.d(t, "faCity", function () { + return cn; + }), + n.d(t, "faClipboard", function () { + return ln; + }), + n.d(t, "faClipboardCheck", function () { + return un; + }), + n.d(t, "faClipboardList", function () { + return hn; + }), + n.d(t, "faClock", function () { + return dn; + }), + n.d(t, "faClone", function () { + return pn; + }), + n.d(t, "faClosedCaptioning", function () { + return fn; + }), + n.d(t, "faCloud", function () { + return mn; + }), + n.d(t, "faCloudDownloadAlt", function () { + return gn; + }), + n.d(t, "faCloudMoon", function () { + return bn; + }), + n.d(t, "faCloudSun", function () { + return _n; + }), + n.d(t, "faCloudUploadAlt", function () { + return vn; + }), + n.d(t, "faCocktail", function () { + return yn; + }), + n.d(t, "faCode", function () { + return Cn; + }), + n.d(t, "faCodeBranch", function () { + return Pn; + }), + n.d(t, "faCoffee", function () { + return xn; + }), + n.d(t, "faCog", function () { + return Tn; + }), + n.d(t, "faCogs", function () { + return Sn; + }), + n.d(t, "faCoins", function () { + return On; + }), + n.d(t, "faColumns", function () { + return En; + }), + n.d(t, "faComment", function () { + return Mn; + }), + n.d(t, "faCommentAlt", function () { + return An; + }), + n.d(t, "faCommentDollar", function () { + return In; + }), + n.d(t, "faCommentDots", function () { + return Dn; + }), + n.d(t, "faCommentSlash", function () { + return Rn; + }), + n.d(t, "faComments", function () { + return wn; + }), + n.d(t, "faCommentsDollar", function () { + return Ln; + }), + n.d(t, "faCompactDisc", function () { + return Fn; + }), + n.d(t, "faCompass", function () { + return Nn; + }), + n.d(t, "faCompress", function () { + return kn; + }), + n.d(t, "faConciergeBell", function () { + return zn; + }), + n.d(t, "faCookie", function () { + return jn; + }), + n.d(t, "faCookieBite", function () { + return Bn; + }), + n.d(t, "faCopy", function () { + return Vn; + }), + n.d(t, "faCopyright", function () { + return Gn; + }), + n.d(t, "faCouch", function () { + return Un; + }), + n.d(t, "faCreditCard", function () { + return Hn; + }), + n.d(t, "faCrop", function () { + return Wn; + }), + n.d(t, "faCropAlt", function () { + return Xn; + }), + n.d(t, "faCross", function () { + return Yn; + }), + n.d(t, "faCrosshairs", function () { + return Kn; + }), + n.d(t, "faCrow", function () { + return Zn; + }), + n.d(t, "faCrown", function () { + return qn; + }), + n.d(t, "faCube", function () { + return Qn; + }), + n.d(t, "faCubes", function () { + return Jn; + }), + n.d(t, "faCut", function () { + return $n; + }), + n.d(t, "faDatabase", function () { + return ei; + }), + n.d(t, "faDeaf", function () { + return ti; + }), + n.d(t, "faDesktop", function () { + return ni; + }), + n.d(t, "faDharmachakra", function () { + return ii; + }), + n.d(t, "faDiagnoses", function () { + return ri; + }), + n.d(t, "faDice", function () { + return oi; + }), + n.d(t, "faDiceD20", function () { + return ai; + }), + n.d(t, "faDiceD6", function () { + return si; + }), + n.d(t, "faDiceFive", function () { + return ci; + }), + n.d(t, "faDiceFour", function () { + return li; + }), + n.d(t, "faDiceOne", function () { + return ui; + }), + n.d(t, "faDiceSix", function () { + return hi; + }), + n.d(t, "faDiceThree", function () { + return di; + }), + n.d(t, "faDiceTwo", function () { + return pi; + }), + n.d(t, "faDigitalTachograph", function () { + return fi; + }), + n.d(t, "faDirections", function () { + return mi; + }), + n.d(t, "faDivide", function () { + return gi; + }), + n.d(t, "faDizzy", function () { + return bi; + }), + n.d(t, "faDna", function () { + return _i; + }), + n.d(t, "faDog", function () { + return vi; + }), + n.d(t, "faDollarSign", function () { + return yi; + }), + n.d(t, "faDolly", function () { + return Ci; + }), + n.d(t, "faDollyFlatbed", function () { + return Pi; + }), + n.d(t, "faDonate", function () { + return xi; + }), + n.d(t, "faDoorClosed", function () { + return Ti; + }), + n.d(t, "faDoorOpen", function () { + return Si; + }), + n.d(t, "faDotCircle", function () { + return Oi; + }), + n.d(t, "faDove", function () { + return Ei; + }), + n.d(t, "faDownload", function () { + return Mi; + }), + n.d(t, "faDraftingCompass", function () { + return Ai; + }), + n.d(t, "faDragon", function () { + return Ii; + }), + n.d(t, "faDrawPolygon", function () { + return Di; + }), + n.d(t, "faDrum", function () { + return Ri; + }), + n.d(t, "faDrumSteelpan", function () { + return wi; + }), + n.d(t, "faDrumstickBite", function () { + return Li; + }), + n.d(t, "faDumbbell", function () { + return Fi; + }), + n.d(t, "faDungeon", function () { + return Ni; + }), + n.d(t, "faEdit", function () { + return ki; + }), + n.d(t, "faEject", function () { + return zi; + }), + n.d(t, "faEllipsisH", function () { + return ji; + }), + n.d(t, "faEllipsisV", function () { + return Bi; + }), + n.d(t, "faEnvelope", function () { + return Vi; + }), + n.d(t, "faEnvelopeOpen", function () { + return Gi; + }), + n.d(t, "faEnvelopeOpenText", function () { + return Ui; + }), + n.d(t, "faEnvelopeSquare", function () { + return Hi; + }), + n.d(t, "faEquals", function () { + return Wi; + }), + n.d(t, "faEraser", function () { + return Xi; + }), + n.d(t, "faEuroSign", function () { + return Yi; + }), + n.d(t, "faExchangeAlt", function () { + return Ki; + }), + n.d(t, "faExclamation", function () { + return Zi; + }), + n.d(t, "faExclamationCircle", function () { + return qi; + }), + n.d(t, "faExclamationTriangle", function () { + return Qi; + }), + n.d(t, "faExpand", function () { + return Ji; + }), + n.d(t, "faExpandArrowsAlt", function () { + return $i; + }), + n.d(t, "faExternalLinkAlt", function () { + return er; + }), + n.d(t, "faExternalLinkSquareAlt", function () { + return tr; + }), + n.d(t, "faEye", function () { + return nr; + }), + n.d(t, "faEyeDropper", function () { + return ir; + }), + n.d(t, "faEyeSlash", function () { + return rr; + }), + n.d(t, "faFastBackward", function () { + return or; + }), + n.d(t, "faFastForward", function () { + return ar; + }), + n.d(t, "faFax", function () { + return sr; + }), + n.d(t, "faFeather", function () { + return cr; + }), + n.d(t, "faFeatherAlt", function () { + return lr; + }), + n.d(t, "faFemale", function () { + return ur; + }), + n.d(t, "faFighterJet", function () { + return hr; + }), + n.d(t, "faFile", function () { + return dr; + }), + n.d(t, "faFileAlt", function () { + return pr; + }), + n.d(t, "faFileArchive", function () { + return fr; + }), + n.d(t, "faFileAudio", function () { + return mr; + }), + n.d(t, "faFileCode", function () { + return gr; + }), + n.d(t, "faFileContract", function () { + return br; + }), + n.d(t, "faFileCsv", function () { + return _r; + }), + n.d(t, "faFileDownload", function () { + return vr; + }), + n.d(t, "faFileExcel", function () { + return yr; + }), + n.d(t, "faFileExport", function () { + return Cr; + }), + n.d(t, "faFileImage", function () { + return Pr; + }), + n.d(t, "faFileImport", function () { + return xr; + }), + n.d(t, "faFileInvoice", function () { + return Tr; + }), + n.d(t, "faFileInvoiceDollar", function () { + return Sr; + }), + n.d(t, "faFileMedical", function () { + return Or; + }), + n.d(t, "faFileMedicalAlt", function () { + return Er; + }), + n.d(t, "faFilePdf", function () { + return Mr; + }), + n.d(t, "faFilePowerpoint", function () { + return Ar; + }), + n.d(t, "faFilePrescription", function () { + return Ir; + }), + n.d(t, "faFileSignature", function () { + return Dr; + }), + n.d(t, "faFileUpload", function () { + return Rr; + }), + n.d(t, "faFileVideo", function () { + return wr; + }), + n.d(t, "faFileWord", function () { + return Lr; + }), + n.d(t, "faFill", function () { + return Fr; + }), + n.d(t, "faFillDrip", function () { + return Nr; + }), + n.d(t, "faFilm", function () { + return kr; + }), + n.d(t, "faFilter", function () { + return zr; + }), + n.d(t, "faFingerprint", function () { + return jr; + }), + n.d(t, "faFire", function () { + return Br; + }), + n.d(t, "faFireExtinguisher", function () { + return Vr; + }), + n.d(t, "faFirstAid", function () { + return Gr; + }), + n.d(t, "faFish", function () { + return Ur; + }), + n.d(t, "faFistRaised", function () { + return Hr; + }), + n.d(t, "faFlag", function () { + return Wr; + }), + n.d(t, "faFlagCheckered", function () { + return Xr; + }), + n.d(t, "faFlask", function () { + return Yr; + }), + n.d(t, "faFlushed", function () { + return Kr; + }), + n.d(t, "faFolder", function () { + return Zr; + }), + n.d(t, "faFolderMinus", function () { + return qr; + }), + n.d(t, "faFolderOpen", function () { + return Qr; + }), + n.d(t, "faFolderPlus", function () { + return Jr; + }), + n.d(t, "faFont", function () { + return $r; + }), + n.d(t, "faFontAwesomeLogoFull", function () { + return eo; + }), + n.d(t, "faFootballBall", function () { + return to; + }), + n.d(t, "faForward", function () { + return no; + }), + n.d(t, "faFrog", function () { + return io; + }), + n.d(t, "faFrown", function () { + return ro; + }), + n.d(t, "faFrownOpen", function () { + return oo; + }), + n.d(t, "faFunnelDollar", function () { + return ao; + }), + n.d(t, "faFutbol", function () { + return so; + }), + n.d(t, "faGamepad", function () { + return co; + }), + n.d(t, "faGasPump", function () { + return lo; + }), + n.d(t, "faGavel", function () { + return uo; + }), + n.d(t, "faGem", function () { + return ho; + }), + n.d(t, "faGenderless", function () { + return po; + }), + n.d(t, "faGhost", function () { + return fo; + }), + n.d(t, "faGift", function () { + return mo; + }), + n.d(t, "faGlassMartini", function () { + return go; + }), + n.d(t, "faGlassMartiniAlt", function () { + return bo; + }), + n.d(t, "faGlasses", function () { + return _o; + }), + n.d(t, "faGlobe", function () { + return vo; + }), + n.d(t, "faGlobeAfrica", function () { + return yo; + }), + n.d(t, "faGlobeAmericas", function () { + return Co; + }), + n.d(t, "faGlobeAsia", function () { + return Po; + }), + n.d(t, "faGolfBall", function () { + return xo; + }), + n.d(t, "faGopuram", function () { + return To; + }), + n.d(t, "faGraduationCap", function () { + return So; + }), + n.d(t, "faGreaterThan", function () { + return Oo; + }), + n.d(t, "faGreaterThanEqual", function () { + return Eo; + }), + n.d(t, "faGrimace", function () { + return Mo; + }), + n.d(t, "faGrin", function () { + return Ao; + }), + n.d(t, "faGrinAlt", function () { + return Io; + }), + n.d(t, "faGrinBeam", function () { + return Do; + }), + n.d(t, "faGrinBeamSweat", function () { + return Ro; + }), + n.d(t, "faGrinHearts", function () { + return wo; + }), + n.d(t, "faGrinSquint", function () { + return Lo; + }), + n.d(t, "faGrinSquintTears", function () { + return Fo; + }), + n.d(t, "faGrinStars", function () { + return No; + }), + n.d(t, "faGrinTears", function () { + return ko; + }), + n.d(t, "faGrinTongue", function () { + return zo; + }), + n.d(t, "faGrinTongueSquint", function () { + return jo; + }), + n.d(t, "faGrinTongueWink", function () { + return Bo; + }), + n.d(t, "faGrinWink", function () { + return Vo; + }), + n.d(t, "faGripHorizontal", function () { + return Go; + }), + n.d(t, "faGripVertical", function () { + return Uo; + }), + n.d(t, "faHSquare", function () { + return Ho; + }), + n.d(t, "faHammer", function () { + return Wo; + }), + n.d(t, "faHamsa", function () { + return Xo; + }), + n.d(t, "faHandHolding", function () { + return Yo; + }), + n.d(t, "faHandHoldingHeart", function () { + return Ko; + }), + n.d(t, "faHandHoldingUsd", function () { + return Zo; + }), + n.d(t, "faHandLizard", function () { + return qo; + }), + n.d(t, "faHandPaper", function () { + return Qo; + }), + n.d(t, "faHandPeace", function () { + return Jo; + }), + n.d(t, "faHandPointDown", function () { + return $o; + }), + n.d(t, "faHandPointLeft", function () { + return ea; + }), + n.d(t, "faHandPointRight", function () { + return ta; + }), + n.d(t, "faHandPointUp", function () { + return na; + }), + n.d(t, "faHandPointer", function () { + return ia; + }), + n.d(t, "faHandRock", function () { + return ra; + }), + n.d(t, "faHandScissors", function () { + return oa; + }), + n.d(t, "faHandSpock", function () { + return aa; + }), + n.d(t, "faHands", function () { + return sa; + }), + n.d(t, "faHandsHelping", function () { + return ca; + }), + n.d(t, "faHandshake", function () { + return la; + }), + n.d(t, "faHanukiah", function () { + return ua; + }), + n.d(t, "faHashtag", function () { + return ha; + }), + n.d(t, "faHatWizard", function () { + return da; + }), + n.d(t, "faHaykal", function () { + return pa; + }), + n.d(t, "faHdd", function () { + return fa; + }), + n.d(t, "faHeading", function () { + return ma; + }), + n.d(t, "faHeadphones", function () { + return ga; + }), + n.d(t, "faHeadphonesAlt", function () { + return ba; + }), + n.d(t, "faHeadset", function () { + return _a; + }), + n.d(t, "faHeart", function () { + return va; + }), + n.d(t, "faHeartbeat", function () { + return ya; + }), + n.d(t, "faHelicopter", function () { + return Ca; + }), + n.d(t, "faHighlighter", function () { + return Pa; + }), + n.d(t, "faHiking", function () { + return xa; + }), + n.d(t, "faHippo", function () { + return Ta; + }), + n.d(t, "faHistory", function () { + return Sa; + }), + n.d(t, "faHockeyPuck", function () { + return Oa; + }), + n.d(t, "faHome", function () { + return Ea; + }), + n.d(t, "faHorse", function () { + return Ma; + }), + n.d(t, "faHospital", function () { + return Aa; + }), + n.d(t, "faHospitalAlt", function () { + return Ia; + }), + n.d(t, "faHospitalSymbol", function () { + return Da; + }), + n.d(t, "faHotTub", function () { + return Ra; + }), + n.d(t, "faHotel", function () { + return wa; + }), + n.d(t, "faHourglass", function () { + return La; + }), + n.d(t, "faHourglassEnd", function () { + return Fa; + }), + n.d(t, "faHourglassHalf", function () { + return Na; + }), + n.d(t, "faHourglassStart", function () { + return ka; + }), + n.d(t, "faHouseDamage", function () { + return za; + }), + n.d(t, "faHryvnia", function () { + return ja; + }), + n.d(t, "faICursor", function () { + return Ba; + }), + n.d(t, "faIdBadge", function () { + return Va; + }), + n.d(t, "faIdCard", function () { + return Ga; + }), + n.d(t, "faIdCardAlt", function () { + return Ua; + }), + n.d(t, "faImage", function () { + return Ha; + }), + n.d(t, "faImages", function () { + return Wa; + }), + n.d(t, "faInbox", function () { + return Xa; + }), + n.d(t, "faIndent", function () { + return Ya; + }), + n.d(t, "faIndustry", function () { + return Ka; + }), + n.d(t, "faInfinity", function () { + return Za; + }), + n.d(t, "faInfo", function () { + return qa; + }), + n.d(t, "faInfoCircle", function () { + return Qa; + }), + n.d(t, "faItalic", function () { + return Ja; + }), + n.d(t, "faJedi", function () { + return $a; + }), + n.d(t, "faJoint", function () { + return es; + }), + n.d(t, "faJournalWhills", function () { + return ts; + }), + n.d(t, "faKaaba", function () { + return ns; + }), + n.d(t, "faKey", function () { + return is; + }), + n.d(t, "faKeyboard", function () { + return rs; + }), + n.d(t, "faKhanda", function () { + return os; + }), + n.d(t, "faKiss", function () { + return as; + }), + n.d(t, "faKissBeam", function () { + return ss; + }), + n.d(t, "faKissWinkHeart", function () { + return cs; + }), + n.d(t, "faKiwiBird", function () { + return ls; + }), + n.d(t, "faLandmark", function () { + return us; + }), + n.d(t, "faLanguage", function () { + return hs; + }), + n.d(t, "faLaptop", function () { + return ds; + }), + n.d(t, "faLaptopCode", function () { + return ps; + }), + n.d(t, "faLaugh", function () { + return fs; + }), + n.d(t, "faLaughBeam", function () { + return ms; + }), + n.d(t, "faLaughSquint", function () { + return gs; + }), + n.d(t, "faLaughWink", function () { + return bs; + }), + n.d(t, "faLayerGroup", function () { + return _s; + }), + n.d(t, "faLeaf", function () { + return vs; + }), + n.d(t, "faLemon", function () { + return ys; + }), + n.d(t, "faLessThan", function () { + return Cs; + }), + n.d(t, "faLessThanEqual", function () { + return Ps; + }), + n.d(t, "faLevelDownAlt", function () { + return xs; + }), + n.d(t, "faLevelUpAlt", function () { + return Ts; + }), + n.d(t, "faLifeRing", function () { + return Ss; + }), + n.d(t, "faLightbulb", function () { + return Os; + }), + n.d(t, "faLink", function () { + return Es; + }), + n.d(t, "faLiraSign", function () { + return Ms; + }), + n.d(t, "faList", function () { + return As; + }), + n.d(t, "faListAlt", function () { + return Is; + }), + n.d(t, "faListOl", function () { + return Ds; + }), + n.d(t, "faListUl", function () { + return Rs; + }), + n.d(t, "faLocationArrow", function () { + return ws; + }), + n.d(t, "faLock", function () { + return Ls; + }), + n.d(t, "faLockOpen", function () { + return Fs; + }), + n.d(t, "faLongArrowAltDown", function () { + return Ns; + }), + n.d(t, "faLongArrowAltLeft", function () { + return ks; + }), + n.d(t, "faLongArrowAltRight", function () { + return zs; + }), + n.d(t, "faLongArrowAltUp", function () { + return js; + }), + n.d(t, "faLowVision", function () { + return Bs; + }), + n.d(t, "faLuggageCart", function () { + return Vs; + }), + n.d(t, "faMagic", function () { + return Gs; + }), + n.d(t, "faMagnet", function () { + return Us; + }), + n.d(t, "faMailBulk", function () { + return Hs; + }), + n.d(t, "faMale", function () { + return Ws; + }), + n.d(t, "faMap", function () { + return Xs; + }), + n.d(t, "faMapMarked", function () { + return Ys; + }), + n.d(t, "faMapMarkedAlt", function () { + return Ks; + }), + n.d(t, "faMapMarker", function () { + return Zs; + }), + n.d(t, "faMapMarkerAlt", function () { + return qs; + }), + n.d(t, "faMapPin", function () { + return Qs; + }), + n.d(t, "faMapSigns", function () { + return Js; + }), + n.d(t, "faMarker", function () { + return $s; + }), + n.d(t, "faMars", function () { + return ec; + }), + n.d(t, "faMarsDouble", function () { + return tc; + }), + n.d(t, "faMarsStroke", function () { + return nc; + }), + n.d(t, "faMarsStrokeH", function () { + return ic; + }), + n.d(t, "faMarsStrokeV", function () { + return rc; + }), + n.d(t, "faMask", function () { + return oc; + }), + n.d(t, "faMedal", function () { + return ac; + }), + n.d(t, "faMedkit", function () { + return sc; + }), + n.d(t, "faMeh", function () { + return cc; + }), + n.d(t, "faMehBlank", function () { + return lc; + }), + n.d(t, "faMehRollingEyes", function () { + return uc; + }), + n.d(t, "faMemory", function () { + return hc; + }), + n.d(t, "faMenorah", function () { + return dc; + }), + n.d(t, "faMercury", function () { + return pc; + }), + n.d(t, "faMicrochip", function () { + return fc; + }), + n.d(t, "faMicrophone", function () { + return mc; + }), + n.d(t, "faMicrophoneAlt", function () { + return gc; + }), + n.d(t, "faMicrophoneAltSlash", function () { + return bc; + }), + n.d(t, "faMicrophoneSlash", function () { + return _c; + }), + n.d(t, "faMicroscope", function () { + return vc; + }), + n.d(t, "faMinus", function () { + return yc; + }), + n.d(t, "faMinusCircle", function () { + return Cc; + }), + n.d(t, "faMinusSquare", function () { + return Pc; + }), + n.d(t, "faMobile", function () { + return xc; + }), + n.d(t, "faMobileAlt", function () { + return Tc; + }), + n.d(t, "faMoneyBill", function () { + return Sc; + }), + n.d(t, "faMoneyBillAlt", function () { + return Oc; + }), + n.d(t, "faMoneyBillWave", function () { + return Ec; + }), + n.d(t, "faMoneyBillWaveAlt", function () { + return Mc; + }), + n.d(t, "faMoneyCheck", function () { + return Ac; + }), + n.d(t, "faMoneyCheckAlt", function () { + return Ic; + }), + n.d(t, "faMonument", function () { + return Dc; + }), + n.d(t, "faMoon", function () { + return Rc; + }), + n.d(t, "faMortarPestle", function () { + return wc; + }), + n.d(t, "faMosque", function () { + return Lc; + }), + n.d(t, "faMotorcycle", function () { + return Fc; + }), + n.d(t, "faMountain", function () { + return Nc; + }), + n.d(t, "faMousePointer", function () { + return kc; + }), + n.d(t, "faMusic", function () { + return zc; + }), + n.d(t, "faNetworkWired", function () { + return jc; + }), + n.d(t, "faNeuter", function () { + return Bc; + }), + n.d(t, "faNewspaper", function () { + return Vc; + }), + n.d(t, "faNotEqual", function () { + return Gc; + }), + n.d(t, "faNotesMedical", function () { + return Uc; + }), + n.d(t, "faObjectGroup", function () { + return Hc; + }), + n.d(t, "faObjectUngroup", function () { + return Wc; + }), + n.d(t, "faOilCan", function () { + return Xc; + }), + n.d(t, "faOm", function () { + return Yc; + }), + n.d(t, "faOtter", function () { + return Kc; + }), + n.d(t, "faOutdent", function () { + return Zc; + }), + n.d(t, "faPaintBrush", function () { + return qc; + }), + n.d(t, "faPaintRoller", function () { + return Qc; + }), + n.d(t, "faPalette", function () { + return Jc; + }), + n.d(t, "faPallet", function () { + return $c; + }), + n.d(t, "faPaperPlane", function () { + return el; + }), + n.d(t, "faPaperclip", function () { + return tl; + }), + n.d(t, "faParachuteBox", function () { + return nl; + }), + n.d(t, "faParagraph", function () { + return il; + }), + n.d(t, "faParking", function () { + return rl; + }), + n.d(t, "faPassport", function () { + return ol; + }), + n.d(t, "faPastafarianism", function () { + return al; + }), + n.d(t, "faPaste", function () { + return sl; + }), + n.d(t, "faPause", function () { + return cl; + }), + n.d(t, "faPauseCircle", function () { + return ll; + }), + n.d(t, "faPaw", function () { + return ul; + }), + n.d(t, "faPeace", function () { + return hl; + }), + n.d(t, "faPen", function () { + return dl; + }), + n.d(t, "faPenAlt", function () { + return pl; + }), + n.d(t, "faPenFancy", function () { + return fl; + }), + n.d(t, "faPenNib", function () { + return ml; + }), + n.d(t, "faPenSquare", function () { + return gl; + }), + n.d(t, "faPencilAlt", function () { + return bl; + }), + n.d(t, "faPencilRuler", function () { + return _l; + }), + n.d(t, "faPeopleCarry", function () { + return vl; + }), + n.d(t, "faPercent", function () { + return yl; + }), + n.d(t, "faPercentage", function () { + return Cl; + }), + n.d(t, "faPhone", function () { + return Pl; + }), + n.d(t, "faPhoneSlash", function () { + return xl; + }), + n.d(t, "faPhoneSquare", function () { + return Tl; + }), + n.d(t, "faPhoneVolume", function () { + return Sl; + }), + n.d(t, "faPiggyBank", function () { + return Ol; + }), + n.d(t, "faPills", function () { + return El; + }), + n.d(t, "faPlaceOfWorship", function () { + return Ml; + }), + n.d(t, "faPlane", function () { + return Al; + }), + n.d(t, "faPlaneArrival", function () { + return Il; + }), + n.d(t, "faPlaneDeparture", function () { + return Dl; + }), + n.d(t, "faPlay", function () { + return Rl; + }), + n.d(t, "faPlayCircle", function () { + return wl; + }), + n.d(t, "faPlug", function () { + return Ll; + }), + n.d(t, "faPlus", function () { + return Fl; + }), + n.d(t, "faPlusCircle", function () { + return Nl; + }), + n.d(t, "faPlusSquare", function () { + return kl; + }), + n.d(t, "faPodcast", function () { + return zl; + }), + n.d(t, "faPoll", function () { + return jl; + }), + n.d(t, "faPollH", function () { + return Bl; + }), + n.d(t, "faPoo", function () { + return Vl; + }), + n.d(t, "faPoop", function () { + return Gl; + }), + n.d(t, "faPortrait", function () { + return Ul; + }), + n.d(t, "faPoundSign", function () { + return Hl; + }), + n.d(t, "faPowerOff", function () { + return Wl; + }), + n.d(t, "faPray", function () { + return Xl; + }), + n.d(t, "faPrayingHands", function () { + return Yl; + }), + n.d(t, "faPrescription", function () { + return Kl; + }), + n.d(t, "faPrescriptionBottle", function () { + return Zl; + }), + n.d(t, "faPrescriptionBottleAlt", function () { + return ql; + }), + n.d(t, "faPrint", function () { + return Ql; + }), + n.d(t, "faProcedures", function () { + return Jl; + }), + n.d(t, "faProjectDiagram", function () { + return $l; + }), + n.d(t, "faPuzzlePiece", function () { + return eu; + }), + n.d(t, "faQrcode", function () { + return tu; + }), + n.d(t, "faQuestion", function () { + return nu; + }), + n.d(t, "faQuestionCircle", function () { + return iu; + }), + n.d(t, "faQuidditch", function () { + return ru; + }), + n.d(t, "faQuoteLeft", function () { + return ou; + }), + n.d(t, "faQuoteRight", function () { + return au; + }), + n.d(t, "faQuran", function () { + return su; + }), + n.d(t, "faRandom", function () { + return cu; + }), + n.d(t, "faReceipt", function () { + return lu; + }), + n.d(t, "faRecycle", function () { + return uu; + }), + n.d(t, "faRedo", function () { + return hu; + }), + n.d(t, "faRedoAlt", function () { + return du; + }), + n.d(t, "faRegistered", function () { + return pu; + }), + n.d(t, "faReply", function () { + return fu; + }), + n.d(t, "faReplyAll", function () { + return mu; + }), + n.d(t, "faRetweet", function () { + return gu; + }), + n.d(t, "faRibbon", function () { + return bu; + }), + n.d(t, "faRing", function () { + return _u; + }), + n.d(t, "faRoad", function () { + return vu; + }), + n.d(t, "faRobot", function () { + return yu; + }), + n.d(t, "faRocket", function () { + return Cu; + }), + n.d(t, "faRoute", function () { + return Pu; + }), + n.d(t, "faRss", function () { + return xu; + }), + n.d(t, "faRssSquare", function () { + return Tu; + }), + n.d(t, "faRubleSign", function () { + return Su; + }), + n.d(t, "faRuler", function () { + return Ou; + }), + n.d(t, "faRulerCombined", function () { + return Eu; + }), + n.d(t, "faRulerHorizontal", function () { + return Mu; + }), + n.d(t, "faRulerVertical", function () { + return Au; + }), + n.d(t, "faRunning", function () { + return Iu; + }), + n.d(t, "faRupeeSign", function () { + return Du; + }), + n.d(t, "faSadCry", function () { + return Ru; + }), + n.d(t, "faSadTear", function () { + return wu; + }), + n.d(t, "faSave", function () { + return Lu; + }), + n.d(t, "faSchool", function () { + return Fu; + }), + n.d(t, "faScrewdriver", function () { + return Nu; + }), + n.d(t, "faScroll", function () { + return ku; + }), + n.d(t, "faSearch", function () { + return zu; + }), + n.d(t, "faSearchDollar", function () { + return ju; + }), + n.d(t, "faSearchLocation", function () { + return Bu; + }), + n.d(t, "faSearchMinus", function () { + return Vu; + }), + n.d(t, "faSearchPlus", function () { + return Gu; + }), + n.d(t, "faSeedling", function () { + return Uu; + }), + n.d(t, "faServer", function () { + return Hu; + }), + n.d(t, "faShapes", function () { + return Wu; + }), + n.d(t, "faShare", function () { + return Xu; + }), + n.d(t, "faShareAlt", function () { + return Yu; + }), + n.d(t, "faShareAltSquare", function () { + return Ku; + }), + n.d(t, "faShareSquare", function () { + return Zu; + }), + n.d(t, "faShekelSign", function () { + return qu; + }), + n.d(t, "faShieldAlt", function () { + return Qu; + }), + n.d(t, "faShip", function () { + return Ju; + }), + n.d(t, "faShippingFast", function () { + return $u; + }), + n.d(t, "faShoePrints", function () { + return eh; + }), + n.d(t, "faShoppingBag", function () { + return th; + }), + n.d(t, "faShoppingBasket", function () { + return nh; + }), + n.d(t, "faShoppingCart", function () { + return ih; + }), + n.d(t, "faShower", function () { + return rh; + }), + n.d(t, "faShuttleVan", function () { + return oh; + }), + n.d(t, "faSign", function () { + return ah; + }), + n.d(t, "faSignInAlt", function () { + return sh; + }), + n.d(t, "faSignLanguage", function () { + return ch; + }), + n.d(t, "faSignOutAlt", function () { + return lh; + }), + n.d(t, "faSignal", function () { + return uh; + }), + n.d(t, "faSignature", function () { + return hh; + }), + n.d(t, "faSitemap", function () { + return dh; + }), + n.d(t, "faSkull", function () { + return ph; + }), + n.d(t, "faSkullCrossbones", function () { + return fh; + }), + n.d(t, "faSlash", function () { + return mh; + }), + n.d(t, "faSlidersH", function () { + return gh; + }), + n.d(t, "faSmile", function () { + return bh; + }), + n.d(t, "faSmileBeam", function () { + return _h; + }), + n.d(t, "faSmileWink", function () { + return vh; + }), + n.d(t, "faSmoking", function () { + return yh; + }), + n.d(t, "faSmokingBan", function () { + return Ch; + }), + n.d(t, "faSnowflake", function () { + return Ph; + }), + n.d(t, "faSocks", function () { + return xh; + }), + n.d(t, "faSolarPanel", function () { + return Th; + }), + n.d(t, "faSort", function () { + return Sh; + }), + n.d(t, "faSortAlphaDown", function () { + return Oh; + }), + n.d(t, "faSortAlphaUp", function () { + return Eh; + }), + n.d(t, "faSortAmountDown", function () { + return Mh; + }), + n.d(t, "faSortAmountUp", function () { + return Ah; + }), + n.d(t, "faSortDown", function () { + return Ih; + }), + n.d(t, "faSortNumericDown", function () { + return Dh; + }), + n.d(t, "faSortNumericUp", function () { + return Rh; + }), + n.d(t, "faSortUp", function () { + return wh; + }), + n.d(t, "faSpa", function () { + return Lh; + }), + n.d(t, "faSpaceShuttle", function () { + return Fh; + }), + n.d(t, "faSpider", function () { + return Nh; + }), + n.d(t, "faSpinner", function () { + return kh; + }), + n.d(t, "faSplotch", function () { + return zh; + }), + n.d(t, "faSprayCan", function () { + return jh; + }), + n.d(t, "faSquare", function () { + return Bh; + }), + n.d(t, "faSquareFull", function () { + return Vh; + }), + n.d(t, "faSquareRootAlt", function () { + return Gh; + }), + n.d(t, "faStamp", function () { + return Uh; + }), + n.d(t, "faStar", function () { + return Hh; + }), + n.d(t, "faStarAndCrescent", function () { + return Wh; + }), + n.d(t, "faStarHalf", function () { + return Xh; + }), + n.d(t, "faStarHalfAlt", function () { + return Yh; + }), + n.d(t, "faStarOfDavid", function () { + return Kh; + }), + n.d(t, "faStarOfLife", function () { + return Zh; + }), + n.d(t, "faStepBackward", function () { + return qh; + }), + n.d(t, "faStepForward", function () { + return Qh; + }), + n.d(t, "faStethoscope", function () { + return Jh; + }), + n.d(t, "faStickyNote", function () { + return $h; + }), + n.d(t, "faStop", function () { + return ed; + }), + n.d(t, "faStopCircle", function () { + return td; + }), + n.d(t, "faStopwatch", function () { + return nd; + }), + n.d(t, "faStore", function () { + return id; + }), + n.d(t, "faStoreAlt", function () { + return rd; + }), + n.d(t, "faStream", function () { + return od; + }), + n.d(t, "faStreetView", function () { + return ad; + }), + n.d(t, "faStrikethrough", function () { + return sd; + }), + n.d(t, "faStroopwafel", function () { + return cd; + }), + n.d(t, "faSubscript", function () { + return ld; + }), + n.d(t, "faSubway", function () { + return ud; + }), + n.d(t, "faSuitcase", function () { + return hd; + }), + n.d(t, "faSuitcaseRolling", function () { + return dd; + }), + n.d(t, "faSun", function () { + return pd; + }), + n.d(t, "faSuperscript", function () { + return fd; + }), + n.d(t, "faSurprise", function () { + return md; + }), + n.d(t, "faSwatchbook", function () { + return gd; + }), + n.d(t, "faSwimmer", function () { + return bd; + }), + n.d(t, "faSwimmingPool", function () { + return _d; + }), + n.d(t, "faSynagogue", function () { + return vd; + }), + n.d(t, "faSync", function () { + return yd; + }), + n.d(t, "faSyncAlt", function () { + return Cd; + }), + n.d(t, "faSyringe", function () { + return Pd; + }), + n.d(t, "faTable", function () { + return xd; + }), + n.d(t, "faTableTennis", function () { + return Td; + }), + n.d(t, "faTablet", function () { + return Sd; + }), + n.d(t, "faTabletAlt", function () { + return Od; + }), + n.d(t, "faTablets", function () { + return Ed; + }), + n.d(t, "faTachometerAlt", function () { + return Md; + }), + n.d(t, "faTag", function () { + return Ad; + }), + n.d(t, "faTags", function () { + return Id; + }), + n.d(t, "faTape", function () { + return Dd; + }), + n.d(t, "faTasks", function () { + return Rd; + }), + n.d(t, "faTaxi", function () { + return wd; + }), + n.d(t, "faTeeth", function () { + return Ld; + }), + n.d(t, "faTeethOpen", function () { + return Fd; + }), + n.d(t, "faTerminal", function () { + return Nd; + }), + n.d(t, "faTextHeight", function () { + return kd; + }), + n.d(t, "faTextWidth", function () { + return zd; + }), + n.d(t, "faTh", function () { + return jd; + }), + n.d(t, "faThLarge", function () { + return Bd; + }), + n.d(t, "faThList", function () { + return Vd; + }), + n.d(t, "faTheaterMasks", function () { + return Gd; + }), + n.d(t, "faThermometer", function () { + return Ud; + }), + n.d(t, "faThermometerEmpty", function () { + return Hd; + }), + n.d(t, "faThermometerFull", function () { + return Wd; + }), + n.d(t, "faThermometerHalf", function () { + return Xd; + }), + n.d(t, "faThermometerQuarter", function () { + return Yd; + }), + n.d(t, "faThermometerThreeQuarters", function () { + return Kd; + }), + n.d(t, "faThumbsDown", function () { + return Zd; + }), + n.d(t, "faThumbsUp", function () { + return qd; + }), + n.d(t, "faThumbtack", function () { + return Qd; + }), + n.d(t, "faTicketAlt", function () { + return Jd; + }), + n.d(t, "faTimes", function () { + return $d; + }), + n.d(t, "faTimesCircle", function () { + return ep; + }), + n.d(t, "faTint", function () { + return tp; + }), + n.d(t, "faTintSlash", function () { + return np; + }), + n.d(t, "faTired", function () { + return ip; + }), + n.d(t, "faToggleOff", function () { + return rp; + }), + n.d(t, "faToggleOn", function () { + return op; + }), + n.d(t, "faToiletPaper", function () { + return ap; + }), + n.d(t, "faToolbox", function () { + return sp; + }), + n.d(t, "faTooth", function () { + return cp; + }), + n.d(t, "faTorah", function () { + return lp; + }), + n.d(t, "faToriiGate", function () { + return up; + }), + n.d(t, "faTractor", function () { + return hp; + }), + n.d(t, "faTrademark", function () { + return dp; + }), + n.d(t, "faTrafficLight", function () { + return pp; + }), + n.d(t, "faTrain", function () { + return fp; + }), + n.d(t, "faTransgender", function () { + return mp; + }), + n.d(t, "faTransgenderAlt", function () { + return gp; + }), + n.d(t, "faTrash", function () { + return bp; + }), + n.d(t, "faTrashAlt", function () { + return _p; + }), + n.d(t, "faTree", function () { + return vp; + }), + n.d(t, "faTrophy", function () { + return yp; + }), + n.d(t, "faTruck", function () { + return Cp; + }), + n.d(t, "faTruckLoading", function () { + return Pp; + }), + n.d(t, "faTruckMonster", function () { + return xp; + }), + n.d(t, "faTruckMoving", function () { + return Tp; + }), + n.d(t, "faTruckPickup", function () { + return Sp; + }), + n.d(t, "faTshirt", function () { + return Op; + }), + n.d(t, "faTty", function () { + return Ep; + }), + n.d(t, "faTv", function () { + return Mp; + }), + n.d(t, "faUmbrella", function () { + return Ap; + }), + n.d(t, "faUmbrellaBeach", function () { + return Ip; + }), + n.d(t, "faUnderline", function () { + return Dp; + }), + n.d(t, "faUndo", function () { + return Rp; + }), + n.d(t, "faUndoAlt", function () { + return wp; + }), + n.d(t, "faUniversalAccess", function () { + return Lp; + }), + n.d(t, "faUniversity", function () { + return Fp; + }), + n.d(t, "faUnlink", function () { + return Np; + }), + n.d(t, "faUnlock", function () { + return kp; + }), + n.d(t, "faUnlockAlt", function () { + return zp; + }), + n.d(t, "faUpload", function () { + return jp; + }), + n.d(t, "faUser", function () { + return Bp; + }), + n.d(t, "faUserAlt", function () { + return Vp; + }), + n.d(t, "faUserAltSlash", function () { + return Gp; + }), + n.d(t, "faUserAstronaut", function () { + return Up; + }), + n.d(t, "faUserCheck", function () { + return Hp; + }), + n.d(t, "faUserCircle", function () { + return Wp; + }), + n.d(t, "faUserClock", function () { + return Xp; + }); + n.d(t, "faUserCog", function () { + return Yp; + }), + n.d(t, "faUserEdit", function () { + return Kp; + }), + n.d(t, "faUserFriends", function () { + return Zp; + }), + n.d(t, "faUserGraduate", function () { + return qp; + }), + n.d(t, "faUserInjured", function () { + return Qp; + }), + n.d(t, "faUserLock", function () { + return Jp; + }), + n.d(t, "faUserMd", function () { + return $p; + }), + n.d(t, "faUserMinus", function () { + return ef; + }), + n.d(t, "faUserNinja", function () { + return tf; + }), + n.d(t, "faUserPlus", function () { + return nf; + }), + n.d(t, "faUserSecret", function () { + return rf; + }), + n.d(t, "faUserShield", function () { + return of; + }), + n.d(t, "faUserSlash", function () { + return af; + }), + n.d(t, "faUserTag", function () { + return sf; + }), + n.d(t, "faUserTie", function () { + return cf; + }), + n.d(t, "faUserTimes", function () { + return lf; + }), + n.d(t, "faUsers", function () { + return uf; + }), + n.d(t, "faUsersCog", function () { + return hf; + }), + n.d(t, "faUtensilSpoon", function () { + return df; + }), + n.d(t, "faUtensils", function () { + return pf; + }), + n.d(t, "faVectorSquare", function () { + return ff; + }), + n.d(t, "faVenus", function () { + return mf; + }), + n.d(t, "faVenusDouble", function () { + return gf; + }), + n.d(t, "faVenusMars", function () { + return bf; + }), + n.d(t, "faVial", function () { + return _f; + }), + n.d(t, "faVials", function () { + return vf; + }), + n.d(t, "faVideo", function () { + return yf; + }), + n.d(t, "faVideoSlash", function () { + return Cf; + }), + n.d(t, "faVihara", function () { + return Pf; + }), + n.d(t, "faVolleyballBall", function () { + return xf; + }), + n.d(t, "faVolumeDown", function () { + return Tf; + }), + n.d(t, "faVolumeMute", function () { + return Sf; + }), + n.d(t, "faVolumeOff", function () { + return Of; + }), + n.d(t, "faVolumeUp", function () { + return Ef; + }), + n.d(t, "faVrCardboard", function () { + return Mf; + }), + n.d(t, "faWalking", function () { + return Af; + }), + n.d(t, "faWallet", function () { + return If; + }), + n.d(t, "faWarehouse", function () { + return Df; + }), + n.d(t, "faWeight", function () { + return Rf; + }), + n.d(t, "faWeightHanging", function () { + return wf; + }), + n.d(t, "faWheelchair", function () { + return Lf; + }), + n.d(t, "faWifi", function () { + return Ff; + }), + n.d(t, "faWind", function () { + return Nf; + }), + n.d(t, "faWindowClose", function () { + return kf; + }), + n.d(t, "faWindowMaximize", function () { + return zf; + }), + n.d(t, "faWindowMinimize", function () { + return jf; + }), + n.d(t, "faWindowRestore", function () { + return Bf; + }), + n.d(t, "faWineBottle", function () { + return Vf; + }), + n.d(t, "faWineGlass", function () { + return Gf; + }), + n.d(t, "faWineGlassAlt", function () { + return Uf; + }), + n.d(t, "faWonSign", function () { + return Hf; + }), + n.d(t, "faWrench", function () { + return Wf; + }), + n.d(t, "faXRay", function () { + return Xf; + }), + n.d(t, "faYenSign", function () { + return Yf; + }), + n.d(t, "faYinYang", function () { + return Kf; + }); + var i = "fas", + r = { + prefix: "fas", + iconName: "ad", + icon: [ + 512, + 512, + [], + "f641", + "M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z", + ], + }, + o = { + prefix: "fas", + iconName: "address-book", + icon: [ + 448, + 512, + [], + "f2b9", + "M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-228-32c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H118.4C106 384 96 375.4 96 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z", + ], + }, + a = { + prefix: "fas", + iconName: "address-card", + icon: [ + 576, + 512, + [], + "f2bb", + "M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-352 96c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H86.4C74 384 64 375.4 64 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2zM512 312c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z", + ], + }, + s = { + prefix: "fas", + iconName: "adjust", + icon: [512, 512, [], "f042", "M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"], + }, + c = { + prefix: "fas", + iconName: "air-freshener", + icon: [ + 384, + 512, + [], + "f5d0", + "M378.94 321.41L284.7 224h49.22c15.3 0 23.66-16.6 13.86-27.53L234.45 69.96c3.43-6.61 5.55-14 5.55-21.96 0-26.51-21.49-48-48-48s-48 21.49-48 48c0 7.96 2.12 15.35 5.55 21.96L36.22 196.47C26.42 207.4 34.78 224 50.08 224H99.3L5.06 321.41C-6.69 333.56 3.34 352 21.7 352H160v32H48c-8.84 0-16 7.16-16 16v96c0 8.84 7.16 16 16 16h288c8.84 0 16-7.16 16-16v-96c0-8.84-7.16-16-16-16H224v-32h138.3c18.36 0 28.39-18.44 16.64-30.59zM192 31.98c8.85 0 16.02 7.17 16.02 16.02 0 8.84-7.17 16.02-16.02 16.02S175.98 56.84 175.98 48c0-8.85 7.17-16.02 16.02-16.02zM304 432v32H80v-32h224z", + ], + }, + l = { + prefix: "fas", + iconName: "align-center", + icon: [ + 448, + 512, + [], + "f037", + "M352 44v40c0 8.837-7.163 16-16 16H112c-8.837 0-16-7.163-16-16V44c0-8.837 7.163-16 16-16h224c8.837 0 16 7.163 16 16zM16 228h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm320-200H112c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16z", + ], + }, + u = { + prefix: "fas", + iconName: "align-justify", + icon: [ + 448, + 512, + [], + "f039", + "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm16 144h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0-128h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z", + ], + }, + h = { + prefix: "fas", + iconName: "align-left", + icon: [ + 448, + 512, + [], + "f036", + "M288 44v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V44c0-8.837 7.163-16 16-16h256c8.837 0 16 7.163 16 16zM0 172v40c0 8.837 7.163 16 16 16h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16zm16 312h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm256-200H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16z", + ], + }, + d = { + prefix: "fas", + iconName: "align-right", + icon: [ + 448, + 512, + [], + "f038", + "M160 84V44c0-8.837 7.163-16 16-16h256c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H176c-8.837 0-16-7.163-16-16zM16 228h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 256h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm160-128h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z", + ], + }, + p = { + prefix: "fas", + iconName: "allergies", + icon: [ + 448, + 512, + [], + "f461", + "M416 112c-17.6 0-32 14.4-32 32v72c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V64c0-17.6-14.4-32-32-32s-32 14.4-32 32v152c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V32c0-17.6-14.4-32-32-32s-32 14.4-32 32v184c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8V64c0-17.6-14.4-32-32-32S96 46.4 96 64v241l-23.6-32.5c-13-17.9-38-21.8-55.9-8.8s-21.8 38-8.8 55.9l125.6 172.7c9 12.4 23.5 19.8 38.8 19.8h197.6c22.3 0 41.6-15.3 46.7-37l26.5-112.7c3.2-13.7 4.9-28.3 5.1-42.3V144c0-17.6-14.4-32-32-32zM176 416c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-96c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm64 128c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm0-96c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm64 32c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm32 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm32-128c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z", + ], + }, + f = { + prefix: "fas", + iconName: "ambulance", + icon: [ + 640, + 512, + [], + "f0f9", + "M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm144-248c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48zm176 248c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z", + ], + }, + m = { + prefix: "fas", + iconName: "american-sign-language-interpreting", + icon: [ + 640, + 512, + [], + "f2a3", + "M290.547 189.039c-20.295-10.149-44.147-11.199-64.739-3.89 42.606 0 71.208 20.475 85.578 50.576 8.576 17.899-5.148 38.071-23.617 38.071 18.429 0 32.211 20.136 23.617 38.071-14.725 30.846-46.123 50.854-80.298 50.854-.557 0-94.471-8.615-94.471-8.615l-66.406 33.347c-9.384 4.693-19.815.379-23.895-7.781L1.86 290.747c-4.167-8.615-1.111-18.897 6.946-23.621l58.072-33.069L108 159.861c6.39-57.245 34.731-109.767 79.743-146.726 11.391-9.448 28.341-7.781 37.51 3.613 9.446 11.394 7.78 28.067-3.612 37.516-12.503 10.559-23.618 22.509-32.509 35.57 21.672-14.729 46.679-24.732 74.186-28.067 14.725-1.945 28.063 8.336 29.73 23.065 1.945 14.728-8.336 28.067-23.062 29.734-16.116 1.945-31.12 7.503-44.178 15.284 26.114-5.713 58.712-3.138 88.079 11.115 13.336 6.669 18.893 22.509 12.224 35.848-6.389 13.06-22.504 18.617-35.564 12.226zm-27.229 69.472c-6.112-12.505-18.338-20.286-32.231-20.286a35.46 35.46 0 0 0-35.565 35.57c0 21.428 17.808 35.57 35.565 35.57 13.893 0 26.119-7.781 32.231-20.286 4.446-9.449 13.614-15.006 23.339-15.284-9.725-.277-18.893-5.835-23.339-15.284zm374.821-37.237c4.168 8.615 1.111 18.897-6.946 23.621l-58.071 33.069L532 352.16c-6.39 57.245-34.731 109.767-79.743 146.726-10.932 9.112-27.799 8.144-37.51-3.613-9.446-11.394-7.78-28.067 3.613-37.516 12.503-10.559 23.617-22.509 32.508-35.57-21.672 14.729-46.679 24.732-74.186 28.067-10.021 2.506-27.552-5.643-29.73-23.065-1.945-14.728 8.336-28.067 23.062-29.734 16.116-1.946 31.12-7.503 44.178-15.284-26.114 5.713-58.712 3.138-88.079-11.115-13.336-6.669-18.893-22.509-12.224-35.848 6.389-13.061 22.505-18.619 35.565-12.227 20.295 10.149 44.147 11.199 64.739 3.89-42.606 0-71.208-20.475-85.578-50.576-8.576-17.899 5.148-38.071 23.617-38.071-18.429 0-32.211-20.136-23.617-38.071 14.033-29.396 44.039-50.887 81.966-50.854l92.803 8.615 66.406-33.347c9.408-4.704 19.828-.354 23.894 7.781l44.455 88.926zm-229.227-18.618c-13.893 0-26.119 7.781-32.231 20.286-4.446 9.449-13.614 15.006-23.339 15.284 9.725.278 18.893 5.836 23.339 15.284 6.112 12.505 18.338 20.286 32.231 20.286a35.46 35.46 0 0 0 35.565-35.57c0-21.429-17.808-35.57-35.565-35.57z", + ], + }, + g = { + prefix: "fas", + iconName: "anchor", + icon: [ + 576, + 512, + [], + "f13d", + "M12.971 352h32.394C67.172 454.735 181.944 512 288 512c106.229 0 220.853-57.38 242.635-160h32.394c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0l-67.029 67.029c-7.56 7.56-2.206 20.485 8.485 20.485h35.146c-20.29 54.317-84.963 86.588-144.117 94.015V256h52c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-52v-5.47c37.281-13.178 63.995-48.725 64-90.518C384.005 43.772 341.605.738 289.37.01 235.723-.739 192 42.525 192 96c0 41.798 26.716 77.35 64 90.53V192h-52c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v190.015c-58.936-7.399-123.82-39.679-144.117-94.015h35.146c10.691 0 16.045-12.926 8.485-20.485l-67.029-67.029c-4.686-4.686-12.284-4.686-16.971 0L4.485 331.515C-3.074 339.074 2.28 352 12.971 352zM288 64c17.645 0 32 14.355 32 32s-14.355 32-32 32-32-14.355-32-32 14.355-32 32-32z", + ], + }, + b = { + prefix: "fas", + iconName: "angle-double-down", + icon: [ + 320, + 512, + [], + "f103", + "M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z", + ], + }, + _ = { + prefix: "fas", + iconName: "angle-double-left", + icon: [ + 448, + 512, + [], + "f100", + "M223.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L319.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L393.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34zm-192 34l136 136c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9L127.9 256l96.4-96.4c9.4-9.4 9.4-24.6 0-33.9L201.7 103c-9.4-9.4-24.6-9.4-33.9 0l-136 136c-9.5 9.4-9.5 24.6-.1 34z", + ], + }, + v = { + prefix: "fas", + iconName: "angle-double-right", + icon: [ + 448, + 512, + [], + "f101", + "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z", + ], + }, + y = { + prefix: "fas", + iconName: "angle-double-up", + icon: [ + 320, + 512, + [], + "f102", + "M177 255.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 351.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 425.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1zm-34-192L7 199.7c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l96.4-96.4 96.4 96.4c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9l-136-136c-9.2-9.4-24.4-9.4-33.8 0z", + ], + }, + C = { + prefix: "fas", + iconName: "angle-down", + icon: [ + 320, + 512, + [], + "f107", + "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z", + ], + }, + P = { + prefix: "fas", + iconName: "angle-left", + icon: [ + 256, + 512, + [], + "f104", + "M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z", + ], + }, + x = { + prefix: "fas", + iconName: "angle-right", + icon: [ + 256, + 512, + [], + "f105", + "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z", + ], + }, + T = { + prefix: "fas", + iconName: "angle-up", + icon: [ + 320, + 512, + [], + "f106", + "M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z", + ], + }, + S = { + prefix: "fas", + iconName: "angry", + icon: [ + 496, + 512, + [], + "f556", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 240c0-9.3 4.1-17.5 10.5-23.4l-31-9.3c-8.5-2.5-13.3-11.5-10.7-19.9 2.5-8.5 11.4-13.2 19.9-10.7l80 24c8.5 2.5 13.3 11.5 10.7 19.9-2.1 6.9-8.4 11.4-15.3 11.4-.5 0-1.1-.2-1.7-.2.7 2.7 1.7 5.3 1.7 8.2 0 17.7-14.3 32-32 32S136 257.7 136 240zm168 154.2c-27.8-33.4-84.2-33.4-112.1 0-13.5 16.3-38.2-4.2-24.6-20.5 20-24 49.4-37.8 80.6-37.8s60.6 13.8 80.6 37.8c13.8 16.5-11.1 36.6-24.5 20.5zm76.6-186.9l-31 9.3c6.3 5.8 10.5 14.1 10.5 23.4 0 17.7-14.3 32-32 32s-32-14.3-32-32c0-2.9.9-5.6 1.7-8.2-.6.1-1.1.2-1.7.2-6.9 0-13.2-4.5-15.3-11.4-2.5-8.5 2.3-17.4 10.7-19.9l80-24c8.4-2.5 17.4 2.3 19.9 10.7 2.5 8.5-2.3 17.4-10.8 19.9z", + ], + }, + O = { + prefix: "fas", + iconName: "ankh", + icon: [ + 320, + 512, + [], + "f644", + "M296 256h-44.62C272.46 222.01 288 181.65 288 144 288 55.63 230.69 0 160 0S32 55.63 32 144c0 37.65 15.54 78.01 36.62 112H24c-13.25 0-24 10.74-24 24v32c0 13.25 10.75 24 24 24h96v152c0 13.25 10.75 24 24 24h32c13.25 0 24-10.75 24-24V336h96c13.25 0 24-10.75 24-24v-32c0-13.26-10.75-24-24-24zM160 80c29.61 0 48 24.52 48 64 0 34.66-27.14 78.14-48 100.87-20.86-22.72-48-66.21-48-100.87 0-39.48 18.39-64 48-64z", + ], + }, + E = { + prefix: "fas", + iconName: "apple-alt", + icon: [ + 448, + 512, + [], + "f5d1", + "M350.85 129c25.97 4.67 47.27 18.67 63.92 42 14.65 20.67 24.64 46.67 29.96 78 4.67 28.67 4.32 57.33-1 86-7.99 47.33-23.97 87-47.94 119-28.64 38.67-64.59 58-107.87 58-10.66 0-22.3-3.33-34.96-10-8.66-5.33-18.31-8-28.97-8s-20.3 2.67-28.97 8c-12.66 6.67-24.3 10-34.96 10-43.28 0-79.23-19.33-107.87-58-23.97-32-39.95-71.67-47.94-119-5.32-28.67-5.67-57.33-1-86 5.32-31.33 15.31-57.33 29.96-78 16.65-23.33 37.95-37.33 63.92-42 15.98-2.67 37.95-.33 65.92 7 23.97 6.67 44.28 14.67 60.93 24 16.65-9.33 36.96-17.33 60.93-24 27.98-7.33 49.96-9.67 65.94-7zm-54.94-41c-9.32 8.67-21.65 15-36.96 19-10.66 3.33-22.3 5-34.96 5l-14.98-1c-1.33-9.33-1.33-20 0-32 2.67-24 10.32-42.33 22.97-55 9.32-8.67 21.65-15 36.96-19 10.66-3.33 22.3-5 34.96-5l14.98 1 1 15c0 12.67-1.67 24.33-4.99 35-3.99 15.33-10.31 27.67-18.98 37z", + ], + }, + M = { + prefix: "fas", + iconName: "archive", + icon: [ + 512, + 512, + [], + "f187", + "M32 448c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V160H32v288zm160-212c0-6.6 5.4-12 12-12h104c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-8zM480 32H32C14.3 32 0 46.3 0 64v48c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16V64c0-17.7-14.3-32-32-32z", + ], + }, + A = { + prefix: "fas", + iconName: "archway", + icon: [ + 576, + 512, + [], + "f557", + "M560 448h-16V96H32v352H16.02c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16H176c8.84 0 16-7.16 16-16V320c0-53.02 42.98-96 96-96s96 42.98 96 96l.02 160v16c0 8.84 7.16 16 16 16H560c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm0-448H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h544c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z", + ], + }, + I = { + prefix: "fas", + iconName: "arrow-alt-circle-down", + icon: [ + 512, + 512, + [], + "f358", + "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM212 140v116h-70.9c-10.7 0-16.1 13-8.5 20.5l114.9 114.3c4.7 4.7 12.2 4.7 16.9 0l114.9-114.3c7.6-7.6 2.2-20.5-8.5-20.5H300V140c0-6.6-5.4-12-12-12h-64c-6.6 0-12 5.4-12 12z", + ], + }, + D = { + prefix: "fas", + iconName: "arrow-alt-circle-left", + icon: [ + 512, + 512, + [], + "f359", + "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm116-292H256v-70.9c0-10.7-13-16.1-20.5-8.5L121.2 247.5c-4.7 4.7-4.7 12.2 0 16.9l114.3 114.9c7.6 7.6 20.5 2.2 20.5-8.5V300h116c6.6 0 12-5.4 12-12v-64c0-6.6-5.4-12-12-12z", + ], + }, + R = { + prefix: "fas", + iconName: "arrow-alt-circle-right", + icon: [ + 512, + 512, + [], + "f35a", + "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z", + ], + }, + w = { + prefix: "fas", + iconName: "arrow-alt-circle-up", + icon: [ + 512, + 512, + [], + "f35b", + "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm292 116V256h70.9c10.7 0 16.1-13 8.5-20.5L264.5 121.2c-4.7-4.7-12.2-4.7-16.9 0l-115 114.3c-7.6 7.6-2.2 20.5 8.5 20.5H212v116c0 6.6 5.4 12 12 12h64c6.6 0 12-5.4 12-12z", + ], + }, + L = { + prefix: "fas", + iconName: "arrow-circle-down", + icon: [ + 512, + 512, + [], + "f0ab", + "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-143.6-28.9L288 302.6V120c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v182.6l-72.4-75.5c-9.3-9.7-24.8-9.9-34.3-.4l-10.9 11c-9.4 9.4-9.4 24.6 0 33.9L239 404.3c9.4 9.4 24.6 9.4 33.9 0l132.7-132.7c9.4-9.4 9.4-24.6 0-33.9l-10.9-11c-9.5-9.5-25-9.3-34.3.4z", + ], + }, + F = { + prefix: "fas", + iconName: "arrow-circle-left", + icon: [ + 512, + 512, + [], + "f0a8", + "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z", + ], + }, + N = { + prefix: "fas", + iconName: "arrow-circle-right", + icon: [ + 512, + 512, + [], + "f0a9", + "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm-28.9 143.6l75.5 72.4H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h182.6l-75.5 72.4c-9.7 9.3-9.9 24.8-.4 34.3l11 10.9c9.4 9.4 24.6 9.4 33.9 0L404.3 273c9.4-9.4 9.4-24.6 0-33.9L271.6 106.3c-9.4-9.4-24.6-9.4-33.9 0l-11 10.9c-9.5 9.6-9.3 25.1.4 34.4z", + ], + }, + k = { + prefix: "fas", + iconName: "arrow-circle-up", + icon: [ + 512, + 512, + [], + "f0aa", + "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm143.6 28.9l72.4-75.5V392c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V209.4l72.4 75.5c9.3 9.7 24.8 9.9 34.3.4l10.9-11c9.4-9.4 9.4-24.6 0-33.9L273 107.7c-9.4-9.4-24.6-9.4-33.9 0L106.3 240.4c-9.4 9.4-9.4 24.6 0 33.9l10.9 11c9.6 9.5 25.1 9.3 34.4-.4z", + ], + }, + z = { + prefix: "fas", + iconName: "arrow-down", + icon: [ + 448, + 512, + [], + "f063", + "M413.1 222.5l22.2 22.2c9.4 9.4 9.4 24.6 0 33.9L241 473c-9.4 9.4-24.6 9.4-33.9 0L12.7 278.6c-9.4-9.4-9.4-24.6 0-33.9l22.2-22.2c9.5-9.5 25-9.3 34.3.4L184 343.4V56c0-13.3 10.7-24 24-24h32c13.3 0 24 10.7 24 24v287.4l114.8-120.5c9.3-9.8 24.8-10 34.3-.4z", + ], + }, + j = { + prefix: "fas", + iconName: "arrow-left", + icon: [ + 448, + 512, + [], + "f060", + "M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z", + ], + }, + B = { + prefix: "fas", + iconName: "arrow-right", + icon: [ + 448, + 512, + [], + "f061", + "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z", + ], + }, + V = { + prefix: "fas", + iconName: "arrow-up", + icon: [ + 448, + 512, + [], + "f062", + "M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z", + ], + }, + G = { + prefix: "fas", + iconName: "arrows-alt", + icon: [ + 512, + 512, + [], + "f0b2", + "M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z", + ], + }, + U = { + prefix: "fas", + iconName: "arrows-alt-h", + icon: [ + 512, + 512, + [], + "f337", + "M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z", + ], + }, + H = { + prefix: "fas", + iconName: "arrows-alt-v", + icon: [ + 256, + 512, + [], + "f338", + "M214.059 377.941H168V134.059h46.059c21.382 0 32.09-25.851 16.971-40.971L144.971 7.029c-9.373-9.373-24.568-9.373-33.941 0L24.971 93.088c-15.119 15.119-4.411 40.971 16.971 40.971H88v243.882H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.568 9.373 33.941 0l86.059-86.059c15.12-15.119 4.412-40.971-16.97-40.971z", + ], + }, + W = { + prefix: "fas", + iconName: "assistive-listening-systems", + icon: [ + 512, + 512, + [], + "f2a2", + "M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm-80 236c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zM32 448c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm480-187.993c0-1.518-.012-3.025-.045-4.531C510.076 140.525 436.157 38.47 327.994 1.511c-14.633-4.998-30.549 2.809-35.55 17.442-5 14.633 2.81 30.549 17.442 35.55 85.906 29.354 144.61 110.513 146.077 201.953l.003.188c.026 1.118.033 2.236.033 3.363 0 15.464 12.536 28 28 28s28.001-12.536 28.001-28zM152.971 439.029l-80-80L39.03 392.97l80 80 33.941-33.941z", + ], + }, + X = { + prefix: "fas", + iconName: "asterisk", + icon: [ + 512, + 512, + [], + "f069", + "M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z", + ], + }, + Y = { + prefix: "fas", + iconName: "at", + icon: [ + 512, + 512, + [], + "f1fa", + "M256 8C118.941 8 8 118.919 8 256c0 137.059 110.919 248 248 248 48.154 0 95.342-14.14 135.408-40.223 12.005-7.815 14.625-24.288 5.552-35.372l-10.177-12.433c-7.671-9.371-21.179-11.667-31.373-5.129C325.92 429.757 291.314 440 256 440c-101.458 0-184-82.542-184-184S154.542 72 256 72c100.139 0 184 57.619 184 160 0 38.786-21.093 79.742-58.17 83.693-17.349-.454-16.91-12.857-13.476-30.024l23.433-121.11C394.653 149.75 383.308 136 368.225 136h-44.981a13.518 13.518 0 0 0-13.432 11.993l-.01.092c-14.697-17.901-40.448-21.775-59.971-21.775-74.58 0-137.831 62.234-137.831 151.46 0 65.303 36.785 105.87 96 105.87 26.984 0 57.369-15.637 74.991-38.333 9.522 34.104 40.613 34.103 70.71 34.103C462.609 379.41 504 307.798 504 232 504 95.653 394.023 8 256 8zm-21.68 304.43c-22.249 0-36.07-15.623-36.07-40.771 0-44.993 30.779-72.729 58.63-72.729 22.292 0 35.601 15.241 35.601 40.77 0 45.061-33.875 72.73-58.161 72.73z", + ], + }, + K = { + prefix: "fas", + iconName: "atlas", + icon: [ + 448, + 512, + [], + "f558", + "M318.38 208h-39.09c-1.49 27.03-6.54 51.35-14.21 70.41 27.71-13.24 48.02-39.19 53.3-70.41zm0-32c-5.29-31.22-25.59-57.17-53.3-70.41 7.68 19.06 12.72 43.38 14.21 70.41h39.09zM224 97.31c-7.69 7.45-20.77 34.42-23.43 78.69h46.87c-2.67-44.26-15.75-71.24-23.44-78.69zm-41.08 8.28c-27.71 13.24-48.02 39.19-53.3 70.41h39.09c1.49-27.03 6.53-51.35 14.21-70.41zm0 172.82c-7.68-19.06-12.72-43.38-14.21-70.41h-39.09c5.28 31.22 25.59 57.17 53.3 70.41zM247.43 208h-46.87c2.66 44.26 15.74 71.24 23.43 78.69 7.7-7.45 20.78-34.43 23.44-78.69zM448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM224 64c70.69 0 128 57.31 128 128s-57.31 128-128 128S96 262.69 96 192 153.31 64 224 64zm160 384H96c-19.2 0-32-12.8-32-32s16-32 32-32h288v64z", + ], + }, + Z = { + prefix: "fas", + iconName: "atom", + icon: [ + 448, + 512, + [], + "f5d2", + "M413.03 256c40.13-54.89 41.51-98.62 25.14-128-10.91-19.52-40.54-50.73-116.33-41.88C300.36 34.89 267.64 0 224 0s-76.36 34.89-97.84 86.12C50.43 77.34 20.73 108.48 9.83 128c-16.38 29.4-15 73.09 25.14 128-40.13 54.89-41.51 98.62-25.14 128 29.21 52.34 101.68 43.58 116.33 41.88C147.63 477.1 180.36 512 224 512s76.37-34.9 97.84-86.12c14.64 1.7 87.11 10.46 116.33-41.88 16.38-29.4 15-73.09-25.14-128zM63.38 352c-4.03-7.21-.19-24.8 14.95-48.29 6.96 6.53 14.2 12.89 21.87 19.18 1.71 13.71 4 27.08 6.76 40.08-24.56.89-39.89-4.37-43.58-10.97zm36.82-162.88c-7.66 6.29-14.9 12.65-21.87 19.18-15.13-23.5-18.97-41.09-14.95-48.3 3.41-6.14 16.39-11.47 37.92-11.47 1.71 0 3.87.3 5.69.37a472.191 472.191 0 0 0-6.79 40.22zM224 64c9.47 0 22.2 13.52 33.86 37.26-11.19 3.7-22.44 8-33.86 12.86-11.42-4.86-22.67-9.16-33.86-12.86C201.8 77.52 214.53 64 224 64zm0 384c-9.47 0-22.2-13.52-33.86-37.26 11.19-3.7 22.44-8 33.86-12.86 11.42 4.86 22.67 9.16 33.86 12.86C246.2 434.48 233.47 448 224 448zm62.5-157.33c-26.7 19.08-46.14 29.33-62.5 37.48-16.35-8.14-35.8-18.41-62.5-37.48-1.99-27.79-1.99-41.54 0-69.33 26.67-19.05 46.13-29.32 62.5-37.48 16.39 8.17 35.86 18.44 62.5 37.48 1.98 27.78 1.99 41.53 0 69.33zM384.62 352c-3.67 6.62-19 11.82-43.58 10.95 2.76-13 5.05-26.37 6.76-40.06 7.66-6.29 14.9-12.65 21.87-19.18 15.13 23.49 18.97 41.08 14.95 48.29zm-14.95-143.71c-6.96-6.53-14.2-12.89-21.87-19.18a473.535 473.535 0 0 0-6.79-40.22c1.82-.07 3.97-.37 5.69-.37 21.52 0 34.51 5.34 37.92 11.47 4.02 7.22.18 24.81-14.95 48.3zM224 224c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z", + ], + }, + q = { + prefix: "fas", + iconName: "audio-description", + icon: [ + 512, + 512, + [], + "f29e", + "M162.925 238.709l8.822 30.655h-25.606l9.041-30.652c1.277-4.421 2.651-9.994 3.872-15.245 1.22 5.251 2.594 10.823 3.871 15.242zm166.474-32.099h-14.523v98.781h14.523c29.776 0 46.175-17.678 46.175-49.776 0-32.239-17.49-49.005-46.175-49.005zM512 112v288c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48zM245.459 336.139l-57.097-168A12.001 12.001 0 0 0 177 160h-35.894a12.001 12.001 0 0 0-11.362 8.139l-57.097 168C70.003 343.922 75.789 352 84.009 352h29.133a12 12 0 0 0 11.535-8.693l8.574-29.906h51.367l8.793 29.977A12 12 0 0 0 204.926 352h29.172c8.22 0 14.006-8.078 11.361-15.861zm184.701-80.525c0-58.977-37.919-95.614-98.96-95.614h-57.366c-6.627 0-12 5.373-12 12v168c0 6.627 5.373 12 12 12H331.2c61.041 0 98.96-36.933 98.96-96.386z", + ], + }, + Q = { + prefix: "fas", + iconName: "award", + icon: [ + 384, + 512, + [], + "f559", + "M97.12 362.63c-8.69-8.69-4.16-6.24-25.12-11.85-9.51-2.55-17.87-7.45-25.43-13.32L1.2 448.7c-4.39 10.77 3.81 22.47 15.43 22.03l52.69-2.01L105.56 507c8 8.44 22.04 5.81 26.43-4.96l52.05-127.62c-10.84 6.04-22.87 9.58-35.31 9.58-19.5 0-37.82-7.59-51.61-21.37zM382.8 448.7l-45.37-111.24c-7.56 5.88-15.92 10.77-25.43 13.32-21.07 5.64-16.45 3.18-25.12 11.85-13.79 13.78-32.12 21.37-51.62 21.37-12.44 0-24.47-3.55-35.31-9.58L252 502.04c4.39 10.77 18.44 13.4 26.43 4.96l36.25-38.28 52.69 2.01c11.62.44 19.82-11.27 15.43-22.03zM263 340c15.28-15.55 17.03-14.21 38.79-20.14 13.89-3.79 24.75-14.84 28.47-28.98 7.48-28.4 5.54-24.97 25.95-45.75 10.17-10.35 14.14-25.44 10.42-39.58-7.47-28.38-7.48-24.42 0-52.83 3.72-14.14-.25-29.23-10.42-39.58-20.41-20.78-18.47-17.36-25.95-45.75-3.72-14.14-14.58-25.19-28.47-28.98-27.88-7.61-24.52-5.62-44.95-26.41-10.17-10.35-25-14.4-38.89-10.61-27.87 7.6-23.98 7.61-51.9 0-13.89-3.79-28.72.25-38.89 10.61-20.41 20.78-17.05 18.8-44.94 26.41-13.89 3.79-24.75 14.84-28.47 28.98-7.47 28.39-5.54 24.97-25.95 45.75-10.17 10.35-14.15 25.44-10.42 39.58 7.47 28.36 7.48 24.4 0 52.82-3.72 14.14.25 29.23 10.42 39.59 20.41 20.78 18.47 17.35 25.95 45.75 3.72 14.14 14.58 25.19 28.47 28.98C104.6 325.96 106.27 325 121 340c13.23 13.47 33.84 15.88 49.74 5.82a39.676 39.676 0 0 1 42.53 0c15.89 10.06 36.5 7.65 49.73-5.82zM97.66 175.96c0-53.03 42.24-96.02 94.34-96.02s94.34 42.99 94.34 96.02-42.24 96.02-94.34 96.02-94.34-42.99-94.34-96.02z", + ], + }, + J = { + prefix: "fas", + iconName: "backspace", + icon: [ + 640, + 512, + [], + "f55a", + "M576 64H205.26A63.97 63.97 0 0 0 160 82.75L9.37 233.37c-12.5 12.5-12.5 32.76 0 45.25L160 429.25c12 12 28.28 18.75 45.25 18.75H576c35.35 0 64-28.65 64-64V128c0-35.35-28.65-64-64-64zm-84.69 254.06c6.25 6.25 6.25 16.38 0 22.63l-22.62 22.62c-6.25 6.25-16.38 6.25-22.63 0L384 301.25l-62.06 62.06c-6.25 6.25-16.38 6.25-22.63 0l-22.62-22.62c-6.25-6.25-6.25-16.38 0-22.63L338.75 256l-62.06-62.06c-6.25-6.25-6.25-16.38 0-22.63l22.62-22.62c6.25-6.25 16.38-6.25 22.63 0L384 210.75l62.06-62.06c6.25-6.25 16.38-6.25 22.63 0l22.62 22.62c6.25 6.25 6.25 16.38 0 22.63L429.25 256l62.06 62.06z", + ], + }, + $ = { + prefix: "fas", + iconName: "backward", + icon: [ + 512, + 512, + [], + "f04a", + "M11.5 280.6l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2zm256 0l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2z", + ], + }, + ee = { + prefix: "fas", + iconName: "balance-scale", + icon: [ + 640, + 512, + [], + "f24e", + "M256 336h-.02c0-16.18 1.34-8.73-85.05-181.51-17.65-35.29-68.19-35.36-85.87 0C-2.06 328.75.02 320.33.02 336H0c0 44.18 57.31 80 128 80s128-35.82 128-80zM128 176l72 144H56l72-144zm511.98 160c0-16.18 1.34-8.73-85.05-181.51-17.65-35.29-68.19-35.36-85.87 0-87.12 174.26-85.04 165.84-85.04 181.51H384c0 44.18 57.31 80 128 80s128-35.82 128-80h-.02zM440 320l72-144 72 144H440zm88 128H352V153.25c23.51-10.29 41.16-31.48 46.39-57.25H528c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H383.64C369.04 12.68 346.09 0 320 0s-49.04 12.68-63.64 32H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h129.61c5.23 25.76 22.87 46.96 46.39 57.25V448H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + te = { + prefix: "fas", + iconName: "ban", + icon: [ + 512, + 512, + [], + "f05e", + "M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z", + ], + }, + ne = { + prefix: "fas", + iconName: "band-aid", + icon: [ + 640, + 512, + [], + "f462", + "M0 160v192c0 35.3 28.7 64 64 64h96V96H64c-35.3 0-64 28.7-64 64zm576-64h-96v320h96c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64zM192 416h256V96H192v320zm176-232c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm0 96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-96-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm0 96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24z", + ], + }, + ie = { + prefix: "fas", + iconName: "barcode", + icon: [ + 512, + 512, + [], + "f02a", + "M0 448V64h18v384H0zm26.857-.273V64H36v383.727h-9.143zm27.143 0V64h8.857v383.727H54zm44.857 0V64h8.857v383.727h-8.857zm36 0V64h17.714v383.727h-17.714zm44.857 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm35.715 0V64h18v383.727h-18zm44.857 0V64h18v383.727h-18zm35.999 0V64h18.001v383.727h-18.001zm36.001 0V64h18.001v383.727h-18.001zm26.857 0V64h18v383.727h-18zm45.143 0V64h26.857v383.727h-26.857zm35.714 0V64h9.143v383.727H476zm18 .273V64h18v384h-18z", + ], + }, + re = { + prefix: "fas", + iconName: "bars", + icon: [ + 448, + 512, + [], + "f0c9", + "M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z", + ], + }, + oe = { + prefix: "fas", + iconName: "baseball-ball", + icon: [ + 496, + 512, + [], + "f433", + "M368.5 363.9l28.8-13.9c11.1 22.9 26 43.2 44.1 60.9 34-42.5 54.5-96.3 54.5-154.9 0-58.5-20.4-112.2-54.2-154.6-17.8 17.3-32.6 37.1-43.6 59.5l-28.7-14.1c12.8-26 30-49 50.8-69C375.6 34.7 315 8 248 8 181.1 8 120.5 34.6 75.9 77.7c20.7 19.9 37.9 42.9 50.7 68.8l-28.7 14.1c-11-22.3-25.7-42.1-43.5-59.4C20.4 143.7 0 197.4 0 256c0 58.6 20.4 112.3 54.4 154.7 18.2-17.7 33.2-38 44.3-61l28.8 13.9c-12.9 26.7-30.3 50.3-51.5 70.7 44.5 43.1 105.1 69.7 172 69.7 66.8 0 127.3-26.5 171.9-69.5-21.1-20.4-38.5-43.9-51.4-70.6zm-228.3-32l-30.5-9.8c14.9-46.4 12.7-93.8-.6-134l30.4-10c15 45.6 18 99.9.7 153.8zm216.3-153.4l30.4 10c-13.2 40.1-15.5 87.5-.6 134l-30.5 9.8c-17.3-54-14.3-108.3.7-153.8z", + ], + }, + ae = { + prefix: "fas", + iconName: "basketball-ball", + icon: [ + 496, + 512, + [], + "f434", + "M212.3 10.3c-43.8 6.3-86.2 24.1-122.2 53.8l77.4 77.4c27.8-35.8 43.3-81.2 44.8-131.2zM248 222L405.9 64.1c-42.4-35-93.6-53.5-145.5-56.1-1.2 63.9-21.5 122.3-58.7 167.7L248 222zM56.1 98.1c-29.7 36-47.5 78.4-53.8 122.2 50-1.5 95.5-17 131.2-44.8L56.1 98.1zm272.2 204.2c45.3-37.1 103.7-57.4 167.7-58.7-2.6-51.9-21.1-103.1-56.1-145.5L282 256l46.3 46.3zM248 290L90.1 447.9c42.4 34.9 93.6 53.5 145.5 56.1 1.3-64 21.6-122.4 58.7-167.7L248 290zm191.9 123.9c29.7-36 47.5-78.4 53.8-122.2-50.1 1.6-95.5 17.1-131.2 44.8l77.4 77.4zM167.7 209.7C122.3 246.9 63.9 267.3 0 268.4c2.6 51.9 21.1 103.1 56.1 145.5L214 256l-46.3-46.3zm116 292c43.8-6.3 86.2-24.1 122.2-53.8l-77.4-77.4c-27.7 35.7-43.2 81.2-44.8 131.2z", + ], + }, + se = { + prefix: "fas", + iconName: "bath", + icon: [ + 512, + 512, + [], + "f2cd", + "M488 256H80V112c0-17.645 14.355-32 32-32 11.351 0 21.332 5.945 27.015 14.88-16.492 25.207-14.687 59.576 6.838 83.035-4.176 4.713-4.021 11.916.491 16.428l11.314 11.314c4.686 4.686 12.284 4.686 16.971 0l95.03-95.029c4.686-4.686 4.686-12.284 0-16.971l-11.314-11.314c-4.512-4.512-11.715-4.666-16.428-.491-17.949-16.469-42.294-21.429-64.178-15.365C163.281 45.667 139.212 32 112 32c-44.112 0-80 35.888-80 80v144h-8c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h8v32c0 28.43 12.362 53.969 32 71.547V456c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-8h256v8c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-32.453c19.638-17.578 32-43.117 32-71.547v-32h8c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z", + ], + }, + ce = { + prefix: "fas", + iconName: "battery-empty", + icon: [ + 640, + 512, + [], + "f244", + "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48z", + ], + }, + le = { + prefix: "fas", + iconName: "battery-full", + icon: [ + 640, + 512, + [], + "f240", + "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-48 96H96v128h416V192z", + ], + }, + ue = { + prefix: "fas", + iconName: "battery-half", + icon: [ + 640, + 512, + [], + "f242", + "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-240 96H96v128h224V192z", + ], + }, + he = { + prefix: "fas", + iconName: "battery-quarter", + icon: [ + 640, + 512, + [], + "f243", + "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-336 96H96v128h128V192z", + ], + }, + de = { + prefix: "fas", + iconName: "battery-three-quarters", + icon: [ + 640, + 512, + [], + "f241", + "M544 160v64h32v64h-32v64H64V160h480m16-64H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h512c26.51 0 48-21.49 48-48v-16h8c13.255 0 24-10.745 24-24V184c0-13.255-10.745-24-24-24h-8v-16c0-26.51-21.49-48-48-48zm-144 96H96v128h320V192z", + ], + }, + pe = { + prefix: "fas", + iconName: "bed", + icon: [ + 640, + 512, + [], + "f236", + "M176 256c44.11 0 80-35.89 80-80s-35.89-80-80-80-80 35.89-80 80 35.89 80 80 80zm352-128H304c-8.84 0-16 7.16-16 16v144H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v352c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h512v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V240c0-61.86-50.14-112-112-112z", + ], + }, + fe = { + prefix: "fas", + iconName: "beer", + icon: [ + 448, + 512, + [], + "f0fc", + "M368 96h-48V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24v-42.11l80.606-35.977C429.396 365.063 448 336.388 448 304.86V176c0-44.112-35.888-80-80-80zm16 208.86a16.018 16.018 0 0 1-9.479 14.611L320 343.805V160h48c8.822 0 16 7.178 16 16v128.86zM208 384c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16zm-96 0c-8.836 0-16-7.164-16-16V144c0-8.836 7.164-16 16-16s16 7.164 16 16v224c0 8.836-7.164 16-16 16z", + ], + }, + me = { + prefix: "fas", + iconName: "bell", + icon: [ + 448, + 512, + [], + "f0f3", + "M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z", + ], + }, + ge = { + prefix: "fas", + iconName: "bell-slash", + icon: [ + 640, + 512, + [], + "f1f6", + "M633.82 458.1l-90.62-70.05c.19-1.38.8-2.66.8-4.06.05-7.55-2.61-15.27-8.61-21.71-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84c-40.33 8.38-74.66 31.07-97.59 62.57L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.35 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.42-6.97 4.17-17.02-2.81-22.45zM157.23 251.54c-8.61 67.96-36.41 93.33-52.62 110.75-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h241.92L157.23 251.54zM320 512c35.32 0 63.97-28.65 63.97-64H256.03c0 35.35 28.65 64 63.97 64z", + ], + }, + be = { + prefix: "fas", + iconName: "bezier-curve", + icon: [ + 640, + 512, + [], + "f55b", + "M368 32h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM208 88h-84.75C113.75 64.56 90.84 48 64 48 28.66 48 0 76.65 0 112s28.66 64 64 64c26.84 0 49.75-16.56 59.25-40h79.73c-55.37 32.52-95.86 87.32-109.54 152h49.4c11.3-41.61 36.77-77.21 71.04-101.56-3.7-8.08-5.88-16.99-5.88-26.44V88zm-48 232H64c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zM576 48c-26.84 0-49.75 16.56-59.25 40H432v72c0 9.45-2.19 18.36-5.88 26.44 34.27 24.35 59.74 59.95 71.04 101.56h49.4c-13.68-64.68-54.17-119.48-109.54-152h79.73c9.5 23.44 32.41 40 59.25 40 35.34 0 64-28.65 64-64s-28.66-64-64-64zm0 272h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z", + ], + }, + _e = { + prefix: "fas", + iconName: "bible", + icon: [ + 448, + 512, + [], + "f647", + "M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM144 144c0-8.84 7.16-16 16-16h48V80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v48h48c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-48v112c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V192h-48c-8.84 0-16-7.16-16-16v-32zm236.8 304H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z", + ], + }, + ve = { + prefix: "fas", + iconName: "bicycle", + icon: [ + 640, + 512, + [], + "f206", + "M512.509 192.001c-16.373-.064-32.03 2.955-46.436 8.495l-77.68-125.153A24 24 0 0 0 368.001 64h-64c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h50.649l14.896 24H256.002v-16c0-8.837-7.163-16-16-16h-87.459c-13.441 0-24.777 10.999-24.536 24.437.232 13.044 10.876 23.563 23.995 23.563h48.726l-29.417 47.52c-13.433-4.83-27.904-7.483-42.992-7.52C58.094 191.83.412 249.012.002 319.236-.413 390.279 57.055 448 128.002 448c59.642 0 109.758-40.793 123.967-96h52.033a24 24 0 0 0 20.406-11.367L410.37 201.77l14.938 24.067c-25.455 23.448-41.385 57.081-41.307 94.437.145 68.833 57.899 127.051 126.729 127.719 70.606.685 128.181-55.803 129.255-125.996 1.086-70.941-56.526-129.72-127.476-129.996zM186.75 265.772c9.727 10.529 16.673 23.661 19.642 38.228h-43.306l23.664-38.228zM128.002 400c-44.112 0-80-35.888-80-80s35.888-80 80-80c5.869 0 11.586.653 17.099 1.859l-45.505 73.509C89.715 331.327 101.213 352 120.002 352h81.3c-12.37 28.225-40.562 48-73.3 48zm162.63-96h-35.624c-3.96-31.756-19.556-59.894-42.383-80.026L237.371 184h127.547l-74.286 120zm217.057 95.886c-41.036-2.165-74.049-35.692-75.627-76.755-.812-21.121 6.633-40.518 19.335-55.263l44.433 71.586c4.66 7.508 14.524 9.816 22.032 5.156l13.594-8.437c7.508-4.66 9.817-14.524 5.156-22.032l-44.468-71.643a79.901 79.901 0 0 1 19.858-2.497c44.112 0 80 35.888 80 80-.001 45.54-38.252 82.316-84.313 79.885z", + ], + }, + ye = { + prefix: "fas", + iconName: "binoculars", + icon: [ + 512, + 512, + [], + "f1e5", + "M416 48c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v48h96V48zM63.91 159.99C61.4 253.84 3.46 274.22 0 404v44c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V288h32V128H95.84c-17.63 0-31.45 14.37-31.93 31.99zm384.18 0c-.48-17.62-14.3-31.99-31.93-31.99H320v160h32v160c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-44c-3.46-129.78-61.4-150.16-63.91-244.01zM176 32h-64c-8.84 0-16 7.16-16 16v48h96V48c0-8.84-7.16-16-16-16zm48 256h64V128h-64v160z", + ], + }, + Ce = { + prefix: "fas", + iconName: "birthday-cake", + icon: [ + 448, + 512, + [], + "f1fd", + "M448 384c-28.02 0-31.26-32-74.5-32-43.43 0-46.825 32-74.75 32-27.695 0-31.454-32-74.75-32-42.842 0-47.218 32-74.5 32-28.148 0-31.202-32-74.75-32-43.547 0-46.653 32-74.75 32v-80c0-26.5 21.5-48 48-48h16V112h64v144h64V112h64v144h64V112h64v144h16c26.5 0 48 21.5 48 48v80zm0 128H0v-96c43.356 0 46.767-32 74.75-32 27.951 0 31.253 32 74.75 32 42.843 0 47.217-32 74.5-32 28.148 0 31.201 32 74.75 32 43.357 0 46.767-32 74.75-32 27.488 0 31.252 32 74.5 32v96zM96 96c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40zm128 0c-17.75 0-32-14.25-32-32 0-31 32-23 32-64 12 0 32 29.5 32 56s-14.25 40-32 40z", + ], + }, + Pe = { + prefix: "fas", + iconName: "blender", + icon: [ + 512, + 512, + [], + "f517", + "M416 384H160c-35.35 0-64 28.65-64 64v32c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-32c0-35.35-28.65-64-64-64zm-128 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm40-416h166.54L512 0H48C21.49 0 0 21.49 0 48v160c0 26.51 21.49 48 48 48h103.27l8.73 96h256l17.46-64H328c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h114.18l17.46-64H328c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h140.36l17.46-64H328c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8zM64 192V64h69.82l11.64 128H64z", + ], + }, + xe = { + prefix: "fas", + iconName: "blender-phone", + icon: [ + 576, + 512, + [], + "f6b6", + "M392 64h166.54L576 0H192v352h288l17.46-64H392c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h114.18l17.46-64H392c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h140.36l17.46-64H392c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8zM158.8 335.01l-25.78-63.26c-2.78-6.81-9.8-10.99-17.24-10.26l-45.03 4.42c-17.28-46.94-17.65-99.78 0-147.72l45.03 4.42c7.43.73 14.46-3.46 17.24-10.26l25.78-63.26c3.02-7.39.2-15.85-6.68-20.07l-39.28-24.1C98.51-3.87 80.09-.5 68.95 11.97c-92.57 103.6-92 259.55 2.1 362.49 9.87 10.8 29.12 12.48 41.65 4.8l39.41-24.18c6.89-4.22 9.7-12.67 6.69-20.07zM480 384H192c-35.35 0-64 28.65-64 64v32c0 17.67 14.33 32 32 32h352c17.67 0 32-14.33 32-32v-32c0-35.35-28.65-64-64-64zm-144 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Te = { + prefix: "fas", + iconName: "blind", + icon: [ + 384, + 512, + [], + "f29d", + "M380.15 510.837a8 8 0 0 1-10.989-2.687l-125.33-206.427a31.923 31.923 0 0 0 12.958-9.485l126.048 207.608a8 8 0 0 1-2.687 10.991zM142.803 314.338l-32.54 89.485 36.12 88.285c6.693 16.36 25.377 24.192 41.733 17.501 16.357-6.692 24.193-25.376 17.501-41.734l-62.814-153.537zM96 88c24.301 0 44-19.699 44-44S120.301 0 96 0 52 19.699 52 44s19.699 44 44 44zm154.837 169.128l-120-152c-4.733-5.995-11.75-9.108-18.837-9.112V96H80v.026c-7.146.003-14.217 3.161-18.944 9.24L0 183.766v95.694c0 13.455 11.011 24.791 24.464 24.536C37.505 303.748 48 293.1 48 280v-79.766l16-20.571v140.698L9.927 469.055c-6.04 16.609 2.528 34.969 19.138 41.009 16.602 6.039 34.968-2.524 41.009-19.138L136 309.638V202.441l-31.406-39.816a4 4 0 1 1 6.269-4.971l102.3 129.217c9.145 11.584 24.368 11.339 33.708 3.965 10.41-8.216 12.159-23.334 3.966-33.708z", + ], + }, + Se = { + prefix: "fas", + iconName: "bold", + icon: [ + 384, + 512, + [], + "f032", + "M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z", + ], + }, + Oe = { + prefix: "fas", + iconName: "bolt", + icon: [ + 320, + 512, + [], + "f0e7", + "M295.973 160H180.572L215.19 30.184C219.25 14.956 207.756 0 192 0H56C43.971 0 33.8 8.905 32.211 20.828l-31.996 240C-1.704 275.217 9.504 288 24.004 288h118.701L96.646 482.466C93.05 497.649 104.659 512 119.992 512c8.35 0 16.376-4.374 20.778-11.978l175.973-303.997c9.244-15.967-2.288-36.025-20.77-36.025z", + ], + }, + Ee = { + prefix: "fas", + iconName: "bomb", + icon: [ + 512, + 512, + [], + "f1e2", + "M440.5 88.5l-52 52L415 167c9.4 9.4 9.4 24.6 0 33.9l-17.4 17.4c11.8 26.1 18.4 55.1 18.4 85.6 0 114.9-93.1 208-208 208S0 418.9 0 304 93.1 96 208 96c30.5 0 59.5 6.6 85.6 18.4L311 97c9.4-9.4 24.6-9.4 33.9 0l26.5 26.5 52-52 17.1 17zM500 60h-24c-6.6 0-12 5.4-12 12s5.4 12 12 12h24c6.6 0 12-5.4 12-12s-5.4-12-12-12zM440 0c-6.6 0-12 5.4-12 12v24c0 6.6 5.4 12 12 12s12-5.4 12-12V12c0-6.6-5.4-12-12-12zm33.9 55l17-17c4.7-4.7 4.7-12.3 0-17-4.7-4.7-12.3-4.7-17 0l-17 17c-4.7 4.7-4.7 12.3 0 17 4.8 4.7 12.4 4.7 17 0zm-67.8 0c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17zm67.8 34c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17zM112 272c0-35.3 28.7-64 64-64 8.8 0 16-7.2 16-16s-7.2-16-16-16c-52.9 0-96 43.1-96 96 0 8.8 7.2 16 16 16s16-7.2 16-16z", + ], + }, + Me = { + prefix: "fas", + iconName: "bone", + icon: [ + 640, + 512, + [], + "f5d7", + "M598.88 244.56c25.2-12.6 41.12-38.36 41.12-66.53v-7.64C640 129.3 606.7 96 565.61 96c-32.02 0-60.44 20.49-70.57 50.86-7.68 23.03-11.6 45.14-38.11 45.14H183.06c-27.38 0-31.58-25.54-38.11-45.14C134.83 116.49 106.4 96 74.39 96 33.3 96 0 129.3 0 170.39v7.64c0 28.17 15.92 53.93 41.12 66.53 9.43 4.71 9.43 18.17 0 22.88C15.92 280.04 0 305.8 0 333.97v7.64C0 382.7 33.3 416 74.38 416c32.02 0 60.44-20.49 70.57-50.86 7.68-23.03 11.6-45.14 38.11-45.14h273.87c27.38 0 31.58 25.54 38.11 45.14C505.17 395.51 533.6 416 565.61 416c41.08 0 74.38-33.3 74.38-74.39v-7.64c0-28.18-15.92-53.93-41.12-66.53-9.42-4.71-9.42-18.17.01-22.88z", + ], + }, + Ae = { + prefix: "fas", + iconName: "bong", + icon: [ + 448, + 512, + [], + "f55c", + "M302.5 512c23.18 0 44.43-12.58 56-32.66C374.69 451.26 384 418.75 384 384c0-36.12-10.08-69.81-27.44-98.62L400 241.94l9.38 9.38c6.25 6.25 16.38 6.25 22.63 0l11.3-11.32c6.25-6.25 6.25-16.38 0-22.63l-52.69-52.69c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63l9.38 9.38-39.41 39.41c-11.56-11.37-24.53-21.33-38.65-29.51V63.74l15.97-.02c8.82-.01 15.97-7.16 15.98-15.98l.04-31.72C320 7.17 312.82-.01 303.97 0L80.03.26c-8.82.01-15.97 7.16-15.98 15.98l-.04 31.73c-.01 8.85 7.17 16.02 16.02 16.01L96 63.96v153.93C38.67 251.1 0 312.97 0 384c0 34.75 9.31 67.27 25.5 95.34C37.08 499.42 58.33 512 81.5 512h221zM120.06 259.43L144 245.56V63.91l96-.11v181.76l23.94 13.87c24.81 14.37 44.12 35.73 56.56 60.57h-257c12.45-24.84 31.75-46.2 56.56-60.57z", + ], + }, + Ie = { + prefix: "fas", + iconName: "book", + icon: [ + 448, + 512, + [], + "f02d", + "M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z", + ], + }, + De = { + prefix: "fas", + iconName: "book-dead", + icon: [ + 448, + 512, + [], + "f6b7", + "M272 136c8.84 0 16-7.16 16-16s-7.16-16-16-16-16 7.16-16 16 7.16 16 16 16zm176 222.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM240 56c44.18 0 80 28.65 80 64 0 20.87-12.68 39.23-32 50.91V184c0 8.84-7.16 16-16 16h-64c-8.84 0-16-7.16-16-16v-13.09c-19.32-11.68-32-30.04-32-50.91 0-35.35 35.82-64 80-64zM129.05 233.85a7.996 7.996 0 0 1-4.2-10.5l6.29-14.7a7.995 7.995 0 0 1 10.51-4.2L240 246.6l98.35-42.15c4.06-1.74 8.77.14 10.51 4.2l6.29 14.7a7.996 7.996 0 0 1-4.2 10.5L280.6 264l70.34 30.15a7.996 7.996 0 0 1 4.2 10.5l-6.29 14.7a8.008 8.008 0 0 1-10.51 4.21L240 281.4l-98.35 42.15a8.003 8.003 0 0 1-10.51-4.21l-6.29-14.7a7.996 7.996 0 0 1 4.2-10.5L199.4 264l-70.35-30.15zM380.8 448H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64zM208 136c8.84 0 16-7.16 16-16s-7.16-16-16-16-16 7.16-16 16 7.16 16 16 16z", + ], + }, + Re = { + prefix: "fas", + iconName: "book-open", + icon: [ + 576, + 512, + [], + "f518", + "M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z", + ], + }, + we = { + prefix: "fas", + iconName: "book-reader", + icon: [ + 512, + 512, + [], + "f5da", + "M352 96c0-53.02-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM233.59 241.1c-59.33-36.32-155.43-46.3-203.79-49.05C13.55 191.13 0 203.51 0 219.14v222.8c0 14.33 11.59 26.28 26.49 27.05 43.66 2.29 131.99 10.68 193.04 41.43 9.37 4.72 20.48-1.71 20.48-11.87V252.56c-.01-4.67-2.32-8.95-6.42-11.46zm248.61-49.05c-48.35 2.74-144.46 12.73-203.78 49.05-4.1 2.51-6.41 6.96-6.41 11.63v245.79c0 10.19 11.14 16.63 20.54 11.9 61.04-30.72 149.32-39.11 192.97-41.4 14.9-.78 26.49-12.73 26.49-27.06V219.14c-.01-15.63-13.56-28.01-29.81-27.09z", + ], + }, + Le = { prefix: "fas", iconName: "bookmark", icon: [384, 512, [], "f02e", "M0 512V48C0 21.49 21.49 0 48 0h288c26.51 0 48 21.49 48 48v464L192 400 0 512z"] }, + Fe = { + prefix: "fas", + iconName: "bowling-ball", + icon: [ + 496, + 512, + [], + "f436", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM120 192c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-96c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm48 144c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + Ne = { + prefix: "fas", + iconName: "box", + icon: [ + 512, + 512, + [], + "f466", + "M509.5 184.6L458.9 32.8C452.4 13.2 434.1 0 413.4 0H272v192h238.7c-.4-2.5-.4-5-1.2-7.4zM240 0H98.6c-20.7 0-39 13.2-45.5 32.8L2.5 184.6c-.8 2.4-.8 4.9-1.2 7.4H240V0zM0 224v240c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V224H0z", + ], + }, + ke = { + prefix: "fas", + iconName: "box-open", + icon: [ + 640, + 512, + [], + "f49e", + "M53.2 41L1.7 143.8c-4.6 9.2.3 20.2 10.1 23l197.9 56.5c7.1 2 14.7-1 18.5-7.3L320 64 69.8 32.1c-6.9-.8-13.5 2.7-16.6 8.9zm585.1 102.8L586.8 41c-3.1-6.2-9.8-9.8-16.7-8.9L320 64l91.7 152.1c3.8 6.3 11.4 9.3 18.5 7.3l197.9-56.5c9.9-2.9 14.7-13.9 10.2-23.1zM425.7 256c-16.9 0-32.8-9-41.4-23.4L320 126l-64.2 106.6c-8.7 14.5-24.6 23.5-41.5 23.5-4.5 0-9-.6-13.3-1.9L64 215v178c0 14.7 10 27.5 24.2 31l216.2 54.1c10.2 2.5 20.9 2.5 31 0L551.8 424c14.2-3.6 24.2-16.4 24.2-31V215l-137 39.1c-4.3 1.3-8.8 1.9-13.3 1.9z", + ], + }, + ze = { + prefix: "fas", + iconName: "boxes", + icon: [ + 576, + 512, + [], + "f468", + "M560 288h-80v96l-32-21.3-32 21.3v-96h-80c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16h224c8.8 0 16-7.2 16-16V304c0-8.8-7.2-16-16-16zm-384-64h224c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16h-80v96l-32-21.3L256 96V0h-80c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16zm64 64h-80v96l-32-21.3L96 384v-96H16c-8.8 0-16 7.2-16 16v192c0 8.8 7.2 16 16 16h224c8.8 0 16-7.2 16-16V304c0-8.8-7.2-16-16-16z", + ], + }, + je = { + prefix: "fas", + iconName: "braille", + icon: [ + 640, + 512, + [], + "f2a1", + "M128 256c0 35.346-28.654 64-64 64S0 291.346 0 256s28.654-64 64-64 64 28.654 64 64zM64 384c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352C28.654 32 0 60.654 0 96s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm224 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-320c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z", + ], + }, + Be = { + prefix: "fas", + iconName: "brain", + icon: [ + 576, + 512, + [], + "f5dc", + "M208 0c-29.87 0-54.74 20.55-61.8 48.22-.75-.02-1.45-.22-2.2-.22-35.34 0-64 28.65-64 64 0 4.84.64 9.51 1.66 14.04C52.54 138 32 166.57 32 200c0 12.58 3.16 24.32 8.34 34.91C16.34 248.72 0 274.33 0 304c0 33.34 20.42 61.88 49.42 73.89-.9 4.57-1.42 9.28-1.42 14.11 0 39.76 32.23 72 72 72 4.12 0 8.1-.55 12.03-1.21C141.61 491.31 168.25 512 200 512c39.77 0 72-32.24 72-72V205.45c-10.91 8.98-23.98 15.45-38.36 18.39-4.97 1.02-9.64-2.82-9.64-7.89v-16.18c0-3.57 2.35-6.78 5.8-7.66 24.2-6.16 42.2-27.95 42.2-54.04V64c0-35.35-28.66-64-64-64zm368 304c0-29.67-16.34-55.28-40.34-69.09 5.17-10.59 8.34-22.33 8.34-34.91 0-33.43-20.54-62-49.66-73.96 1.02-4.53 1.66-9.2 1.66-14.04 0-35.35-28.66-64-64-64-.75 0-1.45.2-2.2.22C422.74 20.55 397.87 0 368 0c-35.34 0-64 28.65-64 64v74.07c0 26.09 17.99 47.88 42.2 54.04 3.46.88 5.8 4.09 5.8 7.66v16.18c0 5.07-4.68 8.91-9.64 7.89-14.38-2.94-27.44-9.41-38.36-18.39V440c0 39.76 32.23 72 72 72 31.75 0 58.39-20.69 67.97-49.21 3.93.67 7.91 1.21 12.03 1.21 39.77 0 72-32.24 72-72 0-4.83-.52-9.54-1.42-14.11 29-12.01 49.42-40.55 49.42-73.89z", + ], + }, + Ve = { + prefix: "fas", + iconName: "briefcase", + icon: [ + 512, + 512, + [], + "f0b1", + "M320 336c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h416c25.6 0 48-22.4 48-48V288H320v48zm144-208h-80V80c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h512v-80c0-25.6-22.4-48-48-48zm-144 0H192V96h128v32z", + ], + }, + Ge = { + prefix: "fas", + iconName: "briefcase-medical", + icon: [ + 512, + 512, + [], + "f469", + "M464 128h-80V80c0-26.5-21.5-48-48-48H176c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V176c0-26.5-21.5-48-48-48zM192 96h128v32H192V96zm160 248c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48z", + ], + }, + Ue = { + prefix: "fas", + iconName: "broadcast-tower", + icon: [ + 640, + 512, + [], + "f519", + "M150.94 192h33.73c11.01 0 18.61-10.83 14.86-21.18-4.93-13.58-7.55-27.98-7.55-42.82s2.62-29.24 7.55-42.82C203.29 74.83 195.68 64 184.67 64h-33.73c-7.01 0-13.46 4.49-15.41 11.23C130.64 92.21 128 109.88 128 128c0 18.12 2.64 35.79 7.54 52.76 1.94 6.74 8.39 11.24 15.4 11.24zM89.92 23.34C95.56 12.72 87.97 0 75.96 0H40.63c-6.27 0-12.14 3.59-14.74 9.31C9.4 45.54 0 85.65 0 128c0 24.75 3.12 68.33 26.69 118.86 2.62 5.63 8.42 9.14 14.61 9.14h34.84c12.02 0 19.61-12.74 13.95-23.37-49.78-93.32-16.71-178.15-.17-209.29zM614.06 9.29C611.46 3.58 605.6 0 599.33 0h-35.42c-11.98 0-19.66 12.66-14.02 23.25 18.27 34.29 48.42 119.42.28 209.23-5.72 10.68 1.8 23.52 13.91 23.52h35.23c6.27 0 12.13-3.58 14.73-9.29C630.57 210.48 640 170.36 640 128s-9.42-82.48-25.94-118.71zM489.06 64h-33.73c-11.01 0-18.61 10.83-14.86 21.18 4.93 13.58 7.55 27.98 7.55 42.82s-2.62 29.24-7.55 42.82c-3.76 10.35 3.85 21.18 14.86 21.18h33.73c7.02 0 13.46-4.49 15.41-11.24 4.9-16.97 7.53-34.64 7.53-52.76 0-18.12-2.64-35.79-7.54-52.76-1.94-6.75-8.39-11.24-15.4-11.24zm-116.3 100.12c7.05-10.29 11.2-22.71 11.2-36.12 0-35.35-28.63-64-63.96-64-35.32 0-63.96 28.65-63.96 64 0 13.41 4.15 25.83 11.2 36.12l-130.5 313.41c-3.4 8.15.46 17.52 8.61 20.92l29.51 12.31c8.15 3.4 17.52-.46 20.91-8.61L244.96 384h150.07l49.2 118.15c3.4 8.16 12.76 12.01 20.91 8.61l29.51-12.31c8.15-3.4 12-12.77 8.61-20.92l-130.5-313.41zM271.62 320L320 203.81 368.38 320h-96.76z", + ], + }, + He = { + prefix: "fas", + iconName: "broom", + icon: [ + 640, + 512, + [], + "f51a", + "M256.47 216.77l86.73 109.18s-16.6 102.36-76.57 150.12C206.66 523.85 0 510.19 0 510.19s3.8-23.14 11-55.43l94.62-112.17c3.97-4.7-.87-11.62-6.65-9.5l-60.4 22.09c14.44-41.66 32.72-80.04 54.6-97.47 59.97-47.76 163.3-40.94 163.3-40.94zM636.53 31.03l-19.86-25c-5.49-6.9-15.52-8.05-22.41-2.56l-232.48 177.8-34.14-42.97c-5.09-6.41-15.14-5.21-18.59 2.21l-25.33 54.55 86.73 109.18 58.8-12.45c8-1.69 11.42-11.2 6.34-17.6l-34.09-42.92 232.48-177.8c6.89-5.48 8.04-15.53 2.55-22.44z", + ], + }, + We = { + prefix: "fas", + iconName: "brush", + icon: [ + 384, + 512, + [], + "f55d", + "M352 0H32C14.33 0 0 14.33 0 32v224h384V32c0-17.67-14.33-32-32-32zM0 320c0 35.35 28.66 64 64 64h64v64c0 35.35 28.66 64 64 64s64-28.65 64-64v-64h64c35.34 0 64-28.65 64-64v-32H0v32zm192 104c13.25 0 24 10.74 24 24 0 13.25-10.75 24-24 24s-24-10.75-24-24c0-13.26 10.75-24 24-24z", + ], + }, + Xe = { + prefix: "fas", + iconName: "bug", + icon: [ + 512, + 512, + [], + "f188", + "M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z", + ], + }, + Ye = { + prefix: "fas", + iconName: "building", + icon: [ + 448, + 512, + [], + "f1ad", + "M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z", + ], + }, + Ke = { + prefix: "fas", + iconName: "bullhorn", + icon: [ + 576, + 512, + [], + "f0a1", + "M576 240c0-23.63-12.95-44.04-32-55.12V32.01C544 23.26 537.02 0 512 0c-7.12 0-14.19 2.38-19.98 7.02l-85.03 68.03C364.28 109.19 310.66 128 256 128H64c-35.35 0-64 28.65-64 64v96c0 35.35 28.65 64 64 64h33.7c-1.39 10.48-2.18 21.14-2.18 32 0 39.77 9.26 77.35 25.56 110.94 5.19 10.69 16.52 17.06 28.4 17.06h74.28c26.05 0 41.69-29.84 25.9-50.56-16.4-21.52-26.15-48.36-26.15-77.44 0-11.11 1.62-21.79 4.41-32H256c54.66 0 108.28 18.81 150.98 52.95l85.03 68.03a32.023 32.023 0 0 0 19.98 7.02c24.92 0 32-22.78 32-32V295.13C563.05 284.04 576 263.63 576 240zm-96 141.42l-33.05-26.44C392.95 311.78 325.12 288 256 288v-96c69.12 0 136.95-23.78 190.95-66.98L480 98.58v282.84z", + ], + }, + Ze = { + prefix: "fas", + iconName: "bullseye", + icon: [ + 496, + 512, + [], + "f140", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 432c-101.69 0-184-82.29-184-184 0-101.69 82.29-184 184-184 101.69 0 184 82.29 184 184 0 101.69-82.29 184-184 184zm0-312c-70.69 0-128 57.31-128 128s57.31 128 128 128 128-57.31 128-128-57.31-128-128-128zm0 192c-35.29 0-64-28.71-64-64s28.71-64 64-64 64 28.71 64 64-28.71 64-64 64z", + ], + }, + qe = { + prefix: "fas", + iconName: "burn", + icon: [ + 384, + 512, + [], + "f46a", + "M192 0C79.7 101.3 0 220.9 0 300.5 0 425 79 512 192 512s192-87 192-211.5c0-79.9-80.2-199.6-192-300.5zm0 448c-56.5 0-96-39-96-94.8 0-13.5 4.6-61.5 96-161.2 91.4 99.7 96 147.7 96 161.2 0 55.8-39.5 94.8-96 94.8z", + ], + }, + Qe = { + prefix: "fas", + iconName: "bus", + icon: [ + 512, + 512, + [], + "f207", + "M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Je = { + prefix: "fas", + iconName: "bus-alt", + icon: [ + 512, + 512, + [], + "f55e", + "M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM160 72c0-4.42 3.58-8 8-8h176c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H168c-4.42 0-8-3.58-8-8V72zm-48 328c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm128-112H128c-17.67 0-32-14.33-32-32v-96c0-17.67 14.33-32 32-32h112v160zm32 0V128h112c17.67 0 32 14.33 32 32v96c0 17.67-14.33 32-32 32H272zm128 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + $e = { + prefix: "fas", + iconName: "business-time", + icon: [ + 640, + 512, + [], + "f64a", + "M496 224c-79.59 0-144 64.41-144 144s64.41 144 144 144 144-64.41 144-144-64.41-144-144-144zm64 150.29c0 5.34-4.37 9.71-9.71 9.71h-60.57c-5.34 0-9.71-4.37-9.71-9.71v-76.57c0-5.34 4.37-9.71 9.71-9.71h12.57c5.34 0 9.71 4.37 9.71 9.71V352h38.29c5.34 0 9.71 4.37 9.71 9.71v12.58zM496 192c5.4 0 10.72.33 16 .81V144c0-25.6-22.4-48-48-48h-80V48c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h395.12c28.6-20.09 63.35-32 100.88-32zM320 96H192V64h128v32zm6.82 224H208c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h291.43C327.1 423.96 320 396.82 320 368c0-16.66 2.48-32.72 6.82-48z", + ], + }, + et = { + prefix: "fas", + iconName: "calculator", + icon: [ + 448, + 512, + [], + "f1ec", + "M400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zM128 435.2c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8V268.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v166.4zm0-256c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8V76.8C64 70.4 70.4 64 76.8 64h294.4c6.4 0 12.8 6.4 12.8 12.8v102.4z", + ], + }, + tt = { + prefix: "fas", + iconName: "calendar", + icon: [ + 448, + 512, + [], + "f133", + "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z", + ], + }, + nt = { + prefix: "fas", + iconName: "calendar-alt", + icon: [ + 448, + 512, + [], + "f073", + "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm116 204c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm128 128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm128 128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40zm0-128c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-40z", + ], + }, + it = { + prefix: "fas", + iconName: "calendar-check", + icon: [ + 448, + 512, + [], + "f274", + "M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z", + ], + }, + rt = { + prefix: "fas", + iconName: "calendar-minus", + icon: [ + 448, + 512, + [], + "f272", + "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm304 192c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H132c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h184z", + ], + }, + ot = { + prefix: "fas", + iconName: "calendar-plus", + icon: [ + 448, + 512, + [], + "f271", + "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm316 140c0-6.6-5.4-12-12-12h-60v-60c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v60h-60c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h60v60c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-60h60c6.6 0 12-5.4 12-12v-40z", + ], + }, + at = { + prefix: "fas", + iconName: "calendar-times", + icon: [ + 448, + 512, + [], + "f273", + "M436 160H12c-6.6 0-12-5.4-12-12v-36c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48v36c0 6.6-5.4 12-12 12zM12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm257.3 160l48.1-48.1c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0L224 306.7l-48.1-48.1c-4.7-4.7-12.3-4.7-17 0l-28.3 28.3c-4.7 4.7-4.7 12.3 0 17l48.1 48.1-48.1 48.1c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l48.1-48.1 48.1 48.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L269.3 352z", + ], + }, + st = { + prefix: "fas", + iconName: "camera", + icon: [ + 512, + 512, + [], + "f030", + "M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z", + ], + }, + ct = { + prefix: "fas", + iconName: "camera-retro", + icon: [ + 512, + 512, + [], + "f083", + "M48 32C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H48zm0 32h106c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H38c-3.3 0-6-2.7-6-6V80c0-8.8 7.2-16 16-16zm426 96H38c-3.3 0-6-2.7-6-6v-36c0-3.3 2.7-6 6-6h138l30.2-45.3c1.1-1.7 3-2.7 5-2.7H464c8.8 0 16 7.2 16 16v74c0 3.3-2.7 6-6 6zM256 424c-66.2 0-120-53.8-120-120s53.8-120 120-120 120 53.8 120 120-53.8 120-120 120zm0-208c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm-48 104c-8.8 0-16-7.2-16-16 0-35.3 28.7-64 64-64 8.8 0 16 7.2 16 16s-7.2 16-16 16c-17.6 0-32 14.4-32 32 0 8.8-7.2 16-16 16z", + ], + }, + lt = { + prefix: "fas", + iconName: "campground", + icon: [ + 640, + 512, + [], + "f6bb", + "M624 448h-24.68L359.54 117.75l53.41-73.55c5.19-7.15 3.61-17.16-3.54-22.35l-25.9-18.79c-7.15-5.19-17.15-3.61-22.35 3.55L320 63.3 278.83 6.6c-5.19-7.15-15.2-8.74-22.35-3.55l-25.88 18.8c-7.15 5.19-8.74 15.2-3.54 22.35l53.41 73.55L40.68 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM320 288l116.36 160H203.64L320 288z", + ], + }, + ut = { + prefix: "fas", + iconName: "cannabis", + icon: [ + 512, + 512, + [], + "f55f", + "M503.47 360.25c-1.56-.82-32.39-16.89-76.78-25.81 64.25-75.12 84.05-161.67 84.93-165.64 1.18-5.33-.44-10.9-4.3-14.77-3.03-3.04-7.12-4.7-11.32-4.7-1.14 0-2.29.12-3.44.38-3.88.85-86.54 19.59-160.58 79.76.01-1.46.01-2.93.01-4.4 0-118.79-59.98-213.72-62.53-217.7A15.973 15.973 0 0 0 256 0c-5.45 0-10.53 2.78-13.47 7.37-2.55 3.98-62.53 98.91-62.53 217.7 0 1.47.01 2.94.01 4.4-74.03-60.16-156.69-78.9-160.58-79.76-1.14-.25-2.29-.38-3.44-.38-4.2 0-8.29 1.66-11.32 4.7A15.986 15.986 0 0 0 .38 168.8c.88 3.97 20.68 90.52 84.93 165.64-44.39 8.92-75.21 24.99-76.78 25.81a16.003 16.003 0 0 0-.02 28.29c2.45 1.29 60.76 31.72 133.49 31.72 6.14 0 11.96-.1 17.5-.31-11.37 22.23-16.52 38.31-16.81 39.22-1.8 5.68-.29 11.89 3.91 16.11a16.019 16.019 0 0 0 16.1 3.99c1.83-.57 37.72-11.99 77.3-39.29V504c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-64.01c39.58 27.3 75.47 38.71 77.3 39.29a16.019 16.019 0 0 0 16.1-3.99c4.2-4.22 5.71-10.43 3.91-16.11-.29-.91-5.45-16.99-16.81-39.22 5.54.21 11.37.31 17.5.31 72.72 0 131.04-30.43 133.49-31.72 5.24-2.78 8.52-8.22 8.51-14.15-.01-5.94-3.29-11.39-8.53-14.15z", + ], + }, + ht = { + prefix: "fas", + iconName: "capsules", + icon: [ + 576, + 512, + [], + "f46b", + "M555.3 300.1L424.2 112.8C401.9 81 366.4 64 330.4 64c-22.6 0-45.5 6.7-65.5 20.7-19.7 13.8-33.7 32.8-41.5 53.8C220.5 79.2 172 32 112 32 50.1 32 0 82.1 0 144v224c0 61.9 50.1 112 112 112s112-50.1 112-112V218.9c3.3 8.6 7.3 17.1 12.8 25L368 431.2c22.2 31.8 57.7 48.8 93.8 48.8 22.7 0 45.5-6.7 65.5-20.7 51.7-36.2 64.2-107.5 28-159.2zM160 256H64V144c0-26.5 21.5-48 48-48s48 21.5 48 48v112zm194.8 44.9l-65.6-93.7c-7.7-11-10.7-24.4-8.3-37.6 2.3-13.2 9.7-24.8 20.7-32.5 8.5-6 18.5-9.1 28.8-9.1 16.5 0 31.9 8 41.3 21.5l65.6 93.7-82.5 57.7z", + ], + }, + dt = { + prefix: "fas", + iconName: "car", + icon: [ + 512, + 512, + [], + "f1b9", + "M499.99 176h-59.87l-16.64-41.6C406.38 91.63 365.57 64 319.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4L71.87 176H12.01C4.2 176-1.53 183.34.37 190.91l6 24C7.7 220.25 12.5 224 18.01 224h20.07C24.65 235.73 16 252.78 16 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-19.22-8.65-36.27-22.07-48H494c5.51 0 10.31-3.75 11.64-9.09l6-24c1.89-7.57-3.84-14.91-11.65-14.91zm-352.06-17.83c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L384 208H128l19.93-49.83zM96 319.8c-19.2 0-32-12.76-32-31.9S76.8 256 96 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S396.8 256 416 256s32 12.76 32 31.9-12.8 31.9-32 31.9z", + ], + }, + pt = { + prefix: "fas", + iconName: "car-alt", + icon: [ + 480, + 512, + [], + "f5de", + "M438.66 212.33l-11.24-28.1-19.93-49.83C390.38 91.63 349.57 64 303.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4l-19.93 49.83-11.24 28.1C17.22 221.5 0 244.66 0 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-27.34-17.22-50.5-41.34-59.67zm-306.73-54.16c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L368 208H112l19.93-49.83zM80 319.8c-19.2 0-32-12.76-32-31.9S60.8 256 80 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S380.8 256 400 256s32 12.76 32 31.9-12.8 31.9-32 31.9z", + ], + }, + ft = { + prefix: "fas", + iconName: "car-battery", + icon: [ + 512, + 512, + [], + "f5df", + "M480 128h-32V80c0-8.84-7.16-16-16-16h-96c-8.84 0-16 7.16-16 16v48H192V80c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v48H32c-17.67 0-32 14.33-32 32v256c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32V160c0-17.67-14.33-32-32-32zM192 264c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16zm256 0c0 4.42-3.58 8-8 8h-40v40c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-40h-40c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h40v-40c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v40h40c4.42 0 8 3.58 8 8v16z", + ], + }, + mt = { + prefix: "fas", + iconName: "car-crash", + icon: [ + 640, + 512, + [], + "f5e1", + "M143.25 220.81l-12.42 46.37c-3.01 11.25-3.63 22.89-2.41 34.39l-35.2 28.98c-6.57 5.41-16.31-.43-14.62-8.77l15.44-76.68c1.06-5.26-2.66-10.28-8-10.79l-77.86-7.55c-8.47-.82-11.23-11.83-4.14-16.54l65.15-43.3c4.46-2.97 5.38-9.15 1.98-13.29L21.46 93.22c-5.41-6.57.43-16.3 8.78-14.62l76.68 15.44c5.26 1.06 10.28-2.66 10.8-8l7.55-77.86c.82-8.48 11.83-11.23 16.55-4.14l43.3 65.14c2.97 4.46 9.15 5.38 13.29 1.98l60.4-49.71c6.57-5.41 16.3.43 14.62 8.77L262.1 86.38c-2.71 3.05-5.43 6.09-7.91 9.4l-32.15 42.97-10.71 14.32c-32.73 8.76-59.18 34.53-68.08 67.74zm494.57 132.51l-12.42 46.36c-3.13 11.68-9.38 21.61-17.55 29.36a66.876 66.876 0 0 1-8.76 7l-13.99 52.23c-1.14 4.27-3.1 8.1-5.65 11.38-7.67 9.84-20.74 14.68-33.54 11.25L515 502.62c-17.07-4.57-27.2-22.12-22.63-39.19l8.28-30.91-247.28-66.26-8.28 30.91c-4.57 17.07-22.12 27.2-39.19 22.63l-30.91-8.28c-12.8-3.43-21.7-14.16-23.42-26.51-.57-4.12-.35-8.42.79-12.68l13.99-52.23a66.62 66.62 0 0 1-4.09-10.45c-3.2-10.79-3.65-22.52-.52-34.2l12.42-46.37c5.31-19.8 19.36-34.83 36.89-42.21a64.336 64.336 0 0 1 18.49-4.72l18.13-24.23 32.15-42.97c3.45-4.61 7.19-8.9 11.2-12.84 8-7.89 17.03-14.44 26.74-19.51 4.86-2.54 9.89-4.71 15.05-6.49 10.33-3.58 21.19-5.63 32.24-6.04 11.05-.41 22.31.82 33.43 3.8l122.68 32.87c11.12 2.98 21.48 7.54 30.85 13.43a111.11 111.11 0 0 1 34.69 34.5c8.82 13.88 14.64 29.84 16.68 46.99l6.36 53.29 3.59 30.05a64.49 64.49 0 0 1 22.74 29.93c4.39 11.88 5.29 25.19 1.75 38.39zM255.58 234.34c-18.55-4.97-34.21 4.04-39.17 22.53-4.96 18.49 4.11 34.12 22.65 39.09 18.55 4.97 45.54 15.51 50.49-2.98 4.96-18.49-15.43-53.67-33.97-58.64zm290.61 28.17l-6.36-53.29c-.58-4.87-1.89-9.53-3.82-13.86-5.8-12.99-17.2-23.01-31.42-26.82l-122.68-32.87a48.008 48.008 0 0 0-50.86 17.61l-32.15 42.97 172 46.08 75.29 20.18zm18.49 54.65c-18.55-4.97-53.8 15.31-58.75 33.79-4.95 18.49 23.69 22.86 42.24 27.83 18.55 4.97 34.21-4.04 39.17-22.53 4.95-18.48-4.11-34.12-22.66-39.09z", + ], + }, + gt = { + prefix: "fas", + iconName: "car-side", + icon: [ + 640, + 512, + [], + "f5e4", + "M544 192h-16L419.22 56.02A64.025 64.025 0 0 0 369.24 32H155.33c-26.17 0-49.7 15.93-59.42 40.23L48 194.26C20.44 201.4 0 226.21 0 256v112c0 8.84 7.16 16 16 16h48c0 53.02 42.98 96 96 96s96-42.98 96-96h128c0 53.02 42.98 96 96 96s96-42.98 96-96h48c8.84 0 16-7.16 16-16v-80c0-53.02-42.98-96-96-96zM160 432c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48zm72-240H116.93l38.4-96H232v96zm48 0V96h89.24l76.8 96H280zm200 240c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48z", + ], + }, + bt = { prefix: "fas", iconName: "caret-down", icon: [320, 512, [], "f0d7", "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"] }, + _t = { + prefix: "fas", + iconName: "caret-left", + icon: [192, 512, [], "f0d9", "M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"], + }, + vt = { + prefix: "fas", + iconName: "caret-right", + icon: [192, 512, [], "f0da", "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"], + }, + yt = { + prefix: "fas", + iconName: "caret-square-down", + icon: [ + 448, + 512, + [], + "f150", + "M448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zM92.5 220.5l123 123c4.7 4.7 12.3 4.7 17 0l123-123c7.6-7.6 2.2-20.5-8.5-20.5H101c-10.7 0-16.1 12.9-8.5 20.5z", + ], + }, + Ct = { + prefix: "fas", + iconName: "caret-square-left", + icon: [ + 448, + 512, + [], + "f191", + "M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM259.515 124.485l-123.03 123.03c-4.686 4.686-4.686 12.284 0 16.971l123.029 123.029c7.56 7.56 20.485 2.206 20.485-8.485V132.971c.001-10.691-12.925-16.045-20.484-8.486z", + ], + }, + Pt = { + prefix: "fas", + iconName: "caret-square-right", + icon: [ + 448, + 512, + [], + "f152", + "M48 32h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48zm140.485 355.515l123.029-123.029c4.686-4.686 4.686-12.284 0-16.971l-123.029-123.03c-7.56-7.56-20.485-2.206-20.485 8.485v246.059c0 10.691 12.926 16.045 20.485 8.486z", + ], + }, + xt = { + prefix: "fas", + iconName: "caret-square-up", + icon: [ + 448, + 512, + [], + "f151", + "M0 432V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48zm355.515-140.485l-123.03-123.03c-4.686-4.686-12.284-4.686-16.971 0L92.485 291.515c-7.56 7.56-2.206 20.485 8.485 20.485h246.059c10.691 0 16.045-12.926 8.486-20.485z", + ], + }, + Tt = { + prefix: "fas", + iconName: "caret-up", + icon: [320, 512, [], "f0d8", "M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"], + }, + St = { + prefix: "fas", + iconName: "cart-arrow-down", + icon: [ + 576, + 512, + [], + "f218", + "M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM403.029 192H360v-60c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v60h-43.029c-10.691 0-16.045 12.926-8.485 20.485l67.029 67.029c4.686 4.686 12.284 4.686 16.971 0l67.029-67.029c7.559-7.559 2.205-20.485-8.486-20.485z", + ], + }, + Ot = { + prefix: "fas", + iconName: "cart-plus", + icon: [ + 576, + 512, + [], + "f217", + "M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM408 168h-48v-40c0-8.837-7.163-16-16-16h-16c-8.837 0-16 7.163-16 16v40h-48c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h48v40c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-40h48c8.837 0 16-7.163 16-16v-16c0-8.837-7.163-16-16-16z", + ], + }, + Et = { + prefix: "fas", + iconName: "cat", + icon: [ + 512, + 512, + [], + "f6be", + "M290.59 192c-20.18 0-106.82 1.98-162.59 85.95V192c0-52.94-43.06-96-96-96-17.67 0-32 14.33-32 32s14.33 32 32 32c17.64 0 32 14.36 32 32v256c0 35.3 28.7 64 64 64h176c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-32l128-96v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V289.86c-10.29 2.67-20.89 4.54-32 4.54-61.81 0-113.52-44.05-125.41-102.4zM448 96h-64l-64-64v134.4c0 53.02 42.98 96 96 96s96-42.98 96-96V32l-64 64zm-72 80c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm80 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z", + ], + }, + Mt = { + prefix: "fas", + iconName: "certificate", + icon: [ + 512, + 512, + [], + "f0a3", + "M458.622 255.92l45.985-45.005c13.708-12.977 7.316-36.039-10.664-40.339l-62.65-15.99 17.661-62.015c4.991-17.838-11.829-34.663-29.661-29.671l-61.994 17.667-15.984-62.671C337.085.197 313.765-6.276 300.99 7.228L256 53.57 211.011 7.229c-12.63-13.351-36.047-7.234-40.325 10.668l-15.984 62.671-61.995-17.667C74.87 57.907 58.056 74.738 63.046 92.572l17.661 62.015-62.65 15.99C.069 174.878-6.31 197.944 7.392 210.915l45.985 45.005-45.985 45.004c-13.708 12.977-7.316 36.039 10.664 40.339l62.65 15.99-17.661 62.015c-4.991 17.838 11.829 34.663 29.661 29.671l61.994-17.667 15.984 62.671c4.439 18.575 27.696 24.018 40.325 10.668L256 458.61l44.989 46.001c12.5 13.488 35.987 7.486 40.325-10.668l15.984-62.671 61.994 17.667c17.836 4.994 34.651-11.837 29.661-29.671l-17.661-62.015 62.65-15.99c17.987-4.302 24.366-27.367 10.664-40.339l-45.984-45.004z", + ], + }, + At = { + prefix: "fas", + iconName: "chair", + icon: [ + 448, + 512, + [], + "f6c0", + "M446.33 341.88l-10.67-32A31.996 31.996 0 0 0 405.3 288H42.69c-13.77 0-26 8.81-30.36 21.88l-10.67 32C-5.24 362.6 10.18 384 32.03 384H32v112c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V384h256v112c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V384h-.03c21.85 0 37.27-21.4 30.36-42.12zM112 128c0-29.48 16.2-54.99 40-68.87V256h48V48h48v208h48V59.13c23.8 13.88 40 39.39 40 68.87v128h48V128C384 57.31 326.69 0 256 0h-64C121.31 0 64 57.31 64 128v128h48V128z", + ], + }, + It = { + prefix: "fas", + iconName: "chalkboard", + icon: [ + 640, + 512, + [], + "f51b", + "M96 64h448v352h64V40c0-22.06-17.94-40-40-40H72C49.94 0 32 17.94 32 40v376h64V64zm528 384H480v-64H288v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + Dt = { + prefix: "fas", + iconName: "chalkboard-teacher", + icon: [ + 640, + 512, + [], + "f51c", + "M208 352c-2.39 0-4.78.35-7.06 1.09C187.98 357.3 174.35 360 160 360c-14.35 0-27.98-2.7-40.95-6.91-2.28-.74-4.66-1.09-7.05-1.09C49.94 352-.33 402.48 0 464.62.14 490.88 21.73 512 48 512h224c26.27 0 47.86-21.12 48-47.38.33-62.14-49.94-112.62-112-112.62zm-48-32c53.02 0 96-42.98 96-96s-42.98-96-96-96-96 42.98-96 96 42.98 96 96 96zM592 0H208c-26.47 0-48 22.25-48 49.59V96c23.42 0 45.1 6.78 64 17.8V64h352v288h-64v-64H384v64h-76.24c19.1 16.69 33.12 38.73 39.69 64H592c26.47 0 48-22.25 48-49.59V49.59C640 22.25 618.47 0 592 0z", + ], + }, + Rt = { + prefix: "fas", + iconName: "charging-station", + icon: [ + 576, + 512, + [], + "f5e7", + "M336 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h320c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm208-320V80c0-8.84-7.16-16-16-16s-16 7.16-16 16v48h-32V80c0-8.84-7.16-16-16-16s-16 7.16-16 16v48h-16c-8.84 0-16 7.16-16 16v32c0 35.76 23.62 65.69 56 75.93v118.49c0 13.95-9.5 26.92-23.26 29.19C431.22 402.5 416 388.99 416 372v-28c0-48.6-39.4-88-88-88h-8V64c0-35.35-28.65-64-64-64H96C60.65 0 32 28.65 32 64v352h288V304h8c22.09 0 40 17.91 40 40v24.61c0 39.67 28.92 75.16 68.41 79.01C481.71 452.05 520 416.41 520 372V251.93c32.38-10.24 56-40.17 56-75.93v-32c0-8.84-7.16-16-16-16h-16zm-283.91 47.76l-93.7 139c-2.2 3.33-6.21 5.24-10.39 5.24-7.67 0-13.47-6.28-11.67-12.92L167.35 224H108c-7.25 0-12.85-5.59-11.89-11.89l16-107C112.9 99.9 117.98 96 124 96h68c7.88 0 13.62 6.54 11.6 13.21L192 160h57.7c9.24 0 15.01 8.78 10.39 15.76z", + ], + }, + wt = { + prefix: "fas", + iconName: "chart-area", + icon: [ + 512, + 512, + [], + "f1fe", + "M500 384c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v308h436zM372.7 159.5L288 216l-85.3-113.7c-5.1-6.8-15.5-6.3-19.9 1L96 248v104h384l-89.9-187.8c-3.2-6.5-11.4-8.7-17.4-4.7z", + ], + }, + Lt = { + prefix: "fas", + iconName: "chart-bar", + icon: [ + 512, + 512, + [], + "f080", + "M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + Ft = { + prefix: "fas", + iconName: "chart-line", + icon: [ + 512, + 512, + [], + "f201", + "M496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM464 96H345.94c-21.38 0-32.09 25.85-16.97 40.97l32.4 32.4L288 242.75l-73.37-73.37c-12.5-12.5-32.76-12.5-45.25 0l-68.69 68.69c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L192 237.25l73.37 73.37c12.5 12.5 32.76 12.5 45.25 0l96-96 32.4 32.4c15.12 15.12 40.97 4.41 40.97-16.97V112c.01-8.84-7.15-16-15.99-16z", + ], + }, + Nt = { + prefix: "fas", + iconName: "chart-pie", + icon: [ + 544, + 512, + [], + "f200", + "M527.79 288H290.5l158.03 158.03c6.04 6.04 15.98 6.53 22.19.68 38.7-36.46 65.32-85.61 73.13-140.86 1.34-9.46-6.51-17.85-16.06-17.85zm-15.83-64.8C503.72 103.74 408.26 8.28 288.8.04 279.68-.59 272 7.1 272 16.24V240h223.77c9.14 0 16.82-7.68 16.19-16.8zM224 288V50.71c0-9.55-8.39-17.4-17.84-16.06C86.99 51.49-4.1 155.6.14 280.37 4.5 408.51 114.83 513.59 243.03 511.98c50.4-.63 96.97-16.87 135.26-44.03 7.9-5.6 8.42-17.23 1.57-24.08L224 288z", + ], + }, + kt = { + prefix: "fas", + iconName: "check", + icon: [ + 512, + 512, + [], + "f00c", + "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z", + ], + }, + zt = { + prefix: "fas", + iconName: "check-circle", + icon: [ + 512, + 512, + [], + "f058", + "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z", + ], + }, + jt = { + prefix: "fas", + iconName: "check-double", + icon: [ + 512, + 512, + [], + "f560", + "M504.5 171.95l-36.2-36.41c-10-10.05-26.21-10.05-36.2 0L192 377.02 79.9 264.28c-10-10.06-26.21-10.06-36.2 0L7.5 300.69c-10 10.05-10 26.36 0 36.41l166.4 167.36c10 10.06 26.21 10.06 36.2 0l294.4-296.09c10-10.06 10-26.36 0-36.42zM166.57 282.71c6.84 7.02 18.18 7.02 25.21.18L403.85 72.62c7.02-6.84 7.02-18.18.18-25.21L362.08 5.29c-6.84-7.02-18.18-7.02-25.21-.18L179.71 161.19l-68.23-68.77c-6.84-7.02-18.18-7.02-25.2-.18l-42.13 41.77c-7.02 6.84-7.02 18.18-.18 25.2l122.6 123.5z", + ], + }, + Bt = { + prefix: "fas", + iconName: "check-square", + icon: [ + 448, + 512, + [], + "f14a", + "M400 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zm-204.686-98.059l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.248-16.379-6.249-22.628 0L184 302.745l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.25 16.379 6.25 22.628.001z", + ], + }, + Vt = { + prefix: "fas", + iconName: "chess", + icon: [ + 512, + 512, + [], + "f439", + "M199.821 217.633a6 6 0 0 1 6 6l-.001 20.766a6 6 0 0 1-6 6h-25.805c0 31.715-2.153 96.201 17.398 153.229H64.597C84.54 345.452 82.02 279.245 82.02 250.399H56.183a6 6 0 0 1-6-6l.002-20.766a6 6 0 0 1 6-6h143.636zM41.554 115.088l34.58 95.071h103.734l34.572-95.072c2.846-7.826-2.95-16.101-11.278-16.101H152v-30.22h21.57a6 6 0 0 0 6-6V40.383a6 6 0 0 0-6-6h-28.367V6a6 6 0 0 0-6-6H116.82a6 6 0 0 0-6 6v28.383H82.421a6 6 0 0 0-6 6v22.383a6 6 0 0 0 6 6H104v30.219H52.831c-8.328.001-14.124 8.276-11.277 16.103zM222.678 445.17v-28.067a6 6 0 0 0-6-6H39.322a6 6 0 0 0-6 6v28.067l-22.148 14.164a6 6 0 0 0-2.767 5.055V506a6 6 0 0 0 6 6h227.187a6 6 0 0 0 6-6v-41.612a6 6 0 0 0-2.767-5.055l-22.149-14.163zm90.578-144.225l24.88 16.963c.09 18.124-.167 63.904-11.905 114.522h147.526c-11.713-50.475-11.969-96.324-11.882-114.537l24.859-16.949a3.856 3.856 0 0 0 1.684-3.187v-69.901a3.857 3.857 0 0 0-3.857-3.857h-27.655a3.857 3.857 0 0 0-3.857 3.857v31.514h-22.737v-31.514a3.857 3.857 0 0 0-3.858-3.857h-52.918a3.857 3.857 0 0 0-3.857 3.857v31.514h-22.737v-31.514a3.857 3.857 0 0 0-3.857-3.857H315.43a3.857 3.857 0 0 0-3.857 3.857v69.901a3.855 3.855 0 0 0 1.683 3.188zm71.585 51.906c0-8.372 6.787-15.158 15.159-15.158s15.158 6.787 15.158 15.158v30.318h-30.317v-30.318zM504.62 470.059l-13.664-10.639v-15.552a3.857 3.857 0 0 0-3.857-3.857H312.915a3.857 3.857 0 0 0-3.857 3.857v15.552l-13.677 10.639a3.857 3.857 0 0 0-1.488 3.044v35.039a3.857 3.857 0 0 0 3.857 3.857h204.5a3.857 3.857 0 0 0 3.857-3.857v-35.04a3.859 3.859 0 0 0-1.487-3.043z", + ], + }, + Gt = { + prefix: "fas", + iconName: "chess-bishop", + icon: [ + 320, + 512, + [], + "f43a", + "M123.158 77.881C107.369 72.53 96 57.597 96 40c0-22.091 17.909-40 40-40h47.796c22.091 0 40 17.909 40 40 0 17.541-11.295 32.434-27.005 37.829 23.993 16.657 48.577 46.839 68.703 82.05L144.929 280.443a6 6 0 0 0 0 8.485l14.142 14.142a6 6 0 0 0 8.485 0L280.9 189.726c17.758 38.297 29.371 79.443 29.371 114.273 0 53.786-22.897 75.788-58.446 86.033V448H68.174v-57.97C32.631 379.784 9.739 357.781 9.739 304c0-78.029 58.281-187.766 113.419-226.119zM320 500v-24c0-6.627-5.373-12-12-12H12c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12z", + ], + }, + Ut = { + prefix: "fas", + iconName: "chess-board", + icon: [ + 512, + 512, + [], + "f43c", + "M256 256v64h-64v-64h64zm0-256h-64v64h64V0zm0 256h64v-64h-64v64zM384 0h-64v64h64V0zm0 512h64v-64h-64v64zm128-64v-64h-64v64h64zm-384 64h64v-64h-64v64zm0-512H64v64h64V0zm384 192v-64h-64v64h64zm0 128v-64h-64v64h64zM0 512h64v-64H0v64zM0 64v64h64V64H0zm0 128v64h64v-64H0zm0 128v64h64v-64H0zm256 192h64v-64h-64v64zm-64-128v64h64v-64h-64zm64-192v-64h-64v64h64zM64 384v64h64v-64H64zm64-128H64v64h64v-64zm256 128h64v-64h-64v64zM512 0h-64v64h64V0zM384 256h64v-64h-64v64zm0-192v64h64V64h-64zm-64 320v64h64v-64h-64zm-192-64v64h64v-64h-64zm128 0v64h64v-64h-64zm-64-128h-64v64h64v-64zm-64-64H64v64h64v-64zm192 192h64v-64h-64v64zM192 128V64h-64v64h64zm128 0V64h-64v64h64zm0 64h64v-64h-64v64z", + ], + }, + Ht = { + prefix: "fas", + iconName: "chess-king", + icon: [ + 448, + 512, + [], + "f43f", + "M416 476v24c0 6.627-5.373 12-12 12H44c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12zm-8.033-324H248v-48h50a6 6 0 0 0 6-6V62a6 6 0 0 0-6-6h-50V6a6 6 0 0 0-6-6h-36a6 6 0 0 0-6 6v50h-50a6 6 0 0 0-6 6v36a6 6 0 0 0 6 6h50v48H40.033c-27.574 0-46.879 27.244-37.738 53.259L87.582 448h272.836l85.287-242.741C454.846 179.244 435.541 152 407.967 152z", + ], + }, + Wt = { + prefix: "fas", + iconName: "chess-knight", + icon: [ + 384, + 512, + [], + "f441", + "M352 224v224H32v-46.557c0-30.302 17.12-58.003 44.223-71.554l57.243-28.622A48 48 0 0 0 160 258.334V208l-22.127 11.063a23.996 23.996 0 0 0-12.55 15.645l-11.835 47.338a12 12 0 0 1-7.185 8.231l-29.601 11.84a11.998 11.998 0 0 1-9.33-.176L7.126 275.167A12 12 0 0 1 0 264.201v-158.26c0-6.365 2.529-12.47 7.03-16.971L16 80 1.789 51.578A16.937 16.937 0 0 1 0 44c0-6.627 5.373-12 12-12h148c106.039 0 192 85.961 192 192zm20 240H12c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h360c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12zM52 128c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20z", + ], + }, + Xt = { + prefix: "fas", + iconName: "chess-pawn", + icon: [ + 320, + 512, + [], + "f443", + "M264 448H56s60-42.743 60-176H84c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h40.209C95.721 210.56 76 181.588 76 148c0-46.392 37.608-84 84-84s84 37.608 84 84c0 33.588-19.721 62.56-48.209 76H236c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12h-32c0 133.257 60 176 60 176zm28 16H28c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h264c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12z", + ], + }, + Yt = { + prefix: "fas", + iconName: "chess-queen", + icon: [ + 512, + 512, + [], + "f445", + "M436 512H76c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12zM255.579 0c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zm204.568 154.634c-5.768-3.045-12.916-.932-16.082 4.77-8.616 15.516-22.747 37.801-44.065 37.801-28.714 0-30.625-19.804-31.686-57.542-.183-6.492-5.501-11.664-11.995-11.664h-41.006c-5.175 0-9.754 3.328-11.388 8.238-8.89 26.709-26.073 40.992-47.925 40.992s-39.034-14.283-47.925-40.992c-1.634-4.91-6.213-8.238-11.388-8.238h-41.005c-6.495 0-11.813 5.174-11.995 11.667-1.052 37.642-2.934 57.539-31.688 57.539-20.691 0-33.817-20.224-44.425-38.025-3.266-5.48-10.258-7.431-15.899-4.453l-39.179 20.679a12 12 0 0 0-5.51 15.145L112 448h288l105.014-257.448a12 12 0 0 0-5.51-15.145l-39.357-20.773z", + ], + }, + Kt = { + prefix: "fas", + iconName: "chess-rook", + icon: [ + 384, + 512, + [], + "f447", + "M81.241 215.027C80.957 258.92 77.411 348.076 48 448h287.982c-29.4-99.604-32.936-188.912-33.221-232.975l45.418-42.312a11.998 11.998 0 0 0 3.82-8.78V44c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v44h-48V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v44H96V44c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v119.932c0 3.33 1.384 6.51 3.82 8.78l45.421 42.315zM160 256c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v64.004h-64V256zm224 220v24c0 6.627-5.373 12-12 12H12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12z", + ], + }, + Zt = { + prefix: "fas", + iconName: "chevron-circle-down", + icon: [ + 512, + 512, + [], + "f13a", + "M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM273 369.9l135.5-135.5c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L256 285.1 154.4 183.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L239 369.9c9.4 9.4 24.6 9.4 34 0z", + ], + }, + qt = { + prefix: "fas", + iconName: "chevron-circle-left", + icon: [ + 512, + 512, + [], + "f137", + "M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z", + ], + }, + Qt = { + prefix: "fas", + iconName: "chevron-circle-right", + icon: [ + 512, + 512, + [], + "f138", + "M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z", + ], + }, + Jt = { + prefix: "fas", + iconName: "chevron-circle-up", + icon: [ + 512, + 512, + [], + "f139", + "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm231-113.9L103.5 277.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L256 226.9l101.6 101.6c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L273 142.1c-9.4-9.4-24.6-9.4-34 0z", + ], + }, + $t = { + prefix: "fas", + iconName: "chevron-down", + icon: [ + 448, + 512, + [], + "f078", + "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z", + ], + }, + en = { + prefix: "fas", + iconName: "chevron-left", + icon: [ + 320, + 512, + [], + "f053", + "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z", + ], + }, + tn = { + prefix: "fas", + iconName: "chevron-right", + icon: [ + 320, + 512, + [], + "f054", + "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z", + ], + }, + nn = { + prefix: "fas", + iconName: "chevron-up", + icon: [ + 448, + 512, + [], + "f077", + "M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z", + ], + }, + rn = { + prefix: "fas", + iconName: "child", + icon: [ + 384, + 512, + [], + "f1ae", + "M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z", + ], + }, + on = { + prefix: "fas", + iconName: "church", + icon: [ + 640, + 512, + [], + "f51d", + "M464.46 246.68L352 179.2V128h48c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16h-48V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v48h-48c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h48v51.2l-112.46 67.48A31.997 31.997 0 0 0 160 274.12V512h96v-96c0-35.35 28.65-64 64-64s64 28.65 64 64v96h96V274.12c0-11.24-5.9-21.66-15.54-27.44zM0 395.96V496c0 8.84 7.16 16 16 16h112V320L19.39 366.54A32.024 32.024 0 0 0 0 395.96zm620.61-29.42L512 320v192h112c8.84 0 16-7.16 16-16V395.96c0-12.8-7.63-24.37-19.39-29.42z", + ], + }, + an = { prefix: "fas", iconName: "circle", icon: [512, 512, [], "f111", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"] }, + sn = { + prefix: "fas", + iconName: "circle-notch", + icon: [ + 512, + 512, + [], + "f1ce", + "M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z", + ], + }, + cn = { + prefix: "fas", + iconName: "city", + icon: [ + 640, + 512, + [], + "f64f", + "M616 192H480V24c0-13.26-10.74-24-24-24H312c-13.26 0-24 10.74-24 24v72h-64V16c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v80h-64V16c0-8.84-7.16-16-16-16H80c-8.84 0-16 7.16-16 16v80H24c-13.26 0-24 10.74-24 24v360c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V216c0-13.26-10.75-24-24-24zM128 404c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12H76c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm128 192c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm160 96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12V76c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm160 288c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40zm0-96c0 6.63-5.37 12-12 12h-40c-6.63 0-12-5.37-12-12v-40c0-6.63 5.37-12 12-12h40c6.63 0 12 5.37 12 12v40z", + ], + }, + ln = { + prefix: "fas", + iconName: "clipboard", + icon: [ + 384, + 512, + [], + "f328", + "M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z", + ], + }, + un = { + prefix: "fas", + iconName: "clipboard-check", + icon: [ + 384, + 512, + [], + "f46c", + "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm121.2 231.8l-143 141.8c-4.7 4.7-12.3 4.6-17-.1l-82.6-83.3c-4.7-4.7-4.6-12.3.1-17L99.1 285c4.7-4.7 12.3-4.6 17 .1l46 46.4 106-105.2c4.7-4.7 12.3-4.6 17 .1l28.2 28.4c4.7 4.8 4.6 12.3-.1 17z", + ], + }, + hn = { + prefix: "fas", + iconName: "clipboard-list", + icon: [ + 384, + 512, + [], + "f46d", + "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z", + ], + }, + dn = { + prefix: "fas", + iconName: "clock", + icon: [ + 512, + 512, + [], + "f017", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z", + ], + }, + pn = { + prefix: "fas", + iconName: "clone", + icon: [ + 512, + 512, + [], + "f24d", + "M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z", + ], + }, + fn = { + prefix: "fas", + iconName: "closed-captioning", + icon: [ + 512, + 512, + [], + "f20a", + "M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM218.1 287.7c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2.1 48 51.1 70.5 92.3 32.6zm190.4 0c2.8-2.5 7.1-2.1 9.2.9l19.5 27.7c1.7 2.4 1.5 5.6-.5 7.7-53.5 56.9-172.7 32.1-172.7-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 222.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6z", + ], + }, + mn = { + prefix: "fas", + iconName: "cloud", + icon: [ + 640, + 512, + [], + "f0c2", + "M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4z", + ], + }, + gn = { + prefix: "fas", + iconName: "cloud-download-alt", + icon: [ + 640, + 512, + [], + "f381", + "M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zm-132.9 88.7L299.3 420.7c-6.2 6.2-16.4 6.2-22.6 0L171.3 315.3c-10.1-10.1-2.9-27.3 11.3-27.3H248V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v112h65.4c14.2 0 21.4 17.2 11.3 27.3z", + ], + }, + bn = { + prefix: "fas", + iconName: "cloud-moon", + icon: [ + 640, + 512, + [], + "f6c3", + "M342.75 352.68c5.74-9.59 9.25-20.69 9.25-32.68 0-35.35-28.65-64-64-64-17.21 0-32.77 6.88-44.27 17.93C227.39 244.3 196.23 224 160 224c-53.02 0-96 42.98-96 96 0 1.95.46 3.78.57 5.7C27.08 338.77 0 374.05 0 416c0 53.02 42.98 96 96 96h240c44.18 0 80-35.82 80-80 0-41.87-32.28-75.84-73.25-79.32zm285.26-29.42c-104.23 19.22-199.95-58.16-199.95-160.03 0-58.68 32.45-112.64 85.18-141.7 8.13-4.48 6.08-16.41-3.15-18.06C497.14 1.17 484 0 470.84 0 352.25 0 256 93.04 256 208c0 7.26.4 14.44 1.15 21.51 9.87-3.38 20.18-5.51 30.85-5.51 52.94 0 96 43.06 96 96 0 3.59-.21 7.17-.63 10.73 33.49 15.39 57.47 46.55 63.24 83.86 7.96.87 16.03 1.41 24.23 1.41 66.26 0 126.79-29.19 166.88-77.02 5.93-7.07-.54-17.41-9.71-15.72z", + ], + }, + _n = { + prefix: "fas", + iconName: "cloud-sun", + icon: [ + 640, + 512, + [], + "f6c4", + "M342.75 352.68c5.74-9.59 9.25-20.69 9.25-32.68 0-35.35-28.65-64-64-64-17.21 0-32.77 6.88-44.27 17.93C227.39 244.31 196.23 224 160 224c-53.02 0-96 42.98-96 96 0 1.95.46 3.78.57 5.7C27.08 338.77 0 374.05 0 416c0 53.02 42.98 96 96 96h240c44.18 0 80-35.82 80-80 0-41.87-32.28-75.84-73.25-79.32zm243.19-99.8c-7.85-6.79-7.85-18.97 0-25.76L633.41 186c12.76-11.05 5.84-32.02-11-33.3l-61.59-4.67c-10.19-.78-17.28-10.49-14.9-20.43l14.95-62.48c3.89-16.26-13.96-29.02-28.08-20.07l-52.51 33.26c-8.61 5.46-20.06 1.75-23.85-7.72l-23.47-58.74c-6.32-15.81-28.19-15.81-34.51 0l-23.38 58.49c-3.83 9.59-15.44 13.35-24.17 7.82l-52.29-33.12c-14.13-8.95-31.98 3.81-28.08 20.07l14.95 62.48c2.38 9.94-4.7 19.65-14.9 20.43l-61.15 4.64c-17 1.29-23.99 22.46-11.1 33.62l31.23 27.05c7.82 5.17 15.21 11.01 21.78 17.84 11.42-4.71 23.73-7.18 36.37-7.18 5.97 0 11.77.71 17.44 1.76 7.09-54.98 53.68-97.76 110.56-97.76 61.76 0 112 50.24 112 112s-50.24 112-112 112c-.95 0-1.83-.26-2.77-.28 13.83 13.2 24.61 29.47 30.16 48.28h27.02c6.25 0 12.37 1.83 17.6 5.27l45.08 29.68c14.19 8.99 31.89-4.17 27.92-20.76l-14.69-61.38c-2.43-10.16 4.8-20.08 15.22-20.87l61.16-4.64c16.84-1.28 23.76-22.25 11-33.3l-47.47-41.11zm-202.66 59.94C393.3 317.34 404.32 320 416 320c44.11 0 80-35.89 80-80s-35.89-80-80-80c-43.25 0-78.39 34.56-79.75 77.49 26.44 15.53 44.59 43.13 47.03 75.33z", + ], + }, + vn = { + prefix: "fas", + iconName: "cloud-upload-alt", + icon: [ + 640, + 512, + [], + "f382", + "M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z", + ], + }, + yn = { + prefix: "fas", + iconName: "cocktail", + icon: [ + 576, + 512, + [], + "f561", + "M296 464h-56V338.78l168.74-168.73c15.52-15.52 4.53-42.05-17.42-42.05H24.68c-21.95 0-32.94 26.53-17.42 42.05L176 338.78V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40zM432 0c-62.61 0-115.35 40.2-135.18 96h52.54c16.65-28.55 47.27-48 82.64-48 52.93 0 96 43.06 96 96s-43.07 96-96 96c-14.04 0-27.29-3.2-39.32-8.64l-35.26 35.26C379.23 279.92 404.59 288 432 288c79.53 0 144-64.47 144-144S511.53 0 432 0z", + ], + }, + Cn = { + prefix: "fas", + iconName: "code", + icon: [ + 640, + 512, + [], + "f121", + "M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z", + ], + }, + Pn = { + prefix: "fas", + iconName: "code-branch", + icon: [ + 384, + 512, + [], + "f126", + "M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z", + ], + }, + xn = { + prefix: "fas", + iconName: "coffee", + icon: [ + 640, + 512, + [], + "f0f4", + "M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z", + ], + }, + Tn = { + prefix: "fas", + iconName: "cog", + icon: [ + 512, + 512, + [], + "f013", + "M444.788 291.1l42.616 24.599c4.867 2.809 7.126 8.618 5.459 13.985-11.07 35.642-29.97 67.842-54.689 94.586a12.016 12.016 0 0 1-14.832 2.254l-42.584-24.595a191.577 191.577 0 0 1-60.759 35.13v49.182a12.01 12.01 0 0 1-9.377 11.718c-34.956 7.85-72.499 8.256-109.219.007-5.49-1.233-9.403-6.096-9.403-11.723v-49.184a191.555 191.555 0 0 1-60.759-35.13l-42.584 24.595a12.016 12.016 0 0 1-14.832-2.254c-24.718-26.744-43.619-58.944-54.689-94.586-1.667-5.366.592-11.175 5.459-13.985L67.212 291.1a193.48 193.48 0 0 1 0-70.199l-42.616-24.599c-4.867-2.809-7.126-8.618-5.459-13.985 11.07-35.642 29.97-67.842 54.689-94.586a12.016 12.016 0 0 1 14.832-2.254l42.584 24.595a191.577 191.577 0 0 1 60.759-35.13V25.759a12.01 12.01 0 0 1 9.377-11.718c34.956-7.85 72.499-8.256 109.219-.007 5.49 1.233 9.403 6.096 9.403 11.723v49.184a191.555 191.555 0 0 1 60.759 35.13l42.584-24.595a12.016 12.016 0 0 1 14.832 2.254c24.718 26.744 43.619 58.944 54.689 94.586 1.667 5.366-.592 11.175-5.459 13.985L444.788 220.9a193.485 193.485 0 0 1 0 70.2zM336 256c0-44.112-35.888-80-80-80s-80 35.888-80 80 35.888 80 80 80 80-35.888 80-80z", + ], + }, + Sn = { + prefix: "fas", + iconName: "cogs", + icon: [ + 640, + 512, + [], + "f085", + "M512.1 191l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0L552 6.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zm-10.5-58.8c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.7-82.4 14.3-52.8 52.8zM386.3 286.1l33.7 16.8c10.1 5.8 14.5 18.1 10.5 29.1-8.9 24.2-26.4 46.4-42.6 65.8-7.4 8.9-20.2 11.1-30.3 5.3l-29.1-16.8c-16 13.7-34.6 24.6-54.9 31.7v33.6c0 11.6-8.3 21.6-19.7 23.6-24.6 4.2-50.4 4.4-75.9 0-11.5-2-20-11.9-20-23.6V418c-20.3-7.2-38.9-18-54.9-31.7L74 403c-10 5.8-22.9 3.6-30.3-5.3-16.2-19.4-33.3-41.6-42.2-65.7-4-10.9.4-23.2 10.5-29.1l33.3-16.8c-3.9-20.9-3.9-42.4 0-63.4L12 205.8c-10.1-5.8-14.6-18.1-10.5-29 8.9-24.2 26-46.4 42.2-65.8 7.4-8.9 20.2-11.1 30.3-5.3l29.1 16.8c16-13.7 34.6-24.6 54.9-31.7V57.1c0-11.5 8.2-21.5 19.6-23.5 24.6-4.2 50.5-4.4 76-.1 11.5 2 20 11.9 20 23.6v33.6c20.3 7.2 38.9 18 54.9 31.7l29.1-16.8c10-5.8 22.9-3.6 30.3 5.3 16.2 19.4 33.2 41.6 42.1 65.8 4 10.9.1 23.2-10 29.1l-33.7 16.8c3.9 21 3.9 42.5 0 63.5zm-117.6 21.1c59.2-77-28.7-164.9-105.7-105.7-59.2 77 28.7 164.9 105.7 105.7zm243.4 182.7l-8.2 14.3c-3 5.3-9.4 7.5-15.1 5.4-11.8-4.4-22.6-10.7-32.1-18.6-4.6-3.8-5.8-10.5-2.8-15.7l8.2-14.3c-6.9-8-12.3-17.3-15.9-27.4h-16.5c-6 0-11.2-4.3-12.2-10.3-2-12-2.1-24.6 0-37.1 1-6 6.2-10.4 12.2-10.4h16.5c3.6-10.1 9-19.4 15.9-27.4l-8.2-14.3c-3-5.2-1.9-11.9 2.8-15.7 9.5-7.9 20.4-14.2 32.1-18.6 5.7-2.1 12.1.1 15.1 5.4l8.2 14.3c10.5-1.9 21.2-1.9 31.7 0l8.2-14.3c3-5.3 9.4-7.5 15.1-5.4 11.8 4.4 22.6 10.7 32.1 18.6 4.6 3.8 5.8 10.5 2.8 15.7l-8.2 14.3c6.9 8 12.3 17.3 15.9 27.4h16.5c6 0 11.2 4.3 12.2 10.3 2 12 2.1 24.6 0 37.1-1 6-6.2 10.4-12.2 10.4h-16.5c-3.6 10.1-9 19.4-15.9 27.4l8.2 14.3c3 5.2 1.9 11.9-2.8 15.7-9.5 7.9-20.4 14.2-32.1 18.6-5.7 2.1-12.1-.1-15.1-5.4l-8.2-14.3c-10.4 1.9-21.2 1.9-31.7 0zM501.6 431c38.5 29.6 82.4-14.3 52.8-52.8-38.5-29.6-82.4 14.3-52.8 52.8z", + ], + }, + On = { + prefix: "fas", + iconName: "coins", + icon: [ + 512, + 512, + [], + "f51e", + "M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z", + ], + }, + En = { + prefix: "fas", + iconName: "columns", + icon: [512, 512, [], "f0db", "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"], + }, + Mn = { + prefix: "fas", + iconName: "comment", + icon: [ + 512, + 512, + [], + "f075", + "M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z", + ], + }, + An = { + prefix: "fas", + iconName: "comment-alt", + icon: [512, 512, [], "f27a", "M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 9.8 11.2 15.5 19.1 9.7L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64z"], + }, + In = { + prefix: "fas", + iconName: "comment-dollar", + icon: [ + 512, + 512, + [], + "f651", + "M256 32C114.62 32 0 125.12 0 240c0 49.56 21.41 95.01 57.02 130.74C44.46 421.05 2.7 465.97 2.2 466.5A7.995 7.995 0 0 0 8 480c66.26 0 115.99-31.75 140.6-51.38C181.29 440.93 217.59 448 256 448c141.38 0 256-93.12 256-208S397.38 32 256 32zm24 302.44V352c0 8.84-7.16 16-16 16h-16c-8.84 0-16-7.16-16-16v-17.73c-11.42-1.35-22.28-5.19-31.78-11.46-6.22-4.11-6.82-13.11-1.55-18.38l17.52-17.52c3.74-3.74 9.31-4.24 14.11-2.03 3.18 1.46 6.66 2.22 10.26 2.22h32.78c4.66 0 8.44-3.78 8.44-8.42 0-3.75-2.52-7.08-6.12-8.11l-50.07-14.3c-22.25-6.35-40.01-24.71-42.91-47.67-4.05-32.07 19.03-59.43 49.32-63.05V128c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v17.73c11.42 1.35 22.28 5.19 31.78 11.46 6.22 4.11 6.82 13.11 1.55 18.38l-17.52 17.52c-3.74 3.74-9.31 4.24-14.11 2.03a24.516 24.516 0 0 0-10.26-2.22h-32.78c-4.66 0-8.44 3.78-8.44 8.42 0 3.75 2.52 7.08 6.12 8.11l50.07 14.3c22.25 6.36 40.01 24.71 42.91 47.67 4.05 32.06-19.03 59.42-49.32 63.04z", + ], + }, + Dn = { + prefix: "fas", + iconName: "comment-dots", + icon: [ + 512, + 512, + [], + "f4ad", + "M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32zM128 272c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + Rn = { + prefix: "fas", + iconName: "comment-slash", + icon: [ + 640, + 512, + [], + "f4b3", + "M64 240c0 49.6 21.4 95 57 130.7-12.6 50.3-54.3 95.2-54.8 95.8-2.2 2.3-2.8 5.7-1.5 8.7 1.3 2.9 4.1 4.8 7.3 4.8 66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 27.4 0 53.7-3.6 78.4-10L72.9 186.4c-5.6 17.1-8.9 35-8.9 53.6zm569.8 218.1l-114.4-88.4C554.6 334.1 576 289.2 576 240c0-114.9-114.6-208-256-208-65.1 0-124.2 20.1-169.4 52.7L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3z", + ], + }, + wn = { + prefix: "fas", + iconName: "comments", + icon: [ + 576, + 512, + [], + "f086", + "M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z", + ], + }, + Ln = { + prefix: "fas", + iconName: "comments-dollar", + icon: [ + 576, + 512, + [], + "f653", + "M416 192c0-88.37-93.12-160-208-160S0 103.63 0 192c0 34.27 14.13 65.95 37.97 91.98C24.61 314.22 2.52 338.16 2.2 338.5A7.995 7.995 0 0 0 8 352c36.58 0 66.93-12.25 88.73-24.98C128.93 342.76 167.02 352 208 352c114.88 0 208-71.63 208-160zm-224 96v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V96c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07V288c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm346.01 123.99C561.87 385.96 576 354.27 576 320c0-66.94-53.49-124.2-129.33-148.07.86 6.6 1.33 13.29 1.33 20.07 0 105.87-107.66 192-240 192-10.78 0-21.32-.77-31.73-1.88C207.8 439.63 281.77 480 368 480c40.98 0 79.07-9.24 111.27-24.98C501.07 467.75 531.42 480 568 480c3.2 0 6.09-1.91 7.34-4.84 1.27-2.94.66-6.34-1.55-8.67-.31-.33-22.42-24.24-35.78-54.5z", + ], + }, + Fn = { + prefix: "fas", + iconName: "compact-disc", + icon: [ + 496, + 512, + [], + "f51f", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM88 256H56c0-105.9 86.1-192 192-192v32c-88.2 0-160 71.8-160 160zm160 96c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zm0-128c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z", + ], + }, + Nn = { + prefix: "fas", + iconName: "compass", + icon: [ + 496, + 512, + [], + "f14e", + "M225.38 233.37c-12.5 12.5-12.5 32.76 0 45.25 12.49 12.5 32.76 12.5 45.25 0 12.5-12.5 12.5-32.76 0-45.25-12.5-12.49-32.76-12.49-45.25 0zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm126.14 148.05L308.17 300.4a31.938 31.938 0 0 1-15.77 15.77l-144.34 65.97c-16.65 7.61-33.81-9.55-26.2-26.2l65.98-144.35a31.938 31.938 0 0 1 15.77-15.77l144.34-65.97c16.65-7.6 33.8 9.55 26.19 26.2z", + ], + }, + kn = { + prefix: "fas", + iconName: "compress", + icon: [ + 448, + 512, + [], + "f066", + "M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z", + ], + }, + zn = { + prefix: "fas", + iconName: "concierge-bell", + icon: [ + 512, + 512, + [], + "f562", + "M288 130.54V112h16c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16h-96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h16v18.54C115.49 146.11 32 239.18 32 352h448c0-112.82-83.49-205.89-192-221.46zM496 384H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + jn = { + prefix: "fas", + iconName: "cookie", + icon: [ + 512, + 512, + [], + "f563", + "M510.37 254.79l-12.08-76.26a132.493 132.493 0 0 0-37.16-72.95l-54.76-54.75c-19.73-19.72-45.18-32.7-72.71-37.05l-76.7-12.15c-27.51-4.36-55.69.11-80.52 12.76L107.32 49.6a132.25 132.25 0 0 0-57.79 57.8l-35.1 68.88a132.602 132.602 0 0 0-12.82 80.94l12.08 76.27a132.493 132.493 0 0 0 37.16 72.95l54.76 54.75a132.087 132.087 0 0 0 72.71 37.05l76.7 12.14c27.51 4.36 55.69-.11 80.52-12.75l69.12-35.21a132.302 132.302 0 0 0 57.79-57.8l35.1-68.87c12.71-24.96 17.2-53.3 12.82-80.96zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Bn = { + prefix: "fas", + iconName: "cookie-bite", + icon: [ + 512, + 512, + [], + "f564", + "M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.27a132.521 132.521 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0 0 57.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Vn = { + prefix: "fas", + iconName: "copy", + icon: [ + 448, + 512, + [], + "f0c5", + "M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z", + ], + }, + Gn = { + prefix: "fas", + iconName: "copyright", + icon: [ + 512, + 512, + [], + "f1f9", + "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm117.134 346.753c-1.592 1.867-39.776 45.731-109.851 45.731-84.692 0-144.484-63.26-144.484-145.567 0-81.303 62.004-143.401 143.762-143.401 66.957 0 101.965 37.315 103.422 38.904a12 12 0 0 1 1.238 14.623l-22.38 34.655c-4.049 6.267-12.774 7.351-18.234 2.295-.233-.214-26.529-23.88-61.88-23.88-46.116 0-73.916 33.575-73.916 76.082 0 39.602 25.514 79.692 74.277 79.692 38.697 0 65.28-28.338 65.544-28.625 5.132-5.565 14.059-5.033 18.508 1.053l24.547 33.572a12.001 12.001 0 0 1-.553 14.866z", + ], + }, + Un = { + prefix: "fas", + iconName: "couch", + icon: [ + 640, + 512, + [], + "f4b8", + "M160 224v64h320v-64c0-35.3 28.7-64 64-64h32c0-53-43-96-96-96H160c-53 0-96 43-96 96h32c35.3 0 64 28.7 64 64zm416-32h-32c-17.7 0-32 14.3-32 32v96H128v-96c0-17.7-14.3-32-32-32H64c-35.3 0-64 28.7-64 64 0 23.6 13 44 32 55.1V432c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-16h384v16c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16V311.1c19-11.1 32-31.5 32-55.1 0-35.3-28.7-64-64-64z", + ], + }, + Hn = { + prefix: "fas", + iconName: "credit-card", + icon: [ + 576, + 512, + [], + "f09d", + "M0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V256H0v176zm192-68c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-40zm-128 0c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM576 80v48H0V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48z", + ], + }, + Wn = { + prefix: "fas", + iconName: "crop", + icon: [ + 512, + 512, + [], + "f125", + "M488 352h-40V109.25l59.31-59.31c6.25-6.25 6.25-16.38 0-22.63L484.69 4.69c-6.25-6.25-16.38-6.25-22.63 0L402.75 64H192v96h114.75L160 306.75V24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v264c0 13.25 10.75 24 24 24h232v-96H205.25L352 205.25V488c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z", + ], + }, + Xn = { + prefix: "fas", + iconName: "crop-alt", + icon: [ + 512, + 512, + [], + "f565", + "M488 352h-40V96c0-17.67-14.33-32-32-32H192v96h160v328c0 13.25 10.75 24 24 24h48c13.25 0 24-10.75 24-24v-40h40c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24zM160 24c0-13.26-10.75-24-24-24H88C74.75 0 64 10.74 64 24v40H24C10.75 64 0 74.74 0 88v48c0 13.25 10.75 24 24 24h40v256c0 17.67 14.33 32 32 32h224v-96H160V24z", + ], + }, + Yn = { + prefix: "fas", + iconName: "cross", + icon: [ + 384, + 512, + [], + "f654", + "M352 128h-96V32c0-17.67-14.33-32-32-32h-64c-17.67 0-32 14.33-32 32v96H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h96v224c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V256h96c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z", + ], + }, + Kn = { + prefix: "fas", + iconName: "crosshairs", + icon: [ + 512, + 512, + [], + "f05b", + "M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z", + ], + }, + Zn = { + prefix: "fas", + iconName: "crow", + icon: [ + 640, + 512, + [], + "f520", + "M544 32h-16.36C513.04 12.68 490.09 0 464 0c-44.18 0-80 35.82-80 80v20.98L12.09 393.57A30.216 30.216 0 0 0 0 417.74c0 22.46 23.64 37.07 43.73 27.03L165.27 384h96.49l44.41 120.1c2.27 6.23 9.15 9.44 15.38 7.17l22.55-8.21c6.23-2.27 9.44-9.15 7.17-15.38L312.94 384H352c1.91 0 3.76-.23 5.66-.29l44.51 120.38c2.27 6.23 9.15 9.44 15.38 7.17l22.55-8.21c6.23-2.27 9.44-9.15 7.17-15.38l-41.24-111.53C485.74 352.8 544 279.26 544 192v-80l96-16c0-35.35-42.98-64-96-64zm-80 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z", + ], + }, + qn = { + prefix: "fas", + iconName: "crown", + icon: [ + 640, + 512, + [], + "f521", + "M528 448H112c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm64-320c-26.5 0-48 21.5-48 48 0 7.1 1.6 13.7 4.4 19.8L476 239.2c-15.4 9.2-35.3 4-44.2-11.6L350.3 85C361 76.2 368 63 368 48c0-26.5-21.5-48-48-48s-48 21.5-48 48c0 15 7 28.2 17.7 37l-81.5 142.6c-8.9 15.6-28.9 20.8-44.2 11.6l-72.3-43.4c2.7-6 4.4-12.7 4.4-19.8 0-26.5-21.5-48-48-48S0 149.5 0 176s21.5 48 48 48c2.6 0 5.2-.4 7.7-.8L128 416h384l72.3-192.8c2.5.4 5.1.8 7.7.8 26.5 0 48-21.5 48-48s-21.5-48-48-48z", + ], + }, + Qn = { + prefix: "fas", + iconName: "cube", + icon: [ + 512, + 512, + [], + "f1b2", + "M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z", + ], + }, + Jn = { + prefix: "fas", + iconName: "cubes", + icon: [ + 512, + 512, + [], + "f1b3", + "M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z", + ], + }, + $n = { + prefix: "fas", + iconName: "cut", + icon: [ + 448, + 512, + [], + "f0c4", + "M278.06 256L444.48 89.57c4.69-4.69 4.69-12.29 0-16.97-32.8-32.8-85.99-32.8-118.79 0L210.18 188.12l-24.86-24.86c4.31-10.92 6.68-22.81 6.68-35.26 0-53.02-42.98-96-96-96S0 74.98 0 128s42.98 96 96 96c4.54 0 8.99-.32 13.36-.93L142.29 256l-32.93 32.93c-4.37-.61-8.83-.93-13.36-.93-53.02 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96c0-12.45-2.37-24.34-6.68-35.26l24.86-24.86L325.69 439.4c32.8 32.8 85.99 32.8 118.79 0 4.69-4.68 4.69-12.28 0-16.97L278.06 256zM96 160c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32zm0 256c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32z", + ], + }, + ei = { + prefix: "fas", + iconName: "database", + icon: [ + 448, + 512, + [], + "f1c0", + "M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z", + ], + }, + ti = { + prefix: "fas", + iconName: "deaf", + icon: [ + 512, + 512, + [], + "f2a4", + "M216 260c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-44.112 35.888-80 80-80s80 35.888 80 80c0 15.464-12.536 28-28 28s-28-12.536-28-28c0-13.234-10.767-24-24-24s-24 10.766-24 24zm24-176c-97.047 0-176 78.953-176 176 0 15.464 12.536 28 28 28s28-12.536 28-28c0-66.168 53.832-120 120-120s120 53.832 120 120c0 75.164-71.009 70.311-71.997 143.622L288 404c0 28.673-23.327 52-52 52-15.464 0-28 12.536-28 28s12.536 28 28 28c59.475 0 107.876-48.328 108-107.774.595-34.428 72-48.24 72-144.226 0-97.047-78.953-176-176-176zm268.485-52.201L480.2 3.515c-4.687-4.686-12.284-4.686-16.971 0L376.2 90.544c-4.686 4.686-4.686 12.284 0 16.971l28.285 28.285c4.686 4.686 12.284 4.686 16.97 0l87.03-87.029c4.687-4.688 4.687-12.286 0-16.972zM168.97 314.745c-4.686-4.686-12.284-4.686-16.97 0L3.515 463.23c-4.686 4.686-4.686 12.284 0 16.971L31.8 508.485c4.687 4.686 12.284 4.686 16.971 0L197.256 360c4.686-4.686 4.686-12.284 0-16.971l-28.286-28.284z", + ], + }, + ni = { + prefix: "fas", + iconName: "desktop", + icon: [ + 576, + 512, + [], + "f108", + "M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z", + ], + }, + ii = { + prefix: "fas", + iconName: "dharmachakra", + icon: [ + 512, + 512, + [], + "f655", + "M495 225.06l-17.22 1.08c-5.27-39.49-20.79-75.64-43.86-105.84l12.95-11.43c6.92-6.11 7.25-16.79.73-23.31L426.44 64.4c-6.53-6.53-17.21-6.19-23.31.73L391.7 78.07c-30.2-23.06-66.35-38.58-105.83-43.86L286.94 17c.58-9.21-6.74-17-15.97-17h-29.94c-9.23 0-16.54 7.79-15.97 17l1.08 17.22c-39.49 5.27-75.64 20.79-105.83 43.86l-11.43-12.95c-6.11-6.92-16.79-7.25-23.31-.73L64.4 85.56c-6.53 6.53-6.19 17.21.73 23.31l12.95 11.43c-23.06 30.2-38.58 66.35-43.86 105.84L17 225.06c-9.21-.58-17 6.74-17 15.97v29.94c0 9.23 7.79 16.54 17 15.97l17.22-1.08c5.27 39.49 20.79 75.64 43.86 105.83l-12.95 11.43c-6.92 6.11-7.25 16.79-.73 23.31l21.17 21.17c6.53 6.53 17.21 6.19 23.31-.73l11.43-12.95c30.2 23.06 66.35 38.58 105.84 43.86L225.06 495c-.58 9.21 6.74 17 15.97 17h29.94c9.23 0 16.54-7.79 15.97-17l-1.08-17.22c39.49-5.27 75.64-20.79 105.84-43.86l11.43 12.95c6.11 6.92 16.79 7.25 23.31.73l21.17-21.17c6.53-6.53 6.19-17.21-.73-23.31l-12.95-11.43c23.06-30.2 38.58-66.35 43.86-105.83l17.22 1.08c9.21.58 17-6.74 17-15.97v-29.94c-.01-9.23-7.8-16.54-17.01-15.97zM281.84 98.61c24.81 4.07 47.63 13.66 67.23 27.78l-42.62 48.29c-8.73-5.44-18.32-9.54-28.62-11.95l4.01-64.12zm-51.68 0l4.01 64.12c-10.29 2.41-19.89 6.52-28.62 11.95l-42.62-48.29c19.6-14.12 42.42-23.71 67.23-27.78zm-103.77 64.33l48.3 42.61c-5.44 8.73-9.54 18.33-11.96 28.62l-64.12-4.01c4.07-24.81 13.66-47.62 27.78-67.22zm-27.78 118.9l64.12-4.01c2.41 10.29 6.52 19.89 11.95 28.62l-48.29 42.62c-14.12-19.6-23.71-42.42-27.78-67.23zm131.55 131.55c-24.81-4.07-47.63-13.66-67.23-27.78l42.61-48.3c8.73 5.44 18.33 9.54 28.62 11.96l-4 64.12zM256 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm25.84 125.39l-4.01-64.12c10.29-2.41 19.89-6.52 28.62-11.96l42.61 48.3c-19.6 14.12-42.41 23.71-67.22 27.78zm103.77-64.33l-48.29-42.62c5.44-8.73 9.54-18.32 11.95-28.62l64.12 4.01c-4.07 24.82-13.66 47.64-27.78 67.23zm-36.34-114.89c-2.41-10.29-6.52-19.89-11.96-28.62l48.3-42.61c14.12 19.6 23.71 42.42 27.78 67.23l-64.12 4z", + ], + }, + ri = { + prefix: "fas", + iconName: "diagnoses", + icon: [ + 640, + 512, + [], + "f470", + "M496 256c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zm-176-80c48.5 0 88-39.5 88-88S368.5 0 320 0s-88 39.5-88 88 39.5 88 88 88zM59.8 364c10.2 15.3 29.3 17.8 42.9 9.8 16.2-9.6 56.2-31.7 105.3-48.6V416h224v-90.7c49.1 16.8 89.1 39 105.3 48.6 13.6 8 32.7 5.3 42.9-9.8l17.8-26.7c8.8-13.2 7.6-34.6-10-45.1-11.9-7.1-29.7-17-51.1-27.4-28.1 46.1-99.4 17.8-87.7-35.1C409.3 217.2 365.1 208 320 208c-57 0-112.9 14.5-160 32.2-.2 40.2-47.6 63.3-79.2 36-11.2 6-21.3 11.6-28.7 16-17.6 10.5-18.8 31.8-10 45.1L59.8 364zM368 344c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-96-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm-160 8c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zm512 192H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z", + ], + }, + oi = { + prefix: "fas", + iconName: "dice", + icon: [ + 640, + 512, + [], + "f522", + "M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z", + ], + }, + ai = { + prefix: "fas", + iconName: "dice-d20", + icon: [ + 480, + 512, + [], + "f6cf", + "M106.75 215.06L1.2 370.95c-3.08 5 .1 11.5 5.93 12.14l208.26 22.07-108.64-190.1zM7.41 315.43L82.7 193.08 6.06 147.1c-2.67-1.6-6.06.32-6.06 3.43v162.81c0 4.03 5.29 5.53 7.41 2.09zM18.25 423.6l194.4 87.66c5.3 2.45 11.35-1.43 11.35-7.26v-65.67l-203.55-22.3c-4.45-.5-6.23 5.59-2.2 7.57zm81.22-257.78L179.4 22.88c4.34-7.06-3.59-15.25-10.78-11.14L17.81 110.35c-2.47 1.62-2.39 5.26.13 6.78l81.53 48.69zM240 176h109.21L253.63 7.62C250.5 2.54 245.25 0 240 0s-10.5 2.54-13.63 7.62L130.79 176H240zm233.94-28.9l-76.64 45.99 75.29 122.35c2.11 3.44 7.41 1.94 7.41-2.1V150.53c0-3.11-3.39-5.03-6.06-3.43zm-93.41 18.72l81.53-48.7c2.53-1.52 2.6-5.16.13-6.78l-150.81-98.6c-7.19-4.11-15.12 4.08-10.78 11.14l79.93 142.94zm79.02 250.21L256 438.32v65.67c0 5.84 6.05 9.71 11.35 7.26l194.4-87.66c4.03-1.97 2.25-8.06-2.2-7.56zm-86.3-200.97l-108.63 190.1 208.26-22.07c5.83-.65 9.01-7.14 5.93-12.14L373.25 215.06zM240 208H139.57L240 383.75 340.43 208H240z", + ], + }, + si = { + prefix: "fas", + iconName: "dice-d6", + icon: [ + 448, + 512, + [], + "f6d1", + "M422.19 109.95L256.21 9.07c-19.91-12.1-44.52-12.1-64.43 0L25.81 109.95c-5.32 3.23-5.29 11.27.06 14.46L224 242.55l198.14-118.14c5.35-3.19 5.38-11.22.05-14.46zm13.84 44.63L240 271.46v223.82c0 12.88 13.39 20.91 24.05 14.43l152.16-92.48c19.68-11.96 31.79-33.94 31.79-57.7v-197.7c0-6.41-6.64-10.43-11.97-7.25zM0 161.83v197.7c0 23.77 12.11 45.74 31.79 57.7l152.16 92.47c10.67 6.48 24.05-1.54 24.05-14.43V271.46L11.97 154.58C6.64 151.4 0 155.42 0 161.83z", + ], + }, + ci = { + prefix: "fas", + iconName: "dice-five", + icon: [ + 448, + 512, + [], + "f523", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + li = { + prefix: "fas", + iconName: "dice-four", + icon: [ + 448, + 512, + [], + "f524", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + ui = { + prefix: "fas", + iconName: "dice-one", + icon: [ + 448, + 512, + [], + "f525", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM224 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + hi = { + prefix: "fas", + iconName: "dice-six", + icon: [ + 448, + 512, + [], + "f526", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + di = { + prefix: "fas", + iconName: "dice-three", + icon: [ + 448, + 512, + [], + "f527", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm96 96c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + pi = { + prefix: "fas", + iconName: "dice-two", + icon: [ + 448, + 512, + [], + "f528", + "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V96c0-35.35-28.65-64-64-64zM128 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm192 192c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + fi = { + prefix: "fas", + iconName: "digital-tachograph", + icon: [ + 640, + 512, + [], + "f566", + "M608 96H32c-17.67 0-32 14.33-32 32v256c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128c0-17.67-14.33-32-32-32zM304 352c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-8c0-4.42 3.58-8 8-8h224c4.42 0 8 3.58 8 8v8zM72 288v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H80c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm64 0v-16c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8zm40-64c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-48c0-8.84 7.16-16 16-16h208c8.84 0 16 7.16 16 16v48zm272 128c0 4.42-3.58 8-8 8H344c-4.42 0-8-3.58-8-8v-8c0-4.42 3.58-8 8-8h224c4.42 0 8 3.58 8 8v8z", + ], + }, + mi = { + prefix: "fas", + iconName: "directions", + icon: [ + 512, + 512, + [], + "f5eb", + "M502.61 233.32L278.68 9.39c-12.52-12.52-32.83-12.52-45.36 0L9.39 233.32c-12.52 12.53-12.52 32.83 0 45.36l223.93 223.93c12.52 12.53 32.83 12.53 45.36 0l223.93-223.93c12.52-12.53 12.52-32.83 0-45.36zm-100.98 12.56l-84.21 77.73c-5.12 4.73-13.43 1.1-13.43-5.88V264h-96v64c0 4.42-3.58 8-8 8h-32c-4.42 0-8-3.58-8-8v-80c0-17.67 14.33-32 32-32h112v-53.73c0-6.97 8.3-10.61 13.43-5.88l84.21 77.73c3.43 3.17 3.43 8.59 0 11.76z", + ], + }, + gi = { + prefix: "fas", + iconName: "divide", + icon: [ + 448, + 512, + [], + "f529", + "M224 352c-35.35 0-64 28.65-64 64s28.65 64 64 64 64-28.65 64-64-28.65-64-64-64zm0-192c35.35 0 64-28.65 64-64s-28.65-64-64-64-64 28.65-64 64 28.65 64 64 64zm192 48H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z", + ], + }, + bi = { + prefix: "fas", + iconName: "dizzy", + icon: [ + 496, + 512, + [], + "f567", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-96 206.6l-28.7 28.7c-14.8 14.8-37.8-7.5-22.6-22.6l28.7-28.7-28.7-28.7c-15-15 7.7-37.6 22.6-22.6l28.7 28.7 28.7-28.7c15-15 37.6 7.7 22.6 22.6L174.6 192l28.7 28.7c15.2 15.2-7.9 37.4-22.6 22.6L152 214.6zM248 416c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm147.3-195.3c15.2 15.2-7.9 37.4-22.6 22.6L344 214.6l-28.7 28.7c-14.8 14.8-37.8-7.5-22.6-22.6l28.7-28.7-28.7-28.7c-15-15 7.7-37.6 22.6-22.6l28.7 28.7 28.7-28.7c15-15 37.6 7.7 22.6 22.6L366.6 192l28.7 28.7z", + ], + }, + _i = { + prefix: "fas", + iconName: "dna", + icon: [ + 448, + 512, + [], + "f471", + "M.1 494.1c-1.1 9.5 6.3 17.8 15.9 17.8l32.3.1c8.1 0 14.9-5.9 16-13.9.7-4.9 1.8-11.1 3.4-18.1H380c1.6 6.9 2.9 13.2 3.5 18.1 1.1 8 7.9 14 16 13.9l32.3-.1c9.6 0 17.1-8.3 15.9-17.8-4.6-37.9-25.6-129-118.9-207.7-17.6 12.4-37.1 24.2-58.5 35.4 6.2 4.6 11.4 9.4 17 14.2H159.7c21.3-18.1 47-35.6 78.7-51.4C410.5 199.1 442.1 65.8 447.9 17.9 449 8.4 441.6.1 432 .1L399.6 0c-8.1 0-14.9 5.9-16 13.9-.7 4.9-1.8 11.1-3.4 18.1H67.8c-1.6-7-2.7-13.1-3.4-18.1-1.1-8-7.9-14-16-13.9L16.1.1C6.5.1-1 8.4.1 17.9 5.3 60.8 31.4 171.8 160 256 31.5 340.2 5.3 451.2.1 494.1zM224 219.6c-25.1-13.7-46.4-28.4-64.3-43.6h128.5c-17.8 15.2-39.1 30-64.2 43.6zM355.1 96c-5.8 10.4-12.8 21.1-21 32H114c-8.3-10.9-15.3-21.6-21-32h262.1zM92.9 416c5.8-10.4 12.8-21.1 21-32h219.4c8.3 10.9 15.4 21.6 21.2 32H92.9z", + ], + }, + vi = { + prefix: "fas", + iconName: "dog", + icon: [ + 512, + 512, + [], + "f6d3", + "M496 96h-64l-7.16-14.31A32 32 0 0 0 396.22 64H342.6l-27.28-27.28C305.23 26.64 288 33.78 288 48.03v149.84l128 45.71V208h32c35.35 0 64-28.65 64-64v-32c0-8.84-7.16-16-16-16zm-112 48c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zM96 224c-17.64 0-32-14.36-32-32 0-17.67-14.33-32-32-32S0 174.33 0 192c0 41.66 26.83 76.85 64 90.1V496c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V384h160v112c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V277.55L266.05 224H96z", + ], + }, + yi = { + prefix: "fas", + iconName: "dollar-sign", + icon: [ + 288, + 512, + [], + "f155", + "M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z", + ], + }, + Ci = { + prefix: "fas", + iconName: "dolly", + icon: [ + 576, + 512, + [], + "f472", + "M294.2 277.7c18 5 34.7 13.4 49.5 24.7l161.5-53.8c8.4-2.8 12.9-11.9 10.1-20.2L454.9 47.2c-2.8-8.4-11.9-12.9-20.2-10.1l-61.1 20.4 33.1 99.4L346 177l-33.1-99.4-61.6 20.5c-8.4 2.8-12.9 11.9-10.1 20.2l53 159.4zm281 48.7L565 296c-2.8-8.4-11.9-12.9-20.2-10.1l-213.5 71.2c-17.2-22-43.6-36.4-73.5-37L158.4 21.9C154 8.8 141.8 0 128 0H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h88.9l92.2 276.7c-26.1 20.4-41.7 53.6-36 90.5 6.1 39.4 37.9 72.3 77.3 79.2 60.2 10.7 112.3-34.8 113.4-92.6l213.3-71.2c8.3-2.8 12.9-11.8 10.1-20.2zM256 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z", + ], + }, + Pi = { + prefix: "fas", + iconName: "dolly-flatbed", + icon: [ + 640, + 512, + [], + "f474", + "M208 320h384c8.8 0 16-7.2 16-16V48c0-8.8-7.2-16-16-16H448v128l-48-32-48 32V32H208c-8.8 0-16 7.2-16 16v256c0 8.8 7.2 16 16 16zm416 64H128V16c0-8.8-7.2-16-16-16H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h48v368c0 8.8 7.2 16 16 16h82.9c-1.8 5-2.9 10.4-2.9 16 0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1.2-11-2.9-16H451c-1.8 5-2.9 10.4-2.9 16 0 26.5 21.5 48 48 48s48-21.5 48-48c0-5.6-1.2-11-2.9-16H624c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z", + ], + }, + xi = { + prefix: "fas", + iconName: "donate", + icon: [ + 512, + 512, + [], + "f4b9", + "M256 416c114.9 0 208-93.1 208-208S370.9 0 256 0 48 93.1 48 208s93.1 208 208 208zM233.8 97.4V80.6c0-9.2 7.4-16.6 16.6-16.6h11.1c9.2 0 16.6 7.4 16.6 16.6v17c15.5.8 30.5 6.1 43 15.4 5.6 4.1 6.2 12.3 1.2 17.1L306 145.6c-3.8 3.7-9.5 3.8-14 1-5.4-3.4-11.4-5.1-17.8-5.1h-38.9c-9 0-16.3 8.2-16.3 18.3 0 8.2 5 15.5 12.1 17.6l62.3 18.7c25.7 7.7 43.7 32.4 43.7 60.1 0 34-26.4 61.5-59.1 62.4v16.8c0 9.2-7.4 16.6-16.6 16.6h-11.1c-9.2 0-16.6-7.4-16.6-16.6v-17c-15.5-.8-30.5-6.1-43-15.4-5.6-4.1-6.2-12.3-1.2-17.1l16.3-15.5c3.8-3.7 9.5-3.8 14-1 5.4 3.4 11.4 5.1 17.8 5.1h38.9c9 0 16.3-8.2 16.3-18.3 0-8.2-5-15.5-12.1-17.6l-62.3-18.7c-25.7-7.7-43.7-32.4-43.7-60.1.1-34 26.4-61.5 59.1-62.4zM480 352h-32.5c-19.6 26-44.6 47.7-73 64h63.8c5.3 0 9.6 3.6 9.6 8v16c0 4.4-4.3 8-9.6 8H73.6c-5.3 0-9.6-3.6-9.6-8v-16c0-4.4 4.3-8 9.6-8h63.8c-28.4-16.3-53.3-38-73-64H32c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32h448c17.7 0 32-14.3 32-32v-96c0-17.7-14.3-32-32-32z", + ], + }, + Ti = { + prefix: "fas", + iconName: "door-closed", + icon: [ + 640, + 512, + [], + "f52a", + "M624 448H512V50.8C512 22.78 490.47 0 464 0H175.99c-26.47 0-48 22.78-48 50.8V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM415.99 288c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32c.01 17.67-14.32 32-32 32z", + ], + }, + Si = { + prefix: "fas", + iconName: "door-open", + icon: [ + 640, + 512, + [], + "f52b", + "M624 448h-80V113.45C544 86.19 522.47 64 496 64H384v64h96v384h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM312.24 1.01l-192 49.74C105.99 54.44 96 67.7 96 82.92V448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h336V33.18c0-21.58-19.56-37.41-39.76-32.17zM264 288c-13.25 0-24-14.33-24-32s10.75-32 24-32 24 14.33 24 32-10.75 32-24 32z", + ], + }, + Oi = { + prefix: "fas", + iconName: "dot-circle", + icon: [512, 512, [], "f192", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"], + }, + Ei = { + prefix: "fas", + iconName: "dove", + icon: [ + 512, + 512, + [], + "f4ba", + "M288 167.2v-28.1c-28.2-36.3-47.1-79.3-54.1-125.2-2.1-13.5-19-18.8-27.8-8.3-21.1 24.9-37.7 54.1-48.9 86.5 34.2 38.3 80 64.6 130.8 75.1zM400 64c-44.2 0-80 35.9-80 80.1v59.4C215.6 197.3 127 133 87 41.8c-5.5-12.5-23.2-13.2-29-.9C41.4 76 32 115.2 32 156.6c0 70.8 34.1 136.9 85.1 185.9 13.2 12.7 26.1 23.2 38.9 32.8l-143.9 36C1.4 414-3.4 426.4 2.6 435.7 20 462.6 63 508.2 155.8 512c8 .3 16-2.6 22.1-7.9l65.2-56.1H320c88.4 0 160-71.5 160-159.9V128l32-64H400zm0 96.1c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z", + ], + }, + Mi = { + prefix: "fas", + iconName: "download", + icon: [ + 512, + 512, + [], + "f019", + "M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z", + ], + }, + Ai = { + prefix: "fas", + iconName: "drafting-compass", + icon: [ + 512, + 512, + [], + "f568", + "M457.01 344.42c-25.05 20.33-52.63 37.18-82.54 49.05l54.38 94.19 53.95 23.04c9.81 4.19 20.89-2.21 22.17-12.8l7.02-58.25-54.98-95.23zm42.49-94.56c4.86-7.67 1.89-17.99-6.05-22.39l-28.07-15.57c-7.48-4.15-16.61-1.46-21.26 5.72C403.01 281.15 332.25 320 256 320c-23.93 0-47.23-4.25-69.41-11.53l67.36-116.68c.7.02 1.34.21 2.04.21s1.35-.19 2.04-.21l51.09 88.5c31.23-8.96 59.56-25.75 82.61-48.92l-51.79-89.71C347.39 128.03 352 112.63 352 96c0-53.02-42.98-96-96-96s-96 42.98-96 96c0 16.63 4.61 32.03 12.05 45.66l-68.3 118.31c-12.55-11.61-23.96-24.59-33.68-39-4.79-7.1-13.97-9.62-21.38-5.33l-27.75 16.07c-7.85 4.54-10.63 14.9-5.64 22.47 15.57 23.64 34.69 44.21 55.98 62.02L0 439.66l7.02 58.25c1.28 10.59 12.36 16.99 22.17 12.8l53.95-23.04 70.8-122.63C186.13 377.28 220.62 384 256 384c99.05 0 190.88-51.01 243.5-134.14zM256 64c17.67 0 32 14.33 32 32s-14.33 32-32 32-32-14.33-32-32 14.33-32 32-32z", + ], + }, + Ii = { + prefix: "fas", + iconName: "dragon", + icon: [ + 640, + 512, + [], + "f6d5", + "M18.32 255.78L192 223.96l-91.28 68.69c-10.08 10.08-2.94 27.31 11.31 27.31h222.7c-9.44-26.4-14.73-54.47-14.73-83.38v-42.27l-119.73-87.6c-23.82-15.88-55.29-14.01-77.06 4.59L5.81 227.64c-12.38 10.33-3.45 30.42 12.51 28.14zm556.87 34.1l-100.66-50.31A47.992 47.992 0 0 1 448 196.65v-36.69h64l28.09 22.63c6 6 14.14 9.37 22.63 9.37h30.97a32 32 0 0 0 28.62-17.69l14.31-28.62a32.005 32.005 0 0 0-3.02-33.51l-74.53-99.38C553.02 4.7 543.54 0 533.47 0H296.02c-7.13 0-10.7 8.57-5.66 13.61L352 63.96 292.42 88.8c-5.9 2.95-5.9 11.36 0 14.31L352 127.96v108.62c0 72.08 36.03 139.39 96 179.38-195.59 6.81-344.56 41.01-434.1 60.91C5.78 478.67 0 485.88 0 494.2 0 504 7.95 512 17.76 512h499.08c63.29.01 119.61-47.56 122.99-110.76 2.52-47.28-22.73-90.4-64.64-111.36zM489.18 66.25l45.65 11.41c-2.75 10.91-12.47 18.89-24.13 18.26-12.96-.71-25.85-12.53-21.52-29.67z", + ], + }, + Di = { + prefix: "fas", + iconName: "draw-polygon", + icon: [ + 448, + 512, + [], + "f5ee", + "M384 352c-.35 0-.67.1-1.02.1l-39.2-65.32c5.07-9.17 8.22-19.56 8.22-30.78s-3.14-21.61-8.22-30.78l39.2-65.32c.35.01.67.1 1.02.1 35.35 0 64-28.65 64-64s-28.65-64-64-64c-23.63 0-44.04 12.95-55.12 32H119.12C108.04 44.95 87.63 32 64 32 28.65 32 0 60.65 0 96c0 23.63 12.95 44.04 32 55.12v209.75C12.95 371.96 0 392.37 0 416c0 35.35 28.65 64 64 64 23.63 0 44.04-12.95 55.12-32h209.75c11.09 19.05 31.49 32 55.12 32 35.35 0 64-28.65 64-64 .01-35.35-28.64-64-63.99-64zm-288 8.88V151.12A63.825 63.825 0 0 0 119.12 128h208.36l-38.46 64.1c-.35-.01-.67-.1-1.02-.1-35.35 0-64 28.65-64 64s28.65 64 64 64c.35 0 .67-.1 1.02-.1l38.46 64.1H119.12A63.748 63.748 0 0 0 96 360.88zM272 256c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zM400 96c0 8.82-7.18 16-16 16s-16-7.18-16-16 7.18-16 16-16 16 7.18 16 16zM64 80c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16zM48 416c0-8.82 7.18-16 16-16s16 7.18 16 16-7.18 16-16 16-16-7.18-16-16zm336 16c-8.82 0-16-7.18-16-16s7.18-16 16-16 16 7.18 16 16-7.18 16-16 16z", + ], + }, + Ri = { + prefix: "fas", + iconName: "drum", + icon: [ + 576, + 512, + [], + "f569", + "M458.08 120.88l102.39-61.43c15.16-9.09 20.06-28.75 10.97-43.91C562.34.39 542.7-4.53 527.53 4.57l-160.69 96.41A629.32 629.32 0 0 0 288 96C128.94 96 0 153.31 0 224v160.83c0 30.46 24.03 58.4 64 80.37v-96.37c0-17.6 14.4-32 32-32s32 14.4 32 32v122.41c37.4 11.13 81 18.44 128 20.75V400.84c0-17.6 14.4-32 32-32s32 14.4 32 32V512c47-2.31 90.6-9.62 128-20.75V368.84c0-17.6 14.4-32 32-32s32 14.4 32 32v96.37c39.97-21.97 64-49.91 64-80.37V224.01c-.01-42.38-46.54-79.84-117.92-103.13zM288 304c-132.55 0-240-35.82-240-80s107.45-80 240-80c2.34 0 4.62.1 6.94.12l-87.41 52.44c-15.16 9.09-20.06 28.75-10.97 43.91 9.56 15.93 29.51 19.61 43.91 10.97l162.71-97.62C477.55 167.41 528 193.74 528 224.01 528 268.19 420.54 304 288 304z", + ], + }, + wi = { + prefix: "fas", + iconName: "drum-steelpan", + icon: [ + 576, + 512, + [], + "f56a", + "M288 32C128.94 32 0 89.31 0 160v192c0 70.69 128.94 128 288 128s288-57.31 288-128V160c0-70.69-128.94-128-288-128zm-82.99 158.36c-4.45 16.61-14.54 30.57-28.31 40.48C100.23 217.46 48 190.78 48 160c0-30.16 50.11-56.39 124.04-70.03l25.6 44.34c9.86 17.09 12.48 36.99 7.37 56.05zM288 240c-21.08 0-41.41-1-60.89-2.7 8.06-26.13 32.15-45.3 60.89-45.3s52.83 19.17 60.89 45.3C329.41 239 309.08 240 288 240zm64-144c0 35.29-28.71 64-64 64s-64-28.71-64-64V82.96c20.4-1.88 41.8-2.96 64-2.96s43.6 1.08 64 2.96V96zm46.93 134.9c-13.81-9.91-23.94-23.9-28.4-40.54-5.11-19.06-2.49-38.96 7.38-56.04l25.65-44.42C477.72 103.5 528 129.79 528 160c0 30.83-52.4 57.54-129.07 70.9z", + ], + }, + Li = { + prefix: "fas", + iconName: "drumstick-bite", + icon: [ + 512, + 512, + [], + "f6d7", + "M462.79 49.57c-66.14-66.09-173.36-66.09-239.5 0C187.81 85.02 160.12 128 160.12 192v85.83l-40.62 40.59c-9.7 9.69-24.04 11.07-36.78 5.98-21.72-8.68-47.42-4.29-65.02 13.29-23.61 23.59-23.61 61.84 0 85.43 15.28 15.27 36.53 19.58 56.14 15.09-4.5 19.6-.18 40.83 15.1 56.1 23.61 23.59 61.88 23.59 85.49 0 17.6-17.58 21.99-43.26 13.31-64.97-5.09-12.73-3.72-27.05 5.99-36.75L234.35 352h85.89c23.2 0 43.57-3.72 61.89-10.03-39.64-43.89-39.83-110.23 1.05-151.07 34.38-34.36 86.76-39.46 128.74-16.8 1.3-44.93-14.81-90.25-49.13-124.53z", + ], + }, + Fi = { + prefix: "fas", + iconName: "dumbbell", + icon: [ + 640, + 512, + [], + "f44b", + "M104 96H56c-13.3 0-24 10.7-24 24v104H8c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h24v104c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm528 128h-24V120c0-13.3-10.7-24-24-24h-48c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V288h24c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM456 32h-48c-13.3 0-24 10.7-24 24v168H256V56c0-13.3-10.7-24-24-24h-48c-13.3 0-24 10.7-24 24v400c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V288h128v168c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24z", + ], + }, + Ni = { + prefix: "fas", + iconName: "dungeon", + icon: [ + 512, + 512, + [], + "f6d9", + "M128.73 195.32l-82.81-51.76c-8.04-5.02-18.99-2.17-22.93 6.45A254.19 254.19 0 0 0 .54 239.28C-.05 248.37 7.59 256 16.69 256h97.13c7.96 0 14.08-6.25 15.01-14.16 1.09-9.33 3.24-18.33 6.24-26.94 2.56-7.34.25-15.46-6.34-19.58zM319.03 8C298.86 2.82 277.77 0 256 0s-42.86 2.82-63.03 8c-9.17 2.35-13.91 12.6-10.39 21.39l37.47 104.03A16.003 16.003 0 0 0 235.1 144h41.8c6.75 0 12.77-4.23 15.05-10.58l37.47-104.03c3.52-8.79-1.22-19.03-10.39-21.39zM112 288H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm0 128H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm77.31-283.67l-36.32-90.8c-3.53-8.83-14.13-12.99-22.42-8.31a257.308 257.308 0 0 0-71.61 59.89c-6.06 7.32-3.85 18.48 4.22 23.52l82.93 51.83c6.51 4.07 14.66 2.62 20.11-2.79 5.18-5.15 10.79-9.85 16.79-14.05 6.28-4.41 9.15-12.17 6.3-19.29zM398.18 256h97.13c9.1 0 16.74-7.63 16.15-16.72a254.135 254.135 0 0 0-22.45-89.27c-3.94-8.62-14.89-11.47-22.93-6.45l-82.81 51.76c-6.59 4.12-8.9 12.24-6.34 19.58 3.01 8.61 5.15 17.62 6.24 26.94.93 7.91 7.05 14.16 15.01 14.16zm54.85-162.89a257.308 257.308 0 0 0-71.61-59.89c-8.28-4.68-18.88-.52-22.42 8.31l-36.32 90.8c-2.85 7.12.02 14.88 6.3 19.28 6 4.2 11.61 8.9 16.79 14.05 5.44 5.41 13.6 6.86 20.11 2.79l82.93-51.83c8.07-5.03 10.29-16.19 4.22-23.51zM496 288h-96c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm0 128h-96c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h96c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zM240 177.62V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V177.62c-5.23-.89-10.52-1.62-16-1.62s-10.77.73-16 1.62zm-64 41.51V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V189.36c-12.78 7.45-23.84 17.47-32 29.77zm128-29.77V472c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8V219.13c-8.16-12.3-19.22-22.32-32-29.77z", + ], + }, + ki = { + prefix: "fas", + iconName: "edit", + icon: [ + 576, + 512, + [], + "f044", + "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z", + ], + }, + zi = { + prefix: "fas", + iconName: "eject", + icon: [ + 448, + 512, + [], + "f052", + "M448 384v64c0 17.673-14.327 32-32 32H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h384c17.673 0 32 14.327 32 32zM48.053 320h351.886c41.651 0 63.581-49.674 35.383-80.435L259.383 47.558c-19.014-20.743-51.751-20.744-70.767 0L12.67 239.565C-15.475 270.268 6.324 320 48.053 320z", + ], + }, + ji = { + prefix: "fas", + iconName: "ellipsis-h", + icon: [ + 512, + 512, + [], + "f141", + "M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z", + ], + }, + Bi = { + prefix: "fas", + iconName: "ellipsis-v", + icon: [ + 192, + 512, + [], + "f142", + "M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z", + ], + }, + Vi = { + prefix: "fas", + iconName: "envelope", + icon: [ + 512, + 512, + [], + "f0e0", + "M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z", + ], + }, + Gi = { + prefix: "fas", + iconName: "envelope-open", + icon: [ + 512, + 512, + [], + "f2b6", + "M512 464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V200.724a48 48 0 0 1 18.387-37.776c24.913-19.529 45.501-35.365 164.2-121.511C199.412 29.17 232.797-.347 256 .003c23.198-.354 56.596 29.172 73.413 41.433 118.687 86.137 139.303 101.995 164.2 121.512A48 48 0 0 1 512 200.724V464zm-65.666-196.605c-2.563-3.728-7.7-4.595-11.339-1.907-22.845 16.873-55.462 40.705-105.582 77.079-16.825 12.266-50.21 41.781-73.413 41.43-23.211.344-56.559-29.143-73.413-41.43-50.114-36.37-82.734-60.204-105.582-77.079-3.639-2.688-8.776-1.821-11.339 1.907l-9.072 13.196a7.998 7.998 0 0 0 1.839 10.967c22.887 16.899 55.454 40.69 105.303 76.868 20.274 14.781 56.524 47.813 92.264 47.573 35.724.242 71.961-32.771 92.263-47.573 49.85-36.179 82.418-59.97 105.303-76.868a7.998 7.998 0 0 0 1.839-10.967l-9.071-13.196z", + ], + }, + Ui = { + prefix: "fas", + iconName: "envelope-open-text", + icon: [ + 512, + 512, + [], + "f658", + "M176 216h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16zm-16 80c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16zm96 121.13c-16.42 0-32.84-5.06-46.86-15.19L0 250.86V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V250.86L302.86 401.94c-14.02 10.12-30.44 15.19-46.86 15.19zm237.61-254.18c-8.85-6.94-17.24-13.47-29.61-22.81V96c0-26.51-21.49-48-48-48h-77.55c-3.04-2.2-5.87-4.26-9.04-6.56C312.6 29.17 279.2-.35 256 0c-23.2-.35-56.59 29.17-73.41 41.44-3.17 2.3-6 4.36-9.04 6.56H96c-26.51 0-48 21.49-48 48v44.14c-12.37 9.33-20.76 15.87-29.61 22.81A47.995 47.995 0 0 0 0 200.72v10.65l96 69.35V96h320v184.72l96-69.35v-10.65c0-14.74-6.78-28.67-18.39-37.77z", + ], + }, + Hi = { + prefix: "fas", + iconName: "envelope-square", + icon: [ + 448, + 512, + [], + "f199", + "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM178.117 262.104C87.429 196.287 88.353 196.121 64 177.167V152c0-13.255 10.745-24 24-24h272c13.255 0 24 10.745 24 24v25.167c-24.371 18.969-23.434 19.124-114.117 84.938-10.5 7.655-31.392 26.12-45.883 25.894-14.503.218-35.367-18.227-45.883-25.895zM384 217.775V360c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V217.775c13.958 10.794 33.329 25.236 95.303 70.214 14.162 10.341 37.975 32.145 64.694 32.01 26.887.134 51.037-22.041 64.72-32.025 61.958-44.965 81.325-59.406 95.283-70.199z", + ], + }, + Wi = { + prefix: "fas", + iconName: "equals", + icon: [ + 448, + 512, + [], + "f52c", + "M416 304H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32zm0-192H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z", + ], + }, + Xi = { + prefix: "fas", + iconName: "eraser", + icon: [ + 512, + 512, + [], + "f12d", + "M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z", + ], + }, + Yi = { + prefix: "fas", + iconName: "euro-sign", + icon: [ + 320, + 512, + [], + "f153", + "M310.706 413.765c-1.314-6.63-7.835-10.872-14.424-9.369-10.692 2.439-27.422 5.413-45.426 5.413-56.763 0-101.929-34.79-121.461-85.449h113.689a12 12 0 0 0 11.708-9.369l6.373-28.36c1.686-7.502-4.019-14.631-11.708-14.631H115.22c-1.21-14.328-1.414-28.287.137-42.245H261.95a12 12 0 0 0 11.723-9.434l6.512-29.755c1.638-7.484-4.061-14.566-11.723-14.566H130.184c20.633-44.991 62.69-75.03 117.619-75.03 14.486 0 28.564 2.25 37.851 4.145 6.216 1.268 12.347-2.498 14.002-8.623l11.991-44.368c1.822-6.741-2.465-13.616-9.326-14.917C290.217 34.912 270.71 32 249.635 32 152.451 32 74.03 92.252 45.075 176H12c-6.627 0-12 5.373-12 12v29.755c0 6.627 5.373 12 12 12h21.569c-1.009 13.607-1.181 29.287-.181 42.245H12c-6.627 0-12 5.373-12 12v28.36c0 6.627 5.373 12 12 12h30.114C67.139 414.692 145.264 480 249.635 480c26.301 0 48.562-4.544 61.101-7.788 6.167-1.595 10.027-7.708 8.788-13.957l-8.818-44.49z", + ], + }, + Ki = { + prefix: "fas", + iconName: "exchange-alt", + icon: [ + 512, + 512, + [], + "f362", + "M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z", + ], + }, + Zi = { + prefix: "fas", + iconName: "exclamation", + icon: [ + 192, + 512, + [], + "f12a", + "M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z", + ], + }, + qi = { + prefix: "fas", + iconName: "exclamation-circle", + icon: [ + 512, + 512, + [], + "f06a", + "M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z", + ], + }, + Qi = { + prefix: "fas", + iconName: "exclamation-triangle", + icon: [ + 576, + 512, + [], + "f071", + "M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z", + ], + }, + Ji = { + prefix: "fas", + iconName: "expand", + icon: [ + 448, + 512, + [], + "f065", + "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z", + ], + }, + $i = { + prefix: "fas", + iconName: "expand-arrows-alt", + icon: [ + 448, + 512, + [], + "f31e", + "M448.1 344v112c0 13.3-10.7 24-24 24h-112c-21.4 0-32.1-25.9-17-41l36.2-36.2L224 295.6 116.8 402.9 153 439c15.1 15.1 4.4 41-17 41H24c-13.3 0-24-10.7-24-24V344c0-21.4 25.9-32.1 41-17l36.2 36.2L184.5 256 77.2 148.7 41 185c-15.1 15.1-41 4.4-41-17V56c0-13.3 10.7-24 24-24h112c21.4 0 32.1 25.9 17 41l-36.2 36.2L224 216.4l107.3-107.3L295.1 73c-15.1-15.1-4.4-41 17-41h112c13.3 0 24 10.7 24 24v112c0 21.4-25.9 32.1-41 17l-36.2-36.2L263.6 256l107.3 107.3 36.2-36.2c15.1-15.2 41-4.5 41 16.9z", + ], + }, + er = { + prefix: "fas", + iconName: "external-link-alt", + icon: [ + 576, + 512, + [], + "f35d", + "M576 24v127.984c0 21.461-25.96 31.98-40.971 16.971l-35.707-35.709-243.523 243.523c-9.373 9.373-24.568 9.373-33.941 0l-22.627-22.627c-9.373-9.373-9.373-24.569 0-33.941L442.756 76.676l-35.703-35.705C391.982 25.9 402.656 0 424.024 0H552c13.255 0 24 10.745 24 24zM407.029 270.794l-16 16A23.999 23.999 0 0 0 384 303.765V448H64V128h264a24.003 24.003 0 0 0 16.97-7.029l16-16C376.089 89.851 365.381 64 344 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V287.764c0-21.382-25.852-32.09-40.971-16.97z", + ], + }, + tr = { + prefix: "fas", + iconName: "external-link-square-alt", + icon: [ + 448, + 512, + [], + "f360", + "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-88 16H248.029c-21.313 0-32.08 25.861-16.971 40.971l31.984 31.987L67.515 364.485c-4.686 4.686-4.686 12.284 0 16.971l31.029 31.029c4.687 4.686 12.285 4.686 16.971 0l195.526-195.526 31.988 31.991C358.058 263.977 384 253.425 384 231.979V120c0-13.255-10.745-24-24-24z", + ], + }, + nr = { + prefix: "fas", + iconName: "eye", + icon: [ + 576, + 512, + [], + "f06e", + "M569.354 231.631C512.969 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-75.162 0-136-60.827-136-136 0-75.162 60.826-136 136-136 75.162 0 136 60.826 136 136 0 75.162-60.826 136-136 136zm104-136c0 57.438-46.562 104-104 104s-104-46.562-104-104c0-17.708 4.431-34.379 12.236-48.973l-.001.032c0 23.651 19.173 42.823 42.824 42.823s42.824-19.173 42.824-42.823c0-23.651-19.173-42.824-42.824-42.824l-.032.001C253.621 156.431 270.292 152 288 152c57.438 0 104 46.562 104 104z", + ], + }, + ir = { + prefix: "fas", + iconName: "eye-dropper", + icon: [ + 512, + 512, + [], + "f1fb", + "M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z", + ], + }, + rr = { + prefix: "fas", + iconName: "eye-slash", + icon: [ + 576, + 512, + [], + "f070", + "M286.693 391.984l32.579 46.542A333.958 333.958 0 0 1 288 440C168.19 440 63.031 376.051 6.646 280.369a47.999 47.999 0 0 1 0-48.739c24.023-40.766 56.913-75.775 96.024-102.537l57.077 81.539C154.736 224.82 152 240.087 152 256c0 74.736 60.135 135.282 134.693 135.984zm282.661-111.615c-31.667 53.737-78.747 97.46-135.175 125.475l.011.015 41.47 59.2c7.6 10.86 4.96 25.82-5.9 33.42l-13.11 9.18c-10.86 7.6-25.82 4.96-33.42-5.9L100.34 46.94c-7.6-10.86-4.96-25.82 5.9-33.42l13.11-9.18c10.86-7.6 25.82-4.96 33.42 5.9l51.038 72.617C230.68 75.776 258.905 72 288 72c119.81 0 224.969 63.949 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM424 256c0-75.174-60.838-136-136-136-17.939 0-35.056 3.473-50.729 9.772l19.299 27.058c25.869-8.171 55.044-6.163 80.4 7.41h-.03c-23.65 0-42.82 19.17-42.82 42.82 0 23.626 19.147 42.82 42.82 42.82 23.65 0 42.82-19.17 42.82-42.82v-.03c18.462 34.49 16.312 77.914-8.25 110.95v.01l19.314 27.061C411.496 321.2 424 290.074 424 256zM262.014 356.727l-77.53-110.757c-5.014 52.387 29.314 98.354 77.53 110.757z", + ], + }, + or = { + prefix: "fas", + iconName: "fast-backward", + icon: [ + 512, + 512, + [], + "f049", + "M0 436V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v151.9L235.5 71.4C256.1 54.3 288 68.6 288 96v131.9L459.5 71.4C480.1 54.3 512 68.6 512 96v320c0 27.4-31.9 41.7-52.5 24.6L288 285.3V416c0 27.4-31.9 41.7-52.5 24.6L64 285.3V436c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12z", + ], + }, + ar = { + prefix: "fas", + iconName: "fast-forward", + icon: [ + 512, + 512, + [], + "f050", + "M512 76v360c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V284.1L276.5 440.6c-20.6 17.2-52.5 2.8-52.5-24.6V284.1L52.5 440.6C31.9 457.8 0 443.4 0 416V96c0-27.4 31.9-41.7 52.5-24.6L224 226.8V96c0-27.4 31.9-41.7 52.5-24.6L448 226.8V76c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12z", + ], + }, + sr = { + prefix: "fas", + iconName: "fax", + icon: [ + 512, + 512, + [], + "f1ac", + "M64 128H32c-17.67 0-32 14.33-32 32v320c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V160c0-17.67-14.33-32-32-32zm416 32V77.25c0-8.49-3.37-16.62-9.37-22.63L425.37 9.37c-6-6-14.14-9.37-22.63-9.37H160c-17.67 0-32 14.33-32 32v448c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32V192c0-17.67-14.33-32-32-32zM288 432c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v32zm0-128c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v32zm128 128c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v32zm0-128c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v32zm16-112H176V48h208v32c0 8.84 7.16 16 16 16h32v96z", + ], + }, + cr = { + prefix: "fas", + iconName: "feather", + icon: [ + 512, + 512, + [], + "f52d", + "M467.14 44.84c-62.55-62.48-161.67-64.78-252.28 25.73-78.61 78.52-60.98 60.92-85.75 85.66-60.46 60.39-70.39 150.83-63.64 211.17l178.44-178.25c6.26-6.25 16.4-6.25 22.65 0s6.25 16.38 0 22.63L7.04 471.03c-9.38 9.37-9.38 24.57 0 33.94 9.38 9.37 24.6 9.37 33.98 0l66.1-66.03C159.42 454.65 279 457.11 353.95 384h-98.19l147.57-49.14c49.99-49.93 36.38-36.18 46.31-46.86h-97.78l131.54-43.8c45.44-74.46 34.31-148.84-16.26-199.36z", + ], + }, + lr = { + prefix: "fas", + iconName: "feather-alt", + icon: [ + 512, + 512, + [], + "f56b", + "M512 0C460.22 3.56 96.44 38.2 71.01 287.61c-3.09 26.66-4.84 53.44-5.99 80.24l178.87-178.69c6.25-6.25 16.4-6.25 22.65 0s6.25 16.38 0 22.63L7.04 471.03c-9.38 9.37-9.38 24.57 0 33.94 9.38 9.37 24.59 9.37 33.98 0l57.13-57.07c42.09-.14 84.15-2.53 125.96-7.36 53.48-5.44 97.02-26.47 132.58-56.54H255.74l146.79-48.88c11.25-14.89 21.37-30.71 30.45-47.12h-81.14l106.54-53.21C500.29 132.86 510.19 26.26 512 0z", + ], + }, + ur = { + prefix: "fas", + iconName: "female", + icon: [ + 256, + 512, + [], + "f182", + "M128 0c35.346 0 64 28.654 64 64s-28.654 64-64 64c-35.346 0-64-28.654-64-64S92.654 0 128 0m119.283 354.179l-48-192A24 24 0 0 0 176 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H80a24 24 0 0 0-23.283 18.179l-48 192C4.935 369.305 16.383 384 32 384h56v104c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V384h56c15.591 0 27.071-14.671 23.283-29.821z", + ], + }, + hr = { + prefix: "fas", + iconName: "fighter-jet", + icon: [ + 640, + 512, + [], + "f0fb", + "M544 224l-128-16-48-16h-24L227.158 44h39.509C278.333 44 288 41.375 288 38s-9.667-6-21.333-6H152v12h16v164h-48l-66.667-80H18.667L8 138.667V208h8v16h48v2.666l-64 8v42.667l64 8V288H16v16H8v69.333L18.667 384h34.667L120 304h48v164h-16v12h114.667c11.667 0 21.333-2.625 21.333-6s-9.667-6-21.333-6h-39.509L344 320h24l48-16 128-16c96-21.333 96-26.583 96-32 0-5.417 0-10.667-96-32z", + ], + }, + dr = { + prefix: "fas", + iconName: "file", + icon: [ + 384, + 512, + [], + "f15b", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + pr = { + prefix: "fas", + iconName: "file-alt", + icon: [ + 384, + 512, + [], + "f15c", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + fr = { + prefix: "fas", + iconName: "file-archive", + icon: [ + 384, + 512, + [], + "f1c6", + "M224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32V32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6zm32.7-53c0 14.9-14.5 27-32.4 27S96 378 96 363c0-14.9 14.5-27 32.4-27s32.5 12.1 32.5 27zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + mr = { + prefix: "fas", + iconName: "file-audio", + icon: [ + 384, + 512, + [], + "f1c7", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-64 268c0 10.7-12.9 16-20.5 8.5L104 376H76c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h28l35.5-36.5c7.6-7.6 20.5-2.2 20.5 8.5v136zm33.2-47.6c9.1-9.3 9.1-24.1 0-33.4-22.1-22.8 12.2-56.2 34.4-33.5 27.2 27.9 27.2 72.4 0 100.4-21.8 22.3-56.9-10.4-34.4-33.5zm86-117.1c54.4 55.9 54.4 144.8 0 200.8-21.8 22.4-57-10.3-34.4-33.5 36.2-37.2 36.3-96.5 0-133.8-22.1-22.8 12.3-56.3 34.4-33.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + gr = { + prefix: "fas", + iconName: "file-code", + icon: [ + 384, + 512, + [], + "f1c9", + "M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zM123.206 400.505a5.4 5.4 0 0 1-7.633.246l-64.866-60.812a5.4 5.4 0 0 1 0-7.879l64.866-60.812a5.4 5.4 0 0 1 7.633.246l19.579 20.885a5.4 5.4 0 0 1-.372 7.747L101.65 336l40.763 35.874a5.4 5.4 0 0 1 .372 7.747l-19.579 20.884zm51.295 50.479l-27.453-7.97a5.402 5.402 0 0 1-3.681-6.692l61.44-211.626a5.402 5.402 0 0 1 6.692-3.681l27.452 7.97a5.4 5.4 0 0 1 3.68 6.692l-61.44 211.626a5.397 5.397 0 0 1-6.69 3.681zm160.792-111.045l-64.866 60.812a5.4 5.4 0 0 1-7.633-.246l-19.58-20.885a5.4 5.4 0 0 1 .372-7.747L284.35 336l-40.763-35.874a5.4 5.4 0 0 1-.372-7.747l19.58-20.885a5.4 5.4 0 0 1 7.633-.246l64.866 60.812a5.4 5.4 0 0 1-.001 7.879z", + ], + }, + br = { + prefix: "fas", + iconName: "file-contract", + icon: [ + 384, + 512, + [], + "f56c", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 64c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm192.81 248H304c8.84 0 16 7.16 16 16s-7.16 16-16 16h-47.19c-16.45 0-31.27-9.14-38.64-23.86-2.95-5.92-8.09-6.52-10.17-6.52s-7.22.59-10.02 6.19l-7.67 15.34a15.986 15.986 0 0 1-14.31 8.84c-.38 0-.75-.02-1.14-.05-6.45-.45-12-4.75-14.03-10.89L144 354.59l-10.61 31.88c-5.89 17.66-22.38 29.53-41 29.53H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h12.39c4.83 0 9.11-3.08 10.64-7.66l18.19-54.64c3.3-9.81 12.44-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.77-16.19 54.05-9.7 66 14.16 2.02 4.06 5.96 6.5 10.16 6.5zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + _r = { + prefix: "fas", + iconName: "file-csv", + icon: [ + 384, + 512, + [], + "f6dd", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-96 144c0 4.42-3.58 8-8 8h-8c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h8c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-8c-26.51 0-48-21.49-48-48v-32c0-26.51 21.49-48 48-48h8c4.42 0 8 3.58 8 8v16zm44.27 104H160c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h12.27c5.95 0 10.41-3.5 10.41-6.62 0-1.3-.75-2.66-2.12-3.84l-21.89-18.77c-8.47-7.22-13.33-17.48-13.33-28.14 0-21.3 19.02-38.62 42.41-38.62H200c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-12.27c-5.95 0-10.41 3.5-10.41 6.62 0 1.3.75 2.66 2.12 3.84l21.89 18.77c8.47 7.22 13.33 17.48 13.33 28.14.01 21.29-19 38.62-42.39 38.62zM256 264v20.8c0 20.27 5.7 40.17 16 56.88 10.3-16.7 16-36.61 16-56.88V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v20.8c0 35.48-12.88 68.89-36.28 94.09-3.02 3.25-7.27 5.11-11.72 5.11s-8.7-1.86-11.72-5.11c-23.4-25.2-36.28-58.61-36.28-94.09V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8zm121-159L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + vr = { + prefix: "fas", + iconName: "file-download", + icon: [ + 384, + 512, + [], + "f56d", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + yr = { + prefix: "fas", + iconName: "file-excel", + icon: [ + 384, + 512, + [], + "f1c3", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm60.1 106.5L224 336l60.1 93.5c5.1 8-.6 18.5-10.1 18.5h-34.9c-4.4 0-8.5-2.4-10.6-6.3C208.9 405.5 192 373 192 373c-6.4 14.8-10 20-36.6 68.8-2.1 3.9-6.1 6.3-10.5 6.3H110c-9.5 0-15.2-10.5-10.1-18.5l60.3-93.5-60.3-93.5c-5.2-8 .6-18.5 10.1-18.5h34.8c4.4 0 8.5 2.4 10.6 6.3 26.1 48.8 20 33.6 36.6 68.5 0 0 6.1-11.7 36.6-68.5 2.1-3.9 6.2-6.3 10.6-6.3H274c9.5-.1 15.2 10.4 10.1 18.4zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + Cr = { + prefix: "fas", + iconName: "file-export", + icon: [ + 576, + 512, + [], + "f56e", + "M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1zM192 336v-32c0-8.84 7.16-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.84 0-16-7.16-16-16zm379.05-28.02l-95.7-96.43c-10.06-10.14-27.36-3.01-27.36 11.27V288H384v64h63.99v65.18c0 14.28 17.29 21.41 27.36 11.27l95.7-96.42c6.6-6.66 6.6-17.4 0-24.05z", + ], + }, + Pr = { + prefix: "fas", + iconName: "file-image", + icon: [ + 384, + 512, + [], + "f1c5", + "M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z", + ], + }, + xr = { + prefix: "fas", + iconName: "file-import", + icon: [ + 512, + 512, + [], + "f56f", + "M16 288c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h112v-64H16zm336-152V0H152c-13.3 0-24 10.7-24 24v264h127.99v-65.18c0-14.28 17.29-21.41 27.36-11.27l95.7 96.43c6.6 6.65 6.6 17.39 0 24.04l-95.7 96.42c-10.06 10.14-27.36 3.01-27.36-11.27V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24zm153-31L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + Tr = { + prefix: "fas", + iconName: "file-invoice", + icon: [ + 384, + 512, + [], + "f570", + "M288 256H96v64h192v-64zm89-151L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 64c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm256 304c0 4.42-3.58 8-8 8h-80c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16zm0-200v96c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-96c0-8.84 7.16-16 16-16h224c8.84 0 16 7.16 16 16z", + ], + }, + Sr = { + prefix: "fas", + iconName: "file-invoice-dollar", + icon: [ + 384, + 512, + [], + "f571", + "M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM64 72c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8V72zm0 80v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8zm144 263.88V440c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-24.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V232c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v24.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07z", + ], + }, + Or = { + prefix: "fas", + iconName: "file-medical", + icon: [ + 384, + 512, + [], + "f477", + "M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 160v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8z", + ], + }, + Er = { + prefix: "fas", + iconName: "file-medical-alt", + icon: [ + 448, + 512, + [], + "f478", + "M288 136V0H88C74.7 0 64 10.7 64 24v232H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h140.9c3 0 5.8 1.7 7.2 4.4l19.9 39.8 56.8-113.7c2.9-5.9 11.4-5.9 14.3 0l34.7 69.5H352c8.8 0 16 7.2 16 16s-7.2 16-16 16h-89.9L240 275.8l-56.8 113.7c-2.9 5.9-11.4 5.9-14.3 0L134.1 320H64v168c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H312c-13.2 0-24-10.8-24-24zm153-31L343.1 7c-4.5-4.5-10.6-7-17-7H320v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + Mr = { + prefix: "fas", + iconName: "file-pdf", + icon: [ + 384, + 512, + [], + "f1c1", + "M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z", + ], + }, + Ar = { + prefix: "fas", + iconName: "file-powerpoint", + icon: [ + 384, + 512, + [], + "f1c4", + "M193.7 271.2c8.8 0 15.5 2.7 20.3 8.1 9.6 10.9 9.8 32.7-.2 44.1-4.9 5.6-11.9 8.5-21.1 8.5h-26.9v-60.7h27.9zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm53 165.2c0 90.3-88.8 77.6-111.1 77.6V436c0 6.6-5.4 12-12 12h-30.8c-6.6 0-12-5.4-12-12V236.2c0-6.6 5.4-12 12-12h81c44.5 0 72.9 32.8 72.9 77z", + ], + }, + Ir = { + prefix: "fas", + iconName: "file-prescription", + icon: [ + 384, + 512, + [], + "f572", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm68.53 179.48l11.31 11.31c6.25 6.25 6.25 16.38 0 22.63l-29.9 29.9L304 409.38c6.25 6.25 6.25 16.38 0 22.63l-11.31 11.31c-6.25 6.25-16.38 6.25-22.63 0L240 413.25l-30.06 30.06c-6.25 6.25-16.38 6.25-22.63 0L176 432c-6.25-6.25-6.25-16.38 0-22.63l30.06-30.06L146.74 320H128v48c0 8.84-7.16 16-16 16H96c-8.84 0-16-7.16-16-16V208c0-8.84 7.16-16 16-16h80c35.35 0 64 28.65 64 64 0 24.22-13.62 45.05-33.46 55.92L240 345.38l29.9-29.9c6.25-6.25 16.38-6.25 22.63 0zM176 272h-48v-32h48c8.82 0 16 7.18 16 16s-7.18 16-16 16zm208-150.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + Dr = { + prefix: "fas", + iconName: "file-signature", + icon: [ + 576, + 512, + [], + "f573", + "M218.17 424.14c-2.95-5.92-8.09-6.52-10.17-6.52s-7.22.59-10.02 6.19l-7.67 15.34c-6.37 12.78-25.03 11.37-29.48-2.09L144 386.59l-10.61 31.88c-5.89 17.66-22.38 29.53-41 29.53H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h12.39c4.83 0 9.11-3.08 10.64-7.66l18.19-54.64c3.3-9.81 12.44-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.75-16.19 54.06-9.7 66 14.16 1.89 3.78 5.49 5.95 9.36 6.26v-82.12l128-127.09V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24v-40l-128-.11c-16.12-.31-30.58-9.28-37.83-23.75zM384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1zm-96 225.06V416h68.99l161.68-162.78-67.88-67.88L288 346.96zm280.54-179.63l-31.87-31.87c-9.94-9.94-26.07-9.94-36.01 0l-27.25 27.25 67.88 67.88 27.25-27.25c9.95-9.94 9.95-26.07 0-36.01z", + ], + }, + Rr = { + prefix: "fas", + iconName: "file-upload", + icon: [ + 384, + 512, + [], + "f574", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm65.18 216.01H224v80c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-80H94.82c-14.28 0-21.41-17.29-11.27-27.36l96.42-95.7c6.65-6.61 17.39-6.61 24.04 0l96.42 95.7c10.15 10.07 3.03 27.36-11.25 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z", + ], + }, + wr = { + prefix: "fas", + iconName: "file-video", + icon: [ + 384, + 512, + [], + "f1c8", + "M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v38.059l55.029-55.013c15.011-15.01 40.971-4.491 40.971 16.97z", + ], + }, + Lr = { + prefix: "fas", + iconName: "file-word", + icon: [ + 384, + 512, + [], + "f1c2", + "M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm57.1 120H305c7.7 0 13.4 7.1 11.7 14.7l-38 168c-1.2 5.5-6.1 9.3-11.7 9.3h-38c-5.5 0-10.3-3.8-11.6-9.1-25.8-103.5-20.8-81.2-25.6-110.5h-.5c-1.1 14.3-2.4 17.4-25.6 110.5-1.3 5.3-6.1 9.1-11.6 9.1H117c-5.6 0-10.5-3.9-11.7-9.4l-37.8-168c-1.7-7.5 4-14.6 11.7-14.6h24.5c5.7 0 10.7 4 11.8 9.7 15.6 78 20.1 109.5 21 122.2 1.6-10.2 7.3-32.7 29.4-122.7 1.3-5.4 6.1-9.1 11.7-9.1h29.1c5.6 0 10.4 3.8 11.7 9.2 24 100.4 28.8 124 29.6 129.4-.2-11.2-2.6-17.8 21.6-129.2 1-5.6 5.9-9.5 11.5-9.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z", + ], + }, + Fr = { + prefix: "fas", + iconName: "fill", + icon: [ + 512, + 512, + [], + "f575", + "M502.63 217.06L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.77c-6.24-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.63l86.19 86.18-94.76 94.76c-37.49 37.49-37.49 98.26 0 135.75l117.19 117.19c18.75 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.88-28.12l221.57-221.57c12.49-12.5 12.49-32.76 0-45.26zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.61 58.6c12.49 12.49 32.75 12.49 45.24 0 12.49-12.49 12.49-32.75 0-45.24l-58.61-58.6 58.95-58.95 162.45 162.44-48.35 48.34z", + ], + }, + Nr = { + prefix: "fas", + iconName: "fill-drip", + icon: [ + 576, + 512, + [], + "f576", + "M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z", + ], + }, + kr = { + prefix: "fas", + iconName: "film", + icon: [ + 512, + 512, + [], + "f008", + "M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z", + ], + }, + zr = { + prefix: "fas", + iconName: "filter", + icon: [ + 512, + 512, + [], + "f0b0", + "M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z", + ], + }, + jr = { + prefix: "fas", + iconName: "fingerprint", + icon: [ + 512, + 512, + [], + "f577", + "M256.12 245.96c-13.25 0-24 10.74-24 24 1.14 72.25-8.14 141.9-27.7 211.55-2.73 9.72 2.15 30.49 23.12 30.49 10.48 0 20.11-6.92 23.09-17.52 13.53-47.91 31.04-125.41 29.48-224.52.01-13.25-10.73-24-23.99-24zm-.86-81.73C194 164.16 151.25 211.3 152.1 265.32c.75 47.94-3.75 95.91-13.37 142.55-2.69 12.98 5.67 25.69 18.64 28.36 13.05 2.67 25.67-5.66 28.36-18.64 10.34-50.09 15.17-101.58 14.37-153.02-.41-25.95 19.92-52.49 54.45-52.34 31.31.47 57.15 25.34 57.62 55.47.77 48.05-2.81 96.33-10.61 143.55-2.17 13.06 6.69 25.42 19.76 27.58 19.97 3.33 26.81-15.1 27.58-19.77 8.28-50.03 12.06-101.21 11.27-152.11-.88-55.8-47.94-101.88-104.91-102.72zm-110.69-19.78c-10.3-8.34-25.37-6.8-33.76 3.48-25.62 31.5-39.39 71.28-38.75 112 .59 37.58-2.47 75.27-9.11 112.05-2.34 13.05 6.31 25.53 19.36 27.89 20.11 3.5 27.07-14.81 27.89-19.36 7.19-39.84 10.5-80.66 9.86-121.33-.47-29.88 9.2-57.88 28-80.97 8.35-10.28 6.79-25.39-3.49-33.76zm109.47-62.33c-15.41-.41-30.87 1.44-45.78 4.97-12.89 3.06-20.87 15.98-17.83 28.89 3.06 12.89 16 20.83 28.89 17.83 11.05-2.61 22.47-3.77 34-3.69 75.43 1.13 137.73 61.5 138.88 134.58.59 37.88-1.28 76.11-5.58 113.63-1.5 13.17 7.95 25.08 21.11 26.58 16.72 1.95 25.51-11.88 26.58-21.11a929.06 929.06 0 0 0 5.89-119.85c-1.56-98.75-85.07-180.33-186.16-181.83zm252.07 121.45c-2.86-12.92-15.51-21.2-28.61-18.27-12.94 2.86-21.12 15.66-18.26 28.61 4.71 21.41 4.91 37.41 4.7 61.6-.11 13.27 10.55 24.09 23.8 24.2h.2c13.17 0 23.89-10.61 24-23.8.18-22.18.4-44.11-5.83-72.34zm-40.12-90.72C417.29 43.46 337.6 1.29 252.81.02 183.02-.82 118.47 24.91 70.46 72.94 24.09 119.37-.9 181.04.14 246.65l-.12 21.47c-.39 13.25 10.03 24.31 23.28 24.69.23.02.48.02.72.02 12.92 0 23.59-10.3 23.97-23.3l.16-23.64c-.83-52.5 19.16-101.86 56.28-139 38.76-38.8 91.34-59.67 147.68-58.86 69.45 1.03 134.73 35.56 174.62 92.39 7.61 10.86 22.56 13.45 33.42 5.86 10.84-7.62 13.46-22.59 5.84-33.43z", + ], + }, + Br = { + prefix: "fas", + iconName: "fire", + icon: [ + 384, + 512, + [], + "f06d", + "M216 23.858c0-23.802-30.653-32.765-44.149-13.038C48 191.851 224 200 224 288c0 35.629-29.114 64.458-64.85 63.994C123.98 351.538 96 322.22 96 287.046v-85.51c0-21.703-26.471-32.225-41.432-16.504C27.801 213.158 0 261.332 0 320c0 105.869 86.131 192 192 192s192-86.131 192-192c0-170.29-168-193.003-168-296.142z", + ], + }, + Vr = { + prefix: "fas", + iconName: "fire-extinguisher", + icon: [ + 448, + 512, + [], + "f134", + "M434.027 26.329l-168 28C254.693 56.218 256 67.8 256 72h-58.332C208.353 36.108 181.446 0 144 0c-39.435 0-66.368 39.676-52.228 76.203-52.039 13.051-75.381 54.213-90.049 90.884-4.923 12.307 1.063 26.274 13.37 31.197 12.317 4.926 26.279-1.075 31.196-13.37C75.058 112.99 106.964 120 168 120v27.076c-41.543 10.862-72 49.235-72 94.129V488c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V240c0-44.731-30.596-82.312-72-92.97V120h40c0 2.974-1.703 15.716 10.027 17.671l168 28C441.342 166.89 448 161.25 448 153.834V38.166c0-7.416-6.658-13.056-13.973-11.837zM144 72c-8.822 0-16-7.178-16-16s7.178-16 16-16 16 7.178 16 16-7.178 16-16 16z", + ], + }, + Gr = { + prefix: "fas", + iconName: "first-aid", + icon: [ + 576, + 512, + [], + "f479", + "M0 80v352c0 26.5 21.5 48 48 48h48V32H48C21.5 32 0 53.5 0 80zm128 400h320V32H128v448zm64-248c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48zM528 32h-48v448h48c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z", + ], + }, + Ur = { + prefix: "fas", + iconName: "fish", + icon: [ + 576, + 512, + [], + "f578", + "M327.1 96c-89.97 0-168.54 54.77-212.27 101.63L27.5 131.58c-12.13-9.18-30.24.6-27.14 14.66L24.54 256 .35 365.77c-3.1 14.06 15.01 23.83 27.14 14.66l87.33-66.05C158.55 361.23 237.13 416 327.1 416 464.56 416 576 288 576 256S464.56 96 327.1 96zm87.43 184c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24 13.26 0 24 10.74 24 24 0 13.25-10.75 24-24 24z", + ], + }, + Hr = { + prefix: "fas", + iconName: "fist-raised", + icon: [ + 384, + 512, + [], + "f6de", + "M255.98 160V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v146.93c5.02-1.78 10.34-2.93 15.97-2.93h48.03zm128 95.99c-.01-35.34-28.66-63.99-63.99-63.99H207.85c-8.78 0-15.9 7.07-15.9 15.85v.56c0 26.27 21.3 47.59 47.57 47.59h35.26c9.68 0 13.2 3.58 13.2 8v16.2c0 4.29-3.59 7.78-7.88 8-44.52 2.28-64.16 24.71-96.05 72.55l-6.31 9.47a7.994 7.994 0 0 1-11.09 2.22l-13.31-8.88a7.994 7.994 0 0 1-2.22-11.09l6.31-9.47c15.73-23.6 30.2-43.26 47.31-58.08-17.27-5.51-31.4-18.12-38.87-34.45-6.59 3.41-13.96 5.52-21.87 5.52h-32c-12.34 0-23.49-4.81-32-12.48C71.48 251.19 60.33 256 48 256H16c-5.64 0-10.97-1.15-16-2.95v77.93c0 33.95 13.48 66.5 37.49 90.51L63.99 448v64h255.98v-63.96l35.91-35.92A96.035 96.035 0 0 0 384 344.21l-.02-88.22zm-32.01-90.09V48c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v112h32c11.28 0 21.94 2.31 32 5.9zM16 224h32c8.84 0 16-7.16 16-16V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v128c0 8.84 7.16 16 16 16zm95.99 0h32c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v160c0 8.84 7.16 16 16 16z", + ], + }, + Wr = { + prefix: "fas", + iconName: "flag", + icon: [ + 512, + 512, + [], + "f024", + "M349.565 98.783C295.978 98.783 251.721 64 184.348 64c-24.955 0-47.309 4.384-68.045 12.013a55.947 55.947 0 0 0 3.586-23.562C118.117 24.015 94.806 1.206 66.338.048 34.345-1.254 8 24.296 8 56c0 19.026 9.497 35.825 24 45.945V488c0 13.255 10.745 24 24 24h16c13.255 0 24-10.745 24-24v-94.4c28.311-12.064 63.582-22.122 114.435-22.122 53.588 0 97.844 34.783 165.217 34.783 48.169 0 86.667-16.294 122.505-40.858C506.84 359.452 512 349.571 512 339.045v-243.1c0-23.393-24.269-38.87-45.485-29.016-34.338 15.948-76.454 31.854-116.95 31.854z", + ], + }, + Xr = { + prefix: "fas", + iconName: "flag-checkered", + icon: [ + 512, + 512, + [], + "f11e", + "M466.515 66.928C487.731 57.074 512 72.551 512 95.944v243.1c0 10.526-5.161 20.407-13.843 26.358-35.837 24.564-74.335 40.858-122.505 40.858-67.373 0-111.63-34.783-165.217-34.783-50.853 0-86.124 10.058-114.435 22.122V488c0 13.255-10.745 24-24 24H56c-13.255 0-24-10.745-24-24V101.945C17.497 91.825 8 75.026 8 56 8 24.296 34.345-1.254 66.338.048c28.468 1.158 51.779 23.968 53.551 52.404.52 8.342-.81 16.31-3.586 23.562C137.039 68.384 159.393 64 184.348 64c67.373 0 111.63 34.783 165.217 34.783 40.496 0 82.612-15.906 116.95-31.855zM96 134.63v70.49c29-10.67 51.18-17.83 73.6-20.91v-71.57c-23.5 2.17-40.44 9.79-73.6 21.99zm220.8 9.19c-26.417-4.672-49.886-13.979-73.6-21.34v67.42c24.175 6.706 47.566 16.444 73.6 22.31v-68.39zm-147.2 40.39v70.04c32.796-2.978 53.91-.635 73.6 3.8V189.9c-25.247-7.035-46.581-9.423-73.6-5.69zm73.6 142.23c26.338 4.652 49.732 13.927 73.6 21.34v-67.41c-24.277-6.746-47.54-16.45-73.6-22.32v68.39zM96 342.1c23.62-8.39 47.79-13.84 73.6-16.56v-71.29c-26.11 2.35-47.36 8.04-73.6 17.36v70.49zm368-221.6c-21.3 8.85-46.59 17.64-73.6 22.47v71.91c27.31-4.36 50.03-14.1 73.6-23.89V120.5zm0 209.96v-70.49c-22.19 14.2-48.78 22.61-73.6 26.02v71.58c25.07-2.38 48.49-11.04 73.6-27.11zM316.8 212.21v68.16c25.664 7.134 46.616 9.342 73.6 5.62v-71.11c-25.999 4.187-49.943 2.676-73.6-2.67z", + ], + }, + Yr = { + prefix: "fas", + iconName: "flask", + icon: [ + 448, + 512, + [], + "f0c3", + "M437.2 403.5L320 215V64h8c13.3 0 24-10.7 24-24V24c0-13.3-10.7-24-24-24H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h8v151L10.8 403.5C-18.5 450.6 15.3 512 70.9 512h306.2c55.7 0 89.4-61.5 60.1-108.5zM137.9 320l48.2-77.6c3.7-5.2 5.8-11.6 5.8-18.4V64h64v160c0 6.9 2.2 13.2 5.8 18.4l48.2 77.6h-172z", + ], + }, + Kr = { + prefix: "fas", + iconName: "flushed", + icon: [ + 496, + 512, + [], + "f579", + "M344 200c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-192 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM80 224c0-39.8 32.2-72 72-72s72 32.2 72 72-32.2 72-72 72-72-32.2-72-72zm232 176H184c-21.2 0-21.2-32 0-32h128c21.2 0 21.2 32 0 32zm32-104c-39.8 0-72-32.2-72-72s32.2-72 72-72 72 32.2 72 72-32.2 72-72 72z", + ], + }, + Zr = { prefix: "fas", iconName: "folder", icon: [512, 512, [], "f07b", "M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"] }, + qr = { + prefix: "fas", + iconName: "folder-minus", + icon: [ + 512, + 512, + [], + "f65d", + "M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm-96 168c0 8.84-7.16 16-16 16H160c-8.84 0-16-7.16-16-16v-16c0-8.84 7.16-16 16-16h192c8.84 0 16 7.16 16 16v16z", + ], + }, + Qr = { + prefix: "fas", + iconName: "folder-open", + icon: [ + 576, + 512, + [], + "f07c", + "M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z", + ], + }, + Jr = { + prefix: "fas", + iconName: "folder-plus", + icon: [ + 512, + 512, + [], + "f65e", + "M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm-96 168c0 8.84-7.16 16-16 16h-72v72c0 8.84-7.16 16-16 16h-16c-8.84 0-16-7.16-16-16v-72h-72c-8.84 0-16-7.16-16-16v-16c0-8.84 7.16-16 16-16h72v-72c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v72h72c8.84 0 16 7.16 16 16v16z", + ], + }, + $r = { + prefix: "fas", + iconName: "font", + icon: [ + 448, + 512, + [], + "f031", + "M152 416h-24.013l26.586-80.782H292.8L319.386 416H296c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-26.739L275.495 42.746A16 16 0 0 0 260.382 32h-72.766a16 16 0 0 0-15.113 10.746L42.739 416H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm64.353-271.778c4.348-15.216 6.61-28.156 7.586-34.644.839 6.521 2.939 19.476 7.727 34.706l41.335 124.006h-98.619l41.971-124.068z", + ], + }, + eo = { + prefix: "fas", + iconName: "font-awesome-logo-full", + icon: [ + 3992, + 512, + ["Font Awesome"], + "f4e6", + "M454.6 0H57.4C25.9 0 0 25.9 0 57.4v397.3C0 486.1 25.9 512 57.4 512h397.3c31.4 0 57.4-25.9 57.4-57.4V57.4C512 25.9 486.1 0 454.6 0zm-58.9 324.9c0 4.8-4.1 6.9-8.9 8.9-19.2 8.1-39.7 15.7-61.5 15.7-40.5 0-68.7-44.8-163.2 2.5v51.8c0 30.3-45.7 30.2-45.7 0v-250c-9-7-15-17.9-15-30.3 0-21 17.1-38.2 38.2-38.2 21 0 38.2 17.1 38.2 38.2 0 12.2-5.8 23.2-14.9 30.2v21c37.1-12 65.5-34.4 146.1-3.4 26.6 11.4 68.7-15.7 76.5-15.7 5.5 0 10.3 4.1 10.3 8.9v160.4zm432.9-174.2h-137v70.1H825c39.8 0 40.4 62.2 0 62.2H691.6v105.6c0 45.5-70.7 46.4-70.7 0V128.3c0-22 18-39.8 39.8-39.8h167.8c39.6 0 40.5 62.2.1 62.2zm191.1 23.4c-169.3 0-169.1 252.4 0 252.4 169.9 0 169.9-252.4 0-252.4zm0 196.1c-81.6 0-82.1-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm372.4 53.4c-17.5 0-31.4-13.9-31.4-31.4v-117c0-62.4-72.6-52.5-99.1-16.4v133.4c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c43.3-51.6 162.4-60.4 162.4 39.3v141.5c.3 30.4-31.5 31.4-31.7 31.4zm179.7 2.9c-44.3 0-68.3-22.9-68.3-65.8V235.2H1488c-35.6 0-36.7-55.3 0-55.3h15.5v-37.3c0-41.3 63.8-42.1 63.8 0v37.5h24.9c35.4 0 35.7 55.3 0 55.3h-24.9v108.5c0 29.6 26.1 26.3 27.4 26.3 31.4 0 52.6 56.3-22.9 56.3zM1992 123c-19.5-50.2-95.5-50-114.5 0-107.3 275.7-99.5 252.7-99.5 262.8 0 42.8 58.3 51.2 72.1 14.4l13.5-35.9H2006l13 35.9c14.2 37.7 72.1 27.2 72.1-14.4 0-10.1 5.3 6.8-99.1-262.8zm-108.9 179.1l51.7-142.9 51.8 142.9h-103.5zm591.3-85.6l-53.7 176.3c-12.4 41.2-72 41-84 0l-42.3-135.9-42.3 135.9c-12.4 40.9-72 41.2-84.5 0l-54.2-176.3c-12.5-39.4 49.8-56.1 60.2-16.9L2213 342l45.3-139.5c10.9-32.7 59.6-34.7 71.2 0l45.3 139.5 39.3-142.4c10.3-38.3 72.6-23.8 60.3 16.9zm275.4 75.1c0-42.4-33.9-117.5-119.5-117.5-73.2 0-124.4 56.3-124.4 126 0 77.2 55.3 126.4 128.5 126.4 31.7 0 93-11.5 93-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-109 8.4-115.9-43.8h148.3c16.3 0 29.3-13.4 29.3-28.9zM2571 277.7c9.5-73.4 113.9-68.6 118.6 0H2571zm316.7 148.8c-31.4 0-81.6-10.5-96.6-31.9-12.4-17 2.5-39.8 21.8-39.8 16.3 0 36.8 22.9 77.7 22.9 27.4 0 40.4-11 40.4-25.8 0-39.8-142.9-7.4-142.9-102 0-40.4 35.3-75.7 98.6-75.7 31.4 0 74.1 9.9 87.6 29.4 10.8 14.8-1.4 36.2-20.9 36.2-15.1 0-26.7-17.3-66.2-17.3-22.9 0-37.8 10.5-37.8 23.8 0 35.9 142.4 6 142.4 103.1-.1 43.7-37.4 77.1-104.1 77.1zm266.8-252.4c-169.3 0-169.1 252.4 0 252.4 170.1 0 169.6-252.4 0-252.4zm0 196.1c-81.8 0-82-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm476.9 22V268.7c0-53.8-61.4-45.8-85.7-10.5v134c0 41.3-63.8 42.1-63.8 0V268.7c0-52.1-59.5-47.4-85.7-10.1v133.6c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c9.9-14.4 41.8-37.3 78.6-37.3 35.3 0 57.7 16.4 66.7 43.8 13.9-21.8 45.8-43.8 82.6-43.8 44.3 0 70.7 23.4 70.7 72.7v145.3c.5 17.3-13.5 31.4-31.9 31.4 3.5.1-31.3 1.1-31.3-31.3zM3992 291.6c0-42.4-32.4-117.5-117.9-117.5-73.2 0-127.5 56.3-127.5 126 0 77.2 58.3 126.4 131.6 126.4 31.7 0 91.5-11.5 91.5-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-110.5 8.4-117.5-43.8h149.8c16.3 0 29.1-13.4 29.3-28.9zm-180.5-13.9c9.7-74.4 115.9-68.3 120.1 0h-120.1z", + ], + }, + to = { + prefix: "fas", + iconName: "football-ball", + icon: [ + 496, + 512, + [], + "f44e", + "M481.5 60.3c-4.8-18.2-19.1-32.5-37.3-37.4C420.3 16.5 383 8.9 339.4 8L496 164.8c-.8-43.5-8.2-80.6-14.5-104.5zm-467 391.4c4.8 18.2 19.1 32.5 37.3 37.4 23.9 6.4 61.2 14 104.8 14.9L0 347.2c.8 43.5 8.2 80.6 14.5 104.5zM4.2 283.4L220.4 500c132.5-19.4 248.8-118.7 271.5-271.4L275.6 12C143.1 31.4 26.8 130.7 4.2 283.4zm317.3-123.6c3.1-3.1 8.2-3.1 11.3 0l11.3 11.3c3.1 3.1 3.1 8.2 0 11.3l-28.3 28.3 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-28.3-28.3-22.6 22.7 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L248 278.6l-22.6 22.6 28.3 28.3c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-28.3-28.3-28.3 28.3c-3.1 3.1-8.2 3.1-11.3 0l-11.3-11.3c-3.1-3.1-3.1-8.2 0-11.3l28.3-28.3-28.3-28.2c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 22.6-22.6-28.3-28.3c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 22.6-22.6-28.3-28.3c-3.1-3.1-3.1-8.2 0-11.3l11.3-11.3c3.1-3.1 8.2-3.1 11.3 0l28.3 28.3 28.3-28.5z", + ], + }, + no = { + prefix: "fas", + iconName: "forward", + icon: [ + 512, + 512, + [], + "f04e", + "M500.5 231.4l-192-160C287.9 54.3 256 68.6 256 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2zm-256 0l-192-160C31.9 54.3 0 68.6 0 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2z", + ], + }, + io = { + prefix: "fas", + iconName: "frog", + icon: [ + 576, + 512, + [], + "f52e", + "M446.53 97.43C439.67 60.23 407.19 32 368 32c-39.23 0-71.72 28.29-78.54 65.54C126.75 112.96-.5 250.12 0 416.98.11 451.9 29.08 480 64 480h304c8.84 0 16-7.16 16-16 0-17.67-14.33-32-32-32h-79.49l35.8-48.33c24.14-36.23 10.35-88.28-33.71-106.6-23.89-9.93-51.55-4.65-72.24 10.88l-32.76 24.59c-7.06 5.31-17.09 3.91-22.41-3.19-5.3-7.08-3.88-17.11 3.19-22.41l34.78-26.09c36.84-27.66 88.28-27.62 125.13 0 10.87 8.15 45.87 39.06 40.8 93.21L469.62 480H560c8.84 0 16-7.16 16-16 0-17.67-14.33-32-32-32h-53.63l-98.52-104.68 154.44-86.65A58.16 58.16 0 0 0 576 189.94c0-21.4-11.72-40.95-30.48-51.23-40.56-22.22-98.99-41.28-98.99-41.28zM368 136c-13.26 0-24-10.75-24-24 0-13.26 10.74-24 24-24 13.25 0 24 10.74 24 24 0 13.25-10.75 24-24 24z", + ], + }, + ro = { + prefix: "fas", + iconName: "frown", + icon: [ + 496, + 512, + [], + "f119", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm170.2 218.2C315.8 367.4 282.9 352 248 352s-67.8 15.4-90.2 42.2c-13.5 16.3-38.1-4.2-24.6-20.5C161.7 339.6 203.6 320 248 320s86.3 19.6 114.7 53.8c13.6 16.2-11 36.7-24.5 20.4z", + ], + }, + oo = { + prefix: "fas", + iconName: "frown-open", + icon: [ + 496, + 512, + [], + "f57a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 208c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm187.3 183.3c-31.2-9.6-59.4-15.3-75.3-15.3s-44.1 5.7-75.3 15.3c-11.5 3.5-22.5-6.3-20.5-18.1 7-40 60.1-61.2 95.8-61.2s88.8 21.3 95.8 61.2c2 11.9-9.1 21.6-20.5 18.1zM328 240c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + ao = { + prefix: "fas", + iconName: "funnel-dollar", + icon: [ + 640, + 512, + [], + "f662", + "M433.46 165.94l101.2-111.87C554.61 34.12 540.48 0 512.26 0H31.74C3.52 0-10.61 34.12 9.34 54.07L192 256v155.92c0 12.59 5.93 24.44 16 32l79.99 60c20.86 15.64 48.47 6.97 59.22-13.57C310.8 455.38 288 406.35 288 352c0-89.79 62.05-165.17 145.46-186.06zM480 192c-88.37 0-160 71.63-160 160s71.63 160 160 160 160-71.63 160-160-71.63-160-160-160zm16 239.88V448c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V256c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.04 44.44-42.67 45.07z", + ], + }, + so = { + prefix: "fas", + iconName: "futbol", + icon: [ + 512, + 512, + [], + "f1e3", + "M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zm-48 0l-.003-.282-26.064 22.741-62.679-58.5 16.454-84.355 34.303 3.072c-24.889-34.216-60.004-60.089-100.709-73.141l13.651 31.939L256 139l-74.953-41.525 13.651-31.939c-40.631 13.028-75.78 38.87-100.709 73.141l34.565-3.073 16.192 84.355-62.678 58.5-26.064-22.741-.003.282c0 43.015 13.497 83.952 38.472 117.991l7.704-33.897 85.138 10.447 36.301 77.826-29.902 17.786c40.202 13.122 84.29 13.148 124.572 0l-29.902-17.786 36.301-77.826 85.138-10.447 7.704 33.897C442.503 339.952 456 299.015 456 256zm-248.102 69.571l-29.894-91.312L256 177.732l77.996 56.527-29.622 91.312h-96.476z", + ], + }, + co = { + prefix: "fas", + iconName: "gamepad", + icon: [ + 640, + 512, + [], + "f11b", + "M480 96H160C71.6 96 0 167.6 0 256s71.6 160 160 160c44.8 0 85.2-18.4 114.2-48h91.5c29 29.6 69.5 48 114.2 48 88.4 0 160-71.6 160-160S568.4 96 480 96zM256 276c0 6.6-5.4 12-12 12h-52v52c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-52H76c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h52v-52c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h52c6.6 0 12 5.4 12 12v40zm184 68c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-80c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z", + ], + }, + lo = { + prefix: "fas", + iconName: "gas-pump", + icon: [ + 512, + 512, + [], + "f52f", + "M336 448H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h320c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm157.2-340.7l-81-81c-6.2-6.2-16.4-6.2-22.6 0l-11.3 11.3c-6.2 6.2-6.2 16.4 0 22.6L416 97.9V160c0 28.1 20.9 51.3 48 55.2V376c0 13.2-10.8 24-24 24s-24-10.8-24-24v-32c0-48.6-39.4-88-88-88h-8V64c0-35.3-28.7-64-64-64H96C60.7 0 32 28.7 32 64v352h288V304h8c22.1 0 40 17.9 40 40v27.8c0 37.7 27 72 64.5 75.9 43 4.3 79.5-29.5 79.5-71.7V152.6c0-17-6.8-33.3-18.8-45.3zM256 192H96V64h160v128z", + ], + }, + uo = { + prefix: "fas", + iconName: "gavel", + icon: [ + 512, + 512, + [], + "f0e3", + "M504.971 199.362l-22.627-22.627c-9.373-9.373-24.569-9.373-33.941 0l-5.657 5.657L329.608 69.255l5.657-5.657c9.373-9.373 9.373-24.569 0-33.941L312.638 7.029c-9.373-9.373-24.569-9.373-33.941 0L154.246 131.48c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l5.657-5.657 39.598 39.598-81.04 81.04-5.657-5.657c-12.497-12.497-32.758-12.497-45.255 0L9.373 412.118c-12.497 12.497-12.497 32.758 0 45.255l45.255 45.255c12.497 12.497 32.758 12.497 45.255 0l114.745-114.745c12.497-12.497 12.497-32.758 0-45.255l-5.657-5.657 81.04-81.04 39.598 39.598-5.657 5.657c-9.373 9.373-9.373 24.569 0 33.941l22.627 22.627c9.373 9.373 24.569 9.373 33.941 0l124.451-124.451c9.372-9.372 9.372-24.568 0-33.941z", + ], + }, + ho = { + prefix: "fas", + iconName: "gem", + icon: [ + 576, + 512, + [], + "f3a5", + "M485.5 0L576 160H474.9L405.7 0h79.8zm-128 0l69.2 160H149.3L218.5 0h139zm-267 0h79.8l-69.2 160H0L90.5 0zM0 192h100.7l123 251.7c1.5 3.1-2.7 5.9-5 3.3L0 192zm148.2 0h279.6l-137 318.2c-1 2.4-4.5 2.4-5.5 0L148.2 192zm204.1 251.7l123-251.7H576L357.3 446.9c-2.3 2.7-6.5-.1-5-3.2z", + ], + }, + po = { + prefix: "fas", + iconName: "genderless", + icon: [288, 512, [], "f22d", "M144 176c44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80 35.9-80 80-80m0-64C64.5 112 0 176.5 0 256s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144z"], + }, + fo = { + prefix: "fas", + iconName: "ghost", + icon: [ + 384, + 512, + [], + "f6e2", + "M186.1.09C81.01 3.24 0 94.92 0 200.05v263.92c0 14.26 17.23 21.39 27.31 11.31l24.92-18.53c6.66-4.95 16-3.99 21.51 2.21l42.95 48.35c6.25 6.25 16.38 6.25 22.63 0l40.72-45.85c6.37-7.17 17.56-7.17 23.92 0l40.72 45.85c6.25 6.25 16.38 6.25 22.63 0l42.95-48.35c5.51-6.2 14.85-7.17 21.51-2.21l24.92 18.53c10.08 10.08 27.31 2.94 27.31-11.31V192C384 84 294.83-3.17 186.1.09zM128 224c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm128 0c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + mo = { + prefix: "fas", + iconName: "gift", + icon: [ + 512, + 512, + [], + "f06b", + "M32 448c0 17.7 14.3 32 32 32h160V320H32v128zm448-288h-42.1c6.2-12.1 10.1-25.5 10.1-40 0-48.5-39.5-88-88-88-41.6 0-68.5 21.3-103 68.3-34.5-47-61.4-68.3-103-68.3-48.5 0-88 39.5-88 88 0 14.5 3.8 27.9 10.1 40H32c-17.7 0-32 14.3-32 32v80c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-80c0-17.7-14.3-32-32-32zm-326.1 0c-22.1 0-40-17.9-40-40s17.9-40 40-40c19.9 0 34.6 3.3 86.1 80h-86.1zm206.1 0h-86.1c51.4-76.5 65.7-80 86.1-80 22.1 0 40 17.9 40 40s-17.9 40-40 40zm-72 320h160c17.7 0 32-14.3 32-32V320H288v160z", + ], + }, + go = { + prefix: "fas", + iconName: "glass-martini", + icon: [ + 512, + 512, + [], + "f000", + "M502.05 57.6C523.3 36.34 508.25 0 478.2 0H33.8C3.75 0-11.3 36.34 9.95 57.6L224 271.64V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40h-56V271.64L502.05 57.6z", + ], + }, + bo = { + prefix: "fas", + iconName: "glass-martini-alt", + icon: [ + 512, + 512, + [], + "f57b", + "M502.05 57.6C523.3 36.34 508.25 0 478.2 0H33.8C3.75 0-11.3 36.34 9.95 57.6L224 271.64V464h-56c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h240c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40h-56V271.64L502.05 57.6zM443.77 48l-48 48H116.24l-48-48h375.53z", + ], + }, + _o = { + prefix: "fas", + iconName: "glasses", + icon: [ + 576, + 512, + [], + "f530", + "M574.1 280.37L528.75 98.66c-5.91-23.7-21.59-44.05-43-55.81-21.44-11.73-46.97-14.11-70.19-6.33l-15.25 5.08c-8.39 2.79-12.92 11.86-10.12 20.24l5.06 15.18c2.79 8.38 11.85 12.91 20.23 10.12l13.18-4.39c10.87-3.62 23-3.57 33.16 1.73 10.29 5.37 17.57 14.56 20.37 25.82l38.46 153.82c-22.19-6.81-49.79-12.46-81.2-12.46-34.77 0-73.98 7.02-114.85 26.74h-73.18c-40.87-19.74-80.08-26.75-114.86-26.75-31.42 0-59.02 5.65-81.21 12.46l38.46-153.83c2.79-11.25 10.09-20.45 20.38-25.81 10.16-5.3 22.28-5.35 33.15-1.73l13.17 4.39c8.38 2.79 17.44-1.74 20.23-10.12l5.06-15.18c2.8-8.38-1.73-17.45-10.12-20.24l-15.25-5.08c-23.22-7.78-48.75-5.41-70.19 6.33-21.41 11.77-37.09 32.11-43 55.8L1.9 280.37A64.218 64.218 0 0 0 0 295.86v70.25C0 429.01 51.58 480 115.2 480h37.12c60.28 0 110.37-45.94 114.88-105.37l2.93-38.63h35.75l2.93 38.63C313.31 434.06 363.4 480 423.68 480h37.12c63.62 0 115.2-50.99 115.2-113.88v-70.25c0-5.23-.64-10.43-1.9-15.5zm-370.72 89.42c-1.97 25.91-24.4 46.21-51.06 46.21H115.2C86.97 416 64 393.62 64 366.11v-37.54c18.12-6.49 43.42-12.92 72.58-12.92 23.86 0 47.26 4.33 69.93 12.92l-3.13 41.22zM512 366.12c0 27.51-22.97 49.88-51.2 49.88h-37.12c-26.67 0-49.1-20.3-51.06-46.21l-3.13-41.22c22.67-8.59 46.08-12.92 69.95-12.92 29.12 0 54.43 6.44 72.55 12.93v37.54z", + ], + }, + vo = { + prefix: "fas", + iconName: "globe", + icon: [ + 496, + 512, + [], + "f0ac", + "M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z", + ], + }, + yo = { + prefix: "fas", + iconName: "globe-africa", + icon: [ + 496, + 512, + [], + "f57c", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm160 215.5v6.93c0 5.87-3.32 11.24-8.57 13.86l-15.39 7.7a15.485 15.485 0 0 1-15.53-.97l-18.21-12.14a15.52 15.52 0 0 0-13.5-1.81l-2.65.88c-9.7 3.23-13.66 14.79-7.99 23.3l13.24 19.86c2.87 4.31 7.71 6.9 12.89 6.9h8.21c8.56 0 15.5 6.94 15.5 15.5v11.34c0 3.35-1.09 6.62-3.1 9.3l-18.74 24.98c-1.42 1.9-2.39 4.1-2.83 6.43l-4.3 22.83c-.62 3.29-2.29 6.29-4.76 8.56a159.608 159.608 0 0 0-25 29.16l-13.03 19.55a27.756 27.756 0 0 1-23.09 12.36c-10.51 0-20.12-5.94-24.82-15.34a78.902 78.902 0 0 1-8.33-35.29V367.5c0-8.56-6.94-15.5-15.5-15.5h-25.88c-14.49 0-28.38-5.76-38.63-16a54.659 54.659 0 0 1-16-38.63v-14.06c0-17.19 8.1-33.38 21.85-43.7l27.58-20.69a54.663 54.663 0 0 1 32.78-10.93h.89c8.48 0 16.85 1.97 24.43 5.77l14.72 7.36c3.68 1.84 7.93 2.14 11.83.84l47.31-15.77c6.33-2.11 10.6-8.03 10.6-14.7 0-8.56-6.94-15.5-15.5-15.5h-10.09c-4.11 0-8.05-1.63-10.96-4.54l-6.92-6.92a15.493 15.493 0 0 0-10.96-4.54H199.5c-8.56 0-15.5-6.94-15.5-15.5v-4.4c0-7.11 4.84-13.31 11.74-15.04l14.45-3.61c3.74-.94 7-3.23 9.14-6.44l8.08-12.11c2.87-4.31 7.71-6.9 12.89-6.9h24.21c8.56 0 15.5-6.94 15.5-15.5v-21.7C359.23 71.63 422.86 131.02 441.93 208H423.5c-8.56 0-15.5 6.94-15.5 15.5z", + ], + }, + Co = { + prefix: "fas", + iconName: "globe-americas", + icon: [ + 496, + 512, + [], + "f57d", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm82.29 357.6c-3.9 3.88-7.99 7.95-11.31 11.28-2.99 3-5.1 6.7-6.17 10.71-1.51 5.66-2.73 11.38-4.77 16.87l-17.39 46.85c-13.76 3-28 4.69-42.65 4.69v-27.38c1.69-12.62-7.64-36.26-22.63-51.25-6-6-9.37-14.14-9.37-22.63v-32.01c0-11.64-6.27-22.34-16.46-27.97-14.37-7.95-34.81-19.06-48.81-26.11-11.48-5.78-22.1-13.14-31.65-21.75l-.8-.72a114.792 114.792 0 0 1-18.06-20.74c-9.38-13.77-24.66-36.42-34.59-51.14 20.47-45.5 57.36-82.04 103.2-101.89l24.01 12.01C203.48 89.74 216 82.01 216 70.11v-11.3c7.99-1.29 16.12-2.11 24.39-2.42l28.3 28.3c6.25 6.25 6.25 16.38 0 22.63L264 112l-10.34 10.34c-3.12 3.12-3.12 8.19 0 11.31l4.69 4.69c3.12 3.12 3.12 8.19 0 11.31l-8 8a8.008 8.008 0 0 1-5.66 2.34h-8.99c-2.08 0-4.08.81-5.58 2.27l-9.92 9.65a8.008 8.008 0 0 0-1.58 9.31l15.59 31.19c2.66 5.32-1.21 11.58-7.15 11.58h-5.64c-1.93 0-3.79-.7-5.24-1.96l-9.28-8.06a16.017 16.017 0 0 0-15.55-3.1l-31.17 10.39a11.95 11.95 0 0 0-8.17 11.34c0 4.53 2.56 8.66 6.61 10.69l11.08 5.54c9.41 4.71 19.79 7.16 30.31 7.16s22.59 27.29 32 32h66.75c8.49 0 16.62 3.37 22.63 9.37l13.69 13.69a30.503 30.503 0 0 1 8.93 21.57 46.536 46.536 0 0 1-13.72 32.98zM417 274.25c-5.79-1.45-10.84-5-14.15-9.97l-17.98-26.97a23.97 23.97 0 0 1 0-26.62l19.59-29.38c2.32-3.47 5.5-6.29 9.24-8.15l12.98-6.49C440.2 193.59 448 223.87 448 256c0 8.67-.74 17.16-1.82 25.54L417 274.25z", + ], + }, + Po = { + prefix: "fas", + iconName: "globe-asia", + icon: [ + 496, + 512, + [], + "f57e", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm-11.34 240.23c-2.89 4.82-8.1 7.77-13.72 7.77h-.31c-4.24 0-8.31 1.69-11.31 4.69l-5.66 5.66c-3.12 3.12-3.12 8.19 0 11.31l5.66 5.66c3 3 4.69 7.07 4.69 11.31V304c0 8.84-7.16 16-16 16h-6.11c-6.06 0-11.6-3.42-14.31-8.85l-22.62-45.23c-2.44-4.88-8.95-5.94-12.81-2.08l-19.47 19.46c-3 3-7.07 4.69-11.31 4.69H50.81C49.12 277.55 48 266.92 48 256c0-110.28 89.72-200 200-200 21.51 0 42.2 3.51 61.63 9.82l-50.16 38.53c-5.11 3.41-4.63 11.06.86 13.81l10.83 5.41c5.42 2.71 8.84 8.25 8.84 14.31V216c0 4.42-3.58 8-8 8h-3.06c-3.03 0-5.8-1.71-7.15-4.42-1.56-3.12-5.96-3.29-7.76-.3l-17.37 28.95zM408 358.43c0 4.24-1.69 8.31-4.69 11.31l-9.57 9.57c-3 3-7.07 4.69-11.31 4.69h-15.16c-4.24 0-8.31-1.69-11.31-4.69l-13.01-13.01a26.767 26.767 0 0 0-25.42-7.04l-21.27 5.32c-1.27.32-2.57.48-3.88.48h-10.34c-4.24 0-8.31-1.69-11.31-4.69l-11.91-11.91a8.008 8.008 0 0 1-2.34-5.66v-10.2c0-3.27 1.99-6.21 5.03-7.43l39.34-15.74c1.98-.79 3.86-1.82 5.59-3.05l23.71-16.89a7.978 7.978 0 0 1 4.64-1.48h12.09c3.23 0 6.15 1.94 7.39 4.93l5.35 12.85a4 4 0 0 0 3.69 2.46h3.8c1.78 0 3.35-1.18 3.84-2.88l4.2-14.47c.5-1.71 2.06-2.88 3.84-2.88h6.06c2.21 0 4 1.79 4 4v12.93c0 2.12.84 4.16 2.34 5.66l11.91 11.91c3 3 4.69 7.07 4.69 11.31v24.6z", + ], + }, + xo = { + prefix: "fas", + iconName: "golf-ball", + icon: [ + 416, + 512, + [], + "f450", + "M96 416h224c0 17.7-14.3 32-32 32h-16c-17.7 0-32 14.3-32 32v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-20c0-17.7-14.3-32-32-32h-16c-17.7 0-32-14.3-32-32zm320-208c0 74.2-39 139.2-97.5 176h-221C39 347.2 0 282.2 0 208 0 93.1 93.1 0 208 0s208 93.1 208 208zm-180.1 43.9c18.3 0 33.1-14.8 33.1-33.1 0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1zm49.1 46.9c0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1 18.3 0 33.1-14.9 33.1-33.1zm64-64c0-14.4-9.3-26.3-22.1-30.9 9.6 26.8-15.6 51.3-41.9 41.9 4.6 12.8 16.5 22.1 30.9 22.1 18.3 0 33.1-14.9 33.1-33.1z", + ], + }, + To = { + prefix: "fas", + iconName: "gopuram", + icon: [ + 512, + 512, + [], + "f664", + "M496 352h-16V240c0-8.84-7.16-16-16-16h-16v-80c0-8.84-7.16-16-16-16h-16V16c0-8.84-7.16-16-16-16s-16 7.16-16 16v16h-64V16c0-8.84-7.16-16-16-16s-16 7.16-16 16v16h-64V16c0-8.84-7.16-16-16-16s-16 7.16-16 16v16h-64V16c0-8.84-7.16-16-16-16S96 7.16 96 16v112H80c-8.84 0-16 7.16-16 16v80H48c-8.84 0-16 7.16-16 16v112H16c-8.84 0-16 7.16-16 16v128c0 8.84 7.16 16 16 16h80V352h32V224h32v-96h32v96h-32v128h-32v160h80v-80c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v80h80V352h-32V224h-32v-96h32v96h32v128h32v160h80c8.84 0 16-7.16 16-16V368c0-8.84-7.16-16-16-16zm-272 0v-64c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v64h-64zm8-128v-48c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v48h-48z", + ], + }, + So = { + prefix: "fas", + iconName: "graduation-cap", + icon: [ + 640, + 512, + [], + "f19d", + "M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z", + ], + }, + Oo = { + prefix: "fas", + iconName: "greater-than", + icon: [ + 384, + 512, + [], + "f531", + "M365.52 209.85L59.22 67.01c-16.06-7.49-35.15-.54-42.64 15.52L3.01 111.61c-7.49 16.06-.54 35.15 15.52 42.64L236.96 256.1 18.49 357.99C2.47 365.46-4.46 384.5 3.01 400.52l13.52 29C24 445.54 43.04 452.47 59.06 445l306.47-142.91a32.003 32.003 0 0 0 18.48-29v-34.23c-.01-12.45-7.21-23.76-18.49-29.01z", + ], + }, + Eo = { + prefix: "fas", + iconName: "greater-than-equal", + icon: [ + 448, + 512, + [], + "f532", + "M55.22 107.69l175.56 68.09-175.44 68.05c-18.39 6.03-27.88 24.39-21.2 41l12.09 30.08c6.68 16.61 26.99 25.19 45.38 19.15L393.02 214.2c13.77-4.52 22.98-16.61 22.98-30.17v-15.96c0-13.56-9.21-25.65-22.98-30.17L91.3 17.92c-18.29-6-38.51 2.53-45.15 19.06L34.12 66.9c-6.64 16.53 2.81 34.79 21.1 40.79zM424 400H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h400c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z", + ], + }, + Mo = { + prefix: "fas", + iconName: "grimace", + icon: [ + 496, + 512, + [], + "f57f", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM144 400h-8c-17.7 0-32-14.3-32-32v-8h40v40zm0-56h-40v-8c0-17.7 14.3-32 32-32h8v40zm-8-136c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm72 192h-48v-40h48v40zm0-56h-48v-40h48v40zm64 56h-48v-40h48v40zm0-56h-48v-40h48v40zm64 56h-48v-40h48v40zm0-56h-48v-40h48v40zm-8-104c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64 128c0 17.7-14.3 32-32 32h-8v-40h40v8zm0-24h-40v-40h8c17.7 0 32 14.3 32 32v8z", + ], + }, + Ao = { + prefix: "fas", + iconName: "grin", + icon: [ + 496, + 512, + [], + "f580", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm80 256c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.3-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + Io = { + prefix: "fas", + iconName: "grin-alt", + icon: [ + 496, + 512, + [], + "f581", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm63.7 128.7c7.6-11.4 24.7-11.7 32.7 0 12.4 18.4 15.1 36.9 15.7 55.3-.5 18.4-3.3 36.9-15.7 55.3-7.6 11.4-24.7 11.7-32.7 0-12.4-18.4-15.1-36.9-15.7-55.3.5-18.4 3.3-36.9 15.7-55.3zm-160 0c7.6-11.4 24.7-11.7 32.7 0 12.4 18.4 15.1 36.9 15.7 55.3-.5 18.4-3.3 36.9-15.7 55.3-7.6 11.4-24.7 11.7-32.7 0-12.4-18.4-15.1-36.9-15.7-55.3.5-18.4 3.3-36.9 15.7-55.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + Do = { + prefix: "fas", + iconName: "grin-beam", + icon: [ + 496, + 512, + [], + "f582", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 144c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.9 9.4-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + Ro = { + prefix: "fas", + iconName: "grin-beam-sweat", + icon: [ + 504, + 512, + [], + "f583", + "M456 128c26.5 0 48-21 48-47 0-20-28.5-60.4-41.6-77.8-3.2-4.3-9.6-4.3-12.8 0C436.5 20.6 408 61 408 81c0 26 21.5 47 48 47zm0 32c-44.1 0-80-35.4-80-79 0-4.4.3-14.2 8.1-32.2C345 23.1 298.3 8 248 8 111 8 0 119 0 256s111 248 248 248 248-111 248-248c0-35.1-7.4-68.4-20.5-98.6-6.3 1.5-12.7 2.6-19.5 2.6zm-128-8c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.2 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + wo = { + prefix: "fas", + iconName: "grin-hearts", + icon: [ + 496, + 512, + [], + "f584", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM90.4 183.6c6.7-17.6 26.7-26.7 44.9-21.9l7.1 1.9 2-7.1c5-18.1 22.8-30.9 41.5-27.9 21.4 3.4 34.4 24.2 28.8 44.5L195.3 243c-1.2 4.5-5.9 7.2-10.5 6l-70.2-18.2c-20.4-5.4-31.9-27-24.2-47.2zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.2-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.6 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm133.4-201.3l-70.2 18.2c-4.5 1.2-9.2-1.5-10.5-6L281.3 173c-5.6-20.3 7.4-41.1 28.8-44.5 18.6-3 36.4 9.8 41.5 27.9l2 7.1 7.1-1.9c18.2-4.7 38.2 4.3 44.9 21.9 7.7 20.3-3.8 41.9-24.2 47.2z", + ], + }, + Lo = { + prefix: "fas", + iconName: "grin-squint", + icon: [ + 496, + 512, + [], + "f585", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 189.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 208l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.9 9.4-21.6 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.2 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + Fo = { + prefix: "fas", + iconName: "grin-squint-tears", + icon: [ + 512, + 512, + [], + "f586", + "M409.6 111.9c22.6-3.2 73.5-12 88.3-26.8 19.2-19.2 18.9-50.6-.7-70.2S446-5 426.9 14.2c-14.8 14.8-23.5 65.7-26.8 88.3-.8 5.5 3.9 10.2 9.5 9.4zM102.4 400.1c-22.6 3.2-73.5 12-88.3 26.8-19.1 19.1-18.8 50.6.8 70.2s51 19.9 70.2.7c14.8-14.8 23.5-65.7 26.8-88.3.8-5.5-3.9-10.2-9.5-9.4zm311.7-256.5c-33 3.9-48.6-25.1-45.7-45.7 3.4-24 7.4-42.1 11.5-56.5C285.1-13.4 161.8-.5 80.6 80.6-.5 161.7-13.4 285 41.4 379.9c14.4-4.1 32.4-8 56.5-11.5 33.2-3.9 48.6 25.2 45.7 45.7-3.4 24-7.4 42.1-11.5 56.5 94.8 54.8 218.1 41.9 299.3-39.2s94-204.4 39.2-299.3c-14.4 4.1-32.5 8-56.5 11.5zM255.7 106c3.3-13.2 22.4-11.5 23.6 1.8l4.8 52.3 52.3 4.8c13.4 1.2 14.9 20.3 1.8 23.6l-90.5 22.6c-8.9 2.2-16.7-5.9-14.5-14.5l22.5-90.6zm-90.9 230.3L160 284l-52.3-4.8c-13.4-1.2-14.9-20.3-1.8-23.6l90.5-22.6c8.8-2.2 16.7 5.8 14.5 14.5L188.3 338c-3.1 13.2-22.2 11.7-23.5-1.7zm215.7 44.2c-29.3 29.3-75.7 50.4-116.7 50.4-18.9 0-36.6-4.5-51-14.7-9.8-6.9-8.7-21.8 2-27.2 28.3-14.6 63.9-42.4 97.8-76.3s61.7-69.6 76.3-97.8c5.4-10.5 20.2-11.9 27.3-2 32.3 45.3 7.1 124.7-35.7 167.6z", + ], + }, + No = { + prefix: "fas", + iconName: "grin-stars", + icon: [ + 496, + 512, + [], + "f587", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z", + ], + }, + ko = { + prefix: "fas", + iconName: "grin-tears", + icon: [ + 640, + 512, + [], + "f588", + "M102.4 256.1c-22.6 3.2-73.5 12-88.3 26.8-19.1 19.1-18.8 50.6.8 70.2s51 19.9 70.2.7c14.8-14.8 23.5-65.7 26.8-88.3.8-5.5-3.9-10.2-9.5-9.4zm523.4 26.8c-14.8-14.8-65.7-23.5-88.3-26.8-5.5-.8-10.3 3.9-9.5 9.5 3.2 22.6 12 73.5 26.8 88.3 19.2 19.2 50.6 18.9 70.2-.7s20-51.2.8-70.3zm-129.4-12.8c-3.8-26.6 19.1-49.5 45.7-45.7 8.9 1.3 16.8 2.7 24.3 4.1C552.7 104.5 447.7 8 320 8S87.3 104.5 73.6 228.5c7.5-1.4 15.4-2.8 24.3-4.1 33.2-3.9 48.6 25.3 45.7 45.7-11.8 82.3-29.9 100.4-35.8 106.4-.9.9-2 1.6-3 2.5 42.7 74.6 123 125 215.2 125s172.5-50.4 215.2-125.1c-1-.9-2.1-1.5-3-2.5-5.9-5.9-24-24-35.8-106.3zM400 152c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm-160 0c23.8 0 52.7 29.3 56 71.4.7 8.6-10.8 12-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.1-42.1 32-71.4 55.8-71.4zm80 280c-60.6 0-134.5-38.3-143.8-93.3-2-11.7 9.2-21.6 20.7-17.9C227.1 330.5 272 336 320 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3z", + ], + }, + zo = { + prefix: "fas", + iconName: "grin-tongue", + icon: [ + 496, + 512, + [], + "f589", + "M248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.6 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm-34.9 134.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3z", + ], + }, + jo = { + prefix: "fas", + iconName: "grin-tongue-squint", + icon: [ + 496, + 512, + [], + "f58a", + "M293.1 374.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3zM248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.2-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.4-3.7 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-33.8 210.3l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.7 4.7 7.7 15.9 0 20.6zm163 30c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.8-4.7-7.8-15.9 0-20.6l80-48c11.7-6.9 23.9 7.7 15.4 18L343.6 208l33.6 40.3z", + ], + }, + Bo = { + prefix: "fas", + iconName: "grin-tongue-wink", + icon: [ + 496, + 512, + [], + "f58b", + "M344 184c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256c0 106.3 67 196.7 161 232-5.6-12.2-9-25.7-9-40v-45.5c-24.7-16.2-43.5-38.1-47.8-63.8-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-4.3 25.7-23.1 47.6-47.8 63.8V448c0 14.3-3.4 27.8-9 40 94-35.3 161-125.7 161-232C496 119 385 8 248 8zm-56 225l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L112 233c-8.5 7.4-21.6.3-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S208 197 212 222.2c1.6 11.1-11.6 18.2-20 10.8zm152 39c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm-50.9 102.6c-14.4-6.5-31.1 2.2-34.6 17.6l-1.8 7.8c-2.1 9.2-15.2 9.2-17.3 0l-1.8-7.8c-3.5-15.4-20.2-24.1-34.6-17.6-.9.4.3-.2-18.9 9.4v63c0 35.2 28 64.5 63.1 64.9 35.7.5 64.9-28.4 64.9-64v-64c-19.5-9.6-18.2-8.9-19-9.3z", + ], + }, + Vo = { + prefix: "fas", + iconName: "grin-wink", + icon: [ + 496, + 512, + [], + "f58c", + "M0 256c0 137 111 248 248 248s248-111 248-248S385 8 248 8 0 119 0 256zm200-48c0 17.7-14.3 32-32 32s-32-14.3-32-32 14.3-32 32-32 32 14.3 32 32zm168 25l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L288 233c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S384 197 388 222.2c1.6 11-11.5 18.2-20 10.8zm-243.1 87.8C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.3-3.7 22.6 6 20.7 17.9-9.2 55-83.2 93.3-143.8 93.3s-134.5-38.3-143.8-93.3c-2-11.9 9.3-21.6 20.7-17.9z", + ], + }, + Go = { + prefix: "fas", + iconName: "grip-horizontal", + icon: [ + 448, + 512, + [], + "f58d", + "M96 288H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM96 96H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm160 0h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z", + ], + }, + Uo = { + prefix: "fas", + iconName: "grip-vertical", + icon: [ + 320, + 512, + [], + "f58e", + "M96 32H32C14.33 32 0 46.33 0 64v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM288 32h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z", + ], + }, + Ho = { + prefix: "fas", + iconName: "h-square", + icon: [ + 448, + 512, + [], + "f0fd", + "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zm-112 48h-32c-8.837 0-16 7.163-16 16v80H160v-80c0-8.837-7.163-16-16-16h-32c-8.837 0-16 7.163-16 16v224c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16v-80h128v80c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16V144c0-8.837-7.163-16-16-16z", + ], + }, + Wo = { + prefix: "fas", + iconName: "hammer", + icon: [ + 576, + 512, + [], + "f6e3", + "M571.31 193.94l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31-28.9-28.9c5.63-21.31.36-44.9-16.35-61.61l-45.25-45.25c-62.48-62.48-163.79-62.48-226.28 0l90.51 45.25v18.75c0 16.97 6.74 33.25 18.75 45.25l49.14 49.14c16.71 16.71 40.3 21.98 61.61 16.35l28.9 28.9-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l90.51-90.51c6.23-6.24 6.23-16.37-.02-22.62zm-286.72-15.2c-3.7-3.7-6.84-7.79-9.85-11.95L19.64 404.96c-25.57 23.88-26.26 64.19-1.53 88.93s65.05 24.05 88.93-1.53l238.13-255.07c-3.96-2.91-7.9-5.87-11.44-9.41l-49.14-49.14z", + ], + }, + Xo = { + prefix: "fas", + iconName: "hamsa", + icon: [ + 512, + 512, + [], + "f665", + "M509.34 307.25C504.28 295.56 492.75 288 480 288h-64V80c0-22-18-40-40-40s-40 18-40 40v134c0 5.52-4.48 10-10 10h-20c-5.52 0-10-4.48-10-10V40c0-22-18-40-40-40s-40 18-40 40v174c0 5.52-4.48 10-10 10h-20c-5.52 0-10-4.48-10-10V80c0-22-18-40-40-40S96 58 96 80v208H32c-12.75 0-24.28 7.56-29.34 19.25a31.966 31.966 0 0 0 5.94 34.58l102.69 110.03C146.97 490.08 199.69 512 256 512s109.03-21.92 144.72-60.14L503.4 341.83a31.966 31.966 0 0 0 5.94-34.58zM256 416c-53.02 0-96-64-96-64s42.98-64 96-64 96 64 96 64-42.98 64-96 64zm0-96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z", + ], + }, + Yo = { + prefix: "fas", + iconName: "hand-holding", + icon: [ + 576, + 512, + [], + "f4bd", + "M565.3 328.1c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z", + ], + }, + Ko = { + prefix: "fas", + iconName: "hand-holding-heart", + icon: [ + 576, + 512, + [], + "f4be", + "M275.3 250.5c7 7.4 18.4 7.4 25.5 0l108.9-114.2c31.6-33.2 29.8-88.2-5.6-118.8-30.8-26.7-76.7-21.9-104.9 7.7L288 36.9l-11.1-11.6C248.7-4.4 202.8-9.2 172 17.5c-35.3 30.6-37.2 85.6-5.6 118.8l108.9 114.2zm290 77.6c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z", + ], + }, + Zo = { + prefix: "fas", + iconName: "hand-holding-usd", + icon: [ + 544, + 512, + [], + "f4c0", + "M257.6 144.3l50 14.3c3.6 1 6.1 4.4 6.1 8.1 0 4.6-3.8 8.4-8.4 8.4h-32.8c-3.6 0-7.1-.8-10.3-2.2-4.8-2.2-10.4-1.7-14.1 2l-17.5 17.5c-5.3 5.3-4.7 14.3 1.5 18.4 9.5 6.3 20.3 10.1 31.8 11.5V240c0 8.8 7.2 16 16 16h16c8.8 0 16-7.2 16-16v-17.6c30.3-3.6 53.3-31 49.3-63-2.9-23-20.7-41.3-42.9-47.7l-50-14.3c-3.6-1-6.1-4.4-6.1-8.1 0-4.6 3.8-8.4 8.4-8.4h32.8c3.6 0 7.1.8 10.3 2.2 4.8 2.2 10.4 1.7 14.1-2l17.5-17.5c5.3-5.3 4.7-14.3-1.5-18.4-9.5-6.3-20.3-10.1-31.8-11.5V16c0-8.8-7.2-16-16-16h-16c-8.8 0-16 7.2-16 16v17.6c-30.3 3.6-53.3 31-49.3 63 2.9 23 20.7 41.3 42.9 47.7zm276.3 183.8c-11.2-10.7-28.5-10-40.3 0L406.4 402c-10.7 9.1-24 14-37.8 14H256.9c-8.3 0-15.1-7.2-15.1-16s6.8-16 15.1-16h73.9c15.1 0 29-10.9 31.4-26.6 3.1-20-11.5-37.4-29.8-37.4H181.3c-25.5 0-50.2 9.3-69.9 26.3L67.5 384H15.1C6.8 384 0 391.2 0 400v96c0 8.8 6.8 16 15.1 16H352c13.7 0 27-4.9 37.8-14l142.8-121c14.4-12.1 15.5-35.3 1.3-48.9z", + ], + }, + qo = { + prefix: "fas", + iconName: "hand-lizard", + icon: [ + 576, + 512, + [], + "f258", + "M384 480h192V363.778a95.998 95.998 0 0 0-14.833-51.263L398.127 54.368A48 48 0 0 0 357.544 32H24C10.745 32 0 42.745 0 56v16c0 30.928 25.072 56 56 56h229.981c12.844 0 21.556 13.067 16.615 24.923l-21.41 51.385A32 32 0 0 1 251.648 224H128c-35.346 0-64 28.654-64 64v8c0 13.255 10.745 24 24 24h147.406a47.995 47.995 0 0 1 25.692 7.455l111.748 70.811A24.001 24.001 0 0 1 384 418.539V480z", + ], + }, + Qo = { + prefix: "fas", + iconName: "hand-paper", + icon: [ + 448, + 512, + [], + "f256", + "M408.781 128.007C386.356 127.578 368 146.36 368 168.79V256h-8V79.79c0-22.43-18.356-41.212-40.781-40.783C297.488 39.423 280 57.169 280 79v177h-8V40.79C272 18.36 253.644-.422 231.219.007 209.488.423 192 18.169 192 40v216h-8V80.79c0-22.43-18.356-41.212-40.781-40.783C121.488 40.423 104 58.169 104 80v235.992l-31.648-43.519c-12.993-17.866-38.009-21.817-55.877-8.823-17.865 12.994-21.815 38.01-8.822 55.877l125.601 172.705A48 48 0 0 0 172.073 512h197.59c22.274 0 41.622-15.324 46.724-37.006l26.508-112.66a192.011 192.011 0 0 0 5.104-43.975V168c.001-21.831-17.487-39.577-39.218-39.993z", + ], + }, + Jo = { + prefix: "fas", + iconName: "hand-peace", + icon: [ + 448, + 512, + [], + "f25b", + "M408 216c-22.092 0-40 17.909-40 40h-8v-32c0-22.091-17.908-40-40-40s-40 17.909-40 40v32h-8V48c0-26.51-21.49-48-48-48s-48 21.49-48 48v208h-13.572L92.688 78.449C82.994 53.774 55.134 41.63 30.461 51.324 5.787 61.017-6.356 88.877 3.337 113.551l74.765 190.342-31.09 24.872c-15.381 12.306-19.515 33.978-9.741 51.081l64 112A39.998 39.998 0 0 0 136 512h240c18.562 0 34.686-12.77 38.937-30.838l32-136A39.97 39.97 0 0 0 448 336v-80c0-22.091-17.908-40-40-40z", + ], + }, + $o = { + prefix: "fas", + iconName: "hand-point-down", + icon: [ + 384, + 512, + [], + "f0a7", + "M91.826 467.2V317.966c-8.248 5.841-16.558 10.57-24.918 14.153C35.098 345.752-.014 322.222 0 288c.008-18.616 10.897-32.203 29.092-40 28.286-12.122 64.329-78.648 77.323-107.534 7.956-17.857 25.479-28.453 43.845-28.464l.001-.002h171.526c11.812 0 21.897 8.596 23.703 20.269 7.25 46.837 38.483 61.76 38.315 123.731-.007 2.724.195 13.254.195 16 0 50.654-22.122 81.574-71.263 72.6-9.297 18.597-39.486 30.738-62.315 16.45-21.177 24.645-53.896 22.639-70.944 6.299V467.2c0 24.15-20.201 44.8-43.826 44.8-23.283 0-43.826-21.35-43.826-44.8zM112 72V24c0-13.255 10.745-24 24-24h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24zm212-24c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z", + ], + }, + ea = { + prefix: "fas", + iconName: "hand-point-left", + icon: [ + 512, + 512, + [], + "f0a5", + "M44.8 155.826h149.234c-5.841-8.248-10.57-16.558-14.153-24.918C166.248 99.098 189.778 63.986 224 64c18.616.008 32.203 10.897 40 29.092 12.122 28.286 78.648 64.329 107.534 77.323 17.857 7.956 28.453 25.479 28.464 43.845l.002.001v171.526c0 11.812-8.596 21.897-20.269 23.703-46.837 7.25-61.76 38.483-123.731 38.315-2.724-.007-13.254.195-16 .195-50.654 0-81.574-22.122-72.6-71.263-18.597-9.297-30.738-39.486-16.45-62.315-24.645-21.177-22.639-53.896-6.299-70.944H44.8c-24.15 0-44.8-20.201-44.8-43.826 0-23.283 21.35-43.826 44.8-43.826zM440 176h48c13.255 0 24 10.745 24 24v192c0 13.255-10.745 24-24 24h-48c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24zm24 212c11.046 0 20-8.954 20-20s-8.954-20-20-20-20 8.954-20 20 8.954 20 20 20z", + ], + }, + ta = { + prefix: "fas", + iconName: "hand-point-right", + icon: [ + 512, + 512, + [], + "f0a4", + "M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z", + ], + }, + na = { + prefix: "fas", + iconName: "hand-point-up", + icon: [ + 384, + 512, + [], + "f0a6", + "M135.652 0c23.625 0 43.826 20.65 43.826 44.8v99.851c17.048-16.34 49.766-18.346 70.944 6.299 22.829-14.288 53.017-2.147 62.315 16.45C361.878 158.426 384 189.346 384 240c0 2.746-.203 13.276-.195 16 .168 61.971-31.065 76.894-38.315 123.731C343.683 391.404 333.599 400 321.786 400H150.261l-.001-.002c-18.366-.011-35.889-10.607-43.845-28.464C93.421 342.648 57.377 276.122 29.092 264 10.897 256.203.008 242.616 0 224c-.014-34.222 35.098-57.752 66.908-44.119 8.359 3.583 16.67 8.312 24.918 14.153V44.8c0-23.45 20.543-44.8 43.826-44.8zM136 416h192c13.255 0 24 10.745 24 24v48c0 13.255-10.745 24-24 24H136c-13.255 0-24-10.745-24-24v-48c0-13.255 10.745-24 24-24zm168 28c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20z", + ], + }, + ia = { + prefix: "fas", + iconName: "hand-pointer", + icon: [ + 448, + 512, + [], + "f25a", + "M448 240v96c0 3.084-.356 6.159-1.063 9.162l-32 136C410.686 499.23 394.562 512 376 512H168a40.004 40.004 0 0 1-32.35-16.473l-127.997-176c-12.993-17.866-9.043-42.883 8.822-55.876 17.867-12.994 42.884-9.043 55.877 8.823L104 315.992V40c0-22.091 17.908-40 40-40s40 17.909 40 40v200h8v-40c0-22.091 17.908-40 40-40s40 17.909 40 40v40h8v-24c0-22.091 17.908-40 40-40s40 17.909 40 40v24h8c0-22.091 17.908-40 40-40s40 17.909 40 40zm-256 80h-8v96h8v-96zm88 0h-8v96h8v-96zm88 0h-8v96h8v-96z", + ], + }, + ra = { + prefix: "fas", + iconName: "hand-rock", + icon: [ + 512, + 512, + [], + "f255", + "M512 128.79c0-26.322-20.861-48.344-47.18-48.783C437.935 79.558 416 101.217 416 128h-8V96.79c0-26.322-20.861-48.344-47.18-48.783C333.935 47.558 312 69.217 312 96v32h-8V80.79c0-26.322-20.861-48.344-47.18-48.783C229.935 31.558 208 53.217 208 80v48h-8V96.79c0-26.322-20.861-48.344-47.18-48.783C125.935 47.558 104 69.217 104 96v136l-8-7.111V176.79c0-26.322-20.861-48.344-47.18-48.783C21.935 127.558 0 149.217 0 176v66.445a95.998 95.998 0 0 0 32.221 71.751l111.668 99.261A47.999 47.999 0 0 1 160 449.333V456c0 13.255 10.745 24 24 24h240c13.255 0 24-10.745 24-24v-2.921a96.01 96.01 0 0 1 7.523-37.254l48.954-116.265A96.002 96.002 0 0 0 512 262.306V128.79z", + ], + }, + oa = { + prefix: "fas", + iconName: "hand-scissors", + icon: [ + 512, + 512, + [], + "f257", + "M216 440c0-22.092 17.909-40 40-40v-8h-32c-22.091 0-40-17.908-40-40s17.909-40 40-40h32v-8H48c-26.51 0-48-21.49-48-48s21.49-48 48-48h208v-13.572l-177.551-69.74c-24.674-9.694-36.818-37.555-27.125-62.228 9.693-24.674 37.554-36.817 62.228-27.124l190.342 74.765 24.872-31.09c12.306-15.381 33.978-19.515 51.081-9.741l112 64A40.002 40.002 0 0 1 512 168v240c0 18.562-12.77 34.686-30.838 38.937l-136 32A39.982 39.982 0 0 1 336 480h-80c-22.091 0-40-17.908-40-40z", + ], + }, + aa = { + prefix: "fas", + iconName: "hand-spock", + icon: [ + 512, + 512, + [], + "f259", + "M10.872 316.585c15.139-16.086 40.454-16.854 56.543-1.713L128 371.893v-79.405L88.995 120.865c-4.896-21.542 8.598-42.974 30.14-47.87 21.549-4.894 42.975 8.599 47.87 30.141L201.747 256h9.833L164.016 48.966c-4.946-21.531 8.498-42.994 30.028-47.94 21.532-4.95 42.994 8.498 47.94 30.028L293.664 256h15.105l48.425-193.702c5.357-21.432 27.075-34.462 48.507-29.104 21.432 5.358 34.463 27.075 29.104 48.507L391.231 256h11.08l30.768-129.265c5.117-21.491 26.685-34.768 48.177-29.647 21.491 5.117 34.765 26.686 29.647 48.177l-36.292 152.467A96.024 96.024 0 0 0 472 319.967v42.102a96.002 96.002 0 0 1-3.96 27.287l-26.174 88.287C435.825 498.022 417.101 512 395.846 512H179.172a48.002 48.002 0 0 1-32.898-13.046L12.585 373.128c-16.087-15.141-16.853-40.456-1.713-56.543z", + ], + }, + sa = { + prefix: "fas", + iconName: "hands", + icon: [ + 640, + 512, + [], + "f4c2", + "M204.8 230.4c-10.6-14.1-30.7-17-44.8-6.4-14.1 10.6-17 30.7-6.4 44.8l38.1 50.8c4.8 6.4 4.1 15.3-1.5 20.9l-12.8 12.8c-6.7 6.7-17.6 6.2-23.6-1.1L64 244.4V96c0-17.7-14.3-32-32-32S0 78.3 0 96v218.4c0 10.9 3.7 21.5 10.5 30l104.1 134.3c5 6.5 8.4 13.9 10.4 21.7 1.8 6.9 8.1 11.6 15.3 11.6H272c8.8 0 16-7.2 16-16V384c0-27.7-9-54.6-25.6-76.8l-57.6-76.8zM608 64c-17.7 0-32 14.3-32 32v148.4l-89.8 107.8c-6 7.2-17 7.7-23.6 1.1l-12.8-12.8c-5.6-5.6-6.3-14.5-1.5-20.9l38.1-50.8c10.6-14.1 7.7-34.2-6.4-44.8-14.1-10.6-34.2-7.7-44.8 6.4l-57.6 76.8C361 329.4 352 356.3 352 384v112c0 8.8 7.2 16 16 16h131.7c7.1 0 13.5-4.7 15.3-11.6 2-7.8 5.4-15.2 10.4-21.7l104.1-134.3c6.8-8.5 10.5-19.1 10.5-30V96c0-17.7-14.3-32-32-32z", + ], + }, + ca = { + prefix: "fas", + iconName: "hands-helping", + icon: [ + 640, + 512, + [], + "f4c4", + "M488 192H336v56c0 39.7-32.3 72-72 72s-72-32.3-72-72V126.4l-64.9 39C107.8 176.9 96 197.8 96 220.2v47.3l-80 46.2C.7 322.5-4.6 342.1 4.3 357.4l80 138.6c8.8 15.3 28.4 20.5 43.7 11.7L231.4 448H368c35.3 0 64-28.7 64-64h16c17.7 0 32-14.3 32-32v-64h8c13.3 0 24-10.7 24-24v-48c0-13.3-10.7-24-24-24zm147.7-37.4L555.7 16C546.9.7 527.3-4.5 512 4.3L408.6 64H306.4c-12 0-23.7 3.4-33.9 9.7L239 94.6c-9.4 5.8-15 16.1-15 27.1V248c0 22.1 17.9 40 40 40s40-17.9 40-40v-88h184c30.9 0 56 25.1 56 56v28.5l80-46.2c15.3-8.9 20.5-28.4 11.7-43.7z", + ], + }, + la = { + prefix: "fas", + iconName: "handshake", + icon: [ + 640, + 512, + [], + "f2b5", + "M434.7 64h-85.9c-8 0-15.7 3-21.6 8.4l-98.3 90c-.1.1-.2.3-.3.4-16.6 15.6-16.3 40.5-2.1 56 12.7 13.9 39.4 17.6 56.1 2.7.1-.1.3-.1.4-.2l79.9-73.2c6.5-5.9 16.7-5.5 22.6 1 6 6.5 5.5 16.6-1 22.6l-26.1 23.9L504 313.8c2.9 2.4 5.5 5 7.9 7.7V128l-54.6-54.6c-5.9-6-14.1-9.4-22.6-9.4zM544 128.2v223.9c0 17.7 14.3 32 32 32h64V128.2h-96zm48 223.9c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM0 384h64c17.7 0 32-14.3 32-32V128.2H0V384zm48-63.9c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16c0-8.9 7.2-16 16-16zm435.9 18.6L334.6 217.5l-30 27.5c-29.7 27.1-75.2 24.5-101.7-4.4-26.9-29.4-24.8-74.9 4.4-101.7L289.1 64h-83.8c-8.5 0-16.6 3.4-22.6 9.4L128 128v223.9h18.3l90.5 81.9c27.4 22.3 67.7 18.1 90-9.3l.2-.2 17.9 15.5c15.9 13 39.4 10.5 52.3-5.4l31.4-38.6 5.4 4.4c13.7 11.1 33.9 9.1 45-4.7l9.5-11.7c11.2-13.8 9.1-33.9-4.6-45.1z", + ], + }, + ua = { + prefix: "fas", + iconName: "hanukiah", + icon: [ + 640, + 512, + [], + "f6e6", + "M232 160c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm-64 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm224 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm64 0c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm88 8c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v120h32V168zm-440-8c-4.42 0-8 3.58-8 8v120h32V168c0-4.42-3.58-8-8-8h-16zm520 0h-32c-8.84 0-16 7.16-16 16v112c0 17.67-14.33 32-32 32H352V128c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v192H96c-17.67 0-32-14.33-32-32V176c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v112c0 53.02 42.98 96 96 96h192v64H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H352v-64h192c53.02 0 96-42.98 96-96V176c0-8.84-7.16-16-16-16zm-16-32c13.25 0 24-11.94 24-26.67S608 48 608 48s-24 38.61-24 53.33S594.75 128 608 128zm-576 0c13.25 0 24-11.94 24-26.67S32 48 32 48 8 86.61 8 101.33 18.75 128 32 128zm288-48c13.25 0 24-11.94 24-26.67S320 0 320 0s-24 38.61-24 53.33S306.75 80 320 80zm-208 48c13.25 0 24-11.94 24-26.67S112 48 112 48s-24 38.61-24 53.33S98.75 128 112 128zm64 0c13.25 0 24-11.94 24-26.67S176 48 176 48s-24 38.61-24 53.33S162.75 128 176 128zm64 0c13.25 0 24-11.94 24-26.67S240 48 240 48s-24 38.61-24 53.33S226.75 128 240 128zm160 0c13.25 0 24-11.94 24-26.67S400 48 400 48s-24 38.61-24 53.33S386.75 128 400 128zm64 0c13.25 0 24-11.94 24-26.67S464 48 464 48s-24 38.61-24 53.33S450.75 128 464 128zm64 0c13.25 0 24-11.94 24-26.67S528 48 528 48s-24 38.61-24 53.33S514.75 128 528 128z", + ], + }, + ha = { + prefix: "fas", + iconName: "hashtag", + icon: [ + 448, + 512, + [], + "f292", + "M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z", + ], + }, + da = { + prefix: "fas", + iconName: "hat-wizard", + icon: [ + 512, + 512, + [], + "f6e8", + "M496 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-304-64l-64-32 64-32 32-64 32 64 64 32-64 32-16 32h208l-86.41-201.63a63.955 63.955 0 0 1-1.89-45.45L416 0 228.42 107.19a127.989 127.989 0 0 0-53.46 59.15L64 416h144l-16-32zm64-224l16-32 16 32 32 16-32 16-16 32-16-32-32-16 32-16z", + ], + }, + pa = { + prefix: "fas", + iconName: "haykal", + icon: [ + 512, + 512, + [], + "f666", + "M496.25 202.52l-110-15.44 41.82-104.34c6.67-16.64-11.6-32.18-26.59-22.63L307.44 120 273.35 12.82C270.64 4.27 263.32 0 256 0c-7.32 0-14.64 4.27-17.35 12.82l-34.09 107.19-94.04-59.89c-14.99-9.55-33.25 5.99-26.59 22.63l41.82 104.34-110 15.43c-17.54 2.46-21.68 26.27-6.03 34.67l98.16 52.66-74.48 83.54c-10.92 12.25-1.72 30.93 13.29 30.93 1.31 0 2.67-.14 4.07-.45l108.57-23.65-4.11 112.55c-.43 11.65 8.87 19.22 18.41 19.22 5.15 0 10.39-2.21 14.2-7.18l68.18-88.9 68.18 88.9c3.81 4.97 9.04 7.18 14.2 7.18 9.54 0 18.84-7.57 18.41-19.22l-4.11-112.55 108.57 23.65c17.36 3.76 29.21-17.2 17.35-30.49l-74.48-83.54 98.16-52.66c15.64-8.39 11.5-32.2-6.04-34.66zM338.51 311.68l-51.89-11.3 1.97 53.79L256 311.68l-32.59 42.49 1.96-53.79-51.89 11.3 35.6-39.93-46.92-25.17 52.57-7.38-19.99-49.87 44.95 28.62L256 166.72l16.29 51.23 44.95-28.62-19.99 49.87 52.57 7.38-46.92 25.17 35.61 39.93z", + ], + }, + fa = { + prefix: "fas", + iconName: "hdd", + icon: [ + 576, + 512, + [], + "f0a0", + "M576 304v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48zm-48-80a79.557 79.557 0 0 1 30.777 6.165L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L17.223 230.165A79.557 79.557 0 0 1 48 224h480zm-48 96c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm-96 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z", + ], + }, + ma = { + prefix: "fas", + iconName: "heading", + icon: [ + 512, + 512, + [], + "f1dc", + "M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z", + ], + }, + ga = { + prefix: "fas", + iconName: "headphones", + icon: [ + 512, + 512, + [], + "f025", + "M256 32C114.52 32 0 146.496 0 288v48a32 32 0 0 0 17.689 28.622l14.383 7.191C34.083 431.903 83.421 480 144 480h24c13.255 0 24-10.745 24-24V280c0-13.255-10.745-24-24-24h-24c-31.342 0-59.671 12.879-80 33.627V288c0-105.869 86.131-192 192-192s192 86.131 192 192v1.627C427.671 268.879 399.342 256 368 256h-24c-13.255 0-24 10.745-24 24v176c0 13.255 10.745 24 24 24h24c60.579 0 109.917-48.098 111.928-108.187l14.382-7.191A32 32 0 0 0 512 336v-48c0-141.479-114.496-256-256-256z", + ], + }, + ba = { + prefix: "fas", + iconName: "headphones-alt", + icon: [ + 512, + 512, + [], + "f58f", + "M160 288h-16c-35.35 0-64 28.7-64 64.12v63.76c0 35.41 28.65 64.12 64 64.12h16c17.67 0 32-14.36 32-32.06V320.06c0-17.71-14.33-32.06-32-32.06zm208 0h-16c-17.67 0-32 14.35-32 32.06v127.88c0 17.7 14.33 32.06 32 32.06h16c35.35 0 64-28.71 64-64.12v-63.76c0-35.41-28.65-64.12-64-64.12zM256 32C112.91 32 4.57 151.13 0 288v112c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V288c0-114.67 93.33-207.8 208-207.82 114.67.02 208 93.15 208 207.82v112c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V288C507.43 151.13 399.09 32 256 32z", + ], + }, + _a = { + prefix: "fas", + iconName: "headset", + icon: [ + 512, + 512, + [], + "f590", + "M192 208c0-17.67-14.33-32-32-32h-16c-35.35 0-64 28.65-64 64v48c0 35.35 28.65 64 64 64h16c17.67 0 32-14.33 32-32V208zm176 144c35.35 0 64-28.65 64-64v-48c0-35.35-28.65-64-64-64h-16c-17.67 0-32 14.33-32 32v112c0 17.67 14.33 32 32 32h16zM256 0C113.18 0 4.58 118.83 0 256v16c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-16c0-114.69 93.31-208 208-208s208 93.31 208 208h-.12c.08 2.43.12 165.72.12 165.72 0 23.35-18.93 42.28-42.28 42.28H320c0-26.51-21.49-48-48-48h-32c-26.51 0-48 21.49-48 48s21.49 48 48 48h181.72c49.86 0 90.28-40.42 90.28-90.28V256C507.42 118.83 398.82 0 256 0z", + ], + }, + va = { + prefix: "fas", + iconName: "heart", + icon: [ + 512, + 512, + [], + "f004", + "M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z", + ], + }, + ya = { + prefix: "fas", + iconName: "heartbeat", + icon: [ + 512, + 512, + [], + "f21e", + "M320.2 243.8l-49.7 99.4c-6 12.1-23.4 11.7-28.9-.6l-56.9-126.3-30 71.7H60.6l182.5 186.5c7.1 7.3 18.6 7.3 25.7 0L451.4 288H342.3l-22.1-44.2zM473.7 73.9l-2.4-2.5c-51.5-52.6-135.8-52.6-187.4 0L256 100l-27.9-28.5c-51.5-52.7-135.9-52.7-187.4 0l-2.4 2.4C-10.4 123.7-12.5 203 31 256h102.4l35.9-86.2c5.4-12.9 23.6-13.2 29.4-.4l58.2 129.3 49-97.9c5.9-11.8 22.7-11.8 28.6 0l27.6 55.2H481c43.5-53 41.4-132.3-7.3-182.1z", + ], + }, + Ca = { + prefix: "fas", + iconName: "helicopter", + icon: [ + 640, + 512, + [], + "f533", + "M304 384h272c17.67 0 32-14.33 32-32 0-123.71-100.29-224-224-224V64h176c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16H144c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h176v64H112L68.8 70.4C65.78 66.37 61.03 64 56 64H16.01C5.6 64-2.04 73.78.49 83.88L32 192l160 64 86.4 115.2A31.992 31.992 0 0 0 304 384zm112-188.49C478.55 208.3 528.03 257.44 540.79 320H416V195.51zm219.37 263.3l-22.15-22.2c-6.25-6.26-16.24-6.1-22.64.01-7.09 6.77-13.84 11.25-24.64 11.25H240c-8.84 0-16 7.18-16 16.03v32.06c0 8.85 7.16 16.03 16 16.03h325.94c14.88 0 35.3-.47 68.45-29.52 7.02-6.14 7.57-17.05.98-23.66z", + ], + }, + Pa = { + prefix: "fas", + iconName: "highlighter", + icon: [ + 544, + 512, + [], + "f591", + "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z", + ], + }, + xa = { + prefix: "fas", + iconName: "hiking", + icon: [ + 384, + 512, + [], + "f6ec", + "M80.95 472.23c-4.28 17.16 6.14 34.53 23.28 38.81 2.61.66 5.22.95 7.8.95 14.33 0 27.37-9.7 31.02-24.23l25.24-100.97-52.78-52.78-34.56 138.22zm14.89-196.12L137 117c2.19-8.42-3.14-16.95-11.92-19.06-43.88-10.52-88.35 15.07-99.32 57.17L.49 253.24c-2.19 8.42 3.14 16.95 11.92 19.06l63.56 15.25c8.79 2.1 17.68-3.02 19.87-11.44zM368 160h-16c-8.84 0-16 7.16-16 16v16h-34.75l-46.78-46.78C243.38 134.11 228.61 128 212.91 128c-27.02 0-50.47 18.3-57.03 44.52l-26.92 107.72a32.012 32.012 0 0 0 8.42 30.39L224 397.25V480c0 17.67 14.33 32 32 32s32-14.33 32-32v-82.75c0-17.09-6.66-33.16-18.75-45.25l-46.82-46.82c.15-.5.49-.89.62-1.41l19.89-79.57 22.43 22.43c6 6 14.14 9.38 22.62 9.38h48v240c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16V176c.01-8.84-7.15-16-15.99-16zM240 96c26.51 0 48-21.49 48-48S266.51 0 240 0s-48 21.49-48 48 21.49 48 48 48z", + ], + }, + Ta = { + prefix: "fas", + iconName: "hippo", + icon: [ + 640, + 512, + [], + "f6ed", + "M581.12 96.2c-27.67-.15-52.5 17.58-76.6 26.62C489.98 88.27 455.83 64 416 64c-11.28 0-21.95 2.3-32 5.88V56c0-13.26-10.75-24-24-24h-16c-13.25 0-24 10.74-24 24v48.98C286.01 79.58 241.24 64 192 64 85.96 64 0 135.64 0 224v240c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16v-70.79C128.35 407.57 166.72 416 208 416s79.65-8.43 112-22.79V464c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V288h128v32c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-32c17.67 0 32-14.33 32-32v-92.02c0-34.09-24.79-67.59-58.88-67.78zM448 176c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z", + ], + }, + Sa = { + prefix: "fas", + iconName: "history", + icon: [ + 512, + 512, + [], + "f1da", + "M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z", + ], + }, + Oa = { + prefix: "fas", + iconName: "hockey-puck", + icon: [512, 512, [], "f453", "M0 160c0-53 114.6-96 256-96s256 43 256 96-114.6 96-256 96S0 213 0 160zm0 82.2V352c0 53 114.6 96 256 96s256-43 256-96V242.2c-113.4 82.3-398.5 82.4-512 0z"], + }, + Ea = { + prefix: "fas", + iconName: "home", + icon: [ + 576, + 512, + [], + "f015", + "M488 312.7V456c0 13.3-10.7 24-24 24H348c-6.6 0-12-5.4-12-12V356c0-6.6-5.4-12-12-12h-72c-6.6 0-12 5.4-12 12v112c0 6.6-5.4 12-12 12H112c-13.3 0-24-10.7-24-24V312.7c0-3.6 1.6-7 4.4-9.3l188-154.8c4.4-3.6 10.8-3.6 15.3 0l188 154.8c2.7 2.3 4.3 5.7 4.3 9.3zm83.6-60.9L488 182.9V44.4c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12V117l-89.5-73.7c-17.7-14.6-43.3-14.6-61 0L4.4 251.8c-5.1 4.2-5.8 11.8-1.6 16.9l25.5 31c4.2 5.1 11.8 5.8 16.9 1.6l235.2-193.7c4.4-3.6 10.8-3.6 15.3 0l235.2 193.7c5.1 4.2 12.7 3.5 16.9-1.6l25.5-31c4.2-5.2 3.4-12.7-1.7-16.9z", + ], + }, + Ma = { + prefix: "fas", + iconName: "horse", + icon: [ + 576, + 512, + [], + "f6f0", + "M575.92 76.6c-.01-8.13-3.02-15.87-8.58-21.8-3.78-4.03-8.58-9.12-13.69-14.5 11.06-6.84 19.5-17.49 22.18-30.66C576.85 4.68 572.96 0 567.9 0H447.92c-70.69 0-128 57.31-128 128H160c-28.84 0-54.4 12.98-72 33.11V160c-48.53 0-88 39.47-88 88v56c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-56c0-13.22 6.87-24.39 16.78-31.68-.21 2.58-.78 5.05-.78 7.68 0 27.64 11.84 52.36 30.54 69.88l-25.72 68.6a63.945 63.945 0 0 0-2.16 37.99l24.85 99.41A15.982 15.982 0 0 0 107.02 512h65.96c10.41 0 18.05-9.78 15.52-19.88l-26.31-105.26 23.84-63.59L320 345.6V496c0 8.84 7.16 16 16 16h64c8.84 0 16-7.16 16-16V318.22c19.74-20.19 32-47.75 32-78.22 0-.22-.07-.42-.08-.64V136.89l16 7.11 18.9 37.7c7.45 14.87 25.05 21.55 40.49 15.37l32.55-13.02a31.997 31.997 0 0 0 20.12-29.74l-.06-77.71zm-64 19.4c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z", + ], + }, + Aa = { + prefix: "fas", + iconName: "hospital", + icon: [ + 448, + 512, + [], + "f0f8", + "M448 492v20H0v-20c0-6.627 5.373-12 12-12h20V120c0-13.255 10.745-24 24-24h88V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v72h88c13.255 0 24 10.745 24 24v360h20c6.627 0 12 5.373 12 12zM308 192h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-168 64h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm104 128h-40c-6.627 0-12 5.373-12 12v84h64v-84c0-6.627-5.373-12-12-12zm64-96h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zm-116 12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40zM182 96h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6z", + ], + }, + Ia = { + prefix: "fas", + iconName: "hospital-alt", + icon: [ + 576, + 512, + [], + "f47d", + "M544 96H416V32c0-17.7-14.3-32-32-32H192c-17.7 0-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32v368c0 8.8 7.2 16 16 16h544c8.8 0 16-7.2 16-16V128c0-17.7-14.3-32-32-32zM160 436c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm160 128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm16-170c0 3.3-2.7 6-6 6h-26v26c0 3.3-2.7 6-6 6h-20c-3.3 0-6-2.7-6-6v-26h-26c-3.3 0-6-2.7-6-6v-20c0-3.3 2.7-6 6-6h26V86c0-3.3 2.7-6 6-6h20c3.3 0 6 2.7 6 6v26h26c3.3 0 6 2.7 6 6v20zm144 298c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-128c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z", + ], + }, + Da = { + prefix: "fas", + iconName: "hospital-symbol", + icon: [ + 512, + 512, + [], + "f47e", + "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm112 376c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-88h-96v88c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V136c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v88h96v-88c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v240z", + ], + }, + Ra = { + prefix: "fas", + iconName: "hot-tub", + icon: [ + 512, + 512, + [], + "f593", + "M414.21 177.65c1.02 8.21 7.75 14.35 15.75 14.35h16.12c9.51 0 17.08-8.57 16-18.35-4.34-39.11-22.4-74.53-50.13-97.16-17.37-14.17-28.82-36.75-31.98-62.15C378.96 6.14 372.22 0 364.23 0h-16.12c-9.51 0-17.09 8.57-16 18.35 4.34 39.11 22.4 74.53 50.13 97.16 17.36 14.17 28.82 36.75 31.97 62.14zm-108 0c1.02 8.21 7.75 14.35 15.75 14.35h16.12c9.51 0 17.08-8.57 16-18.35-4.34-39.11-22.4-74.53-50.13-97.16-17.37-14.17-28.82-36.75-31.98-62.15C270.96 6.14 264.22 0 256.23 0h-16.12c-9.51 0-17.09 8.57-16 18.35 4.34 39.11 22.4 74.53 50.13 97.16 17.36 14.17 28.82 36.75 31.97 62.14zM480 256H256l-110.93-83.2a63.99 63.99 0 0 0-38.4-12.8H64c-35.35 0-64 28.65-64 64v224c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V288c0-17.67-14.33-32-32-32zM128 440c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zm96 0c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8V328c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v112zM64 128c35.35 0 64-28.65 64-64S99.35 0 64 0 0 28.65 0 64s28.65 64 64 64z", + ], + }, + wa = { + prefix: "fas", + iconName: "hotel", + icon: [ + 576, + 512, + [], + "f594", + "M560 64c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h15.98v384H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h240v-80c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16v80h240c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-16V64h16zm-304 44.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zm0 96c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zm-128-96c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4zM179.2 256h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4c0 6.4-6.4 12.8-12.8 12.8zM192 384c0-53.02 42.98-96 96-96s96 42.98 96 96H192zm256-140.8c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-96c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4z", + ], + }, + La = { + prefix: "fas", + iconName: "hourglass", + icon: [ + 384, + 512, + [], + "f254", + "M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z", + ], + }, + Fa = { + prefix: "fas", + iconName: "hourglass-end", + icon: [ + 384, + 512, + [], + "f253", + "M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64zM192 208c-57.787 0-104-66.518-104-144h208c0 77.945-46.51 144-104 144z", + ], + }, + Na = { + prefix: "fas", + iconName: "hourglass-half", + icon: [ + 384, + 512, + [], + "f252", + "M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-75.078 384H99.08c17.059-46.797 52.096-80 92.92-80 40.821 0 75.862 33.196 92.922 80zm.019-256H99.078C91.988 108.548 88 86.748 88 64h208c0 22.805-3.987 44.587-11.059 64z", + ], + }, + ka = { + prefix: "fas", + iconName: "hourglass-start", + icon: [ + 384, + 512, + [], + "f251", + "M360 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24zm-64 448H88c0-77.458 46.204-144 104-144 57.786 0 104 66.517 104 144z", + ], + }, + za = { + prefix: "fas", + iconName: "house-damage", + icon: [ + 576, + 512, + [], + "f6f1", + "M288 114.96L69.47 307.71c-1.62 1.46-3.69 2.14-5.47 3.35V496c0 8.84 7.16 16 16 16h149.23L192 439.19l104.11-64-60.16-119.22L384 392.75l-104.11 64L319.81 512H496c8.84 0 16-7.16 16-16V311.1c-1.7-1.16-3.72-1.82-5.26-3.2L288 114.96zm282.69 121.32L512 184.45V48c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v51.69L314.75 10.31C307.12 3.45 297.56.01 288 0s-19.1 3.41-26.7 10.27L5.31 236.28c-6.57 5.91-7.12 16.02-1.21 22.6l21.4 23.82c5.9 6.57 16.02 7.12 22.6 1.21L277.42 81.63c6.05-5.33 15.12-5.33 21.17 0L527.91 283.9c6.57 5.9 16.69 5.36 22.6-1.21l21.4-23.82c5.9-6.57 5.36-16.69-1.22-22.59z", + ], + }, + ja = { + prefix: "fas", + iconName: "hryvnia", + icon: [ + 384, + 512, + [], + "f6f2", + "M368 240c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-41.86c13.41-28.63 13.74-63.33-4.13-94.05C303.34 49.84 267.1 32 229.96 32h-78.82c-24.32 0-47.86 8.53-66.54 24.09L72.83 65.9c-10.18 8.49-11.56 23.62-3.07 33.8l20.49 24.59c8.49 10.19 23.62 11.56 33.81 3.07l11.73-9.78c4.32-3.6 9.77-5.57 15.39-5.57h83.62c11.69 0 21.2 9.52 21.2 21.2 0 5.91-2.48 11.58-6.81 15.58L219.7 176H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h134.37l-34.67 32H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h41.86c-13.41 28.63-13.74 63.33 4.13 94.05C80.66 462.15 116.9 480 154.04 480h78.82c24.32 0 47.86-8.53 66.54-24.09l11.77-9.81c10.18-8.49 11.56-23.62 3.07-33.8l-20.49-24.59c-8.49-10.19-23.62-11.56-33.81-3.07l-11.75 9.8a23.992 23.992 0 0 1-15.36 5.56H149.2c-11.69 0-21.2-9.52-21.2-21.2 0-5.91 2.48-11.58 6.81-15.58L164.3 336H368c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H233.63l34.67-32H368z", + ], + }, + Ba = { + prefix: "fas", + iconName: "i-cursor", + icon: [ + 256, + 512, + [], + "f246", + "M256 52.048V12.065C256 5.496 250.726.148 244.158.066 211.621-.344 166.469.011 128 37.959 90.266.736 46.979-.114 11.913.114 5.318.157 0 5.519 0 12.114v39.645c0 6.687 5.458 12.078 12.145 11.998C38.111 63.447 96 67.243 96 112.182V224H60c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h36v112c0 44.932-56.075 48.031-83.95 47.959C5.404 447.942 0 453.306 0 459.952v39.983c0 6.569 5.274 11.917 11.842 11.999 32.537.409 77.689.054 116.158-37.894 37.734 37.223 81.021 38.073 116.087 37.845 6.595-.043 11.913-5.405 11.913-12V460.24c0-6.687-5.458-12.078-12.145-11.998C217.889 448.553 160 444.939 160 400V288h36c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-36V112.182c0-44.932 56.075-48.213 83.95-48.142 6.646.018 12.05-5.346 12.05-11.992z", + ], + }, + Va = { + prefix: "fas", + iconName: "id-badge", + icon: [ + 384, + 512, + [], + "f2c1", + "M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM144 32h96c8.8 0 16 7.2 16 16s-7.2 16-16 16h-96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm48 128c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H102.4C90 416 80 407.4 80 396.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z", + ], + }, + Ga = { + prefix: "fas", + iconName: "id-card", + icon: [ + 576, + 512, + [], + "f2c2", + "M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z", + ], + }, + Ua = { + prefix: "fas", + iconName: "id-card-alt", + icon: [ + 576, + 512, + [], + "f47f", + "M528 64H384v96H192V64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM288 224c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm93.3 224H194.7c-10.4 0-18.8-10-15.6-19.8 8.3-25.6 32.4-44.2 60.9-44.2h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.8-5.2 19.8-15.6 19.8zM352 32c0-17.7-14.3-32-32-32h-64c-17.7 0-32 14.3-32 32v96h128V32z", + ], + }, + Ha = { + prefix: "fas", + iconName: "image", + icon: [ + 512, + 512, + [], + "f03e", + "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z", + ], + }, + Wa = { + prefix: "fas", + iconName: "images", + icon: [ + 576, + 512, + [], + "f302", + "M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v208c0 44.112 35.888 80 80 80h336zm96-80V80c0-26.51-21.49-48-48-48H144c-26.51 0-48 21.49-48 48v256c0 26.51 21.49 48 48 48h384c26.51 0 48-21.49 48-48zM256 128c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-96 144l55.515-55.515c4.686-4.686 12.284-4.686 16.971 0L272 256l135.515-135.515c4.686-4.686 12.284-4.686 16.971 0L512 208v112H160v-48z", + ], + }, + Xa = { + prefix: "fas", + iconName: "inbox", + icon: [ + 576, + 512, + [], + "f01c", + "M567.938 243.908L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L8.062 243.908A47.994 47.994 0 0 0 0 270.533V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V270.533a47.994 47.994 0 0 0-8.062-26.625zM162.252 128h251.497l85.333 128H376l-32 64H232l-32-64H76.918l85.334-128z", + ], + }, + Ya = { + prefix: "fas", + iconName: "indent", + icon: [ + 448, + 512, + [], + "f03c", + "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm176 144h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 484h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm160-128h256c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H176c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm-52.687-111.313l-96-95.984C17.266 138.652 0 145.776 0 160.016v191.975c0 14.329 17.325 21.304 27.313 11.313l96-95.992c6.249-6.247 6.249-16.377 0-22.625z", + ], + }, + Ka = { + prefix: "fas", + iconName: "industry", + icon: [ + 512, + 512, + [], + "f275", + "M475.115 163.781L336 252.309v-68.28c0-18.916-20.931-30.399-36.885-20.248L160 252.309V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56v400c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24V184.029c0-18.917-20.931-30.399-36.885-20.248z", + ], + }, + Za = { + prefix: "fas", + iconName: "infinity", + icon: [ + 640, + 512, + [], + "f534", + "M471.1 96C405 96 353.3 137.3 320 174.6 286.7 137.3 235 96 168.9 96 75.8 96 0 167.8 0 256s75.8 160 168.9 160c66.1 0 117.8-41.3 151.1-78.6 33.3 37.3 85 78.6 151.1 78.6 93.1 0 168.9-71.8 168.9-160S564.2 96 471.1 96zM168.9 320c-40.2 0-72.9-28.7-72.9-64s32.7-64 72.9-64c38.2 0 73.4 36.1 94 64-20.4 27.6-55.9 64-94 64zm302.2 0c-38.2 0-73.4-36.1-94-64 20.4-27.6 55.9-64 94-64 40.2 0 72.9 28.7 72.9 64s-32.7 64-72.9 64z", + ], + }, + qa = { + prefix: "fas", + iconName: "info", + icon: [ + 192, + 512, + [], + "f129", + "M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z", + ], + }, + Qa = { + prefix: "fas", + iconName: "info-circle", + icon: [ + 512, + 512, + [], + "f05a", + "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z", + ], + }, + Ja = { + prefix: "fas", + iconName: "italic", + icon: [ + 320, + 512, + [], + "f033", + "M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z", + ], + }, + $a = { + prefix: "fas", + iconName: "jedi", + icon: [ + 544, + 512, + [], + "f669", + "M479.99 352l58.88-58.87c3.29-16.8 5.13-34.12 5.13-51.86 0-5.81-.68-11.51-1.05-17.27H496l41.25-41.24c-14.5-64.79-52.43-123.05-107.91-162.27-2.77-1.96-5.97-2.99-9.25-2.99-5.37 0-10.41 2.71-13.49 7.24-3.05 4.49-3.64 9.99-1.61 15.09 6.55 16.46 9.86 33.73 9.86 51.31 0 45.12-21.03 86.57-57.69 113.73-4.02 2.98-6.46 7.5-6.7 12.4-.24 4.92 1.76 9.66 5.49 13.03 32.93 29.75 47.35 73.51 38.57 117.07-9.74 48.35-48.84 87.1-97.31 96.5l-2.5-65.34L321.88 397c2.98 2.06 7.39 1.69 10.02-.8a8.002 8.002 0 0 0 1.34-9.92l-20.11-33.73 42.07-8.72c3.7-.75 6.38-4.05 6.38-7.83 0-3.77-2.69-7.06-6.38-7.83l-42.07-8.73 20.13-33.77c1.92-3.23 1.34-7.31-1.38-9.91-2.7-2.55-6.97-2.89-10-.8l-30.39 20.67L279.96 7.7a7.964 7.964 0 0 0-8-7.7c-4.33 0-7.84 3.38-8 7.67l-11.52 287.97-30.39-20.66c-3.14-2.12-7.27-1.83-10 .78-2.72 2.59-3.3 6.67-1.36 9.94l20.11 33.73-42.07 8.73c-3.7.75-6.38 4.05-6.38 7.83s2.67 7.08 6.38 7.83l42.07 8.72-20.13 33.77c-1.92 3.23-1.34 7.33 1.39 9.94 2.59 2.45 7.03 2.75 10 .75l27.16-18.48-2.5 65.26c-56.94-11.64-99.89-61.89-99.89-121.92 0-35.08 14.62-67.6 41.17-91.58 3.72-3.36 5.72-8.11 5.48-13.01-.24-4.9-2.68-9.41-6.69-12.38-36.67-27.16-57.71-68.62-57.71-113.74 0-17.56 3.31-34.81 9.84-51.26 2.02-5.09 1.43-10.59-1.62-15.09-3.08-4.54-8.13-7.25-13.51-7.25-3.3 0-6.5 1.04-9.27 3-55.87 39.52-93.6 97.37-107.97 162.07L47.93 224H.72c-.63 9.92-.97 19.91-.5 29.99.62 13.43 2.54 26.53 5.11 39.41l58.6 58.6H24.02c41.25 90.23 131.13 154.94 235.1 159.71 4.3.2 8.59.29 12.85.29 110.34 0 205.35-65.83 247.98-160h-39.96z", + ], + }, + es = { + prefix: "fas", + iconName: "joint", + icon: [ + 640, + 512, + [], + "f595", + "M444.34 181.1c22.38 15.68 35.66 41.16 35.66 68.59V280c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-30.31c0-43.24-21.01-83.41-56.34-108.06C463.85 125.02 448 99.34 448 70.31V8c0-4.42-3.58-8-8-8h-48c-4.42 0-8 3.58-8 8v66.4c0 43.69 24.56 81.63 60.34 106.7zM194.97 358.98C126.03 370.07 59.69 394.69 0 432c83.65 52.28 180.3 80 278.94 80h88.57L254.79 380.49c-14.74-17.2-37.45-25.11-59.82-21.51zM553.28 87.09c-5.67-3.8-9.28-9.96-9.28-16.78V8c0-4.42-3.58-8-8-8h-48c-4.42 0-8 3.58-8 8v62.31c0 22.02 10.17 43.41 28.64 55.39C550.79 153.04 576 199.54 576 249.69V280c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-30.31c0-65.44-32.41-126.19-86.72-162.6zM360.89 352.05c-34.4.06-86.81.15-88.21.17l117.8 137.43A63.987 63.987 0 0 0 439.07 512h88.45L409.57 374.4a63.955 63.955 0 0 0-48.68-22.35zM616 352H432l117.99 137.65A63.987 63.987 0 0 0 598.58 512H616c13.25 0 24-10.75 24-24V376c0-13.26-10.75-24-24-24z", + ], + }, + ts = { + prefix: "fas", + iconName: "journal-whills", + icon: [ + 448, + 512, + [], + "f66a", + "M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM133.08 144.39l21.26 21.26c1.56 1.56 3.61 2.34 5.66 2.34s4.09-.78 5.66-2.34c3.12-3.12 3.12-8.19 0-11.31l-26.42-26.42c10-20.9 26.24-37.97 46.37-49.26C179.62 88.4 176 99.74 176 112c0 19.96 9.33 37.57 23.66 49.31C190.01 171.37 184 184.96 184 200c0 26.94 19.04 49.4 44.38 54.76l1.36-32.71-10.37 7.04c-.69.45-1.47.69-2.25.69-1 0-1.98-.38-2.75-1.09a4.006 4.006 0 0 1-.69-4.95l8.54-14.31-17.91-3.72c-1.86-.39-3.19-2.03-3.19-3.92s1.33-3.53 3.19-3.92l17.91-3.72-8.54-14.31c-.95-1.61-.67-3.67.69-4.95 1.36-1.3 3.44-1.44 5-.41l12.01 8.16L236 71.83c.09-2.14 1.86-3.83 4-3.83s3.91 1.69 4 3.83l4.68 112.29 14.2-9.65a4.067 4.067 0 0 1 5 .41 4.006 4.006 0 0 1 .69 4.95l-8.54 14.31 17.91 3.72c1.86.39 3.19 2.03 3.19 3.92s-1.33 3.53-3.19 3.92l-17.91 3.72 8.54 14.31c.95 1.61.67 3.67-.69 4.95-.77.72-1.77 1.09-2.75 1.09-.78 0-1.56-.23-2.25-.69l-12.68-8.62 1.43 34.28C276.96 249.4 296 226.94 296 200c0-15.04-6.01-28.63-15.66-38.69C294.67 149.57 304 131.96 304 112c0-12.26-3.62-23.6-9.6-33.33 20.13 11.28 36.37 28.36 46.37 49.26l-26.42 26.42c-3.12 3.12-3.12 8.19 0 11.31 1.56 1.56 3.61 2.34 5.66 2.34s4.09-.78 5.66-2.34l21.26-21.26c2.97 10.08 5.07 20.55 5.07 31.6 0 .52-.14.99-.15 1.51l-37.11 32.47a7.975 7.975 0 0 0-.75 11.28 7.97 7.97 0 0 0 6.02 2.73c1.88 0 3.75-.66 5.27-1.98l23.59-20.64C337.32 250.96 293.09 288 240 288s-97.32-37.04-108.86-86.62l23.59 20.64A7.957 7.957 0 0 0 160 224c2.22 0 4.44-.92 6.02-2.73 2.92-3.33 2.58-8.38-.75-11.28l-37.11-32.47c-.01-.52-.15-.99-.15-1.51-.01-11.06 2.09-21.53 5.07-31.62zM380.8 448H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z", + ], + }, + ns = { + prefix: "fas", + iconName: "kaaba", + icon: [ + 576, + 512, + [], + "f66b", + "M554.12 83.51L318.36 4.93a95.962 95.962 0 0 0-60.71 0L21.88 83.51A32.006 32.006 0 0 0 0 113.87v49.01l265.02-79.51c15.03-4.5 30.92-4.5 45.98 0l265 79.51v-49.01c0-13.77-8.81-26-21.88-30.36zm-279.9 30.52L0 196.3v228.38c0 15 10.42 27.98 25.06 31.24l242.12 53.8a95.937 95.937 0 0 0 41.65 0l242.12-53.8c14.64-3.25 25.06-16.24 25.06-31.24V196.29l-274.2-82.26c-9.04-2.72-18.59-2.72-27.59 0zM128 230.11c0 3.61-2.41 6.77-5.89 7.72l-80 21.82C37.02 261.03 32 257.2 32 251.93v-16.58c0-3.61 2.41-6.77 5.89-7.72l80-21.82c5.09-1.39 10.11 2.44 10.11 7.72v16.58zm144-39.28c0 3.61-2.41 6.77-5.89 7.72l-96 26.18c-5.09 1.39-10.11-2.44-10.11-7.72v-16.58c0-3.61 2.41-6.77 5.89-7.72l96-26.18c5.09-1.39 10.11 2.44 10.11 7.72v16.58zm176 22.7c0-5.28 5.02-9.11 10.11-7.72l80 21.82c3.48.95 5.89 4.11 5.89 7.72v16.58c0 5.28-5.02 9.11-10.11 7.72l-80-21.82a7.997 7.997 0 0 1-5.89-7.72v-16.58zm-144-39.27c0-5.28 5.02-9.11 10.11-7.72l96 26.18c3.48.95 5.89 4.11 5.89 7.72v16.58c0 5.28-5.02 9.11-10.11 7.72l-96-26.18a7.997 7.997 0 0 1-5.89-7.72v-16.58z", + ], + }, + is = { + prefix: "fas", + iconName: "key", + icon: [ + 512, + 512, + [], + "f084", + "M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z", + ], + }, + rs = { + prefix: "fas", + iconName: "keyboard", + icon: [ + 576, + 512, + [], + "f11c", + "M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z", + ], + }, + os = { + prefix: "fas", + iconName: "khanda", + icon: [ + 512, + 512, + [], + "f66d", + "M415.81 66c-6.37-3.5-14.37-2.33-19.36 3.02a15.974 15.974 0 0 0-1.91 19.52c16.49 26.16 25.2 56.39 25.2 87.41-.19 53.25-26.77 102.69-71.27 132.41l-76.63 53.35v-20.1l44.05-36.09c3.92-4.2 5-10.09 2.81-15.28L310.85 273c33.84-19.26 56.94-55.25 56.94-96.99 0-40.79-22.02-76.13-54.59-95.71l5.22-11.44c2.34-5.53.93-11.83-3.57-16.04L255.86 0l-58.99 52.81c-4.5 4.21-5.9 10.51-3.57 16.04l5.22 11.44c-32.57 19.58-54.59 54.93-54.59 95.72 0 41.75 23.09 77.73 56.94 96.99l-7.85 17.24c-2.19 5.18-1.1 11.07 2.81 15.28l44.05 36.09v19.9l-76.59-53.33C119.02 278.62 92.44 229.19 92.26 176c0-31.08 8.71-61.31 25.2-87.47 3.87-6.16 2.4-13.77-2.59-19.08-5-5.34-13.68-6.2-20.02-2.7C16.32 109.6-22.3 205.3 13.36 295.99c7.07 17.99 17.89 34.38 30.46 49.06l55.97 65.36c4.87 5.69 13.04 7.24 19.65 3.72l79.35-42.23L228 392.23l-47.08 32.78c-1.67-.37-3.23-1.01-5.01-1.01-13.25 0-23.99 10.74-23.99 24 0 13.25 10.74 24 23.99 24 12.1 0 21.69-9.11 23.33-20.76l40.63-28.28v29.95c-9.39 5.57-15.99 15.38-15.99 27.1 0 17.67 14.32 32 31.98 32s31.98-14.33 31.98-32c0-11.71-6.61-21.52-15.99-27.1v-30.15l40.91 28.48C314.41 462.89 324 472 336.09 472c13.25 0 23.99-10.75 23.99-24 0-13.26-10.74-24-23.99-24-1.78 0-3.34.64-5.01 1.01L284 392.23l29.21-20.34 79.35 42.23c6.61 3.52 14.78 1.97 19.65-3.71l52.51-61.31c18.87-22.02 34-47.5 41.25-75.59 21.62-83.66-16.45-167.27-90.16-207.51zm-95.99 110c0 22.3-11.49 41.92-28.83 53.38l-5.65-12.41c-8.75-24.52-8.75-51.04 0-75.56l7.83-17.18c16.07 11.65 26.65 30.45 26.65 51.77zm-127.93 0c0-21.32 10.58-40.12 26.66-51.76l7.83 17.18c8.75 24.52 8.75 51.03 0 75.56l-5.65 12.41c-17.34-11.46-28.84-31.09-28.84-53.39z", + ], + }, + as = { + prefix: "fas", + iconName: "kiss", + icon: [ + 496, + 512, + [], + "f596", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm136 156c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-6.1-12.2 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.6-3.6-4.8-16.5 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C290.6 368.7 304 383 304 396zm24-156c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + ss = { + prefix: "fas", + iconName: "kiss-beam", + icon: [ + 496, + 512, + [], + "f597", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-39 219.9l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.5 8.5-10.9 12-15.1 4.5zM304 396c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-6.1-12.2 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.6-3.6-4.8-16.5 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C290.6 368.7 304 383 304 396zm65-168.1l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.5 8.5-10.9 12-15.1 4.5z", + ], + }, + cs = { + prefix: "fas", + iconName: "kiss-wink-heart", + icon: [ + 504, + 512, + [], + "f598", + "M501.1 402.5c-8-20.8-31.5-31.5-53.1-25.9l-8.4 2.2-2.3-8.4c-5.9-21.4-27-36.5-49-33-25.2 4-40.6 28.6-34 52.6l22.9 82.6c1.5 5.3 7 8.5 12.4 7.1l83-21.5c24.1-6.3 37.7-31.8 28.5-55.7zm-177.6-4c-5.6-20.3-2.3-42 9-59.7 29.7-46.3 98.7-45.5 127.8 4.3 6.4.1 12.6 1.4 18.6 2.9 10.9-27.9 17.1-58.2 17.1-90C496 119 385 8 248 8S0 119 0 256s111 248 248 248c35.4 0 68.9-7.5 99.4-20.9-.3-.7-23.9-84.6-23.9-84.6zM168 240c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm120 156c0 19.2-28.7 41.5-71.5 44-8.5.8-12.1-11.8-3.6-15.4l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-6-2.5-5.7-12.3 0-14.8l17-7.2c13-5.5 20.8-13.5 20.8-21.5s-7.8-16-20.8-21.5l-17-7.2c-8.8-3.7-4.6-16.6 3.6-15.4 42.8 2.5 71.5 24.8 71.5 44 0 13-13.4 27.3-35.2 36C274.6 368.7 288 383 288 396zm16-179c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S400 181 404 206.2c1.7 11.1-11.3 18.3-19.8 10.8l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L304 217z", + ], + }, + ls = { + prefix: "fas", + iconName: "kiwi-bird", + icon: [ + 576, + 512, + [], + "f535", + "M575.81 217.98C572.64 157.41 518.28 112 457.63 112h-9.37c-52.82 0-104.25-16.25-147.74-46.24-41.99-28.96-96.04-41.62-153.21-28.7C129.3 41.12-.08 78.24 0 224c.04 70.95 38.68 132.8 95.99 166.01V464c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-54.26c15.36 3.96 31.4 6.26 48 6.26 5.44 0 10.68-.73 16-1.18V464c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-59.43c14.24-5.06 27.88-11.39 40.34-19.51C342.07 355.25 393.86 336 448.46 336c25.48 0 16.01-.31 23.05-.78l74.41 136.44c2.86 5.23 8.3 8.34 14.05 8.34 1.31 0 2.64-.16 3.95-.5 7.09-1.8 12.05-8.19 12.05-15.5 0 0 .14-240.24-.16-246.02zM463.97 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm80 153.25l-39.86-73.08c15.12-5.83 28.73-14.6 39.86-25.98v99.06z", + ], + }, + us = { + prefix: "fas", + iconName: "landmark", + icon: [ + 512, + 512, + [], + "f66f", + "M501.62 92.11L267.24 2.04a31.958 31.958 0 0 0-22.47 0L10.38 92.11A16.001 16.001 0 0 0 0 107.09V144c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-36.91c0-6.67-4.14-12.64-10.38-14.98zM64 192v160H48c-8.84 0-16 7.16-16 16v48h448v-48c0-8.84-7.16-16-16-16h-16V192h-64v160h-96V192h-64v160h-96V192H64zm432 256H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + hs = { + prefix: "fas", + iconName: "language", + icon: [ + 640, + 512, + [], + "f1ab", + "M304 416H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h280v320zm-120.676-72.622A12 12 0 0 0 194.839 352h22.863c8.22 0 14.007-8.078 11.362-15.861L171.61 167.085a12 12 0 0 0-11.362-8.139h-32.489a12.001 12.001 0 0 0-11.362 8.139L58.942 336.139C56.297 343.922 62.084 352 70.304 352h22.805a12 12 0 0 0 11.535-8.693l9.118-31.807h60.211l9.351 31.878zm-39.051-140.42s4.32 21.061 7.83 33.21l10.8 37.531h-38.07l11.07-37.531c3.51-12.15 7.83-33.21 7.83-33.21h.54zM616 416H336V96h280c13.255 0 24 10.745 24 24v272c0 13.255-10.745 24-24 24zm-36-228h-64v-16c0-6.627-5.373-12-12-12h-16c-6.627 0-12 5.373-12 12v16h-64c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h114.106c-6.263 14.299-16.518 28.972-30.023 43.206-6.56-6.898-12.397-13.91-17.365-20.933-3.639-5.144-10.585-6.675-15.995-3.446l-7.28 4.346-6.498 3.879c-5.956 3.556-7.693 11.421-3.735 17.117 6.065 8.729 13.098 17.336 20.984 25.726-8.122 6.226-16.841 12.244-26.103 17.964-5.521 3.41-7.381 10.556-4.162 16.19l7.941 13.896c3.362 5.883 10.935 7.826 16.706 4.276 12.732-7.831 24.571-16.175 35.443-24.891 10.917 8.761 22.766 17.102 35.396 24.881 5.774 3.556 13.353 1.618 16.717-4.27l7.944-13.903c3.213-5.623 1.37-12.76-4.135-16.171a312.737 312.737 0 0 1-26.06-18.019c21.024-22.425 35.768-46.289 42.713-69.85H580c6.627 0 12-5.373 12-12v-16c0-6.625-5.373-11.998-12-11.998z", + ], + }, + ds = { + prefix: "fas", + iconName: "laptop", + icon: [ + 640, + 512, + [], + "f109", + "M624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z", + ], + }, + ps = { + prefix: "fas", + iconName: "laptop-code", + icon: [ + 640, + 512, + [], + "f5fc", + "M255.03 261.65c6.25 6.25 16.38 6.25 22.63 0l11.31-11.31c6.25-6.25 6.25-16.38 0-22.63L253.25 192l35.71-35.72c6.25-6.25 6.25-16.38 0-22.63l-11.31-11.31c-6.25-6.25-16.38-6.25-22.63 0l-58.34 58.34c-6.25 6.25-6.25 16.38 0 22.63l58.35 58.34zm96.01-11.3l11.31 11.31c6.25 6.25 16.38 6.25 22.63 0l58.34-58.34c6.25-6.25 6.25-16.38 0-22.63l-58.34-58.34c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63L386.75 192l-35.71 35.72c-6.25 6.25-6.25 16.38 0 22.63zM624 416H381.54c-.74 19.81-14.71 32-32.74 32H288c-18.69 0-33.02-17.47-32.77-32H16c-8.8 0-16 7.2-16 16v16c0 35.2 28.8 64 64 64h512c35.2 0 64-28.8 64-64v-16c0-8.8-7.2-16-16-16zM576 48c0-26.4-21.6-48-48-48H112C85.6 0 64 21.6 64 48v336h512V48zm-64 272H128V64h384v256z", + ], + }, + fs = { + prefix: "fas", + iconName: "laugh", + icon: [ + 496, + 512, + [], + "f599", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 152c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm88 272h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18-8.9 71-69.5 126-142.9 126z", + ], + }, + ms = { + prefix: "fas", + iconName: "laugh-beam", + icon: [ + 496, + 512, + [], + "f59a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm24 199.4c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.2 7.4-15.8 4.1-15.1-4.5zm-160 0c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.3 7.4-15.8 4-15.1-4.5zM398.9 306C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z", + ], + }, + gs = { + prefix: "fas", + iconName: "laugh-squint", + icon: [ + 496, + 512, + [], + "f59b", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 161.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 180l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM398.9 306C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z", + ], + }, + bs = { + prefix: "fas", + iconName: "laugh-wink", + icon: [ + 496, + 512, + [], + "f59c", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm20.1 198.1c4-25.2 34.2-42.1 59.9-42.1s55.9 16.9 59.9 42.1c1.7 11.1-11.4 18.3-19.8 10.8l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L288 217c-8.4 7.4-21.6.3-19.9-10.9zM168 160c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm230.9 146C390 377 329.4 432 256 432h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18z", + ], + }, + _s = { + prefix: "fas", + iconName: "layer-group", + icon: [ + 512, + 512, + [], + "f5fd", + "M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z", + ], + }, + vs = { + prefix: "fas", + iconName: "leaf", + icon: [ + 576, + 512, + [], + "f06c", + "M546.2 9.7c-5.6-12.5-21.6-13-28.3-1.2C486.9 62.4 431.4 96 368 96h-80C182 96 96 182 96 288c0 7 .8 13.7 1.5 20.5C161.3 262.8 253.4 224 384 224c8.8 0 16 7.2 16 16s-7.2 16-16 16C132.6 256 26 410.1 2.4 468c-6.6 16.3 1.2 34.9 17.5 41.6 16.4 6.8 35-1.1 41.8-17.3 1.5-3.6 20.9-47.9 71.9-90.6 32.4 43.9 94 85.8 174.9 77.2C465.5 467.5 576 326.7 576 154.3c0-50.2-10.8-102.2-29.8-144.6z", + ], + }, + ys = { + prefix: "fas", + iconName: "lemon", + icon: [ + 512, + 512, + [], + "f094", + "M489.038 22.963C465.944-.13 434.648-5.93 413.947 6.129c-58.906 34.312-181.25-53.077-321.073 86.746S40.441 355.041 6.129 413.945c-12.059 20.702-6.26 51.999 16.833 75.093 23.095 23.095 54.392 28.891 75.095 16.832 58.901-34.31 181.246 53.079 321.068-86.743S471.56 156.96 505.871 98.056c12.059-20.702 6.261-51.999-16.833-75.093zM243.881 95.522c-58.189 14.547-133.808 90.155-148.358 148.358-1.817 7.27-8.342 12.124-15.511 12.124-1.284 0-2.59-.156-3.893-.481-8.572-2.144-13.784-10.83-11.642-19.403C81.901 166.427 166.316 81.93 236.119 64.478c8.575-2.143 17.261 3.069 19.403 11.642s-3.069 17.259-11.641 19.402z", + ], + }, + Cs = { + prefix: "fas", + iconName: "less-than", + icon: [ + 384, + 512, + [], + "f536", + "M365.46 357.74L147.04 255.89l218.47-101.88c16.02-7.47 22.95-26.51 15.48-42.53l-13.52-29C360 66.46 340.96 59.53 324.94 67L18.48 209.91a32.014 32.014 0 0 0-18.48 29v34.24c0 12.44 7.21 23.75 18.48 29l306.31 142.83c16.06 7.49 35.15.54 42.64-15.52l13.56-29.08c7.49-16.06.54-35.15-15.53-42.64z", + ], + }, + Ps = { + prefix: "fas", + iconName: "less-than-equal", + icon: [ + 448, + 512, + [], + "f537", + "M54.98 214.2l301.41 119.87c18.39 6.03 38.71-2.54 45.38-19.15l12.09-30.08c6.68-16.61-2.82-34.97-21.21-41l-175.44-68.05 175.56-68.09c18.29-6 27.74-24.27 21.1-40.79l-12.03-29.92c-6.64-16.53-26.86-25.06-45.15-19.06L54.98 137.89C41.21 142.41 32 154.5 32 168.07v15.96c0 13.56 9.21 25.65 22.98 30.17zM424 400H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h400c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z", + ], + }, + xs = { + prefix: "fas", + iconName: "level-down-alt", + icon: [ + 320, + 512, + [], + "f3be", + "M313.553 392.331L209.587 504.334c-9.485 10.214-25.676 10.229-35.174 0L70.438 392.331C56.232 377.031 67.062 352 88.025 352H152V80H68.024a11.996 11.996 0 0 1-8.485-3.515l-56-56C-4.021 12.926 1.333 0 12.024 0H208c13.255 0 24 10.745 24 24v328h63.966c20.878 0 31.851 24.969 17.587 40.331z", + ], + }, + Ts = { + prefix: "fas", + iconName: "level-up-alt", + icon: [ + 320, + 512, + [], + "f3bf", + "M313.553 119.669L209.587 7.666c-9.485-10.214-25.676-10.229-35.174 0L70.438 119.669C56.232 134.969 67.062 160 88.025 160H152v272H68.024a11.996 11.996 0 0 0-8.485 3.515l-56 56C-4.021 499.074 1.333 512 12.024 512H208c13.255 0 24-10.745 24-24V160h63.966c20.878 0 31.851-24.969 17.587-40.331z", + ], + }, + Ss = { + prefix: "fas", + iconName: "life-ring", + icon: [ + 512, + 512, + [], + "f1cd", + "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm173.696 119.559l-63.399 63.399c-10.987-18.559-26.67-34.252-45.255-45.255l63.399-63.399a218.396 218.396 0 0 1 45.255 45.255zM256 352c-53.019 0-96-42.981-96-96s42.981-96 96-96 96 42.981 96 96-42.981 96-96 96zM127.559 82.304l63.399 63.399c-18.559 10.987-34.252 26.67-45.255 45.255l-63.399-63.399a218.372 218.372 0 0 1 45.255-45.255zM82.304 384.441l63.399-63.399c10.987 18.559 26.67 34.252 45.255 45.255l-63.399 63.399a218.396 218.396 0 0 1-45.255-45.255zm302.137 45.255l-63.399-63.399c18.559-10.987 34.252-26.67 45.255-45.255l63.399 63.399a218.403 218.403 0 0 1-45.255 45.255z", + ], + }, + Os = { + prefix: "fas", + iconName: "lightbulb", + icon: [ + 352, + 512, + [], + "f0eb", + "M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z", + ], + }, + Es = { + prefix: "fas", + iconName: "link", + icon: [ + 512, + 512, + [], + "f0c1", + "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z", + ], + }, + Ms = { + prefix: "fas", + iconName: "lira-sign", + icon: [ + 384, + 512, + [], + "f195", + "M371.994 256h-48.019C317.64 256 312 260.912 312 267.246 312 368 230.179 416 144 416V256.781l134.603-29.912A12 12 0 0 0 288 215.155v-40.976c0-7.677-7.109-13.38-14.603-11.714L144 191.219V160.78l134.603-29.912A12 12 0 0 0 288 119.154V78.179c0-7.677-7.109-13.38-14.603-11.714L144 95.219V44c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v68.997L9.397 125.131A12 12 0 0 0 0 136.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 178.558v30.439L9.397 221.131A12 12 0 0 0 0 232.845v40.976c0 7.677 7.109 13.38 14.603 11.714L64 274.558V468c0 6.627 5.373 12 12 12h79.583c134.091 0 223.255-77.834 228.408-211.592.261-6.782-5.211-12.408-11.997-12.408z", + ], + }, + As = { + prefix: "fas", + iconName: "list", + icon: [ + 512, + 512, + [], + "f03a", + "M128 116V76c0-8.837 7.163-16 16-16h352c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H144c-8.837 0-16-7.163-16-16zm16 176h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 144h64c8.837 0 16-7.163 16-16V64c0-8.837-7.163-16-16-16H16C7.163 48 0 55.163 0 64v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16zm0 160h64c8.837 0 16-7.163 16-16v-64c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v64c0 8.837 7.163 16 16 16z", + ], + }, + Is = { + prefix: "fas", + iconName: "list-alt", + icon: [ + 512, + 512, + [], + "f022", + "M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z", + ], + }, + Ds = { + prefix: "fas", + iconName: "list-ol", + icon: [ + 512, + 512, + [], + "f0cb", + "M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z", + ], + }, + Rs = { + prefix: "fas", + iconName: "list-ul", + icon: [ + 512, + 512, + [], + "f0ca", + "M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z", + ], + }, + ws = { + prefix: "fas", + iconName: "location-arrow", + icon: [512, 512, [], "f124", "M444.52 3.52L28.74 195.42c-47.97 22.39-31.98 92.75 19.19 92.75h175.91v175.91c0 51.17 70.36 67.17 92.75 19.19l191.9-415.78c15.99-38.39-25.59-79.97-63.97-63.97z"], + }, + Ls = { + prefix: "fas", + iconName: "lock", + icon: [ + 448, + 512, + [], + "f023", + "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z", + ], + }, + Fs = { + prefix: "fas", + iconName: "lock-open", + icon: [ + 576, + 512, + [], + "f3c1", + "M423.5 0C339.5.3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z", + ], + }, + Ns = { + prefix: "fas", + iconName: "long-arrow-alt-down", + icon: [ + 256, + 512, + [], + "f309", + "M168 345.941V44c0-6.627-5.373-12-12-12h-56c-6.627 0-12 5.373-12 12v301.941H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.569 9.373 33.941 0l86.059-86.059c15.119-15.119 4.411-40.971-16.971-40.971H168z", + ], + }, + ks = { + prefix: "fas", + iconName: "long-arrow-alt-left", + icon: [ + 448, + 512, + [], + "f30a", + "M134.059 296H436c6.627 0 12-5.373 12-12v-56c0-6.627-5.373-12-12-12H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.569 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296z", + ], + }, + zs = { + prefix: "fas", + iconName: "long-arrow-alt-right", + icon: [ + 448, + 512, + [], + "f30b", + "M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z", + ], + }, + js = { + prefix: "fas", + iconName: "long-arrow-alt-up", + icon: [ + 256, + 512, + [], + "f30c", + "M88 166.059V468c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12V166.059h46.059c21.382 0 32.09-25.851 16.971-40.971l-86.059-86.059c-9.373-9.373-24.569-9.373-33.941 0l-86.059 86.059c-15.119 15.119-4.411 40.971 16.971 40.971H88z", + ], + }, + Bs = { + prefix: "fas", + iconName: "low-vision", + icon: [ + 576, + 512, + [], + "f2a8", + "M569.344 231.631C512.96 135.949 407.81 72 288 72c-28.468 0-56.102 3.619-82.451 10.409L152.778 10.24c-7.601-10.858-22.564-13.5-33.423-5.9l-13.114 9.178c-10.86 7.601-13.502 22.566-5.9 33.426l43.131 58.395C89.449 131.73 40.228 174.683 6.682 231.581c-.01.017-.023.033-.034.05-8.765 14.875-8.964 33.528 0 48.739 38.5 65.332 99.742 115.862 172.859 141.349L55.316 244.302A272.194 272.194 0 0 1 83.61 208.39l119.4 170.58h.01l40.63 58.04a330.055 330.055 0 0 0 78.94 1.17l-189.98-271.4a277.628 277.628 0 0 1 38.777-21.563l251.836 356.544c7.601 10.858 22.564 13.499 33.423 5.9l13.114-9.178c10.86-7.601 13.502-22.567 5.9-33.426l-43.12-58.377-.007-.009c57.161-27.978 104.835-72.04 136.81-126.301a47.938 47.938 0 0 0 .001-48.739zM390.026 345.94l-19.066-27.23c24.682-32.567 27.711-76.353 8.8-111.68v.03c0 23.65-19.17 42.82-42.82 42.82-23.828 0-42.82-19.349-42.82-42.82 0-23.65 19.17-42.82 42.82-42.82h.03c-24.75-13.249-53.522-15.643-79.51-7.68l-19.068-27.237C253.758 123.306 270.488 120 288 120c75.162 0 136 60.826 136 136 0 34.504-12.833 65.975-33.974 89.94z", + ], + }, + Vs = { + prefix: "fas", + iconName: "luggage-cart", + icon: [ + 640, + 512, + [], + "f59d", + "M224 320h32V96h-32c-17.67 0-32 14.33-32 32v160c0 17.67 14.33 32 32 32zm352-32V128c0-17.67-14.33-32-32-32h-32v224h32c17.67 0 32-14.33 32-32zm48 96H128V16c0-8.84-7.16-16-16-16H16C7.16 0 0 7.16 0 16v32c0 8.84 7.16 16 16 16h48v368c0 8.84 7.16 16 16 16h82.94c-1.79 5.03-2.94 10.36-2.94 16 0 26.51 21.49 48 48 48s48-21.49 48-48c0-5.64-1.15-10.97-2.94-16h197.88c-1.79 5.03-2.94 10.36-2.94 16 0 26.51 21.49 48 48 48s48-21.49 48-48c0-5.64-1.15-10.97-2.94-16H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM480 96V48c0-26.51-21.49-48-48-48h-96c-26.51 0-48 21.49-48 48v272h192V96zm-48 0h-96V48h96v48z", + ], + }, + Gs = { + prefix: "fas", + iconName: "magic", + icon: [ + 512, + 512, + [], + "f0d0", + "M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.66-53.33L160 80l-53.34-26.67L80 0 53.34 53.33 0 80l53.34 26.67L80 160zm352 128l-26.66 53.33L352 368l53.34 26.67L432 448l26.66-53.33L512 368l-53.34-26.67L432 288zm70.62-193.77L417.77 9.38C411.53 3.12 403.34 0 395.15 0c-8.19 0-16.38 3.12-22.63 9.38L9.38 372.52c-12.5 12.5-12.5 32.76 0 45.25l84.85 84.85c6.25 6.25 14.44 9.37 22.62 9.37 8.19 0 16.38-3.12 22.63-9.37l363.14-363.15c12.5-12.48 12.5-32.75 0-45.24zM359.45 203.46l-50.91-50.91 86.6-86.6 50.91 50.91-86.6 86.6z", + ], + }, + Us = { + prefix: "fas", + iconName: "magnet", + icon: [ + 512, + 512, + [], + "f076", + "M164.1 160H12c-6.6 0-12-5.4-12-12V68c0-19.9 16.1-36 36-36h104c19.9 0 36 16.1 36 36v80c.1 6.6-5.3 12-11.9 12zm348-12V67.9c0-19.9-16.1-36-36-36h-104c-19.9 0-36 16.1-36 36v80c0 6.6 5.4 12 12 12h152c6.6.1 12-5.3 12-11.9zm-164 44c-6.6 0-12 5.4-12 12v52c0 128.1-160 127.9-160 0v-52c0-6.6-5.4-12-12-12h-152c-6.7 0-12 5.4-12 12.1.1 21.4.6 40.3 0 53.3C.1 408 136.3 504 256.9 504 377.5 504 512 408 512 257.3c-.6-12.8-.2-33 0-53.2 0-6.7-5.3-12.1-12-12.1H348.1z", + ], + }, + Hs = { + prefix: "fas", + iconName: "mail-bulk", + icon: [ + 576, + 512, + [], + "f674", + "M160 448c-25.6 0-51.2-22.4-64-32-64-44.8-83.2-60.8-96-70.4V480c0 17.67 14.33 32 32 32h256c17.67 0 32-14.33 32-32V345.6c-12.8 9.6-32 25.6-96 70.4-12.8 9.6-38.4 32-64 32zm128-192H32c-17.67 0-32 14.33-32 32v16c25.6 19.2 22.4 19.2 115.2 86.4 9.6 6.4 28.8 25.6 44.8 25.6s35.2-19.2 44.8-22.4c92.8-67.2 89.6-67.2 115.2-86.4V288c0-17.67-14.33-32-32-32zm256-96H224c-17.67 0-32 14.33-32 32v32h96c33.21 0 60.59 25.42 63.71 57.82l.29-.22V416h192c17.67 0 32-14.33 32-32V192c0-17.67-14.33-32-32-32zm-32 128h-64v-64h64v64zm-352-96c0-35.29 28.71-64 64-64h224V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v192h96v-32z", + ], + }, + Ws = { + prefix: "fas", + iconName: "male", + icon: [ + 192, + 512, + [], + "f183", + "M96 0c35.346 0 64 28.654 64 64s-28.654 64-64 64-64-28.654-64-64S60.654 0 96 0m48 144h-11.36c-22.711 10.443-49.59 10.894-73.28 0H48c-26.51 0-48 21.49-48 48v136c0 13.255 10.745 24 24 24h16v136c0 13.255 10.745 24 24 24h64c13.255 0 24-10.745 24-24V352h16c13.255 0 24-10.745 24-24V192c0-26.51-21.49-48-48-48z", + ], + }, + Xs = { + prefix: "fas", + iconName: "map", + icon: [ + 576, + 512, + [], + "f279", + "M0 117.66v346.32c0 11.32 11.43 19.06 21.94 14.86L160 416V32L20.12 87.95A32.006 32.006 0 0 0 0 117.66zM192 416l192 64V96L192 32v384zM554.06 33.16L416 96v384l139.88-55.95A31.996 31.996 0 0 0 576 394.34V48.02c0-11.32-11.43-19.06-21.94-14.86z", + ], + }, + Ys = { + prefix: "fas", + iconName: "map-marked", + icon: [ + 576, + 512, + [], + "f59f", + "M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z", + ], + }, + Ks = { + prefix: "fas", + iconName: "map-marked-alt", + icon: [ + 576, + 512, + [], + "f5a0", + "M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zm0 168c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z", + ], + }, + Zs = { + prefix: "fas", + iconName: "map-marker", + icon: [384, 512, [], "f041", "M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"], + }, + qs = { + prefix: "fas", + iconName: "map-marker-alt", + icon: [ + 384, + 512, + [], + "f3c5", + "M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z", + ], + }, + Qs = { + prefix: "fas", + iconName: "map-pin", + icon: [ + 288, + 512, + [], + "f276", + "M112 316.94v156.69l22.02 33.02c4.75 7.12 15.22 7.12 19.97 0L176 473.63V316.94c-10.39 1.92-21.06 3.06-32 3.06s-21.61-1.14-32-3.06zM144 0C64.47 0 0 64.47 0 144s64.47 144 144 144 144-64.47 144-144S223.53 0 144 0zm0 76c-37.5 0-68 30.5-68 68 0 6.62-5.38 12-12 12s-12-5.38-12-12c0-50.73 41.28-92 92-92 6.62 0 12 5.38 12 12s-5.38 12-12 12z", + ], + }, + Js = { + prefix: "fas", + iconName: "map-signs", + icon: [ + 512, + 512, + [], + "f277", + "M507.31 84.69L464 41.37c-6-6-14.14-9.37-22.63-9.37H288V16c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v16H56c-13.25 0-24 10.75-24 24v80c0 13.25 10.75 24 24 24h385.37c8.49 0 16.62-3.37 22.63-9.37l43.31-43.31c6.25-6.26 6.25-16.38 0-22.63zM224 496c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V384h-64v112zm232-272H288v-32h-64v32H70.63c-8.49 0-16.62 3.37-22.63 9.37L4.69 276.69c-6.25 6.25-6.25 16.38 0 22.63L48 342.63c6 6 14.14 9.37 22.63 9.37H456c13.25 0 24-10.75 24-24v-80c0-13.25-10.75-24-24-24z", + ], + }, + $s = { + prefix: "fas", + iconName: "marker", + icon: [ + 512, + 512, + [], + "f5a1", + "M93.95 290.03A327.038 327.038 0 0 0 .17 485.11l-.03.23c-1.7 15.28 11.21 28.2 26.49 26.51a327.02 327.02 0 0 0 195.34-93.8l75.4-75.4-128.02-128.02-75.4 75.4zM485.49 26.51c-35.35-35.35-92.67-35.35-128.02 0l-21.76 21.76-36.56-36.55c-15.62-15.62-40.95-15.62-56.56 0L138.47 115.84c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0l87.15-87.15 19.59 19.59L191.98 192 320 320.02l165.49-165.49c35.35-35.35 35.35-92.66 0-128.02z", + ], + }, + ec = { + prefix: "fas", + iconName: "mars", + icon: [ + 384, + 512, + [], + "f222", + "M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c0-6.6-5.4-12-12-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + tc = { + prefix: "fas", + iconName: "mars-double", + icon: [ + 512, + 512, + [], + "f227", + "M340 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C198.5 72.1 172.2 64 144 64 64.5 64 0 128.5 0 208s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.5 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 288c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm356-128.1h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7c-18.2-11.4-39-18.9-61.5-21.3-2.1 21.8-8.2 43.3-18.4 63.3 1.1 0 2.2-.1 3.2-.1 44.1 0 80 35.9 80 80s-35.9 80-80 80-80-35.9-80-80c0-1.1 0-2.2.1-3.2-20 10.2-41.5 16.4-63.3 18.4C168.4 455.6 229.6 512 304 512c79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12v-79c0-6.7-5.4-12.1-12-12.1z", + ], + }, + nc = { + prefix: "fas", + iconName: "mars-stroke", + icon: [ + 384, + 512, + [], + "f229", + "M372 64h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-17.5 17.5-14.1-14.1c-4.7-4.7-12.3-4.7-17 0L224.5 133c-4.7 4.7-4.7 12.3 0 17l14.1 14.1-18 18c-22.2-14-48.5-22.1-76.7-22.1C64.5 160 0 224.5 0 304s64.5 144 144 144 144-64.5 144-144c0-28.2-8.1-54.5-22.1-76.7l18-18 14.1 14.1c4.7 4.7 12.3 4.7 17 0l28.3-28.3c4.7-4.7 4.7-12.3 0-17L329.2 164l17.5-17.5 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V76c-.1-6.6-5.5-12-12.1-12zM144 384c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + ic = { + prefix: "fas", + iconName: "mars-stroke-h", + icon: [ + 480, + 512, + [], + "f22b", + "M476.2 247.5l-55.9-55.9c-7.6-7.6-20.5-2.2-20.5 8.5V224H376v-20c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v20h-27.6c-5.8-25.6-18.7-49.9-38.6-69.8C189.6 98 98.4 98 42.2 154.2c-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 19.9-19.9 32.8-44.2 38.6-69.8H312v20c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-20h23.9v23.9c0 10.7 12.9 16 20.5 8.5l55.9-55.9c4.6-4.7 4.6-12.3-.1-17zm-275.6 65.1c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z", + ], + }, + rc = { + prefix: "fas", + iconName: "mars-stroke-v", + icon: [ + 288, + 512, + [], + "f22a", + "M245.8 234.2c-19.9-19.9-44.2-32.8-69.8-38.6v-25.4h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V81.4h23.9c10.7 0 16-12.9 8.5-20.5L152.5 5.1c-4.7-4.7-12.3-4.7-17 0L79.6 61c-7.6 7.6-2.2 20.5 8.5 20.5H112v24.7H92c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h20v25.4c-25.6 5.8-49.9 18.7-69.8 38.6-56.2 56.2-56.2 147.4 0 203.6 56.2 56.2 147.4 56.2 203.6 0 56.3-56.2 56.3-147.4 0-203.6zm-45.2 158.4c-31.2 31.2-81.9 31.2-113.1 0-31.2-31.2-31.2-81.9 0-113.1 31.2-31.2 81.9-31.2 113.1 0 31.2 31.1 31.2 81.9 0 113.1z", + ], + }, + oc = { + prefix: "fas", + iconName: "mask", + icon: [ + 640, + 512, + [], + "f6fa", + "M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z", + ], + }, + ac = { + prefix: "fas", + iconName: "medal", + icon: [ + 512, + 512, + [], + "f5a2", + "M223.75 130.75L154.62 15.54A31.997 31.997 0 0 0 127.18 0H16.03C3.08 0-4.5 14.57 2.92 25.18l111.27 158.96c29.72-27.77 67.52-46.83 109.56-53.39zM495.97 0H384.82c-11.24 0-21.66 5.9-27.44 15.54l-69.13 115.21c42.04 6.56 79.84 25.62 109.56 53.38L509.08 25.18C516.5 14.57 508.92 0 495.97 0zM256 160c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm92.52 157.26l-37.93 36.96 8.97 52.22c1.6 9.36-8.26 16.51-16.65 12.09L256 393.88l-46.9 24.65c-8.4 4.45-18.25-2.74-16.65-12.09l8.97-52.22-37.93-36.96c-6.82-6.64-3.05-18.23 6.35-19.59l52.43-7.64 23.43-47.52c2.11-4.28 6.19-6.39 10.28-6.39 4.11 0 8.22 2.14 10.33 6.39l23.43 47.52 52.43 7.64c9.4 1.36 13.17 12.95 6.35 19.59z", + ], + }, + sc = { + prefix: "fas", + iconName: "medkit", + icon: [ + 512, + 512, + [], + "f0fa", + "M96 480h320V128h-32V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v48H96v352zm96-384h128v32H192V96zm320 80v256c0 26.51-21.49 48-48 48h-16V128h16c26.51 0 48 21.49 48 48zM64 480H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v352zm288-208v32c0 8.837-7.163 16-16 16h-48v48c0 8.837-7.163 16-16 16h-32c-8.837 0-16-7.163-16-16v-48h-48c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h48v-48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v48h48c8.837 0 16 7.163 16 16z", + ], + }, + cc = { + prefix: "fas", + iconName: "meh", + icon: [ + 496, + 512, + [], + "f11a", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm176 192H152c-21.2 0-21.2-32 0-32h192c21.2 0 21.2 32 0 32zm-16-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + lc = { + prefix: "fas", + iconName: "meh-blank", + icon: [ + 496, + 512, + [], + "f5a4", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm-80 232c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + uc = { + prefix: "fas", + iconName: "meh-rolling-eyes", + icon: [ + 496, + 512, + [], + "f5a5", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM88 224c0-24.3 13.7-45.2 33.6-56-.7 2.6-1.6 5.2-1.6 8 0 17.7 14.3 32 32 32s32-14.3 32-32c0-2.8-.9-5.4-1.6-8 19.9 10.8 33.6 31.7 33.6 56 0 35.3-28.7 64-64 64s-64-28.7-64-64zm224 176H184c-21.2 0-21.2-32 0-32h128c21.2 0 21.2 32 0 32zm32-112c-35.3 0-64-28.7-64-64 0-24.3 13.7-45.2 33.6-56-.7 2.6-1.6 5.2-1.6 8 0 17.7 14.3 32 32 32s32-14.3 32-32c0-2.8-.9-5.4-1.6-8 19.9 10.8 33.6 31.7 33.6 56 0 35.3-28.7 64-64 64z", + ], + }, + hc = { + prefix: "fas", + iconName: "memory", + icon: [ + 640, + 512, + [], + "f538", + "M640 130.94V96c0-17.67-14.33-32-32-32H32C14.33 64 0 78.33 0 96v34.94c18.6 6.61 32 24.19 32 45.06s-13.4 38.45-32 45.06V320h640v-98.94c-18.6-6.61-32-24.19-32-45.06s13.4-38.45 32-45.06zM224 256h-64V128h64v128zm128 0h-64V128h64v128zm128 0h-64V128h64v128zM0 448h64v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h64v-96H0v96z", + ], + }, + dc = { + prefix: "fas", + iconName: "menorah", + icon: [ + 640, + 512, + [], + "f676", + "M144 128h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm96 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm192 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm96 0h-32c-8.84 0-16 7.16-16 16v144h64V144c0-8.84-7.16-16-16-16zm80-32c17.67 0 32-14.33 32-32S608 0 608 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S512 0 512 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S416 0 416 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S320 0 320 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S224 0 224 0s-32 46.33-32 64 14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S128 0 128 0 96 46.33 96 64s14.33 32 32 32zm-96 0c17.67 0 32-14.33 32-32S32 0 32 0 0 46.33 0 64s14.33 32 32 32zm544 192c0 17.67-14.33 32-32 32H352V144c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v176H96c-17.67 0-32-14.33-32-32V144c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v144c0 53.02 42.98 96 96 96h192v64H112c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16H352v-64h192c53.02 0 96-42.98 96-96V144c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144z", + ], + }, + pc = { + prefix: "fas", + iconName: "mercury", + icon: [ + 288, + 512, + [], + "f223", + "M288 208c0-44.2-19.9-83.7-51.2-110.1 2.5-1.8 4.9-3.8 7.2-5.8 24.7-21.2 39.8-48.8 43.2-78.8.9-7.1-4.7-13.3-11.9-13.3h-40.5C229 0 224.1 4.1 223 9.8c-2.4 12.5-9.6 24.3-20.7 33.8C187 56.8 166.3 64 144 64s-43-7.2-58.4-20.4C74.5 34.1 67.4 22.3 64.9 9.8 63.8 4.1 58.9 0 53.2 0H12.7C5.5 0-.1 6.2.8 13.3 4.2 43.4 19.2 71 44 92.2c2.3 2 4.7 3.9 7.2 5.8C19.9 124.3 0 163.8 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z", + ], + }, + fc = { + prefix: "fas", + iconName: "microchip", + icon: [ + 512, + 512, + [], + "f2db", + "M416 48v416c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h224c26.51 0 48 21.49 48 48zm96 58v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42V88h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zM30 376h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6z", + ], + }, + mc = { + prefix: "fas", + iconName: "microphone", + icon: [ + 352, + 512, + [], + "f130", + "M176 352c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96zm160-160h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16z", + ], + }, + gc = { + prefix: "fas", + iconName: "microphone-alt", + icon: [ + 352, + 512, + [], + "f3c9", + "M336 192h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16zM176 352c53.02 0 96-42.98 96-96h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H272c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96z", + ], + }, + bc = { + prefix: "fas", + iconName: "microphone-alt-slash", + icon: [ + 640, + 512, + [], + "f539", + "M633.82 458.1L476.26 336.33C488.74 312.21 496 284.98 496 256v-48c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v48c0 17.92-3.96 34.8-10.72 50.2l-26.55-20.52c3.1-9.4 5.28-19.22 5.28-29.67h-43.67l-41.4-32H416v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H416v-32h-85.33c-5.89 0-10.67-3.58-10.67-8v-16c0-4.42 4.78-8 10.67-8H416c0-53.02-42.98-96-96-96s-96 42.98-96 96v45.36L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM400 464h-56v-33.78c11.71-1.62 23.1-4.28 33.96-8.08l-50.4-38.96c-6.71.4-13.41.87-20.35.2-55.85-5.45-98.74-48.63-111.18-101.85L144 241.31v6.85c0 89.64 63.97 169.55 152 181.69V464h-56c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z", + ], + }, + _c = { + prefix: "fas", + iconName: "microphone-slash", + icon: [ + 640, + 512, + [], + "f131", + "M633.82 458.1l-157.8-121.96C488.61 312.13 496 285.01 496 256v-48c0-8.84-7.16-16-16-16h-16c-8.84 0-16 7.16-16 16v48c0 17.92-3.96 34.8-10.72 50.2l-26.55-20.52c3.1-9.4 5.28-19.22 5.28-29.67V96c0-53.02-42.98-96-96-96s-96 42.98-96 96v45.36L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM400 464h-56v-33.77c11.66-1.6 22.85-4.54 33.67-8.31l-50.11-38.73c-6.71.4-13.41.87-20.35.2-55.85-5.45-98.74-48.63-111.18-101.85L144 241.31v6.85c0 89.64 63.97 169.55 152 181.69V464h-56c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16z", + ], + }, + vc = { + prefix: "fas", + iconName: "microscope", + icon: [ + 512, + 512, + [], + "f610", + "M160 320h12v16c0 8.84 7.16 16 16 16h40c8.84 0 16-7.16 16-16v-16h12c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32V16c0-8.84-7.16-16-16-16h-64c-8.84 0-16 7.16-16 16v16c-17.67 0-32 14.33-32 32v224c0 17.67 14.33 32 32 32zm304 128h-1.29C493.24 413.99 512 369.2 512 320c0-105.88-86.12-192-192-192v64c70.58 0 128 57.42 128 128s-57.42 128-128 128H48c-26.51 0-48 21.49-48 48 0 8.84 7.16 16 16 16h480c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48zm-360-32h208c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8H104c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8z", + ], + }, + yc = { prefix: "fas", iconName: "minus", icon: [448, 512, [], "f068", "M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"] }, + Cc = { + prefix: "fas", + iconName: "minus-circle", + icon: [512, 512, [], "f056", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"], + }, + Pc = { + prefix: "fas", + iconName: "minus-square", + icon: [ + 448, + 512, + [], + "f146", + "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM92 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H92z", + ], + }, + xc = { + prefix: "fas", + iconName: "mobile", + icon: [ + 320, + 512, + [], + "f10b", + "M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + Tc = { + prefix: "fas", + iconName: "mobile-alt", + icon: [ + 320, + 512, + [], + "f3cd", + "M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM160 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm112-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v312z", + ], + }, + Sc = { + prefix: "fas", + iconName: "money-bill", + icon: [ + 640, + 512, + [], + "f0d6", + "M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z", + ], + }, + Oc = { + prefix: "fas", + iconName: "money-bill-alt", + icon: [ + 640, + 512, + [], + "f3d1", + "M352 288h-16v-88c0-4.42-3.58-8-8-8h-13.58c-4.74 0-9.37 1.4-13.31 4.03l-15.33 10.22a7.994 7.994 0 0 0-2.22 11.09l8.88 13.31a7.994 7.994 0 0 0 11.09 2.22l.47-.31V288h-16c-4.42 0-8 3.58-8 8v16c0 4.42 3.58 8 8 8h64c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8zM608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 192c-53.02 0-96-50.15-96-112 0-61.86 42.98-112 96-112s96 50.14 96 112c0 61.87-43 112-96 112zm272 32h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z", + ], + }, + Ec = { + prefix: "fas", + iconName: "money-bill-wave", + icon: [ + 640, + 512, + [], + "f53a", + "M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM48 132.22c20.12 5.04 41.12 7.57 62.72 8.93C104.84 170.54 79 192.69 48 192.69v-60.47zm0 285v-47.78c34.37 0 62.18 27.27 63.71 61.4-22.53-1.81-43.59-6.31-63.71-13.62zM320 352c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 27.78c-17.52-4.39-35.71-6.85-54.32-8.44 5.87-26.08 27.5-45.88 54.32-49.28v57.72zm0-236.11c-30.89-3.91-54.86-29.7-55.81-61.55 19.54 2.17 38.09 6.23 55.81 12.66v48.89z", + ], + }, + Mc = { + prefix: "fas", + iconName: "money-bill-wave-alt", + icon: [ + 640, + 512, + [], + "f53b", + "M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM320 352c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96z", + ], + }, + Ac = { + prefix: "fas", + iconName: "money-check", + icon: [ + 640, + 512, + [], + "f53c", + "M0 448c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128H0v320zm448-208c0-8.84 7.16-16 16-16h96c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-32zm0 120c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H456c-4.42 0-8-3.58-8-8v-16zM64 264c0-4.42 3.58-8 8-8h304c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm0 96c0-4.42 3.58-8 8-8h176c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zM624 32H16C7.16 32 0 39.16 0 48v48h640V48c0-8.84-7.16-16-16-16z", + ], + }, + Ic = { + prefix: "fas", + iconName: "money-check-alt", + icon: [ + 640, + 512, + [], + "f53d", + "M608 32H32C14.33 32 0 46.33 0 64v384c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM176 327.88V344c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-16.29c-11.29-.58-22.27-4.52-31.37-11.35-3.9-2.93-4.1-8.77-.57-12.14l11.75-11.21c2.77-2.64 6.89-2.76 10.13-.73 3.87 2.42 8.26 3.72 12.82 3.72h28.11c6.5 0 11.8-5.92 11.8-13.19 0-5.95-3.61-11.19-8.77-12.73l-45-13.5c-18.59-5.58-31.58-23.42-31.58-43.39 0-24.52 19.05-44.44 42.67-45.07V152c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v16.29c11.29.58 22.27 4.51 31.37 11.35 3.9 2.93 4.1 8.77.57 12.14l-11.75 11.21c-2.77 2.64-6.89 2.76-10.13.73-3.87-2.43-8.26-3.72-12.82-3.72h-28.11c-6.5 0-11.8 5.92-11.8 13.19 0 5.95 3.61 11.19 8.77 12.73l45 13.5c18.59 5.58 31.58 23.42 31.58 43.39 0 24.53-19.05 44.44-42.67 45.07zM416 312c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16zm160 0c0 4.42-3.58 8-8 8h-80c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h80c4.42 0 8 3.58 8 8v16zm0-96c0 4.42-3.58 8-8 8H296c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h272c4.42 0 8 3.58 8 8v16z", + ], + }, + Dc = { + prefix: "fas", + iconName: "monument", + icon: [ + 384, + 512, + [], + "f5a6", + "M368 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h352c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-78.86-347.26a31.97 31.97 0 0 0-9.21-19.44L203.31 4.69c-6.25-6.25-16.38-6.25-22.63 0l-76.6 76.61a31.97 31.97 0 0 0-9.21 19.44L64 416h256l-30.86-315.26zM240 307.2c0 6.4-6.4 12.8-12.8 12.8h-70.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h70.4c6.4 0 12.8 6.4 12.8 12.8v38.4z", + ], + }, + Rc = { + prefix: "fas", + iconName: "moon", + icon: [ + 512, + 512, + [], + "f186", + "M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z", + ], + }, + wc = { + prefix: "fas", + iconName: "mortar-pestle", + icon: [ + 512, + 512, + [], + "f5a7", + "M501.54 60.91c17.22-17.22 12.51-46.25-9.27-57.14a35.696 35.696 0 0 0-37.37 3.37L251.09 160h151.37l99.08-99.09zM496 192H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c0 80.98 50.2 150.11 121.13 178.32-12.76 16.87-21.72 36.8-24.95 58.69-1.46 9.92 6.04 18.98 16.07 18.98h223.5c10.03 0 17.53-9.06 16.07-18.98-3.22-21.89-12.18-41.82-24.95-58.69C429.8 406.11 480 336.98 480 256h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z", + ], + }, + Lc = { + prefix: "fas", + iconName: "mosque", + icon: [ + 640, + 512, + [], + "f678", + "M0 480c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V160H0v320zm579.16-192c17.86-17.39 28.84-37.34 28.84-58.91 0-52.86-41.79-93.79-87.92-122.9-41.94-26.47-80.63-57.77-111.96-96.22L400 0l-8.12 9.97c-31.33 38.45-70.01 69.76-111.96 96.22C233.79 135.3 192 176.23 192 229.09c0 21.57 10.98 41.52 28.84 58.91h358.32zM608 320H192c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h32v-64c0-17.67 14.33-32 32-32s32 14.33 32 32v64h64v-72c0-48 48-72 48-72s48 24 48 72v72h64v-64c0-17.67 14.33-32 32-32s32 14.33 32 32v64h32c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32zM64 0S0 32 0 96v32h128V96c0-64-64-96-64-96z", + ], + }, + Fc = { + prefix: "fas", + iconName: "motorcycle", + icon: [ + 640, + 512, + [], + "f21c", + "M512.949 192.003c-14.862-.108-29.14 2.322-42.434 6.874L437.589 144H520c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24h-45.311a24 24 0 0 0-17.839 7.945l-37.496 41.663-22.774-37.956A24 24 0 0 0 376 64h-80c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h66.411l19.2 32H227.904c-17.727-23.073-44.924-40-99.904-40H72.54c-13.455 0-24.791 11.011-24.536 24.464C48.252 141.505 58.9 152 72 152h56c24.504 0 38.686 10.919 47.787 24.769l-11.291 20.529c-13.006-3.865-26.871-5.736-41.251-5.21C55.857 194.549 1.565 249.605.034 317.021-1.603 389.076 56.317 448 128 448c59.642 0 109.744-40.794 123.953-96h84.236c13.673 0 24.589-11.421 23.976-25.077-2.118-47.12 17.522-93.665 56.185-125.026l12.485 20.808c-27.646 23.654-45.097 58.88-44.831 98.179.47 69.556 57.203 126.452 126.758 127.11 71.629.678 129.839-57.487 129.234-129.099-.588-69.591-57.455-126.386-127.047-126.892zM128 400c-44.112 0-80-35.888-80-80s35.888-80 80-80c4.242 0 8.405.341 12.469.982L98.97 316.434C90.187 332.407 101.762 352 120 352h81.297c-12.37 28.225-40.56 48-73.297 48zm388.351-.116C470.272 402.337 432 365.554 432 320c0-21.363 8.434-40.781 22.125-55.144l49.412 82.352c4.546 7.577 14.375 10.034 21.952 5.488l13.72-8.232c7.577-4.546 10.034-14.375 5.488-21.952l-48.556-80.927A80.005 80.005 0 0 1 512 240c45.554 0 82.338 38.273 79.884 84.352-2.16 40.558-34.974 73.372-75.533 75.532z", + ], + }, + Nc = { + prefix: "fas", + iconName: "mountain", + icon: [ + 640, + 512, + [], + "f6fc", + "M634.92 462.7l-288-448C341.03 5.54 330.89 0 320 0s-21.03 5.54-26.92 14.7l-288 448a32.001 32.001 0 0 0-1.17 32.64A32.004 32.004 0 0 0 32 512h576c11.71 0 22.48-6.39 28.09-16.67a31.983 31.983 0 0 0-1.17-32.63zM320 91.18L405.39 224H320l-64 64-38.06-38.06L320 91.18z", + ], + }, + kc = { + prefix: "fas", + iconName: "mouse-pointer", + icon: [ + 320, + 512, + [], + "f245", + "M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z", + ], + }, + zc = { + prefix: "fas", + iconName: "music", + icon: [ + 512, + 512, + [], + "f001", + "M511.99 32.01c0-21.71-21.1-37.01-41.6-30.51L150.4 96c-13.3 4.2-22.4 16.5-22.4 30.5v261.42c-10.05-2.38-20.72-3.92-32-3.92-53.02 0-96 28.65-96 64s42.98 64 96 64 96-28.65 96-64V214.31l256-75.02v184.63c-10.05-2.38-20.72-3.92-32-3.92-53.02 0-96 28.65-96 64s42.98 64 96 64 96-28.65 96-64l-.01-351.99z", + ], + }, + jc = { + prefix: "fas", + iconName: "network-wired", + icon: [ + 640, + 512, + [], + "f6ff", + "M640 264v-16c0-8.84-7.16-16-16-16H344v-40h72c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H224c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h72v40H16c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h104v40H64c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h304v40h-56c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h160c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32h-56v-40h104c8.84 0 16-7.16 16-16zM256 128V64h128v64H256zm-64 320H96v-64h96v64zm352 0h-96v-64h96v64z", + ], + }, + Bc = { + prefix: "fas", + iconName: "neuter", + icon: [ + 288, + 512, + [], + "f22c", + "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V468c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V316.4c64.1-14.5 112-71.9 112-140.4zm-144 80c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + Vc = { + prefix: "fas", + iconName: "newspaper", + icon: [ + 576, + 512, + [], + "f1ea", + "M552 64H88c-13.255 0-24 10.745-24 24v8H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h472c26.51 0 48-21.49 48-48V88c0-13.255-10.745-24-24-24zM56 400a8 8 0 0 1-8-8V144h16v248a8 8 0 0 1-8 8zm236-16H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm-208-96H140c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm208 0H348c-6.627 0-12-5.373-12-12v-8c0-6.627 5.373-12 12-12h152c6.627 0 12 5.373 12 12v8c0 6.627-5.373 12-12 12zm0-96H140c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h360c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12z", + ], + }, + Gc = { + prefix: "fas", + iconName: "not-equal", + icon: [ + 448, + 512, + [], + "f53e", + "M416 208c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32h-23.88l51.87-66.81c5.37-7.02 4.04-17.06-2.97-22.43L415.61 3.3c-7.02-5.38-17.06-4.04-22.44 2.97L311.09 112H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h204.56l-74.53 96H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h55.49l-51.87 66.81c-5.37 7.01-4.04 17.05 2.97 22.43L64 508.7c7.02 5.38 17.06 4.04 22.43-2.97L168.52 400H416c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32H243.05l74.53-96H416z", + ], + }, + Uc = { + prefix: "fas", + iconName: "notes-medical", + icon: [ + 384, + 512, + [], + "f481", + "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm96 304c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48zm0-192c0 4.4-3.6 8-8 8H104c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v16z", + ], + }, + Hc = { + prefix: "fas", + iconName: "object-group", + icon: [ + 512, + 512, + [], + "f247", + "M480 128V96h20c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v20H64V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v40c0 6.627 5.373 12 12 12h20v320H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-20h384v20c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V128zM96 276V140c0-6.627 5.373-12 12-12h168c6.627 0 12 5.373 12 12v136c0 6.627-5.373 12-12 12H108c-6.627 0-12-5.373-12-12zm320 96c0 6.627-5.373 12-12 12H236c-6.627 0-12-5.373-12-12v-52h72c13.255 0 24-10.745 24-24v-72h84c6.627 0 12 5.373 12 12v136z", + ], + }, + Wc = { + prefix: "fas", + iconName: "object-ungroup", + icon: [ + 576, + 512, + [], + "f248", + "M64 320v26a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6v-52a6 6 0 0 1 6-6h26V96H6a6 6 0 0 1-6-6V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v26h288V38a6 6 0 0 1 6-6h52a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-26v192h26a6 6 0 0 1 6 6v52a6 6 0 0 1-6 6h-52a6 6 0 0 1-6-6v-26H64zm480-64v-32h26a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-52a6 6 0 0 0-6 6v26H408v72h8c13.255 0 24 10.745 24 24v64c0 13.255-10.745 24-24 24h-64c-13.255 0-24-10.745-24-24v-8H192v72h-26a6 6 0 0 0-6 6v52a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-26h288v26a6 6 0 0 0 6 6h52a6 6 0 0 0 6-6v-52a6 6 0 0 0-6-6h-26V256z", + ], + }, + Xc = { + prefix: "fas", + iconName: "oil-can", + icon: [ + 640, + 512, + [], + "f613", + "M629.8 160.31L416 224l-50.49-25.24a64.07 64.07 0 0 0-28.62-6.76H280v-48h56c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16H176c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h56v48h-56L37.72 166.86a31.9 31.9 0 0 0-5.79-.53C14.67 166.33 0 180.36 0 198.34v94.95c0 15.46 11.06 28.72 26.28 31.48L96 337.46V384c0 17.67 14.33 32 32 32h274.63c8.55 0 16.75-3.42 22.76-9.51l212.26-214.75c1.5-1.5 2.34-3.54 2.34-5.66V168c.01-5.31-5.08-9.15-10.19-7.69zM96 288.67l-48-8.73v-62.43l48 8.73v62.43zm453.33 84.66c0 23.56 19.1 42.67 42.67 42.67s42.67-19.1 42.67-42.67S592 288 592 288s-42.67 61.77-42.67 85.33z", + ], + }, + Yc = { + prefix: "fas", + iconName: "om", + icon: [ + 512, + 512, + [], + "f679", + "M360.6 60.94a10.43 10.43 0 0 0 14.76 0l21.57-21.56a10.43 10.43 0 0 0 0-14.76L375.35 3.06c-4.08-4.07-10.68-4.07-14.76 0l-21.57 21.56a10.43 10.43 0 0 0 0 14.76l21.58 21.56zM412.11 192c-26.69 0-51.77 10.39-70.64 29.25l-24.25 24.25c-6.78 6.77-15.78 10.5-25.38 10.5H245c10.54-22.1 14.17-48.11 7.73-75.23-10.1-42.55-46.36-76.11-89.52-83.19-36.15-5.93-70.9 5.04-96.01 28.78-7.36 6.96-6.97 18.85 1.12 24.93l26.15 19.63c5.72 4.3 13.66 4.32 19.2-.21 8.45-6.9 19.02-10.71 30.27-10.71 26.47 0 48.01 21.53 48.01 48s-21.54 48-48.01 48h-31.9c-11.96 0-19.74 12.58-14.39 23.28l16.09 32.17c2.53 5.06 7.6 8.1 13.17 8.55h33.03c35.3 0 64.01 28.7 64.01 64s-28.71 64-64.01 64c-96.02 0-122.35-54.02-145.15-92.03-4.53-7.55-14.77-3.58-14.79 5.22C-.09 416 41.13 512 159.94 512c70.59 0 128.02-57.42 128.02-128 0-23.42-6.78-45.1-17.81-64h21.69c26.69 0 51.77-10.39 70.64-29.25l24.25-24.25c6.78-6.77 15.78-10.5 25.38-10.5 19.78 0 35.88 16.09 35.88 35.88V392c0 13.23-18.77 24-32.01 24-39.4 0-66.67-24.24-81.82-42.89-4.77-5.87-14.2-2.54-14.2 5.02V416s0 64 96.02 64c48.54 0 96.02-39.47 96.02-88V291.88c0-55.08-44.8-99.88-99.89-99.88zm42.18-124.73c-85.55 65.12-169.05 2.75-172.58.05-6.02-4.62-14.44-4.38-20.14.55-5.74 4.92-7.27 13.17-3.66 19.8 1.61 2.95 40.37 72.34 118.8 72.34 79.92 0 98.78-31.36 101.75-37.66 1.02-2.12 1.53-4.47 1.53-6.83V80c0-13.22-15.14-20.69-25.7-12.73z", + ], + }, + Kc = { + prefix: "fas", + iconName: "otter", + icon: [ + 640, + 512, + [], + "f700", + "M608 32h-32l-13.25-13.25A63.97 63.97 0 0 0 517.49 0H497c-11.14 0-22.08 2.91-31.75 8.43L312 96h-56C149.96 96 64 181.96 64 288v1.61c0 32.75-16 62.14-39.56 84.89-18.19 17.58-28.1 43.68-23.19 71.8 6.76 38.8 42.9 65.7 82.28 65.7H192c17.67 0 32-14.33 32-32s-14.33-32-32-32H80c-8.83 0-16-7.17-16-16s7.17-16 16-16h224c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-64l149.49-80.5L448 416h80c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-28.22l-55.11-110.21L521.14 192H544c53.02 0 96-42.98 96-96V64c0-17.67-14.33-32-32-32zm-96 16c8.84 0 16 7.16 16 16s-7.16 16-16 16-16-7.16-16-16 7.16-16 16-16zm32 96h-34.96L407.2 198.84l-13.77-27.55L512 112h77.05c-6.62 18.58-24.22 32-45.05 32z", + ], + }, + Zc = { + prefix: "fas", + iconName: "outdent", + icon: [ + 448, + 512, + [], + "f03b", + "M0 84V44c0-8.837 7.163-16 16-16h416c8.837 0 16 7.163 16 16v40c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16zm208 144h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H208c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM16 484h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm192-128h224c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H208c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zM4.687 267.313l96 95.984C110.734 373.348 128 366.224 128 351.984V160.008c0-14.329-17.325-21.304-27.313-11.313l-96 95.992c-6.249 6.248-6.249 16.378 0 22.626z", + ], + }, + qc = { + prefix: "fas", + iconName: "paint-brush", + icon: [ + 512, + 512, + [], + "f1fc", + "M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z", + ], + }, + Qc = { + prefix: "fas", + iconName: "paint-roller", + icon: [ + 512, + 512, + [], + "f5aa", + "M416 128V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32h352c17.67 0 32-14.33 32-32zm32-64v128c0 17.67-14.33 32-32 32H256c-35.35 0-64 28.65-64 64v32c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32v-32h160c53.02 0 96-42.98 96-96v-64c0-35.35-28.65-64-64-64z", + ], + }, + Jc = { + prefix: "fas", + iconName: "palette", + icon: [ + 512, + 512, + [], + "f53f", + "M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + $c = { + prefix: "fas", + iconName: "pallet", + icon: [ + 640, + 512, + [], + "f482", + "M144 256h352c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16H384v128l-64-32-64 32V0H144c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16zm480 128c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16h-48v-64h48zm-336 64H128v-64h160v64zm224 0H352v-64h160v64z", + ], + }, + el = { + prefix: "fas", + iconName: "paper-plane", + icon: [ + 512, + 512, + [], + "f1d8", + "M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z", + ], + }, + tl = { + prefix: "fas", + iconName: "paperclip", + icon: [ + 448, + 512, + [], + "f0c6", + "M43.246 466.142c-58.43-60.289-57.341-157.511 1.386-217.581L254.392 34c44.316-45.332 116.351-45.336 160.671 0 43.89 44.894 43.943 117.329 0 162.276L232.214 383.128c-29.855 30.537-78.633 30.111-107.982-.998-28.275-29.97-27.368-77.473 1.452-106.953l143.743-146.835c6.182-6.314 16.312-6.422 22.626-.241l22.861 22.379c6.315 6.182 6.422 16.312.241 22.626L171.427 319.927c-4.932 5.045-5.236 13.428-.648 18.292 4.372 4.634 11.245 4.711 15.688.165l182.849-186.851c19.613-20.062 19.613-52.725-.011-72.798-19.189-19.627-49.957-19.637-69.154 0L90.39 293.295c-34.763 35.56-35.299 93.12-1.191 128.313 34.01 35.093 88.985 35.137 123.058.286l172.06-175.999c6.177-6.319 16.307-6.433 22.626-.256l22.877 22.364c6.319 6.177 6.434 16.307.256 22.626l-172.06 175.998c-59.576 60.938-155.943 60.216-214.77-.485z", + ], + }, + nl = { + prefix: "fas", + iconName: "parachute-box", + icon: [ + 512, + 512, + [], + "f4cd", + "M511.9 175c-9.1-75.6-78.4-132.4-158.3-158.7C390 55.7 416 116.9 416 192h28.1L327.5 321.5c-2.5-.6-4.8-1.5-7.5-1.5h-48V192h112C384 76.8 315.1 0 256 0S128 76.8 128 192h112v128h-48c-2.7 0-5 .9-7.5 1.5L67.9 192H96c0-75.1 26-136.3 62.4-175.7C78.5 42.7 9.2 99.5.1 175c-1.1 9.1 6.8 17 16 17h8.7l136.7 151.9c-.7 2.6-1.6 5.2-1.6 8.1v128c0 17.7 14.3 32 32 32h128c17.7 0 32-14.3 32-32V352c0-2.9-.9-5.4-1.6-8.1L487.1 192h8.7c9.3 0 17.2-7.8 16.1-17z", + ], + }, + il = { + prefix: "fas", + iconName: "paragraph", + icon: [ + 448, + 512, + [], + "f1dd", + "M408 32H177.531C88.948 32 16.045 103.335 16 191.918 15.956 280.321 87.607 352 176 352v104c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V112h32v344c0 13.255 10.745 24 24 24h32c13.255 0 24-10.745 24-24V112h40c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24z", + ], + }, + rl = { + prefix: "fas", + iconName: "parking", + icon: [ + 448, + 512, + [], + "f540", + "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM240 320h-48v48c0 8.8-7.2 16-16 16h-32c-8.8 0-16-7.2-16-16V144c0-8.8 7.2-16 16-16h96c52.9 0 96 43.1 96 96s-43.1 96-96 96zm0-128h-48v64h48c17.6 0 32-14.4 32-32s-14.4-32-32-32z", + ], + }, + ol = { + prefix: "fas", + iconName: "passport", + icon: [ + 448, + 512, + [], + "f5ab", + "M129.62 176h39.09c1.49-27.03 6.54-51.35 14.21-70.41-27.71 13.24-48.02 39.19-53.3 70.41zm0 32c5.29 31.22 25.59 57.17 53.3 70.41-7.68-19.06-12.72-43.38-14.21-70.41h-39.09zM224 286.69c7.69-7.45 20.77-34.42 23.43-78.69h-46.87c2.67 44.26 15.75 71.24 23.44 78.69zM200.57 176h46.87c-2.66-44.26-15.74-71.24-23.43-78.69-7.7 7.45-20.78 34.43-23.44 78.69zm64.51 102.41c27.71-13.24 48.02-39.19 53.3-70.41h-39.09c-1.49 27.03-6.53 51.35-14.21 70.41zM416 0H64C28.65 0 0 28.65 0 64v384c0 35.35 28.65 64 64 64h352c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32zm-80 416H112c-8.8 0-16-7.2-16-16s7.2-16 16-16h224c8.8 0 16 7.2 16 16s-7.2 16-16 16zm-112-96c-70.69 0-128-57.31-128-128S153.31 64 224 64s128 57.31 128 128-57.31 128-128 128zm41.08-214.41c7.68 19.06 12.72 43.38 14.21 70.41h39.09c-5.28-31.22-25.59-57.17-53.3-70.41z", + ], + }, + al = { + prefix: "fas", + iconName: "pastafarianism", + icon: [ + 640, + 512, + [], + "f67b", + "M624.54 347.67c-32.7-12.52-57.36 4.25-75.37 16.45-17.06 11.53-23.25 14.42-31.41 11.36-8.12-3.09-10.83-9.38-15.89-29.38-3.33-13.15-7.44-29.32-17.95-42.65 2.24-2.91 4.43-5.79 6.38-8.57C500.47 304.45 513.71 312 532 312c33.95 0 50.87-25.78 62.06-42.83 10.59-16.14 15-21.17 21.94-21.17 13.25 0 24-10.75 24-24s-10.75-24-24-24c-33.95 0-50.87 25.78-62.06 42.83-10.6 16.14-15 21.17-21.94 21.17-17.31 0-37.48-61.43-97.26-101.91l17.25-34.5C485.43 125.5 512 97.98 512 64c0-35.35-28.65-64-64-64s-64 28.65-64 64c0 13.02 3.94 25.1 10.62 35.21l-18.15 36.3c-16.98-4.6-35.6-7.51-56.46-7.51s-39.49 2.91-56.46 7.51l-18.15-36.3C252.06 89.1 256 77.02 256 64c0-35.35-28.65-64-64-64s-64 28.65-64 64c0 33.98 26.56 61.5 60.02 63.6l17.25 34.5C145.68 202.44 125.15 264 108 264c-6.94 0-11.34-5.03-21.94-21.17C74.88 225.78 57.96 200 24 200c-13.25 0-24 10.75-24 24s10.75 24 24 24c6.94 0 11.34 5.03 21.94 21.17C57.13 286.22 74.05 312 108 312c18.29 0 31.53-7.55 41.7-17.11 1.95 2.79 4.14 5.66 6.38 8.57-10.51 13.33-14.62 29.5-17.95 42.65-5.06 20-7.77 26.28-15.89 29.38-8.11 3.06-14.33.17-31.41-11.36-18.03-12.2-42.72-28.92-75.37-16.45-12.39 4.72-18.59 18.58-13.87 30.97 4.72 12.41 18.61 18.61 30.97 13.88 8.16-3.09 14.34-.19 31.39 11.36 13.55 9.16 30.83 20.86 52.42 20.84 7.17 0 14.83-1.28 22.97-4.39 32.66-12.44 39.98-41.33 45.33-62.44 2.21-8.72 3.99-14.49 5.95-18.87 16.62 13.61 36.95 25.88 61.64 34.17-9.96 37-32.18 90.8-60.26 90.8-13.25 0-24 10.75-24 24s10.75 24 24 24c66.74 0 97.05-88.63 107.42-129.14 6.69.6 13.42 1.14 20.58 1.14s13.89-.54 20.58-1.14C350.95 423.37 381.26 512 448 512c13.25 0 24-10.75 24-24s-10.75-24-24-24c-27.94 0-50.21-53.81-60.22-90.81 24.69-8.29 45-20.56 61.62-34.16 1.96 4.38 3.74 10.15 5.95 18.87 5.34 21.11 12.67 50 45.33 62.44 8.14 3.11 15.8 4.39 22.97 4.39 21.59 0 38.87-11.69 52.42-20.84 17.05-11.55 23.28-14.45 31.39-11.36 12.39 4.75 26.27-1.47 30.97-13.88 4.71-12.4-1.49-26.26-13.89-30.98zM448 48c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16zm-256 0c8.82 0 16 7.18 16 16s-7.18 16-16 16-16-7.18-16-16 7.18-16 16-16z", + ], + }, + sl = { + prefix: "fas", + iconName: "paste", + icon: [ + 448, + 512, + [], + "f0ea", + "M128 184c0-30.879 25.122-56 56-56h136V56c0-13.255-10.745-24-24-24h-80.61C204.306 12.89 183.637 0 160 0s-44.306 12.89-55.39 32H24C10.745 32 0 42.745 0 56v336c0 13.255 10.745 24 24 24h104V184zm32-144c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24zm184 248h104v200c0 13.255-10.745 24-24 24H184c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.059V256h-96v-96h6.059a24 24 0 0 1 16.97 7.029l65.941 65.941a24.002 24.002 0 0 1 7.03 16.971z", + ], + }, + cl = { + prefix: "fas", + iconName: "pause", + icon: [ + 448, + 512, + [], + "f04c", + "M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z", + ], + }, + ll = { + prefix: "fas", + iconName: "pause-circle", + icon: [ + 512, + 512, + [], + "f28b", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm-16 328c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160zm112 0c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v160z", + ], + }, + ul = { + prefix: "fas", + iconName: "paw", + icon: [ + 512, + 512, + [], + "f1b0", + "M256 224c-79.41 0-192 122.76-192 200.25 0 34.9 26.81 55.75 71.74 55.75 48.84 0 81.09-25.08 120.26-25.08 39.51 0 71.85 25.08 120.26 25.08 44.93 0 71.74-20.85 71.74-55.75C448 346.76 335.41 224 256 224zm-147.28-12.61c-10.4-34.65-42.44-57.09-71.56-50.13-29.12 6.96-44.29 40.69-33.89 75.34 10.4 34.65 42.44 57.09 71.56 50.13 29.12-6.96 44.29-40.69 33.89-75.34zm84.72-20.78c30.94-8.14 46.42-49.94 34.58-93.36s-46.52-72.01-77.46-63.87-46.42 49.94-34.58 93.36c11.84 43.42 46.53 72.02 77.46 63.87zm281.39-29.34c-29.12-6.96-61.15 15.48-71.56 50.13-10.4 34.65 4.77 68.38 33.89 75.34 29.12 6.96 61.15-15.48 71.56-50.13 10.4-34.65-4.77-68.38-33.89-75.34zm-156.27 29.34c30.94 8.14 65.62-20.45 77.46-63.87 11.84-43.42-3.64-85.21-34.58-93.36s-65.62 20.45-77.46 63.87c-11.84 43.42 3.64 85.22 34.58 93.36z", + ], + }, + hl = { + prefix: "fas", + iconName: "peace", + icon: [ + 496, + 512, + [], + "f67c", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm184 248c0 31.93-8.2 61.97-22.57 88.17L280 240.63V74.97c86.23 15.21 152 90.5 152 181.03zM216 437.03c-33.86-5.97-64.49-21.2-89.29-43.02L216 322.57v114.46zm64-114.46L369.29 394c-24.8 21.82-55.43 37.05-89.29 43.02V322.57zm-64-247.6v165.66L86.57 344.17C72.2 317.97 64 287.93 64 256c0-90.53 65.77-165.82 152-181.03z", + ], + }, + dl = { + prefix: "fas", + iconName: "pen", + icon: [ + 512, + 512, + [], + "f304", + "M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z", + ], + }, + pl = { + prefix: "fas", + iconName: "pen-alt", + icon: [ + 512, + 512, + [], + "f305", + "M497.94 74.17l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.75 18.75-49.15 0-67.91zm-246.8-20.53c-15.62-15.62-40.94-15.62-56.56 0L75.8 172.43c-6.25 6.25-6.25 16.38 0 22.62l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l101.82-101.82 22.63 22.62L93.95 290.03A327.038 327.038 0 0 0 .17 485.11l-.03.23c-1.7 15.28 11.21 28.2 26.49 26.51a327.02 327.02 0 0 0 195.34-93.8l196.79-196.79-82.77-82.77-84.85-84.85z", + ], + }, + fl = { + prefix: "fas", + iconName: "pen-fancy", + icon: [ + 512, + 512, + [], + "f5ac", + "M79.18 282.94a32.005 32.005 0 0 0-20.24 20.24L0 480l4.69 4.69 92.89-92.89c-.66-2.56-1.57-5.03-1.57-7.8 0-17.67 14.33-32 32-32s32 14.33 32 32-14.33 32-32 32c-2.77 0-5.24-.91-7.8-1.57l-92.89 92.89L32 512l176.82-58.94a31.983 31.983 0 0 0 20.24-20.24l33.07-84.07-98.88-98.88-84.07 33.07zM369.25 28.32L186.14 227.81l97.85 97.85 199.49-183.11C568.4 67.48 443.73-55.94 369.25 28.32z", + ], + }, + ml = { + prefix: "fas", + iconName: "pen-nib", + icon: [ + 512, + 512, + [], + "f5ad", + "M136.6 138.79a64.003 64.003 0 0 0-43.31 41.35L0 460l14.69 14.69L164.8 324.58c-2.99-6.26-4.8-13.18-4.8-20.58 0-26.51 21.49-48 48-48s48 21.49 48 48-21.49 48-48 48c-7.4 0-14.32-1.81-20.58-4.8L37.31 497.31 52 512l279.86-93.29a64.003 64.003 0 0 0 41.35-43.31L416 224 288 96l-151.4 42.79zm361.34-64.62l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.75 18.75-49.15 0-67.91z", + ], + }, + gl = { + prefix: "fas", + iconName: "pen-square", + icon: [ + 448, + 512, + [], + "f14b", + "M400 480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zM238.1 177.9L102.4 313.6l-6.3 57.1c-.8 7.6 5.6 14.1 13.3 13.3l57.1-6.3L302.2 242c2.3-2.3 2.3-6.1 0-8.5L246.7 178c-2.5-2.4-6.3-2.4-8.6-.1zM345 165.1L314.9 135c-9.4-9.4-24.6-9.4-33.9 0l-23.1 23.1c-2.3 2.3-2.3 6.1 0 8.5l55.5 55.5c2.3 2.3 6.1 2.3 8.5 0L345 199c9.3-9.3 9.3-24.5 0-33.9z", + ], + }, + bl = { + prefix: "fas", + iconName: "pencil-alt", + icon: [ + 512, + 512, + [], + "f303", + "M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z", + ], + }, + _l = { + prefix: "fas", + iconName: "pencil-ruler", + icon: [ + 512, + 512, + [], + "f5ae", + "M109.46 244.04l134.58-134.56-44.12-44.12-61.68 61.68a7.919 7.919 0 0 1-11.21 0l-11.21-11.21c-3.1-3.1-3.1-8.12 0-11.21l61.68-61.68-33.64-33.65C131.47-3.1 111.39-3.1 99 9.29L9.29 99c-12.38 12.39-12.39 32.47 0 44.86l100.17 100.18zm388.47-116.8c18.76-18.76 18.75-49.17 0-67.93l-45.25-45.25c-18.76-18.76-49.18-18.76-67.95 0l-46.02 46.01 113.2 113.2 46.02-46.03zM316.08 82.71l-297 296.96L.32 487.11c-2.53 14.49 10.09 27.11 24.59 24.56l107.45-18.84L429.28 195.9 316.08 82.71zm186.63 285.43l-33.64-33.64-61.68 61.68c-3.1 3.1-8.12 3.1-11.21 0l-11.21-11.21c-3.09-3.1-3.09-8.12 0-11.21l61.68-61.68-44.14-44.14L267.93 402.5l100.21 100.2c12.39 12.39 32.47 12.39 44.86 0l89.71-89.7c12.39-12.39 12.39-32.47 0-44.86z", + ], + }, + vl = { + prefix: "fas", + iconName: "people-carry", + icon: [ + 640, + 512, + [], + "f4ce", + "M128 96c26.5 0 48-21.5 48-48S154.5 0 128 0 80 21.5 80 48s21.5 48 48 48zm384 0c26.5 0 48-21.5 48-48S538.5 0 512 0s-48 21.5-48 48 21.5 48 48 48zm125.7 372.1l-44-110-41.1 46.4-2 18.2 27.7 69.2c5 12.5 17 20.1 29.7 20.1 4 0 8-.7 11.9-2.3 16.4-6.6 24.4-25.2 17.8-41.6zm-34.2-209.8L585 178.1c-4.6-20-18.6-36.8-37.5-44.9-18.5-8-39-6.7-56.1 3.3-22.7 13.4-39.7 34.5-48.1 59.4L432 229.8 416 240v-96c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v96l-16.1-10.2-11.3-33.9c-8.3-25-25.4-46-48.1-59.4-17.2-10-37.6-11.3-56.1-3.3-18.9 8.1-32.9 24.9-37.5 44.9l-18.4 80.2c-4.6 20 .7 41.2 14.4 56.7l67.2 75.9 10.1 92.6C130 499.8 143.8 512 160 512c1.2 0 2.3-.1 3.5-.2 17.6-1.9 30.2-17.7 28.3-35.3l-10.1-92.8c-1.5-13-6.9-25.1-15.6-35l-43.3-49 17.6-70.3 6.8 20.4c4.1 12.5 11.9 23.4 24.5 32.6l51.1 32.5c4.6 2.9 12.1 4.6 17.2 5h160c5.1-.4 12.6-2.1 17.2-5l51.1-32.5c12.6-9.2 20.4-20 24.5-32.6l6.8-20.4 17.6 70.3-43.3 49c-8.7 9.9-14.1 22-15.6 35l-10.1 92.8c-1.9 17.6 10.8 33.4 28.3 35.3 1.2.1 2.3.2 3.5.2 16.1 0 30-12.1 31.8-28.5l10.1-92.6 67.2-75.9c13.6-15.5 19-36.7 14.4-56.7zM46.3 358.1l-44 110c-6.6 16.4 1.4 35 17.8 41.6 16.8 6.6 35.1-1.7 41.6-17.8l27.7-69.2-2-18.2-41.1-46.4z", + ], + }, + yl = { + prefix: "fas", + iconName: "percent", + icon: [ + 448, + 512, + [], + "f295", + "M112 224c61.9 0 112-50.1 112-112S173.9 0 112 0 0 50.1 0 112s50.1 112 112 112zm0-160c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zm224 224c-61.9 0-112 50.1-112 112s50.1 112 112 112 112-50.1 112-112-50.1-112-112-112zm0 160c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zM392.3.2l31.6-.1c19.4-.1 30.9 21.8 19.7 37.8L77.4 501.6a23.95 23.95 0 0 1-19.6 10.2l-33.4.1c-19.5 0-30.9-21.9-19.7-37.8l368-463.7C377.2 4 384.5.2 392.3.2z", + ], + }, + Cl = { + prefix: "fas", + iconName: "percentage", + icon: [ + 384, + 512, + [], + "f541", + "M109.25 173.25c24.99-24.99 24.99-65.52 0-90.51-24.99-24.99-65.52-24.99-90.51 0-24.99 24.99-24.99 65.52 0 90.51 25 25 65.52 25 90.51 0zm256 165.49c-24.99-24.99-65.52-24.99-90.51 0-24.99 24.99-24.99 65.52 0 90.51 24.99 24.99 65.52 24.99 90.51 0 25-24.99 25-65.51 0-90.51zm-1.94-231.43l-22.62-22.62c-12.5-12.5-32.76-12.5-45.25 0L20.69 359.44c-12.5 12.5-12.5 32.76 0 45.25l22.62 22.62c12.5 12.5 32.76 12.5 45.25 0l274.75-274.75c12.5-12.49 12.5-32.75 0-45.25z", + ], + }, + Pl = { + prefix: "fas", + iconName: "phone", + icon: [ + 512, + 512, + [], + "f095", + "M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z", + ], + }, + xl = { + prefix: "fas", + iconName: "phone-slash", + icon: [ + 640, + 512, + [], + "f3dd", + "M268.2 381.4l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48c-10.7 4.6-16.5 16.1-13.9 27.5l24 104c2.5 10.8 12.1 18.6 23.4 18.6 100.7 0 193.7-32.4 269.7-86.9l-80-61.8c-10.9 6.5-22.1 12.7-33.6 18.1zm365.6 76.7L475.1 335.5C537.9 256.4 576 156.9 576 48c0-11.2-7.7-20.9-18.6-23.4l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-12.2 26.1-27.9 50.3-46 72.8L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3z", + ], + }, + Tl = { + prefix: "fas", + iconName: "phone-square", + icon: [ + 448, + 512, + [], + "f098", + "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM94 416c-7.033 0-13.057-4.873-14.616-11.627l-14.998-65a15 15 0 0 1 8.707-17.16l69.998-29.999a15 15 0 0 1 17.518 4.289l30.997 37.885c48.944-22.963 88.297-62.858 110.781-110.78l-37.886-30.997a15.001 15.001 0 0 1-4.289-17.518l30-69.998a15 15 0 0 1 17.16-8.707l65 14.998A14.997 14.997 0 0 1 384 126c0 160.292-129.945 290-290 290z", + ], + }, + Sl = { + prefix: "fas", + iconName: "phone-volume", + icon: [ + 384, + 512, + [], + "f2a0", + "M97.333 506.966c-129.874-129.874-129.681-340.252 0-469.933 5.698-5.698 14.527-6.632 21.263-2.422l64.817 40.513a17.187 17.187 0 0 1 6.849 20.958l-32.408 81.021a17.188 17.188 0 0 1-17.669 10.719l-55.81-5.58c-21.051 58.261-20.612 122.471 0 179.515l55.811-5.581a17.188 17.188 0 0 1 17.669 10.719l32.408 81.022a17.188 17.188 0 0 1-6.849 20.958l-64.817 40.513a17.19 17.19 0 0 1-21.264-2.422zM247.126 95.473c11.832 20.047 11.832 45.008 0 65.055-3.95 6.693-13.108 7.959-18.718 2.581l-5.975-5.726c-3.911-3.748-4.793-9.622-2.261-14.41a32.063 32.063 0 0 0 0-29.945c-2.533-4.788-1.65-10.662 2.261-14.41l5.975-5.726c5.61-5.378 14.768-4.112 18.718 2.581zm91.787-91.187c60.14 71.604 60.092 175.882 0 247.428-4.474 5.327-12.53 5.746-17.552.933l-5.798-5.557c-4.56-4.371-4.977-11.529-.93-16.379 49.687-59.538 49.646-145.933 0-205.422-4.047-4.85-3.631-12.008.93-16.379l5.798-5.557c5.022-4.813 13.078-4.394 17.552.933zm-45.972 44.941c36.05 46.322 36.108 111.149 0 157.546-4.39 5.641-12.697 6.251-17.856 1.304l-5.818-5.579c-4.4-4.219-4.998-11.095-1.285-15.931 26.536-34.564 26.534-82.572 0-117.134-3.713-4.836-3.115-11.711 1.285-15.931l5.818-5.579c5.159-4.947 13.466-4.337 17.856 1.304z", + ], + }, + Ol = { + prefix: "fas", + iconName: "piggy-bank", + icon: [ + 576, + 512, + [], + "f4d3", + "M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z", + ], + }, + El = { + prefix: "fas", + iconName: "pills", + icon: [ + 576, + 512, + [], + "f484", + "M112 32C50.1 32 0 82.1 0 144v224c0 61.9 50.1 112 112 112s112-50.1 112-112V144c0-61.9-50.1-112-112-112zm48 224H64V144c0-26.5 21.5-48 48-48s48 21.5 48 48v112zm139.7-29.7c-3.5-3.5-9.4-3.1-12.3.8-45.3 62.5-40.4 150.1 15.9 206.4 56.3 56.3 143.9 61.2 206.4 15.9 4-2.9 4.3-8.8.8-12.3L299.7 226.3zm229.8-19c-56.3-56.3-143.9-61.2-206.4-15.9-4 2.9-4.3 8.8-.8 12.3l210.8 210.8c3.5 3.5 9.4 3.1 12.3-.8 45.3-62.6 40.5-150.1-15.9-206.4z", + ], + }, + Ml = { + prefix: "fas", + iconName: "place-of-worship", + icon: [ + 640, + 512, + [], + "f67f", + "M620.61 366.55L512 320v192h112c8.84 0 16-7.16 16-16V395.96a32 32 0 0 0-19.39-29.41zM0 395.96V496c0 8.84 7.16 16 16 16h112V320L19.39 366.55A32 32 0 0 0 0 395.96zm464.46-149.28L416 217.6V102.63c0-8.49-3.37-16.62-9.38-22.63L331.31 4.69c-6.25-6.25-16.38-6.25-22.62 0L233.38 80c-6 6-9.38 14.14-9.38 22.63V217.6l-48.46 29.08A31.997 31.997 0 0 0 160 274.12V512h96v-96c0-35.35 28.66-64 64-64s64 28.65 64 64v96h96V274.12c0-11.24-5.9-21.66-15.54-27.44z", + ], + }, + Al = { + prefix: "fas", + iconName: "plane", + icon: [ + 576, + 512, + [], + "f072", + "M480 192H365.71L260.61 8.06A16.014 16.014 0 0 0 246.71 0h-65.5c-10.63 0-18.3 10.17-15.38 20.39L214.86 192H112l-43.2-57.6c-3.02-4.03-7.77-6.4-12.8-6.4H16.01C5.6 128-2.04 137.78.49 147.88L32 256 .49 364.12C-2.04 374.22 5.6 384 16.01 384H56c5.04 0 9.78-2.37 12.8-6.4L112 320h102.86l-49.03 171.6c-2.92 10.22 4.75 20.4 15.38 20.4h65.5c5.74 0 11.04-3.08 13.89-8.06L365.71 320H480c35.35 0 96-28.65 96-64s-60.65-64-96-64z", + ], + }, + Il = { + prefix: "fas", + iconName: "plane-arrival", + icon: [ + 640, + 512, + [], + "f5af", + "M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM44.81 205.66l88.74 80a62.607 62.607 0 0 0 25.47 13.93l287.6 78.35c26.48 7.21 54.56 8.72 81 1.36 29.67-8.27 43.44-21.21 47.25-35.71 3.83-14.5-1.73-32.71-23.37-54.96-19.28-19.82-44.35-32.79-70.83-40l-97.51-26.56L282.8 30.22c-1.51-5.81-5.95-10.35-11.66-11.91L206.05.58c-10.56-2.88-20.9 5.32-20.71 16.44l47.92 164.21-102.2-27.84-27.59-67.88c-1.93-4.89-6.01-8.57-11.02-9.93L52.72 64.75c-10.34-2.82-20.53 5-20.72 15.88l.23 101.78c.19 8.91 6.03 17.34 12.58 23.25z", + ], + }, + Dl = { + prefix: "fas", + iconName: "plane-departure", + icon: [ + 640, + 512, + [], + "f5b0", + "M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM80.55 341.27c6.28 6.84 15.1 10.72 24.33 10.71l130.54-.18a65.62 65.62 0 0 0 29.64-7.12l290.96-147.65c26.74-13.57 50.71-32.94 67.02-58.31 18.31-28.48 20.3-49.09 13.07-63.65-7.21-14.57-24.74-25.27-58.25-27.45-29.85-1.94-59.54 5.92-86.28 19.48l-98.51 49.99-218.7-82.06a17.799 17.799 0 0 0-18-1.11L90.62 67.29c-10.67 5.41-13.25 19.65-5.17 28.53l156.22 98.1-103.21 52.38-72.35-36.47a17.804 17.804 0 0 0-16.07.02L9.91 230.22c-10.44 5.3-13.19 19.12-5.57 28.08l76.21 82.97z", + ], + }, + Rl = { prefix: "fas", iconName: "play", icon: [448, 512, [], "f04b", "M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"] }, + wl = { + prefix: "fas", + iconName: "play-circle", + icon: [ + 512, + 512, + [], + "f144", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z", + ], + }, + Ll = { + prefix: "fas", + iconName: "plug", + icon: [ + 384, + 512, + [], + "f1e6", + "M256 144V32c0-17.673 14.327-32 32-32s32 14.327 32 32v112h-64zm112 16H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h16v32c0 77.406 54.969 141.971 128 156.796V512h64v-99.204c73.031-14.825 128-79.39 128-156.796v-32h16c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm-240-16V32c0-17.673-14.327-32-32-32S64 14.327 64 32v112h64z", + ], + }, + Fl = { + prefix: "fas", + iconName: "plus", + icon: [ + 448, + 512, + [], + "f067", + "M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z", + ], + }, + Nl = { + prefix: "fas", + iconName: "plus-circle", + icon: [ + 512, + 512, + [], + "f055", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z", + ], + }, + kl = { + prefix: "fas", + iconName: "plus-square", + icon: [ + 448, + 512, + [], + "f0fe", + "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-32 252c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92H92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z", + ], + }, + zl = { + prefix: "fas", + iconName: "podcast", + icon: [ + 448, + 512, + [], + "f2ce", + "M267.429 488.563C262.286 507.573 242.858 512 224 512c-18.857 0-38.286-4.427-43.428-23.437C172.927 460.134 160 388.898 160 355.75c0-35.156 31.142-43.75 64-43.75s64 8.594 64 43.75c0 32.949-12.871 104.179-20.571 132.813zM156.867 288.554c-18.693-18.308-29.958-44.173-28.784-72.599 2.054-49.724 42.395-89.956 92.124-91.881C274.862 121.958 320 165.807 320 220c0 26.827-11.064 51.116-28.866 68.552-2.675 2.62-2.401 6.986.628 9.187 9.312 6.765 16.46 15.343 21.234 25.363 1.741 3.654 6.497 4.66 9.449 1.891 28.826-27.043 46.553-65.783 45.511-108.565-1.855-76.206-63.595-138.208-139.793-140.369C146.869 73.753 80 139.215 80 220c0 41.361 17.532 78.7 45.55 104.989 2.953 2.771 7.711 1.77 9.453-1.887 4.774-10.021 11.923-18.598 21.235-25.363 3.029-2.2 3.304-6.566.629-9.185zM224 0C100.204 0 0 100.185 0 224c0 89.992 52.602 165.647 125.739 201.408 4.333 2.118 9.267-1.544 8.535-6.31-2.382-15.512-4.342-30.946-5.406-44.339-.146-1.836-1.149-3.486-2.678-4.512-47.4-31.806-78.564-86.016-78.187-147.347.592-96.237 79.29-174.648 175.529-174.899C320.793 47.747 400 126.797 400 224c0 61.932-32.158 116.49-80.65 147.867-.999 14.037-3.069 30.588-5.624 47.23-.732 4.767 4.203 8.429 8.535 6.31C395.227 389.727 448 314.187 448 224 448 100.205 347.815 0 224 0zm0 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64z", + ], + }, + jl = { + prefix: "fas", + iconName: "poll", + icon: [ + 448, + 512, + [], + "f681", + "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM160 368c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V240c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v128zm96 0c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16V144c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v224zm96 0c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-64c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v64z", + ], + }, + Bl = { + prefix: "fas", + iconName: "poll-h", + icon: [ + 448, + 512, + [], + "f682", + "M448 432V80c0-26.5-21.5-48-48-48H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48zM112 192c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h128c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16H112zm0 96c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h224c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16H112zm0 96c-8.84 0-16-7.16-16-16v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-64z", + ], + }, + Vl = { + prefix: "fas", + iconName: "poo", + icon: [ + 512, + 512, + [], + "f2fe", + "M451.4 369.1C468.7 356 480 335.4 480 312c0-39.8-32.2-72-72-72h-14.1c13.4-11.7 22.1-28.8 22.1-48 0-35.3-28.7-64-64-64h-5.9c3.6-10.1 5.9-20.7 5.9-32 0-53-43-96-96-96-5.2 0-10.2.7-15.1 1.5C250.3 14.6 256 30.6 256 48c0 44.2-35.8 80-80 80h-16c-35.3 0-64 28.7-64 64 0 19.2 8.7 36.3 22.1 48H104c-39.8 0-72 32.2-72 72 0 23.4 11.3 44 28.6 57.1C26.3 374.6 0 404.1 0 440c0 39.8 32.2 72 72 72h368c39.8 0 72-32.2 72-72 0-35.9-26.3-65.4-60.6-70.9zM192 256c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm159.5 139C341 422.9 293 448 256 448s-85-25.1-95.5-53c-2-5.3 2-11 7.8-11h175.4c5.8 0 9.8 5.7 7.8 11zM320 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + Gl = { + prefix: "fas", + iconName: "poop", + icon: [ + 512, + 512, + [], + "f619", + "M451.36 369.14C468.66 355.99 480 335.41 480 312c0-39.77-32.24-72-72-72h-14.07c13.42-11.73 22.07-28.78 22.07-48 0-35.35-28.65-64-64-64h-5.88c3.57-10.05 5.88-20.72 5.88-32 0-53.02-42.98-96-96-96-5.17 0-10.15.74-15.11 1.52C250.31 14.64 256 30.62 256 48c0 44.18-35.82 80-80 80h-16c-35.35 0-64 28.65-64 64 0 19.22 8.65 36.27 22.07 48H104c-39.76 0-72 32.23-72 72 0 23.41 11.34 43.99 28.64 57.14C26.31 374.62 0 404.12 0 440c0 39.76 32.24 72 72 72h368c39.76 0 72-32.24 72-72 0-35.88-26.31-65.38-60.64-70.86z", + ], + }, + Ul = { + prefix: "fas", + iconName: "portrait", + icon: [ + 384, + 512, + [], + "f3e0", + "M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM192 128c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H102.4C90 384 80 375.4 80 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z", + ], + }, + Hl = { + prefix: "fas", + iconName: "pound-sign", + icon: [ + 320, + 512, + [], + "f154", + "M308 352h-45.495c-6.627 0-12 5.373-12 12v50.848H128V288h84c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-84v-63.556c0-32.266 24.562-57.086 61.792-57.086 23.658 0 45.878 11.505 57.652 18.849 5.151 3.213 11.888 2.051 15.688-2.685l28.493-35.513c4.233-5.276 3.279-13.005-2.119-17.081C273.124 54.56 236.576 32 187.931 32 106.026 32 48 84.742 48 157.961V224H20c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h28v128H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h296c6.627 0 12-5.373 12-12V364c0-6.627-5.373-12-12-12z", + ], + }, + Wl = { + prefix: "fas", + iconName: "power-off", + icon: [ + 512, + 512, + [], + "f011", + "M400 54.1c63 45 104 118.6 104 201.9 0 136.8-110.8 247.7-247.5 248C120 504.3 8.2 393 8 256.4 7.9 173.1 48.9 99.3 111.8 54.2c11.7-8.3 28-4.8 35 7.7L162.6 90c5.9 10.5 3.1 23.8-6.6 31-41.5 30.8-68 79.6-68 134.9-.1 92.3 74.5 168.1 168 168.1 91.6 0 168.6-74.2 168-169.1-.3-51.8-24.7-101.8-68.1-134-9.7-7.2-12.4-20.5-6.5-30.9l15.8-28.1c7-12.4 23.2-16.1 34.8-7.8zM296 264V24c0-13.3-10.7-24-24-24h-32c-13.3 0-24 10.7-24 24v240c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24z", + ], + }, + Xl = { + prefix: "fas", + iconName: "pray", + icon: [ + 384, + 512, + [], + "f683", + "M256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-30.63 169.75c14.06 16.72 39 19.09 55.97 5.22l88-72.02c17.09-13.98 19.59-39.19 5.62-56.28-13.97-17.11-39.19-19.59-56.31-5.62l-57.44 47-38.91-46.31c-15.44-18.39-39.22-27.92-64-25.33-24.19 2.48-45.25 16.27-56.37 36.92l-49.37 92.03c-23.4 43.64-8.69 96.37 34.19 123.75L131.56 432H40c-22.09 0-40 17.91-40 40s17.91 40 40 40h208c34.08 0 53.77-42.79 28.28-68.28L166.42 333.86l34.8-64.87 24.15 28.76z", + ], + }, + Yl = { + prefix: "fas", + iconName: "praying-hands", + icon: [ + 640, + 512, + [], + "f684", + "M272 191.91c-17.6 0-32 14.4-32 32v80c0 8.84-7.16 16-16 16s-16-7.16-16-16v-76.55c0-17.39 4.72-34.47 13.69-49.39l77.75-129.59c9.09-15.16 4.19-34.81-10.97-43.91-14.45-8.67-32.72-4.3-42.3 9.21-.2.23-.62.21-.79.48l-117.26 175.9C117.56 205.9 112 224.31 112 243.29v80.23l-90.12 30.04A31.974 31.974 0 0 0 0 383.91v96c0 10.82 8.52 32 32 32 2.69 0 5.41-.34 8.06-1.03l179.19-46.62C269.16 449.99 304 403.8 304 351.91v-128c0-17.6-14.4-32-32-32zm346.12 161.73L528 323.6v-80.23c0-18.98-5.56-37.39-16.12-53.23L394.62 14.25c-.18-.27-.59-.24-.79-.48-9.58-13.51-27.85-17.88-42.3-9.21-15.16 9.09-20.06 28.75-10.97 43.91l77.75 129.59c8.97 14.92 13.69 32 13.69 49.39V304c0 8.84-7.16 16-16 16s-16-7.16-16-16v-80c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 51.89 34.84 98.08 84.75 112.34l179.19 46.62c2.66.69 5.38 1.03 8.06 1.03 23.48 0 32-21.18 32-32v-96c0-13.77-8.81-25.99-21.88-30.35z", + ], + }, + Kl = { + prefix: "fas", + iconName: "prescription", + icon: [ + 384, + 512, + [], + "f5b1", + "M301.26 352l78.06-78.06c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0L256 306.74l-83.96-83.96C219.31 216.8 256 176.89 256 128c0-53.02-42.98-96-96-96H16C7.16 32 0 39.16 0 48v256c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-80h18.75l128 128-78.06 78.06c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0L256 397.25l78.06 78.06c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63L301.26 352zM64 96h96c17.64 0 32 14.36 32 32s-14.36 32-32 32H64V96z", + ], + }, + Zl = { + prefix: "fas", + iconName: "prescription-bottle", + icon: [ + 384, + 512, + [], + "f485", + "M32 192h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64h120c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H32v64c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32V128H32v64zM360 0H24C10.8 0 0 10.8 0 24v48c0 13.2 10.8 24 24 24h336c13.2 0 24-10.8 24-24V24c0-13.2-10.8-24-24-24z", + ], + }, + ql = { + prefix: "fas", + iconName: "prescription-bottle-alt", + icon: [ + 384, + 512, + [], + "f486", + "M360 0H24C10.8 0 0 10.8 0 24v48c0 13.2 10.8 24 24 24h336c13.2 0 24-10.8 24-24V24c0-13.2-10.8-24-24-24zM32 480c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32V128H32v352zm64-184c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48z", + ], + }, + Ql = { + prefix: "fas", + iconName: "print", + icon: [ + 512, + 512, + [], + "f02f", + "M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z", + ], + }, + Jl = { + prefix: "fas", + iconName: "procedures", + icon: [ + 640, + 512, + [], + "f487", + "M528 224H272c-8.8 0-16 7.2-16 16v144H64V144c0-8.8-7.2-16-16-16H16c-8.8 0-16 7.2-16 16v352c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48h512v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V336c0-61.9-50.1-112-112-112zM136 96h126.1l27.6 55.2c5.9 11.8 22.7 11.8 28.6 0L368 51.8 390.1 96H512c8.8 0 16-7.2 16-16s-7.2-16-16-16H409.9L382.3 8.8C376.4-3 359.6-3 353.7 8.8L304 108.2l-19.9-39.8c-1.4-2.7-4.1-4.4-7.2-4.4H136c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm24 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64z", + ], + }, + $l = { + prefix: "fas", + iconName: "project-diagram", + icon: [ + 640, + 512, + [], + "f542", + "M384 320H256c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32zM192 32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v128c0 17.67 14.33 32 32 32h95.72l73.16 128.04C211.98 300.98 232.4 288 256 288h.28L192 175.51V128h224V64H192V32zM608 0H480c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32z", + ], + }, + eu = { + prefix: "fas", + iconName: "puzzle-piece", + icon: [ + 576, + 512, + [], + "f12e", + "M519.442 288.651c-41.519 0-59.5 31.593-82.058 31.593C377.409 320.244 432 144 432 144s-196.288 80-196.288-3.297c0-35.827 36.288-46.25 36.288-85.985C272 19.216 243.885 0 210.539 0c-34.654 0-66.366 18.891-66.366 56.346 0 41.364 31.711 59.277 31.711 81.75C175.885 207.719 0 166.758 0 166.758v333.237s178.635 41.047 178.635-28.662c0-22.473-40-40.107-40-81.471 0-37.456 29.25-56.346 63.577-56.346 33.673 0 61.788 19.216 61.788 54.717 0 39.735-36.288 50.158-36.288 85.985 0 60.803 129.675 25.73 181.23 25.73 0 0-34.725-120.101 25.827-120.101 35.962 0 46.423 36.152 86.308 36.152C556.712 416 576 387.99 576 354.443c0-34.199-18.962-65.792-56.558-65.792z", + ], + }, + tu = { + prefix: "fas", + iconName: "qrcode", + icon: [ + 448, + 512, + [], + "f029", + "M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z", + ], + }, + nu = { + prefix: "fas", + iconName: "question", + icon: [ + 384, + 512, + [], + "f128", + "M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z", + ], + }, + iu = { + prefix: "fas", + iconName: "question-circle", + icon: [ + 512, + 512, + [], + "f059", + "M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z", + ], + }, + ru = { + prefix: "fas", + iconName: "quidditch", + icon: [ + 640, + 512, + [], + "f458", + "M256.5 216.8L343.2 326s-16.6 102.4-76.6 150.1C206.7 523.8 0 510.2 0 510.2s3.8-23.1 11-55.4l94.6-112.2c4-4.7-.9-11.6-6.6-9.5l-60.4 22.1c14.4-41.7 32.7-80 54.6-97.5 59.9-47.8 163.3-40.9 163.3-40.9zm238 135c-44 0-79.8 35.8-79.8 79.9 0 44.1 35.7 79.9 79.8 79.9 44.1 0 79.8-35.8 79.8-79.9 0-44.2-35.8-79.9-79.8-79.9zM636.5 31L616.7 6c-5.5-6.9-15.5-8-22.4-2.6L361.8 181.3l-34.1-43c-5.1-6.4-15.1-5.2-18.6 2.2l-25.3 54.6 86.7 109.2 58.8-12.4c8-1.7 11.4-11.2 6.3-17.6l-34.1-42.9L634 53.5c6.9-5.5 8-15.6 2.5-22.5z", + ], + }, + ou = { + prefix: "fas", + iconName: "quote-left", + icon: [ + 512, + 512, + [], + "f10d", + "M464 256h-80v-64c0-35.3 28.7-64 64-64h8c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24h-8c-88.4 0-160 71.6-160 160v240c0 26.5 21.5 48 48 48h128c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48zm-288 0H96v-64c0-35.3 28.7-64 64-64h8c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24h-8C71.6 32 0 103.6 0 192v240c0 26.5 21.5 48 48 48h128c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z", + ], + }, + au = { + prefix: "fas", + iconName: "quote-right", + icon: [ + 512, + 512, + [], + "f10e", + "M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z", + ], + }, + su = { + prefix: "fas", + iconName: "quran", + icon: [ + 448, + 512, + [], + "f687", + "M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM301.08 145.82c.6-1.21 1.76-1.82 2.92-1.82s2.32.61 2.92 1.82l11.18 22.65 25 3.63c2.67.39 3.74 3.67 1.81 5.56l-18.09 17.63 4.27 24.89c.36 2.11-1.31 3.82-3.21 3.82-.5 0-1.02-.12-1.52-.38L304 211.87l-22.36 11.75c-.5.26-1.02.38-1.52.38-1.9 0-3.57-1.71-3.21-3.82l4.27-24.89-18.09-17.63c-1.94-1.89-.87-5.17 1.81-5.56l24.99-3.63 11.19-22.65zm-57.89-69.01c13.67 0 27.26 2.49 40.38 7.41a6.775 6.775 0 1 1-2.38 13.12c-.67 0-3.09-.21-4.13-.21-52.31 0-94.86 42.55-94.86 94.86 0 52.3 42.55 94.86 94.86 94.86 1.03 0 3.48-.21 4.13-.21 3.93 0 6.8 3.14 6.8 6.78 0 2.98-1.94 5.51-4.62 6.42-13.07 4.87-26.59 7.34-40.19 7.34C179.67 307.19 128 255.51 128 192c0-63.52 51.67-115.19 115.19-115.19zM380.8 448H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z", + ], + }, + cu = { + prefix: "fas", + iconName: "random", + icon: [ + 512, + 512, + [], + "f074", + "M504.971 359.029c9.373 9.373 9.373 24.569 0 33.941l-80 79.984c-15.01 15.01-40.971 4.49-40.971-16.971V416h-58.785a12.004 12.004 0 0 1-8.773-3.812l-70.556-75.596 53.333-57.143L352 336h32v-39.981c0-21.438 25.943-31.998 40.971-16.971l80 79.981zM12 176h84l52.781 56.551 53.333-57.143-70.556-75.596A11.999 11.999 0 0 0 122.785 96H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12zm372 0v39.984c0 21.46 25.961 31.98 40.971 16.971l80-79.984c9.373-9.373 9.373-24.569 0-33.941l-80-79.981C409.943 24.021 384 34.582 384 56.019V96h-58.785a12.004 12.004 0 0 0-8.773 3.812L96 336H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h110.785c3.326 0 6.503-1.381 8.773-3.812L352 176h32z", + ], + }, + lu = { + prefix: "fas", + iconName: "receipt", + icon: [ + 384, + 512, + [], + "f543", + "M358.4 3.2L320 48 265.6 3.2a15.9 15.9 0 0 0-19.2 0L192 48 137.6 3.2a15.9 15.9 0 0 0-19.2 0L64 48 25.6 3.2C15-4.7 0 2.8 0 16v480c0 13.2 15 20.7 25.6 12.8L64 464l54.4 44.8a15.9 15.9 0 0 0 19.2 0L192 464l54.4 44.8a15.9 15.9 0 0 0 19.2 0L320 464l38.4 44.8c10.5 7.9 25.6.4 25.6-12.8V16c0-13.2-15-20.7-25.6-12.8zM320 360c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H72c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h240c4.4 0 8 3.6 8 8v16z", + ], + }, + uu = { + prefix: "fas", + iconName: "recycle", + icon: [ + 512, + 512, + [], + "f1b8", + "M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z", + ], + }, + hu = { + prefix: "fas", + iconName: "redo", + icon: [ + 512, + 512, + [], + "f01e", + "M500.333 0h-47.411c-6.853 0-12.314 5.729-11.986 12.574l3.966 82.759C399.416 41.899 331.672 8 256.001 8 119.34 8 7.899 119.526 8 256.187 8.101 393.068 119.096 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-33.971-33.971c-4.466-4.466-11.64-4.717-16.38-.543C341.308 415.448 300.606 432 256 432c-97.267 0-176-78.716-176-176 0-97.267 78.716-176 176-176 60.892 0 114.506 30.858 146.099 77.8l-101.525-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12z", + ], + }, + du = { + prefix: "fas", + iconName: "redo-alt", + icon: [ + 512, + 512, + [], + "f2f9", + "M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z", + ], + }, + pu = { + prefix: "fas", + iconName: "registered", + icon: [ + 512, + 512, + [], + "f25d", + "M285.363 207.475c0 18.6-9.831 28.431-28.431 28.431h-29.876v-56.14h23.378c28.668 0 34.929 8.773 34.929 27.709zM504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM363.411 360.414c-46.729-84.825-43.299-78.636-44.702-80.98 23.432-15.172 37.945-42.979 37.945-74.486 0-54.244-31.5-89.252-105.498-89.252h-70.667c-13.255 0-24 10.745-24 24V372c0 13.255 10.745 24 24 24h22.567c13.255 0 24-10.745 24-24v-71.663h25.556l44.129 82.937a24.001 24.001 0 0 0 21.188 12.727h24.464c18.261-.001 29.829-19.591 21.018-35.587z", + ], + }, + fu = { + prefix: "fas", + iconName: "reply", + icon: [ + 512, + 512, + [], + "f3e5", + "M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z", + ], + }, + mu = { + prefix: "fas", + iconName: "reply-all", + icon: [ + 576, + 512, + [], + "f122", + "M136.309 189.836L312.313 37.851C327.72 24.546 352 35.348 352 56.015v82.763c129.182 10.231 224 52.212 224 183.548 0 61.441-39.582 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 38.512-123.162-3.922-169.482-112.59-182.015v84.175c0 20.701-24.3 31.453-39.687 18.164L136.309 226.164c-11.071-9.561-11.086-26.753 0-36.328zm-128 36.328L184.313 378.15C199.7 391.439 224 380.687 224 359.986v-15.818l-108.606-93.785A55.96 55.96 0 0 1 96 207.998a55.953 55.953 0 0 1 19.393-42.38L224 71.832V56.015c0-20.667-24.28-31.469-39.687-18.164L8.309 189.836c-11.086 9.575-11.071 26.767 0 36.328z", + ], + }, + gu = { + prefix: "fas", + iconName: "retweet", + icon: [ + 640, + 512, + [], + "f079", + "M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z", + ], + }, + bu = { + prefix: "fas", + iconName: "ribbon", + icon: [ + 448, + 512, + [], + "f4d6", + "M6.1 444.3c-9.6 10.8-7.5 27.6 4.5 35.7l68.8 27.9c9.9 6.7 23.3 5 31.3-3.8l91.8-101.9-79.2-87.9-117.2 130zm435.8 0s-292-324.6-295.4-330.1c15.4-8.4 40.2-17.9 77.5-17.9s62.1 9.5 77.5 17.9c-3.3 5.6-56 64.6-56 64.6l79.1 87.7 34.2-38c28.7-31.9 33.3-78.6 11.4-115.5l-43.7-73.5c-4.3-7.2-9.9-13.3-16.8-18-40.7-27.6-127.4-29.7-171.4 0-6.9 4.7-12.5 10.8-16.8 18l-43.6 73.2c-1.5 2.5-37.1 62.2 11.5 116L337.5 504c8 8.9 21.4 10.5 31.3 3.8l68.8-27.9c11.9-8 14-24.8 4.3-35.6z", + ], + }, + _u = { + prefix: "fas", + iconName: "ring", + icon: [ + 512, + 512, + [], + "f70b", + "M256 64C110.06 64 0 125.91 0 208v98.13C0 384.48 114.62 448 256 448s256-63.52 256-141.87V208c0-82.09-110.06-144-256-144zm0 64c106.04 0 192 35.82 192 80 0 9.26-3.97 18.12-10.91 26.39C392.15 208.21 328.23 192 256 192s-136.15 16.21-181.09 42.39C67.97 226.12 64 217.26 64 208c0-44.18 85.96-80 192-80zM120.43 264.64C155.04 249.93 201.64 240 256 240s100.96 9.93 135.57 24.64C356.84 279.07 308.93 288 256 288s-100.84-8.93-135.57-23.36z", + ], + }, + vu = { + prefix: "fas", + iconName: "road", + icon: [ + 576, + 512, + [], + "f018", + "M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z", + ], + }, + yu = { + prefix: "fas", + iconName: "robot", + icon: [ + 640, + 512, + [], + "f544", + "M0 256v128c0 17.7 14.3 32 32 32h32V224H32c-17.7 0-32 14.3-32 32zM464 96H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H176c-44.2 0-80 35.8-80 80v272c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V176c0-44.2-35.8-80-80-80zM256 416h-64v-32h64v32zm-32-120c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm128 120h-64v-32h64v32zm96 0h-64v-32h64v32zm-32-120c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm192-72h-32v192h32c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32z", + ], + }, + Cu = { + prefix: "fas", + iconName: "rocket", + icon: [ + 512, + 512, + [], + "f135", + "M505.1 19.1C503.8 13 499 8.2 492.9 6.9 460.7 0 435.5 0 410.4 0 307.2 0 245.3 55.2 199.1 128H94.9c-18.2 0-34.8 10.3-42.9 26.5L2.6 253.3c-8 16 3.6 34.7 21.5 34.7h95.1c-5.9 12.8-11.9 25.5-18 37.7-3.1 6.2-1.9 13.6 3 18.5l63.6 63.6c4.9 4.9 12.3 6.1 18.5 3 12.2-6.1 24.9-12 37.7-17.9V488c0 17.8 18.8 29.4 34.7 21.5l98.7-49.4c16.3-8.1 26.5-24.8 26.5-42.9V312.8c72.6-46.3 128-108.4 128-211.1.1-25.2.1-50.4-6.8-82.6zM400 160c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z", + ], + }, + Pu = { + prefix: "fas", + iconName: "route", + icon: [ + 512, + 512, + [], + "f4d7", + "M416 320h-96c-17.6 0-32-14.4-32-32s14.4-32 32-32h96s96-107 96-160-43-96-96-96-96 43-96 96c0 25.5 22.2 63.4 45.3 96H320c-52.9 0-96 43.1-96 96s43.1 96 96 96h96c17.6 0 32 14.4 32 32s-14.4 32-32 32H185.5c-16 24.8-33.8 47.7-47.3 64H416c52.9 0 96-43.1 96-96s-43.1-96-96-96zm0-256c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM96 256c-53 0-96 43-96 96s96 160 96 160 96-107 96-160-43-96-96-96zm0 128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + xu = { + prefix: "fas", + iconName: "rss", + icon: [ + 448, + 512, + [], + "f09e", + "M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z", + ], + }, + Tu = { + prefix: "fas", + iconName: "rss-square", + icon: [ + 448, + 512, + [], + "f143", + "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM112 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.027 0h-34.334c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.44c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z", + ], + }, + Su = { + prefix: "fas", + iconName: "ruble-sign", + icon: [ + 384, + 512, + [], + "f158", + "M239.36 320C324.48 320 384 260.542 384 175.071S324.48 32 239.36 32H76c-6.627 0-12 5.373-12 12v206.632H12c-6.627 0-12 5.373-12 12V308c0 6.627 5.373 12 12 12h52v32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h52v52c0 6.627 5.373 12 12 12h58.56c6.627 0 12-5.373 12-12v-52H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H146.56v-32h92.8zm-92.8-219.252h78.72c46.72 0 74.88 29.11 74.88 74.323 0 45.832-28.16 75.561-76.16 75.561h-77.44V100.748z", + ], + }, + Ou = { + prefix: "fas", + iconName: "ruler", + icon: [ + 640, + 512, + [], + "f545", + "M635.7 167.2L556.1 31.7c-8.8-15-28.3-20.1-43.5-11.5l-69 39.1L503.3 161c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L416 75l-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L333.2 122 278 153.3 337.8 255c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-59.7-101.7-55.2 31.3 27.9 47.4c2.2 3.8.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9l-27.9-47.5-55.2 31.3 59.7 101.7c2.2 3.7.9 8.5-2.9 10.7l-13.8 7.8c-3.8 2.2-8.7.9-10.9-2.9L84.9 262.9l-69 39.1C.7 310.7-4.6 329.8 4.2 344.8l79.6 135.6c8.8 15 28.3 20.1 43.5 11.5L624.1 210c15.2-8.6 20.4-27.8 11.6-42.8z", + ], + }, + Eu = { + prefix: "fas", + iconName: "ruler-combined", + icon: [ + 512, + 512, + [], + "f546", + "M160 288h-56c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h56v-64h-56c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h56V96h-56c-4.42 0-8-3.58-8-8V72c0-4.42 3.58-8 8-8h56V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v448c0 2.77.91 5.24 1.57 7.8L160 329.38V288zm320 64h-32v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-64v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-64v56c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-56h-41.37L24.2 510.43c2.56.66 5.04 1.57 7.8 1.57h448c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z", + ], + }, + Mu = { + prefix: "fas", + iconName: "ruler-horizontal", + icon: [ + 576, + 512, + [], + "f547", + "M544 128h-48v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8h-16c-4.42 0-8-3.58-8-8v-88h-64v88c0 4.42-3.58 8-8 8H88c-4.42 0-8-3.58-8-8v-88H32c-17.67 0-32 14.33-32 32v192c0 17.67 14.33 32 32 32h512c17.67 0 32-14.33 32-32V160c0-17.67-14.33-32-32-32z", + ], + }, + Au = { + prefix: "fas", + iconName: "ruler-vertical", + icon: [ + 256, + 512, + [], + "f548", + "M168 416c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88v-64h-88c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h88V32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v448c0 17.67 14.33 32 32 32h192c17.67 0 32-14.33 32-32v-64h-88z", + ], + }, + Iu = { + prefix: "fas", + iconName: "running", + icon: [ + 416, + 512, + [], + "f70c", + "M272 96c26.51 0 48-21.49 48-48S298.51 0 272 0s-48 21.49-48 48 21.49 48 48 48zM113.69 317.47l-14.8 34.52H32c-17.67 0-32 14.33-32 32s14.33 32 32 32h77.45c19.25 0 36.58-11.44 44.11-29.09l8.79-20.52-10.67-6.3c-17.32-10.23-30.06-25.37-37.99-42.61zM384 223.99h-44.03l-26.06-53.25c-12.5-25.55-35.45-44.23-61.78-50.94l-71.08-21.14c-28.3-6.8-57.77-.55-80.84 17.14l-39.67 30.41c-14.03 10.75-16.69 30.83-5.92 44.86s30.84 16.66 44.86 5.92l39.69-30.41c7.67-5.89 17.44-8 25.27-6.14l14.7 4.37-37.46 87.39c-12.62 29.48-1.31 64.01 26.3 80.31l84.98 50.17-27.47 87.73c-5.28 16.86 4.11 34.81 20.97 40.09 3.19 1 6.41 1.48 9.58 1.48 13.61 0 26.23-8.77 30.52-22.45l31.64-101.06c5.91-20.77-2.89-43.08-21.64-54.39l-61.24-36.14 31.31-78.28 20.27 41.43c8 16.34 24.92 26.89 43.11 26.89H384c17.67 0 32-14.33 32-32s-14.33-31.99-32-31.99z", + ], + }, + Du = { + prefix: "fas", + iconName: "rupee-sign", + icon: [ + 320, + 512, + [], + "f156", + "M308 96c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v44.748c0 6.627 5.373 12 12 12h85.28c27.308 0 48.261 9.958 60.97 27.252H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h158.757c-6.217 36.086-32.961 58.632-74.757 58.632H12c-6.627 0-12 5.373-12 12v53.012c0 3.349 1.4 6.546 3.861 8.818l165.052 152.356a12.001 12.001 0 0 0 8.139 3.182h82.562c10.924 0 16.166-13.408 8.139-20.818L116.871 319.906c76.499-2.34 131.144-53.395 138.318-127.906H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-58.69c-3.486-11.541-8.28-22.246-14.252-32H308z", + ], + }, + Ru = { + prefix: "fas", + iconName: "sad-cry", + icon: [ + 496, + 512, + [], + "f5b3", + "M248 8C111 8 0 119 0 256c0 90.1 48.2 168.7 120 212.1V288c0-8.8 7.2-16 16-16s16 7.2 16 16v196.7c29.5 12.4 62 19.3 96 19.3s66.5-6.9 96-19.3V288c0-8.8 7.2-16 16-16s16 7.2 16 16v180.1C447.8 424.7 496 346 496 256 496 119 385 8 248 8zm-65.5 216.5c-14.8-13.2-46.2-13.2-61 0L112 233c-3.8 3.3-9.3 4-13.7 1.6-4.4-2.4-6.9-7.4-6.1-12.4 4-25.2 34.2-42.1 59.9-42.1S208 197 212 222.2c.8 5-1.7 10-6.1 12.4-5.8 3.1-11.2.7-13.7-1.6l-9.7-8.5zM248 416c-26.5 0-48-28.7-48-64s21.5-64 48-64 48 28.7 48 64-21.5 64-48 64zm149.8-181.5c-5.8 3.1-11.2.7-13.7-1.6l-9.5-8.5c-14.8-13.2-46.2-13.2-61 0L304 233c-3.8 3.3-9.3 4-13.7 1.6-4.4-2.4-6.9-7.4-6.1-12.4 4-25.2 34.2-42.1 59.9-42.1S400 197 404 222.2c.6 4.9-1.8 9.9-6.2 12.3z", + ], + }, + wu = { + prefix: "fas", + iconName: "sad-tear", + icon: [ + 496, + 512, + [], + "f5b4", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z", + ], + }, + Lu = { + prefix: "fas", + iconName: "save", + icon: [ + 448, + 512, + [], + "f0c7", + "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z", + ], + }, + Fu = { + prefix: "fas", + iconName: "school", + icon: [ + 640, + 512, + [], + "f549", + "M0 224v272c0 8.84 7.16 16 16 16h80V192H32c-17.67 0-32 14.33-32 32zm360-48h-24v-40c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v64c0 4.42 3.58 8 8 8h48c4.42 0 8-3.58 8-8v-16c0-4.42-3.58-8-8-8zm137.75-63.96l-160-106.67a32.02 32.02 0 0 0-35.5 0l-160 106.67A32.002 32.002 0 0 0 128 138.66V512h128V368c0-8.84 7.16-16 16-16h96c8.84 0 16 7.16 16 16v144h128V138.67c0-10.7-5.35-20.7-14.25-26.63zM320 256c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zm288-64h-64v320h80c8.84 0 16-7.16 16-16V224c0-17.67-14.33-32-32-32z", + ], + }, + Nu = { + prefix: "fas", + iconName: "screwdriver", + icon: [ + 512, + 512, + [], + "f54a", + "M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z", + ], + }, + ku = { + prefix: "fas", + iconName: "scroll", + icon: [ + 640, + 512, + [], + "f70e", + "M48 0C21.53 0 0 21.53 0 48v64c0 8.84 7.16 16 16 16h80V48C96 21.53 74.47 0 48 0zm208 412.57V352h288V96c0-52.94-43.06-96-96-96H111.59C121.74 13.41 128 29.92 128 48v368c0 38.87 34.65 69.65 74.75 63.12C234.22 474 256 444.46 256 412.57zM288 384v32c0 52.93-43.06 96-96 96h336c61.86 0 112-50.14 112-112 0-8.84-7.16-16-16-16H288z", + ], + }, + zu = { + prefix: "fas", + iconName: "search", + icon: [ + 512, + 512, + [], + "f002", + "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z", + ], + }, + ju = { + prefix: "fas", + iconName: "search-dollar", + icon: [ + 512, + 512, + [], + "f688", + "M505.04 442.66l-99.71-99.69c-4.5-4.5-10.6-7-17-7h-16.3c27.6-35.3 44-79.69 44-127.99C416.03 93.09 322.92 0 208.02 0S0 93.09 0 207.98s93.11 207.98 208.02 207.98c48.3 0 92.71-16.4 128.01-44v16.3c0 6.4 2.5 12.5 7 17l99.71 99.69c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.59.1-33.99zm-297.02-90.7c-79.54 0-144-64.34-144-143.98 0-79.53 64.35-143.98 144-143.98 79.54 0 144 64.34 144 143.98 0 79.53-64.35 143.98-144 143.98zm27.11-152.54l-45.01-13.5c-5.16-1.55-8.77-6.78-8.77-12.73 0-7.27 5.3-13.19 11.8-13.19h28.11c4.56 0 8.96 1.29 12.82 3.72 3.24 2.03 7.36 1.91 10.13-.73l11.75-11.21c3.53-3.37 3.33-9.21-.57-12.14-9.1-6.83-20.08-10.77-31.37-11.35V112c0-4.42-3.58-8-8-8h-16c-4.42 0-8 3.58-8 8v16.12c-23.63.63-42.68 20.55-42.68 45.07 0 19.97 12.99 37.81 31.58 43.39l45.01 13.5c5.16 1.55 8.77 6.78 8.77 12.73 0 7.27-5.3 13.19-11.8 13.19h-28.1c-4.56 0-8.96-1.29-12.82-3.72-3.24-2.03-7.36-1.91-10.13.73l-11.75 11.21c-3.53 3.37-3.33 9.21.57 12.14 9.1 6.83 20.08 10.77 31.37 11.35V304c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-16.12c23.63-.63 42.68-20.54 42.68-45.07 0-19.97-12.99-37.81-31.59-43.39z", + ], + }, + Bu = { + prefix: "fas", + iconName: "search-location", + icon: [ + 512, + 512, + [], + "f689", + "M505.04 442.66l-99.71-99.69c-4.5-4.5-10.6-7-17-7h-16.3c27.6-35.3 44-79.69 44-127.99C416.03 93.09 322.92 0 208.02 0S0 93.09 0 207.98s93.11 207.98 208.02 207.98c48.3 0 92.71-16.4 128.01-44v16.3c0 6.4 2.5 12.5 7 17l99.71 99.69c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.59.1-33.99zm-297.02-90.7c-79.54 0-144-64.34-144-143.98 0-79.53 64.35-143.98 144-143.98 79.54 0 144 64.34 144 143.98 0 79.53-64.35 143.98-144 143.98zm.02-239.96c-40.78 0-73.84 33.05-73.84 73.83 0 32.96 48.26 93.05 66.75 114.86a9.24 9.24 0 0 0 14.18 0c18.49-21.81 66.75-81.89 66.75-114.86 0-40.78-33.06-73.83-73.84-73.83zm0 96c-13.26 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z", + ], + }, + Vu = { + prefix: "fas", + iconName: "search-minus", + icon: [ + 512, + 512, + [], + "f010", + "M304 192v32c0 6.6-5.4 12-12 12H124c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z", + ], + }, + Gu = { + prefix: "fas", + iconName: "search-plus", + icon: [ + 512, + 512, + [], + "f00e", + "M304 192v32c0 6.6-5.4 12-12 12h-56v56c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-56h-56c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h56v-56c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v56h56c6.6 0 12 5.4 12 12zm201 284.7L476.7 505c-9.4 9.4-24.6 9.4-33.9 0L343 405.3c-4.5-4.5-7-10.6-7-17V372c-35.3 27.6-79.7 44-128 44C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208c0 48.3-16.4 92.7-44 128h16.3c6.4 0 12.5 2.5 17 7l99.7 99.7c9.3 9.4 9.3 24.6 0 34zM344 208c0-75.2-60.8-136-136-136S72 132.8 72 208s60.8 136 136 136 136-60.8 136-136z", + ], + }, + Uu = { + prefix: "fas", + iconName: "seedling", + icon: [ + 512, + 512, + [], + "f4d8", + "M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z", + ], + }, + Hu = { + prefix: "fas", + iconName: "server", + icon: [ + 512, + 512, + [], + "f233", + "M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z", + ], + }, + Wu = { + prefix: "fas", + iconName: "shapes", + icon: [ + 512, + 512, + [], + "f61f", + "M512 320v160c0 17.67-14.33 32-32 32H320c-17.67 0-32-14.33-32-32V320c0-17.67 14.33-32 32-32h160c17.67 0 32 14.33 32 32zm-384-64C57.31 256 0 313.31 0 384s57.31 128 128 128 128-57.31 128-128-57.31-128-128-128zm351.03-32c25.34 0 41.18-26.67 28.51-48L412.51 16c-12.67-21.33-44.35-21.33-57.02 0l-95.03 160c-12.67 21.33 3.17 48 28.51 48h190.06z", + ], + }, + Xu = { + prefix: "fas", + iconName: "share", + icon: [ + 512, + 512, + [], + "f064", + "M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z", + ], + }, + Yu = { + prefix: "fas", + iconName: "share-alt", + icon: [ + 448, + 512, + [], + "f1e0", + "M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z", + ], + }, + Ku = { + prefix: "fas", + iconName: "share-alt-square", + icon: [ + 448, + 512, + [], + "f1e1", + "M448 80v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h352c26.51 0 48 21.49 48 48zM304 296c-14.562 0-27.823 5.561-37.783 14.671l-67.958-40.775a56.339 56.339 0 0 0 0-27.793l67.958-40.775C276.177 210.439 289.438 216 304 216c30.928 0 56-25.072 56-56s-25.072-56-56-56-56 25.072-56 56c0 4.797.605 9.453 1.74 13.897l-67.958 40.775C171.823 205.561 158.562 200 144 200c-30.928 0-56 25.072-56 56s25.072 56 56 56c14.562 0 27.823-5.561 37.783-14.671l67.958 40.775a56.088 56.088 0 0 0-1.74 13.897c0 30.928 25.072 56 56 56s56-25.072 56-56C360 321.072 334.928 296 304 296z", + ], + }, + Zu = { + prefix: "fas", + iconName: "share-square", + icon: [ + 576, + 512, + [], + "f14d", + "M568.482 177.448L424.479 313.433C409.3 327.768 384 317.14 384 295.985v-71.963c-144.575.97-205.566 35.113-164.775 171.353 4.483 14.973-12.846 26.567-25.006 17.33C155.252 383.105 120 326.488 120 269.339c0-143.937 117.599-172.5 264-173.312V24.012c0-21.174 25.317-31.768 40.479-17.448l144.003 135.988c10.02 9.463 10.028 25.425 0 34.896zM384 379.128V448H64V128h50.916a11.99 11.99 0 0 0 8.648-3.693c14.953-15.568 32.237-27.89 51.014-37.676C185.708 80.83 181.584 64 169.033 64H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48v-88.806c0-8.288-8.197-14.066-16.011-11.302a71.83 71.83 0 0 1-34.189 3.377c-7.27-1.046-13.8 4.514-13.8 11.859z", + ], + }, + qu = { + prefix: "fas", + iconName: "shekel-sign", + icon: [ + 448, + 512, + [], + "f20b", + "M248 168v168c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V168c0-75.11-60.89-136-136-136H24C10.75 32 0 42.74 0 56v408c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112h112c30.93 0 56 25.07 56 56zM432 32h-48c-8.84 0-16 7.16-16 16v296c0 30.93-25.07 56-56 56H200V176c0-8.84-7.16-16-16-16h-48c-8.84 0-16 7.16-16 16v280c0 13.25 10.75 24 24 24h168c75.11 0 136-60.89 136-136V48c0-8.84-7.16-16-16-16z", + ], + }, + Qu = { + prefix: "fas", + iconName: "shield-alt", + icon: [ + 512, + 512, + [], + "f3ed", + "M496 128c0 221.282-135.934 344.645-221.539 380.308a48 48 0 0 1-36.923 0C130.495 463.713 16 326.487 16 128a48 48 0 0 1 29.539-44.308l192-80a48 48 0 0 1 36.923 0l192 80A48 48 0 0 1 496 128zM256 446.313l.066.034c93.735-46.689 172.497-156.308 175.817-307.729L256 65.333v380.98z", + ], + }, + Ju = { + prefix: "fas", + iconName: "ship", + icon: [ + 640, + 512, + [], + "f21a", + "M496.616 372.639l70.012-70.012c16.899-16.9 9.942-45.771-12.836-53.092L512 236.102V96c0-17.673-14.327-32-32-32h-64V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v40h-64c-17.673 0-32 14.327-32 32v140.102l-41.792 13.433c-22.753 7.313-29.754 36.173-12.836 53.092l70.012 70.012C125.828 416.287 85.587 448 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24 61.023 0 107.499-20.61 143.258-59.396C181.677 487.432 216.021 512 256 512h128c39.979 0 74.323-24.568 88.742-59.396C508.495 491.384 554.968 512 616 512c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24-60.817 0-101.542-31.001-119.384-75.361zM192 128h256v87.531l-118.208-37.995a31.995 31.995 0 0 0-19.584 0L192 215.531V128z", + ], + }, + $u = { + prefix: "fas", + iconName: "shipping-fast", + icon: [ + 640, + 512, + [], + "f48b", + "M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H112C85.5 0 64 21.5 64 48v48H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h272c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H40c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h208c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H8c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h208c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H64v128c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z", + ], + }, + eh = { + prefix: "fas", + iconName: "shoe-prints", + icon: [ + 640, + 512, + [], + "f54b", + "M192 160h32V32h-32c-35.35 0-64 28.65-64 64s28.65 64 64 64zM0 416c0 35.35 28.65 64 64 64h32V352H64c-35.35 0-64 28.65-64 64zm337.46-128c-34.91 0-76.16 13.12-104.73 32-24.79 16.38-44.52 32-104.73 32v128l57.53 15.97c26.21 7.28 53.01 13.12 80.31 15.05 32.69 2.31 65.6.67 97.58-6.2C472.9 481.3 512 429.22 512 384c0-64-84.18-96-174.54-96zM491.42 7.19C459.44.32 426.53-1.33 393.84.99c-27.3 1.93-54.1 7.77-80.31 15.04L256 32v128c60.2 0 79.94 15.62 104.73 32 28.57 18.88 69.82 32 104.73 32C555.82 224 640 192 640 128c0-45.22-39.1-97.3-148.58-120.81z", + ], + }, + th = { + prefix: "fas", + iconName: "shopping-bag", + icon: [ + 448, + 512, + [], + "f290", + "M352 160v-32C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128v32H0v272c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V160h-96zm-192-32c0-35.29 28.71-64 64-64s64 28.71 64 64v32H160v-32zm160 120c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm-192 0c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24z", + ], + }, + nh = { + prefix: "fas", + iconName: "shopping-basket", + icon: [ + 576, + 512, + [], + "f291", + "M576 216v16c0 13.255-10.745 24-24 24h-8l-26.113 182.788C514.509 462.435 494.257 480 470.37 480H105.63c-23.887 0-44.139-17.565-47.518-41.212L32 256h-8c-13.255 0-24-10.745-24-24v-16c0-13.255 10.745-24 24-24h67.341l106.78-146.821c10.395-14.292 30.407-17.453 44.701-7.058 14.293 10.395 17.453 30.408 7.058 44.701L170.477 192h235.046L326.12 82.821c-10.395-14.292-7.234-34.306 7.059-44.701 14.291-10.395 34.306-7.235 44.701 7.058L484.659 192H552c13.255 0 24 10.745 24 24zM312 392V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm112 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm-224 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24z", + ], + }, + ih = { + prefix: "fas", + iconName: "shopping-cart", + icon: [ + 576, + 512, + [], + "f07a", + "M528.12 301.319l47.273-208C578.806 78.301 567.391 64 551.99 64H159.208l-9.166-44.81C147.758 8.021 137.93 0 126.529 0H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24h69.883l70.248 343.435C147.325 417.1 136 435.222 136 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-15.674-6.447-29.835-16.824-40h209.647C430.447 426.165 424 440.326 424 456c0 30.928 25.072 56 56 56s56-25.072 56-56c0-22.172-12.888-41.332-31.579-50.405l5.517-24.276c3.413-15.018-8.002-29.319-23.403-29.319H218.117l-6.545-32h293.145c11.206 0 20.92-7.754 23.403-18.681z", + ], + }, + rh = { + prefix: "fas", + iconName: "shower", + icon: [ + 512, + 512, + [], + "f2cc", + "M389.66 135.6L231.6 293.66c-9.37 9.37-24.57 9.37-33.94 0l-11.32-11.32c-9.37-9.37-9.37-24.57 0-33.94l.11-.11c-34.03-40.21-35.16-98.94-3.39-140.38-11.97-7.55-26.14-11.91-41.3-11.91C98.88 96 64 130.88 64 173.76V480H0V173.76C0 95.59 63.59 32 141.76 32c36.93 0 70.61 14.2 95.86 37.42 35.9-11.51 76.5-4.5 106.67 21.03l.11-.11c9.37-9.37 24.57-9.37 33.94 0l11.32 11.32c9.37 9.37 9.37 24.57 0 33.94zM384 208c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm32 0c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-160 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm48-16c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16zm80 16c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-160 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm32 0c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-128 32c0-8.837 7.163-16 16-16s16 7.163 16 16-7.163 16-16 16-16-7.163-16-16zm96 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-96 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm64 0c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-32 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16zm-32 32c0 8.837-7.163 16-16 16s-16-7.163-16-16 7.163-16 16-16 16 7.163 16 16z", + ], + }, + oh = { + prefix: "fas", + iconName: "shuttle-van", + icon: [ + 640, + 512, + [], + "f5b6", + "M628.88 210.65L494.39 49.27A48.01 48.01 0 0 0 457.52 32H32C14.33 32 0 46.33 0 64v288c0 17.67 14.33 32 32 32h32c0 53.02 42.98 96 96 96s96-42.98 96-96h128c0 53.02 42.98 96 96 96s96-42.98 96-96h32c17.67 0 32-14.33 32-32V241.38c0-11.23-3.94-22.1-11.12-30.73zM64 192V96h96v96H64zm96 240c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm160-240h-96V96h96v96zm160 240c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm-96-240V96h66.02l80 96H384z", + ], + }, + ah = { + prefix: "fas", + iconName: "sign", + icon: [ + 512, + 512, + [], + "f4d9", + "M496 64H128V16c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16v48H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h48v368c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V128h368c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM160 384h320V160H160v224z", + ], + }, + sh = { + prefix: "fas", + iconName: "sign-in-alt", + icon: [ + 512, + 512, + [], + "f2f6", + "M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z", + ], + }, + ch = { + prefix: "fas", + iconName: "sign-language", + icon: [ + 448, + 512, + [], + "f2a7", + "M91.434 483.987c-.307-16.018 13.109-29.129 29.13-29.129h62.293v-5.714H56.993c-16.021 0-29.437-13.111-29.13-29.129C28.16 404.491 40.835 392 56.428 392h126.429v-5.714H29.136c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h154.286v-5.714H57.707c-16.021 0-29.437-13.111-29.13-29.129.297-15.522 12.973-28.013 28.566-28.013h168.566l-31.085-22.606c-12.762-9.281-15.583-27.149-6.302-39.912 9.281-12.761 27.15-15.582 39.912-6.302l123.361 89.715a34.287 34.287 0 0 1 14.12 27.728v141.136c0 15.91-10.946 29.73-26.433 33.374l-80.471 18.934a137.16 137.16 0 0 1-31.411 3.646H120c-15.593-.001-28.269-12.492-28.566-28.014zm73.249-225.701h36.423l-11.187-8.136c-18.579-13.511-20.313-40.887-3.17-56.536l-13.004-16.7c-9.843-12.641-28.43-15.171-40.88-5.088-12.065 9.771-14.133 27.447-4.553 39.75l36.371 46.71zm283.298-2.103l-5.003-152.452c-.518-15.771-13.722-28.136-29.493-27.619-15.773.518-28.137 13.722-27.619 29.493l1.262 38.415L283.565 11.019c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l76.889 98.745-4.509 3.511-94.79-121.734c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l94.443 121.288-4.509 3.511-77.675-99.754c-9.58-12.303-27.223-14.63-39.653-5.328-12.827 9.599-14.929 28.24-5.086 40.881l52.053 66.849c12.497-8.257 29.055-8.285 41.69.904l123.36 89.714c10.904 7.93 17.415 20.715 17.415 34.198v16.999l61.064-47.549a34.285 34.285 0 0 0 13.202-28.177z", + ], + }, + lh = { + prefix: "fas", + iconName: "sign-out-alt", + icon: [ + 512, + 512, + [], + "f2f5", + "M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z", + ], + }, + uh = { + prefix: "fas", + iconName: "signal", + icon: [ + 640, + 512, + [], + "f012", + "M216 288h-48c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V304c0-8.84-7.16-16-16-16zM88 384H40c-8.84 0-16 7.16-16 16v96c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16v-96c0-8.84-7.16-16-16-16zm256-192h-48c-8.84 0-16 7.16-16 16v288c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V208c0-8.84-7.16-16-16-16zm128-96h-48c-8.84 0-16 7.16-16 16v384c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112c0-8.84-7.16-16-16-16zM600 0h-48c-8.84 0-16 7.16-16 16v480c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z", + ], + }, + hh = { + prefix: "fas", + iconName: "signature", + icon: [ + 512, + 512, + [], + "f5b7", + "M496 320h-91.86c-9.27 0-19.72-11.31-25.78-28.52-15.23-43.36-48.11-70.3-85.8-70.3-30.84 0-58.47 18.05-76.11 49.23L194.8 106.5C188.84 81.08 169.34 64 146.28 64c-23.05 0-42.55 17.08-48.5 42.5L56.16 284.2C50.7 307.45 37.75 320 28.33 320H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h12.33c41.97 0 78.19-34.23 90.14-85.2l23.84-101.78 29.25 222.11c1.98 15.05 13.82 27.45 28.94 28.75.99.09 1.96.13 2.93.13 14.08 0 26.64-9.27 30.69-22.95l33.03-112.34c5.88-16.72 15.84-27.52 25.41-27.52 9.58 0 19.55 10.8 25.78 28.52 15.23 43.36 48.11 70.3 85.8 70.3H496c8.84 0 16-7.16 16-16v-32c0-8.86-7.16-16.02-16-16.02z", + ], + }, + dh = { + prefix: "fas", + iconName: "sitemap", + icon: [ + 640, + 512, + [], + "f0e8", + "M128 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm-24-80h192v48h48v-48h192v48h48v-57.59c0-21.17-17.23-38.41-38.41-38.41H344v-64h40c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H256c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h40v64H94.41C73.23 224 56 241.23 56 262.41V320h48v-48zm264 80h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm240 0h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z", + ], + }, + ph = { + prefix: "fas", + iconName: "skull", + icon: [ + 512, + 512, + [], + "f54c", + "M256 0C114.6 0 0 100.3 0 224c0 70.1 36.9 132.6 94.5 173.7 9.6 6.9 15.2 18.1 13.5 29.9l-9.4 66.2c-1.4 9.6 6 18.2 15.7 18.2H192v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h64v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h77.7c9.7 0 17.1-8.6 15.7-18.2l-9.4-66.2c-1.7-11.7 3.8-23 13.5-29.9C475.1 356.6 512 294.1 512 224 512 100.3 397.4 0 256 0zm-96 320c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm192 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z", + ], + }, + fh = { + prefix: "fas", + iconName: "skull-crossbones", + icon: [ + 448, + 512, + [], + "f714", + "M439.15 453.06L297.17 384l141.99-69.06c7.9-3.95 11.11-13.56 7.15-21.46L432 264.85c-3.95-7.9-13.56-11.11-21.47-7.16L224 348.41 37.47 257.69c-7.9-3.95-17.51-.75-21.47 7.16L1.69 293.48c-3.95 7.9-.75 17.51 7.15 21.46L150.83 384 8.85 453.06c-7.9 3.95-11.11 13.56-7.15 21.47l14.31 28.63c3.95 7.9 13.56 11.11 21.47 7.15L224 419.59l186.53 90.72c7.9 3.95 17.51.75 21.47-7.15l14.31-28.63c3.95-7.91.74-17.52-7.16-21.47zM150 237.28l-5.48 25.87c-2.67 12.62 5.42 24.85 16.45 24.85h126.08c11.03 0 19.12-12.23 16.45-24.85l-5.5-25.87c41.78-22.41 70-62.75 70-109.28C368 57.31 303.53 0 224 0S80 57.31 80 128c0 46.53 28.22 86.87 70 109.28zM280 112c17.65 0 32 14.35 32 32s-14.35 32-32 32-32-14.35-32-32 14.35-32 32-32zm-112 0c17.65 0 32 14.35 32 32s-14.35 32-32 32-32-14.35-32-32 14.35-32 32-32z", + ], + }, + mh = { + prefix: "fas", + iconName: "slash", + icon: [ + 640, + 512, + [], + "f715", + "M594.53 508.63L6.18 53.9c-6.97-5.42-8.23-15.47-2.81-22.45L23.01 6.18C28.43-.8 38.49-2.06 45.47 3.37L633.82 458.1c6.97 5.42 8.23 15.47 2.81 22.45l-19.64 25.27c-5.42 6.98-15.48 8.23-22.46 2.81z", + ], + }, + gh = { + prefix: "fas", + iconName: "sliders-h", + icon: [ + 512, + 512, + [], + "f1de", + "M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z", + ], + }, + bh = { + prefix: "fas", + iconName: "smile", + icon: [ + 496, + 512, + [], + "f118", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z", + ], + }, + _h = { + prefix: "fas", + iconName: "smile-beam", + icon: [ + 496, + 512, + [], + "f5b8", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM112 223.4c3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.7 8.6-10.8 11.9-14.9 4.5l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.3 7.4-15.8 4-15.1-4.5zm250.8 122.8C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.5-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.6-16.2 38.1 4.3 24.6 20.5zm6.2-118.3l-9.5-17c-7.7-13.7-19.2-21.6-31.5-21.6s-23.8 7.9-31.5 21.6l-9.5 17c-4.1 7.3-15.6 4-14.9-4.5 3.3-42.1 32.2-71.4 56-71.4s52.7 29.3 56 71.4c.6 8.6-11 11.9-15.1 4.5z", + ], + }, + vh = { + prefix: "fas", + iconName: "smile-wink", + icon: [ + 496, + 512, + [], + "f4da", + "M0 256c0 137 111 248 248 248s248-111 248-248S385 8 248 8 0 119 0 256zm200-48c0 17.7-14.3 32-32 32s-32-14.3-32-32 14.3-32 32-32 32 14.3 32 32zm158.5 16.5c-14.8-13.2-46.2-13.2-61 0L288 233c-8.3 7.4-21.6.4-19.8-10.8 4-25.2 34.2-42.1 59.9-42.1S384 197 388 222.2c1.7 11.1-11.4 18.3-19.8 10.8l-9.7-8.5zM157.8 325.8C180.2 352.7 213 368 248 368s67.8-15.4 90.2-42.2c13.6-16.2 38.1 4.2 24.6 20.5C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.5-16.3 11.2-36.7 24.6-20.4z", + ], + }, + yh = { + prefix: "fas", + iconName: "smoking", + icon: [ + 640, + 512, + [], + "f48d", + "M632 352h-48c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zM553.3 87.1c-5.7-3.8-9.3-10-9.3-16.8V8c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v62.3c0 22 10.2 43.4 28.6 55.4 42.2 27.3 67.4 73.8 67.4 124V280c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-30.3c0-65.5-32.4-126.2-86.7-162.6zM432 352H48c-26.5 0-48 21.5-48 48v64c0 26.5 21.5 48 48 48h384c8.8 0 16-7.2 16-16V368c0-8.8-7.2-16-16-16zm-32 112H224v-64h176v64zm87.7-322.4C463.8 125 448 99.3 448 70.3V8c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v66.4c0 43.7 24.6 81.6 60.3 106.7 22.4 15.7 35.7 41.2 35.7 68.6V280c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-30.3c0-43.3-21-83.4-56.3-108.1zM536 352h-48c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z", + ], + }, + Ch = { + prefix: "fas", + iconName: "smoking-ban", + icon: [ + 512, + 512, + [], + "f54d", + "M96 304c0 8.8 7.2 16 16 16h117.5l-96-96H112c-8.8 0-16 7.2-16 16v64zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256 256-114.6 256-256S397.4 0 256 0zm0 448c-105.9 0-192-86.1-192-192 0-41.4 13.3-79.7 35.7-111.1l267.4 267.4C335.7 434.7 297.4 448 256 448zm45.2-192H384v32h-50.8l-32-32zm111.1 111.1L365.2 320H400c8.8 0 16-7.2 16-16v-64c0-8.8-7.2-16-16-16H269.2L144.9 99.7C176.3 77.3 214.6 64 256 64c105.9 0 192 86.1 192 192 0 41.4-13.3 79.7-35.7 111.1zM320.6 128c-15.6 0-28.6-11.2-31.4-25.9-.7-3.6-4-6.1-7.7-6.1h-16.2c-5 0-8.7 4.5-8 9.4 4.6 30.9 31.2 54.6 63.3 54.6 15.6 0 28.6 11.2 31.4 25.9.7 3.6 4 6.1 7.7 6.1h16.2c5 0 8.7-4.5 8-9.4-4.6-30.9-31.2-54.6-63.3-54.6z", + ], + }, + Ph = { + prefix: "fas", + iconName: "snowflake", + icon: [ + 448, + 512, + [], + "f2dc", + "M444.816 301.639a24.12 24.12 0 0 0 2.661-16.978c-2.725-12.966-15.339-21.245-28.174-18.492l-87.407 25.046L264 256l67.896-35.215 87.407 25.046c12.835 2.753 25.449-5.526 28.174-18.492 2.725-12.966-5.471-25.708-18.305-28.461l-47.477-7.137 53.077-30.956c11.363-6.627 15.257-21.306 8.696-32.785-6.561-11.479-21.091-15.412-32.454-8.785l-53.077 30.956 17.621-45.104c4.057-12.606-2.768-26.146-15.247-30.245-12.478-4.099-25.883 2.797-29.94 15.402l-22.232 88.99-60.38 35.215V144l65.175-63.945c8.778-9.852 7.987-25.027-1.766-33.894-9.753-8.867-24.775-8.068-33.552 1.784l-29.857 37.967V24c0-13.255-10.637-24-23.758-24s-23.758 10.745-23.758 24v61.912l-29.857-37.967c-8.779-9.852-23.799-10.652-33.552-1.784-9.753 8.867-10.543 24.042-1.766 33.894L200.242 144v70.431l-60.38-35.215-22.232-88.99c-4.057-12.605-17.462-19.501-29.94-15.402-12.478 4.099-19.304 17.64-15.247 30.245l17.62 45.104-53.077-30.956c-11.363-6.627-25.893-2.694-32.454 8.785s-2.667 26.157 8.696 32.785l53.077 30.956-47.477 7.137C5.993 201.634-2.203 214.375.523 227.341c2.725 12.965 15.339 21.245 28.174 18.492l87.407-25.046L184 256l-67.896 35.215-87.406-25.045c-12.835-2.753-25.449 5.526-28.174 18.492-2.725 12.967 5.47 25.708 18.305 28.461l47.477 7.137-53.077 30.956C1.866 357.843-2.027 372.521 4.533 384s21.091 15.412 32.454 8.785l53.077-30.956-17.62 45.104a24.157 24.157 0 0 0 2.022 19.428c2.831 4.953 7.416 8.909 13.224 10.816 12.478 4.099 25.883-2.797 29.94-15.402l22.232-88.99 60.38-35.215V368l-65.175 63.945c-8.778 9.852-7.987 25.027 1.766 33.894 9.754 8.868 24.774 8.068 33.552-1.784l29.857-37.967V488c0 13.255 10.637 24 23.758 24s23.758-10.745 23.758-24v-61.912l29.857 37.967A23.59 23.59 0 0 0 295.282 472a23.534 23.534 0 0 0 15.885-6.161c9.753-8.867 10.544-24.042 1.766-33.894L247.758 368v-70.431l60.38 35.215 22.232 88.99c4.057 12.605 17.462 19.501 29.94 15.402 12.479-4.099 19.304-17.64 15.247-30.245l-17.621-45.104 53.077 30.956c11.363 6.627 25.893 2.694 32.454-8.785s2.667-26.157-8.696-32.785l-53.077-30.956 47.477-7.137c6.86-1.469 12.394-5.793 15.645-11.481z", + ], + }, + xh = { + prefix: "fas", + iconName: "socks", + icon: [ + 512, + 512, + [], + "f696", + "M214.66 311.01L288 256V96H128v176l-86.65 64.61c-39.4 29.56-53.86 84.42-29.21 127.06C30.39 495.25 63.27 512 96.08 512c20.03 0 40.25-6.25 57.52-19.2l21.86-16.39c-29.85-55.38-13.54-125.84 39.2-165.4zM288 32c0-11.05 3.07-21.3 8.02-30.38C293.4.92 290.85 0 288 0H160c-17.67 0-32 14.33-32 32v32h160V32zM480 0H352c-17.67 0-32 14.33-32 32v32h192V32c0-17.67-14.33-32-32-32zM320 272l-86.13 64.61c-39.4 29.56-53.86 84.42-29.21 127.06 18.25 31.58 50.61 48.33 83.42 48.33 20.03 0 40.25-6.25 57.52-19.2l115.2-86.4A127.997 127.997 0 0 0 512 304V96H320v176z", + ], + }, + Th = { + prefix: "fas", + iconName: "solar-panel", + icon: [ + 640, + 512, + [], + "f5ba", + "M431.98 448.01l-47.97.05V416h-128v32.21l-47.98.05c-8.82.01-15.97 7.16-15.98 15.99l-.05 31.73c-.01 8.85 7.17 16.03 16.02 16.02l223.96-.26c8.82-.01 15.97-7.16 15.98-15.98l.04-31.73c.01-8.85-7.17-16.03-16.02-16.02zM585.2 26.74C582.58 11.31 568.99 0 553.06 0H86.93C71 0 57.41 11.31 54.79 26.74-3.32 369.16.04 348.08.03 352c-.03 17.32 14.29 32 32.6 32h574.74c18.23 0 32.51-14.56 32.59-31.79.02-4.08 3.35 16.95-54.76-325.47zM259.83 64h120.33l9.77 96H250.06l9.77-96zm-75.17 256H71.09L90.1 208h105.97l-11.41 112zm16.29-160H98.24l16.29-96h96.19l-9.77 96zm32.82 160l11.4-112h149.65l11.4 112H233.77zm195.5-256h96.19l16.29 96H439.04l-9.77-96zm26.06 256l-11.4-112H549.9l19.01 112H455.33z", + ], + }, + Sh = { + prefix: "fas", + iconName: "sort", + icon: [ + 320, + 512, + [], + "f0dc", + "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z", + ], + }, + Oh = { + prefix: "fas", + iconName: "sort-alpha-down", + icon: [ + 448, + 512, + [], + "f15d", + "M187.298 395.314l-79.984 80.002c-6.248 6.247-16.383 6.245-22.627 0L4.705 395.314C-5.365 385.244 1.807 368 16.019 368H64V48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v320h47.984c14.241 0 21.363 17.264 11.314 27.314zm119.075-180.007A12 12 0 0 1 294.838 224h-35.717c-8.22 0-14.007-8.078-11.362-15.861l57.096-168A12 12 0 0 1 316.217 32h39.566c5.139 0 9.708 3.273 11.362 8.139l57.096 168C426.886 215.922 421.1 224 412.879 224h-35.735a12 12 0 0 1-11.515-8.622l-8.301-28.299h-42.863l-8.092 28.228zm22.857-78.697h13.367l-6.6-22.937-6.767 22.937zm12.575 287.323l67.451-95.698a12 12 0 0 0 2.192-6.913V300c0-6.627-5.373-12-12-12H274.522c-6.627 0-12 5.373-12 12v28.93c0 6.627 5.373 12 12 12h56.469c-.739.991-1.497 2.036-2.27 3.133l-67.203 95.205a12.001 12.001 0 0 0-2.196 6.92V468c0 6.627 5.373 12 12 12h129.355c6.627 0 12-5.373 12-12v-28.93c0-6.627-5.373-12-12-12h-61.146c.74-.993 1.5-2.039 2.274-3.137z", + ], + }, + Eh = { + prefix: "fas", + iconName: "sort-alpha-up", + icon: [ + 448, + 512, + [], + "f15e", + "M4.702 116.686l79.984-80.002c6.248-6.247 16.383-6.245 22.627 0l79.981 80.002c10.07 10.07 2.899 27.314-11.314 27.314H128v320c0 8.837-7.163 16-16 16H80c-8.837 0-16-7.163-16-16V144H16.016c-14.241 0-21.363-17.264-11.314-27.314zm301.671 98.621A12 12 0 0 1 294.838 224h-35.717c-8.22 0-14.007-8.078-11.362-15.861l57.096-168A12 12 0 0 1 316.217 32h39.566c5.139 0 9.708 3.273 11.362 8.139l57.096 168C426.886 215.922 421.1 224 412.879 224h-35.735a12 12 0 0 1-11.515-8.622l-8.301-28.299h-42.863l-8.092 28.228zm22.857-78.697h13.367l-6.6-22.937-6.767 22.937zm12.575 287.323l67.451-95.698a12 12 0 0 0 2.192-6.913V300c0-6.627-5.373-12-12-12H274.522c-6.627 0-12 5.373-12 12v28.93c0 6.627 5.373 12 12 12h56.469c-.739.991-1.497 2.036-2.27 3.133l-67.203 95.205a12.001 12.001 0 0 0-2.196 6.92V468c0 6.627 5.373 12 12 12h129.355c6.627 0 12-5.373 12-12v-28.93c0-6.627-5.373-12-12-12h-61.146c.74-.993 1.5-2.039 2.274-3.137z", + ], + }, + Mh = { + prefix: "fas", + iconName: "sort-amount-down", + icon: [ + 512, + 512, + [], + "f160", + "M187.298 395.314l-79.984 80.002c-6.248 6.247-16.383 6.245-22.627 0L4.705 395.314C-5.365 385.244 1.807 368 16.019 368H64V48c0-8.837 7.163-16 16-16h32c8.837 0 16 7.163 16 16v320h47.984c14.241 0 21.363 17.264 11.314 27.314zM240 96h256c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H240c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16zm-16 112v-32c0-8.837 7.163-16 16-16h192c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16zm0 256v-32c0-8.837 7.163-16 16-16h64c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-64c-8.837 0-16-7.163-16-16zm0-128v-32c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16z", + ], + }, + Ah = { + prefix: "fas", + iconName: "sort-amount-up", + icon: [ + 512, + 512, + [], + "f161", + "M4.702 116.686l79.984-80.002c6.248-6.247 16.383-6.245 22.627 0l79.981 80.002c10.07 10.07 2.899 27.314-11.314 27.314H128v320c0 8.837-7.163 16-16 16H80c-8.837 0-16-7.163-16-16V144H16.016c-14.241 0-21.363-17.264-11.314-27.314zM240 96h256c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H240c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16zm-16 112v-32c0-8.837 7.163-16 16-16h192c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16zm0 256v-32c0-8.837 7.163-16 16-16h64c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-64c-8.837 0-16-7.163-16-16zm0-128v-32c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H240c-8.837 0-16-7.163-16-16z", + ], + }, + Ih = { prefix: "fas", iconName: "sort-down", icon: [320, 512, [], "f0dd", "M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"] }, + Dh = { + prefix: "fas", + iconName: "sort-numeric-down", + icon: [ + 448, + 512, + [], + "f162", + "M308.811 113.787l-19.448-20.795c-4.522-4.836-4.274-12.421.556-16.95l43.443-40.741a11.999 11.999 0 0 1 8.209-3.247h31.591c6.627 0 12 5.373 12 12v127.07h25.66c6.627 0 12 5.373 12 12v28.93c0 6.627-5.373 12-12 12H301.649c-6.627 0-12-5.373-12-12v-28.93c0-6.627 5.373-12 12-12h25.414v-57.938c-7.254 6.58-14.211 4.921-18.252.601zm-30.57 238.569c0-32.653 23.865-67.356 68.094-67.356 38.253 0 79.424 28.861 79.424 92.228 0 51.276-32.237 105.772-91.983 105.772-17.836 0-30.546-3.557-38.548-6.781-5.79-2.333-8.789-8.746-6.922-14.703l9.237-29.48c2.035-6.496 9.049-9.983 15.467-7.716 13.029 4.602 27.878 5.275 38.103-4.138-38.742 5.072-72.872-25.36-72.872-67.826zm92.273 19.338c0-22.285-15.302-36.505-25.835-36.505-8.642 0-13.164 7.965-13.164 15.832 0 5.669 1.815 24.168 25.168 24.168 9.973 0 13.377-2.154 13.744-2.731.021-.046.087-.291.087-.764zM175.984 368H128V48c0-8.837-7.163-16-16-16H80c-8.837 0-16 7.163-16 16v320H16.019c-14.212 0-21.384 17.244-11.314 27.314l79.981 80.002c6.245 6.245 16.38 6.247 22.627 0l79.984-80.002c10.05-10.05 2.928-27.314-11.313-27.314z", + ], + }, + Rh = { + prefix: "fas", + iconName: "sort-numeric-up", + icon: [ + 448, + 512, + [], + "f163", + "M308.811 113.787l-19.448-20.795c-4.522-4.836-4.274-12.421.556-16.95l43.443-40.741a11.999 11.999 0 0 1 8.209-3.247h31.591c6.627 0 12 5.373 12 12v127.07h25.66c6.627 0 12 5.373 12 12v28.93c0 6.627-5.373 12-12 12H301.649c-6.627 0-12-5.373-12-12v-28.93c0-6.627 5.373-12 12-12h25.414v-57.938c-7.254 6.58-14.211 4.921-18.252.601zm-30.57 238.569c0-32.653 23.865-67.356 68.094-67.356 38.253 0 79.424 28.861 79.424 92.228 0 51.276-32.237 105.772-91.983 105.772-17.836 0-30.546-3.557-38.548-6.781-5.79-2.333-8.789-8.746-6.922-14.703l9.237-29.48c2.035-6.496 9.049-9.983 15.467-7.716 13.029 4.602 27.878 5.275 38.103-4.138-38.742 5.072-72.872-25.36-72.872-67.826zm92.273 19.338c0-22.285-15.302-36.505-25.835-36.505-8.642 0-13.164 7.965-13.164 15.832 0 5.669 1.815 24.168 25.168 24.168 9.973 0 13.377-2.154 13.744-2.731.021-.046.087-.291.087-.764zM16.016 144H64v320c0 8.837 7.163 16 16 16h32c8.837 0 16-7.163 16-16V144h47.981c14.212 0 21.384-17.244 11.314-27.314l-79.981-80.002c-6.245-6.245-16.38-6.247-22.627 0L4.702 116.686C-5.347 126.736 1.775 144 16.016 144z", + ], + }, + wh = { prefix: "fas", iconName: "sort-up", icon: [320, 512, [], "f0de", "M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"] }, + Lh = { + prefix: "fas", + iconName: "spa", + icon: [ + 576, + 512, + [], + "f5bb", + "M568.25 192c-29.04.13-135.01 6.16-213.84 83-33.12 29.63-53.36 63.3-66.41 94.86-13.05-31.56-33.29-65.23-66.41-94.86-78.83-76.84-184.8-82.87-213.84-83-4.41-.02-7.79 3.4-7.75 7.82.23 27.92 7.14 126.14 88.77 199.3C172.79 480.94 256 480 288 480s115.19.95 199.23-80.88c81.64-73.17 88.54-171.38 88.77-199.3.04-4.42-3.34-7.84-7.75-7.82zM287.98 302.6c12.82-18.85 27.6-35.78 44.09-50.52 19.09-18.61 39.58-33.3 60.26-45.18-16.44-70.5-51.72-133.05-96.73-172.22-4.11-3.58-11.02-3.58-15.14 0-44.99 39.14-80.27 101.63-96.74 172.07 20.37 11.7 40.5 26.14 59.22 44.39a282.768 282.768 0 0 1 45.04 51.46z", + ], + }, + Fh = { + prefix: "fas", + iconName: "space-shuttle", + icon: [ + 640, + 512, + [], + "f197", + "M592.604 208.244C559.735 192.836 515.777 184 472 184H186.327c-4.952-6.555-10.585-11.978-16.72-16H376C229.157 137.747 219.403 32 96.003 32H96v128H80V32c-26.51 0-48 28.654-48 64v64c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v16c-23.197 0-32 10.032-32 24v40c0 13.983 8.819 24 32 24v64c0 35.346 21.49 64 48 64V352h16v128h.003c123.4 0 133.154-105.747 279.997-136H169.606c6.135-4.022 11.768-9.445 16.72-16H472c43.777 0 87.735-8.836 120.604-24.244C622.282 289.845 640 271.992 640 256s-17.718-33.845-47.396-47.756zM488 296a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8c31.909 0 31.942 80 0 80z", + ], + }, + Nh = { + prefix: "fas", + iconName: "spider", + icon: [ + 576, + 512, + [], + "f717", + "M151.17 167.35L177.1 176h4.67l5.22-26.12c.72-3.58 1.8-7.58 3.21-11.79l-20.29-40.58 23.8-71.39c2.79-8.38-1.73-17.44-10.12-20.24L168.42.82c-8.38-2.8-17.45 1.73-20.24 10.12l-25.89 77.68a32.04 32.04 0 0 0 1.73 24.43l27.15 54.3zm422.14 182.03l-52.75-79.12a32.002 32.002 0 0 0-26.62-14.25H416l68.99-24.36a32.03 32.03 0 0 0 16.51-12.61l53.6-80.41c4.9-7.35 2.91-17.29-4.44-22.19l-13.31-8.88c-7.35-4.9-17.29-2.91-22.19 4.44l-50.56 75.83L404.1 208H368l-10.37-51.85C355.44 145.18 340.26 96 288 96c-52.26 0-67.44 49.18-69.63 60.15L208 208h-36.1l-60.49-20.17L60.84 112c-4.9-7.35-14.83-9.34-22.19-4.44l-13.31 8.88c-7.35 4.9-9.34 14.83-4.44 22.19l53.6 80.41a32.03 32.03 0 0 0 16.51 12.61L160 256H82.06a32.02 32.02 0 0 0-26.63 14.25L2.69 349.38c-4.9 7.35-2.92 17.29 4.44 22.19l13.31 8.88c7.35 4.9 17.29 2.91 22.19-4.44l48-72h47.06l-60.83 97.33A31.988 31.988 0 0 0 72 418.3V496c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-73.11l74.08-118.53c-1.01 14.05-2.08 28.11-2.08 42.21C192 399.64 232.76 448 288 448s96-48.36 96-101.43c0-14.1-1.08-28.16-2.08-42.21L456 422.89V496c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-77.71c0-6-1.69-11.88-4.86-16.96L438.31 304h47.06l48 72c4.9 7.35 14.84 9.34 22.19 4.44l13.31-8.88c7.36-4.9 9.34-14.83 4.44-22.18zM406.09 97.51l-20.29 40.58c1.41 4.21 2.49 8.21 3.21 11.79l5.22 26.12h4.67l25.93-8.65 27.15-54.3a31.995 31.995 0 0 0 1.73-24.43l-25.89-77.68C425.03 2.56 415.96-1.98 407.58.82l-15.17 5.06c-8.38 2.8-12.91 11.86-10.12 20.24l23.8 71.39z", + ], + }, + kh = { + prefix: "fas", + iconName: "spinner", + icon: [ + 512, + 512, + [], + "f110", + "M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z", + ], + }, + zh = { + prefix: "fas", + iconName: "splotch", + icon: [ + 512, + 512, + [], + "f5bc", + "M472.29 195.89l-67.06-22.95c-19.28-6.6-33.54-20.92-38.14-38.3L351.1 74.19c-11.58-43.77-76.57-57.13-109.98-22.62l-46.14 47.67c-13.26 13.71-33.54 20.93-54.2 19.31l-71.88-5.62c-52.05-4.07-86.93 44.88-59.03 82.83l38.54 52.42c11.08 15.07 12.82 33.86 4.64 50.24L24.62 355.4c-20.59 41.25 22.84 84.87 73.49 73.81l69.96-15.28c20.11-4.39 41.45 0 57.07 11.73l54.32 40.83c39.32 29.56 101.04 7.57 104.45-37.22l4.7-61.86c1.35-17.79 12.8-33.86 30.63-42.99l62-31.74c44.88-22.96 39.59-80.17-8.95-96.79z", + ], + }, + jh = { + prefix: "fas", + iconName: "spray-can", + icon: [ + 512, + 512, + [], + "f5bd", + "M224 32c0-17.67-14.33-32-32-32h-64c-17.67 0-32 14.33-32 32v96h128V32zm256 96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm-256 32H96c-53.02 0-96 42.98-96 96v224c0 17.67 14.33 32 32 32h256c17.67 0 32-14.33 32-32V256c0-53.02-42.98-96-96-96zm-64 256c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zM480 96c17.67 0 32-14.33 32-32s-14.33-32-32-32-32 14.33-32 32 14.33 32 32 32zm-96 32c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm-96-96c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm96 0c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32zm96 192c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z", + ], + }, + Bh = { prefix: "fas", iconName: "square", icon: [448, 512, [], "f0c8", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"] }, + Vh = { prefix: "fas", iconName: "square-full", icon: [512, 512, [], "f45c", "M512 512H0V0h512v512z"] }, + Gh = { + prefix: "fas", + iconName: "square-root-alt", + icon: [ + 576, + 512, + [], + "f698", + "M571.31 251.31l-22.62-22.62c-6.25-6.25-16.38-6.25-22.63 0L480 274.75l-46.06-46.06c-6.25-6.25-16.38-6.25-22.63 0l-22.62 22.62c-6.25 6.25-6.25 16.38 0 22.63L434.75 320l-46.06 46.06c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L480 365.25l46.06 46.06c6.25 6.25 16.38 6.25 22.63 0l22.62-22.62c6.25-6.25 6.25-16.38 0-22.63L525.25 320l46.06-46.06c6.25-6.25 6.25-16.38 0-22.63zM552 0H307.65c-14.54 0-27.26 9.8-30.95 23.87l-84.79 322.8-58.41-106.1A32.008 32.008 0 0 0 105.47 224H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h43.62l88.88 163.73C168.99 503.5 186.3 512 204.94 512c17.27 0 44.44-9 54.28-41.48L357.03 96H552c13.25 0 24-10.75 24-24V24c0-13.26-10.75-24-24-24z", + ], + }, + Uh = { + prefix: "fas", + iconName: "stamp", + icon: [ + 512, + 512, + [], + "f5bf", + "M32 512h448v-64H32v64zm384-256h-66.56c-16.26 0-29.44-13.18-29.44-29.44v-9.46c0-27.37 8.88-53.41 21.46-77.72 9.11-17.61 12.9-38.39 9.05-60.42-6.77-38.78-38.47-70.7-77.26-77.45C212.62-9.04 160 37.33 160 96c0 14.16 3.12 27.54 8.69 39.58C182.02 164.43 192 194.7 192 226.49v.07c0 16.26-13.18 29.44-29.44 29.44H96c-53.02 0-96 42.98-96 96v32c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-32c0-53.02-42.98-96-96-96z", + ], + }, + Hh = { + prefix: "fas", + iconName: "star", + icon: [ + 576, + 512, + [], + "f005", + "M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z", + ], + }, + Wh = { + prefix: "fas", + iconName: "star-and-crescent", + icon: [ + 512, + 512, + [], + "f699", + "M340.47 466.36c-1.45 0-6.89.46-9.18.46-116.25 0-210.82-94.57-210.82-210.82S215.04 45.18 331.29 45.18c2.32 0 7.7.46 9.18.46 7.13 0 13.33-5.03 14.75-12.07 1.46-7.25-2.55-14.49-9.47-17.09C316.58 5.54 286.39 0 256 0 114.84 0 0 114.84 0 256s114.84 256 256 256c30.23 0 60.28-5.49 89.32-16.32 5.96-2.02 10.28-7.64 10.28-14.26 0-8.09-6.39-15.06-15.13-15.06zm162.99-252.5l-76.38-11.1-34.16-69.21c-1.83-3.7-5.38-5.55-8.93-5.55s-7.1 1.85-8.93 5.55l-34.16 69.21-76.38 11.1c-8.17 1.18-11.43 11.22-5.52 16.99l55.27 53.87-13.05 76.07c-1.11 6.44 4.01 11.66 9.81 11.66 1.53 0 3.11-.36 4.64-1.17L384 335.37l68.31 35.91c1.53.8 3.11 1.17 4.64 1.17 5.8 0 10.92-5.23 9.81-11.66l-13.05-76.07 55.27-53.87c5.91-5.77 2.65-15.81-5.52-16.99z", + ], + }, + Xh = { + prefix: "fas", + iconName: "star-half", + icon: [576, 512, [], "f089", "M288 0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6V0z"], + }, + Yh = { + prefix: "fas", + iconName: "star-half-alt", + icon: [ + 536, + 512, + [], + "f5c0", + "M508.55 171.51L362.18 150.2 296.77 17.81C290.89 5.98 279.42 0 267.95 0c-11.4 0-22.79 5.9-28.69 17.81l-65.43 132.38-146.38 21.29c-26.25 3.8-36.77 36.09-17.74 54.59l105.89 103-25.06 145.48C86.98 495.33 103.57 512 122.15 512c4.93 0 10-1.17 14.87-3.75l130.95-68.68 130.94 68.7c4.86 2.55 9.92 3.71 14.83 3.71 18.6 0 35.22-16.61 31.66-37.4l-25.03-145.49 105.91-102.98c19.04-18.5 8.52-50.8-17.73-54.6zm-121.74 123.2l-18.12 17.62 4.28 24.88 19.52 113.45-102.13-53.59-22.38-11.74.03-317.19 51.03 103.29 11.18 22.63 25.01 3.64 114.23 16.63-82.65 80.38z", + ], + }, + Kh = { + prefix: "fas", + iconName: "star-of-david", + icon: [ + 464, + 512, + [], + "f69a", + "M405.68 256l53.21-89.39C473.3 142.4 455.48 112 426.88 112H319.96l-55.95-93.98C256.86 6.01 244.43 0 232 0s-24.86 6.01-32.01 18.02L144.04 112H37.11c-28.6 0-46.42 30.4-32.01 54.61L58.32 256 5.1 345.39C-9.31 369.6 8.51 400 37.11 400h106.93l55.95 93.98C207.14 505.99 219.57 512 232 512s24.86-6.01 32.01-18.02L319.96 400h106.93c28.6 0 46.42-30.4 32.01-54.61L405.68 256zm-12.78-88l-19.8 33.26L353.3 168h39.6zm-52.39 88l-52.39 88H175.88l-52.39-88 52.38-88h112.25l52.39 88zM232 73.72L254.79 112h-45.57L232 73.72zM71.1 168h39.6l-19.8 33.26L71.1 168zm0 176l19.8-33.26L110.7 344H71.1zM232 438.28L209.21 400h45.57L232 438.28zM353.29 344l19.8-33.26L392.9 344h-39.61z", + ], + }, + Zh = { + prefix: "fas", + iconName: "star-of-life", + icon: [ + 480, + 512, + [], + "f621", + "M471.99 334.43L336.06 256l135.93-78.43c7.66-4.42 10.28-14.2 5.86-21.86l-32.02-55.43c-4.42-7.65-14.21-10.28-21.87-5.86l-135.93 78.43V16c0-8.84-7.17-16-16.01-16h-64.04c-8.84 0-16.01 7.16-16.01 16v156.86L56.04 94.43c-7.66-4.42-17.45-1.79-21.87 5.86L2.15 155.71c-4.42 7.65-1.8 17.44 5.86 21.86L143.94 256 8.01 334.43c-7.66 4.42-10.28 14.21-5.86 21.86l32.02 55.43c4.42 7.65 14.21 10.27 21.87 5.86l135.93-78.43V496c0 8.84 7.17 16 16.01 16h64.04c8.84 0 16.01-7.16 16.01-16V339.14l135.93 78.43c7.66 4.42 17.45 1.8 21.87-5.86l32.02-55.43c4.42-7.65 1.8-17.43-5.86-21.85z", + ], + }, + qh = { + prefix: "fas", + iconName: "step-backward", + icon: [ + 448, + 512, + [], + "f048", + "M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z", + ], + }, + Qh = { + prefix: "fas", + iconName: "step-forward", + icon: [ + 448, + 512, + [], + "f051", + "M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z", + ], + }, + Jh = { + prefix: "fas", + iconName: "stethoscope", + icon: [ + 512, + 512, + [], + "f0f1", + "M447.1 112c-34.2.5-62.3 28.4-63 62.6-.5 24.3 12.5 45.6 32 56.8V344c0 57.3-50.2 104-112 104-60 0-109.2-44.1-111.9-99.2C265 333.8 320 269.2 320 192V36.6c0-11.4-8.1-21.3-19.3-23.5L237.8.5c-13-2.6-25.6 5.8-28.2 18.8L206.4 35c-2.6 13 5.8 25.6 18.8 28.2l30.7 6.1v121.4c0 52.9-42.2 96.7-95.1 97.2-53.4.5-96.9-42.7-96.9-96V69.4l30.7-6.1c13-2.6 21.4-15.2 18.8-28.2l-3.1-15.7C107.7 6.4 95.1-2 82.1.6L19.3 13C8.1 15.3 0 25.1 0 36.6V192c0 77.3 55.1 142 128.1 156.8C130.7 439.2 208.6 512 304 512c97 0 176-75.4 176-168V231.4c19.1-11.1 32-31.7 32-55.4 0-35.7-29.2-64.5-64.9-64zm.9 80c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16z", + ], + }, + $h = { + prefix: "fas", + iconName: "sticky-note", + icon: [ + 448, + 512, + [], + "f249", + "M312 320h136V56c0-13.3-10.7-24-24-24H24C10.7 32 0 42.7 0 56v400c0 13.3 10.7 24 24 24h264V344c0-13.2 10.8-24 24-24zm129 55l-98 98c-4.5 4.5-10.6 7-17 7h-6V352h128v6.1c0 6.3-2.5 12.4-7 16.9z", + ], + }, + ed = { prefix: "fas", iconName: "stop", icon: [448, 512, [], "f04d", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"] }, + td = { + prefix: "fas", + iconName: "stop-circle", + icon: [512, 512, [], "f28d", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"], + }, + nd = { + prefix: "fas", + iconName: "stopwatch", + icon: [ + 448, + 512, + [], + "f2f2", + "M432 304c0 114.9-93.1 208-208 208S16 418.9 16 304c0-104 76.3-190.2 176-205.5V64h-28c-6.6 0-12-5.4-12-12V12c0-6.6 5.4-12 12-12h120c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-28v34.5c37.5 5.8 71.7 21.6 99.7 44.6l27.5-27.5c4.7-4.7 12.3-4.7 17 0l28.3 28.3c4.7 4.7 4.7 12.3 0 17l-29.4 29.4-.6.6C419.7 223.3 432 262.2 432 304zm-176 36V188.5c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12V340c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z", + ], + }, + id = { + prefix: "fas", + iconName: "store", + icon: [ + 616, + 512, + [], + "f54e", + "M602 118.6L537.1 15C531.3 5.7 521 0 510 0H106C95 0 84.7 5.7 78.9 15L14 118.6c-33.5 53.5-3.8 127.9 58.8 136.4 4.5.6 9.1.9 13.7.9 29.6 0 55.8-13 73.8-33.1 18 20.1 44.3 33.1 73.8 33.1 29.6 0 55.8-13 73.8-33.1 18 20.1 44.3 33.1 73.8 33.1 29.6 0 55.8-13 73.8-33.1 18.1 20.1 44.3 33.1 73.8 33.1 4.7 0 9.2-.3 13.7-.9 62.8-8.4 92.6-82.8 59-136.4zM529.5 288c-10 0-19.9-1.5-29.5-3.8V384H116v-99.8c-9.6 2.2-19.5 3.8-29.5 3.8-6 0-12.1-.4-18-1.2-5.6-.8-11.1-2.1-16.4-3.6V480c0 17.7 14.3 32 32 32h448c17.7 0 32-14.3 32-32V283.2c-5.4 1.6-10.8 2.9-16.4 3.6-6.1.8-12.1 1.2-18.2 1.2z", + ], + }, + rd = { + prefix: "fas", + iconName: "store-alt", + icon: [ + 640, + 512, + [], + "f54f", + "M320 384H128V224H64v256c0 17.7 14.3 32 32 32h256c17.7 0 32-14.3 32-32V224h-64v160zm314.6-241.8l-85.3-128c-6-8.9-16-14.2-26.7-14.2H117.4c-10.7 0-20.7 5.3-26.6 14.2l-85.3 128c-14.2 21.3 1 49.8 26.6 49.8H608c25.5 0 40.7-28.5 26.6-49.8zM512 496c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V224h-64v272z", + ], + }, + od = { + prefix: "fas", + iconName: "stream", + icon: [ + 512, + 512, + [], + "f550", + "M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z", + ], + }, + ad = { + prefix: "fas", + iconName: "street-view", + icon: [ + 512, + 512, + [], + "f21d", + "M367.9 329.76c-4.62 5.3-9.78 10.1-15.9 13.65v22.94c66.52 9.34 112 28.05 112 49.65 0 30.93-93.12 56-208 56S48 446.93 48 416c0-21.6 45.48-40.3 112-49.65v-22.94c-6.12-3.55-11.28-8.35-15.9-13.65C58.87 345.34 0 378.05 0 416c0 53.02 114.62 96 256 96s256-42.98 256-96c0-37.95-58.87-70.66-144.1-86.24zM256 128c35.35 0 64-28.65 64-64S291.35 0 256 0s-64 28.65-64 64 28.65 64 64 64zm-64 192v96c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-96c17.67 0 32-14.33 32-32v-96c0-26.51-21.49-48-48-48h-11.8c-11.07 5.03-23.26 8-36.2 8s-25.13-2.97-36.2-8H208c-26.51 0-48 21.49-48 48v96c0 17.67 14.33 32 32 32z", + ], + }, + sd = { + prefix: "fas", + iconName: "strikethrough", + icon: [ + 512, + 512, + [], + "f0cc", + "M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z", + ], + }, + cd = { + prefix: "fas", + iconName: "stroopwafel", + icon: [ + 512, + 512, + [], + "f551", + "M188.12 210.74L142.86 256l45.25 45.25L233.37 256l-45.25-45.26zm113.13-22.62L256 142.86l-45.25 45.25L256 233.37l45.25-45.25zm-90.5 135.76L256 369.14l45.26-45.26L256 278.63l-45.25 45.25zM256 0C114.62 0 0 114.62 0 256s114.62 256 256 256 256-114.62 256-256S397.38 0 256 0zm186.68 295.6l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-28.29-28.29-45.25 45.25 33.94 33.94 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-33.94-33.94-45.26 45.26 28.29 28.29c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0L256 414.39l-28.29 28.29c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l28.29-28.29-45.25-45.26-33.94 33.94 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 33.94-33.94-45.25-45.25-28.29 28.29c-3.12 3.12-8.19 3.12-11.31 0L69.32 295.6c-3.12-3.12-3.12-8.19 0-11.31L97.61 256l-28.29-28.29c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l28.29 28.29 45.25-45.26-33.94-33.94-16.97 16.97c-3.12 3.12-8.19 3.12-11.31 0l-11.31-11.31c-3.12-3.12-3.12-8.19 0-11.31l16.97-16.97-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 33.94 33.94 45.26-45.25-28.29-28.29c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0L256 97.61l28.29-28.29c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-28.29 28.29 45.26 45.25 33.94-33.94-16.97-16.97c-3.12-3.12-3.12-8.19 0-11.31l11.31-11.31c3.12-3.12 8.19-3.12 11.31 0l16.97 16.97 16.97-16.97c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31l-16.97 16.97 16.97 16.97c3.12 3.12 3.12 8.19 0 11.31l-11.31 11.31c-3.12 3.12-8.19 3.12-11.31 0l-16.97-16.97-33.94 33.94 45.25 45.26 28.29-28.29c3.12-3.12 8.19-3.12 11.31 0l11.31 11.31c3.12 3.12 3.12 8.19 0 11.31L414.39 256l28.29 28.28a8.015 8.015 0 0 1 0 11.32zM278.63 256l45.26 45.25L369.14 256l-45.25-45.26L278.63 256z", + ], + }, + ld = { + prefix: "fas", + iconName: "subscript", + icon: [ + 512, + 512, + [], + "f12c", + "M395.198 416c3.461-10.526 18.796-21.28 36.265-32.425 16.625-10.605 35.467-22.626 50.341-38.862 17.458-19.054 25.944-40.175 25.944-64.567 0-60.562-50.702-88.146-97.81-88.146-42.491 0-76.378 22.016-94.432 50.447-4.654 7.329-2.592 17.036 4.623 21.865l30.328 20.296c7.032 4.706 16.46 3.084 21.63-3.614 8.022-10.394 18.818-18.225 31.667-18.225 19.387 0 26.266 12.901 26.266 23.948 0 36.159-119.437 57.023-119.437 160.024 0 6.654.561 13.014 1.415 19.331 1.076 7.964 7.834 13.928 15.87 13.928H496c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16H395.198zM272 256c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-62.399a16 16 0 0 1-13.541-7.478l-45.701-72.615c-2.297-3.352-4.422-6.969-6.195-10.209-1.65 3.244-3.647 6.937-5.874 10.582l-44.712 72.147a15.999 15.999 0 0 1-13.6 7.572H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h26.325l56.552-82.709L46.111 96H16C7.163 96 0 88.837 0 80V48c0-8.837 7.163-16 16-16h68.806a16 16 0 0 1 13.645 7.644l39.882 65.126c2.072 3.523 4.053 7.171 5.727 10.37 1.777-3.244 3.92-6.954 6.237-10.537l40.332-65.035A15.999 15.999 0 0 1 204.226 32H272c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-27.979l-52.69 75.671L249.974 256H272z", + ], + }, + ud = { + prefix: "fas", + iconName: "subway", + icon: [ + 448, + 512, + [], + "f239", + "M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zM200 232V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm200 0V120c0-13.255-10.745-24-24-24H272c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h104c13.255 0 24-10.745 24-24zm-48 56c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm-256 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z", + ], + }, + hd = { + prefix: "fas", + iconName: "suitcase", + icon: [ + 512, + 512, + [], + "f0f2", + "M128 480h256V80c0-26.5-21.5-48-48-48H176c-26.5 0-48 21.5-48 48v400zm64-384h128v32H192V96zm320 80v256c0 26.5-21.5 48-48 48h-48V128h48c26.5 0 48 21.5 48 48zM96 480H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h48v352z", + ], + }, + dd = { + prefix: "fas", + iconName: "suitcase-rolling", + icon: [ + 384, + 512, + [], + "f5c1", + "M336 160H48c-26.51 0-48 21.49-48 48v224c0 26.51 21.49 48 48 48h16v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16h128v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16h16c26.51 0 48-21.49 48-48V208c0-26.51-21.49-48-48-48zm-16 216c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h240c4.42 0 8 3.58 8 8v16zm0-96c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h240c4.42 0 8 3.58 8 8v16zM144 48h96v80h48V48c0-26.51-21.49-48-48-48h-96c-26.51 0-48 21.49-48 48v80h48V48z", + ], + }, + pd = { + prefix: "fas", + iconName: "sun", + icon: [ + 512, + 512, + [], + "f185", + "M274.835 12.646l25.516 62.393c4.213 10.301 16.671 14.349 26.134 8.492l57.316-35.479c15.49-9.588 34.808 4.447 30.475 22.142l-16.03 65.475c-2.647 10.81 5.053 21.408 16.152 22.231l67.224 4.987c18.167 1.348 25.546 24.057 11.641 35.826L441.81 242.26c-8.495 7.19-8.495 20.289 0 27.479l51.454 43.548c13.906 11.769 6.527 34.478-11.641 35.826l-67.224 4.987c-11.099.823-18.799 11.421-16.152 22.231l16.03 65.475c4.332 17.695-14.986 31.73-30.475 22.142l-57.316-35.479c-9.463-5.858-21.922-1.81-26.134 8.492l-25.516 62.393c-6.896 16.862-30.774 16.862-37.67 0l-25.516-62.393c-4.213-10.301-16.671-14.349-26.134-8.492l-57.317 35.479c-15.49 9.588-34.808-4.447-30.475-22.142l16.03-65.475c2.647-10.81-5.053-21.408-16.152-22.231l-67.224-4.987c-18.167-1.348-25.546-24.057-11.641-35.826L70.19 269.74c8.495-7.19 8.495-20.289 0-27.479l-51.454-43.548c-13.906-11.769-6.527-34.478 11.641-35.826l67.224-4.987c11.099-.823 18.799-11.421 16.152-22.231l-16.03-65.475c-4.332-17.695 14.986-31.73 30.475-22.142l57.317 35.479c9.463 5.858 21.921 1.81 26.134-8.492l25.516-62.393c6.896-16.861 30.774-16.861 37.67 0zM392 256c0-74.991-61.01-136-136-136-74.991 0-136 61.009-136 136s61.009 136 136 136c74.99 0 136-61.009 136-136zm-32 0c0 57.346-46.654 104-104 104s-104-46.654-104-104 46.654-104 104-104 104 46.654 104 104z", + ], + }, + fd = { + prefix: "fas", + iconName: "superscript", + icon: [ + 512, + 512, + [], + "f12b", + "M395.198 256c3.461-10.526 18.796-21.28 36.265-32.425 16.625-10.605 35.467-22.626 50.341-38.862 17.458-19.054 25.944-40.175 25.944-64.567 0-60.562-50.702-88.146-97.81-88.146-42.491 0-76.378 22.016-94.432 50.447-4.654 7.329-2.592 17.036 4.623 21.865l30.328 20.296c7.032 4.706 16.46 3.084 21.63-3.614 8.022-10.394 18.818-18.225 31.667-18.225 19.387 0 26.266 12.901 26.266 23.948 0 36.159-119.437 57.023-119.437 160.024 0 6.654.561 13.014 1.415 19.331 1.076 7.964 7.834 13.928 15.87 13.928H496c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16H395.198zM272 416c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-62.399a16 16 0 0 1-13.541-7.478l-45.701-72.615c-2.297-3.352-4.422-6.969-6.195-10.209-1.65 3.244-3.647 6.937-5.874 10.582l-44.712 72.147a15.999 15.999 0 0 1-13.6 7.572H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h26.325l56.552-82.709L46.111 256H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h68.806a16 16 0 0 1 13.645 7.644l39.882 65.126c2.072 3.523 4.053 7.171 5.727 10.37 1.777-3.244 3.92-6.954 6.237-10.537l40.332-65.035a16 16 0 0 1 13.598-7.567H272c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-27.979l-52.69 75.671L249.974 416H272z", + ], + }, + md = { + prefix: "fas", + iconName: "surprise", + icon: [ + 496, + 512, + [], + "f5c2", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 208c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm112 208c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm80-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + gd = { + prefix: "fas", + iconName: "swatchbook", + icon: [ + 511, + 512, + [], + "f5c3", + "M479.06 320H372.29L186.15 506.51c-2.06 2.07-4.49 3.58-6.67 5.49h299.58c17.64 0 31.94-14.33 31.94-32V352c0-17.67-14.3-32-31.94-32zm-44.5-152.9l-90.33-90.51c-12.47-12.5-32.69-12.5-45.17 0l-75.5 75.65V416c0 2.96-.67 5.73-.87 8.64l211.87-212.28c12.47-12.5 12.47-32.77 0-45.26zM191.62 32c0-17.67-14.3-32-31.94-32H31.94C14.3 0 0 14.33 0 32v384c0 53.02 42.9 96 95.81 96s95.81-42.98 95.81-96V32zM95.81 440c-13.23 0-23.95-10.75-23.95-24 0-13.26 10.73-24 23.95-24s23.95 10.74 23.95 24c.01 13.25-10.72 24-23.95 24zm31.94-184H63.88v-64h63.88v64zm0-128H63.88V64h63.88v64z", + ], + }, + bd = { + prefix: "fas", + iconName: "swimmer", + icon: [ + 640, + 512, + [], + "f5c4", + "M189.61 310.58c3.54 3.26 15.27 9.42 34.39 9.42s30.86-6.16 34.39-9.42c16.02-14.77 34.5-22.58 53.46-22.58h16.3c18.96 0 37.45 7.81 53.46 22.58 3.54 3.26 15.27 9.42 34.39 9.42s30.86-6.16 34.39-9.42c14.86-13.71 31.88-21.12 49.39-22.16l-112.84-80.6 18-12.86c3.64-2.58 8.28-3.52 12.62-2.61l100.35 21.53c25.91 5.53 51.44-10.97 57-36.88 5.55-25.92-10.95-51.44-36.88-57L437.68 98.47c-30.73-6.58-63.02.12-88.56 18.38l-80.02 57.17c-10.38 7.39-19.36 16.44-26.72 26.94L173.75 299c5.47 3.23 10.82 6.93 15.86 11.58zM624 352h-16c-26.04 0-45.8-8.42-56.09-17.9-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C461.8 343.58 442.04 352 416 352s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C269.8 343.58 250.04 352 224 352s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C77.8 343.58 58.04 352 32 352H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c38.62 0 72.72-12.19 96-31.84 23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-512-96c44.18 0 80-35.82 80-80s-35.82-80-80-80-80 35.82-80 80 35.82 80 80 80z", + ], + }, + _d = { + prefix: "fas", + iconName: "swimming-pool", + icon: [ + 640, + 512, + [], + "f5c5", + "M624 416h-16c-26.04 0-45.8-8.42-56.09-17.9-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C461.8 407.58 442.04 416 416 416s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C269.8 407.58 250.04 416 224 416s-45.8-8.42-56.09-17.9c-8.9-8.21-19.66-14.1-31.77-14.1h-16.3c-12.11 0-22.87 5.89-31.77 14.1C77.8 407.58 58.04 416 32 416H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16c38.62 0 72.72-12.19 96-31.84 23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84s72.72-12.19 96-31.84c23.28 19.66 57.38 31.84 96 31.84h16c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-400-32v-96h192v96c19.12 0 30.86-6.16 34.39-9.42 9.17-8.46 19.2-14.34 29.61-18.07V128c0-17.64 14.36-32 32-32s32 14.36 32 32v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16c0-52.94-43.06-96-96-96s-96 43.06-96 96v96H224v-96c0-17.64 14.36-32 32-32s32 14.36 32 32v16c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-16c0-52.94-43.06-96-96-96s-96 43.06-96 96v228.5c10.41 3.73 20.44 9.62 29.61 18.07 3.53 3.27 15.27 9.43 34.39 9.43z", + ], + }, + vd = { + prefix: "fas", + iconName: "synagogue", + icon: [ + 640, + 512, + [], + "f69b", + "M70 196.51L6.67 268.29A26.643 26.643 0 0 0 0 285.93V512h128V239.58l-38-43.07c-5.31-6.01-14.69-6.01-20 0zm563.33 71.78L570 196.51c-5.31-6.02-14.69-6.02-20 0l-38 43.07V512h128V285.93c0-6.5-2.37-12.77-6.67-17.64zM339.99 7.01c-11.69-9.35-28.29-9.35-39.98 0l-128 102.4A32.005 32.005 0 0 0 160 134.4V512h96v-92.57c0-31.88 21.78-61.43 53.25-66.55C349.34 346.35 384 377.13 384 416v96h96V134.4c0-9.72-4.42-18.92-12.01-24.99l-128-102.4zm52.07 215.55c1.98 3.15-.29 7.24-4 7.24h-38.94L324 269.79c-1.85 2.95-6.15 2.95-8 0l-25.12-39.98h-38.94c-3.72 0-5.98-4.09-4-7.24l19.2-30.56-19.2-30.56c-1.98-3.15.29-7.24 4-7.24h38.94l25.12-40c1.85-2.95 6.15-2.95 8 0l25.12 39.98h38.95c3.71 0 5.98 4.09 4 7.24L372.87 192l19.19 30.56z", + ], + }, + yd = { + prefix: "fas", + iconName: "sync", + icon: [ + 512, + 512, + [], + "f021", + "M440.935 12.574l3.966 82.766C399.416 41.904 331.674 8 256 8 134.813 8 33.933 94.924 12.296 209.824 10.908 217.193 16.604 224 24.103 224h49.084c5.57 0 10.377-3.842 11.676-9.259C103.407 137.408 172.931 80 256 80c60.893 0 114.512 30.856 146.104 77.801l-101.53-4.865c-6.845-.328-12.574 5.133-12.574 11.986v47.411c0 6.627 5.373 12 12 12h200.333c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12h-47.411c-6.853 0-12.315 5.729-11.987 12.574zM256 432c-60.895 0-114.517-30.858-146.109-77.805l101.868 4.871c6.845.327 12.573-5.134 12.573-11.986v-47.412c0-6.627-5.373-12-12-12H12c-6.627 0-12 5.373-12 12V500c0 6.627 5.373 12 12 12h47.385c6.863 0 12.328-5.745 11.985-12.599l-4.129-82.575C112.725 470.166 180.405 504 256 504c121.187 0 222.067-86.924 243.704-201.824 1.388-7.369-4.308-14.176-11.807-14.176h-49.084c-5.57 0-10.377 3.842-11.676 9.259C408.593 374.592 339.069 432 256 432z", + ], + }, + Cd = { + prefix: "fas", + iconName: "sync-alt", + icon: [ + 512, + 512, + [], + "f2f1", + "M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z", + ], + }, + Pd = { + prefix: "fas", + iconName: "syringe", + icon: [ + 512, + 512, + [], + "f48e", + "M201.5 174.8l55.7 55.8c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-55.7-55.8-45.3 45.3 55.8 55.8c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L111 265.2l-26.4 26.4c-17.3 17.3-25.6 41.1-23 65.4l7.1 63.6L2.3 487c-3.1 3.1-3.1 8.2 0 11.3l11.3 11.3c3.1 3.1 8.2 3.1 11.3 0l66.3-66.3 63.6 7.1c23.9 2.6 47.9-5.4 65.4-23l181.9-181.9-135.7-135.7-64.9 65zm308.2-93.3L430.5 2.3c-3.1-3.1-8.2-3.1-11.3 0l-11.3 11.3c-3.1 3.1-3.1 8.2 0 11.3l28.3 28.3-45.3 45.3-56.6-56.6-17-17c-3.1-3.1-8.2-3.1-11.3 0l-33.9 33.9c-3.1 3.1-3.1 8.2 0 11.3l17 17L424.8 223l17 17c3.1 3.1 8.2 3.1 11.3 0l33.9-34c3.1-3.1 3.1-8.2 0-11.3l-73.5-73.5 45.3-45.3 28.3 28.3c3.1 3.1 8.2 3.1 11.3 0l11.3-11.3c3.1-3.2 3.1-8.2 0-11.4z", + ], + }, + xd = { + prefix: "fas", + iconName: "table", + icon: [ + 512, + 512, + [], + "f0ce", + "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z", + ], + }, + Td = { + prefix: "fas", + iconName: "table-tennis", + icon: [ + 512, + 512, + [], + "f45d", + "M496.2 296.5C527.7 218.7 512 126.2 449 63.1 365.1-21 229-21 145.1 63.1l-56 56.1 211.5 211.5c46.1-62.1 131.5-77.4 195.6-34.2zm-217.9 79.7L57.9 155.9c-27.3 45.3-21.7 105 17.3 144.1l34.5 34.6L6.7 424c-8.6 7.5-9.1 20.7-1 28.8l53.4 53.5c8 8.1 21.2 7.6 28.7-1L177.1 402l35.7 35.7c19.7 19.7 44.6 30.5 70.3 33.3-7.1-17-11-35.6-11-55.1-.1-13.8 2.5-27 6.2-39.7zM416 320c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96z", + ], + }, + Sd = { + prefix: "fas", + iconName: "tablet", + icon: [ + 448, + 512, + [], + "f10a", + "M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z", + ], + }, + Od = { + prefix: "fas", + iconName: "tablet-alt", + icon: [ + 448, + 512, + [], + "f3fa", + "M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z", + ], + }, + Ed = { + prefix: "fas", + iconName: "tablets", + icon: [ + 640, + 512, + [], + "f490", + "M160 192C78.9 192 12.5 250.5.1 326.7c-.8 4.8 3.3 9.3 8.3 9.3h303.3c5 0 9.1-4.5 8.3-9.3C307.5 250.5 241.1 192 160 192zm151.6 176H8.4c-5 0-9.1 4.5-8.3 9.3C12.5 453.5 78.9 512 160 512s147.5-58.5 159.9-134.7c.8-4.8-3.3-9.3-8.3-9.3zM593.4 46.6c-56.5-56.5-144.2-61.4-206.9-16-4 2.9-4.3 8.9-.8 12.3L597 254.3c3.5 3.5 9.5 3.2 12.3-.8 45.5-62.7 40.6-150.4-15.9-206.9zM363 65.7c-3.5-3.5-9.5-3.2-12.3.8-45.4 62.7-40.5 150.4 15.9 206.9 56.5 56.5 144.2 61.4 206.9 15.9 4-2.9 4.3-8.9.8-12.3L363 65.7z", + ], + }, + Md = { + prefix: "fas", + iconName: "tachometer-alt", + icon: [ + 576, + 512, + [], + "f3fd", + "M288 32C128.94 32 0 160.94 0 320c0 52.8 14.25 102.26 39.06 144.8 5.61 9.62 16.3 15.2 27.44 15.2h443c11.14 0 21.83-5.58 27.44-15.2C561.75 422.26 576 372.8 576 320c0-159.06-128.94-288-288-288zm0 64c14.71 0 26.58 10.13 30.32 23.65-1.11 2.26-2.64 4.23-3.45 6.67l-9.22 27.67c-5.13 3.49-10.97 6.01-17.64 6.01-17.67 0-32-14.33-32-32S270.33 96 288 96zM96 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm48-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm246.77-72.41l-61.33 184C343.13 347.33 352 364.54 352 384c0 11.72-3.38 22.55-8.88 32H232.88c-5.5-9.45-8.88-20.28-8.88-32 0-33.94 26.5-61.43 59.9-63.59l61.34-184.01c4.17-12.56 17.73-19.45 30.36-15.17 12.57 4.19 19.35 17.79 15.17 30.36zm14.66 57.2l15.52-46.55c3.47-1.29 7.13-2.23 11.05-2.23 17.67 0 32 14.33 32 32s-14.33 32-32 32c-11.38-.01-20.89-6.28-26.57-15.22zM480 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Ad = { + prefix: "fas", + iconName: "tag", + icon: [ + 512, + 512, + [], + "f02b", + "M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z", + ], + }, + Id = { + prefix: "fas", + iconName: "tags", + icon: [ + 640, + 512, + [], + "f02c", + "M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z", + ], + }, + Dd = { + prefix: "fas", + iconName: "tape", + icon: [ + 640, + 512, + [], + "f4db", + "M224 192c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm400 224H380.6c41.5-40.7 67.4-97.3 67.4-160 0-123.7-100.3-224-224-224S0 132.3 0 256s100.3 224 224 224h400c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400-64c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z", + ], + }, + Rd = { + prefix: "fas", + iconName: "tasks", + icon: [ + 512, + 512, + [], + "f0ae", + "M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z", + ], + }, + wd = { + prefix: "fas", + iconName: "taxi", + icon: [ + 512, + 512, + [], + "f1ba", + "M462 241.64l-22-84.84c-9.6-35.2-41.6-60.8-76.8-60.8H352V64c0-17.67-14.33-32-32-32H192c-17.67 0-32 14.33-32 32v32h-11.2c-35.2 0-67.2 25.6-76.8 60.8l-22 84.84C21.41 248.04 0 273.47 0 304v48c0 23.63 12.95 44.04 32 55.12V448c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-40.88c19.05-11.09 32-31.5 32-55.12v-48c0-30.53-21.41-55.96-50-62.36zM96 352c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm20.55-112l17.2-66.36c2.23-8.16 9.59-13.64 15.06-13.64h214.4c5.47 0 12.83 5.48 14.85 12.86L395.45 240h-278.9zM416 352c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Ld = { + prefix: "fas", + iconName: "teeth", + icon: [ + 640, + 512, + [], + "f62e", + "M544 0H96C42.98 0 0 42.98 0 96v320c0 53.02 42.98 96 96 96h448c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96zM160 368c0 26.51-21.49 48-48 48s-48-21.49-48-48v-64c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v64zm0-128c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-64c0-26.51 21.49-48 48-48s48 21.49 48 48v64zm144 120c0 30.93-25.07 56-56 56s-56-25.07-56-56v-56c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v56zm0-120c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-88c0-30.93 25.07-56 56-56s56 25.07 56 56v88zm144 120c0 30.93-25.07 56-56 56s-56-25.07-56-56v-56c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v56zm0-120c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-88c0-30.93 25.07-56 56-56s56 25.07 56 56v88zm128 128c0 26.51-21.49 48-48 48s-48-21.49-48-48v-64c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v64zm0-128c0 8.84-7.16 16-16 16h-64c-8.84 0-16-7.16-16-16v-64c0-26.51 21.49-48 48-48s48 21.49 48 48v64z", + ], + }, + Fd = { + prefix: "fas", + iconName: "teeth-open", + icon: [ + 640, + 512, + [], + "f62f", + "M544 0H96C42.98 0 0 42.98 0 96v64c0 35.35 28.66 64 64 64h512c35.34 0 64-28.65 64-64V96c0-53.02-42.98-96-96-96zM160 176c0 8.84-7.16 16-16 16H80c-8.84 0-16-7.16-16-16v-32c0-26.51 21.49-48 48-48s48 21.49 48 48v32zm144 0c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-56c0-30.93 25.07-56 56-56s56 25.07 56 56v56zm144 0c0 8.84-7.16 16-16 16h-80c-8.84 0-16-7.16-16-16v-56c0-30.93 25.07-56 56-56s56 25.07 56 56v56zm128 0c0 8.84-7.16 16-16 16h-64c-8.84 0-16-7.16-16-16v-32c0-26.51 21.49-48 48-48s48 21.49 48 48v32zm0 144H64c-35.34 0-64 28.65-64 64v32c0 53.02 42.98 96 96 96h448c53.02 0 96-42.98 96-96v-32c0-35.35-28.66-64-64-64zm-416 80c0 26.51-21.49 48-48 48s-48-21.49-48-48v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32zm144-8c0 30.93-25.07 56-56 56s-56-25.07-56-56v-24c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v24zm144 0c0 30.93-25.07 56-56 56s-56-25.07-56-56v-24c0-8.84 7.16-16 16-16h80c8.84 0 16 7.16 16 16v24zm128 8c0 26.51-21.49 48-48 48s-48-21.49-48-48v-32c0-8.84 7.16-16 16-16h64c8.84 0 16 7.16 16 16v32z", + ], + }, + Nd = { + prefix: "fas", + iconName: "terminal", + icon: [ + 640, + 512, + [], + "f120", + "M257.981 272.971L63.638 467.314c-9.373 9.373-24.569 9.373-33.941 0L7.029 444.647c-9.357-9.357-9.375-24.522-.04-33.901L161.011 256 6.99 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L257.981 239.03c9.373 9.372 9.373 24.568 0 33.941zM640 456v-32c0-13.255-10.745-24-24-24H312c-13.255 0-24 10.745-24 24v32c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z", + ], + }, + kd = { + prefix: "fas", + iconName: "text-height", + icon: [ + 576, + 512, + [], + "f034", + "M16 32h288c8.837 0 16 7.163 16 16v96c0 8.837-7.163 16-16 16h-35.496c-8.837 0-16-7.163-16-16V96h-54.761v320H232c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H88c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h34.257V96H67.496v48c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V48c0-8.837 7.163-16 16-16zm475.308 4.685l79.995 80.001C581.309 126.693 574.297 144 559.99 144H512v224h48c15.639 0 20.635 17.991 11.313 27.314l-79.995 80.001c-6.247 6.247-16.381 6.245-22.626 0l-79.995-80.001C378.691 385.307 385.703 368 400.01 368H448V144h-48c-15.639 0-20.635-17.991-11.313-27.314l79.995-80.001c6.247-6.248 16.381-6.245 22.626 0z", + ], + }, + zd = { + prefix: "fas", + iconName: "text-width", + icon: [ + 448, + 512, + [], + "f035", + "M16 32h416c8.837 0 16 7.163 16 16v96c0 8.837-7.163 16-16 16h-35.496c-8.837 0-16-7.163-16-16V96H261.743v128H296c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H152c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h34.257V96H67.496v48c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16V48c0-8.837 7.163-16 16-16zm427.315 340.682l-80.001-79.995C353.991 283.365 336 288.362 336 304v48H112v-47.99c0-14.307-17.307-21.319-27.314-11.313L4.685 372.692c-6.245 6.245-6.247 16.379 0 22.626l80.001 79.995C94.009 484.635 112 479.638 112 464v-48h224v47.99c0 14.307 17.307 21.319 27.314 11.313l80.001-79.995c6.245-6.245 6.248-16.379 0-22.626z", + ], + }, + jd = { + prefix: "fas", + iconName: "th", + icon: [ + 512, + 512, + [], + "f00a", + "M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z", + ], + }, + Bd = { + prefix: "fas", + iconName: "th-large", + icon: [ + 512, + 512, + [], + "f009", + "M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z", + ], + }, + Vd = { + prefix: "fas", + iconName: "th-list", + icon: [ + 512, + 512, + [], + "f00b", + "M149.333 216v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-80c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zM125.333 32H24C10.745 32 0 42.745 0 56v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zm80 448H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm-24-424v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24zm24 264H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24z", + ], + }, + Gd = { + prefix: "fas", + iconName: "theater-masks", + icon: [ + 640, + 512, + [], + "f630", + "M206.86 245.15c-35.88 10.45-59.95 41.2-57.53 74.1 11.4-12.72 28.81-23.7 49.9-30.92l7.63-43.18zM95.81 295L64.08 115.49c-.29-1.62.28-2.62.24-2.65 57.76-32.06 123.12-49.01 189.01-49.01 1.61 0 3.23.17 4.85.19 13.95-13.47 31.73-22.83 51.59-26 18.89-3.02 38.05-4.55 57.18-5.32-9.99-13.95-24.48-24.23-41.77-27C301.27 1.89 277.24 0 253.32 0 176.66 0 101.02 19.42 33.2 57.06 9.03 70.48-3.92 98.48 1.05 126.58l31.73 179.51c14.23 80.52 136.33 142.08 204.45 142.08 3.59 0 6.75-.46 10.01-.8-13.52-17.08-28.94-40.48-39.5-67.58-47.61-12.98-106.06-51.62-111.93-84.79zm97.55-137.46c-.73-4.12-2.23-7.87-4.07-11.4-8.25 8.91-20.67 15.75-35.32 18.32-14.65 2.58-28.67.4-39.48-5.17-.52 3.94-.64 7.98.09 12.1 3.84 21.7 24.58 36.19 46.34 32.37 21.75-3.82 36.28-24.52 32.44-46.22zM606.8 120.9c-88.98-49.38-191.43-67.41-291.98-51.35-27.31 4.36-49.08 26.26-54.04 54.36l-31.73 179.51c-15.39 87.05 95.28 196.27 158.31 207.35 63.03 11.09 204.47-53.79 219.86-140.84l31.73-179.51c4.97-28.11-7.98-56.11-32.15-69.52zm-273.24 96.8c3.84-21.7 24.58-36.19 46.34-32.36 21.76 3.83 36.28 24.52 32.45 46.22-.73 4.12-2.23 7.87-4.07 11.4-8.25-8.91-20.67-15.75-35.32-18.32-14.65-2.58-28.67-.4-39.48 5.17-.53-3.95-.65-7.99.08-12.11zm70.47 198.76c-55.68-9.79-93.52-59.27-89.04-112.9 20.6 25.54 56.21 46.17 99.49 53.78 43.28 7.61 83.82.37 111.93-16.6-14.18 51.94-66.71 85.51-122.38 75.72zm130.3-151.34c-8.25-8.91-20.68-15.75-35.33-18.32-14.65-2.58-28.67-.4-39.48 5.17-.52-3.94-.64-7.98.09-12.1 3.84-21.7 24.58-36.19 46.34-32.37 21.75 3.83 36.28 24.52 32.45 46.22-.73 4.13-2.23 7.88-4.07 11.4z", + ], + }, + Ud = { + prefix: "fas", + iconName: "thermometer", + icon: [ + 512, + 512, + [], + "f491", + "M476.8 20.4c-37.5-30.7-95.5-26.3-131.9 10.2l-45.7 46 50.5 50.5c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-50.4-50.5-45.1 45.4 50.3 50.4c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0L209 167.4l-45.1 45.4L214 263c3.1 3.1 3.1 8.2 0 11.3l-11.3 11.3c-3.1 3.1-8.2 3.1-11.3 0l-50.1-50.2L96 281.1V382L7 471c-9.4 9.4-9.4 24.6 0 33.9 9.4 9.4 24.6 9.4 33.9 0l89-89h99.9L484 162.6c34.9-34.9 42.2-101.5-7.2-142.2z", + ], + }, + Hd = { + prefix: "fas", + iconName: "thermometer-empty", + icon: [ + 256, + 512, + [], + "f2cb", + "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z", + ], + }, + Wd = { + prefix: "fas", + iconName: "thermometer-full", + icon: [ + 256, + 512, + [], + "f2c7", + "M224 96c0-53.019-42.981-96-96-96S32 42.981 32 96v203.347C12.225 321.756.166 351.136.002 383.333c-.359 70.303 56.787 128.176 127.089 128.664.299.002.61.003.909.003 70.698 0 128-57.304 128-128 0-32.459-12.088-62.09-32-84.653V96zm-96 368l-.576-.002c-43.86-.304-79.647-36.544-79.423-80.42.173-33.98 19.266-51.652 31.999-66.08V96c0-26.467 21.533-48 48-48s48 21.533 48 48v221.498c12.63 14.312 32 32.164 32 66.502 0 44.112-35.888 80-80 80zm64-80c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V96c0-17.673 14.327-32 32-32s32 14.327 32 32v232.583c19.124 11.068 32 31.732 32 55.417z", + ], + }, + Xd = { + prefix: "fas", + iconName: "thermometer-half", + icon: [ + 256, + 512, + [], + "f2c9", + "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V224c0-17.673 14.327-32 32-32s32 14.327 32 32v104.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z", + ], + }, + Yd = { + prefix: "fas", + iconName: "thermometer-quarter", + icon: [ + 256, + 512, + [], + "f2ca", + "M192 384c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-23.685 12.876-44.349 32-55.417V288c0-17.673 14.327-32 32-32s32 14.327 32 32v40.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z", + ], + }, + Kd = { + prefix: "fas", + iconName: "thermometer-three-quarters", + icon: [ + 256, + 512, + [], + "f2c8", + "M192 384c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64 0-23.685 12.876-44.349 32-55.417V160c0-17.673 14.327-32 32-32s32 14.327 32 32v168.583c19.124 11.068 32 31.732 32 55.417zm32-84.653c19.912 22.563 32 52.194 32 84.653 0 70.696-57.303 128-128 128-.299 0-.609-.001-.909-.003C56.789 511.509-.357 453.636.002 383.333.166 351.135 12.225 321.755 32 299.347V96c0-53.019 42.981-96 96-96s96 42.981 96 96v203.347zM208 384c0-34.339-19.37-52.19-32-66.502V96c0-26.467-21.533-48-48-48S80 69.533 80 96v221.498c-12.732 14.428-31.825 32.1-31.999 66.08-.224 43.876 35.563 80.116 79.423 80.42L128 464c44.112 0 80-35.888 80-80z", + ], + }, + Zd = { + prefix: "fas", + iconName: "thumbs-down", + icon: [ + 512, + 512, + [], + "f165", + "M0 56v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56zm40 200c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24zm272 256c-20.183 0-29.485-39.293-33.931-57.795-5.206-21.666-10.589-44.07-25.393-58.902-32.469-32.524-49.503-73.967-89.117-113.111a11.98 11.98 0 0 1-3.558-8.521V59.901c0-6.541 5.243-11.878 11.783-11.998 15.831-.29 36.694-9.079 52.651-16.178C256.189 17.598 295.709.017 343.995 0h2.844c42.777 0 93.363.413 113.774 29.737 8.392 12.057 10.446 27.034 6.148 44.632 16.312 17.053 25.063 48.863 16.382 74.757 17.544 23.432 19.143 56.132 9.308 79.469l.11.11c11.893 11.949 19.523 31.259 19.439 49.197-.156 30.352-26.157 58.098-59.553 58.098H350.723C358.03 364.34 384 388.132 384 430.548 384 504 336 512 312 512z", + ], + }, + qd = { + prefix: "fas", + iconName: "thumbs-up", + icon: [ + 512, + 512, + [], + "f164", + "M104 224H24c-13.255 0-24 10.745-24 24v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V248c0-13.255-10.745-24-24-24zM64 472c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zM384 81.452c0 42.416-25.97 66.208-33.277 94.548h101.723c33.397 0 59.397 27.746 59.553 58.098.084 17.938-7.546 37.249-19.439 49.197l-.11.11c9.836 23.337 8.237 56.037-9.308 79.469 8.681 25.895-.069 57.704-16.382 74.757 4.298 17.598 2.244 32.575-6.148 44.632C440.202 511.587 389.616 512 346.839 512l-2.845-.001c-48.287-.017-87.806-17.598-119.56-31.725-15.957-7.099-36.821-15.887-52.651-16.178-6.54-.12-11.783-5.457-11.783-11.998v-213.77c0-3.2 1.282-6.271 3.558-8.521 39.614-39.144 56.648-80.587 89.117-113.111 14.804-14.832 20.188-37.236 25.393-58.902C282.515 39.293 291.817 0 312 0c24 0 72 8 72 81.452z", + ], + }, + Qd = { + prefix: "fas", + iconName: "thumbtack", + icon: [ + 384, + 512, + [], + "f08d", + "M298.028 214.267L285.793 96H328c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v48c0 13.255 10.745 24 24 24h42.207L85.972 214.267C37.465 236.82 0 277.261 0 328c0 13.255 10.745 24 24 24h136v104.007c0 1.242.289 2.467.845 3.578l24 48c2.941 5.882 11.364 5.893 14.311 0l24-48a8.008 8.008 0 0 0 .845-3.578V352h136c13.255 0 24-10.745 24-24-.001-51.183-37.983-91.42-85.973-113.733z", + ], + }, + Jd = { + prefix: "fas", + iconName: "ticket-alt", + icon: [ + 576, + 512, + [], + "f3ff", + "M128 160h320v192H128V160zm400 96c0 26.51 21.49 48 48 48v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c26.51 0 48-21.49 48-48s-21.49-48-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v96c-26.51 0-48 21.49-48 48zm-48-104c0-13.255-10.745-24-24-24H120c-13.255 0-24 10.745-24 24v208c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V152z", + ], + }, + $d = { + prefix: "fas", + iconName: "times", + icon: [ + 352, + 512, + [], + "f00d", + "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z", + ], + }, + ep = { + prefix: "fas", + iconName: "times-circle", + icon: [ + 512, + 512, + [], + "f057", + "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z", + ], + }, + tp = { + prefix: "fas", + iconName: "tint", + icon: [ + 352, + 512, + [], + "f043", + "M205.22 22.09c-7.94-28.78-49.44-30.12-58.44 0C100.01 179.85 0 222.72 0 333.91 0 432.35 78.72 512 176 512s176-79.65 176-178.09c0-111.75-99.79-153.34-146.78-311.82zM176 448c-61.75 0-112-50.25-112-112 0-8.84 7.16-16 16-16s16 7.16 16 16c0 44.11 35.89 80 80 80 8.84 0 16 7.16 16 16s-7.16 16-16 16z", + ], + }, + np = { + prefix: "fas", + iconName: "tint-slash", + icon: [ + 640, + 512, + [], + "f5c7", + "M633.82 458.1L494.97 350.78c.52-5.57 1.03-11.16 1.03-16.87 0-111.76-99.79-153.34-146.78-311.82-7.94-28.78-49.44-30.12-58.44 0-15.52 52.34-36.87 91.96-58.49 125.68L45.47 3.37C38.49-2.05 28.43-.8 23.01 6.18L3.37 31.45C-2.05 38.42-.8 48.47 6.18 53.9l588.36 454.73c6.98 5.43 17.03 4.17 22.46-2.81l19.64-25.27c5.41-6.97 4.16-17.02-2.82-22.45zM144 333.91C144 432.35 222.72 512 320 512c44.71 0 85.37-16.96 116.4-44.7L162.72 255.78c-11.41 23.5-18.72 48.35-18.72 78.13z", + ], + }, + ip = { + prefix: "fas", + iconName: "tired", + icon: [ + 496, + 512, + [], + "f5c8", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm33.8 189.7l80-48c11.6-6.9 24 7.7 15.4 18L343.6 208l33.6 40.3c8.7 10.4-3.9 24.8-15.4 18l-80-48c-7.7-4.7-7.7-15.9 0-20.6zm-163-30c-8.6-10.3 3.8-24.9 15.4-18l80 48c7.8 4.7 7.8 15.9 0 20.6l-80 48c-11.5 6.8-24-7.6-15.4-18l33.6-40.3-33.6-40.3zM248 288c51.9 0 115.3 43.8 123.2 106.7 1.7 13.6-8 24.6-17.7 20.4-25.9-11.1-64.4-17.4-105.5-17.4s-79.6 6.3-105.5 17.4c-9.8 4.2-19.4-7-17.7-20.4C132.7 331.8 196.1 288 248 288z", + ], + }, + rp = { + prefix: "fas", + iconName: "toggle-off", + icon: [ + 576, + 512, + [], + "f204", + "M384 64H192C85.961 64 0 149.961 0 256s85.961 192 192 192h192c106.039 0 192-85.961 192-192S490.039 64 384 64zM64 256c0-70.741 57.249-128 128-128 70.741 0 128 57.249 128 128 0 70.741-57.249 128-128 128-70.741 0-128-57.249-128-128zm320 128h-48.905c65.217-72.858 65.236-183.12 0-256H384c70.741 0 128 57.249 128 128 0 70.74-57.249 128-128 128z", + ], + }, + op = { + prefix: "fas", + iconName: "toggle-on", + icon: [ + 576, + 512, + [], + "f205", + "M576 256c0 106.039-85.961 192-192 192H192C85.961 448 0 362.039 0 256S85.961 64 192 64h192c106.039 0 192 85.961 192 192zM384 128c-70.741 0-128 57.249-128 128 0 70.741 57.249 128 128 128 70.741 0 128-57.249 128-128 0-70.741-57.249-128-128-128", + ], + }, + ap = { + prefix: "fas", + iconName: "toilet-paper", + icon: [ + 576, + 512, + [], + "f71e", + "M128 0C74.98 0 32 85.96 32 192v172.07c0 41.12-9.8 62.77-31.17 126.87C-2.62 501.3 5.09 512 16.01 512h280.92c13.77 0 26-8.81 30.36-21.88 12.83-38.48 24.71-72.4 24.71-126.05V192c0-83.6 23.67-153.52 60.44-192H128zM96 224c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm64 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zM480 0c-53.02 0-96 85.96-96 192s42.98 192 96 192 96-85.96 96-192S533.02 0 480 0zm0 256c-17.67 0-32-28.65-32-64s14.33-64 32-64 32 28.65 32 64-14.33 64-32 64z", + ], + }, + sp = { + prefix: "fas", + iconName: "toolbox", + icon: [ + 512, + 512, + [], + "f552", + "M502.63 214.63l-45.25-45.25c-6-6-14.14-9.37-22.63-9.37H384V80c0-26.51-21.49-48-48-48H176c-26.51 0-48 21.49-48 48v80H77.25c-8.49 0-16.62 3.37-22.63 9.37L9.37 214.63c-6 6-9.37 14.14-9.37 22.63V320h128v-16c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v16h128v-16c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v16h128v-82.75c0-8.48-3.37-16.62-9.37-22.62zM320 160H192V96h128v64zm64 208c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-16H192v16c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-16H0v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96H384v16z", + ], + }, + cp = { + prefix: "fas", + iconName: "tooth", + icon: [ + 448, + 512, + [], + "f5c9", + "M443.98 96.25c-11.01-45.22-47.11-82.06-92.01-93.72-32.19-8.36-63 5.1-89.14 24.33-3.25 2.39-6.96 3.73-10.5 5.48l28.32 18.21c7.42 4.77 9.58 14.67 4.8 22.11-4.46 6.95-14.27 9.86-22.11 4.8L162.83 12.84c-20.7-10.85-43.38-16.4-66.81-10.31-44.9 11.67-81 48.5-92.01 93.72-10.13 41.62-.42 80.81 21.5 110.43 23.36 31.57 32.68 68.66 36.29 107.35 4.4 47.16 10.33 94.16 20.94 140.32l7.8 33.95c3.19 13.87 15.49 23.7 29.67 23.7 13.97 0 26.15-9.55 29.54-23.16l34.47-138.42c4.56-18.32 20.96-31.16 39.76-31.16s35.2 12.85 39.76 31.16l34.47 138.42c3.39 13.61 15.57 23.16 29.54 23.16 14.18 0 26.48-9.83 29.67-23.7l7.8-33.95c10.61-46.15 16.53-93.16 20.94-140.32 3.61-38.7 12.93-75.78 36.29-107.35 21.95-29.61 31.66-68.8 21.53-110.43z", + ], + }, + lp = { + prefix: "fas", + iconName: "torah", + icon: [ + 448, + 512, + [], + "f6a0", + "M448 358.4V25.6c0-16-9.6-25.6-25.6-25.6H96C41.6 0 0 41.6 0 96v320c0 54.4 41.6 96 96 96h326.4c12.8 0 25.6-9.6 25.6-25.6v-16c0-6.4-3.2-12.8-9.6-19.2-3.2-16-3.2-60.8 0-73.6 6.4-3.2 9.6-9.6 9.6-19.2zM139.11 141.21c-2.77-4.41.4-10.14 5.6-10.14h53.08c.9 0 1.73-.46 2.21-1.22l34.4-54.76c2.6-4.13 8.61-4.13 11.21 0l34.4 54.76a2.61 2.61 0 0 0 2.21 1.22h53.08c5.2 0 8.37 5.73 5.6 10.14L314.01 184l26.88 42.79c2.77 4.4-.4 10.13-5.6 10.13h-53.08c-.9 0-1.73.46-2.21 1.22l-34.4 54.76c-2.6 4.13-8.61 4.13-11.21 0L200 238.15a2.61 2.61 0 0 0-2.21-1.22h-53.08c-5.2 0-8.37-5.73-5.6-10.13l26.88-42.8-26.88-42.79zM380.8 448H96c-19.2 0-32-12.8-32-32s16-32 32-32h284.8v64z", + ], + }, + up = { + prefix: "fas", + iconName: "torii-gate", + icon: [ + 512, + 512, + [], + "f6a1", + "M376.45 32h-240.9A303.17 303.17 0 0 1 0 0v96c0 17.67 14.33 32 32 32h32v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h48v240c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V256h256v240c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V256h48c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16h-48v-64h32c17.67 0 32-14.33 32-32V0a303.17 303.17 0 0 1-135.55 32zM128 128h96v64h-96v-64zm256 64h-96v-64h96v64z", + ], + }, + hp = { + prefix: "fas", + iconName: "tractor", + icon: [ + 640, + 512, + [], + "f722", + "M528 336c-48.6 0-88 39.4-88 88s39.4 88 88 88 88-39.4 88-88-39.4-88-88-88zm0 112c-13.23 0-24-10.77-24-24s10.77-24 24-24 24 10.77 24 24-10.77 24-24 24zm80-288h-64v-40.2c0-14.12 4.7-27.76 13.15-38.84 4.42-5.8 3.55-14.06-1.32-19.49L534.2 37.3c-6.66-7.45-18.32-6.92-24.7.78C490.58 60.9 480 89.81 480 119.8V160H377.67L321.58 29.14A47.914 47.914 0 0 0 277.45 0H144c-26.47 0-48 21.53-48 48v146.52c-8.63-6.73-20.96-6.46-28.89 1.47L36 227.1c-8.59 8.59-8.59 22.52 0 31.11l5.06 5.06c-4.99 9.26-8.96 18.82-11.91 28.72H22c-12.15 0-22 9.85-22 22v44c0 12.15 9.85 22 22 22h7.14c2.96 9.91 6.92 19.46 11.91 28.73l-5.06 5.06c-8.59 8.59-8.59 22.52 0 31.11L67.1 476c8.59 8.59 22.52 8.59 31.11 0l5.06-5.06c9.26 4.99 18.82 8.96 28.72 11.91V490c0 12.15 9.85 22 22 22h44c12.15 0 22-9.85 22-22v-7.14c9.9-2.95 19.46-6.92 28.72-11.91l5.06 5.06c8.59 8.59 22.52 8.59 31.11 0l31.11-31.11c8.59-8.59 8.59-22.52 0-31.11l-5.06-5.06c4.99-9.26 8.96-18.82 11.91-28.72H330c12.15 0 22-9.85 22-22v-6h80.54c21.91-28.99 56.32-48 95.46-48 18.64 0 36.07 4.61 51.8 12.2l50.82-50.82c6-6 9.37-14.14 9.37-22.63V192c.01-17.67-14.32-32-31.99-32zM176 416c-44.18 0-80-35.82-80-80s35.82-80 80-80 80 35.82 80 80-35.82 80-80 80zm22-256h-38V64h106.89l41.15 96H198z", + ], + }, + dp = { + prefix: "fas", + iconName: "trademark", + icon: [ + 640, + 512, + [], + "f25c", + "M97.119 163.133H12c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h248.559c6.627 0 12 5.373 12 12v43.133c0 6.627-5.373 12-12 12H175.44V404c0 6.627-5.373 12-12 12h-54.322c-6.627 0-12-5.373-12-12V163.133zM329.825 96h65.425a12 12 0 0 1 11.346 8.093l43.759 127.068c7.161 20.588 16.111 52.812 16.111 52.812h.896s8.95-32.224 16.111-52.812l43.758-127.068A12 12 0 0 1 538.577 96h65.41a12 12 0 0 1 11.961 11.03l24.012 296c.567 6.987-4.951 12.97-11.961 12.97h-54.101a12 12 0 0 1-11.972-11.182l-9.082-132.93c-1.79-24.168 0-53.706 0-53.706h-.896s-10.741 33.566-17.902 53.706l-30.7 84.731a12 12 0 0 1-11.282 7.912h-50.302a12 12 0 0 1-11.282-7.912l-30.7-84.731c-7.161-20.14-17.903-53.706-17.903-53.706h-.895s1.79 29.538 0 53.706l-9.082 132.93c-.428 6.295-5.66 11.182-11.97 11.182H305.4c-7.017 0-12.536-5.994-11.959-12.987l24.425-296A11.999 11.999 0 0 1 329.825 96z", + ], + }, + pp = { + prefix: "fas", + iconName: "traffic-light", + icon: [ + 384, + 512, + [], + "f637", + "M384 192h-64v-37.88c37.2-13.22 64-48.38 64-90.12h-64V32c0-17.67-14.33-32-32-32H96C78.33 0 64 14.33 64 32v32H0c0 41.74 26.8 76.9 64 90.12V192H0c0 41.74 26.8 76.9 64 90.12V320H0c0 42.84 28.25 78.69 66.99 91.05C79.42 468.72 130.6 512 192 512s112.58-43.28 125.01-100.95C355.75 398.69 384 362.84 384 320h-64v-37.88c37.2-13.22 64-48.38 64-90.12zM192 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm0-128c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48z", + ], + }, + fp = { + prefix: "fas", + iconName: "train", + icon: [ + 448, + 512, + [], + "f238", + "M448 96v256c0 51.815-61.624 96-130.022 96l62.98 49.721C386.905 502.417 383.562 512 376 512H72c-7.578 0-10.892-9.594-4.957-14.279L130.022 448C61.82 448 0 403.954 0 352V96C0 42.981 64 0 128 0h192c65 0 128 42.981 128 96zm-48 136V120c0-13.255-10.745-24-24-24H72c-13.255 0-24 10.745-24 24v112c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24zm-176 64c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56z", + ], + }, + mp = { + prefix: "fas", + iconName: "transgender", + icon: [ + 384, + 512, + [], + "f224", + "M372 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C198.5 104.1 172.2 96 144 96 64.5 96 0 160.5 0 240c0 68.5 47.9 125.9 112 140.4V408H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM144 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + gp = { + prefix: "fas", + iconName: "transgender-alt", + icon: [ + 480, + 512, + [], + "f225", + "M468 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-80.7 80.7C294.5 104.1 268.2 96 240 96c-28.2 0-54.5 8.1-76.7 22.1l-16.5-16.5 19.8-19.8c4.7-4.7 4.7-12.3 0-17l-28.3-28.3c-4.7-4.7-12.3-4.7-17 0l-19.8 19.8-19-19 16.9-16.9C107.1 12.9 101.7 0 91 0H12C5.4 0 0 5.4 0 12v79c0 10.7 12.9 16 20.5 8.5l16.9-16.9 19 19-19.8 19.8c-4.7 4.7-4.7 12.3 0 17l28.3 28.3c4.7 4.7 12.3 4.7 17 0l19.8-19.8 16.5 16.5C104.1 185.5 96 211.8 96 240c0 68.5 47.9 125.9 112 140.4V408h-36c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v28c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-28h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-27.6c64.1-14.6 112-71.9 112-140.4 0-28.2-8.1-54.5-22.1-76.7l80.7-80.7 16.9 16.9c7.6 7.6 20.5 2.2 20.5-8.5V12c0-6.6-5.4-12-12-12zM240 320c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + bp = { + prefix: "fas", + iconName: "trash", + icon: [ + 448, + 512, + [], + "f1f8", + "M0 84V56c0-13.3 10.7-24 24-24h112l9.4-18.7c4-8.2 12.3-13.3 21.4-13.3h114.3c9.1 0 17.4 5.1 21.5 13.3L312 32h112c13.3 0 24 10.7 24 24v28c0 6.6-5.4 12-12 12H12C5.4 96 0 90.6 0 84zm415.2 56.7L394.8 467c-1.6 25.3-22.6 45-47.9 45H101.1c-25.3 0-46.3-19.7-47.9-45L32.8 140.7c-.4-6.9 5.1-12.7 12-12.7h358.5c6.8 0 12.3 5.8 11.9 12.7z", + ], + }, + _p = { + prefix: "fas", + iconName: "trash-alt", + icon: [ + 448, + 512, + [], + "f2ed", + "M0 84V56c0-13.3 10.7-24 24-24h112l9.4-18.7c4-8.2 12.3-13.3 21.4-13.3h114.3c9.1 0 17.4 5.1 21.5 13.3L312 32h112c13.3 0 24 10.7 24 24v28c0 6.6-5.4 12-12 12H12C5.4 96 0 90.6 0 84zm416 56v324c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V140c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12zm-272 68c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208zm96 0c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208zm96 0c0-8.8-7.2-16-16-16s-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208z", + ], + }, + vp = { + prefix: "fas", + iconName: "tree", + icon: [ + 384, + 512, + [], + "f1bb", + "M378.31 378.49L298.42 288h30.63c9.01 0 16.98-5 20.78-13.06 3.8-8.04 2.55-17.26-3.28-24.05L268.42 160h28.89c9.1 0 17.3-5.35 20.86-13.61 3.52-8.13 1.86-17.59-4.24-24.08L203.66 4.83c-6.03-6.45-17.28-6.45-23.32 0L70.06 122.31c-6.1 6.49-7.75 15.95-4.24 24.08C69.38 154.65 77.59 160 86.69 160h28.89l-78.14 90.91c-5.81 6.78-7.06 15.99-3.27 24.04C37.97 283 45.93 288 54.95 288h30.63L5.69 378.49c-6 6.79-7.36 16.09-3.56 24.26 3.75 8.05 12 13.25 21.01 13.25H160v24.45l-30.29 48.4c-5.32 10.64 2.42 23.16 14.31 23.16h95.96c11.89 0 19.63-12.52 14.31-23.16L224 440.45V416h136.86c9.01 0 17.26-5.2 21.01-13.25 3.8-8.17 2.44-17.47-3.56-24.26z", + ], + }, + yp = { + prefix: "fas", + iconName: "trophy", + icon: [ + 576, + 512, + [], + "f091", + "M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z", + ], + }, + Cp = { + prefix: "fas", + iconName: "truck", + icon: [ + 640, + 512, + [], + "f0d1", + "M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z", + ], + }, + Pp = { + prefix: "fas", + iconName: "truck-loading", + icon: [ + 640, + 512, + [], + "f4de", + "M50.2 375.6c2.3 8.5 11.1 13.6 19.6 11.3l216.4-58c8.5-2.3 13.6-11.1 11.3-19.6l-49.7-185.5c-2.3-8.5-11.1-13.6-19.6-11.3L151 133.3l24.8 92.7-61.8 16.5-24.8-92.7-77.3 20.7C3.4 172.8-1.7 181.6.6 190.1l49.6 185.5zM384 0c-17.7 0-32 14.3-32 32v323.6L5.9 450c-4.3 1.2-6.8 5.6-5.6 9.8l12.6 46.3c1.2 4.3 5.6 6.8 9.8 5.6l393.7-107.4C418.8 464.1 467.6 512 528 512c61.9 0 112-50.1 112-112V0H384zm144 448c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z", + ], + }, + xp = { + prefix: "fas", + iconName: "truck-monster", + icon: [ + 640, + 512, + [], + "f63b", + "M624 224h-16v-64c0-17.67-14.33-32-32-32h-73.6L419.22 24.02A64.025 64.025 0 0 0 369.24 0H256c-17.67 0-32 14.33-32 32v96H48c-8.84 0-16 7.16-16 16v80H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h16.72c29.21-38.65 75.1-64 127.28-64s98.07 25.35 127.28 64h65.45c29.21-38.65 75.1-64 127.28-64s98.07 25.35 127.28 64H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zm-336-96V64h81.24l51.2 64H288zm304 224h-5.2c-2.2-7.33-5.07-14.28-8.65-20.89l3.67-3.67c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-3.67 3.67A110.85 110.85 0 0 0 512 277.2V272c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v5.2c-7.33 2.2-14.28 5.07-20.89 8.65l-3.67-3.67c-6.25-6.25-16.38-6.25-22.63 0l-22.63 22.63c-6.25 6.25-6.25 16.38 0 22.63l3.67 3.67A110.85 110.85 0 0 0 373.2 352H368c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h5.2c2.2 7.33 5.07 14.28 8.65 20.89l-3.67 3.67c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l3.67-3.67c6.61 3.57 13.57 6.45 20.9 8.65v5.2c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-5.2c7.33-2.2 14.28-5.07 20.9-8.65l3.67 3.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63l-3.67-3.67a110.85 110.85 0 0 0 8.65-20.89h5.2c8.84 0 16-7.16 16-16v-32c-.02-8.84-7.18-16-16.02-16zm-112 80c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm-208-80h-5.2c-2.2-7.33-5.07-14.28-8.65-20.89l3.67-3.67c6.25-6.25 6.25-16.38 0-22.63l-22.63-22.63c-6.25-6.25-16.38-6.25-22.63 0l-3.67 3.67A110.85 110.85 0 0 0 192 277.2V272c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v5.2c-7.33 2.2-14.28 5.07-20.89 8.65l-3.67-3.67c-6.25-6.25-16.38-6.25-22.63 0L58.18 304.8c-6.25 6.25-6.25 16.38 0 22.63l3.67 3.67a110.85 110.85 0 0 0-8.65 20.89H48c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h5.2c2.2 7.33 5.07 14.28 8.65 20.89l-3.67 3.67c-6.25 6.25-6.25 16.38 0 22.63l22.63 22.63c6.25 6.25 16.38 6.25 22.63 0l3.67-3.67c6.61 3.57 13.57 6.45 20.9 8.65v5.2c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-5.2c7.33-2.2 14.28-5.07 20.9-8.65l3.67 3.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.25-6.25 6.25-16.38 0-22.63l-3.67-3.67a110.85 110.85 0 0 0 8.65-20.89h5.2c8.84 0 16-7.16 16-16v-32C288 359.16 280.84 352 272 352zm-112 80c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48z", + ], + }, + Tp = { + prefix: "fas", + iconName: "truck-moving", + icon: [ + 640, + 512, + [], + "f4df", + "M621.3 237.3l-58.5-58.5c-12-12-28.3-18.7-45.3-18.7H480V64c0-17.7-14.3-32-32-32H32C14.3 32 0 46.3 0 64v336c0 44.2 35.8 80 80 80 26.3 0 49.4-12.9 64-32.4 14.6 19.6 37.7 32.4 64 32.4 44.2 0 80-35.8 80-80 0-5.5-.6-10.8-1.6-16h163.2c-1.1 5.2-1.6 10.5-1.6 16 0 44.2 35.8 80 80 80s80-35.8 80-80c0-5.5-.6-10.8-1.6-16H624c8.8 0 16-7.2 16-16v-85.5c0-17-6.7-33.2-18.7-45.2zM80 432c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm128 0c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm272-224h37.5c4.3 0 8.3 1.7 11.3 4.7l43.3 43.3H480v-48zm48 224c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z", + ], + }, + Sp = { + prefix: "fas", + iconName: "truck-pickup", + icon: [ + 640, + 512, + [], + "f63c", + "M624 288h-16v-64c0-17.67-14.33-32-32-32h-48L419.22 56.02A64.025 64.025 0 0 0 369.24 32H256c-17.67 0-32 14.33-32 32v128H64c-17.67 0-32 14.33-32 32v64H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h49.61c-.76 5.27-1.61 10.52-1.61 16 0 61.86 50.14 112 112 112s112-50.14 112-112c0-5.48-.85-10.73-1.61-16h67.23c-.76 5.27-1.61 10.52-1.61 16 0 61.86 50.14 112 112 112s112-50.14 112-112c0-5.48-.85-10.73-1.61-16H624c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM288 96h81.24l76.8 96H288V96zM176 416c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48zm288 0c-26.47 0-48-21.53-48-48s21.53-48 48-48 48 21.53 48 48-21.53 48-48 48z", + ], + }, + Op = { + prefix: "fas", + iconName: "tshirt", + icon: [ + 640, + 512, + [], + "f553", + "M631.2 96.5L436.5 0C416.4 27.8 371.9 47.2 320 47.2S223.6 27.8 203.5 0L8.8 96.5c-7.9 4-11.1 13.6-7.2 21.5l57.2 114.5c4 7.9 13.6 11.1 21.5 7.2l56.6-27.7c10.6-5.2 23 2.5 23 14.4V480c0 17.7 14.3 32 32 32h256c17.7 0 32-14.3 32-32V226.3c0-11.8 12.4-19.6 23-14.4l56.6 27.7c7.9 4 17.5.8 21.5-7.2L638.3 118c4-7.9.8-17.6-7.1-21.5z", + ], + }, + Ep = { + prefix: "fas", + iconName: "tty", + icon: [ + 512, + 512, + [], + "f1e4", + "M5.37 103.822c138.532-138.532 362.936-138.326 501.262 0 6.078 6.078 7.074 15.496 2.583 22.681l-43.214 69.138a18.332 18.332 0 0 1-22.356 7.305l-86.422-34.569a18.335 18.335 0 0 1-11.434-18.846L351.741 90c-62.145-22.454-130.636-21.986-191.483 0l5.953 59.532a18.331 18.331 0 0 1-11.434 18.846l-86.423 34.568a18.334 18.334 0 0 1-22.356-7.305L2.787 126.502a18.333 18.333 0 0 1 2.583-22.68zM96 308v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H92c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zM96 500v-40c0-6.627-5.373-12-12-12H44c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H140c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z", + ], + }, + Mp = { + prefix: "fas", + iconName: "tv", + icon: [ + 640, + 512, + [], + "f26c", + "M592 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h245.1v32h-160c-17.7 0-32 14.3-32 32s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-160v-32H592c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h512v288z", + ], + }, + Ap = { + prefix: "fas", + iconName: "umbrella", + icon: [ + 576, + 512, + [], + "f0e9", + "M557.011 267.631c-51.432-45.217-107.572-43.698-158.567 30.731-5.298 7.861-14.906 7.165-19.736 0-2.483-3.624-32.218-60.808-90.708-60.808-45.766 0-70.542 31.378-90.709 60.808-4.829 7.165-14.436 7.861-19.734 0-50.904-74.285-106.613-76.406-158.567-30.731-10.21 8.264-20.912-1.109-18.696-9.481C32.146 134.573 158.516 64.612 288.001 64.612c128.793 0 256.546 69.961 287.706 193.538 2.206 8.322-8.426 17.793-18.696 9.481zM256 261.001V416c0 17.645-14.355 32-32 32s-32-14.355-32-32c0-17.673-14.327-32-32-32s-32 14.327-32 32c0 52.935 43.065 96 96 96s96-43.065 96-96V261.288c-21.836-10.806-45.425-9.737-64-.287zm64-211.007V32c0-17.673-14.327-32-32-32s-32 14.327-32 32v17.987a372.105 372.105 0 0 1 64 .007z", + ], + }, + Ip = { + prefix: "fas", + iconName: "umbrella-beach", + icon: [ + 640, + 512, + [], + "f5ca", + "M115.38 136.9l102.11 37.18c35.19-81.54 86.21-144.29 139-173.7-95.88-4.89-188.78 36.96-248.53 111.8-6.69 8.4-2.66 21.05 7.42 24.72zm132.25 48.16l238.48 86.83c35.76-121.38 18.7-231.66-42.63-253.98-7.4-2.7-15.13-4-23.09-4-58.02.01-128.27 69.17-172.76 171.15zM521.48 60.5c6.22 16.3 10.83 34.6 13.2 55.19 5.74 49.89-1.42 108.23-18.95 166.98l102.62 37.36c10.09 3.67 21.31-3.43 21.57-14.17 2.32-95.69-41.91-187.44-118.44-245.36zM560 447.98H321.06L386 269.5l-60.14-21.9-72.9 200.37H16c-8.84 0-16 7.16-16 16.01v32.01C0 504.83 7.16 512 16 512h544c8.84 0 16-7.17 16-16.01v-32.01c0-8.84-7.16-16-16-16z", + ], + }, + Dp = { + prefix: "fas", + iconName: "underline", + icon: [ + 448, + 512, + [], + "f0cd", + "M224.264 388.24c-91.669 0-156.603-51.165-156.603-151.392V64H39.37c-8.837 0-16-7.163-16-16V16c0-8.837 7.163-16 16-16h137.39c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-28.813v172.848c0 53.699 28.314 79.444 76.317 79.444 46.966 0 75.796-25.434 75.796-79.965V64h-28.291c-8.837 0-16-7.163-16-16V16c0-8.837 7.163-16 16-16h136.868c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16h-28.291v172.848c0 99.405-64.881 151.392-156.082 151.392zM16 448h416c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16z", + ], + }, + Rp = { + prefix: "fas", + iconName: "undo", + icon: [ + 512, + 512, + [], + "f0e2", + "M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z", + ], + }, + wp = { + prefix: "fas", + iconName: "undo-alt", + icon: [ + 512, + 512, + [], + "f2ea", + "M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z", + ], + }, + Lp = { + prefix: "fas", + iconName: "universal-access", + icon: [ + 512, + 512, + [], + "f29a", + "M256 48c114.953 0 208 93.029 208 208 0 114.953-93.029 208-208 208-114.953 0-208-93.029-208-208 0-114.953 93.029-208 208-208m0-40C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 56C149.961 64 64 149.961 64 256s85.961 192 192 192 192-85.961 192-192S362.039 64 256 64zm0 44c19.882 0 36 16.118 36 36s-16.118 36-36 36-36-16.118-36-36 16.118-36 36-36zm117.741 98.023c-28.712 6.779-55.511 12.748-82.14 15.807.851 101.023 12.306 123.052 25.037 155.621 3.617 9.26-.957 19.698-10.217 23.315-9.261 3.617-19.699-.957-23.316-10.217-8.705-22.308-17.086-40.636-22.261-78.549h-9.686c-5.167 37.851-13.534 56.208-22.262 78.549-3.615 9.255-14.05 13.836-23.315 10.217-9.26-3.617-13.834-14.056-10.217-23.315 12.713-32.541 24.185-54.541 25.037-155.621-26.629-3.058-53.428-9.027-82.141-15.807-8.6-2.031-13.926-10.648-11.895-19.249s10.647-13.926 19.249-11.895c96.686 22.829 124.283 22.783 220.775 0 8.599-2.03 17.218 3.294 19.249 11.895 2.029 8.601-3.297 17.219-11.897 19.249z", + ], + }, + Fp = { + prefix: "fas", + iconName: "university", + icon: [ + 512, + 512, + [], + "f19c", + "M496 128v16a8 8 0 0 1-8 8h-24v12c0 6.627-5.373 12-12 12H60c-6.627 0-12-5.373-12-12v-12H24a8 8 0 0 1-8-8v-16a8 8 0 0 1 4.941-7.392l232-88a7.996 7.996 0 0 1 6.118 0l232 88A8 8 0 0 1 496 128zm-24 304H40c-13.255 0-24 10.745-24 24v16a8 8 0 0 0 8 8h464a8 8 0 0 0 8-8v-16c0-13.255-10.745-24-24-24zM96 192v192H60c-6.627 0-12 5.373-12 12v20h416v-20c0-6.627-5.373-12-12-12h-36V192h-64v192h-64V192h-64v192h-64V192H96z", + ], + }, + Np = { + prefix: "fas", + iconName: "unlink", + icon: [ + 512, + 512, + [], + "f127", + "M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z", + ], + }, + kp = { + prefix: "fas", + iconName: "unlock", + icon: [ + 448, + 512, + [], + "f09c", + "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48z", + ], + }, + zp = { + prefix: "fas", + iconName: "unlock-alt", + icon: [ + 448, + 512, + [], + "f13e", + "M400 256H152V152.9c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v16c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-16C376 68 307.5-.3 223.5 0 139.5.3 72 69.5 72 153.5V256H48c-26.5 0-48 21.5-48 48v160c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V304c0-26.5-21.5-48-48-48zM264 408c0 22.1-17.9 40-40 40s-40-17.9-40-40v-48c0-22.1 17.9-40 40-40s40 17.9 40 40v48z", + ], + }, + jp = { + prefix: "fas", + iconName: "upload", + icon: [ + 512, + 512, + [], + "f093", + "M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z", + ], + }, + Bp = { + prefix: "fas", + iconName: "user", + icon: [ + 448, + 512, + [], + "f007", + "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z", + ], + }, + Vp = { + prefix: "fas", + iconName: "user-alt", + icon: [ + 512, + 512, + [], + "f406", + "M256 288c79.5 0 144-64.5 144-144S335.5 0 256 0 112 64.5 112 144s64.5 144 144 144zm128 32h-55.1c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16H128C57.3 320 0 377.3 0 448v16c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-16c0-70.7-57.3-128-128-128z", + ], + }, + Gp = { + prefix: "fas", + iconName: "user-alt-slash", + icon: [ + 640, + 512, + [], + "f4fa", + "M633.8 458.1L389.6 269.3C433.8 244.7 464 198.1 464 144 464 64.5 399.5 0 320 0c-67.1 0-123 46.1-139 108.2L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3zM198.4 320C124.2 320 64 380.2 64 454.4v9.6c0 26.5 21.5 48 48 48h382.2L245.8 320h-47.4z", + ], + }, + Up = { + prefix: "fas", + iconName: "user-astronaut", + icon: [ + 448, + 512, + [], + "f4fb", + "M64 224h13.5c24.7 56.5 80.9 96 146.5 96s121.8-39.5 146.5-96H384c8.8 0 16-7.2 16-16v-96c0-8.8-7.2-16-16-16h-13.5C345.8 39.5 289.6 0 224 0S102.2 39.5 77.5 96H64c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16zm40-88c0-22.1 21.5-40 48-40h144c26.5 0 48 17.9 48 40v24c0 53-43 96-96 96h-48c-53 0-96-43-96-96v-24zm72 72l12-36 36-12-36-12-12-36-12 36-36 12 36 12 12 36zm151.6 113.4C297.7 340.7 262.2 352 224 352s-73.7-11.3-103.6-30.6C52.9 328.5 0 385 0 454.4v9.6c0 26.5 21.5 48 48 48h80v-64c0-17.7 14.3-32 32-32h128c17.7 0 32 14.3 32 32v64h80c26.5 0 48-21.5 48-48v-9.6c0-69.4-52.9-125.9-120.4-133zM272 448c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-96 0c-8.8 0-16 7.2-16 16v48h32v-48c0-8.8-7.2-16-16-16z", + ], + }, + Hp = { + prefix: "fas", + iconName: "user-check", + icon: [ + 640, + 512, + [], + "f4fc", + "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4zm323-128.4l-27.8-28.1c-4.6-4.7-12.1-4.7-16.8-.1l-104.8 104-45.5-45.8c-4.6-4.7-12.1-4.7-16.8-.1l-28.1 27.9c-4.7 4.6-4.7 12.1-.1 16.8l81.7 82.3c4.6 4.7 12.1 4.7 16.8.1l141.3-140.2c4.6-4.7 4.7-12.2.1-16.8z", + ], + }, + Wp = { + prefix: "fas", + iconName: "user-circle", + icon: [ + 496, + 512, + [], + "f2bd", + "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z", + ], + }, + Xp = { + prefix: "fas", + iconName: "user-clock", + icon: [ + 640, + 512, + [], + "f4fd", + "M496 224c-79.6 0-144 64.4-144 144s64.4 144 144 144 144-64.4 144-144-64.4-144-144-144zm64 150.3c0 5.3-4.4 9.7-9.7 9.7h-60.6c-5.3 0-9.7-4.4-9.7-9.7v-76.6c0-5.3 4.4-9.7 9.7-9.7h12.6c5.3 0 9.7 4.4 9.7 9.7V352h38.3c5.3 0 9.7 4.4 9.7 9.7v12.6zM320 368c0-27.8 6.7-54.1 18.2-77.5-8-1.5-16.2-2.5-24.6-2.5h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h347.1c-45.3-31.9-75.1-84.5-75.1-144zm-96-112c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128z", + ], + }, + Yp = { + prefix: "fas", + iconName: "user-cog", + icon: [ + 640, + 512, + [], + "f4fe", + "M610.5 373.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 400.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm201.2 226.5c-2.3-1.2-4.6-2.6-6.8-3.9l-7.9 4.6c-6 3.4-12.8 5.3-19.6 5.3-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-5.5-17.7 1.9-36.4 17.9-45.7l7.9-4.6c-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-16-9.2-23.4-28-17.9-45.7.9-2.9 2.2-5.8 3.2-8.7-3.8-.3-7.5-1.2-11.4-1.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c10.1 0 19.5-3.2 27.2-8.5-1.2-3.8-2-7.7-2-11.8v-9.2z", + ], + }, + Kp = { + prefix: "fas", + iconName: "user-edit", + icon: [ + 640, + 512, + [], + "f4ff", + "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h274.9c-2.4-6.8-3.4-14-2.6-21.3l6.8-60.9 1.2-11.1 7.9-7.9 77.3-77.3c-24.5-27.7-60-45.5-99.9-45.5zm45.3 145.3l-6.8 61c-1.1 10.2 7.5 18.8 17.6 17.6l60.9-6.8 137.9-137.9-71.7-71.7-137.9 137.8zM633 268.9L595.1 231c-9.3-9.3-24.5-9.3-33.8 0l-37.8 37.8-4.1 4.1 71.8 71.7 41.8-41.8c9.3-9.4 9.3-24.5 0-33.9z", + ], + }, + Zp = { + prefix: "fas", + iconName: "user-friends", + icon: [ + 640, + 512, + [], + "f500", + "M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z", + ], + }, + qp = { + prefix: "fas", + iconName: "user-graduate", + icon: [ + 448, + 512, + [], + "f501", + "M319.4 320.6L224 416l-95.4-95.4C57.1 323.7 0 382.2 0 454.4v9.6c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-9.6c0-72.2-57.1-130.7-128.6-133.8zM13.6 79.8l6.4 1.5v58.4c-7 4.2-12 11.5-12 20.3 0 8.4 4.6 15.4 11.1 19.7L3.5 242c-1.7 6.9 2.1 14 7.6 14h41.8c5.5 0 9.3-7.1 7.6-14l-15.6-62.3C51.4 175.4 56 168.4 56 160c0-8.8-5-16.1-12-20.3V87.1l66 15.9c-8.6 17.2-14 36.4-14 57 0 70.7 57.3 128 128 128s128-57.3 128-128c0-20.6-5.3-39.8-14-57l96.3-23.2c18.2-4.4 18.2-27.1 0-31.5l-190.4-46c-13-3.1-26.7-3.1-39.7 0L13.6 48.2c-18.1 4.4-18.1 27.2 0 31.6z", + ], + }, + Qp = { + prefix: "fas", + iconName: "user-injured", + icon: [ + 448, + 512, + [], + "f728", + "M277.37 11.98C261.08 4.47 243.11 0 224 0c-53.69 0-99.5 33.13-118.51 80h81.19l90.69-68.02zM342.51 80c-7.9-19.47-20.67-36.2-36.49-49.52L239.99 80h102.52zM224 256c70.69 0 128-57.31 128-128 0-5.48-.95-10.7-1.61-16H97.61c-.67 5.3-1.61 10.52-1.61 16 0 70.69 57.31 128 128 128zM80 299.7V512h128.26l-98.45-221.52A132.835 132.835 0 0 0 80 299.7zM0 464c0 26.51 21.49 48 48 48V320.24C18.88 344.89 0 381.26 0 422.4V464zm256-48h-55.38l42.67 96H256c26.47 0 48-21.53 48-48s-21.53-48-48-48zm57.6-128h-16.71c-22.24 10.18-46.88 16-72.89 16s-50.65-5.82-72.89-16h-7.37l42.67 96H256c44.11 0 80 35.89 80 80 0 18.08-6.26 34.59-16.41 48H400c26.51 0 48-21.49 48-48v-41.6c0-74.23-60.17-134.4-134.4-134.4z", + ], + }, + Jp = { + prefix: "fas", + iconName: "user-lock", + icon: [ + 640, + 512, + [], + "f502", + "M320 320c0-11.1 3.1-21.4 8.1-30.5-4.8-.5-9.5-1.5-14.5-1.5h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h280.9c-5.5-9.5-8.9-20.3-8.9-32V320zm-96-64c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm384 32h-32v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80v48h-32c-17.7 0-32 14.3-32 32v160c0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32V320c0-17.7-14.3-32-32-32zm-80 0h-64v-48c0-17.6 14.4-32 32-32s32 14.4 32 32v48z", + ], + }, + $p = { + prefix: "fas", + iconName: "user-md", + icon: [ + 448, + 512, + [], + "f0f0", + "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zM104 424c0 13.3 10.7 24 24 24s24-10.7 24-24-10.7-24-24-24-24 10.7-24 24zm216-135.4v49c36.5 7.4 64 39.8 64 78.4v41.7c0 7.6-5.4 14.2-12.9 15.7l-32.2 6.4c-4.3.9-8.5-1.9-9.4-6.3l-3.1-15.7c-.9-4.3 1.9-8.6 6.3-9.4l19.3-3.9V416c0-62.8-96-65.1-96 1.9v26.7l19.3 3.9c4.3.9 7.1 5.1 6.3 9.4l-3.1 15.7c-.9 4.3-5.1 7.1-9.4 6.3l-31.2-4.2c-7.9-1.1-13.8-7.8-13.8-15.9V416c0-38.6 27.5-70.9 64-78.4v-45.2c-2.2.7-4.4 1.1-6.6 1.9-18 6.3-37.3 9.8-57.4 9.8s-39.4-3.5-57.4-9.8c-7.4-2.6-14.9-4.2-22.6-5.2v81.6c23.1 6.9 40 28.1 40 53.4 0 30.9-25.1 56-56 56s-56-25.1-56-56c0-25.3 16.9-46.5 40-53.4v-80.4C48.5 301 0 355.8 0 422.4v44.8C0 491.9 20.1 512 44.8 512h358.4c24.7 0 44.8-20.1 44.8-44.8v-44.8c0-72-56.8-130.3-128-133.8z", + ], + }, + ef = { + prefix: "fas", + iconName: "user-minus", + icon: [ + 640, + 512, + [], + "f503", + "M624 208H432c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z", + ], + }, + tf = { + prefix: "fas", + iconName: "user-ninja", + icon: [ + 448, + 512, + [], + "f504", + "M325.4 289.2L224 390.6 122.6 289.2C54 295.3 0 352.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-70.2-54-127.1-122.6-133.2zM32 192c27.3 0 51.8-11.5 69.2-29.7 15.1 53.9 64 93.7 122.8 93.7 70.7 0 128-57.3 128-128S294.7 0 224 0c-50.4 0-93.6 29.4-114.5 71.8C92.1 47.8 64 32 32 32c0 33.4 17.1 62.8 43.1 80-26 17.2-43.1 46.6-43.1 80zm144-96h96c17.7 0 32 14.3 32 32H144c0-17.7 14.3-32 32-32z", + ], + }, + nf = { + prefix: "fas", + iconName: "user-plus", + icon: [ + 640, + 512, + [], + "f234", + "M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z", + ], + }, + rf = { + prefix: "fas", + iconName: "user-secret", + icon: [ + 448, + 512, + [], + "f21b", + "M383.9 308.3l23.9-62.6c4-10.5-3.7-21.7-15-21.7h-58.5c11-18.9 17.8-40.6 17.8-64v-.3c39.2-7.8 64-19.1 64-31.7 0-13.3-27.3-25.1-70.1-33-9.2-32.8-27-65.8-40.6-82.8-9.5-11.9-25.9-15.6-39.5-8.8l-27.6 13.8c-9 4.5-19.6 4.5-28.6 0L182.1 3.4c-13.6-6.8-30-3.1-39.5 8.8-13.5 17-31.4 50-40.6 82.8-42.7 7.9-70 19.7-70 33 0 12.6 24.8 23.9 64 31.7v.3c0 23.4 6.8 45.1 17.8 64H56.3c-11.5 0-19.2 11.7-14.7 22.3l25.8 60.2C27.3 329.8 0 372.7 0 422.4v44.8C0 491.9 20.1 512 44.8 512h358.4c24.7 0 44.8-20.1 44.8-44.8v-44.8c0-48.4-25.8-90.4-64.1-114.1zM176 480l-41.6-192 49.6 32 24 40-32 120zm96 0l-32-120 24-40 49.6-32L272 480zm41.7-298.5c-3.9 11.9-7 24.6-16.5 33.4-10.1 9.3-48 22.4-64-25-2.8-8.4-15.4-8.4-18.3 0-17 50.2-56 32.4-64 25-9.5-8.8-12.7-21.5-16.5-33.4-.8-2.5-6.3-5.7-6.3-5.8v-10.8c28.3 3.6 61 5.8 96 5.8s67.7-2.1 96-5.8v10.8c-.1.1-5.6 3.2-6.4 5.8z", + ], + }, + of = { + prefix: "fas", + iconName: "user-shield", + icon: [ + 640, + 512, + [], + "f505", + "M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z", + ], + }, + af = { + prefix: "fas", + iconName: "user-slash", + icon: [ + 640, + 512, + [], + "f506", + "M633.8 458.1L362.3 248.3C412.1 230.7 448 183.8 448 128 448 57.3 390.7 0 320 0c-67.1 0-121.5 51.8-126.9 117.4L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4l588.4 454.7c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.4-6.8 4.1-16.9-2.9-22.3zM96 422.4V464c0 26.5 21.5 48 48 48h350.2L207.4 290.3C144.2 301.3 96 356 96 422.4z", + ], + }, + sf = { + prefix: "fas", + iconName: "user-tag", + icon: [ + 640, + 512, + [], + "f507", + "M630.6 364.9l-90.3-90.2c-12-12-28.3-18.7-45.3-18.7h-79.3c-17.7 0-32 14.3-32 32v79.2c0 17 6.7 33.2 18.7 45.2l90.3 90.2c12.5 12.5 32.8 12.5 45.3 0l92.5-92.5c12.6-12.5 12.6-32.7.1-45.2zm-182.8-21c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24c0 13.2-10.7 24-24 24zm-223.8-88c70.7 0 128-57.3 128-128C352 57.3 294.7 0 224 0S96 57.3 96 128c0 70.6 57.3 127.9 128 127.9zm127.8 111.2V294c-12.2-3.6-24.9-6.2-38.2-6.2h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 287.9 0 348.1 0 422.3v41.6c0 26.5 21.5 48 48 48h352c15.5 0 29.1-7.5 37.9-18.9l-58-58c-18.1-18.1-28.1-42.2-28.1-67.9z", + ], + }, + cf = { + prefix: "fas", + iconName: "user-tie", + icon: [ + 448, + 512, + [], + "f508", + "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm95.8 32.6L272 480l-32-136 32-56h-96l32 56-32 136-47.8-191.4C56.9 292 0 350.3 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-72.1-56.9-130.4-128.2-133.8z", + ], + }, + lf = { + prefix: "fas", + iconName: "user-times", + icon: [ + 640, + 512, + [], + "f235", + "M589.6 240l45.6-45.6c6.3-6.3 6.3-16.5 0-22.8l-22.8-22.8c-6.3-6.3-16.5-6.3-22.8 0L544 194.4l-45.6-45.6c-6.3-6.3-16.5-6.3-22.8 0l-22.8 22.8c-6.3 6.3-6.3 16.5 0 22.8l45.6 45.6-45.6 45.6c-6.3 6.3-6.3 16.5 0 22.8l22.8 22.8c6.3 6.3 16.5 6.3 22.8 0l45.6-45.6 45.6 45.6c6.3 6.3 16.5 6.3 22.8 0l22.8-22.8c6.3-6.3 6.3-16.5 0-22.8L589.6 240zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z", + ], + }, + uf = { + prefix: "fas", + iconName: "users", + icon: [ + 640, + 512, + [], + "f0c0", + "M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z", + ], + }, + hf = { + prefix: "fas", + iconName: "users-cog", + icon: [ + 640, + 512, + [], + "f509", + "M610.5 341.3c2.6-14.1 2.6-28.5 0-42.6l25.8-14.9c3-1.7 4.3-5.2 3.3-8.5-6.7-21.6-18.2-41.2-33.2-57.4-2.3-2.5-6-3.1-9-1.4l-25.8 14.9c-10.9-9.3-23.4-16.5-36.9-21.3v-29.8c0-3.4-2.4-6.4-5.7-7.1-22.3-5-45-4.8-66.2 0-3.3.7-5.7 3.7-5.7 7.1v29.8c-13.5 4.8-26 12-36.9 21.3l-25.8-14.9c-2.9-1.7-6.7-1.1-9 1.4-15 16.2-26.5 35.8-33.2 57.4-1 3.3.4 6.8 3.3 8.5l25.8 14.9c-2.6 14.1-2.6 28.5 0 42.6l-25.8 14.9c-3 1.7-4.3 5.2-3.3 8.5 6.7 21.6 18.2 41.1 33.2 57.4 2.3 2.5 6 3.1 9 1.4l25.8-14.9c10.9 9.3 23.4 16.5 36.9 21.3v29.8c0 3.4 2.4 6.4 5.7 7.1 22.3 5 45 4.8 66.2 0 3.3-.7 5.7-3.7 5.7-7.1v-29.8c13.5-4.8 26-12 36.9-21.3l25.8 14.9c2.9 1.7 6.7 1.1 9-1.4 15-16.2 26.5-35.8 33.2-57.4 1-3.3-.4-6.8-3.3-8.5l-25.8-14.9zM496 368.5c-26.8 0-48.5-21.8-48.5-48.5s21.8-48.5 48.5-48.5 48.5 21.8 48.5 48.5-21.7 48.5-48.5 48.5zM96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm224 32c1.9 0 3.7-.5 5.6-.6 8.3-21.7 20.5-42.1 36.3-59.2 7.4-8 17.9-12.6 28.9-12.6 6.9 0 13.7 1.8 19.6 5.3l7.9 4.6c.8-.5 1.6-.9 2.4-1.4 7-14.6 11.2-30.8 11.2-48 0-61.9-50.1-112-112-112S208 82.1 208 144c0 61.9 50.1 112 112 112zm105.2 194.5c-2.3-1.2-4.6-2.6-6.8-3.9-8.2 4.8-15.3 9.8-27.5 9.8-10.9 0-21.4-4.6-28.9-12.6-18.3-19.8-32.3-43.9-40.2-69.6-10.7-34.5 24.9-49.7 25.8-50.3-.1-2.6-.1-5.2 0-7.8l-7.9-4.6c-3.8-2.2-7-5-9.8-8.1-3.3.2-6.5.6-9.8.6-24.6 0-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h255.4c-3.7-6-6.2-12.8-6.2-20.3v-9.2zM173.1 274.6C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z", + ], + }, + df = { + prefix: "fas", + iconName: "utensil-spoon", + icon: [ + 512, + 512, + [], + "f2e5", + "M480.1 31.9c-55-55.1-164.9-34.5-227.8 28.5-49.3 49.3-55.1 110-28.8 160.4L9 413.2c-11.6 10.5-12.1 28.5-1 39.5L59.3 504c11 11 29.1 10.5 39.5-1.1l192.4-214.4c50.4 26.3 111.1 20.5 160.4-28.8 63-62.9 83.6-172.8 28.5-227.8z", + ], + }, + pf = { + prefix: "fas", + iconName: "utensils", + icon: [ + 416, + 512, + [], + "f2e7", + "M207.9 15.2c.8 4.7 16.1 94.5 16.1 128.8 0 52.3-27.8 89.6-68.9 104.6L168 486.7c.7 13.7-10.2 25.3-24 25.3H80c-13.7 0-24.7-11.5-24-25.3l12.9-238.1C27.7 233.6 0 196.2 0 144 0 109.6 15.3 19.9 16.1 15.2 19.3-5.1 61.4-5.4 64 16.3v141.2c1.3 3.4 15.1 3.2 16 0 1.4-25.3 7.9-139.2 8-141.8 3.3-20.8 44.7-20.8 47.9 0 .2 2.7 6.6 116.5 8 141.8.9 3.2 14.8 3.4 16 0V16.3c2.6-21.6 44.8-21.4 48-1.1zm119.2 285.7l-15 185.1c-1.2 14 9.9 26 23.9 26h56c13.3 0 24-10.7 24-24V24c0-13.2-10.7-24-24-24-82.5 0-221.4 178.5-64.9 300.9z", + ], + }, + ff = { + prefix: "fas", + iconName: "vector-square", + icon: [ + 512, + 512, + [], + "f5cb", + "M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z", + ], + }, + mf = { + prefix: "fas", + iconName: "venus", + icon: [ + 288, + 512, + [], + "f221", + "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80z", + ], + }, + gf = { + prefix: "fas", + iconName: "venus-double", + icon: [ + 512, + 512, + [], + "f226", + "M288 176c0-79.5-64.5-144-144-144S0 96.5 0 176c0 68.5 47.9 125.9 112 140.4V368H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.5 112-71.9 112-140.4zm-224 0c0-44.1 35.9-80 80-80s80 35.9 80 80-35.9 80-80 80-80-35.9-80-80zm336 140.4V368h36c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-36v36c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-36h-36c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h36v-51.6c-21.2-4.8-40.6-14.3-57.2-27.3 14-16.7 25-36 32.1-57.1 14.5 14.8 34.7 24 57.1 24 44.1 0 80-35.9 80-80s-35.9-80-80-80c-22.3 0-42.6 9.2-57.1 24-7.1-21.1-18-40.4-32.1-57.1C303.4 43.6 334.3 32 368 32c79.5 0 144 64.5 144 144 0 68.5-47.9 125.9-112 140.4z", + ], + }, + bf = { + prefix: "fas", + iconName: "venus-mars", + icon: [ + 576, + 512, + [], + "f228", + "M564 0h-79c-10.7 0-16 12.9-8.5 20.5l16.9 16.9-48.7 48.7C422.5 72.1 396.2 64 368 64c-33.7 0-64.6 11.6-89.2 30.9 14 16.7 25 36 32.1 57.1 14.5-14.8 34.7-24 57.1-24 44.1 0 80 35.9 80 80s-35.9 80-80 80c-22.3 0-42.6-9.2-57.1-24-7.1 21.1-18 40.4-32.1 57.1 24.5 19.4 55.5 30.9 89.2 30.9 79.5 0 144-64.5 144-144 0-28.2-8.1-54.5-22.1-76.7l48.7-48.7 16.9 16.9c2.4 2.4 5.4 3.5 8.4 3.5 6.2 0 12.1-4.8 12.1-12V12c0-6.6-5.4-12-12-12zM144 64C64.5 64 0 128.5 0 208c0 68.5 47.9 125.9 112 140.4V400H76c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h36v36c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12v-36h36c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-36v-51.6c64.1-14.6 112-71.9 112-140.4 0-79.5-64.5-144-144-144zm0 224c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z", + ], + }, + _f = { + prefix: "fas", + iconName: "vial", + icon: [ + 480, + 512, + [], + "f492", + "M477.7 186.1L309.5 18.3c-3.1-3.1-8.2-3.1-11.3 0l-34 33.9c-3.1 3.1-3.1 8.2 0 11.3l11.2 11.1L33 316.5c-38.8 38.7-45.1 102-9.4 143.5 20.6 24 49.5 36 78.4 35.9 26.4 0 52.8-10 72.9-30.1l246.3-245.7 11.2 11.1c3.1 3.1 8.2 3.1 11.3 0l34-33.9c3.1-3 3.1-8.1 0-11.2zM318 256H161l148-147.7 78.5 78.3L318 256z", + ], + }, + vf = { + prefix: "fas", + iconName: "vials", + icon: [ + 640, + 512, + [], + "f493", + "M72 64h24v240c0 44.1 35.9 80 80 80s80-35.9 80-80V64h24c4.4 0 8-3.6 8-8V8c0-4.4-3.6-8-8-8H72c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm72 0h64v96h-64V64zm480 384H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM360 64h24v240c0 44.1 35.9 80 80 80s80-35.9 80-80V64h24c4.4 0 8-3.6 8-8V8c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm72 0h64v96h-64V64z", + ], + }, + yf = { + prefix: "fas", + iconName: "video", + icon: [ + 576, + 512, + [], + "f03d", + "M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z", + ], + }, + Cf = { + prefix: "fas", + iconName: "video-slash", + icon: [ + 640, + 512, + [], + "f4e2", + "M633.8 458.1l-55-42.5c15.4-1.4 29.2-13.7 29.2-31.1v-257c0-25.5-29.1-40.4-50.4-25.8L448 177.3v137.2l-32-24.7v-178c0-26.4-21.4-47.8-47.8-47.8H123.9L45.5 3.4C38.5-2 28.5-.8 23 6.2L3.4 31.4c-5.4 7-4.2 17 2.8 22.4L42.7 82 416 370.6l178.5 138c7 5.4 17 4.2 22.5-2.8l19.6-25.3c5.5-6.9 4.2-17-2.8-22.4zM32 400.2c0 26.4 21.4 47.8 47.8 47.8h288.4c11.2 0 21.4-4 29.6-10.5L32 154.7v245.5z", + ], + }, + Pf = { + prefix: "fas", + iconName: "vihara", + icon: [ + 640, + 512, + [], + "f6a7", + "M632.88 400.71L544 352v-64l55.16-17.69c11.79-5.9 11.79-22.72 0-28.62L480 192v-64l27.31-16.3c7.72-7.72 5.61-20.74-4.16-25.62L320 0 136.85 86.07c-9.77 4.88-11.88 17.9-4.16 25.62L160 128v64L40.84 241.69c-11.79 5.9-11.79 22.72 0 28.62L96 288v64L7.12 400.71c-5.42 3.62-7.7 9.63-7 15.29.62 5.01 3.57 9.75 8.72 12.33L64 448v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h160v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48h160v48c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16v-48l55.15-19.67c5.16-2.58 8.1-7.32 8.72-12.33.71-5.67-1.57-11.68-6.99-15.29zM224 128h192v64H224v-64zm-64 224v-64h320v64H160z", + ], + }, + xf = { + prefix: "fas", + iconName: "volleyball-ball", + icon: [ + 495, + 512, + [], + "f45f", + "M223.3 243.4c-.9-37-8.6-72.8-22.7-105.7-90.8 42.4-157.5 122.4-180.3 216.8 13.4 30.8 32.9 58.3 56.9 81.1 22.7-79.2 74.2-147.8 146.1-192.2zM186.4 109c-15-26.4-34.5-50.1-57.4-70.7C38 88.1-15.8 191.2 4 300.5c33.4-83.1 98.4-152 182.4-191.5zM374 274.1c8.6-99.8-27.3-197.5-97.5-264.4-14.7-1.7-51.6-5.5-98.9 8.5 57.3 59.3 91 138.2 93.5 222.7 32.5 17.7 67.3 29 102.9 33.2zm-124.7 9.5c-31.6 19.3-58.7 43.9-80.2 72.6 82 57.3 184.5 75.1 277.5 47.8 19.7-26.4 34.2-56.8 42.2-89.9-26.6 6.6-53.7 10.4-80.9 10.4-54.6-.1-108.9-14.1-158.6-40.9zM151 383.3c-15.2 26-25.7 54.4-32.1 84.2 37.6 23 81.7 36.5 129.1 36.5 61 0 116.7-22.1 159.9-58.6C295 461.5 204.6 420.6 151 383.3zM331.3 22.7c55.3 70.4 82.5 161.2 74.6 253.6 30.3.2 60.5-4.8 89.7-14.2 0-2 .3-4 .3-6 0-107.8-68.7-199.1-164.6-233.4z", + ], + }, + Tf = { + prefix: "fas", + iconName: "volume-down", + icon: [ + 384, + 512, + [], + "f027", + "M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z", + ], + }, + Sf = { + prefix: "fas", + iconName: "volume-mute", + icon: [ + 512, + 512, + [], + "f6a9", + "M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z", + ], + }, + Of = { + prefix: "fas", + iconName: "volume-off", + icon: [ + 257, + 512, + [], + "f026", + "M216.36 71.04L127.39 160H25.33c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.47-25.96-31.98-40.97-16.98z", + ], + }, + Ef = { + prefix: "fas", + iconName: "volume-up", + icon: [ + 576, + 512, + [], + "f028", + "M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z", + ], + }, + Mf = { + prefix: "fas", + iconName: "vr-cardboard", + icon: [ + 640, + 512, + [], + "f729", + "M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h160.22c25.19 0 48.03-14.77 58.36-37.74l27.74-61.64C286.21 331.08 302.35 320 320 320s33.79 11.08 41.68 28.62l27.74 61.64C399.75 433.23 422.6 448 447.78 448H608c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM160 304c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64zm320 0c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64z", + ], + }, + Af = { + prefix: "fas", + iconName: "walking", + icon: [ + 320, + 512, + [], + "f554", + "M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z", + ], + }, + If = { + prefix: "fas", + iconName: "wallet", + icon: [ + 512, + 512, + [], + "f555", + "M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z", + ], + }, + Df = { + prefix: "fas", + iconName: "warehouse", + icon: [ + 640, + 512, + [], + "f494", + "M504 352H136.4c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8H504c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0 96H136.1c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0-192H136.6c-4.4 0-8 3.6-8 8l-.1 48c0 4.4 3.6 8 8 8H504c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm106.5-139L338.4 3.7a48.15 48.15 0 0 0-36.9 0L29.5 117C11.7 124.5 0 141.9 0 161.3V504c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V256c0-17.6 14.6-32 32.6-32h382.8c18 0 32.6 14.4 32.6 32v248c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V161.3c0-19.4-11.7-36.8-29.5-44.3z", + ], + }, + Rf = { + prefix: "fas", + iconName: "weight", + icon: [ + 512, + 512, + [], + "f496", + "M448 64h-25.98C438.44 92.28 448 125.01 448 160c0 105.87-86.13 192-192 192S64 265.87 64 160c0-34.99 9.56-67.72 25.98-96H64C28.71 64 0 92.71 0 128v320c0 35.29 28.71 64 64 64h384c35.29 0 64-28.71 64-64V128c0-35.29-28.71-64-64-64zM256 320c88.37 0 160-71.63 160-160S344.37 0 256 0 96 71.63 96 160s71.63 160 160 160zm-.3-151.94l33.58-78.36c3.5-8.17 12.94-11.92 21.03-8.41 8.12 3.48 11.88 12.89 8.41 21l-33.67 78.55C291.73 188 296 197.45 296 208c0 22.09-17.91 40-40 40s-40-17.91-40-40c0-21.98 17.76-39.77 39.7-39.94z", + ], + }, + wf = { + prefix: "fas", + iconName: "weight-hanging", + icon: [ + 512, + 512, + [], + "f5cd", + "M510.28 445.86l-73.03-292.13c-3.8-15.19-16.44-25.72-30.87-25.72h-60.25c3.57-10.05 5.88-20.72 5.88-32 0-53.02-42.98-96-96-96s-96 42.98-96 96c0 11.28 2.3 21.95 5.88 32h-60.25c-14.43 0-27.08 10.54-30.87 25.72L1.72 445.86C-6.61 479.17 16.38 512 48.03 512h415.95c31.64 0 54.63-32.83 46.3-66.14zM256 128c-17.64 0-32-14.36-32-32s14.36-32 32-32 32 14.36 32 32-14.36 32-32 32z", + ], + }, + Lf = { + prefix: "fas", + iconName: "wheelchair", + icon: [ + 512, + 512, + [], + "f193", + "M496.101 385.669l14.227 28.663c3.929 7.915.697 17.516-7.218 21.445l-65.465 32.886c-16.049 7.967-35.556 1.194-43.189-15.055L331.679 320H192c-15.925 0-29.426-11.71-31.679-27.475C126.433 55.308 128.38 70.044 128 64c0-36.358 30.318-65.635 67.052-63.929 33.271 1.545 60.048 28.905 60.925 62.201.868 32.933-23.152 60.423-54.608 65.039l4.67 32.69H336c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16H215.182l4.572 32H352a32 32 0 0 1 28.962 18.392L438.477 396.8l36.178-18.349c7.915-3.929 17.517-.697 21.446 7.218zM311.358 352h-24.506c-7.788 54.204-54.528 96-110.852 96-61.757 0-112-50.243-112-112 0-41.505 22.694-77.809 56.324-97.156-3.712-25.965-6.844-47.86-9.488-66.333C45.956 198.464 0 261.963 0 336c0 97.047 78.953 176 176 176 71.87 0 133.806-43.308 161.11-105.192L311.358 352z", + ], + }, + Ff = { + prefix: "fas", + iconName: "wifi", + icon: [ + 640, + 512, + [], + "f1eb", + "M634.91 154.88C457.74-8.99 182.19-8.93 5.09 154.88c-6.66 6.16-6.79 16.59-.35 22.98l34.24 33.97c6.14 6.1 16.02 6.23 22.4.38 145.92-133.68 371.3-133.71 517.25 0 6.38 5.85 16.26 5.71 22.4-.38l34.24-33.97c6.43-6.39 6.3-16.82-.36-22.98zM320 352c-35.35 0-64 28.65-64 64s28.65 64 64 64 64-28.65 64-64-28.65-64-64-64zm202.67-83.59c-115.26-101.93-290.21-101.82-405.34 0-6.9 6.1-7.12 16.69-.57 23.15l34.44 33.99c6 5.92 15.66 6.32 22.05.8 83.95-72.57 209.74-72.41 293.49 0 6.39 5.52 16.05 5.13 22.05-.8l34.44-33.99c6.56-6.46 6.33-17.06-.56-23.15z", + ], + }, + Nf = { + prefix: "fas", + iconName: "wind", + icon: [ + 512, + 512, + [], + "f72e", + "M156.66 256H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h142.19c15.95 0 30.77 10.85 33.37 26.58C194.86 366.6 179.42 384 160 384c-14.11 0-26.13-9.19-30.37-21.9-2.11-6.31-8.6-10.1-15.25-10.1H81.63c-9.8 0-17.73 8.81-15.86 18.43C74.39 414.58 113.37 448 160 448c57.09 0 102.7-50.09 95.19-108.63-6.21-48.39-49.74-83.37-98.53-83.37zM16 224h336c59.7 0 106.83-54.76 93.83-116.69-7.61-36.23-36.91-65.53-73.14-73.14-55.44-11.64-105.13 24.91-114.93 75.53-1.86 9.57 6.09 18.3 15.84 18.3h32.8c6.65 0 13.14-3.79 15.25-10.1C325.88 105.19 337.89 96 352 96c19.42 0 34.86 17.39 31.55 37.41-2.6 15.73-17.42 26.59-33.37 26.59H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16zm384 32H243.68c19.34 16.57 33.19 38.79 39.77 64H400c26.47 0 48 21.53 48 48s-21.53 48-48 48c-17.86 0-33.33-9.86-41.56-24.38-2.85-5.03-8.69-7.62-14.47-7.62h-33.82c-10.91 0-18.96 10.81-15.35 21.1 17.77 50.6 70.54 84.75 129.41 72.35 41.22-8.69 75.1-41.65 84.67-82.68C525.98 321.46 470.48 256 400 256z", + ], + }, + kf = { + prefix: "fas", + iconName: "window-close", + icon: [ + 512, + 512, + [], + "f410", + "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-83.6 290.5c4.8 4.8 4.8 12.6 0 17.4l-40.5 40.5c-4.8 4.8-12.6 4.8-17.4 0L256 313.3l-66.5 67.1c-4.8 4.8-12.6 4.8-17.4 0l-40.5-40.5c-4.8-4.8-4.8-12.6 0-17.4l67.1-66.5-67.1-66.5c-4.8-4.8-4.8-12.6 0-17.4l40.5-40.5c4.8-4.8 12.6-4.8 17.4 0l66.5 67.1 66.5-67.1c4.8-4.8 12.6-4.8 17.4 0l40.5 40.5c4.8 4.8 4.8 12.6 0 17.4L313.3 256l67.1 66.5z", + ], + }, + zf = { + prefix: "fas", + iconName: "window-maximize", + icon: [512, 512, [], "f2d0", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-16 160H64v-84c0-6.6 5.4-12 12-12h360c6.6 0 12 5.4 12 12v84z"], + }, + jf = { prefix: "fas", iconName: "window-minimize", icon: [512, 512, [], "f2d1", "M464 352H48c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48z"] }, + Bf = { + prefix: "fas", + iconName: "window-restore", + icon: [ + 512, + 512, + [], + "f2d2", + "M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zm-68 28c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v52h252v-52z", + ], + }, + Vf = { + prefix: "fas", + iconName: "wine-bottle", + icon: [ + 512, + 512, + [], + "f72f", + "M507.31 72.57L439.43 4.69c-6.25-6.25-16.38-6.25-22.63 0l-22.63 22.63c-6.25 6.25-6.25 16.38 0 22.63l-76.67 76.67c-46.58-19.7-102.4-10.73-140.37 27.23L18.75 312.23c-24.99 24.99-24.99 65.52 0 90.51l90.51 90.51c24.99 24.99 65.52 24.99 90.51 0l158.39-158.39c37.96-37.96 46.93-93.79 27.23-140.37l76.67-76.67c6.25 6.25 16.38 6.25 22.63 0l22.63-22.63c6.24-6.24 6.24-16.37-.01-22.62zM179.22 423.29l-90.51-90.51 122.04-122.04 90.51 90.51-122.04 122.04z", + ], + }, + Gf = { + prefix: "fas", + iconName: "wine-glass", + icon: [ + 288, + 512, + [], + "f4e3", + "M216 464h-40V346.81c68.47-15.89 118.05-79.91 111.4-154.16l-15.95-178.1C270.71 6.31 263.9 0 255.74 0H32.26c-8.15 0-14.97 6.31-15.7 14.55L.6 192.66C-6.05 266.91 43.53 330.93 112 346.82V464H72c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h208c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40z", + ], + }, + Uf = { + prefix: "fas", + iconName: "wine-glass-alt", + icon: [ + 288, + 512, + [], + "f5ce", + "M216 464h-40V346.81c68.47-15.89 118.05-79.91 111.4-154.16l-15.95-178.1C270.71 6.31 263.9 0 255.74 0H32.26c-8.15 0-14.97 6.31-15.7 14.55L.6 192.66C-6.05 266.91 43.53 330.93 112 346.82V464H72c-22.09 0-40 17.91-40 40 0 4.42 3.58 8 8 8h208c4.42 0 8-3.58 8-8 0-22.09-17.91-40-40-40zM61.75 48h164.5l7.17 80H54.58l7.17-80z", + ], + }, + Hf = { + prefix: "fas", + iconName: "won-sign", + icon: [ + 576, + 512, + [], + "f159", + "M564 192c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-48.028l18.572-80.61c1.732-7.518-3.978-14.694-11.693-14.694h-46.107a11.998 11.998 0 0 0-11.736 9.5L450.73 128H340.839l-19.725-85.987a12 12 0 0 0-11.696-9.317H265.43a12 12 0 0 0-11.687 9.277L233.696 128H124.975L107.5 42.299a12 12 0 0 0-11.758-9.602H53.628c-7.686 0-13.39 7.124-11.709 14.624L60 128H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h62.342l7.171 32H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h83.856l40.927 182.624A12 12 0 0 0 148.492 480h56.767c5.583 0 10.428-3.85 11.689-9.288L259.335 288h55.086l42.386 182.712A12 12 0 0 0 368.496 480h56.826a12 12 0 0 0 11.694-9.306L479.108 288H564c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-70.146l7.373-32H564zm-425.976 0h80.757l-7.457 32h-66.776l-6.524-32zm45.796 150.029c-6.194 25.831-6.758 47.25-7.321 47.25h-1.126s-1.689-22.05-6.758-47.25L157.599 288h38.812l-12.591 54.029zM274.182 224l1.996-8.602c1.856-7.962 3.457-15.968 4.803-23.398h11.794c1.347 7.43 2.947 15.436 4.803 23.398l1.996 8.602h-25.392zm130.959 118.029c-5.068 25.2-6.758 47.25-6.758 47.25h-1.126c-.563 0-1.126-21.42-7.321-47.25L377.542 288h39.107l-11.508 54.029zM430.281 224h-67.42l-7.34-32h81.577l-6.817 32z", + ], + }, + Wf = { + prefix: "fas", + iconName: "wrench", + icon: [ + 512, + 512, + [], + "f0ad", + "M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z", + ], + }, + Xf = { + prefix: "fas", + iconName: "x-ray", + icon: [ + 640, + 512, + [], + "f497", + "M240 384c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm160 32c8.8 0 16-7.2 16-16s-7.2-16-16-16-16 7.2-16 16 7.2 16 16 16zM624 0H16C7.2 0 0 7.2 0 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16V16c0-8.8-7.2-16-16-16zm0 448h-48V96H64v352H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h608c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM480 248c0 4.4-3.6 8-8 8H336v32h104c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H336v32h64c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48v-16h-64v16c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48h64v-32H200c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h104v-32H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h136v-32H200c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h104v-24c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v24h104c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H336v32h136c4.4 0 8 3.6 8 8v16z", + ], + }, + Yf = { + prefix: "fas", + iconName: "yen-sign", + icon: [ + 384, + 512, + [], + "f157", + "M351.208 32h-65.277a12 12 0 0 0-10.778 6.724l-55.39 113.163c-14.513 34.704-27.133 71.932-27.133 71.932h-1.262s-12.62-37.228-27.133-71.932l-55.39-113.163A11.997 11.997 0 0 0 98.068 32H32.792c-9.057 0-14.85 9.65-10.59 17.643L102.322 200H44c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h88.162L152 293.228V320H44c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h108v92c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-92h108c6.627 0 12-5.373 12-12v-32c0-6.627-5.373-12-12-12H232v-26.772L251.838 256H340c6.627 0 12-5.373 12-12v-32c0-6.627-5.373-12-12-12h-58.322l80.12-150.357C366.058 41.65 360.266 32 351.208 32z", + ], + }, + Kf = { + prefix: "fas", + iconName: "yin-yang", + icon: [ + 496, + 512, + [], + "f6ad", + "M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 376c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm0-128c-53.02 0-96 42.98-96 96s42.98 96 96 96c-106.04 0-192-85.96-192-192S141.96 64 248 64c53.02 0 96 42.98 96 96s-42.98 96-96 96zm0-128c-17.67 0-32 14.33-32 32s14.33 32 32 32 32-14.33 32-32-14.33-32-32-32z", + ], + }, + Zf = { + faAd: r, + faAddressBook: o, + faAddressCard: a, + faAdjust: s, + faAirFreshener: c, + faAlignCenter: l, + faAlignJustify: u, + faAlignLeft: h, + faAlignRight: d, + faAllergies: p, + faAmbulance: f, + faAmericanSignLanguageInterpreting: m, + faAnchor: g, + faAngleDoubleDown: b, + faAngleDoubleLeft: _, + faAngleDoubleRight: v, + faAngleDoubleUp: y, + faAngleDown: C, + faAngleLeft: P, + faAngleRight: x, + faAngleUp: T, + faAngry: S, + faAnkh: O, + faAppleAlt: E, + faArchive: M, + faArchway: A, + faArrowAltCircleDown: I, + faArrowAltCircleLeft: D, + faArrowAltCircleRight: R, + faArrowAltCircleUp: w, + faArrowCircleDown: L, + faArrowCircleLeft: F, + faArrowCircleRight: N, + faArrowCircleUp: k, + faArrowDown: z, + faArrowLeft: j, + faArrowRight: B, + faArrowUp: V, + faArrowsAlt: G, + faArrowsAltH: U, + faArrowsAltV: H, + faAssistiveListeningSystems: W, + faAsterisk: X, + faAt: Y, + faAtlas: K, + faAtom: Z, + faAudioDescription: q, + faAward: Q, + faBackspace: J, + faBackward: $, + faBalanceScale: ee, + faBan: te, + faBandAid: ne, + faBarcode: ie, + faBars: re, + faBaseballBall: oe, + faBasketballBall: ae, + faBath: se, + faBatteryEmpty: ce, + faBatteryFull: le, + faBatteryHalf: ue, + faBatteryQuarter: he, + faBatteryThreeQuarters: de, + faBed: pe, + faBeer: fe, + faBell: me, + faBellSlash: ge, + faBezierCurve: be, + faBible: _e, + faBicycle: ve, + faBinoculars: ye, + faBirthdayCake: Ce, + faBlender: Pe, + faBlenderPhone: xe, + faBlind: Te, + faBold: Se, + faBolt: Oe, + faBomb: Ee, + faBone: Me, + faBong: Ae, + faBook: Ie, + faBookDead: De, + faBookOpen: Re, + faBookReader: we, + faBookmark: Le, + faBowlingBall: Fe, + faBox: Ne, + faBoxOpen: ke, + faBoxes: ze, + faBraille: je, + faBrain: Be, + faBriefcase: Ve, + faBriefcaseMedical: Ge, + faBroadcastTower: Ue, + faBroom: He, + faBrush: We, + faBug: Xe, + faBuilding: Ye, + faBullhorn: Ke, + faBullseye: Ze, + faBurn: qe, + faBus: Qe, + faBusAlt: Je, + faBusinessTime: $e, + faCalculator: et, + faCalendar: tt, + faCalendarAlt: nt, + faCalendarCheck: it, + faCalendarMinus: rt, + faCalendarPlus: ot, + faCalendarTimes: at, + faCamera: st, + faCameraRetro: ct, + faCampground: lt, + faCannabis: ut, + faCapsules: ht, + faCar: dt, + faCarAlt: pt, + faCarBattery: ft, + faCarCrash: mt, + faCarSide: gt, + faCaretDown: bt, + faCaretLeft: _t, + faCaretRight: vt, + faCaretSquareDown: yt, + faCaretSquareLeft: Ct, + faCaretSquareRight: Pt, + faCaretSquareUp: xt, + faCaretUp: Tt, + faCartArrowDown: St, + faCartPlus: Ot, + faCat: Et, + faCertificate: Mt, + faChair: At, + faChalkboard: It, + faChalkboardTeacher: Dt, + faChargingStation: Rt, + faChartArea: wt, + faChartBar: Lt, + faChartLine: Ft, + faChartPie: Nt, + faCheck: kt, + faCheckCircle: zt, + faCheckDouble: jt, + faCheckSquare: Bt, + faChess: Vt, + faChessBishop: Gt, + faChessBoard: Ut, + faChessKing: Ht, + faChessKnight: Wt, + faChessPawn: Xt, + faChessQueen: Yt, + faChessRook: Kt, + faChevronCircleDown: Zt, + faChevronCircleLeft: qt, + faChevronCircleRight: Qt, + faChevronCircleUp: Jt, + faChevronDown: $t, + faChevronLeft: en, + faChevronRight: tn, + faChevronUp: nn, + faChild: rn, + faChurch: on, + faCircle: an, + faCircleNotch: sn, + faCity: cn, + faClipboard: ln, + faClipboardCheck: un, + faClipboardList: hn, + faClock: dn, + faClone: pn, + faClosedCaptioning: fn, + faCloud: mn, + faCloudDownloadAlt: gn, + faCloudMoon: bn, + faCloudSun: _n, + faCloudUploadAlt: vn, + faCocktail: yn, + faCode: Cn, + faCodeBranch: Pn, + faCoffee: xn, + faCog: Tn, + faCogs: Sn, + faCoins: On, + faColumns: En, + faComment: Mn, + faCommentAlt: An, + faCommentDollar: In, + faCommentDots: Dn, + faCommentSlash: Rn, + faComments: wn, + faCommentsDollar: Ln, + faCompactDisc: Fn, + faCompass: Nn, + faCompress: kn, + faConciergeBell: zn, + faCookie: jn, + faCookieBite: Bn, + faCopy: Vn, + faCopyright: Gn, + faCouch: Un, + faCreditCard: Hn, + faCrop: Wn, + faCropAlt: Xn, + faCross: Yn, + faCrosshairs: Kn, + faCrow: Zn, + faCrown: qn, + faCube: Qn, + faCubes: Jn, + faCut: $n, + faDatabase: ei, + faDeaf: ti, + faDesktop: ni, + faDharmachakra: ii, + faDiagnoses: ri, + faDice: oi, + faDiceD20: ai, + faDiceD6: si, + faDiceFive: ci, + faDiceFour: li, + faDiceOne: ui, + faDiceSix: hi, + faDiceThree: di, + faDiceTwo: pi, + faDigitalTachograph: fi, + faDirections: mi, + faDivide: gi, + faDizzy: bi, + faDna: _i, + faDog: vi, + faDollarSign: yi, + faDolly: Ci, + faDollyFlatbed: Pi, + faDonate: xi, + faDoorClosed: Ti, + faDoorOpen: Si, + faDotCircle: Oi, + faDove: Ei, + faDownload: Mi, + faDraftingCompass: Ai, + faDragon: Ii, + faDrawPolygon: Di, + faDrum: Ri, + faDrumSteelpan: wi, + faDrumstickBite: Li, + faDumbbell: Fi, + faDungeon: Ni, + faEdit: ki, + faEject: zi, + faEllipsisH: ji, + faEllipsisV: Bi, + faEnvelope: Vi, + faEnvelopeOpen: Gi, + faEnvelopeOpenText: Ui, + faEnvelopeSquare: Hi, + faEquals: Wi, + faEraser: Xi, + faEuroSign: Yi, + faExchangeAlt: Ki, + faExclamation: Zi, + faExclamationCircle: qi, + faExclamationTriangle: Qi, + faExpand: Ji, + faExpandArrowsAlt: $i, + faExternalLinkAlt: er, + faExternalLinkSquareAlt: tr, + faEye: nr, + faEyeDropper: ir, + faEyeSlash: rr, + faFastBackward: or, + faFastForward: ar, + faFax: sr, + faFeather: cr, + faFeatherAlt: lr, + faFemale: ur, + faFighterJet: hr, + faFile: dr, + faFileAlt: pr, + faFileArchive: fr, + faFileAudio: mr, + faFileCode: gr, + faFileContract: br, + faFileCsv: _r, + faFileDownload: vr, + faFileExcel: yr, + faFileExport: Cr, + faFileImage: Pr, + faFileImport: xr, + faFileInvoice: Tr, + faFileInvoiceDollar: Sr, + faFileMedical: Or, + faFileMedicalAlt: Er, + faFilePdf: Mr, + faFilePowerpoint: Ar, + faFilePrescription: Ir, + faFileSignature: Dr, + faFileUpload: Rr, + faFileVideo: wr, + faFileWord: Lr, + faFill: Fr, + faFillDrip: Nr, + faFilm: kr, + faFilter: zr, + faFingerprint: jr, + faFire: Br, + faFireExtinguisher: Vr, + faFirstAid: Gr, + faFish: Ur, + faFistRaised: Hr, + faFlag: Wr, + faFlagCheckered: Xr, + faFlask: Yr, + faFlushed: Kr, + faFolder: Zr, + faFolderMinus: qr, + faFolderOpen: Qr, + faFolderPlus: Jr, + faFont: $r, + faFontAwesomeLogoFull: eo, + faFootballBall: to, + faForward: no, + faFrog: io, + faFrown: ro, + faFrownOpen: oo, + faFunnelDollar: ao, + faFutbol: so, + faGamepad: co, + faGasPump: lo, + faGavel: uo, + faGem: ho, + faGenderless: po, + faGhost: fo, + faGift: mo, + faGlassMartini: go, + faGlassMartiniAlt: bo, + faGlasses: _o, + faGlobe: vo, + faGlobeAfrica: yo, + faGlobeAmericas: Co, + faGlobeAsia: Po, + faGolfBall: xo, + faGopuram: To, + faGraduationCap: So, + faGreaterThan: Oo, + faGreaterThanEqual: Eo, + faGrimace: Mo, + faGrin: Ao, + faGrinAlt: Io, + faGrinBeam: Do, + faGrinBeamSweat: Ro, + faGrinHearts: wo, + faGrinSquint: Lo, + faGrinSquintTears: Fo, + faGrinStars: No, + faGrinTears: ko, + faGrinTongue: zo, + faGrinTongueSquint: jo, + faGrinTongueWink: Bo, + faGrinWink: Vo, + faGripHorizontal: Go, + faGripVertical: Uo, + faHSquare: Ho, + faHammer: Wo, + faHamsa: Xo, + faHandHolding: Yo, + faHandHoldingHeart: Ko, + faHandHoldingUsd: Zo, + faHandLizard: qo, + faHandPaper: Qo, + faHandPeace: Jo, + faHandPointDown: $o, + faHandPointLeft: ea, + faHandPointRight: ta, + faHandPointUp: na, + faHandPointer: ia, + faHandRock: ra, + faHandScissors: oa, + faHandSpock: aa, + faHands: sa, + faHandsHelping: ca, + faHandshake: la, + faHanukiah: ua, + faHashtag: ha, + faHatWizard: da, + faHaykal: pa, + faHdd: fa, + faHeading: ma, + faHeadphones: ga, + faHeadphonesAlt: ba, + faHeadset: _a, + faHeart: va, + faHeartbeat: ya, + faHelicopter: Ca, + faHighlighter: Pa, + faHiking: xa, + faHippo: Ta, + faHistory: Sa, + faHockeyPuck: Oa, + faHome: Ea, + faHorse: Ma, + faHospital: Aa, + faHospitalAlt: Ia, + faHospitalSymbol: Da, + faHotTub: Ra, + faHotel: wa, + faHourglass: La, + faHourglassEnd: Fa, + faHourglassHalf: Na, + faHourglassStart: ka, + faHouseDamage: za, + faHryvnia: ja, + faICursor: Ba, + faIdBadge: Va, + faIdCard: Ga, + faIdCardAlt: Ua, + faImage: Ha, + faImages: Wa, + faInbox: Xa, + faIndent: Ya, + faIndustry: Ka, + faInfinity: Za, + faInfo: qa, + faInfoCircle: Qa, + faItalic: Ja, + faJedi: $a, + faJoint: es, + faJournalWhills: ts, + faKaaba: ns, + faKey: is, + faKeyboard: rs, + faKhanda: os, + faKiss: as, + faKissBeam: ss, + faKissWinkHeart: cs, + faKiwiBird: ls, + faLandmark: us, + faLanguage: hs, + faLaptop: ds, + faLaptopCode: ps, + faLaugh: fs, + faLaughBeam: ms, + faLaughSquint: gs, + faLaughWink: bs, + faLayerGroup: _s, + faLeaf: vs, + faLemon: ys, + faLessThan: Cs, + faLessThanEqual: Ps, + faLevelDownAlt: xs, + faLevelUpAlt: Ts, + faLifeRing: Ss, + faLightbulb: Os, + faLink: Es, + faLiraSign: Ms, + faList: As, + faListAlt: Is, + faListOl: Ds, + faListUl: Rs, + faLocationArrow: ws, + faLock: Ls, + faLockOpen: Fs, + faLongArrowAltDown: Ns, + faLongArrowAltLeft: ks, + faLongArrowAltRight: zs, + faLongArrowAltUp: js, + faLowVision: Bs, + faLuggageCart: Vs, + faMagic: Gs, + faMagnet: Us, + faMailBulk: Hs, + faMale: Ws, + faMap: Xs, + faMapMarked: Ys, + faMapMarkedAlt: Ks, + faMapMarker: Zs, + faMapMarkerAlt: qs, + faMapPin: Qs, + faMapSigns: Js, + faMarker: $s, + faMars: ec, + faMarsDouble: tc, + faMarsStroke: nc, + faMarsStrokeH: ic, + faMarsStrokeV: rc, + faMask: oc, + faMedal: ac, + faMedkit: sc, + faMeh: cc, + faMehBlank: lc, + faMehRollingEyes: uc, + faMemory: hc, + faMenorah: dc, + faMercury: pc, + faMicrochip: fc, + faMicrophone: mc, + faMicrophoneAlt: gc, + faMicrophoneAltSlash: bc, + faMicrophoneSlash: _c, + faMicroscope: vc, + faMinus: yc, + faMinusCircle: Cc, + faMinusSquare: Pc, + faMobile: xc, + faMobileAlt: Tc, + faMoneyBill: Sc, + faMoneyBillAlt: Oc, + faMoneyBillWave: Ec, + faMoneyBillWaveAlt: Mc, + faMoneyCheck: Ac, + faMoneyCheckAlt: Ic, + faMonument: Dc, + faMoon: Rc, + faMortarPestle: wc, + faMosque: Lc, + faMotorcycle: Fc, + faMountain: Nc, + faMousePointer: kc, + faMusic: zc, + faNetworkWired: jc, + faNeuter: Bc, + faNewspaper: Vc, + faNotEqual: Gc, + faNotesMedical: Uc, + faObjectGroup: Hc, + faObjectUngroup: Wc, + faOilCan: Xc, + faOm: Yc, + faOtter: Kc, + faOutdent: Zc, + faPaintBrush: qc, + faPaintRoller: Qc, + faPalette: Jc, + faPallet: $c, + faPaperPlane: el, + faPaperclip: tl, + faParachuteBox: nl, + faParagraph: il, + faParking: rl, + faPassport: ol, + faPastafarianism: al, + faPaste: sl, + faPause: cl, + faPauseCircle: ll, + faPaw: ul, + faPeace: hl, + faPen: dl, + faPenAlt: pl, + faPenFancy: fl, + faPenNib: ml, + faPenSquare: gl, + faPencilAlt: bl, + faPencilRuler: _l, + faPeopleCarry: vl, + faPercent: yl, + faPercentage: Cl, + faPhone: Pl, + faPhoneSlash: xl, + faPhoneSquare: Tl, + faPhoneVolume: Sl, + faPiggyBank: Ol, + faPills: El, + faPlaceOfWorship: Ml, + faPlane: Al, + faPlaneArrival: Il, + faPlaneDeparture: Dl, + faPlay: Rl, + faPlayCircle: wl, + faPlug: Ll, + faPlus: Fl, + faPlusCircle: Nl, + faPlusSquare: kl, + faPodcast: zl, + faPoll: jl, + faPollH: Bl, + faPoo: Vl, + faPoop: Gl, + faPortrait: Ul, + faPoundSign: Hl, + faPowerOff: Wl, + faPray: Xl, + faPrayingHands: Yl, + faPrescription: Kl, + faPrescriptionBottle: Zl, + faPrescriptionBottleAlt: ql, + faPrint: Ql, + faProcedures: Jl, + faProjectDiagram: $l, + faPuzzlePiece: eu, + faQrcode: tu, + faQuestion: nu, + faQuestionCircle: iu, + faQuidditch: ru, + faQuoteLeft: ou, + faQuoteRight: au, + faQuran: su, + faRandom: cu, + faReceipt: lu, + faRecycle: uu, + faRedo: hu, + faRedoAlt: du, + faRegistered: pu, + faReply: fu, + faReplyAll: mu, + faRetweet: gu, + faRibbon: bu, + faRing: _u, + faRoad: vu, + faRobot: yu, + faRocket: Cu, + faRoute: Pu, + faRss: xu, + faRssSquare: Tu, + faRubleSign: Su, + faRuler: Ou, + faRulerCombined: Eu, + faRulerHorizontal: Mu, + faRulerVertical: Au, + faRunning: Iu, + faRupeeSign: Du, + faSadCry: Ru, + faSadTear: wu, + faSave: Lu, + faSchool: Fu, + faScrewdriver: Nu, + faScroll: ku, + faSearch: zu, + faSearchDollar: ju, + faSearchLocation: Bu, + faSearchMinus: Vu, + faSearchPlus: Gu, + faSeedling: Uu, + faServer: Hu, + faShapes: Wu, + faShare: Xu, + faShareAlt: Yu, + faShareAltSquare: Ku, + faShareSquare: Zu, + faShekelSign: qu, + faShieldAlt: Qu, + faShip: Ju, + faShippingFast: $u, + faShoePrints: eh, + faShoppingBag: th, + faShoppingBasket: nh, + faShoppingCart: ih, + faShower: rh, + faShuttleVan: oh, + faSign: ah, + faSignInAlt: sh, + faSignLanguage: ch, + faSignOutAlt: lh, + faSignal: uh, + faSignature: hh, + faSitemap: dh, + faSkull: ph, + faSkullCrossbones: fh, + faSlash: mh, + faSlidersH: gh, + faSmile: bh, + faSmileBeam: _h, + faSmileWink: vh, + faSmoking: yh, + faSmokingBan: Ch, + faSnowflake: Ph, + faSocks: xh, + faSolarPanel: Th, + faSort: Sh, + faSortAlphaDown: Oh, + faSortAlphaUp: Eh, + faSortAmountDown: Mh, + faSortAmountUp: Ah, + faSortDown: Ih, + faSortNumericDown: Dh, + faSortNumericUp: Rh, + faSortUp: wh, + faSpa: Lh, + faSpaceShuttle: Fh, + faSpider: Nh, + faSpinner: kh, + faSplotch: zh, + faSprayCan: jh, + faSquare: Bh, + faSquareFull: Vh, + faSquareRootAlt: Gh, + faStamp: Uh, + faStar: Hh, + faStarAndCrescent: Wh, + faStarHalf: Xh, + faStarHalfAlt: Yh, + faStarOfDavid: Kh, + faStarOfLife: Zh, + faStepBackward: qh, + faStepForward: Qh, + faStethoscope: Jh, + faStickyNote: $h, + faStop: ed, + faStopCircle: td, + faStopwatch: nd, + faStore: id, + faStoreAlt: rd, + faStream: od, + faStreetView: ad, + faStrikethrough: sd, + faStroopwafel: cd, + faSubscript: ld, + faSubway: ud, + faSuitcase: hd, + faSuitcaseRolling: dd, + faSun: pd, + faSuperscript: fd, + faSurprise: md, + faSwatchbook: gd, + faSwimmer: bd, + faSwimmingPool: _d, + faSynagogue: vd, + faSync: yd, + faSyncAlt: Cd, + faSyringe: Pd, + faTable: xd, + faTableTennis: Td, + faTablet: Sd, + faTabletAlt: Od, + faTablets: Ed, + faTachometerAlt: Md, + faTag: Ad, + faTags: Id, + faTape: Dd, + faTasks: Rd, + faTaxi: wd, + faTeeth: Ld, + faTeethOpen: Fd, + faTerminal: Nd, + faTextHeight: kd, + faTextWidth: zd, + faTh: jd, + faThLarge: Bd, + faThList: Vd, + faTheaterMasks: Gd, + faThermometer: Ud, + faThermometerEmpty: Hd, + faThermometerFull: Wd, + faThermometerHalf: Xd, + faThermometerQuarter: Yd, + faThermometerThreeQuarters: Kd, + faThumbsDown: Zd, + faThumbsUp: qd, + faThumbtack: Qd, + faTicketAlt: Jd, + faTimes: $d, + faTimesCircle: ep, + faTint: tp, + faTintSlash: np, + faTired: ip, + faToggleOff: rp, + faToggleOn: op, + faToiletPaper: ap, + faToolbox: sp, + faTooth: cp, + faTorah: lp, + faToriiGate: up, + faTractor: hp, + faTrademark: dp, + faTrafficLight: pp, + faTrain: fp, + faTransgender: mp, + faTransgenderAlt: gp, + faTrash: bp, + faTrashAlt: _p, + faTree: vp, + faTrophy: yp, + faTruck: Cp, + faTruckLoading: Pp, + faTruckMonster: xp, + faTruckMoving: Tp, + faTruckPickup: Sp, + faTshirt: Op, + faTty: Ep, + faTv: Mp, + faUmbrella: Ap, + faUmbrellaBeach: Ip, + faUnderline: Dp, + faUndo: Rp, + faUndoAlt: wp, + faUniversalAccess: Lp, + faUniversity: Fp, + faUnlink: Np, + faUnlock: kp, + faUnlockAlt: zp, + faUpload: jp, + faUser: Bp, + faUserAlt: Vp, + faUserAltSlash: Gp, + faUserAstronaut: Up, + faUserCheck: Hp, + faUserCircle: Wp, + faUserClock: Xp, + faUserCog: Yp, + faUserEdit: Kp, + faUserFriends: Zp, + faUserGraduate: qp, + faUserInjured: Qp, + faUserLock: Jp, + faUserMd: $p, + faUserMinus: ef, + faUserNinja: tf, + faUserPlus: nf, + faUserSecret: rf, + faUserShield: of, + faUserSlash: af, + faUserTag: sf, + faUserTie: cf, + faUserTimes: lf, + faUsers: uf, + faUsersCog: hf, + faUtensilSpoon: df, + faUtensils: pf, + faVectorSquare: ff, + faVenus: mf, + faVenusDouble: gf, + faVenusMars: bf, + faVial: _f, + faVials: vf, + faVideo: yf, + faVideoSlash: Cf, + faVihara: Pf, + faVolleyballBall: xf, + faVolumeDown: Tf, + faVolumeMute: Sf, + faVolumeOff: Of, + faVolumeUp: Ef, + faVrCardboard: Mf, + faWalking: Af, + faWallet: If, + faWarehouse: Df, + faWeight: Rf, + faWeightHanging: wf, + faWheelchair: Lf, + faWifi: Ff, + faWind: Nf, + faWindowClose: kf, + faWindowMaximize: zf, + faWindowMinimize: jf, + faWindowRestore: Bf, + faWineBottle: Vf, + faWineGlass: Gf, + faWineGlassAlt: Uf, + faWonSign: Hf, + faWrench: Wf, + faXRay: Xf, + faYenSign: Yf, + faYinYang: Kf, + }; + }, + "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js": function (e, t, n) { + "use strict"; + n.r(t), + function (e) { + n.d(t, "FontAwesomeIcon", function () { + return v; + }); + var i = n("../../../../node_modules/@fortawesome/fontawesome-svg-core/index.es.js"), + r = n("../../../../node_modules/prop-types/index.js"), + o = n.n(r), + a = n("../../../../node_modules/react/index.js"), + s = n.n(a); + function c(e) { + return (c = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (e) { + return typeof e; + } + : function (e) { + return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + })(e); + } + function l(e, t, n) { + return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e; + } + function u(e) { + for (var t = 1; t < arguments.length; t++) { + var n = null != arguments[t] ? arguments[t] : {}, + i = Object.keys(n); + "function" == typeof Object.getOwnPropertySymbols && + (i = i.concat( + Object.getOwnPropertySymbols(n).filter(function (e) { + return Object.getOwnPropertyDescriptor(n, e).enumerable; + }) + )), + i.forEach(function (t) { + l(e, t, n[t]); + }); + } + return e; + } + function h(e, t) { + if (null == e) return {}; + var n, + i, + r = (function (e, t) { + if (null == e) return {}; + var n, + i, + r = {}, + o = Object.keys(e); + for (i = 0; i < o.length; i++) (n = o[i]), t.indexOf(n) >= 0 || (r[n] = e[n]); + return r; + })(e, t); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + for (i = 0; i < o.length; i++) (n = o[i]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n])); + } + return r; + } + function d(e) { + return ( + (function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = new Array(e.length); t < e.length; t++) n[t] = e[t]; + return n; + } + })(e) || + (function (e) { + if (Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e)) return Array.from(e); + })(e) || + (function () { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + })() + ); + } + var p = "undefined" != typeof window ? window : void 0 !== e ? e : "undefined" != typeof self ? self : {}, + f = (function (e, t) { + return e((t = { exports: {} }), t.exports), t.exports; + })(function (e) { + !(function (t) { + var n = function (e, t, i) { + if (!c(t) || u(t) || h(t) || d(t) || s(t)) return t; + var r, + o = 0, + a = 0; + if (l(t)) for (r = [], a = t.length; o < a; o++) r.push(n(e, t[o], i)); + else for (var p in ((r = {}), t)) Object.prototype.hasOwnProperty.call(t, p) && (r[e(p, i)] = n(e, t[p], i)); + return r; + }, + i = function (e) { + return p(e) + ? e + : (e = e.replace(/[\-_\s]+(.)?/g, function (e, t) { + return t ? t.toUpperCase() : ""; + })) + .substr(0, 1) + .toLowerCase() + e.substr(1); + }, + r = function (e) { + var t = i(e); + return t.substr(0, 1).toUpperCase() + t.substr(1); + }, + o = function (e, t) { + return (function (e, t) { + var n = (t = t || {}).separator || "_", + i = t.split || /(?=[A-Z])/; + return e.split(i).join(n); + })(e, t).toLowerCase(); + }, + a = Object.prototype.toString, + s = function (e) { + return "function" == typeof e; + }, + c = function (e) { + return e === Object(e); + }, + l = function (e) { + return "[object Array]" == a.call(e); + }, + u = function (e) { + return "[object Date]" == a.call(e); + }, + h = function (e) { + return "[object RegExp]" == a.call(e); + }, + d = function (e) { + return "[object Boolean]" == a.call(e); + }, + p = function (e) { + return (e -= 0) == e; + }, + f = function (e, t) { + var n = t && "process" in t ? t.process : t; + return "function" != typeof n + ? e + : function (t, i) { + return n(t, e, i); + }; + }, + m = { + camelize: i, + decamelize: o, + pascalize: r, + depascalize: o, + camelizeKeys: function (e, t) { + return n(f(i, t), e); + }, + decamelizeKeys: function (e, t) { + return n(f(o, t), e, t); + }, + pascalizeKeys: function (e, t) { + return n(f(r, t), e); + }, + depascalizeKeys: function () { + return this.decamelizeKeys.apply(this, arguments); + }, + }; + e.exports ? (e.exports = m) : (t.humps = m); + })(p); + }); + function m(e) { + return e + .split(";") + .map(function (e) { + return e.trim(); + }) + .filter(function (e) { + return e; + }) + .reduce(function (e, t) { + var n, + i = t.indexOf(":"), + r = f.camelize(t.slice(0, i)), + o = t.slice(i + 1).trim(); + return r.startsWith("webkit") ? (e[((n = r), n.charAt(0).toUpperCase() + n.slice(1))] = o) : (e[r] = o), e; + }, {}); + } + var g = !1; + try { + g = !1; + } catch (e) {} + function b(e, t) { + return (Array.isArray(t) && t.length > 0) || (!Array.isArray(t) && t) ? l({}, e, t) : {}; + } + function _(e) { + return null === e + ? null + : "object" === c(e) && e.prefix && e.iconName + ? e + : Array.isArray(e) && 2 === e.length + ? { prefix: e[0], iconName: e[1] } + : "string" == typeof e + ? { prefix: "fas", iconName: e } + : void 0; + } + function v(e) { + var t = e.icon, + n = e.mask, + r = e.symbol, + o = e.className, + a = e.title, + s = _(t), + c = b( + "classes", + [].concat( + d( + (function (e) { + var t, + n = + (l( + (t = { + "fa-spin": e.spin, + "fa-pulse": e.pulse, + "fa-fw": e.fixedWidth, + "fa-inverse": e.inverse, + "fa-border": e.border, + "fa-li": e.listItem, + "fa-flip-horizontal": "horizontal" === e.flip || "both" === e.flip, + "fa-flip-vertical": "vertical" === e.flip || "both" === e.flip, + }), + "fa-".concat(e.size), + null !== e.size + ), + l(t, "fa-rotate-".concat(e.rotation), null !== e.rotation), + l(t, "fa-pull-".concat(e.pull), null !== e.pull), + t); + return Object.keys(n) + .map(function (e) { + return n[e] ? e : null; + }) + .filter(function (e) { + return e; + }); + })(e) + ), + d(o.split(" ")) + ) + ), + h = b("transform", "string" == typeof e.transform ? i.parse.transform(e.transform) : e.transform), + p = b("mask", _(n)), + f = Object(i.icon)(s, u({}, c, h, p, { symbol: r, title: a })); + if (!f) + return ( + (function () { + var e; + !g && console && "function" == typeof console.error && (e = console).error.apply(e, arguments); + })("Could not find icon", s), + null + ); + var m = f.abstract, + C = {}; + return ( + Object.keys(e).forEach(function (t) { + v.defaultProps.hasOwnProperty(t) || (C[t] = e[t]); + }), + y(m[0], C) + ); + } + (v.displayName = "FontAwesomeIcon"), + (v.propTypes = { + border: o.a.bool, + className: o.a.string, + mask: o.a.oneOfType([o.a.object, o.a.array, o.a.string]), + fixedWidth: o.a.bool, + inverse: o.a.bool, + flip: o.a.oneOf(["horizontal", "vertical", "both"]), + icon: o.a.oneOfType([o.a.object, o.a.array, o.a.string]), + listItem: o.a.bool, + pull: o.a.oneOf(["right", "left"]), + pulse: o.a.bool, + rotation: o.a.oneOf([90, 180, 270]), + size: o.a.oneOf(["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"]), + spin: o.a.bool, + symbol: o.a.oneOfType([o.a.bool, o.a.string]), + title: o.a.string, + transform: o.a.oneOfType([o.a.string, o.a.object]), + }), + (v.defaultProps = { + border: !1, + className: "", + mask: null, + fixedWidth: !1, + inverse: !1, + flip: null, + icon: null, + listItem: !1, + pull: null, + pulse: !1, + rotation: null, + size: null, + spin: !1, + symbol: !1, + title: "", + transform: null, + }); + var y = function e(t, n) { + var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + if ("string" == typeof n) return n; + var r = (n.children || []).map(function (n) { + return e(t, n); + }), + o = Object.keys(n.attributes || {}).reduce( + function (e, t) { + var i = n.attributes[t]; + switch (t) { + case "class": + (e.attrs.className = i), delete n.attributes.class; + break; + case "style": + e.attrs.style = m(i); + break; + default: + 0 === t.indexOf("aria-") || 0 === t.indexOf("data-") ? (e.attrs[t.toLowerCase()] = i) : (e.attrs[f.camelize(t)] = i); + } + return e; + }, + { attrs: {} } + ), + a = i.style, + s = void 0 === a ? {} : a, + c = h(i, ["style"]); + return (o.attrs.style = u({}, o.attrs.style, s)), t.apply(void 0, [n.tag, u({}, o.attrs, c)].concat(d(r))); + }.bind(null, s.a.createElement); + }.call(this, n("../../../../node_modules/webpack/buildin/global.js")); + }, + "../../../../node_modules/classnames/index.js": function (e, t, n) { + var i; + !(function () { + "use strict"; + var n = {}.hasOwnProperty; + function r() { + for (var e = [], t = 0; t < arguments.length; t++) { + var i = arguments[t]; + if (i) { + var o = typeof i; + if ("string" === o || "number" === o) e.push(i); + else if (Array.isArray(i) && i.length) { + var a = r.apply(null, i); + a && e.push(a); + } else if ("object" === o) for (var s in i) n.call(i, s) && i[s] && e.push(s); + } + } + return e.join(" "); + } + e.exports + ? ((r.default = r), (e.exports = r)) + : void 0 === + (i = function () { + return r; + }.apply(t, [])) || (e.exports = i); + })(); + }, + "../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js!./components/actionTabs/actionTabs.scss": function (e, t, n) { + (e.exports = n("../../../../node_modules/css-loader/lib/css-base.js")(!1)).push([ + e.i, + '#inspector-host {\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0px; }\n\n#__resizable_base__ {\n display: none; }\n\n#actionTabs {\n background: #333333;\n height: 100%;\n margin: 0;\n padding: 0;\n display: grid;\n grid-template-rows: auto 1fr;\n font: 14px "Arial";\n overflow: hidden; }\n #actionTabs .hoverIcon:hover {\n opacity: 0.8; }\n #actionTabs #header {\n height: 30px;\n font-size: 16px;\n color: white;\n background: #222222;\n grid-row: 1;\n text-align: center;\n display: grid;\n grid-template-columns: 30px 1fr 50px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n #actionTabs #header #logo {\n grid-column: 1;\n width: 24px;\n height: 24px;\n display: flex;\n align-self: center;\n justify-self: center; }\n #actionTabs #header #back {\n grid-column: 1;\n display: grid;\n align-self: center;\n justify-self: center;\n cursor: pointer; }\n #actionTabs #header #title {\n grid-column: 2;\n display: grid;\n align-items: center;\n text-align: center; }\n #actionTabs #header #commands {\n grid-column: 3;\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 1fr; }\n #actionTabs #header #commands .expand {\n grid-column: 1;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #actionTabs #header #commands .close {\n grid-column: 2;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #actionTabs .tabs {\n display: grid;\n grid-row: 2;\n grid-template-rows: 40px 1fr;\n font: 14px "Arial";\n overflow: hidden; }\n #actionTabs .tabs .labels {\n grid-row: 1;\n display: flex;\n align-items: center;\n justify-items: center;\n border-bottom: 1px solid #ffffff;\n margin: 0;\n padding: 0; }\n #actionTabs .tabs .labels .label {\n font-size: 24px;\n color: white;\n width: 40px;\n display: flex;\n align-content: center;\n justify-content: center;\n border: 1px solid transparent;\n border-bottom: none;\n background: #333333;\n padding: 5px;\n height: 28px;\n cursor: pointer; }\n #actionTabs .tabs .labels .label.active {\n border-color: #ffffff;\n border-bottom: 2px solid transparent;\n margin-bottom: -2px; }\n #actionTabs .tabs .panes {\n grid-row: 2;\n display: grid;\n grid-template-rows: 100%;\n overflow: hidden; }\n #actionTabs .tabs .panes .infoMessage {\n opacity: 0.5;\n color: white;\n margin: 15px 5px 0px 5px; }\n #actionTabs .tabs .panes .pane {\n color: white;\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n #actionTabs .tabs .panes .pane .underline {\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.5); }\n #actionTabs .tabs .panes .pane .textureLinkLine {\n display: grid;\n grid-template-columns: auto 1fr; }\n #actionTabs .tabs .panes .pane .textureLinkLine .debug {\n grid-column: 1;\n margin-left: 5px;\n margin-right: 5px;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer;\n opacity: 0.5; }\n #actionTabs .tabs .panes .pane .textureLinkLine .debug.selected {\n opacity: 1.0; }\n #actionTabs .tabs .panes .pane .textureLinkLine .textLine {\n grid-column: 2; }\n #actionTabs .tabs .panes .pane .messageLine {\n text-align: center;\n font-size: 12px;\n font-style: italic;\n opacity: 0.6; }\n #actionTabs .tabs .panes .pane .iconMessageLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 30px 1fr; }\n #actionTabs .tabs .panes .pane .iconMessageLine .icon {\n grid-column: 1;\n display: grid;\n align-items: center;\n justify-items: center; }\n #actionTabs .tabs .panes .pane .iconMessageLine .value {\n grid-column: 2;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .textLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .textLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .textLine .link-value {\n grid-column: 2;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n text-align: end;\n opacity: 0.8;\n margin: 5px;\n margin-top: 6px;\n max-width: 140px;\n text-decoration: underline;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .textLine .value {\n grid-column: 2;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n text-align: end;\n opacity: 0.8;\n margin: 5px;\n margin-top: 6px;\n max-width: 200px;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text; }\n #actionTabs .tabs .panes .pane .textLine .value.check {\n color: green; }\n #actionTabs .tabs .panes .pane .textLine .value.uncheck {\n color: red; }\n #actionTabs .tabs .panes .pane .textInputLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr 120px; }\n #actionTabs .tabs .panes .pane .textInputLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .textInputLine .value {\n display: flex;\n align-items: center;\n grid-column: 2; }\n #actionTabs .tabs .panes .pane .textInputLine .value input {\n width: 110px; }\n #actionTabs .tabs .panes .pane .buttonLine {\n height: 30px;\n display: grid;\n align-items: center;\n justify-items: stretch; }\n #actionTabs .tabs .panes .pane .buttonLine input[type="file"] {\n display: none; }\n #actionTabs .tabs .panes .pane .buttonLine .file-upload {\n background: #222222;\n border: 1px solid #337ab7;\n margin: 5px 10px 5px 10px;\n color: white;\n padding: 4px 5px;\n opacity: 0.9;\n cursor: pointer;\n text-align: center; }\n #actionTabs .tabs .panes .pane .buttonLine .file-upload:hover {\n opacity: 1.0; }\n #actionTabs .tabs .panes .pane .buttonLine .file-upload:active {\n transform: scale(0.98);\n transform-origin: 0.5 0.5; }\n #actionTabs .tabs .panes .pane .buttonLine button {\n background: #222222;\n border: 1px solid #337ab7;\n margin: 5px 10px 5px 10px;\n color: white;\n padding: 4px 5px;\n opacity: 0.9; }\n #actionTabs .tabs .panes .pane .buttonLine button:hover {\n opacity: 1.0; }\n #actionTabs .tabs .panes .pane .buttonLine button:active {\n background: #282828; }\n #actionTabs .tabs .panes .pane .buttonLine button:focus {\n border: 1px solid #337ab7;\n outline: 0px; }\n #actionTabs .tabs .panes .pane .radioLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr 24px; }\n #actionTabs .tabs .panes .pane .radioLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer {\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .radio {\n grid-column: 2;\n display: none; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .radio:checked + label:before {\n border-color: #337ab7; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .radio:checked + label:after {\n transform: scale(1); }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio {\n display: inline-block;\n height: 14px;\n position: relative;\n padding: 0 24px;\n margin-bottom: 0;\n cursor: pointer;\n vertical-align: bottom; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:before, #actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:after {\n position: absolute;\n content: \'\';\n border-radius: 50%;\n transition: all .3s ease;\n transition-property: transform, border-color; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:before {\n left: 0px;\n top: 0;\n width: 16px;\n height: 16px;\n border: 2px solid white; }\n #actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:after {\n top: 6px;\n left: 6px;\n width: 8px;\n height: 8px;\n transform: scale(0);\n background: #337ab7; }\n #actionTabs .tabs .panes .pane .vector3Line {\n padding-left: 2px;\n display: grid; }\n #actionTabs .tabs .panes .pane .vector3Line .firstLine {\n display: grid;\n grid-template-columns: 1fr auto 20px;\n height: 30px; }\n #actionTabs .tabs .panes .pane .vector3Line .firstLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .vector3Line .firstLine .vector {\n grid-column: 2;\n display: flex;\n align-items: center;\n text-align: right;\n opacity: 0.8; }\n #actionTabs .tabs .panes .pane .vector3Line .firstLine .expand {\n grid-column: 3;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .vector3Line .secondLine {\n display: grid;\n padding-right: 5px;\n border-left: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric {\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric-label {\n text-align: right;\n grid-column: 1;\n display: flex;\n align-items: center;\n justify-self: right;\n margin-right: 10px; }\n #actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric-value {\n width: 120px;\n grid-column: 2;\n display: flex;\n align-items: center;\n border: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .checkBoxLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .checkBoxLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox {\n grid-column: 2;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl {\n position: relative;\n display: block;\n height: 14px;\n width: 34px;\n margin-right: 5px;\n background: #898989;\n border-radius: 100px;\n cursor: pointer;\n transition: all 0.3s ease; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl:after {\n position: absolute;\n left: 3px;\n top: 2px;\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 100px;\n background: #fff;\n box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.05);\n content: \'\';\n transition: all 0.15s ease; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl:active:after {\n transform: scale(1.15, 0.85); }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .cbx:checked ~ label {\n background: #337ab7; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .cbx:checked ~ label:after {\n left: 20px;\n background: #164975; }\n #actionTabs .tabs .panes .pane .checkBoxLine .checkBox .hidden {\n display: none; }\n #actionTabs .tabs .panes .pane .textureLine {\n display: grid;\n grid-template-rows: 30px auto; }\n #actionTabs .tabs .panes .pane .textureLine .control {\n margin-top: 2px;\n grid-row: 1;\n display: grid;\n grid-template-columns: 1fr 40px 40px 40px 40px 40px 1fr; }\n #actionTabs .tabs .panes .pane .textureLine .control .red {\n grid-column: 2; }\n #actionTabs .tabs .panes .pane .textureLine .control .green {\n grid-column: 3; }\n #actionTabs .tabs .panes .pane .textureLine .control .blue {\n grid-column: 4; }\n #actionTabs .tabs .panes .pane .textureLine .control .alpha {\n grid-column: 5; }\n #actionTabs .tabs .panes .pane .textureLine .control .all {\n grid-column: 6; }\n #actionTabs .tabs .panes .pane .textureLine .control3D {\n margin-top: 2px;\n grid-row: 1;\n display: grid;\n grid-template-columns: 1fr 40px 40px 40px 40px 40px 40px 1fr; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .px {\n grid-column: 2; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .nx {\n grid-column: 3; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .py {\n grid-column: 4; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .ny {\n grid-column: 5; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .pz {\n grid-column: 6; }\n #actionTabs .tabs .panes .pane .textureLine .control3D .nz {\n grid-column: 7; }\n #actionTabs .tabs .panes .pane .textureLine .command {\n border: 1px solid transparent;\n background: transparent;\n color: white; }\n #actionTabs .tabs .panes .pane .textureLine .selected {\n border: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .textureLine .preview {\n grid-row: 2;\n display: grid;\n align-self: center;\n justify-self: center;\n height: 256px;\n width: 256px;\n margin-top: 5px;\n margin-bottom: 5px;\n border: 2px solid rgba(255, 255, 255, 0.4); }\n #actionTabs .tabs .panes .pane .gltf-extension-property {\n margin-left: 30px;\n border-left: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .floatLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr 120px; }\n #actionTabs .tabs .panes .pane .floatLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .floatLine .value {\n grid-column: 2;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .floatLine .value input {\n width: 110px; }\n #actionTabs .tabs .panes .pane .sliderLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .sliderLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .sliderLine .slider {\n grid-column: 2;\n margin-right: 5px;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .sliderLine .slider .range {\n -webkit-appearance: none;\n width: 120px;\n height: 6px;\n background: #d3d3d3;\n border-radius: 5px;\n outline: none;\n opacity: 0.7;\n -webkit-transition: .2s;\n transition: opacity .2s; }\n #actionTabs .tabs .panes .pane .sliderLine .slider .range:hover {\n opacity: 1; }\n #actionTabs .tabs .panes .pane .sliderLine .slider .range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: #337ab7;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .sliderLine .slider .range::-moz-range-thumb {\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: #337ab7;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .color3Line {\n padding-left: 2px;\n display: grid; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine {\n height: 30px;\n display: grid;\n grid-template-columns: 1fr auto 20px 20px; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .color3 {\n grid-column: 2;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type="color"] {\n -webkit-appearance: none;\n border: 1px solid rgba(255, 255, 255, 0.5);\n padding: 0;\n width: 30px;\n height: 20px; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type="color"]::-webkit-color-swatch-wrapper {\n padding: 0; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type="color"]::-webkit-color-swatch {\n border: none; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input {\n margin-right: 5px; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .copy {\n grid-column: 3;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .copy img {\n height: 100%; }\n #actionTabs .tabs .panes .pane .color3Line .firstLine .expand {\n grid-column: 4;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .color3Line .secondLine {\n display: grid;\n padding-right: 5px;\n border-left: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .color3Line .secondLine .numeric {\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .color3Line .secondLine .numeric-label {\n text-align: right;\n grid-column: 1;\n display: flex;\n align-items: center;\n justify-self: right;\n margin-right: 10px; }\n #actionTabs .tabs .panes .pane .color3Line .secondLine .numeric-value {\n width: 120px;\n grid-column: 2;\n display: flex;\n align-items: center;\n border: 1px solid #337ab7; }\n #actionTabs .tabs .panes .pane .listLine {\n padding-left: 2px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr auto; }\n #actionTabs .tabs .panes .pane .listLine .label {\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .listLine .options {\n grid-column: 2;\n display: flex;\n align-items: center;\n margin-right: 5px; }\n #actionTabs .tabs .panes .pane .listLine .options select {\n width: 115px; }\n #actionTabs .tabs .panes .pane .paneContainer {\n margin-top: 3px;\n display: grid;\n grid-template-rows: 100%;\n grid-template-columns: 100%; }\n #actionTabs .tabs .panes .pane .paneContainer .paneList {\n border-left: 3px solid transparent; }\n #actionTabs .tabs .panes .pane .paneContainer:hover .paneList {\n border-left: 3px solid rgba(51, 122, 183, 0.8); }\n #actionTabs .tabs .panes .pane .paneContainer:hover .paneContainer-content .header .title {\n border-left: 3px solid #337ab7; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-highlight-border {\n grid-row: 1;\n grid-column: 1;\n opacity: 1;\n border: 3px solid red;\n transition: opacity 250ms;\n pointer-events: none; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-highlight-border.transparent {\n opacity: 0; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content {\n grid-row: 1;\n grid-column: 1; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header {\n display: grid;\n grid-template-columns: 1fr auto;\n background: #555555;\n height: 30px;\n padding-right: 5px;\n cursor: pointer; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .title {\n border-left: 3px solid transparent;\n padding-left: 5px;\n grid-column: 1;\n display: flex;\n align-items: center; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .collapse {\n grid-column: 2;\n display: flex;\n align-items: center;\n justify-items: center;\n transform-origin: center; }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .collapse.closed {\n transform: rotate(180deg); }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .paneList > div:not(:last-child) {\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.1); }\n #actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .fragment > div:not(:last-child) {\n border-bottom: 0.5px solid rgba(255, 255, 255, 0.1); }\n', + "", + ]); + }, + "../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js!./components/embedHost/embedHost.scss": function (e, t, n) { + (e.exports = n("../../../../node_modules/css-loader/lib/css-base.js")(!1)).push([ + e.i, + '#embed-host {\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0px; }\n\n#__resizable_base__ {\n display: none; }\n\n#embed {\n background: #333333;\n height: 100%;\n margin: 0;\n padding: 0;\n display: grid;\n grid-template-rows: 30px 1fr;\n font: 14px "Arial";\n overflow: hidden; }\n #embed #header {\n font-size: 16px;\n color: white;\n background: #222222;\n grid-row: 1;\n text-align: center;\n display: grid;\n grid-template-columns: 30px 1fr 50px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n #embed #header #logo {\n grid-column: 1;\n width: 24px;\n height: 24px;\n display: flex;\n align-self: center;\n justify-self: center; }\n #embed #header #back {\n grid-column: 1;\n display: grid;\n align-self: center;\n justify-self: center;\n cursor: pointer; }\n #embed #header #title {\n grid-column: 2;\n display: grid;\n align-items: center;\n text-align: center; }\n #embed #header #commands {\n grid-column: 3;\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 1fr; }\n #embed #header #commands .expand {\n grid-column: 1;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #embed #header #commands .close {\n grid-column: 2;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #embed #split {\n grid-row: 2;\n overflow: hidden; }\n #embed #split.splitPopup {\n display: grid;\n grid-template-rows: 300px 2px 1fr; }\n #embed #split.splitPopup .panes {\n margin-bottom: 1px; }\n #embed #split #topPart {\n grid-row: 1;\n overflow: hidden;\n display: grid;\n grid-auto-rows: 100%; }\n #embed #split #separator {\n grid-row: 2;\n background: white;\n opacity: 0.1; }\n #embed #split #bottomPart {\n overflow: hidden;\n grid-row: 3;\n display: grid;\n grid-auto-rows: 100%; }\n #embed #split .gutter.gutter-vertical {\n background-image: none;\n background: #444444;\n cursor: row-resize; }\n', + "", + ]); + }, + "../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js!./components/sceneExplorer/sceneExplorer.scss": function (e, t, n) { + (e.exports = n("../../../../node_modules/css-loader/lib/css-base.js")(!1)).push([ + e.i, + '#scene-explorer-host {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px; }\n #scene-explorer-host:focus {\n outline: none; }\n\n#__resizable_base__ {\n display: none; }\n\n.context-menu {\n background: #222222; }\n .context-menu .react-contextmenu-item {\n padding: 10px;\n cursor: pointer; }\n .context-menu .react-contextmenu-item:hover {\n background: #555555; }\n\n.react-contextmenu.context-menu.react-contextmenu--visible {\n z-index: 99;\n transform: scale(1); }\n\n#sceneExplorer {\n background: #333333;\n height: 100%;\n margin: 0;\n padding: 0;\n display: grid;\n grid-template-rows: auto 1fr;\n font: 14px "Arial"; }\n #sceneExplorer:focus {\n outline: none; }\n #sceneExplorer #header {\n height: 30px;\n font-size: 16px;\n color: white;\n background: #222222;\n grid-row: 1;\n text-align: center;\n display: grid;\n grid-template-columns: 30px 1fr 50px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n #sceneExplorer #header #logo {\n position: relative;\n grid-column: 1;\n width: 24px;\n height: 24px;\n left: 0;\n display: flex;\n align-self: center;\n justify-self: center; }\n #sceneExplorer #header #title {\n grid-column: 2;\n display: grid;\n align-items: center;\n text-align: center; }\n #sceneExplorer #header #commands {\n grid-column: 3;\n display: grid;\n align-items: center;\n grid-template-columns: 1fr 1fr; }\n #sceneExplorer #header #commands .expand {\n grid-column: 1;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #sceneExplorer #header #commands .close {\n grid-column: 2;\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #sceneExplorer #tree {\n grid-row: 2;\n overflow-x: hidden;\n overflow-y: auto; }\n #sceneExplorer .filter {\n display: flex;\n align-items: stretch; }\n #sceneExplorer .filter input {\n width: 100%;\n margin: 10px 40px 5px 40px;\n display: block;\n border: none;\n padding: 0;\n border-bottom: solid 1px #337ab7;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 96%, #337ab7 4%);\n background-position: -1000px 0;\n background-size: 1000px 100%;\n background-repeat: no-repeat;\n color: white; }\n #sceneExplorer .filter input::placeholder {\n color: lightgray; }\n #sceneExplorer .filter input:focus {\n box-shadow: none;\n outline: none;\n background-position: 0 0; }\n #sceneExplorer .groupContainer {\n margin-left: 0px;\n color: white;\n margin-top: 0px;\n margin-bottom: 0px;\n height: 24px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n align-self: center;\n display: grid;\n align-items: center; }\n #sceneExplorer .groupContainer:hover {\n background: #444444; }\n #sceneExplorer .groupContainer .expandableHeader {\n display: grid;\n grid-template-columns: 1fr 20px; }\n #sceneExplorer .groupContainer .expandableHeader .text {\n grid-column: 1;\n display: grid;\n grid-template-columns: 20px 1fr; }\n #sceneExplorer .groupContainer .expandableHeader .text .arrow {\n grid-column: 1;\n margin-left: 0px;\n color: white;\n cursor: pointer;\n display: inline-block;\n margin-right: 6px;\n opacity: 0.5; }\n #sceneExplorer .groupContainer .expandableHeader .text .text-value {\n grid-column: 2;\n display: flex;\n align-items: center; }\n #sceneExplorer .groupContainer .expandableHeader .expandAll {\n opacity: 0.5;\n grid-column: 2;\n margin-right: 10px; }\n #sceneExplorer .icon {\n display: grid;\n align-items: center;\n justify-items: center;\n cursor: pointer; }\n #sceneExplorer .itemContainer {\n margin-left: 0px;\n color: white;\n margin-top: 0px;\n margin-bottom: 0px;\n height: 24px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: grid;\n grid-template-columns: 20px 1fr; }\n #sceneExplorer .itemContainer:hover {\n background: #444444; }\n #sceneExplorer .itemContainer.selected {\n background: #bbbbbb;\n color: black; }\n #sceneExplorer .itemContainer .isNotActive {\n opacity: 0.3; }\n #sceneExplorer .itemContainer .arrow {\n grid-column: 1;\n color: white;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .popup {\n width: 200px;\n visibility: hidden;\n background-color: #444444;\n color: #fff;\n border: 1px solid rgba(255, 255, 255, 0.5);\n position: absolute;\n z-index: 1;\n margin-left: -180px;\n box-sizing: border-box; }\n #sceneExplorer .itemContainer .popup.show {\n visibility: visible; }\n #sceneExplorer .itemContainer .popup:focus {\n outline: none; }\n #sceneExplorer .itemContainer .popup .popupMenu {\n padding: 6px 5px 5px 10px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 18px; }\n #sceneExplorer .itemContainer .popup .popupMenu:hover {\n background: white;\n color: #333333; }\n #sceneExplorer .itemContainer .sceneNode {\n grid-column: 2;\n margin-left: -10px;\n display: grid;\n grid-template-columns: 1fr 20px 20px 20px 20px 10px 20px 20px auto 5px;\n align-items: center;\n cursor: pointer; }\n #sceneExplorer .itemContainer .sceneNode .sceneTitle {\n grid-column: 1;\n margin-right: 5px;\n display: flex;\n align-items: center;\n height: 24px; }\n #sceneExplorer .itemContainer .sceneNode .translation {\n grid-column: 2;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .sceneNode .translation.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .sceneNode .rotation {\n grid-column: 3;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .sceneNode .rotation.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .sceneNode .scaling {\n grid-column: 4;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .sceneNode .scaling.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .sceneNode .bounding {\n grid-column: 5;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .sceneNode .bounding.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .sceneNode .separator {\n grid-column: 6;\n margin-left: 5px;\n width: 5px;\n display: flex;\n align-items: center;\n height: 18px;\n border-left: solid 1px #337ab7; }\n #sceneExplorer .itemContainer .sceneNode .pickingMode {\n grid-column: 7;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .sceneNode .pickingMode.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .sceneNode .refresh {\n grid-column: 8; }\n #sceneExplorer .itemContainer .sceneNode .extensions {\n width: 20px;\n grid-column: 9; }\n #sceneExplorer .itemContainer .animationGroupTools {\n grid-column: 2;\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center;\n min-width: 0; }\n #sceneExplorer .itemContainer .animationGroupTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .meshTools {\n grid-column: 2;\n width: 100%;\n display: grid;\n grid-template-columns: 1fr 20px 20px auto 5px;\n align-items: center;\n min-width: 0; }\n #sceneExplorer .itemContainer .meshTools .bounding-box {\n grid-column: 2;\n opacity: 0.5; }\n #sceneExplorer .itemContainer .meshTools .bounding-box.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .meshTools .visibility {\n grid-column: 3; }\n #sceneExplorer .itemContainer .meshTools .extensions {\n width: 20px;\n grid-column: 4; }\n #sceneExplorer .itemContainer .cameraTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr 20px auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .cameraTools .activeCamera {\n grid-column: 2; }\n #sceneExplorer .itemContainer .cameraTools .extensions {\n width: 20px;\n grid-column: 3; }\n #sceneExplorer .itemContainer .lightTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr 20px 20px auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .lightTools .enableLight {\n grid-column: 2; }\n #sceneExplorer .itemContainer .lightTools .extensions {\n width: 20px;\n grid-column: 3; }\n #sceneExplorer .itemContainer .materialTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .materialTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .postProcessTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .postProcessTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .renderingPipelineTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .renderingPipelineTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .textureTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .textureTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .adtextureTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr 20px auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .adtextureTools .pickingMode {\n grid-column: 2;\n opacity: 0.6; }\n #sceneExplorer .itemContainer .adtextureTools .pickingMode.selected {\n opacity: 1; }\n #sceneExplorer .itemContainer .adtextureTools .extensions {\n width: 20px;\n grid-column: 3; }\n #sceneExplorer .itemContainer .controlTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr 20px 20px auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .controlTools .highlight {\n grid-column: 2; }\n #sceneExplorer .itemContainer .controlTools .visibility {\n grid-column: 3; }\n #sceneExplorer .itemContainer .controlTools .extensions {\n width: 20px;\n grid-column: 4; }\n #sceneExplorer .itemContainer .transformNodeTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .transformNodeTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .skeletonTools {\n grid-column: 2;\n display: grid;\n grid-template-columns: 1fr auto 5px;\n align-items: center; }\n #sceneExplorer .itemContainer .skeletonTools .extensions {\n width: 20px;\n grid-column: 2; }\n #sceneExplorer .itemContainer .title {\n grid-column: 1;\n background: transparent;\n white-space: nowrap;\n overflow: hidden;\n min-width: 0;\n margin-right: 5px;\n display: grid;\n align-items: center;\n grid-template-columns: 25px 1fr;\n height: 24px;\n cursor: pointer; }\n #sceneExplorer .itemContainer .title .titleIcon {\n grid-column: 1;\n display: grid;\n align-items: center;\n justify-items: center; }\n #sceneExplorer .itemContainer .title .titleText {\n grid-column: 2;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden; }\n', + "", + ]); + }, + "../../../../node_modules/css-loader/lib/css-base.js": function (e, t) { + e.exports = function (e) { + var t = []; + return ( + (t.toString = function () { + return this.map(function (t) { + var n = (function (e, t) { + var n, + i = e[1] || "", + r = e[3]; + if (!r) return i; + if (t && "function" == typeof btoa) { + var o = ((n = r), "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + " */"), + a = r.sources.map(function (e) { + return "/*# sourceURL=" + r.sourceRoot + e + " */"; + }); + return [i].concat(a).concat([o]).join("\n"); + } + return [i].join("\n"); + })(t, e); + return t[2] ? "@media " + t[2] + "{" + n + "}" : n; + }).join(""); + }), + (t.i = function (e, n) { + "string" == typeof e && (e = [[null, e, ""]]); + for (var i = {}, r = 0; r < this.length; r++) { + var o = this[r][0]; + "number" == typeof o && (i[o] = !0); + } + for (r = 0; r < e.length; r++) { + var a = e[r]; + ("number" == typeof a[0] && i[a[0]]) || (n && !a[2] ? (a[2] = n) : n && (a[2] = "(" + a[2] + ") and (" + n + ")"), t.push(a)); + } + }), + t + ); + }; + }, + "../../../../node_modules/object-assign/index.js": function (e, t, n) { + "use strict"; + var i = Object.getOwnPropertySymbols, + r = Object.prototype.hasOwnProperty, + o = Object.prototype.propertyIsEnumerable; + function a(e) { + if (null == e) throw new TypeError("Object.assign cannot be called with null or undefined"); + return Object(e); + } + e.exports = (function () { + try { + if (!Object.assign) return !1; + var e = new String("abc"); + if (((e[5] = "de"), "5" === Object.getOwnPropertyNames(e)[0])) return !1; + for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n; + if ( + "0123456789" !== + Object.getOwnPropertyNames(t) + .map(function (e) { + return t[e]; + }) + .join("") + ) + return !1; + var i = {}; + return ( + "abcdefghijklmnopqrst".split("").forEach(function (e) { + i[e] = e; + }), + "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, i)).join("") + ); + } catch (e) { + return !1; + } + })() + ? Object.assign + : function (e, t) { + for (var n, s, c = a(e), l = 1; l < arguments.length; l++) { + for (var u in (n = Object(arguments[l]))) r.call(n, u) && (c[u] = n[u]); + if (i) { + s = i(n); + for (var h = 0; h < s.length; h++) o.call(n, s[h]) && (c[s[h]] = n[s[h]]); + } + } + return c; + }; + }, + "../../../../node_modules/process/browser.js": function (e, t) { + var n, + i, + r = (e.exports = {}); + function o() { + throw new Error("setTimeout has not been defined"); + } + function a() { + throw new Error("clearTimeout has not been defined"); + } + function s(e) { + if (n === setTimeout) return setTimeout(e, 0); + if ((n === o || !n) && setTimeout) return (n = setTimeout), setTimeout(e, 0); + try { + return n(e, 0); + } catch (t) { + try { + return n.call(null, e, 0); + } catch (t) { + return n.call(this, e, 0); + } + } + } + !(function () { + try { + n = "function" == typeof setTimeout ? setTimeout : o; + } catch (e) { + n = o; + } + try { + i = "function" == typeof clearTimeout ? clearTimeout : a; + } catch (e) { + i = a; + } + })(); + var c, + l = [], + u = !1, + h = -1; + function d() { + u && c && ((u = !1), c.length ? (l = c.concat(l)) : (h = -1), l.length && p()); + } + function p() { + if (!u) { + var e = s(d); + u = !0; + for (var t = l.length; t; ) { + for (c = l, l = []; ++h < t; ) c && c[h].run(); + (h = -1), (t = l.length); + } + (c = null), + (u = !1), + (function (e) { + if (i === clearTimeout) return clearTimeout(e); + if ((i === a || !i) && clearTimeout) return (i = clearTimeout), clearTimeout(e); + try { + i(e); + } catch (t) { + try { + return i.call(null, e); + } catch (t) { + return i.call(this, e); + } + } + })(e); + } + } + function f(e, t) { + (this.fun = e), (this.array = t); + } + function m() {} + (r.nextTick = function (e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + l.push(new f(e, t)), 1 !== l.length || u || s(p); + }), + (f.prototype.run = function () { + this.fun.apply(null, this.array); + }), + (r.title = "browser"), + (r.browser = !0), + (r.env = {}), + (r.argv = []), + (r.version = ""), + (r.versions = {}), + (r.on = m), + (r.addListener = m), + (r.once = m), + (r.off = m), + (r.removeListener = m), + (r.removeAllListeners = m), + (r.emit = m), + (r.prependListener = m), + (r.prependOnceListener = m), + (r.listeners = function (e) { + return []; + }), + (r.binding = function (e) { + throw new Error("process.binding is not supported"); + }), + (r.cwd = function () { + return "/"; + }), + (r.chdir = function (e) { + throw new Error("process.chdir is not supported"); + }), + (r.umask = function () { + return 0; + }); + }, + "../../../../node_modules/prop-types/checkPropTypes.js": function (e, t, n) { + "use strict"; + var i = function () {}, + r = n("../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js"), + o = {}, + a = Function.call.bind(Object.prototype.hasOwnProperty); + function s(e, t, n, s, c) { + for (var l in e) + if (a(e, l)) { + var u; + try { + if ("function" != typeof e[l]) { + var h = Error((s || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`."); + throw ((h.name = "Invariant Violation"), h); + } + u = e[l](t, l, s, n, null, r); + } catch (e) { + u = e; + } + if ( + (!u || + u instanceof Error || + i( + (s || "React class") + + ": type specification of " + + n + + " `" + + l + + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + + typeof u + + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." + ), + u instanceof Error && !(u.message in o)) + ) { + o[u.message] = !0; + var d = c ? c() : ""; + i("Failed " + n + " type: " + u.message + (null != d ? d : "")); + } + } + } + (i = function (e) { + var t = "Warning: " + e; + try { + throw new Error(t); + } catch (e) {} + }), + (s.resetWarningCache = function () { + o = {}; + }), + (e.exports = s); + }, + "../../../../node_modules/prop-types/factoryWithTypeCheckers.js": function (e, t, n) { + "use strict"; + var i = n("../../../../node_modules/react-is/index.js"), + r = n("../../../../node_modules/object-assign/index.js"), + o = n("../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js"), + a = n("../../../../node_modules/prop-types/checkPropTypes.js"), + s = Function.call.bind(Object.prototype.hasOwnProperty), + c = function () {}; + function l() { + return null; + } + (c = function (e) { + var t = "Warning: " + e; + try { + throw new Error(t); + } catch (e) {} + }), + (e.exports = function (e, t) { + var n = "function" == typeof Symbol && Symbol.iterator, + u = { + array: f("array"), + bool: f("boolean"), + func: f("function"), + number: f("number"), + object: f("object"), + string: f("string"), + symbol: f("symbol"), + any: p(l), + arrayOf: function (e) { + return p(function (t, n, i, r, a) { + if ("function" != typeof e) return new d("Property `" + a + "` of component `" + i + "` has invalid PropType notation inside arrayOf."); + var s = t[n]; + if (!Array.isArray(s)) return new d("Invalid " + r + " `" + a + "` of type `" + g(s) + "` supplied to `" + i + "`, expected an array."); + for (var c = 0; c < s.length; c++) { + var l = e(s, c, i, r, a + "[" + c + "]", o); + if (l instanceof Error) return l; + } + return null; + }); + }, + element: p(function (t, n, i, r, o) { + var a = t[n]; + return e(a) ? null : new d("Invalid " + r + " `" + o + "` of type `" + g(a) + "` supplied to `" + i + "`, expected a single ReactElement."); + }), + elementType: p(function (e, t, n, r, o) { + var a = e[t]; + return i.isValidElementType(a) ? null : new d("Invalid " + r + " `" + o + "` of type `" + g(a) + "` supplied to `" + n + "`, expected a single ReactElement type."); + }), + instanceOf: function (e) { + return p(function (t, n, i, r, o) { + if (!(t[n] instanceof e)) { + var a = e.name || "<>"; + return new d( + "Invalid " + + r + + " `" + + o + + "` of type `" + + (((s = t[n]).constructor && s.constructor.name ? s.constructor.name : "<>") + "` supplied to `") + + i + + "`, expected instance of `" + + a + + "`." + ); + } + var s; + return null; + }); + }, + node: p(function (e, t, n, i, r) { + return m(e[t]) ? null : new d("Invalid " + i + " `" + r + "` supplied to `" + n + "`, expected a ReactNode."); + }), + objectOf: function (e) { + return p(function (t, n, i, r, a) { + if ("function" != typeof e) return new d("Property `" + a + "` of component `" + i + "` has invalid PropType notation inside objectOf."); + var c = t[n], + l = g(c); + if ("object" !== l) return new d("Invalid " + r + " `" + a + "` of type `" + l + "` supplied to `" + i + "`, expected an object."); + for (var u in c) + if (s(c, u)) { + var h = e(c, u, i, r, a + "." + u, o); + if (h instanceof Error) return h; + } + return null; + }); + }, + oneOf: function (e) { + if (!Array.isArray(e)) + return ( + c( + arguments.length > 1 + ? "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." + : "Invalid argument supplied to oneOf, expected an array." + ), + l + ); + function t(t, n, i, r, o) { + for (var a = t[n], s = 0; s < e.length; s++) if (h(a, e[s])) return null; + var c = JSON.stringify(e, function (e, t) { + return "symbol" === b(t) ? String(t) : t; + }); + return new d("Invalid " + r + " `" + o + "` of value `" + String(a) + "` supplied to `" + i + "`, expected one of " + c + "."); + } + return p(t); + }, + oneOfType: function (e) { + if (!Array.isArray(e)) return c("Invalid argument supplied to oneOfType, expected an instance of array."), l; + for (var t = 0; t < e.length; t++) { + var n = e[t]; + if ("function" != typeof n) return c("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + _(n) + " at index " + t + "."), l; + } + return p(function (t, n, i, r, a) { + for (var s = 0; s < e.length; s++) if (null == (0, e[s])(t, n, i, r, a, o)) return null; + return new d("Invalid " + r + " `" + a + "` supplied to `" + i + "`."); + }); + }, + shape: function (e) { + return p(function (t, n, i, r, a) { + var s = t[n], + c = g(s); + if ("object" !== c) return new d("Invalid " + r + " `" + a + "` of type `" + c + "` supplied to `" + i + "`, expected `object`."); + for (var l in e) { + var u = e[l]; + if (u) { + var h = u(s, l, i, r, a + "." + l, o); + if (h) return h; + } + } + return null; + }); + }, + exact: function (e) { + return p(function (t, n, i, a, s) { + var c = t[n], + l = g(c); + if ("object" !== l) return new d("Invalid " + a + " `" + s + "` of type `" + l + "` supplied to `" + i + "`, expected `object`."); + var u = r({}, t[n], e); + for (var h in u) { + var p = e[h]; + if (!p) + return new d( + "Invalid " + + a + + " `" + + s + + "` key `" + + h + + "` supplied to `" + + i + + "`.\nBad object: " + + JSON.stringify(t[n], null, " ") + + "\nValid keys: " + + JSON.stringify(Object.keys(e), null, " ") + ); + var f = p(c, h, i, a, s + "." + h, o); + if (f) return f; + } + return null; + }); + }, + }; + function h(e, t) { + return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t; + } + function d(e) { + (this.message = e), (this.stack = ""); + } + function p(e) { + var n = {}, + i = 0; + function r(r, a, s, l, u, h, p) { + if (((l = l || "<>"), (h = h || s), p !== o)) { + if (t) { + var f = new Error( + "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" + ); + throw ((f.name = "Invariant Violation"), f); + } + if ("undefined" != typeof console) { + var m = l + ":" + s; + !n[m] && + i < 3 && + (c( + "You are manually calling a React.PropTypes validation function for the `" + + h + + "` prop on `" + + l + + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." + ), + (n[m] = !0), + i++); + } + } + return null == a[s] + ? r + ? null === a[s] + ? new d("The " + u + " `" + h + "` is marked as required in `" + l + "`, but its value is `null`.") + : new d("The " + u + " `" + h + "` is marked as required in `" + l + "`, but its value is `undefined`.") + : null + : e(a, s, l, u, h); + } + var a = r.bind(null, !1); + return (a.isRequired = r.bind(null, !0)), a; + } + function f(e) { + return p(function (t, n, i, r, o, a) { + var s = t[n]; + return g(s) !== e ? new d("Invalid " + r + " `" + o + "` of type `" + b(s) + "` supplied to `" + i + "`, expected `" + e + "`.") : null; + }); + } + function m(t) { + switch (typeof t) { + case "number": + case "string": + case "undefined": + return !0; + case "boolean": + return !t; + case "object": + if (Array.isArray(t)) return t.every(m); + if (null === t || e(t)) return !0; + var i = (function (e) { + var t = e && ((n && e[n]) || e["@@iterator"]); + if ("function" == typeof t) return t; + })(t); + if (!i) return !1; + var r, + o = i.call(t); + if (i !== t.entries) { + for (; !(r = o.next()).done; ) if (!m(r.value)) return !1; + } else + for (; !(r = o.next()).done; ) { + var a = r.value; + if (a && !m(a[1])) return !1; + } + return !0; + default: + return !1; + } + } + function g(e) { + var t = typeof e; + return Array.isArray(e) + ? "array" + : e instanceof RegExp + ? "object" + : (function (e, t) { + return "symbol" === e || (!!t && ("Symbol" === t["@@toStringTag"] || ("function" == typeof Symbol && t instanceof Symbol))); + })(t, e) + ? "symbol" + : t; + } + function b(e) { + if (null == e) return "" + e; + var t = g(e); + if ("object" === t) { + if (e instanceof Date) return "date"; + if (e instanceof RegExp) return "regexp"; + } + return t; + } + function _(e) { + var t = b(e); + switch (t) { + case "array": + case "object": + return "an " + t; + case "boolean": + case "date": + case "regexp": + return "a " + t; + default: + return t; + } + } + return (d.prototype = Error.prototype), (u.checkPropTypes = a), (u.resetWarningCache = a.resetWarningCache), (u.PropTypes = u), u; + }); + }, + "../../../../node_modules/prop-types/index.js": function (e, t, n) { + var i = n("../../../../node_modules/react-is/index.js"); + e.exports = n("../../../../node_modules/prop-types/factoryWithTypeCheckers.js")(i.isElement, !0); + }, + "../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js": function (e, t, n) { + "use strict"; + e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + }, + "../../../../node_modules/react-contextmenu/es6/AbstractMenu.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/prop-types/index.js"), + a = n.n(o), + s = n("../../../../node_modules/react-contextmenu/es6/MenuItem.js"), + c = (function (e) { + function t(e) { + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, t); + var n = (function (e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + })(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); + return l.call(n), (n.seletedItemRef = null), (n.state = { selectedItem: null, forceSubMenuOpen: !1 }), n; + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(t, e), + t + ); + })(i.Component); + c.propTypes = { children: a.a.node.isRequired }; + var l = function () { + var e = this; + (this.handleKeyNavigation = function (t) { + if (!1 !== e.state.isVisible) + switch (t.keyCode) { + case 37: + case 27: + t.preventDefault(), e.hideMenu(t); + break; + case 38: + t.preventDefault(), e.selectChildren(!0); + break; + case 40: + t.preventDefault(), e.selectChildren(!1); + break; + case 39: + e.tryToOpenSubMenu(t); + break; + case 13: + t.preventDefault(), e.tryToOpenSubMenu(t); + var n = e.seletedItemRef && e.seletedItemRef.props && e.seletedItemRef.props.disabled; + e.seletedItemRef && e.seletedItemRef.ref instanceof HTMLElement && !n ? e.seletedItemRef.ref.click() : e.hideMenu(t); + } + }), + (this.handleForceClose = function () { + e.setState({ forceSubMenuOpen: !1 }); + }), + (this.tryToOpenSubMenu = function (t) { + e.state.selectedItem && e.state.selectedItem.type === e.getSubMenuType() && (t.preventDefault(), e.setState({ forceSubMenuOpen: !0 })); + }), + (this.selectChildren = function (t) { + var n = e.state.selectedItem, + i = []; + r.a.Children.forEach(e.props.children, function t(n) { + n && ([s.default, e.getSubMenuType()].indexOf(n.type) < 0 ? r.a.Children.forEach(n.props.children, t) : n.props.divider || i.push(n)); + }); + var o = i.indexOf(n); + o < 0 + ? e.setState({ selectedItem: t ? i[i.length - 1] : i[0], forceSubMenuOpen: !1 }) + : t + ? e.setState({ selectedItem: i[o - 1 < 0 ? i.length - 1 : o - 1], forceSubMenuOpen: !1 }) + : e.setState({ selectedItem: i[o + 1 < i.length ? o + 1 : 0], forceSubMenuOpen: !1 }); + }), + (this.onChildMouseMove = function (t) { + e.state.selectedItem !== t && e.setState({ selectedItem: t, forceSubMenuOpen: !1 }); + }), + (this.onChildMouseLeave = function () { + e.setState({ selectedItem: null, forceSubMenuOpen: !1 }); + }), + (this.renderChildren = function (t) { + return r.a.Children.map(t, function (t) { + var n = {}; + return r.a.isValidElement(t) + ? [s.default, e.getSubMenuType()].indexOf(t.type) < 0 + ? ((n.children = e.renderChildren(t.props.children)), r.a.cloneElement(t, n)) + : ((n.onMouseLeave = e.onChildMouseLeave.bind(e)), + t.type === e.getSubMenuType() && + ((n.forceOpen = e.state.forceSubMenuOpen && e.state.selectedItem === t), (n.forceClose = e.handleForceClose), (n.parentKeyNavigationHandler = e.handleKeyNavigation)), + t.props.divider || e.state.selectedItem !== t + ? ((n.onMouseMove = function () { + return e.onChildMouseMove(t); + }), + r.a.cloneElement(t, n)) + : ((n.selected = !0), + (n.ref = function (t) { + e.seletedItemRef = t; + }), + r.a.cloneElement(t, n))) + : t; + }); + }); + }; + t.default = c; + }, + "../../../../node_modules/react-contextmenu/es6/ContextMenu.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/prop-types/index.js"), + a = n.n(o), + s = n("../../../../node_modules/classnames/index.js"), + c = n.n(s), + l = n("../../../../node_modules/object-assign/index.js"), + u = n.n(l), + h = n("../../../../node_modules/react-contextmenu/es6/globalEventListener.js"), + d = n("../../../../node_modules/react-contextmenu/es6/AbstractMenu.js"), + p = n("../../../../node_modules/react-contextmenu/es6/SubMenu.js"), + f = n("../../../../node_modules/react-contextmenu/es6/actions.js"), + m = n("../../../../node_modules/react-contextmenu/es6/helpers.js"), + g = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t; + }; + })(), + b = (function (e) { + function t(e) { + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, t); + var n = (function (e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + })(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); + return ( + (n.registerHandlers = function () { + document.addEventListener("mousedown", n.handleOutsideClick), + document.addEventListener("touchstart", n.handleOutsideClick), + document.addEventListener("scroll", n.handleHide), + document.addEventListener("contextmenu", n.handleHide), + document.addEventListener("keydown", n.handleKeyNavigation), + window.addEventListener("resize", n.handleHide); + }), + (n.unregisterHandlers = function () { + document.removeEventListener("mousedown", n.handleOutsideClick), + document.removeEventListener("touchstart", n.handleOutsideClick), + document.removeEventListener("scroll", n.handleHide), + document.removeEventListener("contextmenu", n.handleHide), + document.removeEventListener("keydown", n.handleKeyNavigation), + window.removeEventListener("resize", n.handleHide); + }), + (n.handleShow = function (e) { + if (e.detail.id === n.props.id && !n.state.isVisible) { + var t = e.detail.position, + i = t.x, + r = t.y; + n.setState({ isVisible: !0, x: i, y: r }), n.registerHandlers(), Object(m.callIfExists)(n.props.onShow, e); + } + }), + (n.handleHide = function (e) { + !n.state.isVisible || + (e.detail && e.detail.id && e.detail.id !== n.props.id) || + (n.unregisterHandlers(), n.setState({ isVisible: !1, selectedItem: null, forceSubMenuOpen: !1 }), Object(m.callIfExists)(n.props.onHide, e)); + }), + (n.handleOutsideClick = function (e) { + n.menu.contains(e.target) || Object(f.hideMenu)(); + }), + (n.handleMouseLeave = function (e) { + e.preventDefault(), Object(m.callIfExists)(n.props.onMouseLeave, e, u()({}, n.props.data, m.store.data), m.store.target), n.props.hideOnLeave && Object(f.hideMenu)(); + }), + (n.handleContextMenu = function (e) { + n.handleHide(e); + }), + (n.hideMenu = function (e) { + (27 !== e.keyCode && 13 !== e.keyCode) || Object(f.hideMenu)(); + }), + (n.getMenuPosition = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, + t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, + i = { top: t, left: e }; + if (!n.menu) return i; + var r = window, + o = r.innerWidth, + a = r.innerHeight, + s = n.menu.getBoundingClientRect(); + return ( + t + s.height > a && (i.top -= s.height), + e + s.width > o && (i.left -= s.width), + i.top < 0 && (i.top = s.height < a ? (a - s.height) / 2 : 0), + i.left < 0 && (i.left = s.width < o ? (o - s.width) / 2 : 0), + i + ); + }), + (n.getRTLMenuPosition = function () { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, + t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, + i = { top: t, left: e }; + if (!n.menu) return i; + var r = window, + o = r.innerWidth, + a = r.innerHeight, + s = n.menu.getBoundingClientRect(); + return ( + (i.left = e - s.width), + t + s.height > a && (i.top -= s.height), + i.left < 0 && (i.left += s.width), + i.top < 0 && (i.top = s.height < a ? (a - s.height) / 2 : 0), + i.left + s.width > o && (i.left = s.width < o ? (o - s.width) / 2 : 0), + i + ); + }), + (n.menuRef = function (e) { + n.menu = e; + }), + (n.state = u()({}, n.state, { x: 0, y: 0, isVisible: !1 })), + n + ); + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(t, e), + g(t, [ + { + key: "getSubMenuType", + value: function () { + return p.default; + }, + }, + { + key: "componentDidMount", + value: function () { + this.listenId = h.default.register(this.handleShow, this.handleHide); + }, + }, + { + key: "componentDidUpdate", + value: function () { + var e = this; + if (this.state.isVisible) { + var t = window.requestAnimationFrame || setTimeout; + t(function () { + var n = e.state, + i = n.x, + r = n.y, + o = e.props.rtl ? e.getRTLMenuPosition(i, r) : e.getMenuPosition(i, r), + a = o.top, + s = o.left; + t(function () { + e.menu && ((e.menu.style.top = a + "px"), (e.menu.style.left = s + "px"), (e.menu.style.opacity = 1), (e.menu.style.pointerEvents = "auto")); + }); + }); + } else { + if (!this.menu) return; + (this.menu.style.opacity = 0), (this.menu.style.pointerEvents = "none"); + } + }, + }, + { + key: "componentWillUnmount", + value: function () { + this.listenId && h.default.unregister(this.listenId), this.unregisterHandlers(); + }, + }, + { + key: "render", + value: function () { + var e, + t, + n, + i = this.props, + o = i.children, + a = i.className, + s = i.style, + l = this.state.isVisible, + h = u()({}, s, { position: "fixed", opacity: 0, pointerEvents: "none" }), + d = c()( + m.cssClasses.menu, + a, + ((e = {}), (t = m.cssClasses.menuVisible), (n = l), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e) + ); + return r.a.createElement( + "nav", + { role: "menu", tabIndex: "-1", ref: this.menuRef, style: h, className: d, onContextMenu: this.handleContextMenu, onMouseLeave: this.handleMouseLeave }, + this.renderChildren(o) + ); + }, + }, + ]), + t + ); + })(d.default); + (b.propTypes = { + id: a.a.string.isRequired, + children: a.a.node.isRequired, + data: a.a.object, + className: a.a.string, + hideOnLeave: a.a.bool, + rtl: a.a.bool, + onHide: a.a.func, + onMouseLeave: a.a.func, + onShow: a.a.func, + style: a.a.object, + }), + (b.defaultProps = { + className: "", + data: {}, + hideOnLeave: !1, + rtl: !1, + onHide: function () { + return null; + }, + onMouseLeave: function () { + return null; + }, + onShow: function () { + return null; + }, + style: {}, + }), + (t.default = b); + }, + "../../../../node_modules/react-contextmenu/es6/ContextMenuTrigger.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/prop-types/index.js"), + a = n.n(o), + s = n("../../../../node_modules/classnames/index.js"), + c = n.n(s), + l = n("../../../../node_modules/object-assign/index.js"), + u = n.n(l), + h = n("../../../../node_modules/react-contextmenu/es6/actions.js"), + d = n("../../../../node_modules/react-contextmenu/es6/helpers.js"), + p = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t; + }; + })(); + function f(e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + } + function m(e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + } + var g = (function (e) { + function t() { + var e, n, i; + f(this, t); + for (var r = arguments.length, o = Array(r), a = 0; a < r; a++) o[a] = arguments[a]; + return ( + (n = i = m(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(o)))), + (i.touchHandled = !1), + (i.handleMouseDown = function (e) { + i.props.holdToDisplay >= 0 && + 0 === e.button && + (e.persist(), + e.stopPropagation(), + (i.mouseDownTimeoutId = setTimeout(function () { + return i.handleContextClick(e); + }, i.props.holdToDisplay))), + Object(d.callIfExists)(i.props.attributes.onMouseDown, e); + }), + (i.handleMouseUp = function (e) { + 0 === e.button && clearTimeout(i.mouseDownTimeoutId), Object(d.callIfExists)(i.props.attributes.onMouseUp, e); + }), + (i.handleMouseOut = function (e) { + 0 === e.button && clearTimeout(i.mouseDownTimeoutId), Object(d.callIfExists)(i.props.attributes.onMouseOut, e); + }), + (i.handleTouchstart = function (e) { + (i.touchHandled = !1), + i.props.holdToDisplay >= 0 && + (e.persist(), + e.stopPropagation(), + (i.touchstartTimeoutId = setTimeout(function () { + i.handleContextClick(e), (i.touchHandled = !0); + }, i.props.holdToDisplay))), + Object(d.callIfExists)(i.props.attributes.onTouchStart, e); + }), + (i.handleTouchEnd = function (e) { + i.touchHandled && e.preventDefault(), clearTimeout(i.touchstartTimeoutId), Object(d.callIfExists)(i.props.attributes.onTouchEnd, e); + }), + (i.handleContextMenu = function (e) { + i.handleContextClick(e), Object(d.callIfExists)(i.props.attributes.onContextMenu, e); + }), + (i.handleContextClick = function (e) { + if (!i.props.disable) { + e.preventDefault(), e.stopPropagation(); + var t = e.clientX || (e.touches && e.touches[0].pageX), + n = e.clientY || (e.touches && e.touches[0].pageY); + i.props.posX && (t -= i.props.posX), i.props.posY && (n -= i.props.posY), Object(h.hideMenu)(); + var r = Object(d.callIfExists)(i.props.collect, i.props), + o = { position: { x: t, y: n }, target: i.elem, id: i.props.id, data: r }; + r && "function" == typeof r.then + ? r.then(function (e) { + (o.data = e), Object(h.showMenu)(o); + }) + : Object(h.showMenu)(o); + } + }), + (i.elemRef = function (e) { + i.elem = e; + }), + m(i, n) + ); + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(t, e), + p(t, [ + { + key: "render", + value: function () { + var e = this.props, + t = e.renderTag, + n = e.attributes, + i = e.children, + o = u()({}, n, { + className: c()(d.cssClasses.menuWrapper, n.className), + onContextMenu: this.handleContextMenu, + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onTouchStart: this.handleTouchstart, + onTouchEnd: this.handleTouchEnd, + onMouseOut: this.handleMouseOut, + ref: this.elemRef, + }); + return r.a.createElement(t, o, i); + }, + }, + ]), + t + ); + })(i.Component); + (g.propTypes = { + id: a.a.string.isRequired, + children: a.a.node.isRequired, + attributes: a.a.object, + collect: a.a.func, + disable: a.a.bool, + holdToDisplay: a.a.number, + posX: a.a.number, + posY: a.a.number, + renderTag: a.a.oneOfType([a.a.node, a.a.func]), + }), + (g.defaultProps = { + attributes: {}, + collect: function () { + return null; + }, + disable: !1, + holdToDisplay: 1e3, + renderTag: "div", + posX: 0, + posY: 0, + }), + (t.default = g); + }, + "../../../../node_modules/react-contextmenu/es6/MenuItem.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/prop-types/index.js"), + a = n.n(o), + s = n("../../../../node_modules/classnames/index.js"), + c = n.n(s), + l = n("../../../../node_modules/object-assign/index.js"), + u = n.n(l), + h = n("../../../../node_modules/react-contextmenu/es6/actions.js"), + d = n("../../../../node_modules/react-contextmenu/es6/helpers.js"), + p = + Object.assign || + function (e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]); + } + return e; + }, + f = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t; + }; + })(); + function m(e, t, n) { + return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e; + } + function g(e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + } + function b(e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + } + var _ = (function (e) { + function t() { + var e, n, i; + g(this, t); + for (var r = arguments.length, o = Array(r), a = 0; a < r; a++) o[a] = arguments[a]; + return ( + (n = i = b(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(o)))), + (i.handleClick = function (e) { + e.preventDefault(), + i.props.disabled || i.props.divider || (Object(d.callIfExists)(i.props.onClick, e, u()({}, i.props.data, d.store.data), d.store.target), i.props.preventClose || Object(h.hideMenu)()); + }), + b(i, n) + ); + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(t, e), + f(t, [ + { + key: "render", + value: function () { + var e, + t = this, + n = this.props, + i = n.disabled, + o = n.divider, + a = n.children, + s = n.attributes, + l = n.selected, + u = c()( + d.cssClasses.menuItem, + s.className, + (m((e = {}), c()(d.cssClasses.menuItemDisabled, s.disabledClassName), i), + m(e, c()(d.cssClasses.menuItemDivider, s.dividerClassName), o), + m(e, c()(d.cssClasses.menuItemSelected, s.selectedClassName), l), + e) + ); + return r.a.createElement( + "div", + p({}, s, { + className: u, + role: "menuitem", + tabIndex: "-1", + "aria-disabled": i ? "true" : "false", + "aria-orientation": o ? "horizontal" : null, + ref: function (e) { + t.ref = e; + }, + onMouseMove: this.props.onMouseMove, + onMouseLeave: this.props.onMouseLeave, + onTouchEnd: this.handleClick, + onClick: this.handleClick, + }), + o ? null : a + ); + }, + }, + ]), + t + ); + })(i.Component); + (_.propTypes = { + children: a.a.node, + attributes: a.a.object, + data: a.a.object, + disabled: a.a.bool, + divider: a.a.bool, + preventClose: a.a.bool, + onClick: a.a.func, + selected: a.a.bool, + onMouseMove: a.a.func, + onMouseLeave: a.a.func, + }), + (_.defaultProps = { + disabled: !1, + data: {}, + divider: !1, + attributes: {}, + preventClose: !1, + onClick: function () { + return null; + }, + children: null, + selected: !1, + onMouseMove: function () { + return null; + }, + onMouseLeave: function () { + return null; + }, + }), + (t.default = _); + }, + "../../../../node_modules/react-contextmenu/es6/SubMenu.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/prop-types/index.js"), + a = n.n(o), + s = n("../../../../node_modules/classnames/index.js"), + c = n.n(s), + l = n("../../../../node_modules/object-assign/index.js"), + u = n.n(l), + h = n("../../../../node_modules/react-contextmenu/es6/AbstractMenu.js"), + d = n("../../../../node_modules/react-contextmenu/es6/helpers.js"), + p = n("../../../../node_modules/react-contextmenu/es6/globalEventListener.js"), + f = + Object.assign || + function (e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]); + } + return e; + }, + m = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t; + }; + })(); + function g(e, t, n) { + return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e; + } + var b = (function (e) { + function t(e) { + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, t); + var n = (function (e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + })(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); + return ( + (n.getMenuPosition = function () { + var e = window, + t = e.innerWidth, + i = e.innerHeight, + r = n.subMenu.getBoundingClientRect(), + o = {}; + return r.bottom > i ? (o.bottom = 0) : (o.top = 0), r.right < t ? (o.left = "100%") : (o.right = "100%"), o; + }), + (n.getRTLMenuPosition = function () { + var e = window.innerHeight, + t = n.subMenu.getBoundingClientRect(), + i = {}; + return t.bottom > e ? (i.bottom = 0) : (i.top = 0), t.left < 0 ? (i.left = "100%") : (i.right = "100%"), i; + }), + (n.hideMenu = function (e) { + (e.detail && e.detail.id && n.menu && e.detail.id !== n.menu.id) || (n.props.forceOpen && n.props.forceClose(), n.setState({ visible: !1, selectedItem: null }), n.unregisterHandlers()); + }), + (n.handleClick = function (e) { + e.preventDefault(), n.props.disabled || Object(d.callIfExists)(n.props.onClick, e, u()({}, n.props.data, d.store.data), d.store.target); + }), + (n.handleMouseEnter = function () { + n.closetimer && clearTimeout(n.closetimer), + n.props.disabled || + n.state.visible || + (n.opentimer = setTimeout(function () { + return n.setState({ visible: !0, selectedItem: null }); + }, n.props.hoverDelay)); + }), + (n.handleMouseLeave = function () { + n.opentimer && clearTimeout(n.opentimer), + n.state.visible && + (n.closetimer = setTimeout(function () { + return n.setState({ visible: !1, selectedItem: null }); + }, n.props.hoverDelay)); + }), + (n.menuRef = function (e) { + n.menu = e; + }), + (n.subMenuRef = function (e) { + n.subMenu = e; + }), + (n.registerHandlers = function () { + document.removeEventListener("keydown", n.props.parentKeyNavigationHandler), document.addEventListener("keydown", n.handleKeyNavigation); + }), + (n.unregisterHandlers = function (e) { + document.removeEventListener("keydown", n.handleKeyNavigation), e || document.addEventListener("keydown", n.props.parentKeyNavigationHandler); + }), + (n.state = u()({}, n.state, { visible: !1 })), + n + ); + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(t, e), + m(t, [ + { + key: "componentDidMount", + value: function () { + this.listenId = p.default.register(function () {}, this.hideMenu); + }, + }, + { + key: "getSubMenuType", + value: function () { + return t; + }, + }, + { + key: "shouldComponentUpdate", + value: function (e, t) { + return ( + (this.isVisibilityChange = !((this.state.visible === t.visible && this.props.forceOpen === e.forceOpen) || (this.state.visible && e.forceOpen) || (this.props.forceOpen && t.visible))), !0 + ); + }, + }, + { + key: "componentDidUpdate", + value: function () { + var e = this; + this.isVisibilityChange && + (this.props.forceOpen || this.state.visible + ? (window.requestAnimationFrame || setTimeout)(function () { + var t = e.props.rtl ? e.getRTLMenuPosition() : e.getMenuPosition(); + e.subMenu.style.removeProperty("top"), + e.subMenu.style.removeProperty("bottom"), + e.subMenu.style.removeProperty("left"), + e.subMenu.style.removeProperty("right"), + Object(d.hasOwnProp)(t, "top") && (e.subMenu.style.top = t.top), + Object(d.hasOwnProp)(t, "left") && (e.subMenu.style.left = t.left), + Object(d.hasOwnProp)(t, "bottom") && (e.subMenu.style.bottom = t.bottom), + Object(d.hasOwnProp)(t, "right") && (e.subMenu.style.right = t.right), + e.subMenu.classList.add(d.cssClasses.menuVisible), + e.registerHandlers(), + e.setState({ selectedItem: null }); + }) + : (this.subMenu.addEventListener("transitionend", function t() { + e.subMenu.removeEventListener("transitionend", t), + e.subMenu.style.removeProperty("bottom"), + e.subMenu.style.removeProperty("right"), + (e.subMenu.style.top = 0), + (e.subMenu.style.left = "100%"), + e.unregisterHandlers(); + }), + this.subMenu.classList.remove(d.cssClasses.menuVisible))); + }, + }, + { + key: "componentWillUnmount", + value: function () { + this.listenId && p.default.unregister(this.listenId), this.opentimer && clearTimeout(this.opentimer), this.closetimer && clearTimeout(this.closetimer), this.unregisterHandlers(!0); + }, + }, + { + key: "render", + value: function () { + var e, + t = this.props, + n = t.children, + i = t.attributes, + o = t.disabled, + a = t.title, + s = t.selected, + l = this.state.visible, + u = { + ref: this.menuRef, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + className: c()(d.cssClasses.menuItem, d.cssClasses.subMenu, i.listClassName), + style: { position: "relative" }, + }, + h = { + className: c()( + d.cssClasses.menuItem, + i.className, + ((e = {}), + g(e, c()(d.cssClasses.menuItemDisabled, i.disabledClassName), o), + g(e, c()(d.cssClasses.menuItemActive, i.visibleClassName), l), + g(e, c()(d.cssClasses.menuItemSelected, i.selectedClassName), s), + e) + ), + onMouseMove: this.props.onMouseMove, + onMouseOut: this.props.onMouseOut, + onClick: this.handleClick, + }, + p = { ref: this.subMenuRef, style: { position: "absolute", transition: "opacity 1ms", top: 0, left: "100%" }, className: c()(d.cssClasses.menu, this.props.className) }; + return r.a.createElement( + "nav", + f({}, u, { role: "menuitem", tabIndex: "-1", "aria-haspopup": "true" }), + r.a.createElement("div", f({}, i, h), a), + r.a.createElement("nav", f({}, p, { role: "menu", tabIndex: "-1" }), this.renderChildren(n)) + ); + }, + }, + ]), + t + ); + })(h.default); + (b.propTypes = { + children: a.a.node.isRequired, + attributes: a.a.object, + title: a.a.node.isRequired, + className: a.a.string, + disabled: a.a.bool, + hoverDelay: a.a.number, + rtl: a.a.bool, + selected: a.a.bool, + onMouseMove: a.a.func, + onMouseOut: a.a.func, + forceOpen: a.a.bool, + forceClose: a.a.func, + parentKeyNavigationHandler: a.a.func, + }), + (b.defaultProps = { + disabled: !1, + hoverDelay: 500, + attributes: {}, + className: "", + rtl: !1, + selected: !1, + onMouseMove: function () { + return null; + }, + onMouseOut: function () { + return null; + }, + forceOpen: !1, + forceClose: function () { + return null; + }, + parentKeyNavigationHandler: function () { + return null; + }, + }), + (t.default = b); + }, + "../../../../node_modules/react-contextmenu/es6/actions.js": function (e, t, n) { + "use strict"; + n.r(t), + n.d(t, "MENU_SHOW", function () { + return a; + }), + n.d(t, "MENU_HIDE", function () { + return s; + }), + n.d(t, "dispatchGlobalEvent", function () { + return c; + }), + n.d(t, "showMenu", function () { + return l; + }), + n.d(t, "hideMenu", function () { + return u; + }); + var i = n("../../../../node_modules/object-assign/index.js"), + r = n.n(i), + o = n("../../../../node_modules/react-contextmenu/es6/helpers.js"), + a = "REACT_CONTEXTMENU_SHOW", + s = "REACT_CONTEXTMENU_HIDE"; + function c(e, t) { + var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : window, + i = void 0; + "function" == typeof window.CustomEvent ? (i = new window.CustomEvent(e, { detail: t })) : (i = document.createEvent("CustomEvent")).initCustomEvent(e, !1, !0, t), n && (n.dispatchEvent(i), r()(o.store, t)); + } + function l() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, + t = arguments[1]; + c(a, r()({}, e, { type: a }), t); + } + function u() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, + t = arguments[1]; + c(s, r()({}, e, { type: s }), t); + } + }, + "../../../../node_modules/react-contextmenu/es6/connectMenu.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react/index.js"), + r = n.n(i), + o = n("../../../../node_modules/react-contextmenu/es6/ContextMenuTrigger.js"), + a = n("../../../../node_modules/react-contextmenu/es6/globalEventListener.js"), + s = + Object.assign || + function (e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]); + } + return e; + }, + c = (function () { + function e(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); + } + } + return function (t, n, i) { + return n && e(t.prototype, n), i && e(t, i), t; + }; + })(), + l = [].concat( + (function (e) { + if (Array.isArray(e)) { + for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t]; + return n; + } + return Array.from(e); + })(Object.keys(o.default.propTypes)), + ["children"] + ); + t.default = function (e) { + return function (t) { + return (function (n) { + function i(t) { + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, i); + var n = (function (e, t) { + if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !t || ("object" != typeof t && "function" != typeof t) ? e : t; + })(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this, t)); + return ( + (n.handleShow = function (t) { + if (t.detail.id === e) { + var i = t.detail.data, + r = {}; + for (var o in i) l.includes(o) || (r[o] = i[o]); + n.setState({ trigger: r }); + } + }), + (n.handleHide = function () { + n.setState({ trigger: null }); + }), + (n.state = { trigger: null }), + n + ); + } + return ( + (function (e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); + (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), + t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t)); + })(i, n), + c(i, [ + { + key: "componentDidMount", + value: function () { + this.listenId = a.default.register(this.handleShow, this.handleHide); + }, + }, + { + key: "componentWillUnmount", + value: function () { + this.listenId && a.default.unregister(this.listenId); + }, + }, + { + key: "render", + value: function () { + return r.a.createElement(t, s({}, this.props, { id: e, trigger: this.state.trigger })); + }, + }, + ]), + i + ); + })(i.Component); + }; + }; + }, + "../../../../node_modules/react-contextmenu/es6/globalEventListener.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react-contextmenu/es6/actions.js"), + r = n("../../../../node_modules/react-contextmenu/es6/helpers.js"); + t.default = new (function e() { + var t = this; + !(function (e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); + })(this, e), + (this.handleShowEvent = function (e) { + for (var n in t.callbacks) Object(r.hasOwnProp)(t.callbacks, n) && t.callbacks[n].show(e); + }), + (this.handleHideEvent = function (e) { + for (var n in t.callbacks) Object(r.hasOwnProp)(t.callbacks, n) && t.callbacks[n].hide(e); + }), + (this.register = function (e, n) { + var i = Object(r.uniqueId)(); + return (t.callbacks[i] = { show: e, hide: n }), i; + }), + (this.unregister = function (e) { + e && t.callbacks[e] && delete t.callbacks[e]; + }), + (this.callbacks = {}), + r.canUseDOM && (window.addEventListener(i.MENU_SHOW, this.handleShowEvent), window.addEventListener(i.MENU_HIDE, this.handleHideEvent)); + })(); + }, + "../../../../node_modules/react-contextmenu/es6/helpers.js": function (e, t, n) { + "use strict"; + function i(e) { + for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; + return "function" == typeof e && e.apply(void 0, n); + } + function r(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + } + function o() { + return Math.random().toString(36).substring(7); + } + n.r(t), + n.d(t, "callIfExists", function () { + return i; + }), + n.d(t, "hasOwnProp", function () { + return r; + }), + n.d(t, "uniqueId", function () { + return o; + }), + n.d(t, "cssClasses", function () { + return a; + }), + n.d(t, "store", function () { + return s; + }), + n.d(t, "canUseDOM", function () { + return c; + }); + var a = { + menu: "react-contextmenu", + menuVisible: "react-contextmenu--visible", + menuWrapper: "react-contextmenu-wrapper", + menuItem: "react-contextmenu-item", + menuItemActive: "react-contextmenu-item--active", + menuItemDisabled: "react-contextmenu-item--disabled", + menuItemDivider: "react-contextmenu-item--divider", + menuItemSelected: "react-contextmenu-item--selected", + subMenu: "react-contextmenu-submenu", + }, + s = {}, + c = Boolean("undefined" != typeof window && window.document && window.document.createElement); + }, + "../../../../node_modules/react-contextmenu/es6/index.js": function (e, t, n) { + "use strict"; + n.r(t); + var i = n("../../../../node_modules/react-contextmenu/es6/ContextMenu.js"); + n.d(t, "ContextMenu", function () { + return i.default; + }); + var r = n("../../../../node_modules/react-contextmenu/es6/ContextMenuTrigger.js"); + n.d(t, "ContextMenuTrigger", function () { + return r.default; + }); + var o = n("../../../../node_modules/react-contextmenu/es6/MenuItem.js"); + n.d(t, "MenuItem", function () { + return o.default; + }); + var a = n("../../../../node_modules/react-contextmenu/es6/SubMenu.js"); + n.d(t, "SubMenu", function () { + return a.default; + }); + var s = n("../../../../node_modules/react-contextmenu/es6/connectMenu.js"); + n.d(t, "connectMenu", function () { + return s.default; + }); + var c = n("../../../../node_modules/react-contextmenu/es6/actions.js"); + n.d(t, "hideMenu", function () { + return c.hideMenu; + }), + n.d(t, "showMenu", function () { + return c.showMenu; + }); + }, + "../../../../node_modules/react-dom/cjs/react-dom.development.js": function (e, t, n) { + "use strict"; + !(function () { + var t = n("../../../../node_modules/react/index.js"), + i = n("../../../../node_modules/object-assign/index.js"), + r = n("../../../../node_modules/prop-types/checkPropTypes.js"), + o = n("../../../../node_modules/scheduler/index.js"), + a = n("../../../../node_modules/scheduler/tracing.js"); + function s(e) { + return (e.name = "Invariant Violation"), e; + } + !(function () { + if (!t) throw s(Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.")); + })(); + var c = null, + l = {}; + function u() { + if (c) + for (var e in l) { + var t = l[e], + n = c.indexOf(e); + if ( + ((function () { + if (!(n > -1)) throw s(Error("EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + e + "`.")); + })(), + !p[n]) + ) { + !(function () { + if (!t.extractEvents) throw s(Error("EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + e + "` does not.")); + })(), + (p[n] = t); + var i = t.eventTypes; + for (var r in i) + !(function () { + if (!h(i[r], t, r)) throw s(Error("EventPluginRegistry: Failed to publish event `" + r + "` for plugin `" + e + "`.")); + })(); + } + } + } + function h(e, t, n) { + !(function () { + if (f.hasOwnProperty(n)) throw s(Error("EventPluginHub: More than one plugin attempted to publish the same event name, `" + n + "`.")); + })(), + (f[n] = e); + var i = e.phasedRegistrationNames; + if (i) { + for (var r in i) i.hasOwnProperty(r) && d(i[r], t, n); + return !0; + } + return !!e.registrationName && (d(e.registrationName, t, n), !0); + } + function d(e, t, n) { + !(function () { + if (m[e]) throw s(Error("EventPluginHub: More than one plugin attempted to publish the same registration name, `" + e + "`.")); + })(), + (m[e] = t), + (g[e] = t.eventTypes[n].dependencies); + var i = e.toLowerCase(); + (b[i] = e), "onDoubleClick" === e && (b.ondblclick = e); + } + var p = [], + f = {}, + m = {}, + g = {}, + b = {}, + _ = function (e, t, n, i, r, o, a, s, c) { + var l = Array.prototype.slice.call(arguments, 3); + try { + t.apply(n, l); + } catch (e) { + this.onError(e); + } + }; + if ("undefined" != typeof window && "function" == typeof window.dispatchEvent && "undefined" != typeof document && "function" == typeof document.createEvent) { + var v = document.createElement("react"); + _ = function (e, t, n, i, r, o, a, c, l) { + !(function () { + if ("undefined" == typeof document) + throw s( + Error( + "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." + ) + ); + })(); + var u = document.createEvent("Event"), + h = !0, + d = window.event, + p = Object.getOwnPropertyDescriptor(window, "event"), + f = Array.prototype.slice.call(arguments, 3); + function m() { + v.removeEventListener(C, m, !1), void 0 !== window.event && window.hasOwnProperty("event") && (window.event = d), t.apply(n, f), (h = !1); + } + var g = void 0, + b = !1, + _ = !1; + function y(e) { + if (((g = e.error), (b = !0), null === g && 0 === e.colno && 0 === e.lineno && (_ = !0), e.defaultPrevented && null != g && "object" == typeof g)) + try { + g._suppressLogging = !0; + } catch (e) {} + } + var C = "react-" + (e || "invokeguardedcallback"); + window.addEventListener("error", y), + v.addEventListener(C, m, !1), + u.initEvent(C, !1, !1), + v.dispatchEvent(u), + p && Object.defineProperty(window, "event", p), + h && + (b + ? _ && + (g = new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")) + : (g = new Error( + "An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue." + )), + this.onError(g)), + window.removeEventListener("error", y); + }; + } + var y = _, + C = !1, + P = null, + x = !1, + T = null, + S = { + onError: function (e) { + (C = !0), (P = e); + }, + }; + function O(e, t, n, i, r, o, a, s, c) { + (C = !1), (P = null), y.apply(S, arguments); + } + function E(e, t, n, i, r, o, a, s, c) { + if ((O.apply(this, arguments), C)) { + var l = A(); + x || ((x = !0), (T = l)); + } + } + function M() { + return C; + } + function A() { + if (C) { + var e = P; + return (C = !1), (P = null), e; + } + !(function () { + throw s(Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")); + })(); + } + var I, + D = function (e, t) { + for (var n = arguments.length, i = Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++) i[r - 2] = arguments[r]; + if (void 0 === t) throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument"); + if (i.length > 8) throw new Error("warningWithoutStack() currently supports at most 8 arguments."); + if (!e) { + if ("undefined" != typeof console) { + var o = i.map(function (e) { + return "" + e; + }); + o.unshift("Warning: " + t), Function.prototype.apply.call(console.error, console, o); + } + try { + var a = 0, + s = + "Warning: " + + t.replace(/%s/g, function () { + return i[a++]; + }); + throw new Error(s); + } catch (e) {} + } + }, + R = null, + w = null, + L = null; + function F(e, t, n) { + var i = e.type || "unknown-event"; + (e.currentTarget = L(n)), E(i, t, void 0, e), (e.currentTarget = null); + } + function N(e, t) { + return ( + (function () { + if (null == t) throw s(Error("accumulateInto(...): Accumulated items must not be null or undefined.")); + })(), + null == e ? t : Array.isArray(e) ? (Array.isArray(t) ? (e.push.apply(e, t), e) : (e.push(t), e)) : Array.isArray(t) ? [e].concat(t) : [e, t] + ); + } + function k(e, t, n) { + Array.isArray(e) ? e.forEach(t, n) : e && t.call(n, e); + } + I = function (e) { + var t = e._dispatchListeners, + n = e._dispatchInstances, + i = Array.isArray(t), + r = i ? t.length : t ? 1 : 0, + o = Array.isArray(n), + a = o ? n.length : n ? 1 : 0; + (o !== i || a !== r) && D(!1, "EventPluginUtils: Invalid `event`."); + }; + var z = null, + j = function (e) { + e && + ((function (e) { + var t = e._dispatchListeners, + n = e._dispatchInstances; + if ((I(e), Array.isArray(t))) for (var i = 0; i < t.length && !e.isPropagationStopped(); i++) F(e, t[i], n[i]); + else t && F(e, t, n); + (e._dispatchListeners = null), (e._dispatchInstances = null); + })(e), + e.isPersistent() || e.constructor.release(e)); + }, + B = function (e) { + return j(e); + }; + function V(e) { + null !== e && (z = N(z, e)); + var t = z; + (z = null), + t && + (k(t, B), + (function () { + if (z) throw s(Error("processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.")); + })(), + (function () { + if (x) { + var e = T; + throw ((x = !1), (T = null), e); + } + })()); + } + var G = { + injectEventPluginOrder: function (e) { + !(function () { + if (c) throw s(Error("EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.")); + })(), + (c = Array.prototype.slice.call(e)), + u(); + }, + injectEventPluginsByName: function (e) { + var t = !1; + for (var n in e) + if (e.hasOwnProperty(n)) { + var i = e[n]; + (l.hasOwnProperty(n) && l[n] === i) || + ((function () { + if (l[n]) throw s(Error("EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + n + "`.")); + })(), + (l[n] = i), + (t = !0)); + } + t && u(); + }, + }; + function U(e, t) { + var n, + i = e.stateNode; + if (!i) return null; + var r = R(i); + return r + ? ((n = r[t]), + (function (e, t, n) { + switch (e) { + case "onClick": + case "onClickCapture": + case "onDoubleClick": + case "onDoubleClickCapture": + case "onMouseDown": + case "onMouseDownCapture": + case "onMouseMove": + case "onMouseMoveCapture": + case "onMouseUp": + case "onMouseUpCapture": + return !(!n.disabled || ((i = t), "button" !== i && "input" !== i && "select" !== i && "textarea" !== i)); + default: + return !1; + } + var i; + })(t, e.type, r) + ? null + : ((function () { + if (n && "function" != typeof n) throw s(Error("Expected `" + t + "` listener to be a function, instead got a value of `" + typeof n + "` type.")); + })(), + n)) + : null; + } + function H(e, t, n, i) { + V( + (function (e, t, n, i) { + for (var r = null, o = 0; o < p.length; o++) { + var a = p[o]; + if (a) { + var s = a.extractEvents(e, t, n, i); + s && (r = N(r, s)); + } + } + return r; + })(e, t, n, i) + ); + } + var W = Math.random().toString(36).slice(2), + X = "__reactInternalInstance$" + W, + Y = "__reactEventHandlers$" + W; + function K(e, t) { + t[X] = e; + } + function Z(e) { + if (e[X]) return e[X]; + for (; !e[X]; ) { + if (!e.parentNode) return null; + e = e.parentNode; + } + var t = e[X]; + return 5 === t.tag || 6 === t.tag ? t : null; + } + function q(e) { + var t = e[X]; + return !t || (5 !== t.tag && 6 !== t.tag) ? null : t; + } + function Q(e) { + if (5 === e.tag || 6 === e.tag) return e.stateNode; + !(function () { + throw s(Error("getNodeFromInstance: Invalid argument.")); + })(); + } + function J(e) { + return e[Y] || null; + } + function $(e, t) { + e[Y] = t; + } + function ee(e) { + do { + e = e.return; + } while (e && 5 !== e.tag); + return e || null; + } + function te(e, t, n, i, r) { + for ( + var o = + e && t + ? (function (e, t) { + for (var n = 0, i = e; i; i = ee(i)) n++; + for (var r = 0, o = t; o; o = ee(o)) r++; + for (; n - r > 0; ) (e = ee(e)), n--; + for (; r - n > 0; ) (t = ee(t)), r--; + for (var a = n; a--; ) { + if (e === t || e === t.alternate) return e; + (e = ee(e)), (t = ee(t)); + } + return null; + })(e, t) + : null, + a = []; + e && e !== o; + + ) { + var s = e.alternate; + if (null !== s && s === o) break; + a.push(e), (e = ee(e)); + } + for (var c = []; t && t !== o; ) { + var l = t.alternate; + if (null !== l && l === o) break; + c.push(t), (t = ee(t)); + } + for (var u = 0; u < a.length; u++) n(a[u], "bubbled", i); + for (var h = c.length; h-- > 0; ) n(c[h], "captured", r); + } + function ne(e, t, n) { + e || D(!1, "Dispatching inst must not be null"); + var i = (function (e, t, n) { + return U(e, t.dispatchConfig.phasedRegistrationNames[n]); + })(e, n, t); + i && ((n._dispatchListeners = N(n._dispatchListeners, i)), (n._dispatchInstances = N(n._dispatchInstances, e))); + } + function ie(e) { + e && + e.dispatchConfig.phasedRegistrationNames && + (function (e, t, n) { + for (var i = []; e; ) i.push(e), (e = ee(e)); + var r = void 0; + for (r = i.length; r-- > 0; ) t(i[r], "captured", n); + for (r = 0; r < i.length; r++) t(i[r], "bubbled", n); + })(e._targetInst, ne, e); + } + function re(e, t, n) { + if (e && n && n.dispatchConfig.registrationName) { + var i = U(e, n.dispatchConfig.registrationName); + i && ((n._dispatchListeners = N(n._dispatchListeners, i)), (n._dispatchInstances = N(n._dispatchInstances, e))); + } + } + function oe(e) { + e && e.dispatchConfig.registrationName && re(e._targetInst, 0, e); + } + function ae(e) { + k(e, ie); + } + var se = !("undefined" == typeof window || void 0 === window.document || void 0 === window.document.createElement); + function ce(e, t) { + var n = {}; + return (n[e.toLowerCase()] = t.toLowerCase()), (n["Webkit" + e] = "webkit" + t), (n["Moz" + e] = "moz" + t), n; + } + var le = { + animationend: ce("Animation", "AnimationEnd"), + animationiteration: ce("Animation", "AnimationIteration"), + animationstart: ce("Animation", "AnimationStart"), + transitionend: ce("Transition", "TransitionEnd"), + }, + ue = {}, + he = {}; + function de(e) { + if (ue[e]) return ue[e]; + if (!le[e]) return e; + var t = le[e]; + for (var n in t) if (t.hasOwnProperty(n) && n in he) return (ue[e] = t[n]); + return e; + } + se && + ((he = document.createElement("div").style), + "AnimationEvent" in window || (delete le.animationend.animation, delete le.animationiteration.animation, delete le.animationstart.animation), + "TransitionEvent" in window || delete le.transitionend.transition); + var pe = de("animationend"), + fe = de("animationiteration"), + me = de("animationstart"), + ge = de("transitionend"), + be = [ + "abort", + "canplay", + "canplaythrough", + "durationchange", + "emptied", + "encrypted", + "ended", + "error", + "loadeddata", + "loadedmetadata", + "loadstart", + "pause", + "play", + "playing", + "progress", + "ratechange", + "seeked", + "seeking", + "stalled", + "suspend", + "timeupdate", + "volumechange", + "waiting", + ], + _e = null, + ve = null, + ye = null; + function Ce() { + if (ye) return ye; + var e = void 0, + t = ve, + n = t.length, + i = void 0, + r = Pe(), + o = r.length; + for (e = 0; e < n && t[e] === r[e]; e++); + var a = n - e; + for (i = 1; i <= a && t[n - i] === r[o - i]; i++); + var s = i > 1 ? 1 - i : void 0; + return (ye = r.slice(e, s)); + } + function Pe() { + return "value" in _e ? _e.value : _e.textContent; + } + var xe = { + type: null, + target: null, + currentTarget: function () { + return null; + }, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (e) { + return e.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null, + }; + function Te() { + return !0; + } + function Se() { + return !1; + } + function Oe(e, t, n, i) { + delete this.nativeEvent, + delete this.preventDefault, + delete this.stopPropagation, + delete this.isDefaultPrevented, + delete this.isPropagationStopped, + (this.dispatchConfig = e), + (this._targetInst = t), + (this.nativeEvent = n); + var r = this.constructor.Interface; + for (var o in r) + if (r.hasOwnProperty(o)) { + delete this[o]; + var a = r[o]; + a ? (this[o] = a(n)) : "target" === o ? (this.target = i) : (this[o] = n[o]); + } + var s = null != n.defaultPrevented ? n.defaultPrevented : !1 === n.returnValue; + return (this.isDefaultPrevented = s ? Te : Se), (this.isPropagationStopped = Se), this; + } + function Ee(e, t) { + var n = "function" == typeof t; + return { + configurable: !0, + set: function (e) { + return i(n ? "setting the method" : "setting the property", "This is effectively a no-op"), e; + }, + get: function () { + return i(n ? "accessing the method" : "accessing the property", n ? "This is a no-op function" : "This is set to null"), t; + }, + }; + function i(t, n) { + D( + !1, + "This synthetic event is reused for performance reasons. If you're seeing this, you're %s `%s` on a released/nullified synthetic event. %s. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.", + t, + e, + n + ); + } + } + function Me(e, t, n, i) { + if (this.eventPool.length) { + var r = this.eventPool.pop(); + return this.call(r, e, t, n, i), r; + } + return new this(e, t, n, i); + } + function Ae(e) { + var t = this; + !(function () { + if (!(e instanceof t)) throw s(Error("Trying to release an event instance into a pool of a different type.")); + })(), + e.destructor(), + t.eventPool.length < 10 && t.eventPool.push(e); + } + function Ie(e) { + (e.eventPool = []), (e.getPooled = Me), (e.release = Ae); + } + i(Oe.prototype, { + preventDefault: function () { + this.defaultPrevented = !0; + var e = this.nativeEvent; + e && (e.preventDefault ? e.preventDefault() : "unknown" != typeof e.returnValue && (e.returnValue = !1), (this.isDefaultPrevented = Te)); + }, + stopPropagation: function () { + var e = this.nativeEvent; + e && (e.stopPropagation ? e.stopPropagation() : "unknown" != typeof e.cancelBubble && (e.cancelBubble = !0), (this.isPropagationStopped = Te)); + }, + persist: function () { + this.isPersistent = Te; + }, + isPersistent: Se, + destructor: function () { + var e = this.constructor.Interface; + for (var t in e) Object.defineProperty(this, t, Ee(t, e[t])); + (this.dispatchConfig = null), + (this._targetInst = null), + (this.nativeEvent = null), + (this.isDefaultPrevented = Se), + (this.isPropagationStopped = Se), + (this._dispatchListeners = null), + (this._dispatchInstances = null), + Object.defineProperty(this, "nativeEvent", Ee("nativeEvent", null)), + Object.defineProperty(this, "isDefaultPrevented", Ee("isDefaultPrevented", Se)), + Object.defineProperty(this, "isPropagationStopped", Ee("isPropagationStopped", Se)), + Object.defineProperty( + this, + "preventDefault", + Ee("preventDefault", function () {}) + ), + Object.defineProperty( + this, + "stopPropagation", + Ee("stopPropagation", function () {}) + ); + }, + }), + (Oe.Interface = xe), + (Oe.extend = function (e) { + var t = this, + n = function () {}; + n.prototype = t.prototype; + var r = new n(); + function o() { + return t.apply(this, arguments); + } + return i(r, o.prototype), (o.prototype = r), (o.prototype.constructor = o), (o.Interface = i({}, t.Interface, e)), (o.extend = t.extend), Ie(o), o; + }), + Ie(Oe); + var De = Oe.extend({ data: null }), + Re = Oe.extend({ data: null }), + we = [9, 13, 27, 32], + Le = se && "CompositionEvent" in window, + Fe = null; + se && "documentMode" in document && (Fe = document.documentMode); + var Ne = se && "TextEvent" in window && !Fe, + ke = se && (!Le || (Fe && Fe > 8 && Fe <= 11)), + ze = String.fromCharCode(32), + je = { + beforeInput: { phasedRegistrationNames: { bubbled: "onBeforeInput", captured: "onBeforeInputCapture" }, dependencies: ["compositionend", "keypress", "textInput", "paste"] }, + compositionEnd: { + phasedRegistrationNames: { bubbled: "onCompositionEnd", captured: "onCompositionEndCapture" }, + dependencies: ["blur", "compositionend", "keydown", "keypress", "keyup", "mousedown"], + }, + compositionStart: { + phasedRegistrationNames: { bubbled: "onCompositionStart", captured: "onCompositionStartCapture" }, + dependencies: ["blur", "compositionstart", "keydown", "keypress", "keyup", "mousedown"], + }, + compositionUpdate: { + phasedRegistrationNames: { bubbled: "onCompositionUpdate", captured: "onCompositionUpdateCapture" }, + dependencies: ["blur", "compositionupdate", "keydown", "keypress", "keyup", "mousedown"], + }, + }, + Be = !1; + function Ve(e, t) { + switch (e) { + case "keyup": + return -1 !== we.indexOf(t.keyCode); + case "keydown": + return 229 !== t.keyCode; + case "keypress": + case "mousedown": + case "blur": + return !0; + default: + return !1; + } + } + function Ge(e) { + var t = e.detail; + return "object" == typeof t && "data" in t ? t.data : null; + } + function Ue(e) { + return "ko" === e.locale; + } + var He = !1; + function We(e, t, n, i) { + var r = void 0, + o = void 0; + if ( + (Le + ? (r = (function (e) { + switch (e) { + case "compositionstart": + return je.compositionStart; + case "compositionend": + return je.compositionEnd; + case "compositionupdate": + return je.compositionUpdate; + } + })(e)) + : He + ? Ve(e, n) && (r = je.compositionEnd) + : (function (e, t) { + return "keydown" === e && 229 === t.keyCode; + })(e, n) && (r = je.compositionStart), + !r) + ) + return null; + ke && + !Ue(n) && + (He || r !== je.compositionStart + ? r === je.compositionEnd && He && (o = Ce()) + : (He = (function (e) { + return (_e = e), (ve = Pe()), !0; + })(i))); + var a = De.getPooled(r, t, n, i); + if (o) a.data = o; + else { + var s = Ge(n); + null !== s && (a.data = s); + } + return ae(a), a; + } + function Xe(e, t) { + if (He) { + if ("compositionend" === e || (!Le && Ve(e, t))) { + var n = Ce(); + return (_e = null), (ve = null), (ye = null), (He = !1), n; + } + return null; + } + switch (e) { + case "paste": + return null; + case "keypress": + if ( + !(function (e) { + return (e.ctrlKey || e.altKey || e.metaKey) && !(e.ctrlKey && e.altKey); + })(t) + ) { + if (t.char && t.char.length > 1) return t.char; + if (t.which) return String.fromCharCode(t.which); + } + return null; + case "compositionend": + return ke && !Ue(t) ? null : t.data; + default: + return null; + } + } + function Ye(e, t, n, i) { + var r = void 0; + if ( + !(r = Ne + ? (function (e, t) { + switch (e) { + case "compositionend": + return Ge(t); + case "keypress": + return 32 !== t.which ? null : ((Be = !0), ze); + case "textInput": + var n = t.data; + return n === ze && Be ? null : n; + default: + return null; + } + })(e, n) + : Xe(e, n)) + ) + return null; + var o = Re.getPooled(je.beforeInput, t, n, i); + return (o.data = r), ae(o), o; + } + var Ke = { + eventTypes: je, + extractEvents: function (e, t, n, i) { + var r = We(e, t, n, i), + o = Ye(e, t, n, i); + return null === r ? o : null === o ? r : [r, o]; + }, + }, + Ze = null, + qe = null, + Qe = null; + function Je(e) { + var t = w(e); + if (t) { + !(function () { + if ("function" != typeof Ze) + throw s(Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.")); + })(); + var n = R(t.stateNode); + Ze(t.stateNode, t.type, n); + } + } + function $e(e) { + qe ? (Qe ? Qe.push(e) : (Qe = [e])) : (qe = e); + } + function et() { + if (qe) { + var e = qe, + t = Qe; + if (((qe = null), (Qe = null), Je(e), t)) for (var n = 0; n < t.length; n++) Je(t[n]); + } + } + var tt = function (e, t) { + return e(t); + }, + nt = function (e, t, n, i) { + return e(t, n, i); + }, + it = function () {}, + rt = tt, + ot = !1; + function at() { + (null !== qe || null !== Qe) && (it(), et()); + } + function st(e, t, n) { + if (ot) return e(t, n); + ot = !0; + try { + return rt(e, t, n); + } finally { + (ot = !1), at(); + } + } + function ct(e, t, n, i) { + var r = ot; + ot = !0; + try { + return nt(e, t, n, i); + } finally { + (ot = r) || at(); + } + } + function lt(e) { + ot || it(); + } + var ut = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 }; + function ht(e) { + var t = e && e.nodeName && e.nodeName.toLowerCase(); + return "input" === t ? !!ut[e.type] : "textarea" === t; + } + function dt(e) { + var t = e.target || e.srcElement || window; + return t.correspondingUseElement && (t = t.correspondingUseElement), 3 === t.nodeType ? t.parentNode : t; + } + function pt(e) { + if (!se) return !1; + var t = "on" + e, + n = t in document; + if (!n) { + var i = document.createElement("div"); + i.setAttribute(t, "return;"), (n = "function" == typeof i[t]); + } + return n; + } + function ft(e) { + var t = e.type, + n = e.nodeName; + return n && "input" === n.toLowerCase() && ("checkbox" === t || "radio" === t); + } + function mt(e) { + return e._valueTracker; + } + function gt(e) { + mt(e) || + (e._valueTracker = (function (e) { + var t = ft(e) ? "checked" : "value", + n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), + i = "" + e[t]; + if (!e.hasOwnProperty(t) && void 0 !== n && "function" == typeof n.get && "function" == typeof n.set) { + var r = n.get, + o = n.set; + return ( + Object.defineProperty(e, t, { + configurable: !0, + get: function () { + return r.call(this); + }, + set: function (e) { + (i = "" + e), o.call(this, e); + }, + }), + Object.defineProperty(e, t, { enumerable: n.enumerable }), + { + getValue: function () { + return i; + }, + setValue: function (e) { + i = "" + e; + }, + stopTracking: function () { + !(function (e) { + e._valueTracker = null; + })(e), + delete e[t]; + }, + } + ); + } + })(e)); + } + function bt(e) { + if (!e) return !1; + var t = mt(e); + if (!t) return !0; + var n = t.getValue(), + i = (function (e) { + var t = ""; + return e ? (t = ft(e) ? (e.checked ? "true" : "false") : e.value) : t; + })(e); + return i !== n && (t.setValue(i), !0); + } + var _t = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + _t.hasOwnProperty("ReactCurrentDispatcher") || (_t.ReactCurrentDispatcher = { current: null }), _t.hasOwnProperty("ReactCurrentBatchConfig") || (_t.ReactCurrentBatchConfig = { suspense: null }); + var vt = /^(.*)[\\\/]/, + yt = "function" == typeof Symbol && Symbol.for, + Ct = yt ? Symbol.for("react.element") : 60103, + Pt = yt ? Symbol.for("react.portal") : 60106, + xt = yt ? Symbol.for("react.fragment") : 60107, + Tt = yt ? Symbol.for("react.strict_mode") : 60108, + St = yt ? Symbol.for("react.profiler") : 60114, + Ot = yt ? Symbol.for("react.provider") : 60109, + Et = yt ? Symbol.for("react.context") : 60110, + Mt = yt ? Symbol.for("react.concurrent_mode") : 60111, + At = yt ? Symbol.for("react.forward_ref") : 60112, + It = yt ? Symbol.for("react.suspense") : 60113, + Dt = yt ? Symbol.for("react.suspense_list") : 60120, + Rt = yt ? Symbol.for("react.memo") : 60115, + wt = yt ? Symbol.for("react.lazy") : 60116, + Lt = (yt && Symbol.for("react.fundamental"), yt && Symbol.for("react.responder"), "function" == typeof Symbol && Symbol.iterator); + function Ft(e) { + if (null === e || "object" != typeof e) return null; + var t = (Lt && e[Lt]) || e["@@iterator"]; + return "function" == typeof t ? t : null; + } + function Nt(e) { + return 1 === e._status ? e._result : null; + } + function kt(e) { + if (null == e) return null; + if (("number" == typeof e.tag && D(!1, "Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), "function" == typeof e)) + return e.displayName || e.name || null; + if ("string" == typeof e) return e; + switch (e) { + case xt: + return "Fragment"; + case Pt: + return "Portal"; + case St: + return "Profiler"; + case Tt: + return "StrictMode"; + case It: + return "Suspense"; + case Dt: + return "SuspenseList"; + } + if ("object" == typeof e) + switch (e.$$typeof) { + case Et: + return "Context.Consumer"; + case Ot: + return "Context.Provider"; + case At: + return (n = e), (i = e.render), (r = "ForwardRef"), (o = i.displayName || i.name || ""), n.displayName || ("" !== o ? r + "(" + o + ")" : r); + case Rt: + return kt(e.type); + case wt: + var t = Nt(e); + if (t) return kt(t); + } + var n, i, r, o; + return null; + } + var zt = _t.ReactDebugCurrentFrame; + function jt(e) { + switch (e.tag) { + case 3: + case 4: + case 6: + case 7: + case 10: + case 9: + return ""; + default: + var t = e._debugOwner, + n = e._debugSource, + i = kt(e.type), + r = null; + return ( + t && (r = kt(t.type)), + (function (e, t, n) { + var i = ""; + if (t) { + var r = t.fileName, + o = r.replace(vt, ""); + if (/^index\./.test(o)) { + var a = r.match(vt); + if (a) { + var s = a[1]; + s && (o = s.replace(vt, "") + "/" + o); + } + } + i = " (at " + o + ":" + t.lineNumber + ")"; + } else n && (i = " (created by " + n + ")"); + return "\n in " + (e || "Unknown") + i; + })(i, n, r) + ); + } + } + function Bt(e) { + var t = "", + n = e; + do { + (t += jt(n)), (n = n.return); + } while (n); + return t; + } + var Vt = null, + Gt = null; + function Ut() { + if (null === Vt) return null; + var e = Vt._debugOwner; + return null != e ? kt(e.type) : null; + } + function Ht() { + return null === Vt ? "" : Bt(Vt); + } + function Wt() { + (zt.getCurrentStack = null), (Vt = null), (Gt = null); + } + function Xt(e) { + (zt.getCurrentStack = Ht), (Vt = e), (Gt = null); + } + function Yt(e) { + Gt = e; + } + var Kt = function (e, t) { + if (!e) { + for (var n = _t.ReactDebugCurrentFrame, i = n.getStackAddendum(), r = arguments.length, o = Array(r > 2 ? r - 2 : 0), a = 2; a < r; a++) o[a - 2] = arguments[a]; + D.apply(void 0, [!1, t + "%s"].concat(o, [i])); + } + }, + Zt = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", + qt = Zt + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", + Qt = new RegExp("^[" + Zt + "][" + qt + "]*$"), + Jt = Object.prototype.hasOwnProperty, + $t = {}, + en = {}; + function tn(e) { + return !!Jt.call(en, e) || (!Jt.call($t, e) && (Qt.test(e) ? ((en[e] = !0), !0) : (($t[e] = !0), Kt(!1, "Invalid attribute name: `%s`", e), !1))); + } + function nn(e, t, n) { + return null !== t ? 0 === t.type : !n && e.length > 2 && ("o" === e[0] || "O" === e[0]) && ("n" === e[1] || "N" === e[1]); + } + function rn(e, t, n, i) { + if (null !== n && 0 === n.type) return !1; + switch (typeof t) { + case "function": + case "symbol": + return !0; + case "boolean": + if (i) return !1; + if (null !== n) return !n.acceptsBooleans; + var r = e.toLowerCase().slice(0, 5); + return "data-" !== r && "aria-" !== r; + default: + return !1; + } + } + function on(e, t, n, i) { + if (null == t) return !0; + if (rn(e, t, n, i)) return !0; + if (i) return !1; + if (null !== n) + switch (n.type) { + case 3: + return !t; + case 4: + return !1 === t; + case 5: + return isNaN(t); + case 6: + return isNaN(t) || t < 1; + } + return !1; + } + function an(e) { + return cn.hasOwnProperty(e) ? cn[e] : null; + } + function sn(e, t, n, i, r, o) { + (this.acceptsBooleans = 2 === t || 3 === t || 4 === t), + (this.attributeName = i), + (this.attributeNamespace = r), + (this.mustUseProperty = n), + (this.propertyName = e), + (this.type = t), + (this.sanitizeURL = o); + } + var cn = {}; + ["children", "dangerouslySetInnerHTML", "defaultValue", "defaultChecked", "innerHTML", "suppressContentEditableWarning", "suppressHydrationWarning", "style"].forEach(function (e) { + cn[e] = new sn(e, 0, !1, e, null, !1); + }), + [ + ["acceptCharset", "accept-charset"], + ["className", "class"], + ["htmlFor", "for"], + ["httpEquiv", "http-equiv"], + ].forEach(function (e) { + var t = e[0], + n = e[1]; + cn[t] = new sn(t, 1, !1, n, null, !1); + }), + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (e) { + cn[e] = new sn(e, 2, !1, e.toLowerCase(), null, !1); + }), + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function (e) { + cn[e] = new sn(e, 2, !1, e, null, !1); + }), + [ + "allowFullScreen", + "async", + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + "itemScope", + ].forEach(function (e) { + cn[e] = new sn(e, 3, !1, e.toLowerCase(), null, !1); + }), + ["checked", "multiple", "muted", "selected"].forEach(function (e) { + cn[e] = new sn(e, 3, !0, e, null, !1); + }), + ["capture", "download"].forEach(function (e) { + cn[e] = new sn(e, 4, !1, e, null, !1); + }), + ["cols", "rows", "size", "span"].forEach(function (e) { + cn[e] = new sn(e, 6, !1, e, null, !1); + }), + ["rowSpan", "start"].forEach(function (e) { + cn[e] = new sn(e, 5, !1, e.toLowerCase(), null, !1); + }); + var ln = /[\-\:]([a-z])/g, + un = function (e) { + return e[1].toUpperCase(); + }; + [ + "accent-height", + "alignment-baseline", + "arabic-form", + "baseline-shift", + "cap-height", + "clip-path", + "clip-rule", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "dominant-baseline", + "enable-background", + "fill-opacity", + "fill-rule", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-name", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "horiz-origin-x", + "image-rendering", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "overline-position", + "overline-thickness", + "paint-order", + "panose-1", + "pointer-events", + "rendering-intent", + "shape-rendering", + "stop-color", + "stop-opacity", + "strikethrough-position", + "strikethrough-thickness", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "underline-position", + "underline-thickness", + "unicode-bidi", + "unicode-range", + "units-per-em", + "v-alphabetic", + "v-hanging", + "v-ideographic", + "v-mathematical", + "vector-effect", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "word-spacing", + "writing-mode", + "xmlns:xlink", + "x-height", + ].forEach(function (e) { + var t = e.replace(ln, un); + cn[t] = new sn(t, 1, !1, e, null, !1); + }), + ["xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title", "xlink:type"].forEach(function (e) { + var t = e.replace(ln, un); + cn[t] = new sn(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1); + }), + ["xml:base", "xml:lang", "xml:space"].forEach(function (e) { + var t = e.replace(ln, un); + cn[t] = new sn(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1); + }), + ["tabIndex", "crossOrigin"].forEach(function (e) { + cn[e] = new sn(e, 1, !1, e.toLowerCase(), null, !1); + }), + (cn.xlinkHref = new sn("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0)), + ["src", "href", "action", "formAction"].forEach(function (e) { + cn[e] = new sn(e, 1, !1, e.toLowerCase(), null, !0); + }), + _t.ReactDebugCurrentFrame; + var hn = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i, + dn = !1; + function pn(e) { + !dn && + hn.test(e) && + ((dn = !0), + Kt( + !1, + "A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", + JSON.stringify(e) + )); + } + function fn(e, t, n, i) { + if (i.mustUseProperty) return e[i.propertyName]; + i.sanitizeURL && pn("" + n); + var r = i.attributeName, + o = null; + if (4 === i.type) { + if (e.hasAttribute(r)) { + var a = e.getAttribute(r); + return "" === a || (on(t, n, i, !1) ? a : a === "" + n ? n : a); + } + } else if (e.hasAttribute(r)) { + if (on(t, n, i, !1)) return e.getAttribute(r); + if (3 === i.type) return n; + o = e.getAttribute(r); + } + return on(t, n, i, !1) ? (null === o ? n : o) : o === "" + n ? n : o; + } + function mn(e, t, n) { + if (tn(t)) { + if (!e.hasAttribute(t)) return void 0 === n ? void 0 : null; + var i = e.getAttribute(t); + return i === "" + n ? n : i; + } + } + function gn(e, t, n, i) { + var r = an(t); + if (!nn(t, r, i)) + if ((on(t, n, r, i) && (n = null), i || null === r)) { + if (tn(t)) { + var o = t; + null === n ? e.removeAttribute(o) : e.setAttribute(o, "" + n); + } + } else if (r.mustUseProperty) { + var a = r.propertyName; + if (null === n) { + var s = r.type; + e[a] = 3 !== s && ""; + } else e[a] = n; + } else { + var c = r.attributeName, + l = r.attributeNamespace; + if (null === n) e.removeAttribute(c); + else { + var u = r.type, + h = void 0; + 3 === u || (4 === u && !0 === n) ? (h = "") : ((h = "" + n), r.sanitizeURL && pn(h)), l ? e.setAttributeNS(l, c, h) : e.setAttribute(c, h); + } + } + } + function bn(e) { + return "" + e; + } + function _n(e) { + switch (typeof e) { + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return e; + default: + return ""; + } + } + var vn, + yn = { checkPropTypes: null }; + vn = _t.ReactDebugCurrentFrame; + var Cn = { button: !0, checkbox: !0, image: !0, hidden: !0, radio: !0, reset: !0, submit: !0 }, + Pn = { + value: function (e, t, n) { + return Cn[e.type] || e.onChange || e.readOnly || e.disabled || null == e[t] + ? null + : new Error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + ); + }, + checked: function (e, t, n) { + return e.onChange || e.readOnly || e.disabled || null == e[t] + ? null + : new Error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + }, + }; + yn.checkPropTypes = function (e, t) { + r(Pn, t, "prop", e, vn.getStackAddendum); + }; + var xn = !1, + Tn = !1, + Sn = !1, + On = !1; + function En(e) { + return "checkbox" === e.type || "radio" === e.type ? null != e.checked : null != e.value; + } + function Mn(e, t) { + var n = e, + r = t.checked; + return i({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: null != r ? r : n._wrapperState.initialChecked }); + } + function An(e, t) { + yn.checkPropTypes("input", t), + void 0 === t.checked || + void 0 === t.defaultChecked || + Tn || + (Kt( + !1, + "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components", + Ut() || "A component", + t.type + ), + (Tn = !0)), + void 0 === t.value || + void 0 === t.defaultValue || + xn || + (Kt( + !1, + "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components", + Ut() || "A component", + t.type + ), + (xn = !0)); + var n = e, + i = null == t.defaultValue ? "" : t.defaultValue; + n._wrapperState = { initialChecked: null != t.checked ? t.checked : t.defaultChecked, initialValue: _n(null != t.value ? t.value : i), controlled: En(t) }; + } + function In(e, t) { + var n = e, + i = t.checked; + null != i && gn(n, "checked", i, !1); + } + function Dn(e, t) { + var n = e, + i = En(t); + n._wrapperState.controlled || + !i || + On || + (Kt( + !1, + "A component is changing an uncontrolled input of type %s to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components", + t.type + ), + (On = !0)), + !n._wrapperState.controlled || + i || + Sn || + (Kt( + !1, + "A component is changing a controlled input of type %s to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components", + t.type + ), + (Sn = !0)), + In(e, t); + var r = _n(t.value), + o = t.type; + if (null != r) "number" === o ? ((0 === r && "" === n.value) || n.value != r) && (n.value = bn(r)) : n.value !== bn(r) && (n.value = bn(r)); + else if ("submit" === o || "reset" === o) return void n.removeAttribute("value"); + t.hasOwnProperty("value") ? Ln(n, t.type, r) : t.hasOwnProperty("defaultValue") && Ln(n, t.type, _n(t.defaultValue)), + null == t.checked && null != t.defaultChecked && (n.defaultChecked = !!t.defaultChecked); + } + function Rn(e, t, n) { + var i = e; + if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) { + var r = t.type, + o = "submit" === r || "reset" === r; + if (o && (void 0 === t.value || null === t.value)) return; + var a = bn(i._wrapperState.initialValue); + n || (a !== i.value && (i.value = a)), (i.defaultValue = a); + } + var s = i.name; + "" !== s && (i.name = ""), (i.defaultChecked = !i.defaultChecked), (i.defaultChecked = !!i._wrapperState.initialChecked), "" !== s && (i.name = s); + } + function wn(e, t) { + var n = e; + Dn(n, t), + (function (e, t) { + var n = t.name; + if ("radio" === t.type && null != n) { + for (var i = e; i.parentNode; ) i = i.parentNode; + for (var r = i.querySelectorAll("input[name=" + JSON.stringify("" + n) + '][type="radio"]'), o = 0; o < r.length; o++) { + var a = r[o]; + if (a !== e && a.form === e.form) { + var c = J(a); + !(function () { + if (!c) throw s(Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.")); + })(), + bt(a), + Dn(a, c); + } + } + } + })(n, t); + } + function Ln(e, t, n) { + ("number" === t && e.ownerDocument.activeElement === e) || (null == n ? (e.defaultValue = bn(e._wrapperState.initialValue)) : e.defaultValue !== bn(n) && (e.defaultValue = bn(n))); + } + var Fn = { change: { phasedRegistrationNames: { bubbled: "onChange", captured: "onChangeCapture" }, dependencies: ["blur", "change", "click", "focus", "input", "keydown", "keyup", "selectionchange"] } }; + function Nn(e, t, n) { + var i = Oe.getPooled(Fn.change, e, t, n); + return (i.type = "change"), $e(n), ae(i), i; + } + var kn = null, + zn = null; + function jn(e) { + !(function (e, t) { + if (ot) return e(t); + ot = !0; + try { + tt(e, t); + } finally { + (ot = !1), at(); + } + })(Bn, Nn(zn, e, dt(e))); + } + function Bn(e) { + V(e); + } + function Vn(e) { + if (bt(Q(e))) return e; + } + function Gn(e, t) { + if ("change" === e) return t; + } + var Un = !1; + function Hn() { + kn && (kn.detachEvent("onpropertychange", Wn), (kn = null), (zn = null)); + } + function Wn(e) { + "value" === e.propertyName && Vn(zn) && jn(e); + } + function Xn(e, t, n) { + "focus" === e + ? (Hn(), + (function (e, t) { + (zn = t), (kn = e).attachEvent("onpropertychange", Wn); + })(t, n)) + : "blur" === e && Hn(); + } + function Yn(e, t) { + if ("selectionchange" === e || "keyup" === e || "keydown" === e) return Vn(zn); + } + function Kn(e, t) { + if ("click" === e) return Vn(t); + } + function Zn(e, t) { + if ("input" === e || "change" === e) return Vn(t); + } + se && (Un = pt("input") && (!document.documentMode || document.documentMode > 9)); + var qn = { + eventTypes: Fn, + _isInputEventSupported: Un, + extractEvents: function (e, t, n, i) { + var r, + o, + a, + s, + c = t ? Q(t) : window, + l = void 0, + u = void 0; + if ( + ("select" === (o = (r = c).nodeName && r.nodeName.toLowerCase()) || ("input" === o && "file" === r.type) + ? (l = Gn) + : ht(c) + ? Un + ? (l = Zn) + : ((l = Yn), (u = Xn)) + : (function (e) { + var t = e.nodeName; + return t && "input" === t.toLowerCase() && ("checkbox" === e.type || "radio" === e.type); + })(c) && (l = Kn), + l) + ) { + var h = l(e, t); + if (h) return Nn(h, n, i); + } + u && u(e, c, t), "blur" === e && (s = (a = c)._wrapperState) && s.controlled && "number" === a.type && Ln(a, "number", a.value); + }, + }, + Qn = Oe.extend({ view: null, detail: null }), + Jn = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; + function $n(e) { + var t = this.nativeEvent; + if (t.getModifierState) return t.getModifierState(e); + var n = Jn[e]; + return !!n && !!t[n]; + } + function ei(e) { + return $n; + } + var ti = 0, + ni = 0, + ii = !1, + ri = !1, + oi = Qn.extend({ + screenX: null, + screenY: null, + clientX: null, + clientY: null, + pageX: null, + pageY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: ei, + button: null, + buttons: null, + relatedTarget: function (e) { + return e.relatedTarget || (e.fromElement === e.srcElement ? e.toElement : e.fromElement); + }, + movementX: function (e) { + if ("movementX" in e) return e.movementX; + var t = ti; + return (ti = e.screenX), ii ? ("mousemove" === e.type ? e.screenX - t : 0) : ((ii = !0), 0); + }, + movementY: function (e) { + if ("movementY" in e) return e.movementY; + var t = ni; + return (ni = e.screenY), ri ? ("mousemove" === e.type ? e.screenY - t : 0) : ((ri = !0), 0); + }, + }), + ai = oi.extend({ pointerId: null, width: null, height: null, pressure: null, tangentialPressure: null, tiltX: null, tiltY: null, twist: null, pointerType: null, isPrimary: null }), + si = { + mouseEnter: { registrationName: "onMouseEnter", dependencies: ["mouseout", "mouseover"] }, + mouseLeave: { registrationName: "onMouseLeave", dependencies: ["mouseout", "mouseover"] }, + pointerEnter: { registrationName: "onPointerEnter", dependencies: ["pointerout", "pointerover"] }, + pointerLeave: { registrationName: "onPointerLeave", dependencies: ["pointerout", "pointerover"] }, + }, + ci = { + eventTypes: si, + extractEvents: function (e, t, n, i) { + var r = "mouseover" === e || "pointerover" === e, + o = "mouseout" === e || "pointerout" === e; + if (r && (n.relatedTarget || n.fromElement)) return null; + if (!o && !r) return null; + var a = void 0; + if (i.window === i) a = i; + else { + var s = i.ownerDocument; + a = s ? s.defaultView || s.parentWindow : window; + } + var c = void 0, + l = void 0; + if (o) { + c = t; + var u = n.relatedTarget || n.toElement; + l = u ? Z(u) : null; + } else (c = null), (l = t); + if (c === l) return null; + var h = void 0, + d = void 0, + p = void 0, + f = void 0; + "mouseout" === e || "mouseover" === e + ? ((h = oi), (d = si.mouseLeave), (p = si.mouseEnter), (f = "mouse")) + : ("pointerout" !== e && "pointerover" !== e) || ((h = ai), (d = si.pointerLeave), (p = si.pointerEnter), (f = "pointer")); + var m = null == c ? a : Q(c), + g = null == l ? a : Q(l), + b = h.getPooled(d, c, n, i); + (b.type = f + "leave"), (b.target = m), (b.relatedTarget = g); + var _ = h.getPooled(p, l, n, i); + return ( + (_.type = f + "enter"), + (_.target = g), + (_.relatedTarget = m), + (function (e, t, n, i) { + te(n, i, re, e, t); + })(b, _, c, l), + [b, _] + ); + }, + }; + function li(e, t) { + return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t); + } + var ui = Object.prototype.hasOwnProperty; + function hi(e, t) { + if (li(e, t)) return !0; + if ("object" != typeof e || null === e || "object" != typeof t || null === t) return !1; + var n = Object.keys(e), + i = Object.keys(t); + if (n.length !== i.length) return !1; + for (var r = 0; r < n.length; r++) if (!ui.call(t, n[r]) || !li(e[n[r]], t[n[r]])) return !1; + return !0; + } + function di(e, t) { + var n = { responder: e, props: t }; + return Object.freeze(n), n; + } + function pi(e) { + return e._reactInternalFiber; + } + o.unstable_UserBlockingPriority, o.unstable_runWithPriority, new Map(), new Map(), new Set(), new Map(); + var fi = _t.ReactCurrentOwner; + function mi(e) { + var t = e; + if (e.alternate) for (; t.return; ) t = t.return; + else { + if (0 != (2 & t.effectTag)) return 1; + for (; t.return; ) if (0 != (2 & (t = t.return).effectTag)) return 1; + } + return 3 === t.tag ? 2 : 3; + } + function gi(e) { + return 2 === mi(e); + } + function bi(e) { + !(function () { + if (2 !== mi(e)) throw s(Error("Unable to find node on an unmounted component.")); + })(); + } + function _i(e) { + var t = e.alternate; + if (!t) { + var n = mi(e); + return ( + (function () { + if (3 === n) throw s(Error("Unable to find node on an unmounted component.")); + })(), + 1 === n ? null : e + ); + } + for (var i = e, r = t; ; ) { + var o = i.return; + if (null === o) break; + var a = o.alternate; + if (null === a) { + var c = o.return; + if (null !== c) { + i = r = c; + continue; + } + break; + } + if (o.child === a.child) { + for (var l = o.child; l; ) { + if (l === i) return bi(o), e; + if (l === r) return bi(o), t; + l = l.sibling; + } + !(function () { + throw s(Error("Unable to find node on an unmounted component.")); + })(); + } + if (i.return !== r.return) (i = o), (r = a); + else { + for (var u = !1, h = o.child; h; ) { + if (h === i) { + (u = !0), (i = o), (r = a); + break; + } + if (h === r) { + (u = !0), (r = o), (i = a); + break; + } + h = h.sibling; + } + if (!u) { + for (h = a.child; h; ) { + if (h === i) { + (u = !0), (i = a), (r = o); + break; + } + if (h === r) { + (u = !0), (r = a), (i = o); + break; + } + h = h.sibling; + } + !(function () { + if (!u) throw s(Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")); + })(); + } + } + !(function () { + if (i.alternate !== r) throw s(Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")); + })(); + } + return ( + (function () { + if (3 !== i.tag) throw s(Error("Unable to find node on an unmounted component.")); + })(), + i.stateNode.current === i ? e : t + ); + } + function vi(e) { + var t = _i(e); + if (!t) return null; + for (var n = t; ; ) { + if (5 === n.tag || 6 === n.tag) return n; + if (n.child) (n.child.return = n), (n = n.child); + else { + if (n === t) return null; + for (; !n.sibling; ) { + if (!n.return || n.return === t) return null; + n = n.return; + } + (n.sibling.return = n.return), (n = n.sibling); + } + } + return null; + } + function yi(e, t, n) { + e.addEventListener(t, n, !0); + } + var Ci = Oe.extend({ animationName: null, elapsedTime: null, pseudoElement: null }), + Pi = Oe.extend({ + clipboardData: function (e) { + return "clipboardData" in e ? e.clipboardData : window.clipboardData; + }, + }), + xi = Qn.extend({ relatedTarget: null }); + function Ti(e) { + var t = void 0, + n = e.keyCode; + return "charCode" in e ? 0 === (t = e.charCode) && 13 === n && (t = 13) : (t = n), 10 === t && (t = 13), t >= 32 || 13 === t ? t : 0; + } + for ( + var Si = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified", + }, + Oi = { + 8: "Backspace", + 9: "Tab", + 12: "Clear", + 13: "Enter", + 16: "Shift", + 17: "Control", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Escape", + 32: " ", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "ArrowLeft", + 38: "ArrowUp", + 39: "ArrowRight", + 40: "ArrowDown", + 45: "Insert", + 46: "Delete", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "NumLock", + 145: "ScrollLock", + 224: "Meta", + }, + Ei = Qn.extend({ + key: function (e) { + if (e.key) { + var t = Si[e.key] || e.key; + if ("Unidentified" !== t) return t; + } + if ("keypress" === e.type) { + var n = Ti(e); + return 13 === n ? "Enter" : String.fromCharCode(n); + } + return "keydown" === e.type || "keyup" === e.type ? Oi[e.keyCode] || "Unidentified" : ""; + }, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: ei, + charCode: function (e) { + return "keypress" === e.type ? Ti(e) : 0; + }, + keyCode: function (e) { + return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0; + }, + which: function (e) { + return "keypress" === e.type ? Ti(e) : "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0; + }, + }), + Mi = oi.extend({ dataTransfer: null }), + Ai = Qn.extend({ touches: null, targetTouches: null, changedTouches: null, altKey: null, metaKey: null, ctrlKey: null, shiftKey: null, getModifierState: ei }), + Ii = Oe.extend({ propertyName: null, elapsedTime: null, pseudoElement: null }), + Di = oi.extend({ + deltaX: function (e) { + return ("deltaX" in e) ? e.deltaX : ("wheelDeltaX" in e) ? -e.wheelDeltaX : 0; + }, + deltaY: function (e) { + return ("deltaY" in e) ? e.deltaY : ("wheelDeltaY" in e) ? -e.wheelDeltaY : ("wheelDelta" in e) ? -e.wheelDelta : 0; + }, + deltaZ: null, + deltaMode: null, + }), + Ri = [ + ["blur", "blur", 0], + ["cancel", "cancel", 0], + ["click", "click", 0], + ["close", "close", 0], + ["contextmenu", "contextMenu", 0], + ["copy", "copy", 0], + ["cut", "cut", 0], + ["auxclick", "auxClick", 0], + ["dblclick", "doubleClick", 0], + ["dragend", "dragEnd", 0], + ["dragstart", "dragStart", 0], + ["drop", "drop", 0], + ["focus", "focus", 0], + ["input", "input", 0], + ["invalid", "invalid", 0], + ["keydown", "keyDown", 0], + ["keypress", "keyPress", 0], + ["keyup", "keyUp", 0], + ["mousedown", "mouseDown", 0], + ["mouseup", "mouseUp", 0], + ["paste", "paste", 0], + ["pause", "pause", 0], + ["play", "play", 0], + ["pointercancel", "pointerCancel", 0], + ["pointerdown", "pointerDown", 0], + ["pointerup", "pointerUp", 0], + ["ratechange", "rateChange", 0], + ["reset", "reset", 0], + ["seeked", "seeked", 0], + ["submit", "submit", 0], + ["touchcancel", "touchCancel", 0], + ["touchend", "touchEnd", 0], + ["touchstart", "touchStart", 0], + ["volumechange", "volumeChange", 0], + ["drag", "drag", 1], + ["dragenter", "dragEnter", 1], + ["dragexit", "dragExit", 1], + ["dragleave", "dragLeave", 1], + ["dragover", "dragOver", 1], + ["mousemove", "mouseMove", 1], + ["mouseout", "mouseOut", 1], + ["mouseover", "mouseOver", 1], + ["pointermove", "pointerMove", 1], + ["pointerout", "pointerOut", 1], + ["pointerover", "pointerOver", 1], + ["scroll", "scroll", 1], + ["toggle", "toggle", 1], + ["touchmove", "touchMove", 1], + ["wheel", "wheel", 1], + ["abort", "abort", 2], + [pe, "animationEnd", 2], + [fe, "animationIteration", 2], + [me, "animationStart", 2], + ["canplay", "canPlay", 2], + ["canplaythrough", "canPlayThrough", 2], + ["durationchange", "durationChange", 2], + ["emptied", "emptied", 2], + ["encrypted", "encrypted", 2], + ["ended", "ended", 2], + ["error", "error", 2], + ["gotpointercapture", "gotPointerCapture", 2], + ["load", "load", 2], + ["loadeddata", "loadedData", 2], + ["loadedmetadata", "loadedMetadata", 2], + ["loadstart", "loadStart", 2], + ["lostpointercapture", "lostPointerCapture", 2], + ["playing", "playing", 2], + ["progress", "progress", 2], + ["seeking", "seeking", 2], + ["stalled", "stalled", 2], + ["suspend", "suspend", 2], + ["timeupdate", "timeUpdate", 2], + [ge, "transitionEnd", 2], + ["waiting", "waiting", 2], + ], + wi = {}, + Li = {}, + Fi = 0; + Fi < Ri.length; + Fi++ + ) { + var Ni = Ri[Fi], + ki = Ni[0], + zi = Ni[1], + ji = Ni[2], + Bi = "on" + (zi[0].toUpperCase() + zi.slice(1)), + Vi = { phasedRegistrationNames: { bubbled: Bi, captured: Bi + "Capture" }, dependencies: [ki], eventPriority: ji }; + (wi[zi] = Vi), (Li[ki] = Vi); + } + var Gi = [ + "abort", + "cancel", + "canplay", + "canplaythrough", + "close", + "durationchange", + "emptied", + "encrypted", + "ended", + "error", + "input", + "invalid", + "load", + "loadeddata", + "loadedmetadata", + "loadstart", + "pause", + "play", + "playing", + "progress", + "ratechange", + "reset", + "seeked", + "seeking", + "stalled", + "submit", + "suspend", + "timeupdate", + "toggle", + "volumechange", + "waiting", + ], + Ui = { + eventTypes: wi, + getEventPriority: function (e) { + var t = Li[e]; + return void 0 !== t ? t.eventPriority : 2; + }, + extractEvents: function (e, t, n, i) { + var r = Li[e]; + if (!r) return null; + var o = void 0; + switch (e) { + case "keypress": + if (0 === Ti(n)) return null; + case "keydown": + case "keyup": + o = Ei; + break; + case "blur": + case "focus": + o = xi; + break; + case "click": + if (2 === n.button) return null; + case "auxclick": + case "dblclick": + case "mousedown": + case "mousemove": + case "mouseup": + case "mouseout": + case "mouseover": + case "contextmenu": + o = oi; + break; + case "drag": + case "dragend": + case "dragenter": + case "dragexit": + case "dragleave": + case "dragover": + case "dragstart": + case "drop": + o = Mi; + break; + case "touchcancel": + case "touchend": + case "touchmove": + case "touchstart": + o = Ai; + break; + case pe: + case fe: + case me: + o = Ci; + break; + case ge: + o = Ii; + break; + case "scroll": + o = Qn; + break; + case "wheel": + o = Di; + break; + case "copy": + case "cut": + case "paste": + o = Pi; + break; + case "gotpointercapture": + case "lostpointercapture": + case "pointercancel": + case "pointerdown": + case "pointermove": + case "pointerout": + case "pointerover": + case "pointerup": + o = ai; + break; + default: + -1 === Gi.indexOf(e) && D(!1, "SimpleEventPlugin: Unhandled event type, `%s`. This warning is likely caused by a bug in React. Please file an issue.", e), (o = Oe); + } + var a = o.getPooled(r, t, n, i); + return ae(a), a; + }, + }, + Hi = (o.unstable_UserBlockingPriority, o.unstable_runWithPriority, Ui.getEventPriority), + Wi = []; + function Xi(e) { + for (; e.return; ) e = e.return; + return 3 !== e.tag ? null : e.stateNode.containerInfo; + } + function Yi(e) { + var t = e.targetInst, + n = t; + do { + if (!n) { + e.ancestors.push(n); + break; + } + var i = Xi(n); + if (!i) break; + e.ancestors.push(n), (n = Z(i)); + } while (n); + for (var r = 0; r < e.ancestors.length; r++) { + t = e.ancestors[r]; + var o = dt(e.nativeEvent); + H(e.topLevelType, t, e.nativeEvent, o); + } + } + var Ki = !0; + function Zi(e) { + Ki = !!e; + } + function qi(e, t) { + Ji(t, e, !1); + } + function Qi(e, t) { + Ji(t, e, !0); + } + function Ji(e, t, n) { + var i = void 0; + switch (Hi(t)) { + case 0: + i = $i.bind(null, t, 1); + break; + case 1: + i = er.bind(null, t, 1); + break; + case 2: + default: + i = nr.bind(null, t, 1); + } + var r = t; + n + ? yi(e, r, i) + : (function (e, t, n) { + e.addEventListener(t, n, !1); + })(e, r, i); + } + function $i(e, t, n) { + lt(n.timeStamp), ct(nr, e, t, n); + } + function er(e, t, n) { + nr(e, 0, n); + } + function tr(e, t, n, i) { + var r, + o = (function (e, t, n) { + if (Wi.length) { + var i = Wi.pop(); + return (i.topLevelType = e), (i.nativeEvent = t), (i.targetInst = n), i; + } + return { topLevelType: e, nativeEvent: t, targetInst: n, ancestors: [] }; + })(e, n, i); + try { + st(Yi, o); + } finally { + ((r = o).topLevelType = null), (r.nativeEvent = null), (r.targetInst = null), (r.ancestors.length = 0), Wi.length < 10 && Wi.push(r); + } + } + function nr(e, t, n) { + if (Ki) { + var i = dt(n), + r = Z(i); + null === r || "number" != typeof r.tag || gi(r) || (r = null), tr(e, 0, n, r); + } + } + var ir = new ("function" == typeof WeakMap ? WeakMap : Map)(); + function rr(e) { + var t = ir.get(e); + return void 0 === t && ((t = new Set()), ir.set(e, t)), t; + } + function or(e) { + if (void 0 === (e = e || ("undefined" != typeof document ? document : void 0))) return null; + try { + return e.activeElement || e.body; + } catch (t) { + return e.body; + } + } + function ar(e) { + for (; e && e.firstChild; ) e = e.firstChild; + return e; + } + function sr(e) { + for (; e; ) { + if (e.nextSibling) return e.nextSibling; + e = e.parentNode; + } + } + function cr(e, t) { + for (var n = ar(e), i = 0, r = 0; n; ) { + if (3 === n.nodeType) { + if (((r = i + n.textContent.length), i <= t && r >= t)) return { node: n, offset: t - i }; + i = r; + } + n = ar(sr(n)); + } + } + function lr(e) { + var t = e.ownerDocument, + n = (t && t.defaultView) || window, + i = n.getSelection && n.getSelection(); + if (!i || 0 === i.rangeCount) return null; + var r = i.anchorNode, + o = i.anchorOffset, + a = i.focusNode, + s = i.focusOffset; + try { + r.nodeType, a.nodeType; + } catch (e) { + return null; + } + return (function (e, t, n, i, r) { + var o = 0, + a = -1, + s = -1, + c = 0, + l = 0, + u = e, + h = null; + e: for (;;) { + for ( + var d = null; + u !== t || (0 !== n && 3 !== u.nodeType) || (a = o + n), u !== i || (0 !== r && 3 !== u.nodeType) || (s = o + r), 3 === u.nodeType && (o += u.nodeValue.length), null !== (d = u.firstChild); + + ) + (h = u), (u = d); + for (;;) { + if (u === e) break e; + if ((h === t && ++c === n && (a = o), h === i && ++l === r && (s = o), null !== (d = u.nextSibling))) break; + h = (u = h).parentNode; + } + u = d; + } + return -1 === a || -1 === s ? null : { start: a, end: s }; + })(e, r, o, a, s); + } + function ur(e) { + return e && 3 === e.nodeType; + } + function hr(e) { + return ( + e && + e.ownerDocument && + (function e(t, n) { + return !(!t || !n) && (t === n || (!ur(t) && (ur(n) ? e(t, n.parentNode) : "contains" in t ? t.contains(n) : !!t.compareDocumentPosition && !!(16 & t.compareDocumentPosition(n))))); + })(e.ownerDocument.documentElement, e) + ); + } + function dr(e) { + try { + return "string" == typeof e.contentWindow.location.href; + } catch (e) { + return !1; + } + } + function pr() { + for (var e = window, t = or(); t instanceof e.HTMLIFrameElement; ) { + if (!dr(t)) return t; + t = or((e = t.contentWindow).document); + } + return t; + } + function fr(e) { + var t = e && e.nodeName && e.nodeName.toLowerCase(); + return t && (("input" === t && ("text" === e.type || "search" === e.type || "tel" === e.type || "url" === e.type || "password" === e.type)) || "textarea" === t || "true" === e.contentEditable); + } + function mr(e) { + var t, + n, + i, + r, + o = pr(), + a = e.focusedElem, + s = e.selectionRange; + if (o !== a && hr(a)) { + null !== s && + fr(a) && + ((t = a), + (i = (n = s).start), + void 0 === (r = n.end) && (r = i), + "selectionStart" in t + ? ((t.selectionStart = i), (t.selectionEnd = Math.min(r, t.value.length))) + : (function (e, t) { + var n = e.ownerDocument || document, + i = (n && n.defaultView) || window; + if (i.getSelection) { + var r = i.getSelection(), + o = e.textContent.length, + a = Math.min(t.start, o), + s = void 0 === t.end ? a : Math.min(t.end, o); + if (!r.extend && a > s) { + var c = s; + (s = a), (a = c); + } + var l = cr(e, a), + u = cr(e, s); + if (l && u) { + if (1 === r.rangeCount && r.anchorNode === l.node && r.anchorOffset === l.offset && r.focusNode === u.node && r.focusOffset === u.offset) return; + var h = n.createRange(); + h.setStart(l.node, l.offset), r.removeAllRanges(), a > s ? (r.addRange(h), r.extend(u.node, u.offset)) : (h.setEnd(u.node, u.offset), r.addRange(h)); + } + } + })(t, n)); + for (var c = [], l = a; (l = l.parentNode); ) 1 === l.nodeType && c.push({ element: l, left: l.scrollLeft, top: l.scrollTop }); + "function" == typeof a.focus && a.focus(); + for (var u = 0; u < c.length; u++) { + var h = c[u]; + (h.element.scrollLeft = h.left), (h.element.scrollTop = h.top); + } + } + } + var gr = se && "documentMode" in document && document.documentMode <= 11, + br = { + select: { + phasedRegistrationNames: { bubbled: "onSelect", captured: "onSelectCapture" }, + dependencies: ["blur", "contextmenu", "dragend", "focus", "keydown", "keyup", "mousedown", "mouseup", "selectionchange"], + }, + }, + _r = null, + vr = null, + yr = null, + Cr = !1; + function Pr(e) { + return e.window === e ? e.document : 9 === e.nodeType ? e : e.ownerDocument; + } + function xr(e, t) { + var n = Pr(t); + if (Cr || null == _r || _r !== or(n)) return null; + var i = (function (e) { + if ("selectionStart" in e && fr(e)) return { start: e.selectionStart, end: e.selectionEnd }; + var t = ((e.ownerDocument && e.ownerDocument.defaultView) || window).getSelection(); + return { anchorNode: t.anchorNode, anchorOffset: t.anchorOffset, focusNode: t.focusNode, focusOffset: t.focusOffset }; + })(_r); + if (!yr || !hi(yr, i)) { + yr = i; + var r = Oe.getPooled(br.select, vr, e, t); + return (r.type = "select"), (r.target = _r), ae(r), r; + } + return null; + } + var Tr = { + eventTypes: br, + extractEvents: function (e, t, n, i) { + var r = Pr(i); + if ( + !r || + !(function (e, t) { + for (var n = rr(t), i = g[e], r = 0; r < i.length; r++) { + var o = i[r]; + if (!n.has(o)) return !1; + } + return !0; + })("onSelect", r) + ) + return null; + var o = t ? Q(t) : window; + switch (e) { + case "focus": + (ht(o) || "true" === o.contentEditable) && ((_r = o), (vr = t), (yr = null)); + break; + case "blur": + (_r = null), (vr = null), (yr = null); + break; + case "mousedown": + Cr = !0; + break; + case "contextmenu": + case "mouseup": + case "dragend": + return (Cr = !1), xr(n, i); + case "selectionchange": + if (gr) break; + case "keydown": + case "keyup": + return xr(n, i); + } + return null; + }, + }; + G.injectEventPluginOrder(["ResponderEventPlugin", "SimpleEventPlugin", "EnterLeaveEventPlugin", "ChangeEventPlugin", "SelectEventPlugin", "BeforeInputEventPlugin"]), + (R = J), + (w = q), + ((L = Q) && w) || D(!1, "EventPluginUtils.setComponentTree(...): Injected module is missing getNodeFromInstance or getInstanceFromNode."), + G.injectEventPluginsByName({ SimpleEventPlugin: Ui, EnterLeaveEventPlugin: ci, ChangeEventPlugin: qn, SelectEventPlugin: Tr, BeforeInputEventPlugin: Ke }); + var Sr = !1, + Or = !1; + function Er(e, n) { + "object" == typeof n.children && + null !== n.children && + t.Children.forEach(n.children, function (e) { + null != e && "string" != typeof e && "number" != typeof e && "string" == typeof e.type && (Or || ((Or = !0), Kt(!1, "Only strings and numbers are supported as